// File: 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
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rdi, -0x130(%rbp)
movq %rdi, %rax
movq %rax, -0x128(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x120(%rbp)
movslq -0x14(%rbp), %rax
movq %rax, -0x118(%rbp)
addq $0x68, %rdi
callq 0x3b0e0
movq %rax, %rcx
movq -0x118(%rbp), %rax
cmpq %rcx, %rax
ja 0x3dad2
movq -0x120(%rbp), %rdi
movslq -0x14(%rbp), %rax
movq %rax, -0x138(%rbp)
addq $0x80, %rdi
callq 0x3b0e0
movq %rax, %rcx
movq -0x138(%rbp), %rax
cmpq %rcx, %rax
jbe 0x3dafe
movq 0xc34bf(%rip), %rdi     # 0x100f98
leaq 0x76abf(%rip), %rsi     # 0xb459f
callq 0x84d0
movq %rax, %rdi
leaq 0x75ac8(%rip), %rsi     # 0xb35b7
callq 0x84d0
movl $0x1, %edi
callq 0x85d0
movq -0x130(%rbp), %rdi
movb $0x0, -0x15(%rbp)
callq 0xd9c0
movq -0x120(%rbp), %rdi
addq $0x68, %rdi
callq 0x3b0e0
movq %rax, -0x148(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0xd730
movq -0x148(%rbp), %rsi
movq -0x140(%rbp), %rdx
leaq -0x30(%rbp), %rdi
callq 0x3f6c0
jmp 0x3db4e
leaq -0x31(%rbp), %rdi
callq 0xd830
movq -0x120(%rbp), %rdi
subq $-0x80, %rdi
callq 0x3b0e0
movq %rax, -0x158(%rbp)
leaq -0x61(%rbp), %rdi
movq %rdi, -0x150(%rbp)
callq 0xd730
movq -0x158(%rbp), %rsi
movq -0x150(%rbp), %rdx
leaq -0x60(%rbp), %rdi
callq 0x3f6c0
jmp 0x3db97
leaq -0x61(%rbp), %rdi
callq 0xd830
movq -0x120(%rbp), %rdi
addq $0x68, %rdi
movq %rdi, -0x168(%rbp)
callq 0x3b730
movq -0x168(%rbp), %rdi
movq %rax, -0x70(%rbp)
callq 0x3b760
movq %rax, -0x78(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x3b730
movq %rax, -0x80(%rbp)
movq -0x70(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq -0x80(%rbp), %rdx
callq 0x3f730
movq %rax, -0x160(%rbp)
jmp 0x3dbf2
movq -0x120(%rbp), %rdi
movq -0x160(%rbp), %rax
movq %rax, -0x88(%rbp)
subq $-0x80, %rdi
movq %rdi, -0x178(%rbp)
callq 0x3b730
movq -0x178(%rbp), %rdi
movq %rax, -0x90(%rbp)
callq 0x3b760
movq %rax, -0x98(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x3b730
movq %rax, -0xa0(%rbp)
movq -0x90(%rbp), %rdi
movq -0x98(%rbp), %rsi
movq -0xa0(%rbp), %rdx
callq 0x3f730
movq %rax, -0x170(%rbp)
jmp 0x3dc64
movq -0x170(%rbp), %rax
movq %rax, -0xa8(%rbp)
jmp 0x3dc74
movq -0x130(%rbp), %rdi
callq 0x3f7a0
leaq -0x30(%rbp), %rdi
movq %rdi, -0x180(%rbp)
callq 0x3b730
movq -0x180(%rbp), %rdi
movq %rax, -0xb0(%rbp)
callq 0x3b760
movq %rax, %rcx
movq -0x120(%rbp), %rax
movq %rcx, -0xb8(%rbp)
movq 0x60(%rax), %rdx
movq -0xb0(%rbp), %rdi
movq -0xb8(%rbp), %rsi
callq 0x3f7c0
jmp 0x3dccd
leaq -0x60(%rbp), %rdi
movq %rdi, -0x188(%rbp)
callq 0x3b730
movq -0x188(%rbp), %rdi
movq %rax, -0xc0(%rbp)
callq 0x3b760
movq %rax, %rcx
movq -0x120(%rbp), %rax
movq %rcx, -0xc8(%rbp)
movq 0x60(%rax), %rdx
movq -0xc0(%rbp), %rdi
movq -0xc8(%rbp), %rsi
callq 0x3f7c0
jmp 0x3dd1a
movb $0x1, -0x62(%rbp)
movl $0x0, -0xcc(%rbp)
movl -0xcc(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x3deb8
movslq -0xcc(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0xda90
movq (%rax), %rax
movq %rax, -0x190(%rbp)
movslq -0xcc(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0xda90
movq %rax, %rcx
movq -0x190(%rbp), %rax
cmpq (%rcx), %rax
je 0x3de9c
movslq -0xcc(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0xda90
movq (%rax), %rax
movq %rax, -0x108(%rbp)
movslq -0xcc(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0xda90
movq (%rax), %rax
movq %rax, -0x100(%rbp)
leaq -0x108(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq $0x2, -0xf0(%rbp)
leaq -0x109(%rbp), %rdi
movq %rdi, -0x198(%rbp)
callq 0xd730
movq -0x198(%rbp), %rcx
movq -0xf8(%rbp), %rsi
movq -0xf0(%rbp), %rdx
leaq -0xe8(%rbp), %rdi
callq 0xd750
jmp 0x3ddf7
movq -0x130(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0xd700
jmp 0x3de0c
leaq -0xe8(%rbp), %rdi
callq 0xd7d0
leaq -0x109(%rbp), %rdi
callq 0xd830
jmp 0x3dea2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x31(%rbp), %rdi
callq 0xd830
jmp 0x3df13
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x61(%rbp), %rdi
callq 0xd830
jmp 0x3deec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x3dee3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x3de8e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0xd7d0
leaq -0x109(%rbp), %rdi
callq 0xd830
jmp 0x3dee3
movb $0x0, -0x62(%rbp)
jmp 0x3deb8
jmp 0x3dea4
movl -0xcc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xcc(%rbp)
jmp 0x3dd28
testb $0x1, -0x62(%rbp)
je 0x3dec0
jmp 0x3dec5
jmp 0x3dc72
movb $0x1, -0x15(%rbp)
leaq -0x60(%rbp), %rdi
callq 0xd7d0
leaq -0x30(%rbp), %rdi
callq 0xd7d0
testb $0x1, -0x15(%rbp)
jne 0x3df03
jmp 0x3def7
leaq -0x60(%rbp), %rdi
callq 0xd7d0
leaq -0x30(%rbp), %rdi
callq 0xd7d0
jmp 0x3df13
movq -0x130(%rbp), %rdi
callq 0xda10
movq -0x128(%rbp), %rax
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
movq -0x130(%rbp), %rdi
callq 0xda10
movq -0x40(%rbp), %rdi
callq 0x8880
nopl (%rax,%rax)