// File: /workspace/github_c_makefile_star2_O2/seanpringle[P]xoat/./setup.c
// Function: setup
void setup()
{
	int i, j; Client *c; Monitor *m;
	memset(&monitors, 0, sizeof(monitors));

	int screen_w = WidthOfScreen(DefaultScreenOfDisplay(display));
	int screen_h = HeightOfScreen(DefaultScreenOfDisplay(display));

	// default non-multi-head setup
	monitors[0].w = screen_w;
	monitors[0].h = screen_h;

	// support multi-head.
	XineramaScreenInfo *info;
	if (XineramaIsActive(display) && (info = XineramaQueryScreens(display, &nmonitors)))
	{
		nmonitors = MIN(nmonitors, MONITORS);
		for_monitors(i, m)
		{
			m->x = info[i].x_org;
			m->y = info[i].y_org;
			m->w = info[i].width;
			m->h = info[i].height;
		}
		XFree(info);
	}

	// detect and adjust for panel struts
	Monitor padded[MONITORS];
	memmove(padded, monitors, sizeof(Monitor) * MONITORS);
	wm_strut all_struts; memset(&all_struts, 0, sizeof(wm_strut));

	for_windows(i, c)
	{
		wm_strut strut; memset(&strut, 0, sizeof(wm_strut));
		int v2 = GETPROP_LONG(c->window, atoms[_NET_WM_STRUT_PARTIAL], (unsigned long*)&strut, 12);
		int v1 = v2 ? 0: GETPROP_LONG(c->window, atoms[_NET_WM_STRUT], (unsigned long*)&strut, 4);
		if (!c->visible || (!v1 && !v2)) continue;

		all_struts.left   = MAX(all_struts.left,   strut.left);
		all_struts.right  = MAX(all_struts.right,  strut.right);
		all_struts.top    = MAX(all_struts.top,    strut.top);
		all_struts.bottom = MAX(all_struts.bottom, strut.bottom);
	}

	for_monitors(j, m)
	{
		Monitor *p = &padded[j];

		// monitor left side of root window?
		if (all_struts.left > 0 && !m->x)
		{
			p->x += all_struts.left;
			p->w -= all_struts.left;
		}
		// monitor right side of root window?
		if (all_struts.right > 0 && m->x + m->w == screen_w)
		{
			p->w -= all_struts.right;
		}
		// monitor top side of root window?
		if (all_struts.top > 0 && !m->y)
		{
			p->y += all_struts.top;
			p->h -= all_struts.top;
		}
		// monitor bottom side of root window?
		if (all_struts.bottom > 0 && m->y + m->h == screen_h)
		{
			p->h -= all_struts.bottom;
		}
	}
	memmove(monitors, padded, sizeof(Monitor) * MONITORS);

	// if spot_start is CURRENT, first window needs somewhere to go
	current_spot = SPOT1;
	current_mon  = 0;

	// calculate spot boxes
	for_monitors(i, m)
	{
		int x = m->x, y = m->y, w = m->w, h = m->h;

		// determine spot layout for this monitor
		int spot1_align      = have_layout(i) ? settings.layouts[i].spot1_align      : LEFT ;
		int spot1_width_pct  = have_layout(i) ? settings.layouts[i].spot1_width_pct  : 66;
		int spot2_height_pct = have_layout(i) ? settings.layouts[i].spot2_height_pct : 66;

		// monitor rotated?
		if (m->w < m->h)
		{
			int height_spot1 = (double)h / 100 * MIN(90, MAX(10, spot1_width_pct));
			int width_spot2  = (double)w / 100 * MIN(90, MAX(10, spot2_height_pct));
			for_spots(j)
			{
				m->spots[j].x = x;
				m->spots[j].y = spot1_align == LEFT ? y: y + h - height_spot1;
				m->spots[j].w = w;
				m->spots[j].h = height_spot1;
				if (j == SPOT1) continue;

				m->spots[j].y = spot1_align == LEFT ? y + height_spot1 + GAP: y;
				m->spots[j].h = h - height_spot1 - GAP;
				m->spots[j].w = w - width_spot2 - GAP;
				if (j == SPOT3) continue;

				m->spots[j].x = x + w - width_spot2;
				m->spots[j].w = width_spot2;
			}
			continue;
		}
		// normal wide screen
		int width_spot1  = (double)w / 100 * MIN(90, MAX(10, spot1_width_pct));
		int height_spot2 = (double)h / 100 * MIN(90, MAX(10, spot2_height_pct));
		for_spots(j)
		{
			m->spots[j].x = spot1_align == LEFT ? x: x + w - width_spot1;
			m->spots[j].y = y;
			m->spots[j].w = width_spot1;
			m->spots[j].h = h;
			if (j == SPOT1) continue;

			m->spots[j].x = spot1_align == LEFT ? x + width_spot1 + GAP: x;
			m->spots[j].w = w - width_spot1 - GAP;
			m->spots[j].h = height_spot2;
			if (j == SPOT2) continue;

			m->spots[j].y = y + height_spot2 + GAP;
			m->spots[j].h = h - height_spot2 - GAP;
		}
	}

	// become the window manager
	XSelectInput(display, root, PropertyChangeMask | StructureNotifyMask | SubstructureRedirectMask | SubstructureNotifyMask);

	// ewmh support
	unsigned long pid = getpid();
	ewmh = XCreateSimpleWindow(display, root, 0, 0, 1, 1, 0, 0, 0);

	SETPROP_ATOM(root, atoms[_NET_SUPPORTED],           atoms, ATOMS);
	SETPROP_WIND(root, atoms[_NET_SUPPORTING_WM_CHECK], &ewmh,     1);
	SETPROP_LONG(ewmh, atoms[_NET_WM_PID],              &pid,      1);

	XChangeProperty(display, ewmh, atoms[_NET_WM_NAME], XA_STRING, 8, PropModeReplace, (const unsigned char*)"xoat", 4);

	// figure out NumlockMask
	XModifierKeymap *modmap = XGetModifierMapping(display);
	for (i = 0; i < 8; i++) for (j = 0; j < (int)modmap->max_keypermod; j++)
		if (modmap->modifiermap[i*modmap->max_keypermod+j] == XKeysymToKeycode(display, XK_Num_Lock))
			{ NumlockMask = (1<<i); break; }
	XFreeModifiermap(modmap);

	// process config.h key bindings
	for (i = 0; i < settings.binding_count; i++)
	{
		XGrabKey(display, XKeysymToKeycode(display, settings.bindings[i].key), settings.bindings[i].mod, root, True, GrabModeAsync, GrabModeAsync);
		if (settings.bindings[i].mod == AnyModifier) continue;

		XGrabKey(display, XKeysymToKeycode(display, settings.bindings[i].key), settings.bindings[i].mod|LockMask, root, True, GrabModeAsync, GrabModeAsync);
		XGrabKey(display, XKeysymToKeycode(display, settings.bindings[i].key), settings.bindings[i].mod|NumlockMask, root, True, GrabModeAsync, GrabModeAsync);
		XGrabKey(display, XKeysymToKeycode(display, settings.bindings[i].key), settings.bindings[i].mod|LockMask|NumlockMask, root, True, GrabModeAsync, GrabModeAsync);
	}

	// we grab buttons to do click-to-focus. all clicks get passed through to apps.
	XGrabButton(display, Button1, AnyModifier, root, True, ButtonPressMask, GrabModeSync, GrabModeSync, None, None);
	XGrabButton(display, Button3, AnyModifier, root, True, ButtonPressMask, GrabModeSync, GrabModeSync, None, None);

	// create title bars
	if (settings.title)
	{
		STACK_FREE(&windows);
		for_monitors(i, m) for_spots(j)
		{
			m->bars[j] = textbox_create(root, TB_AUTOHEIGHT|TB_LEFT, m->spots[j].x, m->spots[j].y, m->spots[j].w, 0,
				settings.title, settings.title_blur, settings.border_blur, NULL, NULL);
			XSelectInput(display, m->bars[j]->window, ExposureMask);

			m->spots[j].y += m->bars[j]->h;
			m->spots[j].h -= m->bars[j]->h;
			spot_update_bar(j, i);
		}
	}

	// setup existing managable windows
	STACK_FREE(&windows);
	for_windows(i, c) if (c->manage)
	{
		window_listen(c->window);
		client_update_border(c);
		client_place_spot(c, c->spot, c->monitor, 0);
		if (!current) client_activate(c);
	}

	// auto launch
	if (settings.launchcmd_count)
	{
		for (i = 0; i < settings.launchcmd_count; i++)
			exec_cmd(settings.launchcmds[i]);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
leaq 0x6373(%rip), %rbx      # 0xebc0
movl $0xd8, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3070
movq 0x634d(%rip), %rdi      # 0xebb0
movq 0xe8(%rdi), %rax
movslq 0xe0(%rdi), %rcx
shlq $0x7, %rcx
movl 0x18(%rax,%rcx), %ebp
movl 0x1c(%rax,%rcx), %r14d
movw %bp, 0x633f(%rip)       # 0xebc4
movw %r14w, 0x6339(%rip)     # 0xebc6
callq 0x34b0
testl %eax, %eax
je 0x88f3
movq 0x6313(%rip), %rdi      # 0xebb0
leaq 0x5ecc(%rip), %rsi      # 0xe770
callq 0x3040
testq %rax, %rax
je 0x88f3
movl 0x5ebc(%rip), %ecx      # 0xe770
cmpl $0x3, %ecx
pushq $0x3
popq %rsi
cmovll %ecx, %esi
movl %esi, 0x5ead(%rip)      # 0xe770
xorl %ecx, %ecx
testl %esi, %esi
cmovlel %ecx, %esi
movq %rax, %rdx
addq $0x4, %rdx
imulq $0x48, %rsi, %rsi
cmpq %rcx, %rsi
je 0x88eb
movq (%rdx), %rdi
movq %rdi, (%rcx,%rbx)
addq $0xc, %rdx
addq $0x48, %rcx
jmp 0x88d5
movq %rax, %rdi
callq 0x3050
movl %r14d, 0x48(%rsp)
movl %ebp, 0x4c(%rsp)
leaq 0x62bd(%rip), %rsi      # 0xebc0
leaq 0xb0(%rsp), %rdi
movl $0xd8, %edx
callq 0x36b0
callq 0x5607
xorl %ebx, %ebx
leaq 0x688d(%rip), %rbp      # 0xf1b0
leaq 0x688e(%rip), %r12      # 0xf1b8
leaq 0x50(%rsp), %r15
movq $0x0, 0x40(%rsp)
movq $0x0, 0x30(%rsp)
movq $0x0, 0x38(%rsp)
movq $0x0, 0x28(%rsp)
movswq 0x6445(%rip), %rax      # 0xeda0
cmpq %rax, %rbx
jge 0x8ab8
leaq 0x6435(%rip), %rax      # 0xeda0
movq 0x8(%rax,%rbx,8), %r14
testq %r14, %r14
je 0x8ab0
pxor %xmm0, %xmm0
movdqa %xmm0, 0xa0(%rsp)
movdqa %xmm0, 0x90(%rsp)
movdqa %xmm0, 0x80(%rsp)
movdqa %xmm0, 0x70(%rsp)
movdqa %xmm0, 0x60(%rsp)
movdqa %xmm0, 0x50(%rsp)
movq (%r14), %rdi
movq 0x6354(%rip), %rsi      # 0xed08
movq %rbp, %rdx
movq %r12, %rcx
movq %r15, %r8
pushq $0x60
popq %r9
callq 0x5324
testl %eax, %eax
setne %al
cmpq $0x6, 0x67dd(%rip)      # 0xf1b0
sete %cl
cmpl $0x0, 0x67db(%rip)      # 0xf1b8
setne %r13b
andb %cl, %r13b
andb %al, %r13b
je 0x89ed
xorl %eax, %eax
jmp 0x8a27
movq (%r14), %rdi
movq 0x6309(%rip), %rsi      # 0xed00
movq %rbp, %rdx
movq %r12, %rcx
movq %r15, %r8
pushq $0x20
popq %r9
callq 0x5324
testl %eax, %eax
setne %cl
cmpq $0x6, 0x679a(%rip)      # 0xf1b0
sete %dl
cmpl $0x0, 0x6798(%rip)      # 0xf1b8
setne %al
andb %dl, %al
andb %cl, %al
cmpw $0x0, 0x102(%r14)
je 0x8a9d
orb %al, %r13b
leaq 0x50(%rsp), %r15
leaq 0x676f(%rip), %rbp      # 0xf1b0
je 0x8aa9
movq 0x50(%rsp), %rax
movq 0x28(%rsp), %rcx
cmpq %rax, %rcx
cmovleq %rax, %rcx
movq %rcx, 0x28(%rsp)
movq 0x58(%rsp), %rax
movq 0x38(%rsp), %rcx
cmpq %rax, %rcx
cmovleq %rax, %rcx
movq %rcx, 0x38(%rsp)
movq 0x60(%rsp), %rax
movq 0x30(%rsp), %rcx
cmpq %rax, %rcx
cmovleq %rax, %rcx
movq %rcx, 0x30(%rsp)
movq 0x68(%rsp), %rax
movq 0x40(%rsp), %rcx
cmpq %rax, %rcx
cmovleq %rax, %rcx
movq %rcx, 0x40(%rsp)
jmp 0x8aa9
leaq 0x50(%rsp), %r15
leaq 0x6707(%rip), %rbp      # 0xf1b0
leaq 0x6708(%rip), %r12      # 0xf1b8
incq %rbx
jmp 0x8953
movl 0x5cb2(%rip), %ebx      # 0xe770
xorl %eax, %eax
testl %ebx, %ebx
cmovlel %eax, %ebx
imulq $0x48, %rbx, %rcx
leaq 0x60f0(%rip), %rdi      # 0xebc0
movl 0x4c(%rsp), %r8d
movl 0x48(%rsp), %r9d
movq 0x40(%rsp), %r10
movq 0x38(%rsp), %r11
movq 0x30(%rsp), %r14
movq 0x28(%rsp), %r15
cmpq %rax, %rcx
je 0x8b7a
testq %r15, %r15
jle 0x8b15
cmpw $0x0, (%rax,%rdi)
jne 0x8b15
addw %r15w, 0xb0(%rsp,%rax)
subw %r15w, 0xb4(%rsp,%rax)
testq %r11, %r11
jle 0x8b33
movswl (%rax,%rdi), %edx
movswl 0x4(%rax,%rdi), %esi
addl %edx, %esi
cmpl %r8d, %esi
jne 0x8b33
subw %r11w, 0xb4(%rsp,%rax)
testq %r14, %r14
jle 0x8b52
cmpw $0x0, 0x2(%rax,%rdi)
jne 0x8b52
addw %r14w, 0xb2(%rsp,%rax)
subw %r14w, 0xb6(%rsp,%rax)
testq %r10, %r10
jle 0x8b71
movswl 0x2(%rax,%rdi), %edx
movswl 0x6(%rax,%rdi), %esi
addl %edx, %esi
cmpl %r9d, %esi
jne 0x8b71
subw %r10w, 0xb6(%rsp,%rax)
addq $0x48, %rax
jmp 0x8aee
leaq 0xb0(%rsp), %rsi
movl $0xd8, %edx
callq 0x36b0
andw $0x0, 0x66b6(%rip)      # 0xf24a
movw $0x1, 0x66ab(%rip)      # 0xf248
movl 0x666d(%rip), %eax      # 0xf210
movq 0x666e(%rip), %rcx      # 0xf218
leaq 0x6025(%rip), %rdx      # 0xebd6
xorl %esi, %esi
movdqa 0x1505(%rip), %xmm0     # 0xa0c0
movdqa 0x150d(%rip), %xmm1     # 0xa0d0
movdqa 0x1515(%rip), %xmm2     # 0xa0e0
movapd 0x151d(%rip), %xmm3     # 0xa0f0
pcmpeqd %xmm4, %xmm4
movsd 0x1531(%rip), %xmm5     # 0xa110
cmpq %rbx, %rsi
je 0x8dd7
movb $0x1, %r15b
movdqa %xmm0, %xmm6
cmpq %rax, %rsi
jae 0x8c0e
cmpw $0x1, 0x2(%rcx,%rsi,8)
sete %r15b
movd 0x4(%rcx,%rsi,8), %xmm6
pshuflw $0x60, %xmm6, %xmm6     # xmm6 = xmm6[0,0,2,1,4,5,6,7]
psrad $0x10, %xmm6
imulq $0x48, %rsi, %rdi
leaq 0x5fa7(%rip), %r9       # 0xebc0
movzwl (%rdi,%r9), %r11d
movzwl 0x2(%rdi,%r9), %r8d
movzwl %r11w, %r10d
movl 0x4(%rdi,%r9), %ebp
movl %ebp, %edi
shrl $0x10, %edi
movzwl %bp, %r9d
movdqa %xmm6, %xmm7
pcmpgtd %xmm1, %xmm7
pand %xmm7, %xmm6
pandn %xmm1, %xmm7
por %xmm6, %xmm7
movdqa %xmm2, %xmm6
pcmpgtd %xmm7, %xmm6
pand %xmm6, %xmm7
pandn %xmm2, %xmm6
por %xmm7, %xmm6
cvtdq2pd %xmm6, %xmm6
cmpw %di, %r9w
jge 0x8d1f
movzwl %r8w, %r14d
movd %ebp, %xmm7
shufpd $0x1, %xmm6, %xmm6      # xmm6 = xmm6[1,0]
pshuflw $0x60, %xmm7, %xmm8     # xmm8 = xmm7[0,0,2,1,4,5,6,7]
psrad $0x10, %xmm8
cvtdq2pd %xmm8, %xmm8
addl %r14d, %edi
divpd %xmm3, %xmm8
mulpd %xmm6, %xmm8
cvttpd2dq %xmm8, %xmm6
pshufd $0x55, %xmm6, %xmm8     # xmm8 = xmm6[1,1,1,1]
movd %xmm8, %r14d
subl %r14d, %edi
testb %r15b, %r15b
cmovnel %r8d, %edi
movd %xmm6, %r15d
pshuflw $0xe8, %xmm6, %xmm6     # xmm6 = xmm6[0,2,2,3,4,5,6,7]
pxor %xmm4, %xmm6
leal 0x1(%r8,%r14), %r12d
cmovel %r8d, %r12d
paddw %xmm7, %xmm6
addl %r10d, %r9d
subl %r15d, %r9d
xorl %r8d, %r8d
cmpq $0x3, %r8
je 0x8dcb
movw %r11w, -0x6(%rdx,%r8,8)
movw %di, -0x4(%rdx,%r8,8)
movw %bp, -0x2(%rdx,%r8,8)
movw %r14w, (%rdx,%r8,8)
testq %r8, %r8
je 0x8d1a
movw %r12w, -0x4(%rdx,%r8,8)
movd %xmm6, -0x2(%rdx,%r8,8)
cmpq $0x2, %r8
je 0x8d1a
movw %r9w, -0x6(%rdx,%r8,8)
movw %r15w, -0x2(%rdx,%r8,8)
incq %r8
jmp 0x8cd5
movswl %r9w, %r11d
cvtsi2sd %r11d, %xmm7
divsd %xmm5, %xmm7
mulsd %xmm6, %xmm7
cvttsd2si %xmm7, %r11d
movswl %di, %ebp
cvtsi2sd %ebp, %xmm7
divsd %xmm5, %xmm7
unpckhpd %xmm6, %xmm6            # xmm6 = xmm6[1,1]
mulsd %xmm7, %xmm6
cvttsd2si %xmm6, %r14d
movl %r9d, %ebp
addl %r10d, %ebp
subl %r11d, %ebp
testb %r15b, %r15b
cmovnel %r10d, %ebp
leal 0x1(%r10,%r11), %r15d
cmovel %r10d, %r15d
movl %r11d, %r10d
notl %r10d
addl %r9d, %r10d
leal (%r8,%r14), %r9d
incl %r9d
movl %r14d, %r12d
notl %r12d
addl %edi, %r12d
xorl %r13d, %r13d
cmpq $0x3, %r13
je 0x8dcb
movw %bp, -0x6(%rdx,%r13,8)
movw %r8w, -0x4(%rdx,%r13,8)
movw %r11w, -0x2(%rdx,%r13,8)
movw %di, (%rdx,%r13,8)
testq %r13, %r13
je 0x8dc6
movw %r15w, -0x6(%rdx,%r13,8)
movw %r10w, -0x2(%rdx,%r13,8)
movw %r14w, (%rdx,%r13,8)
cmpq $0x1, %r13
je 0x8dc6
movw %r9w, -0x4(%rdx,%r13,8)
movw %r12w, (%rdx,%r13,8)
incq %r13
jmp 0x8d82
incq %rsi
addq $0x48, %rdx
jmp 0x8bdf
movq 0x5dd2(%rip), %rdi      # 0xebb0
movq 0x63c3(%rip), %rsi      # 0xf1a8
movl $0x5a0000, %edx         # imm = 0x5A0000
callq 0x33e0
callq 0x31f0
cltq
movq %rax, 0x50(%rsp)
movq 0x5dae(%rip), %rdi      # 0xebb0
movq 0x639f(%rip), %rsi      # 0xf1a8
pxor %xmm0, %xmm0
movdqu %xmm0, 0x8(%rsp)
andl $0x0, (%rsp)
xorl %r14d, %r14d
pushq $0x1
popq %rbp
xorl %edx, %edx
xorl %ecx, %ecx
movl %ebp, %r8d
movl %ebp, %r9d
callq 0x31e0
movq %rax, 0x6425(%rip)      # 0xf258
leaq 0x641e(%rip), %rbx      # 0xf258
movq 0x5d6f(%rip), %rdi      # 0xebb0
movq 0x6360(%rip), %rsi      # 0xf1a8
movq 0x5e71(%rip), %rdx      # 0xecc0
leaq 0x5e4a(%rip), %rax      # 0xeca0
movq %rax, (%rsp)
movl $0x1f, 0x8(%rsp)
pushq $0x4
popq %rcx
pushq $0x20
popq %r15
movl %r15d, %r8d
xorl %r9d, %r9d
callq 0x35d0
movq 0x5d35(%rip), %rdi      # 0xebb0
movq 0x6326(%rip), %rsi      # 0xf1a8
movq 0x5e5f(%rip), %rdx      # 0xece8
movl %ebp, 0x8(%rsp)
movq %rbx, (%rsp)
pushq $0x21
popq %rcx
movl %r15d, %r8d
xorl %r9d, %r9d
callq 0x35d0
movq 0x5d0a(%rip), %rdi      # 0xebb0
movq 0x63ab(%rip), %rsi      # 0xf258
movq 0x5e44(%rip), %rdx      # 0xecf8
movl %ebp, 0x8(%rsp)
leaq 0x50(%rsp), %rax
movq %rax, (%rsp)
pushq $0x6
popq %rcx
movl %r15d, %r8d
xorl %r9d, %r9d
callq 0x35d0
movq 0x5cda(%rip), %rdi      # 0xebb0
movq 0x637b(%rip), %rsi      # 0xf258
movq 0x5e0c(%rip), %rdx      # 0xecf0
leaq 0x1c45(%rip), %rax      # 0xab30
movq %rax, (%rsp)
movl $0x4, 0x8(%rsp)
pushq $0x1f
popq %rcx
pushq $0x8
popq %r8
xorl %r9d, %r9d
callq 0x35d0
movq 0x5ca3(%rip), %rdi      # 0xebb0
callq 0x3530
movq %rax, %rbx
cmpl $0x8, %r14d
je 0x8f61
xorl %r15d, %r15d
movl (%rbx), %eax
cmpl %eax, %r15d
jge 0x8f5c
movq 0x8(%rbx), %rcx
imull %r14d, %eax
addl %r15d, %eax
cltq
movb (%rcx,%rax), %r12b
movq 0x5c73(%rip), %rdi      # 0xebb0
movl $0xff7f, %esi           # imm = 0xFF7F
callq 0x3590
incl %r15d
cmpb %al, %r12b
jne 0x8f1e
movl %ebp, %eax
movl %r14d, %ecx
shll %cl, %eax
movl %eax, 0x62f0(%rip)      # 0xf24c
incl %r14d
jmp 0x8f15
movq %rbx, %rdi
callq 0x3130
xorl %r14d, %r14d
xorl %r15d, %r15d
movl 0x62ab(%rip), %eax      # 0xf220
movq 0x5c34(%rip), %rbx      # 0xebb0
cmpq %rax, %r15
jae 0x90b2
movq 0x629c(%rip), %rax      # 0xf228
movq 0x8(%rax,%r14), %rsi
movq %rbx, %rdi
callq 0x3590
movzbl %al, %esi
movq 0x6285(%rip), %rax      # 0xf228
movl (%rax,%r14), %edx
movq 0x61fa(%rip), %rcx      # 0xf1a8
movl $0x1, (%rsp)
movq %rbx, %rdi
movl %ebp, %r8d
movl %ebp, %r9d
callq 0x35e0
movq 0x625e(%rip), %rax      # 0xf228
cmpl $0x8000, (%rax,%r14)    # imm = 0x8000
je 0x90a6
movq 0x5bd1(%rip), %rbx      # 0xebb0
movq 0x8(%rax,%r14), %rsi
movq %rbx, %rdi
callq 0x3590
movzbl %al, %esi
movq 0x6232(%rip), %rax      # 0xf228
movl (%rax,%r14), %edx
orl $0x2, %edx
movq 0x61a4(%rip), %rcx      # 0xf1a8
movl %ebp, (%rsp)
movq %rbx, %rdi
movl %ebp, %r8d
movl %ebp, %r9d
callq 0x35e0
movq 0x5b94(%rip), %rbx      # 0xebb0
movq 0x6205(%rip), %rax      # 0xf228
movq 0x8(%rax,%r14), %rsi
movq %rbx, %rdi
callq 0x3590
movzbl %al, %esi
movq 0x61ee(%rip), %rax      # 0xf228
movl 0x620c(%rip), %edx      # 0xf24c
orl (%rax,%r14), %edx
movq 0x615d(%rip), %rcx      # 0xf1a8
movl %ebp, (%rsp)
movq %rbx, %rdi
movl %ebp, %r8d
movl %ebp, %r9d
callq 0x35e0
movq 0x5b4d(%rip), %rbx      # 0xebb0
movq 0x61be(%rip), %rax      # 0xf228
movq 0x8(%rax,%r14), %rsi
movq %rbx, %rdi
callq 0x3590
movzbl %al, %esi
movq 0x61a7(%rip), %rax      # 0xf228
movl (%rax,%r14), %edx
orl 0x61c1(%rip), %edx      # 0xf24c
orl $0x2, %edx
movq 0x6113(%rip), %rcx      # 0xf1a8
movl %ebp, (%rsp)
movq %rbx, %rdi
movl %ebp, %r8d
movl %ebp, %r9d
callq 0x35e0
incq %r15
addq $0x28, %r14
jmp 0x8f6f
movq 0x60ef(%rip), %rcx      # 0xf1a8
pxor %xmm0, %xmm0
movdqu %xmm0, 0x10(%rsp)
andl $0x0, 0x8(%rsp)
andl $0x0, (%rsp)
pushq $0x1
popq %rbp
pushq $0x4
popq %r14
movq %rbx, %rdi
movl %ebp, %esi
movl $0x8000, %edx           # imm = 0x8000
movl %ebp, %r8d
movl %r14d, %r9d
callq 0x35b0
movq 0x5ac1(%rip), %rdi      # 0xebb0
movq 0x60b2(%rip), %rcx      # 0xf1a8
pxor %xmm0, %xmm0
movdqu %xmm0, 0x10(%rsp)
andl $0x0, 0x8(%rsp)
andl $0x0, (%rsp)
pushq $0x3
popq %rsi
movl $0x8000, %edx           # imm = 0x8000
movl %ebp, %r8d
movl %r14d, %r9d
callq 0x35b0
cmpq $0x0, 0x60c4(%rip)      # 0xf1e8
leaq 0x5c75(%rip), %r13      # 0xeda0
je 0x922e
movzwl 0x5c68(%rip), %eax      # 0xeda0
testw %ax, %ax
je 0x9156
decl %eax
movw %ax, 0x5c5a(%rip)       # 0xeda0
movswq %ax, %rax
movq 0x8(%r13,%rax,8), %rdi
callq 0x5dae
jmp 0x9131
leaq 0x5a93(%rip), %r14      # 0xebf0
xorl %ebx, %ebx
pushq $-0x3
popq %r15
movslq 0x5606(%rip), %rax      # 0xe770
cmpq %rax, %rbx
jge 0x922e
movq %r15, %r12
testq %r12, %r12
je 0x920b
movq 0x6022(%rip), %rdi      # 0xf1a8
movswl -0x8(%r14,%r12,8), %edx
movswl -0x6(%r14,%r12,8), %ecx
movswl -0x4(%r14,%r12,8), %r8d
movdqu 0x6048(%rip), %xmm0     # 0xf1e8
movq 0x6021(%rip), %rax      # 0xf1c8
pxor %xmm1, %xmm1
movdqu %xmm1, 0x18(%rsp)
movq %rax, 0x10(%rsp)
movdqu %xmm0, (%rsp)
movl $0x10001, %esi          # imm = 0x10001
xorl %r9d, %r9d
callq 0x3a28
movq %rax, 0x18(%r14,%r12,8)
movq 0x59dc(%rip), %rdi      # 0xebb0
movq 0x8(%rax), %rsi
movl $0x8000, %edx           # imm = 0x8000
callq 0x33e0
movq 0x18(%r14,%r12,8), %rax
movzwl 0x1e(%rax), %eax
addw %ax, -0x6(%r14,%r12,8)
subw %ax, -0x2(%r14,%r12,8)
leal 0x4(%r12), %edi
movl %ebx, %esi
callq 0x6c0c
incq %r12
jmp 0x9176
incq %rbx
addq $0x48, %r14
jmp 0x9163
decl %eax
movw %ax, 0x5b80(%rip)       # 0xeda0
movswq %ax, %rax
movq 0x8(%r13,%rax,8), %rdi
callq 0x5dae
movzwl 0x5b6b(%rip), %eax      # 0xeda0
testw %ax, %ax
jne 0x9217
callq 0x5607
xorl %r14d, %r14d
movswq 0x5b56(%rip), %rax      # 0xeda0
cmpq %rax, %r14
jge 0x92a1
movq 0x8(%r13,%r14,8), %rbx
testq %rbx, %rbx
je 0x929c
cmpw $0x0, 0x104(%rbx)
je 0x929c
movq (%rbx), %rdi
callq 0x55f3
movq %rbx, %rdi
callq 0x5f9b
movl 0x118(%rbx), %esi
movswl 0x100(%rbx), %edx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x60e9
cmpq $0x0, 0x5926(%rip)      # 0xebb8
jne 0x929c
movq %rbx, %rdi
callq 0x6809
incq %r14
jmp 0x9242
movl 0x5f89(%rip), %eax      # 0xf230
testl %eax, %eax
je 0x92cf
xorl %ebx, %ebx
movl %eax, %eax
cmpq %rax, %rbx
jae 0x92cf
movq 0x5f7d(%rip), %rax      # 0xf238
movq (%rax,%rbx,8), %rdi
callq 0x4ef3
incq %rbx
movl 0x5f63(%rip), %eax      # 0xf230
jmp 0x92ad
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq