// File: /workspace/github_cpp_makefile_star2_O3/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 %rsi, 0x20(%rsp)
movq %rdi, 0x18(%rsp)
movq 0x98(%rdx), %rax
movq -0x8(%rax), %rax
movq 0x48(%rax), %rcx
movq (%rcx), %rcx
leaq -0x40(%rcx), %r14
testq %rcx, %rcx
cmoveq %rcx, %r14
xorl %ebp, %ebp
cmpq %rax, %r14
je 0x18d75
leaq 0x98(%rdx), %r12
leaq 0x40(%rsp), %rbx
addq $0xa0, %rdx
movq $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq %rbx, 0x30(%rsp)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x30(%rsp), %r15
movq %r15, %rdi
callq 0x27846
movq 0x18(%rsp), %rdi
movq %r15, %rsi
callq 0x20002
movq %rax, %r13
movq 0x30(%rsp), %rdi
cmpq %rbx, %rdi
je 0x18baa
movq 0x40(%rsp), %rsi
incq %rsi
callq 0xc550
leaq 0x80(%rsp), %rbx
movq %rbx, 0x70(%rsp)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
leaq 0x70(%rsp), %r15
movq %r15, %rdi
callq 0x27846
movq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x20002
movq %rax, %r15
movq 0x70(%rsp), %rdi
cmpq %rbx, %rdi
je 0x18bf9
movq 0x80(%rsp), %rsi
incq %rsi
callq 0xc550
addq $0x30, %r13
movq %r13, %rdi
callq 0x20d60
movq %rax, %rbp
leaq 0x30(%r15), %r13
testq %rax, %rax
je 0x18cb7
addq $0x31, %r15
movq %r15, 0x28(%rsp)
leaq 0x10(%rbp), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1dde2
movq %rax, %r15
movq (%r12), %rax
cmpq -0x8(%rax), %r15
je 0x18c9f
addq $0x20, %r15
movq %r13, %rdi
movq %r15, %rsi
callq 0x20d9c
movzbl (%r13), %ecx
andl $0x1, %ecx
addq 0x28(%rsp), %rcx
movq %r13, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x27b80
testq %rax, %rax
je 0x18c9f
movq (%rsp), %rax
leal 0x1(%rax), %r15d
movq 0x18(%rbp), %rdx
cmpq 0x8(%r14), %rdx
jne 0x18c98
testq %rdx, %rdx
je 0x18cae
movq (%r14), %rsi
movq (%rbx), %rdi
callq 0xc570
movq (%rsp), %rcx
addl $0x2, %ecx
testl %eax, %eax
cmovel %ecx, %r15d
movl %r15d, %eax
movq %rax, (%rsp)
movq (%rbp), %rbp
testq %rbp, %rbp
jne 0x18c1e
jmp 0x18cb7
movq (%rsp), %rax
addl $0x2, %eax
jmp 0x18c9b
movq %r13, %rdi
callq 0x20d60
movq %rax, %r15
testq %rax, %rax
movq 0x10(%rsp), %rbp
je 0x18d35
leaq 0x10(%r15), %rbx
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x1de6a
movq (%rbp), %rcx
cmpq -0x8(%rcx), %rax
je 0x18d21
movq 0x8(%rsp), %rax
leal 0x1(%rax), %ebp
movq 0x18(%r15), %rdx
cmpq 0x28(%r14), %rdx
jne 0x18d15
testq %rdx, %rdx
je 0x18d2b
movq 0x20(%r14), %rsi
movq (%rbx), %rdi
callq 0xc570
movq 0x8(%rsp), %rcx
addl $0x2, %ecx
testl %eax, %eax
cmovel %ecx, %ebp
movl %ebp, %eax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rbp
movq (%r15), %r15
testq %r15, %r15
jne 0x18ccc
jmp 0x18d35
movq 0x8(%rsp), %rax
addl $0x2, %eax
jmp 0x18d17
movq 0x48(%r14), %rax
addq $0x40, %r14
movq (%rax), %rcx
cmpq %r14, %rcx
cmoveq %rax, %rcx
leaq -0x40(%rcx), %r14
testq %rcx, %rcx
cmoveq %rcx, %r14
movq (%r12), %rax
cmpq -0x8(%rax), %r14
leaq 0x40(%rsp), %rbx
jne 0x18b67
cvtsi2sdl 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
xorl %ebp, %ebp
jmp 0x18d87
xorpd %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
movq $0x0, (%rsp)
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
callq 0xd978
movq (%rbx), %r14
cmpq 0x8(%rbx), %r14
je 0x18e3d
xorl %ebp, %ebp
leaq 0x60(%rsp), %r13
leaq 0x50(%rsp), %r15
movq %r13, 0x50(%rsp)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x27846
movq 0x18(%rsp), %rdi
movq %r15, %rsi
callq 0x20002
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r13, %rdi
je 0x18df3
movq 0x60(%rsp), %rsi
incq %rsi
callq 0xc550
movq %rbx, %r12
addq $0x30, %r12
addl 0x40(%rbx), %ebp
movq %r12, %rdi
movq %r14, %rsi
callq 0x20d9c
movzbl 0x30(%rbx), %ecx
andl $0x1, %ecx
addq %rbx, %rcx
addq $0x31, %rcx
movq %r12, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x27b80
cmpq $0x1, %rax
sbbl $-0x1, %ebp
addq $0x20, %r14
cmpq 0x98(%rsp), %r14
jne 0x18db5
movq 0x5f154(%rip), %rdi     # 0x77f98
leaq 0x2fb83(%rip), %rsi     # 0x489ce
movl $0x11, %edx
callq 0xc620
movq (%rsp), %rax
movl %eax, %esi
shrl $0x1f, %esi
addl %eax, %esi
sarl %esi
movq 0x5f12f(%rip), %rdi     # 0x77f98
callq 0xc9a0
movq %rax, %rbx
leaq 0x2fb68(%rip), %rsi     # 0x489e0
movl $0x3, %edx
movq %rax, %rdi
callq 0xc620
movl %ebp, %esi
shrl $0x1f, %esi
addl %ebp, %esi
sarl %esi
movq %rbx, %rdi
callq 0xc9a0
movq %rax, %rbx
leaq 0x2fb4a(%rip), %rsi     # 0x489ea
movl $0x3, %edx
movq %rax, %rdi
callq 0xc620
xorps %xmm0, %xmm0
cvtsi2sdl (%rsp), %xmm0
cvtsi2sd %ebp, %xmm1
movsd %xmm0, (%rsp)
divsd %xmm1, %xmm0
mulsd 0x2f18e(%rip), %xmm0    # 0x48058
movq %rbx, %rdi
callq 0xc910
leaq 0x2fb0b(%rip), %rsi     # 0x489e4
movl $0x2, %edx
movq %rax, %rdi
callq 0xc620
movq 0x5f0ab(%rip), %rdi     # 0x77f98
leaq 0x2faf3(%rip), %rsi     # 0x489e7
movl $0x6, %edx
callq 0xc620
movsd (%rsp), %xmm0
divsd 0x8(%rsp), %xmm0
mulsd 0x2f147(%rip), %xmm0    # 0x48058
movq 0x5f080(%rip), %rdi     # 0x77f98
callq 0xc910
leaq 0x2fac0(%rip), %rsi     # 0x489e4
movl $0x2, %edx
movq %rax, %rdi
callq 0xc620
leaq 0x90(%rsp), %rdi
callq 0x1c0cc
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x18fb3
jmp 0x18fb3
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r13, %rdi
je 0x18fb6
movq 0x60(%rsp), %rsi
incq %rsi
callq 0xc550
jmp 0x18fb6
movq %rbx, %rcx
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %rcx, %rdi
je 0x18fc3
movq 0x40(%rsp), %rsi
jmp 0x18f9f
movq %rbx, %rcx
movq %rax, %rbx
movq 0x70(%rsp), %rdi
cmpq %rcx, %rdi
je 0x18fc3
movq 0x80(%rsp), %rsi
incq %rsi
callq 0xc550
jmp 0x18fc3
jmp 0x18fab
movq %rax, %rdi
callq 0x1c340
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x1c0cc
movq %rbx, %rdi
callq 0xc9c0