// File: /workspace/github_cpp_makefile_star2_O2/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)
andq $0x0, 0x10(%rdi)
leaq 0x90(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x5540
movq 0x90(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0xb0(%rsp,%rax)
jne 0x5fb3
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 0x5400
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x5f85
movq %r13, %rdi
movq %r12, %rsi
callq 0x5480
movb $0x0, 0xc(%rsp)
cmpb $0x1, 0x2(%r14)
jne 0x5f58
movzwl (%r14), %eax
movw %ax, 0xa(%rsp)
movb $0x1, 0xc(%rsp)
movq %rbp, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x1291a
movq %r13, %rdi
callq 0x56b8
movq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x8568
movq %rbp, %rdi
callq 0x56b8
jmp 0x5f1a
leaq 0x50(%rsp), %rdi
callq 0x56b8
leaq 0x90(%rsp), %rdi
callq 0x50e0
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 0x51c0
movq %rax, %rbx
leaq 0xd8ca(%rip), %rsi      # 0x1388f
movq %rax, %rdi
callq 0x5140
movq 0x1901c(%rip), %rsi     # 0x1eff0
movq 0x18f95(%rip), %rdx     # 0x1ef70
movq %rbx, %rdi
callq 0x55c0
jmp 0x60a2
movq %rax, %r14
jmp 0x60e6
movq %rax, %r14
movq %rbx, %rdi
callq 0x5270
jmp 0x60e6
movq %rax, %r14
jmp 0x60f3
movq %rdx, %rbx
movq %rax, %r14
leaq 0x28(%rsp), %rdi
jmp 0x6020
movq %rdx, %rbx
movq %rax, %r14
leaq 0x70(%rsp), %rdi
callq 0x56b8
jmp 0x602d
movq %rdx, %rbx
movq %rax, %r14
cmpl $0x1, %ebx
jne 0x60dc
movq %r14, %rdi
callq 0x53e0
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8594
movq %r14, %rdi
callq 0x5150
pushq $0x10
popq %rdi
callq 0x51c0
movq %rax, %r15
movq %rbx, %rdi
callq 0x54d0
leaq 0x28(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %rax, %rsi
callq 0x852c
movb $0x1, %bl
leaq 0x28(%rsp), %rsi
movq %r15, %rdi
callq 0x85ae
xorl %ebx, %ebx
leaq 0x18355(%rip), %rsi     # 0x1e3e8
movq 0x18ede(%rip), %rdx     # 0x1ef78
movq %r15, %rdi
callq 0x55c0
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x56b8
testb %bl, %bl
jne 0x60b8
jmp 0x60c0
movq %rax, %r14
movq %r15, %rdi
callq 0x5270
leaq 0x18(%rsp), %rdi
callq 0x56c8
callq 0x5560
jmp 0x60dc
movq %rax, %rdi
callq 0x85c3
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x56b8
leaq 0x90(%rsp), %rdi
callq 0x50e0
movq 0x10(%rsp), %rdi
callq 0x85ce
movq %r14, %rdi
callq 0x55e0