// File: /workspace/github_cpp_makefile_star2_O1/lszp[P]SmallWebServer/main.cpp
// Function: main
int main(int argc, char *argv[])
{
    //需要修改的数据库信息,登录名,密码,库名
    string user = "root";
    string passwd = "jxlg2014";
    string databasename = "TinyWebServer";

    //命令行解析
    Config config;
    config.parse_arg(argc, argv);

    WebServer server;

    //初始化
    server.init(config.PORT, user, passwd, databasename, config.LOGWrite, config.SQLVerify,
                config.OPT_LINGER, config.TRIGMode,  config.sql_num,  config.thread_num, 
                config.close_log, config.actor_model);
    
    //日志
    server.log_write();

    //数据库
    server.sql_pool();

    //线程池
    server.thread_pool();

    //监听
    server.eventListen();

    //运行
    server.eventLoop();

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1d698, %rsp          # imm = 0x1D698
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x58(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x6a72(%rip), %rsi      # 0xa4f4
leaq 0x6a6f(%rip), %rdx      # 0xa4f8
leaq 0x48(%rsp), %rdi
callq 0x3e80
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x6561(%rip), %rsi      # 0xa004
leaq 0x6562(%rip), %rdx      # 0xa00c
leaq 0x28(%rsp), %rdi
callq 0x3e80
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x6549(%rip), %rsi      # 0xa00d
leaq 0x654f(%rip), %rdx      # 0xa01a
leaq 0x8(%rsp), %rdi
callq 0x3e80
leaq 0x6c(%rsp), %rdi
callq 0x8ff8
leaq 0x6c(%rsp), %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x9012
leaq 0xf0(%rsp), %rdi
callq 0x7aac
movl 0x6c(%rsp), %ebx
leaq 0xc0(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
addq %rsi, %rdx
leaq 0xb0(%rsp), %rdi
callq 0x3df0
leaq 0xa0(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
leaq 0x90(%rsp), %rdi
callq 0x3df0
leaq 0xe0(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
leaq 0xd0(%rsp), %rdi
callq 0x3df0
movl 0x70(%rsp), %eax
movl 0x74(%rsp), %r9d
movl 0x7c(%rsp), %r10d
movl 0x78(%rsp), %r11d
movl 0x80(%rsp), %r15d
movl 0x84(%rsp), %r12d
movl 0x88(%rsp), %r13d
movl 0x8c(%rsp), %ebp
subq $0x8, %rsp
leaq 0xf8(%rsp), %rdi
leaq 0xb8(%rsp), %rdx
leaq 0x98(%rsp), %rcx
leaq 0xd8(%rsp), %r8
movl %ebx, %esi
pushq %rbp
pushq %r13
pushq %r12
pushq %r15
pushq %r11
pushq %r10
pushq %rax
callq 0x7d7c
addq $0x40, %rsp
movq 0xd0(%rsp), %rdi
cmpq %r14, %rdi
leaq 0xa0(%rsp), %rbx
je 0x3c03
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x3430
movq 0x90(%rsp), %rdi
cmpq %rbx, %rdi
leaq 0xc0(%rsp), %rbx
je 0x3c28
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x3430
movq 0xb0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x3c45
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x3430
leaq 0xf0(%rsp), %rdi
callq 0x7e10
leaq 0xf0(%rsp), %rdi
callq 0x7e58
leaq 0xf0(%rsp), %rdi
callq 0x803a
leaq 0xf0(%rsp), %rdi
callq 0x8092
leaq 0xf0(%rsp), %rdi
callq 0x8a46
leaq 0xf0(%rsp), %rdi
callq 0x7c54
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x3caf
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3430
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x3ccb
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3430
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x3ce7
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3430
xorl %eax, %eax
addq $0x1d698, %rsp          # imm = 0x1D698
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0xd0(%rsp), %rdi
cmpq %r14, %rdi
je 0x3d20
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x3430
jmp 0x3d20
movq %rax, %rbx
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x3d4a
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x3430
jmp 0x3d4a
movq %rax, %rbx
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
je 0x3d87
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x3430
jmp 0x3d87
jmp 0x3d75
jmp 0x3d75
movq %rax, %rbx
jmp 0x3d94
movq %rax, %rbx
jmp 0x3db0
movq %rax, %rbx
jmp 0x3dcc
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x7c54
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x3db0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3430
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x3dcc
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3430
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x3de8
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3430
movq %rbx, %rdi
callq 0x36e0