// File: 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
movq %rsp, %rbp
subq $0x1d710, %rsp          # imm = 0x1D710
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x1d6c8(%rbp)
callq 0x3720
movq -0x1d6c8(%rbp), %rdx
leaq 0xa8ed(%rip), %rsi      # 0xe454
leaq -0x30(%rbp), %rdi
callq 0x3ea0
jmp 0x3b72
leaq -0x31(%rbp), %rdi
callq 0x34a0
leaq -0x69(%rbp), %rdi
movq %rdi, -0x1d6d0(%rbp)
callq 0x3720
movq -0x1d6d0(%rbp), %rdx
leaq 0xa8bb(%rip), %rsi      # 0xe454
leaq -0x68(%rbp), %rdi
callq 0x3ea0
jmp 0x3ba4
leaq -0x69(%rbp), %rdi
callq 0x34a0
leaq -0x91(%rbp), %rdi
movq %rdi, -0x1d6d8(%rbp)
callq 0x3720
movq -0x1d6d8(%rbp), %rdx
leaq 0xa436(%rip), %rsi      # 0xe004
leaq -0x90(%rbp), %rdi
callq 0x3ea0
jmp 0x3bdc
leaq -0x91(%rbp), %rdi
callq 0x34a0
leaq -0xbc(%rbp), %rdi
callq 0xd6b0
jmp 0x3bf6
movl -0x8(%rbp), %esi
movq -0x10(%rbp), %rdx
leaq -0xbc(%rbp), %rdi
callq 0xd710
jmp 0x3c0b
leaq -0x1d660(%rbp), %rdi
callq 0xae80
jmp 0x3c19
movl -0xbc(%rbp), %eax
movl %eax, -0x1d6dc(%rbp)
leaq -0x1d680(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x31a0
jmp 0x3c37
leaq -0x1d6a0(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x31a0
jmp 0x3c49
leaq -0x1d6c0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x31a0
jmp 0x3c5e
movl -0x1d6dc(%rbp), %esi
movl -0xa8(%rbp), %ecx
movl -0xb8(%rbp), %r9d
movl -0xb4(%rbp), %edx
movl -0xa4(%rbp), %edi
movl -0xa0(%rbp), %r8d
movl -0x9c(%rbp), %r10d
movl -0x98(%rbp), %r11d
movq %rsp, %rax
movl %r11d, 0x28(%rax)
movl %r10d, 0x20(%rax)
movl %r8d, 0x18(%rax)
movl %edi, 0x10(%rax)
movl %edx, 0x8(%rax)
movl %ecx, (%rax)
leaq -0x1d660(%rbp), %rdi
leaq -0x1d680(%rbp), %rdx
leaq -0x1d6a0(%rbp), %rcx
leaq -0x1d6c0(%rbp), %r8
callq 0xb270
jmp 0x3ccc
leaq -0x1d6c0(%rbp), %rdi
callq 0x32c0
leaq -0x1d6a0(%rbp), %rdi
callq 0x32c0
leaq -0x1d680(%rbp), %rdi
callq 0x32c0
leaq -0x1d660(%rbp), %rdi
callq 0xb3f0
jmp 0x3cfe
leaq -0x1d660(%rbp), %rdi
callq 0xb480
jmp 0x3d0c
leaq -0x1d660(%rbp), %rdi
callq 0xb630
jmp 0x3d1a
leaq -0x1d660(%rbp), %rdi
callq 0xb330
jmp 0x3d28
leaq -0x1d660(%rbp), %rdi
callq 0xb6b0
jmp 0x3d36
leaq -0x1d660(%rbp), %rdi
callq 0xc4d0
jmp 0x3d44
movl $0x0, -0x4(%rbp)
leaq -0x1d660(%rbp), %rdi
callq 0xb110
leaq -0xbc(%rbp), %rdi
callq 0x3f50
leaq -0x90(%rbp), %rdi
callq 0x32c0
leaq -0x68(%rbp), %rdi
callq 0x32c0
leaq -0x30(%rbp), %rdi
callq 0x32c0
movl -0x4(%rbp), %eax
addq $0x1d710, %rsp          # imm = 0x1D710
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x31(%rbp), %rdi
callq 0x34a0
jmp 0x3e8d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x69(%rbp), %rdi
callq 0x34a0
jmp 0x3e84
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x91(%rbp), %rdi
callq 0x34a0
jmp 0x3e7b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x3e6f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x3e63
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x3e57
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x3e4b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x3e3f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x1d6c0(%rbp), %rdi
callq 0x32c0
leaq -0x1d6a0(%rbp), %rdi
callq 0x32c0
leaq -0x1d680(%rbp), %rdi
callq 0x32c0
leaq -0x1d660(%rbp), %rdi
callq 0xb110
leaq -0xbc(%rbp), %rdi
callq 0x3f50
leaq -0x90(%rbp), %rdi
callq 0x32c0
leaq -0x68(%rbp), %rdi
callq 0x32c0
leaq -0x30(%rbp), %rdi
callq 0x32c0
movq -0x40(%rbp), %rdi
callq 0x3710
nopw %cs:(%rax,%rax)