// File: /workspace/github_c_makefile_star2_O3/qpfiffer[P]38-Moths/src/greshunkel.c
// Function: interpolate_conditionals
static line
_interpolate_conditionals(const greshunkel_ctext *ctext, const char *buf, size_t *num_read, const struct compiled_regex *all_regex) {
	line to_return = {0};
	*num_read = 0;

	match_t match[4] = {{0}};
	if (regexec_2_0_beta(&all_regex->c_conditional_inverse_regex, buf, 3, match) == 0) {
		const match_t conditional_variable = match[1];
		match_t conditional_meat = match[2];
		/* Make sure they were matched: */
		assert(conditional_variable.rm_so != -1 && conditional_variable.rm_eo != -1);
		assert(conditional_meat.rm_so != -1 && conditional_meat.rm_eo != -1);

		size_t possible_dif = 0;
		const char *closest_endif = NULL;
		closest_endif = strstr(conditional_meat.start, "xXx ENDLESS xXx");
		possible_dif = closest_endif - buf;
		if (possible_dif != (unsigned int)conditional_meat.rm_so) {
			conditional_meat.rm_eo = possible_dif;
			conditional_meat.len = conditional_meat.rm_eo - conditional_meat.rm_so;
		}

		/* We found a conditioanl. */
		*num_read = conditional_meat.rm_eo + strlen("xXx ENDLESS xXx");

		char just_match_str[conditional_variable.len + 1];
		just_match_str[conditional_variable.len] = '\0';
		strncpy(just_match_str, conditional_variable.start, conditional_variable.len);

		/* TODO: Support a boolean type. */
		/*if (!((tuple = find_needle(ctext, just_match_str, 1)) && tuple->type == GSHKL_BOOL)) { */
		const greshunkel_tuple *tuple = NULL;
		char *sub_ctext_match = NULL;
		int should_render = 0;
		if ((tuple = find_needle(ctext, just_match_str, 1))) {
			if (_is_truthy(tuple)) {
				should_render = 1;
			}
		} else if ((sub_ctext_match = strchr(just_match_str, '.')) != NULL) {
			/* TODO: Check sub-context. */
			char sub_context_name[MAX_GSHKL_STR_SIZE] = {0};
			char sub_item_name[MAX_GSHKL_STR_SIZE] = {0};
			memcpy(sub_context_name, just_match_str, sub_ctext_match - just_match_str);
			memcpy(sub_item_name, sub_ctext_match + strlen("."), conditional_variable.len - strlen(sub_context_name) + strlen("."));

			if ((tuple = find_needle(ctext, sub_context_name, 1)) && tuple->type == GSHKL_SUBCTEXT) {
				const greshunkel_ctext *sub_ctext = tuple->value.sub_ctext;

				unsigned int i;
				for (i = 0; i < sub_ctext->values->count; i++) {
					const greshunkel_tuple *sub_tuple = vector_get(sub_ctext->values, i);
					const char *_name = sub_tuple->name;
					const size_t larger = strlen(_name) > strlen(sub_item_name) ?
							strlen(_name) : strlen(sub_item_name);

					if (strncmp(_name, sub_item_name, larger) == 0 && _is_falsey(sub_tuple)) {
							should_render = 1;
					}
				}
			}
		}

		if (should_render) {
			line to_render_line;
			to_render_line.data = strndup(conditional_meat.start, conditional_meat.len);
			to_render_line.size = conditional_meat.len;

			line rendered_piece = {0};

			/* Recurse contexts until my fucking mind melts. */
			greshunkel_ctext *_temp_ctext = _gshkl_init_child_context(ctext);
			rendered_piece.data = gshkl_render(_temp_ctext, to_render_line.data, to_render_line.size, &rendered_piece.size);
			gshkl_free_context(_temp_ctext);

			const size_t old_size = to_return.size;
			to_return.size += rendered_piece.size;
			if (old_size <= 0) {
				to_return.data = calloc(1, to_return.size);
			} else {
				to_return.data = realloc(to_return.data, to_return.size);
			}

			memcpy(to_return.data + old_size, rendered_piece.data, rendered_piece.size);
			free(rendered_piece.data);
			free(to_render_line.data);
		}
	} else if (regexec_2_0_beta(&all_regex->c_conditional_regex, buf, 3, match) == 0) {
		const match_t conditional_variable = match[1];
		match_t conditional_meat = match[2];

		assert(conditional_variable.rm_so != -1 && conditional_variable.rm_eo != -1);
		assert(conditional_meat.rm_so != -1 && conditional_meat.rm_eo != -1);

		size_t possible_dif = 0;
		const char *closest_endif = NULL;
		closest_endif = strstr(conditional_meat.start, "xXx ENDLESS xXx");
		possible_dif = closest_endif - buf;
		if (possible_dif != (unsigned int)conditional_meat.rm_so) {
			conditional_meat.rm_eo = possible_dif;
			conditional_meat.len = conditional_meat.rm_eo - conditional_meat.rm_so;
		}

		/* We found a conditioanl. */
		*num_read = conditional_meat.rm_eo + strlen("xXx ENDLESS xXx");

		char just_match_str[conditional_variable.len + 1];
		just_match_str[conditional_variable.len] = '\0';
		strncpy(just_match_str, conditional_variable.start, conditional_variable.len);

		/* TODO: Support a boolean type. */
		/*if (!((tuple = find_needle(ctext, just_match_str, 1)) && tuple->type == GSHKL_BOOL)) */
		const greshunkel_tuple *tuple = NULL;
		char *sub_ctext_match = NULL;
		int should_render = 0;
		if (!(tuple = find_needle(ctext, just_match_str, 1))) {
			if ((sub_ctext_match = strchr(just_match_str, '.')) != NULL) {
				/* TODO: Check sub-context. */
				char sub_context_name[MAX_GSHKL_STR_SIZE] = {0};
				char sub_item_name[MAX_GSHKL_STR_SIZE] = {0};
				memcpy(sub_context_name, just_match_str, sub_ctext_match - just_match_str);
				memcpy(sub_item_name, sub_ctext_match + strlen("."), conditional_variable.len - strlen(sub_context_name) + strlen("."));

				if ((tuple = find_needle(ctext, sub_context_name, 1)) && tuple->type == GSHKL_SUBCTEXT) {
					const greshunkel_ctext *sub_ctext = tuple->value.sub_ctext;

					unsigned int i;
					for (i = 0; i < sub_ctext->values->count; i++) {
						const greshunkel_tuple *sub_tuple = vector_get(sub_ctext->values, i);
						const char *_name = sub_tuple->name;
						const size_t larger = strlen(_name) > strlen(sub_item_name) ?
								strlen(_name) : strlen(sub_item_name);

						if (strncmp(_name, sub_item_name, larger) == 0 &&
							_is_truthy(sub_tuple)) {
								should_render = 1;
						}
					}
				}
			} else {
				should_render = 1;
			}
		} else {
			if (_is_falsey(tuple)) {
				should_render = 1;
			} else if ((sub_ctext_match = strchr(just_match_str, '.')) != NULL) {
				/* TODO: Check sub-context. */
				char sub_context_name[MAX_GSHKL_STR_SIZE] = {0};
				char sub_item_name[MAX_GSHKL_STR_SIZE] = {0};
				memcpy(sub_context_name, just_match_str, sub_ctext_match - just_match_str);
				memcpy(sub_item_name, sub_ctext_match + strlen("."), conditional_variable.len - strlen(sub_context_name) + strlen("."));

				if ((tuple = find_needle(ctext, sub_context_name, 1)) && tuple->type == GSHKL_SUBCTEXT) {
					const greshunkel_ctext *sub_ctext = tuple->value.sub_ctext;

					unsigned int i;
					for (i = 0; i < sub_ctext->values->count; i++) {
						const greshunkel_tuple *sub_tuple = vector_get(sub_ctext->values, i);
						const char *_name = sub_tuple->name;
						const size_t larger = strlen(_name) > strlen(sub_item_name) ?
								strlen(_name) : strlen(sub_item_name);

						if (strncmp(_name, sub_item_name, larger) == 0 &&
							_is_truthy(sub_tuple)) {
								should_render = 1;
						}
					}
				}
			}
		}

		if (should_render) {
			line to_render_line;
			to_render_line.data = strndup(conditional_meat.start, conditional_meat.len);
			to_render_line.size = conditional_meat.len;

			/* TODO: This should use gshkl_render. See _interpolate_loop */
			line rendered_piece = _interpolate_line(ctext, to_render_line, all_regex);

			const size_t old_size = to_return.size;
			to_return.size += rendered_piece.size;
			if (old_size <= 0) {
				to_return.data = calloc(1, to_return.size);
			} else {
				to_return.data = realloc(to_return.data, to_return.size);
			}

			memcpy(to_return.data + old_size, rendered_piece.data, rendered_piece.size);
			if (rendered_piece.data != to_render_line.data)
				free(rendered_piece.data);
			free(to_render_line.data);
		}
	}

	return to_return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x498, %rsp            # imm = 0x498
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq $0x0, (%rdx)
xorps %xmm0, %xmm0
leaq -0xc0(%rbp), %rcx
movaps %xmm0, 0x50(%rcx)
movaps %xmm0, 0x40(%rcx)
movaps %xmm0, 0x30(%rcx)
movaps %xmm0, 0x20(%rcx)
movaps %xmm0, 0x10(%rcx)
movaps %xmm0, (%rcx)
leaq 0x1c0(%r12), %rdi
movl $0x3, %edx
callq 0x3a75
testl %eax, %eax
movq %rbx, -0x38(%rbp)
je 0x2eef
leaq 0x180(%r12), %rdi
leaq -0xc0(%rbp), %rcx
movl $0x3, %edx
movq %r15, %rsi
callq 0x3a75
xorl %r13d, %r13d
movl $0x0, %ebx
testl %eax, %eax
jne 0x3734
movq %r14, -0x40(%rbp)
cmpl $-0x1, -0xa8(%rbp)
je 0x37a1
cmpl $-0x1, -0xa4(%rbp)
je 0x37a1
movq %r12, -0x50(%rbp)
movl -0x90(%rbp), %r14d
cmpl $-0x1, %r14d
je 0x37c0
movl -0x8c(%rbp), %r13d
cmpl $-0x1, %r13d
je 0x37c0
movq -0xa0(%rbp), %rbx
movq -0x98(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x88(%rbp), %r12
movq -0x80(%rbp), %rdi
leaq 0x3a6a(%rip), %rsi      # 0x6897
movq %rdi, -0x60(%rbp)
callq 0x1200
movq %rsp, -0x30(%rbp)
subq %r15, %rax
movl %eax, %ecx
subl %r14d, %ecx
cmpq %r14, %rax
movslq %ecx, %rcx
cmovnel %eax, %r13d
cmoveq %r12, %rcx
movq %rcx, -0x58(%rbp)
movslq %r13d, %rax
addq $0xf, %rax
movq -0x38(%rbp), %rcx
movq %rax, (%rcx)
leaq 0x1(%rbx), %r15
movq %rsp, %r12
leaq 0x10(%rbx), %rax
andq $-0x10, %rax
subq %rax, %r12
movq %r12, %rsp
movb $0x0, (%rbx,%r12)
movq %r12, %rdi
movq -0x48(%rbp), %rsi
movq %rbx, %rdx
callq 0x1050
movq -0x40(%rbp), %r14
movq %r14, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x3b22
testq %rax, %rax
je 0x31dc
movl 0x20(%rax), %ecx
testl %ecx, %ecx
je 0x33ab
cmpl $0x1, %ecx
jne 0x33c9
cmpb $0x0, 0x28(%rax)
je 0x34e4
addq $0x28, %rax
leaq 0x214d(%rip), %rsi      # 0x501e
movl $0x5, %edx
movq %rax, %rdi
callq 0x1060
testl %eax, %eax
sete %al
leaq 0x3a57(%rip), %rsi      # 0x6941
jmp 0x33d6
movq %r14, -0x40(%rbp)
cmpl $-0x1, -0xa8(%rbp)
je 0x3763
cmpl $-0x1, -0xa4(%rbp)
je 0x3763
movl -0x90(%rbp), %r14d
cmpl $-0x1, %r14d
je 0x3782
movl -0x8c(%rbp), %ebx
cmpl $-0x1, %ebx
je 0x3782
movq -0xa0(%rbp), %r13
movq -0x98(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x88(%rbp), %r12
movq -0x80(%rbp), %rdi
leaq 0x3946(%rip), %rsi      # 0x6897
movq %rdi, -0x50(%rbp)
callq 0x1200
subq %r15, %rax
movl %eax, %ecx
subl %r14d, %ecx
cmpq %r14, %rax
movslq %ecx, %r15
cmovnel %eax, %ebx
cmoveq %r12, %r15
movq %rsp, %r12
movslq %ebx, %rax
addq $0xf, %rax
movq -0x38(%rbp), %rcx
movq %rax, (%rcx)
movq %rsp, %rbx
leaq 0x10(%r13), %rax
andq $-0x10, %rax
subq %rax, %rbx
movq %rbx, %rsp
movb $0x0, (%r13,%rbx)
movq %rbx, %rdi
movq -0x48(%rbp), %rsi
movq %r13, %rdx
callq 0x1050
movq -0x40(%rbp), %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0x3b22
testq %rax, %rax
je 0x300a
movl 0x20(%rax), %esi
xorl %ebx, %ebx
cmpl $0x2, %esi
sete %bl
xorl %ecx, %ecx
cmpl $0x1, %esi
sete %dl
jne 0x31c8
cmpb $0x0, 0x28(%rax)
je 0x34bd
addq $0x28, %rax
leaq 0x2034(%rip), %rsi      # 0x501e
movl $0x5, %edx
movq %rax, %rdi
callq 0x1060
xorl %ebx, %ebx
testl %eax, %eax
setne %bl
leaq 0x38a2(%rip), %rsi      # 0x68a7
jmp 0x3412
movq %rbx, %rdi
movl $0x2e, %esi
callq 0x10d0
testq %rax, %rax
je 0x34b8
movq %rax, %r14
movq %r12, -0x30(%rbp)
incq %r13
leaq -0x4c0(%rbp), %r12
movl $0x200, %edx            # imm = 0x200
movq %r12, %rdi
xorl %esi, %esi
callq 0x1120
leaq -0x2c0(%rbp), %rdi
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
callq 0x1120
movq %r14, %rdx
subq %rbx, %rdx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1190
incq %r14
movq %r12, %rdi
callq 0x10c0
subq %rax, %r13
leaq -0x2c0(%rbp), %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x1190
movq -0x40(%rbp), %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x3b22
testq %rax, %rax
je 0x3728
cmpl $0x2, 0x20(%rax)
jne 0x3728
movq 0x28(%rax), %r12
movq (%r12), %rdi
cmpq $0x0, 0x10(%rdi)
je 0x3728
movq %r15, -0x48(%rbp)
movb $0x1, %al
xorl %r13d, %r13d
movl %eax, -0x38(%rbp)
movl %r13d, %esi
callq 0x494b
movq %rax, %rbx
movq %rax, %rdi
callq 0x10c0
movq %rax, %r14
leaq -0x2c0(%rbp), %r15
movq %r15, %rdi
callq 0x10c0
cmpq %rax, %r14
cmovbeq %rax, %r14
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1060
testl %eax, %eax
jne 0x3192
movl 0x20(%rbx), %eax
testl %eax, %eax
je 0x3141
cmpl $0x1, %eax
jne 0x315b
cmpb $0x0, 0x28(%rbx)
je 0x317f
addq $0x28, %rbx
movl $0x5, %edx
movq %rbx, %rdi
leaq 0x1ef0(%rip), %rsi      # 0x501e
callq 0x1060
testl %eax, %eax
sete %al
leaq 0x3802(%rip), %rsi      # 0x6941
jmp 0x3168
movq 0x28(%rbx), %rax
testq %rax, %rax
je 0x317f
cmpq $0x0, 0x10(%rax)
sete %al
leaq 0x3805(%rip), %rsi      # 0x695e
jmp 0x3168
cmpl $0x2, %eax
setne %al
leaq 0x3821(%rip), %rsi      # 0x6989
movzbl %al, %ebx
movl $0x1, %edi
movl %ebx, %edx
xorl %eax, %eax
callq 0x45b4
testb %bl, %bl
je 0x3192
jmp 0x31a8
movl $0x1, %edi
leaq 0x3825(%rip), %rsi      # 0x69b0
xorl %eax, %eax
callq 0x45b4
incl %r13d
movq (%r12), %rdi
cmpq %r13, 0x10(%rdi)
ja 0x30c7
jmp 0x3749
incl %r13d
movq (%r12), %rdi
xorl %eax, %eax
cmpq %r13, 0x10(%rdi)
ja 0x30c4
movq -0x30(%rbp), %r12
movq -0x48(%rbp), %r15
jmp 0x3428
testl %esi, %esi
je 0x33f4
leaq 0x3721(%rip), %rsi      # 0x68f8
jmp 0x3412
movq %r12, %rdi
movl $0x2e, %esi
callq 0x10d0
testq %rax, %rax
je 0x36c8
movq %rax, %rbx
leaq -0x4c0(%rbp), %rdi
xorl %r13d, %r13d
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
callq 0x1120
leaq -0x2c0(%rbp), %rdi
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
callq 0x1120
movq %rbx, %rdx
subq %r12, %rdx
leaq -0x4c0(%rbp), %rdi
movq %r12, %rsi
callq 0x1190
incq %rbx
leaq -0x4c0(%rbp), %r12
movq %r12, %rdi
callq 0x10c0
subq %rax, %r15
leaq -0x2c0(%rbp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1190
movq %r14, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x3b22
testq %rax, %rax
je 0x36bf
cmpl $0x2, 0x20(%rax)
jne 0x36bf
movq 0x28(%rax), %rax
movq %rax, -0x38(%rbp)
movq (%rax), %rdi
cmpq $0x0, 0x10(%rdi)
je 0x36bf
xorl %r12d, %r12d
xorl %r15d, %r15d
movl %r12d, %esi
callq 0x494b
movq %rax, %r13
movq %rax, %rdi
callq 0x10c0
movq %rax, %rbx
leaq -0x2c0(%rbp), %r14
movq %r14, %rdi
callq 0x10c0
cmpq %rax, %rbx
cmovbeq %rax, %rbx
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1060
testl %eax, %eax
je 0x32f2
movl %r15d, %r13d
incl %r12d
movq -0x38(%rbp), %rax
movq (%rax), %rdi
movl %r13d, %r15d
cmpq %r12, 0x10(%rdi)
ja 0x3299
jmp 0x36bf
movl 0x20(%r13), %edx
xorl %ebx, %ebx
cmpl $0x2, %edx
sete %bl
xorl %ecx, %ecx
cmpl $0x1, %edx
sete %al
jne 0x333c
cmpb $0x0, 0x28(%r13)
je 0x3389
addq $0x28, %r13
movl $0x5, %edx
movq %r13, %rdi
leaq 0x1cfc(%rip), %rsi      # 0x501e
callq 0x1060
xorl %ebx, %ebx
testl %eax, %eax
setne %bl
movl $0x1, %edi
leaq 0x356d(%rip), %rsi      # 0x68a7
jmp 0x336d
testl %edx, %edx
je 0x334e
movl $0x1, %edi
leaq 0x35ac(%rip), %rsi      # 0x68f8
jmp 0x336d
movq 0x28(%r13), %rdx
testq %rdx, %rdx
je 0x3389
xorl %ebx, %ebx
cmpq $0x0, 0x10(%rdx)
setne %bl
movl $0x1, %edi
leaq 0x3560(%rip), %rsi      # 0x68cd
movl %ebx, %edx
xorl %eax, %eax
callq 0x45b4
movl $0x1, %r13d
testl %ebx, %ebx
jne 0x32da
jmp 0x32d7
movb %al, %cl
movl $0x1, %edi
leaq 0x3589(%rip), %rsi      # 0x6920
xorl %edx, %edx
movl %ebx, %r8d
xorl %r9d, %r9d
xorl %eax, %eax
callq 0x45b4
jmp 0x32d7
movq 0x28(%rax), %rax
testq %rax, %rax
je 0x34e4
cmpq $0x0, 0x10(%rax)
sete %al
leaq 0x3597(%rip), %rsi      # 0x695e
jmp 0x33d6
cmpl $0x2, %ecx
setne %al
leaq 0x35b3(%rip), %rsi      # 0x6989
movzbl %al, %ebx
movl $0x1, %edi
movl %ebx, %edx
xorl %eax, %eax
callq 0x45b4
testb %bl, %bl
je 0x34f7
jmp 0x36c8
movq 0x28(%rax), %rax
testq %rax, %rax
je 0x34bd
xorl %ebx, %ebx
cmpq $0x0, 0x10(%rax)
setne %bl
leaq 0x34bb(%rip), %rsi      # 0x68cd
movl $0x1, %edi
movl %ebx, %edx
xorl %eax, %eax
callq 0x45b4
testl %ebx, %ebx
je 0x34b8
movq %r12, -0x30(%rbp)
movq -0x50(%rbp), %rdi
movq %r15, %rsi
callq 0x1150
movq %rax, %r14
leaq -0x4c0(%rbp), %r12
movq $0x0, (%r12)
callq 0x1d48
movq %rax, %rbx
movq -0x40(%rbp), %rax
movq %rax, 0x10(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x24bc
movq %rax, 0x8(%r12)
movq %rbx, %rdi
callq 0x2457
movq (%r12), %rbx
movl $0x1, %edi
movq %rbx, %rsi
callq 0x1160
movq %rax, %r13
movq 0x8(%r12), %r15
movq -0x30(%rbp), %r12
movq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1190
movq %r15, %rdi
callq 0x1030
movq %r14, %rdi
callq 0x1030
jmp 0x3731
xorl %r13d, %r13d
jmp 0x34dd
movb %dl, %cl
leaq 0x345a(%rip), %rsi      # 0x6920
xorl %r13d, %r13d
movl $0x1, %edi
xorl %edx, %edx
movl %ebx, %r8d
xorl %r9d, %r9d
xorl %eax, %eax
callq 0x45b4
xorl %ebx, %ebx
jmp 0x3731
leaq 0x34c5(%rip), %rsi      # 0x69b0
movl $0x1, %edi
xorl %eax, %eax
callq 0x45b4
movq %r12, %rdi
movl $0x2e, %esi
callq 0x10d0
xorl %r13d, %r13d
testq %rax, %rax
je 0x372b
movq %rax, %rbx
leaq -0x4c0(%rbp), %r14
movl $0x200, %edx            # imm = 0x200
movq %r14, %rdi
xorl %esi, %esi
callq 0x1120
leaq -0x2c0(%rbp), %rdi
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
callq 0x1120
movq %rbx, %rdx
subq %r12, %rdx
movq %r14, %rdi
movq %r12, %rsi
callq 0x1190
incq %rbx
movq %r14, %rdi
callq 0x10c0
subq %rax, %r15
leaq -0x2c0(%rbp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1190
movq -0x40(%rbp), %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x3b22
testq %rax, %rax
je 0x36bf
cmpl $0x2, 0x20(%rax)
jne 0x36bf
movq 0x28(%rax), %rax
movq %rax, -0x38(%rbp)
movq (%rax), %rdi
cmpq $0x0, 0x10(%rdi)
je 0x36bf
xorl %r12d, %r12d
xorl %r15d, %r15d
movl %r12d, %esi
callq 0x494b
movq %rax, %r13
movq %rax, %rdi
callq 0x10c0
movq %rax, %rbx
leaq -0x2c0(%rbp), %r14
movq %r14, %rdi
callq 0x10c0
cmpq %rax, %rbx
cmovbeq %rax, %rbx
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1060
testl %eax, %eax
je 0x3606
movl %r15d, %r13d
incl %r12d
movq -0x38(%rbp), %rax
movq (%rax), %rdi
movl %r13d, %r15d
cmpq %r12, 0x10(%rdi)
ja 0x35ad
jmp 0x36bf
movl 0x20(%r13), %edx
xorl %ebx, %ebx
cmpl $0x2, %edx
sete %bl
xorl %ecx, %ecx
cmpl $0x1, %edx
sete %al
jne 0x3650
cmpb $0x0, 0x28(%r13)
je 0x369d
addq $0x28, %r13
movl $0x5, %edx
movq %r13, %rdi
leaq 0x19e8(%rip), %rsi      # 0x501e
callq 0x1060
xorl %ebx, %ebx
testl %eax, %eax
setne %bl
movl $0x1, %edi
leaq 0x3259(%rip), %rsi      # 0x68a7
jmp 0x3681
testl %edx, %edx
je 0x3662
movl $0x1, %edi
leaq 0x3298(%rip), %rsi      # 0x68f8
jmp 0x3681
movq 0x28(%r13), %rdx
testq %rdx, %rdx
je 0x369d
xorl %ebx, %ebx
cmpq $0x0, 0x10(%rdx)
setne %bl
movl $0x1, %edi
leaq 0x324c(%rip), %rsi      # 0x68cd
movl %ebx, %edx
xorl %eax, %eax
callq 0x45b4
movl $0x1, %r13d
testl %ebx, %ebx
jne 0x35ee
jmp 0x35eb
movb %al, %cl
movl $0x1, %edi
leaq 0x3275(%rip), %rsi      # 0x6920
xorl %edx, %edx
movl %ebx, %r8d
xorl %r9d, %r9d
xorl %eax, %eax
callq 0x45b4
jmp 0x35eb
testl %r13d, %r13d
movq -0x40(%rbp), %r14
je 0x3728
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rbx
movq %rbx, %rsi
callq 0x1150
movq %rax, %r15
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
movq -0x50(%rbp), %rcx
callq 0x37df
movq %rax, %rbx
movq %rdx, %r14
movl $0x1, %edi
movq %rax, %rsi
callq 0x1160
movq %rax, %r13
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1190
cmpq %r15, %r14
je 0x371e
movq %r14, %rdi
callq 0x1030
movq %r15, %rdi
callq 0x1030
jmp 0x372d
xorl %r13d, %r13d
xorl %ebx, %ebx
movq -0x30(%rbp), %r12
movq %r12, %rsp
movq %rbx, %rax
movq %r13, %rdx
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r13d, %r13d
testb $0x1, -0x38(%rbp)
movq -0x30(%rbp), %r12
movq -0x48(%rbp), %r15
je 0x3428
jmp 0x34dd
leaq 0x303b(%rip), %rdi      # 0x67a5
leaq 0x2acd(%rip), %rsi      # 0x623e
leaq 0x3072(%rip), %rcx      # 0x67ea
movl $0x2f4, %edx            # imm = 0x2F4
callq 0x1110
leaq 0x30d1(%rip), %rdi      # 0x685a
leaq 0x2aae(%rip), %rsi      # 0x623e
leaq 0x3053(%rip), %rcx      # 0x67ea
movl $0x2f5, %edx            # imm = 0x2F5
callq 0x1110
leaq 0x2ffd(%rip), %rdi      # 0x67a5
leaq 0x2a8f(%rip), %rsi      # 0x623e
leaq 0x3034(%rip), %rcx      # 0x67ea
movl $0x344, %edx            # imm = 0x344
callq 0x1110
leaq 0x3093(%rip), %rdi      # 0x685a
leaq 0x2a70(%rip), %rsi      # 0x623e
leaq 0x3015(%rip), %rcx      # 0x67ea
movl $0x345, %edx            # imm = 0x345
callq 0x1110