/* 
 * Script decompiled by jagdecs2 v3.2
 * Decompiler opts:
 * --------------
 * t1LocalAnalyzer:true
 * t2LocalAnalyzer:true
 * beautifier:true
 * --------------
 * Made by mgi125 ;)
 */
// Beautifier was aborted, because this function contains unsolved flow blocks.


int script_9970(int a0) {
	flow_0:
		if (a0 == -1) {
			return 0;
		}
		int v3 = cs2method_10924(a0);
		int v2 = 0;
		int v1 = 0;
		int v4 = 0;
		IF (cs2_configs['cfg4140'].bitcfg22175 == 0) 
			GOTO	flow_3
		GOTO	flow_4
	flow_3:
		v2 = v3;
		GOTO	flow_8
	flow_4:
		IF (v1 < v3) 
			GOTO	flow_5
		GOTO	flow_8
	flow_5:
		int v0 = idx17mapData('i', 'i', a0, v1);
		if (script_9972(v0, cs2_configs['cfg4140'].bitcfg22175) == -1) {
			v2 = cs2method_10060(v2, 1);
		}
		v1 = cs2method_10060(v1, 1);
		GOTO	flow_4
	flow_8:
		return v2;
}
