// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/events.c
// Function: button_press
void button_press(xcb_generic_event_t *evt)
{
	xcb_button_press_event_t *e = (xcb_button_press_event_t *) evt;
	bool replay = false;
	for (unsigned int i = 0; i < LENGTH(BUTTONS); i++) {
		if (e->detail != BUTTONS[i]) {
			continue;
		}
		if ((click_to_focus == (int8_t) XCB_BUTTON_INDEX_ANY || click_to_focus == (int8_t) BUTTONS[i]) &&
			cleaned_mask(e->state) == XCB_NONE) {
			bool pff = pointer_follows_focus;
			bool pfm = pointer_follows_monitor;
			pointer_follows_focus = false;
			pointer_follows_monitor = false;
			replay = !grab_pointer(ACTION_FOCUS) || !swallow_first_click;
			pointer_follows_focus = pff;
			pointer_follows_monitor = pfm;
		} else {
			grab_pointer(pointer_actions[i]);
		}
	}
	xcb_allow_events(dpy, replay ? XCB_ALLOW_REPLAY_POINTER : XCB_ALLOW_SYNC_POINTER, e->time);
	xcb_flush(dpy);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpq $0x3, %rax
jae 0x140f6
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
movl -0x18(%rbp), %ecx
movl %ecx, %edx
leaq 0x19c0c(%rip), %rcx     # 0x2dbec
cmpl (%rcx,%rdx,4), %eax
je 0x13fea
jmp 0x140e8
leaq 0x21dfc(%rip), %rax     # 0x35ded
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x1401d
leaq 0x21ded(%rip), %rax     # 0x35ded
movsbl (%rax), %eax
movl -0x18(%rbp), %ecx
movl %ecx, %edx
leaq 0x19bdd(%rip), %rcx     # 0x2dbec
movl (%rcx,%rdx,4), %ecx
movsbl %cl, %ecx
cmpl %ecx, %eax
jne 0x140d2
movq -0x10(%rbp), %rax
movzwl 0x1c(%rax), %eax
leaq 0x21de4(%rip), %rcx     # 0x35e10
movzwl (%rcx), %ecx
leaq 0x21dde(%rip), %rdx     # 0x35e14
movzwl (%rdx), %edx
orl %edx, %ecx
leaq 0x21dd0(%rip), %rdx     # 0x35e12
movzwl (%rdx), %edx
orl %edx, %ecx
xorl $-0x1, %ecx
andl %ecx, %eax
cltq
cmpq $0x0, %rax
jne 0x140d2
leaq 0x21d90(%rip), %rax     # 0x35deb
movb (%rax), %al
andb $0x1, %al
movb %al, -0x19(%rbp)
leaq 0x21d83(%rip), %rax     # 0x35dec
movb (%rax), %al
andb $0x1, %al
movb %al, -0x1a(%rbp)
leaq 0x21d74(%rip), %rax     # 0x35deb
movb $0x0, (%rax)
leaq 0x21d6b(%rip), %rax     # 0x35dec
movb $0x0, (%rax)
movl $0x1, %edi
callq 0x15440
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x21(%rbp)
jne 0x1409c
jmp 0x140aa
leaq 0x21d4b(%rip), %rax     # 0x35dee
movb (%rax), %al
xorb $-0x1, %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
andb $0x1, %al
movb %al, -0x11(%rbp)
movb -0x19(%rbp), %cl
andb $0x1, %cl
leaq 0x21d2c(%rip), %rax     # 0x35deb
movb %cl, (%rax)
movb -0x1a(%rbp), %cl
andb $0x1, %cl
leaq 0x21d1e(%rip), %rax     # 0x35dec
movb %cl, (%rax)
jmp 0x140e6
movl -0x18(%rbp), %eax
movl %eax, %ecx
leaq 0x21cfa(%rip), %rax     # 0x35dd8
movl (%rax,%rcx,4), %edi
callq 0x15440
jmp 0x140e8
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x13fbf
leaq 0x215bb(%rip), %rax     # 0x356b8
movq (%rax), %rdi
movb -0x11(%rbp), %dl
movl $0x1, %eax
movl $0x2, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movq -0x10(%rbp), %rcx
movl 0x4(%rcx), %edx
movzbl %al, %esi
callq 0x4150
movl %eax, -0x20(%rbp)
leaq 0x2158c(%rip), %rax     # 0x356b8
movq (%rax), %rdi
callq 0x4650
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)