// File: /workspace/github_cpp_makefile_star2_O2/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, %rbx
leaq 0x98(%rdi), %r12
leaq 0x68(%rsp), %r15
movq %r15, %rdi
callq 0xe7a0
movq %r12, %rdi
movq %r15, %rsi
callq 0x19f1e
movq %rax, %rbp
leaq 0x68(%rsp), %rdi
callq 0xe290
movq %rbx, 0x20(%rsp)
addq $0xa0, %rbx
leaq 0x20(%r14), %rsi
leaq 0x68(%rsp), %r15
movq %r15, %rdi
movq %rsi, 0x18(%rsp)
callq 0xe7a0
movq %rbx, 0x10(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x19fde
movq %rax, %r15
leaq 0x68(%rsp), %rdi
callq 0xe290
movsd 0x40(%r14), %xmm0
movsd %xmm0, 0x8(%rsp)
movq (%r12), %rax
movq -0x8(%rax), %r13
cmpq %r13, %rbp
je 0x153fb
leaq 0x20(%rbp), %rdx
leaq 0x68(%rsp), %rbx
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x219ca
movq (%rsp), %rdi
movq %rbx, %rsi
callq 0x1a02e
movsd 0x40(%rax), %xmm0
ucomisd 0x8(%rsp), %xmm0
jbe 0x15527
movq 0x10(%rsp), %rax
movq (%rax), %rax
cmpq -0x8(%rax), %r15
jne 0x15409
leaq 0x68(%rsp), %rdi
callq 0x19672
jmp 0x1545f
movq 0x10(%rsp), %rax
movq (%rax), %rax
cmpq -0x8(%rax), %r15
je 0x1545f
movq %r15, %rdx
addq $0x20, %rdx
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
callq 0x219ca
leaq 0x28(%rsp), %rsi
movq (%rsp), %rdi
callq 0x1a02e
movsd 0x40(%rax), %xmm0
movsd %xmm0, (%rsp)
leaq 0x28(%rsp), %rdi
callq 0x19672
cmpq %r13, %rbp
je 0x1544e
leaq 0x68(%rsp), %rdi
callq 0x19672
movsd (%rsp), %xmm0
ucomisd 0x8(%rsp), %xmm0
jbe 0x15531
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe7a0
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1a07c
leaq 0x28(%rsp), %rdi
callq 0xe290
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
movq 0x18(%rsp), %r15
movq %r15, %rsi
callq 0xe7a0
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x1a0cc
movq 0x20(%rsp), %rbx
leaq 0x28(%rsp), %rdi
callq 0xe290
leaq 0xc8(%rsp), %rdi
movq %r14, %rsi
callq 0xe7a0
leaq 0xa8(%rsp), %rdi
movq %r15, %rsi
callq 0xe7a0
leaq 0x28(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0xa8(%rsp), %rdx
callq 0x3c3b8
movq 0x8(%rbx), %rdi
addq $-0x10, %rdi
leaq 0x28(%rsp), %rsi
callq 0x3c3ee
leaq 0x28(%rsp), %rdi
callq 0x1a11c
leaq 0xa8(%rsp), %rdi
callq 0xe290
leaq 0xc8(%rsp), %rdi
callq 0xe290
jmp 0x15531
leaq 0x68(%rsp), %rdi
callq 0x19672
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x19672
jmp 0x15555
movq %rax, %rbx
cmpq %r13, %rbp
jne 0x15599
jmp 0x155b4
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x1a11c
jmp 0x1556e
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0xe290
jmp 0x15580
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
jmp 0x155af
jmp 0x1558c
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
jmp 0x155af
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x19672
jmp 0x155b4
jmp 0x155a7
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0xe290
movq %rbx, %rdi
callq 0xe9f0