// File: /workspace/github_c_makefile_star2_O0/zenlinux[P]cwm/xevents.c
// Function: xev_handle_keypress
static void
xev_handle_keypress(XEvent *ee)
{
	XKeyEvent		*e = &ee->xkey;
	struct client_ctx	*cc = NULL, fakecc;
	struct keybinding	*kb;
	KeySym			 keysym, skeysym;
	int			 modshift;

	keysym = XkbKeycodeToKeysym(X_Dpy, e->keycode, 0, 0);
	skeysym = XkbKeycodeToKeysym(X_Dpy, e->keycode, 0, 1);

	/* we don't care about caps lock and numlock here */
	e->state &= ~(LockMask | Mod2Mask);

	TAILQ_FOREACH(kb, &Conf.keybindingq, entry) {
		if (keysym != kb->keysym && skeysym == kb->keysym)
			modshift = ShiftMask;
		else
			modshift = 0;

		if ((kb->modmask | modshift) != e->state)
			continue;

		if ((kb->keycode != 0 && kb->keysym == NoSymbol &&
		    kb->keycode == e->keycode) || kb->keysym ==
		    (modshift == 0 ? keysym : skeysym))
			break;
	}

	if (kb == NULL)
		return;
	if (kb->flags & KBFLAG_NEEDCLIENT) {
		if (((cc = client_find(e->window)) == NULL) &&
		    (cc = client_current()) == NULL)
			return;
	} else {
		cc = &fakecc;
		cc->sc = screen_fromroot(e->window);
	}

	(*kb->callback)(cc, &kb->argument);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
leaq 0xfc12(%rip), %rax      # 0x1c7a8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x54(%rax), %eax
xorl %ecx, %ecx
movzbl %al, %esi
movl %ecx, %edx
callq 0x5270
movq %rax, -0x130(%rbp)
leaq 0xfbee(%rip), %rax      # 0x1c7a8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x54(%rax), %eax
xorl %edx, %edx
movl $0x1, %ecx
movzbl %al, %esi
callq 0x5270
movq %rax, -0x138(%rbp)
movq -0x10(%rbp), %rax
movl 0x50(%rax), %ecx
andl $-0x13, %ecx
movl %ecx, 0x50(%rax)
leaq 0xdad2(%rip), %rax      # 0x1a6c0
movq (%rax), %rax
movq %rax, -0x128(%rbp)
cmpq $0x0, -0x128(%rbp)
je 0xccff
movq -0x130(%rbp), %rax
movq -0x128(%rbp), %rcx
movslq 0x24(%rcx), %rcx
cmpq %rcx, %rax
je 0xcc40
movq -0x138(%rbp), %rax
movq -0x128(%rbp), %rcx
movslq 0x24(%rcx), %rcx
cmpq %rcx, %rax
jne 0xcc40
movl $0x1, -0x13c(%rbp)
jmp 0xcc4a
movl $0x0, -0x13c(%rbp)
movq -0x128(%rbp), %rax
movl 0x20(%rax), %eax
orl -0x13c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x50(%rcx), %eax
je 0xcc68
jmp 0xcce9
movq -0x128(%rbp), %rax
cmpl $0x0, 0x28(%rax)
je 0xcc99
movq -0x128(%rbp), %rax
movslq 0x24(%rax), %rax
cmpq $0x0, %rax
jne 0xcc99
movq -0x128(%rbp), %rax
movl 0x28(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x54(%rcx), %eax
je 0xcce5
movq -0x128(%rbp), %rax
movslq 0x24(%rax), %rax
movq %rax, -0x148(%rbp)
cmpl $0x0, -0x13c(%rbp)
jne 0xccc4
movq -0x130(%rbp), %rax
movq %rax, -0x150(%rbp)
jmp 0xccd2
movq -0x138(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0x148(%rbp), %rax
movq -0x150(%rbp), %rcx
cmpq %rcx, %rax
jne 0xcce7
jmp 0xccff
jmp 0xcce9
movq -0x128(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x128(%rbp)
jmp 0xcbf8
cmpq $0x0, -0x128(%rbp)
jne 0xcd0b
jmp 0xcd86
movq -0x128(%rbp), %rax
movl 0x2c(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xcd47
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x6510
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0xcd45
callq 0x7aa0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0xcd45
jmp 0xcd86
jmp 0xcd6a
leaq -0x120(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x6060
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x128(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rdi
movq -0x128(%rbp), %rsi
addq $0x18, %rsi
callq *%rax
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
nop