LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: transfer_sticky_nodes
void transfer_sticky_nodes(monitor_t *ms, desktop_t *ds, monitor_t *md, desktop_t *dd, node_t *n)
{
	if (n == NULL) {
		return;
	} else if (n->sticky) {
		sticky_still = false;
		transfer_node(ms, ds, n, md, dd, dd->focus, false);
		sticky_still = true;
	} else {
		/* we need references to the children because n might be freed after
		 * the first recursive call */
		node_t *first_child = n->first_child;
		node_t *second_child = n->second_child;
		transfer_sticky_nodes(ms, ds, md, dd, first_child);
		transfer_sticky_nodes(ms, ds, md, dd, second_child);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
testq %r14, %r14
je 0x9e43
cmpb $0x1, 0x26(%r14)
je 0x9e15
movq 0x30(%r14), %r8
movq 0x38(%r14), %r14
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x9dd4
jmp 0x9dee
leaq 0x1f94e(%rip), %rbp     # 0x2976a
movb $0x0, (%rbp)
movq 0x38(%rbx), %r9
movl $0x0, (%rsp)
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %r15, %rcx
movq %rbx, %r8
callq 0x9e52
movb $0x1, (%rbp)
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/tree.c
// Function: set_urgent
void set_urgent(monitor_t *m, desktop_t *d, node_t *n, bool value)
{
	if (value && mon->desk->focus == n) {
		return;
	}

	n->client->urgent = value;

	if (value) {
		n->client->wm_flags |= WM_FLAG_DEMANDS_ATTENTION;
	} else {
		n->client->wm_flags &= ~WM_FLAG_DEMANDS_ATTENTION;
	}

	ewmh_wm_state_update(n);

	put_status(SBSC_MASK_NODE_FLAG, "node_flag 0x%08X 0x%08X 0x%08X urgent %s\n", m->id, d->id, n->id, ON_OFF_STR(value));
	put_status(SBSC_MASK_REPORT);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
testl %ecx, %ecx
je 0xa6af
leaq 0x1f07c(%rip), %rax     # 0x29710
movq (%rax), %rax
movq 0x58(%rax), %rax
cmpq %rbx, 0x38(%rax)
je 0xa715
movl $0x800, %eax            # imm = 0x800
leaq 0x16468(%rip), %r12     # 0x20b15
jmp 0xa6b8
xorl %eax, %eax
leaq 0x151f2(%rip), %r12     # 0x1f8aa
movq 0x48(%rbx), %rdx
movb %cl, 0x304(%rdx)
movl $0xfffff7ff, %ecx       # imm = 0xFFFFF7FF
andl 0x378(%rdx), %ecx
orl %eax, %ecx
movl %ecx, 0x378(%rdx)
movq %rbx, %rdi
callq 0x1e5aa
movl 0x20(%r15), %edx
movl 0x20(%r14), %ecx
movl (%rbx), %r8d
leaq 0x15268(%rip), %rsi     # 0x1f957
movl $0x2000000, %edi        # imm = 0x2000000
movq %r12, %r9
xorl %eax, %eax
callq 0x1eb0b
movl $0x1, %edi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1eb0b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: hide_node
void hide_node(desktop_t *d, node_t *n)
{
	if (n == NULL || (!hide_sticky && n->sticky)) {
		return;
	} else {
		if (!n->hidden) {
			if (n->presel != NULL && d->layout != LAYOUT_MONOCLE) {
				window_hide(n->presel->feedback);
			}
			if (n->client != NULL) {
				window_hide(n->id);
			}
		}
		if (n->client != NULL) {
			n->client->shown = false;
		}
		hide_node(d, n->first_child);
		hide_node(d, n->second_child);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x1f036(%rip), %r15     # 0x29769
testq %rbx, %rbx
je 0xa792
cmpb $0x0, (%r15)
jne 0xa744
cmpb $0x0, 0x26(%rbx)
jne 0xa792
cmpb $0x0, 0x25(%rbx)
jne 0xa770
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0xa762
cmpl $0x1, 0x24(%r14)
je 0xa762
movl 0xc(%rax), %edi
callq 0x10447
cmpq $0x0, 0x48(%rbx)
je 0xa770
movl (%rbx), %edi
callq 0x10447
movq 0x48(%rbx), %rax
testq %rax, %rax
je 0xa780
movb $0x0, 0x305(%rax)
movq 0x30(%rbx), %rsi
movq %r14, %rdi
callq 0xa721
movq 0x38(%rbx), %rbx
jmp 0xa733
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: show_node
void show_node(desktop_t *d, node_t *n)
{
	if (n == NULL) {
		return;
	} else {
		if (!n->hidden) {
			if (n->client != NULL) {
				window_show(n->id);
			}
			if (n->presel != NULL && d->layout != LAYOUT_MONOCLE) {
				window_show(n->presel->feedback);
			}
		}
		if (n->client != NULL) {
			n->client->shown = true;
		}
		show_node(d, n->first_child);
		show_node(d, n->second_child);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testq %rbx, %rbx
je 0xa7f5
cmpb $0x0, 0x25(%rbx)
jne 0xa7d3
cmpq $0x0, 0x48(%rbx)
je 0xa7bb
movl (%rbx), %edi
callq 0xfe0f
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0xa7d3
cmpl $0x1, 0x24(%r14)
je 0xa7d3
movl 0xc(%rax), %edi
callq 0xfe0f
movq 0x48(%rbx), %rax
testq %rax, %rax
je 0xa7e3
movb $0x1, 0x305(%rax)
movq 0x30(%rbx), %rsi
movq %r14, %rdi
callq 0xa798
movq 0x38(%rbx), %rbx
jmp 0xa7a2
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: make_client
client_t *make_client(void)
{
	client_t *c = calloc(1, sizeof(client_t));
	c->state = c->last_state = STATE_TILED;
	c->layer = c->last_layer = LAYER_NORMAL;
	snprintf(c->class_name, sizeof(c->class_name), "%s", MISSING_VALUE);
	snprintf(c->instance_name, sizeof(c->instance_name), "%s", MISSING_VALUE);
	c->border_width = border_width;
	c->urgent = false;
	c->shown = false;
	c->wm_flags = 0;
	c->icccm_props.input_hint = true;
	c->icccm_props.take_focus = false;
	c->icccm_props.delete_window = false;
	c->size_hints.flags = 0;
	c->honor_size_hints = honor_size_hints;
	return c;
}

// Assembly:
pushq %rax
movl $0x1, %edi
movl $0x37c, %esi            # imm = 0x37C
callq 0x48b0
movq $0x0, 0x308(%rax)
movabsq $0x100000001, %rcx      # imm = 0x100000001
movq %rcx, 0x310(%rax)
movl $0x412f4e, %ecx         # imm = 0x412F4E
movl %ecx, (%rax)
movl %ecx, 0x100(%rax)
leaq 0x1f587(%rip), %rcx     # 0x29dc4
movl (%rcx), %ecx
movl %ecx, 0x300(%rax)
movw $0x0, 0x304(%rax)
xorl %ecx, %ecx
movl %ecx, 0x378(%rax)
movw $0x100, 0x374(%rax)     # imm = 0x100
movb $0x0, 0x376(%rax)
movl %ecx, 0x32c(%rax)
leaq 0x1f595(%rip), %rcx     # 0x29e08
movl (%rcx), %ecx
movl %ecx, 0x328(%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: clients_count_in
unsigned int clients_count_in(node_t *n)
{
	if (n == NULL) {
		return 0;
	} else {
		return (n->client != NULL ? 1 : 0) +
		        clients_count_in(n->first_child) +
		        clients_count_in(n->second_child);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
xorl %ebx, %ebx
testq %r14, %r14
je 0xaaf0
movq 0x30(%r14), %rdi
movq 0x48(%r14), %r15
callq 0xaac5
cmpq $0x1, %r15
sbbl $-0x1, %eax
movq 0x38(%r14), %r14
addl %eax, %ebx
jmp 0xaacf
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: next_node
node_t *next_node(node_t *n)
{
	if (n == NULL) {
		return NULL;
	}

	if (n->second_child != NULL) {
		return first_extrema(n->second_child);
	} else {
		node_t *p = n;
		while (is_second_child(p)) {
			p = p->parent;
		}
		if (is_first_child(p)) {
			return p->parent;
		} else {
			return NULL;
		}
	}
}

// Assembly:
testq %rdi, %rdi
je 0xab83
movq 0x38(%rdi), %rax
testq %rax, %rax
je 0xab43
movq %rax, %rdi
jmp 0x92fd
movq 0x40(%rdi), %rdx
testq %rdx, %rdx
je 0xab6d
xorl %eax, %eax
xorl %ecx, %ecx
cmpq %rdi, 0x38(%rdx)
jne 0xab6f
movq 0x40(%rdi), %rdi
testq %rdi, %rdi
sete %cl
je 0xab85
movq 0x40(%rdi), %rdx
testq %rdx, %rdx
jne 0xab50
jmp 0xab6f
xorl %ecx, %ecx
testb $0x1, %cl
jne 0xab83
movq 0x40(%rdi), %rax
testq %rax, %rax
je 0xab83
cmpq %rdi, 0x30(%rax)
je 0xab86
xorl %eax, %eax
retq
movq 0x40(%rdi), %rax
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: prev_node
node_t *prev_node(node_t *n)
{
	if (n == NULL) {
		return NULL;
	}

	if (n->first_child != NULL) {
		return second_extrema(n->first_child);
	} else {
		node_t *p = n;
		while (is_first_child(p)) {
			p = p->parent;
		}
		if (is_second_child(p)) {
			return p->parent;
		} else {
			return NULL;
		}
	}
}

// Assembly:
testq %rdi, %rdi
je 0xabe1
movq 0x30(%rdi), %rax
testq %rax, %rax
je 0xaba1
movq %rax, %rdi
jmp 0xab18
movq 0x40(%rdi), %rdx
testq %rdx, %rdx
je 0xabcb
xorl %eax, %eax
xorl %ecx, %ecx
cmpq %rdi, 0x30(%rdx)
jne 0xabcd
movq 0x40(%rdi), %rdi
testq %rdi, %rdi
sete %cl
je 0xabe3
movq 0x40(%rdi), %rdx
testq %rdx, %rdx
jne 0xabae
jmp 0xabcd
xorl %ecx, %ecx
testb $0x1, %cl
jne 0xabe1
movq 0x40(%rdi), %rax
testq %rax, %rax
je 0xabe1
cmpq %rdi, 0x38(%rax)
je 0xabe4
xorl %eax, %eax
retq
movq 0x40(%rdi), %rax
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: prev_leaf
node_t *prev_leaf(node_t *n, node_t *r)
{
	if (n == NULL) {
		return NULL;
	}
	node_t *p = n;
	while (is_first_child(p) && p != r) {
		p = p->parent;
	}
	if (p == r) {
		return NULL;
	}
	return second_extrema(p->parent->first_child);
}

// Assembly:
testq %rdi, %rdi
je 0xac28
testq %rdi, %rdi
je 0xac05
movq 0x40(%rdi), %rax
testq %rax, %rax
je 0xac05
cmpq %rdi, 0x30(%rax)
sete %al
jmp 0xac07
xorl %eax, %eax
cmpq %rsi, %rdi
je 0xac16
testb %al, %al
je 0xac16
movq 0x40(%rdi), %rdi
jmp 0xabee
cmpq %rsi, %rdi
je 0xac28
movq 0x40(%rdi), %rax
movq 0x30(%rax), %rdi
jmp 0xab18
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: is_adjacent
bool is_adjacent(node_t *a, node_t *b, direction_t dir)
{
	switch (dir) {
		case DIR_EAST:
			return (a->rectangle.x + a->rectangle.width) == b->rectangle.x;
			break;
		case DIR_SOUTH:
			return (a->rectangle.y + a->rectangle.height) == b->rectangle.y;
			break;
		case DIR_WEST:
			return (b->rectangle.x + b->rectangle.width) == a->rectangle.x;
			break;
		case DIR_NORTH:
			return (b->rectangle.y + b->rectangle.height) == a->rectangle.y;
			break;
	}
	return false;
}

// Assembly:
cmpl $0x3, %edx
ja 0xacd2
movl %edx, %eax
leaq 0x14973(%rip), %rcx     # 0x1f5f8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movswl 0x1a(%rsi), %eax
movzwl 0x1e(%rsi), %ecx
addl %eax, %ecx
movswl 0x1a(%rdi), %eax
jmp 0xaccc
movswl 0x1a(%rdi), %eax
movzwl 0x1e(%rdi), %ecx
addl %eax, %ecx
movswl 0x1a(%rsi), %eax
jmp 0xaccc
movswl 0x18(%rdi), %eax
movzwl 0x1c(%rdi), %ecx
addl %eax, %ecx
movswl 0x18(%rsi), %eax
jmp 0xaccc
movswl 0x18(%rsi), %eax
movzwl 0x1c(%rsi), %ecx
addl %eax, %ecx
movswl 0x18(%rdi), %eax
cmpl %eax, %ecx
sete %al
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: find_fence
node_t *find_fence(node_t *n, direction_t dir)
{
	node_t *p;

	if (n == NULL) {
		return NULL;
	}

	p = n->parent;

	while (p != NULL) {
		if ((dir == DIR_NORTH && p->split_type == TYPE_HORIZONTAL && p->rectangle.y < n->rectangle.y) ||
		    (dir == DIR_WEST && p->split_type == TYPE_VERTICAL && p->rectangle.x < n->rectangle.x) ||
		    (dir == DIR_SOUTH && p->split_type == TYPE_HORIZONTAL && (p->rectangle.y + p->rectangle.height) > (n->rectangle.y + n->rectangle.height)) ||
		    (dir == DIR_EAST && p->split_type == TYPE_VERTICAL && (p->rectangle.x + p->rectangle.width) > (n->rectangle.x + n->rectangle.width)))
			return p;
		p = p->parent;
	}

	return NULL;
}

// Assembly:
testq %rdi, %rdi
je 0xada4
movq 0x40(%rdi), %rax
testq %rax, %rax
je 0xada4
movl %esi, %ecx
leaq 0x14914(%rip), %rdx     # 0x1f608
cmpl $0x3, %esi
ja 0xad97
movslq (%rdx,%rcx,4), %r8
addq %rdx, %r8
jmpq *%r8
cmpl $0x0, 0x4(%rax)
jne 0xad1d
movzwl 0x1a(%rax), %r8d
cmpw 0x1a(%rdi), %r8w
jl 0xada6
cmpl $0x3, %esi
je 0xad72
cmpl $0x2, %esi
je 0xad48
cmpl $0x1, %esi
jne 0xad97
cmpl $0x1, 0x4(%rax)
jne 0xad3e
movzwl 0x18(%rax), %r8d
cmpw 0x18(%rdi), %r8w
jl 0xada6
cmpl $0x3, %esi
je 0xad72
cmpl $0x2, %esi
jne 0xad97
cmpl $0x0, 0x4(%rax)
jne 0xad6d
movswl 0x1a(%rax), %r8d
movzwl 0x1e(%rax), %r9d
addl %r8d, %r9d
movswl 0x1a(%rdi), %r8d
movzwl 0x1e(%rdi), %r10d
addl %r8d, %r10d
cmpl %r10d, %r9d
jg 0xada6
cmpl $0x3, %esi
jne 0xad97
cmpl $0x1, 0x4(%rax)
jne 0xad97
movswl 0x18(%rax), %r8d
movzwl 0x1c(%rax), %r9d
addl %r8d, %r9d
movswl 0x18(%rdi), %r8d
movzwl 0x1c(%rdi), %r10d
addl %r8d, %r10d
cmpl %r10d, %r9d
jg 0xada6
movq 0x40(%rax), %rax
testq %rax, %rax
jne 0xacf4
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: find_by_id
bool find_by_id(uint32_t id, coordinates_t *loc)
{
	for (monitor_t *m = mon_head; m != NULL; m = m->next) {
		for (desktop_t *d = m->desk_head; d != NULL; d = d->next) {
			node_t *n = find_by_id_in(d->root, id);
			if (n != NULL) {
				loc->monitor = m;
				loc->desktop = d;
				loc->node = n;
				return true;
			}
		}
	}
	return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x1e934(%rip), %rax     # 0x29708
movq (%rax), %r15
testq %r15, %r15
setne %r14b
je 0xae27
movq %rsi, %rbx
movl %edi, %ebp
movq 0x60(%r15), %r12
testq %r12, %r12
sete %r13b
je 0xae1a
movq 0x30(%r12), %rdi
movl %ebp, %esi
callq 0xae3d
testq %rax, %rax
jne 0xae0a
movq 0x48(%r12), %r12
jmp 0xade9
movq %r15, (%rbx)
movq %r12, 0x8(%rbx)
movq %rax, 0x10(%rbx)
testb %r13b, %r13b
je 0xae27
movq 0x78(%r15), %r15
testq %r15, %r15
setne %r14b
jne 0xade5
andb $0x1, %r14b
movl %r14d, %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/tree.c
// Function: find_by_id_in
node_t *find_by_id_in(node_t *r, uint32_t id)
{
	if (r == NULL) {
		return NULL;
	} else if (r->id == id) {
		return r;
	} else {
		node_t *f = find_by_id_in(r->first_child, id);
		if (f != NULL) {
			return f;
		} else {
			return find_by_id_in(r->second_child, id);
		}
	}
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
testq %rbx, %rbx
je 0xae64
cmpl %ebp, (%rbx)
je 0xae6b
movq 0x30(%rbx), %rdi
movl %ebp, %esi
callq 0xae3d
testq %rax, %rax
jne 0xae68
movq 0x38(%rbx), %rbx
jmp 0xae45
xorl %ebx, %ebx
jmp 0xae6b
movq %rax, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: find_any_node
void find_any_node(coordinates_t *ref, coordinates_t *dst, node_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) {
			if (find_any_node_in(m, d, d->root, ref, dst, sel)) {
				return;
			}
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq 0x1e883(%rip), %rax     # 0x29708
movq (%rax), %r12
testq %r12, %r12
je 0xaecc
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x60(%r12), %r13
testq %r13, %r13
je 0xaec2
movq 0x30(%r13), %rdx
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rcx
movq %r14, %r8
movq %rbx, %r9
callq 0xaed6
testb %al, %al
jne 0xaecc
movq 0x48(%r13), %r13
jmp 0xae9b
movq 0x78(%r12), %r12
testq %r12, %r12
jne 0xae96
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: find_any_node_in
bool find_any_node_in(monitor_t *m, desktop_t *d, node_t *n, coordinates_t *ref, coordinates_t *dst, node_select_t *sel)
{
	if (n == NULL) {
		return false;
	} else {
		coordinates_t loc = {m, d, n};
		if (node_matches(&loc, ref, sel)) {
			*dst = loc;
			return true;
		} else {
			if (find_any_node_in(m, d, n->first_child, ref, dst, sel)) {
				return true;
			} else {
				return find_any_node_in(m, d, n->second_child, ref, dst, sel);
			}
		}
	}
}

// Assembly:
testq %rdx, %rdx
je 0xaf2c
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r14
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %rbp
movq %rsi, %r12
movq %rdi, %r13
movq %rsp, %rdi
movq %r13, (%rdi)
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, %rsi
movq %r9, %rdx
callq 0x192cf
testb %al, %al
je 0xaf2f
movq 0x10(%rsp), %rax
movq %rax, 0x10(%rbx)
movups (%rsp), %xmm0
movups %xmm0, (%rbx)
movb $0x1, %al
jmp 0xaf67
xorl %eax, %eax
retq
movq 0x30(%rbp), %rdx
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rcx
movq %rbx, %r8
movq %r14, %r9
callq 0xaed6
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0xaf67
movq 0x38(%rbp), %rdx
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rcx
movq %rbx, %r8
movq %r14, %r9
callq 0xaed6
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/tree.c
// Function: find_first_ancestor
void find_first_ancestor(coordinates_t *ref, coordinates_t *dst, node_select_t *sel)
{
	if (ref->node == NULL) {
		return;
	}

	coordinates_t loc = {ref->monitor, ref->desktop, ref->node};
	while ((loc.node = loc.node->parent) != NULL) {
		if (node_matches(&loc, ref, sel)) {
			*dst = loc;
			return;
		}
	}
}

// Assembly:
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0xafeb
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movq (%rdi), %rcx
movq %rsp, %r12
movq %rcx, (%r12)
movq 0x8(%rdi), %rcx
movq %rcx, 0x8(%r12)
movq %rax, 0x10(%r12)
movq 0x10(%rsp), %rax
movq 0x40(%rax), %rax
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0xafe0
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x192cf
testb %al, %al
je 0xafab
movq 0x10(%rsp), %rax
movq %rax, 0x10(%rbx)
movups (%rsp), %xmm0
movups %xmm0, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: find_nearest_neighbor
void find_nearest_neighbor(coordinates_t *ref, coordinates_t *dst, direction_t dir, node_select_t *sel)
{
	xcb_rectangle_t rect = get_rectangle(ref->monitor, ref->desktop, ref->node);
	uint32_t md = UINT32_MAX, mr = UINT32_MAX;

	for (monitor_t *m = mon_head; m != NULL; m = m->next) {
		desktop_t *d = m->desk;
		for (node_t *f = first_extrema(d->root); f != NULL; f = next_leaf(f, d->root)) {
			coordinates_t loc = {m, d, f};
			xcb_rectangle_t r = get_rectangle(m, d, f);
			if (f == ref->node ||
			    f->client == NULL ||
			    f->hidden ||
			    is_descendant(f, ref->node) ||
			    !node_matches(&loc, ref, sel) ||
			    !on_dir_side(rect, r, dir)) {
				continue;
			}
			uint32_t fd = boundary_distance(rect, r, dir);
			uint32_t fr = history_rank(f);
			if (fd < md || (fd == md && fr < mr)) {
				md = fd;
				mr = fr;
				*dst = loc;
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %rbx
movl %edx, 0x14(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdi, %r15
movq (%rdi), %rdi
movq 0x8(%r15), %rsi
movq 0x10(%r15), %rdx
callq 0x982d
movq %rax, 0x20(%rsp)
leaq 0x1e6e3(%rip), %rax     # 0x29708
movq (%rax), %r13
testq %r13, %r13
je 0xb159
movl $0xffffffff, 0x10(%rsp) # imm = 0xFFFFFFFF
movl $0xffffffff, 0xc(%rsp)  # imm = 0xFFFFFFFF
movq %rbx, 0x18(%rsp)
movq 0x58(%r13), %r14
movq 0x30(%r14), %rdi
callq 0x92fd
movq %rax, %rbp
testq %rax, %rax
je 0xb14c
movq %r13, 0x30(%rsp)
movq %r14, 0x38(%rsp)
movq %rbp, 0x40(%rsp)
movq %r13, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x982d
movq %rax, %r12
movq 0x10(%r15), %rax
cmpq %rax, %rbp
je 0xb13b
cmpq $0x0, 0x48(%rbp)
je 0xb13b
cmpb $0x0, 0x25(%rbp)
jne 0xb13b
testq %rax, %rax
je 0xb0bc
movq %rbp, %rcx
movq 0x40(%rcx), %rcx
cmpq %rax, %rcx
je 0xb0b7
testq %rcx, %rcx
jne 0xb0a9
cmpq %rax, %rcx
je 0xb13b
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x192cf
testb %al, %al
je 0xb13b
movq 0x20(%rsp), %rdi
movq %r12, %rsi
movl 0x14(%rsp), %ebx
movl %ebx, %edx
callq 0x6246
testb %al, %al
je 0xb136
movq 0x20(%rsp), %rdi
movq %r12, %rsi
movl %ebx, %edx
callq 0x61d1
movl %eax, %r12d
movq %rbp, %rdi
callq 0xdbe9
cmpl 0x10(%rsp), %r12d
movq 0x18(%rsp), %rbx
jb 0xb115
jne 0xb13b
cmpl 0xc(%rsp), %eax
jae 0xb13b
movq 0x40(%rsp), %rcx
movq 0x28(%rsp), %rdx
movq %rcx, 0x10(%rdx)
movups 0x30(%rsp), %xmm0
movups %xmm0, (%rdx)
movl %eax, 0xc(%rsp)
movl %r12d, 0x10(%rsp)
jmp 0xb13b
movq 0x18(%rsp), %rbx
movq 0x30(%r14), %rsi
movq %rbp, %rdi
callq 0x9363
jmp 0xb053
movq 0x78(%r13), %r13
testq %r13, %r13
jne 0xb046
addq $0x48, %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/tree.c
// Function: find_by_area
void find_by_area(area_peak_t ap, coordinates_t *ref, coordinates_t *dst, node_select_t *sel)
{
	unsigned int p_area;
	if (ap == AREA_BIGGEST) {
		p_area = 0;
	} else {
		p_area = UINT_MAX;
	}

	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 *f = first_extrema(d->root); f != NULL; f = next_leaf(f, d->root)) {
				coordinates_t loc = {m, d, f};
				if (f->vacant || !node_matches(&loc, ref, sel)) {
					continue;
				}
				unsigned int f_area = node_area(d, f);
				if ((ap == AREA_BIGGEST && f_area > p_area) || (ap == AREA_SMALLEST && f_area < p_area)) {
					*dst = loc;
					p_area = f_area;
				}
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, 0x10(%rsp)
movl %edi, 0x4(%rsp)
leaq 0x1e582(%rip), %rax     # 0x29708
movq (%rax), %r12
testq %r12, %r12
je 0xb289
movq %rcx, %r15
movq %rsi, %rbp
xorl %ecx, %ecx
movl 0x4(%rsp), %eax
negl %eax
sbbl %ecx, %ecx
movq %rcx, 0x8(%rsp)
movq 0x60(%r12), %r13
testq %r13, %r13
movq %r12, 0x18(%rsp)
je 0xb27b
movq 0x30(%r13), %rdi
callq 0x92fd
movq %rax, %r14
testq %rax, %rax
je 0xb26e
movq %r12, 0x20(%rsp)
movq %r13, 0x28(%rsp)
movq %r14, 0x30(%rsp)
cmpb $0x0, 0x24(%r14)
jne 0xb25d
leaq 0x20(%rsp), %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x192cf
testb %al, %al
je 0xb25d
movl 0x4(%rsp), %eax
cmpl $0x1, %eax
sete %bl
testl %eax, %eax
movq %rbp, %r12
movq %r15, %rbp
sete %r15b
xorl %edi, %edi
movq %r13, %rsi
movq %r14, %rdx
callq 0x982d
movq %rax, %rdi
callq 0x61bf
cmpl 0x8(%rsp), %eax
seta %dl
setb %cl
testb %dl, %r15b
movq %rbp, %r15
movq %r12, %rbp
movq 0x18(%rsp), %r12
jne 0xb242
andb %cl, %bl
je 0xb25d
movq 0x30(%rsp), %rcx
movq 0x10(%rsp), %rdx
movq %rcx, 0x10(%rdx)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rdx)
movq %rax, 0x8(%rsp)
movq 0x30(%r13), %rsi
movq %r14, %rdi
callq 0x9363
jmp 0xb1c3
movq 0x48(%r13), %r13
testq %r13, %r13
jne 0xb1ba
movq 0x78(%r12), %r12
testq %r12, %r12
jne 0xb1a7
addq $0x38, %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/tree.c
// Function: rotate_tree_rec
void rotate_tree_rec(node_t *n, int deg)
{
	if (n == NULL || is_leaf(n) || deg == 0) {
		return;
	}

	node_t *tmp;

	if ((deg == 90 && n->split_type == TYPE_HORIZONTAL) ||
	    (deg == 270 && n->split_type == TYPE_VERTICAL) ||
	    deg == 180) {
		tmp = n->first_child;
		n->first_child = n->second_child;
		n->second_child = tmp;
		n->split_ratio = 1.0 - n->split_ratio;
	}

	if (deg != 180) {
		if (n->split_type == TYPE_HORIZONTAL) {
			n->split_type = TYPE_VERTICAL;
		} else if (n->split_type == TYPE_VERTICAL) {
			n->split_type = TYPE_HORIZONTAL;
		}
	}

	rotate_tree_rec(n->first_child, deg);
	rotate_tree_rec(n->second_child, deg);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
testq %r14, %r14
je 0xb35a
cmpq $0x0, 0x30(%r14)
je 0xb2b5
xorl %eax, %eax
jmp 0xb2bd
cmpq $0x0, 0x38(%r14)
sete %al
testl %ebx, %ebx
je 0xb35a
testb %al, %al
jne 0xb35a
cmpl $0x10e, %ebx            # imm = 0x10E
je 0xb2f9
cmpl $0xb4, %ebx
je 0xb300
cmpl $0x5a, %ebx
jne 0xb32c
cmpl $0x0, 0x4(%r14)
je 0xb300
cmpl $0xb4, %ebx
je 0xb300
cmpl $0x10e, %ebx            # imm = 0x10E
jne 0xb32c
cmpl $0x1, 0x4(%r14)
jne 0xb324
movq 0x30(%r14), %rax
movq 0x38(%r14), %rcx
movq %rcx, 0x30(%r14)
movq %rax, 0x38(%r14)
movsd 0x14300(%rip), %xmm0    # 0x1f618
subsd 0x8(%r14), %xmm0
movsd %xmm0, 0x8(%r14)
cmpl $0xb4, %ebx
je 0xb346
movl 0x4(%r14), %eax
testl %eax, %eax
je 0xb33d
cmpl $0x1, %eax
jne 0xb346
xorl %eax, %eax
jmp 0xb342
movl $0x1, %eax
movl %eax, 0x4(%r14)
movq 0x30(%r14), %rdi
movl %ebx, %esi
callq 0xb298
movq 0x38(%r14), %r14
jmp 0xb2a1
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: rebuild_constraints_from_leaves
void rebuild_constraints_from_leaves(node_t *n)
{
	if (n == NULL || is_leaf(n)) {
		return;
	} else {
		rebuild_constraints_from_leaves(n->first_child);
		rebuild_constraints_from_leaves(n->second_child);
		update_constraints(n);
	}
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0xb394
movq %rdi, %rbx
cmpq $0x0, 0x30(%rdi)
jne 0xb379
cmpq $0x0, 0x38(%rbx)
je 0xb394
movq 0x30(%rbx), %rdi
callq 0xb362
movq 0x38(%rbx), %rdi
callq 0xb362
movq %rbx, %rdi
popq %rbx
jmp 0x8fc8
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: flip_tree
void flip_tree(node_t *n, flip_t flp)
{
	if (n == NULL || is_leaf(n)) {
		return;
	}

	node_t *tmp;

	if ((flp == FLIP_HORIZONTAL && n->split_type == TYPE_HORIZONTAL) ||
	    (flp == FLIP_VERTICAL && n->split_type == TYPE_VERTICAL)) {
		tmp = n->first_child;
		n->first_child = n->second_child;
		n->second_child = tmp;
		n->split_ratio = 1.0 - n->split_ratio;
	}

	flip_tree(n->first_child, flp);
	flip_tree(n->second_child, flp);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
testq %r14, %r14
je 0xb403
cmpq $0x0, 0x30(%r14)
jne 0xb3b2
cmpq $0x0, 0x38(%r14)
je 0xb403
cmpl $0x1, %ebx
je 0xb3c7
testl %ebx, %ebx
jne 0xb3f2
cmpl $0x0, 0x4(%r14)
je 0xb3ce
cmpl $0x1, %ebx
jne 0xb3f2
cmpl $0x1, 0x4(%r14)
jne 0xb3f2
movq 0x30(%r14), %rax
movq 0x38(%r14), %rcx
movq %rcx, 0x30(%r14)
movq %rax, 0x38(%r14)
movsd 0x14232(%rip), %xmm0    # 0x1f618
subsd 0x8(%r14), %xmm0
movsd %xmm0, 0x8(%r14)
movq 0x30(%r14), %rdi
movl %ebx, %esi
callq 0xb396
movq 0x38(%r14), %r14
jmp 0xb39f
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: equalize_tree
void equalize_tree(node_t *n)
{
	if (n == NULL || n->vacant) {
		return;
	} else {
		n->split_ratio = split_ratio;
		equalize_tree(n->first_child);
		equalize_tree(n->second_child);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1e9af(%rip), %r14     # 0x29dc8
testq %rbx, %rbx
je 0xb43d
cmpb $0x0, 0x24(%rbx)
jne 0xb43d
movsd (%r14), %xmm0
movsd %xmm0, 0x8(%rbx)
movq 0x30(%rbx), %rdi
callq 0xb40b
movq 0x38(%rbx), %rbx
jmp 0xb419
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: balance_tree
int balance_tree(node_t *n)
{
	if (n == NULL || n->vacant) {
		return 0;
	} else if (is_leaf(n)) {
		return 1;
	} else {
		int b1 = balance_tree(n->first_child);
		int b2 = balance_tree(n->second_child);
		int b = b1 + b2;
		if (b1 > 0 && b2 > 0) {
			n->split_ratio = (double) b1 / b;
		}
		return b;
	}
}

// Assembly:
xorl %eax, %eax
testq %rdi, %rdi
je 0xb4b4
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x0, 0x24(%rdi)
jne 0xb4ad
cmpq $0x0, 0x30(%rbx)
jne 0xb467
cmpq $0x0, 0x38(%rbx)
je 0xb4a8
movq 0x30(%rbx), %rdi
callq 0xb445
movl %eax, %r14d
movq 0x38(%rbx), %rdi
callq 0xb445
movl %eax, %ecx
leal (%rcx,%r14), %eax
testl %r14d, %r14d
setg %dl
testl %ecx, %ecx
setg %cl
andb %dl, %cl
cmpb $0x1, %cl
jne 0xb4ad
cvtsi2sd %r14d, %xmm0
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rbx)
jmp 0xb4ad
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: close_node
void close_node(node_t *n)
{
	if (n == NULL) {
		return;
	} else if (n->client != NULL) {
		if (n->client->icccm_props.delete_window) {
			send_client_message(n->id, ewmh->WM_PROTOCOLS, WM_DELETE_WINDOW);
		} else {
			xcb_kill_client(dpy, n->id);
		}
	} else {
		close_node(n->first_child);
		close_node(n->second_child);
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testq %rbx, %rbx
je 0xb804
movq 0x48(%rbx), %rax
testq %rax, %rax
jne 0xb806
movq 0x30(%rbx), %rdi
callq 0xb7e3
movq 0x38(%rbx), %rbx
jmp 0xb7e7
popq %rbx
retq
cmpb $0x1, 0x376(%rax)
jne 0xb830
movl (%rbx), %edi
leaq 0x1e618(%rip), %rax     # 0x29e30
movq (%rax), %rax
movl 0xc8(%rax), %esi
leaq 0x1df60(%rip), %rax     # 0x29788
movl (%rax), %edx
popq %rbx
jmp 0x11523
leaq 0x1de91(%rip), %rax     # 0x296c8
movq (%rax), %rdi
movl (%rbx), %esi
popq %rbx
jmp 0x4ad0
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: kill_node
void kill_node(monitor_t *m, desktop_t *d, node_t *n)
{
	if (n == NULL) {
		return;
	}

	if (IS_RECEPTACLE(n)) {
		put_status(SBSC_MASK_NODE_REMOVE, "node_remove 0x%08X 0x%08X 0x%08X\n", m->id, d->id, n->id);
		remove_node(m, d, n);
	} else {
		for (node_t *f = first_extrema(n); f != NULL; f = next_leaf(f, n)) {
			if (f->client != NULL) {
				xcb_kill_client(dpy, f->id);
			}
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdx, %rdx
je 0xb8a0
movq %rdx, %rbx
cmpq $0x0, 0x30(%rdx)
jne 0xb864
cmpq $0x0, 0x38(%rbx)
jne 0xb864
cmpq $0x0, 0x48(%rbx)
je 0xb8a6
movq %rbx, %rdi
callq 0x92fd
testq %rax, %rax
je 0xb8a0
movq %rax, %r14
leaq 0x1de4d(%rip), %r15     # 0x296c8
cmpq $0x0, 0x48(%r14)
je 0xb88d
movq (%r15), %rdi
movl (%r14), %esi
callq 0x4ad0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x9363
movq %rax, %r14
testq %rax, %rax
jne 0xb87b
popq %rbx
popq %r14
popq %r15
retq
movq %rsi, %r14
movq %rdi, %r15
movl 0x20(%rdi), %edx
movl 0x20(%rsi), %ecx
movl (%rbx), %r8d
leaq 0x13ec1(%rip), %rsi     # 0x1f77d
movl $0x10000, %edi          # imm = 0x10000
xorl %eax, %eax
callq 0x1eb0b
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0xb8db
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: remove_node
void remove_node(monitor_t *m, desktop_t *d, node_t *n)
{
	if (n == NULL) {
		return;
	}

	unlink_node(m, d, n);
	history_remove(d, n, true);
	remove_stack_node(n);
	cancel_presel_in(m, d, n);
	if (m->sticky_count > 0 && d == m->desk) {
		m->sticky_count -= sticky_count(n);
	}
	clients_count -= clients_count_in(n);
	if (is_descendant(grabbed_node, n)) {
		grabbed_node = NULL;
	}
	free_node(n);

	if (single_monocle && d->layout != LAYOUT_MONOCLE && tiled_count(d->root, true) <= 1) {
		set_layout(m, d, LAYOUT_MONOCLE, false);
	}

	ewmh_update_client_list(false);
	ewmh_update_client_list(true);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdx, %rdx
je 0xb9e0
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
callq 0xb645
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0xd60c
movq %r15, %rdi
callq 0xcfa6
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x91ea
movl 0x40(%r14), %ebp
testl %ebp, %ebp
je 0xb93b
cmpq %rbx, 0x58(%r14)
jne 0xb93b
movq %r15, %rdi
callq 0xba1f
subl %eax, %ebp
movl %ebp, 0x40(%r14)
movq %r15, %rdi
callq 0xaac5
leaq 0x1ddaa(%rip), %rcx     # 0x296f4
subl %eax, (%rcx)
leaq 0x1e4d5(%rip), %rax     # 0x29e28
movq (%rax), %rcx
testq %rcx, %rcx
je 0xb97a
cmpq %r15, %rcx
je 0xb96e
movq 0x40(%rcx), %rcx
cmpq %r15, %rcx
je 0xb96e
testq %rcx, %rcx
jne 0xb960
cmpq %r15, %rcx
jne 0xb97a
movq $0x0, (%rax)
movq %r15, %rdi
callq 0xba51
leaq 0x1e46f(%rip), %rax     # 0x29df8
cmpb $0x1, (%rax)
jne 0xb9b9
cmpl $0x1, 0x24(%rbx)
je 0xb9b9
movq 0x30(%rbx), %rdi
movl $0x1, %esi
callq 0x98c5
cmpl $0x1, %eax
jg 0xb9b9
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x7ec3
xorl %edi, %edi
callq 0x1e462
movl $0x1, %edi
callq 0x1e462
leaq 0x1dd3f(%rip), %rax     # 0x29710
movq (%rax), %rax
testq %rax, %rax
je 0xb9e0
cmpq $0x0, 0x38(%rbx)
je 0xb9eb
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
cmpq %rbx, 0x58(%rax)
je 0xba08
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x9af5
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xa2cd
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: free_node
void free_node(node_t *n)
{
	if (n == NULL) {
		return;
	}
	node_t *first_child = n->first_child;
	node_t *second_child = n->second_child;
	free(n->client);
	free(n);
	free_node(first_child);
	free_node(second_child);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
testq %rbx, %rbx
je 0xba84
movq 0x30(%rbx), %r14
movq 0x38(%rbx), %r15
movq 0x48(%rbx), %rdi
callq 0x4460
movq %rbx, %rdi
callq 0x4460
movq %r14, %rdi
callq 0xba51
movq %r15, %rbx
jmp 0xba59
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: propagate_vacant_downward
void propagate_vacant_downward(monitor_t *m, desktop_t *d, node_t *n, bool value)
{
	if (n == NULL) {
		return;
	}

	set_vacant_local(m, d, n, value);

	propagate_vacant_downward(m, d, n->first_child, value);
	propagate_vacant_downward(m, d, n->second_child, value);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movzbl %bl, %ebp
testq %r14, %r14
je 0xc4f9
cmpb %bl, 0x24(%r14)
je 0xc4e2
movb %bl, 0x24(%r14)
testb %bl, %bl
je 0xc4e2
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x9188
movq 0x30(%r14), %rdx
movq %r12, %rdi
movq %r15, %rsi
movl %ebp, %ecx
callq 0xc4ab
movq 0x38(%r14), %r14
jmp 0xc4c1
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: propagate_vacant_upward
void propagate_vacant_upward(monitor_t *m, desktop_t *d, node_t *n)
{
	if (n == NULL) {
		return;
	}

	node_t *p = n->parent;

	if (p != NULL) {
		set_vacant_local(m, d, p, (p->first_child->vacant && p->second_child->vacant));
	}

	propagate_vacant_upward(m, d, p);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
testq %rbx, %rbx
je 0xc54f
movq 0x40(%rbx), %rbx
testq %rbx, %rbx
je 0xc510
movq 0x30(%rbx), %rax
cmpb $0x1, 0x24(%rax)
jne 0xc531
movq 0x38(%rbx), %rax
movb 0x24(%rax), %al
jmp 0xc533
xorl %eax, %eax
cmpb %al, 0x24(%rbx)
je 0xc510
movb %al, 0x24(%rbx)
testb %al, %al
je 0xc510
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x9188
jmp 0xc510
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: set_layer
bool set_layer(monitor_t *m, desktop_t *d, node_t *n, stack_layer_t l)
{
	if (n == NULL || n->client == NULL || n->client->layer == l) {
		return false;
	}

	n->client->last_layer = n->client->layer;
	n->client->layer = l;

	if (l == LAYER_ABOVE) {
		n->client->wm_flags |= WM_FLAG_ABOVE;
		n->client->wm_flags &= ~WM_FLAG_BELOW;
	} else if (l == LAYER_BELOW) {
		n->client->wm_flags |= WM_FLAG_BELOW;
		n->client->wm_flags &= ~WM_FLAG_ABOVE;
	} else {
		n->client->wm_flags &= ~(WM_FLAG_ABOVE | WM_FLAG_BELOW);
	}

	ewmh_wm_state_update(n);

	put_status(SBSC_MASK_NODE_LAYER, "node_layer 0x%08X 0x%08X 0x%08X %s\n", m->id, d->id, n->id, LAYER_STR(l));

	if (d->focus == n) {
		neutralize_occluding_windows(m, d, n);
	}

	stack(d, n, (d->focus == n));

	return true;
}

// Assembly:
testq %rdx, %rdx
je 0xc591
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq 0x48(%rdx), %rax
testq %rax, %rax
je 0xc58a
movl %ecx, %ebp
movl 0x310(%rax), %ecx
cmpl %ebp, %ecx
jne 0xc594
xorl %eax, %eax
jmp 0xc640
xorl %eax, %eax
retq
movq %rsi, %r14
movq %rdi, %r15
movl %ecx, 0x314(%rax)
movl %ebp, 0x310(%rax)
movl $0xfffff9ff, %ecx       # imm = 0xFFFFF9FF
andl 0x378(%rax), %ecx
testl %ebp, %ebp
je 0xc5c2
cmpl $0x2, %ebp
jne 0xc5c8
orl $0x200, %ecx            # imm = 0x200
jmp 0xc5c8
orl $0x400, %ecx            # imm = 0x400
movl %ecx, 0x378(%rax)
movq %rbx, %rdi
callq 0x1e5aa
movl 0x20(%r15), %edx
movl 0x20(%r14), %ecx
movl (%rbx), %r8d
cmpl $0x1, %ebp
leaq 0x14775(%rip), %rax     # 0x20d60
leaq 0x14776(%rip), %rsi     # 0x20d68
cmoveq %rax, %rsi
testl %ebp, %ebp
leaq 0x1475a(%rip), %r9      # 0x20d59
cmovneq %rsi, %r9
leaq 0x13203(%rip), %rsi     # 0x1f80d
movl $0x4000000, %edi        # imm = 0x4000000
xorl %eax, %eax
callq 0x1eb0b
cmpq %rbx, 0x38(%r14)
jne 0xc62a
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x9cd8
xorl %edx, %edx
cmpq %rbx, 0x38(%r14)
sete %dl
movq %r14, %rdi
movq %rbx, %rsi
callq 0xd20e
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: set_floating
void set_floating(monitor_t *m, desktop_t *d, node_t *n, bool value)
{
	if (n == NULL) {
		return;
	}

	cancel_presel(m, d, n);
	if (!n->hidden) {
		set_vacant(m, d, n, value);
	}

	if (!value && d->focus == n) {
		neutralize_occluding_windows(m, d, n);
	}

	stack(d, n, (d->focus == n));
}

// Assembly:
testq %rdx, %rdx
je 0xc8c0
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x9188
cmpb $0x0, 0x25(%rbx)
jne 0xc889
movzbl %bpl, %ecx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xc47c
testb %bpl, %bpl
jne 0xc8a2
cmpq %rbx, 0x38(%r14)
jne 0xc8a2
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x9cd8
xorl %edx, %edx
cmpq %rbx, 0x38(%r14)
sete %dl
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xd20e
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: set_fullscreen
void set_fullscreen(monitor_t *m, desktop_t *d, node_t *n, bool value)
{
	if (n == NULL) {
		return;
	}

	client_t *c = n->client;

	cancel_presel(m, d, n);
	if (!n->hidden) {
		set_vacant(m, d, n, value);
	}

	if (value) {
		c->wm_flags |= WM_FLAG_FULLSCREEN;
	} else {
		c->wm_flags &= ~WM_FLAG_FULLSCREEN;
		if (d->focus == n) {
			neutralize_occluding_windows(m, d, n);
		}
	}

	ewmh_wm_state_update(n);
	stack(d, n, (d->focus == n));
}

// Assembly:
testq %rdx, %rdx
je 0xc916
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x48(%rdx), %r12
callq 0x9188
cmpb $0x0, 0x25(%rbx)
jne 0xc8fa
movzbl %bpl, %ecx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xc47c
movl 0x378(%r12), %eax
testb %bpl, %bpl
je 0xc917
orl $0x100, %eax            # imm = 0x100
movl %eax, 0x378(%r12)
jmp 0xc938
retq
andl $0xfffffeff, %eax       # imm = 0xFFFFFEFF
movl %eax, 0x378(%r12)
cmpq %rbx, 0x38(%r14)
jne 0xc938
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x9cd8
movq %rbx, %rdi
callq 0x1e5aa
xorl %edx, %edx
cmpq %rbx, 0x38(%r14)
sete %dl
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xd20e
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: set_hidden_local
void set_hidden_local(monitor_t *m, desktop_t *d, node_t *n, bool value)
{
	if (n->hidden == value) {
		return;
	}

	n->hidden = value;

	if (n->client != NULL) {
		if (n->client->shown) {
			window_set_visibility(n->id, !value);
		}

		if (IS_TILED(n->client)) {
			set_vacant(m, d, n, value);
		}

		if (value) {
			n->client->wm_flags |= WM_FLAG_HIDDEN;
		} else {
			n->client->wm_flags &= ~WM_FLAG_HIDDEN;
		}

		ewmh_wm_state_update(n);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
cmpb %bpl, 0x25(%rdx)
je 0xc9e5
movq %rdx, %rbx
movb %bpl, 0x25(%rdx)
movq 0x48(%rdx), %rax
testq %rax, %rax
je 0xc9e5
movq %rsi, %r14
movq %rdi, %r15
cmpb $0x1, 0x305(%rax)
jne 0xc998
movl (%rbx), %edi
movl %ebp, %eax
xorb $0x1, %al
movzbl %al, %esi
callq 0x1138c
movq 0x48(%rbx), %rax
cmpl $0x1, 0x308(%rax)
movzbl %bpl, %ebp
ja 0xc9b9
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %ebp, %ecx
callq 0xc47c
movq 0x48(%rbx), %rax
movl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
andl 0x378(%rax), %ecx
shll $0x7, %ebp
orl %ecx, %ebp
movl %ebp, 0x378(%rax)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1e5aa
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: propagate_hidden_downward
void propagate_hidden_downward(monitor_t *m, desktop_t *d, node_t *n, bool value)
{
	if (n == NULL) {
		return;
	}

	set_hidden_local(m, d, n, value);

	propagate_hidden_downward(m, d, n->first_child, value);
	propagate_hidden_downward(m, d, n->second_child, value);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movzbl %cl, %ebp
testq %rbx, %rbx
je 0xcbfc
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %ebp, %ecx
callq 0xc95c
movq 0x30(%rbx), %rdx
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %ecx
callq 0xcbbd
movq 0x38(%rbx), %rbx
jmp 0xcbd0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: propagate_hidden_upward
void propagate_hidden_upward(monitor_t *m, desktop_t *d, node_t *n)
{
	if (n == NULL) {
		return;
	}

	node_t *p = n->parent;

	if (p != NULL) {
		set_hidden_local(m, d, p, p->first_child->hidden && p->second_child->hidden);
	}

	propagate_hidden_upward(m, d, p);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
testq %rbx, %rbx
je 0xcc4b
movq 0x40(%rbx), %rbx
testq %rbx, %rbx
je 0xcc15
movq 0x30(%rbx), %rax
cmpb $0x1, 0x25(%rax)
jne 0xcc36
movq 0x38(%rbx), %rax
movb 0x25(%rax), %al
jmp 0xcc38
xorl %eax, %eax
movzbl %al, %ecx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xc95c
jmp 0xcc15
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: set_sticky
void set_sticky(monitor_t *m, desktop_t *d, node_t *n, bool value)
{
	if (n == NULL || n->sticky == value) {
		return;
	}

	if (d != m->desk) {
		transfer_node(m, d, n, m, m->desk, m->desk->focus, false);
	}

	n->sticky = value;

	if (value) {
		m->sticky_count++;
	} else {
		m->sticky_count--;
	}

	if (n->client != NULL) {
		if (value) {
			n->client->wm_flags |= WM_FLAG_STICKY;
		} else {
			n->client->wm_flags &= ~WM_FLAG_STICKY;
		}
		ewmh_wm_state_update(n);
	}

	put_status(SBSC_MASK_NODE_FLAG, "node_flag 0x%08X 0x%08X 0x%08X sticky %s\n", m->id, d->id, n->id, ON_OFF_STR(value));

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdx, %rdx
je 0xcd0d
movl %ecx, %ebp
movq %rdx, %rbx
cmpb %bpl, 0x26(%rdx)
je 0xcd0d
movq %rsi, %r15
movq %rdi, %r14
movq 0x58(%rdi), %r8
cmpq %rsi, %r8
je 0xcc9b
movq 0x38(%r8), %r9
movl $0x0, (%rsp)
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x9e52
movb %bpl, 0x26(%rbx)
movzbl %bpl, %eax
leal -0x1(%rax), %ecx
orl $0x1, %ecx
addl %ecx, 0x40(%r14)
movq 0x48(%rbx), %rcx
testq %rcx, %rcx
je 0xccd0
movl 0x378(%rcx), %edx
andl $-0x3, %edx
leal (%rdx,%rax,2), %eax
movl %eax, 0x378(%rcx)
movq %rbx, %rdi
callq 0x1e5aa
movl 0x20(%r14), %edx
movl 0x20(%r15), %ecx
movl (%rbx), %r8d
leaq 0x13e33(%rip), %rax     # 0x20b15
leaq 0x12bc1(%rip), %r9      # 0x1f8aa
testb %bpl, %bpl
cmovneq %rax, %r9
leaq 0x12bb7(%rip), %rsi     # 0x1f8ae
movl $0x2000000, %edi        # imm = 0x2000000
xorl %eax, %eax
callq 0x1eb0b
movq 0x58(%r14), %rax
cmpq %rbx, 0x38(%rax)
je 0xcd18
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %edi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1eb0b
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: set_private
void set_private(monitor_t *m, desktop_t *d, node_t *n, bool value)
{
	if (n == NULL || n->private == value) {
		return;
	}

	n->private = value;

	put_status(SBSC_MASK_NODE_FLAG, "node_flag 0x%08X 0x%08X 0x%08X private %s\n", m->id, d->id, n->id, ON_OFF_STR(value));

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

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdx, %rdx
je 0xcd81
movq %rdx, %rbx
cmpb %cl, 0x27(%rdx)
je 0xcd81
movq %rdi, %r14
movb %cl, 0x27(%rbx)
movl 0x20(%rdi), %edx
movl 0x20(%rsi), %eax
movl (%rbx), %r8d
leaq 0x13dc0(%rip), %rsi     # 0x20b15
leaq 0x12b4e(%rip), %r9      # 0x1f8aa
testb %cl, %cl
cmovneq %rsi, %r9
leaq 0x12b6f(%rip), %rsi     # 0x1f8d8
movl $0x2000000, %edi        # imm = 0x2000000
movl %eax, %ecx
xorl %eax, %eax
callq 0x1eb0b
movq 0x58(%r14), %rax
cmpq %rbx, 0x38(%rax)
je 0xcd89
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x1, %edi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1eb0b
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: set_locked
void set_locked(monitor_t *m, desktop_t *d, node_t *n, bool value)
{
	if (n == NULL || n->locked == value) {
		return;
	}

	n->locked = value;

	put_status(SBSC_MASK_NODE_FLAG, "node_flag 0x%08X 0x%08X 0x%08X locked %s\n", m->id, d->id, n->id, ON_OFF_STR(value));

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

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdx, %rdx
je 0xcdef
movq %rdx, %rbx
cmpb %cl, 0x28(%rdx)
je 0xcdef
movq %rdi, %r14
movb %cl, 0x28(%rbx)
movl 0x20(%rdi), %edx
movl 0x20(%rsi), %eax
movl (%rbx), %r8d
leaq 0x13d52(%rip), %rsi     # 0x20b15
leaq 0x12ae0(%rip), %r9      # 0x1f8aa
testb %cl, %cl
cmovneq %rsi, %r9
leaq 0x12b2c(%rip), %rsi     # 0x1f903
movl $0x2000000, %edi        # imm = 0x2000000
movl %eax, %ecx
xorl %eax, %eax
callq 0x1eb0b
movq 0x58(%r14), %rax
cmpq %rbx, 0x38(%rax)
je 0xcdf7
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x1, %edi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1eb0b
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: listen_enter_notify
void listen_enter_notify(node_t *n, bool enable)
{
	uint32_t mask = CLIENT_EVENT_MASK | (enable ? XCB_EVENT_MASK_ENTER_WINDOW : 0);
	for (node_t *f = first_extrema(n); f != NULL; f = next_leaf(f, n)) {
		if (f->client == NULL) {
			continue;
		}
		xcb_change_window_attributes(dpy, f->id, XCB_CW_EVENT_MASK, &mask);
		if (f->presel != NULL) {
			xcb_change_window_attributes(dpy, f->presel->feedback, XCB_CW_EVENT_MASK, &mask);
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
shll $0x4, %esi
orl $0x600000, %esi         # imm = 0x600000
movl %esi, 0x4(%rsp)
callq 0x92fd
testq %rax, %rax
je 0xce86
movq %rax, %r14
leaq 0x1c892(%rip), %r12     # 0x296c8
leaq 0x4(%rsp), %r15
cmpq $0x0, 0x48(%r14)
je 0xce73
movq (%r12), %rdi
movl (%r14), %esi
movl $0x800, %edx            # imm = 0x800
movq %r15, %rcx
callq 0x4700
movq 0x10(%r14), %rax
testq %rax, %rax
je 0xce73
movq (%r12), %rdi
movl 0xc(%rax), %esi
movl $0x800, %edx            # imm = 0x800
movq %r15, %rcx
callq 0x4700
movq %r14, %rdi
movq %rbx, %rsi
callq 0x9363
movq %rax, %r14
testq %rax, %rax
jne 0xce3b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: regenerate_ids_in
void regenerate_ids_in(node_t *n)
{
	if (n == NULL || n->client != NULL) {
		return;
	}
	n->id = xcb_generate_id(dpy);
	regenerate_ids_in(n->first_child);
	regenerate_ids_in(n->second_child);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1c828(%rip), %r14     # 0x296c8
testq %rbx, %rbx
je 0xcec5
cmpq $0x0, 0x48(%rbx)
jne 0xcec5
movq (%r14), %rdi
callq 0x4920
movl %eax, (%rbx)
movq 0x30(%rbx), %rdi
callq 0xce92
movq 0x38(%rbx), %rbx
jmp 0xcea0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/stack.c
// Function: make_stack
stacking_list_t *make_stack(node_t *n)
{
	stacking_list_t *s = calloc(1, sizeof(stacking_list_t));
	s->node = n;
	s->prev = s->next = NULL;
	return s;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %edi
movl $0x18, %esi
callq 0x48b0
movq %rbx, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
popq %rbx
retq