// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/events.c
// Function: event_main_loop
void event_main_loop(void) {
	union {
		XEvent xevent;
#ifdef SHAPE
		XShapeEvent xshape;
#endif
	} ev;
	/* main event loop here */
	while (!wm_exit) {
		if (interruptibleXNextEvent(&ev.xevent)) {
			switch (ev.xevent.type) {
			case KeyPress:
				handle_key_event(&ev.xevent.xkey); break;
#ifdef MOUSE
			case ButtonPress:
				handle_button_event(&ev.xevent.xbutton); break;
#endif
			case ConfigureRequest:
				handle_configure_request(&ev.xevent.xconfigurerequest); break;
			case MapRequest:
				handle_map_request(&ev.xevent.xmaprequest); break;
			case ColormapNotify:
				handle_colormap_change(&ev.xevent.xcolormap); break;
			case EnterNotify:
				handle_enter_event(&ev.xevent.xcrossing); break;
			case PropertyNotify:
				handle_property_change(&ev.xevent.xproperty); break;
			case UnmapNotify:
				handle_unmap_event(&ev.xevent.xunmap); break;
			case MappingNotify:
				handle_mappingnotify_event(&ev.xevent.xmapping); break;
			case ClientMessage:
				handle_client_message(&ev.xevent.xclient); break;
			default:
#ifdef SHAPE
				if (have_shape && ev.xevent.type == shape_event) {
					handle_shape_event(&ev.xshape);
				}
#endif
#ifdef RANDR
				if (have_randr && ev.xevent.type == randr_event_base + RRScreenChangeNotify) {
					XRRUpdateConfiguration(&ev.xevent);
				}
#endif
				break;
			}
		}
		if (need_client_tidy) {
			struct list *iter, *niter;
			need_client_tidy = 0;
			for (iter = clients_tab_order; iter; iter = niter) {
				Client *c = iter->data;
				niter = iter->next;
				if (c->remove)
					remove_client(c);
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
leaq 0x98f0(%rip), %r15      # 0xd7e0
pushq $0x1
popq %r12
leaq 0xc0(%rsp), %r14
leaq 0x98d5(%rip), %rax      # 0xd7d8
cmpl $0x0, (%rax)
jne 0x496c
movq (%r15), %rdi
movl 0x10(%rdi), %ebp
movl %ebp, %eax
cltd
pushq $0x40
popq %rcx
idivl %ecx
movslq %eax, %r13
shll $0x6, %eax
movl %ebp, %ecx
subl %eax, %ecx
movq %r12, %rbx
shlq %cl, %rbx
incl %ebp
callq 0x3170
testl %eax, %eax
jne 0x3f97
xorl %eax, %eax
cmpq $0x10, %rax
je 0x3f4b
andq $0x0, 0xc0(%rsp,%rax,8)
incq %rax
jmp 0x3f37
orq %rbx, 0xc0(%rsp,%r13,8)
movl %ebp, %edi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x33e0
testl %eax, %eax
jns 0x3f92
callq 0x30d0
cmpl $0x4, (%rax)
je 0x4834
movq 0x907b(%rip), %rax      # 0xcff8
movq (%rax), %rcx
leaq 0x5161(%rip), %rdi      # 0x90e8
pushq $0x24
popq %rsi
movq %r12, %rdx
callq 0x3670
movq (%r15), %rdi
jmp 0x3f2c
movq (%r15), %rdi
movq %rsp, %rsi
callq 0x3420
movl (%rsp), %eax
leal -0x12(%rax), %ecx
cmpl $0x10, %ecx
ja 0x3fe5
leaq 0x5070(%rip), %rdx      # 0x9024
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq 0x28(%rsp), %rdi
callq 0x386c
testq %rax, %rax
je 0x4834
movl 0x20(%rax), %ecx
testl %ecx, %ecx
je 0x4460
decl %ecx
movl %ecx, 0x20(%rax)
jmp 0x4834
cmpl $0x7, %eax
je 0x42e8
cmpl $0x4, %eax
je 0x42a9
cmpl $0x2, %eax
jne 0x40a3
movq (%r15), %rdi
movzbl 0x54(%rsp), %esi
xorl %edx, %edx
callq 0x3580
movq %rax, %r13
callq 0x7c95
movq %rax, %rbx
leaq -0x31(%r13), %rax
cmpq $0x8, %rax
jae 0x4373
leal -0x31(%r13), %esi
movq %rbx, %rdi
callq 0x7b75
leaq 0x9775(%rip), %rax      # 0xd7b0
movq (%rax), %rbp
testq %rbp, %rbp
je 0x4834
movl 0x58(%rbp), %eax
movl 0x5c(%rbp), %ecx
cmpl $0x2, %eax
pushq $0x10
popq %rdx
cmovll %edx, %eax
cmpl $0x2, %ecx
cmovll %edx, %ecx
leaq -0x62(%r13), %rdx
cmpq $0x17, %rdx
ja 0x44ad
leaq 0x4ff7(%rip), %rsi      # 0x9068
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
movl 0x34(%rbp), %eax
movl %eax, 0x24(%rbp)
movq (%r15), %rcx
movq 0xe8(%rcx), %rcx
movq 0x10(%rbp), %rdx
movslq (%rdx), %rdx
shlq $0x7, %rdx
movl 0x1c(%rcx,%rdx), %ecx
addl 0x30(%rbp), %eax
subl %eax, %ecx
jmp 0x47bc
leaq 0x9766(%rip), %rcx      # 0xd810
cmpl $0x0, (%rcx)
je 0x40d1
leaq 0x975e(%rip), %rcx      # 0xd814
cmpl (%rcx), %eax
jne 0x40d1
movq 0x20(%rsp), %rdi
callq 0x386c
testq %rax, %rax
je 0x40d1
movq %rax, %rdi
callq 0x3dd1
leaq 0x9740(%rip), %rax      # 0xd818
cmpl $0x0, (%rax)
je 0x4834
movl (%rsp), %eax
leaq 0x9731(%rip), %rcx      # 0xd81c
cmpl (%rcx), %eax
jne 0x4834
movq %rsp, %rdi
callq 0x3190
jmp 0x4834
movq 0x28(%rsp), %rdi
callq 0x386c
movq %rax, %r13
movdqu 0x30(%rsp), %xmm0
movdqa %xmm0, 0xc0(%rsp)
andl $0x0, 0xd0(%rsp)
movq 0x48(%rsp), %rdi
movq %rdi, 0xd8(%rsp)
movl 0x50(%rsp), %eax
movl %eax, 0xe0(%rsp)
testq %r13, %r13
je 0x43cf
movl 0x58(%rsp), %eax
notl %eax
testb $0x60, %al
jne 0x4165
callq 0x386c
testq %rax, %rax
je 0x4165
movq 0x8(%rax), %rax
movq %rax, 0xd8(%rsp)
movl 0x58(%rsp), %edi
movq %r14, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x497e
leaq 0x9633(%rip), %rax      # 0xd7b0
cmpq (%rax), %r13
jne 0x4834
movq %r13, %rdi
jmp 0x482f
movq 0x28(%rsp), %rdi
callq 0x386c
testq %rax, %rax
je 0x43e8
movq %rax, %r13
movl 0x74(%rax), %esi
cmpl $-0x1, %esi
je 0x41ba
movq 0x10(%r13), %rdi
cmpl 0x40(%rdi), %esi
je 0x41ba
callq 0x7b75
movq %r13, %rdi
callq 0x38f8
movq %r13, %rdi
callq 0x391b
jmp 0x4834
movq %rsp, %rdi
callq 0x3480
cmpl $0x1, 0x28(%rsp)
jne 0x4834
xorl %ebx, %ebx
xorl %r13d, %r13d
leaq 0x9602(%rip), %rax      # 0xd7f0
movslq (%rax), %rax
cmpq %rax, %r13
jge 0x4834
leaq 0x95f7(%rip), %rax      # 0xd7f8
movq (%rax), %rdi
addq %rbx, %rdi
callq 0x7cec
incq %r13
addq $0x70, %rbx
jmp 0x41e7
callq 0x7c95
movq %rax, %r13
movq 0x28(%rsp), %rax
leaq 0x946f(%rip), %rcx      # 0xd698
cmpq (%rcx), %rax
jne 0x4328
movl 0x38(%rsp), %esi
movq %r13, %rdi
callq 0x7b75
jmp 0x4834
movq 0x20(%rsp), %rdi
callq 0x386c
testq %rax, %rax
je 0x4834
movq %rax, %r13
movq 0x28(%rsp), %rax
cmpq $0x28, %rax
jne 0x441a
movq %r13, %rdi
callq 0x6bf6
jmp 0x4834
movq 0x20(%rsp), %rdi
callq 0x386c
testq %rax, %rax
je 0x4834
cmpl $0x0, 0x30(%rsp)
je 0x4834
movq 0x28(%rsp), %rsi
movq %rsi, 0x18(%rax)
movq (%r15), %rdi
callq 0x36d0
jmp 0x4834
movq 0x20(%rsp), %rdi
callq 0x386c
testq %rax, %rax
je 0x4834
movl 0x54(%rsp), %ecx
cmpl $0x3, %ecx
je 0x44ec
cmpl $0x2, %ecx
je 0x44df
cmpl $0x1, %ecx
jne 0x4834
movq %rax, %rdi
callq 0x73ef
jmp 0x4834
movq 0x20(%rsp), %rdi
callq 0x386c
testq %rax, %rax
je 0x4834
movq %rax, %r13
movl 0x74(%rax), %eax
cmpl $-0x1, %eax
je 0x4313
movq 0x10(%r13), %rcx
cmpl 0x40(%rcx), %eax
jne 0x4834
movq %r13, %rdi
callq 0x3adc
movq %r13, %rdi
callq 0x54a4
jmp 0x4834
movq 0x20(%rsp), %rdi
callq 0x386c
movq 0x28(%rsp), %rcx
testq %rax, %rax
je 0x446c
leaq 0x9359(%rip), %rdx      # 0xd6a0
cmpq (%rdx), %rcx
jne 0x448b
cmpq $0x2, 0x38(%rsp)
jne 0x4834
cmpq %r13, 0x10(%rax)
jne 0x4834
movq %rax, %rdi
callq 0x3adc
jmp 0x4834
cmpq $0x61, %r13
je 0x4627
cmpq $0x64, %r13
je 0x45fe
cmpq $0xff09, %r13           # imm = 0xFF09
je 0x455b
cmpq $0xff53, %r13           # imm = 0xFF53
je 0x4548
cmpq $0xff51, %r13           # imm = 0xFF51
je 0x4615
cmpq $0xff0d, %r13           # imm = 0xFF0D
jne 0x4034
leaq 0x901e(%rip), %rax      # 0xd3e0
movq (%rax), %rdi
callq 0x6274
jmp 0x4034
movq (%r15), %rdi
movq 0x28(%rsp), %rsi
movl 0x58(%rsp), %edx
movq %r14, %rcx
callq 0x3040
jmp 0x4834
movq (%r15), %rdi
movq 0x28(%rsp), %rsi
movq %r14, %rdx
callq 0x35b0
movq 0x28(%rsp), %r13
movq 0xe0(%rsp), %rdi
callq 0x7c61
movq %r13, %rdi
movq %rax, %rsi
callq 0x63e0
jmp 0x4834
leaq 0x92c7(%rip), %rcx      # 0xd6e8
cmpq (%rcx), %rax
jne 0x4834
movq %r13, %rdi
callq 0x6cda
cmpl $0x0, 0x78(%r13)
jne 0x4834
movl 0x74(%r13), %eax
cmpl $-0x1, %eax
je 0x4453
movq 0x10(%r13), %rcx
cmpl 0x40(%rcx), %eax
jne 0x4834
movq %r13, %rdi
callq 0x38f8
jmp 0x4834
movl $0x1, 0x7c(%rax)
jmp 0x4844
leaq 0x925d(%rip), %rax      # 0xd6d0
cmpq (%rax), %rcx
jne 0x4834
movq 0x20(%rsp), %rdi
callq 0x57bb
jmp 0x4834
leaq 0x9226(%rip), %rdx      # 0xd6b8
cmpq (%rdx), %rcx
jne 0x44f9
cmpq $0x2, 0x40(%rsp)
jne 0x4834
movq %rax, %rdi
xorl %esi, %esi
jmp 0x489a
cmpq $0x3d, %r13
je 0x487b
cmpq $0xff1b, %r13           # imm = 0xFF1B
je 0x488a
cmpq $0xff63, %r13           # imm = 0xFF63
je 0x44da
cmpq $0xff9e, %r13           # imm = 0xFF9E
jne 0x4834
movq %rbp, %rdi
jmp 0x44ef
movq %rax, %rdi
callq 0x6cf0
jmp 0x4834
movq %rax, %rdi
callq 0x395a
jmp 0x4834
leaq 0x91c0(%rip), %rdx      # 0xd6c0
cmpq (%rdx), %rcx
jne 0x462f
movq 0x38(%rsp), %rcx
movl %ecx, %edx
andl $0x3000, %edx           # imm = 0x3000
cmpl $0x2000, %edx           # imm = 0x2000
jne 0x4834
movl %ecx, %edi
shrl $0x8, %edi
andl $0xf, %edi
movzbl %cl, %ecx
movups 0x40(%rsp), %xmm0
movups 0x50(%rsp), %xmm1
shufps $0x88, %xmm1, %xmm0     # xmm0 = xmm0[0,2],xmm1[0,2]
movaps %xmm0, 0xc0(%rsp)
jmp 0x4669
movl 0x40(%rbx), %esi
cmpl $0x6, %esi
ja 0x4034
incl %esi
jmp 0x402c
callq 0x7a9a
movq (%r15), %rdi
movq 0x28(%rsp), %rsi
xorl %edx, %edx
pushq $0x1
popq %rcx
movl %ecx, %r8d
xorl %r9d, %r9d
callq 0x3760
testl %eax, %eax
jne 0x45ea
movq %rbx, %rbp
pushq $0x3
popq %rbx
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x3730
cmpl $0x2, 0xc0(%rsp)
jne 0x45c3
movq (%r15), %rdi
movzbl 0x114(%rsp), %esi
xorl %edx, %edx
callq 0x3580
cmpq $0xff09, %rax           # imm = 0xFF09
jne 0x45b9
callq 0x7a9a
cmpl $0x2, 0xc0(%rsp)
je 0x4582
movq (%r15), %rdi
movzbl 0x114(%rsp), %esi
xorl %edx, %edx
callq 0x3580
cmpq $0xff09, %rax           # imm = 0xFF09
je 0x4582
movq (%r15), %rdi
xorl %esi, %esi
callq 0x3690
movq %rbp, %rbx
leaq 0x91bf(%rip), %rax      # 0xd7b0
movq (%rax), %rdi
callq 0x54a4
jmp 0x4034
xorl %esi, %esi
cmpl $0x0, 0x68(%rbx)
sete %sil
movq %rbx, %rdi
callq 0x7bf4
jmp 0x4034
movl 0x40(%rbx), %esi
testl %esi, %esi
je 0x4034
decl %esi
jmp 0x402c
movl 0x58(%rbx), %esi
jmp 0x402c
leaq 0x9092(%rip), %rdx      # 0xd6c8
cmpq (%rdx), %rcx
jne 0x48a1
cmpq $0x2, 0x38(%rsp)
jne 0x4834
movq 0x40(%rsp), %rcx
movq %rcx, 0xd8(%rsp)
movl 0x48(%rsp), %ecx
movl %ecx, 0xe0(%rsp)
movl 0x6c(%rax), %ecx
pushq $0x60
popq %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x497e
jmp 0x4834
leaq 0x8d58(%rip), %rax      # 0xd3d8
movl (%rax), %eax
testl %eax, 0x50(%rsp)
je 0x48c2
movl 0x54(%rbp), %eax
addl 0x30(%rbp), %ecx
testl %eax, %eax
je 0x469e
cmpl %eax, %ecx
jg 0x47bf
movl %ecx, 0x30(%rbp)
jmp 0x47bf
movq %rbp, %rdi
pushq $0x2
popq %rsi
pushq $0x3
popq %rdx
jmp 0x4883
cmpl $-0x1, 0x74(%rbp)
je 0x48cb
movq %rbp, %rdi
pushq $-0x1
popq %rsi
jmp 0x48d1
movq (%r15), %rax
movq 0xe8(%rax), %rax
movq 0x10(%rbp), %rcx
movslq (%rcx), %rcx
shlq $0x7, %rcx
movq 0x18(%rax,%rcx), %xmm0
movq 0x30(%rbp), %xmm1
pshufd $0xe1, %xmm1, %xmm2     # xmm2 = xmm1[1,0,2,3]
movss 0x2c(%rbp), %xmm3
movss %xmm3, %xmm1            # xmm1 = xmm3[0],xmm1[1,2,3]
paddd %xmm2, %xmm1
psubd %xmm1, %xmm0
movq %xmm0, 0x24(%rbp)
jmp 0x47bf
leaq 0x8cc8(%rip), %rax      # 0xd3d8
movl (%rax), %eax
testl %eax, 0x50(%rsp)
je 0x48db
movl 0x30(%rbp), %eax
subl %ecx, %eax
cmpl 0x4c(%rbp), %eax
jl 0x47bf
movl %eax, 0x30(%rbp)
jmp 0x47bf
leaq 0x8c9f(%rip), %rcx      # 0xd3d8
movl (%rcx), %ecx
testl %ecx, 0x50(%rsp)
je 0x48e4
movl 0x2c(%rbp), %ecx
subl %eax, %ecx
cmpl 0x48(%rbp), %ecx
jl 0x47bf
movl %ecx, 0x2c(%rbp)
jmp 0x47bf
movl 0x54(%rsp), %esi
movq %rbp, %rdi
callq 0x7077
jmp 0x4834
movl 0x34(%rbp), %eax
movl %eax, 0x24(%rbp)
movl %eax, 0x28(%rbp)
jmp 0x47bf
leaq 0x8c61(%rip), %rcx      # 0xd3d8
movl (%rcx), %ecx
testl %ecx, 0x50(%rsp)
je 0x48ed
movl 0x50(%rbp), %ecx
addl 0x2c(%rbp), %eax
testl %ecx, %ecx
je 0x4791
cmpl %ecx, %eax
jg 0x47bf
movl %eax, 0x2c(%rbp)
jmp 0x47bf
movq (%r15), %rax
movq 0xe8(%rax), %rax
movq 0x10(%rbp), %rcx
movslq (%rcx), %rcx
shlq $0x7, %rcx
movl 0x18(%rax,%rcx), %eax
movl 0x34(%rbp), %ecx
movl 0x2c(%rbp), %edx
addl %ecx, %edx
subl %edx, %eax
movl %eax, 0x24(%rbp)
movl %ecx, 0x28(%rbp)
movl 0x24(%rbp), %ecx
movl 0x34(%rbp), %eax
movl %ecx, %edx
negl %edx
cmovsl %ecx, %edx
cmpl %eax, %edx
jne 0x47da
cmpl $0x0, 0x40(%rbp)
je 0x47da
andl $0x0, 0x24(%rbp)
movl 0x28(%rbp), %ecx
movl %ecx, %edx
negl %edx
cmovsl %ecx, %edx
cmpl %eax, %edx
jne 0x47f2
cmpl $0x0, 0x44(%rbp)
je 0x47f2
andl $0x0, 0x28(%rbp)
movq %rbp, %rdi
callq 0x701d
movq (%r15), %rdi
movq (%rbp), %rdx
movl 0x34(%rbp), %eax
decl %eax
movl 0x2c(%rbp), %r10d
addl %eax, %r10d
addl 0x30(%rbp), %eax
subq $0x8, %rsp
xorl %esi, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rax
pushq %r10
pushq $0x0
callq 0x32c0
addq $0x20, %rsp
movq %rbp, %rdi
callq 0x634a
leaq 0x8fe5(%rip), %rax      # 0xd820
cmpl $0x0, (%rax)
je 0x3efc
leaq 0x8fd5(%rip), %rax      # 0xd820
andl $0x0, (%rax)
leaq 0x8f43(%rip), %rax      # 0xd798
movq (%rax), %rax
testq %rax, %rax
je 0x3efc
movq (%rax), %rbx
movq 0x8(%rax), %rdi
cmpl $0x0, 0x7c(%rdi)
movq %rbx, %rax
je 0x4858
callq 0x3bb0
movq %rbx, %rax
jmp 0x4858
movq %rbp, %rdi
pushq $0x2
popq %rdx
movl %edx, %esi
callq 0x7903
jmp 0x4834
leaq 0x8b47(%rip), %rax      # 0xd3d8
movl (%rax), %esi
andl 0x50(%rsp), %esi
movq %rbp, %rdi
callq 0x3cfc
jmp 0x4834
leaq 0x8e38(%rip), %rdx      # 0xd6e0
cmpq (%rdx), %rcx
jne 0x48f6
cmpq $0x2, 0x40(%rsp)
jne 0x4834
movl 0x38(%rsp), %esi
movq %rax, %rdi
jmp 0x48d1
addl $0x10, 0x28(%rbp)
jmp 0x47bf
movl 0x40(%rbx), %esi
movq %rbp, %rdi
callq 0x3b68
jmp 0x4834
addl $-0x10, 0x28(%rbp)
jmp 0x47bf
addl $-0x10, 0x24(%rbp)
jmp 0x47bf
addl $0x10, 0x24(%rbp)
jmp 0x47bf
leaq 0x8e03(%rip), %rdx      # 0xd700
cmpq (%rdx), %rcx
jne 0x4834
leaq 0x8dfb(%rip), %rcx      # 0xd708
movq (%rcx), %rcx
leaq 0x8df9(%rip), %rdx      # 0xd710
movq (%rdx), %rsi
leaq 0x8df7(%rip), %rdx      # 0xd718
movq (%rdx), %rdi
xorl %r8d, %r8d
xorl %edx, %edx
cmpq $0x2, %r8
je 0x4958
movq 0x40(%rsp,%r8,8), %r9
cmpq %rcx, %r9
jne 0x493e
orl $0x2, %edx
jmp 0x4953
cmpq %rsi, %r9
jne 0x4948
orl $0x1, %edx
jmp 0x4953
cmpq %rdi, %r9
pushq $0x3
popq %r9
cmovel %r9d, %edx
incq %r8
jmp 0x4929
testl %edx, %edx
je 0x4834
movl 0x38(%rsp), %esi
movq %rax, %rdi
jmp 0x4883
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq