// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/tree.c
// Function: set_hidden
void set_hidden(monitor_t *m, desktop_t *d, node_t *n, bool value)
{
	if (n == NULL || n->hidden == value) {
		return;
	}

	bool held_focus = is_descendant(d->focus, n);

	propagate_hidden_downward(m, d, n, value);
	propagate_hidden_upward(m, d, n);

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

	if (held_focus || d->focus == NULL) {
		if (d->focus != NULL) {
			d->focus = NULL;
			draw_border(n, false, (mon == m));
		}
		if (d == mon->desk) {
			focus_node(m, d, d->focus);
		} else {
			activate_node(m, d, d->focus);
		}
	}

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdx, %rdx
je 0xcbae
movl %ecx, %ebp
movq %rdx, %r15
cmpb %bpl, 0x25(%rdx)
je 0xcbae
movq %rsi, %rbx
movq %rdi, %r14
movq 0x38(%rsi), %r13
testq %r13, %r13
je 0xca91
cmpq %r15, %r13
je 0xca35
movq 0x40(%r13), %r13
cmpq %r15, %r13
je 0xca35
testq %r13, %r13
jne 0xca27
movzbl %bpl, %r12d
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl %r12d, %ecx
callq 0xcbbd
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0xcc07
movl 0x20(%r14), %edx
movl 0x20(%rbx), %ecx
movl (%r15), %r8d
leaq 0x140ac(%rip), %rax     # 0x20b15
leaq 0x12e3a(%rip), %r9      # 0x1f8aa
testb %r12b, %r12b
cmovneq %rax, %r9
leaq 0x12e02(%rip), %rsi     # 0x1f880
movl $0x2000000, %edi        # imm = 0x2000000
xorl %eax, %eax
callq 0x1eb0b
cmpq %r15, %r13
jne 0xcae3
jmp 0xcaea
movzbl %bpl, %ecx
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0xcbbd
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0xcc07
movl 0x20(%r14), %edx
movl 0x20(%rbx), %ecx
movl (%r15), %r8d
leaq 0x14053(%rip), %rax     # 0x20b15
leaq 0x12de1(%rip), %r9      # 0x1f8aa
testb %bpl, %bpl
cmovneq %rax, %r9
leaq 0x12da9(%rip), %rsi     # 0x1f880
movl $0x2000000, %edi        # imm = 0x2000000
xorl %eax, %eax
callq 0x1eb0b
cmpq $0x0, 0x38(%rbx)
jne 0xcb3e
cmpq $0x0, 0x38(%rbx)
je 0xcb12
movq $0x0, 0x38(%rbx)
leaq 0x1cc10(%rip), %rax     # 0x29710
xorl %edx, %edx
cmpq %r14, (%rax)
sete %dl
movq %r15, %rdi
xorl %esi, %esi
callq 0xff0c
leaq 0x1cbf7(%rip), %rax     # 0x29710
movq (%rax), %rax
movq 0x38(%rbx), %rdx
cmpq %rbx, 0x58(%rax)
je 0xcb33
movq %r14, %rdi
movq %rbx, %rsi
callq 0x9af5
jmp 0xcb3e
movq %r14, %rdi
movq %rbx, %rsi
callq 0xa2cd
leaq 0x1d2b3(%rip), %rax     # 0x29df8
cmpb $0x1, (%rax)
jne 0xcbae
testb %bpl, %bpl
je 0xcb73
cmpl $0x1, 0x24(%rbx)
je 0xcb6e
movq 0x30(%rbx), %rdi
movl $0x1, %r15d
movl $0x1, %esi
callq 0x98c5
cmpl $0x2, %eax
jl 0xcb90
testb %bpl, %bpl
jne 0xcbae
cmpl $0x1, 0x24(%rbx)
jne 0xcbae
movq 0x30(%rbx), %rdi
movl $0x1, %esi
callq 0x98c5
cmpl $0x2, %eax
jl 0xcbae
movl 0x28(%rbx), %r15d
movq %r14, %rdi
movq %rbx, %rsi
movl %r15d, %edx
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7ec3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq