// File: /workspace/github_cpp_makefile_star2_O1/fjamour[P]icentral/src/bcc_delta.cc
// Function: bcc_delta_t::compute_bc(std::tr1::unordered_map<unsigned int, double, std::tr1::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int const, double>>>&, unsigned int, unsigned int)
void bcc_delta_t::compute_bc(tr1_map_t(double)& bc_map,
                        node_id_t src,
                        node_id_t dst)
{

    //bc_map will have for each vertex in the muc it's betweenness centrality
    bcc_subgraph.remove_edge(src, dst);
    tr1_map_t(int) d_src_vec, d_dst_vec;
    bcc_subgraph.find_sssp(src, d_src_vec);
    bcc_subgraph.find_sssp(dst, d_dst_vec);
    
    //this must be commented in general.. if it's there it makes bc_map contain deltas
    //bcc_subgraph.i_fill_map<double>(bc_map, 0);
    
    for(graph_hash_t::nodes_map_t::iterator
                        it =  bcc_subgraph.nodes_map.begin();
                        it != bcc_subgraph.nodes_map.end();
                        ++it) {
        node_id_t s = it->first;
        if(d_src_vec[s] != d_dst_vec[s]) {
            i_iteration(s, 
                    src, 
                    dst, 
                    d_src_vec[s], 
                    d_dst_vec[s], 
                    bc_map);
        }
    }
    bcc_subgraph.insert_edge(src, dst);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %edx, %ebx
movq %rsi, 0x20(%rsp)
movq %rdi, %r12
leaq 0x30(%rdi), %r15
movq %r15, %rdi
movl %edx, %esi
movl %ecx, 0xc(%rsp)
movl %ecx, %edx
callq 0x1c538
leaq 0x5(%rsp), %rax
leaq 0x7(%rsp), %r10
leaq 0x58(%rsp), %rdi
leaq 0x13(%rsp), %r14
leaq 0x28(%rsp), %rcx
leaq 0x8(%rsp), %r8
leaq 0x6(%rsp), %r9
movl $0xa, %esi
movq %r14, %rdx
pushq %rax
pushq %r10
callq 0x12c64
addq $0x10, %rsp
leaq 0x12(%rsp), %rax
leaq 0x28(%rsp), %rdi
leaq 0x6(%rsp), %rdx
leaq 0x8(%rsp), %rcx
leaq 0x7(%rsp), %r8
leaq 0x5(%rsp), %r9
movl $0xa, %esi
pushq %rax
pushq %r14
callq 0x12c64
addq $0x10, %rsp
leaq 0x58(%rsp), %rdx
movq %r15, %rdi
movl %ebx, 0x14(%rsp)
movl %ebx, %esi
callq 0x1ce10
leaq 0x28(%rsp), %rdx
movq %r15, %rdi
movl 0xc(%rsp), %esi
callq 0x1ce10
movq %r15, 0x18(%rsp)
movq 0x38(%r12), %r13
movq (%r13), %r15
testq %r15, %r15
jne 0xf628
movq 0x8(%r13), %r15
addq $0x8, %r13
jmp 0xf619
movq 0x38(%r12), %rax
movq 0x40(%r12), %rcx
cmpq (%rax,%rcx,8), %r15
je 0xf6d3
leaq 0x8(%rsp), %r14
movl (%r15), %eax
movl %eax, 0x8(%rsp)
leaq 0x58(%rsp), %rdi
movq %r14, %rsi
callq 0xd8ec
movl (%rax), %ebx
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0xd8ec
cmpl (%rax), %ebx
je 0xf6ac
movl 0x8(%rsp), %ebx
leaq 0x58(%rsp), %rdi
movq %r14, %rsi
callq 0xd8ec
movl (%rax), %ebp
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0xd8ec
movl (%rax), %r9d
subq $0x8, %rsp
movq %r12, %rdi
movl %ebx, %esi
movl 0x1c(%rsp), %edx
movl 0x14(%rsp), %ecx
movl %ebp, %r8d
pushq 0x28(%rsp)
callq 0xf732
addq $0x10, %rsp
movq 0x20(%r15), %r15
testq %r15, %r15
jne 0xf6bf
movq 0x8(%r13), %r15
addq $0x8, %r13
jmp 0xf6b0
movq 0x38(%r12), %rax
movq 0x40(%r12), %rcx
cmpq (%rax,%rcx,8), %r15
jne 0xf641
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0xc(%rsp), %edx
callq 0x1c440
leaq 0x28(%rsp), %rdi
callq 0x1272a
leaq 0x58(%rsp), %rdi
callq 0x1272a
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0xf71f
jmp 0xf712
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x1272a
leaq 0x58(%rsp), %rdi
callq 0x1272a
movq %rbx, %rdi
callq 0x23b0
nop