// File: /workspace/github_c_makefile_star2_O2/seanpringle[P]xoat/./config.c
// Function: configure
void
configure()
{
	unsigned int i;
	FILE *file = NULL;
	char tmp[1024];
	const char *home = getenv("HOME");

	regex_cache_init();

	settings.border         = BORDER;
	settings.border_blur    = strdup(BORDER_BLUR);
	settings.border_focus   = strdup(BORDER_FOCUS);
	settings.border_urgent  = strdup(BORDER_URGENT);
	settings.gap            = GAP;
	settings.title          = TITLE ? strdup(TITLE): NULL;
	settings.title_blur     = strdup(TITLE_BLUR);
	settings.title_focus    = strdup(TITLE_FOCUS);
	settings.title_ellipsis = TITLE_ELLIPSIS;
	settings.menu           = strdup(MENU);

	settings.layout_count = sizeof(layouts) / sizeof(Layout);
	settings.layouts = calloc(settings.layout_count, sizeof(Layout));

	for (i = 0; i < settings.layout_count; i++)
		memmove(&settings.layouts[i], &layouts[i], sizeof(Layout));

	settings.binding_count = sizeof(keys) / sizeof(Binding);
	settings.bindings = calloc(settings.binding_count, sizeof(Binding));

	settings.launchcmd_count = 0;
	settings.launchcmds = calloc(1, sizeof(char*));

	for (i = 0; i < settings.binding_count; i++)
		memmove(&settings.bindings[i], &keys[i], sizeof(Binding));

	snprintf(tmp, sizeof(tmp), "%s/.xoatrc", home);

	if (home && (file = fopen(tmp, "r")) && file)
	{
		while (fgets(tmp, sizeof(tmp), file))
		{
			if (regex_match("^[[:space:]]*(" CONFIG_UINT_NAMES ")[[:space:]]+([0-9]+)", tmp))
			{
				unsigned n = strtoul(regex_matches[2], NULL, 10);

				char *names[] = {
					CONFIG_BORDER,
					CONFIG_GAP,
					CONFIG_TITLE_ELLIPSIS,
				};
				unsigned int *values[] = {
					&settings.border,
					&settings.gap,
					&settings.title_ellipsis,
				};
				for (i = 0; i < sizeof(names) / sizeof(char*); i++)
				{
					if (strcmp(regex_matches[1], names[i]) == 0)
					{
						fprintf(stderr, "set [%s] to [%u]\n", names[i], n);
						*(values[i]) = n;
						break;
					}
				}
			}
			else
			if (regex_match("^[[:space:]]*(" CONFIG_STR_NAMES ")[[:space:]]+(.+)", tmp))
			{
				rtrim(regex_matches[2]);

				char *names[] = {
					CONFIG_BORDER_BLUR,
					CONFIG_BORDER_FOCUS,
					CONFIG_BORDER_URGENT,
					CONFIG_TITLE,
					CONFIG_TITLE_BLUR,
					CONFIG_TITLE_FOCUS,
					CONFIG_MENU,
				};
				char **values[] = {
					&settings.border_blur,
					&settings.border_focus,
					&settings.border_urgent,
					&settings.title,
					&settings.title_blur,
					&settings.title_focus,
					&settings.menu,
				};
				for (i = 0; i < sizeof(names) / sizeof(char*); i++)
				{
					if (strcmp(regex_matches[1], names[i]) == 0)
					{
						fprintf(stderr, "set [%s] to [%s]\n", names[i], regex_matches[2]);
						free(*(values[i]));
						*(values[i]) = strdup(regex_matches[2]);
						break;
					}
				}
			}
			else
			if (regex_match("^[[:space:]]*(layouts)[[:space:]]+([1-9])", tmp))
			{
				unsigned int n = strtoul(regex_matches[2], NULL, 10);
				fprintf(stderr, "using [%u] monitor layout%s\n", n, n > 1 ? "s":"");

				free(settings.layouts);
				settings.layout_count = n;
				settings.layouts = calloc(settings.layout_count, sizeof(Layout));

				for (i = 0; i < settings.layout_count && i < sizeof(layouts) / sizeof(Layout); i++)
					memmove(&settings.layouts[i], &layouts[i], sizeof(Layout));
			}
			else
			if (regex_match("^[[:space:]]*layout[[:space:]]([0-9])(.+)", tmp))
			{
				unsigned int n = strtoul(regex_matches[1], NULL, 10);
				if (!have_layout(n))
				{
					for (i = settings.layout_count; i < n+1; i++)
					{
						settings.layout_count++;
						settings.layouts = realloc(settings.layouts, sizeof(Layout) * settings.layout_count);
						memmove(&settings.layouts[i], &settings.layouts[0], sizeof(Layout));
						fprintf(stderr, "creating layout [%u]\n", i);
					}
				}

				snprintf(tmp, sizeof(tmp), "%s", regex_matches[2]);

				if (regex_match("^[[:space:]]spot_start[[:space:]]+(smart|current|spot1|spot2|spot3)", tmp))
				{
					char *names[] = {
						"smart",
						"current",
						"spot1",
						"spot2",
						"spot3",
					};
					short values[] = {
						SMART,
						CURRENT,
						SPOT1,
						SPOT2,
						SPOT3,
					};
					for (i = 0; i < sizeof(names) / sizeof(char*); i++)
					{
						if (strcmp(regex_matches[1], names[i]) == 0)
						{
							fprintf(stderr, "layout [%u] spot_start [%s]\n", n, regex_matches[1]);
							settings.layouts[n].spot_start = values[i];
							break;
						}
					}
				}
				else
				if (regex_match("^[[:space:]]spot1_align[[:space:]]+(left|right)", tmp))
				{
					char *names[] = {
						"left",
						"right",
					};
					short values[] = {
						LEFT,
						RIGHT,
					};
					for (i = 0; i < sizeof(names) / sizeof(char*); i++)
					{
						if (strcmp(regex_matches[1], names[i]) == 0)
						{
							fprintf(stderr, "layout [%u] spot1_align [%s]\n", n, regex_matches[1]);
							settings.layouts[n].spot1_align = values[i];
							break;
						}
					}
				}
				else
				if (regex_match("^[[:space:]]spot1_width_pct[[:space:]]+([0-9]+)", tmp))
				{
					unsigned int w = strtoul(regex_matches[1], NULL, 10);
					if (w < 50 || w > 90)
					{
						fprintf(stderr, "layout [%u] spot1_width_pct out of bounds [%u]!\n", n, w);
						continue;
					}
					fprintf(stderr, "layout [%u] spot1_width_pct [%u%%]\n", n, w);
					settings.layouts[n].spot1_width_pct = w;
				}
				else
				if (regex_match("^[[:space:]]spot2_height_pct[[:space:]]+([0-9]+)", tmp))
				{
					unsigned int h = strtoul(regex_matches[1], NULL, 10);
					if (h < 50 || h > 90)
					{
						fprintf(stderr, "layout [%u] spot2_height_pct out of bounds [%u]!\n", n, h);
						continue;
					}
					fprintf(stderr, "layout [%u] spot2_height_pct [%u%%]\n", n, h);
					settings.layouts[n].spot2_height_pct = h;
				}
			}
			else
			if (regex_match("^[[:space:]]*bind[[:space:]]+([^[:space:]]+)[[:space:]]+(" CONFIG_ACTIONS ")(.*)", tmp))
			{
				unsigned int modifier = 0;
				char *str = regex_matches[1];
				fprintf(stderr, "binding");

				while (*str)
				{
					if ((strncmp(str, "Mod1" , 4)) == 0)
					{
						modifier |= Mod1Mask;
						fprintf(stderr, " [Mod1]");
						str += 4;
					}
					else
					if ((strncmp(str, "Mod2" , 4)) == 0)
					{
						modifier |= Mod2Mask;
						fprintf(stderr, " [Mod2]");
						str += 4;
					}
					else
					if ((strncmp(str, "Mod3" , 4)) == 0)
					{
						modifier |= Mod3Mask;
						fprintf(stderr, " [Mod3]");
						str += 4;
					}
					else
					if ((strncmp(str, "Mod4" , 4)) == 0)
					{
						modifier |= Mod4Mask;
						fprintf(stderr, " [Mod4]");
						str += 4;
					}
					else
					if ((strncmp(str, "Mod5" , 4)) == 0)
					{
						modifier |= Mod5Mask;
						fprintf(stderr, " [Mod5]");
						str += 4;
					}
					else
					if ((strncmp(str, "Shift", 5)) == 0)
					{
						modifier |= ShiftMask;
						fprintf(stderr, " [Shift]");
						str += 5;
					}
					else
					if ((strncmp(str, "Control", 7)) == 0)
					{
						modifier |= ControlMask;
						fprintf(stderr, " [Control]");
						str += 7;
					}
					else
					{
						break;
					}
					while (*str == '+') str++;
				}

				if (modifier == 0)
				{
					fprintf(stderr, " AnyModifier");
					modifier = AnyModifier;
				}

				if (!*str)
				{
					fprintf(stderr, " malformed key binding [%s]\n", regex_matches[1]);
					continue;
				}

				KeySym keysym = strncmp("0x", str, 2) == 0 ? strtoul(str, NULL, 16): XStringToKeysym(str);

				if (keysym == NoSymbol)
				{
					fprintf(stderr, " unknown key symbol [%s]\n", str);
					continue;
				}

				fprintf(stderr, " [%s]", str);

				int num = 0;
				char *data = NULL;
				void *action = NULL;
				trim(regex_matches[3]);

				char *names[] = {
					"action_move",
					"action_focus",
					"action_move_direction",
					"action_focus_direction",
					"action_close",
					"action_cycle",
					"action_raise_nth",
					"action_command",
					"action_find_or_start",
					"action_move_monitor",
					"action_focus_monitor",
					"action_fullscreen",
					"action_maximize_vert",
					"action_maximize_horz",
					"action_maximize",
					"action_above",
					"action_menu",
				};
				void *actions[] = {
					action_move,
					action_focus,
					action_move_direction,
					action_focus_direction,
					action_close,
					action_cycle,
					action_raise_nth,
					action_command,
					action_find_or_start,
					action_move_monitor,
					action_focus_monitor,
					action_fullscreen,
					action_maximize_vert,
					action_maximize_horz,
					action_maximize,
					action_above,
					action_menu,
				};
				for (i = 0; i < sizeof(names) / sizeof(char*); i++)
				{
					if (strcmp(names[i], regex_matches[2]) == 0)
					{
						action = actions[i];
						fprintf(stderr, " to [%s %s]\n", regex_matches[2], regex_matches[3]);
						break;
					}
				}
				if ((0 == strcmp(regex_matches[2], "action_move")) || 0 == strcmp(regex_matches[2], "action_focus"))
				{
					if (strcmp(regex_matches[3], "spot1") == 0) num = SPOT1;
					if (strcmp(regex_matches[3], "spot2") == 0) num = SPOT2;
					if (strcmp(regex_matches[3], "spot3") == 0) num = SPOT3;
				}
				else
				if (0 == strcmp(regex_matches[2], "action_move_direction") || 0 == strcmp(regex_matches[2], "action_focus_direction") || 0 == strcmp(regex_matches[2], "action_move_monitor") || 0 == strcmp(regex_matches[2], "action_focus_monitor"))
				{
					if (strcmp(regex_matches[3], "left" ) == 0) num = LEFT;
					if (strcmp(regex_matches[3], "right") == 0) num = RIGHT;
					if (strcmp(regex_matches[3], "up"   ) == 0) num = UP;
					if (strcmp(regex_matches[3], "down" ) == 0) num = DOWN;
				}
				else
				if (0 == strcmp(regex_matches[2], "action_command") || 0 == strcmp(regex_matches[2], "action_find_or_start"))
				{
					data = regex_matches[3];
				}
				else
				if (0 == strcmp(regex_matches[2], "action_raise_nth"))
				{
					num = strtol(regex_matches[3], NULL, 10);
				}
				for (i = 0; i < settings.binding_count; i++)
				{
					if (settings.bindings[i].mod == modifier && settings.bindings[i].key == keysym)
					{
						settings.bindings[i].act  = action;
						settings.bindings[i].data = data ? strdup(data): NULL;
						settings.bindings[i].num  = num;
						break;
					}
				}
				if (i == settings.binding_count)
				{
					settings.binding_count++;
					settings.bindings = realloc(settings.bindings, sizeof(Binding) * settings.binding_count);
					settings.bindings[i].mod  = modifier;
					settings.bindings[i].key  = keysym;
					settings.bindings[i].act  = action;
					settings.bindings[i].data = data ? strdup(data): NULL;
					settings.bindings[i].num  = num;
				}
			}
			else
			if (regex_match("^launch[[:space:]]+(.+)$", tmp))
			{
				rtrim(regex_matches[1]);

				settings.launchcmd_count++;
				settings.launchcmds = realloc(settings.launchcmds, sizeof(char*) * settings.launchcmd_count);
				settings.launchcmds[settings.launchcmd_count-1] = strdup(regex_matches[1]);
				fprintf(stderr, "launching [%s]\n", regex_matches[1]);
			}
		}
		fclose(file);

		regex_cache_empty();

		if (settings.title && strcmp(settings.title, "null") == 0)
		{
			free(settings.title);
			settings.title = NULL;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x438, %rsp            # imm = 0x438
leaq 0x28b1(%rip), %rdi      # 0xa3e1
callq 0x33d0
movq %rax, %rbx
leaq 0x6d71(%rip), %rdi      # 0xe8b0
xorl %r15d, %r15d
movl $0x2c0, %edx            # imm = 0x2C0
xorl %esi, %esi
callq 0x3070
pushq $0x1
popq %rbp
movl %ebp, 0x7669(%rip)      # 0xf1c0
leaq 0x2888(%rip), %rdi      # 0xa3e6
callq 0x3430
movq %rax, 0x765e(%rip)      # 0xf1c8
leaq 0x287f(%rip), %rdi      # 0xa3f0
callq 0x3430
movq %rax, 0x7653(%rip)      # 0xf1d0
leaq 0x2877(%rip), %rdi      # 0xa3fb
callq 0x3430
movq %rax, 0x7648(%rip)      # 0xf1d8
movl %ebp, 0x764a(%rip)      # 0xf1e0
leaq 0x2862(%rip), %r14      # 0xa3ff
movq %r14, %rdi
callq 0x3430
movq %rax, 0x763c(%rip)      # 0xf1e8
leaq 0x2858(%rip), %rdi      # 0xa40b
callq 0x3430
movq %rax, 0x7631(%rip)      # 0xf1f0
leaq 0x284b(%rip), %rdi      # 0xa411
callq 0x3430
movq %rax, 0x7626(%rip)      # 0xf1f8
movl $0x20, 0x7624(%rip)     # 0xf200
movq %r14, %rdi
callq 0x3430
movq %rax, 0x761d(%rip)      # 0xf208
movl $0x3, 0x761b(%rip)      # 0xf210
pushq $0x3
popq %rdi
pushq $0x8
popq %rsi
callq 0x3500
movq %rax, 0x7611(%rip)      # 0xf218
pushq $0x3
popq %rcx
leaq 0x686f(%rip), %rax      # 0xe480
movl %ecx, %ecx
cmpq %rcx, %r15
jae 0x7c35
movq 0x75f9(%rip), %rcx      # 0xf218
movq (%rax), %rdx
movq %rdx, (%rcx,%r15,8)
incq %r15
movl 0x75e1(%rip), %ecx      # 0xf210
addq $0x8, %rax
jmp 0x7c11
movl $0x12, 0x75e1(%rip)     # 0xf220
pushq $0x12
popq %rdi
pushq $0x28
popq %rsi
callq 0x3500
movq %rax, 0x75d7(%rip)      # 0xf228
andl $0x0, 0x75d8(%rip)      # 0xf230
pushq $0x1
popq %rdi
pushq $0x8
popq %rsi
callq 0x3500
movq %rax, 0x75ce(%rip)      # 0xf238
pushq $0x12
popq %rsi
xorl %eax, %eax
leaq 0x682a(%rip), %rcx      # 0xe4a0
xorl %edx, %edx
movl %esi, %esi
cmpq %rsi, %rdx
jae 0x7cb1
movq 0x75a2(%rip), %rsi      # 0xf228
movups (%rax,%rcx), %xmm0
movups 0x10(%rax,%rcx), %xmm1
movq 0x20(%rax,%rcx), %rdi
movq %rdi, 0x20(%rsi,%rax)
movups %xmm1, 0x10(%rsi,%rax)
movups %xmm0, (%rsi,%rax)
incq %rdx
movl 0x7575(%rip), %esi      # 0xf220
addq $0x28, %rax
jmp 0x7c78
leaq 0x275f(%rip), %rdx      # 0xa417
leaq 0x30(%rsp), %rdi
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3080
testq %rbx, %rbx
je 0x8823
leaq 0x2788(%rip), %rsi      # 0xa464
leaq 0x30(%rsp), %rdi
callq 0x3160
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x8823
leaq 0x5fb5(%rip), %rbx      # 0xdcb0
leaq 0x5f6e(%rip), %r14      # 0xdc70
leaq 0x30(%rsp), %r15
movq %r15, %rdi
movl $0x400, %esi            # imm = 0x400
movq 0x18(%rsp), %rdx
callq 0x3200
testq %rax, %rax
je 0x87e5
leaq 0x26f9(%rip), %rdi      # 0xa422
movq %r15, %rsi
callq 0x3978
testl %eax, %eax
je 0x7da2
movq 0x6e44(%rip), %rdi      # 0xeb80
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0x3690
movq %rax, %r12
movq 0x6e28(%rip), %r13      # 0xeb78
xorl %r15d, %r15d
cmpq $0x18, %r15
je 0x7d02
movq (%r15,%r14), %rbp
movq %r13, %rdi
movq %rbp, %rsi
callq 0x3470
addq $0x8, %r15
testl %eax, %eax
jne 0x7d53
movq 0x6271(%rip), %rax      # 0xdfe8
movq (%rax), %rdi
leaq 0x26f8(%rip), %rsi      # 0xa479
movq %rbp, %rdx
movl %r12d, %ecx
xorl %eax, %eax
callq 0x3660
leaq 0x5efb(%rip), %rax      # 0xdc90
movq -0x8(%r15,%rax), %rax
movl %r12d, (%rax)
jmp 0x7d02
leaq 0x26e2(%rip), %rdi      # 0xa48b
movq %r15, %rsi
callq 0x3978
testl %eax, %eax
je 0x7e3a
movq 0x6dc0(%rip), %rdi      # 0xeb80
callq 0x7a83
movq 0x6dac(%rip), %r12      # 0xeb78
xorl %ebp, %ebp
cmpq $0x38, %rbp
je 0x7d02
movq (%rbp,%rbx), %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x3470
addq $0x8, %rbp
testl %eax, %eax
jne 0x7dce
movq 0x61f1(%rip), %rax      # 0xdfe8
movq (%rax), %rdi
movq 0x6d7f(%rip), %rcx      # 0xeb80
leaq 0x272f(%rip), %rsi      # 0xa537
movq %r13, %rdx
xorl %eax, %eax
callq 0x3660
leaq 0x5ed7(%rip), %rax      # 0xdcf0
movq -0x8(%rbp,%rax), %r15
movq (%r15), %rdi
callq 0x3220
movq 0x6d53(%rip), %rdi      # 0xeb80
callq 0x3430
movq %rax, (%r15)
jmp 0x7d02
leaq 0x2708(%rip), %rdi      # 0xa549
movq %r15, %rsi
callq 0x3978
testl %eax, %eax
jne 0x8125
leaq 0x2738(%rip), %rdi      # 0xa590
movq %r15, %rsi
callq 0x3978
testl %eax, %eax
je 0x7f32
movq 0x6d09(%rip), %rdi      # 0xeb78
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0x3690
movq %rax, %r13
movl 0x738d(%rip), %r12d     # 0xf210
cmpl %r13d, %r12d
jbe 0x7fc5
movq 0x6ced(%rip), %rcx      # 0xeb80
movl $0x400, %esi            # imm = 0x400
movq %r15, %rdi
leaq 0x228d(%rip), %rdx      # 0xa12f
xorl %eax, %eax
callq 0x3080
leaq 0x2720(%rip), %rdi      # 0xa5d0
movq %r15, %rsi
callq 0x3978
testl %eax, %eax
je 0x801e
movq 0x6cb1(%rip), %r12      # 0xeb78
leaq 0x2198(%rip), %rbp      # 0xa066
xorl %r15d, %r15d
cmpq $0x14, %r15
je 0x7d02
leaq 0x2172(%rip), %rax      # 0xa054
movslq (%r15,%rax), %rsi
addq %rax, %rsi
movq %r12, %rdi
callq 0x3470
addq $0x4, %r15
addq $0x2, %rbp
testl %eax, %eax
jne 0x7ed1
movq 0x60e4(%rip), %rax      # 0xdfe8
movq (%rax), %rdi
leaq 0x2726(%rip), %rsi      # 0xa634
movl %r13d, %edx
movq %r12, %rcx
xorl %eax, %eax
callq 0x3660
movzwl (%rbp), %eax
movq 0x72f2(%rip), %rcx      # 0xf218
movl %r13d, %edx
movw %ax, (%rcx,%rdx,8)
jmp 0x7d02
leaq 0x287e(%rip), %rdi      # 0xa7b7
movq %r15, %rsi
callq 0x3978
testl %eax, %eax
jne 0x81cc
leaq 0x2bb2(%rip), %rdi      # 0xab02
movq %r15, %rsi
callq 0x3978
testl %eax, %eax
je 0x7d02
movq 0x6c11(%rip), %rdi      # 0xeb78
callq 0x7a83
movl 0x72be(%rip), %esi      # 0xf230
incl %esi
movl %esi, 0x72b6(%rip)      # 0xf230
movq 0x72b7(%rip), %rdi      # 0xf238
shlq $0x3, %rsi
callq 0x3640
movq %rax, %r12
movq %rax, 0x72a4(%rip)      # 0xf238
movq 0x6bdd(%rip), %r13      # 0xeb78
movq %r13, %rdi
callq 0x3430
movl 0x7287(%rip), %ecx      # 0xf230
decl %ecx
movq %rax, (%r12,%rcx,8)
movq 0x6032(%rip), %rax      # 0xdfe8
movq (%rax), %rdi
leaq 0x2b5b(%rip), %rsi      # 0xab1b
jmp 0x841f
leal 0x1(%r13), %ebp
cmpq %rbp, %r12
jae 0x7e8c
movl 0x7238(%rip), %esi      # 0xf210
incl %esi
movl %esi, 0x7230(%rip)      # 0xf210
movq 0x7231(%rip), %rdi      # 0xf218
shlq $0x3, %rsi
callq 0x3640
movq %rax, 0x7221(%rip)      # 0xf218
movq (%rax), %rcx
movq %rcx, (%rax,%r12,8)
movq 0x5fe3(%rip), %rax      # 0xdfe8
movq (%rax), %rdi
leaq 0x25ab(%rip), %rsi      # 0xa5ba
movl %r12d, %edx
xorl %eax, %eax
callq 0x3660
incq %r12
jmp 0x7fc9
leaq 0x262c(%rip), %rdi      # 0xa651
movq %r15, %rsi
callq 0x3978
testl %eax, %eax
je 0x80a4
movq 0x6b40(%rip), %r12      # 0xeb78
leaq 0x2b31(%rip), %rbp      # 0xab70
xorl %r15d, %r15d
cmpq $0x8, %r15
je 0x7d02
leaq 0x2021(%rip), %rax      # 0xa074
movslq (%r15,%rax), %rsi
addq %rax, %rsi
movq %r12, %rdi
callq 0x3470
addq $0x4, %r15
addq $0x2, %rbp
testl %eax, %eax
jne 0x8042
movq 0x5f73(%rip), %rax      # 0xdfe8
movq (%rax), %rdi
leaq 0x260d(%rip), %rsi      # 0xa68c
movl %r13d, %edx
movq %r12, %rcx
xorl %eax, %eax
callq 0x3660
movzwl (%rbp), %eax
movq 0x7181(%rip), %rcx      # 0xf218
movl %r13d, %edx
movw %ax, 0x2(%rcx,%rdx,8)
jmp 0x7d02
leaq 0x25ff(%rip), %rdi      # 0xa6aa
movq %r15, %rsi
callq 0x3978
testl %eax, %eax
jne 0x85a4
leaq 0x266d(%rip), %rdi      # 0xa72f
movq %r15, %rsi
callq 0x3978
testl %eax, %eax
je 0x7d02
movq 0x6a9f(%rip), %rdi      # 0xeb78
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0x3690
movq %rax, %r12
addl $-0x32, %eax
movq 0x5ef8(%rip), %rcx      # 0xdfe8
movq (%rcx), %rdi
cmpl $0x28, %eax
ja 0x864b
leaq 0x268f(%rip), %rsi      # 0xa792
movl %r13d, %edx
movl %r12d, %ecx
xorl %eax, %eax
callq 0x3660
movq 0x7101(%rip), %rax      # 0xf218
movl %r13d, %ecx
movw %r12w, 0x6(%rax,%rcx,8)
jmp 0x7d02
movq 0x6a54(%rip), %rdi      # 0xeb80
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0x3690
movq %rax, %r12
movq 0x5ea8(%rip), %rax      # 0xdfe8
movq (%rax), %rdi
cmpl $0x2, %r12d
leaq 0x25bc(%rip), %rcx      # 0xa70a
leaq 0x1fdb(%rip), %rax      # 0xa130
cmovaeq %rax, %rcx
leaq 0x2413(%rip), %rsi      # 0xa573
movl %r12d, %edx
xorl %eax, %eax
callq 0x3660
movq 0x70a7(%rip), %rdi      # 0xf218
callq 0x3220
movl %r12d, 0x7093(%rip)     # 0xf210
movl %r12d, %edi
pushq $0x8
popq %rsi
callq 0x3500
movq %rax, 0x7089(%rip)      # 0xf218
leaq 0x62ea(%rip), %rax      # 0xe480
xorl %ecx, %ecx
cmpq $0x2, %rcx
ja 0x7d02
movl %r12d, %edx
cmpq %rdx, %rcx
jae 0x7d02
movq 0x7063(%rip), %rdx      # 0xf218
movq (%rax), %rsi
movq %rsi, (%rdx,%rcx,8)
incq %rcx
movl 0x704a(%rip), %r12d     # 0xf210
addq $0x8, %rax
jmp 0x8198
movq 0x69a5(%rip), %r13      # 0xeb78
movq 0x5e0e(%rip), %rax      # 0xdfe8
movq (%rax), %rcx
leaq 0x2734(%rip), %rdi      # 0xa918
pushq $0x7
popq %rsi
pushq $0x1
popq %rdx
callq 0x3630
movb (%r13), %r12b
xorl %ebp, %ebp
pushq $0x4
popq %r15
testb %r12b, %r12b
je 0x838e
movq %r13, %rdi
leaq 0x2714(%rip), %rsi      # 0xa920
movq %r15, %rdx
callq 0x3140
testl %eax, %eax
jne 0x8231
orl $0x8, %ebp
movq 0x5dc6(%rip), %rax      # 0xdfe8
movq (%rax), %rcx
leaq 0x26f9(%rip), %rdi      # 0xa925
jmp 0x82e5
movq %r13, %rdi
leaq 0x26f2(%rip), %rsi      # 0xa92d
movq %r15, %rdx
callq 0x3140
testl %eax, %eax
jne 0x8260
orl $0x10, %ebp
movq 0x5d97(%rip), %rax      # 0xdfe8
movq (%rax), %rcx
leaq 0x26d7(%rip), %rdi      # 0xa932
jmp 0x82e5
movq %r13, %rdi
leaq 0x26d0(%rip), %rsi      # 0xa93a
movq %r15, %rdx
callq 0x3140
testl %eax, %eax
jne 0x828c
orl $0x20, %ebp
movq 0x5d68(%rip), %rax      # 0xdfe8
movq (%rax), %rcx
leaq 0x26b5(%rip), %rdi      # 0xa93f
jmp 0x82e5
movq %r13, %rdi
leaq 0x26b1(%rip), %rsi      # 0xa947
movq %r15, %rdx
callq 0x3140
testl %eax, %eax
jne 0x82b8
orl $0x40, %ebp
movq 0x5d3c(%rip), %rax      # 0xdfe8
movq (%rax), %rcx
leaq 0x2696(%rip), %rdi      # 0xa94c
jmp 0x82e5
movq %r13, %rdi
leaq 0x2692(%rip), %rsi      # 0xa954
movq %r15, %rdx
callq 0x3140
testl %eax, %eax
jne 0x830b
orl $0x80, %ebp
movq 0x5d0d(%rip), %rax      # 0xdfe8
movq (%rax), %rcx
leaq 0x2674(%rip), %rdi      # 0xa959
pushq $0x7
popq %rsi
pushq $0x1
popq %rdx
callq 0x3630
movq %r15, %rax
addq %rax, %r13
decq %r13
movb 0x1(%r13), %r12b
incq %r13
cmpb $0x2b, %r12b
je 0x82f9
jmp 0x81f9
movq %r13, %rdi
leaq 0x264c(%rip), %rsi      # 0xa961
pushq $0x5
popq %r15
movq %r15, %rdx
callq 0x3140
testl %eax, %eax
jne 0x834d
orl $0x1, %ebp
movq 0x5cb9(%rip), %rax      # 0xdfe8
movq (%rax), %rcx
leaq 0x262e(%rip), %rdi      # 0xa967
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x3630
movq %r15, %rax
pushq $0x4
popq %r15
jmp 0x82f3
movq %r13, %rdi
leaq 0x2619(%rip), %rsi      # 0xa970
pushq $0x7
popq %rdx
callq 0x3140
testl %eax, %eax
jne 0x838e
orl $0x4, %ebp
movq 0x5c7b(%rip), %rax      # 0xdfe8
movq (%rax), %rcx
leaq 0x2601(%rip), %rdi      # 0xa978
pushq $0xa
popq %rsi
pushq $0x1
popq %rdx
callq 0x3630
pushq $0x4
popq %r15
pushq $0x7
popq %rax
jmp 0x82f3
testl %ebp, %ebp
jne 0x83b7
movq 0x5c4f(%rip), %rax      # 0xdfe8
movq (%rax), %rcx
leaq 0x25e0(%rip), %rdi      # 0xa983
pushq $0xc
popq %rsi
pushq $0x1
popq %rdx
callq 0x3630
movb (%r13), %r12b
movl $0x8000, %ebp           # imm = 0x8000
testb %r12b, %r12b
jne 0x83d6
movq 0x5c25(%rip), %rax      # 0xdfe8
movq (%rax), %rdi
movq 0x67ab(%rip), %rdx      # 0xeb78
leaq 0x25bc(%rip), %rsi      # 0xa990
jmp 0x8422
cmpb $0x30, %r12b
jne 0x83e5
movzbl 0x1(%r13), %ecx
pushq $0x78
jmp 0x83eb
movzbl %r12b, %ecx
pushq $0x30
popq %rax
subl %ecx, %eax
movq %r13, %rdi
testl %eax, %eax
jne 0x8401
xorl %esi, %esi
pushq $0x10
popq %rdx
callq 0x3690
jmp 0x8406
callq 0x30b0
movq %rax, %rcx
movq 0x5bd8(%rip), %rax      # 0xdfe8
movq (%rax), %rdi
testq %rcx, %rcx
jne 0x842e
leaq 0x258e(%rip), %rsi      # 0xa9ad
movq %r13, %rdx
xorl %eax, %eax
callq 0x3660
jmp 0x7d02
movq %rcx, 0x28(%rsp)
leaq 0x258d(%rip), %rsi      # 0xa9c7
movq %r13, %rdx
xorl %eax, %eax
callq 0x3660
movq 0x673d(%rip), %rdi      # 0xeb88
callq 0x7b06
movq 0x6729(%rip), %r13      # 0xeb80
xorl %r15d, %r15d
leaq 0x1c1b(%rip), %r12      # 0xa07c
cmpq $0x44, %r15
je 0x84ba
movslq (%r15,%r12), %rdi
addq %r12, %rdi
movq %r13, %rsi
callq 0x3470
addq $0x4, %r15
testl %eax, %eax
jne 0x8461
leaq 0x58ab(%rip), %rax      # 0xdd30
movq -0x8(%rax,%r15,2), %rax
movq %rax, 0x8(%rsp)
movq 0x5b52(%rip), %rax      # 0xdfe8
movq (%rax), %rdi
movq 0x66e8(%rip), %rcx      # 0xeb88
leaq 0x2649(%rip), %rsi      # 0xaaf0
movq %r13, %rdx
xorl %eax, %eax
callq 0x3660
movq 0x66c8(%rip), %r13      # 0xeb80
jmp 0x84c3
movq $0x0, 0x8(%rsp)
movq %r13, %rdi
leaq 0x2500(%rip), %rsi      # 0xa9cd
callq 0x3470
testl %eax, %eax
movq 0x28(%rsp), %r15
je 0x85f3
movq %r13, %rdi
leaq 0x24f0(%rip), %rsi      # 0xa9d9
callq 0x3470
testl %eax, %eax
je 0x85f3
movq %r13, %rdi
leaq 0x24e6(%rip), %rsi      # 0xa9e6
callq 0x3470
testl %eax, %eax
je 0x8664
movq %r13, %rdi
leaq 0x24e5(%rip), %rsi      # 0xa9fc
callq 0x3470
testl %eax, %eax
je 0x8664
movq %r13, %rdi
leaq 0x2534(%rip), %rsi      # 0xaa62
callq 0x3470
testl %eax, %eax
je 0x8664
movq %r13, %rdi
leaq 0x2531(%rip), %rsi      # 0xaa76
callq 0x3470
testl %eax, %eax
je 0x8664
movq %r13, %rdi
leaq 0x24e2(%rip), %rsi      # 0xaa3e
callq 0x3470
testl %eax, %eax
je 0x87b7
movq %r13, %rdi
leaq 0x24da(%rip), %rsi      # 0xaa4d
callq 0x3470
testl %eax, %eax
je 0x87b7
movq %r13, %rdi
leaq 0x24a3(%rip), %rsi      # 0xaa2d
callq 0x3470
testl %eax, %eax
je 0x87cb
movq $0x0, (%rsp)
jmp 0x86d3
movq 0x65cd(%rip), %rdi      # 0xeb78
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0x3690
movq %rax, %r12
addl $-0x32, %eax
movq 0x5a26(%rip), %rcx      # 0xdfe8
movq (%rcx), %rdi
cmpl $0x28, %eax
ja 0x8642
leaq 0x213a(%rip), %rsi      # 0xa70b
movl %r13d, %edx
movl %r12d, %ecx
xorl %eax, %eax
callq 0x3660
movq 0x6c33(%rip), %rax      # 0xf218
movl %r13d, %ecx
movw %r12w, 0x4(%rax,%rcx,8)
jmp 0x7d02
movq 0x658e(%rip), %r12      # 0xeb88
movq %r12, %rdi
leaq 0x201e(%rip), %rsi      # 0xa622
callq 0x3470
xorl %r13d, %r13d
testl %eax, %eax
sete %r13b
movq %r12, %rdi
leaq 0x200c(%rip), %rsi      # 0xa628
callq 0x3470
testl %eax, %eax
pushq $0x2
popq %rax
cmovel %eax, %r13d
movq %r12, %rdi
leaq 0x1ffa(%rip), %rsi      # 0xa62e
callq 0x3470
testl %eax, %eax
pushq $0x3
jmp 0x86ca
leaq 0x2091(%rip), %rsi      # 0xa6da
jmp 0x8652
leaq 0x210e(%rip), %rsi      # 0xa760
movl %r13d, %edx
movl %r12d, %ecx
xorl %eax, %eax
callq 0x3660
jmp 0x7d02
movq 0x651d(%rip), %r12      # 0xeb88
movq %r12, %rdi
leaq 0x200c(%rip), %rsi      # 0xa681
callq 0x3470
xorl %r13d, %r13d
testl %eax, %eax
sete %r13b
movq %r12, %rdi
leaq 0x1ff9(%rip), %rsi      # 0xa686
callq 0x3470
testl %eax, %eax
pushq $0x2
popq %rax
cmovel %eax, %r13d
cmpb $0x75, (%r12)
jne 0x86b7
cmpb $0x70, 0x1(%r12)
jne 0x86b7
cmpb $0x0, 0x2(%r12)
pushq $0x3
popq %rax
cmovel %eax, %r13d
movq %r12, %rdi
leaq 0x243c(%rip), %rsi      # 0xaafd
callq 0x3470
testl %eax, %eax
pushq $0x4
popq %rax
cmovel %eax, %r13d
movq %r13, (%rsp)
xorl %ecx, %ecx
movl 0x6b45(%rip), %edx      # 0xf220
movq 0x6b46(%rip), %r12      # 0xf228
addq $0x20, %r12
movq %rdx, %r13
movq %rdx, %rax
subq $0x1, %rax
jb 0x8750
cmpl %ebp, -0x20(%r12)
jne 0x8700
cmpq %r15, -0x18(%r12)
je 0x8709
addq $0x28, %r12
movq %rax, %r13
jmp 0x86ec
movq 0x8(%rsp), %rax
movq %rax, -0x10(%r12)
testq %rcx, %rcx
je 0x8738
movq %rcx, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdx, 0x20(%rsp)
callq 0x3430
movq 0x20(%rsp), %rdx
movq 0x10(%rsp), %rcx
jmp 0x873a
xorl %eax, %eax
movq %rax, -0x8(%r12)
movq (%rsp), %rax
movl %eax, (%r12)
testl %r13d, %r13d
jne 0x7d02
leal 0x1(%rdx), %eax
movl %eax, 0x6ac7(%rip)      # 0xf220
movq %rcx, %r12
movq 0x6ac5(%rip), %rdi      # 0xf228
imulq $0x28, %rax, %rsi
movq %rdx, %r13
callq 0x3640
movq %r12, %rdi
movq %rax, %r12
movq %rax, 0x6aac(%rip)      # 0xf228
movq %r15, %rax
imulq $0x28, %r13, %r15
movl %ebp, (%r12,%r15)
movq %rax, 0x8(%r12,%r15)
movq 0x8(%rsp), %rax
movq %rax, 0x10(%r12,%r15)
testq %rdi, %rdi
je 0x87a2
callq 0x3430
jmp 0x87a4
xorl %eax, %eax
movq (%rsp), %rcx
movq %rax, 0x18(%r12,%r15)
movl %ecx, 0x20(%r12,%r15)
jmp 0x7d02
movq $0x0, (%rsp)
movq 0x63c2(%rip), %rcx      # 0xeb88
jmp 0x86d5
movq 0x63b6(%rip), %rdi      # 0xeb88
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0x3330
movq %rax, (%rsp)
jmp 0x86d3
movq 0x18(%rsp), %rdi
callq 0x3560
callq 0x3926
movq 0x69ed(%rip), %rbx      # 0xf1e8
testq %rbx, %rbx
je 0x8823
leaq 0x2324(%rip), %rsi      # 0xab2b
movq %rbx, %rdi
callq 0x3470
testl %eax, %eax
jne 0x8823
movq %rbx, %rdi
callq 0x3220
andq $0x0, 0x69c5(%rip)      # 0xf1e8
addq $0x438, %rsp            # imm = 0x438
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq