// File: guoxuanhan[P]NetServer/httpsession.cpp
// Function: HttpSession::HttpProcess(_HttpRequestContext const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void HttpSession::HttpProcess(const HttpRequestContext &httprequestcontext, std::string &responsecontext)
{
    //std::cout << "HttpServer::HttpProcess" << std::endl;
    std::string responsebody;
    std::string errormsg;
    std::string path;
    std::string querystring;

    if("GET" == httprequestcontext.method)
    {
        ;
    }
    else if("POST" == httprequestcontext.method)
    {
        ;
    }
    else
    {
        std::cout << "HttpServer::HttpParser" << std::endl;
        errormsg = "Method Not Implemented";
        HttpError(501, "Method Not Implemented", httprequestcontext, responsecontext);
        return;
    }

    size_t pos = httprequestcontext.url.find("?");
    if(pos != std::string::npos)
    {
        path = httprequestcontext.url.substr(0, pos);
        querystring = httprequestcontext.url.substr(pos+1);
    }
    else
    {
        path = httprequestcontext.url;
    }

    //keepalive判断处理
    std::map<std::string, std::string>::const_iterator iter = httprequestcontext.header.find("Connection");
    if(iter != httprequestcontext.header.end())
    {
        keepalive_ = (iter->second == "Keep-Alive");
    }
    else
    {
        if(httprequestcontext.version == "HTTP/1.1")
        {
            keepalive_ = true;//HTTP/1.1默认长连接
        }
        else
        {
            keepalive_ = false;//HTTP/1.0默认短连接
        }
    }


    if("/" == path)
    {
        path = "/index.html";
    }
    else if("/hello" == path)
    {
        //Wenbbench 测试用
        std::string filetype("text/html");
        responsebody = ("hello world");
        responsecontext += httprequestcontext.version + " 200 OK\r\n";
        responsecontext += "Server: GuoJ's NetServer/0.1\r\n";
        responsecontext += "Content-Type: " + filetype + "; charset=utf-8\r\n";
        if(iter != httprequestcontext.header.end())
        {
            responsecontext += "Connection: " + iter->second + "\r\n";
        }
        responsecontext += "Content-Length: " + std::to_string(responsebody.size()) + "\r\n";
        responsecontext += "\r\n";
        responsecontext += responsebody;
        return;
    }
    else
    {
        ;
    }

    //std::string responsebody;
    path.insert(0,".");
    FILE* fp = NULL;
    if((fp = fopen(path.c_str(), "rb")) == NULL)
    {
        //perror("error fopen");
        //404 NOT FOUND
        HttpError(404, "Not Found", httprequestcontext, responsecontext);
        return;
    }
    else
    {
        char buffer[4096];
        memset(buffer, 0, sizeof(buffer));
        while(fread(buffer, sizeof(buffer), 1, fp) == 1)//可以mmap内存映射优化
        {
            responsebody.append(buffer);
            memset(buffer, 0, sizeof(buffer));
        }
        if(feof(fp))
        {
            responsebody.append(buffer);
        }
        else
        {
            std::cout << "error fread" << std::endl;
        }
        fclose(fp);
    }

    std::string filetype("text/html"); //暂时固定为html
    responsecontext += httprequestcontext.version + " 200 OK\r\n";
    responsecontext += "Server: GuoJ's NetServer/0.1\r\n";
    responsecontext += "Content-Type: " + filetype + "; charset=utf-8\r\n";
    if(iter != httprequestcontext.header.end())
    {
        responsecontext += "Connection: " + iter->second + "\r\n";
    }
    responsecontext += "Content-Length: " + std::to_string(responsebody.size()) + "\r\n";
    responsecontext += "\r\n";
    responsecontext += responsebody;
}

// Assembly:
subq $0x1468, %rsp           # imm = 0x1468
movq %rdi, 0x1460(%rsp)
movq %rsi, 0x1458(%rsp)
movq %rdx, 0x1450(%rsp)
movq 0x1460(%rsp), %rax
movq %rax, 0x70(%rsp)
leaq 0x1430(%rsp), %rdi
callq 0x54f0
leaq 0x1410(%rsp), %rdi
callq 0x54f0
leaq 0x13f0(%rsp), %rdi
callq 0x54f0
leaq 0x13d0(%rsp), %rdi
callq 0x54f0
movq 0x1458(%rsp), %rsi
leaq 0x134f1(%rip), %rdi     # 0x28a90
callq 0x16b50
movb %al, 0x7f(%rsp)
jmp 0x155aa
movb 0x7f(%rsp), %al
testb $0x1, %al
jne 0x155b4
jmp 0x155d2
jmp 0x15709
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x13c8(%rsp)
movl %eax, 0x13c4(%rsp)
jmp 0x16440
movq 0x1458(%rsp), %rsi
leaq 0x134b3(%rip), %rdi     # 0x28a94
callq 0x16b50
movb %al, 0x6f(%rsp)
jmp 0x155ec
movb 0x6f(%rsp), %al
testb $0x1, %al
jne 0x155f6
jmp 0x155fb
jmp 0x15707
movq 0x259ae(%rip), %rdi     # 0x3afb0
leaq 0x13490(%rip), %rsi     # 0x28a99
callq 0x53a0
movq %rax, 0x60(%rsp)
jmp 0x15615
movq 0x60(%rsp), %rdi
movq 0x2595f(%rip), %rsi     # 0x3af80
callq 0x53f0
jmp 0x15628
leaq 0x13481(%rip), %rsi     # 0x28ab0
leaq 0x1410(%rsp), %rdi
callq 0x54c0
jmp 0x1563e
leaq 0x139f(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0x5670
movq 0x58(%rsp), %rdx
leaq 0x13454(%rip), %rsi     # 0x28ab0
leaq 0x13a0(%rsp), %rdi
callq 0x54d0
jmp 0x1566b
movq 0x70(%rsp), %rdi
movq 0x1458(%rsp), %rcx
movq 0x1450(%rsp), %r8
movl $0x1f5, %esi            # imm = 0x1F5
leaq 0x13a0(%rsp), %rdx
callq 0x16490
jmp 0x15694
leaq 0x13a0(%rsp), %rdi
callq 0x5270
leaq 0x139f(%rsp), %rdi
callq 0x5400
movl $0x1, 0x1398(%rsp)
jmp 0x16390
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x13c8(%rsp)
movl %eax, 0x13c4(%rsp)
jmp 0x156f5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x13c8(%rsp)
movl %eax, 0x13c4(%rsp)
leaq 0x13a0(%rsp), %rdi
callq 0x5270
leaq 0x139f(%rsp), %rdi
callq 0x5400
jmp 0x16440
jmp 0x15709
movq 0x1458(%rsp), %rdi
addq $0x20, %rdi
leaq 0x133ab(%rip), %rsi     # 0x28ac7
xorl %eax, %eax
movl %eax, %edx
callq 0x56f0
movq %rax, 0x1390(%rsp)
cmpq $-0x1, 0x1390(%rsp)
je 0x157d8
movq 0x1458(%rsp), %rsi
addq $0x20, %rsi
movq 0x1390(%rsp), %rcx
xorl %eax, %eax
movl %eax, %edx
leaq 0x1370(%rsp), %rdi
callq 0x53d0
jmp 0x15763
leaq 0x13f0(%rsp), %rdi
leaq 0x1370(%rsp), %rsi
movq %rsi, 0x50(%rsp)
callq 0x5470
movq 0x50(%rsp), %rdi
callq 0x5270
movq 0x1458(%rsp), %rsi
addq $0x20, %rsi
movq 0x1390(%rsp), %rdx
incq %rdx
leaq 0x1350(%rsp), %rdi
movq $-0x1, %rcx
callq 0x53d0
jmp 0x157b4
leaq 0x13d0(%rsp), %rdi
leaq 0x1350(%rsp), %rsi
callq 0x5470
leaq 0x1350(%rsp), %rdi
callq 0x5270
jmp 0x157f5
movq 0x1458(%rsp), %rsi
addq $0x20, %rsi
leaq 0x13f0(%rsp), %rdi
callq 0x5050
jmp 0x157f3
jmp 0x157f5
movq 0x1458(%rsp), %rax
addq $0x60, %rax
movq %rax, 0x40(%rsp)
leaq 0x1327(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x5670
movq 0x48(%rsp), %rdx
leaq 0x132a5(%rip), %rsi     # 0x28ac9
leaq 0x1328(%rsp), %rdi
callq 0x54d0
jmp 0x15833
movq 0x40(%rsp), %rdi
leaq 0x1328(%rsp), %rsi
callq 0x16b80
movq %rax, 0x38(%rsp)
jmp 0x1584c
movq 0x38(%rsp), %rax
movq %rax, 0x1348(%rsp)
leaq 0x1328(%rsp), %rdi
callq 0x5270
leaq 0x1327(%rsp), %rdi
callq 0x5400
movq 0x1458(%rsp), %rdi
addq $0x60, %rdi
callq 0x16bd0
movq %rax, 0x1318(%rsp)
leaq 0x1348(%rsp), %rdi
leaq 0x1318(%rsp), %rsi
callq 0x16bb0
testb $0x1, %al
jne 0x158aa
jmp 0x15930
leaq 0x1348(%rsp), %rdi
callq 0x16c30
movq %rax, %rdi
addq $0x20, %rdi
leaq 0x1320f(%rip), %rsi     # 0x28ad4
callq 0x16c00
movb %al, 0x37(%rsp)
jmp 0x158d0
movq 0x70(%rsp), %rax
movb 0x37(%rsp), %cl
andb $0x1, %cl
movb %cl, 0x158(%rax)
jmp 0x15974
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x13c8(%rsp)
movl %eax, 0x13c4(%rsp)
jmp 0x1591e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x13c8(%rsp)
movl %eax, 0x13c4(%rsp)
leaq 0x1328(%rsp), %rdi
callq 0x5270
leaq 0x1327(%rsp), %rdi
callq 0x5400
jmp 0x16440
movq 0x1458(%rsp), %rdi
addq $0x40, %rdi
leaq 0x1319c(%rip), %rsi     # 0x28adf
callq 0x16c00
movb %al, 0x36(%rsp)
jmp 0x1594e
movb 0x36(%rsp), %al
testb $0x1, %al
jne 0x15958
jmp 0x15966
movq 0x70(%rsp), %rax
movb $0x1, 0x158(%rax)
jmp 0x15972
movq 0x70(%rsp), %rax
movb $0x0, 0x158(%rax)
jmp 0x15974
leaq 0x1316d(%rip), %rdi     # 0x28ae8
leaq 0x13f0(%rsp), %rsi
callq 0x16b50
movb %al, 0x35(%rsp)
jmp 0x1598e
movb 0x35(%rsp), %al
testb $0x1, %al
jne 0x15998
jmp 0x159b3
leaq 0x1314b(%rip), %rsi     # 0x28aea
leaq 0x13f0(%rsp), %rdi
callq 0x54c0
jmp 0x159ae
jmp 0x15dff
leaq 0x1313c(%rip), %rdi     # 0x28af6
leaq 0x13f0(%rsp), %rsi
callq 0x16b50
movb %al, 0x34(%rsp)
jmp 0x159cd
movb 0x34(%rsp), %al
testb $0x1, %al
jne 0x159da
jmp 0x15dfb
leaq 0x12f7(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x5670
movq 0x28(%rsp), %rdx
leaq 0x13105(%rip), %rsi     # 0x28afd
leaq 0x12f8(%rsp), %rdi
callq 0x54d0
jmp 0x15a07
leaq 0x12f7(%rsp), %rdi
callq 0x5400
leaq 0x130ec(%rip), %rsi     # 0x28b07
leaq 0x1430(%rsp), %rdi
callq 0x54c0
jmp 0x15a2a
movq 0x1458(%rsp), %rsi
addq $0x40, %rsi
leaq 0x130d6(%rip), %rdx     # 0x28b13
leaq 0x12d0(%rsp), %rdi
callq 0x16c50
jmp 0x15a4c
movq 0x1450(%rsp), %rdi
leaq 0x12d0(%rsp), %rsi
callq 0x54a0
jmp 0x15a63
leaq 0x12d0(%rsp), %rdi
callq 0x5270
movq 0x1450(%rsp), %rdi
leaq 0x1309e(%rip), %rsi     # 0x28b1d
callq 0x5380
jmp 0x15a86
leaq 0x130af(%rip), %rsi     # 0x28b3c
leaq 0x1290(%rsp), %rdi
leaq 0x12f8(%rsp), %rdx
callq 0x16d30
jmp 0x15aa4
leaq 0x130a0(%rip), %rdx     # 0x28b4b
leaq 0x12b0(%rsp), %rdi
leaq 0x1290(%rsp), %rsi
callq 0x16ce0
jmp 0x15ac2
movq 0x1450(%rsp), %rdi
leaq 0x12b0(%rsp), %rsi
callq 0x54a0
jmp 0x15ad9
leaq 0x12b0(%rsp), %rdi
callq 0x5270
leaq 0x1290(%rsp), %rdi
callq 0x5270
movq 0x1458(%rsp), %rdi
addq $0x60, %rdi
callq 0x16bd0
movq %rax, 0x1288(%rsp)
leaq 0x1348(%rsp), %rdi
leaq 0x1288(%rsp), %rsi
callq 0x16bb0
testb $0x1, %al
jne 0x15b2a
jmp 0x15c9f
leaq 0x1348(%rsp), %rdi
callq 0x16c30
movq %rax, %rdx
addq $0x20, %rdx
leaq 0x13018(%rip), %rsi     # 0x28b5d
leaq 0x1248(%rsp), %rdi
callq 0x16d30
jmp 0x15b54
leaq 0x12ebe(%rip), %rdx     # 0x28a19
leaq 0x1268(%rsp), %rdi
leaq 0x1248(%rsp), %rsi
callq 0x16ce0
jmp 0x15b72
movq 0x1450(%rsp), %rdi
leaq 0x1268(%rsp), %rsi
callq 0x54a0
jmp 0x15b89
leaq 0x1268(%rsp), %rdi
callq 0x5270
leaq 0x1248(%rsp), %rdi
callq 0x5270
jmp 0x15c9f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x13c8(%rsp)
movl %eax, 0x13c4(%rsp)
leaq 0x12f7(%rsp), %rdi
callq 0x5400
jmp 0x16440
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x13c8(%rsp)
movl %eax, 0x13c4(%rsp)
jmp 0x15de9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x13c8(%rsp)
movl %eax, 0x13c4(%rsp)
leaq 0x12d0(%rsp), %rdi
callq 0x5270
jmp 0x15de9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x13c8(%rsp)
movl %eax, 0x13c4(%rsp)
jmp 0x15c44
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x13c8(%rsp)
movl %eax, 0x13c4(%rsp)
leaq 0x12b0(%rsp), %rdi
callq 0x5270
leaq 0x1290(%rsp), %rdi
callq 0x5270
jmp 0x15de9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x13c8(%rsp)
movl %eax, 0x13c4(%rsp)
jmp 0x15c8d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x13c8(%rsp)
movl %eax, 0x13c4(%rsp)
leaq 0x1268(%rsp), %rdi
callq 0x5270
leaq 0x1248(%rsp), %rdi
callq 0x5270
jmp 0x15de9
leaq 0x1430(%rsp), %rdi
callq 0x52b0
movq %rax, %rsi
leaq 0x11e8(%rsp), %rdi
callq 0x16eb0
jmp 0x15cbe
leaq 0x12ea5(%rip), %rsi     # 0x28b6a
leaq 0x1208(%rsp), %rdi
leaq 0x11e8(%rsp), %rdx
callq 0x16e60
jmp 0x15cdc
leaq 0x12d36(%rip), %rdx     # 0x28a19
leaq 0x1228(%rsp), %rdi
leaq 0x1208(%rsp), %rsi
callq 0x16ce0
jmp 0x15cfa
movq 0x1450(%rsp), %rdi
leaq 0x1228(%rsp), %rsi
callq 0x54a0
jmp 0x15d11
leaq 0x1228(%rsp), %rdi
callq 0x5270
leaq 0x1208(%rsp), %rdi
callq 0x5270
leaq 0x11e8(%rsp), %rdi
callq 0x5270
movq 0x1450(%rsp), %rdi
leaq 0x12cd2(%rip), %rsi     # 0x28a19
callq 0x5380
jmp 0x15d4e
movq 0x1450(%rsp), %rdi
leaq 0x1430(%rsp), %rsi
callq 0x54a0
jmp 0x15d65
movl $0x1, 0x1398(%rsp)
leaq 0x12f8(%rsp), %rdi
callq 0x5270
jmp 0x16390
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x13c8(%rsp)
movl %eax, 0x13c4(%rsp)
jmp 0x15ddc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x13c8(%rsp)
movl %eax, 0x13c4(%rsp)
jmp 0x15dcf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x13c8(%rsp)
movl %eax, 0x13c4(%rsp)
leaq 0x1228(%rsp), %rdi
callq 0x5270
leaq 0x1208(%rsp), %rdi
callq 0x5270
leaq 0x11e8(%rsp), %rdi
callq 0x5270
leaq 0x12f8(%rsp), %rdi
callq 0x5270
jmp 0x16440
jmp 0x15dfd
jmp 0x15dff
leaq 0x1321a(%rip), %rdx     # 0x29020
xorl %eax, %eax
movl %eax, %esi
leaq 0x13f0(%rsp), %rdi
callq 0x50e0
jmp 0x15e19
movq $0x0, 0x11e0(%rsp)
leaq 0x13f0(%rsp), %rdi
callq 0x5190
movq %rax, %rdi
leaq 0x12d3f(%rip), %rsi     # 0x28b7b
callq 0x5440
movq %rax, 0x20(%rsp)
jmp 0x15e48
movq 0x20(%rsp), %rax
movq %rax, 0x11e0(%rsp)
cmpq $0x0, %rax
jne 0x15f28
leaq 0x11bf(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x5670
movq 0x18(%rsp), %rdx
leaq 0x12d01(%rip), %rsi     # 0x28b7e
leaq 0x11c0(%rsp), %rdi
callq 0x54d0
jmp 0x15e8c
movq 0x70(%rsp), %rdi
movq 0x1458(%rsp), %rcx
movq 0x1450(%rsp), %r8
movl $0x194, %esi            # imm = 0x194
leaq 0x11c0(%rsp), %rdx
callq 0x16490
jmp 0x15eb5
leaq 0x11c0(%rsp), %rdi
callq 0x5270
leaq 0x11bf(%rsp), %rdi
callq 0x5400
movl $0x1, 0x1398(%rsp)
jmp 0x16390
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x13c8(%rsp)
movl %eax, 0x13c4(%rsp)
jmp 0x15f16
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x13c8(%rsp)
movl %eax, 0x13c4(%rsp)
leaq 0x11c0(%rsp), %rdi
callq 0x5270
leaq 0x11bf(%rsp), %rdi
callq 0x5400
jmp 0x16440
leaq 0x1b0(%rsp), %rdi
xorl %esi, %esi
movl $0x1000, %edx           # imm = 0x1000
callq 0x5220
movq 0x11e0(%rsp), %rcx
leaq 0x1b0(%rsp), %rdi
movl $0x1000, %esi           # imm = 0x1000
movl $0x1, %edx
callq 0x5550
movq %rax, 0x10(%rsp)
jmp 0x15f62
movq 0x10(%rsp), %rax
cmpq $0x1, %rax
jne 0x15f9a
leaq 0x1430(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
callq 0x56c0
jmp 0x15f84
leaq 0x1b0(%rsp), %rdi
xorl %esi, %esi
movl $0x1000, %edx           # imm = 0x1000
callq 0x5220
jmp 0x15f3c
movq 0x11e0(%rsp), %rdi
callq 0x5570
cmpl $0x0, %eax
je 0x15fc5
leaq 0x1430(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
callq 0x56c0
jmp 0x15fc3
jmp 0x15ff4
movq 0x24fe4(%rip), %rdi     # 0x3afb0
leaq 0x12bb5(%rip), %rsi     # 0x28b88
callq 0x53a0
movq %rax, 0x8(%rsp)
jmp 0x15fdf
movq 0x8(%rsp), %rdi
movq 0x24f95(%rip), %rsi     # 0x3af80
callq 0x53f0
jmp 0x15ff2
jmp 0x15ff4
movq 0x11e0(%rsp), %rdi
callq 0x53b0
jmp 0x16003
jmp 0x16005
leaq 0x18f(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x5670
movq (%rsp), %rdx
leaq 0x12adc(%rip), %rsi     # 0x28afd
leaq 0x190(%rsp), %rdi
callq 0x54d0
jmp 0x16030
leaq 0x18f(%rsp), %rdi
callq 0x5400
movq 0x1458(%rsp), %rsi
addq $0x40, %rsi
leaq 0x12ac3(%rip), %rdx     # 0x28b13
leaq 0x168(%rsp), %rdi
callq 0x16c50
jmp 0x1605f
movq 0x1450(%rsp), %rdi
leaq 0x168(%rsp), %rsi
callq 0x54a0
jmp 0x16076
leaq 0x168(%rsp), %rdi
callq 0x5270
movq 0x1450(%rsp), %rdi
leaq 0x12a8b(%rip), %rsi     # 0x28b1d
callq 0x5380
jmp 0x16099
leaq 0x12a9c(%rip), %rsi     # 0x28b3c
leaq 0x128(%rsp), %rdi
leaq 0x190(%rsp), %rdx
callq 0x16d30
jmp 0x160b7
leaq 0x12a8d(%rip), %rdx     # 0x28b4b
leaq 0x148(%rsp), %rdi
leaq 0x128(%rsp), %rsi
callq 0x16ce0
jmp 0x160d5
movq 0x1450(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x54a0
jmp 0x160ec
leaq 0x148(%rsp), %rdi
callq 0x5270
leaq 0x128(%rsp), %rdi
callq 0x5270
movq 0x1458(%rsp), %rdi
addq $0x60, %rdi
callq 0x16bd0
movq %rax, 0x120(%rsp)
leaq 0x1348(%rsp), %rdi
leaq 0x120(%rsp), %rsi
callq 0x16bb0
testb $0x1, %al
jne 0x1613d
jmp 0x162b2
leaq 0x1348(%rsp), %rdi
callq 0x16c30
movq %rax, %rdx
addq $0x20, %rdx
leaq 0x12a05(%rip), %rsi     # 0x28b5d
leaq 0xe0(%rsp), %rdi
callq 0x16d30
jmp 0x16167
leaq 0x128ab(%rip), %rdx     # 0x28a19
leaq 0x100(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x16ce0
jmp 0x16185
movq 0x1450(%rsp), %rdi
leaq 0x100(%rsp), %rsi
callq 0x54a0
jmp 0x1619c
leaq 0x100(%rsp), %rdi
callq 0x5270
leaq 0xe0(%rsp), %rdi
callq 0x5270
jmp 0x162b2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x13c8(%rsp)
movl %eax, 0x13c4(%rsp)
leaq 0x18f(%rsp), %rdi
callq 0x5400
jmp 0x16440
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x13c8(%rsp)
movl %eax, 0x13c4(%rsp)
jmp 0x16433
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x13c8(%rsp)
movl %eax, 0x13c4(%rsp)
leaq 0x168(%rsp), %rdi
callq 0x5270
jmp 0x16433
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x13c8(%rsp)
movl %eax, 0x13c4(%rsp)
jmp 0x16257
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x13c8(%rsp)
movl %eax, 0x13c4(%rsp)
leaq 0x148(%rsp), %rdi
callq 0x5270
leaq 0x128(%rsp), %rdi
callq 0x5270
jmp 0x16433
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x13c8(%rsp)
movl %eax, 0x13c4(%rsp)
jmp 0x162a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x13c8(%rsp)
movl %eax, 0x13c4(%rsp)
leaq 0x100(%rsp), %rdi
callq 0x5270
leaq 0xe0(%rsp), %rdi
callq 0x5270
jmp 0x16433
leaq 0x1430(%rsp), %rdi
callq 0x52b0
movq %rax, %rsi
leaq 0x80(%rsp), %rdi
callq 0x16eb0
jmp 0x162d1
leaq 0x12892(%rip), %rsi     # 0x28b6a
leaq 0xa0(%rsp), %rdi
leaq 0x80(%rsp), %rdx
callq 0x16e60
jmp 0x162ef
leaq 0x12723(%rip), %rdx     # 0x28a19
leaq 0xc0(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x16ce0
jmp 0x1630d
movq 0x1450(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x54a0
jmp 0x16324
leaq 0xc0(%rsp), %rdi
callq 0x5270
leaq 0xa0(%rsp), %rdi
callq 0x5270
leaq 0x80(%rsp), %rdi
callq 0x5270
movq 0x1450(%rsp), %rdi
leaq 0x126bf(%rip), %rsi     # 0x28a19
callq 0x5380
jmp 0x16361
movq 0x1450(%rsp), %rdi
leaq 0x1430(%rsp), %rsi
callq 0x54a0
jmp 0x16378
leaq 0x190(%rsp), %rdi
callq 0x5270
movl $0x0, 0x1398(%rsp)
leaq 0x13d0(%rsp), %rdi
callq 0x5270
leaq 0x13f0(%rsp), %rdi
callq 0x5270
leaq 0x1410(%rsp), %rdi
callq 0x5270
leaq 0x1430(%rsp), %rdi
callq 0x5270
addq $0x1468, %rsp           # imm = 0x1468
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x13c8(%rsp)
movl %eax, 0x13c4(%rsp)
jmp 0x16426
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x13c8(%rsp)
movl %eax, 0x13c4(%rsp)
jmp 0x16419
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x13c8(%rsp)
movl %eax, 0x13c4(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x5270
leaq 0xa0(%rsp), %rdi
callq 0x5270
leaq 0x80(%rsp), %rdi
callq 0x5270
leaq 0x190(%rsp), %rdi
callq 0x5270
leaq 0x13d0(%rsp), %rdi
callq 0x5270
leaq 0x13f0(%rsp), %rdi
callq 0x5270
leaq 0x1410(%rsp), %rdi
callq 0x5270
leaq 0x1430(%rsp), %rdi
callq 0x5270
movq 0x13c8(%rsp), %rdi
callq 0x5660
nopw %cs:(%rax,%rax)