LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/mywm.c
// Function: die
void die() {
	//no need to preserve stack, could refactor forget_client
	for (int i = 0; i < NUM_WS; i++) {
		for (int j = 0; j < stack[i].lists[TYPE_ALL].count; j++) {
			forget_client(stack[i].lists[TYPE_ALL].last, i);
		}
	}

	xcb_ungrab_key(conn, XCB_GRAB_ANY, scr->root, XCB_MOD_MASK_ANY);
	xcb_key_symbols_free(keysyms);

	cursor_clean();

	for (int i = 0; i < LEN(controls); i++) {
		for (int j = 0; j < PM_COUNT; j++) {
			xcb_free_pixmap(conn, pixmaps[i][j]);
		}
	}
	
	for (int i = 0; i < LEN(fonts); i++) {
		XftFontClose(dpy, xfts[i]);
	}
	
	xcb_flush(conn);

	xcb_disconnect(conn);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
cmpl $0x4, -0x4(%rbp)
jge 0x3a6c
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
movslq -0x4(%rbp), %rdx
leaq 0xcf06(%rip), %rcx      # 0x10930
imulq $0x50, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x10(%rcx), %eax
jge 0x3a5f
movslq -0x4(%rbp), %rcx
leaq 0xceef(%rip), %rax      # 0x10930
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
movl -0x4(%rbp), %esi
callq 0x6810
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x3a1c
jmp 0x3a61
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x3a0f
movq 0xc9d5(%rip), %rdi      # 0x10448
movq 0xc9d6(%rip), %rax      # 0x10450
movl (%rax), %edx
xorl %esi, %esi
movl $0x8000, %ecx           # imm = 0x8000
callq 0x33d0
movl %eax, -0xc(%rbp)
movq 0xc9de(%rip), %rdi      # 0x10470
callq 0x33e0
callq 0x6cd0
movl $0x0, -0x10(%rbp)
movslq -0x10(%rbp), %rax
cmpq $0x2, %rax
jae 0x3afa
movl $0x0, -0x14(%rbp)
cmpl $0x4, -0x14(%rbp)
jge 0x3aed
movq 0xc987(%rip), %rdi      # 0x10448
movslq -0x10(%rbp), %rcx
leaq 0xc9b4(%rip), %rax      # 0x10480
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %esi
callq 0x34d0
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x3ab4
jmp 0x3aef
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x3aa3
movl $0x0, -0x1c(%rbp)
movslq -0x1c(%rbp), %rax
cmpq $0x1, %rax
jae 0x3b31
movq 0xc98e(%rip), %rdi      # 0x104a0
movslq -0x1c(%rbp), %rcx
leaq 0xc98b(%rip), %rax      # 0x104a8
movq (%rax,%rcx,8), %rsi
callq 0x30e0
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x3b01
movq 0xc910(%rip), %rdi      # 0x10448
callq 0x3350
movq 0xc904(%rip), %rdi      # 0x10448
callq 0x3570
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/mywm.c
// Function: get_atoms
static void get_atoms(const char **names, xcb_atom_t *atoms, unsigned int count) {
	xcb_intern_atom_cookie_t cookies[count];
	for (int i = 0; i < count; i++) {
		cookies[i] = xcb_intern_atom(conn, 0, strlen(names[i]), names[i]);
	}
	for (int i = 0; i < count; i++) {
		xcb_intern_atom_reply_t *reply = xcb_intern_atom_reply(conn, cookies[i], NULL);
		if (reply) {
			atoms[i] = reply->atom;
			free(reply);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq %rsp, %rcx
movq %rcx, -0x20(%rbp)
leaq 0xf(,%rax,4), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x48(%rbp)
movq %rcx, %rsp
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0x48a5
movslq -0x2c(%rbp), %rax
movq %rax, -0x50(%rbp)
movq 0xbbf0(%rip), %rax      # 0x10448
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x3280
movq -0x58(%rbp), %rdi
movq -0x8(%rbp), %rcx
movslq -0x2c(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
xorl %esi, %esi
movzwl %ax, %edx
callq 0x3120
movq -0x50(%rbp), %rcx
movl %eax, %edx
movq -0x48(%rbp), %rax
movl %edx, -0x30(%rbp)
movl -0x30(%rbp), %edx
movl %edx, (%rax,%rcx,4)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x4841
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0x4902
movq -0x48(%rbp), %rax
movq 0xbb89(%rip), %rdi      # 0x10448
movslq -0x34(%rbp), %rcx
movl (%rax,%rcx,4), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x3360
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x48f5
movq -0x40(%rbp), %rax
movl 0x8(%rax), %edx
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x40(%rbp), %rdi
callq 0x3270
jmp 0x48f7
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x48ac
movq -0x20(%rbp), %rax
movq %rax, %rsp
movq %rbp, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/mywm.c
// Function: client_message
static void client_message(xcb_generic_event_t *ev) {
	xcb_client_message_event_t *e = (xcb_client_message_event_t *)ev;

	window *found = search_all(NULL, TYPE_ALL, WIN_CHILD, e->window);

	if (!found || !found->normal || e->type != ewmh->_NET_WM_STATE) {
		return;
	}	

	for (int i = 1; i < 3; i++) {
		if ((xcb_atom_t)e->data.data32[i] == ewmh->_NET_WM_STATE_FULLSCREEN) {
			switch (2 * e->data.data32[0] + found->is_e_full) {
				case 2 * XCB_EWMH_WM_STATE_ADD:
					ext_full(found);
					break;
				case 2 * XCB_EWMH_WM_STATE_REMOVE + 1:
					ext_full(found);
					break;
				case 2 * XCB_EWMH_WM_STATE_TOGGLE:
					/* fallthrough */
				case 2 * XCB_EWMH_WM_STATE_TOGGLE + 1:
					ext_full(found);
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
xorl %eax, %eax
movl %eax, %edi
xorl %edx, %edx
movl %edx, %esi
callq 0x87a0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x4db6
movq -0x18(%rbp), %rax
cmpl $0x0, 0xc0(%rax)
je 0x4db6
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq 0xb6aa(%rip), %rcx      # 0x10458
cmpl 0x84(%rcx), %eax
je 0x4dbb
jmp 0x4e51
movl $0x1, -0x1c(%rbp)
cmpl $0x3, -0x1c(%rbp)
jge 0x4e51
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl 0xc(%rax,%rcx,4), %eax
movq 0xb679(%rip), %rcx      # 0x10458
cmpl 0x128(%rcx), %eax
jne 0x4e41
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
movq -0x18(%rbp), %rcx
movl 0x190(%rcx), %edx
movl %eax, %ecx
movl %edx, %eax
leal (%rax,%rcx,2), %eax
movl %eax, -0x20(%rbp)
subl $0x1, %eax
je 0x4e2b
jmp 0x4e09
movl -0x20(%rbp), %eax
subl $0x2, %eax
je 0x4e20
jmp 0x4e13
movl -0x20(%rbp), %eax
addl $-0x4, %eax
subl $0x2, %eax
jb 0x4e36
jmp 0x4e3f
movq -0x18(%rbp), %rdi
callq 0x6780
jmp 0x4e3f
movq -0x18(%rbp), %rdi
callq 0x6780
jmp 0x4e3f
movq -0x18(%rbp), %rdi
callq 0x6780
jmp 0x4e41
jmp 0x4e43
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x4dc2
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/mywm.c
// Function: key_press
static void key_press(xcb_generic_event_t *ev) {
	xcb_key_press_event_t *e = (xcb_key_press_event_t *)ev;
	xcb_keysym_t keysym = xcb_key_symbols_get_keysym(keysyms, e->detail, 0);

	if (keysym != XK_Tab && state == SELECT_WINDOW) {
		select_window_terminate();
	}

	for (int i = 0; i < LEN(keys); i++) {
		if (keysym == keys[i].key && keys[i].mod == e->state) {
			keys[i].function(keys[i].arg);
			break;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq 0xb3e5(%rip), %rdi      # 0x10470
movq -0x10(%rbp), %rax
xorl %edx, %edx
movzbl 0x1(%rax), %esi
callq 0x31b0
movl %eax, -0x14(%rbp)
cmpl $0xff09, -0x14(%rbp)    # imm = 0xFF09
je 0x50b4
cmpl $0x3, 0xb397(%rip)      # 0x10444
jne 0x50b4
callq 0x89d0
movl $0x0, -0x18(%rbp)
movslq -0x18(%rbp), %rax
cmpq $0x10, %rax
jae 0x5140
movl -0x14(%rbp), %eax
movslq -0x18(%rbp), %rdx
leaq 0xaa0d(%rip), %rcx      # 0xfae0
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x4(%rcx), %eax
jne 0x5130
movslq -0x18(%rbp), %rcx
leaq 0xa9f6(%rip), %rax      # 0xfae0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movzwl (%rax), %eax
movq -0x10(%rbp), %rcx
movzwl 0x1c(%rcx), %ecx
cmpl %ecx, %eax
jne 0x5130
movslq -0x18(%rbp), %rcx
leaq 0xa9d5(%rip), %rax      # 0xfae0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movslq -0x18(%rbp), %rdx
leaq 0xa9bf(%rip), %rcx      # 0xfae0
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movq 0x10(%rcx), %rdi
callq *%rax
jmp 0x5140
jmp 0x5132
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x50bb
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/mywm.c
// Function: key_release
static void key_release(xcb_generic_event_t *ev) {
	xcb_key_release_event_t *e = (xcb_key_release_event_t *)ev;
	xcb_keysym_t keysym = xcb_key_symbols_get_keysym(keysyms, e->detail, 0);
	
	if (keysym == XK_Super_L && state == SELECT_WINDOW) {
		select_window_terminate();
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq 0xb305(%rip), %rdi      # 0x10470
movq -0x10(%rbp), %rax
xorl %edx, %edx
movzbl 0x1(%rax), %esi
callq 0x31b0
movl %eax, -0x14(%rbp)
cmpl $0xffeb, -0x14(%rbp)    # imm = 0xFFEB
jne 0x5194
cmpl $0x3, 0xb2b7(%rip)      # 0x10444
jne 0x5194
callq 0x89d0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/mywm.c
// Function: map_request
static void map_request(xcb_generic_event_t *ev) {
	xcb_map_request_event_t *e = (xcb_map_request_event_t *)ev;
	if (search_all(NULL, TYPE_ALL, WIN_CHILD, e->window)) {
		return;
	}

	create_window_new(e->window);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
xorl %eax, %eax
movl %eax, %edi
xorl %edx, %edx
movl %edx, %esi
callq 0x87a0
cmpq $0x0, %rax
je 0x51d0
jmp 0x51dc
movq -0x10(%rbp), %rax
movl 0x8(%rax), %edi
callq 0x6e50
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/mywm.c
// Function: unmap_notify
static void unmap_notify(xcb_generic_event_t *ev) {
	xcb_unmap_notify_event_t *e = (xcb_unmap_notify_event_t *)ev;

	window *found = search_ws(curws, TYPE_ALL, WIN_CHILD, e->window);
	if (!found) {
		return;
	}
	
	if (found->ignore_unmap) {
		found->ignore_unmap = 0;
		return;
	}

	forget_client(found, curws);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq 0xb865(%rip), %rax      # 0x10a70
movl (%rax), %edi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
xorl %edx, %edx
movl %edx, %esi
callq 0x8720
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x522a
jmp 0x5259
movq -0x18(%rbp), %rax
cmpl $0x0, 0x194(%rax)
je 0x5247
movq -0x18(%rbp), %rax
movl $0x0, 0x194(%rax)
jmp 0x5259
movq -0x18(%rbp), %rdi
leaq 0xb81e(%rip), %rax      # 0x10a70
movl (%rax), %esi
callq 0x6810
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/mywm.c
// Function: destroy_notify
static void destroy_notify(xcb_generic_event_t *ev) {
	xcb_destroy_notify_event_t *e = (xcb_destroy_notify_event_t *)ev;

	int ws;
	window *found = search_all(&ws, TYPE_ALL, WIN_CHILD, e->window);
	
	if (found) {
		forget_client(found, ws);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
leaq -0x14(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x87a0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x529f
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x6810
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/mywm.c
// Function: mapping_notify
static void mapping_notify(xcb_generic_event_t *ev) {
	xcb_mapping_notify_event_t *e = (xcb_mapping_notify_event_t *)ev;
	if (e->request != XCB_MAPPING_MODIFIER && e->request != XCB_MAPPING_KEYBOARD) {
		return;
	}

	xcb_ungrab_key(conn, XCB_GRAB_ANY, scr->root, XCB_MOD_MASK_ANY);
	grab_keys();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x4(%rax), %eax
cmpl $0x0, %eax
je 0x52e0
movq -0x10(%rbp), %rax
movzbl 0x4(%rax), %eax
cmpl $0x1, %eax
je 0x52e0
jmp 0x5304
movq 0xb161(%rip), %rdi      # 0x10448
movq 0xb162(%rip), %rax      # 0x10450
movl (%rax), %edx
xorl %esi, %esi
movl $0x8000, %ecx           # imm = 0x8000
callq 0x33d0
movl %eax, -0x14(%rbp)
callq 0x53b0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/mywm.c
// Function: expose
static void expose(xcb_generic_event_t *ev) {
	xcb_expose_event_t *e = (xcb_expose_event_t *)ev;

	search_data data = search_range(curws, TYPE_NORMAL, WIN_COUNT, REGION_COUNT, e->window);
	if (!data.win) {
		return;
	}

	draw_region(data.win, data.index, data.win->last_pm[data.index - WIN_COUNT]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq 0xb745(%rip), %rax      # 0x10a70
movl (%rax), %edi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %r8d
movl $0x1, %esi
movl $0x2, %edx
movl $0x4, %ecx
callq 0x8680
movq %rax, -0x20(%rbp)
movl %edx, -0x18(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x5359
jmp 0x5379
movq -0x20(%rbp), %rdi
movl -0x18(%rbp), %esi
movq -0x20(%rbp), %rax
movl -0x18(%rbp), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movl 0xdc(%rax,%rcx,4), %edx
callq 0x69e0
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/mywm.c
// Function: grab_keys
static void grab_keys() {
	xcb_key_symbols_free(keysyms);

	keysyms = xcb_key_symbols_alloc(conn);

	for (int i = 0; i < LEN(keys); i++) {
		xcb_keycode_t *keycode = xcb_key_symbols_get_keycode(keysyms, keys[i].key);
		xcb_grab_key(conn, 0, scr->root, keys[i].mod, *keycode, XCB_GRAB_MODE_ASYNC,
				XCB_GRAB_MODE_ASYNC);
		free(keycode);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq 0xb0b1(%rip), %rdi      # 0x10470
callq 0x33e0
movq 0xb07d(%rip), %rdi      # 0x10448
callq 0x32f0
movq %rax, 0xb099(%rip)      # 0x10470
movl $0x0, -0x4(%rbp)
movslq -0x4(%rbp), %rax
cmpq $0x10, %rax
jae 0x546f
movq 0xb07d(%rip), %rdi      # 0x10470
movslq -0x4(%rbp), %rcx
leaq 0xa6e2(%rip), %rax      # 0xfae0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %esi
callq 0x3040
movq %rax, -0x10(%rbp)
movq 0xb030(%rip), %rdi      # 0x10448
movq 0xb031(%rip), %rax      # 0x10450
movl (%rax), %edx
movslq -0x4(%rbp), %rcx
leaq 0xa6b4(%rip), %rax      # 0xfae0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movw (%rax), %cx
movq -0x10(%rbp), %rax
xorl %esi, %esi
movl $0x1, %r9d
movzwl %cx, %ecx
movzbl (%rax), %r8d
movl $0x1, (%rsp)
callq 0x3460
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3270
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x53de
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/mywm.c
// Function: button_press_helper
static int button_press_helper(xcb_button_press_event_t *e, int len, const button list[],
		xcb_window_t win, uint32_t x, uint32_t y) {

	for (int i = 0; i < len; i++) {
		if (e->detail == list[i].button && list[i].mod == e->state) {
			if (list[i].press) {
				list[i].press(&(press_arg){ win, x, y });
			}
			return 1;
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl %r8d, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x5545
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
movq -0x20(%rbp), %rcx
movslq -0x30(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpl 0x4(%rcx), %eax
jne 0x5535
movq -0x20(%rbp), %rax
movslq -0x30(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movzwl (%rax), %eax
movq -0x10(%rbp), %rcx
movzwl 0x1c(%rcx), %ecx
cmpl %ecx, %eax
jne 0x5535
movq -0x20(%rbp), %rax
movslq -0x30(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0x552c
movq -0x20(%rbp), %rax
movslq -0x30(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movl -0x24(%rbp), %ecx
movl %ecx, -0x3c(%rbp)
movl -0x28(%rbp), %ecx
movl %ecx, -0x38(%rbp)
movl -0x2c(%rbp), %ecx
movl %ecx, -0x34(%rbp)
leaq -0x3c(%rbp), %rdi
callq *%rax
movl $0x1, -0x4(%rbp)
jmp 0x554c
jmp 0x5537
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x54a5
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/mywm.c
// Function: mask_to_geo
static int mask_to_geo(xcb_configure_request_event_t *e, uint32_t *vals) {
	int i = 0;

	CHECK_MASK(vals, i, e->x, e->value_mask, XCB_CONFIG_WINDOW_X)
	CHECK_MASK(vals, i, e->y, e->value_mask, XCB_CONFIG_WINDOW_Y)
	CHECK_MASK(vals, i, e->width, e->value_mask, XCB_CONFIG_WINDOW_WIDTH)
	CHECK_MASK(vals, i, e->height, e->value_mask, XCB_CONFIG_WINDOW_HEIGHT)

	return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x1a(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x55a0
movq -0x8(%rbp), %rax
movswl 0x10(%rax), %edx
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x14(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movq -0x8(%rbp), %rax
movzwl 0x1a(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x55cd
movq -0x8(%rbp), %rax
movswl 0x12(%rax), %edx
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x14(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movq -0x8(%rbp), %rax
movzwl 0x1a(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x55fa
movq -0x8(%rbp), %rax
movzwl 0x14(%rax), %edx
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x14(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movq -0x8(%rbp), %rax
movzwl 0x1a(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x5627
movq -0x8(%rbp), %rax
movzwl 0x16(%rax), %edx
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x14(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x14(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/rounded.c
// Function: init_rounded_corners
void init_rounded_corners() {
	int last_res;
	int yoff = 0;
	int res = -1;
	for (float y = 0; y < 2 * RAD; y++) {
		last_res = res;
		float center_y = RAD - 1 - y + .5;
		res = round(sqrt(RAD * RAD - center_y * center_y));
	
		if (RAD - res == 0) {
			yoff = y + 1;
		}

		if (res == last_res) {
			rect_mask[rect_count].height++;
		} else {
			rect_count++;
			rect_mask[rect_count].height = 1;
			rect_mask[rect_count].x = RAD - res;
			rect_mask[rect_count].y = y - yoff;
		} 
	}

	rect_count++;

	corner_height = yoff - rect_mask[rect_count / 2].height;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x8(%rbp)
movl $0xffffffff, -0xc(%rbp) # imm = 0xFFFFFFFF
xorps %xmm0, %xmm0
movss %xmm0, -0x10(%rbp)
movss 0x6ace(%rip), %xmm0     # 0xc124
ucomiss -0x10(%rbp), %xmm0
jbe 0x5790
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
movss 0x6aba(%rip), %xmm0     # 0xc128
subss -0x10(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x6ab1(%rip), %xmm1     # 0xc130
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x14(%rbp)
movss -0x14(%rbp), %xmm0
movss -0x14(%rbp), %xmm1
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
mulss %xmm1, %xmm0
movss 0x6a75(%rip), %xmm1     # 0xc124
addss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x35f0
callq 0x3580
cvttsd2si %xmm0, %eax
movl %eax, -0xc(%rbp)
movl $0x2, %eax
subl -0xc(%rbp), %eax
cmpl $0x0, %eax
jne 0x56e9
movss 0x6a4b(%rip), %xmm0     # 0xc128
addss -0x10(%rbp), %xmm0
cvttss2si %xmm0, %eax
movl %eax, -0x8(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x4(%rbp), %eax
jne 0x5716
movslq 0xac58(%rip), %rcx      # 0x10350
leaq 0xb1d1(%rip), %rax      # 0x108d0
movw 0x6(%rax,%rcx,8), %dx
addw $0x1, %dx
leaq 0xb1c1(%rip), %rax      # 0x108d0
movw %dx, 0x6(%rax,%rcx,8)
jmp 0x5777
movl 0xac34(%rip), %eax      # 0x10350
incl %eax
movl %eax, 0xac2c(%rip)      # 0x10350
movslq 0xac25(%rip), %rcx      # 0x10350
leaq 0xb19e(%rip), %rax      # 0x108d0
movw $0x1, 0x6(%rax,%rcx,8)
movw -0xc(%rbp), %cx
movw $0x2, %dx
subw %cx, %dx
movslq 0xac05(%rip), %rcx      # 0x10350
movw %dx, (%rax,%rcx,8)
movss -0x10(%rbp), %xmm0
cvtsi2ssl -0x8(%rbp), %xmm1
subss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movw %ax, %dx
movslq 0xabe5(%rip), %rcx      # 0x10350
leaq 0xb15e(%rip), %rax      # 0x108d0
movw %dx, 0x2(%rax,%rcx,8)
jmp 0x5779
movss 0x69a7(%rip), %xmm0     # 0xc128
addss -0x10(%rbp), %xmm0
movss %xmm0, -0x10(%rbp)
jmp 0x564e
movl 0xabba(%rip), %eax      # 0x10350
addl $0x1, %eax
movl %eax, 0xabb1(%rip)      # 0x10350
movl -0x8(%rbp), %eax
movl %eax, -0x18(%rbp)
movl 0xaba5(%rip), %eax      # 0x10350
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x18(%rbp), %eax
movslq %ecx, %rdx
leaq 0xb10e(%rip), %rcx      # 0x108d0
movzwl 0x6(%rcx,%rdx,8), %ecx
subl %ecx, %eax
movl %eax, 0xb121(%rip)      # 0x108f0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/window.c
// Function: unfocus
void unfocus(window *win) {
	uint32_t val = UNFOCUSCOL;
	xcb_change_window_attributes(conn, win->windows[WIN_PARENT], XCB_CW_BACK_PIXEL, &val);
	
	xcb_clear_area(conn, 0, win->windows[WIN_PARENT], 0, 0, win->geom[GEOM_W],
			win->geom[GEOM_H]);

	xcb_set_input_focus(conn, XCB_INPUT_FOCUS_NONE, win->windows[WIN_CHILD],
			XCB_CURRENT_TIME);

	draw_regions(win, PM_UNFOCUS);
	
	ewmh_state(win);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0xff302e2f, -0xc(%rbp) # imm = 0xFF302E2F
leaq 0xa6ee(%rip), %rax      # 0x10448
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0xd0(%rax), %esi
movl $0x2, %edx
leaq -0xc(%rbp), %rcx
callq 0x33a0
movl %eax, -0x10(%rbp)
leaq 0xa6c9(%rip), %rax      # 0x10448
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0xd0(%rax), %edx
movq -0x8(%rbp), %rax
movl 0x110(%rax), %eax
movw %ax, %r9w
movq -0x8(%rbp), %rax
movl 0x114(%rax), %eax
xorl %r8d, %r8d
movl %r8d, %esi
movl %r8d, %ecx
movzwl %r9w, %r9d
movzwl %ax, %eax
movl %eax, (%rsp)
callq 0x3390
movl %eax, -0x14(%rbp)
leaq 0xa682(%rip), %rax      # 0x10448
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0xcc(%rax), %edx
xorl %ecx, %ecx
movl %ecx, %esi
callq 0x3140
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl $0x3, %esi
callq 0x5e00
movq -0x8(%rbp), %rdi
callq 0x5e40
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/window.c
// Function: ewmh_state
void ewmh_state(window *win) {
	xcb_atom_t atoms[5];
	int i = 0;

	if (win == stack[curws].fwin) {
		atoms[i++] = ewmh__NET_WM_STATE_FOCUSED;
	}
	if (win->is_i_full || win->is_e_full) {
		atoms[i++] = ewmh->_NET_WM_STATE_FULLSCREEN;
	}
	if (win->ignore_unmap) {
		atoms[i++] = ewmh->_NET_WM_STATE_HIDDEN;
	}

	if (i) {
		xcb_ewmh_set_wm_state(ewmh, win->windows[WIN_CHILD], i, atoms);
	} else {
		xcb_delete_property(conn, win->windows[WIN_CHILD], ewmh->_NET_WM_STATE);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x8(%rbp), %rax
leaq 0xac12(%rip), %rcx      # 0x10a70
movslq (%rcx), %rdx
leaq 0xaac8(%rip), %rcx      # 0x10930
imulq $0x50, %rdx, %rdx
addq %rdx, %rcx
cmpq 0x48(%rcx), %rax
jne 0x5e8f
leaq 0xa648(%rip), %rax      # 0x104c4
movl (%rax), %ecx
movl -0x24(%rbp), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, -0x24(%rbp)
cltq
movl %ecx, -0x20(%rbp,%rax,4)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x18c(%rax)
jne 0x5ea9
movq -0x8(%rbp), %rax
cmpl $0x0, 0x190(%rax)
je 0x5eca
leaq 0xa5a8(%rip), %rax      # 0x10458
movq (%rax), %rax
movl 0x128(%rax), %ecx
movl -0x24(%rbp), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, -0x24(%rbp)
cltq
movl %ecx, -0x20(%rbp,%rax,4)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x194(%rax)
je 0x5ef8
leaq 0xa57a(%rip), %rax      # 0x10458
movq (%rax), %rax
movl 0x124(%rax), %ecx
movl -0x24(%rbp), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, -0x24(%rbp)
cltq
movl %ecx, -0x20(%rbp,%rax,4)
cmpl $0x0, -0x24(%rbp)
je 0x5f23
leaq 0xa553(%rip), %rax      # 0x10458
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0xcc(%rax), %esi
movl -0x24(%rbp), %edx
leaq -0x20(%rbp), %rcx
callq 0x34b0
movl %eax, -0x28(%rbp)
jmp 0x5f4f
leaq 0xa51e(%rip), %rax      # 0x10448
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0xcc(%rax), %esi
leaq 0xa51a(%rip), %rax      # 0x10458
movq (%rax), %rax
movl 0x84(%rax), %edx
callq 0x34f0
movl %eax, -0x2c(%rbp)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/window.c
// Function: focus
void focus(window *win) {
	if (stack[curws].fwin) {
		unfocus(stack[curws].fwin);
	}

	uint32_t mask = XCB_CW_BACK_PIXEL | XCB_CW_BORDER_PIXEL;
	uint32_t vals[2];
	vals[0] = FOCUSCOL;
	vals[1] = FOCUSCOL;
	xcb_change_window_attributes(conn, win->windows[WIN_PARENT], mask, vals);

	xcb_clear_area(conn, 0, win->windows[WIN_PARENT], 0, 0, win->geom[GEOM_W],
			win->geom[GEOM_H]);
		
	xcb_set_input_focus(conn, XCB_INPUT_FOCUS_POINTER_ROOT, win->windows[WIN_CHILD],
			XCB_CURRENT_TIME);
	
	draw_regions(win, PM_FOCUS);

	stack[curws].fwin = win;
	
	ewmh_state(win);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
leaq 0xaafd(%rip), %rax      # 0x10a70
movslq (%rax), %rcx
leaq 0xa9b3(%rip), %rax      # 0x10930
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x48(%rax)
je 0x5fac
leaq 0xaade(%rip), %rax      # 0x10a70
movslq (%rax), %rcx
leaq 0xa994(%rip), %rax      # 0x10930
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movq 0x48(%rax), %rdi
callq 0x5d40
movl $0xa, -0xc(%rbp)
movl $0xff3d3a3c, -0x14(%rbp) # imm = 0xFF3D3A3C
movl $0xff3d3a3c, -0x10(%rbp) # imm = 0xFF3D3A3C
leaq 0xa480(%rip), %rax      # 0x10448
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0xd0(%rax), %esi
movl -0xc(%rbp), %edx
leaq -0x14(%rbp), %rcx
callq 0x33a0
movl %eax, -0x18(%rbp)
leaq 0xa45d(%rip), %rax      # 0x10448
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0xd0(%rax), %edx
movq -0x8(%rbp), %rax
movl 0x110(%rax), %eax
movw %ax, %r9w
movq -0x8(%rbp), %rax
movl 0x114(%rax), %eax
xorl %r8d, %r8d
movl %r8d, %esi
movl %r8d, %ecx
movzwl %r9w, %r9d
movzwl %ax, %eax
movl %eax, (%rsp)
callq 0x3390
movl %eax, -0x1c(%rbp)
leaq 0xa416(%rip), %rax      # 0x10448
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0xcc(%rax), %edx
movl $0x1, %esi
xorl %ecx, %ecx
callq 0x3140
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x5e00
movq -0x8(%rbp), %rcx
leaq 0xaa0c(%rip), %rax      # 0x10a70
movslq (%rax), %rdx
leaq 0xa8c2(%rip), %rax      # 0x10930
imulq $0x50, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x48(%rax)
movq -0x8(%rbp), %rdi
callq 0x5e40
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/window.c
// Function: show_state
void show_state(window *win) {
	uint32_t vals[2];
	vals[0] = XCB_ICCCM_WM_STATE_NORMAL;
	vals[1] = XCB_NONE;
	
	xcb_change_property(conn, XCB_PROP_MODE_REPLACE, win->windows[WIN_CHILD], wm_atoms[WM_STATE], 
			wm_atoms[WM_STATE], 32, 2, vals);
	
	win->ignore_unmap = 0;

	ewmh_state(win);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl $0x1, -0x10(%rbp)
movl $0x0, -0xc(%rbp)
leaq 0xa397(%rip), %rax      # 0x10448
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0xcc(%rax), %edx
leaq 0xa39b(%rip), %rax      # 0x10460
movl 0x8(%rax), %ecx
leaq 0xa391(%rip), %rax      # 0x10460
movl 0x8(%rax), %r8d
leaq -0x10(%rbp), %rax
xorl %esi, %esi
movl $0x20, %r9d
movl $0x2, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x3520
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl $0x0, 0x194(%rax)
movq -0x8(%rbp), %rdi
callq 0x5e40
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/window.c
// Function: show
void show(window *win) {
	if (win->sticky) {
		return;
	}

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

	show_state(win);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0xc8(%rax)
je 0x612b
jmp 0x616c
leaq 0xa316(%rip), %rax      # 0x10448
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0xcc(%rax), %esi
callq 0x3230
movl %eax, -0xc(%rbp)
leaq 0xa2fa(%rip), %rax      # 0x10448
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0xd0(%rax), %esi
callq 0x3230
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6090
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/window.c
// Function: hide
void hide(window *win) {
	if (win->sticky) {
		return;
	}

	xcb_unmap_window(conn, win->windows[WIN_CHILD]);
	xcb_unmap_window(conn, win->windows[WIN_PARENT]);
	
	uint32_t vals[2];
	vals[0] = XCB_ICCCM_WM_STATE_ICONIC;
	vals[1] = XCB_NONE;
	
	xcb_change_property(conn, XCB_PROP_MODE_REPLACE, win->windows[WIN_CHILD], wm_atoms[WM_STATE], 
			wm_atoms[WM_STATE], 32, 2, vals);

	ewmh_state(win);
	
	win->ignore_unmap = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0xc8(%rax)
je 0x619e
jmp 0x6244
leaq 0xa2a3(%rip), %rax      # 0x10448
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0xcc(%rax), %esi
callq 0x3560
movl %eax, -0xc(%rbp)
leaq 0xa287(%rip), %rax      # 0x10448
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0xd0(%rax), %esi
callq 0x3560
movl %eax, -0x10(%rbp)
movl $0x3, -0x18(%rbp)
movl $0x0, -0x14(%rbp)
leaq 0xa25d(%rip), %rax      # 0x10448
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0xcc(%rax), %edx
leaq 0xa261(%rip), %rax      # 0x10460
movl 0x8(%rax), %ecx
leaq 0xa257(%rip), %rax      # 0x10460
movl 0x8(%rax), %r8d
leaq -0x18(%rbp), %rax
xorl %esi, %esi
movl $0x20, %r9d
movl $0x2, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x3520
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
callq 0x5e40
movq -0x8(%rbp), %rax
movl $0x1, 0x194(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/window.c
// Function: frame_extents
void frame_extents(xcb_window_t win) { //unused aorn
	uint32_t vals[4];
	vals[0] = 0;     //left
	vals[1] = 0;     //right
	vals[2] = PAD_N; //top
	vals[3] = 0;     //bot
	xcb_change_property(conn, XCB_PROP_MODE_REPLACE, win, ewmh->_NET_FRAME_EXTENTS,
			XCB_ATOM_CARDINAL, 32, 4, &vals);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movl $0x0, -0x20(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x20, -0x18(%rbp)
movl $0x0, -0x14(%rbp)
leaq 0xa1ca(%rip), %rax      # 0x10448
movq (%rax), %rdi
movl -0x4(%rbp), %edx
leaq 0xa1cd(%rip), %rax      # 0x10458
movq (%rax), %rax
movl 0xac(%rax), %ecx
xorl %esi, %esi
movl $0x6, %r8d
movl $0x20, %r9d
leaq -0x20(%rbp), %rax
movl $0x4, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x3520
movl %eax, -0x24(%rbp)
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/window.c
// Function: stick_helper
void stick_helper(window *win) {
	if (win->sticky) {
		win->sticky = 0;
		excise_from_all_but(curws, win);
		return;
	}

	win->sticky = 1;
	insert_into_all_but(curws, win);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0xc8(%rax)
je 0x62fb
movq -0x8(%rbp), %rax
movl $0x0, 0xc8(%rax)
leaq 0xa782(%rip), %rax      # 0x10a70
movl (%rax), %edi
movq -0x8(%rbp), %rsi
callq 0x85c0
jmp 0x631b
movq -0x8(%rbp), %rax
movl $0x1, 0xc8(%rax)
leaq 0xa760(%rip), %rax      # 0x10a70
movl (%rax), %edi
movq -0x8(%rbp), %rsi
callq 0x8520
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/window.c
// Function: full
void full(window *win) {
	uint32_t vals[4];
	vals[0] = - PAD;
	vals[1] = - PAD_N;
	vals[2] = scr->width_in_pixels + 2 * PAD;
	vals[3] = scr->height_in_pixels + PAD_N + PAD;
	update_geometry(win, MOVE_RESIZE_MASK, vals);

	ewmh_state(win);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0xffffffff, -0x20(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffe0, -0x1c(%rbp) # imm = 0xFFFFFFE0
leaq 0x9d1f(%rip), %rax      # 0x10450
movq (%rax), %rax
movzwl 0x14(%rax), %eax
addl $0x2, %eax
movl %eax, -0x18(%rbp)
leaq 0x9d0b(%rip), %rax      # 0x10450
movq (%rax), %rax
movzwl 0x16(%rax), %eax
addl $0x20, %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x20(%rbp), %rdx
movl $0xf, %esi
callq 0x63f0
movq -0x8(%rbp), %rdi
callq 0x5e40
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/window.c
// Function: ext_full
void ext_full(window *subj) {
	subj->is_e_full = !subj->is_e_full;

	if (!subj->is_e_full) {
		if (!subj->is_i_full) {
			full_restore_state(subj);
		}

		return;
	}
		
	if (!subj->is_i_full) {
		full_save_state(subj);
	}

	full(stack[curws].fwin);	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x190(%rax)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x190(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x190(%rax)
jne 0x67d0
movq -0x8(%rbp), %rax
cmpl $0x0, 0x18c(%rax)
jne 0x67ce
movq -0x8(%rbp), %rdi
callq 0x63a0
jmp 0x6807
movq -0x8(%rbp), %rax
cmpl $0x0, 0x18c(%rax)
jne 0x67e6
movq -0x8(%rbp), %rdi
callq 0x6370
leaq 0xa283(%rip), %rax      # 0x10a70
movslq (%rax), %rcx
leaq 0xa139(%rip), %rax      # 0x10930
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movq 0x48(%rax), %rdi
callq 0x6710
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/window.c
// Function: draw_region
void draw_region(window *win, int window_index, int pm_index) {
	int region_index = window_index - WIN_COUNT;
	xcb_copy_area_checked(conn, pixmaps[region_index][pm_index], win->windows[window_index],
			win->gc, 0, 0, 0, 0, controls[region_index].geom.width,
			controls[region_index].geom.height);

	win->last_pm[region_index] = pm_index;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl -0xc(%rbp), %eax
subl $0x2, %eax
movl %eax, -0x14(%rbp)
leaq 0x9a46(%rip), %rax      # 0x10448
movq (%rax), %rdi
movslq -0x14(%rbp), %rcx
leaq 0x9a70(%rip), %rax      # 0x10480
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x10(%rbp), %rcx
movl (%rax,%rcx,4), %esi
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl 0xcc(%rax,%rcx,4), %edx
movq -0x8(%rbp), %rax
movl 0x104(%rax), %ecx
movslq -0x14(%rbp), %r8
leaq 0x923e(%rip), %rax      # 0xfc80
imulq $0x50, %r8, %r8
addq %r8, %rax
movw 0x4(%rax), %r10w
movslq -0x14(%rbp), %r8
leaq 0x9227(%rip), %rax      # 0xfc80
imulq $0x50, %r8, %r8
addq %r8, %rax
xorl %r9d, %r9d
movl %r9d, %r8d
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
movzwl %r10w, %r10d
movl %r10d, 0x10(%rsp)
movzwl 0x6(%rax), %eax
movl %eax, 0x18(%rsp)
callq 0x32d0
movl %eax, -0x18(%rbp)
movl -0x10(%rbp), %edx
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl %edx, 0xdc(%rax,%rcx,4)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/window.c
// Function: search_resize_regions
int search_resize_regions(window *win, xcb_window_t id) {
	for (unsigned int i = 0; i < 8; i++) {
		if (win->resize_regions[i] == id) {
			return i;
		}
	}

	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
cmpl $0x8, -0x18(%rbp)
jae 0x6af0
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
movl 0xe4(%rax,%rcx,4), %eax
cmpl -0x14(%rbp), %eax
jne 0x6ae3
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x6af7
jmp 0x6ae5
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x6ac2
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/window.c
// Function: cursor_init
void cursor_init(void) {
	xcb_font_t cursor_font = xcb_generate_id(conn);
	xcb_open_font(conn, cursor_font, strlen("cursor"), "cursor");

	XRenderColor cursor_fg = hex_to_rgb(CURSOR_FG);
	XRenderColor cursor_bg = hex_to_rgb(CURSOR_BG);

	default_cursor = cursor_create(cursor_font, cursor_fg, cursor_bg, CURSOR_DEFAULT);
	
	for (int i = 0; i < 8; i++) {
		resize_cursors[i] = cursor_create(cursor_font, cursor_fg, cursor_bg, resize_cursor_indicies[i]);
	}

	xcb_close_font_checked(conn, cursor_font);

	xcb_change_window_attributes(conn, scr->root, XCB_CW_CURSOR, &default_cursor);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
leaq 0x9939(%rip), %rax      # 0x10448
movq (%rax), %rdi
callq 0x3550
movl %eax, -0x4(%rbp)
leaq 0x9927(%rip), %rax      # 0x10448
movq (%rax), %rdi
movl -0x4(%rbp), %esi
movl $0x6, %edx
leaq 0x565d(%rip), %rcx      # 0xc190
callq 0x3090
movl %eax, -0x8(%rbp)
movl $0xffd7d7d7, %edi       # imm = 0xFFD7D7D7
callq 0xb010
movq %rax, -0x10(%rbp)
movl $0xff242223, %edi       # imm = 0xFF242223
callq 0xb010
movq %rax, -0x18(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl $0x44, %ecx
callq 0x6c10
movl %eax, 0x9d8e(%rip)      # 0x10900
movl $0x0, -0x1c(%rbp)
cmpl $0x8, -0x1c(%rbp)
jge 0x6bbc
movl -0x4(%rbp), %edi
movslq -0x1c(%rbp), %rcx
leaq 0x55b3(%rip), %rax      # 0xc140
movw (%rax,%rcx,2), %ax
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movzwl %ax, %ecx
callq 0x6c10
movl %eax, %edx
movslq -0x1c(%rbp), %rcx
leaq 0x9d62(%rip), %rax      # 0x10910
movl %edx, (%rax,%rcx,4)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x6b79
leaq 0x9885(%rip), %rax      # 0x10448
movq (%rax), %rdi
movl -0x4(%rbp), %esi
callq 0x33f0
movl %eax, -0x20(%rbp)
leaq 0x9870(%rip), %rax      # 0x10448
movq (%rax), %rdi
leaq 0x986e(%rip), %rax      # 0x10450
movq (%rax), %rax
movl (%rax), %esi
movl $0x4000, %edx           # imm = 0x4000
leaq 0x9d0d(%rip), %rcx      # 0x10900
callq 0x33a0
movl %eax, -0x24(%rbp)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/window.c
// Function: cursor_create
static xcb_cursor_t cursor_create(xcb_font_t font, XRenderColor fg, XRenderColor bg, uint16_t index) {
	xcb_cursor_t cursor = xcb_generate_id(conn);
	xcb_create_glyph_cursor(conn, cursor, font, font, index, index + 1, fg.red, fg.green, fg.blue,
			bg.red, bg.green, bg.blue);
	return cursor;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movw %cx, %ax
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %edi, -0x24(%rbp)
movw %ax, -0x26(%rbp)
leaq 0x9814(%rip), %rax      # 0x10448
movq (%rax), %rdi
callq 0x3550
movl %eax, -0x2c(%rbp)
leaq 0x9802(%rip), %rax      # 0x10448
movq (%rax), %rdi
movl -0x2c(%rbp), %esi
movl -0x24(%rbp), %edx
movl -0x24(%rbp), %ecx
movw -0x26(%rbp), %r8w
movzwl -0x26(%rbp), %eax
addl $0x1, %eax
movw %ax, %r9w
movw -0x18(%rbp), %r14w
movw -0x16(%rbp), %bx
movw -0x14(%rbp), %r11w
movw -0x20(%rbp), %r10w
movw -0x1e(%rbp), %ax
movzwl %r8w, %r8d
movzwl %r9w, %r9d
movzwl %r14w, %r14d
movl %r14d, (%rsp)
movzwl %bx, %ebx
movl %ebx, 0x8(%rsp)
movzwl %r11w, %r11d
movl %r11d, 0x10(%rsp)
movzwl %r10w, %r10d
movl %r10d, 0x18(%rsp)
movzwl %ax, %eax
movl %eax, 0x20(%rsp)
movzwl -0x1c(%rbp), %eax
movl %eax, 0x28(%rsp)
callq 0x35a0
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/window.c
// Function: install_normal_hints
void install_normal_hints(window *win) {
	if (!xcb_icccm_get_wm_normal_hints_reply(conn, xcb_icccm_get_wm_normal_hints_unchecked(conn,
			win->windows[WIN_CHILD]), &win->hints, NULL)) {
		memset(&win->hints, 0, sizeof(xcb_size_hints_t));
		return;	
	}

#define MIN_WIDTH 160
#define MIN_HEIGHT 90

	if ((win->hints.flags & XCB_ICCCM_SIZE_HINT_BASE_SIZE) &&
			!(win->hints.flags & XCB_ICCCM_SIZE_HINT_P_MIN_SIZE)) {
		win->hints.min_width = win->hints.base_width;
		win->hints.min_height = win->hints.base_height;
	} else {
		win->hints.min_width = MIN_WIDTH;
		win->hints.min_height = MIN_HEIGHT;
	}

	if (!(win->hints.flags & XCB_ICCCM_SIZE_HINT_P_RESIZE_INC)) {
		win->hints.width_inc = 1;
		win->hints.height_inc = 1;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x9705(%rip), %rax      # 0x10448
movq (%rax), %rax
movq %rax, -0x18(%rbp)
leaq 0x96f7(%rip), %rax      # 0x10448
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0xcc(%rax), %esi
callq 0x30c0
movq -0x18(%rbp), %rdi
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdx
addq $0x118, %rdx            # imm = 0x118
movl -0xc(%rbp), %esi
xorl %eax, %eax
movl %eax, %ecx
callq 0x3630
cmpb $0x0, %al
jne 0x6da1
movq -0x8(%rbp), %rdi
addq $0x118, %rdi            # imm = 0x118
xorl %esi, %esi
movl $0x48, %edx
callq 0x30a0
jmp 0x6e3b
movq -0x8(%rbp), %rax
movl 0x118(%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x6df1
movq -0x8(%rbp), %rax
movl 0x118(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x6df1
movq -0x8(%rbp), %rax
movl 0x154(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x12c(%rax)
movq -0x8(%rbp), %rax
movl 0x158(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x130(%rax)
jmp 0x6e0d
movq -0x8(%rbp), %rax
movl $0xa0, 0x12c(%rax)
movq -0x8(%rbp), %rax
movl $0x5a, 0x130(%rax)
movq -0x8(%rbp), %rax
movl 0x118(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
jne 0x6e3b
movq -0x8(%rbp), %rax
movl $0x1, 0x13c(%rax)
movq -0x8(%rbp), %rax
movl $0x1, 0x140(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/window.c
// Function: create_window_new
void create_window_new(xcb_window_t child) {
	window *win = allocate_window(child);

	uint32_t w;
	uint32_t h;
	uint32_t x;
	uint32_t y;
	xcb_get_geometry_reply_t *geom = w_get_geometry(child);
	if (win->hints.flags & XCB_ICCCM_SIZE_HINT_US_POSITION) {
		w = geom->width;
		h = geom->height;
		x = geom->x;
		y = geom->y;
	} else {
		xcb_query_pointer_reply_t *ptr = w_query_pointer();
		w = size_helper(geom->width + 2 * PAD, scr->width_in_pixels);
		h = size_helper(geom->height + PAD_N + PAD, scr->height_in_pixels - TOP - BOT);
		x = place_helper(ptr->root_x, w, scr->width_in_pixels);
		y = TOP + place_helper(ptr->root_y - TOP, h, scr->height_in_pixels - TOP - BOT);
		free(ptr);
	}
	free(geom);

	create_window(win, x, y, w, h);
	
	insert_into(curws, win);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %edi
callq 0x6fa0
movq %rax, -0x10(%rbp)
movl -0x4(%rbp), %edi
callq 0x70b0
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0x118(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x6eb6
movq -0x28(%rbp), %rax
movzwl 0x10(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x28(%rbp), %rax
movzwl 0x12(%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x28(%rbp), %rax
movswl 0xc(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x28(%rbp), %rax
movswl 0xe(%rax), %eax
movl %eax, -0x20(%rbp)
jmp 0x6f63
movb $0x0, %al
callq 0x3740
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movzwl 0x10(%rax), %edi
addl $0x2, %edi
leaq 0x957d(%rip), %rax      # 0x10450
movq (%rax), %rax
movzwl 0x14(%rax), %esi
callq 0x70f0
movl %eax, -0x14(%rbp)
movq -0x28(%rbp), %rax
movzwl 0x12(%rax), %edi
addl $0x20, %edi
addl $0x1, %edi
leaq 0x9559(%rip), %rax      # 0x10450
movq (%rax), %rax
movzwl 0x16(%rax), %esi
subl $0x0, %esi
subl $0x0, %esi
callq 0x70f0
movl %eax, -0x18(%rbp)
movq -0x30(%rbp), %rax
movswl 0x10(%rax), %edi
movl -0x14(%rbp), %esi
leaq 0x9532(%rip), %rax      # 0x10450
movq (%rax), %rax
movzwl 0x14(%rax), %edx
callq 0x7120
movl %eax, -0x1c(%rbp)
movq -0x30(%rbp), %rax
movswl 0x12(%rax), %edi
subl $0x0, %edi
movl -0x18(%rbp), %esi
leaq 0x950e(%rip), %rax      # 0x10450
movq (%rax), %rax
movzwl 0x16(%rax), %edx
subl $0x0, %edx
subl $0x0, %edx
callq 0x7120
addl $0x0, %eax
movl %eax, -0x20(%rbp)
movq -0x30(%rbp), %rdi
callq 0x3270
movq -0x28(%rbp), %rdi
callq 0x3270
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl -0x20(%rbp), %edx
movl -0x14(%rbp), %ecx
movl -0x18(%rbp), %r8d
callq 0x7180
leaq 0x9ae7(%rip), %rax      # 0x10a70
movl (%rax), %edi
movq -0x10(%rbp), %rsi
callq 0x7f90
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/window.c
// Function: allocate_window
static window *allocate_window(xcb_window_t child) {
	window *win = malloc(sizeof(window));
	win->windows[WIN_PARENT] = XCB_WINDOW_NONE;
	win->windows[WIN_CHILD] = child;
	win->ignore_unmap = 0;
	win->is_roll = 0;
	win->snap_index = SNAP_NONE;
	win->is_e_full = 0;
	win->is_i_full = 0;
	win->sticky = 0;
	win->above = 0;
	win->normal = 1;

	window_property_helper(xcb_ewmh_get_wm_window_type(ewmh, child), win, test_window_type);
	window_property_helper(xcb_ewmh_get_wm_state(ewmh, child), win, test_window_state);

	install_normal_hints(win);

	return win;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl $0x198, %edi            # imm = 0x198
callq 0x3160
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl $0x0, 0xd0(%rax)
movl -0x4(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xcc(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x194(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x164(%rax)
movq -0x10(%rbp), %rax
movl $0x7, 0x178(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x190(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x18c(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0xc8(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0xc4(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0xc0(%rax)
leaq 0x940d(%rip), %rax      # 0x10458
movq (%rax), %rdi
movl -0x4(%rbp), %esi
callq 0x3080
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edi
leaq 0xbb9(%rip), %rdx       # 0x7c20
callq 0x7b90
leaq 0x93e5(%rip), %rax      # 0x10458
movq (%rax), %rdi
movl -0x4(%rbp), %esi
callq 0x3210
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rsi
movl -0x18(%rbp), %edi
leaq 0xc71(%rip), %rdx       # 0x7d00
callq 0x7b90
movq -0x10(%rbp), %rdi
callq 0x6d30
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/window.c
// Function: place_helper
static uint32_t place_helper(uint32_t ptr_pos, uint32_t win_sze, uint32_t scr_sze) {
	if (ptr_pos < win_sze / 2 + BORDER) {
		return 0;
	} else if (ptr_pos + win_sze / 2 + BORDER > scr_sze) {
		return scr_sze - win_sze - 2 * BORDER;
	} else {
		return ptr_pos - win_sze / 2 - BORDER;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl -0x8(%rbp), %eax
movl -0xc(%rbp), %ecx
shrl %ecx
addl $0x0, %ecx
cmpl %ecx, %eax
jae 0x7145
movl $0x0, -0x4(%rbp)
jmp 0x7175
movl -0x8(%rbp), %eax
movl -0xc(%rbp), %ecx
shrl %ecx
addl %ecx, %eax
addl $0x0, %eax
cmpl -0x10(%rbp), %eax
jbe 0x7165
movl -0x10(%rbp), %eax
subl -0xc(%rbp), %eax
subl $0x0, %eax
movl %eax, -0x4(%rbp)
jmp 0x7175
movl -0x8(%rbp), %eax
movl -0xc(%rbp), %ecx
shrl %ecx
subl %ecx, %eax
subl $0x0, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)