LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/history.c
// Function: history_find_node
bool history_find_node(history_dir_t hdi, coordinates_t *ref, coordinates_t *dst, node_select_t *sel)
{
	if (history_needle == NULL || record_history) {
		history_needle = history_tail;
	}

	history_t *h;
	for (h = history_needle; h != NULL; h = (hdi == HISTORY_OLDER ? h->prev : h->next)) {
		if (!h->latest ||
		    h->loc.node == NULL ||
		    h->loc.node == ref->node ||
		    h->loc.node->hidden ||
		    !node_matches(&h->loc, ref, sel)) {
			continue;
		}
		if (!record_history) {
			history_needle = h;
		}
		*dst = h->loc;
		return true;
	}
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
leaq 0x22b3a(%rip), %rax     # 0x35708
cmpq $0x0, (%rax)
je 0x12be0
leaq 0x22b7d(%rip), %rax     # 0x35758
testb $0x1, (%rax)
je 0x12bf4
leaq 0x22b29(%rip), %rax     # 0x35710
movq (%rax), %rcx
leaq 0x22b17(%rip), %rax     # 0x35708
movq %rcx, (%rax)
leaq 0x22b0d(%rip), %rax     # 0x35708
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x12cc4
movq -0x28(%rbp), %rax
testb $0x1, 0x18(%rax)
je 0x12c57
movq -0x28(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x12c57
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
je 0x12c57
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
testb $0x1, 0x25(%rax)
jne 0x12c57
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x23df0
testb $0x1, %al
jne 0x12c59
jmp 0x12c97
leaq 0x22af8(%rip), %rax     # 0x35758
testb $0x1, (%rax)
jne 0x12c73
movq -0x28(%rbp), %rcx
leaq 0x22a98(%rip), %rax     # 0x35708
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x12cc8
cmpl $0x0, -0x8(%rbp)
jne 0x12cab
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x12cb7
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x12c02
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/history.c
// Function: history_find_newest_desktop
bool history_find_newest_desktop(coordinates_t *ref, coordinates_t *dst, desktop_select_t *sel)
{
	for (history_t *h = history_tail; h != NULL; h = h->prev) {
		if (desktop_matches(&h->loc, ref, sel)) {
			*dst = h->loc;
			return true;
		}
	}

	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
leaq 0x22a15(%rip), %rax     # 0x35710
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x12d54
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x23ab0
testb $0x1, %al
jne 0x12d20
jmp 0x12d44
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x12d58
jmp 0x12d46
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x12d02
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/history.c
// Function: history_find_desktop
bool history_find_desktop(history_dir_t hdi, coordinates_t *ref, coordinates_t *dst, desktop_select_t *sel)
{
	if (history_needle == NULL || record_history) {
		history_needle = history_tail;
	}

	history_t *h;
	for (h = history_needle; h != NULL; h = (hdi == HISTORY_OLDER ? h->prev : h->next)) {
		if (!h->latest ||
		    h->loc.desktop == ref->desktop ||
		    !desktop_matches(&h->loc, ref, sel)) {
			continue;
		}
		if (!record_history) {
			history_needle = h;
		}
		*dst = h->loc;
		return true;
	}
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
leaq 0x2297a(%rip), %rax     # 0x35708
cmpq $0x0, (%rax)
je 0x12da0
leaq 0x229bd(%rip), %rax     # 0x35758
testb $0x1, (%rax)
je 0x12db4
leaq 0x22969(%rip), %rax     # 0x35710
movq (%rax), %rcx
leaq 0x22957(%rip), %rax     # 0x35708
movq %rcx, (%rax)
leaq 0x2294d(%rip), %rax     # 0x35708
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x12e6b
movq -0x28(%rbp), %rax
testb $0x1, 0x18(%rax)
je 0x12dfe
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
je 0x12dfe
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x23ab0
testb $0x1, %al
jne 0x12e00
jmp 0x12e3e
leaq 0x22951(%rip), %rax     # 0x35758
testb $0x1, (%rax)
jne 0x12e1a
movq -0x28(%rbp), %rcx
leaq 0x228f1(%rip), %rax     # 0x35708
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x12e6f
cmpl $0x0, -0x8(%rbp)
jne 0x12e52
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x12e5e
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x12dc2
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/history.c
// Function: history_find_newest_monitor
bool history_find_newest_monitor(coordinates_t *ref, coordinates_t *dst, monitor_select_t *sel)
{
	for (history_t *h = history_tail; h != NULL; h = h->prev) {
		if (monitor_matches(&h->loc, ref, sel)) {
			*dst = h->loc;
			return true;
		}
	}

	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
leaq 0x22875(%rip), %rax     # 0x35710
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x12ef4
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x23a20
testb $0x1, %al
jne 0x12ec0
jmp 0x12ee4
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x12ef8
jmp 0x12ee6
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x12ea2
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/history.c
// Function: history_find_monitor
bool history_find_monitor(history_dir_t hdi, coordinates_t *ref, coordinates_t *dst, monitor_select_t *sel)
{
	if (history_needle == NULL || record_history) {
		history_needle = history_tail;
	}

	history_t *h;

	for (h = history_needle; h != NULL; h = (hdi == HISTORY_OLDER ? h->prev : h->next)) {
		if (!h->latest ||
		    h->loc.monitor == ref->monitor ||
		    !monitor_matches(&h->loc, ref, sel)) {
			continue;
		}
		if (!record_history) {
			history_needle = h;
		}
		*dst = h->loc;
		return true;
	}

	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
leaq 0x227da(%rip), %rax     # 0x35708
cmpq $0x0, (%rax)
je 0x12f40
leaq 0x2281d(%rip), %rax     # 0x35758
testb $0x1, (%rax)
je 0x12f54
leaq 0x227c9(%rip), %rax     # 0x35710
movq (%rax), %rcx
leaq 0x227b7(%rip), %rax     # 0x35708
movq %rcx, (%rax)
leaq 0x227ad(%rip), %rax     # 0x35708
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x13009
movq -0x28(%rbp), %rax
testb $0x1, 0x18(%rax)
je 0x12f9c
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
je 0x12f9c
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x23a20
testb $0x1, %al
jne 0x12f9e
jmp 0x12fdc
leaq 0x227b3(%rip), %rax     # 0x35758
testb $0x1, (%rax)
jne 0x12fb8
movq -0x28(%rbp), %rcx
leaq 0x22753(%rip), %rax     # 0x35708
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x1300d
cmpl $0x0, -0x8(%rbp)
jne 0x12ff0
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x12ffc
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x12f62
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/history.c
// Function: history_rank
uint32_t history_rank(node_t *n)
{
	uint32_t r = 0;
	history_t *h = history_tail;
	while (h != NULL && (!h->latest || h->loc.node != n)) {
		h = h->prev;
		r++;
	}
	if (h == NULL) {
		return UINT32_MAX;
	} else {
		return r;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
leaq 0x226da(%rip), %rax     # 0x35710
movq (%rax), %rax
movq %rax, -0x20(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x20(%rbp)
movb %al, -0x21(%rbp)
je 0x13070
movq -0x20(%rbp), %rcx
movb $0x1, %al
testb $0x1, 0x18(%rcx)
movb %al, -0x22(%rbp)
je 0x1306a
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x10(%rbp), %rax
setne %al
movb %al, -0x22(%rbp)
movb -0x22(%rbp), %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x13079
jmp 0x13090
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1303d
cmpq $0x0, -0x20(%rbp)
jne 0x130a0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x130a6
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/events.c
// Function: handle_event
void handle_event(xcb_generic_event_t *evt)
{
	uint8_t resp_type = XCB_EVENT_RESPONSE_TYPE(evt);
	switch (resp_type) {
		case XCB_MAP_REQUEST:
			map_request(evt);
			break;
		case XCB_DESTROY_NOTIFY:
			destroy_notify(evt);
			break;
		case XCB_UNMAP_NOTIFY:
			unmap_notify(evt);
			break;
		case XCB_CLIENT_MESSAGE:
			client_message(evt);
			break;
		case XCB_CONFIGURE_REQUEST:
			configure_request(evt);
			break;
		case XCB_CONFIGURE_NOTIFY:
			configure_notify(evt);
			break;
		case XCB_PROPERTY_NOTIFY:
			property_notify(evt);
			break;
		case XCB_ENTER_NOTIFY:
			enter_notify(evt);
			break;
		case XCB_MOTION_NOTIFY:
			motion_notify(evt);
			break;
		case XCB_BUTTON_PRESS:
			button_press(evt);
			break;
		case XCB_FOCUS_IN:
			focus_in(evt);
			break;
		case XCB_MAPPING_NOTIFY:
			mapping_notify(evt);
			break;
		case 0:
			process_error(evt);
			break;
		default:
			if (randr && resp_type == randr_base + XCB_RANDR_SCREEN_CHANGE_NOTIFY) {
				update_monitors();
			}
			break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movb (%rax), %al
andb $0x7f, %al
movb %al, -0x9(%rbp)
movzbl -0x9(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x22, %rax
ja 0x13188
movq -0x18(%rbp), %rax
leaq 0x1aa7c(%rip), %rcx     # 0x2db60
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
callq 0x131c0
jmp 0x131ad
movq -0x8(%rbp), %rdi
callq 0x131f0
jmp 0x131ad
movq -0x8(%rbp), %rdi
callq 0x13220
jmp 0x131ad
movq -0x8(%rbp), %rdi
callq 0x13290
jmp 0x131ad
movq -0x8(%rbp), %rdi
callq 0x13490
jmp 0x131ad
movq -0x8(%rbp), %rdi
callq 0x13a40
jmp 0x131ad
movq -0x8(%rbp), %rdi
callq 0x13a90
jmp 0x131ad
movq -0x8(%rbp), %rdi
callq 0x13ce0
jmp 0x131ad
movq -0x8(%rbp), %rdi
callq 0x13dd0
jmp 0x131ad
movq -0x8(%rbp), %rdi
callq 0x13fa0
jmp 0x131ad
movq -0x8(%rbp), %rdi
callq 0x14140
jmp 0x131ad
movq -0x8(%rbp), %rdi
callq 0x14240
jmp 0x131ad
movq -0x8(%rbp), %rdi
callq 0x142b0
jmp 0x131ad
leaq 0x225f1(%rip), %rax     # 0x35780
testb $0x1, (%rax)
je 0x131ab
movzbl -0x9(%rbp), %eax
movzbl 0x22c61(%rip), %ecx     # 0x35e00
addl $0x0, %ecx
cmpl %ecx, %eax
jne 0x131ab
callq 0x93b0
jmp 0x131ad
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/events.c
// Function: unmap_notify
void unmap_notify(xcb_generic_event_t *evt)
{
	xcb_unmap_notify_event_t *e = (xcb_unmap_notify_event_t *) evt;

	if (e->window == motion_recorder.id) {
		/* Unmapping the motion recorder in `query_pointer` will produce
		 * unwanted enter notify events. We can filter those events because
		 * their sequence number is the same as the sequence number of the
		 * related unmap notify event. This is a technique used by i3-wm to
		 * filter enter notify events. */
		motion_recorder.sequence = e->sequence;
		return;
	}

	/* Filter out destroyed windows */
	if (!window_exists(e->window)) {
		return;
	}

	set_window_state(e->window, XCB_ICCCM_WM_STATE_WITHDRAWN);
	unmanage_window(e->window);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
leaq 0x22496(%rip), %rcx     # 0x356d8
cmpl (%rcx), %eax
jne 0x1325b
movq -0x10(%rbp), %rax
movw 0x2(%rax), %cx
leaq 0x22483(%rip), %rax     # 0x356d8
movw %cx, 0x4(%rax)
jmp 0x13287
movq -0x10(%rbp), %rax
movl 0x8(%rax), %edi
callq 0x18ba0
testb $0x1, %al
jne 0x1326d
jmp 0x13287
movq -0x10(%rbp), %rax
movl 0x8(%rax), %edi
xorl %esi, %esi
callq 0x16750
movq -0x10(%rbp), %rax
movl 0x8(%rax), %edi
callq 0x16850
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/events.c
// Function: configure_notify
void configure_notify(xcb_generic_event_t *evt)
{
	xcb_configure_notify_event_t *e = (xcb_configure_notify_event_t *) evt;

	if (e->window == root) {
		screen_width = e->width;
		screen_height = e->height;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
leaq 0x21d0a(%rip), %rcx     # 0x35768
cmpl (%rcx), %eax
jne 0x13a84
movq -0x10(%rbp), %rax
movzwl 0x14(%rax), %ecx
leaq 0x21cfb(%rip), %rax     # 0x3576c
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movzwl 0x16(%rax), %ecx
leaq 0x21cee(%rip), %rax     # 0x35770
movl %ecx, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/events.c
// Function: enter_notify
void enter_notify(xcb_generic_event_t *evt)
{
	xcb_enter_notify_event_t *e = (xcb_enter_notify_event_t *) evt;
	xcb_window_t win = e->event;

	if (e->mode != XCB_NOTIFY_MODE_NORMAL || e->detail == XCB_NOTIFY_DETAIL_INFERIOR) {
		return;
	}

	/* Ignore the enter notify events that we generated by unmapping the motion
	 * recorder window in `query_pointer`. */
	if (motion_recorder.enabled && motion_recorder.sequence == e->sequence) {
		return;
	}

	if (win == mon->root || (mon->desk->focus != NULL &&
	                         (win == mon->desk->focus->id ||
	                          (mon->desk->focus->presel != NULL &&
	                           win == mon->desk->focus->presel->feedback)))) {
		return;
	}

	update_motion_recorder();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x1e(%rax), %eax
cmpl $0x0, %eax
jne 0x13d18
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x2, %eax
jne 0x13d1d
jmp 0x13dc1
leaq 0x219b4(%rip), %rax     # 0x356d8
testb $0x1, 0x6(%rax)
je 0x13d43
leaq 0x219a7(%rip), %rax     # 0x356d8
movzwl 0x4(%rax), %eax
movq -0x10(%rbp), %rcx
movzwl 0x2(%rcx), %ecx
cmpl %ecx, %eax
jne 0x13d43
jmp 0x13dc1
movl -0x14(%rbp), %eax
leaq 0x219b3(%rip), %rcx     # 0x35700
movq (%rcx), %rcx
cmpl 0x28(%rcx), %eax
je 0x13dba
leaq 0x219a4(%rip), %rax     # 0x35700
movq (%rax), %rax
movq 0x58(%rax), %rax
cmpq $0x0, 0x38(%rax)
je 0x13dbc
movl -0x14(%rbp), %eax
leaq 0x2198c(%rip), %rcx     # 0x35700
movq (%rcx), %rcx
movq 0x58(%rcx), %rcx
movq 0x38(%rcx), %rcx
cmpl (%rcx), %eax
je 0x13dba
leaq 0x21976(%rip), %rax     # 0x35700
movq (%rax), %rax
movq 0x58(%rax), %rax
movq 0x38(%rax), %rax
cmpq $0x0, 0x10(%rax)
je 0x13dbc
movl -0x14(%rbp), %eax
leaq 0x2195a(%rip), %rcx     # 0x35700
movq (%rcx), %rcx
movq 0x58(%rcx), %rcx
movq 0x38(%rcx), %rcx
movq 0x10(%rcx), %rcx
cmpl 0xc(%rcx), %eax
jne 0x13dbc
jmp 0x13dc1
callq 0x18450
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/events.c
// Function: focus_in
void focus_in(xcb_generic_event_t *evt)
{
	xcb_focus_in_event_t *e = (xcb_focus_in_event_t *) evt;

	if (e->mode == XCB_NOTIFY_MODE_GRAB || e->mode == XCB_NOTIFY_MODE_UNGRAB
	    || e->detail == XCB_NOTIFY_DETAIL_POINTER || e->detail == XCB_NOTIFY_DETAIL_POINTER_ROOT
	    || e->detail == XCB_NOTIFY_DETAIL_NONE) {
		return;
	}

	if (mon->desk->focus != NULL) {
		if (e->event == mon->desk->focus->id) {
			return;
		}
		if (e->event == root) {
			/* Some clients expect the window manager to refocus the
			   focused window in this case */
			focus_node(mon, mon->desk, mon->desk->focus);
			return;
		}
	}

	coordinates_t loc;
	if (locate_window(e->event, &loc)) {
		// prevent input focus stealing
		update_input_focus();
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x8(%rax), %eax
cmpl $0x1, %eax
je 0x14195
movq -0x10(%rbp), %rax
movzbl 0x8(%rax), %eax
cmpl $0x2, %eax
je 0x14195
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x5, %eax
je 0x14195
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x6, %eax
je 0x14195
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x7, %eax
jne 0x1419a
jmp 0x1422e
leaq 0x2155f(%rip), %rax     # 0x35700
movq (%rax), %rax
movq 0x58(%rax), %rax
cmpq $0x0, 0x38(%rax)
je 0x14213
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
leaq 0x21543(%rip), %rcx     # 0x35700
movq (%rcx), %rcx
movq 0x58(%rcx), %rcx
movq 0x38(%rcx), %rcx
cmpl (%rcx), %eax
jne 0x141ce
jmp 0x1422e
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
leaq 0x2158c(%rip), %rcx     # 0x35768
cmpl (%rcx), %eax
jne 0x14211
leaq 0x21519(%rip), %rax     # 0x35700
movq (%rax), %rdi
leaq 0x2150f(%rip), %rax     # 0x35700
movq (%rax), %rax
movq 0x58(%rax), %rsi
leaq 0x21501(%rip), %rax     # 0x35700
movq (%rax), %rax
movq 0x58(%rax), %rax
movq 0x38(%rax), %rdx
callq 0xd720
jmp 0x1422e
jmp 0x14213
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edi
leaq -0x28(%rbp), %rsi
callq 0x26b20
testb $0x1, %al
jne 0x14229
jmp 0x1422e
callq 0x18890
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/events.c
// Function: mapping_notify
void mapping_notify(xcb_generic_event_t *evt)
{
	if (mapping_events_count == 0) {
		return;
	}

	xcb_mapping_notify_event_t *e = (xcb_mapping_notify_event_t *) evt;

	if (e->request == XCB_MAPPING_POINTER) {
		return;
	}

	if (mapping_events_count > 0) {
		mapping_events_count--;
	}

	ungrab_buttons();
	grab_buttons();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x21b91(%rip), %rax     # 0x35de4
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x1425d
jmp 0x142a2
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x4(%rax), %eax
cmpl $0x2, %eax
jne 0x14274
jmp 0x142a2
leaq 0x21b69(%rip), %rax     # 0x35de4
movsbl (%rax), %eax
cmpl $0x0, %eax
jle 0x14298
leaq 0x21b5a(%rip), %rax     # 0x35de4
movb (%rax), %cl
addb $-0x1, %cl
leaq 0x21b4e(%rip), %rax     # 0x35de4
movb %cl, (%rax)
callq 0x151f0
callq 0x15130
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/events.c
// Function: process_error
void process_error(xcb_generic_event_t *evt)
{
	xcb_request_error_t *e = (xcb_request_error_t *) evt;
	/* Ignore unavoidable failed requests */
	if (e->error_code == ERROR_CODE_BAD_WINDOW) {
		return;
	}
	warn("Failed request: %s, %s: 0x%08X.\n", xcb_event_get_request_label(e->major_opcode), xcb_event_get_error_label(e->error_code), e->bad_value);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x3, %eax
jne 0x142d3
jmp 0x1430d
movq -0x10(%rbp), %rax
movzbl 0xa(%rax), %edi
callq 0x4970
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %edi
callq 0x4370
movq -0x18(%rbp), %rsi
movq %rax, %rdx
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
leaq 0x198f2(%rip), %rdi     # 0x2dbf8
movb $0x0, %al
callq 0x6410
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/pointer.c
// Function: pointer_init
void pointer_init(void)
{
	num_lock = modfield_from_keysym(XK_Num_Lock);
	caps_lock = modfield_from_keysym(XK_Caps_Lock);
	scroll_lock = modfield_from_keysym(XK_Scroll_Lock);
	if (caps_lock == XCB_NO_SYMBOL) {
		caps_lock = XCB_MOD_MASK_LOCK;
	}
	grabbing = false;
	grabbed_node = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0xff7f, %edi           # imm = 0xFF7F
callq 0x14b30
movw %ax, 0x2133b(%rip)      # 0x35e10
movl $0xffe5, %edi           # imm = 0xFFE5
callq 0x14b30
movw %ax, 0x2132c(%rip)      # 0x35e12
movl $0xff14, %edi           # imm = 0xFF14
callq 0x14b30
movw %ax, 0x2131d(%rip)      # 0x35e14
movzwl 0x21314(%rip), %eax     # 0x35e12
cmpq $0x0, %rax
jne 0x14b0d
movw $0x2, 0x21305(%rip)     # 0x35e12
movb $0x0, 0x21302(%rip)     # 0x35e16
movq $0x0, 0x212f9(%rip) # 0x35e18
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/pointer.c
// Function: window_grab_buttons
void window_grab_buttons(xcb_window_t win)
{
	for (unsigned int i = 0; i < LENGTH(BUTTONS); i++) {
		if (click_to_focus == (int8_t) XCB_BUTTON_INDEX_ANY || click_to_focus == (int8_t) BUTTONS[i]) {
			window_grab_button(win, BUTTONS[i], XCB_NONE);
		}
		if (pointer_actions[i] != ACTION_NONE) {
			window_grab_button(win, BUTTONS[i], pointer_modifier);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpq $0x3, %rax
jae 0x14d92
leaq 0x210e7(%rip), %rax     # 0x35ded
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x14d2e
leaq 0x210d8(%rip), %rax     # 0x35ded
movsbl (%rax), %eax
movl -0x8(%rbp), %ecx
movl %ecx, %edx
leaq 0x18ef8(%rip), %rcx     # 0x2dc1c
movl (%rcx,%rdx,4), %ecx
movsbl %cl, %ecx
cmpl %ecx, %eax
jne 0x14d4a
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %eax
movl %eax, %ecx
leaq 0x18edf(%rip), %rax     # 0x2dc1c
movl (%rax,%rcx,4), %eax
xorl %edx, %edx
movzbl %al, %esi
callq 0x14da0
movl -0x8(%rbp), %eax
movl %eax, %ecx
leaq 0x21082(%rip), %rax     # 0x35dd8
cmpl $0x0, (%rax,%rcx,4)
je 0x14d82
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %eax
movl %eax, %ecx
leaq 0x18eb1(%rip), %rax     # 0x2dc1c
movl (%rax,%rcx,4), %eax
movb %al, %cl
leaq 0x21059(%rip), %rax     # 0x35dd0
movzbl %cl, %esi
movzwl (%rax), %edx
callq 0x14da0
jmp 0x14d84
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x14cf2
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/pointer.c
// Function: grab_buttons
void grab_buttons(void)
{
	for (monitor_t *m = mon_head; m != NULL; m = m->next) {
		for (desktop_t *d = m->desk_head; d != NULL; d = d->next) {
			for (node_t *n = first_extrema(d->root); n != NULL; n = next_leaf(n, d->root)) {
				window_grab_buttons(n->id);
				if (n->presel != NULL) {
					window_grab_buttons(n->presel->feedback);
				}
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x205b9(%rip), %rax     # 0x356f8
movq (%rax), %rax
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x151de
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x151cb
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0xbe70
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x151bb
movq -0x18(%rbp), %rax
movl (%rax), %edi
callq 0x14ce0
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x151a2
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl 0xc(%rax), %edi
callq 0x14ce0
jmp 0x151a4
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rsi
callq 0xbf80
movq %rax, -0x18(%rbp)
jmp 0x15175
jmp 0x151bd
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x1515d
jmp 0x151cd
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x15146
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/pointer.c
// Function: ungrab_buttons
void ungrab_buttons(void)
{
	for (monitor_t *m = mon_head; m != NULL; m = m->next) {
		for (desktop_t *d = m->desk_head; d != NULL; d = d->next) {
			for (node_t *n = first_extrema(d->root); n != NULL; n = next_leaf(n, d->root)) {
				xcb_ungrab_button(dpy, XCB_BUTTON_INDEX_ANY, n->id, XCB_MOD_MASK_ANY);
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x204f9(%rip), %rax     # 0x356f8
movq (%rax), %rax
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x15295
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x15282
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0xbe70
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x15272
leaq 0x20475(%rip), %rax     # 0x356b8
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movl (%rax), %edx
xorl %esi, %esi
movl $0x8000, %ecx           # imm = 0x8000
callq 0x4820
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rsi
callq 0xbf80
movq %rax, -0x18(%rbp)
jmp 0x15235
jmp 0x15274
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x1521d
jmp 0x15284
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x15206
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/window.c
// Function: schedule_window
void schedule_window(xcb_window_t win)
{
	coordinates_t loc;
	uint8_t override_redirect = 0;
	xcb_get_window_attributes_reply_t *wa = xcb_get_window_attributes_reply(dpy, xcb_get_window_attributes(dpy, win), NULL);

	if (wa != NULL) {
		override_redirect = wa->override_redirect;
		free(wa);
	}

	if (override_redirect || locate_window(win, &loc)) {
		return;
	}

	/* ignore pending windows */
	for (pending_rule_t *pr = pending_rule_head; pr != NULL; pr = pr->next) {
		if (pr->win == win) {
			return;
		}
	}

	rule_consequence_t *csq = make_rule_consequence();
	apply_rules(win, csq);
	if (!schedule_rules(win, csq)) {
		manage_window(win, csq, -1);
		free(csq);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0x4(%rbp)
movb $0x0, -0x21(%rbp)
leaq 0x1fb22(%rip), %rax     # 0x356b8
movq (%rax), %rax
movq %rax, -0x50(%rbp)
leaq 0x1fb14(%rip), %rax     # 0x356b8
movq (%rax), %rdi
movl -0x4(%rbp), %esi
callq 0x47f0
movq -0x50(%rbp), %rdi
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x44a0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x15be0
movq -0x30(%rbp), %rax
movb 0x1b(%rax), %al
movb %al, -0x21(%rbp)
movq -0x30(%rbp), %rdi
callq 0x4450
movzbl -0x21(%rbp), %eax
cmpl $0x0, %eax
jne 0x15bfb
movl -0x4(%rbp), %edi
leaq -0x20(%rbp), %rsi
callq 0x26b20
testb $0x1, %al
jne 0x15bfb
jmp 0x15bfd
jmp 0x15c6f
leaq 0x1fac4(%rip), %rax     # 0x356c8
movq (%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x15c30
movq -0x40(%rbp), %rax
movl 0x4(%rax), %eax
cmpl -0x4(%rbp), %eax
jne 0x15c20
jmp 0x15c6f
jmp 0x15c22
movq -0x40(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x15c0b
callq 0x298f0
movq %rax, -0x48(%rbp)
movl -0x4(%rbp), %edi
movq -0x48(%rbp), %rsi
callq 0x2a7c0
movl -0x4(%rbp), %edi
movq -0x48(%rbp), %rsi
callq 0x2a950
testb $0x1, %al
jne 0x15c6f
movl -0x4(%rbp), %edi
movq -0x48(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x15c80
movq -0x48(%rbp), %rdi
callq 0x4450
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/window.c
// Function: initialize_floating_rectangle
void initialize_floating_rectangle(node_t *n)
{
	client_t *c = n->client;

	xcb_get_geometry_reply_t *geo = xcb_get_geometry_reply(dpy, xcb_get_geometry(dpy, n->id), NULL);

	if (geo != NULL) {
		c->floating_rectangle = (xcb_rectangle_t) {geo->x, geo->y, geo->width, geo->height};
	}

	free(geo);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x10(%rbp)
leaq 0x1f0e9(%rip), %rax     # 0x356b8
movq (%rax), %rax
movq %rax, -0x30(%rbp)
leaq 0x1f0db(%rip), %rax     # 0x356b8
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl (%rax), %esi
callq 0x45b0
movq -0x30(%rbp), %rdi
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x4680
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x16648
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movw 0xc(%rcx), %cx
movw %cx, -0x24(%rbp)
movq -0x18(%rbp), %rcx
movw 0xe(%rcx), %cx
movw %cx, -0x22(%rbp)
movq -0x18(%rbp), %rcx
movw 0x10(%rcx), %cx
movw %cx, -0x20(%rbp)
movq -0x18(%rbp), %rcx
movw 0x12(%rcx), %cx
movw %cx, -0x1e(%rbp)
movq -0x24(%rbp), %rcx
movq %rcx, 0x318(%rax)
movq -0x18(%rbp), %rdi
callq 0x4450
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/window.c
// Function: window_center
void window_center(monitor_t *m, client_t *c)
{
	xcb_rectangle_t *r = &c->floating_rectangle;
	xcb_rectangle_t a = m->rectangle;
	if (r->width >= a.width) {
		r->x = a.x;
	} else {
		r->x = a.x + (a.width - r->width) / 2;
	}
	if (r->height >= a.height) {
		r->y = a.y;
	} else {
		r->y = a.y + (a.height - r->height) / 2;
	}
	r->x -= c->border_width;
	r->y -= c->border_width;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x318, %rax            # imm = 0x318
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x4c(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movzwl 0x4(%rax), %eax
movzwl -0x1c(%rbp), %ecx
cmpl %ecx, %eax
jl 0x166a3
movw -0x20(%rbp), %cx
movq -0x18(%rbp), %rax
movw %cx, (%rax)
jmp 0x166d1
movswl -0x20(%rbp), %eax
movl %eax, -0x24(%rbp)
movzwl -0x1c(%rbp), %eax
movq -0x18(%rbp), %rcx
movzwl 0x4(%rcx), %ecx
subl %ecx, %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x24(%rbp), %eax
addl %ecx, %eax
movw %ax, %cx
movq -0x18(%rbp), %rax
movw %cx, (%rax)
movq -0x18(%rbp), %rax
movzwl 0x6(%rax), %eax
movzwl -0x1a(%rbp), %ecx
cmpl %ecx, %eax
jl 0x166ef
movw -0x1e(%rbp), %cx
movq -0x18(%rbp), %rax
movw %cx, 0x2(%rax)
jmp 0x1671e
movswl -0x1e(%rbp), %eax
movl %eax, -0x28(%rbp)
movzwl -0x1a(%rbp), %eax
movq -0x18(%rbp), %rcx
movzwl 0x6(%rcx), %ecx
subl %ecx, %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x28(%rbp), %eax
addl %ecx, %eax
movw %ax, %cx
movq -0x18(%rbp), %rax
movw %cx, 0x2(%rax)
movq -0x10(%rbp), %rax
movl 0x300(%rax), %edx
movq -0x18(%rbp), %rax
movswl (%rax), %ecx
subl %edx, %ecx
movw %cx, (%rax)
movq -0x10(%rbp), %rax
movl 0x300(%rax), %edx
movq -0x18(%rbp), %rax
movswl 0x2(%rax), %ecx
subl %edx, %ecx
movw %cx, 0x2(%rax)
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/window.c
// Function: draw_border
void draw_border(node_t *n, bool focused_node, bool focused_monitor)
{
	if (n == NULL) {
		return;
	}

	uint32_t border_color_pxl = get_border_color(focused_node, focused_monitor);
	for (node_t *f = first_extrema(n); f != NULL; f = next_leaf(f, n)) {
		if (f->client != NULL) {
			window_draw_border(f->id, border_color_pxl);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dl, %al
movb %sil, %cl
movq %rdi, -0x8(%rbp)
andb $0x1, %cl
movb %cl, -0x9(%rbp)
andb $0x1, %al
movb %al, -0xa(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x167e5
jmp 0x16840
movb -0x9(%rbp), %cl
movb -0xa(%rbp), %al
andb $0x1, %cl
andb $0x1, %al
movzbl %cl, %edi
movzbl %al, %esi
callq 0x17110
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0xbe70
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x16840
movq -0x18(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x1682b
movq -0x18(%rbp), %rax
movl (%rax), %edi
movl -0x10(%rbp), %esi
callq 0x17180
jmp 0x1682d
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0xbf80
movq %rax, -0x18(%rbp)
jmp 0x1680b
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/window.c
// Function: unmanage_window
void unmanage_window(xcb_window_t win)
{
	coordinates_t loc;
	if (locate_window(win, &loc)) {
		put_status(SBSC_MASK_NODE_REMOVE, "node_remove 0x%08X 0x%08X 0x%08X\n", loc.monitor->id, loc.desktop->id, win);
		remove_node(loc.monitor, loc.desktop, loc.node);
		arrange(loc.monitor, loc.desktop);
	} else {
		for (pending_rule_t *pr = pending_rule_head; pr != NULL; pr = pr->next) {
			if (pr->win == win) {
				remove_pending_rule(pr);
				return;
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %edi
leaq -0x20(%rbp), %rsi
callq 0x26b20
testb $0x1, %al
jne 0x1686d
jmp 0x168b2
movq -0x20(%rbp), %rax
movl 0x20(%rax), %edx
movq -0x18(%rbp), %rax
movl 0x20(%rax), %ecx
movl -0x4(%rbp), %r8d
movl $0x10000, %edi          # imm = 0x10000
leaq 0x1708e(%rip), %rsi     # 0x2d919
movb $0x0, %al
callq 0x2c0b0
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0xfaf0
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xafd0
jmp 0x168f0
leaq 0x1ee0f(%rip), %rax     # 0x356c8
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x168ee
movq -0x28(%rbp), %rax
movl 0x4(%rax), %eax
cmpl -0x4(%rbp), %eax
jne 0x168de
movq -0x28(%rbp), %rdi
callq 0x29a70
jmp 0x168f0
jmp 0x168e0
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x168c0
jmp 0x168f0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/window.c
// Function: is_presel_window
bool is_presel_window(xcb_window_t win)
{
	xcb_icccm_get_wm_class_reply_t reply;
	bool ret = false;
	if (xcb_icccm_get_wm_class_reply(dpy, xcb_icccm_get_wm_class(dpy, win), &reply, NULL) == 1) {
		if (streq(BSPWM_CLASS_NAME, reply.class_name) && streq(PRESEL_FEEDBACK_I, reply.instance_name)) {
			ret = true;
		}
		xcb_icccm_get_wm_class_reply_wipe(&reply);
	}
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movb $0x0, -0x21(%rbp)
leaq 0x1eda2(%rip), %rax     # 0x356b8
movq (%rax), %rax
movq %rax, -0x30(%rbp)
leaq 0x1ed94(%rip), %rax     # 0x356b8
movq (%rax), %rdi
movl -0x4(%rbp), %esi
callq 0x4920
movq -0x30(%rbp), %rdi
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %esi
leaq -0x20(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0x49f0
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x16985
movq -0x18(%rbp), %rsi
leaq 0x17431(%rip), %rdi     # 0x2dd8a
callq 0x4800
cmpl $0x0, %eax
jne 0x1697c
movq -0x20(%rbp), %rsi
leaq 0x17422(%rip), %rdi     # 0x2dd90
callq 0x4800
cmpl $0x0, %eax
jne 0x1697c
movb $0x1, -0x21(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x4470
movb -0x21(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/window.c
// Function: refresh_presel_feedbacks
void refresh_presel_feedbacks(monitor_t *m, desktop_t *d, node_t *n)
{
	if (n == NULL) {
		return;
	} else {
		if (n->presel != NULL) {
			draw_presel_feedback(m, d, n);
		}
		refresh_presel_feedbacks(m, d, n->first_child);
		refresh_presel_feedbacks(m, d, n->second_child);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x16e1d
jmp 0x16e63
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x16e39
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x16b80
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rdx
callq 0x16e00
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdx
callq 0x16e00
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/window.c
// Function: show_presel_feedbacks
void show_presel_feedbacks(monitor_t *m, desktop_t *d, node_t *n)
{
	if (n == NULL) {
		return;
	} else {
		if (n->presel != NULL) {
			window_show(n->presel->feedback);
		}
		show_presel_feedbacks(m, d, n->first_child);
		show_presel_feedbacks(m, d, n->second_child);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x16e8d
jmp 0x16ed2
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x16ea8
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl 0xc(%rax), %edi
callq 0x16590
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rdx
callq 0x16e70
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdx
callq 0x16e70
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/window.c
// Function: hide_presel_feedbacks
void hide_presel_feedbacks(monitor_t *m, desktop_t *d, node_t *n)
{
	if (n == NULL) {
		return;
	} else {
		if (n->presel != NULL) {
			window_hide(n->presel->feedback);
		}
		hide_presel_feedbacks(m, d, n->first_child);
		hide_presel_feedbacks(m, d, n->second_child);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x16efd
jmp 0x16f42
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x16f18
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl 0xc(%rax), %edi
callq 0x16f50
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rdx
callq 0x16ee0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdx
callq 0x16ee0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/window.c
// Function: update_colors_in
void update_colors_in(node_t *n, desktop_t *d, monitor_t *m)
{
	if (n == NULL) {
		return;
	} else {
		if (n->presel != NULL) {
			uint32_t pxl = get_color_pixel(presel_feedback_color);
			xcb_change_window_attributes(dpy, n->presel->feedback, XCB_CW_BACK_PIXEL, &pxl);
			if (d == m->desk) {
				/* hack to induce back pixel refresh */
				window_hide(n->presel->feedback);
				window_show(n->presel->feedback);
			}
		}
		if (n == d->focus) {
			draw_border(n, true, (m == mon));
		} else if (n->client != NULL) {
			draw_border(n, false, (m == mon));
		} else {
			update_colors_in(n->first_child, d, m);
			update_colors_in(n->second_child, d, m);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x17000
jmp 0x17104
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x17070
leaq 0x1ec7e(%rip), %rdi     # 0x35c90
callq 0x63a0
movl %eax, -0x1c(%rbp)
leaq 0x1e697(%rip), %rax     # 0x356b8
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl 0xc(%rax), %esi
movl $0x2, %edx
leaq -0x1c(%rbp), %rcx
callq 0x46e0
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x58(%rcx), %rax
jne 0x1706e
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl 0xc(%rax), %edi
callq 0x16f50
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl 0xc(%rax), %edi
callq 0x16590
jmp 0x17070
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x38(%rcx), %rax
jne 0x170a5
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
leaq 0x1e673(%rip), %rcx     # 0x35700
cmpq (%rcx), %rax
sete %al
movzbl %al, %edx
andl $0x1, %edx
movl $0x1, %esi
callq 0x167c0
jmp 0x17102
movq -0x8(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x170d6
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
leaq 0x1e641(%rip), %rcx     # 0x35700
cmpq (%rcx), %rax
sete %al
xorl %ecx, %ecx
movzbl %al, %edx
andl $0x1, %edx
xorl %esi, %esi
callq 0x167c0
jmp 0x17100
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x16fe0
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x16fe0
jmp 0x17102
jmp 0x17104
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/window.c
// Function: get_border_color
uint32_t get_border_color(bool focused_node, bool focused_monitor)
{
	if (focused_monitor && focused_node) {
		return get_color_pixel(focused_border_color);
	} else if (focused_node) {
		return get_color_pixel(active_border_color);
	} else {
		return get_color_pixel(normal_border_color);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %sil, %al
movb %dil, %cl
andb $0x1, %cl
movb %cl, -0x5(%rbp)
andb $0x1, %al
movb %al, -0x6(%rbp)
testb $0x1, -0x6(%rbp)
je 0x17146
testb $0x1, -0x5(%rbp)
je 0x17146
leaq 0x1ea54(%rip), %rdi     # 0x35b90
callq 0x63a0
movl %eax, -0x4(%rbp)
jmp 0x1716c
testb $0x1, -0x5(%rbp)
je 0x1715d
leaq 0x1e93d(%rip), %rdi     # 0x35a90
callq 0x63a0
movl %eax, -0x4(%rbp)
jmp 0x1716c
leaq 0x1e82c(%rip), %rdi     # 0x35990
callq 0x63a0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/window.c
// Function: adopt_orphans
void adopt_orphans(void)
{
	xcb_query_tree_reply_t *qtr = xcb_query_tree_reply(dpy, xcb_query_tree(dpy, root), NULL);
	if (qtr == NULL) {
		return;
	}

	int len = xcb_query_tree_children_length(qtr);
	xcb_window_t *wins = xcb_query_tree_children(qtr);

	for (int i = 0; i < len; i++) {
		uint32_t idx;
		xcb_window_t win = wins[i];
		if (xcb_ewmh_get_wm_desktop_reply(ewmh, xcb_ewmh_get_wm_desktop(ewmh, win), &idx, NULL) == 1) {
			schedule_window(win);
		}
	}

	free(qtr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
leaq 0x1e4e9(%rip), %rax     # 0x356b8
movq (%rax), %rax
movq %rax, -0x30(%rbp)
leaq 0x1e4db(%rip), %rax     # 0x356b8
movq (%rax), %rdi
leaq 0x1e581(%rip), %rax     # 0x35768
movl (%rax), %esi
callq 0x4360
movq -0x30(%rbp), %rdi
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x45a0
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x17211
jmp 0x172a4
movq -0x8(%rbp), %rdi
callq 0x4a40
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x47c0
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x1729b
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x24(%rbp)
leaq 0x1ebd2(%rip), %rax     # 0x35e20
movq (%rax), %rax
movq %rax, -0x38(%rbp)
leaq 0x1ebc4(%rip), %rax     # 0x35e20
movq (%rax), %rdi
movl -0x24(%rbp), %esi
callq 0x4720
movq -0x38(%rbp), %rdi
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %esi
leaq -0x20(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0x172b0
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x1728e
movl -0x24(%rbp), %edi
callq 0x15b80
jmp 0x17290
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x17231
movq -0x8(%rbp), %rdi
callq 0x4450
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/window.c
// Function: get_window_rectangle
xcb_rectangle_t get_window_rectangle(node_t *n)
{
	client_t *c = n->client;
	if (c != NULL) {
		xcb_get_geometry_reply_t *g = xcb_get_geometry_reply(dpy, xcb_get_geometry(dpy, n->id), NULL);
		if (g != NULL) {
			xcb_rectangle_t rect = (xcb_rectangle_t) {g->x, g->y, g->width, g->height};
			free(g);
			return rect;
		}
	}
	return (xcb_rectangle_t) {0, 0, screen_width, screen_height};
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x1738d
leaq 0x1e3a2(%rip), %rax     # 0x356b8
movq (%rax), %rax
movq %rax, -0x30(%rbp)
leaq 0x1e394(%rip), %rax     # 0x356b8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movl (%rax), %esi
callq 0x45b0
movq -0x30(%rbp), %rdi
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x4680
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x1738b
movq -0x20(%rbp), %rax
movw 0xc(%rax), %ax
movw %ax, -0x8(%rbp)
movq -0x20(%rbp), %rax
movw 0xe(%rax), %ax
movw %ax, -0x6(%rbp)
movq -0x20(%rbp), %rax
movw 0x10(%rax), %ax
movw %ax, -0x4(%rbp)
movq -0x20(%rbp), %rax
movw 0x12(%rax), %ax
movw %ax, -0x2(%rbp)
movq -0x20(%rbp), %rdi
callq 0x4450
jmp 0x173b3
jmp 0x1738d
movw $0x0, -0x8(%rbp)
movw $0x0, -0x6(%rbp)
leaq 0x1e3cc(%rip), %rax     # 0x3576c
movl (%rax), %eax
movw %ax, -0x4(%rbp)
leaq 0x1e3c3(%rip), %rax     # 0x35770
movl (%rax), %eax
movw %ax, -0x2(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/window.c
// Function: update_motion_recorder
void update_motion_recorder(void)
{
	xcb_point_t pt;
	xcb_window_t win = XCB_NONE;
	query_pointer(&win, &pt);
	if (win == XCB_NONE) {
		return;
	}
	monitor_t *m = monitor_from_point(pt);
	if (m == NULL) {
		return;
	}
	desktop_t *d = m->desk;
	node_t *n = NULL;
	for (n = first_extrema(d->root); n != NULL; n = next_leaf(n, d->root)) {
		if (n->id == win || (n->presel != NULL && n->presel->feedback == win)) {
			break;
		}
	}
	if ((n != NULL && n != mon->desk->focus) || (n == NULL && m != mon)) {
		enable_motion_recorder(win);
	} else {
		disable_motion_recorder();
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x8(%rbp)
leaq -0x8(%rbp), %rdi
leaq -0x4(%rbp), %rsi
callq 0x176a0
movl -0x8(%rbp), %eax
cmpq $0x0, %rax
jne 0x1847a
jmp 0x18544
movl -0x4(%rbp), %edi
callq 0x9080
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x18492
jmp 0x18544
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0xbe70
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x184ff
movq -0x20(%rbp), %rax
movl (%rax), %eax
cmpl -0x8(%rbp), %eax
je 0x184e4
movq -0x20(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x184e6
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movl 0xc(%rax), %eax
cmpl -0x8(%rbp), %eax
jne 0x184e6
jmp 0x184ff
jmp 0x184e8
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rsi
callq 0xbf80
movq %rax, -0x20(%rbp)
jmp 0x184b7
cmpq $0x0, -0x20(%rbp)
je 0x1851e
movq -0x20(%rbp), %rax
leaq 0x1d1ef(%rip), %rcx     # 0x35700
movq (%rcx), %rcx
movq 0x58(%rcx), %rcx
cmpq 0x38(%rcx), %rax
jne 0x18535
cmpq $0x0, -0x20(%rbp)
jne 0x1853f
movq -0x10(%rbp), %rax
leaq 0x1d1d0(%rip), %rcx     # 0x35700
cmpq (%rcx), %rax
je 0x1853f
movl -0x8(%rbp), %edi
callq 0x18550
jmp 0x18544
callq 0x18640
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)