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


void script_864(int a0,int a1,int a2,int a3,int a4,int a5,int a6,int a7,int a8,int a9,int a10) {
	int v1;
	int v0 = 0;
	if (a4 == 1) {
		v1 = cs2method_10939(468, cs2method_10744(a0));
	} else {
		v1 = cs2method_10236(a0);
	}
	if (a8 == 0 && cs2method_10461(cs2method_10236(a7), v1) < a3) {
		cs2method_20162(new function<script_2929>(int a0,int a1,int a2,int a3,int a4,int a5,int a6,int a7,int a8,int a9,int a10) {
			script_864(a2, a8, a3, a7, a5, a0, a10, a4, a1, a6, a9);
			return;
		}, new WidgetPointer(a7), a8, new WidgetPointer(a9), new WidgetPointer(a5), new WidgetPointer(a10), new WidgetPointer(a0), a4, a3, a6, a2, a1, "I1IIII1iiii", new WidgetPointer(a9));
		return;
	}
	cs2method_20162(new function<none>() {
	}, "", new WidgetPointer(a9));
	cs2method_20162(new function<script_2930>(int a0,int a1,int a2,int a3,int a4,int a5,int a6,int a7,int a8,int a9) {
		if (a7 < a5) {
			int v1 = cs2method_10060(a7, 1);
			cs2method_20162(load function<2930>, new WidgetPointer(a0), a1, a8, new WidgetPointer(a2), new WidgetPointer(a4), new WidgetPointer(a3), a6, v1, a5, a9, "I1iIIIiiii", new WidgetPointer(a0));
			return;
		}
		int v0 = cs2method_10236(a0);
		if (a1 == 1) {
			if (cs2method_10461(v0, a8) < a6) {
				cs2method_10283(cs2method_10872(cs2method_10060(v0, a9), cs2method_10060(a6, a8)), 31, 0, 0, a0);
			} else {
				cs2method_20162(new function<none>() {
				}, "", new WidgetPointer(a0));
				cs2method_10283(cs2method_10060(a6, a8), 31, 0, 0, a0);
			}
			cs2method_10758(2569, a2);
			cs2method_10758(2568, a4);
			cs2method_10758(2568, a3);
		} else {
			if (v0 > 32) {
				cs2method_10283(cs2method_11048(cs2method_10461(v0, a9), 32), 31, 0, 0, a0);
			} else {
				cs2method_20162(new function<none>() {
				}, "", new WidgetPointer(a0));
				cs2method_10283(32, 31, 0, 0, a0);
			}
			cs2method_10758(2567, a2);
			cs2method_10758(2566, a4);
			cs2method_10758(2566, a3);
		}
		return;
	}, new WidgetPointer(a7), a8, v1, new WidgetPointer(a9), new WidgetPointer(a5), new WidgetPointer(a10), a3, a6, a2, a1, "I1iIIIiiii", new WidgetPointer(a7));
	return;
}
