// File: trisolaris233[P]httpc/src/server.hpp
// Function: httpc::Server::Server(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)
Server(
            const std::string& address,
            const std::string& port,
            const std::string& document_root,
            std::size_t num_thread = GetCPUCoreNumber()
        )
        : io_context_(1)
        , acceptor_(io_context_)
        //, manager_(io_context_)
        , document_root_(document_root)
        , num_of_thread_(num_thread)
        , http_router_(*this) {
            boost::asio::ip::tcp::resolver resolver(io_context_);
            boost::asio::ip::tcp::endpoint endpoint = 
                *(resolver.resolve(address, port)).begin();
            this->acceptor_.open(endpoint.protocol());
            this->acceptor_.set_option(boost::asio::ip::tcp::acceptor::reuse_address(true));
            this->acceptor_.bind(endpoint);
            this->acceptor_.listen();

            // Accept();
            //f();

            //this->AssignMultithreadAccept_();
            //this->Accept_();
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x108(%rbp)
movq %rdi, %rax
movq %rax, -0x110(%rbp)
movl $0x1, %esi
callq 0x152a0
movq -0x108(%rbp), %rsi
movq %rsi, %rdi
addq $0x10, %rdi
movq %rdi, -0x100(%rbp)
xorl %eax, %eax
movl %eax, %edx
callq 0x15360
jmp 0xface
movq -0x110(%rbp), %rdi
addq $0x60, %rdi
movq %rdi, -0x118(%rbp)
movq -0x20(%rbp), %rsi
callq 0xa2c0
jmp 0xfaeb
movq -0x110(%rbp), %rsi
movq %rsi, %rdi
subq $-0x80, %rdi
movq %rdi, -0x120(%rbp)
callq 0x153b0
movq -0x110(%rbp), %rsi
movq -0x28(%rbp), %rax
movq %rax, 0x118(%rsi)
xorl %eax, %eax
movl %eax, %edx
leaq -0x80(%rbp), %rdi
callq 0x15400
jmp 0xfb26
movq -0x10(%rbp), %rdi
callq 0xa750
movq %rax, -0xe0(%rbp)
movq %rdx, -0xd8(%rbp)
movq -0x18(%rbp), %rdi
callq 0xa750
movq %rax, -0xf0(%rbp)
movq %rdx, -0xe8(%rbp)
movq -0xe0(%rbp), %rdx
movq -0xd8(%rbp), %rcx
movq -0xf0(%rbp), %r8
movq -0xe8(%rbp), %r9
leaq -0xd0(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x15450
jmp 0xfb82
leaq -0xb8(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x154d0
jmp 0xfb97
leaq -0xb8(%rbp), %rdi
callq 0x15550
movq %rax, -0x128(%rbp)
jmp 0xfbac
movq -0x128(%rbp), %rsi
leaq -0x9c(%rbp), %rdi
callq 0x15570
jmp 0xfbc1
leaq -0xb8(%rbp), %rdi
callq 0x155a0
leaq -0xd0(%rbp), %rdi
callq 0x155c0
movq -0x110(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x130(%rbp)
leaq -0x9c(%rbp), %rdi
callq 0x15650
movq -0x130(%rbp), %rdi
movl %eax, -0xf4(%rbp)
leaq -0xf4(%rbp), %rsi
callq 0x155e0
jmp 0xfc12
movq -0x110(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x138(%rbp)
leaq -0xf8(%rbp), %rdi
movl $0x1, %esi
callq 0x15700
jmp 0xfc37
movq -0x138(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x15690
jmp 0xfc4c
movq -0x110(%rbp), %rdi
addq $0x10, %rdi
leaq -0x9c(%rbp), %rsi
callq 0x15730
jmp 0xfc65
movq -0x110(%rbp), %rdi
addq $0x10, %rdi
movl $0x1000, %esi           # imm = 0x1000
callq 0x157a0
jmp 0xfc7c
leaq -0x80(%rbp), %rdi
callq 0x15810
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xfd28
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xfd1c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xfd04
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xfcfb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xfcef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x155a0
leaq -0xd0(%rbp), %rdi
callq 0x155c0
leaq -0x80(%rbp), %rdi
callq 0x15810
movq -0x120(%rbp), %rdi
callq 0x15840
movq -0x118(%rbp), %rdi
callq 0xa450
movq -0x100(%rbp), %rdi
callq 0x15880
movq -0x108(%rbp), %rdi
callq 0x158b0
movq -0x30(%rbp), %rdi
callq 0xab10
nopl (%rax)