// File: /workspace/github_c_makefile_star2_O3/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 0x1a839(%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 0x1af60(%rip), %ecx     # 0x29e20
testw %cx, %cx
setne %dl
movzwl 0x1af55(%rip), %eax     # 0x29e22
testw %ax, %ax
setne %sil
andb %dl, %sil
movzwl 0x1af46(%rip), %edx     # 0x29e24
testw %dx, %dx
setne %dil
andb %sil, %dil
movzbl %r15b, %r15d
cmpb $0x1, %dil
jne 0xef30
movq (%r12), %rdi
orl %r14d, %ecx
orl %eax, %edx
orl %ecx, %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 0x1aef7(%rip), %ecx     # 0x29e20
movzwl 0x1aef2(%rip), %eax     # 0x29e22
testw %cx, %cx
setne %dl
testw %ax, %ax
setne %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0xef7e
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 0x1aea4(%rip), %eax     # 0x29e22
testw %ax, %ax
setne %dl
movzwl 0x1ae99(%rip), %ecx     # 0x29e24
testw %cx, %cx
setne %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0xefd2
movq (%r12), %rdi
orl %r14d, %eax
orl %eax, %ecx
xorl %eax, %eax
movzwl %cx, %r10d
xorl %esi, %esi
movl %ebx, %edx
movl $0x4, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
pushq %r10
pushq %r15
pushq %rax
pushq %rax
callq 0x4530
addq $0x20, %rsp
movzwl 0x1ae52(%rip), %ecx     # 0x29e24
movzwl 0x1ae47(%rip), %eax     # 0x29e20
testw %ax, %ax
setne %dl
testw %cx, %cx
setne %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0xf026
movq (%r12), %rdi
orl %r14d, %eax
orl %eax, %ecx
xorl %eax, %eax
movzwl %cx, %r10d
xorl %esi, %esi
movl %ebx, %edx
movl $0x4, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
pushq %r10
pushq %r15
pushq %rax
pushq %rax
callq 0x4530
addq $0x20, %rsp
movzwl 0x1adfa(%rip), %eax     # 0x29e20
testw %ax, %ax
je 0xf05a
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 0x1adc1(%rip), %eax     # 0x29e22
testw %ax, %ax
je 0xf095
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 0x1ad88(%rip), %eax     # 0x29e24
testw %ax, %ax
je 0xf0d0
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