// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/window.c
// Function: initialize_presel_feedback
void initialize_presel_feedback(node_t *n)
{
	if (n == NULL || n->presel == NULL || n->presel->feedback != XCB_NONE) {
		return;
	}

	xcb_window_t win = xcb_generate_id(dpy);
	uint32_t mask = XCB_CW_BACK_PIXEL | XCB_CW_SAVE_UNDER;
	uint32_t values[] = {get_color_pixel(presel_feedback_color), 1};
	xcb_create_window(dpy, XCB_COPY_FROM_PARENT, win, root, 0, 0, 1, 1, 0, XCB_WINDOW_CLASS_INPUT_OUTPUT,
			          XCB_COPY_FROM_PARENT, mask, values);

	xcb_icccm_set_wm_class(dpy, win, sizeof(PRESEL_FEEDBACK_IC), PRESEL_FEEDBACK_IC);
	/* Make presel window's input shape NULL to pass any input to window below */
	xcb_shape_rectangles(dpy, XCB_SHAPE_SO_SET, XCB_SHAPE_SK_INPUT, XCB_CLIP_ORDERING_UNSORTED, win, 0, 0, 0, NULL);
	stacking_list_t *s = stack_tail;
	while (s != NULL && !IS_TILED(s->node->client)) {
		s = s->prev;
	}
	if (s != NULL) {
		window_above(win, s->node->id);
	}
	n->presel->feedback = win;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x169bf
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x169bf
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl 0xc(%rax), %eax
cmpq $0x0, %rax
je 0x169c4
jmp 0x16b42
leaq 0x1eced(%rip), %rax     # 0x356b8
movq (%rax), %rdi
callq 0x4900
movl %eax, -0xc(%rbp)
movl $0x402, -0x10(%rbp)     # imm = 0x402
leaq 0x1f2ac(%rip), %rdi     # 0x35c90
callq 0x63a0
movl %eax, -0x18(%rbp)
movl $0x1, -0x14(%rbp)
leaq 0x1ecbe(%rip), %rax     # 0x356b8
movq (%rax), %rdi
movl -0xc(%rbp), %edx
leaq 0x1ed61(%rip), %rax     # 0x35768
movl (%rax), %ecx
movl -0x10(%rbp), %r10d
leaq -0x18(%rbp), %rax
xorl %r9d, %r9d
movl %r9d, %esi
movl %r9d, %r8d
movl $0x1, (%rsp)
movl $0x1, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
movl $0x1, 0x18(%rsp)
movl $0x0, 0x20(%rsp)
movl %r10d, 0x28(%rsp)
movq %rax, 0x30(%rsp)
callq 0x4030
movl %eax, -0x1c(%rbp)
leaq 0x1ec5e(%rip), %rax     # 0x356b8
movq (%rax), %rdi
movl -0xc(%rbp), %esi
movl $0x16, %edx
leaq 0x17308(%rip), %rcx     # 0x2dd74
callq 0x46f0
movl %eax, -0x20(%rbp)
leaq 0x1ec3d(%rip), %rax     # 0x356b8
movq (%rax), %rdi
movl -0xc(%rbp), %r8d
xorl %r9d, %r9d
movl $0x2, %edx
xorl %eax, %eax
movl %r9d, %esi
movl %r9d, %ecx
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
callq 0x4410
movl %eax, -0x24(%rbp)
leaq 0x1ec77(%rip), %rax     # 0x35730
movq (%rax), %rax
movq %rax, -0x30(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x30(%rbp)
movb %al, -0x31(%rbp)
je 0x16b05
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x48(%rax), %rcx
movb $0x1, %al
cmpl $0x0, 0x308(%rcx)
movb %al, -0x32(%rbp)
je 0x16afd
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x48(%rax), %rax
cmpl $0x1, 0x308(%rax)
sete %al
movb %al, -0x32(%rbp)
movb -0x32(%rbp), %al
xorb $-0x1, %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x16b0e
jmp 0x16b1c
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x16ac0
cmpq $0x0, -0x30(%rbp)
je 0x16b34
movl -0xc(%rbp), %edi
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl (%rax), %esi
callq 0x16b50
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl %ecx, 0xc(%rax)
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)