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


void script_3914(int a0,int a1,int a2) {
	if (a2 == -1 || a1 == -1) {
		return;
	}
	cs2method_20348(new function<script_3913>(int a0,int a1,int a2) {
		script_3914(a1, a0, a2);
		return;
	}, new WidgetPointer(a2), a1, a0, 3814, 1, "IJJY", new WidgetPointer(a2));
	int v0 = idx22mapAttribute(a1, 3797);
	int v2 = idx22mapAttribute(a1, 4358);
	if (v2 != -1) {
		a1 = v2;
	}
	int v5 = script_3898(a1, v0);
	if (v5 != -1) {
		cs2method_10170(idx22mapAttribute(v5, 3810), a2);
		cs2method_10520(idx22mapAttribute(v5, 3811), a2);
	}
	if (a0 == -1) {
		return;
	}
	int v4 = idx22mapAttribute(a0, 3915);
	int v1 = idx22mapAttribute(a0, 4359);
	int v3 = idx22mapAttribute(a0, 4360);
	if (v3 == 0 || v3 == 2) {
		cs2method_10112(v1, cs2method_10152(a2), cs2method_10461(2, v3), 1, a2);
		cs2method_10283(cs2method_10060(cs2method_10051(3, v1), v4), cs2method_10461(cs2method_10823(cs2method_10982(a2)), cs2method_10823(a2)), 1, 1, a2);
	}
	return;
}
