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


void script_8127(int a0,int a1,int a2,int a3) {
	int v0 = 0;
	int v1 = 0;
	if (cs2method_11038(a2, a0) == 1) {
		if (client_configs['cfg3680'].bitcfg22315 == 0) {
			if (a1 < cs2method_10488()) {
				v0 = cs2method_11048(a1, cs2method_10461(cs2method_10488(), 2));
			} else {
				if (a1 >= cs2method_10488()) {
					v0 = cs2method_10872(a1, cs2method_10060(cs2method_10488(), 2));
				}
			}
		} else if (a1 < cs2method_10664()) {
			v0 = cs2method_11048(a1, cs2method_10461(cs2method_10664(), 2));
		} else {
			if (a1 >= cs2method_10664()) {
				v0 = cs2method_10872(a1, cs2method_10060(cs2method_10664(), 2));
			}
		}
		script_8128(a2, v0, a3);
		if (v0 == a1) {
			cs2method_20061(new function<none>() {
			}, "");
		}
	}
	return;
}
