// File: /workspace/github_cpp_makefile_star2_O3/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 $0x388, %rsp            # imm = 0x388
movq %rdi, %rbx
cmpb $0x1, 0x1fcc1(%rip)     # 0x4e569
jne 0x2e8e4
movq 0x8(%rbx), %rsi
movq 0x1f6f3(%rip), %rdi     # 0x4dfa8
callq 0x35d6a
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 0x60(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0xb90c(%rip), %rsi      # 0x3a204
leaq 0xb909(%rip), %rdx      # 0x3a208
leaq 0x50(%rsp), %rdi
callq 0x80f4
leaq 0x1b0(%rsp), %rdi
leaq 0x50(%rsp), %rdx
movq %r14, %rsi
callq 0x35bbe
movq (%rbx), %rdi
callq 0x12388
leaq 0x1fce3(%rip), %rdx     # 0x4e610
leaq 0x1b0(%rsp), %rdi
movl %eax, %esi
callq 0x390ea
leaq 0x250(%rsp), %rdi
movq %rax, %rsi
callq 0x38dba
leaq 0x1c0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2e96d
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x50(%rsp), %rdi
cmpq %r13, %rdi
je 0x2e984
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x1b0(%rsp), %rdi
callq 0x36d34
movq 0x8(%rbx), %rax
movl 0x188(%rax), %esi
testl %esi, %esi
je 0x2e9ac
leaq 0x1b0(%rsp), %rdi
callq 0x37aee
leaq 0x1b0(%rsp), %rdi
callq 0x37af6
testl %eax, %eax
je 0x2ea23
leaq 0x1b0(%rsp), %rdi
callq 0x37af6
testl %eax, %eax
jne 0x2ebdd
leaq 0x250(%rsp), %rdi
callq 0x390dc
movl $0xb8, %esi
addq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x2bdbc
movq %rax, %rdi
callq 0x2b16e
movq (%rax), %rcx
cmpq %rax, %rcx
je 0x2ebcb
movq 0x8(%rbx), %rdx
movq 0x28(%rdx), %rdx
cmpq %rdx, 0x10(%rcx)
je 0x2ebc6
movq (%rcx), %rcx
cmpq %rax, %rcx
jne 0x2ea0c
jmp 0x2ebcb
leaq 0x250(%rsp), %rdi
callq 0x390dc
movl $0xb8, %esi
addq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x2bdbc
movq %rax, %r14
leaq 0x50(%rsp), %rdi
movq %r13, (%rdi)
leaq 0xe336(%rip), %rsi      # 0x3cd89
leaq 0xe339(%rip), %rdx      # 0x3cd93
callq 0x80f4
leaq 0x50(%rsp), %rsi
movq %r14, %rdi
callq 0x2b17e
movq (%rax), %rax
movq 0x18(%rax), %r14
movq 0x50(%rsp), %rdi
cmpq %r13, %rdi
je 0x2ea8a
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x74b0
testq %r14, %r14
je 0x2e9bd
movq 0x8(%rbx), %r14
leaq 0x50(%rsp), %rdi
callq 0x83f4
leaq 0x30(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x849a
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
movq %r14, %rsi
callq 0x35bbe
leaq 0x40(%rsp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x2eade
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x50(%rsp), %rdi
callq 0x8434
cmpq $0x0, 0x18(%rsp)
je 0x2ef05
movq 0x1fb3d(%rip), %r14     # 0x4e638
leaq 0x250(%rsp), %rdi
callq 0x390dc
movl $0xb8, %esi
addq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x2bdbc
movq %rax, %r15
leaq 0x50(%rsp), %rdi
movq %r13, (%rdi)
leaq 0xc209(%rip), %rsi      # 0x3ad34
leaq 0xc216(%rip), %rdx      # 0x3ad48
callq 0x80f4
leaq 0x50(%rsp), %rsi
movq %r15, %rdi
callq 0x2b17e
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 0x175b6
movl %eax, %ebp
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x2eb8f
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x50(%rsp), %rdi
cmpq %r13, %rdi
je 0x2eba6
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x74b0
testb %bpl, %bpl
jne 0x2f09b
leaq 0x1b0(%rsp), %rdi
movl $0x193, %esi            # imm = 0x193
callq 0x37aee
jmp 0x2f09b
cmpq %rax, %rcx
jne 0x2ebdd
leaq 0x1b0(%rsp), %rdi
movl $0x195, %esi            # imm = 0x195
callq 0x37aee
leaq 0x1b0(%rsp), %rdi
callq 0x37af6
testl %eax, %eax
jne 0x2ec48
movq 0x8(%rbx), %r14
movq 0x28(%r14), %r15
leaq 0x250(%rsp), %rdi
callq 0x390dc
movl $0xb8, %esi
addq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x2bdbc
movq (%rbx), %r8
movq (%r15), %r9
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rax, %rcx
callq *0x70(%r9)
leaq 0x1b0(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x36ef6
leaq 0x50(%rsp), %rdi
callq 0x36d9a
movl $0x120, %edi            # imm = 0x120
addq 0x8(%rbx), %rdi
leaq 0xe541(%rip), %rsi      # 0x3d199
callq 0x7180
testl %eax, %eax
jne 0x2ece6
leaq 0x50(%rsp), %rdi
movq %r13, (%rdi)
leaq 0xe52e(%rip), %rsi      # 0x3d1a2
leaq 0xe531(%rip), %rdx      # 0x3d1ac
callq 0x80f4
leaq 0x20(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xe51d(%rip), %rsi      # 0x3d1ad
leaq 0xe520(%rip), %rdx      # 0x3d1b7
leaq 0x10(%rsp), %rdi
callq 0x80f4
leaq 0x1b0(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x37020
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x2eccf
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x50(%rsp), %rdi
cmpq %r13, %rdi
je 0x2ece6
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x74b0
movq (%rbx), %r14
leaq 0x250(%rsp), %rdi
callq 0x390dc
movl $0xb8, %esi
addq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x2bdbc
movq %rax, %r15
movq 0x8(%rbx), %rax
movq 0x28(%rax), %r12
testq %r12, %r12
je 0x2ed3e
movq (%r12), %rax
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq *0x10(%rax)
leaq 0xbacc(%rip), %rsi      # 0x3a7f9
leaq 0x10(%rsp), %rdi
callq 0x7180
testl %eax, %eax
setne %al
jmp 0x2ed40
movb $0x1, %al
movzbl %al, %ecx
leaq 0x50(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
movq %r15, %rdx
callq 0x37cd8
leaq 0x50(%rsp), %rsi
movq %r14, %rdi
callq 0x12080
movq 0x50(%rsp), %rdi
cmpq %r13, %rdi
je 0x2ed7c
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x74b0
testq %r12, %r12
je 0x2ed9c
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2ed9c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x74b0
cmpb $0x1, 0x1f7c6(%rip)     # 0x4e569
jne 0x2ee02
movq 0x1f1fc(%rip), %rdi     # 0x4dfa8
leaq 0xe405(%rip), %rsi      # 0x3d1b8
movl $0x10, %edx
callq 0x7510
leaq 0x1b0(%rsp), %rdi
callq 0x37af6
movq 0x1f1d7(%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 0x1b0(%rsp), %rdi
callq 0x37af6
cmpl $0xc8, %eax
jne 0x2eed7
leaq 0x120(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xe39c(%rip), %rsi      # 0x3d1c9
leaq 0xe39c(%rip), %rdx      # 0x3d1d0
leaq 0x110(%rsp), %rdi
callq 0x80f4
leaq 0x110(%rsp), %rdi
xorl %esi, %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0xdea4
movq 0x110(%rsp), %rdi
cmpq %r14, %rdi
je 0x2ee74
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x1b0(%rsp), %rdi
callq 0x36d9a
leaq 0x250(%rsp), %rdi
callq 0x39078
cmpq $0x0, 0x8(%rbx)
je 0x2eed3
movq (%rbx), %rdi
callq 0x125c2
testb %al, %al
je 0x2eed3
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x2eeb0
movq (%rdi), %rax
callq *0x8(%rax)
movl $0x1a0, %edi            # imm = 0x1A0
callq 0x74a0
movq %rax, %r15
movq (%rbx), %rdi
callq 0x12388
movq %r15, %rdi
movl %eax, %esi
callq 0x333ee
movq %r15, 0x8(%rbx)
xorl %eax, %eax
jmp 0x2eef3
leaq 0x1b0(%rsp), %rdi
callq 0x36d9a
leaq 0x250(%rsp), %rdi
callq 0x39078
movb $0x1, %al
addq $0x388, %rsp            # imm = 0x388
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1b0(%rsp), %rdi
movl $0x191, %esi            # imm = 0x191
callq 0x37aee
leaq 0x50(%rsp), %rdi
callq 0x9d70
leaq 0x30(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x9e16
leaq 0x250(%rsp), %rdi
callq 0x390dc
movl $0xb8, %esi
addq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x2bdbc
movq %rax, %r14
leaq 0x140(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0xde25(%rip), %rsi      # 0x3cd89
leaq 0xde28(%rip), %rdx      # 0x3cd93
leaq 0x130(%rsp), %rdi
callq 0x80f4
leaq 0x130(%rsp), %rsi
movq %r14, %rdi
callq 0x2b17e
movq (%rax), %rdx
addq $0x10, %rdx
leaq 0xe1f5(%rip), %rsi      # 0x3d18b
leaq 0x190(%rsp), %rdi
callq 0xe2cb
leaq 0xe938(%rip), %rsi      # 0x3d8e2
leaq 0x190(%rsp), %rdi
callq 0x78d0
leaq 0x100(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2efe7
movq %rdx, 0xf0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x100(%rsp)
jmp 0x2efee
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rsi
leaq 0xf0(%rsp), %rdx
movq %rsi, 0x8(%rdx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x1b0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x37020
movq 0xf0(%rsp), %rdi
cmpq %r14, %rdi
je 0x2f03c
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x1a0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f05d
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x130(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2f07a
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x2f091
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x50(%rsp), %rdi
callq 0x9db0
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2e9bd
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2e9bd
movq %rdx, %r15
movq %rax, 0x8(%rsp)
movq 0xf0(%rsp), %rdi
cmpq %r14, %rdi
je 0x2f0ee
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2f0ee
movq %rdx, %r15
movq %rax, 0x8(%rsp)
leaq 0x1a0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f184
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2f184
jmp 0x2f1a3
movq %rdx, %r15
movq %rax, 0x8(%rsp)
jmp 0x2f1c2
jmp 0x2f2ad
movq %rdx, %r15
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x2f157
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2f157
jmp 0x2f14f
movq %rdx, %r15
movq %rax, 0x8(%rsp)
movq 0x50(%rsp), %rdi
cmpq %r13, %rdi
je 0x2f2b5
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2f2b5
jmp 0x2f2ad
movq %rdx, %r15
movq %rax, 0x8(%rsp)
movq 0x130(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2f1ab
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2f1ab
movq %rdx, %r15
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x2f1c2
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x50(%rsp), %rdi
callq 0x9db0
jmp 0x2f2b5
movq %rdx, %r15
movq %rax, 0x8(%rsp)
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f1fe
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2f1fe
movq %rdx, %r15
movq %rax, 0x8(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x8434
jmp 0x2f385
jmp 0x2f37d
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 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x2f26e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2f26e
movq %rdx, %r15
movq %rax, 0x8(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x36d9a
jmp 0x2f41c
movq %rdx, %r15
movq %rax, 0x8(%rsp)
movq 0x50(%rsp), %rdi
cmpq %r13, %rdi
je 0x2f41c
movq 0x60(%rsp), %rsi
jmp 0x2f34f
jmp 0x2f414
movq %rdx, %r15
movq %rax, 0x8(%rsp)
movq 0x50(%rsp), %rdi
cmpq %r13, %rdi
je 0x2f385
movq 0x60(%rsp), %rsi
jmp 0x2f2cc
jmp 0x2f37d
movq %rdx, %r15
movq %rax, 0x8(%rsp)
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f385
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2f385
movq %rdx, %r15
movq %rax, 0x8(%rsp)
movq 0x110(%rsp), %rdi
cmpq %r14, %rdi
je 0x2f41c
movq 0x120(%rsp), %rsi
jmp 0x2f34f
jmp 0x2f414
jmp 0x2f414
movq %rdx, %r15
movq %rax, 0x8(%rsp)
movq 0x50(%rsp), %rdi
cmpq %r13, %rdi
je 0x2f32f
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2f32f
movq %rdx, %r15
movq %rax, 0x8(%rsp)
testq %r12, %r12
je 0x2f41c
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f41c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2f41c
movq %rdx, %r15
movq %rax, 0x8(%rsp)
jmp 0x2f429
movq %rdx, %r15
movq %rax, 0x8(%rsp)
jmp 0x2f3fb
jmp 0x2f3c8
jmp 0x2f414
movq %rdx, %r15
movq %rax, 0x8(%rsp)
cmpl $0x3, %r15d
jne 0x2f41c
movq 0x8(%rsp), %rdi
callq 0x7210
leaq 0x1b0(%rsp), %rdi
movl $0x1f4, %esi            # imm = 0x1F4
callq 0x37aee
callq 0x7780
jmp 0x2e9bd
jmp 0x2f414
movq %rdx, %r15
movq %rax, 0x8(%rsp)
callq 0x7780
jmp 0x2f41c
jmp 0x2f414
movq %rdx, %r15
movq %rax, 0x8(%rsp)
jmp 0x2f436
movq %rdx, %r15
movq %rax, 0x8(%rsp)
leaq 0x1c0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f3fb
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x50(%rsp), %rdi
cmpq %r13, %rdi
je 0x2f436
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2f436
movq %rdx, %r15
movq %rax, 0x8(%rsp)
leaq 0x1b0(%rsp), %rdi
callq 0x36d9a
leaq 0x250(%rsp), %rdi
callq 0x39078
cmpl $0x2, %r15d
jne 0x2f49f
movq 0x8(%rsp), %rdi
callq 0x7210
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
leaq 0x150(%rsp), %rdi
leaq 0x250(%rsp), %rdx
movq %rax, %rsi
callq 0xde66
leaq 0x150(%rsp), %rdi
xorl %esi, %esi
movl $0x3, %edx
movl $0x1, %ecx
callq 0xdea4
leaq 0x160(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f51c
movq 0x160(%rsp), %rsi
jmp 0x2f514
cmpl $0x1, %r15d
jne 0x2f224
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 0x170(%rsp), %rdi
leaq 0x250(%rsp), %rdx
movq %rax, %rsi
callq 0xde66
leaq 0x170(%rsp), %rdi
xorl %esi, %esi
movl $0x3, %edx
movl $0x1, %ecx
callq 0xdea4
leaq 0x180(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f51c
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x74b0
callq 0x7780
jmp 0x2ee8e
movq %rax, 0x8(%rsp)
leaq 0x180(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f553
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2f553
movq %rax, 0x8(%rsp)
callq 0x7780
jmp 0x2f224
movq %rax, 0x8(%rsp)
leaq 0x160(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f58a
movq 0x160(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x2f58a
movq %rax, 0x8(%rsp)
callq 0x7780
jmp 0x2f224
movq %rax, %rdi
callq 0x96aa