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


void script_2396(int a0,int a1,int a2,int a3) {
	cs2method_20162(new function<script_2397>(int a0,int a1,int a2,int a3) {
		if (a1 == 1) {
			if (cs2_configs['cfg4175'] <= 0) {
				cs2method_10467(1, a2);
				cs2method_20162(new function<none>() {
				}, "", new WidgetPointer(a0));
			} else {
				cs2method_10467(0, a2);
				cs2method_10026(a3, cs2method_10379(cs2method_10968(cs2_configs['cfg4175'], 50)));
				cs2_configs['cfg4175'] = cs2method_10461(cs2_configs['cfg4175'], 1);
			}
		} else {
			if (a1 == 2) {
				if (cs2_configs['cfg4176'] <= 0) {
					cs2method_10467(1, a2);
					cs2method_20162(new function<none>() {
					}, "", new WidgetPointer(a0));
				} else {
					cs2method_10467(0, a2);
					cs2method_10026(a3, cs2method_10379(cs2method_10968(cs2_configs['cfg4176'], 50)));
					cs2_configs['cfg4176'] = cs2method_10461(cs2_configs['cfg4176'], 1);
				}
			}
		}
		return;
	}, a1, new WidgetPointer(a2), new WidgetPointer(a3), new WidgetPointer(a0), "iIII", new WidgetPointer(a2));
	return;
}
