// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movl %esi, %r14d
movl %edi, %ebx
leaq 0x1a483(%rip), %r15     # 0x286c8
movq (%r15), %rdi
movl %edx, 0x18(%rsp)
andl $0x0, 0x8(%rsp)
movl %esi, 0x10(%rsp)
andl $0x0, (%rsp)
pushq $0x4
popq %rcx
pushq $0x1
popq %r9
xorl %esi, %esi
movl %ebx, %edx
xorl %r8d, %r8d
callq 0x4530
movzwl 0x1abad(%rip), %ecx     # 0x28e20
testw %cx, %cx
setne %dl
movzwl 0x1aba2(%rip), %eax     # 0x28e22
testw %ax, %ax
setne %sil
andb %dl, %sil
movzwl 0x1ab93(%rip), %edx     # 0x28e24
testw %dx, %dx
setne %dil
andb %sil, %dil
movzbl %r14b, %r14d
cmpb $0x1, %dil
jne 0xe2e4
movq (%r15), %rdi
orl %ebp, %ecx
orl %eax, %edx
orl %ecx, %edx
movl %r14d, 0x10(%rsp)
movzwl %dx, %eax
andl $0x0, 0x8(%rsp)
movl %eax, 0x18(%rsp)
andl $0x0, (%rsp)
pushq $0x4
popq %rcx
pushq $0x1
popq %r9
xorl %esi, %esi
movl %ebx, %edx
xorl %r8d, %r8d
callq 0x4530
movzwl 0x1ab43(%rip), %ecx     # 0x28e20
movzwl 0x1ab3e(%rip), %eax     # 0x28e22
testw %cx, %cx
setne %dl
testw %ax, %ax
setne %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0xe330
movq (%r15), %rdi
orl %ebp, %ecx
orl %ecx, %eax
movl %r14d, 0x10(%rsp)
movzwl %ax, %eax
andl $0x0, 0x8(%rsp)
movl %eax, 0x18(%rsp)
andl $0x0, (%rsp)
pushq $0x4
popq %rcx
pushq $0x1
popq %r9
xorl %esi, %esi
movl %ebx, %edx
xorl %r8d, %r8d
callq 0x4530
movzwl 0x1aaf2(%rip), %eax     # 0x28e22
testw %ax, %ax
setne %dl
movzwl 0x1aae7(%rip), %ecx     # 0x28e24
testw %cx, %cx
setne %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0xe383
movq (%r15), %rdi
orl %ebp, %eax
orl %eax, %ecx
movl %r14d, 0x10(%rsp)
movzwl %cx, %eax
andl $0x0, 0x8(%rsp)
movl %eax, 0x18(%rsp)
andl $0x0, (%rsp)
pushq $0x4
popq %rcx
pushq $0x1
popq %r9
xorl %esi, %esi
movl %ebx, %edx
xorl %r8d, %r8d
callq 0x4530
movzwl 0x1aaa1(%rip), %ecx     # 0x28e24
movzwl 0x1aa96(%rip), %eax     # 0x28e20
testw %ax, %ax
setne %dl
testw %cx, %cx
setne %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0xe3d6
movq (%r15), %rdi
orl %ebp, %eax
orl %eax, %ecx
movl %r14d, 0x10(%rsp)
movzwl %cx, %eax
andl $0x0, 0x8(%rsp)
movl %eax, 0x18(%rsp)
andl $0x0, (%rsp)
pushq $0x4
popq %rcx
pushq $0x1
popq %r9
xorl %esi, %esi
movl %ebx, %edx
xorl %r8d, %r8d
callq 0x4530
movzwl 0x1aa4a(%rip), %eax     # 0x28e20
testw %ax, %ax
je 0xe408
movq (%r15), %rdi
orl %ebp, %eax
movl %r14d, 0x10(%rsp)
movzwl %ax, %eax
andl $0x0, 0x8(%rsp)
movl %eax, 0x18(%rsp)
andl $0x0, (%rsp)
pushq $0x4
popq %rcx
pushq $0x1
popq %r9
xorl %esi, %esi
movl %ebx, %edx
xorl %r8d, %r8d
callq 0x4530
movzwl 0x1aa13(%rip), %eax     # 0x28e22
testw %ax, %ax
je 0xe441
movq (%r15), %rdi
orl %ebp, %eax
movl %r14d, 0x10(%rsp)
movzwl %ax, %eax
andl $0x0, 0x8(%rsp)
movl %eax, 0x18(%rsp)
andl $0x0, (%rsp)
pushq $0x4
popq %rcx
pushq $0x1
popq %r9
xorl %esi, %esi
movl %ebx, %edx
xorl %r8d, %r8d
callq 0x4530
movzwl 0x1a9dc(%rip), %eax     # 0x28e24
testw %ax, %ax
je 0xe47a
movq (%r15), %rdi
orl %ebp, %eax
movl %r14d, 0x10(%rsp)
movzwl %ax, %eax
andl $0x0, 0x8(%rsp)
movl %eax, 0x18(%rsp)
andl $0x0, (%rsp)
pushq $0x4
popq %rcx
pushq $0x1
popq %r9
xorl %esi, %esi
movl %ebx, %edx
xorl %r8d, %r8d
callq 0x4530
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq