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


void script_4544(int a0,int a1,int a2,int a3,int a4,int a5,int a6,int a7) {
	int v0 = cs2method_10982(a4);
	if (v0 == -1) {
		return;
	}
	if (a0 == 0 || a0 == 1) {
		if (cs2method_10236(v0) == a6) {
			cs2method_20162(new function<script_4545>(int a0,int a1,int a2,int a3,int a4,int a5) {
				flow_0:
					IF (a3 == 0) 
						GOTO	flow_1
					IF (a3 == 1 && cs2method_10060(cs2method_10236(a2), a5) >= a4) 
						GOTO	flow_2
					GOTO	flow_5
				flow_1:
				flow_2:
					cs2method_10283(a4, cs2method_10823(a2), 0, 0, a2);
					if (a0 != -1) {
						cs2method_10758(a0, a1);
					}
					cs2method_20162(new function<none>() {
					}, "", new WidgetPointer(a2));
					return;
				flow_5:
					IF (a3 == 2) 
						GOTO	flow_6
					IF (a3 == 3 && cs2method_10060(cs2method_10823(a2), a5) >= a4) 
						GOTO	flow_7
					GOTO	flow_10
				flow_6:
				flow_7:
					cs2method_10283(cs2method_10236(a2), a4, 0, 0, a2);
					if (a0 != -1) {
						cs2method_10758(a0, a1);
					}
					cs2method_20162(new function<none>() {
					}, "", new WidgetPointer(a2));
					return;
				flow_10:
					switch (a3) {
						case 0:
						case 1:
							cs2method_10283(cs2method_10060(cs2method_10236(a2), a5), cs2method_10823(a2), 0, 0, a2);
							break;
						case 2:
						case 3:
							cs2method_10283(cs2method_10236(a2), cs2method_10060(cs2method_10823(a2), a5), 0, 0, a2);
					}
					return;
			}, new WidgetPointer(-32768,3), a2, a0, new WidgetPointer(a5), a3, a7, "IiiIdi", new WidgetPointer(v0));
		} else {
			if (cs2method_10236(v0) == a2) {
				cs2method_20162(new function<script_4546>(int a0,int a1,int a2,int a3,int a4,int a5) {
					flow_0:
						IF (a5 == 0) 
							GOTO	flow_1
						IF (a5 == 1 && cs2method_10060(cs2method_10236(a0), a1) <= a4) 
							GOTO	flow_2
						GOTO	flow_5
					flow_1:
					flow_2:
						cs2method_10283(a4, cs2method_10823(a0), 0, 0, a0);
						if (a3 != -1) {
							cs2method_10758(a3, a2);
						}
						cs2method_20162(new function<none>() {
						}, "", new WidgetPointer(a0));
						return;
					flow_5:
						IF (a5 == 2) 
							GOTO	flow_6
						IF (a5 == 3 && cs2method_10060(cs2method_10823(a0), a1) <= a4) 
							GOTO	flow_7
						GOTO	flow_10
					flow_6:
					flow_7:
						cs2method_10283(cs2method_10236(a0), a4, 0, 0, a0);
						if (a3 != -1) {
							cs2method_10758(a3, a2);
						}
						cs2method_20162(new function<none>() {
						}, "", new WidgetPointer(a0));
						return;
					flow_10:
						switch (a5) {
							case 0:
							case 1:
								cs2method_10283(cs2method_10461(cs2method_10236(a0), a1), cs2method_10823(a0), 0, 0, a0);
								break;
							case 2:
							case 3:
								cs2method_10283(cs2method_10236(a0), cs2method_10461(cs2method_10823(a0), a1), 0, 0, a0);
						}
						return;
				}, new WidgetPointer(-32768,3), a6, a0, new WidgetPointer(a5), a1, a7, "IiiIdi", new WidgetPointer(v0));
			}
		}
	} else {
		if (a0 == 2 || a0 == 3) {
			if (cs2method_10823(v0) == a6) {
				cs2method_20162(new function<script_4545>(int a0,int a1,int a2,int a3,int a4,int a5) {
					flow_0:
						IF (a1 == 0) 
							GOTO	flow_1
						IF (a1 == 1 && cs2method_10060(cs2method_10236(a0), a3) >= a4) 
							GOTO	flow_2
						GOTO	flow_5
					flow_1:
					flow_2:
						cs2method_10283(a4, cs2method_10823(a0), 0, 0, a0);
						if (a2 != -1) {
							cs2method_10758(a2, a5);
						}
						cs2method_20162(new function<none>() {
						}, "", new WidgetPointer(a0));
						return;
					flow_5:
						IF (a1 == 2) 
							GOTO	flow_6
						IF (a1 == 3 && cs2method_10060(cs2method_10823(a0), a3) >= a4) 
							GOTO	flow_7
						GOTO	flow_10
					flow_6:
					flow_7:
						cs2method_10283(cs2method_10236(a0), a4, 0, 0, a0);
						if (a2 != -1) {
							cs2method_10758(a2, a5);
						}
						cs2method_20162(new function<none>() {
						}, "", new WidgetPointer(a0));
						return;
					flow_10:
						switch (a1) {
							case 0:
							case 1:
								cs2method_10283(cs2method_10060(cs2method_10236(a0), a3), cs2method_10823(a0), 0, 0, a0);
								break;
							case 2:
							case 3:
								cs2method_10283(cs2method_10236(a0), cs2method_10060(cs2method_10823(a0), a3), 0, 0, a0);
						}
						return;
				}, new WidgetPointer(-32768,3), a2, a0, new WidgetPointer(a5), a3, a7, "IiiIdi", new WidgetPointer(v0));
			} else {
				if (cs2method_10823(v0) == a2) {
					cs2method_20162(new function<script_4546>(int a0,int a1,int a2,int a3,int a4,int a5) {
						flow_0:
							IF (a1 == 0) 
								GOTO	flow_1
							IF (a1 == 1 && cs2method_10060(cs2method_10236(a0), a4) <= a3) 
								GOTO	flow_2
							GOTO	flow_5
						flow_1:
						flow_2:
							cs2method_10283(a3, cs2method_10823(a0), 0, 0, a0);
							if (a2 != -1) {
								cs2method_10758(a2, a5);
							}
							cs2method_20162(new function<none>() {
							}, "", new WidgetPointer(a0));
							return;
						flow_5:
							IF (a1 == 2) 
								GOTO	flow_6
							IF (a1 == 3 && cs2method_10060(cs2method_10823(a0), a4) <= a3) 
								GOTO	flow_7
							GOTO	flow_10
						flow_6:
						flow_7:
							cs2method_10283(cs2method_10236(a0), a3, 0, 0, a0);
							if (a2 != -1) {
								cs2method_10758(a2, a5);
							}
							cs2method_20162(new function<none>() {
							}, "", new WidgetPointer(a0));
							return;
						flow_10:
							switch (a1) {
								case 0:
								case 1:
									cs2method_10283(cs2method_10461(cs2method_10236(a0), a4), cs2method_10823(a0), 0, 0, a0);
									break;
								case 2:
								case 3:
									cs2method_10283(cs2method_10236(a0), cs2method_10461(cs2method_10823(a0), a4), 0, 0, a0);
							}
							return;
					}, new WidgetPointer(-32768,3), a6, a0, new WidgetPointer(a5), a1, a7, "IiiIdi", new WidgetPointer(v0));
				}
			}
		}
	}
	return;
}
