// File: /workspace/github_cpp_makefile_star2_O2/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 $0x78, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %r15
movzwl 0x20(%rsi), %esi
xorps %xmm0, %xmm0
movq %rsp, %r12
movups %xmm0, 0x8(%r12)
andq $0x0, 0x28(%r12)
movups %xmm0, 0x18(%r12)
movl $0x1, 0x8(%r12)
movabsq $0x200000001, %rax      # imm = 0x200000001
movq %rax, (%r12)
leaq 0x30(%rsp), %r13
movq %r13, %rdi
callq 0x19be4
movq (%r13), %rsi
leaq 0x50(%rsp), %rcx
movq %r15, %rdi
movq %r12, %rdx
callq 0x151e0
movl %eax, %ebp
testl %eax, %eax
jne 0x19706
leaq 0x30(%rsp), %rdi
callq 0x9b0d0
movq 0x50(%rsp), %r15
movq 0x18(%r15), %rax
cmpw $0x2, (%rax)
jne 0x19758
leaq 0xb5cd2(%rip), %rsi     # 0xcf32b
movq %rsp, %r12
pushq $0x38
popq %rdx
movq %r12, %rdi
xorl %ecx, %ecx
callq 0x1f4c8
movq 0x18(%r12), %rdi
leaq 0xb5cc6(%rip), %rsi     # 0xcf33b
callq 0x8b1d0
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0x1b9b0
movq 0x18(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x1ba1d
movq %rsp, %rdi
callq 0x19502
movl 0x4(%r15), %edi
pushq $0x1
popq %rsi
xorl %edx, %edx
callq 0x155d0
movl %eax, (%r14)
testl %eax, %eax
js 0x19798
pushq $0x1
popq %rsi
pushq $0x2
popq %rdx
movl %eax, %edi
callq 0x198aa
movl (%r14), %edi
movq 0x18(%r15), %rsi
movl 0x10(%r15), %edx
callq 0x157f0
testl %eax, %eax
jne 0x197de
movl (%r14), %edi
movl 0x28(%rbx), %esi
callq 0x153d0
testl %eax, %eax
jne 0x19821
movq %r15, %rdi
callq 0x15380
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb5c1e(%rip), %rsi     # 0xcf32b
leaq 0x58(%rsp), %rdi
pushq $0x29
popq %rdx
pushq $0x3
popq %rcx
callq 0x1f4c8
movq 0x70(%rsp), %rdi
leaq 0xb5d68(%rip), %rsi     # 0xcf491
callq 0x8b1d0
movq 0x70(%rsp), %rdi
leaq 0xbab91(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
movl %ebp, %edi
callq 0x15860
movq 0x70(%rsp), %rdi
movq %rax, %rsi
callq 0x8b1d0
jmp 0x19864
leaq 0xb5bcc(%rip), %rsi     # 0xcf32b
leaq 0x30(%rsp), %rbx
pushq $0x2b
popq %rdx
pushq $0x3
popq %rcx
movq %rbx, %rdi
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb5d5e(%rip), %rsi     # 0xcf4db
callq 0x8b1d0
movq 0x48(%rsp), %rdi
leaq 0xbab3d(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
jmp 0x19870
leaq 0xb5b8c(%rip), %rsi     # 0xcf32b
movq %rsp, %rbx
pushq $0x39
popq %rdx
pushq $0x3
popq %rcx
movq %rbx, %rdi
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb5b8e(%rip), %rsi     # 0xcf349
callq 0x8b1d0
movq 0x18(%rsp), %rdi
leaq 0xbaaff(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
movq %rsp, %rdi
callq 0x19465
jmp 0x1987e
leaq 0xb5b46(%rip), %rsi     # 0xcf32b
movq %rsp, %rbx
pushq $0x3b
popq %rdx
pushq $0x3
popq %rcx
movq %rbx, %rdi
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb5b7d(%rip), %rsi     # 0xcf37e
callq 0x8b1d0
movq 0x18(%rsp), %rdi
leaq 0xbaab9(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
movq %rsp, %rdi
callq 0x19465
jmp 0x1987e
leaq 0xb5b03(%rip), %rsi     # 0xcf32b
movq %rsp, %rbx
pushq $0x3c
popq %rdx
pushq $0x3
popq %rcx
movq %rbx, %rdi
callq 0x1f4c8
movq 0x18(%rbx), %rdi
leaq 0xb5b6a(%rip), %rsi     # 0xcf3ae
callq 0x8b1d0
movq 0x18(%rsp), %rdi
leaq 0xbaa76(%rip), %rsi     # 0xd42cb
callq 0x8b1d0
movq %rsp, %rdi
callq 0x19465
jmp 0x1987e
leaq 0x58(%rsp), %rdi
callq 0x189a6
jmp 0x19888
leaq 0x30(%rsp), %rdi
callq 0x189a6
jmp 0x1987e
jmp 0x1987e
movq %rsp, %rdi
callq 0x189a6
jmp 0x19897
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x9b0d0
jmp 0x198a2
movq %rax, %rbx
movq %rsp, %rdi
callq 0x19502
movq %rbx, %rdi
callq 0xcc660