// File: /workspace/github_cpp_makefile_star2_O1/mbourand[P]webserv/srcs/Utils/CGI.cpp
// Function: CGI::CGI(Request const&, ConfigContext const&, ServerSocket const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
CGI::CGI(const Request& request, const ConfigContext& config, const ServerSocket& socket, const std::string& realPath)
	: m_realPath(realPath)
{
	std::ostringstream	convert;
	int					code;
	Header				*auth_type = NULL;
	Header				*content_type = NULL;
	std::string			extension;

	if ((code = ParseURI(request, config)) != 0)
		throw CGI::CGIException("ParseURI failed.", code);
	for (Request::HeadersVector::const_iterator it = request._headers.begin(); it != request._headers.end(); it++)
	{
		if ((*it)->getType() == AuthorizationHeader().getType())
			auth_type = *it;
		else if ((*it)->getType() == ContentTypeHeader().getType())
			content_type = *it;
	}
	std::string document_root = ft::simplify_path(config.getParam("root").front(), false, 0);
	if (ft::contains(m_env_Script_Name, '.'))
		extension = m_env_Script_Name.substr(m_env_Script_Name.find('.'));
	if (!extension.empty() && config.getCGIExtensions().find(extension) != config.getCGIExtensions().end())
	{
		m_args.push_back(config.getCGIExtensions().find(extension)->second); // c'est le chemin vers l'exécutable cgi
		m_args.push_back(document_root + m_env_Script_Name);
		if (extension == ".php")
			m_env.push_back("REDIRECT_STATUS=200");
	}
	else
	{
		m_args.push_back(document_root + m_env_Script_Name);
		if (!m_env_Path_Info.empty())
			m_args.push_back(document_root + m_env_Path_Info);
	}
	if (auth_type)
	{
		m_env.push_back("AUTH_TYPE="+auth_type->getValue().substr(0, auth_type->getValue().find(' ')));
		m_env.push_back("REMOTE_IDENT="+auth_type->getValue().substr(auth_type->getValue().find(' ')+1));
		m_env.push_back("REMOTE_USER="+auth_type->getValue().substr(auth_type->getValue().find(' ')+1));
	}
	if (request._method->requestHasBody() && !request._body.empty())
	{
		convert << request._body.size();
		m_env.push_back("CONTENT_LENGTH="+convert.str());
		if (content_type)
			m_env.push_back("CONTENT_TYPE="+content_type->getValue());
		else
			m_env.push_back("CONTENT_TYPE=US-ASCII");
	}
	m_env.push_back("GATEWAY_INTERFACE=CGI/1.1");
	if (m_args[0].find("ubuntu_cgi_tester") != std::string::npos)
		m_env.push_back("PATH_INFO="+request._url._path);
	else if (!m_env_Path_Info.empty())
		m_env.push_back("PATH_INFO="+m_env_Path_Info);
	if (document_root.find("..") != std::string::npos)
	{
		chdir(document_root.substr(0, document_root.find_last_of('/')).c_str());
		document_root = ft::get_cwd();
		chdir(g_webserv.cwd.c_str());
	}
	m_env.push_back("PATH_TRANSLATED=" + document_root + m_env_Script_Name);
	if (!request._url._query.empty())
		m_env.push_back("QUERY_STRING="+request._url._query);
	m_env.push_back("REMOTE_ADDR="+socket.getIPAddress());
	m_env.push_back("REQUEST_METHOD="+request._method->getType());
	m_env.push_back("REQUEST_URI="+request._url._path);
	m_env.push_back("SCRIPT_NAME="+m_env_Script_Name);
	m_env.push_back("SERVER_NAME="+config.getNames().front());
	m_env.push_back("SERVER_PORT="+socket.getServerPort_Str());
	m_env.push_back("SERVER_PROTOCOL=HTTP/1.1");
	m_env.push_back("SERVER_SOFTWARE=Webserv");
	add_http_headers(request._headers);
	convert.str("");
	convert << socket.GetSocket();
	m_tmpfilename = "/tmp/webserv_" + convert.str() + "-";
	convert.str("");
	struct timeval	tv;
	gettimeofday(&tv, NULL);
	convert << tv.tv_usec;
	m_tmpfilename += convert.str() + ".tmp";
	this->execute(request._body);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2b8, %rsp            # imm = 0x2B8
movq %rcx, 0xa0(%rsp)
movq %rdx, 0x58(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdi, %r15
leaq 0x10(%rdi), %rbx
movq %rbx, (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
movb %al, 0x10(%rdi)
leaq 0x20(%rdi), %r13
leaq 0x30(%rdi), %r12
movq %r12, 0x20(%rdi)
movq %rax, 0x28(%rdi)
movb %al, 0x30(%rdi)
leaq 0x40(%rdi), %rcx
movq %rcx, 0x70(%rsp)
leaq 0x50(%rdi), %rbp
movq %rbp, 0x40(%rdi)
movq %rax, 0x48(%rdi)
movb %al, 0x50(%rdi)
leaq 0x70(%rdi), %rcx
movq %rcx, 0x118(%rsp)
movq %rcx, 0x60(%rdi)
movq %rax, 0x68(%rdi)
movb %al, 0x70(%rdi)
leaq 0x90(%rdi), %rcx
movq %rcx, 0x110(%rsp)
movq %rcx, 0x80(%rdi)
movq %rax, 0x88(%rdi)
movb %al, 0x90(%rdi)
leaq 0xb0(%rdi), %rcx
movq %rcx, 0x108(%rsp)
movq %rcx, 0xa0(%rdi)
movq %rax, 0xa8(%rdi)
movb %al, 0xb0(%rdi)
leaq 0xd0(%rdi), %rax
movq %rax, 0x100(%rsp)
movq %rax, 0xc0(%rdi)
movq (%r8), %rsi
movq 0x8(%r8), %rdx
addq %rsi, %rdx
leaq 0x60(%rdi), %rax
movq %rax, 0x98(%rsp)
addq $0xc0, %rdi
movq %rdi, 0xf8(%rsp)
callq 0x8a8a
leaq 0xe0(%r15), %rax
movq %rax, 0x50(%rsp)
leaq 0xf8(%r15), %rax
movq %rax, 0x20(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x100(%r15)
movups %xmm0, 0xf0(%r15)
movups %xmm0, 0xe0(%r15)
leaq 0x140(%rsp), %rdi
callq 0x75e0
movq %r13, 0x60(%rsp)
leaq 0xe8(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq %r15, 0x68(%rsp)
movq %r15, %rdi
movq 0x48(%rsp), %r14
movq %r14, %rsi
movq 0x58(%rsp), %rdx
callq 0x14b28
movq %rbp, 0x80(%rsp)
movq %r12, 0x88(%rsp)
movq %rbx, 0x90(%rsp)
movq 0x140(%r14), %r13
cmpq 0x148(%r14), %r13
je 0x138ac
leaq 0x38(%rsp), %r14
movq $0x0, 0xa8(%rsp)
movq %rsp, %rbp
leaq 0xb0(%rsp), %r12
leaq 0x28(%rsp), %r15
movq $0x0, 0x78(%rsp)
movq (%r13), %rsi
movq (%rsi), %rax
movq %rbp, %rdi
callq *0x10(%rax)
movq %r12, %rdi
callq 0x83ec
movq %r15, %rdi
movq %r12, %rsi
callq 0x8492
movq 0x8(%rsp), %rdx
cmpq 0x30(%rsp), %rdx
jne 0x137ac
testq %rdx, %rdx
je 0x137b0
movq 0x28(%rsp), %rsi
movq (%rsp), %rdi
callq 0x74c0
testl %eax, %eax
sete %bl
jmp 0x137b2
xorl %ebx, %ebx
jmp 0x137b2
movb $0x1, %bl
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x137c9
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x74b0
movq %r12, %rdi
callq 0x842c
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x137ec
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
testb %bl, %bl
je 0x137fe
movq (%r13), %rax
movq %rax, 0x78(%rsp)
jmp 0x13894
movq (%r13), %rsi
movq (%rsi), %rax
movq %rbp, %rdi
callq *0x10(%rax)
movq %r12, %rdi
callq 0x87cc
movq %r15, %rdi
movq %r12, %rsi
callq 0x8872
movq 0x8(%rsp), %rdx
cmpq 0x30(%rsp), %rdx
jne 0x13844
testq %rdx, %rdx
je 0x13848
movq 0x28(%rsp), %rsi
movq (%rsp), %rdi
callq 0x74c0
testl %eax, %eax
sete %bl
jmp 0x1384a
xorl %ebx, %ebx
jmp 0x1384a
movb $0x1, %bl
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x13861
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x74b0
movq %r12, %rdi
callq 0x880c
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x13884
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
testb %bl, %bl
je 0x13894
movq (%r13), %rax
movq %rax, 0xa8(%rsp)
addq $0x8, %r13
movq 0x48(%rsp), %rax
cmpq 0x148(%rax), %r13
jne 0x13766
jmp 0x138c1
movq $0x0, 0x78(%rsp)
movq $0x0, 0xa8(%rsp)
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x26fa2(%rip), %rsi     # 0x3a874
leaq 0x26f9f(%rip), %rdx     # 0x3a878
movq %rsp, %rdi
callq 0x80f4
movq %rsp, %rsi
movq 0x58(%rsp), %rdi
movq 0x68(%rsp), %rbx
movq 0x60(%rsp), %r13
callq 0x2b4c6
movq 0x78(%rsp), %r14
movq (%rax), %rsi
addq $0x10, %rsi
leaq 0xb0(%rsp), %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x1d582
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1392b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
movq %rsp, %rdx
movb $0x2e, (%rdx)
movq 0x40(%rbx), %rdi
movq 0x48(%rbx), %rsi
addq %rdi, %rsi
callq 0xf3d7
movq 0x40(%rbx), %rcx
addq 0x48(%rbx), %rcx
cmpq %rcx, %rax
je 0x139a4
movq 0x70(%rsp), %r14
movq %r14, %rdi
movl $0x2e, %esi
xorl %edx, %edx
callq 0x75c0
movq %rsp, %rdi
movq %r14, %rsi
movq %rax, %rdx
movq $-0x1, %rcx
callq 0x74d0
leaq 0xd8(%rsp), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0x7590
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x1399f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x78(%rsp), %r14
cmpq $0x0, 0xe0(%rsp)
je 0x13a8e
movq 0x58(%rsp), %rdi
callq 0x2b494
leaq 0xd8(%rsp), %rsi
movq %rax, %rdi
callq 0xf34e
movq %rax, %r15
movq 0x58(%rsp), %rdi
callq 0x2b494
addq $0x8, %rax
cmpq %rax, %r15
je 0x13a8e
movq 0x58(%rsp), %rdi
callq 0x2b494
leaq 0xd8(%rsp), %rsi
movq %rax, %rdi
callq 0xf34e
addq $0x40, %rax
movq 0x50(%rsp), %rdi
movq %rax, %rsi
callq 0x1692c
movq %rsp, %rdi
leaq 0xb0(%rsp), %rsi
movq 0x70(%rsp), %rdx
callq 0xe3fb
movq %rsp, %rsi
movq 0x50(%rsp), %rdi
callq 0x16cac
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x13a4a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x27048(%rip), %rsi     # 0x3aa99
leaq 0xd8(%rsp), %rdi
callq 0x7180
testl %eax, %eax
jne 0x13b08
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x2702b(%rip), %rsi     # 0x3aa9e
leaq 0x27037(%rip), %rdx     # 0x3aab1
callq 0x80f4
movq %rsp, %rsi
movq 0x20(%rsp), %rdi
callq 0x16cac
jmp 0x13af2
movq %rsp, %rdi
leaq 0xb0(%rsp), %rsi
movq 0x70(%rsp), %rdx
callq 0xe3fb
movq %rsp, %rsi
movq 0x50(%rsp), %rdi
callq 0x16cac
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x13ac6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
cmpq $0x0, 0x68(%rbx)
je 0x13b08
movq %rsp, %rdi
leaq 0xb0(%rsp), %rsi
movq 0x98(%rsp), %rdx
callq 0xe3fb
movq %rsp, %rsi
movq 0x50(%rsp), %rdi
callq 0x16cac
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x13b08
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
testq %r14, %r14
je 0x13d7c
movq %r14, %rdi
callq 0x8e44
movq %rax, %r15
movq %r14, %rdi
callq 0x8e44
movq %rax, %rdi
movl $0x20, %esi
xorl %edx, %edx
callq 0x75c0
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x74d0
leaq 0x26f66(%rip), %rcx     # 0x3aab2
leaq 0x28(%rsp), %rdi
movl $0xa, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x7500
movq %r12, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x13b81
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x13b89
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rsp, %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x20(%rsp), %rdi
callq 0x16cac
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x13bc3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x38(%rsp), %rbp
movq -0x10(%rbp), %rdi
cmpq %rbp, %rdi
je 0x13bde
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x74b0
movq %r14, %rdi
callq 0x8e44
movq %rax, %r15
movq %r14, %rdi
callq 0x8e44
movq %rax, %rdi
movl $0x20, %esi
xorl %edx, %edx
callq 0x75c0
leaq 0x1(%rax), %rdx
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
movq $-0x1, %rcx
callq 0x74d0
leaq 0x26e9e(%rip), %rcx     # 0x3aabd
leaq 0x28(%rsp), %rdi
movl $0xd, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x7500
movq %r12, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x13c54
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x13c5c
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rsp, %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x20(%rsp), %rdi
callq 0x16cac
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x13c96
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x13cad
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x74b0
movq %r14, %rdi
callq 0x8e44
movq %rax, %r15
movq %r14, %rdi
callq 0x8e44
movq %rax, %rdi
movl $0x20, %esi
xorl %edx, %edx
callq 0x75c0
leaq 0x1(%rax), %rdx
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
movq $-0x1, %rcx
callq 0x74d0
leaq 0x26ddd(%rip), %rcx     # 0x3aacb
leaq 0x28(%rsp), %rdi
movl $0xc, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x7500
movq %r12, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x13d23
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x13d2b
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rsp, %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x20(%rsp), %rdi
callq 0x16cac
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x13d65
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x13d7c
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x48(%rsp), %rax
movq 0x28(%rax), %rdi
movq (%rdi), %rax
callq *0x40(%rax)
testb %al, %al
je 0x13ecf
movq 0x48(%rsp), %rax
movq 0x160(%rax), %rsi
testq %rsi, %rsi
je 0x13ecf
leaq 0x140(%rsp), %rdi
callq 0x7330
leaq 0x148(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x7710
leaq 0x26d0a(%rip), %rcx     # 0x3aad8
leaq 0x28(%rsp), %rdi
movl $0xf, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x7500
movq %r12, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x13e03
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x13e0b
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rsp, %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x20(%rsp), %rdi
callq 0x16cac
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x13e45
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x13e60
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0xa8(%rsp), %rdi
testq %rdi, %rdi
je 0x13e93
callq 0x8e44
leaq 0x26c6f(%rip), %rsi     # 0x3aae8
movq %rsp, %rdi
movq %rax, %rdx
callq 0xe31d
movq %rsp, %rsi
movq 0x20(%rsp), %rdi
callq 0x16cac
jmp 0x13eb9
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x26c56(%rip), %rsi     # 0x3aaf6
leaq 0x26c64(%rip), %rdx     # 0x3ab0b
callq 0x80f4
movq %rsp, %rsi
movq 0x20(%rsp), %rdi
callq 0x16cac
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x13ecf
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x26c30(%rip), %rsi     # 0x3ab0c
leaq 0x26c42(%rip), %rdx     # 0x3ab25
callq 0x80f4
movq %rsp, %rsi
movq 0x20(%rsp), %rdi
callq 0x16cac
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x13f0b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x50(%rsp), %rax
movq (%rax), %rdi
leaq 0x26c0c(%rip), %rsi     # 0x3ab26
movl $0x11, %ecx
xorl %edx, %edx
callq 0x77f0
cmpq $-0x1, %rax
je 0x13f56
movq 0x48(%rsp), %rax
leaq 0xb8(%rax), %rdx
leaq 0x26bf9(%rip), %rsi     # 0x3ab38
movq %rsp, %rdi
callq 0xe31d
movq %rsp, %rsi
movq 0x20(%rsp), %rdi
callq 0x16cac
jmp 0x13f81
cmpq $0x0, 0x68(%rbx)
je 0x13f97
leaq 0x26bd4(%rip), %rsi     # 0x3ab38
movq %rsp, %rdi
movq 0x98(%rsp), %rdx
callq 0xe31d
movq %rsp, %rsi
movq 0x20(%rsp), %rdi
callq 0x16cac
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x13f97
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x293e2(%rip), %rsi     # 0x3d380
leaq 0xb0(%rsp), %rdi
movl $0x2, %ecx
xorl %edx, %edx
callq 0x77f0
cmpq $-0x1, %rax
je 0x14047
leaq 0xb0(%rsp), %r14
movq %r14, %rdi
movl $0x2f, %esi
movq $-0x1, %rdx
callq 0x7900
movq %rsp, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x74d0
movq (%rsp), %rdi
callq 0x7670
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x14007
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
movq %rsp, %rdi
callq 0x1d159
leaq 0xb0(%rsp), %rdi
movq %rsp, %r14
movq %r14, %rsi
callq 0x7590
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x14037
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x3a52a(%rip), %rax     # 0x4e568
movq 0x48(%rax), %rdi
callq 0x7670
leaq 0x26af5(%rip), %rsi     # 0x3ab43
leaq 0x28(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
callq 0xe31d
movq 0x40(%rbx), %rsi
movq 0x48(%rbx), %rdx
leaq 0x28(%rsp), %rdi
callq 0x7190
movq %r12, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x14093
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x1409b
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rsp, %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x20(%rsp), %rdi
callq 0x16cac
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x140d5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x38(%rsp), %rbp
movq -0x10(%rbp), %rdi
cmpq %rbp, %rdi
je 0x140f0
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x48(%rsp), %rax
cmpq $0x0, 0xe0(%rax)
je 0x1413d
movq 0x48(%rsp), %rax
leaq 0xd8(%rax), %rdx
leaq 0x26a42(%rip), %rsi     # 0x3ab54
movq %rsp, %rdi
callq 0xe31d
movq %rsp, %rsi
movq 0x20(%rsp), %rdi
callq 0x16cac
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1413d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x28(%rsp), %rdi
movq 0xa0(%rsp), %rsi
callq 0x1243e
leaq 0x26a0c(%rip), %rcx     # 0x3ab62
leaq 0x28(%rsp), %rdi
movl $0xc, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x7500
movq %r12, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1418b
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x14193
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rsp, %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x20(%rsp), %rdi
callq 0x16cac
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x141cd
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x141e4
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x48(%rsp), %rax
movq 0x28(%rax), %rsi
movq (%rsi), %rax
leaq 0x28(%rsp), %rdi
callq *0x10(%rax)
leaq 0x26970(%rip), %rcx     # 0x3ab6f
leaq 0x28(%rsp), %rdi
movl $0xf, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x7500
movq %r12, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x14234
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x1423c
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rsp, %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x20(%rsp), %rdi
callq 0x16cac
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x14276
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1428d
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x48(%rsp), %rax
leaq 0xb8(%rax), %rdx
leaq 0x268df(%rip), %rsi     # 0x3ab7f
movq %rsp, %rdi
callq 0xe31d
movq %rsp, %rsi
movq 0x20(%rsp), %rdi
callq 0x16cac
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x142cb
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x268ba(%rip), %rsi     # 0x3ab8c
movq %rsp, %rdi
movq 0x70(%rsp), %rdx
callq 0xe31d
movq %rsp, %rsi
movq 0x20(%rsp), %rdi
callq 0x16cac
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x14302
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x58(%rsp), %rdi
callq 0x2b4a8
movq (%rax), %rdx
addq $0x10, %rdx
leaq 0x2687f(%rip), %rsi     # 0x3ab99
movq %rsp, %rdi
callq 0xe31d
movq %rsp, %rsi
movq 0x20(%rsp), %rdi
callq 0x16cac
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x14345
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x28(%rsp), %rdi
movq 0xa0(%rsp), %rsi
callq 0x1241a
leaq 0x26848(%rip), %rcx     # 0x3aba6
leaq 0x28(%rsp), %rdi
movl $0xc, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x7500
movq %r12, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x14393
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x1439b
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rsp, %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x20(%rsp), %rdi
callq 0x16cac
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x143d5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x143ec
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x74b0
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x267ba(%rip), %rsi     # 0x3abb3
leaq 0x267cb(%rip), %rdx     # 0x3abcb
callq 0x80f4
movq %rsp, %rsi
movq 0x20(%rsp), %rdi
callq 0x16cac
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x14428
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x26797(%rip), %rsi     # 0x3abcc
leaq 0x267a7(%rip), %rdx     # 0x3abe3
callq 0x80f4
movq %rsp, %rsi
movq 0x20(%rsp), %rdi
callq 0x16cac
movq 0x48(%rsp), %rax
leaq 0x140(%rax), %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x14470
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x14cf0
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x26913(%rip), %rdx     # 0x3ad9b
movq %rdx, %rsi
callq 0x80f4
leaq 0x148(%rsp), %r14
movq %rsp, %rsi
movq %r14, %rdi
callq 0x7690
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x144b9
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0xa0(%rsp), %rdi
callq 0x12c90
leaq 0x140(%rsp), %rdi
movl %eax, %esi
callq 0x77e0
leaq 0x120(%rsp), %rdi
movq %r14, %rsi
callq 0x7710
leaq 0x266f8(%rip), %rcx     # 0x3abe4
leaq 0x120(%rsp), %rdi
movl $0xd, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x7500
movq %rbp, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x14526
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x1452d
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x266a8(%rip), %rsi     # 0x3abf8
callq 0x78d0
movq %r12, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x14576
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x1457e
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rsp, %r15
movq %rdx, 0x8(%r15)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r13, %rdi
movq %r15, %rsi
callq 0x7590
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x145b8
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x145cf
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x130(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x145f0
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x74b0
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x2679e(%rip), %rdx     # 0x3ad9b
movq %rdx, %rsi
callq 0x80f4
movq %rsp, %rsi
movq %r14, %rdi
callq 0x7690
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x14626
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x120(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x7740
movq 0x8(%r15), %rsi
leaq 0x140(%rsp), %rdi
callq 0x7470
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x7710
leaq 0x26595(%rip), %rsi     # 0x3abf2
leaq 0x28(%rsp), %rdi
callq 0x78d0
movq %r12, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x14688
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x14690
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %r13, %rdi
callq 0x7190
movq (%rsp), %rdi
cmpq %r12, %rdi
movq 0x48(%rsp), %r14
je 0x146d4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x146eb
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x74b0
addq $0x158, %r14            # imm = 0x158
movq %rbx, %rdi
movq %r14, %rsi
callq 0x15698
leaq 0xc0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1471e
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0xd8(%rsp), %rdi
leaq 0xe8(%rsp), %rax
cmpq %rax, %rdi
je 0x14743
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x39856(%rip), %rsi     # 0x4dfa0
leaq 0x140(%rsp), %rdi
callq 0x72b0
leaq 0x1b0(%rsp), %rdi
callq 0x71c0
addq $0x2b8, %rsp            # imm = 0x2B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x14917
jmp 0x14976
jmp 0x14917
jmp 0x14976
jmp 0x14917
jmp 0x14917
jmp 0x14976
jmp 0x148e2
jmp 0x148fd
jmp 0x14976
jmp 0x14917
jmp 0x14976
jmp 0x14976
jmp 0x14917
jmp 0x14976
jmp 0x14917
jmp 0x14976
jmp 0x14917
jmp 0x14976
jmp 0x14976
jmp 0x14976
jmp 0x14917
jmp 0x14976
jmp 0x148b0
jmp 0x148cb
jmp 0x148b0
jmp 0x148cb
jmp 0x148e2
jmp 0x148fd
jmp 0x14976
jmp 0x14976
jmp 0x148b0
jmp 0x148cb
jmp 0x14976
jmp 0x14917
jmp 0x14976
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x14849
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x14849
movq %rax, %r14
leaq 0x130(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14979
movq 0x130(%rsp), %rsi
jmp 0x14928
jmp 0x14976
jmp 0x14917
jmp 0x14976
jmp 0x14917
jmp 0x14976
jmp 0x14917
jmp 0x14976
jmp 0x148b0
jmp 0x148cb
jmp 0x14976
jmp 0x14917
jmp 0x14917
jmp 0x14976
jmp 0x14917
jmp 0x14976
jmp 0x148b0
jmp 0x148cb
jmp 0x14976
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x148ce
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x148ce
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
jne 0x1490e
jmp 0x14979
jmp 0x14976
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x14900
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x14900
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14979
movq 0x38(%rsp), %rsi
jmp 0x14928
jmp 0x14976
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x14979
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x14979
jmp 0x14976
jmp 0x14976
jmp 0x149aa
movq %rax, %r14
movq 0x68(%rsp), %r15
movq 0x60(%rsp), %r13
jmp 0x14a01
movq %rax, %r14
jmp 0x14a47
movq %rax, %r14
jmp 0x14a7e
jmp 0x14976
jmp 0x14976
jmp 0x14976
jmp 0x14976
jmp 0x14976
jmp 0x14976
jmp 0x14976
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
jne 0x149d2
jmp 0x149df
movq %rax, %r14
leaq 0xc0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x149df
movq 0xc0(%rsp), %rsi
jmp 0x149d7
jmp 0x149af
jmp 0x149aa
movq %rax, %r14
leaq 0xb0(%rsp), %rdi
callq 0x880c
jmp 0x149c4
movq %rax, %r14
jmp 0x149df
movq %rax, %r14
jmp 0x149c4
movq %rax, %r14
leaq 0xb0(%rsp), %rdi
callq 0x842c
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x149df
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x90(%rsp), %rbx
movq 0x68(%rsp), %r15
movq 0x88(%rsp), %r12
movq 0x60(%rsp), %r13
movq 0x80(%rsp), %rbp
movq 0xd8(%rsp), %rdi
leaq 0xe8(%rsp), %rax
cmpq %rax, %rdi
je 0x14a26
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x39573(%rip), %rsi     # 0x4dfa0
leaq 0x140(%rsp), %rdi
callq 0x72b0
leaq 0x1b0(%rsp), %rdi
callq 0x71c0
movq 0x20(%rsp), %rdi
callq 0x1696a
movq 0x50(%rsp), %rdi
callq 0x1696a
movq 0xf8(%rsp), %rax
movq (%rax), %rdi
movq 0x100(%rsp), %rax
cmpq %rax, %rdi
je 0x14a7e
movq (%rax), %rsi
incq %rsi
callq 0x74b0
movq 0xa0(%r15), %rdi
movq 0x108(%rsp), %rax
cmpq %rax, %rdi
je 0x14a9d
movq (%rax), %rsi
incq %rsi
callq 0x74b0
movq 0x80(%r15), %rdi
movq 0x110(%rsp), %rax
cmpq %rax, %rdi
je 0x14abc
movq (%rax), %rsi
incq %rsi
callq 0x74b0
movq 0x98(%rsp), %rax
movq (%rax), %rdi
movq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x14adf
movq (%rax), %rsi
incq %rsi
callq 0x74b0
movq 0x70(%rsp), %rax
movq (%rax), %rdi
cmpq %rbp, %rdi
je 0x14af8
movq (%rbp), %rsi
incq %rsi
callq 0x74b0
movq (%r13), %rdi
cmpq %r12, %rdi
je 0x14b0d
movq (%r12), %rsi
incq %rsi
callq 0x74b0
movq (%r15), %rdi
cmpq %rbx, %rdi
je 0x14b20
movq (%rbx), %rsi
incq %rsi
callq 0x74b0
movq %r14, %rdi
callq 0x7810