LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/millimat[P]Soft-Heap/approx-sort.c
// Function: all_metrics_per_epsilon
void all_metrics_per_epsilon(int *elts, int n) {
  int output[n];

  for(int k = 1; k < n; k *= 2) {
    double epsilon = ((double)k)/n;
    int r = ceil(-log(epsilon)/log(2)) + 5;

    softheap *P = makeheap_empty(epsilon);

    for(int i = 0; i < n; i++)
      insert(P, elts[i]);

    for(int i = 0; i < n; i++)
      output[i] = extract_min(P);

    destroy_heap(P);

    printf("r=%d \t\t %f \t\t %ld \t\t %f \n", r, metric_mispositions(output,n),metric_distance(output,n),metric_mispositions_threshold(output,n,n/100));
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %esi, %r13d
movq %rsp, %r14
leaq 0xf(,%r13,4), %rax
andq $-0x10, %rax
subq %rax, %r14
movq %r14, %rsp
cmpl $0x2, %esi
jl 0x1487
movq %rdi, %rbx
cvtsi2sd %esi, %xmm1
imulq $0x51eb851f, %r13, %r15 # imm = 0x51EB851F
shrq $0x25, %r15
movq %r15, %r12
negq %r12
movl $0x1, %eax
movq %rdi, -0x50(%rbp)
movsd %xmm1, -0x38(%rbp)
movq %r15, -0x48(%rbp)
movq %r12, -0x40(%rbp)
movl %eax, -0x30(%rbp)
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
callq 0x1060
divsd 0xc9a(%rip), %xmm0      # 0x2010
callq 0x10b0
addsd 0xc95(%rip), %xmm0      # 0x2018
cvttsd2si %xmm0, %eax
movl %eax, -0x2c(%rbp)
movsd -0x58(%rbp), %xmm0
callq 0x157f
movq %rax, %r12
movq %rbx, %r15
xorl %ebx, %ebx
movl (%r15,%rbx,4), %esi
movq %r12, %rdi
callq 0x170d
incq %rbx
cmpq %rbx, %r13
jne 0x139c
xorl %ebx, %ebx
movq %r12, %rdi
callq 0x19bb
movl %eax, (%r14,%rbx,4)
incq %rbx
cmpq %rbx, %r13
jne 0x13b2
movq %r12, %rdi
callq 0x167e
xorl %ecx, %ecx
xorl %eax, %eax
movq -0x48(%rbp), %r15
movl (%r14,%rcx,4), %edx
xorl %esi, %esi
cmpq %rdx, %rcx
setne %sil
addl %esi, %eax
incq %rcx
cmpq %rcx, %r13
jne 0x13d6
movq %r14, %rcx
xorl %esi, %esi
xorl %edx, %edx
movq -0x50(%rbp), %rbx
movq -0x40(%rbp), %r12
movl (%rcx), %edi
addl %esi, %edi
movl %edi, %r8d
negl %r8d
cmovsl %edi, %r8d
addq %r8, %rdx
decq %rsi
addq $0x4, %rcx
movq %r13, %rdi
addq %rsi, %rdi
jne 0x13fc
xorl %ecx, %ecx
xorl %esi, %esi
leaq (%r15,%rcx), %rdi
movslq (%r14,%rcx,4), %r8
cmpq %r8, %rdi
setl %dil
leaq (%r12,%rcx), %r9
cmpq %r8, %r9
setg %r8b
orb %dil, %r8b
movzbl %r8b, %edi
addl %edi, %esi
incq %rcx
cmpq %rcx, %r13
jne 0x1420
cvtsi2sd %esi, %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd -0x38(%rbp), %xmm2
divsd %xmm2, %xmm0
divsd %xmm2, %xmm1
leaq 0xbbe(%rip), %rdi       # 0x2028
movl -0x2c(%rbp), %esi
movb $0x2, %al
callq 0x1040
movsd -0x38(%rbp), %xmm1
movl -0x30(%rbp), %eax
addl %eax, %eax
cmpl %r13d, %eax
jl 0x1356
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/millimat[P]Soft-Heap/approx-sort.c
// Function: random_permutation
void random_permutation(int *elts, int n) {
  for(int i = 0; i < n; i++) {
    int j = randint(i+1);
    elts[i] = elts[j];
    elts[j] = i;
  }
}

// Assembly:
testl %esi, %esi
jle 0x1515
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %r14d
xorl %r15d, %r15d
leaq 0x1(%r15), %r12
callq 0x10c0
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0xb3b(%rip), %xmm0      # 0x2020
xorps %xmm1, %xmm1
cvtsi2sd %r12d, %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %eax
cltq
movl (%rbx,%rax,4), %ecx
movl %ecx, (%rbx,%r15,4)
movl %r15d, (%rbx,%rax,4)
movq %r12, %r15
cmpq %r12, %r14
jne 0x14cd
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/millimat[P]Soft-Heap/approx-sort.c
// Function: main
int main(int argc, char *argv[]) {
  int n = 1000000;

  int elts[n];

  srand(time(NULL));
  random_permutation(elts, n);

  all_metrics_per_epsilon(elts, n);

  return 0;
}

// Assembly:
pushq %rbx
subq $0x3d0900, %rsp         # imm = 0x3D0900
xorl %edi, %edi
callq 0x1080
movl %eax, %edi
callq 0x1070
movq %rsp, %rbx
movq %rbx, %rdi
movl $0xf4240, %esi          # imm = 0xF4240
callq 0x14b8
movq %rbx, %rdi
movl $0xf4240, %esi          # imm = 0xF4240
callq 0x12f6
xorl %eax, %eax
addq $0x3d0900, %rsp         # imm = 0x3D0900
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/tudurom[P]windowchef/wm.c
// Function: main.cold.1
static void version(void)
{
	fprintf(stderr, "%s %s\n", __NAME__, __THIS_VERSION__);
	fprintf(stderr, "Copyright (c) 2016-2019 Tudor Ioan Roman\n");
	fprintf(stderr, "Released under the ISC License\n");

	exit(EXIT_SUCCESS);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x88b5(%rip), %r14      # 0xbff0
movq (%r14), %rdi
leaq 0x5a9c(%rip), %rsi      # 0x91e1
leaq 0x5a57(%rip), %rdx      # 0x91a3
leaq 0x5a8d(%rip), %rcx      # 0x91e0
xorl %eax, %eax
callq 0x3690
movq (%r14), %rcx
leaq 0x5a84(%rip), %rdi      # 0x91e8
pushq $0x29
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x3660
movq (%r14), %rcx
leaq 0x5a96(%rip), %rdi      # 0x9212
pushq $0x1f
popq %rsi
movq %rbx, %rdx
callq 0x3660
xorl %edi, %edi
callq 0x3150
// File: /workspace/github_c_makefile_star2_O3/tudurom[P]windowchef/wm.c
// Function: cleanup
static void
cleanup(void)
{
	xcb_set_input_focus(conn, XCB_NONE, XCB_INPUT_FOCUS_POINTER_ROOT,
			XCB_CURRENT_TIME);
	ungrab_buttons();
	if (ewmh != NULL)
		xcb_ewmh_connection_wipe(ewmh);
	if (win_list != NULL)
		list_delete_all_items(&win_list, true);
	if (focus_list != NULL)
	    list_delete_all_items(&focus_list, true);
	if (conn != NULL)
		xcb_disconnect(conn);
}

// Assembly:
pushq %rbx
movq 0x82c3(%rip), %rdi      # 0xc3b8
xorl %esi, %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x3160
callq 0x4170
movq 0x82b1(%rip), %rbx      # 0xc3c0
testq %rbx, %rbx
je 0x4126
movq 0x8(%rbx), %rdi
callq 0x32d0
movq 0x18(%rbx), %rdi
callq 0x32d0
cmpq $0x0, 0x829a(%rip)      # 0xc3c8
je 0x4141
leaq 0x8291(%rip), %rdi      # 0xc3c8
movl $0x1, %esi
callq 0x8649
cmpq $0x0, 0x8287(%rip)      # 0xc3d0
je 0x415c
leaq 0x827e(%rip), %rdi      # 0xc3d0
movl $0x1, %esi
callq 0x8649
movq 0x8255(%rip), %rdi      # 0xc3b8
testq %rdi, %rdi
je 0x416e
popq %rbx
jmp 0x3630
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/tudurom[P]windowchef/wm.c
// Function: ungrab_buttons
static void
ungrab_buttons(void)
{
	struct list_item *item;
	struct client *client;

	for (item = win_list; item != NULL; item = item->next) {
		client = item->data;
		xcb_ungrab_button(conn, XCB_BUTTON_INDEX_ANY, client->window, XCB_MOD_MASK_ANY);
	}
}

// Assembly:
pushq %rbx
movq 0x8250(%rip), %rbx      # 0xc3c8
testq %rbx, %rbx
je 0x419b
movq (%rbx), %rax
movq 0x8231(%rip), %rdi      # 0xc3b8
movl (%rax), %edx
xorl %esi, %esi
movl $0x8000, %ecx           # imm = 0x8000
callq 0x3500
movq 0x10(%rbx), %rbx
jmp 0x4178
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/tudurom[P]windowchef/wm.c
// Function: event_destroy_notify
static void
event_destroy_notify(xcb_generic_event_t *ev)
{
	struct client *client;
	xcb_destroy_notify_event_t *e = (xcb_destroy_notify_event_t *)ev;

	client = find_client(&e->window);
	if (conf.last_window_focusing && focused_win != NULL && focused_win == client) {
	    focused_win = NULL;
		set_focused_last_best();
	}

	if (client != NULL) {
		free_window(client);
	}


	update_client_list();
	update_group_list();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x8054(%rip), %rax      # 0xc3c8
testq %rax, %rax
je 0x438c
movl 0x8(%rdi), %ecx
movq (%rax), %rbx
cmpl %ecx, (%rbx)
je 0x438e
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0x437c
xorl %ebx, %ebx
cmpb $0x1, 0x842f(%rip)      # 0xc7c4
jne 0x43b8
movq 0x8442(%rip), %rax      # 0xc7e0
testq %rax, %rax
je 0x43b8
cmpq %rbx, %rax
jne 0x43b8
movq $0x0, 0x842d(%rip) # 0xc7e0
callq 0x5a95
testq %rbx, %rbx
je 0x43eb
movq 0x30(%rbx), %r14
movq 0x38(%rbx), %r15
movq %rbx, %rdi
callq 0x32d0
leaq 0x7ff4(%rip), %rdi      # 0xc3c8
movq %r14, %rsi
callq 0x8602
leaq 0x7fed(%rip), %rdi      # 0xc3d0
movq %r15, %rsi
callq 0x8602
callq 0x5895
popq %rbx
popq %r14
popq %r15
jmp 0x5982
// File: /workspace/github_c_makefile_star2_O3/tudurom[P]windowchef/wm.c
// Function: event_enter_notify
static void
event_enter_notify(xcb_generic_event_t *ev)
{
	xcb_enter_notify_event_t *e = (xcb_enter_notify_event_t *)ev;
	struct client *client;

	if (conf.sloppy_focus == false)
		return;

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

	client = find_client(&e->event);

	if (client != NULL)
		set_focused_no_raise(client);
}

// Assembly:
cmpb $0x0, 0x83bf(%rip)      # 0xc7c0
je 0x4435
movq 0x83d6(%rip), %rax      # 0xc7e0
testq %rax, %rax
je 0x4416
movl 0xc(%rdi), %ecx
cmpl (%rax), %ecx
je 0x4435
movq 0x7fab(%rip), %rax      # 0xc3c8
testq %rax, %rax
je 0x4435
movl 0xc(%rdi), %ecx
movq (%rax), %rdi
cmpl %ecx, (%rdi)
je 0x4436
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0x4425
retq
jmp 0x4f9e
// File: /workspace/github_c_makefile_star2_O3/tudurom[P]windowchef/wm.c
// Function: event_map_notify
static void
event_map_notify(xcb_generic_event_t *ev)
{
	xcb_map_notify_event_t *e = (xcb_map_notify_event_t *)ev;
	struct client *client = find_client(&e->window);

	if (client != NULL) {
		client->mapped = true;
		set_focused(client);
		update_window_status(client);
	}
}

// Assembly:
movq 0x7c09(%rip), %rax      # 0xc3c8
testq %rax, %rax
je 0x4815
pushq %rbx
subq $0x10, %rsp
movl 0x8(%rdi), %ecx
movq (%rax), %rbx
cmpl %ecx, (%rbx)
je 0x47de
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0x47cc
jmp 0x4810
movb $0x1, 0x54(%rbx)
movq %rbx, %rdi
callq 0x4f9e
movl (%rbx), %esi
leaq 0xc(%rsp), %rcx
movl $0x0, (%rcx)
movq 0x7bba(%rip), %rdi      # 0xc3b8
movl $0x40, %edx
callq 0x3200
movq %rbx, %rdi
callq 0x510b
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/tudurom[P]windowchef/wm.c
// Function: event_unmap_notify
static void
event_unmap_notify(xcb_generic_event_t *ev)
{
	xcb_map_request_event_t *e = (xcb_map_request_event_t *)ev;
	struct client *client = NULL;

	client = find_client(&e->window);
	if (client == NULL)
		return;

	client->mapped = false;

	if (conf.last_window_focusing && focused_win != NULL && client->window == focused_win->window) {
		focused_win = NULL;
		set_focused_last_best();
	}

	update_client_list();
	update_window_status(client);
}

// Assembly:
pushq %rbx
movq 0x7baa(%rip), %rcx      # 0xc3c8
testq %rcx, %rcx
je 0x4836
movl 0x8(%rdi), %eax
movq (%rcx), %rbx
cmpl %eax, (%rbx)
je 0x4838
movq 0x10(%rcx), %rcx
testq %rcx, %rcx
jne 0x4826
popq %rbx
retq
movb $0x0, 0x54(%rbx)
movq 0x7f9d(%rip), %rcx      # 0xc7e0
testq %rcx, %rcx
setne %dl
andb 0x7f75(%rip), %dl       # 0xc7c4
cmpb $0x1, %dl
jne 0x4868
cmpl (%rcx), %eax
jne 0x4868
movq $0x0, 0x7f7d(%rip) # 0xc7e0
callq 0x5a95
callq 0x5895
movq %rbx, %rdi
popq %rbx
jmp 0x510b
// File: /workspace/github_c_makefile_star2_O3/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 0x7f72(%rip), %eax      # 0xc7f8
jne 0x48b5
cmpb $0x20, 0x1(%rbx)
jne 0x48b5
movl 0xc(%rbx), %eax
leaq 0x7f88(%rip), %rcx      # 0xc820
movq (%rcx,%rax,8), %rax
testq %rax, %rax
je 0x4935
addq $0x10, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
movq 0x7b0c(%rip), %rcx      # 0xc3c8
testq %rcx, %rcx
je 0x4935
movl 0x4(%rbx), %edx
movq (%rcx), %r14
cmpl %edx, (%r14)
je 0x48d7
movq 0x10(%rcx), %rcx
testq %rcx, %rcx
jne 0x48c4
jmp 0x4935
movq 0x7ae2(%rip), %rcx      # 0xc3c0
cmpl 0x84(%rcx), %eax
jne 0x4909
movl 0xc(%rbx), %edx
movl 0x10(%rbx), %esi
movq %r14, %rdi
callq 0x5d6a
movl 0xc(%rbx), %edx
movl 0x14(%rbx), %esi
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5d6a
cmpl 0x40(%rcx), %eax
jne 0x4935
movq %r14, %rdi
callq 0x4f9e
movl (%r14), %esi
leaq 0x4(%rsp), %rcx
movl $0x0, (%rcx)
movq 0x7a8d(%rip), %rdi      # 0xc3b8
movl $0x40, %edx
callq 0x3200
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x7e90(%rip), %rcx      # 0xc7d8
cmpl (%rcx), %eax
jne 0x4990
movzwl 0x14(%rdi), %eax
movzwl 0x16(%rdi), %edx
cmpw 0x14(%rcx), %ax
jne 0x4960
cmpw 0x16(%rcx), %dx
je 0x49a9
movw %ax, 0x14(%rcx)
movw %dx, 0x16(%rcx)
cmpl $-0x1, 0x7e9d(%rip)     # 0xc80c
je 0x49a9
callq 0x6040
movq 0x7a4b(%rip), %rbx      # 0xc3c8
testq %rbx, %rbx
je 0x49a9
movq (%rbx), %rdi
callq 0x4b33
movq 0x10(%rbx), %rbx
jmp 0x497d
movq 0x7a31(%rip), %rcx      # 0xc3c8
testq %rcx, %rcx
je 0x49a9
movq (%rcx), %rbx
cmpl %eax, (%rbx)
je 0x49ab
movq 0x10(%rcx), %rcx
jmp 0x4997
popq %rbx
retq
movswl 0x4(%rbx), %edi
movswl 0x6(%rbx), %esi
callq 0x5bc0
movq %rax, 0x40(%rbx)
movl 0x58(%rbx), %edx
movq 0x79fa(%rip), %rdi      # 0xc3c0
xorl %esi, %esi
popq %rbx
jmp 0x35c0
// File: /workspace/github_c_makefile_star2_O3/tudurom[P]windowchef/wm.c
// Function: event_focus_in
static struct client*
find_client(xcb_window_t *win)
{
	struct list_item *item;

	item = win_list;
	while (item != NULL && ((struct client *)item->data)->window != *win)
		item = item ->next;

	if (item == NULL)
		return NULL;
	else
		return item->data;
}

// Assembly:
movq 0x79dc(%rip), %rax      # 0xc3c8
testq %rax, %rax
je 0x4a04
movl 0x4(%rdi), %ecx
movq (%rax), %rdx
cmpl %ecx, (%rdx)
je 0x4a05
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0x49f4
retq
movl 0x58(%rdx), %edx
movq 0x79b1(%rip), %rdi      # 0xc3c0
xorl %esi, %esi
jmp 0x35c0
// File: /workspace/github_c_makefile_star2_O3/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 0x799a(%rip), %rbx      # 0xc3b8
movq %rbx, %rdi
callq 0x3610
movq %rbx, %rdi
movl %eax, %esi
xorl %edx, %edx
callq 0x36f0
movq 0x7da7(%rip), %rcx      # 0xc7e0
movl 0x8(%rax), %eax
testq %rcx, %rcx
je 0x4a45
cmpl (%rcx), %eax
je 0x4a5b
movq 0x7d8c(%rip), %rcx      # 0xc7d8
cmpl (%rcx), %eax
jne 0x4a5d
movq $0x0, 0x7d85(%rip) # 0xc7e0
popq %rbx
retq
movq 0x7964(%rip), %rcx      # 0xc3c8
testq %rcx, %rcx
je 0x4a5b
movq (%rcx), %rdi
cmpl %eax, (%rdi)
je 0x4a76
movq 0x10(%rcx), %rcx
jmp 0x4a64
popq %rbx
jmp 0x4f9e
// File: /workspace/github_c_makefile_star2_O3/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 0x468a(%rip), %r12      # 0x911c
leaq 0x7d07(%rip), %r13      # 0xc7a0
xorl %r14d, %r14d
movzbl 0x1(%rbx), %eax
cmpl %eax, (%r15,%r12)
jne 0x4ae7
movb 0x7d2a(%rip), %cl       # 0xc7d6
testb %cl, %cl
setne %dl
cmpb %cl, %al
setne %al
testb %al, %dl
jne 0x4add
movzwl 0x1c(%rbx), %eax
movzwl 0x7d27(%rip), %ecx      # 0xc7ec
movzwl 0x7d1c(%rip), %edx      # 0xc7e8
orl %ecx, %edx
movzwl 0x7d15(%rip), %ecx      # 0xc7ea
orl %edx, %ecx
notl %ecx
testl %eax, %ecx
je 0x4af3
movl 0x28(%r15,%r13), %edi
callq 0x63ac
addq $0x4, %r15
cmpq $0xc, %r15
jne 0x4a9c
jmp 0x4b06
movl $0x1, %edi
callq 0x63ac
movl %eax, %r14d
xorb $0x1, %r14b
jmp 0x4ae7
movq 0x78ab(%rip), %rdi      # 0xc3b8
movl 0x4(%rbx), %edx
movzbl %r14b, %esi
andl $0x1, %esi
incl %esi
callq 0x30e0
movq 0x7893(%rip), %rdi      # 0xc3b8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x3400
// File: /workspace/github_c_makefile_star2_O3/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 0x4dd2
movl %edi, %ebx
movq 0x7a4e(%rip), %rax      # 0xc7d8
cmpl %edi, (%rax)
je 0x4dd2
movq 0x7623(%rip), %rdi      # 0xc3b8
leaq 0x8(%rsp), %rcx
movl %ebx, %esi
movl $0x3, %edx
callq 0x3200
movq 0x761b(%rip), %rax      # 0xc3c8
testq %rax, %rax
je 0x4dbf
movq (%rax), %rdi
cmpl %ebx, (%rdi)
je 0x4dc1
movq 0x10(%rax), %rax
jmp 0x4dad
xorl %edi, %edi
callq 0x510b
movq 0x75eb(%rip), %rdi      # 0xc3b8
callq 0x3400
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x75c8(%rip), %rdi      # 0xc3b8
movl %ebx, %esi
movl $0xc, %edx
callq 0x3200
movq 0x75c5(%rip), %rax      # 0xc3c8
testq %rax, %rax
je 0x4e15
movq (%rax), %rdi
cmpl %ebx, (%rdi)
je 0x4e17
movq 0x10(%rax), %rax
jmp 0x4e03
xorl %edi, %edi
callq 0x510b
callq 0x581f
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x4f09
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 0x4e68
cmpb $0x0, 0x26(%rbx)
jne 0x4e68
cmpb $0x0, 0x25(%rbx)
jne 0x4e68
cmpb $0x0, 0x27(%rbx)
jne 0x4e68
cmpb $0x1, 0x28(%rbx)
jne 0x4e70
movq %rbx, %rdi
callq 0x4f0a
movb $0x1, 0x24(%rbx)
movl $0x0, 0xc(%rsp)
cmpw %r12w, 0x8(%rbx)
jne 0x4e8a
cmpw %r15w, 0xa(%rbx)
je 0x4e9d
leaq 0x4(%rbx), %rax
movzwl 0x8(%rax), %ecx
movw %cx, 0x16(%rbx)
movq (%rax), %rax
movq %rax, 0xe(%rbx)
movq 0x7514(%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 0x4d70
movl (%rbx), %edi
movzwl 0x8(%rbx), %esi
movzwl 0xa(%rbx), %edx
callq 0x4dd8
movq %rbx, %rdi
callq 0x4f9e
movq %rbx, %rdi
callq 0x50b2
movq %rbx, %rdi
callq 0x510b
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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)
movq 0xe(%rdi), %rax
movq %rax, 0x4(%rdi)
movl $0x0, 0x24(%rdi)
movb $0x0, 0x28(%rdi)
movl (%rdi), %edi
movl %eax, %edx
sarl $0x10, %edx
movswl %ax, %esi
callq 0x4d70
movl (%rbx), %edi
movzwl 0x8(%rbx), %esi
movzwl 0xa(%rbx), %edx
callq 0x4dd8
movl 0x785a(%rip), %esi      # 0xc7ac
movl 0x785c(%rip), %edx      # 0xc7b4
movq %rbx, %rdi
callq 0x5273
movq 0x7451(%rip), %rdi      # 0xc3b8
movl (%rbx), %edx
movq 0x7450(%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 0x510b
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x4096(%rip), %xmm0     # 0x9040
movaps %xmm0, (%rsp)
testq %rdi, %rdi
je 0x50ac
movq %rdi, %rbx
movq 0x73f7(%rip), %rdi      # 0xc3b8
movl (%rbx), %esi
callq 0x3280
cmpb $0x0, 0x24(%rbx)
jne 0x4fe2
movl 0x77d4(%rip), %esi      # 0xc7a8
movl 0x77d6(%rip), %edx      # 0xc7b0
movq %rbx, %rdi
callq 0x5273
movq 0x73cf(%rip), %rdi      # 0xc3b8
movl (%rbx), %edx
movl $0x1, %esi
xorl %ecx, %ecx
callq 0x3160
movq 0x73ba(%rip), %rdi      # 0xc3b8
movq 0x77d3(%rip), %rax      # 0xc7d8
movl (%rax), %edx
movq 0x73b2(%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 0x7386(%rip), %rdi      # 0xc3b8
movl (%rbx), %edx
movq 0x7385(%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 0x777e(%rip), %rdi      # 0xc7e0
cmpq %rbx, %rdi
sete %al
testq %rdi, %rdi
sete %cl
orb %al, %cl
jne 0x5089
cmpb $0x0, 0x24(%rdi)
jne 0x5089
movl 0x772e(%rip), %esi      # 0xc7ac
movl 0x7730(%rip), %edx      # 0xc7b4
callq 0x5273
movq 0x38(%rbx), %rsi
testq %rsi, %rsi
je 0x509e
leaq 0x7337(%rip), %rdi      # 0xc3d0
callq 0x8584
movq %rbx, 0x773b(%rip)      # 0xc7e0
movl (%rbx), %edi
callq 0x5536
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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
movq %rdi, %rax
xorl %edx, %edx
movq 0x72fe(%rip), %rdi      # 0xc3c0
cmpb $0x1, 0x24(%rax)
jne 0x50d6
movl 0x128(%rdi), %ecx
movl %ecx, (%rsp)
movl $0x1, %edx
cmpb $0x1, 0x26(%rax)
jne 0x50e9
movl 0x110(%rdi), %ecx
movl %edx, %esi
movl %ecx, (%rsp,%rsi,4)
incl %edx
cmpb $0x1, 0x25(%rax)
jne 0x50fc
movl 0x114(%rdi), %ecx
movl %edx, %esi
movl %ecx, (%rsp,%rsi,4)
incl %edx
movl (%rax), %esi
movq %rsp, %rcx
callq 0x3560
addq $0x38, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edi, %ebx
xorl %r14d, %r14d
leaq 0x3bd2(%rip), %r15      # 0x911c
leaq 0x724f(%rip), %r12      # 0xc7a0
movsbl 0x727e(%rip), %eax      # 0xc7d6
testl %eax, %eax
je 0x556a
movl (%r14,%r15), %ebp
movsbl %bpl, %ecx
cmpl %eax, %ecx
je 0x556e
jmp 0x557b
movl (%r14,%r15), %ebp
movzbl %bpl, %esi
movl %ebx, %edi
xorl %edx, %edx
callq 0x55a8
cmpl $0x0, 0x28(%r14,%r12)
je 0x5595
movzwl 0x724a(%rip), %edx      # 0xc7d4
movzbl %bpl, %esi
movl %ebx, %edi
callq 0x55a8
addq $0x4, %r14
cmpq $0xc, %r14
jne 0x5551
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x6b99(%rip), %rbx      # 0xc3c8
testq %rbx, %rbx
setne %al
andb 0x6f8a(%rip), %al       # 0xc7c5
cmpb $0x1, %al
jne 0x588b
leaq 0x6f62(%rip), %r14      # 0xc7a8
leaq 0x6f5f(%rip), %r15      # 0xc7ac
leaq 0x6f5c(%rip), %r12      # 0xc7b0
leaq 0x6f59(%rip), %r13      # 0xc7b4
movq (%rbx), %rdi
cmpb $0x0, 0x24(%rdi)
jne 0x5882
cmpq 0x6f75(%rip), %rdi      # 0xc7e0
movq %r15, %rax
cmoveq %r14, %rax
movl (%rax), %esi
movq %r13, %rax
cmoveq %r12, %rax
movl (%rax), %edx
callq 0x5273
movq 0x10(%rbx), %rbx
testq %rbx, %rbx
jne 0x585b
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x6b14(%rip), %rbx      # 0xc3b8
movq 0x6f2d(%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 0x6aed(%rip), %rdi      # 0xc3b8
movq 0x6f06(%rip), %rax      # 0xc7d8
movl (%rax), %esi
movq 0x6ae5(%rip), %rax      # 0xc3c0
movl 0x24(%rax), %edx
callq 0x3590
movq 0x6ace(%rip), %rdi      # 0xc3b8
movq 0x6ee7(%rip), %rax      # 0xc7d8
movl (%rax), %esi
movq 0x6ac6(%rip), %rax      # 0xc3c0
movl 0x28(%rax), %edx
callq 0x3590
testq %rbx, %rbx
je 0x5973
movq %rbx, %rdi
callq 0x36c0
movl %eax, %ebp
movq %rbx, %rdi
callq 0x34c0
testl %ebp, %ebp
je 0x5963
movq %rax, %r14
movl %ebp, %r15d
movq 0x6a9e(%rip), %rax      # 0xc3c8
xorl %r12d, %r12d
testq %rax, %rax
je 0x594b
movl (%r14,%r12,4), %edi
movq %rax, %rcx
movq (%rcx), %rdx
cmpl %edi, (%rdx)
je 0x594f
movq 0x10(%rcx), %rcx
testq %rcx, %rcx
jne 0x5939
jmp 0x595b
xorl %eax, %eax
jmp 0x595b
callq 0x5af1
movq 0x6a6d(%rip), %rax      # 0xc3c8
incq %r12
cmpq %r15, %r12
jne 0x592d
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 0x5af1
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl 0x6e2c(%rip), %eax      # 0xc7bc
testl %eax, %eax
je 0x5a4e
movb $0x1, %bl
movq 0x6a27(%rip), %rcx      # 0xc3c8
xorl %r14d, %r14d
leaq 0x4(%rsp), %r15
xorl %r12d, %r12d
movq %rcx, %rdx
testq %rcx, %rcx
je 0x59c8
movq (%rdx), %rsi
movl 0x58(%rsi), %esi
cmpq %rsi, %r12
je 0x59e0
movq 0x10(%rdx), %rdx
testq %rdx, %rdx
jne 0x59b4
movq 0x6e31(%rip), %rdx      # 0xc800
movb $0x0, (%rdx,%r12)
incq %r12
movl %eax, %edx
cmpq %rdx, %r12
jb 0x59ac
jmp 0x5a49
movq 0x6e19(%rip), %rdx      # 0xc800
testb $0x1, (%rdx,%r12)
je 0x59d4
incq %r12
movl %r12d, 0x4(%rsp)
movzbl %bl, %eax
testb $0x1, %al
movl %eax, %ebx
cmovnel %r14d, %ebx
movq 0x69b0(%rip), %rdi      # 0xc3b8
movq 0x6dc9(%rip), %rcx      # 0xc7d8
movl (%rcx), %edx
movl 0x6ddd(%rip), %ecx      # 0xc7f4
notb %al
movzbl %al, %esi
andl $0x1, %esi
addl %esi, %esi
movl $0x13, %r8d
movl $0x20, %r9d
pushq %r15
pushq $0x1
callq 0x35b0
addq $0x10, %rsp
movq 0x6987(%rip), %rcx      # 0xc3c8
movl 0x6d75(%rip), %eax      # 0xc7bc
jmp 0x59d7
testb $0x1, %bl
je 0x5a89
leaq 0x4(%rsp), %rax
movl $0x0, (%rax)
movq 0x6958(%rip), %rdi      # 0xc3b8
movq 0x6d71(%rip), %rcx      # 0xc7d8
movl (%rcx), %edx
movl 0x6d85(%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 %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x692f(%rip), %rcx      # 0xc3d0
movq 0x10(%rcx), %rax
testq %rax, %rax
cmoveq %rcx, %rax
testq %rax, %rax
je 0x5aeb
movq (%rax), %rbx
testq %rbx, %rbx
je 0x5abf
cmpb $0x1, 0x54(%rbx)
je 0x5ac5
movq 0x10(%rax), %rax
jmp 0x5aac
movq %rbx, %rdi
callq 0x4f9e
movl (%rbx), %esi
leaq 0xc(%rsp), %rcx
movl $0x0, (%rcx)
movq 0x68d7(%rip), %rdi      # 0xc3b8
movl $0x40, %edx
callq 0x3200
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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, 0x6c42(%rip)      # 0xc7bc
jbe 0x5bbf
pushq %rbx
movl %esi, %edx
movq %rdi, %rbx
movl %esi, 0x58(%rdi)
movq 0x6c74(%rip), %rax      # 0xc800
movl %esi, %ecx
movb $0x1, (%rax,%rcx)
movq 0x6827(%rip), %rdi      # 0xc3c0
movl (%rbx), %esi
callq 0x3450
callq 0x5982
movl 0x58(%rbx), %edx
movq 0x6811(%rip), %rdi      # 0xc3c0
xorl %esi, %esi
callq 0x35c0
movq %rbx, %rdi
popq %rbx
jmp 0x510b
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x6c49(%rip), %rcx      # 0xc810
testq %rcx, %rcx
je 0x5c14
movswl %di, %edx
movswl %si, %r8d
xorl %eax, %eax
movq (%rcx), %r9
movswl 0x10(%r9), %r10d
cmpw %di, %r10w
jg 0x5c0a
movzwl 0x14(%r9), %r11d
addl %r10d, %r11d
cmpl %edx, %r11d
jl 0x5c0a
movswl 0x12(%r9), %r10d
cmpw %si, %r10w
jg 0x5c0a
movzwl 0x16(%r9), %r11d
addl %r10d, %r11d
cmpl %r8d, %r11d
cmovgeq %r9, %rax
movq 0x10(%rcx), %rcx
testq %rcx, %rcx
jne 0x5bd5
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x6b9b(%rip), %eax      # 0xc7b8
cmpq $0x4, %rax
ja 0x5c86
leaq 0x3426(%rip), %rcx      # 0x9050
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movsbl 0x6b66(%rip), %esi      # 0xc7a0
movzwl 0xa(%rdi), %ecx
addw %si, %cx
negl %esi
jmp 0x5c8a
movzwl 0x8(%rdi), %esi
shrl %esi
movzwl 0xa(%rdi), %ecx
shrl %ecx
jmp 0x5c8a
movsbl 0x6b46(%rip), %ecx      # 0xc7a0
negl %ecx
movl %ecx, %esi
jmp 0x5c8a
movsbl 0x6b39(%rip), %ecx      # 0xc7a0
movzwl 0x8(%rdi), %esi
addw %cx, %si
negl %ecx
jmp 0x5c8a
movsbl 0x6b27(%rip), %ecx      # 0xc7a0
movzwl 0x8(%rdi), %esi
addw %cx, %si
addw 0xa(%rdi), %cx
jmp 0x5c8a
xorl %ecx, %ecx
xorl %esi, %esi
pushq %rax
movq 0x6726(%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 0x66f5(%rip), %rdi      # 0xc3b8
popq %rax
jmp 0x3400
// File: /workspace/github_c_makefile_star2_O3/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
movl %edi, %esi
movq 0x66cc(%rip), %rbp      # 0xc3b8
movq %rbp, %rdi
callq 0x3390
movq %rbp, %rdi
movl %eax, %esi
xorl %edx, %edx
callq 0x3420
testq %rax, %rax
je 0x5d5b
testq %r13, %r13
je 0x5d13
movzwl 0xc(%rax), %ecx
movw %cx, (%r13)
testq %r12, %r12
je 0x5d21
movzwl 0xe(%rax), %ecx
movw %cx, (%r12)
testq %r15, %r15
je 0x5d2e
movzwl 0x10(%rax), %ecx
movw %cx, (%r15)
testq %r14, %r14
je 0x5d3b
movzwl 0x12(%rax), %ecx
movw %cx, (%r14)
testq %rbx, %rbx
je 0x5d45
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_O3/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 0x5f8c
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
cmpb $0x0, 0x24(%rdi)
jne 0x5f0d
cmpb $0x0, 0x26(%rbx)
jne 0x5f0d
cmpb $0x0, 0x25(%rbx)
jne 0x5f0d
cmpb $0x0, 0x27(%rbx)
jne 0x5f0d
cmpb $0x1, 0x28(%rbx)
jne 0x5f15
movq %rbx, %rdi
callq 0x4f0a
cmpw %r14w, 0xa(%rbx)
je 0x5f2f
leaq 0x4(%rbx), %rax
movzwl 0x8(%rax), %ecx
movw %cx, 0x16(%rbx)
movq (%rax), %rax
movq %rax, 0xe(%rbx)
movsbl 0x686f(%rip), %eax      # 0xc7a5
addl %eax, %ebp
movw %bp, 0x6(%rbx)
movsbl 0x6861(%rip), %ecx      # 0xc7a4
movsbl 0x6856(%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 0x4d70
movl (%rbx), %edi
movzwl 0x8(%rbx), %esi
movzwl 0xa(%rbx), %edx
callq 0x4dd8
movb $0x1, 0x26(%rbx)
movq %rbx, %rdi
callq 0x50b2
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x510b
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x603f
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
cmpb $0x0, 0x24(%rdi)
jne 0x5fc0
cmpb $0x0, 0x26(%rbx)
jne 0x5fc0
cmpb $0x0, 0x25(%rbx)
jne 0x5fc0
cmpb $0x0, 0x27(%rbx)
jne 0x5fc0
cmpb $0x1, 0x28(%rbx)
jne 0x5fc8
movq %rbx, %rdi
callq 0x4f0a
cmpw %r14w, 0x8(%rbx)
je 0x5fe2
leaq 0x4(%rbx), %rax
movzwl 0x8(%rax), %ecx
movw %cx, 0x16(%rbx)
movq (%rax), %rax
movq %rax, 0xe(%rbx)
movsbl 0x67ba(%rip), %eax      # 0xc7a3
addl %eax, %ebp
movw %bp, 0x4(%rbx)
movsbl 0x67b0(%rip), %ecx      # 0xc7a6
movsbl 0x67a3(%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 0x4d70
movl (%rbx), %edi
movzwl 0x8(%rbx), %esi
movzwl 0xa(%rbx), %edx
callq 0x4dd8
movb $0x1, 0x25(%rbx)
movq %rbx, %rdi
callq 0x50b2
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x510b
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x636d(%rip), %rdi      # 0xc3b8
movq 0x6786(%rip), %rax      # 0xc7d8
movl (%rax), %esi
callq 0x3080
movq 0x6358(%rip), %rdi      # 0xc3b8
movl %eax, %esi
xorl %edx, %edx
callq 0x3360
testq %rax, %rax
je 0x60a0
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 0x60a5
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x32d0
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x5fb6(%rip), %rdi      # 0xc7e0
testq %rdi, %rdi
je 0x6966
cmpb $0x0, 0x24(%rdi)
jne 0x6851
cmpb $0x0, 0x26(%rdi)
jne 0x6851
cmpb $0x0, 0x25(%rdi)
jne 0x6851
cmpb $0x0, 0x27(%rdi)
jne 0x6851
cmpb $0x1, 0x28(%rdi)
jne 0x688b
callq 0x4f0a
movq 0x5f83(%rip), %r14      # 0xc7e0
movq %r14, %rdi
callq 0x4f9e
movl (%r14), %esi
leaq 0xc(%rsp), %rcx
movl $0x0, (%rcx)
movq 0x5b3e(%rip), %rdi      # 0xc3b8
movl $0x40, %edx
callq 0x3200
movq 0x5f55(%rip), %rdi      # 0xc7e0
movq 0x8(%rbx), %xmm0
pshuflw $0xe8, %xmm0, %xmm0     # xmm0 = xmm0[0,2,2,3,4,5,6,7]
movq (%rbx), %xmm2
pxor %xmm1, %xmm1
pcmpeqd %xmm1, %xmm2
packssdw %xmm2, %xmm2
psubw %xmm0, %xmm1
pand %xmm2, %xmm0
pandn %xmm1, %xmm2
por %xmm0, %xmm2
movd 0x4(%rdi), %xmm0
movdqa %xmm2, 0x10(%rsp)
paddw %xmm2, %xmm0
movd %xmm0, 0x4(%rdi)
movl (%rdi), %ebx
movq 0x5ae6(%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 0x695a
movb 0x1a(%rax), %bpl
movq %rax, %rdi
callq 0x32d0
cmpb $0x2, %bpl
jne 0x695a
movq 0x5ed2(%rip), %rax      # 0xc7d8
cmpl %ebx, (%rax)
je 0x695a
leaq 0xa(%rsp), %r14
leaq 0x8(%rsp), %r15
leaq 0x6(%rsp), %rcx
leaq 0x4(%rsp), %r8
movl %ebx, %edi
movq %r14, %rsi
movq %r15, %rdx
xorl %r9d, %r9d
callq 0x5cc9
movdqa 0x10(%rsp), %xmm0
movd %xmm0, %eax
addw (%r14), %ax
pextrw $0x1, %xmm0, %ecx
addw (%r15), %cx
movw %ax, (%r14)
movw %cx, (%r15)
movswl %ax, %esi
movswl %cx, %edx
movl %ebx, %edi
callq 0x4d70
movq 0x5e7f(%rip), %rdi      # 0xc7e0
callq 0x5c17
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x5e61(%rip), %rdi      # 0xc7e0
testq %rdi, %rdi
je 0x6a35
cmpb $0x0, 0x24(%rdi)
jne 0x69a6
cmpb $0x0, 0x26(%rdi)
jne 0x69a6
cmpb $0x0, 0x25(%rdi)
jne 0x69a6
cmpb $0x0, 0x27(%rdi)
jne 0x69a6
cmpb $0x1, 0x28(%rdi)
jne 0x69e0
callq 0x4f0a
movq 0x5e2e(%rip), %r14      # 0xc7e0
movq %r14, %rdi
callq 0x4f9e
movl (%r14), %esi
leaq 0x4(%rsp), %rcx
movl $0x0, (%rcx)
movq 0x59e9(%rip), %rdi      # 0xc3b8
movl $0x40, %edx
callq 0x3200
movq 0x5e00(%rip), %rdi      # 0xc7e0
movq 0x8(%rbx), %xmm0
pshuflw $0xe8, %xmm0, %xmm0     # xmm0 = xmm0[0,2,2,3,4,5,6,7]
movq (%rbx), %xmm1
pcmpeqd 0x262a(%rip), %xmm1     # 0x9020
packssdw %xmm1, %xmm1
pxor %xmm2, %xmm2
psubw %xmm0, %xmm2
pand %xmm1, %xmm2
pandn %xmm0, %xmm1
por %xmm2, %xmm1
movd %xmm1, 0x4(%rdi)
movd %xmm1, %eax
movl (%rdi), %edi
pextrw $0x1, %xmm1, %ecx
movswl %ax, %esi
movswl %cx, %edx
callq 0x4d70
movq 0x5db0(%rip), %rdi      # 0xc7e0
callq 0x5c17
addq $0x8, %rsp
popq %rbx
popq %r14
retq