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


void script_9638(int a0,int a1,int a2,int a3) {
	int v2 = a1;
	int v0 = 0;
	int v1 = 0;
	while (v0 == 0 && cs2method_11038(a0, v2) == 1) {
		if (interfaceDefsAttribute(4032) != -1) {
			if (interfaceDefsAttribute(4033) != 1) {
				if (cs2method_10713() == 20326) {
					cs2method_10310(20268);
				} else {
					v0 = 1;
				}
			}
		} else if (v3 == 1) {
			script_9628(a0, v2, 0);
		} else {
			v0 = 1;
		}
		int v3 = script_9635(interfaceDefsAttribute(3430));
		v2 = cs2method_10060(v2, 5);
	}
	if (v0 == 1) {
		cs2_configs['cfg3928'] = -1;
		cs2_configs['cfg3929'] = -1;
		cs2_configs['cfg3930'] = -1;
		cs2_configs['cfg3931'] = -1;
		cs2_configs['cfg3932'] = -1;
		switch (client_configs['cfg2805'].bitcfg14108) {
			case 1:
				script_1839(1, a0, a3, a2);
				break;
			default:
				script_1839(0, a0, a3, a2);
		}
	}
	return;
}
