// File: /workspace/github_c_makefile_star2_O2/veltzer[P]xmeltdown/src/draw.c
// Function: Initialize
void Initialize(int argc, char** argv)
{
	int count;
	XSizeHints size_hints;
	XSetWindowAttributes attributes;
	if (!(dpy=XOpenDisplay(""))) {
		printf ("Error: Can't open display.");
		exit(-1);
	}
	screen=DefaultScreen(dpy);

	attributes.backing_store=Always;
	attributes.background_pixel=WhitePixel(dpy, screen);
	attributes.border_pixel=BlackPixel(dpy, screen);

	size_hints.width=400;
	size_hints.height=400;
	size_hints.flags=PSize;

/*
 * win = XCreateWindow(
 * dpy, DefaultRootWindow(dpy),
 * 0,0,
 * size_hints.width,
 * size_hints.height,
 * 0,
 * CopyFromParent,
 * InputOutput,
 * CopyFromParent,
 * CWBackingStore | CWBackPixel | CWBorderPixel,
 * &attributes);
 */

	win=XCreateSimpleWindow(dpy,
		DefaultRootWindow(dpy),
		0, 0,
		size_hints.width,
		size_hints.height,
		4,
/*
 * BlackPixel(dpy, screen),
 * WhitePixel(dpy, screen));
 */
		WhitePixel(dpy, screen),
		BlackPixel(dpy, screen)),

	XSetStandardProperties (dpy, win, "application",
		"stickman",
		None, argv, argc, &size_hints);
	for (count=0; count < 2; count++) {
		buffer[count]=XCreateWindow(
			dpy, win,
			0, 0,
			size_hints.width,
			size_hints.height,
			0,
			CopyFromParent,
			InputOutput,
			CopyFromParent,
			CWBackingStore|CWBackPixel,
			&attributes);
		XMapWindow(dpy, buffer[count]);
	}
	XMapWindow(dpy, win);
	XRaiseWindow(dpy, win);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc0, %rsp
movq %rsi, %r14
movl %edi, %ebx
leaq 0x1157(%rip), %rdi      # 0x3040
callq 0x10d0
movq %rax, 0x328b(%rip)      # 0x5180
testq %rax, %rax
je 0x202d
movslq 0xe0(%rax), %rcx
movl %ecx, 0x327d(%rip)      # 0x5188
leaq 0x50(%rsp), %r15
movl $0x2, 0x28(%r15)
movq 0xe8(%rax), %rdx
shlq $0x7, %rcx
movq 0x58(%rdx,%rcx), %r10
movq %r10, 0x8(%r15)
movq 0x60(%rdx,%rcx), %r11
movq %r11, 0x18(%r15)
movabsq $0x19000000190, %rsi    # imm = 0x19000000190
movq %rsp, %r13
movq %rsi, 0x10(%r13)
movq $0x8, (%r13)
movq 0x10(%rdx,%rcx), %rsi
subq $0x8, %rsp
xorl %r12d, %r12d
movq %rax, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x190, %r8d            # imm = 0x190
movl $0x190, %r9d            # imm = 0x190
pushq %r11
pushq %r10
pushq $0x4
callq 0x10c0
addq $0x20, %rsp
movq %rax, 0x320d(%rip)      # 0x5190
movq 0x31f6(%rip), %rdi      # 0x5180
leaq 0x116a(%rip), %rdx      # 0x30fb
leaq 0x116f(%rip), %rcx      # 0x3107
movq %rax, %rsi
xorl %r8d, %r8d
movq %r14, %r9
pushq %r13
pushq %rbx
callq 0x1170
addq $0x10, %rsp
leaq 0x31ec(%rip), %rbx      # 0x51a0
movq 0x31c5(%rip), %rdi      # 0x5180
movq 0x31ce(%rip), %rsi      # 0x5190
cmpq $0x10, %r12
je 0x2004
movl 0x10(%rsp), %r8d
movl 0x14(%rsp), %r9d
xorl %edx, %edx
xorl %ecx, %ecx
pushq %r15
pushq $0x42
pushq $0x0
pushq $0x1
pushq $0x0
pushq $0x0
callq 0x10a0
addq $0x30, %rsp
movq %rax, (%r12,%rbx)
movq 0x318a(%rip), %rdi      # 0x5180
movq %rax, %rsi
callq 0x1120
addq $0x8, %r12
jmp 0x1fb4
callq 0x1120
movq 0x3170(%rip), %rdi      # 0x5180
movq 0x3179(%rip), %rsi      # 0x5190
callq 0x1080
addq $0xc0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x10ac(%rip), %rdi      # 0x30e0
xorl %eax, %eax
callq 0x1030
pushq $-0x1
popq %rdi
callq 0x1070