// File: /workspace/github_cpp_makefile_star2_O1/romkatv[P]hcproxy/src/acceptor.cc
// Function: hcproxy::Acceptor::Acceptor(hcproxy::Acceptor::Options const&)
Acceptor::Acceptor(const Options& opt) {
  addrinfo* addr = Resolve(opt.listen_addr.c_str(), opt.listen_port);
  LOG(INFO) << "Listening on " << IpPort(*addr);
  CHECK((fd_ = socket(addr->ai_family, SOCK_STREAM, 0)) >= 0) << Errno();
  SetSockOpt(fd_, SOL_SOCKET, SO_REUSEADDR);
  CHECK(bind(fd_, addr->ai_addr, addr->ai_addrlen) == 0) << Errno();
  CHECK(listen(fd_, opt.accept_queue_size) == 0) << Errno();
  freeaddrinfo(addr);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %r15
movzwl 0x20(%rsi), %ebp
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movabsq $0x100000002, %rax      # imm = 0x100000002
movq %rax, 0x4(%rsp)
movl $0x1, (%rsp)
movl $0x1, %r12d
cmpl $0xa, %ebp
jb 0x1972e
movl $0x2, %r12d
cmpw $0x64, %bp
jb 0x1972e
movl $0x3, %r12d
cmpl $0x3e8, %ebp            # imm = 0x3E8
jb 0x1972e
cmpl $0x2710, %ebp           # imm = 0x2710
movl $0x5, %r12d
sbbl $0x0, %r12d
movl %r12d, %esi
leaq 0x48(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x38(%rsp), %r13
movq %r13, %rdi
movl $0x2d, %edx
callq 0x9b840
movq (%r13), %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0x19e9f
movq (%r13), %rsi
movq %rsp, %rdx
leaq 0x58(%rsp), %rcx
movq %r15, %rdi
callq 0x151e0
movl %eax, %ebp
testl %eax, %eax
jne 0x1986c
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x19794
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x21280
movq 0x58(%rsp), %r15
movq 0x18(%r15), %rax
cmpw $0x2, (%rax)
jne 0x198d4
leaq 0xb5b92(%rip), %rsi     # 0xcf340
movq %rsp, %r12
movq %r12, %rdi
movl $0x38, %edx
xorl %ecx, %ecx
callq 0x2019c
movq 0x18(%r12), %rdi
leaq 0xb5b84(%rip), %rsi     # 0xcf350
movl $0xd, %edx
callq 0x8bab0
leaq 0x38(%rsp), %rdi
movq %r15, %rsi
callq 0x1bf2e
movq 0x18(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x1bfa9
movq %rsp, %rdi
callq 0x19688
movl 0x4(%r15), %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x155d0
movl %eax, (%r14)
testl %eax, %eax
js 0x19922
movl (%r14), %edi
movl $0x1, %esi
movl $0x2, %edx
callq 0x19a81
movl (%r14), %edi
movq 0x18(%r15), %rsi
movl 0x10(%r15), %edx
callq 0x157f0
testl %eax, %eax
jne 0x1997b
movl (%r14), %edi
movl 0x28(%rbx), %esi
callq 0x153d0
testl %eax, %eax
jne 0x199d1
movq %r15, %rdi
callq 0x15380
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb5acd(%rip), %rsi     # 0xcf340
leaq 0x60(%rsp), %rdi
movl $0x29, %edx
movl $0x3, %ecx
callq 0x2019c
movq 0x78(%rsp), %rdi
leaq 0xb5c13(%rip), %rsi     # 0xcf4a6
movl $0x49, %edx
callq 0x8bab0
movq 0x78(%rsp), %rdi
leaq 0xbaa62(%rip), %rsi     # 0xd430b
movl $0x2, %edx
callq 0x8bab0
movl %ebp, %edi
callq 0x15860
leaq 0x80(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x60(%rsp), %rdi
callq 0x19e52
jmp 0x19a29
leaq 0xb5a65(%rip), %rsi     # 0xcf340
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
movl $0x2b, %edx
movl $0x3, %ecx
callq 0x2019c
movq 0x18(%rbx), %rdi
leaq 0xb5bf3(%rip), %rsi     # 0xcf4f0
movl $0x22, %edx
callq 0x8bab0
movq 0x50(%rsp), %rdi
leaq 0xba9f8(%rip), %rsi     # 0xd430b
movl $0x2, %edx
callq 0x8bab0
jmp 0x19a35
leaq 0xb5a17(%rip), %rsi     # 0xcf340
movq %rsp, %rbx
movq %rbx, %rdi
movl $0x39, %edx
movl $0x3, %ecx
callq 0x2019c
movq 0x18(%rbx), %rdi
leaq 0xb5a15(%rip), %rsi     # 0xcf35e
movl $0x34, %edx
callq 0x8bab0
movq 0x18(%rsp), %rdi
leaq 0xba9ac(%rip), %rsi     # 0xd430b
movl $0x2, %edx
callq 0x8bab0
movl (%rsp), %esi
movq 0x18(%rsp), %rdi
callq 0x2023b
jmp 0x19a43
leaq 0xb59be(%rip), %rsi     # 0xcf340
movq %rsp, %rbx
movq %rbx, %rdi
movl $0x3b, %edx
movl $0x3, %ecx
callq 0x2019c
movq 0x18(%rbx), %rdi
leaq 0xb59f1(%rip), %rsi     # 0xcf393
movl $0x2f, %edx
callq 0x8bab0
movq 0x18(%rsp), %rdi
leaq 0xba953(%rip), %rsi     # 0xd430b
movl $0x2, %edx
callq 0x8bab0
movl (%rsp), %esi
movq 0x18(%rsp), %rdi
callq 0x2023b
jmp 0x19a43
leaq 0xb5968(%rip), %rsi     # 0xcf340
movq %rsp, %rbx
movq %rbx, %rdi
movl $0x3c, %edx
movl $0x3, %ecx
callq 0x2019c
movq 0x18(%rbx), %rdi
leaq 0xb59cb(%rip), %rsi     # 0xcf3c3
movl $0x27, %edx
callq 0x8bab0
movq 0x18(%rsp), %rdi
leaq 0xba8fd(%rip), %rsi     # 0xd430b
movl $0x2, %edx
callq 0x8bab0
movl (%rsp), %esi
movq 0x18(%rsp), %rdi
callq 0x2023b
jmp 0x19a43
jmp 0x19a29
leaq 0x60(%rsp), %rdi
callq 0x18aaa
jmp 0x19a4d
leaq 0x38(%rsp), %rdi
callq 0x18aaa
jmp 0x19a43
jmp 0x19a43
movq %rsp, %rdi
callq 0x18aaa
jmp 0x19a6e
movq %rax, %rbx
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x19a79
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x21280
jmp 0x19a79
movq %rax, %rbx
movq %rsp, %rdi
callq 0x19688
movq %rbx, %rdi
callq 0xcc900