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


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