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

    //命令行解析
    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 0x6a5b(%rip), %r14      # 0xa4dd
leaq 0x6a58(%rip), %r15      # 0xa4e1
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3e86
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3e86
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x6542(%rip), %rsi      # 0xa004
leaq 0x6541(%rip), %rdx      # 0xa00a
leaq 0x8(%rsp), %rdi
callq 0x3e86
leaq 0x6c(%rsp), %rdi
callq 0x8fd0
leaq 0x6c(%rsp), %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x8fea
leaq 0xf0(%rsp), %rdi
callq 0x7b00
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), %r12
movq %r12, -0x10(%r12)
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), %r13d
movl 0x84(%rsp), %r14d
movl 0x88(%rsp), %r15d
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 %r15
pushq %r14
pushq %r13
pushq %r11
pushq %r10
pushq %rax
callq 0x7dd0
addq $0x40, %rsp
movq 0xd0(%rsp), %rdi
cmpq %r12, %rdi
leaq 0xc0(%rsp), %rbx
leaq 0xa0(%rsp), %r14
je 0x3c0a
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x3430
movq 0x90(%rsp), %rdi
cmpq %r14, %rdi
je 0x3c27
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x3430
movq 0xb0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x3c44
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x3430
leaq 0xf0(%rsp), %rdi
callq 0x7e64
leaq 0xf0(%rsp), %rdi
callq 0x7eac
leaq 0xf0(%rsp), %rdi
callq 0x808e
leaq 0xf0(%rsp), %rdi
callq 0x80e6
leaq 0xf0(%rsp), %rdi
callq 0x8a7e
leaq 0xf0(%rsp), %rdi
callq 0x7ca8
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x3cae
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3430
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x3cca
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3430
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x3ce6
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 %r12, %rdi
je 0x3d1f
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x3430
jmp 0x3d1f
movq %rax, %rbx
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x3d49
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x3430
jmp 0x3d49
movq %rax, %rbx
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
je 0x3d86
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x3430
jmp 0x3d86
jmp 0x3d74
jmp 0x3d74
movq %rax, %rbx
jmp 0x3d93
movq %rax, %rbx
jmp 0x3daf
movq %rax, %rbx
jmp 0x3dcb
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x7ca8
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x3daf
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3430
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x3dcb
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3430
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x3de7
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3430
movq %rbx, %rdi
callq 0x36e0
nop