// File: 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
movq %rsp, %rbp
pushq %rbx
subq $0x1d718, %rsp          # imm = 0x1D718
movl $0x0, -0xc(%rbp)
movl %edi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
leaq -0x39(%rbp), %rdi
movq %rdi, -0x1d6d0(%rbp)
callq 0x47e0
movq -0x1d6d0(%rbp), %rdx
leaq 0xb898(%rip), %rsi      # 0x104c0
leaq -0x38(%rbp), %rdi
callq 0x4f60
jmp 0x4c33
leaq -0x39(%rbp), %rdi
callq 0x4500
leaq -0x71(%rbp), %rdi
movq %rdi, -0x1d6d8(%rbp)
callq 0x47e0
movq -0x1d6d8(%rbp), %rdx
leaq 0xb866(%rip), %rsi      # 0x104c0
leaq -0x70(%rbp), %rdi
callq 0x4f60
jmp 0x4c65
leaq -0x71(%rbp), %rdi
callq 0x4500
leaq -0x99(%rbp), %rdi
movq %rdi, -0x1d6e0(%rbp)
callq 0x47e0
movq -0x1d6e0(%rbp), %rdx
leaq 0xb375(%rip), %rsi      # 0x10004
leaq -0x98(%rbp), %rdi
callq 0x4f60
jmp 0x4c9d
leaq -0x99(%rbp), %rdi
callq 0x4500
leaq -0xc0(%rbp), %rdi
callq 0xf400
jmp 0x4cb7
movl -0x10(%rbp), %esi
movq -0x18(%rbp), %rdx
leaq -0xc0(%rbp), %rdi
callq 0xf450
jmp 0x4ccc
leaq -0x1d668(%rbp), %rdi
callq 0xcbc0
jmp 0x4cda
movl -0xc0(%rbp), %eax
movl %eax, -0x1d6e4(%rbp)
leaq -0x1d688(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x41b0
jmp 0x4cf8
leaq -0x1d6a8(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x41b0
jmp 0x4d0a
leaq -0x1d6c8(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x41b0
jmp 0x4d1f
movl -0x1d6e4(%rbp), %esi
movl -0xbc(%rbp), %ecx
movl -0xb8(%rbp), %r9d
movl -0xb0(%rbp), %edx
movl -0xb4(%rbp), %edi
movl -0xac(%rbp), %r8d
movl -0xa8(%rbp), %r10d
movl -0xa4(%rbp), %r11d
movl -0xa0(%rbp), %ebx
movq %rsp, %rax
movl %ebx, 0x30(%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 -0x1d668(%rbp), %rdi
leaq -0x1d688(%rbp), %rdx
leaq -0x1d6a8(%rbp), %rcx
leaq -0x1d6c8(%rbp), %r8
callq 0xd000
jmp 0x4d96
leaq -0x1d6c8(%rbp), %rdi
callq 0x42d0
leaq -0x1d6a8(%rbp), %rdi
callq 0x42d0
leaq -0x1d688(%rbp), %rdi
callq 0x42d0
leaq -0x1d668(%rbp), %rdi
callq 0xd0d0
jmp 0x4dc8
leaq -0x1d668(%rbp), %rdi
callq 0xd160
jmp 0x4dd6
leaq -0x1d668(%rbp), %rdi
callq 0xd360
jmp 0x4de4
leaq -0x1d668(%rbp), %rdi
callq 0xd3e0
jmp 0x4df2
leaq -0x1d668(%rbp), %rdi
callq 0xe250
jmp 0x4e00
movl $0x0, -0xc(%rbp)
leaq -0x1d668(%rbp), %rdi
callq 0xce90
leaq -0xc0(%rbp), %rdi
callq 0x5010
leaq -0x98(%rbp), %rdi
callq 0x42d0
leaq -0x70(%rbp), %rdi
callq 0x42d0
leaq -0x38(%rbp), %rdi
callq 0x42d0
movl -0xc(%rbp), %eax
addq $0x1d718, %rsp          # imm = 0x1D718
popq %rbx
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x39(%rbp), %rdi
callq 0x4500
jmp 0x4f4a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x71(%rbp), %rdi
callq 0x4500
jmp 0x4f41
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x99(%rbp), %rdi
callq 0x4500
jmp 0x4f38
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x4f2c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x4f20
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x4f14
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x4f08
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x4efc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x1d6c8(%rbp), %rdi
callq 0x42d0
leaq -0x1d6a8(%rbp), %rdi
callq 0x42d0
leaq -0x1d688(%rbp), %rdi
callq 0x42d0
leaq -0x1d668(%rbp), %rdi
callq 0xce90
leaq -0xc0(%rbp), %rdi
callq 0x5010
leaq -0x98(%rbp), %rdi
callq 0x42d0
leaq -0x70(%rbp), %rdi
callq 0x42d0
leaq -0x38(%rbp), %rdi
callq 0x42d0
movq -0x48(%rbp), %rdi
callq 0x47d0
nopw %cs:(%rax,%rax)
nopl (%rax)