LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/monitor.c
// Function: add_monitor
void add_monitor(monitor_t *m)
{
	xcb_rectangle_t r = m->rectangle;

	if (mon == NULL) {
		mon = m;
		mon_head = m;
		mon_tail = m;
	} else {
		monitor_t *a = mon_head;
		while (a != NULL && rect_cmp(m->rectangle, a->rectangle) > 0) {
			a = a->next;
		}
		if (a != NULL) {
			monitor_t *b = a->prev;
			if (b != NULL) {
				b->next = m;
			} else {
				mon_head = m;
			}
			m->prev = b;
			m->next = a;
			a->prev = m;
		} else {
			mon_tail->next = m;
			m->prev = mon_tail;
			mon_tail = m;
		}
	}

	put_status(SBSC_MASK_MONITOR_ADD, "monitor_add 0x%08X %s %ux%u+%i+%i\n", m->id, m->name, r.width, r.height, r.x, r.y);

	put_status(SBSC_MASK_REPORT);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x4c(%rax), %rax
movq %rax, -0x10(%rbp)
leaq 0x2cb21(%rip), %rax     # 0x35700
cmpq $0x0, (%rax)
jne 0x8c14
movq -0x8(%rbp), %rcx
leaq 0x2cb10(%rip), %rax     # 0x35700
movq %rcx, (%rax)
movq -0x8(%rbp), %rcx
leaq 0x2cafa(%rip), %rax     # 0x356f8
movq %rcx, (%rax)
movq -0x8(%rbp), %rcx
leaq 0x2cae4(%rip), %rax     # 0x356f0
movq %rcx, (%rax)
jmp 0x8cf3
leaq 0x2cadd(%rip), %rax     # 0x356f8
movq (%rax), %rax
movq %rax, -0x18(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x18(%rbp)
movb %al, -0x21(%rbp)
je 0x8c4c
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq 0x4c(%rcx), %rdi
movq 0x4c(%rax), %rsi
callq 0x7160
cmpl $0x0, %eax
setg %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x8c55
jmp 0x8c63
movq -0x18(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x8c22
cmpq $0x0, -0x18(%rbp)
je 0x8cbf
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x8c8b
movq -0x8(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x78(%rax)
jmp 0x8c99
movq -0x8(%rbp), %rcx
leaq 0x2ca62(%rip), %rax     # 0x356f8
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x70(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x78(%rax)
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x70(%rax)
jmp 0x8cf1
movq -0x8(%rbp), %rcx
leaq 0x2ca26(%rip), %rax     # 0x356f0
movq (%rax), %rax
movq %rcx, 0x78(%rax)
leaq 0x2ca18(%rip), %rax     # 0x356f0
movq (%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x70(%rax)
movq -0x8(%rbp), %rcx
leaq 0x2ca02(%rip), %rax     # 0x356f0
movq %rcx, (%rax)
jmp 0x8cf3
movq -0x8(%rbp), %rax
movl 0x20(%rax), %edx
movq -0x8(%rbp), %rcx
movzwl -0xc(%rbp), %r8d
movzwl -0xa(%rbp), %r9d
movswl -0x10(%rbp), %r10d
movswl -0xe(%rbp), %eax
movl $0x2, %edi
leaq 0x2490f(%rip), %rsi     # 0x2d62c
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x2c0b0
movl $0x1, %edi
movb $0x0, %al
callq 0x2c0b0
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/monitor.c
// Function: unlink_monitor
void unlink_monitor(monitor_t *m)
{
	monitor_t *prev = m->prev;
	monitor_t *next = m->next;

	if (prev != NULL) {
		prev->next = next;
	}

	if (next != NULL) {
		next->prev = prev;
	}

	if (mon_head == m) {
		mon_head = next;
	}

	if (mon_tail == m) {
		mon_tail = prev;
	}

	if (pri_mon == m) {
		pri_mon = NULL;
	}

	if (mon == m) {
		mon = NULL;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x8d73
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x78(%rax)
cmpq $0x0, -0x18(%rbp)
je 0x8d86
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x70(%rax)
leaq 0x2c96b(%rip), %rax     # 0x356f8
movq (%rax), %rax
cmpq -0x8(%rbp), %rax
jne 0x8da4
movq -0x18(%rbp), %rcx
leaq 0x2c957(%rip), %rax     # 0x356f8
movq %rcx, (%rax)
leaq 0x2c945(%rip), %rax     # 0x356f0
movq (%rax), %rax
cmpq -0x8(%rbp), %rax
jne 0x8dc2
movq -0x10(%rbp), %rcx
leaq 0x2c931(%rip), %rax     # 0x356f0
movq %rcx, (%rax)
leaq 0x2c91f(%rip), %rax     # 0x356e8
movq (%rax), %rax
cmpq -0x8(%rbp), %rax
jne 0x8de0
leaq 0x2c90f(%rip), %rax     # 0x356e8
movq $0x0, (%rax)
leaq 0x2c919(%rip), %rax     # 0x35700
movq (%rax), %rax
cmpq -0x8(%rbp), %rax
jne 0x8dfe
leaq 0x2c909(%rip), %rax     # 0x35700
movq $0x0, (%rax)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/monitor.c
// Function: remove_monitor
void remove_monitor(monitor_t *m)
{
	put_status(SBSC_MASK_MONITOR_REMOVE, "monitor_remove 0x%08X\n", m->id);

	while (m->desk_head != NULL) {
		remove_desktop(m, m->desk_head);
	}

	monitor_t *last_mon = mon;

	unlink_monitor(m);
	xcb_destroy_window(dpy, m->root);
	free(m);

	if (mon != last_mon) {
		focus_node(NULL, NULL, NULL);
	}

	put_status(SBSC_MASK_REPORT);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x20(%rax), %edx
movl $0x8, %edi
leaq 0x24830(%rip), %rsi     # 0x2d64f
movb $0x0, %al
callq 0x2c0b0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x8e44
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rsi
callq 0xa710
jmp 0x8e26
leaq 0x2c8b5(%rip), %rax     # 0x35700
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x8d40
leaq 0x2c856(%rip), %rax     # 0x356b8
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x28(%rax), %esi
callq 0x4140
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4450
leaq 0x2c87c(%rip), %rax     # 0x35700
movq (%rax), %rax
cmpq -0x10(%rbp), %rax
je 0x8e9c
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rdi
movq %rdx, %rsi
callq 0xd720
movl $0x1, %edi
movb $0x0, %al
callq 0x2c0b0
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/monitor.c
// Function: merge_monitors
void merge_monitors(monitor_t *ms, monitor_t *md)
{
	if (ms == NULL || md == NULL || ms == md) {
		return;
	}

	desktop_t *d = ms->desk_head;
	while (d != NULL) {
		desktop_t *next = d->next;
		transfer_desktop(ms, md, d, false);
		d = next;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x8ed8
cmpq $0x0, -0x10(%rbp)
je 0x8ed8
movq -0x8(%rbp), %rax
cmpq -0x10(%rbp), %rax
jne 0x8eda
jmp 0x8f16
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x8f16
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
xorl %ecx, %ecx
callq 0xa020
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x8ee6
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/monitor.c
// Function: closest_monitor
monitor_t *closest_monitor(monitor_t *m, cycle_dir_t dir, monitor_select_t *sel)
{
	monitor_t *f = (dir == CYCLE_PREV ? m->prev : m->next);

	if (f == NULL) {
		f = (dir == CYCLE_PREV ? mon_tail : mon_head);
	}

	while (f != m) {
		coordinates_t loc = {f, NULL, NULL};
		if (monitor_matches(&loc, &loc, sel)) {
			return f;
		}
		f = (dir == CYCLE_PREV ? f->prev : f->next);
		if (f == NULL) {
			f = (dir == CYCLE_PREV ? mon_tail : mon_head);
		}
	}

	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
cmpl $0x1, -0x14(%rbp)
jne 0x8f47
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0x8f53
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x8f8e
cmpl $0x1, -0x14(%rbp)
jne 0x8f78
leaq 0x2c781(%rip), %rax     # 0x356f0
movq (%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0x8f86
leaq 0x2c779(%rip), %rax     # 0x356f8
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x8f90
movq -0x28(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x9036
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x20(%rbp), %rdx
leaq -0x40(%rbp), %rsi
movq %rsi, %rdi
callq 0x23a20
testb $0x1, %al
jne 0x8fcc
jmp 0x8fd6
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x903e
cmpl $0x1, -0x14(%rbp)
jne 0x8fea
movq -0x28(%rbp), %rax
movq 0x70(%rax), %rax
movq %rax, -0x58(%rbp)
jmp 0x8ff6
movq -0x28(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x9031
cmpl $0x1, -0x14(%rbp)
jne 0x901b
leaq 0x2c6de(%rip), %rax     # 0x356f0
movq (%rax), %rax
movq %rax, -0x60(%rbp)
jmp 0x9029
leaq 0x2c6d6(%rip), %rax     # 0x356f8
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x8f90
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/monitor.c
// Function: monitor_from_point
monitor_t *monitor_from_point(xcb_point_t pt)
{
	for (monitor_t *m = mon_head; m != NULL; m = m->next) {
		if (is_inside_monitor(m, pt)) {
			return m;
		}
	}
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
leaq 0x2c666(%rip), %rax     # 0x356f8
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x90cc
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x9050
testb $0x1, %al
jne 0x90b2
jmp 0x90bc
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x90d4
jmp 0x90be
movq -0x18(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x9099
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/monitor.c
// Function: monitor_from_client
monitor_t *monitor_from_client(client_t *c)
{
	int16_t xc = c->floating_rectangle.x + c->floating_rectangle.width/2;
	int16_t yc = c->floating_rectangle.y + c->floating_rectangle.height/2;
	xcb_point_t pt = {xc, yc};
	monitor_t *nearest = monitor_from_point(pt);
	if (nearest == NULL) {
		int dmin = INT_MAX;
		for (monitor_t *m = mon_head; m != NULL; m = m->next) {
			xcb_rectangle_t r = m->rectangle;
			int d = abs((r.x + r.width / 2) - xc) + abs((r.y + r.height / 2) - yc);
			if (d < dmin) {
				dmin = d;
				nearest = m;
			}
		}
	}
	return nearest;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movswl 0x318(%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x31c(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x3c(%rbp), %eax
addl %ecx, %eax
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rax
movswl 0x31a(%rax), %eax
movl %eax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x31e(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x38(%rbp), %eax
addl %ecx, %eax
movw %ax, -0xc(%rbp)
movw -0xa(%rbp), %ax
movw %ax, -0x10(%rbp)
movw -0xc(%rbp), %ax
movw %ax, -0xe(%rbp)
movl -0x10(%rbp), %edi
callq 0x9080
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x9215
movl $0x7fffffff, -0x1c(%rbp) # imm = 0x7FFFFFFF
leaq 0x2c57f(%rip), %rax     # 0x356f8
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x9213
movq -0x28(%rbp), %rax
movq 0x4c(%rax), %rax
movq %rax, -0x30(%rbp)
movswl -0x30(%rbp), %eax
movl %eax, -0x44(%rbp)
movzwl -0x2c(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x44(%rbp), %eax
addl %ecx, %eax
movswl -0xa(%rbp), %ecx
subl %ecx, %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
movl %eax, -0x40(%rbp)
movswl -0x2e(%rbp), %ecx
movzwl -0x2a(%rbp), %eax
movl $0x2, %esi
cltd
idivl %esi
movl %eax, %edx
movl -0x40(%rbp), %eax
addl %edx, %ecx
movswl -0xc(%rbp), %edx
subl %edx, %ecx
movl %ecx, %edx
negl %edx
cmovnsl %edx, %ecx
addl %ecx, %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x9200
movl -0x34(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x9202
movq -0x28(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x9180
jmp 0x9215
movq -0x18(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/monitor.c
// Function: nearest_monitor
monitor_t *nearest_monitor(monitor_t *m, direction_t dir, monitor_select_t *sel)
{
	uint32_t dmin = UINT32_MAX;
	monitor_t *nearest = NULL;
	xcb_rectangle_t rect = m->rectangle;
	for (monitor_t *f = mon_head; f != NULL; f = f->next) {
		coordinates_t loc = {f, NULL, NULL};
		xcb_rectangle_t r = f->rectangle;
		if (f == m ||
		    !monitor_matches(&loc, &loc, sel) ||
		    !on_dir_side(rect, r, dir)) {
			continue;
		}
		uint32_t d = boundary_distance(rect, r, dir);
		if (d < dmin) {
			dmin = d;
			nearest = f;
		}
	}
	return nearest;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x4c(%rax), %rax
movq %rax, -0x30(%rbp)
leaq 0x2c4a3(%rip), %rax     # 0x356f8
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x92fd
movq -0x38(%rbp), %rax
movq %rax, -0x50(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq 0x4c(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x8(%rbp), %rax
je 0x92bf
movq -0x18(%rbp), %rdx
leaq -0x50(%rbp), %rsi
movq %rsi, %rdi
callq 0x23a20
testb $0x1, %al
jne 0x92ab
jmp 0x92bf
movl -0xc(%rbp), %edx
movq -0x30(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x6e50
testb $0x1, %al
jne 0x92c1
jmp 0x92ec
movl -0xc(%rbp), %edx
movq -0x30(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x6cf0
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x92ea
movl -0x5c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x92ec
movq -0x38(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x925c
movq -0x28(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/monitor.c
// Function: find_any_monitor
bool find_any_monitor(coordinates_t *ref, coordinates_t *dst, monitor_select_t *sel)
{
	for (monitor_t *m = mon_head; m != NULL; m = m->next) {
		coordinates_t loc = {m, NULL, NULL};
		if (monitor_matches(&loc, ref, sel)) {
			*dst = loc;
			return true;
		}
	}
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
leaq 0x2c3cd(%rip), %rax     # 0x356f8
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x9399
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x40(%rbp), %rdi
callq 0x23a20
testb $0x1, %al
jne 0x9368
jmp 0x9389
movq -0x18(%rbp), %rax
movq -0x40(%rbp), %rcx
movq %rcx, (%rax)
movq -0x38(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rcx
movq %rcx, 0x10(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x939d
jmp 0x938b
movq -0x28(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x9332
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/desktop.c
// Function: activate_desktop
bool activate_desktop(monitor_t *m, desktop_t *d)
{
	if (d != NULL && m == mon) {
		return false;
	}

	if (d == NULL) {
		d = m->desk;
		if (d == NULL) {
			d = history_last_desktop(m, NULL);
		}
		if (d == NULL) {
			d = m->desk_head;
		}
	}

	if (d == NULL || d == m->desk) {
		return false;
	}

	if (m->sticky_count > 0 && m->desk != NULL) {
		transfer_sticky_nodes(m, m->desk, m, d, m->desk->root);
	}

	show_desktop(d);
	hide_desktop(m->desk);

	m->desk = d;

	history_add(m, d, NULL, false);

	put_status(SBSC_MASK_DESKTOP_ACTIVATE, "desktop_activate 0x%08X 0x%08X\n", m->id, d->id);
	put_status(SBSC_MASK_REPORT);

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x9a10
movq -0x10(%rbp), %rax
leaq 0x2bcfe(%rip), %rcx     # 0x35700
cmpq (%rcx), %rax
jne 0x9a10
movb $0x0, -0x1(%rbp)
jmp 0x9b0e
cmpq $0x0, -0x18(%rbp)
jne 0x9a50
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x9a3b
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x12a30
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x9a4e
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x9a50
cmpq $0x0, -0x18(%rbp)
je 0x9a65
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x58(%rcx), %rax
jne 0x9a6e
movb $0x0, -0x1(%rbp)
jmp 0x9b0e
movq -0x10(%rbp), %rax
cmpl $0x0, 0x40(%rax)
jbe 0x9aa8
movq -0x10(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x9aa8
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rsi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq 0x30(%rax), %r8
callq 0xd0b0
movq -0x18(%rbp), %rdi
callq 0x9b20
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x9b50
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x12420
movq -0x10(%rbp), %rax
movl 0x20(%rax), %edx
movq -0x18(%rbp), %rax
movl 0x20(%rax), %ecx
movl $0x2000, %edi           # imm = 0x2000
leaq 0x23b9c(%rip), %rsi     # 0x2d693
movb $0x0, %al
callq 0x2c0b0
movl $0x1, %edi
movb $0x0, %al
callq 0x2c0b0
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/desktop.c
// Function: find_any_desktop
bool find_any_desktop(coordinates_t *ref, coordinates_t *dst, desktop_select_t *sel)
{
	for (monitor_t *m = mon_head; m != NULL; m = m->next) {
		for (desktop_t *d = m->desk_head; d != NULL; d = d->next) {
			coordinates_t loc = {m, d, NULL};
			if (desktop_matches(&loc, ref, sel)) {
				*dst = loc;
				return true;
			}
		}
	}
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
leaq 0x2b92d(%rip), %rax     # 0x356f8
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x9e63
movq -0x28(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x9e50
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x48(%rbp), %rdi
callq 0x23ab0
testb $0x1, %al
jne 0x9e1f
jmp 0x9e40
movq -0x18(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rcx, (%rax)
movq -0x40(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rcx
movq %rcx, 0x10(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x9e67
jmp 0x9e42
movq -0x30(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x9de9
jmp 0x9e52
movq -0x28(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x9dd2
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/desktop.c
// Function: set_layout
bool set_layout(monitor_t *m, desktop_t *d, layout_t l, bool user)
{
	if ((user && d->user_layout == l) || (!user && d->layout == l)) {
		return false;
	}

	layout_t old_layout = d->layout;

	if (user) {
		d->user_layout = l;
	} else {
		d->layout = l;
	}

	if (user && (!single_monocle || tiled_count(d->root, true) > 1)) {
		d->layout = l;
	}

	if (d->layout != old_layout) {
		handle_presel_feedbacks(m, d);

		if (user) {
			arrange(m, d);
		}

		put_status(SBSC_MASK_DESKTOP_LAYOUT, "desktop_layout 0x%08X 0x%08X %s\n", m->id, d->id, LAYOUT_STR(d->layout));

		if (d == m->desk) {
			put_status(SBSC_MASK_REPORT);
		}
	}

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %cl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
andb $0x1, %al
movb %al, -0x1d(%rbp)
testb $0x1, -0x1d(%rbp)
je 0x9eac
movq -0x18(%rbp), %rax
movl 0x28(%rax), %eax
cmpl -0x1c(%rbp), %eax
je 0x9ebe
testb $0x1, -0x1d(%rbp)
jne 0x9ec7
movq -0x18(%rbp), %rax
movl 0x24(%rax), %eax
cmpl -0x1c(%rbp), %eax
jne 0x9ec7
movb $0x0, -0x1(%rbp)
jmp 0x9fa9
movq -0x18(%rbp), %rax
movl 0x24(%rax), %eax
movl %eax, -0x24(%rbp)
testb $0x1, -0x1d(%rbp)
je 0x9ee3
movl -0x1c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x28(%rax)
jmp 0x9eed
movl -0x1c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x24(%rax)
testb $0x1, -0x1d(%rbp)
je 0x9f20
leaq 0x2beee(%rip), %rax     # 0x35de8
testb $0x1, (%rax)
je 0x9f16
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rdi
movl $0x1, %esi
callq 0xc8d0
cmpl $0x1, %eax
jle 0x9f20
movl -0x1c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x24(%rax)
movq -0x18(%rbp), %rax
movl 0x24(%rax), %eax
cmpl -0x24(%rbp), %eax
je 0x9fa5
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x9fc0
testb $0x1, -0x1d(%rbp)
je 0x9f4c
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xafd0
movq -0x10(%rbp), %rax
movl 0x20(%rax), %edx
movq -0x18(%rbp), %rax
movl 0x20(%rax), %ecx
movq -0x18(%rbp), %rax
movl 0x24(%rax), %esi
leaq 0x24ed2(%rip), %r8      # 0x2ee3a
leaq 0x24ec4(%rip), %rax     # 0x2ee33
cmpl $0x0, %esi
cmoveq %rax, %r8
movl $0x4000, %edi           # imm = 0x4000
leaq 0x23731(%rip), %rsi     # 0x2d6b3
movb $0x0, %al
callq 0x2c0b0
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x58(%rcx), %rax
jne 0x9fa3
movl $0x1, %edi
movb $0x0, %al
callq 0x2c0b0
jmp 0x9fa5
movb $0x1, -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/desktop.c
// Function: handle_presel_feedbacks
void handle_presel_feedbacks(monitor_t *m, desktop_t *d)
{
	if (m->desk != d) {
		return;
	}
	if (d->layout == LAYOUT_MONOCLE) {
		hide_presel_feedbacks(m, d, d->root);
	} else {
		show_presel_feedbacks(m, d, d->root);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpq -0x10(%rbp), %rax
je 0x9fe0
jmp 0xa016
movq -0x10(%rbp), %rax
cmpl $0x1, 0x24(%rax)
jne 0xa001
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdx
callq 0x16ee0
jmp 0xa016
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdx
callq 0x16e70
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/desktop.c
// Function: unlink_desktop
void unlink_desktop(monitor_t *m, desktop_t *d)
{
	desktop_t *prev = d->prev;
	desktop_t *next = d->next;

	if (prev != NULL) {
		prev->next = next;
	}

	if (next != NULL) {
		next->prev = prev;
	}

	if (m->desk_head == d) {
		m->desk_head = next;
	}

	if (m->desk_tail == d) {
		m->desk_tail = prev;
	}

	if (m->desk == d) {
		m->desk = NULL;
	}

	d->prev = d->next = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xa367
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x48(%rax)
cmpq $0x0, -0x20(%rbp)
je 0xa37a
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0xa394
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0xa3ae
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0xa3c8
movq -0x8(%rbp), %rax
movq $0x0, 0x58(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x40(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/desktop.c
// Function: insert_desktop
void insert_desktop(monitor_t *m, desktop_t *d)
{
	if (m->desk == NULL) {
		m->desk = d;
		m->desk_head = d;
		m->desk_tail = d;
	} else {
		m->desk_tail->next = d;
		d->prev = m->desk_tail;
		m->desk_tail = d;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x58(%rax)
jne 0xa42d
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x68(%rax)
jmp 0xa459
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rax
movq %rcx, 0x48(%rax)
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x68(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/desktop.c
// Function: make_desktop
desktop_t *make_desktop(const char *name, uint32_t id)
{
	desktop_t *d = calloc(1, sizeof(desktop_t));
	snprintf(d->name, sizeof(d->name), "%s", name == NULL ? DEFAULT_DESK_NAME : name);
	if (id == XCB_NONE) {
		d->id = xcb_generate_id(dpy);
	}
	d->prev = d->next = NULL;
	d->root = d->focus = NULL;
	d->user_layout = LAYOUT_TILED;
	d->layout = single_monocle ? LAYOUT_MONOCLE : LAYOUT_TILED;
	d->padding = (padding_t) PADDING;
	d->window_gap = window_gap;
	d->border_width = border_width;
	return d;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x1, %edi
movl $0x68, %esi
callq 0x4890
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0xa49e
leaq 0x23263(%rip), %rax     # 0x2d6fb
movq %rax, -0x38(%rbp)
jmp 0xa4a6
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rcx
movl $0x20, %esi
leaq 0x22c36(%rip), %rdx     # 0x2d0f0
movb $0x0, %al
callq 0x4120
movl -0xc(%rbp), %eax
cmpq $0x0, %rax
jne 0xa4e2
leaq 0x2b1e7(%rip), %rax     # 0x356b8
movq (%rax), %rdi
callq 0x4900
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x28(%rax)
leaq 0x2b8c4(%rip), %rax     # 0x35de8
movb (%rax), %dl
xorl %ecx, %ecx
movl $0x1, %eax
testb $0x1, %dl
cmovnel %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x24(%rax)
movq -0x18(%rbp), %rax
movl $0x0, -0x28(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x0, -0x20(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x28(%rbp), %rcx
movq %rcx, 0x50(%rax)
movq -0x20(%rbp), %rcx
movq %rcx, 0x58(%rax)
leaq 0x2b83f(%rip), %rax     # 0x35db0
movl (%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x60(%rax)
leaq 0x2b833(%rip), %rax     # 0x35db4
movl (%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x64(%rax)
movq -0x18(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/desktop.c
// Function: rename_desktop
void rename_desktop(monitor_t *m, desktop_t *d, const char *name)
{

	put_status(SBSC_MASK_DESKTOP_RENAME, "desktop_rename 0x%08X 0x%08X %s %s\n", m->id, d->id, d->name, name);

	snprintf(d->name, sizeof(d->name), "%s", name);

	put_status(SBSC_MASK_REPORT);
	ewmh_update_desktop_names();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x20(%rax), %edx
movq -0x10(%rbp), %rax
movl 0x20(%rax), %ecx
movq -0x10(%rbp), %r8
movq -0x18(%rbp), %r9
movl $0x100, %edi            # imm = 0x100
leaq 0x2312d(%rip), %rsi     # 0x2d703
movb $0x0, %al
callq 0x2c0b0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rcx
movl $0x20, %esi
leaq 0x22aff(%rip), %rdx     # 0x2d0f0
movb $0x0, %al
callq 0x4120
movl $0x1, %edi
movb $0x0, %al
callq 0x2c0b0
callq 0x2afe0
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/desktop.c
// Function: add_desktop
void add_desktop(monitor_t *m, desktop_t *d)
{
	put_status(SBSC_MASK_DESKTOP_ADD, "desktop_add 0x%08X 0x%08X %s\n", m->id, d->id, d->name);

	d->border_width = m->border_width;
	d->window_gap = m->window_gap;
	insert_desktop(m, d);
	ewmh_update_current_desktop();
	ewmh_update_number_of_desktops();
	ewmh_update_desktop_names();
	ewmh_update_desktop_viewport();
	ewmh_update_wm_desktops();
	put_status(SBSC_MASK_REPORT);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x20(%rax), %edx
movq -0x10(%rbp), %rax
movl 0x20(%rax), %ecx
movq -0x10(%rbp), %r8
movl $0x80, %edi
leaq 0x230e9(%rip), %rsi     # 0x2d727
movb $0x0, %al
callq 0x2c0b0
movq -0x8(%rbp), %rax
movl 0x48(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x64(%rax)
movq -0x8(%rbp), %rax
movl 0x44(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x60(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xa3f0
callq 0x2ae60
callq 0x2acc0
callq 0x2afe0
callq 0x2b1a0
callq 0x2af20
movl $0x1, %edi
movb $0x0, %al
callq 0x2c0b0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/desktop.c
// Function: find_desktop_in
desktop_t *find_desktop_in(uint32_t id, monitor_t *m)
{
	if (m == NULL) {
		return NULL;
	}

	for (desktop_t *d = m->desk_head; d != NULL; d = d->next) {
		if (d->id == id) {
			return d;
		}
	}

	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0xa6bc
movq $0x0, -0x8(%rbp)
jmp 0xa6fd
movq -0x18(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xa6f5
movq -0x20(%rbp), %rax
movl 0x20(%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0xa6e5
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xa6fd
jmp 0xa6e7
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0xa6c8
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/desktop.c
// Function: remove_desktop
void remove_desktop(monitor_t *m, desktop_t *d)
{
	put_status(SBSC_MASK_DESKTOP_REMOVE, "desktop_remove 0x%08X 0x%08X\n", m->id, d->id);

	remove_node(m, d, d->root);
	unlink_desktop(m, d);
	history_remove(d, NULL, false);
	free(d);

	ewmh_update_current_desktop();
	ewmh_update_number_of_desktops();
	ewmh_update_desktop_names();
	ewmh_update_desktop_viewport();

	if (mon != NULL && m->desk == NULL) {
		if (m == mon) {
			focus_node(m, NULL, NULL);
		} else {
			activate_desktop(m, NULL);
			if (m->desk != NULL) {
				activate_node(m, m->desk, m->desk->focus);
			}
		}
	}

	put_status(SBSC_MASK_REPORT);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x20(%rax), %edx
movq -0x10(%rbp), %rax
movl 0x20(%rax), %ecx
movl $0x200, %edi            # imm = 0x200
leaq 0x2300b(%rip), %rsi     # 0x2d745
movb $0x0, %al
callq 0x2c0b0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdx
callq 0xfaf0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xa330
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x12710
movq -0x10(%rbp), %rdi
callq 0x4450
callq 0x2ae60
callq 0x2acc0
callq 0x2afe0
callq 0x2b1a0
leaq 0x2af6a(%rip), %rax     # 0x35700
cmpq $0x0, (%rax)
je 0xa802
movq -0x8(%rbp), %rax
cmpq $0x0, 0x58(%rax)
jne 0xa802
movq -0x8(%rbp), %rax
leaq 0x2af4e(%rip), %rcx     # 0x35700
cmpq (%rcx), %rax
jne 0xa7c9
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0xd720
jmp 0xa800
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x99e0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0xa7fe
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq 0x38(%rax), %rdx
callq 0xccb0
jmp 0xa800
jmp 0xa802
movl $0x1, %edi
movb $0x0, %al
callq 0x2c0b0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/desktop.c
// Function: is_urgent
bool is_urgent(desktop_t *d)
{
	for (node_t *n = first_extrema(d->root); n != NULL; n = next_leaf(n, d->root)) {
		if (n->client == NULL) {
			continue;
		}
		if (n->client->urgent) {
			return true;
		}
	}
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0xbe70
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xafc1
movq -0x18(%rbp), %rax
cmpq $0x0, 0x48(%rax)
jne 0xaf91
jmp 0xafaa
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
testb $0x1, 0x304(%rax)
je 0xafa8
movb $0x1, -0x1(%rbp)
jmp 0xafc5
jmp 0xafaa
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rsi
callq 0xbf80
movq %rax, -0x18(%rbp)
jmp 0xaf7d
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/tree.c
// Function: make_presel
presel_t *make_presel(void)
{
	presel_t *p = calloc(1, sizeof(presel_t));
	p->split_dir = DIR_EAST;
	p->split_ratio = split_ratio;
	p->feedback = XCB_NONE;
	return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x1, %edi
movl $0x10, %esi
callq 0x4890
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x3, 0x8(%rax)
leaq 0x2a4db(%rip), %rax     # 0x35db8
movsd (%rax), %xmm0
movq -0x8(%rbp), %rax
movsd %xmm0, (%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/tree.c
// Function: set_type
bool set_type(node_t *n, split_type_t typ)
{
	if (n == NULL || n->split_type == typ) {
		return false;
	}

	n->split_type = typ;
	update_constraints(n);
	rebuild_constraints_towards_root(n);
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xb922
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
cmpl -0x14(%rbp), %eax
jne 0xb928
movb $0x0, -0x1(%rbp)
jmp 0xb948
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rdi
callq 0xb960
movq -0x10(%rbp), %rdi
callq 0xba80
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/tree.c
// Function: update_constraints
void update_constraints(node_t *n)
{
	if (n == NULL || is_leaf(n)) {
		return;
	}
	if (n->split_type == TYPE_VERTICAL) {
		n->constraints.min_width = n->first_child->constraints.min_width + n->second_child->constraints.min_width;
		n->constraints.min_height = MAX(n->first_child->constraints.min_height, n->second_child->constraints.min_height);
	} else {
		n->constraints.min_width = MAX(n->first_child->constraints.min_width, n->second_child->constraints.min_width);
		n->constraints.min_height = n->first_child->constraints.min_height + n->second_child->constraints.min_height;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xb982
movq -0x8(%rbp), %rdi
callq 0xb870
testb $0x1, %al
jne 0xb982
jmp 0xb987
jmp 0xba71
movq -0x8(%rbp), %rax
cmpl $0x1, 0x4(%rax)
jne 0xba02
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzwl 0x20(%rax), %eax
movq -0x8(%rbp), %rcx
movq 0x38(%rcx), %rcx
movzwl 0x20(%rcx), %ecx
addl %ecx, %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0x20(%rax)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzwl 0x22(%rax), %eax
movq -0x8(%rbp), %rcx
movq 0x38(%rcx), %rcx
movzwl 0x22(%rcx), %ecx
cmpl %ecx, %eax
jle 0xb9e3
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzwl 0x22(%rax), %eax
movl %eax, -0xc(%rbp)
jmp 0xb9f2
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movzwl 0x22(%rax), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0x22(%rax)
jmp 0xba71
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzwl 0x20(%rax), %eax
movq -0x8(%rbp), %rcx
movq 0x38(%rcx), %rcx
movzwl 0x20(%rcx), %ecx
cmpl %ecx, %eax
jle 0xba2f
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzwl 0x20(%rax), %eax
movl %eax, -0x10(%rbp)
jmp 0xba3e
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movzwl 0x20(%rax), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0x20(%rax)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzwl 0x22(%rax), %eax
movq -0x8(%rbp), %rcx
movq 0x38(%rcx), %rcx
movzwl 0x22(%rcx), %ecx
addl %ecx, %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0x22(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/tree.c
// Function: rebuild_constraints_towards_root
void rebuild_constraints_towards_root(node_t *n)
{
	if (n == NULL) {
		return;
	}

	node_t *p = n->parent;

	if (p != NULL) {
		update_constraints(p);
	}

	rebuild_constraints_towards_root(p);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0xba95
jmp 0xbaba
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xbab1
movq -0x10(%rbp), %rdi
callq 0xb960
movq -0x10(%rbp), %rdi
callq 0xba80
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/tree.c
// Function: set_ratio
bool set_ratio(node_t *n, double rat)
{
	if (n == NULL || n->split_ratio == rat) {
		return false;
	}

	n->split_ratio = rat;
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movsd %xmm0, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xbae6
movq -0x10(%rbp), %rax
movsd 0x8(%rax), %xmm0
ucomisd -0x18(%rbp), %xmm0
jne 0xbaec
jp 0xbaec
movb $0x0, -0x1(%rbp)
jmp 0xbafe
movsd -0x18(%rbp), %xmm0
movq -0x10(%rbp), %rax
movsd %xmm0, 0x8(%rax)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/tree.c
// Function: presel_dir
void presel_dir(monitor_t *m, desktop_t *d, node_t *n, direction_t dir)
{
	if (n->presel == NULL) {
		n->presel = make_presel();
	}

	n->presel->split_dir = dir;

	put_status(SBSC_MASK_NODE_PRESEL, "node_presel 0x%08X 0x%08X 0x%08X dir %s\n", m->id, d->id, n->id, SPLIT_DIR_STR(dir));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0xbb42
callq 0xb8b0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movl -0x1c(%rbp), %ecx
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0xbb80
leaq 0x21c97(%rip), %rax     # 0x2d811
movq %rax, -0x30(%rbp)
jmp 0xbbb7
cmpl $0x1, -0x1c(%rbp)
jne 0xbb93
leaq 0x2386e(%rip), %rax     # 0x2f3fb
movq %rax, -0x38(%rbp)
jmp 0xbbaf
movl -0x1c(%rbp), %edx
leaq 0x21c80(%rip), %rax     # 0x2d81d
leaq 0x21c73(%rip), %rcx     # 0x2d817
cmpl $0x2, %edx
cmoveq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0x20(%rbp), %r8d
movl -0x24(%rbp), %ecx
movl -0x28(%rbp), %edx
movq -0x30(%rbp), %r9
movl $0x100000, %edi         # imm = 0x100000
leaq 0x21c17(%rip), %rsi     # 0x2d7e8
movb $0x0, %al
callq 0x2c0b0
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/tree.c
// Function: presel_ratio
void presel_ratio(monitor_t *m, desktop_t *d, node_t *n, double ratio)
{
	if (n->presel == NULL) {
		n->presel = make_presel();
	}

	n->presel->split_ratio = ratio;

	put_status(SBSC_MASK_NODE_PRESEL, "node_presel 0x%08X 0x%08X 0x%08X ratio %lf\n", m->id, d->id, n->id, ratio);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movsd %xmm0, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0xbc14
callq 0xb8b0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movsd -0x20(%rbp), %xmm0
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movsd %xmm0, (%rax)
movq -0x8(%rbp), %rax
movl 0x20(%rax), %edx
movq -0x10(%rbp), %rax
movl 0x20(%rax), %ecx
movq -0x18(%rbp), %rax
movl (%rax), %r8d
movsd -0x20(%rbp), %xmm0
movl $0x100000, %edi         # imm = 0x100000
leaq 0x21bd7(%rip), %rsi     # 0x2d822
movb $0x1, %al
callq 0x2c0b0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/tree.c
// Function: cancel_presel
void cancel_presel(monitor_t *m, desktop_t *d, node_t *n)
{
	if (n->presel == NULL) {
		return;
	}

	if (n->presel->feedback != XCB_NONE) {
		xcb_destroy_window(dpy, n->presel->feedback);
	}

	free(n->presel);
	n->presel = NULL;

	put_status(SBSC_MASK_NODE_PRESEL, "node_presel 0x%08X 0x%08X 0x%08X cancel\n", m->id, d->id, n->id);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0xbc81
jmp 0xbcf0
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl 0xc(%rax), %eax
cmpq $0x0, %rax
je 0xbcaf
leaq 0x29a1f(%rip), %rax     # 0x356b8
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl 0xc(%rax), %esi
callq 0x4140
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x4450
movq -0x18(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movl 0x20(%rax), %edx
movq -0x10(%rbp), %rax
movl 0x20(%rax), %ecx
movq -0x18(%rbp), %rax
movl (%rax), %r8d
movl $0x100000, %edi         # imm = 0x100000
leaq 0x21b65(%rip), %rsi     # 0x2d84e
movb $0x0, %al
callq 0x2c0b0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/tree.c
// Function: cancel_presel_in
void cancel_presel_in(monitor_t *m, desktop_t *d, node_t *n)
{
	if (n == NULL) {
		return;
	}
	cancel_presel(m, d, n);
	cancel_presel_in(m, d, n->first_child);
	cancel_presel_in(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 0xbd1d
jmp 0xbd58
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xbc60
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rdx
callq 0xbd00
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdx
callq 0xbd00
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/tree.c
// Function: find_public
node_t *find_public(desktop_t *d)
{
	unsigned int b_manual_area = 0;
	unsigned int b_automatic_area = 0;
	node_t *b_manual = NULL;
	node_t *b_automatic = NULL;
	for (node_t *n = first_extrema(d->root); n != NULL; n = next_leaf(n, d->root)) {
		if (n->vacant) {
			continue;
		}
		unsigned int n_area = node_area(d, n);
		if (n_area > b_manual_area && (n->presel != NULL || !n->private)) {
			b_manual = n;
			b_manual_area = n_area;
		}
		if (n_area > b_automatic_area &&
		    n->presel == NULL && !n->private && private_count(n->parent) == 0) {
			b_automatic = n;
			b_automatic_area = n_area;
		}
	}
	if (b_automatic != NULL) {
		return b_automatic;
	} else {
		return b_manual;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0xbe70
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0xbe46
movq -0x30(%rbp), %rax
testb $0x1, 0x24(%rax)
je 0xbdb2
jmp 0xbe2c
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0xbec0
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x14(%rbp), %eax
jbe 0xbded
movq -0x30(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0xbddf
movq -0x30(%rbp), %rax
testb $0x1, 0x27(%rax)
jne 0xbded
movq -0x30(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x18(%rbp), %eax
jbe 0xbe2a
movq -0x30(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0xbe2a
movq -0x30(%rbp), %rax
testb $0x1, 0x27(%rax)
jne 0xbe2a
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0xbf10
cmpl $0x0, %eax
jne 0xbe2a
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0xbe2c
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rsi
callq 0xbf80
movq %rax, -0x30(%rbp)
jmp 0xbd9b
cmpq $0x0, -0x28(%rbp)
je 0xbe57
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xbe5f
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/tree.c
// Function: first_extrema
node_t *first_extrema(node_t *n)
{
	if (n == NULL) {
		return NULL;
	} else if (n->first_child == NULL) {
		return n;
	} else {
		return first_extrema(n->first_child);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xbe8d
movq $0x0, -0x8(%rbp)
jmp 0xbeb3
movq -0x10(%rbp), %rax
cmpq $0x0, 0x30(%rax)
jne 0xbea2
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xbeb3
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0xbe70
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/tree.c
// Function: next_leaf
node_t *next_leaf(node_t *n, node_t *r)
{
	if (n == NULL) {
		return NULL;
	}
	node_t *p = n;
	while (is_second_child(p) && p != r) {
		p = p->parent;
	}
	if (p == r) {
		return NULL;
	}
	return first_extrema(p->parent->second_child);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xbfa1
movq $0x0, -0x8(%rbp)
jmp 0xc00e
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0xe4c0
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x21(%rbp)
jne 0xbfc0
jmp 0xbfce
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
setne %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0xbfd7
jmp 0xbfe5
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0xbfa9
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jne 0xbff9
movq $0x0, -0x8(%rbp)
jmp 0xc00e
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x38(%rax), %rdi
callq 0xbe70
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/tree.c
// Function: make_node
node_t *make_node(uint32_t id)
{
	if (id == XCB_NONE) {
		id = xcb_generate_id(dpy);
	}
	node_t *n = calloc(1, sizeof(node_t));
	n->id = id;
	n->parent = n->first_child = n->second_child = NULL;
	n->vacant = n->hidden = n->sticky = n->private = n->locked = n->marked = false;
	n->split_ratio = split_ratio;
	n->split_type = TYPE_VERTICAL;
	n->constraints = (constraints_t) {MIN_WIDTH, MIN_HEIGHT};
	n->presel = NULL;
	n->client = NULL;
	return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpq $0x0, %rax
jne 0xc726
leaq 0x28f9d(%rip), %rax     # 0x356b8
movq (%rax), %rdi
callq 0x4900
movl %eax, -0x4(%rbp)
movl $0x1, %edi
movl $0x50, %esi
callq 0x4890
movq %rax, -0x10(%rbp)
movl -0x4(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x29(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x28(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x27(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x26(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x25(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x24(%rax)
leaq 0x2961b(%rip), %rax     # 0x35db8
movsd (%rax), %xmm0
movq -0x10(%rbp), %rax
movsd %xmm0, 0x8(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x4(%rax)
movq -0x10(%rbp), %rax
movw $0x20, -0x14(%rbp)
movw $0x20, -0x12(%rbp)
movl -0x14(%rbp), %ecx
movl %ecx, 0x20(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)