// File: /workspace/github_cpp_makefile_star2_O2/nvanbenschoten[P]total-order-multicast/src/main.cc
// Function: GetProcesses(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::experimental::fundamentals_v1::optional<unsigned short>)
process::ProcessList GetProcesses(
    const std::string hostfile,
    std::experimental::optional<unsigned short> default_port) {
  process::ProcessList processes;
  std::ifstream file(hostfile);
  if (!file) {
    throw std::runtime_error("could not open hostfile");
  }

  std::string host;
  while (file >> host) {
    try {
      auto addr = net::AddressWithDefaultPort(host, default_port);
      processes.push_back(addr);
    } catch (std::invalid_argument e) {
      throw args::UsageError(e.what());
    }
  }
  return processes;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x298, %rsp            # imm = 0x298
movq %rdx, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rdi, 0x10(%rsp)
andq $0x0, 0x10(%rdi)
leaq 0x90(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x5560
movq 0x90(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0xb0(%rsp,%rax)
jne 0x9aff
leaq 0x60(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x90(%rsp), %r15
leaq 0x50(%rsp), %r12
leaq 0x70(%rsp), %r13
leaq 0x28(%rsp), %rbp
leaq 0xa(%rsp), %rbx
movq %r15, %rdi
movq %r12, %rsi
callq 0x5420
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x9ad1
movq %r13, %rdi
movq %r12, %rsi
callq 0x5490
movb $0x0, 0xc(%rsp)
cmpb $0x1, 0x2(%r14)
jne 0x9aa4
movzwl (%r14), %eax
movw %ax, 0xa(%rsp)
movb $0x1, 0xc(%rsp)
movq %rbp, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x11132
movq %r13, %rdi
callq 0x56f8
movq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0xb63c
movq %rbp, %rdi
callq 0x56f8
jmp 0x9a66
leaq 0x50(%rsp), %rdi
callq 0x56f8
leaq 0x90(%rsp), %rdi
callq 0x50d0
movq 0x10(%rsp), %rax
addq $0x298, %rsp            # imm = 0x298
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x51b0
movq %rax, %rbx
leaq 0x902a(%rip), %rsi      # 0x12b3b
movq %rax, %rdi
callq 0x5130
movq 0x124d0(%rip), %rsi     # 0x1bff0
movq 0x12459(%rip), %rdx     # 0x1bf80
movq %rbx, %rdi
callq 0x55f0
jmp 0x9bee
movq %rax, %r14
jmp 0x9c32
movq %rax, %r14
movq %rbx, %rdi
callq 0x5270
jmp 0x9c32
movq %rax, %r14
jmp 0x9c3f
movq %rdx, %rbx
movq %rax, %r14
leaq 0x28(%rsp), %rdi
jmp 0x9b6c
movq %rdx, %rbx
movq %rax, %r14
leaq 0x70(%rsp), %rdi
callq 0x56f8
jmp 0x9b79
movq %rdx, %rbx
movq %rax, %r14
cmpl $0x1, %ebx
jne 0x9c28
movq %r14, %rdi
callq 0x5400
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0xb668
movq %r14, %rdi
callq 0x5140
pushq $0x10
popq %rdi
callq 0x51b0
movq %rax, %r15
movq %rbx, %rdi
callq 0x54f0
leaq 0x28(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %rax, %rsi
callq 0x71e8
movb $0x1, %bl
leaq 0x28(%rsp), %rsi
movq %r15, %rdi
callq 0xb682
xorl %ebx, %ebx
leaq 0x11a69(%rip), %rsi     # 0x1b648
movq 0x123a2(%rip), %rdx     # 0x1bf88
movq %r15, %rdi
callq 0x55f0
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x56f8
testb %bl, %bl
jne 0x9c04
jmp 0x9c0c
movq %rax, %r14
movq %r15, %rdi
callq 0x5270
leaq 0x18(%rsp), %rdi
callq 0x5708
callq 0x5580
jmp 0x9c28
movq %rax, %rdi
callq 0x7109
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x56f8
leaq 0x90(%rsp), %rdi
callq 0x50d0
movq 0x10(%rsp), %rdi
callq 0xb698
movq %r14, %rdi
callq 0x5620