// File: mbourand[P]webserv/srcs/Methods/GetMethod.cpp
// Function: GetMethod::directory_listing(Request const&, ConfigContext const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Response GetMethod::directory_listing(const Request& request, const ConfigContext&, const std::string &realPath)
{
	const URL& url = request._url;
	std::list<std::string> list;
	try
	{
		list = list_directory(realPath);
	}
	catch (std::exception& e)
	{
		if (errno == ENOENT)
			return Logger::print("Directory not found", Response(404, url._path), ERROR, VERBOSE);
		if (errno == EACCES)
			return Logger::print("Permission denied", Response(403, url._path), ERROR, VERBOSE);
		if (errno != 0)
			return Logger::print("Unknown error while trying to open directory", Response(500, url._path), ERROR, NORMAL);
	}


	std::string body =
"<html>\r\n\
	<head>\r\n\
		<title>Index</title>\r\n\
		<style>\r\n\
			table{\r\n\
				width:100%;\r\n\
			}\r\n\
			table td{\r\n\
				white-space: nowrap;\r\n\
				border: none;\r\n\
				padding-right: 20;\r\n\
			}\r\n\
			table td:last-child{\r\n\
				width:100%;\r\n\
			}\r\n\
		</style>\r\n\
	</head>\r\n\
	<body>\r\n\
		<style>\r\n\
			table, td {\r\n\
				border: 1px solid black;\r\n\
			}\r\n\
\r\n\
			table {\r\n\
				width: 100%;\r\n\
				border-collapse: collapse;\r\n\
			}\r\n\
		</style>\r\n\
\r\n\
		<h1 align=\"center\">Index of " + url._path + "/</h1>\r\n\
		<hr>\r\n\
		<table style=\"border: none;\">\r\n\
			<tbody>\r\n\
				<tr>\r\n\
					<th>Name</th>\r\n\
					<th>Last Modified</th>\r\n\
					<th>Size</th>\r\n\
					<th></th>\r\n\
				</tr>";

	for (std::list<std::string>::iterator it = list.begin(); it != list.end(); it++)
	{
		std::string path = realPath + "/" + *it;
		body +=
"				<tr>\r\n\
					<td><a href=\"" + url._path + "/" + *it + "\">" + *it + "</a></td>\r\n\
					<td>" + (path[path.size() - 1] == '/' ? "-" : get_last_modified_format(path, "%d-%b-%Y %H:%M")) + "</td>\r\n\
					<td>" + (path[path.size() - 1] == '/' ? "-" : get_file_size(path)) + "</td>\r\n\
					<td></td>\r\n\
				</tr>\r\n";
	}
	body +=
"			</tbody>\r\n\
		</table>\r\n\
	</body>\r\n\
</html>";


	Response response(200, url._path.substr(0, url._path.size() - 1));
	std::ostringstream convert;

	convert << body.size();
	response.addHeader("Content-Length", convert.str());
	response.setBody(body);
	convert.str("");
	response.addDateHeader();
	response.addHeader("Server", "Webserv");
	response.addHeader("Content-Type", "text/html; charset=UTF-8");

	return response;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x880, %rsp            # imm = 0x880
movq %rdi, -0x7f0(%rbp)
movq %rdi, %rax
movq %rax, -0x7e8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x7e0(%rbp)
movq -0x18(%rbp), %rax
addq $0x30, %rax
movq %rax, -0x30(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x13880
movq -0x7e0(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq -0x60(%rbp), %rdi
callq 0xf680
jmp 0xff26
leaq -0x48(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x13ec0
leaq -0x60(%rbp), %rdi
callq 0xceb0
jmp 0x10296
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x10eb6
movq -0x68(%rbp), %rdi
callq 0x92a0
movq %rax, -0x78(%rbp)
callq 0x9080
cmpl $0x2, (%rax)
jne 0x1006d
leaq -0x99(%rbp), %rdi
movq %rdi, -0x7f8(%rbp)
callq 0x9b10
movq -0x7f8(%rbp), %rdx
leaq 0x5a3d3(%rip), %rsi     # 0x6a36c
leaq -0x98(%rbp), %rdi
callq 0xa780
jmp 0xffa7
movq -0x30(%rbp), %rdx
addq $0x88, %rdx
leaq -0x140(%rbp), %rdi
movl $0x194, %esi            # imm = 0x194
callq 0x636c0
jmp 0xffc5
movq -0x7f0(%rbp), %rdi
leaq -0x98(%rbp), %rsi
leaq -0x140(%rbp), %rdx
movl $0x3, %ecx
xorl %r8d, %r8d
callq 0x13ef0
jmp 0xffe9
leaq -0x140(%rbp), %rdi
callq 0x634e0
leaq -0x98(%rbp), %rdi
callq 0x9c98
leaq -0x99(%rbp), %rdi
callq 0x9700
movl $0x1, -0x144(%rbp)
jmp 0x1027d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x1005c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x10050
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x634e0
leaq -0x98(%rbp), %rdi
callq 0x9c98
leaq -0x99(%rbp), %rdi
callq 0x9700
jmp 0x1074d
callq 0x9080
cmpl $0xd, (%rax)
jne 0x10170
leaq -0x169(%rbp), %rdi
movq %rdi, -0x800(%rbp)
callq 0x9b10
movq -0x800(%rbp), %rdx
leaq 0x5a2e4(%rip), %rsi     # 0x6a380
leaq -0x168(%rbp), %rdi
callq 0xa780
jmp 0x100aa
movq -0x30(%rbp), %rdx
addq $0x88, %rdx
leaq -0x210(%rbp), %rdi
movl $0x193, %esi            # imm = 0x193
callq 0x636c0
jmp 0x100c8
movq -0x7f0(%rbp), %rdi
leaq -0x168(%rbp), %rsi
leaq -0x210(%rbp), %rdx
movl $0x3, %ecx
xorl %r8d, %r8d
callq 0x13ef0
jmp 0x100ec
leaq -0x210(%rbp), %rdi
callq 0x634e0
leaq -0x168(%rbp), %rdi
callq 0x9c98
leaq -0x169(%rbp), %rdi
callq 0x9700
movl $0x1, -0x144(%rbp)
jmp 0x1027d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x1015f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x10153
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x210(%rbp), %rdi
callq 0x634e0
leaq -0x168(%rbp), %rdi
callq 0x9c98
leaq -0x169(%rbp), %rdi
callq 0x9700
jmp 0x1074d
callq 0x9080
cmpl $0x0, (%rax)
je 0x10273
leaq -0x231(%rbp), %rdi
movq %rdi, -0x808(%rbp)
callq 0x9b10
movq -0x808(%rbp), %rdx
leaq 0x5a1f3(%rip), %rsi     # 0x6a392
leaq -0x230(%rbp), %rdi
callq 0xa780
jmp 0x101ad
movq -0x30(%rbp), %rdx
addq $0x88, %rdx
leaq -0x2d8(%rbp), %rdi
movl $0x1f4, %esi            # imm = 0x1F4
callq 0x636c0
jmp 0x101cb
movq -0x7f0(%rbp), %rdi
leaq -0x230(%rbp), %rsi
leaq -0x2d8(%rbp), %rdx
movl $0x3, %ecx
movl $0x1, %r8d
callq 0x13ef0
jmp 0x101f2
leaq -0x2d8(%rbp), %rdi
callq 0x634e0
leaq -0x230(%rbp), %rdi
callq 0x9c98
leaq -0x231(%rbp), %rdi
callq 0x9700
movl $0x1, -0x144(%rbp)
jmp 0x1027d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x10262
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x10256
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x2d8(%rbp), %rdi
callq 0x634e0
leaq -0x230(%rbp), %rdi
callq 0x9c98
leaq -0x231(%rbp), %rdi
callq 0x9700
jmp 0x1074d
movl $0x0, -0x144(%rbp)
callq 0x9a40
jmp 0x10284
movl -0x144(%rbp), %eax
testl %eax, %eax
jne 0x10e9d
jmp 0x10294
jmp 0x10296
movq -0x30(%rbp), %rdx
addq $0x88, %rdx
leaq 0x5a117(%rip), %rsi     # 0x6a3bf
leaq -0x318(%rbp), %rdi
callq 0x14000
jmp 0x102b6
leaq 0x5a2b2(%rip), %rdx     # 0x6a56f
leaq -0x2f8(%rbp), %rdi
leaq -0x318(%rbp), %rsi
callq 0x13970
jmp 0x102d2
leaq -0x318(%rbp), %rdi
callq 0x9c98
leaq -0x48(%rbp), %rdi
callq 0xcc30
movq %rax, -0x320(%rbp)
leaq -0x48(%rbp), %rdi
callq 0xccb0
movq %rax, -0x328(%rbp)
leaq -0x320(%rbp), %rdi
leaq -0x328(%rbp), %rsi
callq 0x14110
testb $0x1, %al
jne 0x1031a
jmp 0x109b9
movq -0x28(%rbp), %rsi
leaq 0x5a733(%rip), %rdx     # 0x6aa58
leaq -0x368(%rbp), %rdi
callq 0x14190
jmp 0x10333
leaq -0x320(%rbp), %rdi
callq 0xd8f0
movq %rax, %rdx
leaq -0x348(%rbp), %rdi
leaq -0x368(%rbp), %rsi
callq 0x14140
jmp 0x10357
leaq -0x368(%rbp), %rdi
callq 0x9c98
movq -0x30(%rbp), %rdx
addq $0x88, %rdx
leaq 0x5a2a0(%rip), %rsi     # 0x6a615
leaq -0x4a8(%rbp), %rdi
callq 0x14000
jmp 0x10383
leaq 0x5a6ce(%rip), %rdx     # 0x6aa58
leaq -0x488(%rbp), %rdi
leaq -0x4a8(%rbp), %rsi
callq 0x13970
jmp 0x1039f
leaq -0x320(%rbp), %rdi
callq 0xd8f0
movq %rax, %rdx
leaq -0x468(%rbp), %rdi
leaq -0x488(%rbp), %rsi
callq 0x14140
jmp 0x103c3
leaq 0x5a268(%rip), %rdx     # 0x6a632
leaq -0x448(%rbp), %rdi
leaq -0x468(%rbp), %rsi
callq 0x13970
jmp 0x103df
leaq -0x320(%rbp), %rdi
callq 0xd8f0
movq %rax, %rdx
leaq -0x428(%rbp), %rdi
leaq -0x448(%rbp), %rsi
callq 0x14140
jmp 0x10403
leaq 0x5a22b(%rip), %rdx     # 0x6a635
leaq -0x408(%rbp), %rdi
leaq -0x428(%rbp), %rsi
callq 0x13970
jmp 0x1041f
leaq -0x348(%rbp), %rdi
movq %rdi, -0x818(%rbp)
callq 0x9480
movq -0x818(%rbp), %rdi
movq %rax, %rsi
decq %rsi
movb $0x0, -0x4ca(%rbp)
movb $0x0, -0x4f2(%rbp)
movb $0x0, -0x4f3(%rbp)
callq 0x9c70
movq %rax, -0x810(%rbp)
jmp 0x10462
movq -0x810(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x104a9
leaq -0x4c9(%rbp), %rdi
movq %rdi, -0x820(%rbp)
callq 0x9b10
movq -0x820(%rbp), %rdx
movb $0x1, -0x4ca(%rbp)
leaq 0x5a734(%rip), %rsi     # 0x6abcd
leaq -0x4c8(%rbp), %rdi
callq 0xa780
jmp 0x104a7
jmp 0x1050b
leaq -0x4f1(%rbp), %rdi
movq %rdi, -0x828(%rbp)
callq 0x9b10
movq -0x828(%rbp), %rdx
movb $0x1, -0x4f2(%rbp)
leaq 0x5a179(%rip), %rsi     # 0x6a64a
leaq -0x4f0(%rbp), %rdi
callq 0xa780
jmp 0x104df
movq -0x7e0(%rbp), %rsi
movb $0x1, -0x4f3(%rbp)
leaq -0x4c8(%rbp), %rdi
leaq -0x348(%rbp), %rdx
leaq -0x4f0(%rbp), %rcx
callq 0xfab0
jmp 0x10509
jmp 0x1050b
leaq -0x3e8(%rbp), %rdi
leaq -0x408(%rbp), %rsi
leaq -0x4c8(%rbp), %rdx
callq 0x14210
jmp 0x10527
leaq 0x5a10b(%rip), %rdx     # 0x6a639
leaq -0x3c8(%rbp), %rdi
leaq -0x3e8(%rbp), %rsi
callq 0x13970
jmp 0x10543
leaq -0x348(%rbp), %rdi
movq %rdi, -0x838(%rbp)
callq 0x9480
movq -0x838(%rbp), %rdi
movq %rax, %rsi
decq %rsi
movb $0x0, -0x51a(%rbp)
callq 0x9c70
movq %rax, -0x830(%rbp)
jmp 0x10578
movq -0x830(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x105bf
leaq -0x519(%rbp), %rdi
movq %rdi, -0x840(%rbp)
callq 0x9b10
movq -0x840(%rbp), %rdx
movb $0x1, -0x51a(%rbp)
leaq 0x5a61e(%rip), %rsi     # 0x6abcd
leaq -0x518(%rbp), %rdi
callq 0xa780
jmp 0x105bd
jmp 0x105dd
movq -0x7e0(%rbp), %rsi
leaq -0x518(%rbp), %rdi
leaq -0x348(%rbp), %rdx
callq 0xfd90
jmp 0x105db
jmp 0x105dd
leaq -0x3a8(%rbp), %rdi
leaq -0x3c8(%rbp), %rsi
leaq -0x518(%rbp), %rdx
callq 0x14210
jmp 0x105f9
leaq 0x5a059(%rip), %rdx     # 0x6a659
leaq -0x388(%rbp), %rdi
leaq -0x3a8(%rbp), %rsi
callq 0x13970
jmp 0x10615
leaq -0x2f8(%rbp), %rdi
leaq -0x388(%rbp), %rsi
callq 0x9830
jmp 0x1062a
leaq -0x388(%rbp), %rdi
callq 0x9c98
leaq -0x3a8(%rbp), %rdi
callq 0x9c98
leaq -0x518(%rbp), %rdi
callq 0x9c98
testb $0x1, -0x51a(%rbp)
jne 0x10659
jmp 0x10665
leaq -0x519(%rbp), %rdi
callq 0x9700
leaq -0x3c8(%rbp), %rdi
callq 0x9c98
leaq -0x3e8(%rbp), %rdi
callq 0x9c98
leaq -0x4c8(%rbp), %rdi
callq 0x9c98
testb $0x1, -0x4f3(%rbp)
jne 0x10694
jmp 0x106a0
leaq -0x4f0(%rbp), %rdi
callq 0x9c98
testb $0x1, -0x4f2(%rbp)
jne 0x106ab
jmp 0x106b7
leaq -0x4f1(%rbp), %rdi
callq 0x9700
testb $0x1, -0x4ca(%rbp)
jne 0x106c2
jmp 0x106ce
leaq -0x4c9(%rbp), %rdi
callq 0x9700
leaq -0x408(%rbp), %rdi
callq 0x9c98
leaq -0x428(%rbp), %rdi
callq 0x9c98
leaq -0x448(%rbp), %rdi
callq 0x9c98
leaq -0x468(%rbp), %rdi
callq 0x9c98
leaq -0x488(%rbp), %rdi
callq 0x9c98
leaq -0x4a8(%rbp), %rdi
callq 0x9c98
leaq -0x348(%rbp), %rdi
callq 0x9c98
leaq -0x320(%rbp), %rdi
xorl %esi, %esi
callq 0x142e0
movq %rax, -0x528(%rbp)
jmp 0x102ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x10eb6
callq 0x9a40
jmp 0x10754
jmp 0x10eb6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x318(%rbp), %rdi
callq 0x9c98
jmp 0x10eb6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x10e8f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x368(%rbp), %rdi
callq 0x9c98
jmp 0x10e8f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x109a8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x1099c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x10990
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x10984
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x10978
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x1096c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x10960
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x10947
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x1092e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x10915
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x10909
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x108fd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x108f1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x108d8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x108cc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x108c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x388(%rbp), %rdi
callq 0x9c98
leaq -0x3a8(%rbp), %rdi
callq 0x9c98
leaq -0x518(%rbp), %rdi
callq 0x9c98
testb $0x1, -0x51a(%rbp)
jne 0x108e3
jmp 0x108ef
leaq -0x519(%rbp), %rdi
callq 0x9700
jmp 0x108f1
leaq -0x3c8(%rbp), %rdi
callq 0x9c98
leaq -0x3e8(%rbp), %rdi
callq 0x9c98
leaq -0x4c8(%rbp), %rdi
callq 0x9c98
testb $0x1, -0x4f3(%rbp)
jne 0x10920
jmp 0x1092c
leaq -0x4f0(%rbp), %rdi
callq 0x9c98
jmp 0x1092e
testb $0x1, -0x4f2(%rbp)
jne 0x10939
jmp 0x10945
leaq -0x4f1(%rbp), %rdi
callq 0x9700
jmp 0x10947
testb $0x1, -0x4ca(%rbp)
jne 0x10952
jmp 0x1095e
leaq -0x4c9(%rbp), %rdi
callq 0x9700
jmp 0x10960
leaq -0x408(%rbp), %rdi
callq 0x9c98
leaq -0x428(%rbp), %rdi
callq 0x9c98
leaq -0x448(%rbp), %rdi
callq 0x9c98
leaq -0x468(%rbp), %rdi
callq 0x9c98
leaq -0x488(%rbp), %rdi
callq 0x9c98
leaq -0x4a8(%rbp), %rdi
callq 0x9c98
leaq -0x348(%rbp), %rdi
callq 0x9c98
jmp 0x10e8f
leaq 0x59cbc(%rip), %rsi     # 0x6a67c
leaq -0x2f8(%rbp), %rdi
callq 0x9650
jmp 0x109ce
movb $0x0, -0x529(%rbp)
movq -0x30(%rbp), %rdi
addq $0x88, %rdi
movq %rdi, -0x848(%rbp)
callq 0x9480
movq -0x848(%rbp), %rsi
movq %rax, %rcx
decq %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x550(%rbp), %rdi
callq 0x96b0
jmp 0x10a0b
movq -0x7f0(%rbp), %rdi
movl $0xc8, %esi
leaq -0x550(%rbp), %rdx
callq 0x636c0
jmp 0x10a25
leaq -0x550(%rbp), %rdi
callq 0x9c98
leaq -0x6c8(%rbp), %rdi
callq 0x9890
jmp 0x10a3f
leaq -0x2f8(%rbp), %rdi
callq 0x9480
movq %rax, %rsi
leaq -0x6c8(%rbp), %rdi
callq 0x9190
jmp 0x10a5c
leaq -0x6e9(%rbp), %rdi
movq %rdi, -0x850(%rbp)
callq 0x9b10
movq -0x850(%rbp), %rdx
leaq 0x59687(%rip), %rsi     # 0x6a104
leaq -0x6e8(%rbp), %rdi
callq 0xa780
jmp 0x10a8b
leaq -0x710(%rbp), %rdi
leaq -0x6c8(%rbp), %rsi
callq 0x96a0
jmp 0x10aa0
movq -0x7f0(%rbp), %rdi
leaq -0x6e8(%rbp), %rsi
leaq -0x710(%rbp), %rdx
callq 0x63770
jmp 0x10abc
leaq -0x710(%rbp), %rdi
callq 0x9c98
leaq -0x6e8(%rbp), %rdi
callq 0x9c98
leaq -0x6e9(%rbp), %rdi
callq 0x9700
movq -0x7f0(%rbp), %rdi
leaq -0x2f8(%rbp), %rsi
callq 0x645d0
jmp 0x10af5
leaq -0x731(%rbp), %rdi
movq %rdi, -0x858(%rbp)
callq 0x9b10
movq -0x858(%rbp), %rdx
leaq 0x5a25a(%rip), %rsi     # 0x6ad70
leaq -0x730(%rbp), %rdi
callq 0xa780
jmp 0x10b24
leaq -0x6c8(%rbp), %rdi
leaq -0x730(%rbp), %rsi
callq 0x9300
jmp 0x10b39
leaq -0x730(%rbp), %rdi
callq 0x9c98
leaq -0x731(%rbp), %rdi
callq 0x9700
movq -0x7f0(%rbp), %rdi
callq 0x63a60
jmp 0x10b5f
leaq -0x759(%rbp), %rdi
movq %rdi, -0x860(%rbp)
callq 0x9b10
movq -0x860(%rbp), %rdx
leaq 0x596cc(%rip), %rsi     # 0x6a24c
leaq -0x758(%rbp), %rdi
callq 0xa780
jmp 0x10b8e
leaq -0x781(%rbp), %rdi
movq %rdi, -0x868(%rbp)
callq 0x9b10
movq -0x868(%rbp), %rdx
leaq 0x5a002(%rip), %rsi     # 0x6abb1
leaq -0x780(%rbp), %rdi
callq 0xa780
jmp 0x10bbd
movq -0x7f0(%rbp), %rdi
leaq -0x758(%rbp), %rsi
leaq -0x780(%rbp), %rdx
callq 0x63770
jmp 0x10bd9
leaq -0x780(%rbp), %rdi
callq 0x9c98
leaq -0x781(%rbp), %rdi
callq 0x9700
leaq -0x758(%rbp), %rdi
callq 0x9c98
leaq -0x759(%rbp), %rdi
callq 0x9700
leaq -0x7a9(%rbp), %rdi
movq %rdi, -0x870(%rbp)
callq 0x9b10
movq -0x870(%rbp), %rdx
leaq 0x59528(%rip), %rsi     # 0x6a152
leaq -0x7a8(%rbp), %rdi
callq 0xa780
jmp 0x10c38
leaq -0x7d1(%rbp), %rdi
movq %rdi, -0x878(%rbp)
callq 0x9b10
movq -0x878(%rbp), %rdx
leaq 0x59a4e(%rip), %rsi     # 0x6a6a7
leaq -0x7d0(%rbp), %rdi
callq 0xa780
jmp 0x10c67
movq -0x7f0(%rbp), %rdi
leaq -0x7a8(%rbp), %rsi
leaq -0x7d0(%rbp), %rdx
callq 0x63770
jmp 0x10c83
leaq -0x7d0(%rbp), %rdi
callq 0x9c98
leaq -0x7d1(%rbp), %rdi
callq 0x9700
leaq -0x7a8(%rbp), %rdi
callq 0x9c98
leaq -0x7a9(%rbp), %rdi
callq 0x9700
movb $0x1, -0x529(%rbp)
movl $0x1, -0x144(%rbp)
leaq -0x6c8(%rbp), %rdi
callq 0x91a0
testb $0x1, -0x529(%rbp)
jne 0x10e75
jmp 0x10e69
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x550(%rbp), %rdi
callq 0x9c98
jmp 0x10e8f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x10e83
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x10e5b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x10d61
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x10d55
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x710(%rbp), %rdi
callq 0x9c98
leaq -0x6e8(%rbp), %rdi
callq 0x9c98
leaq -0x6e9(%rbp), %rdi
callq 0x9700
jmp 0x10e5b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x10d98
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x730(%rbp), %rdi
callq 0x9c98
leaq -0x731(%rbp), %rdi
callq 0x9700
jmp 0x10e5b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x10df5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x10ddd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x780(%rbp), %rdi
callq 0x9c98
leaq -0x781(%rbp), %rdi
callq 0x9700
leaq -0x758(%rbp), %rdi
callq 0x9c98
leaq -0x759(%rbp), %rdi
callq 0x9700
jmp 0x10e5b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x10e4f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x10e37
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x7d0(%rbp), %rdi
callq 0x9c98
leaq -0x7d1(%rbp), %rdi
callq 0x9700
leaq -0x7a8(%rbp), %rdi
callq 0x9c98
leaq -0x7a9(%rbp), %rdi
callq 0x9700
leaq -0x6c8(%rbp), %rdi
callq 0x91a0
jmp 0x10e83
movq -0x7f0(%rbp), %rdi
callq 0x634e0
leaq -0x2f8(%rbp), %rdi
callq 0x9c98
jmp 0x10e9d
movq -0x7f0(%rbp), %rdi
callq 0x634e0
leaq -0x2f8(%rbp), %rdi
callq 0x9c98
jmp 0x10eb6
leaq -0x48(%rbp), %rdi
callq 0xceb0
movq -0x7e8(%rbp), %rax
addq $0x880, %rsp            # imm = 0x880
popq %rbp
retq
leaq -0x48(%rbp), %rdi
callq 0xceb0
movq -0x68(%rbp), %rdi
callq 0x9af0
movq %rax, %rdi
callq 0xaa90