// File: Kingsford-Group[P]ghost2/src/alignGraphs.hpp
// Function: seedAndExtend[abi:cxx11](Graph&, Graph&, std::vector<D_alpha, std::allocator<D_alpha>>&, int, double)
bmap seedAndExtend(Graph& G, Graph& H, vector<D_alpha>& minP, int k, double skipProb)
{
  srand(time(0));
  vector<D_alpha> allDists(minP);
  distmap dmap = getDistMap(allDists);
  bmap f;
  while(minP.size()>0)
  {
    auto next = getNextSeed(skipProb, &minP);
    D_alpha d = next.first;

    string n1 = d.get_n1();
    string n2 = d.get_n2();
    if(f.left.find(n1) == f.left.end() && f.right.find(n2) == f.right.end())
      extendAlignment(d, G, H, &f, allDists, dmap, k);

    for(int i = 0; i < next.second.size(); i++){
      minP.push_back(next.second[i]);
      push_heap(minP.begin(), minP.end(), CompareD_alphaG());
    }
  }
  return f;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x280, %rsp            # imm = 0x280
movq %rdi, -0x228(%rbp)
movq %rdi, %rax
movq %rax, -0x220(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movsd %xmm0, -0x30(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x10630
movl %eax, %edi
callq 0x10680
movq -0x20(%rbp), %rsi
leaq -0x48(%rbp), %rdi
movq %rdi, -0x218(%rbp)
callq 0x29900
movq -0x218(%rbp), %rsi
leaq -0x78(%rbp), %rdi
callq 0x1e600
jmp 0x1ea0b
movb $0x0, -0x85(%rbp)
leaq -0x86(%rbp), %rdi
movq %rdi, -0x230(%rbp)
callq 0x299f0
movq -0x228(%rbp), %rdi
movq -0x230(%rbp), %rsi
callq 0x29a10
jmp 0x1ea3a
leaq -0x86(%rbp), %rdi
callq 0x29ac0
movq -0x20(%rbp), %rdi
callq 0x27750
cmpq $0x0, %rax
jbe 0x1edf3
movsd -0x30(%rbp), %xmm0
movq -0x20(%rbp), %rsi
leaq -0xf0(%rbp), %rdi
callq 0x1e830
jmp 0x1ea70
leaq -0x140(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x28950
jmp 0x1ea85
leaq -0x160(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0x27920
jmp 0x1ea9a
leaq -0x180(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0x27950
jmp 0x1eaaf
movq -0x228(%rbp), %rdi
addq $0x98, %rdi
leaq -0x160(%rbp), %rsi
callq 0x287f0
movq %rax, -0x238(%rbp)
jmp 0x1ead2
movq -0x228(%rbp), %rdi
movq -0x238(%rbp), %rax
movq %rax, -0x188(%rbp)
addq $0x98, %rdi
callq 0x288f0
movq %rax, -0x240(%rbp)
jmp 0x1eafc
movq -0x240(%rbp), %rax
movq %rax, -0x190(%rbp)
leaq -0x188(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x29ae0
movb %al, -0x241(%rbp)
jmp 0x1eb25
movb -0x241(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x242(%rbp)
jne 0x1eb3d
jmp 0x1ebc1
movq -0x228(%rbp), %rdi
addq $0xa0, %rdi
leaq -0x180(%rbp), %rsi
callq 0x28a90
movq %rax, -0x250(%rbp)
jmp 0x1eb60
movq -0x228(%rbp), %rdi
movq -0x250(%rbp), %rax
movq %rax, -0x198(%rbp)
addq $0xa0, %rdi
callq 0x28d10
movq %rax, -0x258(%rbp)
jmp 0x1eb8a
movq -0x258(%rbp), %rax
movq %rax, -0x1a0(%rbp)
leaq -0x198(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0x29b20
movb %al, -0x259(%rbp)
jmp 0x1ebb3
movb -0x259(%rbp), %al
movb %al, -0x242(%rbp)
jmp 0x1ebc1
movb -0x242(%rbp), %al
testb $0x1, %al
jne 0x1ebd0
jmp 0x1ecdb
leaq -0x1f0(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0x28950
jmp 0x1ebe5
movq -0x228(%rbp), %rcx
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x24(%rbp), %edi
movq %rsp, %rax
movl %edi, (%rax)
leaq -0x1f0(%rbp), %rdi
leaq -0x48(%rbp), %r8
leaq -0x78(%rbp), %r9
callq 0x1e0d0
jmp 0x1ec12
leaq -0x1f0(%rbp), %rdi
callq 0x27fc0
jmp 0x1ecdb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x1ee46
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x86(%rbp), %rdi
callq 0x29ac0
jmp 0x1ee3d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x1ee31
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x1ede5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x1edd9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x1edcd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x1edc1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x1f0(%rbp), %rdi
callq 0x27fc0
jmp 0x1edc1
movl $0x0, -0x1f4(%rbp)
movslq -0x1f4(%rbp), %rax
movq %rax, -0x268(%rbp)
leaq -0xf0(%rbp), %rdi
addq $0x50, %rdi
callq 0x27750
movq %rax, %rcx
movq -0x268(%rbp), %rax
cmpq %rcx, %rax
jae 0x1ed8c
movq -0x20(%rbp), %rax
movq %rax, -0x270(%rbp)
leaq -0xa0(%rbp), %rdi
movslq -0x1f4(%rbp), %rsi
callq 0x287d0
movq -0x270(%rbp), %rdi
movq %rax, %rsi
callq 0x27f30
jmp 0x1ed41
movq -0x20(%rbp), %rdi
callq 0x275a0
movq %rax, -0x200(%rbp)
movq -0x20(%rbp), %rdi
callq 0x27610
movq %rax, -0x208(%rbp)
movq -0x200(%rbp), %rdi
movq -0x208(%rbp), %rsi
callq 0x29b60
jmp 0x1ed76
jmp 0x1ed78
movl -0x1f4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1f4(%rbp)
jmp 0x1ece5
leaq -0x180(%rbp), %rdi
callq 0x10460
leaq -0x160(%rbp), %rdi
callq 0x10460
leaq -0x140(%rbp), %rdi
callq 0x27fc0
leaq -0xf0(%rbp), %rdi
callq 0x29c70
jmp 0x1ea46
leaq -0x180(%rbp), %rdi
callq 0x10460
leaq -0x160(%rbp), %rdi
callq 0x10460
leaq -0x140(%rbp), %rdi
callq 0x27fc0
leaq -0xf0(%rbp), %rdi
callq 0x29c70
jmp 0x1ee31
movb $0x1, -0x85(%rbp)
testb $0x1, -0x85(%rbp)
jne 0x1ee0f
movq -0x228(%rbp), %rdi
callq 0x29ca0
leaq -0x78(%rbp), %rdi
callq 0x29830
leaq -0x48(%rbp), %rdi
callq 0x27ff0
movq -0x220(%rbp), %rax
addq $0x280, %rsp            # imm = 0x280
popq %rbp
retq
movq -0x228(%rbp), %rdi
callq 0x29ca0
leaq -0x78(%rbp), %rdi
callq 0x29830
leaq -0x48(%rbp), %rdi
callq 0x27ff0
movq -0x80(%rbp), %rdi
callq 0x10cc0
nopl (%rax,%rax)