// File: /workspace/github_cpp_makefile_star2_O1/Kingsford-Group[P]ghost2/src/alignmentExtender.hpp
// Function: adjustWeights(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>*, std::vector<D_alpha, std::allocator<D_alpha>>*)
void adjustWeights(Graph &g1, Graph &g2, bmap *align, vector<D_alpha> *matches){
  for(int i = 0; i < matches->size(); i++){
    int count = 0;
    vlist *adj1 = g1.neighbors2((*matches)[i].get_n1());
    vlist *adj2 = g2.neighbors2((*matches)[i].get_n2());
    for(auto it = adj1->begin(); it != adj1->end(); it++){
      auto mapped = align->left.find(*it);
      if(mapped != align->left.end() && adj2->find(mapped->second) != adj2->end()) count++;
    }
    D_alpha d = (*matches)[i];
    d.set_da(d.get_da() / (count/2.0 + 1));
    (*matches)[i] = d;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rsi, 0x10(%rsp)
movq %rdi, 0x18(%rsp)
movq (%rcx), %rax
cmpq %rax, 0x8(%rcx)
je 0x17ad2
movq %rcx, %r15
movq %rdx, %r14
leaq 0x58(%rsp), %rcx
leaq 0x38(%rsp), %r13
addq $0x98, %r14
xorl %ebp, %ebp
movq %r15, (%rsp)
leaq (,%rbp,4), %r12
addq %rbp, %r12
shlq $0x4, %r12
movq %rcx, 0x48(%rsp)
movq (%rax,%r12), %rsi
movq 0x8(%rax,%r12), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %r15
movq %r15, %rdi
movq %rcx, %rbx
callq 0x28d6a
movq 0x18(%rsp), %rdi
movq %r15, %rsi
callq 0x213e8
movq %rax, %r15
movq %rbp, 0x20(%rsp)
movq 0x48(%rsp), %rdi
cmpq %rbx, %rdi
je 0x178b8
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xd550
movq (%rsp), %rax
movq (%rax), %rax
movq %r13, 0x28(%rsp)
movq 0x20(%rax,%r12), %rsi
movq 0x28(%rax,%r12), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rbp
movq %rbp, %rdi
callq 0x28d6a
movq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x213e8
movq %rax, %rbp
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x17905
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xd550
addq $0x30, %r15
movq %r15, %rdi
callq 0x2213c
movq (%rsp), %r13
movq %rax, %r15
movsd 0x31740(%rip), %xmm0    # 0x49060
testq %rax, %rax
leaq 0x68(%rsp), %rdi
je 0x179b3
movq %r12, 0x8(%rsp)
movq %rbp, %rax
addq $0x30, %rbp
leaq 0x31(%rax), %r13
xorl %ebx, %ebx
leaq 0x10(%r15), %rsi
movq %r14, %rdi
callq 0x1f12e
movq %rax, %r12
movq (%r14), %rax
cmpq -0x8(%rax), %r12
je 0x17986
addq $0x20, %r12
movq %rbp, %rdi
movq %r12, %rsi
callq 0x22178
movzbl (%rbp), %ecx
andl $0x1, %ecx
addq %r13, %rcx
movq %rbp, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x29098
cmpq $0x1, %rax
sbbl $-0x1, %ebx
movq (%r15), %r15
testq %r15, %r15
jne 0x17940
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
mulsd 0x31743(%rip), %xmm0    # 0x490e0
addsd 0x316bb(%rip), %xmm0    # 0x49060
movq (%rsp), %r13
leaq 0x68(%rsp), %rdi
movq 0x8(%rsp), %r12
movsd %xmm0, 0x8(%rsp)
movq (%r13), %rbx
leaq 0x78(%rsp), %r15
movq %r15, 0x68(%rsp)
movq (%rbx,%r12), %rsi
movq 0x8(%rbx,%r12), %rdx
addq %rsi, %rdx
movq %rdi, %r15
callq 0x28d6a
leaq 0x98(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x20(%rbx,%r12), %rsi
movq 0x28(%rbx,%r12), %rdx
addq %rsi, %rdx
leaq 0x88(%rsp), %rbp
movq %rbp, %rdi
callq 0x28d6a
addq %r12, %rbx
movups 0x40(%rbx), %xmm0
leaq 0x78(%rsp), %rbx
movups %xmm0, 0x30(%rbx)
movsd 0xa8(%rsp), %xmm0
divsd 0x8(%rsp), %xmm0
movsd %xmm0, 0xa8(%rsp)
addq (%r13), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0xd2d0
leaq 0x20(%r12), %rdi
movq %rbp, %rsi
callq 0xd2d0
movq %rbx, %r15
movupd 0x30(%rbx), %xmm0
movupd %xmm0, 0x40(%r12)
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
leaq 0x38(%rsp), %r13
je 0x17a85
movq 0x98(%rsp), %rsi
incq %rsi
callq 0xd550
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
movq 0x20(%rsp), %rbp
movq (%rsp), %r15
je 0x17aa5
movq 0x78(%rsp), %rsi
incq %rsi
callq 0xd550
incq %rbp
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
movabsq $-0x3333333333333333, %rdx # imm = 0xCCCCCCCCCCCCCCCD
imulq %rdx, %rcx
cmpq %rbp, %rcx
leaq 0x58(%rsp), %rcx
ja 0x1785c
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x48(%rsp), %rdi
cmpq %rbx, %rdi
je 0x17b42
movq 0x58(%rsp), %rsi
jmp 0x17b2b
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x17b42
movq 0x38(%rsp), %rsi
jmp 0x17b2b
movq %rax, %rdi
callq 0x1d63c
movq %rax, %r14
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x17b42
movq 0x78(%rsp), %rsi
incq %rsi
callq 0xd550
jmp 0x17b42
movq %rax, %r14
leaq 0x68(%rsp), %rdi
callq 0x1eef6
movq %r14, %rdi
callq 0xd9c0