LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/stack.c
// Function: stack_insert_after
void stack_insert_after(stacking_list_t *a, node_t *n)
{
	stacking_list_t *s = make_stack(n);
	if (a == NULL) {
		stack_head = stack_tail = s;
	} else {
		if (a->node == n) {
			free(s);
			return;
		}
		remove_stack_node(n);
		stacking_list_t *b = a->next;
		if (b != NULL) {
			b->prev = s;
		}
		s->next = b;
		s->prev = a;
		a->next = s;
		if (stack_tail == a) {
			stack_tail = s;
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
movl $0x1, %edi
movl $0x18, %esi
callq 0x48b0
movq %rax, %rbx
movq %r15, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
testq %r14, %r14
je 0xcf7f
cmpq %r15, (%r14)
je 0xcf99
movq %r15, %rdi
callq 0xcfa6
movq 0x10(%r14), %rax
testq %rax, %rax
je 0xcf65
movq %rbx, 0x8(%rax)
movq %rax, 0x10(%rbx)
movq %r14, 0x8(%rbx)
movq %rbx, 0x10(%r14)
leaq 0x1c7c8(%rip), %rax     # 0x29740
cmpq %r14, (%rax)
jne 0xcf93
jmp 0xcf90
leaq 0x1c7ba(%rip), %rax     # 0x29740
movq %rbx, (%rax)
leaq 0x1c7b8(%rip), %rax     # 0x29748
movq %rbx, (%rax)
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x4460
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/stack.c
// Function: remove_stack_node
void remove_stack_node(node_t *n)
{
	for (node_t *f = first_extrema(n); f != NULL; f = next_leaf(f, n)) {
		for (stacking_list_t *s = stack_head; s != NULL; s = s->next) {
			if (s->node == f) {
				remove_stack(s);
				break;
			}
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x92fd
testq %rax, %rax
je 0xcfed
movq %rax, %r14
leaq 0x1c786(%rip), %r15     # 0x29748
movq (%r15), %rdi
testq %rdi, %rdi
je 0xcfda
cmpq %r14, (%rdi)
je 0xcfd5
movq 0x10(%rdi), %rdi
jmp 0xcfc5
callq 0xd07a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x9363
movq %rax, %r14
testq %rax, %rax
jne 0xcfc2
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/stack.c
// Function: stack_insert_before
void stack_insert_before(stacking_list_t *a, node_t *n)
{
	stacking_list_t *s = make_stack(n);
	if (a == NULL) {
		stack_head = stack_tail = s;
	} else {
		if (a->node == n) {
			free(s);
			return;
		}
		remove_stack_node(n);
		stacking_list_t *b = a->prev;
		if (b != NULL) {
			b->next = s;
		}
		s->prev = b;
		s->next = a;
		a->prev = s;
		if (stack_head == a) {
			stack_head = s;
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
movl $0x1, %edi
movl $0x18, %esi
callq 0x48b0
movq %rax, %rbx
movq %r15, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
testq %r14, %r14
je 0xd053
cmpq %r15, (%r14)
je 0xd06d
movq %r15, %rdi
callq 0xcfa6
movq 0x8(%r14), %rax
testq %rax, %rax
je 0xd039
movq %rbx, 0x10(%rax)
movq %rax, 0x8(%rbx)
movq %r14, 0x10(%rbx)
movq %rbx, 0x8(%r14)
leaq 0x1c6fc(%rip), %rax     # 0x29748
cmpq %r14, (%rax)
jne 0xd067
jmp 0xd064
leaq 0x1c6e6(%rip), %rax     # 0x29740
movq %rbx, (%rax)
leaq 0x1c6e4(%rip), %rax     # 0x29748
movq %rbx, (%rax)
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x4460
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/stack.c
// Function: remove_stack
void remove_stack(stacking_list_t *s)
{
	if (s == NULL) {
		return;
	}
	stacking_list_t *a = s->prev;
	stacking_list_t *b = s->next;
	if (a != NULL) {
		a->next = b;
	}
	if (b != NULL) {
		b->prev = a;
	}
	if (s == stack_head) {
		stack_head = b;
	}
	if (s == stack_tail) {
		stack_tail = a;
	}
	free(s);
}

// Assembly:
testq %rdi, %rdi
je 0xd0c0
movq 0x8(%rdi), %rax
movq 0x10(%rdi), %rcx
testq %rax, %rax
je 0xd090
movq %rcx, 0x10(%rax)
testq %rcx, %rcx
je 0xd099
movq %rax, 0x8(%rcx)
leaq 0x1c6a8(%rip), %rdx     # 0x29748
cmpq %rdi, (%rdx)
jne 0xd0a8
movq %rcx, (%rdx)
leaq 0x1c691(%rip), %rcx     # 0x29740
cmpq %rdi, (%rcx)
jne 0x4460
movq %rax, (%rcx)
jmp 0x4460
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/stack.c
// Function: limit_above
stacking_list_t *limit_above(node_t *n)
{
	stacking_list_t *s = stack_head;
	while (s != NULL && stack_cmp(n->client, s->node->client) >= 0) {
		s = s->next;
	}
	if (s == NULL) {
		s = stack_tail;
	}
	if (s->node == n) {
		s = s->prev;
	}
	return s;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x1c5d1(%rip), %rax     # 0x29748
movq (%rax), %rbx
testq %rbx, %rbx
je 0xd19f
movq 0x48(%r14), %r15
movq (%rbx), %rax
movq 0x48(%rax), %rsi
movq %r15, %rdi
callq 0xd0f7
testl %eax, %eax
js 0xd1a9
movq 0x10(%rbx), %rbx
testq %rbx, %rbx
jne 0xd183
leaq 0x1c59a(%rip), %rax     # 0x29740
movq (%rax), %rbx
cmpq %r14, (%rbx)
jne 0xd1b2
movq 0x8(%rbx), %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/stack.c
// Function: limit_below
stacking_list_t *limit_below(node_t *n)
{
	stacking_list_t *s = stack_tail;
	while (s != NULL && stack_cmp(n->client, s->node->client) <= 0) {
		s = s->prev;
	}
	if (s == NULL) {
		s = stack_head;
	}
	if (s->node == n) {
		s = s->next;
	}
	return s;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x1c576(%rip), %rax     # 0x29740
movq (%rax), %rbx
testq %rbx, %rbx
je 0xd1f2
movq 0x48(%r14), %r15
movq (%rbx), %rax
movq 0x48(%rax), %rsi
movq %r15, %rdi
callq 0xd0f7
testl %eax, %eax
jg 0xd1fc
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
jne 0xd1d6
leaq 0x1c54f(%rip), %rax     # 0x29748
movq (%rax), %rbx
cmpq %r14, (%rbx)
jne 0xd205
movq 0x10(%rbx), %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/stack.c
// Function: stack
void stack(desktop_t *d, node_t *n, bool focused)
{
	for (node_t *f = first_extrema(n); f != NULL; f = next_leaf(f, n)) {
		if (f->client == NULL || (IS_FLOATING(f->client) && !auto_raise)) {
			continue;
		}

		if (stack_head == NULL) {
			stack_insert_after(NULL, f);
		} else {
			stacking_list_t *s = (focused ? limit_above(f) : limit_below(f));
			if (s == NULL) {
				continue;
			}
			int i = stack_cmp(f->client, s->node->client);
			if (i < 0 || (i == 0 && !focused)) {
				stack_insert_before(s, f);
				window_below(f->id, s->node->id);
				put_status(SBSC_MASK_NODE_STACK, "node_stack 0x%08X below 0x%08X\n", f->id, s->node->id);
			} else {
				stack_insert_after(s, f);
				window_above(f->id, s->node->id);
				put_status(SBSC_MASK_NODE_STACK, "node_stack 0x%08X above 0x%08X\n", f->id, s->node->id);
			}
		}
	}

	ewmh_update_client_list(true);
	restack_presel_feedbacks(d);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, (%rsp)
movq %rsi, %rdi
callq 0x92fd
testq %rax, %rax
je 0xd346
movq %rax, %r15
leaq 0x1c50b(%rip), %rbx     # 0x29748
movq 0x48(%r15), %r13
testq %r13, %r13
je 0xd32f
cmpl $0x2, 0x308(%r13)
jne 0xd264
leaq 0x1c510(%rip), %rax     # 0x2976b
cmpb $0x1, (%rax)
jne 0xd32f
cmpq $0x0, (%rbx)
je 0xd279
movq %r15, %rdi
testb %bpl, %bpl
je 0xd2a4
callq 0xd168
jmp 0xd2a9
movl $0x1, %edi
movl $0x18, %esi
callq 0x48b0
movq %r15, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
leaq 0x1c4a7(%rip), %rcx     # 0x29740
movq %rax, (%rcx)
movq %rax, (%rbx)
jmp 0xd32f
callq 0xd1bb
movq %rax, %r12
testq %rax, %rax
je 0xd32f
movq (%r12), %rax
movq 0x48(%rax), %rsi
movq %r13, %rdi
callq 0xd0f7
testl %eax, %eax
setns %al
setne %cl
orb %bpl, %cl
movq %r12, %rdi
movq %r15, %rsi
testb %cl, %al
je 0xd300
callq 0xcf1f
movl (%r15), %edi
movq (%r12), %rax
movl (%rax), %esi
callq 0x101a2
movl (%r15), %edx
movq (%r12), %rax
movl (%rax), %ecx
movl $0x200000, %edi         # imm = 0x200000
leaq 0x126a3(%rip), %rsi     # 0x1f9a1
jmp 0xd328
callq 0xcff3
movl (%r15), %edi
movq (%r12), %rax
movl (%rax), %esi
callq 0x1133a
movl (%r15), %edx
movq (%r12), %rax
movl (%rax), %ecx
movl $0x200000, %edi         # imm = 0x200000
leaq 0x12659(%rip), %rsi     # 0x1f981
xorl %eax, %eax
callq 0x1eb0b
movq %r15, %rdi
movq %r14, %rsi
callq 0x9363
movq %rax, %r15
testq %rax, %rax
jne 0xd23d
movl $0x1, %edi
callq 0x1e462
movq (%rsp), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xd367
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/stack.c
// Function: restack_presel_feedbacks_in
void restack_presel_feedbacks_in(node_t *r, node_t *n)
{
	if (r == NULL) {
		return;
	} else {
		if (r->presel != NULL) {
			window_above(r->presel->feedback, n->id);
		}
		restack_presel_feedbacks_in(r->first_child, n);
		restack_presel_feedbacks_in(r->second_child, n);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testq %r14, %r14
je 0xd3ca
movq 0x10(%r14), %rax
testq %rax, %rax
je 0xd3b8
movl 0xc(%rax), %edi
movl (%rbx), %esi
callq 0x101a2
movq 0x30(%r14), %rdi
movq %rbx, %rsi
callq 0xd396
movq 0x38(%r14), %r14
jmp 0xd3a0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/history.c
// Function: make_history
history_t *make_history(monitor_t *m, desktop_t *d, node_t *n)
{
	history_t *h = calloc(1, sizeof(history_t));
	h->loc = (coordinates_t) {m, d, n};
	h->prev = h->next = NULL;
	h->latest = true;
	return h;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %edi
movl $0x30, %esi
callq 0x48b0
movq %r15, (%rax)
movq %r14, 0x8(%rax)
movq %rbx, 0x10(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rax)
movb $0x1, 0x18(%rax)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/history.c
// Function: history_insert_after
void history_insert_after(history_t *a, history_t *b)
{
	a->next = b->next;
	if (b->next != NULL) {
		b->next->prev = a;
	}
	b->next = a;
	a->prev = b;
	if (history_tail == b) {
		history_tail = a;
	}
}

// Assembly:
movq 0x28(%rsi), %rax
movq %rax, 0x28(%rdi)
movq 0x28(%rsi), %rax
testq %rax, %rax
je 0xd5c5
movq %rdi, 0x20(%rax)
movq %rdi, 0x28(%rsi)
movq %rsi, 0x20(%rdi)
leaq 0x1c14c(%rip), %rax     # 0x29720
cmpq %rsi, (%rax)
je 0xd5da
retq
movq %rdi, (%rax)
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/history.c
// Function: history_insert_before
void history_insert_before(history_t *a, history_t *b)
{
	a->prev = b->prev;
	if (b->prev != NULL) {
		b->prev->next = a;
	}
	b->prev = a;
	a->next = b;
	if (history_head == b) {
		history_head = a;
	}
}

// Assembly:
movq 0x20(%rsi), %rax
movq %rax, 0x20(%rdi)
movq 0x20(%rsi), %rax
testq %rax, %rax
je 0xd5f3
movq %rdi, 0x28(%rax)
movq %rdi, 0x20(%rsi)
movq %rsi, 0x28(%rdi)
leaq 0x1c126(%rip), %rax     # 0x29728
cmpq %rsi, (%rax)
je 0xd608
retq
movq %rdi, (%rax)
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/history.c
// Function: history_remove
void history_remove(desktop_t *d, node_t *n, bool deep)
{
	/* removing from the newest to the oldest is required */
	/* for maintaining the *latest* attribute */
	history_t *b = history_tail;
	while (b != NULL) {
		if ((n != NULL && ((deep && is_descendant(b->loc.node, n)) || (!deep && b->loc.node == n))) ||
		    (n == NULL && d == b->loc.desktop)) {
			history_t *a = b->next;
			history_t *c = b->prev;
			if (a != NULL) {
				/* remove duplicate entries */
				while (c != NULL && ((a->loc.node != NULL && a->loc.node == c->loc.node) ||
				       (a->loc.node == NULL && a->loc.desktop == c->loc.desktop))) {
					history_t *p = c->prev;
					if (history_head == c) {
						history_head = history_tail;
					}
					if (history_needle == c) {
						history_needle = history_tail;
					}
					free(c);
					c = p;
				}
				a->prev = c;
			}
			if (c != NULL) {
				c->next = a;
			}
			if (history_tail == b) {
				history_tail = c;
			}
			if (history_head == b) {
				history_head = a;
			}
			if (history_needle == b) {
				history_needle = c;
			}
			free(b);
			b = c;
		} else {
			b = b->prev;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
leaq 0x1c0fa(%rip), %rax     # 0x29720
movq (%rax), %r14
testq %r14, %r14
je 0xd74d
movl %edx, %r13d
movq %rsi, %rbp
leaq 0x1c0e9(%rip), %r15     # 0x29728
leaq 0x1c0d2(%rip), %rbx     # 0x29718
movl %edx, 0x4(%rsp)
movq %rsi, 0x10(%rsp)
testq %rbp, %rbp
je 0xd67d
testb %r13b, %r13b
je 0xd66e
movq 0x10(%r14), %rdi
movq %rbp, %rsi
callq 0x9da7
testb %al, %al
jne 0xd688
testb %r13b, %r13b
jne 0xd674
cmpq %rbp, 0x10(%r14)
je 0xd688
movq 0x20(%r14), %r12
jmp 0xd741
movq 0x8(%rsp), %rax
cmpq %rax, 0x8(%r14)
jne 0xd674
movq 0x20(%r14), %r12
movq 0x28(%r14), %rbp
testq %rbp, %rbp
je 0xd704
testq %r12, %r12
je 0xd6f5
movq 0x10(%rbp), %rax
testq %rax, %rax
je 0xd6af
cmpq 0x10(%r12), %rax
je 0xd6ba
testq %rax, %rax
jne 0xd6f5
movq 0x8(%rbp), %rax
cmpq 0x8(%r12), %rax
jne 0xd6f5
cmpq %r12, (%r15)
jne 0xd6cc
leaq 0x1c05a(%rip), %rax     # 0x29720
movq (%rax), %rax
movq %rax, (%r15)
cmpq %r12, (%rbx)
jne 0xd6de
leaq 0x1c048(%rip), %rax     # 0x29720
movq (%rax), %rax
movq %rax, (%rbx)
movq 0x20(%r12), %r13
movq %r12, %rdi
callq 0x4460
movq %r13, %r12
testq %r13, %r13
jne 0xd69a
jmp 0xd6f8
movq %r12, %r13
movq %r13, 0x20(%rbp)
movq %r13, %r12
movl 0x4(%rsp), %r13d
testq %r12, %r12
je 0xd70e
movq %rbp, 0x28(%r12)
leaq 0x1c00b(%rip), %rax     # 0x29720
cmpq %r14, (%rax)
jne 0xd724
leaq 0x1bfff(%rip), %rax     # 0x29720
movq %r12, (%rax)
cmpq %r14, (%r15)
jne 0xd72c
movq %rbp, (%r15)
cmpq %r14, (%rbx)
jne 0xd734
movq %r12, (%rbx)
movq %r14, %rdi
callq 0x4460
movq 0x10(%rsp), %rbp
movq %r12, %r14
testq %r12, %r12
jne 0xd64f
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/history.c
// Function: empty_history
void empty_history(void)
{
	history_t *h = history_head;
	while (h != NULL) {
		history_t *next = h->next;
		free(h);
		h = next;
	}
	history_head = history_tail = NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x1bfc1(%rip), %rbx     # 0x29728
movq (%rbx), %rdi
testq %rdi, %rdi
je 0xd780
movq 0x28(%rdi), %r14
callq 0x4460
movq %r14, %rdi
testq %r14, %r14
jne 0xd76f
leaq 0x1bf99(%rip), %rax     # 0x29720
xorl %ecx, %ecx
movq %rcx, (%rax)
movq %rcx, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/history.c
// Function: history_last_node
node_t *history_last_node(desktop_t *d, node_t *n)
{
	for (history_t *h = history_tail; h != NULL; h = h->prev) {
		if (h->latest && h->loc.node != NULL && !h->loc.node->hidden &&
		    !is_descendant(h->loc.node, n) && h->loc.desktop == d) {
			return h->loc.node;
		}
	}
	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0x1bf7a(%rip), %rax     # 0x29720
movq (%rax), %r12
testq %r12, %r12
je 0xd7ed
movq %rsi, %r14
movq %rdi, %r15
xorl %ebx, %ebx
cmpb $0x1, 0x18(%r12)
jne 0xd7e1
movq 0x10(%r12), %rdi
testq %rdi, %rdi
je 0xd7e1
cmpb $0x0, 0x25(%rdi)
jne 0xd7e1
movq %r14, %rsi
callq 0x9da7
testb %al, %al
jne 0xd7e1
cmpq %r15, 0x8(%r12)
je 0xd7fe
movq 0x20(%r12), %r12
testq %r12, %r12
jne 0xd7b6
jmp 0xd7ef
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x10(%r12), %rbx
jmp 0xd7ef
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/history.c
// Function: history_find_newest_node
bool history_find_newest_node(coordinates_t *ref, coordinates_t *dst, node_select_t *sel)
{
	for (history_t *h = history_tail; h != NULL; h = h->prev) {
		if (h->loc.node == NULL ||
		    h->loc.node->hidden ||
		    !node_matches(&h->loc, ref, sel)) {
			continue;
		}
		*dst = h->loc;
		return true;
	}

	return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq 0x1beb9(%rip), %rax     # 0x29720
movq (%rax), %r12
testq %r12, %r12
setne %bl
je 0xd8be
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r13
movq 0x10(%r12), %rax
testq %rax, %rax
je 0xd89d
cmpb $0x0, 0x25(%rax)
jne 0xd89d
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x192cf
testb %al, %al
jne 0xd8ac
movq 0x20(%r12), %r12
testq %r12, %r12
setne %bl
jne 0xd87b
jmp 0xd8be
movq 0x10(%r12), %rax
movq %rax, 0x10(%r14)
movups (%r12), %xmm0
movups %xmm0, (%r14)
andb $0x1, %bl
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rsi, %r15
leaq 0x1be33(%rip), %r13     # 0x29718
cmpq $0x0, (%r13)
je 0xd8f8
leaq 0x1be75(%rip), %rax     # 0x29768
cmpb $0x1, (%rax)
jne 0xd906
leaq 0x1be21(%rip), %rax     # 0x29720
movq (%rax), %rax
movq %rax, (%r13)
movq (%r13), %r12
testq %r12, %r12
setne %bpl
je 0xd963
movq %rdx, (%rsp)
xorl %eax, %eax
testl %edi, %edi
setne %al
leaq 0x20(,%rax,8), %rbx
cmpb $0x1, 0x18(%r12)
jne 0xd956
movq 0x10(%r12), %rax
testq %rax, %rax
je 0xd956
cmpq 0x10(%r15), %rax
je 0xd956
cmpb $0x0, 0x25(%rax)
jne 0xd956
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x192cf
testb %al, %al
jne 0xd978
movq (%r12,%rbx), %r12
testq %r12, %r12
setne %bpl
jne 0xd926
andb $0x1, %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1bde9(%rip), %rax     # 0x29768
cmpb $0x0, (%rax)
jne 0xd988
movq %r12, (%r13)
movq 0x10(%r12), %rax
movq (%rsp), %rcx
movq %rax, 0x10(%rcx)
movups (%r12), %xmm0
movups %xmm0, (%rcx)
jmp 0xd963
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0x1bd72(%rip), %rax     # 0x29720
movq (%rax), %r14
testq %r14, %r14
setne %bpl
je 0xd9f3
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r12
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x190a4
testb %al, %al
jne 0xd9e4
movq 0x20(%r14), %r14
testq %r14, %r14
setne %bpl
jne 0xd9c3
jmp 0xd9f3
movq 0x10(%r14), %rax
movq %rax, 0x10(%rbx)
movups (%r14), %xmm0
movups %xmm0, (%rbx)
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rsi, %r15
leaq 0x1bd02(%rip), %r13     # 0x29718
cmpq $0x0, (%r13)
je 0xda29
leaq 0x1bd44(%rip), %rax     # 0x29768
cmpb $0x1, (%rax)
jne 0xda37
leaq 0x1bcf0(%rip), %rax     # 0x29720
movq (%rax), %rax
movq %rax, (%r13)
movq (%r13), %r12
testq %r12, %r12
setne %bpl
je 0xdab0
movq %rdx, (%rsp)
xorl %eax, %eax
testl %edi, %edi
setne %al
leaq 0x20(,%rax,8), %rbx
cmpb $0x1, 0x18(%r12)
jne 0xda7c
movq 0x8(%r12), %rax
cmpq 0x8(%r15), %rax
je 0xda7c
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x190a4
testb %al, %al
jne 0xda8b
movq (%r12,%rbx), %r12
testq %r12, %r12
setne %bpl
jne 0xda57
jmp 0xdab0
leaq 0x1bcd6(%rip), %rax     # 0x29768
cmpb $0x0, (%rax)
jne 0xda9b
movq %r12, (%r13)
movq 0x10(%r12), %rax
movq (%rsp), %rcx
movq %rax, 0x10(%rcx)
movups (%r12), %xmm0
movups %xmm0, (%rcx)
andb $0x1, %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0x1bc4c(%rip), %rax     # 0x29720
movq (%rax), %r14
testq %r14, %r14
setne %bpl
je 0xdb19
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r12
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x1905e
testb %al, %al
jne 0xdb0a
movq 0x20(%r14), %r14
testq %r14, %r14
setne %bpl
jne 0xdae9
jmp 0xdb19
movq 0x10(%r14), %rax
movq %rax, 0x10(%rbx)
movups (%r14), %xmm0
movups %xmm0, (%rbx)
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rsi, %r15
leaq 0x1bbdc(%rip), %r13     # 0x29718
cmpq $0x0, (%r13)
je 0xdb4f
leaq 0x1bc1e(%rip), %rax     # 0x29768
cmpb $0x1, (%rax)
jne 0xdb5d
leaq 0x1bbca(%rip), %rax     # 0x29720
movq (%rax), %rax
movq %rax, (%r13)
movq (%r13), %r12
testq %r12, %r12
setne %bpl
je 0xdbd4
movq %rdx, (%rsp)
xorl %eax, %eax
testl %edi, %edi
setne %al
leaq 0x20(,%rax,8), %rbx
cmpb $0x1, 0x18(%r12)
jne 0xdba0
movq (%r12), %rax
cmpq (%r15), %rax
je 0xdba0
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1905e
testb %al, %al
jne 0xdbaf
movq (%r12,%rbx), %r12
testq %r12, %r12
setne %bpl
jne 0xdb7d
jmp 0xdbd4
leaq 0x1bbb2(%rip), %rax     # 0x29768
cmpb $0x0, (%rax)
jne 0xdbbf
movq %r12, (%r13)
movq 0x10(%r12), %rax
movq (%rsp), %rcx
movq %rax, 0x10(%rcx)
movups (%r12), %xmm0
movups %xmm0, (%rcx)
andb $0x1, %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
leaq 0x1bb30(%rip), %rax     # 0x29720
movq (%rax), %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rcx, %rcx
je 0xdc16
xorl %edx, %edx
cmpb $0x1, 0x18(%rcx)
jne 0xdc0b
cmpq %rdi, 0x10(%rcx)
je 0xdc17
incl %edx
movq 0x20(%rcx), %rcx
testq %rcx, %rcx
jne 0xdbff
retq
movl %edx, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/events.c
// Function: client_message
void client_message(xcb_generic_event_t *evt)
{
	xcb_client_message_event_t *e = (xcb_client_message_event_t *) evt;

	if (e->type == ewmh->_NET_CURRENT_DESKTOP) {
		coordinates_t loc;
		if (ewmh_locate_desktop(e->data.data32[0], &loc)) {
			focus_node(loc.monitor, loc.desktop, loc.desktop->focus);
		}
		return;
	}

	coordinates_t loc;
	if (!locate_window(e->window, &loc)) {
		for (pending_rule_t *pr = pending_rule_head; pr != NULL; pr = pr->next) {
			if (pr->win == e->window) {
				postpone_event(pr, evt);
				break;
			}
		}
		return;
	}

	if (e->type == ewmh->_NET_WM_STATE) {
		handle_state(loc.monitor, loc.desktop, loc.node, e->data.data32[1], e->data.data32[0]);
		handle_state(loc.monitor, loc.desktop, loc.node, e->data.data32[2], e->data.data32[0]);
	} else if (e->type == ewmh->_NET_ACTIVE_WINDOW) {
		if ((ignore_ewmh_focus && e->data.data32[0] == XCB_EWMH_CLIENT_SOURCE_TYPE_NORMAL) ||
		    loc.node == mon->desk->focus) {
			return;
		}
		focus_node(loc.monitor, loc.desktop, loc.node);
	} else if (e->type == ewmh->_NET_WM_DESKTOP) {
		coordinates_t dloc;
		if (ewmh_locate_desktop(e->data.data32[0], &dloc)) {
			transfer_node(loc.monitor, loc.desktop, loc.node, dloc.monitor, dloc.desktop, dloc.desktop->focus, false);
		}
	} else if (e->type == ewmh->_NET_CLOSE_WINDOW) {
		close_node(loc.node);
	}
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movl 0x8(%rdi), %eax
leaq 0x1c0fd(%rip), %r14     # 0x29e30
movq (%r14), %rcx
cmpl 0x38(%rcx), %eax
jne 0xdd68
movl 0xc(%rbx), %edi
leaq 0x8(%rsp), %rsi
callq 0x1dea8
testb %al, %al
je 0xde28
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x38(%rsi), %rdx
callq 0xa2cd
jmp 0xde28
movl 0x4(%rbx), %edi
leaq 0x8(%rsp), %rsi
callq 0x1b0a3
testb %al, %al
je 0xddbf
movl 0x8(%rbx), %eax
movq (%r14), %rcx
cmpl 0x84(%rcx), %eax
jne 0xdde1
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movl 0xc(%rbx), %r8d
movl 0x10(%rbx), %ecx
callq 0xe756
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movl 0xc(%rbx), %r8d
movl 0x14(%rbx), %ecx
callq 0xe756
jmp 0xde28
leaq 0x1b912(%rip), %rax     # 0x296d8
movq (%rax), %rdi
testq %rdi, %rdi
je 0xde28
movl 0x4(%rbx), %eax
cmpl %eax, 0x4(%rdi)
je 0xde20
movq 0x28(%rdi), %rdi
testq %rdi, %rdi
jne 0xddd1
jmp 0xde28
cmpl 0x40(%rcx), %eax
jne 0xde30
leaq 0x1c012(%rip), %rax     # 0x29dff
cmpb $0x1, (%rax)
jne 0xddf8
cmpl $0x1, 0xc(%rbx)
je 0xde28
movq 0x18(%rsp), %rdx
leaq 0x1b90c(%rip), %rax     # 0x29710
movq (%rax), %rax
movq 0x58(%rax), %rax
cmpq 0x38(%rax), %rdx
je 0xde28
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
jmp 0xdd5e
movq %rbx, %rsi
callq 0x1d0ae
addq $0x38, %rsp
popq %rbx
popq %r14
retq
cmpl 0x7c(%rcx), %eax
jne 0xde71
movl 0xc(%rbx), %edi
leaq 0x20(%rsp), %rsi
callq 0x1dea8
testb %al, %al
je 0xde28
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %r8
movq 0x38(%r8), %r9
movl $0x0, (%rsp)
callq 0x9e52
jmp 0xde28
cmpl 0x58(%rcx), %eax
jne 0xde28
movq 0x18(%rsp), %rdi
callq 0xb7e3
jmp 0xde28
// File: /workspace/github_c_makefile_star2_O1/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:
cmpb $0x0, 0x1e(%rdi)
jne 0xe419
cmpb $0x2, 0x1(%rdi)
je 0xe419
movl 0xc(%rdi), %eax
leaq 0x1b319(%rip), %rcx     # 0x296e8
cmpb $0x1, 0x6(%rcx)
jne 0xe3df
movzwl 0x4(%rcx), %ecx
cmpw 0x2(%rdi), %cx
je 0xe419
leaq 0x1b32a(%rip), %rcx     # 0x29710
movq (%rcx), %rcx
cmpl 0x28(%rcx), %eax
je 0xe419
movq 0x58(%rcx), %rcx
movq 0x38(%rcx), %rcx
testq %rcx, %rcx
je 0x1112d
cmpl (%rcx), %eax
je 0xe419
movq 0x10(%rcx), %rcx
testq %rcx, %rcx
je 0x1112d
cmpl 0xc(%rcx), %eax
jne 0x1112d
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/events.c
// Function: motion_notify
void motion_notify(xcb_generic_event_t *evt)
{
	xcb_motion_notify_event_t *e = (xcb_motion_notify_event_t *) evt;

	static uint16_t last_motion_x = 0, last_motion_y = 0;
	static xcb_timestamp_t last_motion_time = 0;

	int64_t dtime = e->time - last_motion_time;

	/* Ignore unintentional pointer motions. */
	if (dtime > 1000) {
		last_motion_time = e->time;
		last_motion_x = e->event_x;
		last_motion_y = e->event_y;
		return;
	}
	int mdist = abs(e->event_x - last_motion_x) + abs(e->event_y - last_motion_y);
	if (mdist < 10) {
		return;
	}

	disable_motion_recorder();

	xcb_window_t win = XCB_NONE;
	query_pointer(&win, NULL);
	coordinates_t loc;
	bool pff = pointer_follows_focus;
	bool pfm = pointer_follows_monitor;
	pointer_follows_focus = false;
	pointer_follows_monitor = false;
	auto_raise = false;

	if (locate_window(win, &loc)) {
		if (loc.monitor->desk == loc.desktop && loc.node != mon->desk->focus) {
			focus_node(loc.monitor, loc.desktop, loc.node);
		}
	} else {
		xcb_point_t pt = {e->root_x, e->root_y};
		monitor_t *m = monitor_from_point(pt);
		if (m != NULL && m != mon) {
			focus_node(m, m->desk, m->desk->focus);
		}
	}

	pointer_follows_focus = pff;
	pointer_follows_monitor = pfm;
	auto_raise = true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl 0x4(%rdi), %eax
movl %eax, %ecx
subl 0x1b9e2(%rip), %ecx     # 0x29e18
cmpl $0x3e9, %ecx            # imm = 0x3E9
jb 0xe45f
movl %eax, 0x1b9d4(%rip)     # 0x29e18
movzwl 0x18(%rbx), %eax
movw %ax, 0x1b9c3(%rip)      # 0x29e12
movzwl 0x1a(%rbx), %eax
movw %ax, 0x1b9ba(%rip)      # 0x29e14
jmp 0xe550
movswl 0x18(%rbx), %eax
movzwl 0x1b9a8(%rip), %ecx     # 0x29e12
subl %ecx, %eax
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
movswl 0x1a(%rbx), %eax
movzwl 0x1b996(%rip), %edx     # 0x29e14
subl %edx, %eax
movl %eax, %edx
negl %edx
cmovsl %eax, %edx
addl %ecx, %edx
cmpl $0xa, %edx
jb 0xe550
callq 0x112ae
leaq 0xc(%rsp), %r14
movl $0x0, (%r14)
xorl %r15d, %r15d
movq %r14, %rdi
xorl %esi, %esi
callq 0x10928
leaq 0x1b944(%rip), %rax     # 0x29dfb
movb (%rax), %bpl
leaq 0x1b93b(%rip), %r12     # 0x29dfc
movb (%r12), %r13b
movb %r15b, (%rax)
movb %r15b, (%r12)
leaq 0x1b298(%rip), %rax     # 0x2976b
movb %r15b, (%rax)
movq %rax, %r15
movl (%r14), %edi
leaq 0x10(%rsp), %rsi
callq 0x1b0a3
testb %al, %al
je 0xe515
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
cmpq %rsi, 0x58(%rdi)
jne 0xe53e
movq 0x20(%rsp), %rdx
leaq 0x1b20a(%rip), %rax     # 0x29710
movq (%rax), %rax
movq 0x58(%rax), %rax
cmpq 0x38(%rax), %rdx
jne 0xe539
jmp 0xe53e
movl 0x14(%rbx), %edi
callq 0x752f
testq %rax, %rax
je 0xe53e
leaq 0x1b1e7(%rip), %rcx     # 0x29710
cmpq (%rcx), %rax
je 0xe53e
movq 0x58(%rax), %rsi
movq 0x38(%rsi), %rdx
movq %rax, %rdi
callq 0xa2cd
leaq 0x1b8b6(%rip), %rax     # 0x29dfb
movb %bpl, (%rax)
movb %r13b, (%r12)
movb $0x1, (%r15)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/events.c
// Function: button_press
void button_press(xcb_generic_event_t *evt)
{
	xcb_button_press_event_t *e = (xcb_button_press_event_t *) evt;
	bool replay = false;
	for (unsigned int i = 0; i < LENGTH(BUTTONS); i++) {
		if (e->detail != BUTTONS[i]) {
			continue;
		}
		if ((click_to_focus == (int8_t) XCB_BUTTON_INDEX_ANY || click_to_focus == (int8_t) BUTTONS[i]) &&
			cleaned_mask(e->state) == XCB_NONE) {
			bool pff = pointer_follows_focus;
			bool pfm = pointer_follows_monitor;
			pointer_follows_focus = false;
			pointer_follows_monitor = false;
			replay = !grab_pointer(ACTION_FOCUS) || !swallow_first_click;
			pointer_follows_focus = pff;
			pointer_follows_monitor = pfm;
		} else {
			grab_pointer(pointer_actions[i]);
		}
	}
	xcb_allow_events(dpy, replay ? XCB_ALLOW_REPLAY_POINTER : XCB_ALLOW_SYNC_POINTER, e->time);
	xcb_flush(dpy);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x114c0(%rip), %r15     # 0x1fa34
leaq 0x1b882(%rip), %r12     # 0x29dfd
leaq 0x1b89e(%rip), %r14     # 0x29e20
leaq 0x1b89b(%rip), %rbp     # 0x29e24
xorl %r13d, %r13d
movl $0x0, 0x4(%rsp)
movzbl 0x1(%rbx), %ecx
movl (%r13,%r15), %eax
cmpl %ecx, %eax
jne 0xe64c
movsbl (%r12), %ecx
testl %ecx, %ecx
je 0xe5b5
movsbl %al, %eax
cmpl %ecx, %eax
jne 0xe5d5
movzwl 0x1c(%rbx), %eax
movzwl (%rbp), %ecx
movzwl (%r14), %edx
orl %ecx, %edx
leaq 0x1b858(%rip), %rcx     # 0x29e22
movzwl (%rcx), %ecx
orl %edx, %ecx
notl %ecx
testl %eax, %ecx
je 0xe5e7
leaq 0x1b80c(%rip), %rax     # 0x29de8
movl (%rax,%r13), %edi
callq 0xf21a
jmp 0xe64c
leaq 0x1b80d(%rip), %r15     # 0x29dfb
movb (%r15), %bpl
leaq 0x1b804(%rip), %r14     # 0x29dfc
movb (%r14), %r12b
xorl %eax, %eax
movb %al, (%r15)
movb %al, (%r14)
movl $0x1, %edi
callq 0xf21a
leaq 0x1b7ea(%rip), %rcx     # 0x29dfe
movb (%rcx), %cl
xorb $0x1, %cl
movzbl %cl, %ecx
testb %al, %al
movl $0x1, %eax
cmovel %eax, %ecx
movl %ecx, 0x4(%rsp)
movb %bpl, (%r15)
leaq 0x1b7f0(%rip), %rbp     # 0x29e24
movb %r12b, (%r14)
leaq 0x1b7bf(%rip), %r12     # 0x29dfd
leaq 0x113ef(%rip), %r15     # 0x1fa34
leaq 0x1b7d4(%rip), %r14     # 0x29e20
addq $0x4, %r13
cmpq $0xc, %r13
jne 0xe594
leaq 0x1b067(%rip), %r15     # 0x296c8
movq (%r15), %rdi
movl 0x4(%rbx), %edx
movzbl 0x4(%rsp), %esi
andl $0x1, %esi
incl %esi
callq 0x4140
movq (%r15), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4660
// File: /workspace/github_c_makefile_star2_O1/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:
movb 0x8(%rdi), %al
decb %al
cmpb $0x2, %al
jb 0xe6ec
movb 0x1(%rdi), %al
addb $-0x5, %al
cmpb $0x3, %al
jb 0xe6ec
leaq 0x1b06b(%rip), %rax     # 0x29710
movq (%rax), %rax
movq 0x58(%rax), %rsi
movq 0x38(%rsi), %rdx
testq %rdx, %rdx
je 0xe6d0
movl 0x4(%rdi), %ecx
cmpl (%rdx), %ecx
je 0xe6ec
leaq 0x1b0b5(%rip), %r8      # 0x29778
cmpl (%r8), %ecx
jne 0xe6d0
movq %rax, %rdi
jmp 0xa2cd
subq $0x18, %rsp
movl 0x4(%rdi), %edi
movq %rsp, %rsi
callq 0x1b0a3
testb %al, %al
je 0xe6e8
callq 0x11477
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rax
movl $0xff7f, %edi           # imm = 0xFF7F
callq 0xec53
movw %ax, 0x1b216(%rip)      # 0x29e20
movl $0xffe5, %edi           # imm = 0xFFE5
callq 0xec53
movw %ax, 0x1b207(%rip)      # 0x29e22
movl $0xff14, %edi           # imm = 0xFF14
callq 0xec53
movw %ax, 0x1b1f8(%rip)      # 0x29e24
cmpw $0x0, 0x1b1ee(%rip)     # 0x29e22
jne 0xec3f
movw $0x2, 0x1b1e3(%rip)     # 0x29e22
movb $0x0, 0x1b1e0(%rip)     # 0x29e26
movq $0x0, 0x1b1d7(%rip) # 0x29e28
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/pointer.c
// Function: modfield_from_keysym
int16_t modfield_from_keysym(xcb_keysym_t keysym)
{
	uint16_t modfield = 0;
	xcb_keycode_t *keycodes = NULL, *mod_keycodes = NULL;
	xcb_get_modifier_mapping_reply_t *reply = NULL;
	xcb_key_symbols_t *symbols = xcb_key_symbols_alloc(dpy);

	if ((keycodes = xcb_key_symbols_get_keycode(symbols, keysym)) == NULL ||
	    (reply = xcb_get_modifier_mapping_reply(dpy, xcb_get_modifier_mapping(dpy), NULL)) == NULL ||
	    reply->keycodes_per_modifier < 1 ||
	    (mod_keycodes = xcb_get_modifier_mapping_keycodes(reply)) == NULL) {
		goto end;
	}

	unsigned int num_mod = xcb_get_modifier_mapping_keycodes_length(reply) / reply->keycodes_per_modifier;
	for (unsigned int i = 0; i < num_mod; i++) {
		for (unsigned int j = 0; j < reply->keycodes_per_modifier; j++) {
			xcb_keycode_t mk = mod_keycodes[i * reply->keycodes_per_modifier + j];
			if (mk == XCB_NO_SYMBOL) {
				continue;
			}
			for (xcb_keycode_t *k = keycodes; *k != XCB_NO_SYMBOL; k++) {
				if (*k == mk) {
					modfield |= (1 << i);
				}
			}
		}
	}

end:
	xcb_key_symbols_free(symbols);
	free(keycodes);
	free(reply);
	return modfield;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebp
leaq 0x1aa61(%rip), %rbx     # 0x296c8
movq (%rbx), %rdi
callq 0x4590
movq %rax, %r15
movq %rax, %rdi
movl %ebp, %esi
callq 0x4040
movq %rax, %r14
testq %rax, %rax
je 0xed49
movq %r15, (%rsp)
movq (%rbx), %r15
movq %r15, %rdi
callq 0x4a50
xorl %r12d, %r12d
movq %r15, %rdi
movl %eax, %esi
xorl %edx, %edx
callq 0x4880
testq %rax, %rax
je 0xed5a
movq %rax, %r15
cmpb $0x0, 0x1(%rax)
je 0xed50
movq %r15, %rdi
callq 0x4800
testq %rax, %rax
je 0xed50
movq %rax, %r12
movq %r15, %rdi
callq 0x4970
movzbl 0x1(%r15), %esi
cltd
idivl %esi
xorl %ecx, %ecx
testl %eax, %eax
je 0xed57
cmpl $0x1, %esi
movl %esi, %edx
adcl $0x0, %edx
movq %r14, %rdi
incq %rdi
xorl %ebp, %ebp
movl %ecx, %r8d
imull %esi, %r8d
movl $0x1, %r9d
shll %cl, %r9d
xorl %r10d, %r10d
leal (%r8,%r10), %r11d
movb (%r12,%r11), %r11b
testb %r11b, %r11b
je 0xed39
movb (%r14), %bl
testb %bl, %bl
je 0xed39
movq %rdi, %r13
cmpb %r11b, %bl
movl $0x0, %ebx
cmovel %r9d, %ebx
orl %ebx, %ebp
movb (%r13), %bl
incq %r13
testb %bl, %bl
jne 0xed20
incq %r10
cmpq %rdx, %r10
jne 0xed09
incl %ecx
cmpl %eax, %ecx
jne 0xecf6
jmp 0xed52
xorl %r12d, %r12d
xorl %ebp, %ebp
jmp 0xed60
xorl %ebp, %ebp
movq %r15, %r12
jmp 0xed5c
movq %r15, %r12
xorl %ebp, %ebp
movq (%rsp), %r15
movq %r15, %rdi
callq 0x4780
movq %r14, %rdi
callq 0x4460
movq %r12, %rdi
callq 0x4460
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
xorl %r14d, %r14d
leaq 0x1b05d(%rip), %r15     # 0x29dfd
leaq 0x10cbd(%rip), %r12     # 0x1fa64
leaq 0x1b03a(%rip), %r13     # 0x29de8
leaq 0x1b02b(%rip), %rbp     # 0x29de0
movsbl (%r15), %eax
testl %eax, %eax
je 0xedc6
movsbl (%r14,%r12), %ecx
cmpl %eax, %ecx
jne 0xedd4
movzbl (%r14,%r12), %esi
movl %ebx, %edi
xorl %edx, %edx
callq 0xee05
cmpl $0x0, (%r13,%r14)
je 0xedec
movzbl (%r14,%r12), %esi
movzwl (%rbp), %edx
movl %ebx, %edi
callq 0xee05
addq $0x4, %r14
cmpq $0xc, %r14
jne 0xedb5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
leaq 0x1a692(%rip), %rax     # 0x29708
movq (%rax), %r14
testq %r14, %r14
je 0xf0ca
movq 0x60(%r14), %r15
testq %r15, %r15
je 0xf0c4
movq 0x30(%r15), %rdi
callq 0x92fd
movq %rax, %rbx
testq %rax, %rax
je 0xf0be
movl (%rbx), %edi
callq 0xed89
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0xf0b0
movl 0xc(%rax), %edi
callq 0xed89
movq 0x30(%r15), %rsi
movq %rbx, %rdi
callq 0x9363
jmp 0xf090
movq 0x48(%r15), %r15
jmp 0xf082
movq 0x78(%r14), %r14
jmp 0xf079
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0x1a629(%rip), %rax     # 0x29708
movq (%rax), %r14
testq %r14, %r14
je 0xf139
leaq 0x1a5da(%rip), %r15     # 0x296c8
movq 0x60(%r14), %r12
testq %r12, %r12
je 0xf130
movq 0x30(%r12), %rdi
callq 0x92fd
movq %rax, %rbx
testq %rax, %rax
je 0xf129
movq (%r15), %rdi
movl (%rbx), %edx
xorl %esi, %esi
movl $0x8000, %ecx           # imm = 0x8000
callq 0x4840
movq 0x30(%r12), %rsi
movq %rbx, %rdi
callq 0x9363
jmp 0xf101
movq 0x48(%r12), %r12
jmp 0xf0f2
movq 0x78(%r14), %r14
testq %r14, %r14
jne 0xf0ee
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/pointer.c
// Function: get_handle
resize_handle_t get_handle(node_t *n, xcb_point_t pos, pointer_action_t pac)
{
	resize_handle_t rh = HANDLE_BOTTOM_RIGHT;
	xcb_rectangle_t rect = get_rectangle(NULL, NULL, n);
	if (pac == ACTION_RESIZE_SIDE) {
		float W = rect.width;
		float H = rect.height;
		float ratio = W / H;
		float x = pos.x - rect.x;
		float y = pos.y - rect.y;
		float diag_a = ratio * y;
		float diag_b = W - diag_a;
		if (x < diag_a) {
			if (x < diag_b) {
				rh = HANDLE_LEFT;
			} else {
				rh = HANDLE_BOTTOM;
			}
		} else {
			if (x < diag_b) {
				rh = HANDLE_TOP;
			} else {
				rh = HANDLE_RIGHT;
			}
		}
	} else if (pac == ACTION_RESIZE_CORNER) {
		int16_t mid_x = rect.x + (rect.width / 2);
		int16_t mid_y = rect.y + (rect.height / 2);
		if (pos.x > mid_x) {
			if (pos.y > mid_y) {
				rh = HANDLE_BOTTOM_RIGHT;
			} else {
				rh = HANDLE_TOP_RIGHT;
			}
		} else {
			if (pos.y > mid_y) {
				rh = HANDLE_BOTTOM_LEFT;
			} else {
				rh = HANDLE_TOP_LEFT;
			}
		}
	}
	return rh;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %rdx
xorl %edi, %edi
xorl %esi, %esi
callq 0x982d
movl %eax, %edx
shrl $0x10, %edx
cmpl $0x4, %ebp
je 0xf1cf
movl $0xc, %ecx
cmpl $0x3, %ebp
jne 0xf211
movq %rax, %rcx
movq %rax, %rsi
shrq $0x20, %rsi
movzwl %si, %esi
cvtsi2ss %esi, %xmm0
shrq $0x30, %rcx
cvtsi2ss %ecx, %xmm1
movswl %bx, %ecx
cwtl
subl %eax, %ecx
cvtsi2ss %ecx, %xmm2
sarl $0x10, %ebx
movswl %dx, %eax
subl %eax, %ebx
cvtsi2ss %ebx, %xmm3
movaps %xmm0, %xmm4
divss %xmm1, %xmm4
mulss %xmm4, %xmm3
subss %xmm3, %xmm0
xorl %eax, %eax
ucomiss %xmm2, %xmm0
movl $0x1, %ecx
movl $0x8, %edx
cmoval %ecx, %edx
setbe %al
ucomiss %xmm2, %xmm3
leal 0x2(%rax,%rax), %ecx
cmoval %edx, %ecx
jmp 0xf211
movq %rax, %rcx
shrq $0x21, %rcx
andl $0x7fff, %ecx           # imm = 0x7FFF
addl %eax, %ecx
shrq $0x31, %rax
addl %eax, %edx
movswl %bx, %esi
movswl %cx, %ecx
sarl $0x10, %ebx
movswl %dx, %eax
cmpl %ecx, %esi
jle 0xf202
cmpl %eax, %ebx
movl $0xc, %eax
movl $0x6, %ecx
jmp 0xf20e
cmpl %eax, %ebx
movl $0x9, %eax
movl $0x3, %ecx
cmovgl %eax, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %edi, %ebx
leaq 0x19f87(%rip), %rax     # 0x296c8
movq (%rax), %r14
movq %r14, %rdi
movl %ebx, %esi
callq 0x4810
movq %r14, %rdi
movl %eax, %esi
xorl %edx, %edx
callq 0x44b0
testq %rax, %rax
je 0xf770
movb 0x1b(%rax), %bpl
movq %rax, %rdi
callq 0x4460
testb %bpl, %bpl
jne 0xf7d1
leaq 0x8(%rsp), %rsi
movl %ebx, %edi
callq 0x1b0a3
testb %al, %al
jne 0xf7d1
leaq 0x19f51(%rip), %rax     # 0x296d8
movq (%rax), %rax
testq %rax, %rax
je 0xf79a
cmpl %ebx, 0x4(%rax)
je 0xf7d1
movq 0x28(%rax), %rax
jmp 0xf78a
callq 0x1cf86
movq %rax, %r14
movl %ebx, %edi
movq %rax, %rsi
callq 0x1d9ec
movl %ebx, %edi
movq %r14, %rsi
callq 0x1db52
testb %al, %al
jne 0xf7d1
movl %ebx, %edi
movq %r14, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0xf7da
movq %r14, %rdi
callq 0x4460
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq 0x48(%rdi), %r14
leaq 0x198a0(%rip), %rax     # 0x296c8
movq (%rax), %rbx
movl (%rdi), %esi
movq %rbx, %rdi
callq 0x45c0
movq %rbx, %rdi
movl %eax, %esi
xorl %edx, %edx
callq 0x46a0
testq %rax, %rax
je 0xfe51
movq 0xc(%rax), %rcx
movq %rcx, 0x318(%r14)
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4460
// File: /workspace/github_c_makefile_star2_O1/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:
movzwl 0x4c(%rdi), %eax
movzwl 0x50(%rdi), %edx
movzwl 0x52(%rdi), %ecx
movzwl 0x31c(%rsi), %r8d
cmpw %dx, %r8w
jae 0xfe8d
subl %r8d, %edx
movl %edx, %r8d
shrl $0x1f, %r8d
addl %edx, %r8d
shrl %r8d
addl %r8d, %eax
movzwl 0x4e(%rdi), %edx
movw %ax, 0x318(%rsi)
movzwl 0x31e(%rsi), %edi
cmpw %cx, %di
jae 0xfeb1
subl %edi, %ecx
movl %ecx, %edi
shrl $0x1f, %edi
addl %ecx, %edi
shrl %edi
addl %edi, %edx
movl 0x300(%rsi), %ecx
subl %ecx, %eax
movw %ax, 0x318(%rsi)
subl %ecx, %edx
movw %dx, 0x31a(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/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:
testq %rdi, %rdi
je 0xff88
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movzbl %sil, %edi
movzbl %dl, %esi
callq 0x1056b
movl %eax, %ebp
movq %rbx, %rdi
callq 0x92fd
testq %rax, %rax
je 0xff7c
movq %rax, %r14
leaq 0x19783(%rip), %r12     # 0x296c8
leaq 0xc(%rsp), %r15
cmpq $0x0, 0x48(%r14)
je 0xff69
movl (%r14), %esi
movl %ebp, 0xc(%rsp)
movq (%r12), %rdi
movl $0x8, %edx
movq %r15, %rcx
callq 0x4700
movq %r14, %rdi
movq %rbx, %rsi
callq 0x9363
movq %rax, %r14
testq %rax, %rax
jne 0xff4a
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq