// File: /workspace/github_cpp_makefile_star2_O3/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 0x4f65
movq %rsi, %r14
movl $0x10, %edi
callq 0x2210
movq %rax, %rbx
movq 0x8(%r14), %rsi
leaq -0x248(%rbp), %rdi
leaq -0xe8(%rbp), %rdx
callq 0x5496
leaq -0x248(%rbp), %rsi
movq %rbx, %rdi
callq 0x2f8c
leaq -0x238(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3f37
movq -0x238(%rbp), %rsi
incq %rsi
callq 0x2220
leaq -0xe8(%rbp), %rdi
movq %rbx, %rsi
callq 0x3390
movq 0x5073(%rip), %rdi      # 0x8fc0
leaq 0x22db(%rip), %rsi      # 0x622f
movl $0xb, %edx
callq 0x2240
movq 0x528b(%rip), %rsi      # 0x91f0
movq 0x528c(%rip), %rdx      # 0x91f8
movq 0x504d(%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 0x5017(%rip), %rbx      # 0x8fc0
leaq 0x228b(%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 0x4fe5(%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 0x4fb7(%rip), %rdi      # 0x8fc0
callq 0x2030
movq %rax, %rdi
callq 0x2170
leaq -0x38(%rbp), %r12
leaq -0xa0(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq $0x0, -0xa8(%rbp)
movb $0x0, -0xa0(%rbp)
movq 0x51af(%rip), %rsi      # 0x91f0
movq 0x51b0(%rip), %rdx      # 0x91f8
movq 0x4f71(%rip), %rdi      # 0x8fc0
callq 0x2240
movl $0x2, %edx
movq %rax, %rdi
leaq 0x220d(%rip), %rsi      # 0x6270
callq 0x2240
movq 0x4f61(%rip), %rdi      # 0x8fd0
leaq -0xb0(%rbp), %rsi
movl $0xa, %edx
callq 0x2320
movq %r12, -0x48(%rbp)
leaq -0x48(%rbp), %rdi
leaq 0x2163(%rip), %rdx      # 0x61f2
movq %rdx, %rsi
callq 0x32f2
movq -0xa8(%rbp), %rdx
cmpq -0x40(%rbp), %rdx
jne 0x40c4
movq -0x48(%rbp), %r15
testq %rdx, %rdx
je 0x40cd
movq -0xb0(%rbp), %rdi
movq %r15, %rsi
callq 0x2230
testl %eax, %eax
sete %r14b
jmp 0x40d0
movq -0x48(%rbp), %r15
xorl %r14d, %r14d
jmp 0x40d0
movb $0x1, %r14b
cmpq %r12, %r15
je 0x40e4
movq -0x38(%rbp), %rsi
incq %rsi
movq %r15, %rdi
callq 0x2220
movq -0xb0(%rbp), %rax
testb %r14b, %r14b
je 0x40f8
xorl %r14d, %r14d
jmp 0x4be2
leaq -0x218(%rbp), %rcx
movq %rcx, -0x228(%rbp)
movq -0xa8(%rbp), %rdx
addq %rax, %rdx
leaq -0x228(%rbp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3988
leaq -0xc8(%rbp), %rdi
movq %rbx, %rsi
callq 0x3dc0
movq -0x228(%rbp), %rdi
leaq -0x218(%rbp), %rax
cmpq %rax, %rdi
je 0x4153
movq -0x218(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0xc8(%rbp), %r13
movq 0x8(%r13), %r15
cmpq 0x50b3(%rip), %r15      # 0x9218
jne 0x418b
testq %r15, %r15
je 0x4317
movq 0x5099(%rip), %rsi      # 0x9210
movq (%r13), %rdi
movq %r15, %rdx
callq 0x2230
testl %eax, %eax
je 0x4317
cmpq 0x5166(%rip), %r15      # 0x92f8
jne 0x41bb
movb $0x1, %r14b
testq %r15, %r15
je 0x4bcf
movq 0x5149(%rip), %rsi      # 0x92f0
movq (%r13), %rdi
movq %r15, %rdx
callq 0x2230
testl %eax, %eax
je 0x4bcf
cmpq 0x5116(%rip), %r15      # 0x92d8
jne 0x41e8
testq %r15, %r15
je 0x43f5
movq 0x50fc(%rip), %rsi      # 0x92d0
movq (%r13), %rdi
movq %r15, %rdx
callq 0x2230
testl %eax, %eax
je 0x43f5
cmpq 0x5069(%rip), %r15      # 0x9258
jne 0x4215
testq %r15, %r15
je 0x4414
movq 0x504f(%rip), %rsi      # 0x9250
movq (%r13), %rdi
movq %r15, %rdx
callq 0x2230
testl %eax, %eax
je 0x4414
cmpq 0x501c(%rip), %r15      # 0x9238
jne 0x4242
testq %r15, %r15
je 0x46d1
movq 0x5002(%rip), %rsi      # 0x9230
movq (%r13), %rdi
movq %r15, %rdx
callq 0x2230
testl %eax, %eax
je 0x46d1
cmpq 0x506f(%rip), %r15      # 0x92b8
jne 0x426f
testq %r15, %r15
je 0x47dc
movq 0x5055(%rip), %rsi      # 0x92b0
movq (%r13), %rdi
movq %r15, %rdx
callq 0x2230
testl %eax, %eax
je 0x47dc
cmpq 0x5022(%rip), %r15      # 0x9298
jne 0x429c
testq %r15, %r15
je 0x48c7
movq 0x5008(%rip), %rsi      # 0x9290
movq (%r13), %rdi
movq %r15, %rdx
callq 0x2230
testl %eax, %eax
je 0x48c7
cmpq 0x4fd5(%rip), %r15      # 0x9278
jne 0x42c9
testq %r15, %r15
je 0x4a23
movq 0x4fbb(%rip), %rsi      # 0x9270
movq (%r13), %rdi
movq %r15, %rdx
callq 0x2230
testl %eax, %eax
je 0x4a23
movl $0x11, %edx
movq 0x4ceb(%rip), %rdi      # 0x8fc0
leaq 0x2001(%rip), %rsi      # 0x62dd
callq 0x2240
movq -0xc8(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq 0x4cca(%rip), %rdi      # 0x8fc0
callq 0x2240
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21f0
jmp 0x4ad8
xorps %xmm0, %xmm0
movaps %xmm0, -0x70(%rbp)
movq $0x0, -0x60(%rbp)
movq -0xc0(%rbp), %rax
subq %r13, %rax
sarq $0x5, %rax
cmpq $0x2, %rax
je 0x4485
cmpq $0x1, %rax
jne 0x4530
leaq -0x1f8(%rbp), %rax
movq %rax, -0x208(%rbp)
leaq -0x208(%rbp), %r14
movq %r14, %rdi
leaq 0x1f0c(%rip), %rsi      # 0x6273
leaq 0x1f06(%rip), %rdx      # 0x6274
callq 0x32f2
leaq -0x90(%rbp), %rbx
movq %rbx, %rdi
leaq -0xe8(%rbp), %rsi
movq %r14, %rdx
callq 0x380c
movaps -0x70(%rbp), %xmm0
movq -0x60(%rbp), %rax
movaps -0x90(%rbp), %xmm1
movaps %xmm1, -0x70(%rbp)
movq -0x80(%rbp), %rcx
movq %rcx, -0x60(%rbp)
movups %xmm0, -0x48(%rbp)
movq %rax, -0x38(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x90(%rbp)
movq $0x0, -0x80(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x38cc
movq %rbx, %rdi
callq 0x38cc
movq -0x208(%rbp), %rdi
leaq -0x1f8(%rbp), %rax
cmpq %rax, %rdi
je 0x4584
movq -0x1f8(%rbp), %rsi
jmp 0x4526
movq 0x4f14(%rip), %rsi      # 0x9310
movq 0x4f15(%rip), %rdx      # 0x9318
movq 0x4bb6(%rip), %rdi      # 0x8fc0
callq 0x2240
jmp 0x4bcc
movq -0xc0(%rbp), %rax
subq %r13, %rax
cmpq $0x40, %rax
jne 0x4796
leaq -0x158(%rbp), %rax
movq %rax, -0x168(%rbp)
movq 0x20(%r13), %rsi
movq 0x28(%r13), %rdx
addq %rsi, %rdx
leaq -0x168(%rbp), %rdi
callq 0x3988
leaq -0xe8(%rbp), %rdi
leaq -0x168(%rbp), %rsi
xorl %edx, %edx
callq 0x3528
movq -0x168(%rbp), %rdi
leaq -0x158(%rbp), %rax
cmpq %rax, %rdi
je 0x4bcc
movq -0x158(%rbp), %rsi
jmp 0x4bc4
leaq -0x1d8(%rbp), %rax
movq %rax, -0x1e8(%rbp)
movq 0x20(%r13), %rsi
movq 0x28(%r13), %rdx
addq %rsi, %rdx
leaq -0x1e8(%rbp), %rbx
movq %rbx, %rdi
callq 0x3988
leaq -0x90(%rbp), %r14
movq %r14, %rdi
leaq -0xe8(%rbp), %rsi
movq %rbx, %rdx
callq 0x380c
movaps -0x70(%rbp), %xmm0
movq -0x60(%rbp), %rax
movaps -0x90(%rbp), %xmm1
movaps %xmm1, -0x70(%rbp)
movq -0x80(%rbp), %rcx
movq %rcx, -0x60(%rbp)
movups %xmm0, -0x48(%rbp)
movq %rax, -0x38(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x90(%rbp)
movq $0x0, -0x80(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x38cc
movq %r14, %rdi
callq 0x38cc
movq -0x1e8(%rbp), %rdi
leaq -0x1d8(%rbp), %rax
cmpq %rax, %rdi
je 0x4584
movq -0x1d8(%rbp), %rsi
incq %rsi
callq 0x2220
jmp 0x4584
movq 0x4cd9(%rip), %rsi      # 0x9210
movq 0x4a82(%rip), %rdi      # 0x8fc0
movq %r15, %rdx
callq 0x2240
movq %rax, %r15
movl $0x21, %edx
movq %rax, %rdi
leaq 0x1d1d(%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 0x46c3
xorl %r13d, %r13d
xorl %r14d, %r14d
movq 0x4a21(%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,%r13), %r15b
movq %r12, %rbx
movq %r12, -0x48(%rbp)
movq (%rax,%r13), %rsi
movq 0x8(%rax,%r13), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %r12
movq %r12, %rdi
callq 0x3988
testb %r15b, %r15b
leaq 0x1bff(%rip), %rsi      # 0x61f2
leaq 0x1c79(%rip), %rax      # 0x6273
cmovneq %rax, %rsi
movq %r12, %rdi
callq 0x2350
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq 0x49ab(%rip), %rdi      # 0x8fc0
movq %rbx, %r12
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,%r13), %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 -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x4696
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2220
incq %r14
movq -0x70(%rbp), %rax
movq -0x68(%rbp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x71c71c71c71c71c7, %rdx # imm = 0x8E38E38E38E38E39
imulq %rdx, %rcx
addq $0x48, %r13
cmpq %rcx, %r14
jb 0x4598
leaq -0x70(%rbp), %rdi
callq 0x38cc
jmp 0x4bcc
movq -0xc0(%rbp), %rax
subq %r13, %rax
cmpq $0x40, %rax
jne 0x4881
leaq -0x1b8(%rbp), %rax
movq %rax, -0x1c8(%rbp)
movq 0x20(%r13), %rsi
movq 0x28(%r13), %rdx
addq %rsi, %rdx
leaq -0x1c8(%rbp), %rbx
movq %rbx, %rdi
callq 0x3988
leaq -0x48(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
movq %rbx, %rdx
callq 0x35d0
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq 0x4891(%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 -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x4773
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x1c8(%rbp), %rdi
leaq -0x1b8(%rbp), %rax
cmpq %rax, %rdi
je 0x4bcc
movq -0x1b8(%rbp), %rsi
jmp 0x4bc4
movq 0x4ab3(%rip), %rsi      # 0x9250
movq 0x481c(%rip), %rdi      # 0x8fc0
movq %r15, %rdx
callq 0x2240
movq %rax, %r15
movl $0x15, %edx
movq %rax, %rdi
leaq 0x1ad9(%rip), %rsi      # 0x6297
callq 0x2240
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21f0
jmp 0x4ad8
leaq -0x138(%rbp), %rax
movq %rax, -0x148(%rbp)
leaq -0x148(%rbp), %rdi
leaq 0x19fa(%rip), %r14      # 0x61f2
movq %r14, %rsi
movq %r14, %rdx
callq 0x32f2
leaq -0x198(%rbp), %rax
movq %rax, -0x1a8(%rbp)
leaq -0x1a8(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x32f2
leaq -0xe8(%rbp), %rdi
leaq -0x148(%rbp), %rsi
movq %rbx, %rdx
callq 0x502f
movq -0x1a8(%rbp), %rdi
leaq -0x198(%rbp), %rax
cmpq %rax, %rdi
je 0x485e
movq -0x198(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x148(%rbp), %rdi
leaq -0x138(%rbp), %rax
cmpq %rax, %rdi
je 0x4bcc
movq -0x138(%rbp), %rsi
jmp 0x4bc4
movq 0x49a8(%rip), %rsi      # 0x9230
movq 0x4731(%rip), %rdi      # 0x8fc0
movq %r15, %rdx
callq 0x2240
movq %rax, %r15
movl $0x15, %edx
movq %rax, %rdi
leaq 0x19ee(%rip), %rsi      # 0x6297
callq 0x2240
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21f0
jmp 0x4ad8
movq -0xc0(%rbp), %rax
subq %r13, %rax
cmpq $0x40, %rax
jne 0x4a97
movl $0x16, %edx
movq 0x46d9(%rip), %rdi      # 0x8fc0
leaq 0x19bf(%rip), %rsi      # 0x62ad
callq 0x2240
movq 0x46c6(%rip), %rcx      # 0x8fc0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq 0x46a8(%rip), %rdi      # 0x8fc0
callq 0x2030
movq %rax, %rdi
callq 0x2170
movq %r12, -0x48(%rbp)
xorl %ecx, %ecx
movq %rcx, -0x40(%rbp)
movb %cl, -0x38(%rbp)
leaq -0x60(%rbp), %rax
movq %rax, -0x70(%rbp)
movq %rcx, -0x68(%rbp)
movb %cl, -0x60(%rbp)
movq 0x4688(%rip), %rcx      # 0x8fd0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %edx
movq 0x466a(%rip), %rdi      # 0x8fd0
leaq -0x70(%rbp), %rsi
callq 0x2320
leaq -0x70(%rbp), %rbx
movq %rbx, %rdi
leaq 0x1875(%rip), %rsi      # 0x61f2
callq 0x2070
testl %eax, %eax
je 0x4af0
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 0x3988
movq %rbx, %rdi
leaq 0x1838(%rip), %rsi      # 0x61f1
callq 0x2350
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
leaq -0x48(%rbp), %rdi
callq 0x2080
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x49f1
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2220
movq 0x45d8(%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 0x4973
movq -0xc0(%rbp), %rax
subq %r13, %rax
cmpq $0x40, %rax
jne 0x4c0e
leaq -0xf8(%rbp), %rax
movq %rax, -0x108(%rbp)
movq 0x20(%r13), %rsi
movq 0x28(%r13), %rdx
addq %rsi, %rdx
leaq -0x108(%rbp), %rdi
callq 0x3988
leaq -0xe8(%rbp), %rdi
leaq -0x108(%rbp), %rsi
movl $0x1, %edx
callq 0x3528
movq -0x108(%rbp), %rdi
leaq -0xf8(%rbp), %rax
cmpq %rax, %rdi
je 0x4bcc
movq -0xf8(%rbp), %rsi
jmp 0x4bc4
movq 0x47f2(%rip), %rsi      # 0x9290
movq 0x451b(%rip), %rdi      # 0x8fc0
movq %r15, %rdx
callq 0x2240
movq %rax, %r15
movl $0x15, %edx
movq %rax, %rdi
leaq 0x17d8(%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 0x4bcc
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 0x3988
leaq -0x178(%rbp), %rax
movq %rax, -0x188(%rbp)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
leaq -0x188(%rbp), %rbx
movq %rbx, %rdi
callq 0x3988
leaq -0xe8(%rbp), %rdi
leaq -0x128(%rbp), %rsi
movq %rbx, %rdx
callq 0x36b0
movq -0x188(%rbp), %rdi
leaq -0x178(%rbp), %rax
cmpq %rax, %rdi
je 0x4b7c
movq -0x178(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x128(%rbp), %rdi
leaq -0x118(%rbp), %rax
cmpq %rax, %rdi
je 0x4b9e
movq -0x118(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x4bb7
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x4bcc
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2220
xorl %r14d, %r14d
leaq -0xc8(%rbp), %rdi
callq 0x55b2
movq -0xb0(%rbp), %rax
leaq -0xa0(%rbp), %rcx
cmpq %rcx, %rax
je 0x4c00
movq -0xa0(%rbp), %rsi
incq %rsi
movq %rax, %rdi
callq 0x2220
testb %r14b, %r14b
je 0x401a
jmp 0x4fae
movq 0x465b(%rip), %rsi      # 0x9270
movq 0x43a4(%rip), %rdi      # 0x8fc0
movq %r15, %rdx
callq 0x2240
movq %rax, %r15
movl $0x18, %edx
movq %rax, %rdi
leaq 0x168e(%rip), %rsi      # 0x62c4
callq 0x2240
movq %r15, %rdi
callq 0x2110
jmp 0x4bcc
movq %rdx, %r15
movq %rax, %r14
movq -0x108(%rbp), %rdi
leaq -0xf8(%rbp), %rax
cmpq %rax, %rdi
je 0x4efb
movq -0xf8(%rbp), %rsi
jmp 0x4e93
movq %rdx, %r15
movq %rax, %r14
movq -0x188(%rbp), %rdi
leaq -0x178(%rbp), %rax
cmpq %rax, %rdi
je 0x4c9e
movq -0x178(%rbp), %rsi
incq %rsi
callq 0x2220
jmp 0x4c9e
movq %rdx, %r15
movq %rax, %r14
movq -0x128(%rbp), %rdi
leaq -0x118(%rbp), %rax
cmpq %rax, %rdi
je 0x4e6d
movq -0x118(%rbp), %rsi
jmp 0x4e28
movq %r12, %rbx
movq %rdx, %r15
movq %rax, %r14
jmp 0x4dd7
movq %r12, %rbx
movq %rdx, %r15
movq %rax, %r14
jmp 0x4df9
movq %rdx, %r15
movq %rax, %r14
movq -0x1a8(%rbp), %rdi
leaq -0x198(%rbp), %rax
cmpq %rax, %rdi
je 0x4d0d
movq -0x198(%rbp), %rsi
incq %rsi
callq 0x2220
jmp 0x4d0d
movq %rdx, %r15
movq %rax, %r14
movq -0x148(%rbp), %rdi
leaq -0x138(%rbp), %rax
cmpq %rax, %rdi
je 0x4efb
movq -0x138(%rbp), %rsi
jmp 0x4e93
jmp 0x4e9d
movq %rdx, %r15
movq %rax, %r14
movq -0x168(%rbp), %rdi
leaq -0x158(%rbp), %rax
cmpq %rax, %rdi
je 0x4efb
movq -0x158(%rbp), %rsi
jmp 0x4e93
jmp 0x4e67
movq %rdx, %r15
movq %rax, %r14
movq -0x1e8(%rbp), %rdi
leaq -0x1d8(%rbp), %rax
cmpq %rax, %rdi
je 0x4ef2
movq -0x1d8(%rbp), %rsi
jmp 0x4eea
movq %rdx, %r15
movq %rax, %r14
movq -0x208(%rbp), %rdi
leaq -0x1f8(%rbp), %rax
cmpq %rax, %rdi
je 0x4ef2
movq -0x1f8(%rbp), %rsi
jmp 0x4eea
jmp 0x4e01
jmp 0x4e01
movq %rdx, %r15
movq %rax, %r14
movq -0x48(%rbp), %rdi
movq %r12, %rbx
cmpq %r12, %rdi
je 0x4dd7
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x1c8(%rbp), %rdi
leaq -0x1b8(%rbp), %rax
cmpq %rax, %rdi
je 0x4df9
movq -0x1b8(%rbp), %rsi
incq %rsi
callq 0x2220
movq %rbx, %r12
jmp 0x4efb
movq %rdx, %r15
movq %rax, %r14
jmp 0x4ef2
jmp 0x4e0e
movq %rdx, %r15
movq %rax, %r14
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x4e6d
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2220
jmp 0x4e6d
jmp 0x4e67
movq %rdx, %r15
movq %rax, %r14
movq -0x228(%rbp), %rdi
leaq -0x218(%rbp), %rax
cmpq %rax, %rdi
je 0x4f07
movq -0x218(%rbp), %rsi
incq %rsi
callq 0x2220
jmp 0x4f07
jmp 0x4ea7
movq %rdx, %r15
movq %rax, %r14
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x4e86
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x4efb
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2220
jmp 0x4efb
movq %rdx, %r15
movq %rax, %r14
jmp 0x4efb
jmp 0x4ea7
movq %rdx, %r15
movq %rax, %r14
jmp 0x4f07
movq %rdx, %r15
movq %rax, %r14
jmp 0x4ed2
movq %rdx, %r15
movq %rax, %r14
movq -0x48(%rbp), %rdi
cmpq %rbx, %rdi
je 0x4ed2
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2220
movq %rbx, %r12
jmp 0x4ef2
movq %rdx, %r15
movq %rax, %r14
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x4ef2
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2220
leaq -0x70(%rbp), %rdi
callq 0x38cc
leaq -0xc8(%rbp), %rdi
callq 0x55b2
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x4f29
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x2220
cmpl $0x1, %r15d
jne 0x501b
movq %r14, %rdi
callq 0x20e0
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
movq 0x4075(%rip), %rdi      # 0x8fc0
movq %rax, %rsi
callq 0x2200
movq %rax, %rdi
callq 0x2110
callq 0x22b0
jmp 0x401a
movq 0x407c(%rip), %rbx      # 0x8fe8
leaq 0x1296(%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 0x4fbc
leaq -0xe0(%rbp), %rdi
callq 0x38cc
xorl %eax, %eax
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5018
movq %rax, %r14
callq 0x22b0
jmp 0x501b
movq %rax, %rdi
callq 0x32e4
movq %rax, %r14
leaq -0x238(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5009
movq -0x238(%rbp), %rsi
incq %rsi
callq 0x2220
jmp 0x5009
movq %rax, %r14
movl $0x10, %esi
movq %rbx, %rdi
callq 0x2220
jmp 0x5027
movq %rax, %r14
leaq -0xe0(%rbp), %rdi
callq 0x38cc
movq %r14, %rdi
callq 0x22f0