// File: /workspace/github_cpp_makefile_star2_O1/mbourand[P]webserv/srcs/tcp-server.cpp
// Function: handle_server_response(Client&)
bool	handle_server_response(Client &client)
{
	try
	{
		if (g_webserv.debug)
			std::cout << *client.req << std::endl;
		VirtualHost vhost = VirtualHost::getServerByName(client.req->getHeaderValue("Host"), client.sckt->getServerPort(), g_webserv.vhosts);
		Response response;
		if (client.req->_error_code)
			response.setCode(client.req->_error_code);
		try
		{
			if (!response.getCode() && !vhost.getConfig().getConfigPath(client.req->_url._path).getParam("auth_basic").front().empty())
			{
				std::string	credentials = client.req->getHeaderValue(AuthorizationHeader().getType());
					if (credentials.empty())
					{
						response.setCode(401); //Unauthorized (force sign-in)
						response.addHeader(WWWAuthenticateHeader().getType(), "Basic realm=\""+vhost.getConfig().getConfigPath(client.req->_url._path).getParam("auth_basic").front()+"\"");
					}
					else if (!g_webserv.creds->Check_Credentials(vhost.getConfig().getConfigPath(client.req->_url._path).getParam("auth_basic_user_file").front(), credentials.substr(6))) //TODO: comparer credentials avec ceux dans le fichier	login:password -> bG9naW46cGFzc3dvcmQ=
						response.setCode(403); //forbidden (wrong credentials)
			}
		}
		catch (std::exception& e)
		{
			response.setCode(500);
		}
		if (!response.getCode())
		{
			if (!ft::contains(vhost.getConfig().getConfigPath(client.req->_url._path).getAllowedMethods(), client.req->_method))
				response.setCode(405);
		}
		if (!response.getCode())
			response = client.req->_method->process(*client.req, vhost.getConfig().getConfigPath(client.req->_url._path), *client.sckt);
		if (client.req->_protocolVersion == "HTTP/1.0")
			response.addHeader("Connection", "keep-alive");
		*client.sckt << response.getResponseText(vhost.getConfig().getConfigPath(client.req->_url._path), (client.req->_method ? client.req->_method->getType() != "HEAD" : true));
		if (g_webserv.debug)
			std::cout << "served response " << response.getCode() << std::endl;
		if (response.getCode() != 200)
			return true;
		Logger::print("Success", NULL, SUCCESS, VERBOSE);
	}
	catch(ServerSocket::ServerSocketException &e)
	{
		Logger::print(e.what(), NULL, ERROR, NORMAL);
	}
	catch(std::invalid_argument &e)
	{
		client.req->_error_code = 500;
		Logger::print(e.what(), NULL, ERROR, NORMAL);
	}
	if (client.req && client.sckt->Success())
	{
		delete client.req;
		client.req = new Request(client.sckt->getServerPort());
	}
	return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3a8, %rsp            # imm = 0x3A8
movq %rdi, %rbx
cmpb $0x1, 0x1f977(%rip)     # 0x4e569
jne 0x2ec2e
movq 0x8(%rbx), %rsi
movq 0x1f3a9(%rip), %rdi     # 0x4dfa8
callq 0x36186
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x7490
movsbl %al, %esi
movq %r14, %rdi
callq 0x7050
movq %rax, %rdi
callq 0x7340
movq 0x8(%rbx), %r14
leaq 0x80(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0xb5bf(%rip), %rsi      # 0x3a204
leaq 0xb5bc(%rip), %rdx      # 0x3a208
leaq 0x70(%rsp), %rdi
callq 0x80f4
leaq 0x1d0(%rsp), %rdi
leaq 0x70(%rsp), %rdx
movq %r14, %rsi
callq 0x35fd4
movq (%rbx), %rdi
callq 0x12416
leaq 0x1f996(%rip), %rdx     # 0x4e610
leaq 0x1d0(%rsp), %rdi
movl %eax, %esi
callq 0x39526
leaq 0x270(%rsp), %rdi
movq %rax, %rsi
callq 0x391ee
leaq 0x1e0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2ecba
movq 0x1e0(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0x2ecd4
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x1d0(%rsp), %rdi
callq 0x37160
movq 0x8(%rbx), %rax
movl 0x188(%rax), %esi
testl %esi, %esi
je 0x2ecfc
leaq 0x1d0(%rsp), %rdi
callq 0x37f1c
leaq 0x1d0(%rsp), %rdi
callq 0x37f24
movl %eax, %ebp
testl %eax, %eax
je 0x2ed14
xorl %r14d, %r14d
jmp 0x2ed79
leaq 0x270(%rsp), %rdi
callq 0x39518
movl $0xb8, %esi
addq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x2c118
movq %rax, %r14
leaq 0x160(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xe040(%rip), %rsi      # 0x3cd89
leaq 0xe043(%rip), %rdx      # 0x3cd93
leaq 0x150(%rsp), %rdi
callq 0x80f4
leaq 0x150(%rsp), %rsi
movq %r14, %rdi
callq 0x2b4c6
movq (%rax), %rax
cmpq $0x0, 0x18(%rax)
setne %r14b
testl %ebp, %ebp
jne 0x2ed9e
leaq 0x160(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2ed9e
movq 0x160(%rsp), %rsi
incq %rsi
callq 0x74b0
testb %r14b, %r14b
je 0x2f07c
movq 0x8(%rbx), %r14
leaq 0x70(%rsp), %rdi
callq 0x83ec
leaq 0x30(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x8492
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
movq %r14, %rsi
callq 0x35fd4
leaq 0x40(%rsp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x2edf2
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x70(%rsp), %rdi
callq 0x842c
cmpq $0x0, 0x18(%rsp)
je 0x2eedd
movq 0x1f829(%rip), %r14     # 0x4e638
leaq 0x270(%rsp), %rdi
callq 0x39518
movl $0xb8, %esi
addq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x2c118
movq %rax, %r15
leaq 0x70(%rsp), %rdi
movq %r13, (%rdi)
leaq 0xbef5(%rip), %rsi      # 0x3ad34
leaq 0xbf02(%rip), %rdx      # 0x3ad48
callq 0x80f4
leaq 0x70(%rsp), %rsi
movq %r15, %rdi
callq 0x2b4c6
movq (%rax), %r15
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl $0x6, %edx
movq $-0x1, %rcx
callq 0x74d0
addq $0x10, %r15
leaq 0x30(%rsp), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x176b2
movl %eax, %ebp
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x2eea3
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0x2eebd
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x74b0
testb %bpl, %bpl
jne 0x2f061
leaq 0x1d0(%rsp), %rdi
movl $0x193, %esi            # imm = 0x193
callq 0x37f1c
jmp 0x2f061
leaq 0x1d0(%rsp), %rdi
movl $0x191, %esi            # imm = 0x191
callq 0x37f1c
leaq 0x70(%rsp), %rdi
callq 0x9d90
leaq 0x30(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x9e36
leaq 0x270(%rsp), %rdi
callq 0x39518
movl $0xb8, %esi
addq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x2c118
movq %rax, %r14
leaq 0x140(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0xde4d(%rip), %rsi      # 0x3cd89
leaq 0xde50(%rip), %rdx      # 0x3cd93
leaq 0x130(%rsp), %rdi
callq 0x80f4
leaq 0x130(%rsp), %rsi
movq %r14, %rdi
callq 0x2b4c6
movq (%rax), %rdx
addq $0x10, %rdx
leaq 0xe21d(%rip), %rsi      # 0x3d18b
leaq 0x1b0(%rsp), %rdi
callq 0xe31d
leaq 0xe960(%rip), %rsi      # 0x3d8e2
leaq 0x1b0(%rsp), %rdi
callq 0x78d0
leaq 0x60(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2efb6
movq %rdx, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
jmp 0x2efbd
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rsi
leaq 0x50(%rsp), %rdx
movq %rsi, 0x8(%rdx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x1d0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x3744c
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x2f002
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x1c0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f023
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x130(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2f040
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x2f057
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x70(%rsp), %rdi
callq 0x9dd0
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f07c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x1d0(%rsp), %rdi
callq 0x37f24
testl %eax, %eax
jne 0x2f0e8
leaq 0x270(%rsp), %rdi
callq 0x39518
movl $0xb8, %esi
addq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x2c118
movq %rax, %rdi
callq 0x2b4b6
movq (%rax), %rcx
cmpq %rax, %rcx
je 0x2f0d1
movq 0x8(%rbx), %rdx
movq 0x28(%rdx), %rdx
cmpq %rdx, 0x10(%rcx)
je 0x2f0d1
movq (%rcx), %rcx
cmpq %rax, %rcx
jne 0x2f0c3
cmpq %rax, %rcx
jne 0x2f0e8
leaq 0x1d0(%rsp), %rdi
movl $0x195, %esi            # imm = 0x195
callq 0x37f1c
leaq 0x1d0(%rsp), %rdi
callq 0x37f24
testl %eax, %eax
jne 0x2f153
movq 0x8(%rbx), %r14
movq 0x28(%r14), %r15
leaq 0x270(%rsp), %rdi
callq 0x39518
movl $0xb8, %esi
addq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x2c118
movq (%rbx), %r8
movq (%r15), %r9
leaq 0x70(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rax, %rcx
callq *0x70(%r9)
leaq 0x1d0(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x37322
leaq 0x70(%rsp), %rdi
callq 0x371c6
movl $0x120, %edi            # imm = 0x120
addq 0x8(%rbx), %rdi
leaq 0xe036(%rip), %rsi      # 0x3d199
callq 0x7180
testl %eax, %eax
jne 0x2f1f4
leaq 0x70(%rsp), %rdi
movq %r13, (%rdi)
leaq 0xe023(%rip), %rsi      # 0x3d1a2
leaq 0xe026(%rip), %rdx      # 0x3d1ac
callq 0x80f4
leaq 0x20(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xe012(%rip), %rsi      # 0x3d1ad
leaq 0xe015(%rip), %rdx      # 0x3d1b7
leaq 0x10(%rsp), %rdi
callq 0x80f4
leaq 0x1d0(%rsp), %rdi
leaq 0x70(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x3744c
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x2f1da
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0x2f1f4
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x74b0
movq (%rbx), %r14
leaq 0x270(%rsp), %rdi
callq 0x39518
movl $0xb8, %esi
addq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x2c118
movq %rax, %r15
movq 0x8(%rbx), %rax
movq 0x28(%rax), %r12
testq %r12, %r12
setne %bpl
je 0x2f250
movq (%r12), %rax
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq *0x10(%rax)
leaq 0xb5ba(%rip), %rsi      # 0x3a7f9
leaq 0x10(%rsp), %rdi
callq 0x7180
testl %eax, %eax
setne %al
jmp 0x2f252
movb $0x1, %al
movzbl %al, %ecx
leaq 0x70(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
movq %r15, %rdx
callq 0x38106
leaq 0x70(%rsp), %rsi
movq %r14, %rdi
callq 0x1211a
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0x2f291
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x74b0
testq %r12, %r12
je 0x2f2b1
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f2b1
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x74b0
cmpb $0x1, 0x1f2b1(%rip)     # 0x4e569
jne 0x2f317
movq 0x1ece7(%rip), %rdi     # 0x4dfa8
leaq 0xdef0(%rip), %rsi      # 0x3d1b8
movl $0x10, %edx
callq 0x7510
leaq 0x1d0(%rsp), %rdi
callq 0x37f24
movq 0x1ecc2(%rip), %rdi     # 0x4dfa8
movl %eax, %esi
callq 0x77e0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x7490
movsbl %al, %esi
movq %r14, %rdi
callq 0x7050
movq %rax, %rdi
callq 0x7340
leaq 0x1d0(%rsp), %rdi
callq 0x37f24
movl %eax, %ebp
cmpl $0xc8, %eax
jne 0x2f3f8
leaq 0x120(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xde85(%rip), %rsi      # 0x3d1c9
leaq 0xde85(%rip), %rdx      # 0x3d1d0
leaq 0x110(%rsp), %rdi
callq 0x80f4
leaq 0x110(%rsp), %rdi
xorl %esi, %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0xded8
movq 0x110(%rsp), %rdi
cmpq %r14, %rdi
je 0x2f38b
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x1d0(%rsp), %rdi
callq 0x371c6
leaq 0x270(%rsp), %rdi
callq 0x394b4
movb $0x1, %al
cmpl $0xc8, %ebp
jne 0x2f414
cmpq $0x0, 0x8(%rbx)
je 0x2f3f4
movq (%rbx), %rdi
callq 0x12652
testb %al, %al
je 0x2f3f4
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x2f3d1
movq (%rdi), %rax
callq *0x8(%rax)
movl $0x1a0, %edi            # imm = 0x1A0
callq 0x74a0
movq %rax, %r15
movq (%rbx), %rdi
callq 0x12416
movq %r15, %rdi
movl %eax, %esi
callq 0x33810
movq %r15, 0x8(%rbx)
xorl %eax, %eax
jmp 0x2f414
leaq 0x1d0(%rsp), %rdi
callq 0x371c6
leaq 0x270(%rsp), %rdi
callq 0x394b4
movb $0x1, %al
addq $0x3a8, %rsp            # imm = 0x3A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, 0x8(%rsp)
movl $0x1a0, %esi            # imm = 0x1A0
movq %r15, %rdi
callq 0x74b0
movq 0x8(%rsp), %rdi
callq 0x7810
movq %rdx, %r15
movq %rax, 0x8(%rsp)
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x2f46b
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2f46b
movq %rdx, %r15
movq %rax, 0x8(%rsp)
leaq 0x1c0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f504
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2f504
jmp 0x2f57b
movq %rdx, %r15
movq %rax, 0x8(%rsp)
jmp 0x2f59a
jmp 0x2f65a
movq %rdx, %r15
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x2f4d4
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2f4d4
jmp 0x2f4cc
movq %rdx, %r15
movq %rax, 0x8(%rsp)
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0x2f662
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2f662
jmp 0x2f65a
movq %rdx, %r15
movq %rax, 0x8(%rsp)
movq 0x130(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2f583
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2f583
movq %rdx, %r15
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x2f563
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2f563
movq %rdx, %r15
movq %rax, 0x8(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x371c6
jmp 0x2f7a0
movq %rdx, %r15
movq %rax, 0x8(%rsp)
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0x2f7a0
movq 0x80(%rsp), %rsi
jmp 0x2f5fa
movq %rdx, %r15
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x2f59a
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x70(%rsp), %rdi
callq 0x9dd0
jmp 0x2f662
jmp 0x2f798
movq %rdx, %r15
movq %rax, 0x8(%rsp)
movq 0x150(%rsp), %rdi
cmpq %r12, %rdi
je 0x2f706
movq 0x160(%rsp), %rsi
jmp 0x2f679
jmp 0x2f6fe
movq %rdx, %r15
movq %rax, 0x8(%rsp)
movq 0x110(%rsp), %rdi
cmpq %r14, %rdi
je 0x2f7a0
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2f7a0
jmp 0x2f798
movq %rdx, %r15
movq %rax, 0x8(%rsp)
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f639
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2f639
movq %rdx, %r15
movq %rax, 0x8(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x842c
jmp 0x2f706
jmp 0x2f6fe
movq %rdx, %r15
movq %rax, 0x8(%rsp)
movb $0x1, %bpl
jmp 0x2f6d5
movq %rdx, %r15
movq %rax, 0x8(%rsp)
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f706
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2f706
movq %rdx, %r15
movq %rax, 0x8(%rsp)
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0x2f6b2
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2f6b2
movq %rdx, %r15
movq %rax, 0x8(%rsp)
testq %r12, %r12
je 0x2f6d5
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
movb $0x1, %bpl
cmpq %rax, %rdi
je 0x2f6d5
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x74b0
testb %bpl, %bpl
jmp 0x2f7a0
movq %rdx, %r15
movq %rax, 0x8(%rsp)
jmp 0x2f7ad
movq %rdx, %r15
movq %rax, 0x8(%rsp)
jmp 0x2f77c
jmp 0x2f749
jmp 0x2f798
movq %rdx, %r15
movq %rax, 0x8(%rsp)
cmpl $0x3, %r15d
jne 0x2f7a0
movq 0x8(%rsp), %rdi
callq 0x7210
leaq 0x1d0(%rsp), %rdi
movl $0x1f4, %esi            # imm = 0x1F4
callq 0x37f1c
callq 0x7780
jmp 0x2f07c
jmp 0x2f798
movq %rdx, %r15
movq %rax, 0x8(%rsp)
callq 0x7780
jmp 0x2f7a0
jmp 0x2f798
movq %rdx, %r15
movq %rax, 0x8(%rsp)
jmp 0x2f7ba
movq %rdx, %r15
movq %rax, 0x8(%rsp)
leaq 0x1e0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f77c
movq 0x1e0(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0x2f7ba
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2f7ba
movq %rdx, %r15
movq %rax, 0x8(%rsp)
leaq 0x1d0(%rsp), %rdi
callq 0x371c6
leaq 0x270(%rsp), %rdi
callq 0x394b4
cmpl $0x2, %r15d
jne 0x2f823
movq 0x8(%rsp), %rdi
callq 0x7210
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
leaq 0x170(%rsp), %rdi
leaq 0x270(%rsp), %rdx
movq %rax, %rsi
callq 0xde9a
leaq 0x170(%rsp), %rdi
xorl %esi, %esi
movl $0x3, %edx
movl $0x1, %ecx
callq 0xded8
leaq 0x180(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f8a0
movq 0x180(%rsp), %rsi
jmp 0x2f898
cmpl $0x1, %r15d
jne 0x2f438
movq 0x8(%rsp), %rdi
callq 0x7210
movq 0x8(%rbx), %rcx
movl $0x1f4, 0x188(%rcx)     # imm = 0x1F4
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
leaq 0x190(%rsp), %rdi
leaq 0x270(%rsp), %rdx
movq %rax, %rsi
callq 0xde9a
leaq 0x190(%rsp), %rdi
xorl %esi, %esi
movl $0x3, %edx
movl $0x1, %ecx
callq 0xded8
leaq 0x1a0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f8a0
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x74b0
callq 0x7780
jmp 0x2f3af
movq %rax, 0x8(%rsp)
leaq 0x1a0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f8d7
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2f8d7
movq %rax, 0x8(%rsp)
callq 0x7780
jmp 0x2f438
movq %rax, 0x8(%rsp)
leaq 0x180(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f90e
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2f90e
movq %rax, 0x8(%rsp)
callq 0x7780
jmp 0x2f438
movq %rax, %rdi
callq 0x96cc