// File: /workspace/github_c_makefile_star2_O0/garbeam[P]st/x.c
// Function: bpress
void
bpress(XEvent *e)
{
	struct timespec now;
	MouseShortcut *ms;
	int snap;

	if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forceselmod)) {
		mousereport(e);
		return;
	}

	for (ms = mshortcuts; ms < mshortcuts + LEN(mshortcuts); ms++) {
		if (e->xbutton.button == ms->b
				&& match(ms->mask, e->xbutton.state)) {
			ttywrite(ms->s, strlen(ms->s), 1);
			return;
		}
	}

	if (e->xbutton.button == Button1) {
		/*
		 * If the user clicks below predefined timeouts specific
		 * snapping behaviour is exposed.
		 */
		clock_gettime(CLOCK_MONOTONIC, &now);
		if (TIMEDIFF(now, xsel.tclick2) <= tripleclicktimeout) {
			snap = SNAP_LINE;
		} else if (TIMEDIFF(now, xsel.tclick1) <= doubleclicktimeout) {
			snap = SNAP_WORD;
		} else {
			snap = 0;
		}
		xsel.tclick2 = xsel.tclick1;
		xsel.tclick1 = now;

		selstart(evcol(e), evrow(e), snap);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl 0xb946(%rip), %eax      # 0x1b4e8
andl $0xc018, %eax           # imm = 0xC018
cmpl $0x0, %eax
je 0xfbcc
movq -0x8(%rbp), %rax
movl 0x50(%rax), %eax
andl 0x90f7(%rip), %eax      # 0x18cb0
cmpl $0x0, %eax
jne 0xfbcc
movq -0x8(%rbp), %rdi
callq 0x10a10
jmp 0xfd75
leaq 0x90ed(%rip), %rax      # 0x18cc0
movq %rax, -0x20(%rbp)
leaq 0x90e2(%rip), %rax      # 0x18cc0
addq $0x20, %rax
cmpq %rax, -0x20(%rbp)
jae 0xfc4e
movq -0x8(%rbp), %rax
movl 0x54(%rax), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jne 0xfc3e
movq -0x20(%rbp), %rax
movl 0x4(%rax), %edi
movq -0x8(%rbp), %rax
movl 0x50(%rax), %esi
callq 0x105f0
cmpl $0x0, %eax
je 0xfc3e
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x5340
movq -0x30(%rbp), %rdi
movq %rax, %rsi
movl $0x1, %edx
callq 0x6ef0
jmp 0xfd75
jmp 0xfc40
movq -0x20(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x20(%rbp)
jmp 0xfbd7
movq -0x8(%rbp), %rax
cmpl $0x1, 0x54(%rax)
jne 0xfd75
movl $0x1, %edi
leaq -0x18(%rbp), %rsi
callq 0x5130
movq 0xb8f7(%rip), %rdx      # 0x1b568
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
subq %rdx, %rcx
imulq $0x3e8, %rcx, %rcx      # imm = 0x3E8
cvtsi2sd %rcx, %xmm1
movq 0xb8e1(%rip), %rcx      # 0x1b570
subq %rcx, %rax
cvtsi2sd %rax, %xmm0
movsd 0x20f1(%rip), %xmm2     # 0x11d90
divsd %xmm2, %xmm0
addsd %xmm0, %xmm1
movl 0x9033(%rip), %eax      # 0x18ce0
cvtsi2sd %rax, %xmm0
ucomisd %xmm1, %xmm0
jb 0xfcc1
movl $0x2, -0x24(%rbp)
jmp 0xfd21
movq 0xb890(%rip), %rdx      # 0x1b558
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
subq %rdx, %rcx
imulq $0x3e8, %rcx, %rcx      # imm = 0x3E8
cvtsi2sd %rcx, %xmm1
movq 0xb87a(%rip), %rcx      # 0x1b560
subq %rcx, %rax
cvtsi2sd %rax, %xmm0
movsd 0x209a(%rip), %xmm2     # 0x11d90
divsd %xmm2, %xmm0
addsd %xmm0, %xmm1
movl 0x8fe0(%rip), %eax      # 0x18ce4
cvtsi2sd %rax, %xmm0
ucomisd %xmm1, %xmm0
jb 0xfd18
movl $0x1, -0x24(%rbp)
jmp 0xfd1f
movl $0x0, -0x24(%rbp)
jmp 0xfd21
movq 0xb830(%rip), %rax      # 0x1b558
movq %rax, 0xb839(%rip)      # 0x1b568
movq 0xb82a(%rip), %rax      # 0x1b560
movq %rax, 0xb833(%rip)      # 0x1b570
movq -0x18(%rbp), %rax
movq %rax, 0xb810(%rip)      # 0x1b558
movq -0x10(%rbp), %rax
movq %rax, 0xb80d(%rip)      # 0x1b560
movq -0x8(%rbp), %rdi
callq 0x10c80
movl %eax, -0x34(%rbp)
movq -0x8(%rbp), %rdi
callq 0x10cf0
movl -0x34(%rbp), %edi
movl %eax, %esi
movl -0x24(%rbp), %edx
callq 0x5d50
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)