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


void script_5997(int a0,int a1) {
	int v0;
	cs2method_10273(a0);
	for (int v3 = cs2method_10236(a0), int v2 = 0, int v1 = 0, int v4 = 0; v2 < v3; v2 = cs2method_10060(v2, 1)) {
		cs2method_10606(a0, 3, v2);
		cs2method_10013(1, 0, 0, 1);
		cs2method_10811(0);
		cs2method_10238(1);
		if (a1 == 1) {
			v0 = 0;
		} else {
			v0 = 2;
		}
		cs2method_10063(v2, 0, v0, 1);
		int v5 = cs2method_10122(v2, v3, 255);
		cs2method_10002(v5);
	}
	return;
}
