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


void script_4425(int a0,int a1,int a2,int a3) {
	int v1 = cs2method_10968(cs2method_10060(a1, a0), 2);
	int v3 = globalarray_0[v1];
	globalarray_0[v1] = globalarray_0[a0];
	globalarray_0[a0] = v3;
	for (int v0 = a1, int v2 = a1, int v4 = -1; v2 < a0; v2 = cs2method_10060(v2, 1)) {
		if (cs2method_11038(a2, v3) == 1 && cs2method_11038(a2, globalarray_0[v2]) == 1 && cs2method_10846(cs2method_10181(cs2method_10447()), cs2method_10181(cs2method_10447())) < cs2method_10147(v2, 1)) {
			int v5 = globalarray_0[v2];
			globalarray_0[v2] = globalarray_0[v0];
			globalarray_0[v0] = v5;
			v0 = cs2method_10060(v0, 1);
		}
	}
	globalarray_0[a0] = globalarray_0[v0];
	globalarray_0[v0] = v3;
	if (a1 < cs2method_10461(v0, 1)) {
		script_4425(0, a2, a1, cs2method_10461(v0, 1));
	}
	if (cs2method_10060(v0, 1) < a0) {
		script_4425(0, a2, cs2method_10060(v0, 1), a0);
	}
	return;
}
