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


void script_6144(int a0) {
	int v2 = 1;
	int v1 = 14;
	int v0 = -1;
	cs2method_10467(1, 83230755);
	while (v2 <= v1) {
		int v3 = script_6139(v2);
		if (cs2method_11038(v3, 0) == 1) {
			cs2method_20162(new function<script_6145>(int a0,int a1,int a2,int a3,int a4) {
				int v4 = cs2method_10060(a4, 1);
				if (v4 < 100) {
					cs2method_20162(load function<6145>, new WidgetPointer(-32768,3), a0, a2, v4, a3, "Iiiii", new WidgetPointer(a1));
				}
				if (v4 < 0) {
					return;
				}
				int v3 = 25;
				int v0 = cs2method_10122(a3, 6, v3);
				int v5 = cs2method_10122(v4, 100, v0);
				int v1 = cs2method_10877(v5);
				int v2 = cs2method_10877(v5);
				if (cs2method_10877(2) == 0) {
					v1 = cs2method_10461(0, v1);
				}
				if (cs2method_10877(2) == 0) {
					v2 = cs2method_10461(0, v2);
				}
				if (cs2method_11038(a1, 0) == 1) {
					cs2method_10063(cs2method_10060(a0, v1), cs2method_10060(a2, v2), 0, 0);
				}
				return;
			}, new WidgetPointer(-32768,3), cs2method_10878(), cs2method_10406(), cs2method_10461(0, cs2method_10877(50)), a0, "Iiiii", new WidgetPointer(v3));
		}
		v2 = cs2method_10060(v2, 1);
	}
	return;
}
