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

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

    WebServer server;

    //初始化
    server.init(config.PORT, user, passwd, databasename, config.LOGWrite, 
                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.trig_mode();

    //监听
    server.eventListen();

    //运行
    server.eventLoop();

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1d688, %rsp          # imm = 0x1D688
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x50(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x5afb(%rip), %r14      # 0x947d
leaq 0x5af8(%rip), %r15      # 0x9481
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3d6c
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3d6c
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x5642(%rip), %rsi      # 0x9004
leaq 0x5640(%rip), %rdx      # 0x9009
movq %rsp, %rdi
callq 0x3d6c
leaq 0x80(%rsp), %rdi
callq 0x85e4
leaq 0x80(%rsp), %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x8606
leaq 0xe8(%rsp), %rdi
callq 0x70c4
movl 0x80(%rsp), %ebx
leaq 0xd8(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
addq %rsi, %rdx
leaq 0xc8(%rsp), %rdi
callq 0x3cd6
leaq 0x70(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
leaq 0x60(%rsp), %rdi
callq 0x3cd6
leaq 0xb8(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
leaq 0xa8(%rsp), %rdi
callq 0x3cd6
movl 0x94(%rsp), %eax
movl 0x84(%rsp), %r9d
movl 0x88(%rsp), %r10d
movl 0x98(%rsp), %r11d
movl 0x9c(%rsp), %r13d
movl 0xa0(%rsp), %r14d
movl 0xa4(%rsp), %r15d
leaq 0xe8(%rsp), %rdi
leaq 0xc8(%rsp), %rdx
leaq 0x60(%rsp), %rcx
leaq 0xa8(%rsp), %r8
movl %ebx, %esi
pushq %r15
pushq %r14
pushq %r13
pushq %r11
pushq %r10
pushq %rax
callq 0x7362
addq $0x30, %rsp
movq 0xa8(%rsp), %rdi
cmpq %r12, %rdi
leaq 0x70(%rsp), %rbx
je 0x3afc
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x33a0
movq 0x60(%rsp), %rdi
cmpq %rbx, %rdi
je 0x3b13
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x33a0
movq 0xc8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3b30
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x33a0
leaq 0xe8(%rsp), %rdi
callq 0x741e
leaq 0xe8(%rsp), %rdi
callq 0x7466
leaq 0xe8(%rsp), %rdi
callq 0x762a
leaq 0xe8(%rsp), %rdi
callq 0x73f0
leaq 0xe8(%rsp), %rdi
callq 0x7682
leaq 0xe8(%rsp), %rdi
callq 0x7ff6
leaq 0xe8(%rsp), %rdi
callq 0x7246
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x3ba6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x33a0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3bc2
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x33a0
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x3bde
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x33a0
xorl %eax, %eax
addq $0x1d688, %rsp          # imm = 0x1D688
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
cmpq %r12, %rdi
je 0x3c17
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x33a0
jmp 0x3c17
movq %rax, %rbx
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x3c38
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x33a0
jmp 0x3c38
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3c6d
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x33a0
jmp 0x3c6d
jmp 0x3c5b
jmp 0x3c5b
movq %rax, %rbx
jmp 0x3c7a
movq %rax, %rbx
jmp 0x3c95
movq %rax, %rbx
jmp 0x3cb1
movq %rax, %rbx
leaq 0xe8(%rsp), %rdi
callq 0x7246
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x3c95
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x33a0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3cb1
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x33a0
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x3ccd
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x33a0
movq %rbx, %rdi
callq 0x35e0
nop