// File: /workspace/github_c_makefile_star2_O0/tudurom[P]windowchef/wm.c
// Function: window_grab_button
static void
window_grab_button(xcb_window_t win, uint8_t button, uint16_t modifier)
{
#define GRAB(b, m)												   \
	xcb_grab_button(conn, 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);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movw %dx, %ax
movb %sil, %cl
movl %edi, -0x4(%rbp)
movb %cl, -0x5(%rbp)
movw %ax, -0x8(%rbp)
movq 0x90c9(%rip), %rdi      # 0xf3d8
movl -0x4(%rbp), %edx
movb -0x5(%rbp), %al
xorl %r8d, %r8d
movl $0x4, %ecx
movl $0x1, %r9d
movl %r8d, %esi
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
movzbl %al, %eax
movl %eax, 0x10(%rsp)
movzwl -0x8(%rbp), %eax
movl %eax, 0x18(%rsp)
callq 0x3340
movl %eax, -0xc(%rbp)
movzwl 0x94b5(%rip), %eax      # 0xf808
cmpq $0x0, %rax
je 0x63d8
movzwl 0x94aa(%rip), %eax      # 0xf80a
cmpq $0x0, %rax
je 0x63d8
movzwl 0x949f(%rip), %eax      # 0xf80c
cmpq $0x0, %rax
je 0x63d8
movq 0x905e(%rip), %rdi      # 0xf3d8
movl -0x4(%rbp), %edx
movb -0x5(%rbp), %r10b
movzwl -0x8(%rbp), %eax
movzwl 0x947c(%rip), %ecx      # 0xf808
orl %ecx, %eax
movzwl 0x9475(%rip), %ecx      # 0xf80a
orl %ecx, %eax
movzwl 0x946e(%rip), %ecx      # 0xf80c
orl %ecx, %eax
xorl %r8d, %r8d
movl $0x4, %ecx
movl $0x1, %r9d
movl %r8d, %esi
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
movzbl %r10b, %r10d
movl %r10d, 0x10(%rsp)
movzwl %ax, %eax
movl %eax, 0x18(%rsp)
callq 0x3340
movl %eax, -0x10(%rbp)
movzwl 0x9429(%rip), %eax      # 0xf808
cmpq $0x0, %rax
je 0x644e
movzwl 0x941e(%rip), %eax      # 0xf80a
cmpq $0x0, %rax
je 0x644e
movq 0x8fdf(%rip), %rdi      # 0xf3d8
movl -0x4(%rbp), %edx
movb -0x5(%rbp), %r10b
movzwl -0x8(%rbp), %eax
movzwl 0x93fd(%rip), %ecx      # 0xf808
orl %ecx, %eax
movzwl 0x93f6(%rip), %ecx      # 0xf80a
orl %ecx, %eax
xorl %r8d, %r8d
movl $0x4, %ecx
movl $0x1, %r9d
movl %r8d, %esi
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
movzbl %r10b, %r10d
movl %r10d, 0x10(%rsp)
movzwl %ax, %eax
movl %eax, 0x18(%rsp)
callq 0x3340
movl %eax, -0x14(%rbp)
movzwl 0x93b5(%rip), %eax      # 0xf80a
cmpq $0x0, %rax
je 0x64c4
movzwl 0x93aa(%rip), %eax      # 0xf80c
cmpq $0x0, %rax
je 0x64c4
movq 0x8f69(%rip), %rdi      # 0xf3d8
movl -0x4(%rbp), %edx
movb -0x5(%rbp), %r10b
movzwl -0x8(%rbp), %eax
movzwl 0x9389(%rip), %ecx      # 0xf80a
orl %ecx, %eax
movzwl 0x9382(%rip), %ecx      # 0xf80c
orl %ecx, %eax
xorl %r8d, %r8d
movl $0x4, %ecx
movl $0x1, %r9d
movl %r8d, %esi
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
movzbl %r10b, %r10d
movl %r10d, 0x10(%rsp)
movzwl %ax, %eax
movl %eax, 0x18(%rsp)
callq 0x3340
movl %eax, -0x18(%rbp)
movzwl 0x933d(%rip), %eax      # 0xf808
cmpq $0x0, %rax
je 0x653a
movzwl 0x9334(%rip), %eax      # 0xf80c
cmpq $0x0, %rax
je 0x653a
movq 0x8ef3(%rip), %rdi      # 0xf3d8
movl -0x4(%rbp), %edx
movb -0x5(%rbp), %r10b
movzwl -0x8(%rbp), %eax
movzwl 0x9311(%rip), %ecx      # 0xf808
orl %ecx, %eax
movzwl 0x930c(%rip), %ecx      # 0xf80c
orl %ecx, %eax
xorl %r8d, %r8d
movl $0x4, %ecx
movl $0x1, %r9d
movl %r8d, %esi
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
movzbl %r10b, %r10d
movl %r10d, 0x10(%rsp)
movzwl %ax, %eax
movl %eax, 0x18(%rsp)
callq 0x3340
movl %eax, -0x1c(%rbp)
movzwl 0x92c7(%rip), %eax      # 0xf808
cmpq $0x0, %rax
je 0x659a
movq 0x8e8a(%rip), %rdi      # 0xf3d8
movl -0x4(%rbp), %edx
movb -0x5(%rbp), %r10b
movzwl -0x8(%rbp), %eax
movzwl 0x92a8(%rip), %ecx      # 0xf808
orl %ecx, %eax
xorl %r8d, %r8d
movl $0x4, %ecx
movl $0x1, %r9d
movl %r8d, %esi
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
movzbl %r10b, %r10d
movl %r10d, 0x10(%rsp)
movzwl %ax, %eax
movl %eax, 0x18(%rsp)
callq 0x3340
movl %eax, -0x20(%rbp)
movzwl 0x9269(%rip), %eax      # 0xf80a
cmpq $0x0, %rax
je 0x65fa
movq 0x8e2a(%rip), %rdi      # 0xf3d8
movl -0x4(%rbp), %edx
movb -0x5(%rbp), %r10b
movzwl -0x8(%rbp), %eax
movzwl 0x924a(%rip), %ecx      # 0xf80a
orl %ecx, %eax
xorl %r8d, %r8d
movl $0x4, %ecx
movl $0x1, %r9d
movl %r8d, %esi
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
movzbl %r10b, %r10d
movl %r10d, 0x10(%rsp)
movzwl %ax, %eax
movl %eax, 0x18(%rsp)
callq 0x3340
movl %eax, -0x24(%rbp)
movzwl 0x920b(%rip), %eax      # 0xf80c
cmpq $0x0, %rax
je 0x665a
movq 0x8dca(%rip), %rdi      # 0xf3d8
movl -0x4(%rbp), %edx
movb -0x5(%rbp), %r10b
movzwl -0x8(%rbp), %eax
movzwl 0x91ec(%rip), %ecx      # 0xf80c
orl %ecx, %eax
xorl %r8d, %r8d
movl $0x4, %ecx
movl $0x1, %r9d
movl %r8d, %esi
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
movzbl %r10b, %r10d
movl %r10d, 0x10(%rsp)
movzwl %ax, %eax
movl %eax, 0x18(%rsp)
callq 0x3340
movl %eax, -0x28(%rbp)
addq $0x50, %rsp
popq %rbp
retq