// File: /workspace/github_cpp_makefile_star2_O3/guoxuanhan[P]NetServer/httpsession.cpp
// Function: HttpSession::HttpError(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, _HttpRequestContext const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void HttpSession::HttpError(const int err_num, const std::string short_msg, const HttpRequestContext &httprequestcontext, std::string &responsecontext)
{
    //这里string创建销毁应该会耗时间
    std::string responsebody;
    responsebody += "<html><title>出错了</title>";
    responsebody += "<head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"></head>";
    responsebody += "<style>body{background-color:#f;font-size:14px;}h1{font-size:60px;color:#eeetext-align:center;padding-top:30px;font-weight:normal;}</style>";
    responsebody += "<body bgcolor=\"ffffff\"><h1>";
    responsebody += std::to_string(err_num) + " " + short_msg;
    responsebody += "</h1><hr><em> GuoJ's NetServer</em>\n</body></html>";

    std::string httpversion;
    if(httprequestcontext.version.empty())
    {
        httpversion = "HTTP/1.1";
    }
    else
    {
        httpversion = httprequestcontext.version;
    }

    responsecontext += httpversion + " " + std::to_string(err_num) + " " + short_msg + "\r\n";
    responsecontext += "Server: GuoJ's NetServer/0.1\r\n";
    responsecontext += "Content-Type: text/html\r\n";
    responsecontext += "Connection: Keep-Alive\r\n";
    responsecontext += "Content-Length: " + std::to_string(responsebody.size()) + "\r\n";
    responsecontext += "\r\n";
    responsecontext += responsebody;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %r8, 0x88(%rsp)
movq %rcx, %r13
movq %rdx, 0x90(%rsp)
movl %esi, %r15d
leaq 0x78(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x6ca5(%rip), %rsi      # 0x10bc7
leaq 0x68(%rsp), %rdi
callq 0x45f0
leaq 0x6cb3(%rip), %rsi      # 0x10be6
leaq 0x68(%rsp), %rdi
callq 0x45f0
leaq 0x6cf3(%rip), %rsi      # 0x10c37
leaq 0x68(%rsp), %rdi
callq 0x45f0
leaq 0x6d6e(%rip), %rsi      # 0x10cc3
leaq 0x68(%rsp), %rdi
callq 0x45f0
movl %r15d, %ebp
negl %ebp
cmovsl %r15d, %ebp
movl $0x1, %ebx
cmpl $0xa, %ebp
jb 0x9fb6
movl $0x4, %ebx
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x9faf
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x9fb4
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x9fb6
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %ebx
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x9f7e
addl $-0x3, %ebx
jmp 0x9fb6
addl $-0x2, %ebx
jmp 0x9fb6
decl %ebx
shrl $0x1f, %r15d
leal (%rbx,%r15), %esi
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x28(%rsp), %rdi
movl $0x2d, %edx
callq 0x43c0
movl %r15d, %r12d
leaq 0x28(%rsp), %r14
movq (%r14), %rdi
addq %r12, %rdi
movl %ebx, %esi
movl %ebp, %edx
callq 0xa954
leaq 0x645b(%rip), %rsi      # 0x1044f
movq %r14, %rdi
callq 0x45f0
leaq 0x18(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xa023
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0xa029
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x90(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x40f0
leaq 0x58(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xa080
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0xa087
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x50(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
leaq 0x68(%rsp), %rdi
callq 0x40f0
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0xa0c2
callq 0x4310
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xa0d6
callq 0x4310
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xa0ea
callq 0x4310
leaq 0x6bee(%rip), %rsi      # 0x10cdf
leaq 0x68(%rsp), %rdi
callq 0x45f0
movq %r14, 0x48(%rsp)
movq $0x0, 0x50(%rsp)
movb $0x0, 0x58(%rsp)
cmpq $0x0, 0x48(%r13)
je 0xa128
addq $0x40, %r13
leaq 0x48(%rsp), %rdi
movq %r13, %rsi
callq 0x41e0
jmp 0xa143
leaq 0x69e3(%rip), %rcx      # 0x10b12
leaq 0x48(%rsp), %rdi
movl $0x8, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x44b0
leaq 0xc8(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
addq %rsi, %rdx
leaq 0xb8(%rsp), %rdi
callq 0x7a92
leaq 0x62df(%rip), %rsi      # 0x1044f
leaq 0xb8(%rsp), %rdi
callq 0x45f0
movl $0x1, %ebx
cmpl $0xa, %ebp
jb 0xa1cb
movl $0x4, %ebx
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0xa1c4
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0xa1c9
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0xa1cb
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %ebx
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0xa193
addl $-0x3, %ebx
jmp 0xa1cb
addl $-0x2, %ebx
jmp 0xa1cb
decl %ebx
addl %ebx, %r15d
leaq 0x108(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0xf8(%rsp), %rdi
movq %r15, %rsi
movl $0x2d, %edx
callq 0x43c0
addq 0xf8(%rsp), %r12
movq %r12, %rdi
movl %ebx, %esi
movl %ebp, %edx
callq 0xa954
movq 0xb8(%rsp), %rcx
movq 0xc0(%rsp), %r8
movq 0x100(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r14, %rcx
je 0xa231
movq 0xc8(%rsp), %rdi
movq 0xf8(%rsp), %rsi
cmpq %rdi, %rax
leaq 0x38(%rsp), %rbx
jbe 0xa25a
movl $0xf, %edi
cmpq %r13, %rsi
je 0xa255
movq 0x108(%rsp), %rdi
cmpq %rdi, %rax
jbe 0xa269
leaq 0xb8(%rsp), %rdi
callq 0x40f0
jmp 0xa27a
leaq 0xf8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4390
leaq 0xa8(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0xa2a7
movq %rsi, 0x98(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa8(%rsp)
jmp 0xa2ad
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0xa0(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x617b(%rip), %rsi      # 0x1044f
leaq 0x98(%rsp), %rdi
callq 0x45f0
leaq 0xe8(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xa311
movq %rdx, 0xd8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xe8(%rsp)
jmp 0xa318
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0xd8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x90(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x40f0
movq %rbx, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xa36e
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0xa374
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x66b5(%rip), %rsi      # 0x10a4c
callq 0x45f0
leaq 0x18(%rsp), %rsi
movq %rsi, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xa3c4
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0xa3ca
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x88(%rsp), %rdi
callq 0x40f0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xa40d
callq 0x4310
movq 0x28(%rsp), %rdi
cmpq %rbx, %rdi
je 0xa41c
callq 0x4310
movq 0xd8(%rsp), %rdi
cmpq %r15, %rdi
je 0xa42e
callq 0x4310
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa444
callq 0x4310
movq 0xf8(%rsp), %rdi
cmpq %r13, %rdi
je 0xa456
callq 0x4310
movq 0xb8(%rsp), %rdi
cmpq %r14, %rdi
movq 0x88(%rsp), %r12
je 0xa470
callq 0x4310
leaq 0x66d9(%rip), %rsi      # 0x10b50
movq %r12, %rdi
callq 0x45f0
leaq 0x688c(%rip), %rsi      # 0x10d12
movq %r12, %rdi
callq 0x45f0
leaq 0x6897(%rip), %rsi      # 0x10d2c
movq %r12, %rdi
callq 0x45f0
movq 0x70(%rsp), %rbx
movl $0x1, %esi
cmpq $0xa, %rbx
jb 0xa4fc
movl $0x4, %esi
movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B
movq %rbx, %rcx
cmpq $0x63, %rcx
jbe 0xa4f5
cmpq $0x3e7, %rcx            # imm = 0x3E7
jbe 0xa4fa
cmpq $0x2710, %rcx           # imm = 0x2710
jb 0xa4fc
movq %rcx, %rax
mulq %rdi
shrq $0xb, %rdx
addl $0x4, %esi
cmpq $0x1869f, %rcx          # imm = 0x1869F
movq %rdx, %rcx
ja 0xa4bf
addl $-0x3, %esi
jmp 0xa4fc
addl $-0x2, %esi
jmp 0xa4fc
decl %esi
movl %esi, %esi
leaq 0xd8(%rsp), %rdi
movq %r15, (%rdi)
xorl %edx, %edx
callq 0x43c0
leaq 0xd8(%rsp), %r14
movq (%r14), %rdi
movl 0x8(%r14), %esi
movq %rbx, %rdx
callq 0xa8d9
leaq 0x666f(%rip), %rcx      # 0x10b9d
movl $0x10, %r8d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4390
leaq 0x38(%rsp), %rsi
movq %rsi, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq 0x18(%rsp), %r14
je 0xa56d
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0xa573
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
leaq 0x58(%rsp), %rbx
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x64b1(%rip), %rsi      # 0x10a4c
callq 0x45f0
movq %r14, 0x8(%rsp)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0xa5c3
movq %rsi, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0xa5cd
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq %r14, %rsi
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r12, %rdi
callq 0x40f0
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0xa5fc
callq 0x4310
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xa610
callq 0x4310
movq 0xd8(%rsp), %rdi
cmpq %r15, %rdi
je 0xa622
callq 0x4310
leaq 0x6423(%rip), %rsi      # 0x10a4c
movq %r12, %rdi
callq 0x45f0
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
movq %r12, %rdi
callq 0x40f0
movq 0x48(%rsp), %rdi
cmpq %rbx, %rdi
je 0xa652
callq 0x4310
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0xa666
callq 0x4310
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0xa68f
callq 0x4310
jmp 0xa68f
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xa6a8
callq 0x4310
jmp 0xa6a8
movq %rax, %rbx
movq 0xd8(%rsp), %rdi
cmpq %r15, %rdi
jne 0xa750
jmp 0xa79f
jmp 0xa79c
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xa6df
callq 0x4310
jmp 0xa6df
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xa6f8
callq 0x4310
jmp 0xa6f8
movq %rax, %rbx
movq 0xd8(%rsp), %rdi
cmpq %r15, %rdi
je 0xa70f
callq 0x4310
jmp 0xa70f
movq %rax, %rbx
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa72a
callq 0x4310
jmp 0xa72a
movq %rax, %rbx
movq 0xf8(%rsp), %rdi
cmpq %r13, %rdi
je 0xa743
callq 0x4310
jmp 0xa743
jmp 0xa740
movq %rax, %rbx
movq 0xb8(%rsp), %rdi
cmpq %r14, %rdi
je 0xa79f
callq 0x4310
jmp 0xa79f
jmp 0xa79c
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0xa770
callq 0x4310
jmp 0xa770
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xa789
callq 0x4310
jmp 0xa789
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
jmp 0xa7a9
jmp 0xa797
movq %rax, %rbx
jmp 0xa7b3
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0xa7b3
callq 0x4310
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0xa7c7
callq 0x4310
movq %rbx, %rdi
callq 0x45a0
nop