// File: /workspace/github_c_makefile_star2_O1/mati75[P]evilwm/events.c
// Function: event_main_loop
void event_main_loop(void) {
	// XEvent is a big union of all the core event types, but we also need
	// to handle events about extensions, so make a union of the union...
	union {
		XEvent xevent;
#ifdef SHAPE
		XShapeEvent xshape;
#endif
#ifdef RANDR
		XRRScreenChangeNotifyEvent xrandr;
#endif
	} ev;

	// Main event loop
	while (!end_event_loop) {
		if (interruptibleXNextEvent(&ev.xevent)) {
			switch (ev.xevent.type) {
			case KeyPress:
				bind_handle_key(&ev.xevent.xkey);
				break;
			case ButtonPress:
				bind_handle_button(&ev.xevent.xbutton);
				break;
			case ConfigureNotify:
				handle_configure_notify(&ev.xevent.xconfigure);
				break;
			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 (display.have_shape
				    && ev.xevent.type == display.shape_event) {
					handle_shape_event(&ev.xshape);
				}
#endif
#ifdef RANDR
				if (display.have_randr && ev.xevent.type == display.randr_event_base + RRScreenChangeNotify) {
					handle_randr_event(&ev.xrandr);
				}
#endif
				break;
			}
		}

		// Scan list for clients flagged to be removed
		if (need_client_tidy) {
			struct list *iter, *niter;
			need_client_tidy = 0;
			for (iter = clients_tab_order; iter; iter = niter) {
				struct client *c = iter->data;
				niter = iter->next;
				if (c->remove)
					remove_client(c);
			}
		}
	}
}

// Assembly:
cmpb $0x0, 0x92c1(%rip)      # 0x108dc
jne 0x7c1f
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rsp, %rbx
leaq 0x90dc(%rip), %r12      # 0x10718
leaq 0x90f5(%rip), %r13      # 0x10738
leaq 0x42c2(%rip), %rbp      # 0xb90c
movq %rbx, %rdi
callq 0x99df
testl %eax, %eax
je 0x7b42
movl (%rsp), %eax
cmpl $0x11, %eax
jle 0x76a0
leal -0x12(%rax), %ecx
cmpl $0x10, %ecx
ja 0x78e3
movslq (%rbp,%rcx,4), %rcx
addq %rbp, %rcx
jmpq *%rcx
movq 0x28(%rsp), %rdi
callq 0x53b0
testq %rax, %rax
je 0x7b42
movl 0x24(%rax), %ecx
testl %ecx, %ecx
je 0x7a47
decl %ecx
movl %ecx, 0x24(%rax)
jmp 0x7b42
cmpl $0x2, %eax
je 0x78c9
cmpl $0x4, %eax
je 0x78d6
cmpl $0x7, %eax
jne 0x78e3
movq 0x20(%rsp), %rdi
callq 0x53b0
testq %rax, %rax
je 0x7b42
movq %rax, %r15
movl 0x20(%rax), %eax
cmpl $-0x1, %eax
je 0x76e6
movq 0x10(%r15), %rcx
cmpl 0x60(%rcx), %eax
jne 0x7b42
movq %r15, %rdi
callq 0x5868
movq (%r12), %rdi
movq %r15, %rsi
callq 0x8807
movq %rax, (%r12)
jmp 0x7b42
movq 0x20(%rsp), %rdi
callq 0x53b0
testq %rax, %rax
je 0x7b42
movq %rax, %r15
movq 0x28(%rsp), %rax
cmpq $0x28, %rax
jne 0x7a01
movq %r15, %rdi
callq 0x526c
jmp 0x7b42
callq 0x9775
movq %rax, %r15
movq 0x28(%rsp), %rax
cmpq 0x70(%r13), %rax
jne 0x7965
movl 0x38(%rsp), %esi
movq %r15, %rdi
callq 0x946e
jmp 0x7b42
movq 0x28(%rsp), %rdi
callq 0x53b0
jmp 0x7b42
movq 0x28(%rsp), %rdi
callq 0x53b0
testq %rax, %rax
je 0x79aa
movq %rax, %r15
movl 0x20(%rax), %esi
cmpl $-0x1, %esi
je 0x7798
movq 0x10(%r15), %rdi
cmpl 0x60(%rdi), %esi
je 0x7798
callq 0x946e
movq %r15, %rdi
callq 0x5692
movq %r15, %rdi
callq 0x56e7
jmp 0x7b42
movq 0x28(%rsp), %rdi
callq 0x53b0
movq %rax, %r15
movups 0x30(%rsp), %xmm0
movups %xmm0, 0xc0(%rsp)
movl $0x0, 0xd0(%rsp)
movq 0x48(%rsp), %rdi
movq %rdi, 0xd8(%rsp)
movl 0x50(%rsp), %eax
movl %eax, 0xe0(%rsp)
testq %r15, %r15
je 0x79e2
movl 0x58(%rsp), %eax
notl %eax
testb $0x60, %al
jne 0x7813
callq 0x53b0
testq %rax, %rax
je 0x7813
movq 0x8(%rax), %rax
movq %rax, 0xd8(%rsp)
movl 0x58(%rsp), %edi
leaq 0xc0(%rsp), %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x7c20
leaq 0x8f00(%rip), %rax      # 0x10730
cmpq (%rax), %r15
jne 0x7b42
movq %r15, %rdi
callq 0x9ac4
jmp 0x7b42
movq %rbx, %rdi
callq 0x4100
cmpl $0x1, 0x28(%rsp)
jne 0x7b42
cmpl $0x0, 0x188(%r13)
jle 0x7b42
xorl %r15d, %r15d
xorl %r14d, %r14d
movq 0x190(%r13), %rdi
addq %r15, %rdi
callq 0x4ea8
incq %r14
movslq 0x188(%r13), %rax
addq $0x78, %r15
cmpq %rax, %r14
jl 0x786d
jmp 0x7b42
movq 0x20(%rsp), %rdi
callq 0x53b0
testq %rax, %rax
je 0x7b42
cmpl $0x0, 0x30(%rsp)
je 0x7b42
movq 0x28(%rsp), %rsi
movq %rsi, 0x18(%rax)
movq (%r13), %rdi
callq 0x4590
jmp 0x7b42
movq %rbx, %rdi
callq 0x5122
jmp 0x7b42
movq %rbx, %rdi
callq 0x51ce
jmp 0x7b42
cmpl $0x0, 0x178(%r13)
je 0x790d
cmpl 0x17c(%r13), %eax
jne 0x790d
movq 0x20(%rsp), %rdi
callq 0x53b0
testq %rax, %rax
je 0x790d
movq %rax, %rdi
callq 0x5bdd
cmpl $0x0, 0x180(%r13)
je 0x7b42
movl (%rsp), %eax
cmpl 0x184(%r13), %eax
jne 0x7b42
movq 0x28(%rsp), %rdi
callq 0x9749
movq %rax, %r15
movq %rax, %rdi
callq 0x9582
movq %rbx, %rdi
callq 0x44f0
movq %r15, %rdi
callq 0x9272
movq %r15, %rdi
callq 0x9618
movq %r15, %rdi
callq 0x7dc0
jmp 0x7b42
movq 0x20(%rsp), %rdi
callq 0x53b0
movq 0x28(%rsp), %rcx
testq %rax, %rax
je 0x7a5a
cmpq 0x78(%r13), %rcx
jne 0x7a83
cmpq $0x2, 0x38(%rsp)
jne 0x7b42
cmpq %r15, 0x10(%rax)
jne 0x7b42
movq %rax, %rdi
callq 0x5868
jmp 0x7b42
movq (%r13), %rdi
movq 0x28(%rsp), %rsi
leaq 0xc0(%rsp), %rdx
callq 0x4630
movq 0x28(%rsp), %r15
movq 0xe0(%rsp), %rdi
callq 0x9749
movq %r15, %rdi
movq %rax, %rsi
callq 0x6c0c
jmp 0x7b42
movq (%r13), %rdi
movq 0x28(%rsp), %rsi
movl 0x58(%rsp), %edx
leaq 0xc0(%rsp), %rcx
callq 0x40e0
jmp 0x7b42
cmpq 0xc0(%r13), %rax
jne 0x7b42
movq %r15, %rdi
callq 0x538b
cmpl $0x0, 0x94(%r15)
jne 0x7b42
movl 0x20(%r15), %eax
cmpl $-0x1, %eax
je 0x7a3a
movq 0x10(%r15), %rcx
cmpl 0x60(%rcx), %eax
jne 0x7b42
movq %r15, %rdi
callq 0x5692
jmp 0x7b42
movl $0x1, %ecx
movl %ecx, 0x68(%rax)
movl %ecx, 0x8e83(%rip)      # 0x108d8
jmp 0x7b42
cmpq 0xa8(%r13), %rcx
jne 0x7b42
movq 0x20(%rsp), %rdi
callq 0x998d
movq 0x20(%rsp), %rdi
movslq %eax, %rsi
callq 0x8322
jmp 0x7b42
cmpq 0x90(%r13), %rcx
jne 0x7aa7
cmpq $0x2, 0x40(%rsp)
jne 0x7b42
movq %rax, %rdi
xorl %esi, %esi
callq 0x5af2
jmp 0x7b42
cmpq 0x98(%r13), %rcx
jne 0x7afe
movq 0x38(%rsp), %rcx
movl %ecx, %edx
andl $0x3000, %edx           # imm = 0x3000
cmpl $0x2000, %edx           # imm = 0x2000
jne 0x7b42
movl %ecx, %edi
shrl $0x8, %edi
andl $0xf, %edi
movzbl %cl, %ecx
movl 0x40(%rsp), %edx
movl 0x48(%rsp), %esi
movl %edx, 0xc0(%rsp)
movl %esi, 0xc4(%rsp)
movl 0x50(%rsp), %edx
movl %edx, 0xc8(%rsp)
movl 0x58(%rsp), %edx
movl %edx, 0xcc(%rsp)
jmp 0x7b32
cmpq 0xa0(%r13), %rcx
jne 0x7b84
cmpq $0x2, 0x38(%rsp)
jne 0x7b42
movq 0x40(%rsp), %rcx
movq %rcx, 0xd8(%rsp)
movl 0x48(%rsp), %ecx
movl %ecx, 0xe0(%rsp)
movl 0x90(%rax), %ecx
movl $0x60, %edi
leaq 0xc0(%rsp), %rsi
movq %rax, %rdx
callq 0x7c20
cmpl $0x0, 0x8d8f(%rip)      # 0x108d8
je 0x7b72
movl $0x0, 0x8d83(%rip)      # 0x108d8
movq (%r12), %r14
testq %r14, %r14
je 0x7b72
movq 0x8(%r14), %rdi
movq (%r14), %r14
cmpl $0x0, 0x68(%rdi)
je 0x7b59
callq 0x595d
jmp 0x7b59
cmpb $0x1, 0x8d63(%rip)      # 0x108dc
jne 0x764a
jmp 0x7c0e
cmpq 0xb8(%r13), %rcx
jne 0x7ba3
cmpq $0x2, 0x40(%rsp)
jne 0x7b42
movl 0x38(%rsp), %esi
movq %rax, %rdi
callq 0x590e
jmp 0x7b42
cmpq 0xe0(%r13), %rcx
jne 0x7b42
movq 0xe8(%r13), %rcx
movq 0xf0(%r13), %rsi
movq 0x100(%r13), %rdi
xorl %r8d, %r8d
xorl %edx, %edx
movl $0x3, %r10d
movq 0x40(%rsp,%r8,8), %r9
cmpq %rcx, %r9
jne 0x7bdb
orl $0x2, %edx
jmp 0x7bec
cmpq %rsi, %r9
jne 0x7be5
orl $0x1, %edx
jmp 0x7bec
cmpq %rdi, %r9
cmovel %r10d, %edx
incq %r8
cmpq $0x2, %r8
jne 0x7bcc
testl %edx, %edx
je 0x7b42
movl 0x38(%rsp), %esi
movq %rax, %rdi
callq 0x6957
jmp 0x7b42
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq