// File: /workspace/github_cpp_makefile_star2_O3/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
movups %xmm0, 0x10(%rsp)
movups %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
movl $0x1, 0x10(%rsp)
movabsq $0x200000001, %rax      # imm = 0x200000001
movq %rax, 0x8(%rsp)
movl $0x1, %r12d
cmpl $0xa, %ebp
jb 0x19648
movl $0x2, %r12d
cmpw $0x64, %bp
jb 0x19648
movl $0x3, %r12d
cmpl $0x3e8, %ebp            # imm = 0x3E8
jb 0x19648
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 0x9b680
movq (%r13), %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0x19df1
movq (%r13), %rsi
leaq 0x8(%rsp), %rdx
leaq 0x58(%rsp), %rcx
movq %r15, %rdi
callq 0x151e0
movl %eax, %ebp
testl %eax, %eax
jne 0x1978b
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x196b0
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x210c0
movq 0x58(%rsp), %r15
movq 0x18(%r15), %rax
cmpw $0x2, (%rax)
jne 0x197f3
leaq 0xb5c5e(%rip), %rsi     # 0xcf328
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movl $0x38, %edx
xorl %ecx, %ecx
callq 0x2003c
movq 0x18(%r12), %rdi
leaq 0xb5c4e(%rip), %rsi     # 0xcf338
movl $0xd, %edx
callq 0x8b8f0
leaq 0x38(%rsp), %rdi
movq %r15, %rsi
callq 0x1be16
movq 0x20(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x1be91
leaq 0x8(%rsp), %rdi
callq 0x1959e
movl 0x4(%r15), %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x155d0
movl %eax, (%r14)
testl %eax, %eax
js 0x19841
movl %eax, %edi
movl $0x1, %esi
movl $0x2, %edx
callq 0x199ad
movl (%r14), %edi
movq 0x18(%r15), %rsi
movl 0x10(%r15), %edx
callq 0x157f0
testl %eax, %eax
jne 0x1989d
movl (%r14), %edi
movl 0x28(%rbx), %esi
callq 0x153d0
testl %eax, %eax
jne 0x198f6
movq %r15, %rdi
callq 0x15380
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb5b96(%rip), %rsi     # 0xcf328
leaq 0x60(%rsp), %rdi
movl $0x29, %edx
movl $0x3, %ecx
callq 0x2003c
movq 0x78(%rsp), %rdi
leaq 0xb5cdc(%rip), %rsi     # 0xcf48e
movl $0x49, %edx
callq 0x8b8f0
movq 0x78(%rsp), %rdi
leaq 0xbab03(%rip), %rsi     # 0xd42cb
movl $0x2, %edx
callq 0x8b8f0
movl %ebp, %edi
callq 0x15860
leaq 0x80(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x60(%rsp), %rdi
callq 0x19da4
jmp 0x19951
leaq 0xb5b2e(%rip), %rsi     # 0xcf328
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
movl $0x2b, %edx
movl $0x3, %ecx
callq 0x2003c
movq 0x18(%rbx), %rdi
leaq 0xb5cbc(%rip), %rsi     # 0xcf4d8
movl $0x22, %edx
callq 0x8b8f0
movq 0x50(%rsp), %rdi
leaq 0xbaa99(%rip), %rsi     # 0xd42cb
movl $0x2, %edx
callq 0x8b8f0
jmp 0x1995d
leaq 0xb5ae0(%rip), %rsi     # 0xcf328
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x39, %edx
movl $0x3, %ecx
callq 0x2003c
movq 0x18(%rbx), %rdi
leaq 0xb5adc(%rip), %rsi     # 0xcf346
movl $0x34, %edx
callq 0x8b8f0
movq 0x20(%rsp), %rdi
leaq 0xbaa4b(%rip), %rsi     # 0xd42cb
movl $0x2, %edx
callq 0x8b8f0
movl 0x8(%rsp), %esi
movq 0x20(%rsp), %rdi
callq 0x200db
jmp 0x1996b
leaq 0xb5a84(%rip), %rsi     # 0xcf328
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x3b, %edx
movl $0x3, %ecx
callq 0x2003c
movq 0x18(%rbx), %rdi
leaq 0xb5ab5(%rip), %rsi     # 0xcf37b
movl $0x2f, %edx
callq 0x8b8f0
movq 0x20(%rsp), %rdi
leaq 0xba9ef(%rip), %rsi     # 0xd42cb
movl $0x2, %edx
callq 0x8b8f0
movl 0x8(%rsp), %esi
movq 0x20(%rsp), %rdi
callq 0x200db
jmp 0x1996b
leaq 0xb5a2b(%rip), %rsi     # 0xcf328
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x3c, %edx
movl $0x3, %ecx
callq 0x2003c
movq 0x18(%rbx), %rdi
leaq 0xb5a8c(%rip), %rsi     # 0xcf3ab
movl $0x27, %edx
callq 0x8b8f0
movq 0x20(%rsp), %rdi
leaq 0xba996(%rip), %rsi     # 0xd42cb
movl $0x2, %edx
callq 0x8b8f0
movl 0x8(%rsp), %esi
movq 0x20(%rsp), %rdi
callq 0x200db
jmp 0x1996b
jmp 0x19951
leaq 0x60(%rsp), %rdi
callq 0x18a24
jmp 0x19977
leaq 0x38(%rsp), %rdi
callq 0x18a24
jmp 0x1996b
jmp 0x1996b
leaq 0x8(%rsp), %rdi
callq 0x18a24
jmp 0x19998
movq %rax, %rbx
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x199a5
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x210c0
jmp 0x199a5
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1959e
movq %rbx, %rdi
callq 0xcc750