// File: /workspace/github_cpp_makefile_star2_O1/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, 0x28(%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 0x19fff
leaq 0x98(%rdx), %r12
leaq 0x40(%rsp), %rbx
addq $0xa0, %rdx
movq %rdx, 0x10(%rsp)
movl $0x0, 0x8(%rsp)
movl $0x0, 0xc(%rsp)
movq %rbx, 0x30(%rsp)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x30(%rsp), %r15
movq %r15, %rdi
callq 0x28d6a
movq 0x18(%rsp), %rdi
movq %r15, %rsi
callq 0x213e8
movq %rax, %r13
movq 0x30(%rsp), %rdi
cmpq %rbx, %rdi
leaq 0x80(%rsp), %r15
je 0x19e57
movq 0x40(%rsp), %rsi
incq %rsi
callq 0xd550
movq %r15, 0x70(%rsp)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
leaq 0x70(%rsp), %rbx
movq %rbx, %rdi
callq 0x28d6a
movq 0x28(%rsp), %rdi
movq %rbx, %rsi
callq 0x213e8
movq %rax, %rbx
movq 0x70(%rsp), %rdi
cmpq %r15, %rdi
je 0x19e9e
movq 0x80(%rsp), %rsi
incq %rsi
callq 0xd550
addq $0x30, %r13
movq %r13, %rdi
callq 0x2213c
movq %rax, %rbp
leaq 0x30(%rbx), %r13
testq %rax, %rax
je 0x19f50
addq $0x31, %rbx
movq %rbx, 0x20(%rsp)
leaq 0x10(%rbp), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1f12e
movq %rax, %r15
movq (%r12), %rax
cmpq -0x8(%rax), %r15
je 0x19f43
addq $0x20, %r15
movq %r13, %rdi
movq %r15, %rsi
callq 0x22178
movzbl (%r13), %ecx
andl $0x1, %ecx
addq 0x20(%rsp), %rcx
movq %r13, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x29098
testq %rax, %rax
je 0x19f43
movq 0x18(%rbp), %rdx
movl $0x1, %eax
cmpq 0x8(%r14), %rdx
jne 0x19f3f
testq %rdx, %rdx
je 0x19f3a
movq (%r14), %rsi
movq (%rbx), %rdi
callq 0xd570
cmpl $0x1, %eax
movl $0x0, %eax
adcl $0x1, %eax
jmp 0x19f3f
movl $0x2, %eax
addl %eax, 0x8(%rsp)
movq (%rbp), %rbp
testq %rbp, %rbp
jne 0x19ec3
movq %r13, %rdi
callq 0x2213c
movq %rax, %r15
testq %rax, %rax
movl $0x0, %ebp
je 0x19fc1
leaq 0x10(%r15), %rbx
movq 0x10(%rsp), %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0x1f1b6
movq (%r13), %rcx
cmpq -0x8(%rcx), %rax
je 0x19fb9
movq 0x18(%r15), %rdx
movl $0x1, %eax
cmpq 0x28(%r14), %rdx
jne 0x19fb5
testq %rdx, %rdx
je 0x19fb0
movq 0x20(%r14), %rsi
movq (%rbx), %rdi
callq 0xd570
cmpl $0x1, %eax
movl $0x0, %eax
adcl $0x1, %eax
jmp 0x19fb5
movl $0x2, %eax
addl %eax, 0xc(%rsp)
movq (%r15), %r15
testq %r15, %r15
jne 0x19f65
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 0x19e0c
cvtsi2sdl 0xc(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
jmp 0x1a011
xorpd %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
movl $0x0, 0x8(%rsp)
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
callq 0xe982
movq (%rbx), %r14
cmpq 0x8(%rbx), %r14
je 0x1a0c7
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 0x28d6a
movq 0x18(%rsp), %rdi
movq %r15, %rsi
callq 0x213e8
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r13, %rdi
je 0x1a07d
movq 0x60(%rsp), %rsi
incq %rsi
callq 0xd550
movq %rbx, %r12
addq $0x30, %r12
addl 0x40(%rbx), %ebp
movq %r12, %rdi
movq %r14, %rsi
callq 0x22178
movzbl 0x30(%rbx), %ecx
andl $0x1, %ecx
addq %rbx, %rcx
addq $0x31, %rcx
movq %r12, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x29098
cmpq $0x1, %rax
sbbl $-0x1, %ebp
addq $0x20, %r14
cmpq 0x98(%rsp), %r14
jne 0x1a03f
movq 0x5eeca(%rip), %rdi     # 0x78f98
leaq 0x2f8c9(%rip), %rsi     # 0x4999e
movl $0x11, %edx
callq 0xd620
movl 0x8(%rsp), %r14d
movl %r14d, %esi
shrl $0x1f, %esi
addl %r14d, %esi
sarl %esi
movq 0x5eea2(%rip), %rdi     # 0x78f98
callq 0xd9a0
movq %rax, %rbx
leaq 0x2f8ab(%rip), %rsi     # 0x499b0
movl $0x3, %edx
movq %rax, %rdi
callq 0xd620
movl %ebp, %esi
shrl $0x1f, %esi
addl %ebp, %esi
sarl %esi
movq %rbx, %rdi
callq 0xd9a0
movq %rax, %rbx
leaq 0x2f88d(%rip), %rsi     # 0x499ba
movl $0x3, %edx
movq %rax, %rdi
callq 0xd620
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
cvtsi2sd %ebp, %xmm1
movsd %xmm0, 0x20(%rsp)
divsd %xmm1, %xmm0
mulsd 0x2ef00(%rip), %xmm0    # 0x49058
movq %rbx, %rdi
callq 0xd910
leaq 0x2f84d(%rip), %rsi     # 0x499b4
movl $0x2, %edx
movq %rax, %rdi
callq 0xd620
movq 0x5ee1d(%rip), %rdi     # 0x78f98
leaq 0x2f835(%rip), %rsi     # 0x499b7
movl $0x6, %edx
callq 0xd620
movsd 0x20(%rsp), %xmm0
divsd 0x10(%rsp), %xmm0
mulsd 0x2eeb8(%rip), %xmm0    # 0x49058
movq 0x5edf1(%rip), %rdi     # 0x78f98
callq 0xd910
leaq 0x2f801(%rip), %rsi     # 0x499b4
movl $0x2, %edx
movq %rax, %rdi
callq 0xd620
leaq 0x90(%rsp), %rdi
callq 0x1d3ca
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1a23f
jmp 0x1a23f
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r13, %rdi
je 0x1a242
movq 0x60(%rsp), %rsi
incq %rsi
callq 0xd550
jmp 0x1a242
movq %rbx, %rcx
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %rcx, %rdi
je 0x1a24f
movq 0x40(%rsp), %rsi
jmp 0x1a22b
movq %rax, %rbx
movq 0x70(%rsp), %rdi
cmpq %r15, %rdi
je 0x1a24f
movq 0x80(%rsp), %rsi
incq %rsi
callq 0xd550
jmp 0x1a24f
jmp 0x1a237
movq %rax, %rdi
callq 0x1d63c
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x1d3ca
movq %rbx, %rdi
callq 0xd9c0