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


int script_9831(int a0,int a1,int a2,int a3,int a4,int a5,int a6,int a7) {
	int v3 = -1;
	int v2 = -1;
	int v1 = -1;
	int v0 = -1;
	if (a1 != -1) {
		if (script_9827(cs2method_10480(a1)) == 0) {
			v0 = script_8887(a4, cs2method_10480(a1));
		} else {
			a0 = 1;
		}
		if (v0 == -1) {
			v3 = client_configs['cfg110'].bitcfg288;
			if (client_configs['cfg110'].bitcfg288 > 1) {
				int v5 = client_configs['cfg110'].bitcfg288;
				script_1467_struct(2,0,0) v6 = script_1467(v5);
				v1 = v6.intpart_1;
				int v4 = v6.intpart_0;
			} else {
				v1 = script_6971();
			}
		}
	}
	if (script_9833(a1, a2, v0, a3, a7, a6, a0, script_6971(), a4, a5) == 1) {
		if (v3 != -1) {
			script_9843(client_configs['cfg110'].bitcfg288, v1, a4);
		}
		return 1;
	}
	return 0;
}
