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


int script_6200(object a0,int a1,int a2) {
	int v1 = 0;
	int v0 = 0;
	int v6 = 0;
	switch (a2) {
		case 96:
			return cs2method_11048(cs2method_10461(a1, 1), 0);
		case 97:
			return cs2method_10872(cs2method_10060(a1, 1), cs2method_10265(a0));
		case 98:
			int v2 = cs2method_10461(a1, 1);
			if (a1 > 0 && cs2method_10368(v2, a0, " ") == v2) {
				return v2;
			}
			int v4 = -1;
			int v5 = -1;
			while (v6 != 1) {
				v4 = cs2method_10368(cs2method_10060(v4, 1), a0, " ");
				if (v4 == -1 || v4 >= cs2method_10461(a1, 1)) {
					v6 = 1;
				} else {
					v5 = v4;
				}
			}
			return cs2method_10872(cs2method_10060(v5, 1), cs2method_10265(a0));
		case 99:
			if (cs2method_10368(a1, a0, " ") == a1) {
				return cs2method_10872(cs2method_10060(a1, 1), cs2method_10265(a0));
			}
			int v3 = cs2method_10265(a0);
			if (a1 < v3) {
				int v7 = cs2method_10368(cs2method_10060(a1, 1), a0, " ");
				if (v7 != -1) {
					return v7;
				}
				return v3;
			}
			break;
		case 102:
			return 0;
	}
	return cs2method_10265(a0);
}
