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


void script_9955(int a0,int a1) {
	int v17 = idx17mapData('i', 'J', 7716, a0);
	int v12 = idx22mapAttribute(v17, 3509);
	int v6 = script_8374(v12);
	int v16 = idx17mapData('i', 'J', 7716, a1);
	int v11 = script_8418(v17, 0);
	int v14 = idx22mapAttribute(v16, 3509);
	int v13 = idx22mapAttribute(v16, 3510);
	int v10 = cs2method_10461(script_8374(v14), v6);
	int v0 = idx22mapAttribute(v11, 3578);
	int v9 = cs2method_10872(script_9945(v14, v0, cs2_configs['cfg4131']), v6);
	int v2 = cs2method_10060(cs2method_10060(cs2method_11048(0, cs2method_10872(script_8403(v14), cs2method_10236(v14))), cs2_configs['cfg4131']), cs2method_10134(v14));
	int v7 = cs2method_11048(0, v2);
	int v1 = cs2method_10872(v7, cs2method_10461(cs2method_11048(cs2method_10236(v14), cs2method_10350(v14)), cs2method_10051(v10, v0)));
	int v8 = 0;
	int v15 = 0;
	int v18 = 0;
	int v4 = 0;
	int v3 = 0;
	if (cs2_configs['cfg4130'] != -1) {
		if (cs2_configs['cfg4130'] == cs2_configs['cfg3466']) {
			v4 = 1;
		}
		cs2_configs['cfg4130'] = -1;
	}
	while (cs2method_11038(v14, v18) == 1 && cs2method_11038(v14, cs2method_10060(v18, 1)) == 1) {
		int v5 = v4;
		if (v18 >= cs2method_10051(v10, 2) && v18 < cs2method_10051(cs2method_10060(v10, v9), 2)) {
			cs2method_10097(4191, cs2method_10051(idx22mapAttribute(v11, 3578), cs2method_11048(0, cs2method_10461(cs2method_10968(v18, 2), v10))));
		} else if (v18 < cs2method_10051(v10, 2)) {
			cs2method_10097(4191, cs2method_10060(v1, cs2method_10051(idx22mapAttribute(v11, 3578), cs2method_10968(v18, 2))));
			v5 = 1;
		} else {
			cs2method_10097(4191, cs2method_10051(idx22mapAttribute(v11, 3578), cs2method_10968(v18, 2)));
		}
		cs2method_10097(4192, 0);
		cs2method_10097(4193, 0);
		cs2method_10097(4194, 0);
		if (v5 == 0) {
			cs2method_10063(cs2method_10461(interfaceDefsAttribute(4191), cs2method_10968(cs2method_10461(interfaceDefsAttribute(4191), cs2method_10878()), 2)), cs2method_10461(interfaceDefsAttribute(4192), cs2method_10968(cs2method_10461(interfaceDefsAttribute(4192), cs2method_10406()), 2)), interfaceDefsAttribute(4193), interfaceDefsAttribute(4194));
		} else {
			cs2method_10063(interfaceDefsAttribute(4191), interfaceDefsAttribute(4192), interfaceDefsAttribute(4193), interfaceDefsAttribute(4194));
		}
		cs2method_10063(cs2method_10461(cs2method_10060(cs2method_10878(), cs2method_10968(cs2method_10488(), 2)), cs2method_10968(cs2method_10488(), 2)), 0, 0, 1);
		if (interfaceDefsAttribute(3536) == a1) {
			script_9944(a1, cs2method_10878());
		}
		v18 = cs2method_10060(v18, 2);
	}
	return;
}
