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


void script_3475(int a0,int a1,int a2,int a3,int a4,int a5) {
	script_1088(a3, 0);
	script_680(a1);
	script_680(a5);
	cs2method_20680(new function<script_95>(int a0) {
		script_1361(a0);
		return;
	}, new WidgetPointer(a1), "I", new WidgetPointer(a2));
	cs2method_20680(new function<script_95>(int a0) {
		script_1361(a0);
		return;
	}, new WidgetPointer(a5), "I", new WidgetPointer(a4));
	cs2method_20750(new function<script_93>(int a0) {
		script_680(a0);
		return;
	}, new WidgetPointer(a1), "I", new WidgetPointer(a2));
	cs2method_20750(new function<script_93>(int a0) {
		script_680(a0);
		return;
	}, new WidgetPointer(a5), "I", new WidgetPointer(a4));
	cs2method_10251(0, 300, a0);
	cs2method_20162(new function<none>() {
	}, "", new WidgetPointer(a0));
	cs2method_10467(0, a2);
	cs2method_10467(0, a4);
	cs2method_20486(new function<script_3479>(int a0,int a1,int a2,int a3) {
		cs2method_10467(1, a1);
		cs2method_10467(1, a2);
		cs2method_10567(31262, 1, 0);
		cs2method_20162(new function<script_3480>(int a0,int a1,int a2,int a3,int a4) {
			int v0 = cs2method_10718(a0);
			if (a4 == 1) {
				if (v0 != 0) {
					v0 = cs2method_11048(cs2method_10461(v0, 6), 0);
					cs2method_10251(0, v0, a0);
				}
				if (v0 <= 0) {
					cs2method_10251(0, 0, a0);
					cs2method_20162(new function<none>() {
					}, "", new WidgetPointer(a0));
					cs2method_10467(0, a3);
					cs2method_10467(0, a1);
					return;
				}
			} else {
				if (v0 != 300) {
					v0 = cs2method_10872(cs2method_10060(v0, 6), 300);
					cs2method_10251(0, v0, a0);
				}
				if (v0 >= 300) {
					cs2method_10251(0, 300, a0);
					cs2method_20162(new function<none>() {
					}, "", new WidgetPointer(a0));
					cs2method_10467(0, a3);
					cs2method_10467(0, a1);
					return;
				}
			}
			cs2method_10467(1, a3);
			cs2method_10467(1, a1);
			if (cs2method_10461(cs2method_10133(), a2) >= 10) {
				cs2method_10567(31262, 1, 0);
				cs2method_20162(load function<3480>, new WidgetPointer(a0), new WidgetPointer(a3), new WidgetPointer(a1), a4, cs2method_10133(), "III1i", new WidgetPointer(a0));
			}
			return;
		}, new WidgetPointer(a0), new WidgetPointer(a1), new WidgetPointer(a2), a3, cs2method_10133(), "III1i", new WidgetPointer(a0));
		return;
	}, new WidgetPointer(a0), new WidgetPointer(a2), new WidgetPointer(a4), 1, "III1", new WidgetPointer(a2));
	cs2method_20486(new function<script_3479>(int a0,int a1,int a2,int a3) {
		cs2method_10467(1, a0);
		cs2method_10467(1, a2);
		cs2method_10567(31262, 1, 0);
		cs2method_20162(new function<script_3480>(int a0,int a1,int a2,int a3,int a4) {
			int v0 = cs2method_10718(a1);
			if (a4 == 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(), a2) >= 10) {
				cs2method_10567(31262, 1, 0);
				cs2method_20162(load function<3480>, new WidgetPointer(a1), new WidgetPointer(a3), new WidgetPointer(a0), a4, cs2method_10133(), "III1i", new WidgetPointer(a1));
			}
			return;
		}, new WidgetPointer(a1), new WidgetPointer(a0), new WidgetPointer(a2), a3, cs2method_10133(), "III1i", new WidgetPointer(a1));
		return;
	}, new WidgetPointer(a0), new WidgetPointer(a2), new WidgetPointer(a4), 0, "III1", new WidgetPointer(a4));
	cs2method_20348(new function<script_3476>() {
		script_3477();
		return;
	}, 2544, 2545, 2546, 3, "Y", new WidgetPointer(a3));
	cs2method_20243(new function<script_3476>() {
		script_3477();
		return;
	}, 1317, 1318, 2, "Y", new WidgetPointer(a3));
	script_3477();
	return;
}
