// File: /workspace/github_cpp_makefile_star2_O3/Kingsford-Group[P]ghost2/src/alignmentExtender.hpp
// Function: insertIfBetter(boost::bimaps::bimap<boost::bimaps::unordered_set_of<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, boost::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, boost::bimaps::unordered_set_of<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, boost::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, mpl_::na, mpl_::na, mpl_::na>*, D_alpha, boost::unordered::unordered_map<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, D_alpha, boost::hash<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, std::equal_to<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, std::allocator<std::pair<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const, D_alpha>>>&)
void insertIfBetter(bmap* alignment, D_alpha best, distmap& dalphas)
{ 
  bmap::left_const_iterator left = alignment->left.find(best.get_n1());
  bmap::right_const_iterator right = alignment->right.find(best.get_n2());
  double d = best.get_da();
  if((left == alignment->left.end() || 
      d < dalphas.at(make_pair(left->first,left->second)).get_da())
      && (right == alignment->right.end() || 
      d < dalphas.at(make_pair(right->second,right->first)).get_da())){
    //Remove any existing alignments, add this one
    alignment->left.erase(best.get_n1());
    alignment->right.erase(best.get_n2());
    alignment->insert(bmap::value_type(best.get_n1(), best.get_n2()));
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rdx, (%rsp)
movq %rsi, %r14
movq %rdi, %r12
leaq 0x98(%rdi), %r13
leaq 0x70(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rsi), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
callq 0x27846
movq %r13, %rdi
movq %rbx, %rsi
callq 0x1dde2
movq %rax, 0x58(%rsp)
movq 0x60(%rsp), %rdi
cmpq %rbp, %rdi
je 0x168d6
movq 0x70(%rsp), %rsi
incq %rsi
callq 0xc550
leaq 0xa0(%r12), %rbp
leaq 0x60(%rsp), %rbx
leaq 0x70(%rsp), %r15
movq %r15, (%rbx)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x27846
movq %rbp, 0x10(%rsp)
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x1de6a
movq %rax, %rbx
movq %r12, 0xa0(%rsp)
movq 0x60(%rsp), %rdi
cmpq %r15, %rdi
je 0x16930
movq 0x70(%rsp), %rsi
incq %rsi
callq 0xc550
movsd 0x40(%r14), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r13, %r15
movq (%r13), %rax
movq -0x8(%rax), %rbp
movq 0x58(%rsp), %r13
cmpq %rbp, %r13
je 0x16997
leaq 0x20(%r13), %rdx
leaq 0x60(%rsp), %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0x27492
movq (%rsp), %rdi
movq %r12, %rsi
callq 0x1def2
movsd 0x40(%rax), %xmm0
ucomisd 0x8(%rsp), %xmm0
jbe 0x16a2b
movq 0x10(%rsp), %rax
movq (%rax), %rax
cmpq -0x8(%rax), %rbx
jne 0x169a9
movb $0x1, %bl
jmp 0x16a2d
movq 0x10(%rsp), %rax
movq (%rax), %rax
cmpq -0x8(%rax), %rbx
je 0x16a72
movq %rbx, %rdx
addq $0x20, %rdx
leaq 0x18(%rsp), %rdi
movq %rbx, %rsi
callq 0x27492
leaq 0x18(%rsp), %rsi
movq (%rsp), %rdi
callq 0x1def2
movsd 0x40(%rax), %xmm0
movsd %xmm0, (%rsp)
ucomisd 0x8(%rsp), %xmm0
seta %bl
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x169f9
movq 0x48(%rsp), %rsi
incq %rsi
callq 0xc550
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x16a14
movq 0x28(%rsp), %rsi
incq %rsi
callq 0xc550
cmpq %rbp, %r13
jne 0x16a2d
movsd (%rsp), %xmm0
ucomisd 0x8(%rsp), %xmm0
ja 0x16a72
jmp 0x16bdb
xorl %ebx, %ebx
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x16a4e
movq 0x90(%rsp), %rsi
incq %rsi
callq 0xc550
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x16a6a
movq 0x70(%rsp), %rsi
incq %rsi
callq 0xc550
testb %bl, %bl
je 0x16bdb
leaq 0x28(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x27846
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1df40
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
movq 0xa0(%rsp), %rbp
je 0x16abd
movq 0x28(%rsp), %rsi
incq %rsi
callq 0xc550
leaq 0x18(%rsp), %rbx
movq %r12, (%rbx)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x27846
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x1dfc0
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x16afc
movq 0x28(%rsp), %rsi
incq %rsi
callq 0xc550
leaq 0xd8(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0xc8(%rsp), %rdi
callq 0x27846
leaq 0xb8(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
leaq 0xa8(%rsp), %rdi
callq 0x27846
leaq 0x18(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0xa8(%rsp), %rdx
callq 0x433c0
movq 0x8(%rbp), %rdi
addq $-0x10, %rdi
leaq 0x18(%rsp), %rsi
callq 0x43424
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x16b8a
movq 0x48(%rsp), %rsi
incq %rsi
callq 0xc550
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x16ba1
movq 0x28(%rsp), %rsi
incq %rsi
callq 0xc550
movq 0xa8(%rsp), %rdi
cmpq %r13, %rdi
je 0x16bbe
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0xc550
movq 0xc8(%rsp), %rdi
cmpq %r15, %rdi
je 0x16bdb
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0xc550
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x1d33e
jmp 0x16bff
movq %rax, %rbx
cmpq %rbp, 0x58(%rsp)
jne 0x16c6f
jmp 0x16ca4
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x1e040
jmp 0x16c1d
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
cmpq %r13, %rdi
je 0x16c3f
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0xc550
jmp 0x16c3f
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
cmpq %r15, %rdi
je 0x16ca4
movq 0xd8(%rsp), %rsi
jmp 0x16c9c
jmp 0x16c58
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x16ca4
movq 0x28(%rsp), %rsi
jmp 0x16c9c
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x1d33e
jmp 0x16ca4
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r15, %rdi
jne 0x16c97
jmp 0x16ca4
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %rbp, %rdi
je 0x16ca4
movq 0x70(%rsp), %rsi
incq %rsi
callq 0xc550
movq %rbx, %rdi
callq 0xc9c0