/* 
 * Script decompiled by jagdecs2 v3.2
 * Decompiler opts:
 * --------------
 * t1LocalAnalyzer:true
 * t2LocalAnalyzer:true
 * beautifier:true
 * --------------
 * Made by mgi125 ;)
 */
// Beautifier was aborted, because this function contains unsolved flow blocks.


void script_5551(int a0,int a1,int a2,int a3) {
	flow_0:
		int v2 = 0;
		int v0 = 5;
		IF (a1 == 0) 
			GOTO	flow_1
		GOTO	flow_7
	flow_1:
		int v1 = cs2method_10461(a3, 1);
		cs2method_10467(0, 77201463);
		script_5539();
		cs2method_10273(77201486);
		cs2method_20162(new function<none>() {
		}, "", new WidgetPointer(1178,78));
		cs2_configs['cfg1726'] = 0;
		if (v1 > 0) {
			if (a0 == 0) {
				script_5547(v1);
			}
			if (a0 == 1) {
				script_5549(v1);
			}
		}
		GOTO	flow_21
	flow_7:
		IF (v2 < a2) 
			GOTO	flow_8
		GOTO	flow_15
	flow_8:
		if (cs2method_11038(77201486, v2) == 1) {
			if (a0 == 0) {
				cs2method_10063(cs2method_10461(cs2method_10878(), v0), 0, 0, 1);
			} else if (a0 == 1) {
				cs2method_10063(cs2method_10060(cs2method_10878(), v0), 0, 0, 1);
			} else {
				a1 = 0;
			}
		}
		v2 = cs2method_10060(v2, 1);
		GOTO	flow_7
	flow_15:
		if (a0 == 0) {
			a1 = cs2method_10060(a1, v0);
		} else if (a0 == 1) {
			a1 = cs2method_10461(a1, v0);
		} else {
			a1 = 0;
		}
		cs2method_20162(load function<5551>, a1, a2, a0, a3, "iiii", new WidgetPointer(1178,78));
	flow_21:
		return;
}
