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


void script_7052(int a0,int a1) {
	int v0 = script_7975(1430, a0);
	if (client_configs['cfg0'].bitcfg43 == idx22mapAttribute(a1, 2793) || client_configs['cfg0'].bitcfg18050 == idx22mapAttribute(a1, 2793) && client_configs['cfg0'].bitcfg43 != client_configs['cfg0'].bitcfg18050) {
		cs2method_10704(0, v0);
		if (client_configs['cfg0'].bitcfg43 == idx22mapAttribute(a1, 2793)) {
			cs2method_20162(new function<script_7054>(int a0,int a1,int a2,int a3) {
				int v2 = 0;
				int v0 = 0;
				int v1 = -1;
				int v3 = script_7975(1430, a1);
				switch (a1) {
					case 1:
						v2 = client_configs['cfg727'].bitcfg1723;
						v0 = client_configs['cfg727'].bitcfg1724;
						break;
					case 2:
						v2 = client_configs['cfg728'].bitcfg1725;
						v0 = client_configs['cfg728'].bitcfg1726;
						break;
					case 3:
						v2 = client_configs['cfg729'].bitcfg1727;
						v0 = client_configs['cfg729'].bitcfg1728;
						break;
					case 4:
						v2 = client_configs['cfg730'].bitcfg1729;
						v0 = client_configs['cfg730'].bitcfg1730;
						break;
					case 5:
						v2 = client_configs['cfg731'].bitcfg1731;
						v0 = client_configs['cfg731'].bitcfg1732;
						break;
					case 6:
						v2 = client_configs['cfg732'].bitcfg1733;
						v0 = client_configs['cfg732'].bitcfg1734;
						break;
					case 7:
						v2 = client_configs['cfg733'].bitcfg1735;
						v0 = client_configs['cfg733'].bitcfg1736;
						break;
					case 8:
						v2 = client_configs['cfg734'].bitcfg1737;
						v0 = client_configs['cfg734'].bitcfg1738;
						break;
					case 9:
						v2 = client_configs['cfg735'].bitcfg1739;
						v0 = client_configs['cfg735'].bitcfg1740;
						break;
					case 10:
						v2 = client_configs['cfg736'].bitcfg1741;
						v0 = client_configs['cfg736'].bitcfg1742;
						break;
					case 11:
						v2 = client_configs['cfg737'].bitcfg1743;
						v0 = client_configs['cfg737'].bitcfg1744;
						break;
					case 12:
						v2 = client_configs['cfg738'].bitcfg1745;
						v0 = client_configs['cfg738'].bitcfg1746;
						break;
					case 13:
						v2 = client_configs['cfg4432'].bitcfg22337;
						v0 = client_configs['cfg4432'].bitcfg22338;
						break;
					case 14:
						v2 = client_configs['cfg4433'].bitcfg22339;
						v0 = client_configs['cfg4433'].bitcfg22340;
				}
				int v4 = idx17mapData('i', 'J', 6740, v0);
				if (v2 != 6) {
					cs2method_20348(new function<none>() {
					}, "", new WidgetPointer(v3));
					cs2method_10704(255, v3);
					cs2method_20162(new function<none>() {
					}, "", new WidgetPointer(v3));
					cs2method_10520(9868950, v3);
					return;
				}
				if (v4 != a3) {
					cs2method_20348(new function<none>() {
					}, "", new WidgetPointer(v3));
					cs2method_10704(255, v3);
					cs2method_20162(new function<none>() {
					}, "", new WidgetPointer(v3));
					cs2method_10520(9868950, v3);
					return;
				}
				if (a2 == 1) {
					cs2method_10520(16750230, v3);
				} else {
					cs2method_10520(9868950, v3);
				}
				if (a0 == 1) {
					cs2method_10704(cs2method_10872(cs2method_10060(cs2method_10690(v3), 5), 255), v3);
					if (cs2method_10690(v3) >= 255) {
						int v5 = 0;
					}
				} else {
					cs2method_10704(cs2method_11048(cs2method_10461(cs2method_10690(v3), 5), 0), v3);
					if (cs2method_10690(v3) <= 0) {
						int v5 = 1;
					}
				}
				if (script_8292(2, -1) == 1) {
					cs2method_10704(cs2method_10690(v3), script_7975(1436, a1));
				}
				return;
			}, a0, 1, a1, 0, "i1Ji", new WidgetPointer(v0));
		} else {
			cs2method_20162(new function<script_7054>(int a0,int a1,int a2,int a3) {
				int v2 = 0;
				int v4 = 0;
				int v0 = -1;
				int v1 = script_7975(1430, a1);
				switch (a1) {
					case 1:
						v2 = client_configs['cfg727'].bitcfg1723;
						v4 = client_configs['cfg727'].bitcfg1724;
						break;
					case 2:
						v2 = client_configs['cfg728'].bitcfg1725;
						v4 = client_configs['cfg728'].bitcfg1726;
						break;
					case 3:
						v2 = client_configs['cfg729'].bitcfg1727;
						v4 = client_configs['cfg729'].bitcfg1728;
						break;
					case 4:
						v2 = client_configs['cfg730'].bitcfg1729;
						v4 = client_configs['cfg730'].bitcfg1730;
						break;
					case 5:
						v2 = client_configs['cfg731'].bitcfg1731;
						v4 = client_configs['cfg731'].bitcfg1732;
						break;
					case 6:
						v2 = client_configs['cfg732'].bitcfg1733;
						v4 = client_configs['cfg732'].bitcfg1734;
						break;
					case 7:
						v2 = client_configs['cfg733'].bitcfg1735;
						v4 = client_configs['cfg733'].bitcfg1736;
						break;
					case 8:
						v2 = client_configs['cfg734'].bitcfg1737;
						v4 = client_configs['cfg734'].bitcfg1738;
						break;
					case 9:
						v2 = client_configs['cfg735'].bitcfg1739;
						v4 = client_configs['cfg735'].bitcfg1740;
						break;
					case 10:
						v2 = client_configs['cfg736'].bitcfg1741;
						v4 = client_configs['cfg736'].bitcfg1742;
						break;
					case 11:
						v2 = client_configs['cfg737'].bitcfg1743;
						v4 = client_configs['cfg737'].bitcfg1744;
						break;
					case 12:
						v2 = client_configs['cfg738'].bitcfg1745;
						v4 = client_configs['cfg738'].bitcfg1746;
						break;
					case 13:
						v2 = client_configs['cfg4432'].bitcfg22337;
						v4 = client_configs['cfg4432'].bitcfg22338;
						break;
					case 14:
						v2 = client_configs['cfg4433'].bitcfg22339;
						v4 = client_configs['cfg4433'].bitcfg22340;
				}
				int v3 = idx17mapData('i', 'J', 6740, v4);
				if (v2 != 6) {
					cs2method_20348(new function<none>() {
					}, "", new WidgetPointer(v1));
					cs2method_10704(255, v1);
					cs2method_20162(new function<none>() {
					}, "", new WidgetPointer(v1));
					cs2method_10520(9868950, v1);
					return;
				}
				if (v3 != a2) {
					cs2method_20348(new function<none>() {
					}, "", new WidgetPointer(v1));
					cs2method_10704(255, v1);
					cs2method_20162(new function<none>() {
					}, "", new WidgetPointer(v1));
					cs2method_10520(9868950, v1);
					return;
				}
				if (a0 == 1) {
					cs2method_10520(16750230, v1);
				} else {
					cs2method_10520(9868950, v1);
				}
				if (a3 == 1) {
					cs2method_10704(cs2method_10872(cs2method_10060(cs2method_10690(v1), 5), 255), v1);
					if (cs2method_10690(v1) >= 255) {
						int v5 = 0;
					}
				} else {
					cs2method_10704(cs2method_11048(cs2method_10461(cs2method_10690(v1), 5), 0), v1);
					if (cs2method_10690(v1) <= 0) {
						int v5 = 1;
					}
				}
				if (script_8292(2, -1) == 1) {
					cs2method_10704(cs2method_10690(v1), script_7975(1436, a1));
				}
				return;
			}, a0, 1, a1, 1, "i1Ji", new WidgetPointer(v0));
		}
	} else {
		cs2method_10520(9868950, v0);
		cs2method_10704(255, v0);
		cs2method_20162(new function<none>() {
		}, "", new WidgetPointer(v0));
	}
	return;
}
