// File: /workspace/github_cpp_makefile_star2_O3/mbourand[P]webserv/srcs/Methods/PostMethod.cpp
// Function: PostMethod::process(Request const&, ConfigContext const&, ServerSocket const&)
Response PostMethod::process(const Request& request, const ConfigContext& config, const ServerSocket& socket)
{
	const URL& url = request._url;
	int base_depth = 0;
	Response response(200, url._path); //change code on failure
	std::string realPath = config.rootPath(url._path, base_depth);
	try
	{
		realPath = ft::simplify_path(realPath, true, base_depth);
	}
	catch (std::exception& e)
	{
		return (response.setCode(404));
	}
	if (ft::is_directory(realPath))
	{
		try
		{
			std::string index = "/" + config.getParam("index").front();
			realPath += index;
		}
		catch (std::exception& e)
		{}
	}
	std::list<std::string> splitted = ft::split(realPath, "/");
	std::string extension = ft::get_extension(splitted.back());
	if ((!extension.empty() && config.getCGIExtensions().find(extension) != config.getCGIExtensions().end()) || (realPath.find(config.getParam("cgi_dir").front()) == 0))
	{
		try
		{
			CGI	cgi(request, config, socket, realPath);
			cgi.process(response);
		}
		catch(const CGI::CGIException &e)
		{
			Logger::print(e.what(), NULL, ERROR, NORMAL);
			response.setCode(e.code());
		}
	}
	else
	{
		std::fstream file(realPath.c_str());
		if (!file.good() || !file.is_open())
		{
			if (errno == ENOENT || errno == ENOTDIR)
				return Logger::print("File not found", response.setCode(404), ERROR, VERBOSE);
			if (errno == EACCES || errno == EISDIR)
				return Logger::print("Permission denied", response.setCode(403), ERROR, VERBOSE);
			return Logger::print("Unexpected error while trying to open file: " + std::string(strerror(errno)), response.setCode(500), ERROR, VERBOSE);
		}
		std::string content((std::istreambuf_iterator<char>(file)), (std::istreambuf_iterator<char>()));
		std::ostringstream convert;
		struct stat file_stats;
		lstat(realPath.c_str(), &file_stats);
		convert << file_stats.st_size;
		response.addHeader("Content-Length", convert.str());
		convert.str("");
		convert << file_stats.st_mtime;
		struct tm	time;
		strptime(std::string(convert.str()).c_str(), "%s", &time);
		if (time.tm_gmtoff > 0) // convert to GMT
			file_stats.st_mtim.tv_sec -= time.tm_gmtoff;
		if (time.tm_isdst) // substract Daylight saving time
			file_stats.st_mtim.tv_sec -= 3600;
		convert.str("");
		convert << file_stats.st_mtime;
		strptime(std::string(convert.str()).c_str(), "%s", &time);
		char		buffer[1024];
		strftime(buffer, sizeof(buffer), "%a, %d %b %Y %H:%M:%S GMT", &time);
		response.addHeader("Last-Modified", buffer);
		convert.str("");
		response.addDateHeader();
		response.addHeader("Server", "Webserv");
		t_hnode	*hnode = g_webserv.file_formatname->GetNode(realPath.substr(realPath.find_last_of('.') + 1));
		if (hnode != NULL)
			response.addHeader("Content-Type", hnode->value + "; charset=UTF-8");
		response.setBody(content);
	}
	return response;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc68, %rsp            # imm = 0xC68
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r13
movq %rdi, 0x30(%rsp)
leaq 0x7c(%rsp), %r14
movl $0x0, (%r14)
leaq 0xb8(%rdx), %rbp
leaq 0x1d0(%rsp), %rdi
movl $0xc8, %esi
movq %rbp, %rdx
callq 0x36f58
leaq 0x58(%rsp), %rdi
movq %r12, %rsi
movq %rbp, %rdx
movq %r14, %rcx
callq 0x2b9a8
movl 0x7c(%rsp), %ecx
leaq 0x270(%rsp), %rdi
leaq 0x58(%rsp), %rsi
movl $0x1, %edx
callq 0x1d26b
leaq 0x58(%rsp), %rdi
leaq 0x270(%rsp), %r14
movq %r14, %rsi
callq 0x7590
movq (%r14), %rdi
leaq 0x280(%rsp), %rbx
cmpq %rbx, %rdi
je 0xfdd6
movq 0x280(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x150(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
addq %rsi, %rdx
leaq 0x140(%rsp), %rdi
callq 0x8a92
leaq 0x140(%rsp), %rdi
callq 0x1ccaf
movl %eax, %ebp
movq 0x140(%rsp), %rdi
cmpq %r14, %rdi
je 0xfe28
movq 0x150(%rsp), %rsi
incq %rsi
callq 0x74b0
testb %bpl, %bpl
je 0xfed7
leaq 0x680(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x2cf1a(%rip), %rsi     # 0x3cd5e
leaq 0x2cf18(%rip), %rdx     # 0x3cd63
leaq 0x670(%rsp), %rdi
callq 0x80f4
leaq 0x670(%rsp), %rsi
movq %r12, %rdi
callq 0x2b17e
movq (%rax), %rdx
addq $0x10, %rdx
leaq 0x2ac1e(%rip), %rsi     # 0x3aa94
leaq 0x270(%rsp), %rdi
callq 0xe2cb
movq 0x670(%rsp), %rdi
cmpq %r14, %rdi
je 0xfea0
movq 0x680(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x270(%rsp), %rsi
movq 0x278(%rsp), %rdx
leaq 0x58(%rsp), %rdi
callq 0x7190
movq 0x270(%rsp), %rdi
cmpq %rbx, %rdi
je 0xfed7
movq 0x280(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x270(%rsp), %rdi
movq %rbx, (%rdi)
leaq 0x2abab(%rip), %rsi     # 0x3aa94
leaq 0x2aba5(%rip), %rdx     # 0x3aa95
callq 0x80f4
leaq 0x1b8(%rsp), %rdi
leaq 0x58(%rsp), %rsi
leaq 0x270(%rsp), %rdx
callq 0x1bf30
movq 0x270(%rsp), %rdi
cmpq %rbx, %rdi
je 0xff2c
movq 0x280(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x1c0(%rsp), %rax
leaq 0x110(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
addq %rsi, %rdx
leaq 0x100(%rsp), %rdi
callq 0x8a92
leaq 0x120(%rsp), %rdi
leaq 0x100(%rsp), %rsi
callq 0x1d5fc
movq 0x100(%rsp), %rdi
cmpq %r14, %rdi
je 0xff8a
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x74b0
cmpq $0x0, 0x128(%rsp)
je 0xffc5
movq %r12, %rdi
callq 0x2b14c
leaq 0x120(%rsp), %rsi
movq %rax, %rdi
callq 0xf300
movq %rax, %r14
movq %r12, %rdi
callq 0x2b14c
addq $0x8, %rax
cmpq %rax, %r14
jne 0x105b8
leaq 0x270(%rsp), %rdi
movq %rbx, (%rdi)
leaq 0x2a736(%rip), %rsi     # 0x3a70d
leaq 0x2a736(%rip), %rdx     # 0x3a714
callq 0x80f4
leaq 0x270(%rsp), %rsi
movq %r12, %rdi
callq 0x2b17e
movq (%rax), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rcx
leaq 0x58(%rsp), %rdi
xorl %edx, %edx
callq 0x77f0
movq %rax, %r14
movq 0x270(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1002a
movq 0x280(%rsp), %rsi
incq %rsi
callq 0x74b0
testq %r14, %r14
je 0x105b8
movq 0x58(%rsp), %rsi
leaq 0x670(%rsp), %rdi
movl $0x18, %edx
callq 0x75d0
movq 0x670(%rsp), %rax
movq -0x18(%rax), %r14
cmpl $0x0, 0x690(%rsp,%r14)
jne 0x1060c
leaq 0x6f0(%rsp), %rdi
callq 0x7130
testb %al, %al
je 0x1060c
movq 0x758(%rsp,%r14), %rsi
leaq 0xb0(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xa0(%rsp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
callq 0xf420
leaq 0x910(%rsp), %rdi
callq 0x75e0
movq 0x58(%rsp), %rdi
leaq 0x880(%rsp), %r14
movq %r14, %rsi
callq 0x78e0
movq 0x30(%r14), %rsi
leaq 0x910(%rsp), %rdi
callq 0x7470
leaq 0x270(%rsp), %rdi
movq %rbx, (%rdi)
leaq 0x2a016(%rip), %rsi     # 0x3a104
leaq 0x2a01d(%rip), %rdx     # 0x3a112
callq 0x80f4
leaq 0x918(%rsp), %r14
leaq 0x160(%rsp), %rdi
movq %r14, %rsi
callq 0x7710
leaq 0x1d0(%rsp), %rdi
leaq 0x270(%rsp), %rsi
leaq 0x160(%rsp), %rdx
callq 0x37020
leaq 0x170(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x10150
movq 0x170(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x270(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1016d
movq 0x280(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x270(%rsp), %rdi
movq %rbx, (%rdi)
leaq 0x2ac1c(%rip), %rdx     # 0x3ad9b
movq %rdx, %rsi
callq 0x80f4
leaq 0x270(%rsp), %rsi
movq %r14, %rdi
callq 0x7690
movq 0x270(%rsp), %rdi
cmpq %rbx, %rdi
je 0x101b4
movq 0x280(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x8d8(%rsp), %r15
leaq 0x910(%rsp), %rdi
movq %r15, %rsi
callq 0x7470
leaq 0x270(%rsp), %rdi
movq %r14, %rsi
callq 0x7710
movq 0x270(%rsp), %rdi
leaq 0x2a1ba(%rip), %rsi     # 0x3a3a5
leaq 0x160(%rsp), %rdx
callq 0x70b0
movq 0x270(%rsp), %rdi
cmpq %rbx, %rdi
je 0x10215
movq 0x280(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x188(%rsp), %rax
testq %rax, %rax
jle 0x1022d
subq %rax, %r15
movq %r15, 0x8d8(%rsp)
cmpl $0x0, 0x180(%rsp)
je 0x10246
addq $-0xe10, %r15           # imm = 0xF1F0
movq %r15, 0x8d8(%rsp)
leaq 0x270(%rsp), %rdi
movq %rbx, (%rdi)
leaq 0x2ab43(%rip), %rdx     # 0x3ad9b
movq %rdx, %rsi
callq 0x80f4
leaq 0x270(%rsp), %rsi
movq %r14, %rdi
callq 0x7690
movq 0x270(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1028d
movq 0x280(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x910(%rsp), %rdi
movq %r15, %rsi
callq 0x7470
leaq 0x270(%rsp), %rdi
movq %r14, %rsi
callq 0x7710
movq 0x270(%rsp), %rdi
leaq 0x2a0e9(%rip), %rsi     # 0x3a3a5
leaq 0x160(%rsp), %rdx
callq 0x70b0
movq 0x270(%rsp), %rdi
cmpq %rbx, %rdi
je 0x102e6
movq 0x280(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x2a46d(%rip), %rdx     # 0x3a75a
leaq 0x270(%rsp), %rdi
leaq 0x160(%rsp), %rcx
movl $0x400, %esi            # imm = 0x400
callq 0x73f0
leaq 0x20(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x29eff(%rip), %rsi     # 0x3a216
leaq 0x29f05(%rip), %rdx     # 0x3a223
leaq 0x10(%rsp), %rdi
callq 0x80f4
leaq 0x48(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x270(%rsp), %r15
movq %r15, %rdi
callq 0x7220
leaq (%rsp,%rax), %rdx
addq $0x270, %rdx            # imm = 0x270
leaq 0x38(%rsp), %rdi
movq %r15, %rsi
callq 0x80f4
leaq 0x1d0(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x38(%rsp), %rdx
callq 0x37020
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0x10387
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x10(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1039e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x10(%rsp), %rdi
movq %rbx, (%rdi)
leaq 0x2a9ee(%rip), %rdx     # 0x3ad9b
movq %rdx, %rsi
callq 0x80f4
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x7690
movq 0x10(%rsp), %rdi
cmpq %rbx, %rdi
je 0x103d9
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x1d0(%rsp), %rdi
callq 0x373a0
leaq 0x10(%rsp), %rdi
movq %rbx, (%rdi)
leaq 0x29ea2(%rip), %rsi     # 0x3a297
leaq 0x29ea1(%rip), %rdx     # 0x3a29d
callq 0x80f4
leaq 0x38(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x2a7cc(%rip), %rsi     # 0x3abdc
leaq 0x2a7cc(%rip), %rdx     # 0x3abe3
callq 0x80f4
leaq 0x1d0(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x38(%rsp), %rdx
callq 0x37020
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0x1044a
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x10(%rsp), %rdi
cmpq %rbx, %rdi
je 0x10461
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x3e100(%rip), %rax     # 0x4e568
movq 0x8(%rax), %r14
leaq 0x58(%rsp), %r15
movq %r15, %rdi
movl $0x2e, %esi
movq $-0x1, %rdx
callq 0x7900
leaq 0x1(%rax), %rdx
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
movq $-0x1, %rcx
callq 0x74d0
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x17fd4
movq %rax, %r14
movq 0x10(%rsp), %rdi
cmpq %rbx, %rdi
je 0x104c4
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x74b0
testq %r14, %r14
je 0x10556
leaq 0x10(%rsp), %rdi
movq %rbx, (%rdi)
leaq 0x29c76(%rip), %rsi     # 0x3a152
leaq 0x29c7b(%rip), %rdx     # 0x3a15e
callq 0x80f4
leaq 0x38(%rsp), %rdi
movq %r13, (%rdi)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
callq 0x8a92
leaq 0x2a1e5(%rip), %rsi     # 0x3a6ec
leaq 0x38(%rsp), %rdi
callq 0x78d0
leaq 0x1d0(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x38(%rsp), %rdx
callq 0x37020
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0x1053f
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x10(%rsp), %rdi
cmpq %rbx, %rdi
je 0x10556
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x1d0(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x37b04
movq 0x3da2e(%rip), %rsi     # 0x4dfa0
leaq 0x910(%rsp), %rdi
callq 0x72b0
leaq 0x980(%rsp), %rdi
callq 0x71c0
movq 0xa0(%rsp), %rdi
cmpq %r12, %rdi
je 0x105a9
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x670(%rsp), %rdi
callq 0x7110
jmp 0x105f5
leaq 0x270(%rsp), %rdi
leaq 0x58(%rsp), %r8
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
callq 0x13518
leaq 0x270(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
callq 0x15fb0
leaq 0x270(%rsp), %rdi
callq 0x15872
leaq 0x1d0(%rsp), %rsi
movq 0x30(%rsp), %rdi
callq 0x36e1a
jmp 0x1088e
callq 0x7070
movl (%rax), %edi
cmpl $0x13, %edi
jg 0x1062b
cmpl $0x2, %edi
je 0x1063d
cmpl $0xd, %edi
je 0x106d3
jmp 0x10769
cmpl $0x15, %edi
je 0x106d3
cmpl $0x14, %edi
jne 0x10769
leaq 0xf0(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x2a0c5(%rip), %rsi     # 0x3a715
leaq 0x2a0cc(%rip), %rdx     # 0x3a723
leaq 0xe0(%rsp), %rdi
callq 0x80f4
leaq 0x1d0(%rsp), %rdi
movl $0x194, %esi            # imm = 0x194
callq 0x37aee
leaq 0xbc8(%rsp), %rdi
movq %rax, %rsi
callq 0x36e1a
leaq 0xe0(%rsp), %rsi
leaq 0xbc8(%rsp), %rdx
movq 0x30(%rsp), %rdi
movl $0x3, %ecx
xorl %r8d, %r8d
callq 0xe204
leaq 0xbc8(%rsp), %rdi
callq 0x36d9a
movq 0xe0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x10881
movq 0xf0(%rsp), %rsi
jmp 0x10879
leaq 0xd0(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x29cd6(%rip), %rsi     # 0x3a3bc
leaq 0x29ce0(%rip), %rdx     # 0x3a3cd
leaq 0xc0(%rsp), %rdi
callq 0x80f4
leaq 0x1d0(%rsp), %rdi
movl $0x193, %esi            # imm = 0x193
callq 0x37aee
leaq 0xb28(%rsp), %rdi
movq %rax, %rsi
callq 0x36e1a
leaq 0xc0(%rsp), %rsi
leaq 0xb28(%rsp), %rdx
movq 0x30(%rsp), %rdi
movl $0x3, %ecx
xorl %r8d, %r8d
callq 0xe204
leaq 0xb28(%rsp), %rdi
callq 0x36d9a
movq 0xc0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x10881
movq 0xd0(%rsp), %rsi
jmp 0x10879
callq 0x71d0
leaq 0x270(%rsp), %rdi
leaq 0x910(%rsp), %rdx
movq %rax, %rsi
callq 0xde66
leaq 0x29fa0(%rip), %rcx     # 0x3a72d
leaq 0x270(%rsp), %rdi
movl $0x2c, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x7500
leaq 0x90(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x107d4
movq %rdx, 0x80(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x90(%rsp)
jmp 0x107db
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x88(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x1d0(%rsp), %rdi
movl $0x1f4, %esi            # imm = 0x1F4
callq 0x37aee
leaq 0xa88(%rsp), %rdi
movq %rax, %rsi
callq 0x36e1a
leaq 0x80(%rsp), %rsi
leaq 0xa88(%rsp), %rdx
movq 0x30(%rsp), %rdi
movl $0x3, %ecx
xorl %r8d, %r8d
callq 0xe204
leaq 0xa88(%rsp), %rdi
callq 0x36d9a
movq 0x80(%rsp), %rdi
cmpq %r15, %rdi
je 0x10864
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x270(%rsp), %rdi
cmpq %rbx, %rdi
je 0x10881
movq 0x280(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x670(%rsp), %rdi
callq 0x7110
leaq 0x130(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x108af
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x1b8(%rsp), %rdi
callq 0x96b6
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x108d7
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x1d0(%rsp), %rdi
callq 0x36d9a
movq 0x30(%rsp), %rax
addq $0xc68, %rsp            # imm = 0xC68
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1094d
jmp 0x1094d
jmp 0x1096b
jmp 0x10a78
movq %rax, 0x8(%rsp)
leaq 0xa88(%rsp), %rdi
callq 0x36d9a
jmp 0x10a3b
movq %rax, 0x8(%rsp)
jmp 0x10a58
jmp 0x10a71
jmp 0x10a78
jmp 0x1096b
jmp 0x10a78
jmp 0x1094d
jmp 0x1096b
jmp 0x10a78
jmp 0x10a78
jmp 0x1096b
jmp 0x10a78
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0x10970
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x10970
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
cmpq %rbx, %rdi
je 0x10a7d
movq 0x20(%rsp), %rsi
jmp 0x109ed
jmp 0x10a78
jmp 0x10a78
jmp 0x10a78
jmp 0x109cf
jmp 0x10a78
jmp 0x10a78
jmp 0x109cf
jmp 0x10a78
movq %rax, 0x8(%rsp)
leaq 0x170(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x109d4
movq 0x170(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x109d4
movq %rax, 0x8(%rsp)
movq 0x270(%rsp), %rdi
cmpq %rbx, %rdi
je 0x10a7d
movq 0x280(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x10a7d
jmp 0x10a78
movq %rax, 0x8(%rsp)
jmp 0x10a9e
jmp 0x10a71
movq %rax, 0x8(%rsp)
leaq 0xb28(%rsp), %rdi
callq 0x36d9a
jmp 0x10ad2
movq %rax, 0x8(%rsp)
leaq 0xbc8(%rsp), %rdi
callq 0x36d9a
jmp 0x10aee
movq %rax, 0x8(%rsp)
movq 0x80(%rsp), %rdi
cmpq %r15, %rdi
je 0x10a58
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x270(%rsp), %rdi
cmpq %rbx, %rdi
je 0x10abb
movq 0x280(%rsp), %rsi
jmp 0x10ab3
jmp 0x10a71
movq %rax, 0x8(%rsp)
jmp 0x10abb
movq %rax, 0x8(%rsp)
movq 0x3d51c(%rip), %rsi     # 0x4dfa0
leaq 0x910(%rsp), %rdi
callq 0x72b0
leaq 0x980(%rsp), %rdi
callq 0x71c0
movq 0xa0(%rsp), %rdi
cmpq %r12, %rdi
je 0x10abb
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x670(%rsp), %rdi
callq 0x7110
jmp 0x10d93
movq %rax, 0x8(%rsp)
movq 0xc0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x10abb
movq 0xd0(%rsp), %rsi
jmp 0x10ab3
movq %rax, 0x8(%rsp)
movq 0xe0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x10abb
movq 0xf0(%rsp), %rsi
jmp 0x10ab3
jmp 0x10d8e
movq %rdx, %rbp
movq %rax, 0x8(%rsp)
movq 0x270(%rsp), %rdi
cmpq %rbx, %rdi
je 0x10cba
movq 0x280(%rsp), %rsi
jmp 0x10cb2
movq %rdx, %rbp
movq %rax, 0x8(%rsp)
jmp 0x10cba
movq %rax, 0x8(%rsp)
movq 0x270(%rsp), %rdi
cmpq %rbx, %rdi
je 0x10d93
movq 0x280(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x10d93
jmp 0x10d8e
movq %rdx, %r15
movq %rax, 0x8(%rsp)
leaq 0x270(%rsp), %rdi
callq 0x15872
jmp 0x10b8c
movq %rdx, %r15
movq %rax, 0x8(%rsp)
cmpl $0x2, %r15d
jne 0x10d93
movq 0x8(%rsp), %rdi
callq 0x7210
movq %rax, %r14
movq (%rax), %rax
movq %r14, %rdi
callq *0x10(%rax)
leaq 0x198(%rsp), %rdi
leaq 0x270(%rsp), %rdx
movq %rax, %rsi
callq 0xde66
leaq 0x198(%rsp), %rdi
xorl %esi, %esi
movl $0x3, %edx
movl $0x1, %ecx
callq 0xdea4
leaq 0x1a8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x10bfe
movq 0x1a8(%rsp), %rsi
incq %rsi
callq 0x74b0
movq (%r14), %rax
movq %r14, %rdi
callq *0x18(%rax)
leaq 0x1d0(%rsp), %rdi
movl %eax, %esi
callq 0x37aee
callq 0x7780
jmp 0x105f5
jmp 0x10d8e
jmp 0x10c4f
movq %rax, 0x8(%rsp)
leaq 0x1a8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x10c54
movq 0x1a8(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x10c54
movq %rax, 0x8(%rsp)
callq 0x7780
jmp 0x10d93
jmp 0x10d8e
jmp 0x10d8e
movq %rax, 0x8(%rsp)
movq 0x100(%rsp), %rdi
cmpq %r14, %rdi
je 0x10db4
movq 0x110(%rsp), %rsi
jmp 0x10dac
movq %rax, 0x8(%rsp)
jmp 0x10db4
movq %rdx, %rbp
movq %rax, 0x8(%rsp)
movq 0x670(%rsp), %rdi
cmpq %r14, %rdi
je 0x10cba
movq 0x680(%rsp), %rsi
incq %rsi
callq 0x74b0
cmpl $0x1, %ebp
jne 0x10dc1
movq 0x8(%rsp), %rdi
callq 0x7210
callq 0x7780
jmp 0xfed7
jmp 0x10d26
movq %rax, 0x8(%rsp)
movq 0x270(%rsp), %rdi
cmpq %rbx, %rdi
je 0x10dc1
movq 0x280(%rsp), %rsi
jmp 0x10d19
jmp 0x10d26
movq %rax, 0x8(%rsp)
movq 0x140(%rsp), %rdi
cmpq %r14, %rdi
je 0x10dc1
movq 0x150(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x10dc1
movq %rax, 0x8(%rsp)
jmp 0x10dc1
movq %rax, 0x8(%rsp)
cmpl $0x1, %edx
jne 0x10dc1
movq 0x8(%rsp), %rdi
callq 0x7210
leaq 0x1d0(%rsp), %rdi
movl $0x194, %esi            # imm = 0x194
callq 0x37aee
movq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0x36e1a
callq 0x7780
jmp 0x108bc
jmp 0x10d26
movq %rax, 0x8(%rsp)
callq 0x7780
jmp 0x10dc1
movq %rax, %rdi
callq 0x96aa
movq %rax, 0x8(%rsp)
jmp 0x10ddc
movq %rax, 0x8(%rsp)
leaq 0x130(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x10db4
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x1b8(%rsp), %rdi
callq 0x96b6
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x10ddc
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x1d0(%rsp), %rdi
callq 0x36d9a
movq 0x8(%rsp), %rdi
callq 0x7810
nop