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


void script_3384(int a0) {
	int v2 = 0;
	int v5 = 0;
	int v4 = cs2method_10085();
	opc_struct10562(2,0,0) v1 = cs2method_10562();
	int v3 = v1.intpart_1;
	int v0 = v1.intpart_0;
	script_2593(v0, -1);
	if (v0 == 1 || v0 == 3) {
		if (cs2method_11055() == 1) {
			cs2method_11071(2);
			cs2method_10827(2);
			if (a0 != 3) {
				int v8 = v0;
				int v9 = cs2method_11055();
				int v6 = v0;
				script_2692_struct(2,0,0) v7 = script_2692(v6);
				script_2596(v8, v9, v7.intpart_0, v7.intpart_1, a0);
			}
		}
		script_2700(1, a0, 1, 0);
		return;
	}
	cs2_configs['cfg1240'] = 4;
	cs2_configs['cfg1277'] = 0;
	cs2method_10828(v0, 1);
	if (a0 == 3) {
		if (cs2method_10135() == 1) {
			script_1174(5);
			cs2method_20162(new function<script_3381>(int a0,int a1) {
				int v0 = cs2method_10060(a1, 1);
				cs2method_20162(load function<3381>, new WidgetPointer(a0), v0, "Ii", new WidgetPointer(a0));
				if (v0 > 1) {
					cs2_configs['cfg1273'] = 1;
					cs2method_20162(new function<none>() {
					}, "", new WidgetPointer(a0));
					script_2945(0);
				}
				return;
			}, new WidgetPointer(975,21), 0, "Ii", new WidgetPointer(975,21));
		} else if (script_3487(1) == 1) {
			script_1174(11);
		} else if (cs2_configs['cfg3684'] != 1 && script_3487(3) == 1) {
			script_1174(7);
		} else {
			cs2_configs['cfg3684'] = 0;
			script_1174(11);
		}
	} else {
		int v9 = v0;
		int v6 = cs2method_11055();
		int v8 = v0;
		script_2692_struct(2,0,0) v7 = script_2692(v8);
		script_2596(v9, v6, v7.intpart_0, v7.intpart_1, a0);
	}
	return;
}
