void script_1665(int arg0,int arg1,int arg2,int arg3) {
	int ivar4;
	int ivar5;
	int ivar6;
	int ivar7;
	int ivar8;
	int ivar9;
	ivar4 = 0;
	ivar5 = 0;
	if (((boolean)script_3287())) {
		ivar4 = add(subtract(516, 439), 1);
		ivar5 = subtract(516, ivar4);
	} else {
		ivar4 = subtract(add(subtract(516, 439), 1), 10);
		ivar5 = subtract(subtract(516, 10), ivar4);
	}
	ivar6 = globalint_1038;
	ivar7 = subtract(globalint_192, ivar6);
	ivar8 = multiply(subtract(ivar4, ivar6), -1);
	ivar9 = subtract(ivar7, subtract(439, 1));
	if (ivar9 > 0) {
		ivar6 = add(ivar6, ivar9);
		ivar7 = subtract(439, 1);
	} else {
		if (ivar8 > 0) {
			ivar7 = add(ivar7, ivar8);
			ivar6 = ivar4;
		}
	}
	setWidgetText(new WidgetPointer(arg0), intToStr(ivar6));
	setWidgetText(new WidgetPointer(arg2), intToStr(ivar7));
	setWidgetText(new WidgetPointer(arg1), intToStr(ivar4));
	setWidgetText(new WidgetPointer(arg3), intToStr(ivar5));
	return;
}
