// File: /workspace/github_c_makefile_star2_O0/veltzer[P]xmeltdown/src/stickman.c
// Function: main
int main(int argc, char** argv)
{
	XGCValues my_gcvalues;
	XEvent my_event;

	Initialize(argc, argv);
	XRaiseWindow(dpy, buffer[0]);

	XSelectInput(dpy, win,
		ExposureMask|ButtonPressMask|ButtonReleaseMask|
		ButtonMotionMask|KeyPressMask);

	XSelectInput(dpy, buffer[0],
		ExposureMask|ButtonPressMask|ButtonReleaseMask|
		ButtonMotionMask|KeyPressMask);

	XSelectInput(dpy, buffer[1],
		ExposureMask|ButtonPressMask|ButtonReleaseMask|
		ButtonMotionMask|KeyPressMask);

	my_gcvalues.line_width=0;
	my_gcvalues.line_style=LineSolid;

#ifdef NOCOLOR
	my_gcvalues.function=GXset;
#else
	my_gcvalues.function=GXclear;
#endif

	set_gc=XCreateGC(dpy, buffer[0],
		GCFunction|GCLineWidth|GCLineStyle,
		&my_gcvalues);

	my_gcvalues.line_width=0;
	my_gcvalues.line_style=LineOnOffDash;
	my_gcvalues.function=GXclear;
	my_gcvalues.cap_style=CapNotLast;

	dotted_gc=XCreateGC(dpy, buffer[0],
		GCFunction|GCLineWidth|GCLineStyle|GCCapStyle,
		&my_gcvalues);

	my_gcvalues.line_width=0;
	my_gcvalues.line_style=LineSolid;

#ifdef NOCOLOR
	my_gcvalues.function=GXclear;
#else
	my_gcvalues.function=GXset;
#endif

	unset_gc=XCreateGC(dpy, buffer[0],
		GCFunction|GCLineWidth|GCLineStyle,
		&my_gcvalues);

	XClearWindow(dpy, buffer[0]);
	DrawSkel(&bones, unset_gc, buffer[0]);
	while (1) {
		XNextEvent (dpy, &my_event);
		if (my_event.type == KeyPress)
			HandleKeyPress((XKeyEvent*)&my_event);
		if (my_event.type == ButtonPress)
			HandleButtonPress((XButtonEvent*)&my_event);
		if (my_event.type == ButtonRelease)
			HandleButtonRelease((XButtonEvent*)&my_event);
		if (my_event.type == MotionNotify)
			HandleMotion((XMotionEvent*)&my_event);
		else if (my_event.type == Expose) {
			XClearWindow(dpy, buffer[0]);
			DrawSkel(&bones, unset_gc, buffer[0]);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x2240
leaq 0x4034(%rip), %rax      # 0x52e0
movq (%rax), %rdi
leaq 0x404a(%rip), %rax      # 0x5300
movq (%rax), %rsi
callq 0x1070
leaq 0x401b(%rip), %rax      # 0x52e0
movq (%rax), %rdi
leaq 0x4021(%rip), %rax      # 0x52f0
movq (%rax), %rsi
movl $0xa00d, %edx           # imm = 0xA00D
callq 0x1120
leaq 0x3ffd(%rip), %rax      # 0x52e0
movq (%rax), %rdi
leaq 0x4013(%rip), %rax      # 0x5300
movq (%rax), %rsi
movl $0xa00d, %edx           # imm = 0xA00D
callq 0x1120
leaq 0x3fdf(%rip), %rax      # 0x52e0
movq (%rax), %rdi
leaq 0x3ff5(%rip), %rax      # 0x5300
movq 0x8(%rax), %rsi
movl $0xa00d, %edx           # imm = 0xA00D
callq 0x1120
movl $0x0, -0x70(%rbp)
movl $0x0, -0x6c(%rbp)
movl $0x0, -0x90(%rbp)
leaq 0x3fa8(%rip), %rax      # 0x52e0
movq (%rax), %rdi
leaq 0x3fbe(%rip), %rax      # 0x5300
movq (%rax), %rsi
movl $0x31, %edx
leaq -0x90(%rbp), %rcx
callq 0x1110
movq %rax, 0x3eeb(%rip)      # 0x5248
movl $0x0, -0x70(%rbp)
movl $0x1, -0x6c(%rbp)
movl $0x0, -0x90(%rbp)
movl $0x0, -0x68(%rbp)
leaq 0x3f5d(%rip), %rax      # 0x52e0
movq (%rax), %rdi
leaq 0x3f73(%rip), %rax      # 0x5300
movq (%rax), %rsi
movl $0x71, %edx
leaq -0x90(%rbp), %rcx
callq 0x1110
movq %rax, 0x3ea8(%rip)      # 0x5250
movl $0x0, -0x70(%rbp)
movl $0x0, -0x6c(%rbp)
movl $0xf, -0x90(%rbp)
leaq 0x3f19(%rip), %rax      # 0x52e0
movq (%rax), %rdi
leaq 0x3f2f(%rip), %rax      # 0x5300
movq (%rax), %rsi
movl $0x31, %edx
leaq -0x90(%rbp), %rcx
callq 0x1110
movq %rax, 0x3e6c(%rip)      # 0x5258
leaq 0x3eed(%rip), %rax      # 0x52e0
movq (%rax), %rdi
leaq 0x3f03(%rip), %rax      # 0x5300
movq (%rax), %rsi
callq 0x1040
movq 0x3e4c(%rip), %rsi      # 0x5258
leaq 0x3eed(%rip), %rax      # 0x5300
movq (%rax), %rdx
leaq 0x3cb3(%rip), %rdi      # 0x50d0
callq 0x1ab0
leaq 0x3eb7(%rip), %rax      # 0x52e0
movq (%rax), %rdi
leaq -0x150(%rbp), %rsi
callq 0x10f0
cmpl $0x2, -0x150(%rbp)
jne 0x144d
leaq -0x150(%rbp), %rdi
callq 0x14e0
cmpl $0x4, -0x150(%rbp)
jne 0x1462
leaq -0x150(%rbp), %rdi
callq 0x1550
cmpl $0x5, -0x150(%rbp)
jne 0x1477
leaq -0x150(%rbp), %rdi
callq 0x1640
cmpl $0x6, -0x150(%rbp)
jne 0x148e
leaq -0x150(%rbp), %rdi
callq 0x1680
jmp 0x14cf
cmpl $0xc, -0x150(%rbp)
jne 0x14cd
leaq 0x3e42(%rip), %rax      # 0x52e0
movq (%rax), %rdi
leaq 0x3e58(%rip), %rax      # 0x5300
movq (%rax), %rsi
callq 0x1040
movq 0x3da1(%rip), %rsi      # 0x5258
leaq 0x3e42(%rip), %rax      # 0x5300
movq (%rax), %rdx
leaq 0x3c08(%rip), %rdi      # 0x50d0
callq 0x1ab0
jmp 0x14cf
jmp 0x1422
nopw %cs:(%rax,%rax)