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


void script_8201(int a0,int a1,int a2,int a3) {
	int v0;
	int v1 = cs2method_10718(a0);
	if (a1 > v1) {
		v0 = cs2method_10872(cs2method_10060(v1, a2), a1);
	} else {
		v0 = cs2method_11048(cs2method_10461(v1, a2), a1);
	}
	cs2method_10251(0, v0, a0);
	script_7791(a3, a0);
	if (a1 == v0) {
		cs2method_20162(new function<none>() {
		}, "", new WidgetPointer(a0));
	} else {
		cs2method_20162(load function<8201>, a1, cs2method_11048(15, cs2method_10461(a2, 2)), new WidgetPointer(a3), new WidgetPointer(a0), "iiII", new WidgetPointer(a0));
	}
	return;
}
