// File: /workspace/github_cpp_makefile_star2_O2/Kingsford-Group[P]ghost2/src/alignGraphs.hpp
// Function: printICS(Graph&, Graph&, 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 printICS(Graph& G, Graph& H, bmap& result)
{
  int matchingEdges = 0;
  int edgesH = 0;
  for(auto it = result.left.begin(); it != result.left.end(); it++)
  {
    vlist *adj1 = G.neighbors2(it->first);
    vlist *adj2 = H.neighbors2(it->second);
    for(auto it2 = adj1->begin(); it2 != adj1->end(); it2++){
      auto f_a = result.left.find(*it2);
      if(f_a != result.left.end() && adj2->find(f_a->second) != adj2->end()){
        matchingEdges++;
        if(*it2 == it->first) matchingEdges++; //Double count self loops
      }
    }
    for(auto it2 = adj2->begin(); it2 != adj2->end(); it2++) 
      if(result.right.find(*it2) != result.right.end()){
        edgesH++;
        if(*it2 == it->second) edgesH++; //Double count self loops
      }
  }
  vector<string> nodesG = G.nodes();
  int edgesG = 0;
  for(auto it = nodesG.begin(); it != nodesG.end(); it++){
    vlist *n = G.neighbors2(*it);
    edgesG += n->size();
    if(n->find(*it) != n->end()) edgesG++; //Double count self loops
  }

  double ec = ((double)matchingEdges / edgesG) * 100.0;
  double ics = ((double)matchingEdges / edgesH) * 100.0;
  cout << "Edge correctness " << matchingEdges/2 << " / " << edgesG/2 << " = " << ec << "\%\n";
  cout << "ICS = " << ics << "\%\n";
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %r15
movq %rsi, 0x28(%rsp)
movq %rdi, 0x10(%rsp)
leaq 0x98(%rdx), %r13
movq 0x98(%rdx), %rax
movq -0x8(%rax), %rax
movq 0x48(%rax), %rcx
movq (%rcx), %r14
leaq -0x40(%r14), %rcx
testq %r14, %r14
cmovneq %rcx, %r14
addq $0xa0, %r15
movq $0x0, 0x18(%rsp)
leaq 0x48(%rsp), %r12
movq $0x0, 0x8(%rsp)
cmpq %rax, %r14
je 0x167c3
movq %r12, %rdi
movq %r14, %rsi
callq 0xe7a0
movq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x1b558
movq %rax, %rbx
movq %r12, %rdi
callq 0xe290
movq %r14, 0x20(%rsp)
leaq 0x20(%r14), %r12
leaq 0x88(%rsp), %rbp
movq %rbp, %rdi
movq %r12, %rsi
callq 0xe7a0
movq 0x28(%rsp), %rdi
movq %rbp, %rsi
callq 0x1b558
movq %rax, %r14
addq $0x30, %rbx
addq $0x30, %r14
movq %rbp, %rdi
callq 0xe290
movq %rbx, %rdi
callq 0x1873a
movq %rax, %rbx
testq %rbx, %rbx
je 0x16746
leaq 0x10(%rbx), %rbp
movq %r13, %rdi
movq %rbp, %rsi
callq 0x19f1e
movq (%r13), %rcx
cmpq -0x8(%rcx), %rax
je 0x16741
addq $0x20, %rax
movq %r14, %rdi
movq %rax, %rsi
callq 0x2910c
testq %rax, %rax
je 0x16741
movq %rbp, %rdi
movq 0x20(%rsp), %rsi
callq 0x186a9
movzbl %al, %eax
movq 0x8(%rsp), %rcx
addl %eax, %ecx
incl %ecx
movq %rcx, 0x8(%rsp)
movq (%rbx), %rbx
jmp 0x166f1
movq %r14, %rdi
callq 0x1873a
movq %rax, %rbx
testq %rbx, %rbx
je 0x1678f
leaq 0x10(%rbx), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x19fde
movq (%r15), %rcx
cmpq -0x8(%rcx), %rax
je 0x1678a
movq %r14, %rdi
movq %r12, %rsi
callq 0x186a9
movzbl %al, %eax
movq 0x18(%rsp), %rcx
addl %eax, %ecx
incl %ecx
movq %rcx, 0x18(%rsp)
movq (%rbx), %rbx
jmp 0x16751
movq 0x20(%rsp), %rdx
movq 0x48(%rdx), %rax
addq $0x40, %rdx
movq (%rax), %rcx
cmpq %rdx, %rcx
cmoveq %rax, %rcx
leaq -0x40(%rcx), %r14
testq %rcx, %rcx
cmoveq %rcx, %r14
movq (%r13), %rax
movq -0x8(%rax), %rax
leaq 0x48(%rsp), %r12
jmp 0x1667e
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
callq 0xf448
xorl %ebp, %ebp
movq (%rbx), %r14
leaq 0x68(%rsp), %r15
movq 0x8(%rsp), %r13
cmpq 0x38(%rsp), %r14
je 0x16833
movq %r15, %rdi
movq %r14, %rsi
callq 0xe7a0
movq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x1b558
movq %rax, %rbx
movq %rax, %r12
addq $0x30, %r12
movq %r15, %rdi
callq 0xe290
movq 0x40(%rbx), %rbx
movq %r12, %rdi
movq %r14, %rsi
callq 0x2910c
addl %ebx, %ebp
cmpq $0x1, %rax
sbbl $-0x1, %ebp
addq $0x20, %r14
jmp 0x167e4
movq 0x6675e(%rip), %rdi     # 0x7cf98
leaq 0x2a171(%rip), %rsi     # 0x409b2
callq 0xe540
movq %rax, %rdi
pushq $0x2
popq %rbx
movl %r13d, %eax
cltd
idivl %ebx
movl %eax, %esi
callq 0xe9d0
leaq 0x2a164(%rip), %rsi     # 0x409c4
movq %rax, %rdi
callq 0xe540
movq %rax, %rdi
movl %ebp, %eax
cltd
idivl %ebx
movl %eax, %esi
callq 0xe9d0
leaq 0x2a150(%rip), %rsi     # 0x409ce
movq %rax, %rdi
callq 0xe540
cvtsi2sd %r13d, %xmm0
cvtsi2sd %ebp, %xmm1
movsd %xmm0, 0x8(%rsp)
divsd %xmm1, %xmm0
mulsd 0x297b7(%rip), %xmm0    # 0x40058
movq %rax, %rdi
callq 0xe940
leaq 0x2a118(%rip), %rsi     # 0x409c8
movq %rax, %rdi
callq 0xe540
movq 0x666d9(%rip), %rdi     # 0x7cf98
leaq 0x2a105(%rip), %rsi     # 0x409cb
callq 0xe540
cvtsi2sdl 0x18(%rsp), %xmm1
movsd 0x8(%rsp), %xmm0
divsd %xmm1, %xmm0
mulsd 0x29775(%rip), %xmm0    # 0x40058
movq %rax, %rdi
callq 0xe940
leaq 0x2a0d6(%rip), %rsi     # 0x409c8
movq %rax, %rdi
callq 0xe540
leaq 0x30(%rsp), %rdi
callq 0x18718
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x16929
jmp 0x16929
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0xe290
jmp 0x1692c
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x18718
jmp 0x16952
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
jmp 0x1694d
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0xe290
movq %rbx, %rdi
callq 0xe9f0