// File: /workspace/github_cpp_makefile_star2_O1/Matan-Vinkler[P]Basic-File-System/myfs_main.cpp
// Function: main
int main(int argc, char **argv) {

	if (argc != 2) {
		std::cerr << "Please provide the file to operate on" << std::endl;
		return -1;
	}

	BlockDeviceSimulator *blkdevptr = new BlockDeviceSimulator(argv[1]);
	MyFs myfs(blkdevptr);
	bool exit = false;

	std::cout << "Welcome to " << FS_NAME << std::endl;
	std::cout << "To get help, please type 'help' on the prompt below." << std::endl;
	std::cout << std::endl;

	while (!exit) {
		try {
			std::string cmdline;
			std::cout << FS_NAME << "$ ";
			std::getline(std::cin, cmdline, '\n');
			if (cmdline == std::string(""))
				continue;

			std::vector<std::string> cmd = split_cmd(cmdline);

			if (cmd[0] == LIST_CMD) {
				MyFs::dir_list dlist;
				if (cmd.size() == 1)
					dlist = myfs.list_dir("/");
				else if (cmd.size() == 2)
					dlist = myfs.list_dir(cmd[1]);
				else
					std::cout << LIST_CMD << ": one or zero arguments requested" << std::endl;

				for (size_t i=0; i < dlist.size(); i++) {
					std::cout << std::setw(15) << std::left
						<< dlist[i].name + (dlist[i].is_dir ? "/":"")
						<< std::setw(10) << std::right
						<< dlist[i].file_size << std::endl;
				}
			} else if (cmd[0] == EXIT_CMD) {
				exit = true;
			} else if (cmd[0] == HELP_CMD) {
				std::cout << HELP_STRING;
			} else if (cmd[0] == CREATE_FILE_CMD) {
				if (cmd.size() == 2)
					myfs.create_file(cmd[1], false);
				else
					std::cout << CREATE_FILE_CMD << ": file path requested" << std::endl;
			} else if (cmd[0] == CONTENT_CMD) {
				if (cmd.size() == 2)
					std::cout << myfs.get_content(cmd[1]) << std::endl;
				else
					std::cout << CONTENT_CMD << ": file path requested" << std::endl;
			} else if (cmd[0] == TREE_CMD) {
				recursive_print(myfs, "");
			} else if (cmd[0] == EDIT_CMD) {
				if (cmd.size() == 2) {
					std::cout << "Enter new file content" << std::endl;
					std::string content;
					std::string curr_line;
					std::getline(std::cin, curr_line);
					while (curr_line != "") {
						content += curr_line + "\n";
						std::getline(std::cin, curr_line);
					}
					myfs.set_content(cmd[1], content);
				} else {
					std::cout << EDIT_CMD << ": file path requested" << std::endl;
				}
			} else if (cmd[0] == CREATE_DIR_CMD) {
				if (cmd.size() == 2)
					myfs.create_file(cmd[1], true);
				else
					std::cout << CREATE_DIR_CMD << ": one argument requested" << std::endl;
			} else {
				std::cout << "unknown command: " << cmd[0] << std::endl;
			}
		} catch (std::runtime_error &e) {
			std::cout << e.what() << std::endl;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
cmpl $0x2, %edi
jne 0x4fe3
movq %rsi, %r14
movl $0x10, %edi
callq 0x2210
movq %rax, %rbx
movq 0x8(%r14), %rsi
leaq -0x248(%rbp), %rdi
leaq -0xe8(%rbp), %rdx
callq 0x5514
leaq -0x248(%rbp), %rsi
movq %rbx, %rdi
callq 0x2f8c
leaq -0x238(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3f97
movq -0x238(%rbp), %rsi
incq %rsi
callq 0x2220
leaq -0xe8(%rbp), %rdi
movq %rbx, %rsi
callq 0x337c
movq 0x5013(%rip), %rdi      # 0x8fc0
leaq 0x227b(%rip), %rsi      # 0x622f
movl $0xb, %edx
callq 0x2240
movq 0x522b(%rip), %rsi      # 0x91f0
movq 0x522c(%rip), %rdx      # 0x91f8
movq 0x4fed(%rip), %rdi      # 0x8fc0
callq 0x2240
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
movq 0x4fb7(%rip), %rbx      # 0x8fc0
leaq 0x222b(%rip), %rsi      # 0x623b
movl $0x34, %edx
movq %rbx, %rdi
callq 0x2240
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq 0x4f85(%rip), %rbx      # 0x8fc0
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq 0x4f57(%rip), %rdi      # 0x8fc0
callq 0x2030
movq %rax, %rdi
callq 0x2170
leaq -0x40(%rbp), %r13
movq $0x0, -0x30(%rbp)
leaq -0xa0(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq $0x0, -0xa8(%rbp)
movb $0x0, -0xa0(%rbp)
movq 0x5147(%rip), %rsi      # 0x91f0
movq 0x5148(%rip), %rdx      # 0x91f8
movq 0x4f09(%rip), %rdi      # 0x8fc0
callq 0x2240
movl $0x2, %edx
movq %rax, %rdi
leaq 0x21a5(%rip), %rsi      # 0x6270
callq 0x2240
movq 0x4ef9(%rip), %rdi      # 0x8fd0
leaq -0xb0(%rbp), %rsi
movl $0xa, %edx
callq 0x2320
movq %r13, -0x50(%rbp)
leaq -0x50(%rbp), %rdi
leaq 0x20fb(%rip), %rdx      # 0x61f2
movq %rdx, %rsi
callq 0x32e2
movq -0xa8(%rbp), %rdx
cmpq -0x48(%rbp), %rdx
jne 0x4129
testq %rdx, %rdx
je 0x412e
movq -0x50(%rbp), %rsi
movq -0xb0(%rbp), %rdi
callq 0x2230
testl %eax, %eax
sete %r14b
jmp 0x4131
xorl %r14d, %r14d
jmp 0x4131
movb $0x1, %r14b
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0x4146
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2220
testb %r14b, %r14b
jne 0x4c58
leaq -0x218(%rbp), %rax
movq %rax, -0x228(%rbp)
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
addq %rsi, %rdx
leaq -0x228(%rbp), %rbx
movq %rbx, %rdi
callq 0x39ec
leaq -0xc8(%rbp), %rdi
movq %rbx, %rsi
callq 0x3e20
movq -0x228(%rbp), %rdi
leaq -0x218(%rbp), %rax
cmpq %rax, %rdi
je 0x41ae
movq -0x218(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0xc8(%rbp), %r14
movq 0x8(%r14), %r15
movq 0x5058(%rip), %r12      # 0x9218
cmpq %r12, %r15
jne 0x41e8
testq %r15, %r15
je 0x4379
movq 0x503b(%rip), %rsi      # 0x9210
movq (%r14), %rdi
movq %r15, %rdx
callq 0x2230
testl %eax, %eax
je 0x4379
cmpq 0x5109(%rip), %r15      # 0x92f8
jne 0x4217
movb $0x1, %r12b
testq %r15, %r15
je 0x4c45
movq 0x50ec(%rip), %rsi      # 0x92f0
movq (%r14), %rdi
movq %r15, %rdx
callq 0x2230
testl %eax, %eax
je 0x4c45
cmpq 0x50ba(%rip), %r15      # 0x92d8
jne 0x4243
testq %r15, %r15
je 0x445f
movq 0x50a0(%rip), %rsi      # 0x92d0
movq (%r14), %rdi
movq %r15, %rdx
callq 0x2230
testl %eax, %eax
je 0x445f
movq 0x500e(%rip), %r12      # 0x9258
cmpq %r12, %r15
jne 0x4272
testq %r15, %r15
je 0x447e
movq 0x4ff1(%rip), %rsi      # 0x9250
movq (%r14), %rdi
movq %r15, %rdx
callq 0x2230
testl %eax, %eax
je 0x447e
movq 0x4fbf(%rip), %r12      # 0x9238
cmpq %r12, %r15
jne 0x42a1
testq %r15, %r15
je 0x4743
movq 0x4fa2(%rip), %rsi      # 0x9230
movq (%r14), %rdi
movq %r15, %rdx
callq 0x2230
testl %eax, %eax
je 0x4743
cmpq 0x5010(%rip), %r15      # 0x92b8
jne 0x42cd
testq %r15, %r15
je 0x484e
movq 0x4ff6(%rip), %rsi      # 0x92b0
movq (%r14), %rdi
movq %r15, %rdx
callq 0x2230
testl %eax, %eax
je 0x484e
movq 0x4fc4(%rip), %r12      # 0x9298
cmpq %r12, %r15
jne 0x42fc
testq %r15, %r15
je 0x4939
movq 0x4fa7(%rip), %rsi      # 0x9290
movq (%r14), %rdi
movq %r15, %rdx
callq 0x2230
testl %eax, %eax
je 0x4939
movq 0x4f75(%rip), %r12      # 0x9278
cmpq %r12, %r15
jne 0x432b
testq %r15, %r15
je 0x4a95
movq 0x4f58(%rip), %rsi      # 0x9270
movq (%r14), %rdi
movq %r15, %rdx
callq 0x2230
testl %eax, %eax
je 0x4a95
movl $0x11, %edx
movq 0x4c89(%rip), %rdi      # 0x8fc0
leaq 0x1f9f(%rip), %rsi      # 0x62dd
callq 0x2240
movq -0xc8(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq 0x4c68(%rip), %rdi      # 0x8fc0
callq 0x2240
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21f0
jmp 0x4b4a
xorps %xmm0, %xmm0
movaps %xmm0, -0x70(%rbp)
movq $0x0, -0x60(%rbp)
movq -0xc0(%rbp), %rax
subq %r14, %rax
sarq $0x5, %rax
cmpq $0x2, %rax
je 0x44ef
cmpq $0x1, %rax
jne 0x45a2
leaq -0x1f8(%rbp), %rax
movq %rax, -0x208(%rbp)
leaq -0x208(%rbp), %r14
movq %r14, %rdi
leaq 0x1eaa(%rip), %rsi      # 0x6273
leaq 0x1ea4(%rip), %rdx      # 0x6274
callq 0x32e2
leaq -0x90(%rbp), %rbx
movq %rbx, %rdi
leaq -0xe8(%rbp), %rsi
movq %r14, %rdx
callq 0x387e
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
movaps -0x70(%rbp), %xmm0
movq -0x60(%rbp), %rax
movups -0x90(%rbp), %xmm1
movaps %xmm1, -0x70(%rbp)
movq -0x80(%rbp), %rcx
movq %rcx, -0x60(%rbp)
movaps -0x50(%rbp), %xmm1
movaps %xmm0, -0x50(%rbp)
movq %rax, -0x40(%rbp)
movups %xmm1, -0x90(%rbp)
movq $0x0, -0x80(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x3930
movq %rbx, %rdi
callq 0x3930
movq -0x208(%rbp), %rdi
leaq -0x1f8(%rbp), %rax
cmpq %rax, %rdi
je 0x45f6
movq -0x1f8(%rbp), %rsi
jmp 0x4598
movq 0x4eaa(%rip), %rsi      # 0x9310
movq 0x4eab(%rip), %rdx      # 0x9318
movq 0x4b4c(%rip), %rdi      # 0x8fc0
callq 0x2240
jmp 0x4c3e
movq -0xc0(%rbp), %rax
subq %r14, %rax
cmpq $0x40, %rax
jne 0x4808
leaq -0x158(%rbp), %rax
movq %rax, -0x168(%rbp)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
leaq -0x168(%rbp), %rdi
callq 0x39ec
leaq -0xe8(%rbp), %rdi
leaq -0x168(%rbp), %rsi
xorl %edx, %edx
callq 0x3514
movq -0x168(%rbp), %rdi
leaq -0x158(%rbp), %rax
cmpq %rax, %rdi
je 0x4c3e
movq -0x158(%rbp), %rsi
jmp 0x4c36
leaq -0x1d8(%rbp), %rax
movq %rax, -0x1e8(%rbp)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
leaq -0x1e8(%rbp), %rbx
movq %rbx, %rdi
callq 0x39ec
leaq -0x90(%rbp), %r14
movq %r14, %rdi
leaq -0xe8(%rbp), %rsi
movq %rbx, %rdx
callq 0x387e
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
movaps -0x70(%rbp), %xmm0
movq -0x60(%rbp), %rax
movups -0x90(%rbp), %xmm1
movaps %xmm1, -0x70(%rbp)
movq -0x80(%rbp), %rcx
movq %rcx, -0x60(%rbp)
movaps -0x50(%rbp), %xmm1
movaps %xmm0, -0x50(%rbp)
movq %rax, -0x40(%rbp)
movups %xmm1, -0x90(%rbp)
movq $0x0, -0x80(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x3930
movq %r14, %rdi
callq 0x3930
movq -0x1e8(%rbp), %rdi
leaq -0x1d8(%rbp), %rax
cmpq %rax, %rdi
je 0x45f6
movq -0x1d8(%rbp), %rsi
incq %rsi
callq 0x2220
jmp 0x45f6
movq 0x4c67(%rip), %rsi      # 0x9210
movq 0x4a10(%rip), %rdi      # 0x8fc0
movq %r12, %rdx
callq 0x2240
movq %rax, %r15
movl $0x21, %edx
movq %rax, %rdi
leaq 0x1cab(%rip), %rsi      # 0x6275
callq 0x2240
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
movq -0x70(%rbp), %rax
cmpq %rax, -0x68(%rbp)
je 0x4735
xorl %r14d, %r14d
xorl %r12d, %r12d
movq 0x49af(%rip), %rsi      # 0x8fc0
movq (%rsi), %rcx
movq -0x18(%rcx), %rdx
movq $0xf, 0x10(%rsi,%rdx)
movq -0x18(%rcx), %rcx
movl 0x18(%rsi,%rcx), %edx
movl $0xffffff4f, %edi       # imm = 0xFFFFFF4F
andl %edi, %edx
orl $0x20, %edx
movl %edx, 0x18(%rsi,%rcx)
movb 0x20(%rax,%r14), %r15b
movq %r13, %rbx
movq %r13, -0x50(%rbp)
movq (%rax,%r14), %rsi
movq 0x8(%rax,%r14), %rdx
addq %rsi, %rdx
leaq -0x50(%rbp), %r13
movq %r13, %rdi
callq 0x39ec
testb %r15b, %r15b
leaq 0x1b8d(%rip), %rsi      # 0x61f2
leaq 0x1c07(%rip), %rax      # 0x6273
cmovneq %rax, %rsi
movq %r13, %rdi
callq 0x2350
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq 0x4939(%rip), %rdi      # 0x8fc0
movq %rbx, %r13
callq 0x2240
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq $0xa, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
movl $0xffffff4f, %esi       # imm = 0xFFFFFF4F
andl %esi, %edx
orl $0x80, %edx
movl %edx, 0x18(%rax,%rcx)
movq -0x70(%rbp), %rcx
movl 0x24(%rcx,%r14), %esi
movq %rax, %rdi
callq 0x22e0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0x4708
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2220
incq %r12
movq -0x70(%rbp), %rax
movq -0x68(%rbp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x71c71c71c71c71c7, %rdx # imm = 0x8E38E38E38E38E39
imulq %rdx, %rcx
addq $0x48, %r14
cmpq %rcx, %r12
jb 0x460a
leaq -0x70(%rbp), %rdi
callq 0x3930
jmp 0x4c3e
movq -0xc0(%rbp), %rax
subq %r14, %rax
cmpq $0x40, %rax
jne 0x48f3
leaq -0x1b8(%rbp), %rax
movq %rax, -0x1c8(%rbp)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
leaq -0x1c8(%rbp), %rbx
movq %rbx, %rdi
callq 0x39ec
leaq -0x50(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
movq %rbx, %rdx
callq 0x35bc
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq 0x481f(%rip), %rdi      # 0x8fc0
callq 0x2240
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0x47e5
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x1c8(%rbp), %rdi
leaq -0x1b8(%rbp), %rax
cmpq %rax, %rdi
je 0x4c3e
movq -0x1b8(%rbp), %rsi
jmp 0x4c36
movq 0x4a41(%rip), %rsi      # 0x9250
movq 0x47aa(%rip), %rdi      # 0x8fc0
movq %r12, %rdx
callq 0x2240
movq %rax, %r15
movl $0x15, %edx
movq %rax, %rdi
leaq 0x1a67(%rip), %rsi      # 0x6297
callq 0x2240
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21f0
jmp 0x4b4a
leaq -0x138(%rbp), %rax
movq %rax, -0x148(%rbp)
leaq -0x148(%rbp), %rdi
leaq 0x1988(%rip), %r14      # 0x61f2
movq %r14, %rsi
movq %r14, %rdx
callq 0x32e2
leaq -0x198(%rbp), %rax
movq %rax, -0x1a8(%rbp)
leaq -0x1a8(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x32e2
leaq -0xe8(%rbp), %rdi
leaq -0x148(%rbp), %rsi
movq %rbx, %rdx
callq 0x50ad
movq -0x1a8(%rbp), %rdi
leaq -0x198(%rbp), %rax
cmpq %rax, %rdi
je 0x48d0
movq -0x198(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x148(%rbp), %rdi
leaq -0x138(%rbp), %rax
cmpq %rax, %rdi
je 0x4c3e
movq -0x138(%rbp), %rsi
jmp 0x4c36
movq 0x4936(%rip), %rsi      # 0x9230
movq 0x46bf(%rip), %rdi      # 0x8fc0
movq %r12, %rdx
callq 0x2240
movq %rax, %r15
movl $0x15, %edx
movq %rax, %rdi
leaq 0x197c(%rip), %rsi      # 0x6297
callq 0x2240
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21f0
jmp 0x4b4a
movq -0xc0(%rbp), %rax
subq %r14, %rax
cmpq $0x40, %rax
jne 0x4b09
movl $0x16, %edx
movq 0x4667(%rip), %rdi      # 0x8fc0
leaq 0x194d(%rip), %rsi      # 0x62ad
callq 0x2240
movq 0x4654(%rip), %rcx      # 0x8fc0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq 0x4636(%rip), %rdi      # 0x8fc0
callq 0x2030
movq %rax, %rdi
callq 0x2170
movq %r13, -0x50(%rbp)
xorl %ecx, %ecx
movq %rcx, -0x48(%rbp)
movb %cl, -0x40(%rbp)
leaq -0x60(%rbp), %rax
movq %rax, -0x70(%rbp)
movq %rcx, -0x68(%rbp)
movb %cl, -0x60(%rbp)
movq 0x4616(%rip), %rcx      # 0x8fd0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %edx
movq 0x45f8(%rip), %rdi      # 0x8fd0
leaq -0x70(%rbp), %rsi
callq 0x2320
leaq -0x70(%rbp), %rbx
movq %rbx, %rdi
leaq 0x1803(%rip), %rsi      # 0x61f2
callq 0x2070
testl %eax, %eax
je 0x4b62
leaq -0x80(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
addq %rsi, %rdx
leaq -0x90(%rbp), %rbx
movq %rbx, %rdi
callq 0x39ec
movq %rbx, %rdi
leaq 0x17c6(%rip), %rsi      # 0x61f1
callq 0x2350
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
leaq -0x50(%rbp), %rdi
callq 0x2080
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x4a63
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2220
movq 0x4566(%rip), %r14      # 0x8fd0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
leaq -0x70(%rbp), %rbx
callq 0x21f0
movsbl %al, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2320
jmp 0x49e5
movq -0xc0(%rbp), %rax
subq %r14, %rax
cmpq $0x40, %rax
jne 0x4c89
leaq -0xf8(%rbp), %rax
movq %rax, -0x108(%rbp)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
leaq -0x108(%rbp), %rdi
callq 0x39ec
leaq -0xe8(%rbp), %rdi
leaq -0x108(%rbp), %rsi
movl $0x1, %edx
callq 0x3514
movq -0x108(%rbp), %rdi
leaq -0xf8(%rbp), %rax
cmpq %rax, %rdi
je 0x4c3e
movq -0xf8(%rbp), %rsi
jmp 0x4c36
movq 0x4780(%rip), %rsi      # 0x9290
movq 0x44a9(%rip), %rdi      # 0x8fc0
movq %r12, %rdx
callq 0x2240
movq %rax, %r15
movl $0x15, %edx
movq %rax, %rdi
leaq 0x1766(%rip), %rsi      # 0x6297
callq 0x2240
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
jmp 0x4c3e
movq -0xc8(%rbp), %rax
leaq -0x118(%rbp), %rcx
movq %rcx, -0x128(%rbp)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq -0x128(%rbp), %rdi
callq 0x39ec
leaq -0x178(%rbp), %rax
movq %rax, -0x188(%rbp)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
leaq -0x188(%rbp), %rbx
movq %rbx, %rdi
callq 0x39ec
leaq -0xe8(%rbp), %rdi
leaq -0x128(%rbp), %rsi
movq %rbx, %rdx
callq 0x36d4
movq -0x188(%rbp), %rdi
leaq -0x178(%rbp), %rax
cmpq %rax, %rdi
je 0x4bee
movq -0x178(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x128(%rbp), %rdi
leaq -0x118(%rbp), %rax
cmpq %rax, %rdi
je 0x4c10
movq -0x118(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x4c29
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0x4c3e
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x30(%rbp), %rax
movl %eax, %r12d
leaq -0xc8(%rbp), %rdi
callq 0x5630
movl %r12d, %eax
movq %rax, -0x30(%rbp)
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x4c7a
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x2220
testb $0x1, -0x30(%rbp)
je 0x4082
jmp 0x502c
movq 0x45e0(%rip), %rsi      # 0x9270
movq 0x4329(%rip), %rdi      # 0x8fc0
movq %r12, %rdx
callq 0x2240
movq %rax, %r15
movl $0x18, %edx
movq %rax, %rdi
leaq 0x1613(%rip), %rsi      # 0x62c4
callq 0x2240
movq %r15, %rdi
callq 0x2110
jmp 0x4c3e
movq %rdx, %r15
movq %rax, %r14
movq -0x108(%rbp), %rdi
leaq -0xf8(%rbp), %rax
cmpq %rax, %rdi
je 0x4f79
movq -0xf8(%rbp), %rsi
jmp 0x4f11
movq %rdx, %r15
movq %rax, %r14
movq -0x188(%rbp), %rdi
leaq -0x178(%rbp), %rax
cmpq %rax, %rdi
je 0x4d1c
movq -0x178(%rbp), %rsi
incq %rsi
callq 0x2220
jmp 0x4d1c
movq %rdx, %r15
movq %rax, %r14
movq -0x128(%rbp), %rdi
leaq -0x118(%rbp), %rax
cmpq %rax, %rdi
je 0x4eeb
movq -0x118(%rbp), %rsi
jmp 0x4ea6
movq %r13, %rbx
movq %rdx, %r15
movq %rax, %r14
jmp 0x4e55
movq %r13, %rbx
movq %rdx, %r15
movq %rax, %r14
jmp 0x4e77
movq %rdx, %r15
movq %rax, %r14
movq -0x1a8(%rbp), %rdi
leaq -0x198(%rbp), %rax
cmpq %rax, %rdi
je 0x4d8b
movq -0x198(%rbp), %rsi
incq %rsi
callq 0x2220
jmp 0x4d8b
movq %rdx, %r15
movq %rax, %r14
movq -0x148(%rbp), %rdi
leaq -0x138(%rbp), %rax
cmpq %rax, %rdi
je 0x4f79
movq -0x138(%rbp), %rsi
jmp 0x4f11
jmp 0x4f1b
movq %rdx, %r15
movq %rax, %r14
movq -0x168(%rbp), %rdi
leaq -0x158(%rbp), %rax
cmpq %rax, %rdi
je 0x4f79
movq -0x158(%rbp), %rsi
jmp 0x4f11
jmp 0x4ee5
movq %rdx, %r15
movq %rax, %r14
movq -0x1e8(%rbp), %rdi
leaq -0x1d8(%rbp), %rax
cmpq %rax, %rdi
je 0x4f70
movq -0x1d8(%rbp), %rsi
jmp 0x4f68
movq %rdx, %r15
movq %rax, %r14
movq -0x208(%rbp), %rdi
leaq -0x1f8(%rbp), %rax
cmpq %rax, %rdi
je 0x4f70
movq -0x1f8(%rbp), %rsi
jmp 0x4f68
jmp 0x4e7f
jmp 0x4e7f
movq %rdx, %r15
movq %rax, %r14
movq -0x50(%rbp), %rdi
movq %r13, %rbx
cmpq %r13, %rdi
je 0x4e55
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x1c8(%rbp), %rdi
leaq -0x1b8(%rbp), %rax
cmpq %rax, %rdi
je 0x4e77
movq -0x1b8(%rbp), %rsi
incq %rsi
callq 0x2220
movq %rbx, %r13
jmp 0x4f79
movq %rdx, %r15
movq %rax, %r14
jmp 0x4f70
jmp 0x4e8c
movq %rdx, %r15
movq %rax, %r14
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x4eeb
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2220
jmp 0x4eeb
jmp 0x4ee5
movq %rdx, %r15
movq %rax, %r14
movq -0x228(%rbp), %rdi
leaq -0x218(%rbp), %rax
cmpq %rax, %rdi
je 0x4f85
movq -0x218(%rbp), %rsi
incq %rsi
callq 0x2220
jmp 0x4f85
jmp 0x4f25
movq %rdx, %r15
movq %rax, %r14
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x4f04
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0x4f79
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2220
jmp 0x4f79
movq %rdx, %r15
movq %rax, %r14
jmp 0x4f79
jmp 0x4f25
movq %rdx, %r15
movq %rax, %r14
jmp 0x4f85
movq %rdx, %r15
movq %rax, %r14
jmp 0x4f50
movq %rdx, %r15
movq %rax, %r14
movq -0x50(%rbp), %rdi
cmpq %rbx, %rdi
je 0x4f50
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2220
movq %rbx, %r13
jmp 0x4f70
movq %rdx, %r15
movq %rax, %r14
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0x4f70
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2220
leaq -0x70(%rbp), %rdi
callq 0x3930
leaq -0xc8(%rbp), %rdi
callq 0x5630
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x4fa7
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x2220
cmpl $0x1, %r15d
jne 0x5099
movq %r14, %rdi
callq 0x20e0
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
movq 0x3ff7(%rip), %rdi      # 0x8fc0
movq %rax, %rsi
callq 0x2200
movq %rax, %rdi
callq 0x2110
callq 0x22b0
jmp 0x4c7a
movq 0x3ffe(%rip), %rbx      # 0x8fe8
leaq 0x1218(%rip), %rsi      # 0x6209
movl $0x25, %edx
movq %rbx, %rdi
callq 0x2240
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x503a
leaq -0xe0(%rbp), %rdi
callq 0x3930
xorl %eax, %eax
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5096
movq %rax, %r14
callq 0x22b0
jmp 0x5099
movq %rax, %rdi
callq 0x32d4
movq %rax, %r14
leaq -0x238(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5087
movq -0x238(%rbp), %rsi
incq %rsi
callq 0x2220
jmp 0x5087
movq %rax, %r14
movl $0x10, %esi
movq %rbx, %rdi
callq 0x2220
jmp 0x50a5
movq %rax, %r14
leaq -0xe0(%rbp), %rdi
callq 0x3930
movq %r14, %rdi
callq 0x22f0