// File: /workspace/github_cpp_makefile_star2_O3/Kei18[P]pibt/./src/graph/graph.cpp
// Function: Graph::getRandomStartGoal(int)
Paths Graph::getRandomStartGoal(int num) {
  if (num > starts.size() || num > goals.size()) {
    std::cout << "error@Graph::getStartGoal, over node size" << "\n";
    std::exit(1);
  }

  Paths points;
  Nodes ss(starts.size());
  Nodes gs(goals.size());
  bool flg;

  std::copy(starts.begin(), starts.end(), ss.begin());
  std::copy(goals.begin(),  goals.end(), gs.begin());

  while (true) {
    points.clear();
    std::shuffle(ss.begin(), ss.end(), *MT);
    std::shuffle(gs.begin(), gs.end(), *MT);

    flg = true;
    for (int i = 0; i < num; ++i) {
      if (ss[i] != gs[i]) {
        points.push_back({ ss[i], gs[i] });
      } else {
        flg = false;
        break;
      }
    }

    if (flg) break;
  }

  return points;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movl %edx, 0x4(%rsp)
movslq %edx, %rax
movq 0x70(%rsi), %rsi
subq 0x68(%r14), %rsi
sarq $0x3, %rsi
cmpq %rax, %rsi
jb 0x1b1d0
movq 0x88(%r14), %rcx
subq 0x80(%r14), %rcx
sarq $0x3, %rcx
cmpq %rax, %rcx
jb 0x1b1d0
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x1b5a2
movq 0x88(%r14), %rsi
subq 0x80(%r14), %rsi
sarq $0x3, %rsi
leaq 0x8(%rsp), %rdi
leaq 0x40(%rsp), %rdx
callq 0x1b5a2
movq 0x68(%r14), %rsi
movq 0x70(%r14), %rdx
subq %rsi, %rdx
je 0x1b0bc
movq 0x20(%rsp), %rdi
callq 0x65b0
movq 0x80(%r14), %rsi
movq %r14, 0x38(%rsp)
movq 0x88(%r14), %rdx
subq %rsi, %rdx
je 0x1b0de
movq 0x8(%rsp), %rdi
callq 0x65b0
movl 0x4(%rsp), %ebp
leaq 0x40(%rsp), %r15
leaq 0x58(%rsp), %r12
leaq 0x3(%rsp), %r13
movq (%rbx), %rsi
movq %rbx, %rdi
callq 0x1ca16
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x38(%rsp), %r14
movq 0x60(%r14), %rdx
callq 0x1b62f
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x60(%r14), %rdx
callq 0x1b62f
cmpl $0x0, 0x4(%rsp)
jle 0x1b190
xorl %r14d, %r14d
movq 0x20(%rsp), %rax
movq (%rax,%r14,8), %rax
movq 0x8(%rsp), %rcx
cmpq (%rcx,%r14,8), %rax
je 0x1b0f1
movq %rax, 0x58(%rsp)
movq (%rcx,%r14,8), %rax
movq %rax, 0x60(%rsp)
movl $0x2, %edx
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rcx
callq 0xb484
movq %rbx, %rdi
movq %r15, %rsi
callq 0x18c56
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x1b188
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x6380
incq %r14
cmpq %r14, %rbp
jne 0x1b131
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1b1a7
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x6380
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x1b1be
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x6380
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x46dd1(%rip), %rdi     # 0x61fa8
leaq 0x2e35e(%rip), %rsi     # 0x4953c
callq 0x6360
leaq 0x2d379(%rip), %rsi     # 0x48563
movq %rax, %rdi
callq 0x6360
movl $0x1, %edi
callq 0x6440
movq %rax, %r14
jmp 0x1b23e
movq %rax, %r14
jmp 0x1b255
jmp 0x1b208
movq %rax, %r14
jmp 0x1b227
movq %rax, %r14
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x1b227
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x6380
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1b23e
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x6380
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x1b255
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x6380
movq %rbx, %rdi
callq 0xb508
movq %r14, %rdi
callq 0x6620
nop