/* 
 * Script decompiled by jagdecs2 v3.2
 * Decompiler opts:
 * --------------
 * t1LocalAnalyzer:true
 * t2LocalAnalyzer:true
 * beautifier:true
 * --------------
 * Made by mgi125 ;)
 */


void script_3480(int a0,int a1,int a2,int a3,int a4) {
	int v0 = cs2method_10718(a1);
	if (a2 == 1) {
		if (v0 != 0) {
			v0 = cs2method_11048(cs2method_10461(v0, 6), 0);
			cs2method_10251(0, v0, a1);
		}
		if (v0 <= 0) {
			cs2method_10251(0, 0, a1);
			cs2method_20162(new function<none>() {
			}, "", new WidgetPointer(a1));
			cs2method_10467(0, a3);
			cs2method_10467(0, a0);
			return;
		}
	} else {
		if (v0 != 300) {
			v0 = cs2method_10872(cs2method_10060(v0, 6), 300);
			cs2method_10251(0, v0, a1);
		}
		if (v0 >= 300) {
			cs2method_10251(0, 300, a1);
			cs2method_20162(new function<none>() {
			}, "", new WidgetPointer(a1));
			cs2method_10467(0, a3);
			cs2method_10467(0, a0);
			return;
		}
	}
	cs2method_10467(1, a3);
	cs2method_10467(1, a0);
	if (cs2method_10461(cs2method_10133(), a4) >= 10) {
		cs2method_10567(31262, 1, 0);
		cs2method_20162(load function<3480>, new WidgetPointer(a1), new WidgetPointer(a3), new WidgetPointer(a0), a2, cs2method_10133(), "III1i", new WidgetPointer(a1));
	}
	return;
}
