// File: /workspace/github_cpp_makefile_star2_O1/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)
movq $0x0, 0x10(%rdi)
leaq 0x90(%rsp), %rdi
movl $0x8, %edx
callq 0x5590
movq 0x90(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0xb0(%rsp,%rax)
jne 0xa189
leaq 0x28(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x70(%rsp), %r15
leaq 0x18(%rsp), %r12
leaq 0x60(%rsp), %r13
leaq 0x38(%rsp), %rbp
leaq 0xa(%rsp), %rbx
leaq 0x90(%rsp), %rdi
movq %r12, %rsi
callq 0x5450
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0xa149
movq %r15, 0x60(%rsp)
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x7de6
movb $0x0, 0xc(%rsp)
cmpb $0x1, 0x2(%r14)
jne 0xa0f2
movzwl (%r14), %eax
movw %ax, 0xa(%rsp)
movb $0x1, 0xc(%rsp)
movq %rbp, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x134ab
movq 0x60(%rsp), %rdi
cmpq %r15, %rdi
je 0xa117
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x5370
movq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0xc782
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0xa09c
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x5370
jmp 0xa09c
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0xa165
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x5370
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
movl $0x10, %edi
callq 0x51a0
movq %rax, %rbx
leaq 0xa989(%rip), %rsi      # 0x14b26
movq %rax, %rdi
callq 0x5150
movq 0x11e44(%rip), %rsi     # 0x1bff0
movq 0x11dcd(%rip), %rdx     # 0x1bf80
movq %rbx, %rdi
callq 0x5610
jmp 0xa2b4
movq %rax, %r14
jmp 0xa323
movq %rax, %r14
movq %rbx, %rdi
callq 0x5280
jmp 0xa323
movq %rax, %r14
jmp 0xa330
movq %rdx, %rbx
movq %rax, %r14
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0xa221
movq 0x48(%rsp), %rsi
jmp 0xa211
movq %rdx, %rbx
movq %rax, %r14
movq 0x60(%rsp), %rdi
cmpq %r15, %rdi
je 0xa221
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x5370
jmp 0xa221
movq %rdx, %rbx
movq %rax, %r14
cmpl $0x1, %ebx
jne 0xa307
movq %r14, %rdi
callq 0x5430
leaq 0x80(%rsp), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0x55c0
movq 0x11d24(%rip), %rax     # 0x1bf70
addq $0x10, %rax
movq %rax, (%r15)
movq %r14, %rdi
callq 0x5160
movl $0x10, %edi
callq 0x51a0
movq %rax, %rbx
movq %r15, %rdi
callq 0x5520
leaq 0x38(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %rax, %rsi
callq 0xc744
movb $0x1, %bpl
leaq 0x38(%rsp), %rsi
movq %rbx, %rdi
callq 0x5440
leaq 0x114ef(%rip), %rax     # 0x1b788
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0x1141b(%rip), %rsi     # 0x1b6c0
movq 0x11ce4(%rip), %rdx     # 0x1bf90
movq %rbx, %rdi
callq 0x5610
movq %rax, %r14
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0xa2db
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x5370
jmp 0xa2db
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0xa2e8
movq %rbx, %rdi
callq 0x5280
leaq 0x80(%rsp), %rdi
callq 0x56e0
callq 0x55b0
jmp 0xa307
movq %rax, %rdi
callq 0x792b
movq %rax, %r14
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0xa323
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x5370
leaq 0x90(%rsp), %rdi
callq 0x50d0
movq 0x10(%rsp), %rdi
callq 0xc7d8
movq %r14, %rdi
callq 0x5650