// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/pointer.c
// Function: window_grab_button
void window_grab_button(xcb_window_t win, uint8_t button, uint16_t modifier)
{
#define GRAB(b, m) \
	xcb_grab_button(dpy, false, win, XCB_EVENT_MASK_BUTTON_PRESS, \
	                XCB_GRAB_MODE_SYNC, XCB_GRAB_MODE_ASYNC, XCB_NONE, XCB_NONE, b, m)
		GRAB(button, modifier);
		if (num_lock != XCB_NO_SYMBOL && caps_lock != XCB_NO_SYMBOL && scroll_lock != XCB_NO_SYMBOL) {
			GRAB(button, modifier | num_lock | caps_lock | scroll_lock);
		}
		if (num_lock != XCB_NO_SYMBOL && caps_lock != XCB_NO_SYMBOL) {
			GRAB(button, modifier | num_lock | caps_lock);
		}
		if (caps_lock != XCB_NO_SYMBOL && scroll_lock != XCB_NO_SYMBOL) {
			GRAB(button, modifier | caps_lock | scroll_lock);
		}
		if (num_lock != XCB_NO_SYMBOL && scroll_lock != XCB_NO_SYMBOL) {
			GRAB(button, modifier | num_lock | scroll_lock);
		}
		if (num_lock != XCB_NO_SYMBOL) {
			GRAB(button, modifier | num_lock);
		}
		if (caps_lock != XCB_NO_SYMBOL) {
			GRAB(button, modifier | caps_lock);
		}
		if (scroll_lock != XCB_NO_SYMBOL) {
			GRAB(button, modifier | scroll_lock);
		}
#undef GRAB
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %r14d
movl %esi, %r15d
movl %edi, %ebx
leaq 0x1a8ab(%rip), %r12     # 0x296c8
movq (%r12), %rdi
xorl %r13d, %r13d
xorl %esi, %esi
movl %ebx, %edx
movl $0x4, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
pushq %r14
pushq %r15
pushq %r13
pushq %r13
callq 0x4530
addq $0x20, %rsp
movzwl 0x1afd2(%rip), %eax     # 0x29e20
testw %ax, %ax
setne %dl
movzwl 0x1afc7(%rip), %ecx     # 0x29e22
testw %cx, %cx
setne %sil
andb %dl, %sil
movzwl 0x1afb8(%rip), %edx     # 0x29e24
testw %dx, %dx
setne %dil
andb %sil, %dil
movzbl %r15b, %r15d
cmpb $0x1, %dil
jne 0xeeb0
movq (%r12), %rdi
orl %r14d, %eax
orl %ecx, %edx
orl %eax, %edx
movzwl %dx, %eax
xorl %esi, %esi
movl %ebx, %edx
movl $0x4, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
pushq %rax
pushq %r15
pushq %r13
pushq %r13
callq 0x4530
addq $0x20, %rsp
movzwl 0x1af69(%rip), %ecx     # 0x29e20
testw %cx, %cx
setne %dl
movzwl 0x1af5e(%rip), %eax     # 0x29e22
testw %ax, %ax
setne %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0xef05
movq (%r12), %rdi
orl %r14d, %ecx
orl %ecx, %eax
xorl %r10d, %r10d
movzwl %ax, %eax
xorl %esi, %esi
movl %ebx, %edx
movl $0x4, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
pushq %rax
pushq %r15
pushq %r10
pushq %r10
callq 0x4530
addq $0x20, %rsp
movzwl 0x1af16(%rip), %ecx     # 0x29e22
testw %cx, %cx
setne %dl
movzwl 0x1af0b(%rip), %eax     # 0x29e24
testw %ax, %ax
setne %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0xef5a
movq (%r12), %rdi
orl %r14d, %ecx
orl %ecx, %eax
xorl %r10d, %r10d
movzwl %ax, %eax
xorl %esi, %esi
movl %ebx, %edx
movl $0x4, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
pushq %rax
pushq %r15
pushq %r10
pushq %r10
callq 0x4530
addq $0x20, %rsp
movzwl 0x1aebf(%rip), %ecx     # 0x29e20
testw %cx, %cx
setne %dl
movzwl 0x1aeb6(%rip), %eax     # 0x29e24
testw %ax, %ax
setne %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0xefaf
movq (%r12), %rdi
orl %r14d, %ecx
orl %ecx, %eax
xorl %r10d, %r10d
movzwl %ax, %eax
xorl %esi, %esi
movl %ebx, %edx
movl $0x4, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
pushq %rax
pushq %r15
pushq %r10
pushq %r10
callq 0x4530
addq $0x20, %rsp
movzwl 0x1ae6a(%rip), %eax     # 0x29e20
testw %ax, %ax
je 0xefea
movq (%r12), %rdi
orl %r14d, %eax
xorl %r10d, %r10d
movzwl %ax, %eax
xorl %esi, %esi
movl %ebx, %edx
movl $0x4, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
pushq %rax
pushq %r15
pushq %r10
pushq %r10
callq 0x4530
addq $0x20, %rsp
movzwl 0x1ae31(%rip), %eax     # 0x29e22
testw %ax, %ax
je 0xf025
movq (%r12), %rdi
orl %r14d, %eax
xorl %r10d, %r10d
movzwl %ax, %eax
xorl %esi, %esi
movl %ebx, %edx
movl $0x4, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
pushq %rax
pushq %r15
pushq %r10
pushq %r10
callq 0x4530
addq $0x20, %rsp
movzwl 0x1adf8(%rip), %eax     # 0x29e24
testw %ax, %ax
je 0xf060
movq (%r12), %rdi
orl %r14d, %eax
xorl %r10d, %r10d
movzwl %ax, %eax
xorl %esi, %esi
movl %ebx, %edx
movl $0x4, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
pushq %rax
pushq %r15
pushq %r10
pushq %r10
callq 0x4530
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq