// File: /workspace/github_cpp_makefile_star2_O1/yanlinlin82[P]icpp/icpp.cpp
// Function: run(int, char const**)
int run(int argc, const char** argv)
{
	// vm register
	int ax = 0, ip = 0, sp = MEM_SIZE, bp = MEM_SIZE;

	// load code & data
	log<1>("Loading program\n  data: %zd word(s)\n  code: %zd word(s)\n\n",
			data_sec.size(), code_sec.size());

	size_t loaded = 0;
	for (size_t i = 0; i < data_sec.size(); ++i) {
		m[loaded++] = data_sec[i];
	}
	int code_loading_position = loaded;
	for (size_t i = 0; i < code_sec.size(); ++i) {
		m[loaded++] = code_sec[i];
	}

	// find start entry
	auto it = override_functions.find("main");
	if (it == override_functions.end() || it->second.empty()) {
		err("main() not defined!\n");
		return -1;
	}
	if (it->second.size() > 1) {
		err("duplcated definition of main()!\n");
		return -1;
	}
	auto it2 = symbols.find(*(it->second.begin()));
	ip = code_loading_position + get<1>(it2->second);

	// prepare argc & argv
	sp -= argc + 1;
	int argv_copy = sp;
	for (int i = 0; i < argc; ++i) {
		size_t len = strlen(argv[i]);
		size_t size = (len + sizeof(int)) / sizeof(int);
		m[sp - 1] = 0;
		sp -= size;
		m[argv_copy + i] = sp;
		memcpy(&m[sp], argv[i], len);
	}
	m[argv_copy + argc] = 0;
	if (verbose >= 3) {
		log("[DEBUG] prepare argc & argv:\n");
		for (int i = sp; i < MEM_SIZE; i += 4) {
			log("[DEBUG] %08X:  ", i);
			for (int j = 0; j < 4; ++j) {
				if (i + j < MEM_SIZE) {
					const unsigned char* p = reinterpret_cast<const unsigned char*>(&m[i + j]);
					log("%02X %02X %02X %02X  ", *p, *(p+1), *(p+2), *(p+3));
				} else {
					log("%*s", 13, "");
				}
			}
			for (int j = 0; j < 4 && i + j < MEM_SIZE; ++j) {
				const char* p = reinterpret_cast<const char*>(&m[i + j]);
				for (int k = 0; k < 4; ++k) {
					char c = *(p+k);
					log("%c", (c >= 0x20 && c <= 0x7E) ? c : '.');
				}
			}
			log("\n");
		}
		log("[DEBUG] argv_copy = 0x%08X\n\n", argv_copy);
	}

	// prepare stack for main()
	bp = sp - 1;
	m[--sp] = bp;
	m[--sp] = EXIT; int exit_addr = sp;
	m[--sp] = argc;
	m[--sp] = argv_copy;
	m[--sp] = exit_addr;
	if (verbose >= 3) {
		log("[DEBUG] stack for main():\n");
		log("[DEBUG] stack: m[sp]... = [ %08X, %08X, %08X, %08X, %08X ]\n", m[sp], m[sp+1], m[sp+2], m[sp+3], m[sp+4]);
		log("[DEBUG] ax = %08X, ip = %08X, bp = %08X, sp = %08X\n\n", ax, ip, bp, sp);
	}

	log<1>("System Information:\n"
			"  sizeof(int) = %zd\n"
			"  sizeof(void*) = %zd\n"
			"\n", sizeof(int), sizeof(void*));

	size_t cycle = 0;
	for (;;) {
		++cycle;
		if (verbose >= 1) {
			log("%zd:\t", cycle);
			print_code(m, ip, code_loading_position);
			if (verbose >= 2) {
				print_vm_env(ax, ip, sp, bp);
			}
		}
		size_t i = m[ip++];

		if      (i == EXIT) { break;                } // exit the program
		else if (i == PUSH) { m[--sp] = ax;         } // push ax to stack
		else if (i == POP ) { ax = m[sp++];         } // pop ax from stack
		else if (i == ADJ ) { sp -= m[ip++];        } // adjust stack pointer

		else if (i == MOV ) { ax = m[ip++];         } // move immediate to ax
		else if (i == LEA ) { ax = m[ip++];         } // load address to ax
		else if (i == GET ) { ax = m[m[ip++]];      } // get memory to ax
		else if (i == PUT ) { m[m[ip++]] = ax;      } // put ax to memory
		else if (i == LLEA) { ax = bp + m[ip++];    } // load local address to ax
		else if (i == LGET) { ax = m[bp + m[ip++]]; } // get local to ax
		else if (i == LPUT) { m[bp + m[ip++]] = ax; } // put ax to local

		else if (i == SGET) { ax = m[m[sp++]];      } // get [stack] to ax
		else if (i == SPUT) { m[m[sp++]] = ax;      } // put ax to [stack]

		else if (i == ADD ) { ax = m[sp++] + ax;    } // stack (top) + ax, and pop out
		else if (i == SUB ) { ax = m[sp++] - ax;    } // stack (top) - ax, and pop out
		else if (i == MUL ) { ax = m[sp++] * ax;    } // stack (top) * ax, and pop out
		else if (i == DIV ) { ax = m[sp++] / ax;    } // stack (top) / ax, and pop out
		else if (i == MOD ) { ax = m[sp++] % ax;    } // stack (top) % ax, and pop out
		else if (i == NEG ) { ax = -ax;             }
		else if (i == INC ) { ++ax;                 }
		else if (i == DEC ) { --ax;                 }

		else if (i == SHL ) { ax = m[sp++] >> ax;   } // stack (top) >> ax, and pop out
		else if (i == SHR ) { ax = m[sp++] << ax;   } // stack (top) << ax, and pop out
		else if (i == AND ) { ax = m[sp++] & ax;    } // stack (top) & ax, and pop out
		else if (i == OR  ) { ax = m[sp++] | ax;    } // stack (top) | ax, and pop out
		else if (i == NOT ) { ax = ~ax;             }

		else if (i == EQ  ) { ax = m[sp++] == ax;   } // stack (top) == ax, and pop out
		else if (i == NE  ) { ax = m[sp++] != ax;   } // stack (top) != ax, and pop out
		else if (i == GE  ) { ax = m[sp++] >= ax;   } // stack (top) >= ax, and pop out
		else if (i == GT  ) { ax = m[sp++] >  ax;   } // stack (top) >  ax, and pop out
		else if (i == LE  ) { ax = m[sp++] <= ax;   } // stack (top) <= ax, and pop out
		else if (i == LT  ) { ax = m[sp++] <  ax;   } // stack (top) <  ax, and pop out
		else if (i == LAND) { ax = m[sp++] && ax;   } // stack (top) && ax, and pop out
		else if (i == LOR ) { ax = m[sp++] || ax;   } // stack (top) || ax, and pop out
		else if (i == LNOT) { ax = !ax;             }

		else if (i == ENTER) { m[--sp] = bp; bp = sp; sp -= m[ip++];   } // enter stack frame
		else if (i == LEAVE) { sp = bp; bp = m[sp++];                  } // leave stack frame
		else if (i == CALL ) { int n = m[ip++]; m[--sp] = ip; ip += n; } // call subroutine
		else if (i == RET  ) { int n = m[ip]; ip = m[sp++]; sp += n;   } // exit subroutine
		else if (i == JMP  ) { int n = m[ip++]; ip += n;               } // goto
		else if (i == JZ   ) { int n = m[ip++]; if (!ax) ip += n;      } // goto if !ax
		else if (i == JNZ  ) { int n = m[ip++]; if (ax) ip += n;       } // goto if ax

		else { warn("unknown instruction: '%zd'\n", i); }

		if (ip && ip < static_cast<int>(code_loading_position + external_code_size)) {
			auto it = code_symbol_dict.find(ip - code_loading_position);
			if (it != code_symbol_dict.end()) {
				ax = call_ext(it->second, sp);
			}
		}
	}
	log<0>(COLOR_YELLOW "Total: %zd cycle(s), return %d\n" COLOR_NORMAL, cycle, ax);
	return ax;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r13
movl %edi, %r12d
movq 0xfb27(%rip), %rsi      # 0x24330
subq 0xfb18(%rip), %rsi      # 0x24328
sarq $0x2, %rsi
movq 0xfafd(%rip), %rdx      # 0x24318
subq 0xfaee(%rip), %rdx      # 0x24310
sarq $0x2, %rdx
leaq 0x8aad(%rip), %rdi      # 0x1d2da
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x15d39
movq 0xfaf2(%rip), %rax      # 0x24330
movq 0xfae3(%rip), %rcx      # 0x24328
subq %rcx, %rax
je 0x14870
sarq $0x2, %rax
movq 0xfa03(%rip), %rdx      # 0x24258
cmpq $0x1, %rax
adcq $0x0, %rax
xorl %r15d, %r15d
movl (%rcx,%r15,4), %esi
movl %esi, (%rdx,%r15,4)
incq %r15
cmpq %r15, %rax
jne 0x14860
movq 0xfaa1(%rip), %rax      # 0x24318
movq 0xfa92(%rip), %rcx      # 0x24310
subq %rcx, %rax
je 0x148ae
sarq $0x2, %rax
cmpq $0x1, %rax
adcq $0x0, %rax
leaq (,%r15,4), %rdx
addq 0xf9ba(%rip), %rdx      # 0x24258
xorl %esi, %esi
movl (%rcx,%rsi,4), %edi
movl %edi, (%rdx,%rsi,4)
incq %rsi
cmpq %rsi, %rax
jne 0x148a0
leaq -0x70(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x8a57(%rip), %rsi      # 0x1d314
leaq 0x8a54(%rip), %rdx      # 0x1d318
leaq -0x80(%rbp), %rbx
movq %rbx, %rdi
callq 0x16dc8
leaq 0xfb71(%rip), %rdi      # 0x24448
movq %rbx, %rsi
callq 0x19542
movq %rax, %rbx
movq -0x80(%rbp), %rdi
cmpq %r14, %rdi
je 0x148f7
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x31d0
testq %rbx, %rbx
je 0x1490f
movq 0x40(%rbx), %rax
cmpq $0x1, %rax
je 0x1491b
testq %rax, %rax
jne 0x1510c
leaq 0x8a03(%rip), %rdi      # 0x1d319
jmp 0x15113
movq 0x38(%rbx), %rsi
addq $0x8, %rsi
leaq 0xfa76(%rip), %rdi      # 0x243a0
callq 0x19586
movl 0x78(%rax), %eax
addl %r15d, %eax
movq %rax, -0x58(%rbp)
movl $0xfffff, %eax          # imm = 0xFFFFF
subl %r12d, %eax
movl %eax, -0x44(%rbp)
movq %r13, %rcx
movl %eax, %r13d
movl %r12d, -0x48(%rbp)
testl %r12d, %r12d
jle 0x149cd
movl -0x48(%rbp), %eax
movl %eax, %edx
movq %rdx, -0x40(%rbp)
cltq
shlq $0x2, %rax
movl $0x3ffffc, %edx         # imm = 0x3FFFFC
subq %rax, %rdx
movq %rdx, -0x30(%rbp)
xorl %r14d, %r14d
movl -0x44(%rbp), %eax
movl %eax, %r13d
movq (%rcx,%r14,8), %rbx
movq %rbx, %rdi
movq %rcx, %r12
callq 0x30f0
leaq 0x4(%rax), %rcx
shrq $0x2, %rcx
movq 0xf8c3(%rip), %rdx      # 0x24258
movslq %r13d, %r13
movl $0x0, -0x4(%rdx,%r13,4)
subl %ecx, %r13d
movq -0x30(%rbp), %rcx
addq %rdx, %rcx
movl %r13d, (%rcx,%r14,4)
movslq %r13d, %rcx
leaq (%rdx,%rcx,4), %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x3180
movq %r12, %rcx
incq %r14
cmpq %r14, -0x40(%rbp)
jne 0x14977
movq 0xf884(%rip), %rax      # 0x24258
movl $0x0, 0x3ffffc(%rax)
cmpl $0x2, 0xfbfb(%rip)      # 0x245e0
movslq %r13d, %rbx
movq %r15, -0x60(%rbp)
jle 0x14b43
movq %rbx, -0x50(%rbp)
leaq 0x8952(%rip), %rdi      # 0x1d34f
xorl %eax, %eax
callq 0x15504
movq %r13, -0x30(%rbp)
cmpl $0xfffff, %r13d         # imm = 0xFFFFF
jg 0x14b2a
movq -0x50(%rbp), %r13
leaq (,%r13,4), %r14
leaq 0x784e(%rip), %r12      # 0x1c276
leaq 0x893e(%rip), %rdi      # 0x1d36d
movl %r13d, %esi
xorl %eax, %eax
callq 0x15504
movl $0x4, %ebx
movq %r13, -0x40(%rbp)
leaq 0x8934(%rip), %r15      # 0x1d37d
cmpq $0xfffff, %r13          # imm = 0xFFFFF
jg 0x14a7c
movq 0xf7ff(%rip), %rax      # 0x24258
movzbl (%rax,%r13,4), %esi
movzbl 0x1(%rax,%r13,4), %edx
movzbl 0x2(%rax,%r13,4), %ecx
movzbl 0x3(%rax,%r13,4), %r8d
movq %r15, %rdi
xorl %eax, %eax
callq 0x15504
jmp 0x14a96
leaq 0x868c(%rip), %rdi      # 0x1d10f
movl $0xd, %esi
leaq 0x89f2(%rip), %rdx      # 0x1d481
xorl %eax, %eax
callq 0x15504
incq %r13
decq %rbx
jne 0x14a49
movq %r14, -0x38(%rbp)
movq %r14, %r13
xorl %ebx, %ebx
movq 0xf7aa(%rip), %r15      # 0x24258
addq %r13, %r15
xorl %r14d, %r14d
movzbl (%r15,%r14), %eax
leal -0x20(%rax), %ecx
cmpb $0x5f, %cl
jb 0x14ac6
movl $0x2e, %eax
movsbl %al, %esi
movq %r12, %rdi
xorl %eax, %eax
callq 0x15504
incq %r14
cmpq $0x4, %r14
jne 0x14ab4
cmpq $0x2, %rbx
ja 0x14afb
addq $0x4, %r13
movq -0x40(%rbp), %rax
addq %rbx, %rax
incq %rax
incq %rbx
cmpq $0x100000, %rax         # imm = 0x100000
jl 0x14aa7
leaq 0x8810(%rip), %rdi      # 0x1d312
xorl %eax, %eax
callq 0x15504
movq -0x40(%rbp), %rcx
leaq 0x4(%rcx), %r13
movq -0x38(%rbp), %r14
addq $0x10, %r14
cmpq $0xffffc, %rcx          # imm = 0xFFFFC
movq -0x60(%rbp), %r15
jl 0x14a28
leaq 0x8862(%rip), %rdi      # 0x1d393
movl -0x44(%rbp), %esi
xorl %eax, %eax
callq 0x15504
movq -0x30(%rbp), %r13
movq -0x50(%rbp), %rbx
leal -0x1(%r13), %ecx
movq 0xf70a(%rip), %rax      # 0x24258
movl %ecx, -0x38(%rbp)
movl %ecx, -0x4(%rax,%rbx,4)
leal -0x2(%r13), %ecx
movl $0x0, -0x8(%rax,%rbx,4)
movl -0x48(%rbp), %edx
movl %edx, -0xc(%rax,%rbx,4)
movl -0x44(%rbp), %edx
movl %edx, -0x10(%rax,%rbx,4)
addl $-0x5, %r13d
movl %ecx, -0x14(%rax,%rbx,4)
cmpl $0x3, 0xfa62(%rip)      # 0x245e0
jl 0x14bf0
leaq -0x1(%rbx), %rax
movq %rax, -0x40(%rbp)
leaq -0x2(%rbx), %r14
leaq -0x3(%rbx), %r15
leaq -0x4(%rbx), %r12
addq $-0x5, %rbx
leaq 0x8811(%rip), %rdi      # 0x1d3b0
xorl %eax, %eax
callq 0x15504
movq 0xf6ab(%rip), %rax      # 0x24258
movl (%rax,%rbx,4), %esi
movl (%rax,%r12,4), %edx
movl (%rax,%r15,4), %ecx
movq -0x60(%rbp), %r15
movl (%rax,%r14,4), %r8d
movq -0x40(%rbp), %rdi
movl (%rax,%rdi,4), %r9d
leaq 0x87fc(%rip), %rdi      # 0x1d3cb
xorl %eax, %eax
callq 0x15504
leaq 0x882a(%rip), %rdi      # 0x1d407
xorl %esi, %esi
movq -0x58(%rbp), %rdx
movl -0x38(%rbp), %ecx
movl %r13d, %r8d
xorl %eax, %eax
callq 0x15504
movq %r13, -0x30(%rbp)
movslq %r15d, %rax
movq %rax, -0x40(%rbp)
leaq 0x883a(%rip), %rdi      # 0x1d43c
movl $0x4, %esi
movl $0x8, %edx
xorl %eax, %eax
callq 0x15d39
xorl %r12d, %r12d
xorl %r13d, %r13d
movq -0x58(%rbp), %r14
incq %r12
cmpl $0x0, 0xf9b9(%rip)      # 0x245e0
movslq %r14d, %rbx
jle 0x14c6b
leaq 0x8849(%rip), %rdi      # 0x1d47c
movq %r12, %rsi
xorl %eax, %eax
callq 0x15504
leaq 0xf614(%rip), %rdi      # 0x24258
movq %rbx, %rsi
movq -0x40(%rbp), %rdx
callq 0x4bf4
cmpl $0x2, 0xf989(%rip)      # 0x245e0
jl 0x14c6b
movl %r13d, %edi
movl %r14d, %esi
movq -0x30(%rbp), %rdx
movl -0x38(%rbp), %ecx
callq 0x14109
movq %r14, %rdi
incl %r14d
movq 0xf5e0(%rip), %rax      # 0x24258
movl (%rax,%rbx,4), %ecx
cmpq $0x1f, %rcx
ja 0x14e91
leaq 0x7394(%rip), %rdx      # 0x1c020
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
addl $0x2, %edi
movslq %r14d, %rcx
jmp 0x14e3b
movq -0x30(%rbp), %rdx
movslq %edx, %rcx
incl %edx
movq %rdx, -0x30(%rbp)
xorl %edx, %edx
cmpl %r13d, (%rax,%rcx,4)
setne %dl
jmp 0x14f47
movq -0x30(%rbp), %rdx
movslq %edx, %rcx
incl %edx
movq %rdx, -0x30(%rbp)
movl (%rax,%rcx,4), %eax
cltd
idivl %r13d
jmp 0x14ee4
movq -0x30(%rbp), %rdx
movslq %edx, %rcx
incl %edx
movq %rdx, -0x30(%rbp)
movl (%rax,%rcx,4), %eax
subl %r13d, %eax
jmp 0x14ee4
movq -0x30(%rbp), %rdx
movslq %edx, %rcx
incl %edx
movq %rdx, -0x30(%rbp)
movslq (%rax,%rcx,4), %rcx
jmp 0x14d5e
movq -0x30(%rbp), %rdx
movslq %edx, %rcx
incl %edx
movq %rdx, -0x30(%rbp)
movslq (%rax,%rcx,4), %rcx
movl %r13d, (%rax,%rcx,4)
jmp 0x14f4a
addl $0x2, %edi
movslq %r14d, %rcx
movslq (%rax,%rcx,4), %rcx
movslq -0x38(%rbp), %rdx
addq %rcx, %rdx
movl (%rax,%rdx,4), %r13d
jmp 0x14e6e
notl %r13d
jmp 0x14f4a
movq -0x30(%rbp), %rdx
movslq %edx, %rcx
incl %edx
movq %rdx, -0x30(%rbp)
orl (%rax,%rcx,4), %r13d
jmp 0x14f4a
movq -0x30(%rbp), %rdx
movslq %edx, %rcx
incl %edx
movq %rdx, -0x30(%rbp)
movl (%rax,%rcx,4), %r13d
jmp 0x14f4a
movq -0x30(%rbp), %rdx
movslq %edx, %rcx
incl %edx
movq %rdx, -0x30(%rbp)
imull (%rax,%rcx,4), %r13d
jmp 0x14f4a
addl $0x2, %edi
movslq %r14d, %rcx
movslq (%rax,%rcx,4), %rcx
movl %r13d, (%rax,%rcx,4)
jmp 0x14e6e
addl $0x2, %edi
movslq %r14d, %rcx
movq -0x30(%rbp), %rdx
subl (%rax,%rcx,4), %edx
movq %rdx, -0x30(%rbp)
jmp 0x14e6e
xorl %ebx, %ebx
jmp 0x14ff1
movq -0x30(%rbp), %rdx
movslq %edx, %rcx
decl %edx
movq %rdx, -0x30(%rbp)
movl %r13d, -0x4(%rax,%rcx,4)
jmp 0x14f4a
movq -0x30(%rbp), %rdx
movslq %edx, %rcx
incl %edx
movq %rdx, -0x30(%rbp)
xorl %edx, %edx
cmpl %r13d, (%rax,%rcx,4)
setl %dl
jmp 0x14f47
movq -0x30(%rbp), %rdx
movslq %edx, %rcx
incl %edx
movq %rdx, -0x30(%rbp)
movl (%rax,%rcx,4), %eax
cltd
idivl %r13d
jmp 0x14f47
decl %r13d
jmp 0x14f4a
movq -0x30(%rbp), %rdx
movslq %edx, %rcx
incl %edx
movq %rdx, -0x30(%rbp)
movl (%rax,%rcx,4), %eax
movl %r13d, %ecx
sarl %cl, %eax
jmp 0x14ee4
movq -0x30(%rbp), %rdx
movslq %edx, %rcx
incl %edx
movq %rdx, -0x30(%rbp)
addl (%rax,%rcx,4), %r13d
jmp 0x14f4a
addl $0x2, %edi
movslq %r14d, %rcx
movslq (%rax,%rcx,4), %rcx
movl (%rax,%rcx,4), %r13d
jmp 0x14e6e
negl %r13d
jmp 0x14f4a
addl $0x2, %edi
movslq %r14d, %rcx
movslq (%rax,%rcx,4), %rcx
movslq -0x38(%rbp), %rdx
addq %rcx, %rdx
movl %r13d, (%rax,%rdx,4)
jmp 0x14e6e
addl $0x2, %edi
movslq %r14d, %rcx
movl (%rax,%rcx,4), %r13d
addl -0x38(%rbp), %r13d
movl %edi, %r14d
jmp 0x14f4a
movq -0x30(%rbp), %rdx
movslq %edx, %rcx
incl %edx
movq %rdx, -0x30(%rbp)
xorl %edx, %edx
cmpl %r13d, (%rax,%rcx,4)
setle %dl
jmp 0x14f47
leal -0x20(%rcx), %edx
cmpl $0x9, %edx
ja 0x150d0
leaq 0x71fc(%rip), %rsi      # 0x1c0a0
movslq (%rsi,%rdx,4), %rcx
addq %rsi, %rcx
jmpq *%rcx
movq -0x30(%rbp), %rdx
movslq %edx, %rcx
incl %edx
movq %rdx, -0x30(%rbp)
cmpl $0x0, (%rax,%rcx,4)
setne %al
testl %r13d, %r13d
setne %cl
andb %al, %cl
movzbl %cl, %r13d
jmp 0x14f4a
movq -0x30(%rbp), %rdx
movslq %edx, %rcx
incl %edx
movq %rdx, -0x30(%rbp)
movl (%rax,%rcx,4), %eax
movl %r13d, %ecx
shll %cl, %eax
movl %eax, %r13d
jmp 0x14f4a
incl %r13d
jmp 0x14f4a
movq -0x30(%rbp), %rdx
movslq %edx, %rcx
incl %edx
movq %rdx, -0x30(%rbp)
andl (%rax,%rcx,4), %r13d
jmp 0x14f4a
movq -0x30(%rbp), %rdx
movslq %edx, %rcx
incl %edx
movq %rdx, -0x30(%rbp)
xorl %edx, %edx
cmpl %r13d, (%rax,%rcx,4)
setge %dl
jmp 0x14f47
movq -0x30(%rbp), %rdx
movslq %edx, %rcx
incl %edx
movq %rdx, -0x30(%rbp)
xorl %edx, %edx
cmpl %r13d, (%rax,%rcx,4)
setg %dl
jmp 0x14f47
movq -0x30(%rbp), %rdx
movslq %edx, %rcx
incl %edx
movq %rdx, -0x30(%rbp)
xorl %edx, %edx
cmpl %r13d, (%rax,%rcx,4)
sete %dl
movl %edx, %r13d
movb $0x1, %bl
testl %r14d, %r14d
je 0x14ff1
movl 0xf3ed(%rip), %eax      # 0x24348
addl %r15d, %eax
cmpl %eax, %r14d
jge 0x14ff1
movl %r14d, %eax
subl %r15d, %eax
movslq %eax, %rcx
movq 0xf4a1(%rip), %r8       # 0x24418
movq %rcx, %rax
xorl %edx, %edx
divq %r8
movq %rdx, %rsi
movq 0xf487(%rip), %rax      # 0x24410
movq (%rax,%rdx,8), %rdx
movl $0x0, %eax
testq %rdx, %rdx
je 0x14fd0
movq (%rdx), %r9
movq %rdx, %rax
cmpq %rcx, 0x8(%r9)
je 0x14fd0
movq %r9, %r10
movq (%r9), %r9
testq %r9, %r9
je 0x14fce
movq 0x8(%r9), %rdi
movq %rdi, %rax
xorl %edx, %edx
divq %r8
movl $0x0, %eax
cmpq %rsi, %rdx
jne 0x14fd0
movq %r10, %rax
cmpq %rcx, %rdi
jne 0x14fa3
jmp 0x14fd0
xorl %eax, %eax
testq %rax, %rax
je 0x14fda
movq (%rax), %rdi
jmp 0x14fdc
xorl %edi, %edi
testq %rdi, %rdi
je 0x14ff1
addq $0x10, %rdi
movq -0x30(%rbp), %rsi
callq 0x143aa
movl %eax, %r13d
testb %bl, %bl
jne 0x14c1d
jmp 0x150f6
movl -0x38(%rbp), %edx
movslq %edx, %rcx
incl %edx
movq %rdx, -0x30(%rbp)
movl (%rax,%rcx,4), %eax
movl %eax, -0x38(%rbp)
jmp 0x14f4a
movl %r13d, %ecx
testl %r13d, %r13d
je 0x15023
movslq %r14d, %rcx
movl (%rax,%rcx,4), %ecx
leal (%rdi,%rcx), %r14d
addl $0x2, %r14d
jmp 0x14f4a
xorl %eax, %eax
testl %r13d, %r13d
sete %al
jmp 0x14ee4
movq -0x30(%rbp), %rdx
movslq %edx, %rcx
decl %edx
movl -0x38(%rbp), %esi
movl %esi, -0x4(%rax,%rcx,4)
addl $0x2, %edi
movslq %r14d, %rcx
movl %edx, -0x38(%rbp)
subl (%rax,%rcx,4), %edx
movl %edx, %eax
movq %rax, -0x30(%rbp)
jmp 0x14e6e
movslq %r14d, %rcx
movl (%rax,%rcx,4), %eax
leal (%rdi,%rax), %r14d
addl $0x2, %r14d
jmp 0x14f4a
movq -0x30(%rbp), %rdx
movslq %edx, %rcx
incl %edx
movq %rdx, -0x30(%rbp)
xorl %edx, %edx
orl (%rax,%rcx,4), %r13d
jmp 0x14cb3
addl $0x2, %edi
movslq %r14d, %rcx
movq -0x30(%rbp), %rsi
movslq %esi, %rdx
decl %esi
movq %rsi, -0x30(%rbp)
movl (%rax,%rcx,4), %r14d
addl %edi, %r14d
movl %edi, -0x4(%rax,%rdx,4)
jmp 0x14f4a
movslq %r14d, %rcx
movl (%rax,%rcx,4), %ecx
movq -0x30(%rbp), %rsi
movslq %esi, %rdx
movl (%rax,%rdx,4), %r14d
addl %ecx, %esi
incl %esi
movq %rsi, -0x30(%rbp)
jmp 0x14f4a
movslq %ecx, %rsi
leaq 0x83a8(%rip), %rdi      # 0x1d482
xorl %eax, %eax
callq 0x15dd2
jmp 0x14f4a
xorl %ecx, %ecx
testl %r13d, %r13d
je 0x1501d
jmp 0x15023
leaq 0x83a1(%rip), %rdi      # 0x1d49e
movq %r12, %rsi
movl %r13d, %edx
xorl %eax, %eax
callq 0x15504
jmp 0x15120
leaq 0x821b(%rip), %rdi      # 0x1d32e
xorl %eax, %eax
callq 0x1585f
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movl %r13d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x80(%rbp), %rdi
cmpq %r14, %rdi
je 0x1514a
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x31d0
movq %rbx, %rdi
callq 0x3320