// File: /workspace/github_cpp_makefile_star2_O1/mbourand[P]webserv/srcs/Methods/GetMethod.cpp
// Function: GetMethod::process(Request const&, ConfigContext const&, ServerSocket const&)
Response GetMethod::process(const Request& request, const ConfigContext& config, const ServerSocket& socket)
{
	const URL& url = request._url;
	Response response(200, url._path);
	response.setCompression(request._headers);
	int base_depth = 0;
	std::string realPath = config.rootPath(url._path, base_depth);
	try
	{
		realPath = ft::simplify_path(realPath, true, base_depth);
	}
	catch (std::exception& e)
	{
		return Logger::print("Path is not safe", response.setCode(400), ERROR, VERBOSE);
	}

	if (realPath[0] != '/')
		realPath = g_webserv.cwd + "/" + realPath;

	if (ft::is_directory(realPath))
	{
		try
		{
			std::string index = "/" + config.getParam("index").front();
			realPath += index;
			std::string extension = index.substr(index.rfind('.'));
			if (config.getCGIExtensions().find(extension) != config.getCGIExtensions().end() || (realPath.find(config.getParam("cgi_dir").front()) == 0))
				return process_cgi(realPath, url, config, socket, request);
		}
		catch (std::exception& e)
		{
			if (config.hasAutoIndex())
				return directory_listing(request, config, realPath);
			if (!url._is_directory)
			{
				response.addHeader("Location", url._path + "/");
				return response.setCode(301);
			}
		}
	}
	else if (url._is_directory)
		return Logger::print("File not found", response.setCode(404), ERROR, VERBOSE);


	std::list<std::string> splitted = ft::split(realPath, '/');
	std::string current_path;
	current_path.reserve(realPath.size());
	if (realPath[0] == '/')
		current_path.push_back('/');
	for (std::list<std::string>::iterator it = splitted.begin();it != splitted.end(); it++, current_path.push_back('/'))
	{
		current_path += *it;
		if (!ft::is_regular_file(current_path))
			continue;
		std::string file_name;
		if (ft::contains(current_path, '/'))
			file_name = current_path.substr(current_path.rfind('/'));
		else
			file_name = current_path;
		if (file_name.rfind('.') != std::string::npos)
		{
			std::string extension = file_name.substr(file_name.rfind('.'));
			if (config.getCGIExtensions().find(extension) != config.getCGIExtensions().end() || (realPath.find(config.getParam("cgi_dir").front()) == 0))
				return process_cgi(realPath, url, config, socket, request);
		}
	}

	std::fstream file;
	if (!request.getHeaderValue("Accept-Language").empty())
	{
		std::string filename = realPath.substr((realPath.rfind('/') == std::string::npos ? 0 : realPath.rfind('/')));
		std::string folder = (realPath.size() == filename.size() ? "" : realPath.substr(0, realPath.rfind(filename))) + "/.langs/";

		if (ft::is_directory(folder))
		{
			AcceptLanguageHeader* ach;
			for (Request::HeadersVector::const_iterator it = request._headers.begin(); it != request._headers.end(); it++)
				if ((*it)->getType() == AcceptLanguageHeader().getType())
					ach = reinterpret_cast<AcceptLanguageHeader*>(*it);

			std::multimap<float, std::string, std::greater<float> > language_preferences = ach->getPreferences();
			for (std::map<float, std::string, std::greater<float> >::const_iterator it = language_preferences.begin(); it != language_preferences.end(); it++)
			{
				if (g_webserv.languages->GetNode(it->second) == NULL)
					continue;

				file.open((folder + it->second + "/" + filename).c_str());
				if (file.good() && file.is_open())
				{
					response.addHeader("Content-Language", it->second);
					break;
				}
			}
		}
	}

	if (!file.good() || !file.is_open())
	{
		file.open(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 $0xe48, %rsp            # imm = 0xE48
movq %r8, 0x110(%rsp)
movq %rcx, %r14
movq %rdx, %r13
movq %rdi, 0x10(%rsp)
leaq 0xb8(%rdx), %r15
leaq 0x910(%rsp), %rbx
movq %rbx, %rdi
movl $0xc8, %esi
movq %r15, %rdx
callq 0x37384
leaq 0x140(%r13), %rsi
movq %rbx, %rdi
callq 0x37f3c
leaq 0x104(%rsp), %rcx
movl $0x0, (%rcx)
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2bd04
movl 0x104(%rsp), %ecx
leaq 0x300(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movl $0x1, %edx
callq 0x1d582
leaq 0x40(%rsp), %rdi
leaq 0x300(%rsp), %rbx
movq %rbx, %rsi
callq 0x7590
movq (%rbx), %rdi
leaq 0x310(%rsp), %rax
cmpq %rax, %rdi
je 0xbca7
movq 0x310(%rsp), %rsi
incq %rsi
callq 0x74b0
movq %r14, 0x18(%rsp)
movq 0x40(%rsp), %rax
cmpb $0x2f, (%rax)
je 0xbdad
leaq 0x710(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x4289b(%rip), %rax     # 0x4e568
movq 0x48(%rax), %rsi
movq 0x50(%rax), %rdx
addq %rsi, %rdx
leaq 0x700(%rsp), %rdi
callq 0x8a8a
leaq 0x2eda8(%rip), %rsi     # 0x3aa94
leaq 0x700(%rsp), %rdi
callq 0x78d0
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
leaq 0x700(%rsp), %rdi
callq 0x7190
leaq 0x310(%rsp), %r12
movq %r12, 0x300(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xbd44
movq %rdx, 0x300(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x310(%rsp)
jmp 0xbd4c
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x300(%rsp), %rbx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x40(%rsp), %rdi
movq %rbx, %rsi
callq 0x7590
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0xbd90
movq 0x310(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x700(%rsp), %rdi
cmpq %r14, %rdi
je 0xbdad
movq 0x710(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x228(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
addq %rsi, %rdx
leaq 0x218(%rsp), %rdi
callq 0x8a8a
leaq 0x218(%rsp), %rdi
callq 0x1cfb4
movl %eax, %ebx
movq 0x218(%rsp), %rdi
cmpq %r14, %rdi
je 0xbdff
movq 0x228(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x30(%r13), %rax
movq %rax, 0x108(%rsp)
testb %bl, %bl
movq %r13, 0x60(%rsp)
movq 0x18(%rsp), %r14
je 0xc015
leaq 0x710(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x30f2d(%rip), %rsi     # 0x3cd5e
leaq 0x30f2b(%rip), %rdx     # 0x3cd63
leaq 0x700(%rsp), %rdi
callq 0x80f4
leaq 0x700(%rsp), %rsi
movq %r14, %rdi
callq 0x2b4c6
movq (%rax), %rdx
addq $0x10, %rdx
leaq 0x2ec31(%rip), %rsi     # 0x3aa94
leaq 0x300(%rsp), %rdi
callq 0xe31d
movq 0x700(%rsp), %rdi
cmpq %r12, %rdi
je 0xbe8d
movq 0x710(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x300(%rsp), %rsi
movq 0x308(%rsp), %rdx
leaq 0x40(%rsp), %rdi
callq 0x7190
leaq 0x300(%rsp), %rbx
movq %rbx, %rdi
movl $0x2e, %esi
movq $-0x1, %rdx
callq 0x7900
leaq 0x700(%rsp), %rdi
movq %rbx, %rsi
movq %rax, %rdx
movq $-0x1, %rcx
callq 0x74d0
movq %r14, %rdi
callq 0x2b494
leaq 0x700(%rsp), %rsi
movq %rax, %rdi
callq 0xf34e
movq %rax, %rbx
movq %r14, %rdi
callq 0x2b494
movq %rax, %r14
addq $0x8, %r14
movb $0x1, %bpl
cmpq %r14, %rbx
jne 0xbf66
leaq 0x208(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x2e7eb(%rip), %rsi     # 0x3a70d
leaq 0x2e7eb(%rip), %rdx     # 0x3a714
leaq 0x1f8(%rsp), %rdi
callq 0x80f4
leaq 0x1f8(%rsp), %rsi
movq 0x18(%rsp), %rdi
callq 0x2b4c6
movq (%rax), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rcx
leaq 0x40(%rsp), %rdi
xorl %edx, %edx
callq 0x77f0
testq %rax, %rax
sete %bpl
cmpq %r14, %rbx
movq 0x18(%rsp), %r14
jne 0xbf91
leaq 0x208(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbf91
movq 0x208(%rsp), %rsi
incq %rsi
callq 0x74b0
testb %bpl, %bpl
je 0xc0c1
movq 0x60(%rsp), %rax
movq %rax, (%rsp)
leaq 0x40(%rsp), %rdx
movq 0x10(%rsp), %rdi
movq 0x108(%rsp), %rcx
movq %r14, %r8
movq 0x110(%rsp), %r9
callq 0xdc96
movq 0x700(%rsp), %rdi
cmpq %r12, %rdi
je 0xbfe2
movq 0x710(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x300(%rsp), %rdi
leaq 0x310(%rsp), %rax
cmpq %rax, %rdi
je 0xc007
movq 0x310(%rsp), %rsi
incq %rsi
callq 0x74b0
testb %bpl, %bpl
je 0xc103
jmp 0xd328
cmpb $0x1, 0x118(%r13)
jne 0xc103
leaq 0x1e8(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x2e6df(%rip), %rsi     # 0x3a715
leaq 0x2e6e6(%rip), %rdx     # 0x3a723
leaq 0x1d8(%rsp), %rdi
callq 0x80f4
leaq 0x910(%rsp), %rdi
movl $0x194, %esi            # imm = 0x194
callq 0x37f1c
leaq 0xd08(%rsp), %rdi
movq %rax, %rsi
callq 0x37246
leaq 0x1d8(%rsp), %rsi
leaq 0xd08(%rsp), %rdx
movq 0x10(%rsp), %rdi
movl $0x3, %ecx
xorl %r8d, %r8d
callq 0xe256
leaq 0xd08(%rsp), %rdi
callq 0x371c6
movq 0x1d8(%rsp), %rdi
cmpq %rbx, %rdi
je 0xd328
movq 0x1e8(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0xd328
movq 0x700(%rsp), %rdi
cmpq %r12, %rdi
je 0xc0de
movq 0x710(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x300(%rsp), %rdi
leaq 0x310(%rsp), %rax
cmpq %rax, %rdi
je 0xc103
movq 0x310(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x300(%rsp), %rdx
movb $0x2f, (%rdx)
leaq 0x258(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x1c387
leaq 0xb8(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0x48(%rsp), %rsi
leaq 0xa8(%rsp), %rdi
callq 0x7700
movq 0x40(%rsp), %rax
cmpb $0x2f, (%rax)
jne 0xc165
leaq 0xa8(%rsp), %rdi
movl $0x2f, %esi
callq 0x7420
movq 0x258(%rsp), %rbp
leaq 0xa8(%rsp), %rbx
leaq 0x158(%rsp), %r12
leaq 0x700(%rsp), %r13
leaq 0x258(%rsp), %rax
cmpq %rax, %rbp
je 0xc4bf
movq 0x10(%rbp), %rsi
movq 0x18(%rbp), %rdx
movq %rbx, %rdi
callq 0x7190
leaq 0x168(%rsp), %rax
movq %rax, 0x158(%rsp)
movq 0xa8(%rsp), %rsi
movq 0xb0(%rsp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x8a8a
movq %r12, %rdi
callq 0x1d23f
movl %eax, %r15d
movq 0x158(%rsp), %rdi
leaq 0x168(%rsp), %rax
cmpq %rax, %rdi
je 0xc201
movq 0x168(%rsp), %rsi
incq %rsi
callq 0x74b0
testb %r15b, %r15b
je 0xc4a9
leaq 0x310(%rsp), %rax
movq %rax, 0x300(%rsp)
movq $0x0, 0x308(%rsp)
movb $0x0, 0x310(%rsp)
movb $0x2f, 0x700(%rsp)
movq 0xa8(%rsp), %rdi
movq 0xb0(%rsp), %rsi
addq %rdi, %rsi
movq %r13, %rdx
callq 0xf3d7
movq 0xa8(%rsp), %rcx
addq 0xb0(%rsp), %rcx
cmpq %rcx, %rax
je 0xc2ce
movq %rbx, %rdi
movl $0x2f, %esi
movq $-0x1, %rdx
callq 0x7900
movq %r13, %rdi
movq %rbx, %rsi
movq %rax, %rdx
movq $-0x1, %rcx
callq 0x74d0
leaq 0x300(%rsp), %rdi
movq %r13, %rsi
callq 0x7590
movq 0x700(%rsp), %rdi
leaq 0x710(%rsp), %rax
cmpq %rax, %rdi
je 0xc2c4
movq 0x710(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x300(%rsp), %r15
jmp 0xc2e1
leaq 0x300(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x72c0
movq %r15, %rdi
movl $0x2e, %esi
movq $-0x1, %rdx
callq 0x7900
cmpq $-0x1, %rax
je 0xc484
movq %r12, %rbx
leaq 0x300(%rsp), %r15
movq %r15, %rdi
movl $0x2e, %esi
movq $-0x1, %rdx
callq 0x7900
movq %r13, %r12
movq %r13, %rdi
movq %r15, %rsi
movq %rax, %rdx
movq $-0x1, %rcx
callq 0x74d0
movq %r14, %rdi
callq 0x2b494
movq %rax, %rdi
movq %r12, %rsi
callq 0xf34e
movq %rax, %r13
movq %r14, %rdi
callq 0x2b494
movq %rax, %r15
addq $0x8, %r15
movb $0x1, %r14b
cmpq %r15, %r13
jne 0xc3bc
leaq 0x148(%rsp), %rax
movq %rax, 0x138(%rsp)
leaq 0x138(%rsp), %r14
movq %r14, %rdi
leaq 0x2e388(%rip), %rsi     # 0x3a70d
leaq 0x2e388(%rip), %rdx     # 0x3a714
callq 0x80f4
movq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x2b4c6
movq (%rax), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rcx
leaq 0x40(%rsp), %rdi
xorl %edx, %edx
callq 0x77f0
testq %rax, %rax
sete %r14b
cmpq %r15, %r13
movq %r12, %r13
movq %rbx, %r12
leaq 0xa8(%rsp), %rbx
jne 0xc3f4
movq 0x138(%rsp), %rdi
leaq 0x148(%rsp), %rax
cmpq %rax, %rdi
je 0xc3f4
movq 0x148(%rsp), %rsi
incq %rsi
callq 0x74b0
testb %r14b, %r14b
je 0xc45a
movq 0x60(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rdx
movq 0x108(%rsp), %rcx
movq 0x18(%rsp), %r8
movq 0x110(%rsp), %r9
callq 0xdc96
movq 0x700(%rsp), %rdi
leaq 0x710(%rsp), %rax
cmpq %rax, %rdi
je 0xc44b
movq 0x710(%rsp), %rsi
incq %rsi
callq 0x74b0
testb %r14b, %r14b
movq 0x18(%rsp), %r14
je 0xc484
jmp 0xd196
movq 0x700(%rsp), %rdi
leaq 0x710(%rsp), %rax
cmpq %rax, %rdi
je 0xc47f
movq 0x710(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x18(%rsp), %r14
movq 0x300(%rsp), %rdi
leaq 0x310(%rsp), %rax
cmpq %rax, %rdi
je 0xc4a9
movq 0x310(%rsp), %rsi
incq %rsi
callq 0x74b0
movq (%rbp), %rbp
movq %rbx, %rdi
movl $0x2f, %esi
callq 0x7420
jmp 0xc185
leaq 0x700(%rsp), %rdi
callq 0x7550
leaq 0x9c0(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x2db9d(%rip), %rsi     # 0x3a07c
leaq 0x2dba5(%rip), %rdx     # 0x3a08b
leaq 0x9b0(%rsp), %rdi
callq 0x80f4
movq 0x60(%rsp), %r15
leaq 0x300(%rsp), %rdi
leaq 0x9b0(%rsp), %rdx
movq %r15, %rsi
callq 0x35fd4
movq 0x300(%rsp), %rdi
movq 0x308(%rsp), %rbx
leaq 0x310(%rsp), %rax
cmpq %rax, %rdi
je 0xc53d
movq 0x310(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x9b0(%rsp), %rdi
cmpq %r14, %rdi
je 0xc55a
movq 0x9c0(%rsp), %rsi
incq %rsi
callq 0x74b0
testq %rbx, %rbx
je 0xca09
leaq 0x40(%rsp), %rdi
movl $0x2f, %esi
movq $-0x1, %rdx
callq 0x7900
cmpq $-0x1, %rax
je 0xc59a
leaq 0x40(%rsp), %rdi
movl $0x2f, %esi
movq $-0x1, %rdx
callq 0x7900
movq %rax, %rdx
jmp 0xc59c
xorl %edx, %edx
leaq 0x9b0(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq $-0x1, %rcx
callq 0x74d0
movq 0x9b8(%rsp), %rcx
cmpq %rcx, 0x48(%rsp)
jne 0xc5e8
leaq 0x300(%rsp), %rdi
leaq 0x310(%rsp), %rax
movq %rax, (%rdi)
leaq 0x2e7bd(%rip), %rdx     # 0x3ad9b
movq %rdx, %rsi
callq 0x80f4
jmp 0xc619
movq 0x9b0(%rsp), %rsi
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
movq $-0x1, %rdx
callq 0x7600
leaq 0x300(%rsp), %rdi
movq %rbx, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x74d0
leaq 0x2e104(%rip), %rsi     # 0x3a724
leaq 0x300(%rsp), %rdi
callq 0x78d0
leaq 0x280(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xc65d
movq %rdx, 0x270(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x280(%rsp)
jmp 0xc663
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x278(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x300(%rsp), %rdi
leaq 0x310(%rsp), %rax
cmpq %rax, %rdi
je 0xc6a3
movq 0x310(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x1c8(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x270(%rsp), %rsi
movq 0x278(%rsp), %rdx
addq %rsi, %rdx
leaq 0x1b8(%rsp), %rdi
callq 0x8a8a
leaq 0x1b8(%rsp), %rdi
callq 0x1cfb4
movl %eax, %ebx
movq 0x1b8(%rsp), %rdi
cmpq %r14, %rdi
je 0xc6fb
movq 0x1c8(%rsp), %rsi
incq %rsi
callq 0x74b0
testb %bl, %bl
je 0xc9bf
movq 0x140(%r15), %rbp
leaq 0xc8(%rsp), %r14
leaq 0x300(%rsp), %r15
leaq 0x68(%rsp), %r12
movq (%rbp), %rsi
movq (%rsi), %rax
movq %r14, %rdi
callq *0x10(%rax)
movq %r15, %rdi
callq 0x823c
movq %r12, %rdi
movq %r15, %rsi
callq 0x828a
movq 0xd0(%rsp), %rdx
cmpq 0x70(%rsp), %rdx
jne 0xc76d
testq %rdx, %rdx
je 0xc772
movq 0x68(%rsp), %rsi
movq 0xc8(%rsp), %rdi
callq 0x74c0
testl %eax, %eax
sete %r13b
jmp 0xc775
xorl %r13d, %r13d
jmp 0xc775
movb $0x1, %r13b
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0xc791
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x74b0
movq %r15, %rdi
callq 0x8268
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0xc7be
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x74b0
testb %r13b, %r13b
je 0xc7c7
movq (%rbp), %rbx
addq $0x8, %rbp
movq 0x60(%rsp), %rax
cmpq 0x148(%rax), %rbp
jne 0xc71f
movq (%rbx), %rax
leaq 0x300(%rsp), %rdi
movq %rbx, %rsi
callq *0x28(%rax)
leaq 0x308(%rsp), %r14
movq 0x10(%r14), %rbx
cmpq %r14, %rbx
leaq 0xd8(%rsp), %r13
je 0xc9b2
leaq 0x780(%rsp), %rbp
leaq 0x20(%rsp), %r15
leaq 0x41d49(%rip), %rax     # 0x4e568
movq 0x10(%rax), %rdi
leaq 0x28(%rbx), %r12
movq %r12, %rsi
callq 0x180c8
testq %rax, %rax
je 0xc99e
movq %r15, %rdi
leaq 0x270(%rsp), %rsi
movq %r12, %rdx
callq 0xe3fb
movq %r15, %rdi
leaq 0x2e23f(%rip), %rsi     # 0x3aa94
callq 0x78d0
leaq 0x78(%rsp), %rsi
movq %rsi, 0x68(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xc882
movq %rdx, 0x68(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x78(%rsp)
jmp 0xc888
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x70(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x9b0(%rsp), %rsi
movq 0x9b8(%rsp), %rdx
leaq 0x68(%rsp), %rdi
callq 0x7190
movq %r13, 0xc8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xc8e6
movq %rdx, 0xc8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xd8(%rsp)
jmp 0xc8ee
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0xd0(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0xc8(%rsp), %rsi
leaq 0x700(%rsp), %rdi
movl $0x18, %edx
callq 0x7450
movq 0xc8(%rsp), %rdi
cmpq %r13, %rdi
je 0xc940
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0xc95c
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0xc978
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x700(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x720(%rsp,%rax)
jne 0xc99e
movq %rbp, %rdi
callq 0x7130
testb %al, %al
jne 0xd367
movq %rbx, %rdi
callq 0x7520
movq %rax, %rbx
cmpq %r14, %rax
jne 0xc818
leaq 0x300(%rsp), %rdi
callq 0x971e
movq 0x270(%rsp), %rdi
leaq 0x280(%rsp), %rax
cmpq %rax, %rdi
leaq 0x9c0(%rsp), %rbx
je 0xc9ec
movq 0x280(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x9b0(%rsp), %rdi
cmpq %rbx, %rdi
je 0xca09
movq 0x9c0(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x700(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x720(%rsp,%rax)
jne 0xca30
leaq 0x780(%rsp), %rdi
callq 0x7130
testb %al, %al
jne 0xca76
movq 0x40(%rsp), %rsi
leaq 0x700(%rsp), %rdi
movl $0x18, %edx
callq 0x7450
movq 0x700(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x720(%rsp,%rax)
jne 0xd029
leaq 0x780(%rsp), %rdi
callq 0x7130
testb %al, %al
je 0xd029
movq 0x700(%rsp), %rax
movq -0x18(%rax), %rax
movq 0x7e8(%rsp,%rax), %rsi
leaq 0x78(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x68(%rsp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
callq 0xf46a
leaq 0x9b0(%rsp), %rdi
callq 0x75e0
movq 0x40(%rsp), %rdi
leaq 0x270(%rsp), %rbx
movq %rbx, %rsi
callq 0x78e0
movq 0x30(%rbx), %rsi
leaq 0x9b0(%rsp), %rdi
callq 0x7470
leaq 0x300(%rsp), %rdi
leaq 0x310(%rsp), %rax
movq %rax, (%rdi)
leaq 0x2d60d(%rip), %rsi     # 0x3a104
leaq 0x2d614(%rip), %rdx     # 0x3a112
callq 0x80f4
leaq 0x9b8(%rsp), %rbx
leaq 0xc8(%rsp), %rdi
movq %rbx, %rsi
callq 0x7710
leaq 0x910(%rsp), %rdi
leaq 0x300(%rsp), %rsi
leaq 0xc8(%rsp), %rdx
callq 0x3744c
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xcb59
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x300(%rsp), %rdi
leaq 0x310(%rsp), %rax
cmpq %rax, %rdi
je 0xcb7e
movq 0x310(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x300(%rsp), %rdi
leaq 0x310(%rsp), %rax
movq %rax, (%rdi)
leaq 0x2e203(%rip), %rdx     # 0x3ad9b
movq %rdx, %rsi
callq 0x80f4
leaq 0x300(%rsp), %rsi
movq %rbx, %rdi
callq 0x7690
movq 0x300(%rsp), %rdi
leaq 0x310(%rsp), %rax
cmpq %rax, %rdi
je 0xcbd5
movq 0x310(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x2c8(%rsp), %r14
leaq 0x9b0(%rsp), %rdi
movq %r14, %rsi
callq 0x7470
leaq 0x300(%rsp), %rdi
movq %rbx, %rsi
callq 0x7710
movq 0x300(%rsp), %rdi
leaq 0x2d799(%rip), %rsi     # 0x3a3a5
leaq 0xc8(%rsp), %rdx
callq 0x70b0
movq 0x300(%rsp), %rdi
leaq 0x310(%rsp), %rax
cmpq %rax, %rdi
je 0xcc3e
movq 0x310(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0xf0(%rsp), %rax
testq %rax, %rax
jle 0xcc56
subq %rax, %r14
movq %r14, 0x2c8(%rsp)
cmpl $0x0, 0xe8(%rsp)
je 0xcc6c
addq $-0xe10, 0x2c8(%rsp) # imm = 0xF1F0
leaq 0x300(%rsp), %rdi
leaq 0x310(%rsp), %rax
movq %rax, (%rdi)
leaq 0x2e115(%rip), %rdx     # 0x3ad9b
movq %rdx, %rsi
callq 0x80f4
leaq 0x300(%rsp), %rsi
movq %rbx, %rdi
callq 0x7690
movq 0x300(%rsp), %rdi
leaq 0x310(%rsp), %rax
cmpq %rax, %rdi
je 0xccc3
movq 0x310(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x2c8(%rsp), %rsi
leaq 0x9b0(%rsp), %rdi
callq 0x7470
leaq 0x300(%rsp), %rdi
movq %rbx, %rsi
callq 0x7710
movq 0x300(%rsp), %rdi
leaq 0x2d6ae(%rip), %rsi     # 0x3a3a5
leaq 0xc8(%rsp), %rdx
callq 0x70b0
movq 0x300(%rsp), %rdi
leaq 0x310(%rsp), %rax
cmpq %rax, %rdi
je 0xcd29
movq 0x310(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x2da2a(%rip), %rdx     # 0x3a75a
leaq 0x300(%rsp), %rdi
leaq 0xc8(%rsp), %rcx
movl $0x400, %esi            # imm = 0x400
callq 0x73f0
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x2d4bb(%rip), %rsi     # 0x3a216
leaq 0x2d4c1(%rip), %rdx     # 0x3a223
leaq 0x20(%rsp), %rdi
callq 0x80f4
leaq 0x98(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x300(%rsp), %r14
movq %r14, %rdi
callq 0x7220
leaq (%rsp,%rax), %rdx
addq $0x300, %rdx            # imm = 0x300
leaq 0x88(%rsp), %rdi
movq %r14, %rsi
callq 0x80f4
leaq 0x910(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x88(%rsp), %rdx
callq 0x3744c
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
je 0xcdda
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0xcdf1
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x20(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x2df9b(%rip), %rdx     # 0x3ad9b
movq %rdx, %rsi
callq 0x80f4
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x7690
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0xce2c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x910(%rsp), %rdi
callq 0x377cc
leaq 0x20(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x2d44f(%rip), %rsi     # 0x3a297
leaq 0x2d44e(%rip), %rdx     # 0x3a29d
callq 0x80f4
leaq 0x88(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x2dd76(%rip), %rsi     # 0x3abdc
leaq 0x2dd76(%rip), %rdx     # 0x3abe3
callq 0x80f4
leaq 0x910(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x88(%rsp), %rdx
callq 0x3744c
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
je 0xcea9
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0xcec0
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x416a1(%rip), %rax     # 0x4e568
movq 0x8(%rax), %rbx
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movl $0x2e, %esi
movq $-0x1, %rdx
callq 0x7900
leaq 0x1(%rax), %rdx
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
movq $-0x1, %rcx
callq 0x74d0
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x180c8
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0xcf23
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x74b0
testq %rbx, %rbx
je 0xcfc4
leaq 0x20(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x2d217(%rip), %rsi     # 0x3a152
leaq 0x2d21c(%rip), %rdx     # 0x3a15e
callq 0x80f4
leaq 0x88(%rsp), %rdi
movq %r13, (%rdi)
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
addq %rsi, %rdx
callq 0x8a8a
leaq 0x2d783(%rip), %rsi     # 0x3a6ec
leaq 0x88(%rsp), %rdi
callq 0x78d0
leaq 0x910(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x88(%rsp), %rdx
callq 0x3744c
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
je 0xcfad
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0xcfc4
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x910(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x37f32
leaq 0x910(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x37246
movq 0x40fb1(%rip), %rsi     # 0x4dfa0
leaq 0x9b0(%rsp), %rdi
callq 0x72b0
leaq 0xa20(%rsp), %rdi
callq 0x71c0
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
leaq 0xb8(%rsp), %rbx
je 0xd2f1
movq 0x78(%rsp), %rsi
jmp 0xd2e9
callq 0x7070
movl (%rax), %ecx
cmpl $0x13, %ecx
jg 0xd048
cmpl $0x2, %ecx
je 0xd05a
cmpl $0xd, %ecx
je 0xd0f8
jmp 0xd1c8
cmpl $0x15, %ecx
je 0xd0f8
cmpl $0x14, %ecx
jne 0xd1c8
leaq 0x1a8(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x2d6a8(%rip), %rsi     # 0x3a715
leaq 0x2d6af(%rip), %rdx     # 0x3a723
leaq 0x198(%rsp), %rdi
callq 0x80f4
leaq 0x910(%rsp), %rdi
movl $0x194, %esi            # imm = 0x194
callq 0x37f1c
leaq 0xc68(%rsp), %rdi
movq %rax, %rsi
callq 0x37246
leaq 0x198(%rsp), %rsi
leaq 0xc68(%rsp), %rdx
movq 0x10(%rsp), %rdi
movl $0x3, %ecx
xorl %r8d, %r8d
callq 0xe256
leaq 0xc68(%rsp), %rdi
callq 0x371c6
movq 0x198(%rsp), %rdi
cmpq %rbx, %rdi
leaq 0xb8(%rsp), %rbx
je 0xd2f1
movq 0x1a8(%rsp), %rsi
jmp 0xd2e9
leaq 0x188(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x2d2b1(%rip), %rsi     # 0x3a3bc
leaq 0x2d2bb(%rip), %rdx     # 0x3a3cd
leaq 0x178(%rsp), %rdi
callq 0x80f4
leaq 0x910(%rsp), %rdi
movl $0x193, %esi            # imm = 0x193
callq 0x37f1c
leaq 0xbc8(%rsp), %rdi
movq %rax, %rsi
callq 0x37246
leaq 0x178(%rsp), %rsi
leaq 0xbc8(%rsp), %rdx
movq 0x10(%rsp), %rdi
movl $0x3, %ecx
xorl %r8d, %r8d
callq 0xe256
leaq 0xbc8(%rsp), %rdi
callq 0x371c6
movq 0x178(%rsp), %rdi
cmpq %rbx, %rdi
leaq 0xb8(%rsp), %rbx
je 0xd2f1
movq 0x188(%rsp), %rsi
jmp 0xd2e9
movq 0x300(%rsp), %rdi
leaq 0x310(%rsp), %rax
cmpq %rax, %rdi
je 0xd1bb
movq 0x310(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0xb8(%rsp), %rbx
jmp 0xd2fe
movl (%rax), %edi
callq 0x71d0
leaq 0x300(%rsp), %rdi
leaq 0x9b0(%rsp), %rdx
movq %rax, %rsi
callq 0xde9a
leaq 0x2d53f(%rip), %rcx     # 0x3a72d
leaq 0x300(%rsp), %rdi
movl $0x2c, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x7500
leaq 0x128(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xd235
movq %rdx, 0x118(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x128(%rsp)
jmp 0xd23b
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
movq %rdx, 0x120(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x910(%rsp), %rdi
movl $0x1f4, %esi            # imm = 0x1F4
callq 0x37f1c
leaq 0xb28(%rsp), %rdi
movq %rax, %rsi
callq 0x37246
leaq 0x118(%rsp), %rsi
leaq 0xb28(%rsp), %rdx
movq 0x10(%rsp), %rdi
movl $0x3, %ecx
xorl %r8d, %r8d
callq 0xe256
leaq 0xb28(%rsp), %rdi
callq 0x371c6
movq 0x118(%rsp), %rdi
cmpq %rbx, %rdi
je 0xd2c4
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x300(%rsp), %rdi
leaq 0x310(%rsp), %rax
cmpq %rax, %rdi
leaq 0xb8(%rsp), %rbx
je 0xd2f1
movq 0x310(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x700(%rsp), %rdi
callq 0x7110
movq 0xa8(%rsp), %rdi
cmpq %rbx, %rdi
je 0xd31b
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x258(%rsp), %rdi
callq 0x96d8
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd343
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x910(%rsp), %rdi
callq 0x371c6
movq 0x10(%rsp), %rax
addq $0xe48, %rsp            # imm = 0xE48
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc8(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x2cd62(%rip), %rsi     # 0x3a0db
leaq 0x2cd6b(%rip), %rdx     # 0x3a0eb
callq 0x80f4
leaq 0x910(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
movq %r12, %rdx
callq 0x3744c
movq 0xc8(%rsp), %rdi
cmpq %r13, %rdi
je 0xc9b2
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0xc9b2
movq %rax, %rbp
movq 0xc8(%rsp), %rdi
cmpq %r13, %rdi
je 0xdaff
movq 0xd8(%rsp), %rsi
jmp 0xdab5
jmp 0xdafc
movq %rax, %rbp
leaq 0xb28(%rsp), %rdi
callq 0x371c6
jmp 0xd446
movq %rax, %rbp
jmp 0xd463
jmp 0xd726
jmp 0xd4b4
jmp 0xd4b4
jmp 0xd4d6
jmp 0xd669
movq %rax, %rbp
leaq 0xbc8(%rsp), %rdi
callq 0x371c6
jmp 0xd5cc
movq %rax, %rbp
leaq 0xc68(%rsp), %rdi
callq 0x371c6
jmp 0xd5ed
movq %rax, %rbp
movq 0x118(%rsp), %rdi
cmpq %rbx, %rdi
je 0xd463
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x300(%rsp), %rdi
leaq 0x310(%rsp), %rax
cmpq %rax, %rdi
je 0xdbab
movq 0x310(%rsp), %rsi
jmp 0xdba3
jmp 0xd726
jmp 0xd726
jmp 0xdb22
jmp 0xd4d6
jmp 0xd669
jmp 0xd4b4
jmp 0xd4d6
jmp 0xd669
jmp 0xd669
jmp 0xd4d6
jmp 0xd669
movq %rax, %rbp
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
je 0xd4d9
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0xd4d9
movq %rax, %rbp
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0xd66c
movq 0x30(%rsp), %rsi
jmp 0xd55a
jmp 0xd669
jmp 0xd669
jmp 0xd669
jmp 0xd536
jmp 0xd669
jmp 0xd669
jmp 0xd536
jmp 0xd669
movq %rax, %rbp
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd539
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0xd539
movq %rax, %rbp
movq 0x300(%rsp), %rdi
leaq 0x310(%rsp), %rax
cmpq %rax, %rdi
je 0xd66c
movq 0x310(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0xd66c
jmp 0xd669
movq %rax, %rbp
jmp 0xd68d
jmp 0xd726
movq %rdx, %rbx
movq %rax, %rbp
movq 0x1f8(%rsp), %rdi
cmpq %r13, %rdi
je 0xd743
movq 0x208(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0xd743
jmp 0xd73d
jmp 0xd73d
movq %rax, %rbp
leaq 0xd08(%rsp), %rdi
callq 0x371c6
jmp 0xd6bc
jmp 0xd948
movq %rax, %rbp
movq 0x178(%rsp), %rdi
cmpq %rbx, %rdi
je 0xdbab
movq 0x188(%rsp), %rsi
jmp 0xdba3
movq %rax, %rbp
movq 0x198(%rsp), %rdi
cmpq %rbx, %rdi
je 0xdbab
movq 0x1a8(%rsp), %rsi
jmp 0xdba3
movq %rax, %rbp
movq 0x1b8(%rsp), %rdi
cmpq %r14, %rdi
je 0xdb61
movq 0x1c8(%rsp), %rsi
jmp 0xdb59
jmp 0xdb22
movq %rax, %rbp
movq 0x300(%rsp), %rdi
leaq 0x310(%rsp), %rax
cmpq %rax, %rdi
je 0xdb86
movq 0x310(%rsp), %rsi
jmp 0xdb7e
movq %rax, %rbp
jmp 0xdb86
jmp 0xd726
jmp 0xd669
movq %rax, %rbp
movq 0x4092d(%rip), %rsi     # 0x4dfa0
leaq 0x9b0(%rsp), %rdi
callq 0x72b0
leaq 0xa20(%rsp), %rdi
callq 0x71c0
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0xdbab
movq 0x78(%rsp), %rsi
jmp 0xdba3
jmp 0xd726
jmp 0xd73d
jmp 0xd6ae
movq %rdx, %rbx
movq %rax, %rbp
jmp 0xd760
movq %rax, %rbp
movq 0x1d8(%rsp), %rdi
cmpq %rbx, %rdi
je 0xdc65
movq 0x1e8(%rsp), %rsi
jmp 0xd93b
movq %rdx, %rbx
movq %rax, %rbp
jmp 0xd7a2
jmp 0xd6e7
movq %rax, %rbp
movq 0x700(%rsp), %rdi
cmpq %r14, %rdi
je 0xdc65
movq 0x710(%rsp), %rsi
jmp 0xd93b
jmp 0xd948
movq %rax, %rbp
movq 0x9b0(%rsp), %rdi
cmpq %r14, %rdi
jne 0xdb9b
jmp 0xdbab
movq %rax, %rbp
jmp 0xdbab
jmp 0xdc30
jmp 0xd948
jmp 0xdc30
movq %rdx, %rbx
movq %rax, %rbp
movq 0x700(%rsp), %rdi
cmpq %r12, %rdi
je 0xd760
movq 0x710(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x300(%rsp), %rdi
leaq 0x310(%rsp), %rax
cmpq %rax, %rdi
je 0xd7a2
movq 0x310(%rsp), %rsi
jmp 0xd79a
movq %rdx, %rbx
movq %rax, %rbp
movq 0x700(%rsp), %rdi
cmpq %r12, %rdi
je 0xd7a2
movq 0x710(%rsp), %rsi
incq %rsi
callq 0x74b0
cmpl $0x1, %ebx
jne 0xdc65
movq %rbp, %rdi
callq 0x7210
movq 0x18(%rsp), %rdi
callq 0x2b4be
testb %al, %al
je 0xd7da
leaq 0x40(%rsp), %r8
movq 0x10(%rsp), %rdi
movq 0x60(%rsp), %rdx
callq 0xa952
jmp 0xd8a9
movb $0x1, %bl
movq 0x60(%rsp), %rax
cmpb $0x0, 0x118(%rax)
jne 0xd8ab
leaq 0x300(%rsp), %rdi
leaq 0x310(%rsp), %rax
movq %rax, (%rdi)
leaq 0x2c929(%rip), %rsi     # 0x3a131
leaq 0x2c92a(%rip), %rdx     # 0x3a139
callq 0x80f4
leaq 0x2d279(%rip), %rdx     # 0x3aa94
leaq 0x700(%rsp), %rdi
movq %r15, %rsi
callq 0xe3a5
leaq 0x910(%rsp), %rdi
leaq 0x300(%rsp), %rsi
leaq 0x700(%rsp), %rdx
callq 0x3744c
movq 0x700(%rsp), %rdi
cmpq %r12, %rdi
je 0xd865
movq 0x710(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x300(%rsp), %rdi
leaq 0x310(%rsp), %rax
cmpq %rax, %rdi
je 0xd88a
movq 0x310(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x910(%rsp), %rdi
movl $0x12d, %esi            # imm = 0x12D
callq 0x37f1c
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x37246
xorl %ebx, %ebx
callq 0x7780
testb %bl, %bl
movq 0x18(%rsp), %r14
jne 0xc103
jmp 0xd328
movq %rax, %rbp
movq 0x700(%rsp), %rdi
cmpq %r12, %rdi
je 0xd8e7
movq 0x710(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0xd8e7
movq %rax, %rbp
movq 0x300(%rsp), %rdi
leaq 0x310(%rsp), %rax
cmpq %rax, %rdi
je 0xd915
movq 0x310(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0xd915
jmp 0xd912
jmp 0xd948
movq %rax, %rbp
callq 0x7780
jmp 0xdc65
movq %rax, %rbp
movq 0x218(%rsp), %rdi
cmpq %r14, %rdi
je 0xdc65
movq 0x228(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0xdc65
movq %rax, %rbp
jmp 0xdc65
movq %rax, %rbp
cmpl $0x1, %edx
jne 0xdc65
movq %rbp, %rdi
callq 0x7210
leaq 0x248(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x2cd85(%rip), %rsi     # 0x3a6fc
leaq 0x2cd8e(%rip), %rdx     # 0x3a70c
leaq 0x238(%rsp), %rdi
callq 0x80f4
leaq 0x910(%rsp), %rdi
movl $0x190, %esi            # imm = 0x190
callq 0x37f1c
leaq 0xda8(%rsp), %rdi
movq %rax, %rsi
callq 0x37246
leaq 0x238(%rsp), %rsi
leaq 0xda8(%rsp), %rdx
movq 0x10(%rsp), %rdi
movl $0x3, %ecx
xorl %r8d, %r8d
callq 0xe256
leaq 0xda8(%rsp), %rdi
callq 0x371c6
movq 0x238(%rsp), %rdi
cmpq %rbx, %rdi
je 0xd9f9
movq 0x248(%rsp), %rsi
incq %rsi
callq 0x74b0
callq 0x7780
jmp 0xd328
jmp 0xd948
movq %rax, %rbp
leaq 0xda8(%rsp), %rdi
callq 0x371c6
jmp 0xda22
movq %rax, %rbp
jmp 0xda3f
movq %rax, %rbp
movq 0x238(%rsp), %rdi
cmpq %rbx, %rdi
je 0xda3f
movq 0x248(%rsp), %rsi
incq %rsi
callq 0x74b0
callq 0x7780
jmp 0xdc65
movq %rax, %rdi
callq 0x96cc
jmp 0xda53
movq %rax, %rbp
jmp 0xdc80
movq %rax, %rbp
movq 0xc8(%rsp), %rdi
cmpq %r13, %rdi
je 0xda85
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0xda85
movq %rax, %rbp
jmp 0xdaa1
movq %rax, %rbp
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0xdaa1
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0xdaff
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0xdaff
jmp 0xdafc
movq %rax, %rbp
movq 0x138(%rsp), %rdi
leaq 0x148(%rsp), %rax
cmpq %rax, %rdi
je 0xdbc2
movq 0x148(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0xdbc2
jmp 0xdbbf
jmp 0xdbbf
movq %rax, %rbp
leaq 0x300(%rsp), %rdi
callq 0x971e
jmp 0xdb61
jmp 0xdbba
jmp 0xdbba
jmp 0xdbbf
jmp 0xdbba
movq %rax, %rbp
jmp 0xdb61
movq %rax, %rbp
jmp 0xdb3c
movq %rax, %rbp
leaq 0x300(%rsp), %rdi
callq 0x8268
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0xdb61
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x270(%rsp), %rdi
leaq 0x280(%rsp), %rax
cmpq %rax, %rdi
je 0xdb86
movq 0x280(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x9b0(%rsp), %rdi
leaq 0x9c0(%rsp), %rax
cmpq %rax, %rdi
je 0xdbab
movq 0x9c0(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x700(%rsp), %rdi
callq 0x7110
jmp 0xdc33
movq %rax, %rbp
jmp 0xdbe7
movq %rax, %rbp
movq 0x700(%rsp), %rdi
leaq 0x710(%rsp), %rax
cmpq %rax, %rdi
je 0xdbe7
movq 0x710(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x300(%rsp), %rdi
leaq 0x310(%rsp), %rax
cmpq %rax, %rdi
je 0xdc33
movq 0x310(%rsp), %rsi
jmp 0xdc26
movq %rax, %rbp
movq 0x158(%rsp), %rdi
leaq 0x168(%rsp), %rax
cmpq %rax, %rdi
je 0xdc33
movq 0x168(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0xdc33
movq %rax, %rbp
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0xdc58
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x258(%rsp), %rdi
callq 0x96d8
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xdc80
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x910(%rsp), %rdi
callq 0x371c6
movq %rbp, %rdi
callq 0x7810
nop