// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/ewmh.c
// Function: ewmh_update_client_list
void ewmh_update_client_list(bool stacking)
{
	if (clients_count == 0) {
		xcb_ewmh_set_client_list(ewmh, default_screen, 0, NULL);
		xcb_ewmh_set_client_list_stacking(ewmh, default_screen, 0, NULL);
		return;
	}

	xcb_window_t wins[clients_count];
	unsigned int i = 0;

	if (stacking) {
		for (stacking_list_t *s = stack_head; s != NULL; s = s->next) {
			wins[i++] = s->node->id;
		}
		xcb_ewmh_set_client_list_stacking(ewmh, default_screen, clients_count, wins);
	} else {
		for (monitor_t *m = mon_head; m != NULL; m = m->next) {
			for (desktop_t *d = m->desk_head; d != NULL; d = d->next) {
				for (node_t *n = first_extrema(d->root); n != NULL; n = next_leaf(n, d->root)) {
					if (n->client == NULL) {
						continue;
					}
					wins[i++] = n->id;
				}
			}
		}
		xcb_ewmh_set_client_list(ewmh, default_screen, clients_count, wins);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %dil, %al
andb $0x1, %al
movb %al, -0x1(%rbp)
leaq 0xa09d(%rip), %rax      # 0x356e4
cmpl $0x0, (%rax)
jne 0x2b68d
movq 0xa7cd(%rip), %rdi      # 0x35e20
leaq 0xa056(%rip), %rax      # 0x356b0
movl (%rax), %esi
xorl %edx, %edx
xorl %eax, %eax
movl %eax, %ecx
callq 0x4a10
movl %eax, -0x8(%rbp)
movq 0xa7af(%rip), %rdi      # 0x35e20
leaq 0xa038(%rip), %rax      # 0x356b0
movl (%rax), %esi
xorl %edx, %edx
xorl %eax, %eax
movl %eax, %ecx
callq 0x4330
movl %eax, -0xc(%rbp)
jmp 0x2b802
leaq 0xa050(%rip), %rax      # 0x356e4
movl (%rax), %eax
movq %rsp, %rcx
movq %rcx, -0x18(%rbp)
leaq 0xf(,%rax,4), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x60(%rbp)
movq %rcx, %rsp
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
testb $0x1, -0x1(%rbp)
je 0x2b731
leaq 0xa06a(%rip), %rax      # 0x35738
movq (%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x2b707
movq -0x60(%rbp), %rax
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
movl (%rcx), %edx
movl -0x24(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x24(%rbp)
movl %ecx, %ecx
movl %edx, (%rax,%rcx,4)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x2b6d5
movq -0x60(%rbp), %rcx
movq 0xa70e(%rip), %rdi      # 0x35e20
leaq 0x9f97(%rip), %rax      # 0x356b0
movl (%rax), %esi
leaq 0x9fc2(%rip), %rax      # 0x356e4
movl (%rax), %edx
callq 0x4330
movl %eax, -0x34(%rbp)
jmp 0x2b7fb
leaq 0x9fc0(%rip), %rax      # 0x356f8
movq (%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x2b7d6
movq -0x40(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x2b7c3
movq -0x48(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0xbe70
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x2b7b3
movq -0x50(%rbp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x2b782
jmp 0x2b79c
movq -0x60(%rbp), %rax
movq -0x50(%rbp), %rcx
movl (%rcx), %edx
movl -0x24(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x24(%rbp)
movl %ecx, %ecx
movl %edx, (%rax,%rcx,4)
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rax
movq 0x30(%rax), %rsi
callq 0xbf80
movq %rax, -0x50(%rbp)
jmp 0x2b76e
jmp 0x2b7b5
movq -0x48(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0x2b756
jmp 0x2b7c5
movq -0x40(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x2b73f
movq -0x60(%rbp), %rcx
movq 0xa63f(%rip), %rdi      # 0x35e20
leaq 0x9ec8(%rip), %rax      # 0x356b0
movl (%rax), %esi
leaq 0x9ef3(%rip), %rax      # 0x356e4
movl (%rax), %edx
callq 0x4a10
movl %eax, -0x54(%rbp)
movq -0x18(%rbp), %rax
movq %rax, %rsp
movq %rbp, %rsp
popq %rbp
retq
nopw (%rax,%rax)