/* 
 * 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_4411(int a0,int a1,int a2,int a3) {
	int v0;
	if (a0 == -1) {
		return;
	}
	int v4 = 0;
	int v5 = 0;
	if (cs2method_11038(a0, a3) == 1) {
		int v1 = cs2method_10699();
		if (a2 == 0) {
			flow_4:
				if (a1 == 1) {
					v0 = cs2method_10060(v1, 22);
				} else if (a1 == 0) {
					v0 = cs2method_10461(v1, 22);
				} else {
					cs2method_20061(new function<none>() {
					}, "");
					return;
				}
				int v2 = cs2method_11048(v0, 0);
				int v3 = cs2method_10872(v2, 255);
				cs2method_10002(v3);
				IF (a1 == 1) 
					GOTO	flow_10
				GOTO	flow_11
			flow_10:
				IF (v3 == 255) 
					GOTO	flow_13
			flow_11:
				IF (a1 == 0 && v3 == 0) 
					GOTO	flow_13
				GOTO	flow_14
			flow_13:
				cs2method_20061(new function<none>() {
				}, "");
				GOTO	flow_15
			flow_14:
				cs2method_20061(load function<4411>, new WidgetPointer(a0), a3, a1, 0, "Iiii");
			flow_15:
		} else {
			cs2method_20162(load function<4411>, new WidgetPointer(a0), a3, a1, cs2method_10461(a2, 1), "Iiii", new WidgetPointer(a0));
		}
	}
	return;
}
