// File: /workspace/github_cpp_makefile_star2_O3/nvanbenschoten[P]byzantine-agreement/src/main.cc
// Function: GetProcesses(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::experimental::fundamentals_v1::optional<unsigned short>)
generals::ProcessList GetProcesses(
    const std::string hostfile,
    std::experimental::optional<unsigned short> default_port) {
  generals::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 0x5560
movq 0x90(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0xb0(%rsp,%rax)
jne 0x65ed
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 0x5420
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x65ad
movq %r15, 0x60(%rsp)
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0xe276
movb $0x0, 0xc(%rsp)
cmpb $0x1, 0x2(%r14)
jne 0x6556
movzwl (%r14), %eax
movw %ax, 0xa(%rsp)
movb $0x1, 0xc(%rsp)
movq %rbp, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x153a7
movq 0x60(%rsp), %rdi
cmpq %r15, %rdi
je 0x657b
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x9b04
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x6500
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x6500
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x65c9
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x5340
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 0x10289(%rip), %rsi     # 0x1688a
movq %rax, %rdi
callq 0x5150
movq 0x199e0(%rip), %rsi     # 0x1fff0
movq 0x19959(%rip), %rdx     # 0x1ff70
movq %rbx, %rdi
callq 0x55d0
jmp 0x6718
movq %rax, %r14
jmp 0x6784
movq %rax, %r14
movq %rbx, %rdi
callq 0x5270
jmp 0x6784
movq %rax, %r14
jmp 0x6791
movq %rdx, %rbx
movq %rax, %r14
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x6685
movq 0x48(%rsp), %rsi
jmp 0x6675
movq %rdx, %rbx
movq %rax, %r14
movq 0x60(%rsp), %rdi
cmpq %r15, %rdi
je 0x6685
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x6685
movq %rdx, %rbx
movq %rax, %r14
cmpl $0x1, %ebx
jne 0x6768
movq %r14, %rdi
callq 0x5400
leaq 0x80(%rsp), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0x5590
movq 0x198b0(%rip), %rax     # 0x1ff60
addq $0x10, %rax
movq %rax, (%r15)
movq %r14, %rdi
callq 0x5160
movl $0x10, %edi
callq 0x51a0
movq %rax, %rbx
movq %r15, %rdi
callq 0x54f0
leaq 0x38(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %rax, %rsi
callq 0x9ac6
movb $0x1, %bpl
leaq 0x38(%rsp), %rsi
movq %rbx, %rdi
callq 0x5410
leaq 0x18e3b(%rip), %rax     # 0x1f538
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0x18d67(%rip), %rsi     # 0x1f470
movq 0x19870(%rip), %rdx     # 0x1ff80
movq %rbx, %rdi
callq 0x55d0
movq %rax, %r14
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x6737
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x5340
testb %bpl, %bpl
jne 0x6741
jmp 0x6749
movq %rax, %r14
movq %rbx, %rdi
callq 0x5270
leaq 0x80(%rsp), %rdi
callq 0x5690
callq 0x5580
jmp 0x6768
movq %rax, %rdi
callq 0x9b59
movq %rax, %r14
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x6784
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x90(%rsp), %rdi
callq 0x50d0
movq 0x10(%rsp), %rdi
callq 0x9b64
movq %r14, %rdi
callq 0x5600