// File: /workspace/github_cpp_makefile_star2_O1/dentiny[P]HTTP-Cache-Proxy/Proxy.cpp
// Function: Proxy::acceptRequest(int)
Request acceptRequest(int fd)
	{
		// receive port number of the current player
		std::vector<char> buffer(BUFFER_SIZE, '\0');
	    int len = recv(fd, &buffer.data()[0], BUFFER_SIZE, 0);
	    if(len == -1)
	    {
	        throw ProxyException("In acceptRequest(), server receive request error");
	    }
	    buffer[len] = '\0';

	    // get current time for request
	    time_t cur = time(NULL);
	    tm * tm = localtime(&cur);
	    char * dt = asctime(tm);
	    std::string cur_time(dt);

	    // extract HTTP action and url from request
	    Request request(cur_time, buffer, len);
	    parser.parseRequest(request);
	    return request;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r14
movl $0x10000, %edi          # imm = 0x10000
callq 0x3330
movq %rax, %rbx
movl $0x10000, %edx          # imm = 0x10000
movq %rax, %rdi
xorl %esi, %esi
callq 0x31f0
movl $0x10000, %edx          # imm = 0x10000
movl %ebp, %edi
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x3100
movq %rax, %r12
cmpl $-0x1, %r12d
je 0x53f0
movslq %r12d, %rax
movb $0x0, (%rbx,%rax)
xorl %edi, %edi
callq 0x32f0
leaq 0x70(%rsp), %rdi
movq %rax, (%rdi)
callq 0x3260
movq %rax, %rdi
callq 0x3140
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %rax, %rsi
callq 0x39dc
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x10000, %edi          # imm = 0x10000
callq 0x3330
leaq 0x10(%rsp), %r13
movq %rax, (%r13)
movq %rax, 0x8(%r13)
movq %rax, %rbp
addq $0x10000, %rbp          # imm = 0x10000
movq %rbp, 0x10(%r13)
movl $0x10000, %edx          # imm = 0x10000
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3290
movq %rbp, 0x8(%r13)
leaq 0x30(%rsp), %rsi
movq %r14, %rdi
movq %r13, %rdx
movl %r12d, %ecx
callq 0x6b6e
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x53ab
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x3340
movq %r15, %rdi
movq %r14, %rsi
callq 0x6cd4
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x53d1
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3340
movl $0x10000, %esi          # imm = 0x10000
movq %rbx, %rdi
callq 0x3340
movq %r14, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x28, %edi
callq 0x31a0
movq %rax, %r14
leaq 0x60(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x7d6f(%rip), %rsi      # 0xd17d
leaq 0x7d98(%rip), %rdx      # 0xd1ad
leaq 0x50(%rsp), %rdi
callq 0x3c86
movb $0x1, %bpl
leaq 0x50(%rsp), %rsi
movq %r14, %rdi
callq 0x6aa8
xorl %ebp, %ebp
leaq 0xc8d0(%rip), %rsi      # 0x11d08
leaq 0x16b3(%rip), %rdx      # 0x6af2
movq %r14, %rdi
callq 0x34e0
movq %rax, %r15
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0x5469
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x3340
jmp 0x5469
movq %rax, %r15
movb $0x1, %bpl
testb %bpl, %bpl
je 0x54c6
movq %r14, %rdi
callq 0x3250
jmp 0x54c6
movq %rax, %r15
movq %r14, %rdi
callq 0x555a
jmp 0x54a4
movq %rax, %r15
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x54a4
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x3340
jmp 0x54a4
movq %rax, %r15
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x54c6
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3340
jmp 0x54c6
jmp 0x54c3
movq %rax, %r15
movl $0x10000, %esi          # imm = 0x10000
movq %rbx, %rdi
callq 0x3340
movq %r15, %rdi
callq 0x3510
nop