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


int script_8886(int a0,int a1,int a2) {
	if (a0 == -1 || a1 == -1) {
		return 0;
	}
	for (int v1 = 0, int v0 = 0; cs2method_11038(a0, v0) == 1; v0 = cs2method_10060(v0, 1)) {
		if (cs2method_10487() == a1) {
			v1 = cs2method_10060(v1, cs2method_11089());
			if (cs2method_10991(a1) == 1 || a2 == 1) {
				return v1;
			}
		}
	}
	return v1;
}
