LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/tudurom[P]windowchef/wm.c
// Function: event_client_message
static void
event_client_message(xcb_generic_event_t *ev)
{
	xcb_client_message_event_t *e = (xcb_client_message_event_t *)ev;
	uint32_t ipc_command;
	uint32_t *data;
	struct client *client;

	if (e->type == ATOMS[_IPC_ATOM_COMMAND] && e->format == 32) {
		/* Message from the client */
		data = e->data.data32;
		ipc_command = data[0];
		if (ipc_handlers[ipc_command] != NULL)
			(ipc_handlers[ipc_command])(data + 1);
		DMSG("IPC Command %u with arguments %u %u %u\n", ipc_command, data[1], data[2], data[3]);
	} else {
		client = find_client(&e->window);
		if (client == NULL)
			return;
		if (e->type == ewmh->_NET_WM_STATE) {
			DMSG("got _NET_WM_STATE for 0x%08x\n", client->window);
			handle_wm_state(client, e->data.data32[1], e->data.data32[0]);
			handle_wm_state(client, e->data.data32[2], e->data.data32[0]);
		} else if (e->type == ewmh->_NET_ACTIVE_WINDOW) {
			DMSG("got _NET_ACTIVE_WINDOW for 0x%08x\n", client->window);
			set_focused(client);
		}
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x8(%rdi), %eax
cmpl 0x7ed1(%rip), %eax      # 0xc7f8
jne 0x4956
cmpb $0x20, 0x1(%rbx)
jne 0x4956
movl 0xc(%rbx), %eax
leaq 0x7ee7(%rip), %rcx      # 0xc820
movq (%rcx,%rax,8), %rax
testq %rax, %rax
je 0x49dc
addq $0x10, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
movq 0x7a6b(%rip), %rcx      # 0xc3c8
testq %rcx, %rcx
je 0x4976
movl 0x4(%rbx), %edx
movq (%rcx), %r14
cmpl %edx, (%r14)
je 0x4979
movq 0x10(%rcx), %rcx
testq %rcx, %rcx
jne 0x4965
xorl %r14d, %r14d
testq %r14, %r14
je 0x49dc
movq 0x7a3b(%rip), %rcx      # 0xc3c0
cmpl 0x84(%rcx), %eax
jne 0x49b0
movl 0xc(%rbx), %edx
movl 0x10(%rbx), %esi
movq %r14, %rdi
callq 0x5e0f
movl 0xc(%rbx), %edx
movl 0x14(%rbx), %esi
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5e0f
cmpl 0x40(%rcx), %eax
jne 0x49dc
movq %r14, %rdi
callq 0x5045
movl (%r14), %esi
leaq 0x4(%rsp), %rcx
movl $0x0, (%rcx)
movq 0x79e6(%rip), %rdi      # 0xc3b8
movl $0x40, %edx
callq 0x3200
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/tudurom[P]windowchef/wm.c
// Function: event_configure_notify
static void
event_configure_notify(xcb_generic_event_t *ev)
{
	xcb_configure_notify_event_t *e = (xcb_configure_notify_event_t *)ev;
	struct client *client;
	struct list_item *item;

	/* The root window changes its geometry when the
	 * user adds/removes/tilts screens */
	if (e->window == scr->root) {
		if (e->width != scr->width_in_pixels
				|| e->height != scr->height_in_pixels) {
			scr->width_in_pixels = e->width;
			scr->height_in_pixels = e->height;

			if (randr_base != -1) {
				get_randr();
				for (item = win_list; item != NULL; item = item->next) {
					client = item->data;
					fit_on_screen(client);
				}
			}
		}
	} else {
		client = find_client(&e->window);
		if (client != NULL) {
			client->monitor = find_monitor_by_coord(client->geom.x, client->geom.y);
			update_current_desktop(client);
		}
	}
}

// Assembly:
pushq %rbx
movl 0x8(%rdi), %eax
movq 0x7de9(%rip), %rcx      # 0xc7d8
cmpl (%rcx), %eax
jne 0x4a3b
movzwl 0x14(%rdi), %eax
cmpw 0x14(%rcx), %ax
jne 0x4a07
movzwl 0x16(%rdi), %edx
cmpw 0x16(%rcx), %dx
je 0x4a7e
movw %ax, 0x14(%rcx)
movzwl 0x16(%rdi), %eax
movw %ax, 0x16(%rcx)
cmpl $-0x1, 0x7df2(%rip)     # 0xc80c
je 0x4a7e
callq 0x60ed
movq 0x79a0(%rip), %rbx      # 0xc3c8
testq %rbx, %rbx
je 0x4a7e
movq (%rbx), %rdi
callq 0x4bf6
movq 0x10(%rbx), %rbx
jmp 0x4a28
movq 0x7986(%rip), %rcx      # 0xc3c8
testq %rcx, %rcx
je 0x4a54
movq (%rcx), %rbx
cmpl %eax, (%rbx)
je 0x4a56
movq 0x10(%rcx), %rcx
jmp 0x4a42
xorl %ebx, %ebx
testq %rbx, %rbx
je 0x4a7e
movswl 0x4(%rbx), %edi
movswl 0x6(%rbx), %esi
callq 0x5c65
movq %rax, 0x40(%rbx)
movq 0x794d(%rip), %rdi      # 0xc3c0
movl 0x58(%rbx), %edx
xorl %esi, %esi
popq %rbx
jmp 0x35c0
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/tudurom[P]windowchef/wm.c
// Function: event_focus_out
static void
event_focus_out(xcb_generic_event_t *ev)
{
	(void)(ev);
	xcb_get_input_focus_reply_t *focus = xcb_get_input_focus_reply(conn,
			xcb_get_input_focus(conn), NULL);
	struct client *client = NULL;

	if (focused_win != NULL && focus->focus == focused_win->window)
		return;

	if (focus->focus == scr->root) {
		focused_win = NULL;
	} else {
		client = find_client(&focus->focus);
		if (client != NULL)
			set_focused_no_raise(client);
	}
}

// Assembly:
pushq %rbx
movq 0x78e1(%rip), %rbx      # 0xc3b8
movq %rbx, %rdi
callq 0x3610
movq %rbx, %rdi
movl %eax, %esi
xorl %edx, %edx
callq 0x36f0
movq 0x7cee(%rip), %rcx      # 0xc7e0
testq %rcx, %rcx
je 0x4afe
movl 0x8(%rax), %edx
cmpl (%rcx), %edx
je 0x4b3f
movl 0x8(%rax), %eax
movq 0x7cd0(%rip), %rcx      # 0xc7d8
cmpl (%rcx), %eax
jne 0x4b19
movq $0x0, 0x7cc9(%rip) # 0xc7e0
jmp 0x4b3f
movq 0x78a8(%rip), %rcx      # 0xc3c8
testq %rcx, %rcx
je 0x4b32
movq (%rcx), %rdi
cmpl %eax, (%rdi)
je 0x4b34
movq 0x10(%rcx), %rcx
jmp 0x4b20
xorl %edi, %edi
testq %rdi, %rdi
je 0x4b3f
popq %rbx
jmp 0x5045
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/tudurom[P]windowchef/wm.c
// Function: event_button_press
static void
event_button_press(xcb_generic_event_t *ev)
{
	xcb_button_press_event_t *e = (xcb_button_press_event_t *)ev;
	bool replay = false;

	for (int i = 0; i < NR_BUTTONS; i++) {
		if (e->detail != mouse_buttons[i])
			continue;
		if ((conf.click_to_focus == (int8_t) XCB_BUTTON_INDEX_ANY ||
			 conf.click_to_focus == (int8_t) mouse_buttons[i]) &&
			(e->state & ~(num_lock | scroll_lock | caps_lock)) == XCB_NONE) {

			replay = !pointer_grab(POINTER_ACTION_FOCUS);
		} else {
			pointer_grab(conf.pointer_actions[i]);
		}
	}
	xcb_allow_events(conn, replay ? XCB_ALLOW_REPLAY_POINTER : XCB_ALLOW_SYNC_POINTER, e->time);
	xcb_flush(conn);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
xorl %r15d, %r15d
leaq 0x4579(%rip), %r12      # 0x90d0
leaq 0x7c42(%rip), %r13      # 0xc7a0
xorl %r14d, %r14d
movzbl 0x1(%rbx), %ecx
movl (%r15,%r12), %eax
cmpl %ecx, %eax
jne 0x4bbf
movsbl 0x7c62(%rip), %ecx      # 0xc7d6
testl %ecx, %ecx
je 0x4b7f
movsbl %al, %eax
cmpl %ecx, %eax
jne 0x4ba2
movzwl 0x1c(%rbx), %eax
movzwl 0x7c62(%rip), %ecx      # 0xc7ec
movzwl 0x7c57(%rip), %edx      # 0xc7e8
orl %ecx, %edx
movzwl 0x7c50(%rip), %ecx      # 0xc7ea
orl %edx, %ecx
notl %ecx
testl %eax, %ecx
je 0x4bae
movl 0x28(%r15,%r13), %edi
callq 0x6463
jmp 0x4bbf
movl $0x1, %edi
callq 0x6463
movl %eax, %r14d
xorb $0x1, %r14b
addq $0x4, %r15
cmpq $0xc, %r15
jne 0x4b61
movq 0x77e8(%rip), %rdi      # 0xc3b8
movl 0x4(%rbx), %edx
movzbl %r14b, %esi
andl $0x1, %esi
incl %esi
callq 0x30e0
movq 0x77d0(%rip), %rdi      # 0xc3b8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x3400
// File: /workspace/github_c_makefile_star2_O1/tudurom[P]windowchef/wm.c
// Function: teleport_window
static void
teleport_window(xcb_window_t win, int16_t x, int16_t y)
{
	uint32_t values[2] = {x, y};

	if (win == scr->root || win == 0)
		return;

	xcb_configure_window(conn, win, XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y, values);
	update_window_status(find_client(&win));

	xcb_flush(conn);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl %esi, 0x8(%rsp)
movl %edx, 0xc(%rsp)
testl %edi, %edi
je 0x4e73
movl %edi, %ebx
movq 0x79ad(%rip), %rax      # 0xc7d8
cmpl %edi, (%rax)
je 0x4e73
movq 0x7582(%rip), %rdi      # 0xc3b8
leaq 0x8(%rsp), %rcx
movl %ebx, %esi
movl $0x3, %edx
callq 0x3200
movq 0x757a(%rip), %rax      # 0xc3c8
testq %rax, %rax
je 0x4e60
movq (%rax), %rdi
cmpl %ebx, (%rdi)
je 0x4e62
movq 0x10(%rax), %rax
jmp 0x4e4e
xorl %edi, %edi
callq 0x51c7
movq 0x754a(%rip), %rdi      # 0xc3b8
callq 0x3400
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/tudurom[P]windowchef/wm.c
// Function: resize_window_absolute
static void
resize_window_absolute(xcb_window_t win, uint16_t w, uint16_t h)
{
	uint32_t val[2];
	uint32_t mask = XCB_CONFIG_WINDOW_WIDTH
				  | XCB_CONFIG_WINDOW_HEIGHT;

	val[0] = w;
	val[1] = h;

	xcb_configure_window(conn, win, mask, val);
	update_window_status(find_client(&win));
	refresh_borders();
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
leaq 0x8(%rsp), %rcx
movl %esi, (%rcx)
movl %edx, 0x4(%rcx)
movq 0x7527(%rip), %rdi      # 0xc3b8
movl %ebx, %esi
movl $0xc, %edx
callq 0x3200
movq 0x7524(%rip), %rax      # 0xc3c8
testq %rax, %rax
je 0x4eb6
movq (%rax), %rdi
cmpl %ebx, (%rdi)
je 0x4eb8
movq 0x10(%rax), %rax
jmp 0x4ea4
xorl %edi, %edi
callq 0x51c7
callq 0x58d7
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/tudurom[P]windowchef/wm.c
// Function: maximize_window
static void
maximize_window(struct client *client, int16_t mon_x, int16_t mon_y, uint16_t mon_width, uint16_t mon_height)
{
	uint32_t values[1];
	if (client == NULL)
		return;

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

	client->maxed = true;

	/* maximized windows don't have borders */
	values[0] = 0;
	if (client->geom.width != mon_width || client->geom.height != mon_height)
		client->orig_geom = client->geom;
	xcb_configure_window(conn, client->window, XCB_CONFIG_WINDOW_BORDER_WIDTH,
			values);

	client->geom.x = mon_x;
	client->geom.y = mon_y;
	client->geom.width = mon_width;
	client->geom.height = mon_height;

	teleport_window(client->window, client->geom.x, client->geom.y);
	resize_window_absolute(client->window, client->geom.width, client->geom.height);
	set_focused_no_raise(client);

	update_ewmh_wm_state(client);
	update_window_status(client);
}

// Assembly:
testq %rdi, %rdi
je 0x4faa
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %r8d, %r15d
movl %ecx, %r12d
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
cmpb $0x0, 0x24(%rdi)
jne 0x4f09
cmpb $0x0, 0x26(%rbx)
jne 0x4f09
cmpb $0x0, 0x25(%rbx)
jne 0x4f09
cmpb $0x0, 0x27(%rbx)
jne 0x4f09
cmpb $0x1, 0x28(%rbx)
jne 0x4f11
movq %rbx, %rdi
callq 0x4fab
movb $0x1, 0x24(%rbx)
movl $0x0, 0xc(%rsp)
cmpw %r12w, 0x8(%rbx)
jne 0x4f2b
cmpw %r15w, 0xa(%rbx)
je 0x4f3e
leaq 0x4(%rbx), %rax
movzwl 0x8(%rax), %ecx
movw %cx, 0x16(%rbx)
movq (%rax), %rax
movq %rax, 0xe(%rbx)
movq 0x7473(%rip), %rdi      # 0xc3b8
movl (%rbx), %esi
leaq 0xc(%rsp), %rcx
movl $0x10, %edx
callq 0x3200
movw %r14w, 0x4(%rbx)
movw %bp, 0x6(%rbx)
movw %r12w, 0x8(%rbx)
movw %r15w, 0xa(%rbx)
movl (%rbx), %edi
movswl %r14w, %esi
movswl %bp, %edx
callq 0x4e11
movl (%rbx), %edi
movzwl 0x8(%rbx), %esi
movzwl 0xa(%rbx), %edx
callq 0x4e79
movq %rbx, %rdi
callq 0x5045
movq %rbx, %rdi
callq 0x5159
movq %rbx, %rdi
callq 0x51c7
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/tudurom[P]windowchef/wm.c
// Function: reset_window
static void
reset_window(struct client *client)
{
	xcb_atom_t state[] = {
		XCB_ICCCM_WM_STATE_NORMAL,
		XCB_NONE
	};
	client->geom.x = client->orig_geom.x;
	client->geom.y = client->orig_geom.y;
	client->geom.width = client->orig_geom.width;
	client->geom.height = client->orig_geom.height;
	client->maxed = client->hmaxed
		= client->vmaxed = client->monocled = client->gridded = false;

	teleport_window(client->window, client->geom.x, client->geom.y);
	resize_window_absolute(client->window, client->geom.width, client->geom.height);
	set_borders(client, conf.unfocus_color, conf.internal_unfocus_color);

	xcb_change_property(conn, XCB_PROP_MODE_REPLACE, client->window,
			ewmh->_NET_WM_STATE, ewmh->_NET_WM_STATE, 32, 2, state);
	update_window_status(client);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsp, %r14
movq $0x1, (%r14)
movswl 0xe(%rdi), %esi
movw %si, 0x4(%rdi)
movswl 0x10(%rdi), %edx
movw %dx, 0x6(%rdi)
movl (%rdi), %edi
movl 0x12(%rbx), %eax
movl %eax, 0x8(%rbx)
movl $0x0, 0x24(%rbx)
movb $0x0, 0x28(%rbx)
callq 0x4e11
movl (%rbx), %edi
movzwl 0x8(%rbx), %esi
movzwl 0xa(%rbx), %edx
callq 0x4e79
movl 0x77b3(%rip), %esi      # 0xc7ac
movl 0x77b5(%rip), %edx      # 0xc7b4
movq %rbx, %rdi
callq 0x532f
movq 0x73aa(%rip), %rdi      # 0xc3b8
movl (%rbx), %edx
movq 0x73a9(%rip), %rax      # 0xc3c0
movl 0x84(%rax), %ecx
xorl %esi, %esi
movl %ecx, %r8d
movl $0x20, %r9d
pushq %r14
pushq $0x2
callq 0x35b0
addq $0x10, %rsp
movq %rbx, %rdi
callq 0x51c7
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/tudurom[P]windowchef/wm.c
// Function: set_focused_no_raise
static void
set_focused_no_raise(struct client *client)
{
	long data[] = {
		XCB_ICCCM_WM_STATE_NORMAL,
		XCB_NONE,
	};
	if (client == NULL)
		return;

	/* show window if hidden */
	xcb_map_window(conn, client->window);

	if (!client->maxed)
		set_borders(client, conf.focus_color, conf.internal_focus_color);

	/* focus the window */
	xcb_set_input_focus(conn, XCB_INPUT_FOCUS_POINTER_ROOT,
			client->window, XCB_CURRENT_TIME);

	/* set ewmh property */
	xcb_change_property(conn, XCB_PROP_MODE_REPLACE, scr->root,
			ewmh->_NET_ACTIVE_WINDOW, XCB_ATOM_WINDOW, 32, 1, &client->window);

	/* set window state */
	xcb_change_property(conn, XCB_PROP_MODE_REPLACE, client->window,
						ewmh->_NET_WM_STATE, ewmh->_NET_WM_STATE, 32, 2, data);

	/* set the focus state to inactive on the previously focused window */
	if (client != focused_win) {
		if (focused_win != NULL && !focused_win->maxed)
			set_borders(focused_win, conf.unfocus_color, conf.internal_unfocus_color);
	}

	if (client->focus_item != NULL)
		list_move_to_head(&focus_list, client->focus_item);

	focused_win = client;

	window_grab_buttons(focused_win->window);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movaps 0x40ef(%rip), %xmm0     # 0x9140
movaps %xmm0, (%rsp)
testq %rdi, %rdi
je 0x5153
movq %rdi, %rbx
movq 0x7350(%rip), %rdi      # 0xc3b8
movl (%rbx), %esi
callq 0x3280
cmpb $0x0, 0x24(%rbx)
jne 0x5089
movl 0x772d(%rip), %esi      # 0xc7a8
movl 0x772f(%rip), %edx      # 0xc7b0
movq %rbx, %rdi
callq 0x532f
movq 0x7328(%rip), %rdi      # 0xc3b8
movl (%rbx), %edx
movl $0x1, %esi
xorl %ecx, %ecx
callq 0x3160
movq 0x7313(%rip), %rdi      # 0xc3b8
movq 0x772c(%rip), %rax      # 0xc7d8
movl (%rax), %edx
movq 0x730b(%rip), %rax      # 0xc3c0
movl 0x40(%rax), %ecx
xorl %esi, %esi
movl $0x21, %r8d
movl $0x20, %r9d
pushq %rbx
pushq $0x1
callq 0x35b0
addq $0x10, %rsp
movq 0x72df(%rip), %rdi      # 0xc3b8
movl (%rbx), %edx
movq 0x72de(%rip), %rax      # 0xc3c0
movl 0x84(%rax), %ecx
movq %rsp, %rax
xorl %esi, %esi
movl %ecx, %r8d
movl $0x20, %r9d
pushq %rax
pushq $0x2
callq 0x35b0
addq $0x10, %rsp
movq 0x76d7(%rip), %rdi      # 0xc7e0
cmpq %rbx, %rdi
sete %al
testq %rdi, %rdi
sete %cl
orb %al, %cl
jne 0x5130
cmpb $0x0, 0x24(%rdi)
jne 0x5130
movl 0x7687(%rip), %esi      # 0xc7ac
movl 0x7689(%rip), %edx      # 0xc7b4
callq 0x532f
movq 0x38(%rbx), %rsi
testq %rsi, %rsi
je 0x5145
leaq 0x7290(%rip), %rdi      # 0xc3d0
callq 0x8580
movq %rbx, 0x7694(%rip)      # 0xc7e0
movl (%rbx), %edi
callq 0x55f0
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/tudurom[P]windowchef/wm.c
// Function: update_ewmh_wm_state
static void
update_ewmh_wm_state(struct client *client)
{
	int i;
	uint32_t values[12];

	if (client == NULL)
		return;
#define HANDLE_WM_STATE(s) \
	values[i] = ewmh->_NET_WM_STATE_##s; \
	i++; \
	DMSG("ewmh net_wm_state %s present\n", #s);

	i = 0;
	if (client->maxed) {
		HANDLE_WM_STATE(FULLSCREEN);
	}
	if (client->vmaxed) {
		HANDLE_WM_STATE(MAXIMIZED_VERT);
	}
	if (client->hmaxed) {
		HANDLE_WM_STATE(MAXIMIZED_HORZ);
	}

	xcb_ewmh_set_wm_state(ewmh, client->window, i, values);
}

// Assembly:
subq $0x38, %rsp
xorl %edx, %edx
cmpb $0x1, 0x24(%rdi)
jne 0x517a
movq 0x7254(%rip), %rax      # 0xc3c0
movl 0x128(%rax), %eax
movl %eax, (%rsp)
movl $0x1, %edx
cmpb $0x1, 0x26(%rdi)
jne 0x5194
movq 0x7239(%rip), %rax      # 0xc3c0
movl 0x110(%rax), %eax
movl %edx, %ecx
movl %eax, (%rsp,%rcx,4)
incl %edx
cmpb $0x1, 0x25(%rdi)
jne 0x51ae
movq 0x721f(%rip), %rax      # 0xc3c0
movl 0x114(%rax), %eax
movl %edx, %ecx
movl %eax, (%rsp,%rcx,4)
incl %edx
movq 0x720b(%rip), %rax      # 0xc3c0
movl (%rdi), %esi
movq %rsp, %rcx
movq %rax, %rdi
callq 0x3560
addq $0x38, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/tudurom[P]windowchef/wm.c
// Function: window_grab_buttons
static void
window_grab_buttons(xcb_window_t win)
{
	for (int i = 0; i < NR_BUTTONS; i++) {
		if (conf.click_to_focus == (int8_t) XCB_BUTTON_INDEX_ANY ||
			conf.click_to_focus == (int8_t) mouse_buttons[i])
			window_grab_button(win, mouse_buttons[i], XCB_NONE);
		if (conf.pointer_actions[i] != POINTER_ACTION_NOTHING)
			window_grab_button(win, mouse_buttons[i], conf.pointer_modifier);
	}
	DMSG("grabbed buttons on 0x%08x\n", win);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
xorl %r14d, %r14d
leaq 0x3acc(%rip), %r15      # 0x90d0
leaq 0x7195(%rip), %r12      # 0xc7a0
movsbl 0x71c4(%rip), %eax      # 0xc7d6
testl %eax, %eax
je 0x561f
movsbl (%r14,%r15), %ecx
cmpl %eax, %ecx
jne 0x562d
movzbl (%r14,%r15), %esi
movl %ebx, %edi
xorl %edx, %edx
callq 0x565e
cmpl $0x0, 0x28(%r14,%r12)
je 0x5648
movzbl (%r14,%r15), %esi
movzwl 0x7193(%rip), %edx      # 0xc7d4
movl %ebx, %edi
callq 0x565e
addq $0x4, %r14
cmpq $0xc, %r14
jne 0x560b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/tudurom[P]windowchef/wm.c
// Function: refresh_borders
static void
refresh_borders(void)
{
	if (!conf.apply_settings)
		return;

	struct list_item *item;
	struct client *client;

	for (item = win_list; item != NULL; item = item->next) {
		client = item->data;
		if (client->maxed)
			continue;

		if (client == focused_win)
			set_borders(client, conf.focus_color, conf.internal_focus_color);
		else
			set_borders(client, conf.unfocus_color, conf.internal_unfocus_color);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x6ae1(%rip), %rbx      # 0xc3c8
testq %rbx, %rbx
setne %al
andb 0x6ed2(%rip), %al       # 0xc7c5
cmpb $0x1, %al
jne 0x5943
leaq 0x6eaa(%rip), %r14      # 0xc7a8
leaq 0x6ea7(%rip), %r15      # 0xc7ac
leaq 0x6ea4(%rip), %r12      # 0xc7b0
leaq 0x6ea1(%rip), %r13      # 0xc7b4
movq (%rbx), %rdi
cmpb $0x0, 0x24(%rdi)
jne 0x593a
cmpq 0x6ebd(%rip), %rdi      # 0xc7e0
movq %r15, %rax
cmoveq %r14, %rax
movl (%rax), %esi
movq %r13, %rax
cmoveq %r12, %rax
movl (%rax), %edx
callq 0x532f
movq 0x10(%rbx), %rbx
testq %rbx, %rbx
jne 0x5913
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/tudurom[P]windowchef/wm.c
// Function: update_client_list
static void
update_client_list(void)
{
	xcb_window_t *children;
	struct client *client;
	uint32_t len;

	xcb_query_tree_reply_t *reply = xcb_query_tree_reply(conn,
			xcb_query_tree(conn, scr->root), NULL);
	xcb_delete_property(conn, scr->root, ewmh->_NET_CLIENT_LIST);
	xcb_delete_property(conn, scr->root, ewmh->_NET_CLIENT_LIST_STACKING);

	if (reply == NULL) {
		add_to_client_list(0);
		return;
	}

	len = xcb_query_tree_children_length(reply);
	children = xcb_query_tree_children(reply);

	for (unsigned int i = 0; i < len; i++) {
		client = find_client(&children[i]);
		if (client != NULL)
			add_to_client_list(client->window);
	}

	free(reply);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x6a5c(%rip), %rbx      # 0xc3b8
movq 0x6e75(%rip), %rax      # 0xc7d8
movl (%rax), %esi
movq %rbx, %rdi
callq 0x3230
movq %rbx, %rdi
movl %eax, %esi
xorl %edx, %edx
callq 0x3380
movq %rax, %rbx
movq 0x6a35(%rip), %rdi      # 0xc3b8
movq 0x6e4e(%rip), %rax      # 0xc7d8
movl (%rax), %esi
movq 0x6a2d(%rip), %rax      # 0xc3c0
movl 0x24(%rax), %edx
callq 0x3590
movq 0x6a16(%rip), %rdi      # 0xc3b8
movq 0x6e2f(%rip), %rax      # 0xc7d8
movl (%rax), %esi
movq 0x6a0e(%rip), %rax      # 0xc3c0
movl 0x28(%rax), %edx
callq 0x3590
testq %rbx, %rbx
je 0x5a24
movq %rbx, %rdi
callq 0x36c0
movl %eax, %ebp
movq %rbx, %rdi
callq 0x34c0
testl %ebp, %ebp
je 0x5a14
movq %rax, %r14
movl %ebp, %r15d
xorl %r12d, %r12d
movq 0x69e3(%rip), %rax      # 0xc3c8
testq %rax, %rax
je 0x59fe
movl (%r14,%r12,4), %ecx
movq (%rax), %rdx
cmpl %ecx, (%rdx)
je 0x5a00
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0x59ee
xorl %edx, %edx
testq %rdx, %rdx
je 0x5a0c
movl (%rdx), %edi
callq 0x5b91
incq %r12
cmpq %r15, %r12
jne 0x59de
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x32d0
xorl %edi, %edi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x5b91
// File: /workspace/github_c_makefile_star2_O1/tudurom[P]windowchef/wm.c
// Function: update_group_list
static void update_group_list(void)
{
	struct list_item *item;
	struct client *client;
	bool first = true;
	uint32_t data[1];

	for (unsigned int i = 0; i < conf.groups; i++) {
		/* deactivate group if no window in group */
		item = win_list;
		while (item != NULL && (client = item->data)->group != i)
			item = item->next;
		if (item == NULL)
			group_in_use[i] = false;

		if (group_in_use[i]) {
			uint8_t mode = XCB_PROP_MODE_APPEND;
			data[0] = i + 1;
			if (first) {
				mode = XCB_PROP_MODE_REPLACE;
				first = false;
			}
			xcb_change_property(conn, mode, scr->root, ATOMS[WINDOWCHEF_ACTIVE_GROUPS], XCB_ATOM_INTEGER, 32, 1, data);
		}
	}

	if (first) {
		data[0] = 0;
		xcb_change_property(conn, XCB_PROP_MODE_REPLACE, scr->root, ATOMS[WINDOWCHEF_ACTIVE_GROUPS], XCB_ATOM_INTEGER, 32, 1, data);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x0, 0x6d7b(%rip)      # 0xc7bc
je 0x5aef
movb $0x1, %bpl
xorl %ebx, %ebx
leaq 0x4(%rsp), %r14
xorl %r15d, %r15d
movq 0x696d(%rip), %rax      # 0xc3c8
testq %rax, %rax
je 0x5a71
movq (%rax), %rcx
movl 0x58(%rcx), %ecx
cmpq %rcx, %r15
je 0x5a7d
movq 0x10(%rax), %rax
jmp 0x5a5b
movq 0x6d88(%rip), %rax      # 0xc800
movb $0x0, (%rax,%r15)
movq 0x6d7c(%rip), %rax      # 0xc800
cmpb $0x1, (%rax,%r15)
jne 0x5ad7
leal 0x1(%r15), %eax
movl %eax, 0x4(%rsp)
movzbl %bpl, %eax
testb $0x1, %al
movl %eax, %ebp
cmovnel %ebx, %ebp
movq 0x6913(%rip), %rdi      # 0xc3b8
movq 0x6d2c(%rip), %rcx      # 0xc7d8
movl (%rcx), %edx
movl 0x6d40(%rip), %ecx      # 0xc7f4
notb %al
movzbl %al, %esi
andl $0x1, %esi
addl %esi, %esi
movl $0x13, %r8d
movl $0x20, %r9d
pushq %r14
pushq $0x1
callq 0x35b0
addq $0x10, %rsp
incq %r15
movl 0x6cdc(%rip), %eax      # 0xc7bc
cmpq %rax, %r15
jb 0x5a54
testb $0x1, %bpl
je 0x5b2a
leaq 0x4(%rsp), %rax
movl $0x0, (%rax)
movq 0x68b7(%rip), %rdi      # 0xc3b8
movq 0x6cd0(%rip), %rcx      # 0xc7d8
movl (%rcx), %edx
movl 0x6ce4(%rip), %ecx      # 0xc7f4
xorl %esi, %esi
movl $0x13, %r8d
movl $0x20, %r9d
pushq %rax
pushq $0x1
callq 0x35b0
addq $0x10, %rsp
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/tudurom[P]windowchef/wm.c
// Function: set_focused_last_best
static void
set_focused_last_best()
{
	struct list_item *focused_item;
	struct client *client;

	focused_item = focus_list->next;
	if (focused_item == NULL)
		focused_item = focus_list;

	while (focused_item != NULL) {
		client = focused_item->data;

		if (client != NULL && client->mapped) {
			set_focused(client);
			return;
		}

		focused_item = focused_item->next;
	}
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq 0x688f(%rip), %rcx      # 0xc3d0
movq 0x10(%rcx), %rax
testq %rax, %rax
cmoveq %rcx, %rax
testq %rax, %rax
je 0x5b8b
movq (%rax), %rbx
testq %rbx, %rbx
je 0x5b5f
cmpb $0x1, 0x54(%rbx)
je 0x5b65
movq 0x10(%rax), %rax
jmp 0x5b4c
movq %rbx, %rdi
callq 0x5045
movl (%rbx), %esi
leaq 0xc(%rsp), %rcx
movl $0x0, (%rcx)
movq 0x6837(%rip), %rdi      # 0xc3b8
movl $0x40, %edx
callq 0x3200
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/tudurom[P]windowchef/wm.c
// Function: group_add_window
static void
group_add_window(struct client *client, uint32_t group)
{
	if (client != NULL && group < conf.groups) {
		client->group = group;
		group_in_use[group] = true;
		update_wm_desktop(client);
		update_group_list();
		update_current_desktop(client);
		update_window_status(client);
	}
}

// Assembly:
cmpl %esi, 0x6ba2(%rip)      # 0xc7bc
jbe 0x5c64
pushq %rbx
movl %esi, %edx
movq %rdi, %rbx
movl %esi, 0x58(%rdi)
movq 0x6bd4(%rip), %rax      # 0xc800
movl %esi, %ecx
movb $0x1, (%rax,%rcx)
testq %rdi, %rdi
je 0x5c45
movq 0x6782(%rip), %rdi      # 0xc3c0
movl (%rbx), %esi
callq 0x3450
callq 0x5a33
movq 0x676f(%rip), %rdi      # 0xc3c0
movl 0x58(%rbx), %edx
xorl %esi, %esi
callq 0x35c0
movq %rbx, %rdi
popq %rbx
jmp 0x51c7
retq
// File: /workspace/github_c_makefile_star2_O1/tudurom[P]windowchef/wm.c
// Function: find_monitor_by_coord
static struct monitor *
find_monitor_by_coord(int16_t x, int16_t y)
{
	struct list_item *item;
	struct monitor *m, *ret;

	m = ret = NULL;
	item = mon_list;
	while (item != NULL) {
		m = item->data;
		if (x >= m->x && x <= m->x + m->width
			&& y >= m->y && y <= m->y + m->height)
			ret = m;

		item = item->next;
	}

	return ret;
}

// Assembly:
movq 0x6ba4(%rip), %rcx      # 0xc810
testq %rcx, %rcx
je 0x5cb9
movswl %di, %edx
movswl %si, %r8d
xorl %eax, %eax
movq (%rcx), %r9
movswl 0x10(%r9), %r10d
cmpw %di, %r10w
jg 0x5caf
movzwl 0x14(%r9), %r11d
addl %r10d, %r11d
cmpl %edx, %r11d
jl 0x5caf
movswl 0x12(%r9), %r10d
cmpw %si, %r10w
jg 0x5caf
movzwl 0x16(%r9), %r11d
addl %r10d, %r11d
cmpl %r8d, %r11d
cmovgeq %r9, %rax
movq 0x10(%rcx), %rcx
testq %rcx, %rcx
jne 0x5c7a
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/tudurom[P]windowchef/wm.c
// Function: center_pointer
static void
center_pointer(struct client *client)
{
	int16_t cur_x, cur_y;

	cur_x = cur_y = 0;

	switch (conf.cursor_position) {
	case TOP_LEFT:
		cur_x = -conf.border_width;
		cur_y = -conf.border_width;
		break;
	case TOP_RIGHT:
		cur_x = client->geom.width + conf.border_width;
		cur_y = 0 - conf.border_width;
		break;
	case BOTTOM_LEFT:
		cur_x = 0 - conf.border_width;
		cur_y = client->geom.height + conf.border_width;
		break;
	case BOTTOM_RIGHT:
		cur_x = client->geom.width + conf.border_width;
		cur_y = client->geom.height + conf.border_width;
		break;
	case CENTER:
		cur_x = client->geom.width / 2;
		cur_y = client->geom.height / 2;
		break;
	default: break;
	}

	xcb_warp_pointer(conn, XCB_NONE, client->window, 0, 0, 0, 0, cur_x, cur_y);
	xcb_flush(conn);
}

// Assembly:
movl 0x6af6(%rip), %eax      # 0xc7b8
cmpq $0x4, %rax
ja 0x5d2b
leaq 0x3335(%rip), %rcx      # 0x9004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movsbl 0x6ac1(%rip), %esi      # 0xc7a0
movzwl 0xa(%rdi), %ecx
addw %si, %cx
negl %esi
jmp 0x5d2f
movzwl 0x8(%rdi), %esi
shrl %esi
movzwl 0xa(%rdi), %ecx
shrl %ecx
jmp 0x5d2f
movsbl 0x6aa1(%rip), %ecx      # 0xc7a0
negl %ecx
movl %ecx, %esi
jmp 0x5d2f
movsbl 0x6a94(%rip), %ecx      # 0xc7a0
movzwl 0x8(%rdi), %esi
addw %cx, %si
negl %ecx
jmp 0x5d2f
movsbl 0x6a82(%rip), %ecx      # 0xc7a0
movzwl 0x8(%rdi), %esi
addw %cx, %si
addw 0xa(%rdi), %cx
jmp 0x5d2f
xorl %ecx, %ecx
xorl %esi, %esi
pushq %rax
movq 0x6681(%rip), %rax      # 0xc3b8
movl (%rdi), %edx
subq $0x8, %rsp
movswl %cx, %r10d
movswl %si, %r11d
movq %rax, %rdi
xorl %esi, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %r10
pushq %r11
pushq $0x0
callq 0x32b0
addq $0x20, %rsp
movq 0x6650(%rip), %rdi      # 0xc3b8
popq %rax
jmp 0x3400
// File: /workspace/github_c_makefile_star2_O1/tudurom[P]windowchef/wm.c
// Function: get_geometry
static bool
get_geometry(xcb_window_t *win, int16_t *x, int16_t *y, uint16_t *width, uint16_t *height, uint8_t *depth)
{
	xcb_get_geometry_reply_t *reply = xcb_get_geometry_reply(conn, xcb_get_geometry(conn, *win), NULL);

	if (reply == NULL)
		return false;
	if (x != NULL)
		*x = reply->x;
	if (y != NULL)
		*y = reply->y;
	if (width != NULL)
		*width = reply->width;
	if (height != NULL)
		*height = reply->height;
	if (depth != NULL)
		*depth = reply->depth;

	free(reply);
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq 0x6629(%rip), %rbp      # 0xc3b8
movl (%rdi), %esi
movq %rbp, %rdi
callq 0x3390
movq %rbp, %rdi
movl %eax, %esi
xorl %edx, %edx
callq 0x3420
testq %rax, %rax
je 0x5e00
testq %r13, %r13
je 0x5db8
movzwl 0xc(%rax), %ecx
movw %cx, (%r13)
testq %r12, %r12
je 0x5dc6
movzwl 0xe(%rax), %ecx
movw %cx, (%r12)
testq %r15, %r15
je 0x5dd3
movzwl 0x10(%rax), %ecx
movw %cx, (%r15)
testq %r14, %r14
je 0x5de0
movzwl 0x12(%rax), %ecx
movw %cx, (%r14)
testq %rbx, %rbx
je 0x5dea
movb 0x1(%rax), %cl
movb %cl, (%rbx)
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x32d0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/tudurom[P]windowchef/wm.c
// Function: vmaximize_window
static void
vmaximize_window(struct client *client, int16_t mon_y, uint16_t mon_height)
{
	if (client == NULL)
		return;

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

	if (client->geom.height != mon_height)
		client->orig_geom = client->geom;

	client->geom.y = mon_y + conf.gap_up;
	client->geom.height = mon_height - conf.gap_up - conf.gap_down - 2 * conf.border_width;

	teleport_window(client->window, client->geom.x, client->geom.y);
	resize_window_absolute(client->window, client->geom.width, client->geom.height);
	client->vmaxed = true;

	update_ewmh_wm_state(client);
	update_window_status(client);
}

// Assembly:
testq %rdi, %rdi
je 0x6039
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
cmpb $0x0, 0x24(%rdi)
jne 0x5fba
cmpb $0x0, 0x26(%rbx)
jne 0x5fba
cmpb $0x0, 0x25(%rbx)
jne 0x5fba
cmpb $0x0, 0x27(%rbx)
jne 0x5fba
cmpb $0x1, 0x28(%rbx)
jne 0x5fc2
movq %rbx, %rdi
callq 0x4fab
cmpw %r14w, 0xa(%rbx)
je 0x5fdc
leaq 0x4(%rbx), %rax
movzwl 0x8(%rax), %ecx
movw %cx, 0x16(%rbx)
movq (%rax), %rax
movq %rax, 0xe(%rbx)
movsbl 0x67c2(%rip), %eax      # 0xc7a5
addl %eax, %ebp
movw %bp, 0x6(%rbx)
movsbl 0x67b4(%rip), %ecx      # 0xc7a4
movsbl 0x67a9(%rip), %edx      # 0xc7a0
addl %eax, %ecx
leal (%rcx,%rdx,2), %eax
subl %eax, %r14d
movw %r14w, 0xa(%rbx)
movl (%rbx), %edi
movswl 0x4(%rbx), %esi
movswl %bp, %edx
callq 0x4e11
movl (%rbx), %edi
movzwl 0x8(%rbx), %esi
movzwl 0xa(%rbx), %edx
callq 0x4e79
movb $0x1, 0x26(%rbx)
movq %rbx, %rdi
callq 0x5159
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x51c7
retq
// File: /workspace/github_c_makefile_star2_O1/tudurom[P]windowchef/wm.c
// Function: hmaximize_window
static void
hmaximize_window(struct client *client, int16_t mon_x, uint16_t mon_width)
{
	if (client == NULL)
		return;

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

	if (client->geom.width != mon_width)
		client->orig_geom = client->geom;
	client->geom.x = mon_x + conf.gap_left;
	client->geom.width = mon_width - conf.gap_left - conf.gap_right - 2 * conf.border_width;

	teleport_window(client->window, client->geom.x, client->geom.y);
	resize_window_absolute(client->window, client->geom.width, client->geom.height);
	client->hmaxed = true;

	update_ewmh_wm_state(client);
	update_window_status(client);
}

// Assembly:
testq %rdi, %rdi
je 0x60ec
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
cmpb $0x0, 0x24(%rdi)
jne 0x606d
cmpb $0x0, 0x26(%rbx)
jne 0x606d
cmpb $0x0, 0x25(%rbx)
jne 0x606d
cmpb $0x0, 0x27(%rbx)
jne 0x606d
cmpb $0x1, 0x28(%rbx)
jne 0x6075
movq %rbx, %rdi
callq 0x4fab
cmpw %r14w, 0x8(%rbx)
je 0x608f
leaq 0x4(%rbx), %rax
movzwl 0x8(%rax), %ecx
movw %cx, 0x16(%rbx)
movq (%rax), %rax
movq %rax, 0xe(%rbx)
movsbl 0x670d(%rip), %eax      # 0xc7a3
addl %eax, %ebp
movw %bp, 0x4(%rbx)
movsbl 0x6703(%rip), %ecx      # 0xc7a6
movsbl 0x66f6(%rip), %edx      # 0xc7a0
addl %eax, %ecx
leal (%rcx,%rdx,2), %eax
subl %eax, %r14d
movw %r14w, 0x8(%rbx)
movl (%rbx), %edi
movswl 0x6(%rbx), %edx
movswl %bp, %esi
callq 0x4e11
movl (%rbx), %edi
movzwl 0x8(%rbx), %esi
movzwl 0xa(%rbx), %edx
callq 0x4e79
movb $0x1, 0x25(%rbx)
movq %rbx, %rdi
callq 0x5159
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x51c7
retq
// File: /workspace/github_c_makefile_star2_O1/tudurom[P]windowchef/wm.c
// Function: get_randr
static void
get_randr(void)
{
	int len;
	xcb_randr_get_screen_resources_current_cookie_t c
		= xcb_randr_get_screen_resources_current(conn, scr->root);
	xcb_randr_get_screen_resources_current_reply_t *r
		= xcb_randr_get_screen_resources_current_reply(conn, c, NULL);

	if (r == NULL)
		return;

	xcb_timestamp_t timestamp = r->config_timestamp;
	len = xcb_randr_get_screen_resources_current_outputs_length(r);
	xcb_randr_output_t *outputs
		= xcb_randr_get_screen_resources_current_outputs(r);

	/* Request information for all outputs */
	get_outputs(outputs, len, timestamp);
	free(r);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq 0x62c0(%rip), %rdi      # 0xc3b8
movq 0x66d9(%rip), %rax      # 0xc7d8
movl (%rax), %esi
callq 0x3080
movq 0x62ab(%rip), %rdi      # 0xc3b8
movl %eax, %esi
xorl %edx, %edx
callq 0x3360
testq %rax, %rax
je 0x614d
movq %rax, %rbx
movl 0xc(%rax), %ebp
movq %rax, %rdi
callq 0x3350
movl %eax, %r14d
movq %rbx, %rdi
callq 0x3520
movq %rax, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x6152
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x32d0
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/tudurom[P]windowchef/wm.c
// Function: ipc_window_move
static void
ipc_window_move(uint32_t *d)
{
	int16_t x, y;

	if (focused_win == NULL)
		return;

	if (is_special(focused_win)) {
		reset_window(focused_win);
		set_focused(focused_win);
	}

	x = d[2];
	y = d[3];
	if (d[0])
		x = -x;
	if (d[1])
		y = -y;

	focused_win->geom.x += x;
	focused_win->geom.y += y;

	move_window(focused_win->window, x, y);
	center_pointer(focused_win);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x5ee7(%rip), %rdi      # 0xc7e0
testq %rdi, %rdi
je 0x6a17
cmpb $0x0, 0x24(%rdi)
jne 0x6920
cmpb $0x0, 0x26(%rdi)
jne 0x6920
cmpb $0x0, 0x25(%rdi)
jne 0x6920
cmpb $0x0, 0x27(%rdi)
jne 0x6920
cmpb $0x1, 0x28(%rdi)
jne 0x6953
callq 0x4fab
movq 0x5eb4(%rip), %r14      # 0xc7e0
movq %r14, %rdi
callq 0x5045
movl (%r14), %esi
leaq 0x4(%rsp), %rcx
movl $0x0, (%rcx)
movq 0x5a6f(%rip), %rdi      # 0xc3b8
movl $0x40, %edx
callq 0x3200
movl 0x8(%rbx), %eax
movl 0xc(%rbx), %ecx
movl %eax, %ebp
negl %ebp
cmpl $0x0, (%rbx)
cmovel %eax, %ebp
movl %ecx, %r12d
negl %r12d
cmpl $0x0, 0x4(%rbx)
cmovel %ecx, %r12d
movq 0x5e68(%rip), %rax      # 0xc7e0
addw %bp, 0x4(%rax)
addw %r12w, 0x6(%rax)
movl (%rax), %ebx
movl %ebx, 0x4(%rsp)
movq 0x5a2a(%rip), %r14      # 0xc3b8
movq %r14, %rdi
movl %ebx, %esi
callq 0x34f0
movq %r14, %rdi
movl %eax, %esi
xorl %edx, %edx
callq 0x3300
testq %rax, %rax
je 0x6a0b
movb 0x1a(%rax), %r14b
movq %rax, %rdi
callq 0x32d0
cmpb $0x2, %r14b
jne 0x6a0b
movq 0x5e16(%rip), %rax      # 0xc7d8
cmpl %ebx, (%rax)
je 0x6a0b
leaq 0x4(%rsp), %rdi
leaq 0xe(%rsp), %r14
leaq 0xc(%rsp), %r15
leaq 0xa(%rsp), %rcx
leaq 0x8(%rsp), %r8
movq %r14, %rsi
movq %r15, %rdx
xorl %r9d, %r9d
callq 0x5d6e
addw (%r14), %bp
addw (%r15), %r12w
movw %bp, (%r14)
movw %r12w, (%r15)
movswl %bp, %esi
movswl %r12w, %edx
movl %ebx, %edi
callq 0x4e11
movq 0x5dce(%rip), %rdi      # 0xc7e0
callq 0x5cbc
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/tudurom[P]windowchef/wm.c
// Function: ipc_window_move_absolute
static void
ipc_window_move_absolute(uint32_t *d)
{
	int16_t x, y;

	if (focused_win == NULL)
		return;

	if (is_special(focused_win)) {
		reset_window(focused_win);
		set_focused(focused_win);
	}

	x = d[2];
	y = d[3];

	if (d[0] == IPC_MUL_MINUS)
		x = -x;
	if (d[1] == IPC_MUL_MINUS)
		y = -y;

	focused_win->geom.x = x;
	focused_win->geom.y = y;

	teleport_window(focused_win->window, x, y);
	center_pointer(focused_win);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x5dae(%rip), %rdi      # 0xc7e0
testq %rdi, %rdi
je 0x6acf
cmpb $0x0, 0x24(%rdi)
jne 0x6a59
cmpb $0x0, 0x26(%rdi)
jne 0x6a59
cmpb $0x0, 0x25(%rdi)
jne 0x6a59
cmpb $0x0, 0x27(%rdi)
jne 0x6a59
cmpb $0x1, 0x28(%rdi)
jne 0x6a8c
callq 0x4fab
movq 0x5d7b(%rip), %r14      # 0xc7e0
movq %r14, %rdi
callq 0x5045
movl (%r14), %esi
leaq 0x4(%rsp), %rcx
movl $0x0, (%rcx)
movq 0x5936(%rip), %rdi      # 0xc3b8
movl $0x40, %edx
callq 0x3200
movl 0x8(%rbx), %eax
movl %eax, %ecx
negl %ecx
cmpl $0x1, (%rbx)
cmovnel %eax, %ecx
movl 0xc(%rbx), %eax
movl %eax, %edx
negl %edx
cmpl $0x1, 0x4(%rbx)
cmovnel %eax, %edx
movq 0x5d32(%rip), %rax      # 0xc7e0
movw %cx, 0x4(%rax)
movw %dx, 0x6(%rax)
movl (%rax), %edi
movswl %cx, %esi
movswl %dx, %edx
callq 0x4e11
movq 0x5d16(%rip), %rdi      # 0xc7e0
callq 0x5cbc
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/tudurom[P]windowchef/wm.c
// Function: ipc_window_resize
static void
ipc_window_resize(uint32_t *d)
{
	int16_t w, h;

	if (focused_win == NULL)
		return;

	if (is_special(focused_win)) {
		reset_window(focused_win);
		set_focused(focused_win);
	}

	w = d[2];
	h = d[3];

	if (d[0] == IPC_MUL_MINUS)
		w = -w;
	if (d[1] == IPC_MUL_MINUS)
		h = -h;

	resize_window(focused_win->window, w, h);
	center_pointer(focused_win);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x5cfb(%rip), %rdi      # 0xc7e0
testq %rdi, %rdi
je 0x6c19
cmpb $0x0, 0x24(%rdi)
jne 0x6b0c
cmpb $0x0, 0x26(%rdi)
jne 0x6b0c
cmpb $0x0, 0x25(%rdi)
jne 0x6b0c
cmpb $0x0, 0x27(%rdi)
jne 0x6b0c
cmpb $0x1, 0x28(%rdi)
jne 0x6b3f
callq 0x4fab
movq 0x5cc8(%rip), %r14      # 0xc7e0
movq %r14, %rdi
callq 0x5045
movl (%r14), %esi
leaq 0x4(%rsp), %rcx
movl $0x0, (%rcx)
movq 0x5883(%rip), %rdi      # 0xc3b8
movl $0x40, %edx
callq 0x3200
movl 0x8(%rbx), %eax
movl 0xc(%rbx), %edx
movl %eax, %ecx
negl %ecx
cmpl $0x1, (%rbx)
cmovnel %eax, %ecx
movl %edx, %eax
negl %eax
cmpl $0x1, 0x4(%rbx)
cmovnel %edx, %eax
movq 0x5c7f(%rip), %rdx      # 0xc7e0
movl (%rdx), %edi
movq 0x585e(%rip), %rdx      # 0xc3c8
testq %rdx, %rdx
je 0x6b7d
movq (%rdx), %r8
cmpl %edi, (%r8)
je 0x6b80
movq 0x10(%rdx), %rdx
jmp 0x6b6a
xorl %r8d, %r8d
testq %r8, %r8
je 0x6c0d
movzwl 0x8(%r8), %edx
movzwl 0xa(%r8), %esi
movswl %cx, %ecx
addl %edx, %ecx
testl %ecx, %ecx
cmovlel %edx, %ecx
cwtl
addl %esi, %eax
testl %eax, %eax
cmovlel %esi, %eax
movzwl 0x48(%r8), %edx
cmpl %edx, %ecx
movl %edx, %esi
cmovgl %ecx, %esi
testl %edx, %edx
cmovel %ecx, %esi
movzwl 0x4a(%r8), %edx
cmpl %edx, %eax
movl %edx, %ecx
cmovgl %eax, %ecx
testl %edx, %edx
cmovel %eax, %ecx
movzbl 0x5bf2(%rip), %r9d      # 0xc7c1
movzwl 0x50(%r8), %r10d
movl %esi, %eax
xorl %edx, %edx
divl %r10d
imull %r9d, %edx
subl %edx, %esi
movw %si, 0x8(%r8)
movzwl 0x52(%r8), %r10d
movl %ecx, %eax
xorl %edx, %edx
divl %r10d
imull %r9d, %edx
subl %edx, %ecx
movw %cx, 0xa(%r8)
movl $0xffff, %eax           # imm = 0xFFFF
andl %eax, %esi
andl %eax, %ecx
movl %ecx, %edx
callq 0x4e79
movq 0x5bcc(%rip), %rdi      # 0xc7e0
callq 0x5cbc
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/tudurom[P]windowchef/wm.c
// Function: ipc_window_resize_absolute
static void
ipc_window_resize_absolute(uint32_t *d)
{
	int16_t w, h;

	if (focused_win == NULL)
		return;

	if (is_special(focused_win)) {
		reset_window(focused_win);
		set_focused(focused_win);
	}

	w = d[0];
	h = d[1];

	if (focused_win->min_width != 0 && w < focused_win->min_width)
		w = focused_win->min_width;

	if (focused_win->min_height != 0 && h < focused_win->min_height)
		h = focused_win->min_height;

	focused_win->geom.width = w;
	focused_win->geom.height = h;

	resize_window_absolute(focused_win->window, w, h);
	center_pointer(focused_win);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x5bb1(%rip), %rdi      # 0xc7e0
testq %rdi, %rdi
je 0x6cdf
cmpb $0x0, 0x24(%rdi)
jne 0x6c56
cmpb $0x0, 0x26(%rdi)
jne 0x6c56
cmpb $0x0, 0x25(%rdi)
jne 0x6c56
cmpb $0x0, 0x27(%rdi)
jne 0x6c56
cmpb $0x1, 0x28(%rdi)
jne 0x6c89
callq 0x4fab
movq 0x5b7e(%rip), %r14      # 0xc7e0
movq %r14, %rdi
callq 0x5045
movl (%r14), %esi
leaq 0x4(%rsp), %rcx
movl $0x0, (%rcx)
movq 0x5739(%rip), %rdi      # 0xc3b8
movl $0x40, %edx
callq 0x3200
movl (%rbx), %eax
movq 0x5b4e(%rip), %rcx      # 0xc7e0
movzwl 0x48(%rcx), %edx
movswl %ax, %esi
cmpl %edx, %esi
movl %eax, %esi
cmovll %edx, %esi
testl %edx, %edx
cmovel %eax, %esi
movl 0x4(%rbx), %eax
movzwl 0x4a(%rcx), %edi
movswl %ax, %edx
cmpl %edi, %edx
movl %eax, %edx
cmovll %edi, %edx
testl %edi, %edi
cmovel %eax, %edx
movw %si, 0x8(%rcx)
movw %dx, 0xa(%rcx)
movl (%rcx), %edi
movl $0xffff, %eax           # imm = 0xFFFF
andl %eax, %esi
andl %eax, %edx
callq 0x4e79
movq 0x5b06(%rip), %rdi      # 0xc7e0
callq 0x5cbc
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/tudurom[P]windowchef/wm.c
// Function: ipc_window_maximize
static void
ipc_window_maximize(uint32_t *d)
{
	(void)(d);
	int16_t mon_x, mon_y;
	uint16_t mon_w, mon_h;

	if (focused_win == NULL)
		return;

	if (focused_win->maxed) {
		reset_window(focused_win);
	} else {
		get_monitor_size(focused_win, &mon_x, &mon_y, &mon_w, &mon_h);
		maximize_window(focused_win, mon_x, mon_y, mon_w, mon_h);
	}

	set_focused(focused_win);

	xcb_flush(conn);
}

// Assembly:
movq 0x5af2(%rip), %rdi      # 0xc7e0
testq %rdi, %rdi
je 0x6d7c
pushq %rbx
subq $0x10, %rsp
cmpb $0x1, 0x24(%rdi)
jne 0x6d09
callq 0x4fab
jmp 0x6d3e
movq 0x40(%rdi), %rax
testq %rax, %rax
je 0x6d1d
movzwl 0x10(%rax), %edx
movzwl 0x12(%rax), %r9d
jmp 0x6d29
movq 0x5ab4(%rip), %rax      # 0xc7d8
xorl %edx, %edx
xorl %r9d, %r9d
movzwl 0x16(%rax), %r8d
movzwl 0x14(%rax), %ecx
movswl %dx, %esi
movswl %r9w, %edx
callq 0x4ec8
movq 0x5a9b(%rip), %rbx      # 0xc7e0
movq %rbx, %rdi
callq 0x5045
movl (%rbx), %esi
leaq 0xc(%rsp), %rcx
movl $0x0, (%rcx)
movq 0x5657(%rip), %rdi      # 0xc3b8
movl $0x40, %edx
callq 0x3200
movq 0x5646(%rip), %rdi      # 0xc3b8
callq 0x3400
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/tudurom[P]windowchef/wm.c
// Function: ipc_window_unmaximize
static void
ipc_window_unmaximize(uint32_t *d)
{
	(void)(d);

	if (focused_win == NULL)
		return;

	if (is_special(focused_win)) {
		reset_window(focused_win);
		set_focused(focused_win);
	}

	xcb_flush(conn);
}

// Assembly:
movq 0x5a5c(%rip), %rdi      # 0xc7e0
testq %rdi, %rdi
je 0x6def
pushq %rbx
subq $0x10, %rsp
cmpb $0x0, 0x24(%rdi)
jne 0x6dac
cmpb $0x0, 0x26(%rdi)
jne 0x6dac
cmpb $0x0, 0x25(%rdi)
jne 0x6dac
cmpb $0x0, 0x27(%rdi)
jne 0x6dac
cmpb $0x1, 0x28(%rdi)
jne 0x6dde
callq 0x4fab
movq 0x5a28(%rip), %rbx      # 0xc7e0
movq %rbx, %rdi
callq 0x5045
movl (%rbx), %esi
leaq 0xc(%rsp), %rcx
movl $0x0, (%rcx)
movq 0x55e4(%rip), %rdi      # 0xc3b8
movl $0x40, %edx
callq 0x3200
movq 0x55d3(%rip), %rdi      # 0xc3b8
callq 0x3400
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/tudurom[P]windowchef/wm.c
// Function: ipc_window_hor_maximize
static void
ipc_window_hor_maximize(uint32_t *d)
{
	(void)(d);
	int16_t mon_x, mon_y;
	uint16_t mon_w;

	if (focused_win == NULL)
		return;

	if (focused_win->hmaxed) {
		reset_window(focused_win);
	} else {
		get_monitor_size(focused_win, &mon_x, &mon_y, &mon_w, NULL);
		hmaximize_window(focused_win, mon_x, mon_w);
	}

	set_focused(focused_win);

	xcb_flush(conn);
}

// Assembly:
movq 0x59e9(%rip), %rdi      # 0xc7e0
testq %rdi, %rdi
je 0x6e70
pushq %rbx
subq $0x10, %rsp
cmpb $0x1, 0x25(%rdi)
jne 0x6e0e
callq 0x4fab
jmp 0x6e32
movq 0x40(%rdi), %rax
testq %rax, %rax
je 0x6e1d
movzwl 0x10(%rax), %ecx
jmp 0x6e26
movq 0x59b4(%rip), %rax      # 0xc7d8
xorl %ecx, %ecx
movzwl 0x14(%rax), %edx
movswl %cx, %esi
callq 0x603a
movq 0x59a7(%rip), %rbx      # 0xc7e0
movq %rbx, %rdi
callq 0x5045
movl (%rbx), %esi
leaq 0xc(%rsp), %rcx
movl $0x0, (%rcx)
movq 0x5563(%rip), %rdi      # 0xc3b8
movl $0x40, %edx
callq 0x3200
movq 0x5552(%rip), %rdi      # 0xc3b8
callq 0x3400
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/tudurom[P]windowchef/wm.c
// Function: ipc_window_ver_maximize
static void
ipc_window_ver_maximize(uint32_t *d)
{
	(void)(d);
	int16_t mon_x, mon_y;
	uint16_t mon_h;

	if (focused_win == NULL)
		return;

	if (focused_win->vmaxed) {
		reset_window(focused_win);
	} else {
		get_monitor_size(focused_win, &mon_x, &mon_y, NULL, &mon_h);
		vmaximize_window(focused_win, mon_y, mon_h);
	}

	set_focused(focused_win);

	xcb_flush(conn);
}

// Assembly:
movq 0x5968(%rip), %rdi      # 0xc7e0
testq %rdi, %rdi
je 0x6ef1
pushq %rbx
subq $0x10, %rsp
cmpb $0x1, 0x26(%rdi)
jne 0x6e8f
callq 0x4fab
jmp 0x6eb3
movq 0x40(%rdi), %rax
testq %rax, %rax
je 0x6e9e
movzwl 0x12(%rax), %ecx
jmp 0x6ea7
movq 0x5933(%rip), %rax      # 0xc7d8
xorl %ecx, %ecx
movzwl 0x16(%rax), %edx
movswl %cx, %esi
callq 0x5f87
movq 0x5926(%rip), %rbx      # 0xc7e0
movq %rbx, %rdi
callq 0x5045
movl (%rbx), %esi
leaq 0xc(%rsp), %rcx
movl $0x0, (%rcx)
movq 0x54e2(%rip), %rdi      # 0xc3b8
movl $0x40, %edx
callq 0x3200
movq 0x54d1(%rip), %rdi      # 0xc3b8
callq 0x3400
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/tudurom[P]windowchef/wm.c
// Function: ipc_window_monocle
static void
ipc_window_monocle(uint32_t *d)
{
	(void)(d);
	int16_t mon_x, mon_y;
	uint16_t mon_w, mon_h;

	if (focused_win == NULL)
		return;

	if (focused_win->monocled) {
		reset_window(focused_win);
	} else {
		get_monitor_size(focused_win, &mon_x, &mon_y, &mon_w, &mon_h);
		monocle_window(focused_win, mon_x, mon_y, mon_w, mon_h);
	}

	set_focused(focused_win);

	xcb_flush(conn);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq 0x58db(%rip), %rbx      # 0xc7e0
testq %rbx, %rbx
je 0x703a
cmpb $0x1, 0x27(%rbx)
jne 0x6f21
movq %rbx, %rdi
callq 0x4fab
jmp 0x7001
movq 0x40(%rbx), %rax
testq %rax, %rax
je 0x6f35
movzwl 0x10(%rax), %ebp
movzwl 0x12(%rax), %r14d
jmp 0x6f41
movq 0x589c(%rip), %rax      # 0xc7d8
xorl %ebp, %ebp
xorl %r14d, %r14d
movzwl 0x14(%rax), %r12d
movzwl 0x16(%rax), %r15d
cmpb $0x0, 0x24(%rbx)
jne 0x6f63
cmpb $0x0, 0x26(%rbx)
jne 0x6f63
cmpb $0x0, 0x25(%rbx)
jne 0x6f63
cmpb $0x1, 0x28(%rbx)
jne 0x6f6b
movq %rbx, %rdi
callq 0x4fab
movzwl 0xc(%rbx), %eax
movw %ax, 0x16(%rbx)
movq 0x4(%rbx), %rax
movq %rax, 0xe(%rbx)
movsbl 0x5821(%rip), %eax      # 0xc7a3
addl %eax, %ebp
movw %bp, 0x4(%rbx)
movsbl 0x5816(%rip), %ecx      # 0xc7a5
addl %ecx, %r14d
movw %r14w, 0x6(%rbx)
movsbl 0x5802(%rip), %edx      # 0xc7a0
addl %edx, %edx
movsbl 0x57ff(%rip), %esi      # 0xc7a6
subl %edx, %r12d
addl %eax, %esi
subl %esi, %r12d
movw %r12w, 0x8(%rbx)
movsbl 0x57e9(%rip), %eax      # 0xc7a4
subl %edx, %r15d
addl %ecx, %eax
subl %eax, %r15d
movw %r15w, 0xa(%rbx)
movl (%rbx), %edi
movswl %bp, %esi
movswl %r14w, %edx
callq 0x4e11
movl (%rbx), %edi
movzwl 0x8(%rbx), %esi
movzwl 0xa(%rbx), %edx
callq 0x4e79
movb $0x1, 0x27(%rbx)
movq %rbx, %rdi
callq 0x5045
movq %rbx, %rdi
callq 0x5159
movq %rbx, %rdi
callq 0x51c7
movq 0x57d8(%rip), %rbx      # 0xc7e0
movq %rbx, %rdi
callq 0x5045
movl (%rbx), %esi
leaq 0xc(%rsp), %rcx
movl $0x0, (%rcx)
movq 0x5394(%rip), %rdi      # 0xc3b8
movl $0x40, %edx
callq 0x3200
movq 0x5383(%rip), %rdi      # 0xc3b8
callq 0x3400
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/tudurom[P]windowchef/wm.c
// Function: ipc_window_put_in_grid
static void
ipc_window_put_in_grid(uint32_t *d)
{
	uint16_t grid_width, grid_height;
	uint16_t grid_x, grid_y;
	uint16_t occ_w, occ_h;
	const uint16_t m1 = 16U, m2 = 0xffffU;

	DMSG("data[4] = %d\n", d[4]);
	grid_width  = d[0] >> m1;
	grid_height = d[0] & m2;
	grid_x      = d[1] >> m1;
	grid_y      = d[1] & m2;
	occ_w       = d[2] >> m1;
	occ_h       = d[2] & m2;

	if (focused_win == NULL || grid_x >= grid_width || grid_y >= grid_height)
		return;

	grid_window(focused_win, grid_width, grid_height, grid_x, grid_y, occ_w, occ_h);
}

// Assembly:
movq %rdi, %rax
movl (%rdi), %ecx
movl 0x4(%rdi), %r8d
movl %ecx, %edx
shrl $0x10, %edx
movl %r8d, %r9d
shrl $0x10, %r9d
movq 0x567a(%rip), %rdi      # 0xc7e0
testq %rdi, %rdi
setne %sil
cmpl %edx, %r9d
setb %r10b
andb %sil, %r10b
cmpb $0x1, %r10b
jne 0x71b8
movl $0xffff, %esi           # imm = 0xFFFF
movl %r8d, %r10d
andl %esi, %r10d
andl %ecx, %esi
cmpl %esi, %r10d
jae 0x71b8
pushq %rax
movl 0x8(%rax), %eax
movl %eax, %r10d
shrl $0x10, %r10d
movzwl %ax, %eax
movl %eax, (%rsp)
movzwl %dx, %esi
movzwl %cx, %edx
movzwl %r9w, %ecx
movzwl %r8w, %r8d
movzwl %r10w, %r9d
callq 0x7f1a
popq %rax
retq