// File: /workspace/github_cpp_makefile_star2_O1/Kingsford-Group[P]ghost2/src/localImprove.hpp
// Function: move::calcScores(Graph*, Graph*, 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>>>, double, 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, double>>>*, 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>*)
void calcScores(Graph *G, Graph *H, blastmap *dists, bmap *f)
  {
    s0 = s1 = s2 = 0;
    if(u != up){
      vlist *neighborsu = G->neighbors2(u);
      vlist *neighborsw = H->neighbors2(w);
      vlist *neighborsv = H->neighbors2(v);
      vlist *neighborsup = up == "" ? NULL : G->neighbors2(up);
      //Go thru all the edges that u is a part of, to see what changes
      for(auto it = neighborsu->begin(); it != neighborsu->end(); it++){
        auto mapped = f->left.find(*it);
        if(mapped != f->left.end()){
          string s = mapped->second;
          //There is a matching edge to w that we are losing
          if(neighborsw->find(s) != neighborsw->end()) s0--;
          if(s == v) s = w;
          else if(s == w) s = v;
          //There is a matching edge to v that we are adding
          if(neighborsv->find(s) != neighborsv->end()) s0++;
        }
      }
      if(neighborsup){
        //Go thru all the edges that up is a part of, to see what changes
        for(auto it = neighborsup->begin(); it != neighborsup->end(); it++){
          auto mapped = f->left.find(*it);
          if(mapped != f->left.end()){
            string s = mapped->second;
            //There is a matching edge to v that we are losing
            if(neighborsv->find(s) != neighborsv->end()) s0--;
            if(s == v) s = w;
            else if(s == w) s = v;
            //There is a matching edge to w that we are adding
            if(neighborsw->find(s) != neighborsw->end()) s0++;
          }
        }
      }
    }

    if(dists){
      auto uw = dists->find(make_pair(u,w));
      auto uv = dists->find(make_pair(u,v));
      s1 = (uw != dists->end() ? uw->second : 1) - (uv != dists->end() ? uv->second : 1);

      if(up != ""){
        uw = dists->find(make_pair(up,w));
        uv = dists->find(make_pair(up,v));
        s2 = (uv != dists->end() ? uv->second : 1) - (uw != dists->end() ? uw->second : 1);
      }
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %r8, 0x88(%rsp)
movq %rcx, 0x78(%rsp)
movq %rdx, %r12
movq %rsi, %r14
leaq 0x60(%rdi), %rax
movq %rax, 0x60(%rsp)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x80(%rdi)
movq $0x0, 0x90(%rdi)
movq 0x8(%rdi), %rbx
movq %rdi, 0x8(%rsp)
cmpq 0x68(%rdi), %rbx
jne 0x1fad2
testq %rbx, %rbx
je 0x1ffe9
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x60(%rax), %rsi
movq %rbx, %rdx
callq 0xd570
testl %eax, %eax
je 0x1ffe9
leaq 0x118(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x8(%rsp), %rax
movq (%rax), %rsi
addq %rsi, %rbx
leaq 0x108(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rdx
callq 0x28d6a
movq %r14, %rdi
movq %r15, %rsi
callq 0x213e8
movq %rax, %r15
movq 0x108(%rsp), %rdi
cmpq %r13, %rdi
je 0x1fb27
movq 0x118(%rsp), %rsi
incq %rsi
callq 0xd550
leaq 0xf8(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq 0xe8(%rsp), %rbx
movq %rbx, %rdi
callq 0x28d6a
movq %r12, %rdi
movq %rbx, %rsi
callq 0x213e8
movq %rax, %rbp
movq 0xe8(%rsp), %rdi
cmpq %r13, %rdi
je 0x1fb7e
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0xd550
leaq 0xd8(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x8(%rsp), %rax
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
addq %rsi, %rdx
leaq 0xc8(%rsp), %rbx
movq %rbx, %rdi
callq 0x28d6a
movq %r12, %rdi
movq %rbx, %rsi
callq 0x213e8
movq %rax, 0x70(%rsp)
movq 0xc8(%rsp), %rdi
cmpq %r13, %rdi
je 0x1fbd7
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0xd550
leaq 0x29cd6(%rip), %rsi     # 0x498b4
movq 0x60(%rsp), %rdi
callq 0xd1b0
movl %eax, %ebx
testl %eax, %eax
je 0x1fc2e
leaq 0xb8(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x8(%rsp), %rax
movq 0x60(%rax), %rsi
movq 0x68(%rax), %rdx
addq %rsi, %rdx
leaq 0xa8(%rsp), %r12
movq %r12, %rdi
callq 0x28d6a
movq %r14, %rdi
movq %r12, %rsi
callq 0x213e8
movq %rax, %r14
addq $0x30, %r14
jmp 0x1fc31
xorl %r14d, %r14d
addq $0x30, %r15
testl %ebx, %ebx
je 0x1fc5a
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1fc5a
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0xd550
movq %r14, 0x98(%rsp)
movq %r15, %rdi
callq 0x2213c
movq %rax, %r14
movq 0x8(%rsp), %rax
leaq 0x80(%rax), %rcx
movq %rcx, 0x68(%rsp)
leaq 0x20(%rax), %rcx
movq %rcx, 0x18(%rsp)
movq %rbp, 0x90(%rsp)
movq %rbp, %r13
addq $0x30, %r13
addq $0x40, %rax
movq %rax, 0x10(%rsp)
movq 0x70(%rsp), %rbp
addq $0x30, %rbp
testq %r14, %r14
je 0x1fe40
movq 0x88(%rsp), %rax
leaq 0x98(%rax), %r15
movq 0x90(%rsp), %rax
addq $0x31, %rax
movq %rax, 0x80(%rsp)
movq 0x70(%rsp), %rax
addq $0x31, %rax
movq %rax, 0xa0(%rsp)
leaq 0x20(%rsp), %r12
leaq 0x10(%r14), %rsi
movq %r15, %rdi
callq 0x1f12e
movq (%r15), %rcx
cmpq -0x8(%rcx), %rax
je 0x1fe34
leaq 0x30(%rsp), %rcx
movq %rcx, 0x20(%rsp)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x28d6a
movq %r13, %rdi
movq %r12, %rsi
callq 0x22178
movzbl (%r13), %ecx
andl $0x1, %ecx
addq 0x80(%rsp), %rcx
movq %r13, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x29098
testq %rax, %rax
je 0x1fd63
movq 0x68(%rsp), %rax
movsd (%rax), %xmm0
addsd 0x29319(%rip), %xmm0    # 0x49078
movsd %xmm0, (%rax)
movq 0x28(%rsp), %rbx
movq 0x8(%rsp), %rax
cmpq 0x48(%rax), %rbx
jne 0x1fd9b
movq 0x18(%rsp), %rsi
testq %rbx, %rbx
je 0x1fdce
movq 0x10(%rsp), %rax
movq (%rax), %rsi
movq 0x20(%rsp), %rdi
movq %rbx, %rdx
callq 0xd570
movq 0x18(%rsp), %rsi
testl %eax, %eax
je 0x1fdce
movq 0x8(%rsp), %rax
cmpq 0x28(%rax), %rbx
jne 0x1fdd6
movq 0x10(%rsp), %rsi
testq %rbx, %rbx
je 0x1fdce
movq 0x18(%rsp), %rax
movq (%rax), %rsi
movq 0x20(%rsp), %rdi
movq %rbx, %rdx
callq 0xd570
movq 0x10(%rsp), %rsi
testl %eax, %eax
jne 0x1fdd6
movq %r12, %rdi
callq 0xd2d0
movq %rbp, %rdi
movq %r12, %rsi
callq 0x22178
movzbl (%rbp), %ecx
andl $0x1, %ecx
addq 0xa0(%rsp), %rcx
movq %rbp, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x29098
testq %rax, %rax
je 0x1fe18
movq 0x68(%rsp), %rax
movsd (%rax), %xmm0
addsd 0x2924c(%rip), %xmm0    # 0x49060
movsd %xmm0, (%rax)
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x1fe34
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xd550
movq (%r14), %r14
testq %r14, %r14
jne 0x1fcea
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x1ffe9
callq 0x2213c
movq %rax, %r14
testq %rax, %rax
je 0x1ffe9
addq $0x98, 0x88(%rsp)
movq 0x70(%rsp), %rax
addq $0x31, %rax
movq %rax, 0x80(%rsp)
movq 0x90(%rsp), %rax
leaq 0x31(%rax), %r12
leaq 0x20(%rsp), %r15
leaq 0x10(%r14), %rsi
movq 0x88(%rsp), %rbx
movq %rbx, %rdi
callq 0x1f12e
movq (%rbx), %rcx
cmpq -0x8(%rcx), %rax
je 0x1ffdd
leaq 0x30(%rsp), %rcx
movq %rcx, 0x20(%rsp)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x28d6a
movq %rbp, %rdi
movq %r15, %rsi
callq 0x22178
movzbl (%rbp), %ecx
andl $0x1, %ecx
addq 0x80(%rsp), %rcx
movq %rbp, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x29098
testq %rax, %rax
je 0x1ff10
movq 0x68(%rsp), %rax
movsd (%rax), %xmm0
addsd 0x2916c(%rip), %xmm0    # 0x49078
movsd %xmm0, (%rax)
movq 0x28(%rsp), %rbx
movq 0x8(%rsp), %rax
cmpq 0x48(%rax), %rbx
jne 0x1ff48
movq 0x18(%rsp), %rsi
testq %rbx, %rbx
je 0x1ff7b
movq 0x10(%rsp), %rax
movq (%rax), %rsi
movq 0x20(%rsp), %rdi
movq %rbx, %rdx
callq 0xd570
movq 0x18(%rsp), %rsi
testl %eax, %eax
je 0x1ff7b
movq 0x8(%rsp), %rax
cmpq 0x28(%rax), %rbx
jne 0x1ff83
movq 0x10(%rsp), %rsi
testq %rbx, %rbx
je 0x1ff7b
movq 0x18(%rsp), %rax
movq (%rax), %rsi
movq 0x20(%rsp), %rdi
movq %rbx, %rdx
callq 0xd570
movq 0x10(%rsp), %rsi
testl %eax, %eax
jne 0x1ff83
movq %r15, %rdi
callq 0xd2d0
movq %r13, %rdi
movq %r15, %rsi
callq 0x22178
movzbl (%r13), %ecx
andl $0x1, %ecx
addq %r12, %rcx
movq %r13, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x29098
testq %rax, %rax
je 0x1ffc1
movq 0x68(%rsp), %rax
movsd (%rax), %xmm0
addsd 0x290a3(%rip), %xmm0    # 0x49060
movsd %xmm0, (%rax)
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x1ffdd
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xd550
movq (%r14), %r14
testq %r14, %r14
jne 0x1fe90
movq 0x78(%rsp), %r15
testq %r15, %r15
je 0x201e0
movq 0x8(%rsp), %rsi
leaq 0x20(%rsi), %r14
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rdx
callq 0x285ca
movq %r15, %rdi
movq %rbx, %rsi
callq 0x40396
movq %rax, %r12
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x20039
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xd550
leaq 0x30(%rsp), %rbp
movq -0x10(%rbp), %rdi
cmpq %rbp, %rdi
je 0x20054
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xd550
movq 0x8(%rsp), %rsi
leaq 0x40(%rsi), %r15
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rdx
callq 0x285ca
movq 0x78(%rsp), %rdi
movq %rbx, %rsi
callq 0x40396
movq %rax, %r13
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x20099
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xd550
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0x200b0
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xd550
movsd 0x28fa8(%rip), %xmm0    # 0x49060
movapd %xmm0, %xmm1
testq %r12, %r12
je 0x200c8
movsd 0x50(%r12), %xmm1
testq %r13, %r13
je 0x200d3
movsd 0x50(%r13), %xmm0
subsd %xmm0, %xmm1
movq 0x8(%rsp), %rax
movsd %xmm1, 0x88(%rax)
leaq 0x297c9(%rip), %rsi     # 0x498b4
movq 0x60(%rsp), %rdi
callq 0xd1b0
testl %eax, %eax
movq 0x78(%rsp), %r12
je 0x201e0
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
movq 0x60(%rsp), %rsi
movq %r14, %rdx
callq 0x285ca
movq %r12, %rdi
movq %rbx, %rsi
callq 0x40396
movq %rax, %r14
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x20141
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xd550
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0x20158
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xd550
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
movq 0x60(%rsp), %rsi
movq %r15, %rdx
callq 0x285ca
movq %r12, %rdi
movq %rbx, %rsi
callq 0x40396
movq %rax, %rbx
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x20197
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xd550
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0x201ae
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xd550
movsd 0x28eaa(%rip), %xmm0    # 0x49060
movapd %xmm0, %xmm1
testq %rbx, %rbx
je 0x201c4
movsd 0x50(%rbx), %xmm1
testq %r14, %r14
je 0x201cf
movsd 0x50(%r14), %xmm0
subsd %xmm0, %xmm1
movq 0x8(%rsp), %rax
movsd %xmm1, 0x90(%rax)
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2021b
jmp 0x2021b
jmp 0x2022a
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
cmpq %r13, %rdi
je 0x202a9
movq 0xb8(%rsp), %rsi
jmp 0x202a1
jmp 0x2021b
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x1e644
jmp 0x202a9
movq %rax, %rdi
callq 0x1d63c
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
cmpq %r13, %rdi
je 0x202a9
movq 0xd8(%rsp), %rsi
jmp 0x202a1
movq %rax, %rbx
movq 0xe8(%rsp), %rdi
cmpq %r13, %rdi
je 0x202a9
movq 0xf8(%rsp), %rsi
jmp 0x202a1
movq %rax, %rbx
movq 0x108(%rsp), %rdi
cmpq %r13, %rdi
je 0x202a9
movq 0x118(%rsp), %rsi
jmp 0x202a1
jmp 0x2028a
jmp 0x2028a
jmp 0x2028a
jmp 0x2028a
jmp 0x2028a
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x202a9
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xd550
movq %rbx, %rdi
callq 0xd9c0
nop