// File: /workspace/github_c_makefile_star2_O0/9wm[P]9wm/event.c
// Function: mainloop
void
mainloop(int shape_event)
{
	XEvent ev;

	for (;;) {
		getevent(&ev);

#ifdef	DEBUG_EV
		if (debug) {
			ShowEvent(&ev);
			printf("\n");
		}
#endif
		switch (ev.type) {
		default:
#ifdef	SHAPE
			if (shape && ev.type == shape_event)
				shapenotify((XShapeEvent *) & ev);
			else
#endif
				fprintf(stderr, "9wm: unknown ev.type %d\n", ev.type);
			break;
		case ButtonPress:
			button(&ev.xbutton);
			break;
		case ButtonRelease:
			break;
		case MapRequest:
			mapreq(&ev.xmaprequest);
			break;
		case ConfigureRequest:
			configurereq(&ev.xconfigurerequest);
			break;
		case CirculateRequest:
			circulatereq(&ev.xcirculaterequest);
			break;
		case UnmapNotify:
			unmap(&ev.xunmap);
			break;
		case CreateNotify:
			newwindow(&ev.xcreatewindow);
			break;
		case DestroyNotify:
			destroy(ev.xdestroywindow.window);
			break;
		case ClientMessage:
			clientmesg(&ev.xclient);
			break;
		case ColormapNotify:
			cmap(&ev.xcolormap);
			break;
		case PropertyNotify:
			property(&ev.xproperty);
			break;
		case SelectionClear:
			fprintf(stderr, "9wm: SelectionClear (this should not happen)\n");
			break;
		case SelectionNotify:
			fprintf(stderr, "9wm: SelectionNotify (this should not happen)\n");
			break;
		case SelectionRequest:
			fprintf(stderr, "9wm: SelectionRequest (this should not happen)\n");
			break;
		case EnterNotify:
			enter(&ev.xcrossing);
			break;
		case ReparentNotify:
			reparent(&ev.xreparent);
			break;
		case FocusIn:
			focusin(&ev.xfocus);
			break;
		case MotionNotify:
		case Expose:
		case FocusOut:
		case ConfigureNotify:
		case MapNotify:
		case MappingNotify:
			/*
			 * not interested 
			 */
			trace("ignore", 0, &ev);
			break;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movl %edi, -0x4(%rbp)
xorl %eax, %eax
leaq -0xc8(%rbp), %rdi
callq 0x35e0
movl -0xc8(%rbp), %eax
addl $-0x4, %eax
movl %eax, %ecx
movq %rcx, -0xd0(%rbp)
subl $0x1e, %eax
ja 0x3a2a
movq -0xd0(%rbp), %rax
leaq 0x5993(%rip), %rcx      # 0x93b4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x85c7(%rip), %rax      # 0xbff8
movq (%rax), %rdi
movl -0xc8(%rbp), %edx
leaq 0x59ef(%rip), %rsi      # 0x9430
movb $0x0, %al
callq 0x22b0
jmp 0x3b75
leaq -0xc8(%rbp), %rdi
movb $0x0, %al
callq 0x5ee0
jmp 0x3b75
jmp 0x3b75
leaq -0xc8(%rbp), %rdi
callq 0x3e50
jmp 0x3b75
leaq -0xc8(%rbp), %rdi
callq 0x3b80
jmp 0x3b75
leaq -0xc8(%rbp), %rdi
callq 0x4160
jmp 0x3b75
leaq -0xc8(%rbp), %rdi
callq 0x40a0
jmp 0x3b75
leaq -0xc8(%rbp), %rdi
callq 0x4190
jmp 0x3b75
movq -0xa0(%rbp), %rdi
callq 0x4280
jmp 0x3b75
leaq -0xc8(%rbp), %rdi
callq 0x42f0
jmp 0x3b75
leaq -0xc8(%rbp), %rdi
callq 0x45f0
jmp 0x3b75
leaq -0xc8(%rbp), %rdi
callq 0x4710
jmp 0x3b75
movq 0x84f6(%rip), %rax      # 0xbff8
movq (%rax), %rdi
leaq 0x593d(%rip), %rsi      # 0x9449
movb $0x0, %al
callq 0x22b0
jmp 0x3b75
movq 0x84dc(%rip), %rax      # 0xbff8
movq (%rax), %rdi
leaq 0x5951(%rip), %rsi      # 0x9477
movb $0x0, %al
callq 0x22b0
jmp 0x3b75
movq 0x84c2(%rip), %rax      # 0xbff8
movq (%rax), %rdi
leaq 0x5966(%rip), %rsi      # 0x94a6
movb $0x0, %al
callq 0x22b0
jmp 0x3b75
leaq -0xc8(%rbp), %rdi
callq 0x4ac0
jmp 0x3b75
leaq -0xc8(%rbp), %rdi
callq 0x4940
jmp 0x3b75
leaq -0xc8(%rbp), %rdi
callq 0x4b60
jmp 0x3b75
jmp 0x3b75
jmp 0x39ee
nopw (%rax,%rax)