LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/tudurom[P]windowchef/wm.c
// Function: resize_window
static void
resize_window(xcb_window_t win, int16_t w, int16_t h)
{
	struct client *client;
	int32_t aw, ah;

	client = find_client(&win);
	if (client == NULL)
		return;

	aw = client->geom.width;
	ah = client->geom.height;

	if (aw + w > 0)
		aw += w;
	if (ah + h > 0)
		ah += h;

	/* avoid weird stuff */
	if (aw < 0)
		aw = 0;
	if (ah < 0)
		ah = 0;

	if (client->min_width != 0 && aw < client->min_width)
		aw = client->min_width;

	if (client->min_height != 0 && ah < client->min_height)
		ah = client->min_height;

	client->geom.width  = aw - conf.resize_hints * (aw % client->width_inc);
	client->geom.height = ah - conf.resize_hints * (ah % client->height_inc);

	resize_window_absolute(win, client->geom.width, client->geom.height);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %dx, %ax
movw %si, %cx
movl %edi, -0x4(%rbp)
movw %cx, -0x6(%rbp)
movw %ax, -0x8(%rbp)
leaq -0x4(%rbp), %rdi
callq 0x4ff0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x9542
jmp 0x966f
movq -0x10(%rbp), %rax
movzwl 0x8(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movzwl 0xa(%rax), %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
movswl -0x6(%rbp), %ecx
addl %ecx, %eax
cmpl $0x0, %eax
jle 0x9570
movswl -0x6(%rbp), %eax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
movswl -0x8(%rbp), %ecx
addl %ecx, %eax
cmpl $0x0, %eax
jle 0x9588
movswl -0x8(%rbp), %eax
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0x9595
movl $0x0, -0x14(%rbp)
cmpl $0x0, -0x18(%rbp)
jge 0x95a2
movl $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x48(%rax), %eax
cmpl $0x0, %eax
je 0x95c9
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
movzwl 0x48(%rcx), %ecx
cmpl %ecx, %eax
jge 0x95c9
movq -0x10(%rbp), %rax
movzwl 0x48(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x4a(%rax), %eax
cmpl $0x0, %eax
je 0x95f0
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
movzwl 0x4a(%rcx), %ecx
cmpl %ecx, %eax
jge 0x95f0
movq -0x10(%rbp), %rax
movzwl 0x4a(%rax), %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x20(%rbp)
movb 0x61e5(%rip), %al       # 0xf7e1
andb $0x1, %al
movzbl %al, %ecx
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rdx
movzwl 0x50(%rdx), %esi
cltd
idivl %esi
movl -0x20(%rbp), %eax
imull %edx, %ecx
subl %ecx, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x8(%rax)
movl -0x18(%rbp), %eax
movl %eax, -0x1c(%rbp)
movb 0x61b3(%rip), %al       # 0xf7e1
andb $0x1, %al
movzbl %al, %ecx
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rdx
movzwl 0x52(%rdx), %esi
cltd
idivl %esi
movl -0x1c(%rbp), %eax
imull %edx, %ecx
subl %ecx, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0xa(%rax)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rax
movw 0x8(%rax), %cx
movq -0x10(%rbp), %rax
movzwl %cx, %esi
movzwl 0xa(%rax), %edx
callq 0x54e0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tudurom[P]windowchef/wm.c
// Function: monocle_window
static void
monocle_window(struct client *client, int16_t mon_x, int16_t mon_y, uint16_t mon_width, uint16_t mon_height)
{
	if (client == NULL)
		return;

	if (is_special(client))
		reset_window(client);

	client->orig_geom = client->geom;

	client->geom.x = mon_x + conf.gap_left;
	client->geom.y = mon_y + conf.gap_up;
	client->geom.width = mon_width - 2 * conf.border_width
		- conf.gap_left - conf.gap_right;
	client->geom.height = mon_height - 2 * conf.border_width
		- conf.gap_up - conf.gap_down;
	teleport_window(client->window, client->geom.x, client->geom.y);
	resize_window_absolute(client->window, client->geom.width, client->geom.height);
	client->monocled = true;
	set_focused_no_raise(client);

	update_ewmh_wm_state(client);
	update_window_status(client);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movw %r8w, %ax
movq %rdi, -0x8(%rbp)
movw %si, -0xa(%rbp)
movw %dx, -0xc(%rbp)
movw %cx, -0xe(%rbp)
movw %ax, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x96ac
jmp 0x97c3
movq -0x8(%rbp), %rdi
callq 0x5780
testb $0x1, %al
jne 0x96bb
jmp 0x96c4
movq -0x8(%rbp), %rdi
callq 0x57f0
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x4(%rcx), %rdx
movq %rdx, 0xe(%rax)
movw 0xc(%rcx), %cx
movw %cx, 0x16(%rax)
movswl -0xa(%rbp), %eax
movsbl 0x60dc(%rip), %ecx      # 0xf7c3
addl %ecx, %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0x4(%rax)
movswl -0xc(%rbp), %eax
movsbl 0x60c6(%rip), %ecx      # 0xf7c5
addl %ecx, %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0x6(%rax)
movzwl -0xe(%rbp), %eax
movsbl 0x60a9(%rip), %ecx      # 0xf7c0
shll %ecx
subl %ecx, %eax
movsbl 0x60a1(%rip), %ecx      # 0xf7c3
subl %ecx, %eax
movsbl 0x609b(%rip), %ecx      # 0xf7c6
subl %ecx, %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0x8(%rax)
movzwl -0x10(%rbp), %eax
movsbl 0x607d(%rip), %ecx      # 0xf7c0
shll %ecx
subl %ecx, %eax
movsbl 0x6077(%rip), %ecx      # 0xf7c5
subl %ecx, %eax
movsbl 0x606d(%rip), %ecx      # 0xf7c4
subl %ecx, %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0xa(%rax)
movq -0x8(%rbp), %rax
movl (%rax), %edi
movq -0x8(%rbp), %rax
movw 0x4(%rax), %cx
movq -0x8(%rbp), %rax
movswl %cx, %esi
movswl 0x6(%rax), %edx
callq 0x5460
movq -0x8(%rbp), %rax
movl (%rax), %edi
movq -0x8(%rbp), %rax
movw 0x8(%rax), %cx
movq -0x8(%rbp), %rax
movzwl %cx, %esi
movzwl 0xa(%rax), %edx
callq 0x54e0
movq -0x8(%rbp), %rax
movb $0x1, 0x27(%rax)
movq -0x8(%rbp), %rdi
callq 0x5920
movq -0x8(%rbp), %rdi
callq 0x5ab0
movq -0x8(%rbp), %rdi
callq 0x5b70
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/tudurom[P]windowchef/wm.c
// Function: close_window
static void
close_window(struct client *client)
{
	if (client == NULL)
		return;

	if (conf.last_window_focusing && client != NULL && client == focused_win)
	    set_focused_last_best();

	if (focused_win == client)
		focused_win = NULL;

	xcb_window_t win = client->window;
	xcb_get_property_cookie_t cookie =
		xcb_icccm_get_wm_protocols_unchecked(conn,
				win, ewmh->WM_PROTOCOLS);
	xcb_icccm_get_wm_protocols_reply_t reply;
	unsigned int i = 0;
	bool got = false;

	if (xcb_icccm_get_wm_protocols_reply(conn, cookie, &reply, NULL)) {
		for (i = 0; i < reply.atoms_len; i++) {
			got = (reply.atoms[i] = ATOMS[WM_DELETE_WINDOW]);
			if (got)
				break;
		}

		xcb_icccm_get_wm_protocols_reply_wipe(&reply);
	}

	if (got)
		delete_window(win);
	else
		xcb_kill_client(conn, win);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x97e8
jmp 0x98da
testb $0x1, 0x5ff5(%rip)      # 0xf7e4
je 0x980a
cmpq $0x0, -0x8(%rbp)
je 0x980a
movq -0x8(%rbp), %rax
cmpq 0x5ffd(%rip), %rax      # 0xf800
jne 0x980a
callq 0x69a0
movq 0x5fef(%rip), %rax      # 0xf800
cmpq -0x8(%rbp), %rax
jne 0x9822
movq $0x0, 0x5fde(%rip) # 0xf800
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xc(%rbp)
movq 0x5ba6(%rip), %rdi      # 0xf3d8
movl -0xc(%rbp), %esi
movq 0x5ba4(%rip), %rax      # 0xf3e0
movl 0xc8(%rax), %edx
callq 0x31f0
movl %eax, -0x10(%rbp)
movl $0x0, -0x2c(%rbp)
movb $0x0, -0x2d(%rbp)
movq 0x5b7c(%rip), %rdi      # 0xf3d8
movl -0x10(%rbp), %esi
leaq -0x28(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0x31e0
cmpb $0x0, %al
je 0x98b8
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x28(%rbp), %eax
jae 0x98af
movl 0x5f8b(%rip), %eax      # 0xf810
movq -0x20(%rbp), %rcx
movl -0x2c(%rbp), %edx
movl %eax, (%rcx,%rdx,4)
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0x2d(%rbp)
testb $0x1, -0x2d(%rbp)
je 0x98a2
jmp 0x98af
jmp 0x98a4
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x9877
leaq -0x28(%rbp), %rdi
callq 0x34d0
testb $0x1, -0x2d(%rbp)
je 0x98c8
movl -0xc(%rbp), %edi
callq 0x98e0
jmp 0x98da
movq 0x5b09(%rip), %rdi      # 0xf3d8
movl -0xc(%rbp), %esi
callq 0x36c0
movl %eax, -0x34(%rbp)
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/tudurom[P]windowchef/wm.c
// Function: delete_window
static void
delete_window(xcb_window_t win)
{
	xcb_client_message_event_t ev;

	ev.response_type = XCB_CLIENT_MESSAGE;
	ev.sequence = 0;
	ev.format = 32;
	ev.window = win;
	ev.type = ewmh->WM_PROTOCOLS;
	ev.data.data32[0] = ATOMS[WM_DELETE_WINDOW];
	ev.data.data32[1] = XCB_CURRENT_TIME;

	xcb_send_event(conn, 0, win, XCB_EVENT_MASK_NO_EVENT, (char *)&ev);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movb $0x21, -0x24(%rbp)
movw $0x0, -0x22(%rbp)
movb $0x20, -0x23(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x20(%rbp)
movq 0x5ada(%rip), %rax      # 0xf3e0
movl 0xc8(%rax), %eax
movl %eax, -0x1c(%rbp)
movl 0x5efb(%rip), %eax      # 0xf810
movl %eax, -0x18(%rbp)
movl $0x0, -0x14(%rbp)
movq 0x5ab2(%rip), %rdi      # 0xf3d8
movl -0x4(%rbp), %edx
xorl %ecx, %ecx
leaq -0x24(%rbp), %r8
movl %ecx, %esi
callq 0x33c0
movl %eax, -0x28(%rbp)
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/tudurom[P]windowchef/wm.c
// Function: move_grid_window
static void
move_grid_window(struct client *client, uint16_t x, uint16_t y)
{

	int16_t new_px, new_py;

	new_px = client->grid.px + x;
	new_py = client->grid.py + y;

	if (!client->gridded
			|| client->grid.gx < new_px + client->grid.sx
			|| client->grid.gy < new_py + client->grid.sy
			|| new_px < 0
			|| new_py < 0)
		return;

	grid_window(client, client->grid.gx, client->grid.gy, new_px, new_py, client->grid.sx, client->grid.sy);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %dx, %ax
movw %si, %cx
movq %rdi, -0x8(%rbp)
movw %cx, -0xa(%rbp)
movw %ax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movswl 0x1c(%rax), %eax
movzwl -0xa(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0xe(%rbp)
movq -0x8(%rbp), %rax
movswl 0x1e(%rax), %eax
movzwl -0xc(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0x10(%rbp)
movq -0x8(%rbp), %rax
testb $0x1, 0x28(%rax)
je 0x9cae
movq -0x8(%rbp), %rax
movswl 0x18(%rax), %eax
movswl -0xe(%rbp), %ecx
movq -0x8(%rbp), %rdx
movswl 0x20(%rdx), %edx
addl %edx, %ecx
cmpl %ecx, %eax
jl 0x9cae
movq -0x8(%rbp), %rax
movswl 0x1a(%rax), %eax
movswl -0x10(%rbp), %ecx
movq -0x8(%rbp), %rdx
movswl 0x22(%rdx), %edx
addl %edx, %ecx
cmpl %ecx, %eax
jl 0x9cae
movswl -0xe(%rbp), %eax
cmpl $0x0, %eax
jl 0x9cae
movswl -0x10(%rbp), %eax
cmpl $0x0, %eax
jge 0x9cb0
jmp 0x9cf7
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movw 0x18(%rax), %si
movq -0x8(%rbp), %rax
movw 0x1a(%rax), %dx
movw -0xe(%rbp), %cx
movw -0x10(%rbp), %r8w
movq -0x8(%rbp), %rax
movw 0x20(%rax), %r9w
movq -0x8(%rbp), %rax
movzwl %si, %esi
movzwl %dx, %edx
movzwl %cx, %ecx
movzwl %r8w, %r8d
movzwl %r9w, %r9d
movzwl 0x22(%rax), %eax
movl %eax, (%rsp)
callq 0x9940
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/tudurom[P]windowchef/wm.c
// Function: resize_grid_window
static void
resize_grid_window(struct client *client, uint16_t x, uint16_t y)
{

	int16_t new_sx, new_sy;

	new_sx = client->grid.sx + x;
	new_sy = client->grid.sy + y;

	if (!client->gridded
			|| client->grid.gx < new_sx + client->grid.px
			|| client->grid.gy < new_sy + client->grid.py
			|| new_sx < 1
			|| new_sy < 1)
		return;

	grid_window(client, client->grid.gx, client->grid.gy, client->grid.px, client->grid.py, new_sx, new_sy);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %dx, %ax
movw %si, %cx
movq %rdi, -0x8(%rbp)
movw %cx, -0xa(%rbp)
movw %ax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movswl 0x20(%rax), %eax
movzwl -0xa(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0xe(%rbp)
movq -0x8(%rbp), %rax
movswl 0x22(%rax), %eax
movzwl -0xc(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0x10(%rbp)
movq -0x8(%rbp), %rax
testb $0x1, 0x28(%rax)
je 0x9d8e
movq -0x8(%rbp), %rax
movswl 0x18(%rax), %eax
movswl -0xe(%rbp), %ecx
movq -0x8(%rbp), %rdx
movswl 0x1c(%rdx), %edx
addl %edx, %ecx
cmpl %ecx, %eax
jl 0x9d8e
movq -0x8(%rbp), %rax
movswl 0x1a(%rax), %eax
movswl -0x10(%rbp), %ecx
movq -0x8(%rbp), %rdx
movswl 0x1e(%rdx), %edx
addl %edx, %ecx
cmpl %ecx, %eax
jl 0x9d8e
movswl -0xe(%rbp), %eax
cmpl $0x1, %eax
jl 0x9d8e
movswl -0x10(%rbp), %eax
cmpl $0x1, %eax
jge 0x9d90
jmp 0x9dd6
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movw 0x18(%rax), %si
movq -0x8(%rbp), %rax
movw 0x1a(%rax), %dx
movq -0x8(%rbp), %rax
movw 0x1c(%rax), %cx
movq -0x8(%rbp), %rax
movw 0x1e(%rax), %r8w
movw -0xe(%rbp), %ax
movzwl %si, %esi
movzwl %dx, %edx
movzwl %cx, %ecx
movzwl %r8w, %r8d
movzwl %ax, %r9d
movzwl -0x10(%rbp), %eax
movl %eax, (%rsp)
callq 0x9940
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/tudurom[P]windowchef/wm.c
// Function: cycle_window
static void
cycle_window(struct client *client)
{
	struct list_item *item;
	struct client *data;

	item = win_list;
	if (client != NULL)
			while (item != NULL && item->data != client)
				item = item->next;

	/* if item is not found item will be null
	 * and we'll get a nice segmentation fault. may the debugger be with you */
	if (item != NULL)
		do {
			item = item->next;
			if (item == NULL)
				item = win_list;
			data = item->data;
		} while (!data->mapped);

	if (item != NULL && item->data != client)
		set_focused(item->data);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq 0x53c5(%rip), %rax      # 0xf3e8
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xa066
jmp 0xa030
xorl %eax, %eax
cmpq $0x0, -0x10(%rbp)
movb %al, -0x19(%rbp)
je 0xa04d
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpq -0x8(%rbp), %rax
setne %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0xa056
jmp 0xa064
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0xa030
jmp 0xa066
cmpq $0x0, -0x10(%rbp)
je 0xa0a7
jmp 0xa06f
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xa08d
movq 0x535f(%rip), %rax      # 0xf3e8
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movb 0x54(%rax), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xa06f
jmp 0xa0a7
cmpq $0x0, -0x10(%rbp)
je 0xa0c7
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpq -0x8(%rbp), %rax
je 0xa0c7
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6a10
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/tudurom[P]windowchef/wm.c
// Function: rcycle_window
static void
rcycle_window(struct client *client)
{
	struct list_item *item = NULL;
	struct list_item *last_item;
	struct list_item *client_item;
	struct client *data;

	if (win_list == NULL)
		return;

	/* find last window */
	item = win_list;
	while (item != NULL) {
		last_item = item;
		item = item->next;
	}

	/* find item of client */
	item = win_list;
	while (item != NULL && item->data != client)
		item = item->next;

	if (item == NULL)
		item = last_item;

	client_item = item;

	item = client_item;
	do {
		item = item->prev;
		if (item == NULL)
			item = last_item;
		data = item->data;
	} while (!data->mapped);

	if (item != NULL && item->data != client)
		set_focused(item->data);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
cmpq $0x0, 0x52fc(%rip)      # 0xf3e8
jne 0xa0f3
jmp 0xa1cc
movq 0x52ee(%rip), %rax      # 0xf3e8
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xa11b
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0xa0fe
movq 0x52c6(%rip), %rax      # 0xf3e8
movq %rax, -0x10(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x10(%rbp)
movb %al, -0x29(%rbp)
je 0xa143
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpq -0x8(%rbp), %rax
setne %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0xa14c
jmp 0xa15a
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0xa126
cmpq $0x0, -0x10(%rbp)
jne 0xa169
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xa194
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movb 0x54(%rax), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xa179
cmpq $0x0, -0x10(%rbp)
je 0xa1cc
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpq -0x8(%rbp), %rax
je 0xa1cc
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6a10
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tudurom[P]windowchef/wm.c
// Function: cycle_window_in_group
static void
cycle_window_in_group(struct client *client)
{
	struct list_item *item;
	struct client *data;

	if (client == NULL)
		return;

	item = win_list;
	while (item != NULL && item->data != client)
		item = item->next;
	if (item != NULL)
		do {
			item = item->next;
			if (item == NULL)
				item = win_list;
			data = item->data;
		} while (!data->mapped || data->group != client->group);

	if (item != NULL && data != client && data->group == client->group)
		set_focused(item->data);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0xa1f8
jmp 0xa2c2
movq 0x51e9(%rip), %rax      # 0xf3e8
movq %rax, -0x10(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x10(%rbp)
movb %al, -0x19(%rbp)
je 0xa220
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpq -0x8(%rbp), %rax
setne %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0xa229
jmp 0xa237
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0xa203
cmpq $0x0, -0x10(%rbp)
je 0xa295
jmp 0xa240
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xa25e
movq 0x518e(%rip), %rax      # 0xf3e8
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movb $0x1, %al
testb $0x1, 0x54(%rcx)
movb %al, -0x1a(%rbp)
je 0xa28c
movq -0x18(%rbp), %rax
movl 0x58(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x58(%rcx), %eax
setne %al
movb %al, -0x1a(%rbp)
movb -0x1a(%rbp), %al
testb $0x1, %al
jne 0xa240
jmp 0xa295
cmpq $0x0, -0x10(%rbp)
je 0xa2c2
movq -0x18(%rbp), %rax
cmpq -0x8(%rbp), %rax
je 0xa2c2
movq -0x18(%rbp), %rax
movl 0x58(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x58(%rcx), %eax
jne 0xa2c2
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6a10
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tudurom[P]windowchef/wm.c
// Function: rcycle_window_in_group
static void
rcycle_window_in_group(struct client *client)
{
	struct list_item *item = NULL;
	struct list_item *last_item;
	struct list_item *client_item;
	struct client *data;

	if (win_list == NULL || client == NULL)
		return;

	/* find item of client */
	item = win_list;
	while (item != NULL && item->data != client)
		item = item->next;

	if (item == NULL)
		return;

	client_item = item;

	/* find last window */
	item = win_list;
	while (item != NULL) {
		last_item = item;
		item = item->next;
	}

	item = client_item;
	do {
		item = item->prev;
		if (item == NULL)
			item = last_item;
		data = item->data;
	} while (!data->mapped || data->group != client->group);

	if (item != NULL && data != client && data->group == client->group)
		set_focused(item->data);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
cmpq $0x0, 0x50fc(%rip)      # 0xf3e8
je 0xa2f5
cmpq $0x0, -0x8(%rbp)
jne 0xa2fa
jmp 0xa3fa
movq 0x50e7(%rip), %rax      # 0xf3e8
movq %rax, -0x10(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x10(%rbp)
movb %al, -0x29(%rbp)
je 0xa322
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpq -0x8(%rbp), %rax
setne %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0xa32b
jmp 0xa339
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0xa305
cmpq $0x0, -0x10(%rbp)
jne 0xa345
jmp 0xa3fa
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq 0x5094(%rip), %rax      # 0xf3e8
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xa375
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0xa358
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xa398
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rcx
movb $0x1, %al
testb $0x1, 0x54(%rcx)
movb %al, -0x2a(%rbp)
je 0xa3c6
movq -0x28(%rbp), %rax
movl 0x58(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x58(%rcx), %eax
setne %al
movb %al, -0x2a(%rbp)
movb -0x2a(%rbp), %al
testb $0x1, %al
jne 0xa37d
cmpq $0x0, -0x10(%rbp)
je 0xa3fa
movq -0x28(%rbp), %rax
cmpq -0x8(%rbp), %rax
je 0xa3fa
movq -0x28(%rbp), %rax
movl 0x58(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x58(%rcx), %eax
jne 0xa3fa
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6a10
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/tudurom[P]windowchef/wm.c
// Function: get_window_position
static struct win_position
get_window_position(uint32_t mode, struct client *win)
{
	struct win_position pos;
	pos.x = 0;
	pos.y = 0;

	switch (mode) {
		case CENTER:
			pos.x = win->geom.x + (win->geom.width / 2);
			pos.y = win->geom.y + (win->geom.height / 2);
			break;
		case TOP_LEFT:
			pos.x = win->geom.x;
			pos.y = win->geom.y;
			break;
		case TOP_RIGHT:
			pos.x = win->geom.x + win->geom.width;
			pos.y = win->geom.y;
			break;
		case BOTTOM_RIGHT:
			pos.x = win->geom.x + win->geom.width;
			pos.y = win->geom.y + win->geom.height;
			break;
		case BOTTOM_LEFT:
			pos.x = win->geom.x;
			pos.y = win->geom.y + win->geom.height;
			break;
	}
	return pos;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movw $0x0, -0x4(%rbp)
movw $0x0, -0x2(%rbp)
movl -0x8(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x4, %rax
ja 0xa95b
movq -0x18(%rbp), %rax
leaq 0x184d(%rip), %rcx      # 0xc0c0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
movswl 0x4(%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x8(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x20(%rbp), %eax
addl %ecx, %eax
movw %ax, -0x4(%rbp)
movq -0x10(%rbp), %rax
movswl 0x6(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movzwl 0xa(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x1c(%rbp), %eax
addl %ecx, %eax
movw %ax, -0x2(%rbp)
jmp 0xa95b
movq -0x10(%rbp), %rax
movw 0x4(%rax), %ax
movw %ax, -0x4(%rbp)
movq -0x10(%rbp), %rax
movw 0x6(%rax), %ax
movw %ax, -0x2(%rbp)
jmp 0xa95b
movq -0x10(%rbp), %rax
movswl 0x4(%rax), %eax
movq -0x10(%rbp), %rcx
movzwl 0x8(%rcx), %ecx
addl %ecx, %eax
movw %ax, -0x4(%rbp)
movq -0x10(%rbp), %rax
movw 0x6(%rax), %ax
movw %ax, -0x2(%rbp)
jmp 0xa95b
movq -0x10(%rbp), %rax
movswl 0x4(%rax), %eax
movq -0x10(%rbp), %rcx
movzwl 0x8(%rcx), %ecx
addl %ecx, %eax
movw %ax, -0x4(%rbp)
movq -0x10(%rbp), %rax
movswl 0x6(%rax), %eax
movq -0x10(%rbp), %rcx
movzwl 0xa(%rcx), %ecx
addl %ecx, %eax
movw %ax, -0x2(%rbp)
jmp 0xa95b
movq -0x10(%rbp), %rax
movw 0x4(%rax), %ax
movw %ax, -0x4(%rbp)
movq -0x10(%rbp), %rax
movswl 0x6(%rax), %eax
movq -0x10(%rbp), %rcx
movzwl 0xa(%rcx), %ecx
addl %ecx, %eax
movw %ax, -0x2(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/tudurom[P]windowchef/wm.c
// Function: get_distance_between_windows
static float
get_distance_between_windows(struct client *a, struct client *b)
{
	struct win_position a_pos = get_window_position(CENTER, a);
	struct win_position b_pos = get_window_position(CENTER, b);

	float distance = hypot((float)(b_pos.x - a_pos.x), (float)(b_pos.y - a_pos.y));
	return distance;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rsi
movl $0x4, %edi
callq 0xa840
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rsi
movl $0x4, %edi
callq 0xa840
movl %eax, -0x20(%rbp)
movswl -0x20(%rbp), %eax
movswl -0x1c(%rbp), %ecx
subl %ecx, %eax
cvtsi2ss %eax, %xmm1
movswl -0x1e(%rbp), %eax
movswl -0x1a(%rbp), %ecx
subl %ecx, %eax
cvtsi2ss %eax, %xmm0
movss %xmm1, -0x4(%rbp)
movss %xmm0, -0x8(%rbp)
movss -0x4(%rbp), %xmm0
movss -0x8(%rbp), %xmm1
callq 0x3660
movss %xmm0, -0x24(%rbp)
movss -0x24(%rbp), %xmm0
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tudurom[P]windowchef/wm.c
// Function: get_angle_between_windows
static float
get_angle_between_windows(struct client *a, struct client *b)
{
	struct win_position a_pos = get_window_position(CENTER, a);
	struct win_position b_pos = get_window_position(CENTER, b);

	float dx = (float)(b_pos.x - a_pos.x);
	float dy = (float)(b_pos.y - a_pos.y);

	if (dx == 0.0 && dy == 0.0)
		return 0.0;

	return atan2(dx,dy) * (180 / PI);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq -0x18(%rbp), %rsi
movl $0x4, %edi
callq 0xa840
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rsi
movl $0x4, %edi
callq 0xa840
movl %eax, -0x28(%rbp)
movswl -0x28(%rbp), %eax
movswl -0x24(%rbp), %ecx
subl %ecx, %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x2c(%rbp)
movswl -0x26(%rbp), %eax
movswl -0x22(%rbp), %ecx
subl %ecx, %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x30(%rbp)
movss -0x2c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xaa6a
jp 0xaa6a
movss -0x30(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xaa6a
jp 0xaa6a
xorps %xmm0, %xmm0
movss %xmm0, -0xc(%rbp)
jmp 0xaaa6
movss -0x2c(%rbp), %xmm1
movss -0x30(%rbp), %xmm0
movss %xmm1, -0x4(%rbp)
movss %xmm0, -0x8(%rbp)
movss -0x4(%rbp), %xmm0
movss -0x8(%rbp), %xmm1
callq 0x3270
cvtss2sd %xmm0, %xmm0
movsd 0x169f(%rip), %xmm1     # 0xc138
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0xc(%rbp)
movss -0xc(%rbp), %xmm0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tudurom[P]windowchef/wm.c
// Function: is_in_valid_direction
static bool
is_in_valid_direction(uint32_t direction, float window_direction, float delta)
{
	switch((uint32_t)direction) {
		case NORTH:
			if (window_direction >= (180 - delta) || window_direction <= (-180 + delta))
				return true;
			break;
		case SOUTH:
			if (fabs(window_direction) <= ( 0 + delta))
				return true;
			break;
		case EAST:
			if (window_direction <= (90 + delta) && window_direction > (90 - delta))
				return true;
			break;
		case WEST:
			if (window_direction <= (-90 + delta) && window_direction >= (-90 - delta))
				return true;
			break;
	}

	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movss %xmm0, -0x10(%rbp)
movss %xmm1, -0x14(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x20(%rbp)
subq $0x3, %rax
ja 0xabcd
movq -0x20(%rbp), %rax
leaq 0x15e7(%rip), %rcx      # 0xc0d4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movss -0x10(%rbp), %xmm0
movss 0x160d(%rip), %xmm1     # 0xc110
subss -0x14(%rbp), %xmm1
ucomiss %xmm1, %xmm0
jae 0xab24
movss -0x10(%rbp), %xmm1
movss 0x15fa(%rip), %xmm0     # 0xc114
addss -0x14(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jb 0xab2d
movb $0x1, -0x5(%rbp)
jmp 0xabd1
jmp 0xabcd
movss -0x10(%rbp), %xmm0
movss %xmm0, -0x4(%rbp)
movss -0x4(%rbp), %xmm1
movaps 0x15f8(%rip), %xmm0     # 0xc140
pand %xmm0, %xmm1
xorps %xmm0, %xmm0
addss -0x14(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jb 0xab5f
movb $0x1, -0x5(%rbp)
jmp 0xabd1
jmp 0xabcd
movss -0x10(%rbp), %xmm1
movss 0x159e(%rip), %xmm0     # 0xc10c
addss -0x14(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jb 0xab95
movss -0x10(%rbp), %xmm0
movss 0x1587(%rip), %xmm1     # 0xc10c
subss -0x14(%rbp), %xmm1
ucomiss %xmm1, %xmm0
jbe 0xab95
movb $0x1, -0x5(%rbp)
jmp 0xabd1
jmp 0xabcd
movss -0x10(%rbp), %xmm1
movss 0x1564(%rip), %xmm0     # 0xc108
addss -0x14(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jb 0xabcb
movss -0x10(%rbp), %xmm0
movss 0x154d(%rip), %xmm1     # 0xc108
subss -0x14(%rbp), %xmm1
ucomiss %xmm1, %xmm0
jb 0xabcb
movb $0x1, -0x5(%rbp)
jmp 0xabd1
jmp 0xabcd
movb $0x0, -0x5(%rbp)
movb -0x5(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tudurom[P]windowchef/wm.c
// Function: is_overlapping
static bool
is_overlapping(struct client *a, struct client *b)
{
	struct win_position pos_a_top_left = get_window_position(TOP_LEFT, a);
	struct win_position pos_a_top_right = get_window_position(TOP_RIGHT, a);
	struct win_position pos_a_bot_left = get_window_position(BOTTOM_LEFT, a);

	struct win_position pos_b_top_left = get_window_position(TOP_LEFT, b);
	struct win_position pos_b_top_right = get_window_position(TOP_RIGHT, b);
	struct win_position pos_b_bot_left = get_window_position(BOTTOM_LEFT, b);

	bool is_x_top_overlapped = pos_a_top_left.x <= pos_b_top_left.x && pos_a_top_right.x >= pos_b_top_left.x;
	bool is_x_bot_overlapped = pos_a_top_left.x <= pos_b_top_right.x && pos_a_top_right.x >= pos_b_top_right.x;

	bool is_y_top_overlapped = pos_a_top_left.y <= pos_b_top_left.y && pos_a_bot_left.y >= pos_b_top_left.y;
	bool is_y_bot_overlapped = pos_a_top_left.y <= pos_b_bot_left.y && pos_a_bot_left.y >= pos_b_bot_left.y;

	return (is_x_top_overlapped || is_x_bot_overlapped) && (is_y_top_overlapped || is_y_bot_overlapped);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rsi
movl $0x2, %edi
callq 0xa840
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rsi
movl $0x3, %edi
callq 0xa840
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rsi
xorl %edi, %edi
callq 0xa840
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rsi
movl $0x2, %edi
callq 0xa840
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rsi
movl $0x3, %edi
callq 0xa840
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rsi
xorl %edi, %edi
callq 0xa840
movl %eax, -0x28(%rbp)
movswl -0x14(%rbp), %ecx
movswl -0x20(%rbp), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x2d(%rbp)
jg 0xac71
movswl -0x18(%rbp), %eax
movswl -0x20(%rbp), %ecx
cmpl %ecx, %eax
setge %al
movb %al, -0x2d(%rbp)
movb -0x2d(%rbp), %al
andb $0x1, %al
movb %al, -0x29(%rbp)
movswl -0x14(%rbp), %ecx
movswl -0x24(%rbp), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x2e(%rbp)
jg 0xac9a
movswl -0x18(%rbp), %eax
movswl -0x24(%rbp), %ecx
cmpl %ecx, %eax
setge %al
movb %al, -0x2e(%rbp)
movb -0x2e(%rbp), %al
andb $0x1, %al
movb %al, -0x2a(%rbp)
movswl -0x12(%rbp), %ecx
movswl -0x1e(%rbp), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x2f(%rbp)
jg 0xacc3
movswl -0x1a(%rbp), %eax
movswl -0x1e(%rbp), %ecx
cmpl %ecx, %eax
setge %al
movb %al, -0x2f(%rbp)
movb -0x2f(%rbp), %al
andb $0x1, %al
movb %al, -0x2b(%rbp)
movswl -0x12(%rbp), %ecx
movswl -0x26(%rbp), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x30(%rbp)
jg 0xacec
movswl -0x1a(%rbp), %eax
movswl -0x26(%rbp), %ecx
cmpl %ecx, %eax
setge %al
movb %al, -0x30(%rbp)
movb -0x30(%rbp), %al
andb $0x1, %al
movb %al, -0x2c(%rbp)
testb $0x1, -0x29(%rbp)
jne 0xad05
xorl %eax, %eax
testb $0x1, -0x2a(%rbp)
movb %al, -0x31(%rbp)
je 0xad1c
movb $0x1, %al
testb $0x1, -0x2b(%rbp)
movb %al, -0x32(%rbp)
jne 0xad16
movb -0x2c(%rbp), %al
movb %al, -0x32(%rbp)
movb -0x32(%rbp), %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tudurom[P]windowchef/wm.c
// Function: is_in_cardinal_direction
static bool
is_in_cardinal_direction(uint32_t direction, struct client *a, struct client *b)
{
	struct win_position pos_a_top_left = get_window_position(TOP_LEFT, a);
	struct win_position pos_a_top_right = get_window_position(TOP_RIGHT, a);
	struct win_position pos_a_bot_left = get_window_position(BOTTOM_LEFT, a);

	struct win_position pos_b_center = get_window_position(CENTER, b);

	switch(direction) {
		case NORTH:
		case SOUTH:
			return pos_a_top_left.x <= pos_b_center.x && pos_a_top_right.x >= pos_b_center.x;

		case WEST:
		case EAST:
			return pos_a_top_left.y <= pos_b_center.y && pos_a_bot_left.y >= pos_b_center.y;
	}

	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rsi
movl $0x2, %edi
callq 0xa840
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rsi
movl $0x3, %edi
callq 0xa840
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rsi
xorl %edi, %edi
callq 0xa840
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rsi
movl $0x4, %edi
callq 0xa840
movl %eax, -0x28(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x2c(%rbp)
subl $0x2, %eax
jb 0xad9e
jmp 0xad91
movl -0x2c(%rbp), %eax
addl $-0x2, %eax
subl $0x2, %eax
jb 0xadc9
jmp 0xadf4
movswl -0x1c(%rbp), %ecx
movswl -0x28(%rbp), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x2d(%rbp)
jg 0xadbf
movswl -0x20(%rbp), %eax
movswl -0x28(%rbp), %ecx
cmpl %ecx, %eax
setge %al
movb %al, -0x2d(%rbp)
movb -0x2d(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0xadf8
movswl -0x1a(%rbp), %ecx
movswl -0x26(%rbp), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x2e(%rbp)
jg 0xadea
movswl -0x22(%rbp), %eax
movswl -0x26(%rbp), %ecx
cmpl %ecx, %eax
setge %al
movb %al, -0x2e(%rbp)
movb -0x2e(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0xadf8
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tudurom[P]windowchef/wm.c
// Function: group_remove_window
static void
group_remove_window(struct client *client)
{
	if (client != NULL) {
		client->group = NULL_GROUP;
		update_wm_desktop(client);
		update_group_list();
		update_current_desktop(client);
		update_window_status(client);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xae4e
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x58(%rax) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rdi
callq 0x7340
callq 0x6850
movq -0x8(%rbp), %rdi
callq 0x7210
movq -0x8(%rbp), %rdi
callq 0x5b70
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tudurom[P]windowchef/wm.c
// Function: group_remove_all_windows
static void
group_remove_all_windows(uint32_t group)
{
	if (group >= conf.groups)
		return;

	struct list_item *item;
	struct client *client;

	for (item = win_list; item != NULL; item = item->next) {
		client = item->data;
		if (client != NULL && client->group == group) {
			group_remove_window(client);
		}
	}

	group_in_use[group] = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0x4968(%rip), %eax      # 0xf7dc
jb 0xae78
jmp 0xaecf
movq 0x4569(%rip), %rax      # 0xf3e8
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xaec1
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xaeb1
movq -0x18(%rbp), %rax
movl 0x58(%rax), %eax
cmpl -0x4(%rbp), %eax
jne 0xaeb1
movq -0x18(%rbp), %rdi
callq 0xae10
jmp 0xaeb3
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0xae83
movq 0x4958(%rip), %rax      # 0xf820
movl -0x4(%rbp), %ecx
movb $0x0, (%rax,%rcx)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tudurom[P]windowchef/wm.c
// Function: group_activate
static void
group_activate(uint32_t group) {
	if (group >= conf.groups)
		return;

	struct list_item *item;
	struct client *client;

	for (item = win_list; item != NULL; item = item->next) {
		client = item->data;
		if (client->group == group) {
			xcb_map_window(conn, client->window);
			set_focused(client);
		}
	}
	group_in_use[group] = true;
	last_group = group;
	update_group_list();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0x48e8(%rip), %eax      # 0xf7dc
jb 0xaef8
jmp 0xaf6b
movq 0x44e9(%rip), %rax      # 0xf3e8
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xaf4f
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl 0x58(%rax), %eax
cmpl -0x4(%rbp), %eax
jne 0xaf3f
movq 0x44b0(%rip), %rdi      # 0xf3d8
movq -0x18(%rbp), %rax
movl (%rax), %esi
callq 0x3280
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x6a10
jmp 0xaf41
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0xaf03
movq 0x48ca(%rip), %rax      # 0xf820
movl -0x4(%rbp), %ecx
movb $0x1, (%rax,%rcx)
movl -0x4(%rbp), %eax
movl %eax, 0x48c2(%rip)      # 0xf828
callq 0x6850
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tudurom[P]windowchef/wm.c
// Function: group_deactivate
static void
group_deactivate(uint32_t group)
{
	if (group >= conf.groups)
		return;

	struct list_item *item;
	struct client *client;

	for (item = win_list; item != NULL; item = item->next) {
		client = item->data;
		if (client->group == group)
			xcb_unmap_window(conn, client->window);
	}
	group_in_use[group] = false;
	update_group_list();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0x4848(%rip), %eax      # 0xf7dc
jb 0xaf98
jmp 0xaff9
movq 0x4449(%rip), %rax      # 0xf3e8
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xafe6
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl 0x58(%rax), %eax
cmpl -0x4(%rbp), %eax
jne 0xafd6
movq 0x4410(%rip), %rdi      # 0xf3d8
movq -0x18(%rbp), %rax
movl (%rax), %esi
callq 0x3600
movl %eax, -0x1c(%rbp)
jmp 0xafd8
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0xafa3
movq 0x4833(%rip), %rax      # 0xf820
movl -0x4(%rbp), %ecx
movb $0x0, (%rax,%rcx)
callq 0x6850
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/tudurom[P]windowchef/wm.c
// Function: group_toggle
static void
group_toggle(uint32_t group)
{
	if (group >= conf.groups)
		return;

	if (group_in_use[group])
		group_deactivate(group);
	else
		group_activate(group);
	last_group = group;
	update_group_list();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0x47c8(%rip), %eax      # 0xf7dc
jb 0xb018
jmp 0xb048
movq 0x4801(%rip), %rax      # 0xf820
movl -0x4(%rbp), %ecx
testb $0x1, (%rax,%rcx)
je 0xb032
movl -0x4(%rbp), %edi
callq 0xaf80
jmp 0xb03a
movl -0x4(%rbp), %edi
callq 0xaee0
movl -0x4(%rbp), %eax
movl %eax, 0x47e5(%rip)      # 0xf828
callq 0x6850
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/tudurom[P]windowchef/wm.c
// Function: group_activate_specific
static void
group_activate_specific(uint32_t group)
{
	if (group >= conf.groups)
		return;

	for (unsigned int i = 0; i < conf.groups; i++) {
		if (i == group)
			group_activate(i);
		else
			group_deactivate(i);
	}
	update_group_list();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0x4778(%rip), %eax      # 0xf7dc
jb 0xb068
jmp 0xb0a6
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl 0x4764(%rip), %eax      # 0xf7dc
jae 0xb0a1
movl -0x8(%rbp), %eax
cmpl -0x4(%rbp), %eax
jne 0xb08c
movl -0x8(%rbp), %edi
callq 0xaee0
jmp 0xb094
movl -0x8(%rbp), %edi
callq 0xaf80
jmp 0xb096
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0xb06f
callq 0x6850
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/tudurom[P]windowchef/wm.c
// Function: change_nr_of_groups
static void
change_nr_of_groups(uint32_t groups)
{
	bool *copy = malloc(groups * sizeof(bool));
	uint32_t until = groups < conf.groups ? groups : conf.groups;
	struct list_item *item;
	struct client *client;

	for (uint32_t i = 0; i < until; i++)
		copy[i] = group_in_use[i];

	if (groups < conf.groups)
		for (item = win_list; item != NULL; item = item->next) {
			client = item->data;
			if (client->group != NULL_GROUP && client->group >= groups) {
				group_activate(client->group);
				client->group = NULL_GROUP;
				update_wm_desktop(client);
			}
		}

	conf.groups = groups;
	free(group_in_use);
	group_in_use = copy;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, %edi
shlq $0x0, %rdi
callq 0x31b0
movq %rax, -0x10(%rbp)
movl -0x4(%rbp), %eax
cmpl 0x4706(%rip), %eax      # 0xf7dc
jae 0xb0e0
movl -0x4(%rbp), %eax
movl %eax, -0x30(%rbp)
jmp 0xb0e9
movl 0x46f6(%rip), %eax      # 0xf7dc
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x14(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0xb123
movq 0x471b(%rip), %rax      # 0xf820
movl -0x2c(%rbp), %ecx
movb (%rax,%rcx), %dl
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
andb $0x1, %dl
movb %dl, (%rax,%rcx)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xb0f6
movl -0x4(%rbp), %eax
cmpl 0x46b0(%rip), %eax      # 0xf7dc
jae 0xb193
movq 0x42b3(%rip), %rax      # 0xf3e8
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xb191
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpl $-0x1, 0x58(%rax)
je 0xb181
movq -0x28(%rbp), %rax
movl 0x58(%rax), %eax
cmpl -0x4(%rbp), %eax
jb 0xb181
movq -0x28(%rbp), %rax
movl 0x58(%rax), %edi
callq 0xaee0
movq -0x28(%rbp), %rax
movl $0xffffffff, 0x58(%rax) # imm = 0xFFFFFFFF
movq -0x28(%rbp), %rdi
callq 0x7340
jmp 0xb183
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0xb139
jmp 0xb193
movl -0x4(%rbp), %eax
movl %eax, 0x4640(%rip)      # 0xf7dc
movq 0x467d(%rip), %rdi      # 0xf820
callq 0x32d0
movq -0x10(%rbp), %rax
movq %rax, 0x466d(%rip)      # 0xf820
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/tudurom[P]windowchef/wm.c
// Function: grab_buttons
static void
grab_buttons(void)
{
	struct list_item *item;
	struct client *client;

	for (item = win_list; item != NULL; item = item->next) {
		client = item->data;
		window_grab_buttons(client->window);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0x4219(%rip), %rax      # 0xf3e8
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xb1fe
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %edi
callq 0x6240
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xb1d3
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tudurom[P]windowchef/wm.c
// Function: pointer_init
static void
pointer_init(void)
{
	num_lock = pointer_modfield_from_keysym(XK_Num_Lock);
	caps_lock = pointer_modfield_from_keysym(XK_Caps_Lock);
	scroll_lock = pointer_modfield_from_keysym(XK_Scroll_Lock);

	if (caps_lock == XCB_NO_SYMBOL)
		caps_lock = XCB_MOD_MASK_LOCK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0xff7f, %edi           # imm = 0xFF7F
callq 0xb380
movw %ax, 0x45a3(%rip)       # 0xf808
movl $0xffe5, %edi           # imm = 0xFFE5
callq 0xb380
movw %ax, 0x4594(%rip)       # 0xf80a
movl $0xff14, %edi           # imm = 0xFF14
callq 0xb380
movw %ax, 0x4585(%rip)       # 0xf80c
movzwl 0x457c(%rip), %eax      # 0xf80a
cmpq $0x0, %rax
jne 0xb29d
movw $0x2, 0x456d(%rip)      # 0xf80a
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/tudurom[P]windowchef/wm.c
// Function: get_atom
static xcb_atom_t
get_atom(char *name)
{
	xcb_intern_atom_cookie_t cookie = xcb_intern_atom(conn, false, strlen(name), name);
	xcb_intern_atom_reply_t *reply = xcb_intern_atom_reply(conn, cookie, NULL);

	if (!reply)
		return XCB_ATOM_STRING;

	return reply->atom;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq 0x4125(%rip), %rax      # 0xf3d8
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x32e0
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rcx
xorl %esi, %esi
movzwl %ax, %edx
callq 0x3140
movl %eax, -0x14(%rbp)
movq 0x40fc(%rip), %rdi      # 0xf3d8
movl -0x14(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x3410
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xb2fc
movl $0x1f, -0x4(%rbp)
jmp 0xb306
movq -0x20(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/tudurom[P]windowchef/wm.c
// Function: setup_randr
static int
setup_randr(void)
{
	int base;
	const xcb_query_extension_reply_t *r = xcb_get_extension_data(conn, &xcb_randr_id);

	if (!r->present)
		return -1;
	else
		get_randr();

	base = r->first_event;
	xcb_randr_select_input(conn, scr->root,
			XCB_RANDR_NOTIFY_MASK_SCREEN_CHANGE
			| XCB_RANDR_NOTIFY_MASK_OUTPUT_CHANGE
			| XCB_RANDR_NOTIFY_MASK_CRTC_CHANGE
			| XCB_RANDR_NOTIFY_MASK_OUTPUT_PROPERTY);

	return base;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq 0x40b9(%rip), %rdi      # 0xf3d8
movq 0x3cb2(%rip), %rsi      # 0xefd8
callq 0x31c0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x8(%rax)
jne 0xb342
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xb375
callq 0x7790
movq -0x10(%rbp), %rax
movzbl 0xa(%rax), %eax
movl %eax, -0x8(%rbp)
movq 0x407f(%rip), %rdi      # 0xf3d8
movq 0x4498(%rip), %rax      # 0xf7f8
movl (%rax), %esi
movl $0xf, %edx
callq 0x3180
movl %eax, -0x14(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/tudurom[P]windowchef/helpers.c
// Function: asprintf
int
asprintf(char **buf, const char *fmt, ...)
{
	int size = 0;
	va_list args;
	va_start(args, fmt);
	size = vasprintf(buf, fmt, args);
	va_end(args);
	return size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
testb %al, %al
je 0xb578
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
movq %r9, -0xb8(%rbp)
movq %r8, -0xc0(%rbp)
movq %rcx, -0xc8(%rbp)
movq %rdx, -0xd0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
leaq -0xe0(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x30, -0x2c(%rbp)
movl $0x10, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0xb5f0
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addq $0xe0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tudurom[P]windowchef/helpers.c
// Function: vasprintf
int
vasprintf(char **buf, const char *fmt, va_list args)
{
	va_list tmp;
	va_copy(tmp, args);
	int size = vsnprintf(NULL, 0, fmt, tmp);
	va_end(tmp);

	if (size < 0) {
		return -1;
	}

	*buf = malloc(size + 1);

	if (*buf == NULL) {
		return -1;
	}

	size = vsprintf(*buf, fmt, args);
	return size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
leaq -0x40(%rbp), %rax
movq -0x20(%rbp), %rcx
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movups (%rcx), %xmm0
movups %xmm0, (%rax)
movq -0x18(%rbp), %rdx
leaq -0x40(%rbp), %rcx
xorl %eax, %eax
movl %eax, %esi
movq %rsi, %rdi
callq 0x3490
movl %eax, -0x44(%rbp)
leaq -0x40(%rbp), %rax
cmpl $0x0, -0x44(%rbp)
jge 0xb644
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xb68c
movl -0x44(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
callq 0x31b0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0xb66f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xb68c
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x32f0
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)