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


void script_4508(int a0,int a1) {
	int v0 = 0;
	globalarray_0 = new int[a0];
	int v3 = 0;
	int v1 = 5;
	while (v0 <= a0) {
		if (cs2method_11038(a1, v0) == 1 && cs2method_10265(cs2method_10447()) > 0) {
			globalarray_0[v3] = v0;
			v3 = cs2method_10060(v3, 1);
		}
		v0 = cs2method_10060(v0, 1);
	}
	if (v3 > 1) {
		script_4424(0, a1, 0, cs2method_10461(v3, 1));
	}
	for (int v2 = 0; v2 < v3; v2 = cs2method_10060(v2, 1)) {
		if (cs2method_11038(a1, globalarray_0[v2]) == 1) {
			cs2method_10063(5, v1, 0, 0);
			v1 = cs2method_10060(v1, cs2method_10664());
		}
	}
	return;
}
