// File: /workspace/github_cpp_makefile_star2_O3/dentiny[P]HTTP-Cache-Proxy/Proxy.cpp
// Function: Proxy::getResponse(int, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::vector<char, std::allocator<char>>, std::allocator<std::vector<char, std::allocator<char>>>>&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void getResponse(int client_id,
					int client_fd, 
					int server_fd, 
					const std::string & url, 
					const std::string & header, 
					std::vector<std::vector<char>> & segment,
					int len,
					const std::string & httpAction)
	{
	    // content-based http response
	    // (1) extract content length from header
	    // (2) keep receiving until total received size exceeds content length(marks end)
	    std::vector<char> buffer(BUFFER_SIZE, '\0');
	    if(header.find("Content-Length") != -1)
	    {
	    	int received_length = len;
	    	int content_length = parser.extractContentLength(header);
	    	while(received_length < content_length)
	    	{
	    		// receive response from server
	    		len = recv(server_fd, &buffer.data()[0], BUFFER_SIZE - 1, 0);
		    	if(len == -1)
		    	{
		    		throw ProxyException("Proxy received from server error");
		    	}
		    	buffer[len] = '\0';
		    	segment.push_back(std::vector<char>(buffer.begin(), buffer.begin() + len));
		    	received_length += len;

		    	// send response to client
		    	bool respond_suc = respondClient(client_fd, buffer, len);
		    	if(!respond_suc)
		    	{
		    		throw ProxyException("Proxy respond to client error");
		    	}
	    	}
	    }

	    // chunk-based http response
	    // keep receiving till the last chunk of the response, which is marked as 0 at the first line of the chunk
	    else if(header.find("chunked") != -1)
	    {
	    	bool isLastBlock = false;
	    	while(!isLastBlock)
	    	{
	    		// receive message from server
	    		len = recv(server_fd, &buffer.data()[0], BUFFER_SIZE - 1, 0);
		    	if(len == -1)
		    	{
		    		throw ProxyException("Proxy received from server error");
		    	}
		    	buffer[len] = '\0';
		    	segment.push_back(std::vector<char>(buffer.begin(), buffer.begin() + len));

		    	// send response to the client
		    	bool respond_suc = respondClient(client_fd, buffer, len);
		    	if(!respond_suc)
		    	{
		    		throw ProxyException("Proxy respond to client error");
		    	}

		    	// the first character of the last block starts with 0
		    	if(buffer[0] == '0')
		    	{
		    		isLastBlock = true;
		    	}
	    	}	
	    }

	    // POST action
	    else
	    {
	    	// keep receiving until the received length is 0, which marks the end of transmission
	    	int received_length = len;
	    	while(true)
	    	{
	    		// receive from server
	    		len = recv(server_fd, &buffer.data()[0], BUFFER_SIZE - 1, 0);
		    	if(len == -1)
		    	{
		    		throw ProxyException("Proxy received from server error");
		    	}
		    	else if(len == 0)
		    	{
		    		break;
		    	}
		    	segment.push_back(std::vector<char>(buffer.begin(), buffer.begin() + len));

		    	// send response to the client
		    	bool respond_suc = respondClient(client_fd, buffer, len);
		    	if(!respond_suc)
		    	{
		    		throw ProxyException("Proxy respond to client error");
		    	}
	    	}
	    }
	    Response response(url, segment, header);
	    parser.parseResponse(response);

	    // write first line of response to log
	    std::string log_content = std::to_string(client_id) + ": Received " + response.first_line + " from " + response.url;
	    logger.log(log_content);
	    log_content = std::to_string(client_id) + ": Responding " + response.first_line;
	    logger.log(log_content);

	    // cache only works for GET http action, and apply on those with no "no-store" attribute
	    if(!response.no_store && httpAction == "GET")
	    {
	    	cache.put(url, response);
	    }

	    // if http action is GET and status code is 200, write it into log
	    if(httpAction == "GET" && response.status_code == 200)
	    {
	    	std::string log_content;
	    	if(response.no_store)
	    	{
	    		log_content = std::to_string(client_id) + ": not cachable bacause no-store in Cache-Control"; 
	    	}
	    	else if(!response.etag.empty() || response.last_modified != 0)
	    	{
	    		log_content = std::to_string(client_id) + ": cached, but requires re-validation"; 
	    	}
	    	else
	    	{
	    		// convert time_t to string
	    		tm * tm = localtime(&response.expiration_time);
	    		char * dt = asctime(tm);
	    		std::string expiration_time(dt);
	 			log_content = std::to_string(client_id) + ": cached, expired at " + expiration_time;
	    	}
	    	logger.log(log_content);
	    }
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x308, %rsp            # imm = 0x308
movq %r9, %r15
movq %r8, 0xc8(%rsp)
movl %ecx, 0x64(%rsp)
movl %edx, %r12d
movl %esi, %r14d
movq %rdi, %r13
movl $0x10000, %edi          # imm = 0x10000
callq 0x3330
movq %rax, %rbx
movl $0x10000, %edx          # imm = 0x10000
movq %rax, %rdi
xorl %esi, %esi
callq 0x31f0
leaq 0x429c(%rip), %rsi      # 0xd46e
movl $0xe, %ecx
movq %r15, %rdi
xorl %edx, %edx
callq 0x34f0
cmpq $-0x1, %rax
movq %r13, 0x98(%rsp)
movq %r14, 0x68(%rsp)
movq %r15, 0xf0(%rsp)
je 0x92db
movl 0x348(%rsp), %ebp
movq %r13, %rdi
movq %r15, %rsi
callq 0xa6fa
movl %eax, 0xc4(%rsp)
movl %ebp, 0x74(%rsp)
cmpl %ebp, %eax
jle 0x943c
leaq 0x150(%rsp), %r15
movl $0xffff, %edx           # imm = 0xFFFF
movl 0x64(%rsp), %edi
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x3100
movq %rax, %r13
cmpl $-0x1, %r13d
je 0xa029
movslq %r13d, %rbp
leaq (%rbx,%rbp), %rdx
movb $0x0, (%rbx,%rbp)
movq %r15, %rdi
movq %rbx, %rsi
leaq 0xa0(%rsp), %rcx
callq 0x6e64
movq 0x340(%rsp), %rdi
movq %r15, %rsi
callq 0xa520
movq 0x150(%rsp), %rdi
testq %rdi, %rdi
je 0x9298
movq 0x160(%rsp), %rsi
subq %rdi, %rsi
callq 0x3340
addl %r13d, 0x74(%rsp)
xorl %r14d, %r14d
cmpl %r13d, %r14d
jge 0x92c5
movslq %r14d, %rsi
addq %rbx, %rsi
movl %r12d, %edi
movq %rbp, %rdx
xorl %ecx, %ecx
callq 0x31b0
addl %eax, %r14d
cmpl $-0x1, %eax
jne 0x92a0
jmp 0x9efa
movl 0x74(%rsp), %eax
cmpl 0xc4(%rsp), %eax
jl 0x922d
jmp 0x943c
leaq 0x41da(%rip), %rsi      # 0xd4bc
movl $0x7, %ecx
movq %r15, %rdi
xorl %edx, %edx
callq 0x34f0
leaq 0x150(%rsp), %r14
cmpq $-0x1, %rax
je 0x941d
movl $0xffff, %edx           # imm = 0xFFFF
movl 0x64(%rsp), %edi
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x3100
movq %rax, %r13
cmpl $-0x1, %r13d
je 0xa08e
movslq %r13d, %rbp
leaq (%rbx,%rbp), %rdx
movb $0x0, (%rbx,%rbp)
movq %r14, %rdi
movq %rbx, %rsi
leaq 0xa0(%rsp), %rcx
callq 0x6e64
movq 0x340(%rsp), %rdi
movq %r14, %rsi
callq 0xa520
movq 0x150(%rsp), %rdi
testq %rdi, %rdi
je 0x936e
movq 0x160(%rsp), %rsi
subq %rdi, %rsi
callq 0x3340
xorl %r15d, %r15d
cmpl %r13d, %r15d
jge 0x9396
movslq %r15d, %rsi
addq %rbx, %rsi
movl %r12d, %edi
movq %rbp, %rdx
xorl %ecx, %ecx
callq 0x31b0
addl %eax, %r15d
cmpl $-0x1, %eax
jne 0x9371
jmp 0x9f5f
cmpb $0x30, (%rbx)
jne 0x9303
jmp 0x943c
cmpl $-0x1, %r13d
je 0xa0f0
movslq %r13d, %rbp
leaq (%rbx,%rbp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
leaq 0xa0(%rsp), %rcx
callq 0x6e64
movq 0x340(%rsp), %rdi
movq %r14, %rsi
callq 0xa520
movq 0x150(%rsp), %rdi
testq %rdi, %rdi
je 0x93f5
movq 0x160(%rsp), %rsi
subq %rdi, %rsi
callq 0x3340
xorl %r15d, %r15d
cmpl %r13d, %r15d
jge 0x941d
movslq %r15d, %rsi
addq %rbx, %rsi
movl %r12d, %edi
movq %rbp, %rdx
xorl %ecx, %ecx
callq 0x31b0
addl %eax, %r15d
cmpl $-0x1, %eax
jne 0x93f8
jmp 0x9fc4
movl $0xffff, %edx           # imm = 0xFFFF
movl 0x64(%rsp), %edi
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x3100
movq %rax, %r13
testl %r13d, %r13d
jne 0x93a4
leaq 0x128(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0xc8(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x118(%rsp), %rdi
callq 0x3d20
leaq 0x138(%rsp), %rdi
movq 0x340(%rsp), %rsi
callq 0x8a1c
leaq 0x108(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0xf0(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0xf8(%rsp), %rdi
callq 0x3d20
leaq 0x150(%rsp), %rdi
leaq 0x118(%rsp), %rsi
leaq 0x138(%rsp), %rdx
leaq 0xf8(%rsp), %rcx
callq 0xa76c
movq 0xf8(%rsp), %rdi
cmpq %r12, %rdi
je 0x94ea
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x3340
leaq 0x138(%rsp), %rdi
callq 0x3f6e
movq 0x118(%rsp), %rdi
cmpq %r15, %rdi
movq 0x98(%rsp), %r14
je 0x951c
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x3340
leaq 0x150(%rsp), %rsi
movq %r14, %rdi
callq 0xa8d8
movq 0x68(%rsp), %r15
movl %r15d, %ebp
negl %ebp
cmovsl %r15d, %ebp
movl $0x1, %r14d
cmpl $0xa, %ebp
jb 0x958e
movl $0x4, %r14d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x9585
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x958b
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x958e
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r14d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x9552
addl $-0x3, %r14d
jmp 0x958e
addl $-0x2, %r14d
jmp 0x958e
decl %r14d
shrl $0x1f, %r15d
leal (%r14,%r15), %esi
leaq 0x88(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x78(%rsp), %rdi
movl $0x2d, %edx
callq 0x3390
movq %r15, 0x68(%rsp)
movl %r15d, %r15d
leaq 0x78(%rsp), %r12
movq (%r12), %rdi
addq %r15, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x7195
leaq 0x3e5f(%rip), %rsi      # 0xd435
movq %r12, %rdi
callq 0x3550
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9604
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x960b
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rsp, %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x158(%rsp), %rsi
movq 0x160(%rsp), %rdx
callq 0x30e0
leaq 0x30(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9661
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x9669
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq 0x20(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x3a7e(%rip), %rsi      # 0xd10a
callq 0x3550
leaq 0x50(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x96b9
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x96c1
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x40(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x178(%rsp), %rsi
movq 0x180(%rsp), %rdx
callq 0x30e0
leaq 0xb0(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9722
movq %rdx, 0xa0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xb0(%rsp)
jmp 0x9728
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0xa8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x975a
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3340
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
movq 0x98(%rsp), %r12
je 0x9779
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3340
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x978f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3340
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x97b1
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x3340
leaq 0x8(%r12), %r13
leaq 0xa0(%rsp), %rsi
movq %r13, %rdi
callq 0x56f8
movl $0x1, %r14d
cmpl $0xa, %ebp
jb 0x981a
movl $0x4, %r14d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x9811
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x9817
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x981a
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r14d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x97de
addl $-0x3, %r14d
jmp 0x981a
addl $-0x2, %r14d
jmp 0x981a
decl %r14d
movq 0x68(%rsp), %rax
leal (%r14,%rax), %esi
movq %rsp, %rdi
leaq 0x10(%rsp), %rax
movq %rax, (%rdi)
movl $0x2d, %edx
callq 0x3390
movq %rsp, %r12
movq (%r12), %rdi
addq %r15, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x7195
leaq 0x3bee(%rip), %rsi      # 0xd441
movq %r12, %rdi
callq 0x3550
leaq 0x30(%rsp), %rsi
movq %rsi, 0x20(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq 0x50(%rsp), %r12
je 0x9888
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x988e
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0x20(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x158(%rsp), %rsi
movq 0x160(%rsp), %rdx
callq 0x30e0
movq %r12, 0x40(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x98e2
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x98ea
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x40(%rsp), %r14
movq %rdx, 0x8(%r14)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xa0(%rsp), %rdi
movq %r14, %rsi
callq 0x33b0
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x992b
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3340
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x9947
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3340
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x9962
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3340
leaq 0xa0(%rsp), %rsi
movq %r13, %rdi
callq 0x56f8
movq 0x350(%rsp), %r14
cmpb $0x0, 0x208(%rsp)
jne 0x99bb
leaq 0x37b0(%rip), %rsi      # 0xd13b
movq %r14, %rdi
callq 0x30d0
testl %eax, %eax
jne 0x99bb
movq 0x98(%rsp), %rdi
addq $0x250, %rdi            # imm = 0x250
leaq 0x150(%rsp), %rdx
movq 0xc8(%rsp), %rsi
callq 0xa91a
leaq 0x3779(%rip), %rsi      # 0xd13b
movq %r14, %rdi
callq 0x30d0
testl %eax, %eax
jne 0x9e15
cmpl $0xc8, 0x150(%rsp)
jne 0x9e15
movq %r12, 0x40(%rsp)
movq $0x0, 0x48(%rsp)
movb $0x0, 0x50(%rsp)
cmpb $0x1, 0x208(%rsp)
jne 0x9a5e
movl $0x1, %r14d
cmpl $0xa, %ebp
jb 0x9b53
movl $0x4, %r14d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x9b4a
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x9b50
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x9b53
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r14d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x9a1c
addl $-0x3, %r14d
jmp 0x9b53
movq 0x220(%rsp), %rax
orq 0x230(%rsp), %rax
jne 0x9af7
leaq 0x218(%rsp), %rdi
callq 0x3260
movq %rax, %rdi
callq 0x3140
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movq %rax, %rsi
callq 0x39d6
movl $0x1, %r14d
cmpl $0xa, %ebp
jb 0x9c79
movl $0x4, %r14d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x9b9b
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x9c76
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x9c79
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r14d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x9ab5
addl $-0x3, %r14d
jmp 0x9c79
movl $0x1, %r14d
cmpl $0xa, %ebp
jb 0x9ba7
movl $0x4, %r14d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x9b95
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x9ba4
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x9ba7
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r14d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x9b13
addl $-0x3, %r14d
jmp 0x9ba7
addl $-0x2, %r14d
jmp 0x9b53
decl %r14d
movq 0x68(%rsp), %rsi
addl %r14d, %esi
movq %rsp, %rdi
leaq 0x10(%rsp), %rax
movq %rax, (%rdi)
movl $0x2d, %edx
callq 0x3390
movq %rsp, %r12
addq (%r12), %r15
movq %r15, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x7195
leaq 0x3939(%rip), %rsi      # 0xd4c4
movq %r12, %rdi
callq 0x3550
jmp 0x9be7
addl $-0x2, %r14d
jmp 0x9ba7
addl $-0x2, %r14d
jmp 0x9c79
decl %r14d
movq 0x68(%rsp), %rsi
addl %r14d, %esi
movq %rsp, %rdi
leaq 0x10(%rsp), %rax
movq %rax, (%rdi)
movl $0x2d, %edx
callq 0x3390
movq %rsp, %r12
addq (%r12), %r15
movq %r15, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x7195
leaq 0x3916(%rip), %rsi      # 0xd4f5
movq %r12, %rdi
callq 0x3550
leaq 0x30(%rsp), %r12
movq %r12, 0x20(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9c0f
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x9c17
movups (%rcx), %xmm0
movups %xmm0, (%r12)
leaq 0x50(%rsp), %r15
movq 0x8(%rax), %rdx
leaq 0x20(%rsp), %r14
movq %rdx, 0x8(%r14)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0x33b0
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x9c5a
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3340
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x9df1
movq 0x10(%rsp), %rsi
jmp 0x9de9
decl %r14d
movq 0x68(%rsp), %rsi
addl %r14d, %esi
leaq 0xe0(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xd0(%rsp), %rdi
movl $0x2d, %edx
callq 0x3390
leaq 0xd0(%rsp), %r12
addq (%r12), %r15
movq %r15, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x7195
leaq 0x385b(%rip), %rsi      # 0xd51a
movq %r12, %rdi
callq 0x3550
leaq 0x88(%rsp), %rbp
movq %rbp, 0x78(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9cf5
movq %rdx, 0x78(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x88(%rsp)
jmp 0x9cfc
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
leaq 0x50(%rsp), %r15
movq 0x8(%rax), %rdx
leaq 0x78(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0x30e0
leaq 0x10(%rsp), %r12
movq %r12, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9d52
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x9d5a
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rsp, %r14
movq %rdx, 0x8(%r14)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0x33b0
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x9d96
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3340
movq 0x78(%rsp), %rdi
cmpq %rbp, %rdi
je 0x9db0
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x3340
movq 0xd0(%rsp), %rdi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rdi
je 0x9dd5
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x3340
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x9df1
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3340
leaq 0x40(%rsp), %rsi
movq %r13, %rdi
callq 0x56f8
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x9e15
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3340
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x9e3a
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x3340
leaq 0x238(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9e5b
movq 0x238(%rsp), %rsi
incq %rsi
callq 0x3340
leaq 0x1d0(%rsp), %rdi
callq 0x3fc2
leaq 0x1b8(%rsp), %r14
movq %r14, %rdi
callq 0x3f6e
movq -0x20(%r14), %rdi
leaq 0x1a8(%rsp), %rax
cmpq %rax, %rdi
je 0x9e99
movq 0x1a8(%rsp), %rsi
incq %rsi
callq 0x3340
leaq 0x188(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9eba
movq 0x188(%rsp), %rsi
incq %rsi
callq 0x3340
leaq 0x168(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9edb
movq 0x168(%rsp), %rsi
incq %rsi
callq 0x3340
movl $0x10000, %esi          # imm = 0x10000
movq %rbx, %rdi
callq 0x3340
addq $0x308, %rsp            # imm = 0x308
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x28, %edi
callq 0x31a0
movq %rax, %r15
leaq 0x2d8(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x3583(%rip), %rsi      # 0xd49e
leaq 0x3599(%rip), %rdx      # 0xd4bb
leaq 0x2c8(%rsp), %rdi
callq 0x3c80
movb $0x1, %bpl
leaq 0x2c8(%rsp), %rsi
movq %r15, %rdi
callq 0x6a7c
xorl %ebp, %ebp
leaq 0x7dbd(%rip), %rsi      # 0x11d08
leaq -0x348c(%rip), %rdx     # 0x6ac6
movq %r15, %rdi
callq 0x34e0
jmp 0xa150
movl $0x28, %edi
callq 0x31a0
movq %rax, %r15
leaq 0x298(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x351e(%rip), %rsi      # 0xd49e
leaq 0x3534(%rip), %rdx      # 0xd4bb
leaq 0x288(%rsp), %rdi
callq 0x3c80
movb $0x1, %bpl
leaq 0x288(%rsp), %rsi
movq %r15, %rdi
callq 0x6a7c
xorl %ebp, %ebp
leaq 0x7d58(%rip), %rsi      # 0x11d08
leaq -0x34f1(%rip), %rdx     # 0x6ac6
movq %r15, %rdi
callq 0x34e0
jmp 0xa150
movl $0x28, %edi
callq 0x31a0
movq %rax, %r15
leaq 0x258(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x34b9(%rip), %rsi      # 0xd49e
leaq 0x34cf(%rip), %rdx      # 0xd4bb
leaq 0x248(%rsp), %rdi
callq 0x3c80
movb $0x1, %bpl
leaq 0x248(%rsp), %rsi
movq %r15, %rdi
callq 0x6a7c
xorl %ebp, %ebp
leaq 0x7cf3(%rip), %rsi      # 0x11d08
leaq -0x3556(%rip), %rdx     # 0x6ac6
movq %r15, %rdi
callq 0x34e0
jmp 0xa150
movl $0x28, %edi
callq 0x31a0
movq %rax, %r15
leaq 0x2f8(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x3433(%rip), %rsi      # 0xd47d
leaq 0x344c(%rip), %rdx      # 0xd49d
leaq 0x2e8(%rsp), %rdi
callq 0x3c80
movb $0x1, %bpl
leaq 0x2e8(%rsp), %rsi
movq %r15, %rdi
callq 0x6a7c
xorl %ebp, %ebp
leaq 0x7c8e(%rip), %rsi      # 0x11d08
leaq -0x35bb(%rip), %rdx     # 0x6ac6
movq %r15, %rdi
callq 0x34e0
jmp 0xa150
movl $0x28, %edi
callq 0x31a0
movq %rax, %r15
leaq 0x2b8(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x33ce(%rip), %rsi      # 0xd47d
leaq 0x33e7(%rip), %rdx      # 0xd49d
leaq 0x2a8(%rsp), %rdi
callq 0x3c80
movb $0x1, %bpl
leaq 0x2a8(%rsp), %rsi
movq %r15, %rdi
callq 0x6a7c
xorl %ebp, %ebp
leaq 0x7c29(%rip), %rsi      # 0x11d08
leaq -0x3620(%rip), %rdx     # 0x6ac6
movq %r15, %rdi
callq 0x34e0
jmp 0xa150
movl $0x28, %edi
callq 0x31a0
movq %rax, %r15
leaq 0x278(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x336c(%rip), %rsi      # 0xd47d
leaq 0x3385(%rip), %rdx      # 0xd49d
leaq 0x268(%rsp), %rdi
callq 0x3c80
movb $0x1, %bpl
leaq 0x268(%rsp), %rsi
movq %r15, %rdi
callq 0x6a7c
xorl %ebp, %ebp
leaq 0x7bc7(%rip), %rsi      # 0x11d08
leaq -0x3682(%rip), %rdx     # 0x6ac6
movq %r15, %rdi
callq 0x34e0
movq %rax, %r14
movq 0x78(%rsp), %rdi
cmpq %rbp, %rdi
je 0xa172
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x3340
jmp 0xa172
movq %rax, %r14
movq 0xd0(%rsp), %rdi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rdi
je 0xa19c
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x3340
jmp 0xa19c
movq %rax, %r14
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0xa1dd
movq 0x30(%rsp), %rsi
jmp 0xa1ce
jmp 0xa1b8
jmp 0xa1da
jmp 0xa1da
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xa1dd
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3340
jmp 0xa1dd
jmp 0xa1da
movq %rax, %r14
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0xa35b
movq 0x50(%rsp), %rsi
jmp 0xa232
movq %rax, %r14
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0xa21b
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3340
jmp 0xa21b
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xa35b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3340
jmp 0xa35b
jmp 0xa358
movq %r14, %r15
movq %rax, %r14
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0xa269
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3340
jmp 0xa269
movq %r14, %r15
movq %rax, %r14
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0xa28d
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3340
jmp 0xa28d
movq %r14, %r15
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0xa2a8
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3340
jmp 0xa2a8
movq %rax, %r14
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0xa380
movq 0x88(%rsp), %rsi
jmp 0xa378
jmp 0xa2cd
movq %rax, %r14
jmp 0xa380
movq %rax, %r14
movq 0xf8(%rsp), %rdi
cmpq %r12, %rdi
je 0xa2fa
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x3340
jmp 0xa2fa
movq %rax, %r14
leaq 0x138(%rsp), %rdi
callq 0x3f6e
jmp 0xa30c
movq %rax, %r14
movq 0x118(%rsp), %rdi
cmpq %r15, %rdi
je 0xa499
movq 0x128(%rsp), %rsi
incq %rsi
jmp 0xa41f
jmp 0xa496
movq %rax, %r14
movq 0x268(%rsp), %rdi
cmpq %r12, %rdi
je 0xa480
movq 0x278(%rsp), %rsi
jmp 0xa478
jmp 0xa487
movq %rax, %r14
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0xa380
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x3340
leaq 0x150(%rsp), %rdi
callq 0x3eec
jmp 0xa499
movq %rax, %r14
movq 0x2a8(%rsp), %rdi
cmpq %r12, %rdi
je 0xa480
movq 0x2b8(%rsp), %rsi
jmp 0xa478
jmp 0xa487
jmp 0xa496
jmp 0xa400
jmp 0xa496
movq %rax, %r14
movq 0x2e8(%rsp), %rdi
cmpq %r12, %rdi
je 0xa480
movq 0x2f8(%rsp), %rsi
jmp 0xa478
jmp 0xa487
jmp 0xa496
jmp 0xa496
jmp 0xa400
jmp 0xa496
jmp 0xa496
movq %rax, %r14
movq 0x150(%rsp), %rdi
testq %rdi, %rdi
je 0xa499
movq 0x160(%rsp), %rsi
subq %rdi, %rsi
callq 0x3340
jmp 0xa499
movq %rax, %r14
movq 0x248(%rsp), %rdi
cmpq %r12, %rdi
je 0xa480
movq 0x258(%rsp), %rsi
jmp 0xa478
jmp 0xa487
movq %rax, %r14
movq 0x288(%rsp), %rdi
cmpq %r12, %rdi
je 0xa480
movq 0x298(%rsp), %rsi
jmp 0xa478
jmp 0xa487
jmp 0xa496
movq %rax, %r14
movq 0x2c8(%rsp), %rdi
cmpq %r12, %rdi
je 0xa480
movq 0x2d8(%rsp), %rsi
incq %rsi
callq 0x3340
testb %bpl, %bpl
jne 0xa48a
jmp 0xa499
movq %rax, %r14
movq %r15, %rdi
callq 0x3250
jmp 0xa499
jmp 0xa496
movq %rax, %r14
movl $0x10000, %esi          # imm = 0x10000
movq %rbx, %rdi
callq 0x3340
movq %r14, %rdi
callq 0x3510