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


void script_5598(int a0) {
	int v0 = script_284(cs2method_10472());
	switch (cs2_configs['cfg1749']) {
		case 1:
			script_2768(75, a0);
			script_5602(v0);
			cs2method_10382(0, 0, 1000, 0, 1, 0);
			break;
		case 2:
			script_5602(v0);
			cs2method_10382(0, 1, 2000, 2000, 1, 1);
			cs2method_20196(new function<script_5599>(int a0,int a1,int a2,int a3) {
				if (cs2method_10723(0) > cs2method_10060(a0, 1)) {
					cs2method_10382(0, a0, a1, a2, 1, a0);
				}
				if (cs2method_10723(0) == cs2method_10060(a0, 1)) {
					cs2method_20196(new function<none>() {
					}, "", new WidgetPointer(a3));
				} else {
					int v0 = cs2method_10060(a0, 1);
					cs2method_20196(load function<5599>, new WidgetPointer(-32768,3), v0, 2000, 2000, "Iiii", new WidgetPointer(a3));
				}
				return;
			}, new WidgetPointer(-32768,3), 2, 2000, 2000, "Iiii", new WidgetPointer(a0));
			break;
		case 3:
			script_2768(75, a0);
			script_5603(v0);
			cs2method_10382(0, 0, 800, 800, 1, 0);
			cs2method_20196(new function<script_5600>(int a0,int a1,int a2,int a3) {
				if (a0 < 3) {
					cs2method_10382(0, a0, a3, a1, 1, a0);
				}
				if (a0 == 3) {
					cs2method_20196(new function<none>() {
					}, "", new WidgetPointer(a2));
				} else {
					int v0 = cs2method_10060(a0, 1);
					cs2method_20196(load function<5600>, new WidgetPointer(-32768,3), v0, 800, 800, "Iiii", new WidgetPointer(a2));
				}
				return;
			}, new WidgetPointer(-32768,3), 1, 800, 800, "Iiii", new WidgetPointer(a0));
			break;
		case 4:
			script_5603(v0);
			cs2method_10382(0, 3, 800, 800, 1, 3);
			cs2method_20196(new function<script_5601>(int a0,int a1,int a2,int a3) {
				if (cs2method_10723(0) > cs2method_10060(a1, 1)) {
					cs2method_10382(0, a1, a3, a2, 1, a1);
				}
				if (cs2method_10723(0) == cs2method_10060(a1, 1)) {
					cs2method_20196(new function<none>() {
					}, "", new WidgetPointer(a0));
				} else {
					int v0 = cs2method_10060(a1, 1);
					cs2method_20196(load function<5601>, new WidgetPointer(-32768,3), v0, 800, 800, "Iiii", new WidgetPointer(a0));
				}
				return;
			}, new WidgetPointer(-32768,3), 4, 800, 800, "Iiii", new WidgetPointer(a0));
			break;
	}
	return;
}
