// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/window.c
// Function: create_window
static window *create_window(window *win, uint32_t x, uint32_t y, uint32_t w, uint32_t h) {
	if (!win->normal) {
		return win;
	}

	xcb_change_save_set(conn, XCB_SET_MODE_INSERT, win->windows[WIN_CHILD]);

	win->windows[WIN_PARENT] = xcb_generate_id(conn);
	
	uint32_t mask = XCB_CONFIG_WINDOW_BORDER_WIDTH;
	uint32_t vals[6];
	vals[0] = 0;
	xcb_configure_window(conn, win->windows[WIN_CHILD], mask, vals);
	
	mask = XCB_CW_BACK_PIXEL | XCB_CW_BORDER_PIXEL | XCB_CW_OVERRIDE_REDIRECT | XCB_CW_EVENT_MASK |
			XCB_CW_COLORMAP;
	vals[0] = 0xffffffff;
	vals[1] = 0xffffffff;
	vals[2] = 0;
	vals[3] = XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | XCB_EVENT_MASK_FOCUS_CHANGE;
	vals[4] = cm;
	xcb_create_window(conn, depth, win->windows[WIN_PARENT], scr->root, x, y, w, h, 0,
			XCB_WINDOW_CLASS_INPUT_OUTPUT, vis, mask, vals);

	win->gc = xcb_generate_id(conn);
	vals[0] = 0xffffff00;
	vals[1] = 0;
	xcb_create_gc(conn, win->gc, win->windows[WIN_PARENT], XCB_GC_FOREGROUND | XCB_GC_GRAPHICS_EXPOSURES, vals);

	for (int i = WIN_COUNT, j = 0; i < REGION_COUNT; i++, j++) {
		win->windows[i] = xcb_generate_id(conn);

		mask = XCB_CW_BACK_PIXEL | XCB_CW_BORDER_PIXEL | XCB_CW_WIN_GRAVITY | 
				XCB_CW_OVERRIDE_REDIRECT | XCB_CW_EVENT_MASK | XCB_CW_COLORMAP;
		vals[0] = controls[i - WIN_COUNT].colors[PM_BG(PM_FOCUS)];
		vals[1] = 0xff000000;
		vals[2] = controls[j].gravity;
		vals[3] = 0;
		vals[4] = XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_EXPOSURE |
				XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_LEAVE_WINDOW;
		vals[5] = cm;
		xcb_create_window(conn, depth, win->windows[i], win->windows[WIN_PARENT],
				controls[j].geom.x, controls[j].geom.y, controls[j].geom.width, 
				controls[j].geom.height, 0, XCB_WINDOW_CLASS_INPUT_OUTPUT,
				vis, mask, vals);

		xcb_map_window(conn, win->windows[i]);

		xcb_flush(conn);

		draw_region(win, i, PM_FOCUS);
	}

	xcb_reparent_window(conn, win->windows[WIN_CHILD], win->windows[WIN_PARENT], PAD, PAD_N);

	resize_region resize_regions[8] = {
		{ XCB_GRAVITY_NORTH_WEST, 144, { 0, 0, RESIZE_REGION_CORNER, RESIZE_REGION_CORNER } },
		{ XCB_GRAVITY_NORTH_WEST, 140, { RESIZE_REGION_CORNER, 0, w - 2 * RESIZE_REGION_CORNER, RESIZE_REGION_WIDTH } },
		{ XCB_GRAVITY_NORTH_EAST, 148, { w - RESIZE_REGION_CORNER, 0, RESIZE_REGION_CORNER, RESIZE_REGION_CORNER } },
		{ XCB_GRAVITY_NORTH_EAST, 98, { w - RESIZE_REGION_WIDTH, RESIZE_REGION_CORNER, RESIZE_REGION_WIDTH, h - 2 * RESIZE_REGION_CORNER } },
		{ XCB_GRAVITY_SOUTH_EAST, 78, { w - RESIZE_REGION_CORNER, h - RESIZE_REGION_CORNER, RESIZE_REGION_CORNER, RESIZE_REGION_CORNER } },
		{ XCB_GRAVITY_SOUTH_WEST, 18, { RESIZE_REGION_CORNER, h - RESIZE_REGION_WIDTH, w - 2 * RESIZE_REGION_CORNER, RESIZE_REGION_WIDTH } },
		{ XCB_GRAVITY_SOUTH_WEST, 76, { 0, h - RESIZE_REGION_CORNER, RESIZE_REGION_CORNER, RESIZE_REGION_CORNER } },
		{ XCB_GRAVITY_NORTH_WEST, 72, { 0, RESIZE_REGION_CORNER, RESIZE_REGION_WIDTH, h - RESIZE_REGION_CORNER } },
	};

	for (int i = 0; i < 8; i++) {
		win->resize_regions[i] = xcb_generate_id(conn);
		mask = XCB_CW_WIN_GRAVITY | XCB_CW_EVENT_MASK | XCB_CW_CURSOR;
		vals[0] = resize_regions[i].gravity;
		vals[1] = XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_ENTER_WINDOW;
		vals[2] = resize_cursors[i];
		xcb_create_window(conn, XCB_COPY_FROM_PARENT, win->resize_regions[i],
			win->windows[WIN_PARENT], resize_regions[i].geom.x, resize_regions[i].geom.y,
			resize_regions[i].geom.width, resize_regions[i].geom.height, 0,
			XCB_WINDOW_CLASS_INPUT_ONLY, XCB_COPY_FROM_PARENT, mask, vals);
	}
	
	xcb_rectangle_t resize_region_rects[4][2] = {
		{ { 0, 0, RESIZE_REGION_CORNER, RESIZE_REGION_WIDTH }, { 0, RESIZE_REGION_WIDTH, RESIZE_REGION_WIDTH, RESIZE_REGION_CORNER - RESIZE_REGION_WIDTH } },
		{ { 0, 0, RESIZE_REGION_CORNER, RESIZE_REGION_WIDTH }, { RESIZE_REGION_CORNER - RESIZE_REGION_WIDTH, RESIZE_REGION_WIDTH, RESIZE_REGION_WIDTH, RESIZE_REGION_CORNER - RESIZE_REGION_WIDTH } },
		{ { RESIZE_REGION_CORNER - RESIZE_REGION_WIDTH, 0, RESIZE_REGION_WIDTH, RESIZE_REGION_CORNER }, { 0, RESIZE_REGION_CORNER - RESIZE_REGION_WIDTH, RESIZE_REGION_CORNER, RESIZE_REGION_CORNER - RESIZE_REGION_WIDTH } },
		{ { 0, 0, RESIZE_REGION_WIDTH, RESIZE_REGION_CORNER }, { RESIZE_REGION_WIDTH, RESIZE_REGION_CORNER - RESIZE_REGION_WIDTH, RESIZE_REGION_CORNER - RESIZE_REGION_WIDTH, RESIZE_REGION_WIDTH } }, 
	};

	for (int i = 0; i < 4; i++) {
		xcb_shape_rectangles(conn, XCB_SHAPE_SO_SET, XCB_SHAPE_SK_BOUNDING,
			XCB_CLIP_ORDERING_UNSORTED, win->resize_regions[2 * i], 0, 0, 2,
			resize_region_rects[i]);
	}

	for (int i = 0; i < 8; i++) {
		xcb_map_window(conn, win->resize_regions[i]);
	}

	vals[0] = x;
	vals[1] = y;
	vals[2] = w;
	vals[3] = h;
	update_geometry(win, MOVE_RESIZE_MASK, vals);

	mask = XCB_CW_EVENT_MASK;
	vals[0] = XCB_EVENT_MASK_PROPERTY_CHANGE;
	xcb_change_window_attributes(conn, win->windows[WIN_CHILD], mask, vals);

	normal_events(win);
	
	show(win);

	if (state != MOVE && state != RESIZE) {
		focus(win);
	} else {
		unfocus(win);
	}

	return win;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rdi, -0x28(%rbp)
movl %esi, -0x2c(%rbp)
movl %edx, -0x30(%rbp)
movl %ecx, -0x34(%rbp)
movl %r8d, -0x38(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x0, 0xc0(%rax)
jne 0x71bb
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x7a25
leaq 0x9286(%rip), %rax      # 0x10448
movq (%rax), %rdi
movq -0x28(%rbp), %rax
movl 0xcc(%rax), %edx
xorl %esi, %esi
callq 0x3500
movl %eax, -0x3c(%rbp)
leaq 0x9268(%rip), %rax      # 0x10448
movq (%rax), %rdi
callq 0x3550
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0xd0(%rax)
movl $0x10, -0x40(%rbp)
movl $0x0, -0x60(%rbp)
leaq 0x923f(%rip), %rax      # 0x10448
movq (%rax), %rdi
movq -0x28(%rbp), %rax
movl 0xcc(%rax), %esi
movl -0x40(%rbp), %eax
leaq -0x60(%rbp), %rcx
movzwl %ax, %edx
callq 0x31d0
movl %eax, -0x64(%rbp)
movl $0x2a0a, -0x40(%rbp)    # imm = 0x2A0A
movl $0xffffffff, -0x60(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x5c(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x58(%rbp)
movl $0x380010, -0x54(%rbp)  # imm = 0x380010
leaq 0x926a(%rip), %rax      # 0x104bc
movl (%rax), %eax
movl %eax, -0x50(%rbp)
leaq 0x91ea(%rip), %rax      # 0x10448
movq (%rax), %rdi
leaq 0x9258(%rip), %rax      # 0x104c0
movl (%rax), %eax
movb %al, %sil
movq -0x28(%rbp), %rax
movl 0xd0(%rax), %edx
leaq 0x91d2(%rip), %rax      # 0x10450
movq (%rax), %rax
movl (%rax), %ecx
movl -0x2c(%rbp), %eax
movw %ax, %r8w
movl -0x30(%rbp), %eax
movw %ax, %r9w
movl -0x34(%rbp), %eax
movw %ax, %r14w
movl -0x38(%rbp), %eax
movw %ax, %bx
leaq 0x9213(%rip), %rax      # 0x104b8
movl (%rax), %r11d
movl -0x40(%rbp), %r10d
leaq -0x60(%rbp), %rax
xorl %r15d, %r15d
movzbl %sil, %esi
movswl %r8w, %r8d
movswl %r9w, %r9d
movzwl %r14w, %r14d
movl %r14d, (%rsp)
movzwl %bx, %ebx
movl %ebx, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
movl $0x1, 0x18(%rsp)
movl %r11d, 0x20(%rsp)
movl %r10d, 0x28(%rsp)
movq %rax, 0x30(%rsp)
callq 0x3030
movl %eax, -0x68(%rbp)
leaq 0x914c(%rip), %rax      # 0x10448
movq (%rax), %rdi
callq 0x3550
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x104(%rax)
movl $0xffffff00, -0x60(%rbp) # imm = 0xFFFFFF00
movl $0x0, -0x5c(%rbp)
leaq 0x9123(%rip), %rax      # 0x10448
movq (%rax), %rdi
movq -0x28(%rbp), %rax
movl 0x104(%rax), %esi
movq -0x28(%rbp), %rax
movl 0xd0(%rax), %edx
leaq -0x60(%rbp), %r8
movl $0x10004, %ecx          # imm = 0x10004
callq 0x3480
movl %eax, -0x6c(%rbp)
movl $0x2, -0x70(%rbp)
movl $0x0, -0x74(%rbp)
movslq -0x70(%rbp), %rax
cmpq $0x4, %rax
jae 0x751b
leaq 0x90d8(%rip), %rax      # 0x10448
movq (%rax), %rdi
callq 0x3550
movl %eax, %edx
movq -0x28(%rbp), %rax
movslq -0x70(%rbp), %rcx
movl %edx, 0xcc(%rax,%rcx,4)
movl $0x2a2a, -0x40(%rbp)    # imm = 0x2A2A
movl -0x70(%rbp), %eax
subl $0x2, %eax
movslq %eax, %rcx
leaq 0x88e0(%rip), %rax      # 0xfc80
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movl 0x34(%rax), %eax
movl %eax, -0x60(%rbp)
movl $0xff000000, -0x5c(%rbp) # imm = 0xFF000000
movslq -0x74(%rbp), %rcx
leaq 0x88c1(%rip), %rax      # 0xfc80
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x58(%rbp)
movl $0x0, -0x54(%rbp)
movl $0x28030, -0x50(%rbp)   # imm = 0x28030
leaq 0x90db(%rip), %rax      # 0x104bc
movl (%rax), %eax
movl %eax, -0x4c(%rbp)
leaq 0x905b(%rip), %rax      # 0x10448
movq (%rax), %rdi
leaq 0x90c9(%rip), %rax      # 0x104c0
movl (%rax), %eax
movb %al, %sil
movq -0x28(%rbp), %rax
movslq -0x70(%rbp), %rcx
movl 0xcc(%rax,%rcx,4), %edx
movq -0x28(%rbp), %rax
movl 0xd0(%rax), %ecx
movslq -0x74(%rbp), %r8
leaq 0x8860(%rip), %rax      # 0xfc80
imulq $0x50, %r8, %r8
addq %r8, %rax
movw (%rax), %r8w
movslq -0x74(%rbp), %r9
leaq 0x884a(%rip), %rax      # 0xfc80
imulq $0x50, %r9, %r9
addq %r9, %rax
movw 0x2(%rax), %r9w
movslq -0x74(%rbp), %r10
leaq 0x8833(%rip), %rax      # 0xfc80
imulq $0x50, %r10, %r10
addq %r10, %rax
movw 0x4(%rax), %r14w
movslq -0x74(%rbp), %r10
leaq 0x881c(%rip), %rax      # 0xfc80
imulq $0x50, %r10, %r10
addq %r10, %rax
movw 0x6(%rax), %bx
leaq 0x9042(%rip), %rax      # 0x104b8
movl (%rax), %r11d
movl -0x40(%rbp), %r10d
leaq -0x60(%rbp), %rax
xorl %r15d, %r15d
movzbl %sil, %esi
movswl %r8w, %r8d
movswl %r9w, %r9d
movzwl %r14w, %r14d
movl %r14d, (%rsp)
movzwl %bx, %ebx
movl %ebx, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
movl $0x1, 0x18(%rsp)
movl %r11d, 0x20(%rsp)
movl %r10d, 0x28(%rsp)
movq %rax, 0x30(%rsp)
callq 0x3030
movl %eax, -0x78(%rbp)
leaq 0x8f7b(%rip), %rax      # 0x10448
movq (%rax), %rdi
movq -0x28(%rbp), %rax
movslq -0x70(%rbp), %rcx
movl 0xcc(%rax,%rcx,4), %esi
callq 0x3230
movl %eax, -0x7c(%rbp)
leaq 0x8f5a(%rip), %rax      # 0x10448
movq (%rax), %rdi
callq 0x3350
movq -0x28(%rbp), %rdi
movl -0x70(%rbp), %esi
xorl %edx, %edx
callq 0x69e0
movl -0x70(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x70(%rbp)
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x735b
leaq 0x8f26(%rip), %rax      # 0x10448
movq (%rax), %rdi
movq -0x28(%rbp), %rax
movl 0xcc(%rax), %esi
movq -0x28(%rbp), %rax
movl 0xd0(%rax), %edx
movl $0x1, %ecx
movl $0x20, %r8d
callq 0x3300
movl %eax, -0x80(%rbp)
movl $0x1, -0x100(%rbp)
movl $0x90, -0xfc(%rbp)
movw $0x0, -0xf8(%rbp)
movw $0x0, -0xf6(%rbp)
movw $0x20, -0xf4(%rbp)
movw $0x20, -0xf2(%rbp)
movl $0x1, -0xf0(%rbp)
movl $0x8c, -0xec(%rbp)
movw $0x20, -0xe8(%rbp)
movw $0x0, -0xe6(%rbp)
movl -0x34(%rbp), %eax
subl $0x40, %eax
movw %ax, -0xe4(%rbp)
movw $0x8, -0xe2(%rbp)
movl $0x3, -0xe0(%rbp)
movl $0x94, -0xdc(%rbp)
movl -0x34(%rbp), %eax
subl $0x20, %eax
movw %ax, -0xd8(%rbp)
movw $0x0, -0xd6(%rbp)
movw $0x20, -0xd4(%rbp)
movw $0x20, -0xd2(%rbp)
movl $0x3, -0xd0(%rbp)
movl $0x62, -0xcc(%rbp)
movl -0x34(%rbp), %eax
subl $0x8, %eax
movw %ax, -0xc8(%rbp)
movw $0x20, -0xc6(%rbp)
movw $0x8, -0xc4(%rbp)
movl -0x38(%rbp), %eax
subl $0x40, %eax
movw %ax, -0xc2(%rbp)
movl $0x9, -0xc0(%rbp)
movl $0x4e, -0xbc(%rbp)
movl -0x34(%rbp), %eax
subl $0x20, %eax
movw %ax, -0xb8(%rbp)
movl -0x38(%rbp), %eax
subl $0x20, %eax
movw %ax, -0xb6(%rbp)
movw $0x20, -0xb4(%rbp)
movw $0x20, -0xb2(%rbp)
movl $0x7, -0xb0(%rbp)
movl $0x12, -0xac(%rbp)
movw $0x20, -0xa8(%rbp)
movl -0x38(%rbp), %eax
subl $0x8, %eax
movw %ax, -0xa6(%rbp)
movl -0x34(%rbp), %eax
subl $0x40, %eax
movw %ax, -0xa4(%rbp)
movw $0x8, -0xa2(%rbp)
movl $0x7, -0xa0(%rbp)
movl $0x4c, -0x9c(%rbp)
movw $0x0, -0x98(%rbp)
movl -0x38(%rbp), %eax
subl $0x20, %eax
movw %ax, -0x96(%rbp)
movw $0x20, -0x94(%rbp)
movw $0x20, -0x92(%rbp)
movl $0x1, -0x90(%rbp)
movl $0x48, -0x8c(%rbp)
movw $0x0, -0x88(%rbp)
movw $0x20, -0x86(%rbp)
movw $0x8, -0x84(%rbp)
movl -0x38(%rbp), %eax
subl $0x20, %eax
movw %ax, -0x82(%rbp)
movl $0x0, -0x104(%rbp)
cmpl $0x8, -0x104(%rbp)
jge 0x7899
leaq 0x8cf6(%rip), %rax      # 0x10448
movq (%rax), %rdi
callq 0x3550
movl %eax, %edx
movq -0x28(%rbp), %rax
movslq -0x104(%rbp), %rcx
movl %edx, 0xe4(%rax,%rcx,4)
movl $0x4820, -0x40(%rbp)    # imm = 0x4820
movslq -0x104(%rbp), %rcx
leaq -0x100(%rbp), %rax
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x60(%rbp)
movl $0x14, -0x5c(%rbp)
movslq -0x104(%rbp), %rcx
leaq 0x916c(%rip), %rax      # 0x10910
movl (%rax,%rcx,4), %eax
movl %eax, -0x58(%rbp)
leaq 0x8c97(%rip), %rax      # 0x10448
movq (%rax), %rdi
movq -0x28(%rbp), %rax
movslq -0x104(%rbp), %rcx
movl 0xe4(%rax,%rcx,4), %edx
movq -0x28(%rbp), %rax
movl 0xd0(%rax), %ecx
movslq -0x104(%rbp), %rsi
leaq -0x100(%rbp), %rax
shlq $0x4, %rsi
addq %rsi, %rax
movw 0x8(%rax), %r8w
movslq -0x104(%rbp), %rsi
leaq -0x100(%rbp), %rax
shlq $0x4, %rsi
addq %rsi, %rax
movw 0xa(%rax), %r9w
movslq -0x104(%rbp), %rsi
leaq -0x100(%rbp), %rax
shlq $0x4, %rsi
addq %rsi, %rax
movw 0xc(%rax), %bx
movslq -0x104(%rbp), %rsi
leaq -0x100(%rbp), %rax
shlq $0x4, %rsi
addq %rsi, %rax
movw 0xe(%rax), %r11w
movl -0x40(%rbp), %r10d
leaq -0x60(%rbp), %rax
xorl %esi, %esi
movswl %r8w, %r8d
movswl %r9w, %r9d
movzwl %bx, %ebx
movl %ebx, (%rsp)
movzwl %r11w, %r11d
movl %r11d, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
movl $0x2, 0x18(%rsp)
movl $0x0, 0x20(%rsp)
movl %r10d, 0x28(%rsp)
movq %rax, 0x30(%rsp)
callq 0x3030
movl %eax, -0x108(%rbp)
movl -0x104(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x104(%rbp)
jmp 0x773e
leaq -0x150(%rbp), %rdi
leaq 0x48a9(%rip), %rsi      # 0xc150
movl $0x40, %edx
callq 0x3600
movl $0x0, -0x154(%rbp)
cmpl $0x4, -0x154(%rbp)
jge 0x7936
leaq 0x8b7d(%rip), %rax      # 0x10448
movq (%rax), %rdi
movq -0x28(%rbp), %rax
movl -0x154(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
movl 0xe4(%rax,%rcx,4), %r8d
movslq -0x154(%rbp), %rcx
leaq -0x150(%rbp), %rax
shlq $0x4, %rcx
addq %rcx, %rax
xorl %r9d, %r9d
movl %r9d, %esi
movl %r9d, %edx
movl %r9d, %ecx
movl $0x0, (%rsp)
movl $0x2, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x3250
movl %eax, -0x158(%rbp)
movl -0x154(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x154(%rbp)
jmp 0x78bb
movl $0x0, -0x15c(%rbp)
cmpl $0x8, -0x15c(%rbp)
jge 0x7981
leaq 0x8af8(%rip), %rax      # 0x10448
movq (%rax), %rdi
movq -0x28(%rbp), %rax
movslq -0x15c(%rbp), %rcx
movl 0xe4(%rax,%rcx,4), %esi
callq 0x3230
movl %eax, -0x160(%rbp)
movl -0x15c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x15c(%rbp)
jmp 0x7940
movl -0x2c(%rbp), %eax
movl %eax, -0x60(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x58(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x54(%rbp)
movq -0x28(%rbp), %rdi
leaq -0x60(%rbp), %rdx
movl $0xf, %esi
callq 0x63f0
movl $0x800, -0x40(%rbp)     # imm = 0x800
movl $0x400000, -0x60(%rbp)  # imm = 0x400000
leaq 0x8a88(%rip), %rax      # 0x10448
movq (%rax), %rdi
movq -0x28(%rbp), %rax
movl 0xcc(%rax), %esi
movl -0x40(%rbp), %edx
leaq -0x60(%rbp), %rcx
callq 0x33a0
movl %eax, -0x164(%rbp)
movq -0x28(%rbp), %rdi
callq 0x5a70
movq -0x28(%rbp), %rdi
callq 0x6110
leaq 0x8a4c(%rip), %rax      # 0x10444
cmpl $0x1, (%rax)
je 0x7a14
leaq 0x8a40(%rip), %rax      # 0x10444
cmpl $0x2, (%rax)
je 0x7a14
movq -0x28(%rbp), %rdi
callq 0x5f60
jmp 0x7a1d
movq -0x28(%rbp), %rdi
callq 0x5d40
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopw (%rax,%rax)