// File: /workspace/github_cpp_makefile_star2_O3/fjamour[P]icentral/src/bcc_scratch.cc
// Function: bcc_scratch_t::bc_iter(unsigned int, 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>>>&)
void bcc_scratch_t::bc_iter(node_id_t s, tr1::unordered_map<node_id_t,double>& bc_map) {
    vector<vector<node_id_t> >&  P = bcc_fast_subgraph.P;
    vector<int>&                 path_cnt_map = bcc_fast_subgraph.path_cnt_vec;
    vector<int>&                 dist_map = bcc_fast_subgraph.dist_vec;
    vector<double>&              pair_dep_map = bcc_fast_subgraph.pair_dep_vec;
    vector<double>&              sigma_t_map = bcc_fast_subgraph.sigma_t_map;
    queue<node_id_t>&            Q = bcc_fast_subgraph.Q;
    stack<node_id_t>             S;

    bcc_fast_subgraph.init_maps();
    path_cnt_map[s] = 1;
    dist_map[s] = 0;

    Q.push(s);
    while (!Q.empty()) {
        node_id_t v_i = Q.front();
        Q.pop();
        S.push(v_i);
        for(int i = 0; i < bcc_fast_subgraph.nodes_vec[v_i].size(); ++i) {
            node_id_t v_n = bcc_fast_subgraph.nodes_vec[v_i][i];
            if (dist_map[v_n] < 0) {
                Q.push(v_n);
                dist_map[v_n] = dist_map[v_i] + 1;
            }
            if (dist_map[v_n] == dist_map[v_i] + 1) {
                path_cnt_map[v_n] = path_cnt_map[v_n] + path_cnt_map[v_i];
                P[v_n].push_back(v_i);
            }
        }
    }
    while (!S.empty()) {
        node_id_t v_n = S.top();
        S.pop();
        if (art_pt_map.find(s) != art_pt_map.end()
                && art_pt_map.find(v_n) != art_pt_map.end()
                && s != v_n) {
            int VG_s, VG_n;
            VG_s = accumulate(art_pt_map[s].begin(), art_pt_map[s].end(), 0);
            VG_n = accumulate(art_pt_map[v_n].begin(), art_pt_map[v_n].end(), 0);
            int c_t = VG_s*VG_n;
            sigma_t_map[v_n] = sigma_t_map[v_n] + c_t;
            
            node_id_t new_v_n = bcc_fast_subgraph.inout_label_map[v_n];
            bc_map[new_v_n] = bc_map[new_v_n] + c_t;
        }
        for (int i = 0; i < P[v_n].size(); ++i) {
            node_id_t v_p = P[v_n][i];
            double sp_sn = ((double) path_cnt_map[v_p] / path_cnt_map[v_n]);
            pair_dep_map[v_p] = pair_dep_map[v_p] + sp_sn * (1 + pair_dep_map[v_n]);
            if (art_pt_map.find(s) != art_pt_map.end()) {
                sigma_t_map[v_p] = sigma_t_map[v_p] + sigma_t_map[v_n] * sp_sn;
                
                node_id_t new_v_p = bcc_fast_subgraph.inout_label_map[v_p];
                bc_map[new_v_p] = bc_map[new_v_p] + sigma_t_map[v_n] * sp_sn;
            }
        }
        if (s != v_n) {
            node_id_t new_v_n = bcc_fast_subgraph.inout_label_map[v_n];
            bc_map[new_v_n] = bc_map[new_v_n] + pair_dep_map[v_n];
        }
        if (art_pt_map.find(s) != art_pt_map.end()) {
            int VG_s = accumulate(art_pt_map[s].begin(), art_pt_map[s].end(), 0);
            
            node_id_t new_v_n = bcc_fast_subgraph.inout_label_map[v_n];
            bc_map[new_v_n] = bc_map[new_v_n] + pair_dep_map[v_n] * VG_s * 2;
        }
    }    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movl %esi, 0x14(%rsp)
leaq 0x2d8(%rdi), %r15
xorpd %xmm0, %xmm0
leaq 0x30(%rsp), %rdi
movapd %xmm0, 0x40(%rdi)
movapd %xmm0, 0x30(%rdi)
movapd %xmm0, 0x20(%rdi)
movapd %xmm0, 0x10(%rdi)
movapd %xmm0, (%rdi)
xorl %esi, %esi
callq 0x6ad0
movq %r15, %rdi
callq 0x2e742
leaq 0x480(%r14), %r12
movl %ebp, %eax
movq 0x380(%r14), %rcx
movl $0x1, (%rcx,%rax,4)
movl 0x14(%rsp), %eax
movq 0x3b0(%r14), %rcx
movl $0x0, (%rcx,%rax,4)
movq 0x4b0(%r14), %rax
movq 0x4c0(%r14), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x13ce7
movl 0x14(%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x4b0(%r14)
jmp 0x13cfb
leaq 0x14(%rsp), %rsi
movq %r12, %rdi
callq 0x75be
movq 0x4b0(%r14), %rax
movq 0x490(%r14), %rcx
cmpq %rcx, %rax
je 0x13e63
leaq 0xc(%rsp), %rbp
movl (%rcx), %eax
movl %eax, 0xc(%rsp)
movq %r12, %rdi
callq 0xddae
movq 0x60(%rsp), %rcx
movq 0x70(%rsp), %rax
addq $-0x4, %rax
cmpq %rax, %rcx
je 0x13d42
movl 0xc(%rsp), %eax
movl %eax, (%rcx)
addq $0x4, %rcx
movq %rcx, 0x60(%rsp)
jmp 0x13d53
leaq 0x30(%rsp), %rdi
movq %rbp, %rsi
callq 0x75be
movl 0xc(%rsp), %eax
movl %eax, %ecx
movq (%r15), %rdx
leaq (%rcx,%rcx,2), %rsi
movq (%rdx,%rsi,8), %rcx
cmpq %rcx, 0x8(%rdx,%rsi,8)
je 0x13e4f
xorl %r13d, %r13d
movl (%rcx,%r13,4), %edx
movl %edx, 0x10(%rsp)
movq 0x3b0(%r14), %rcx
movl (%rcx,%rdx,4), %esi
testl %esi, %esi
jns 0x13dd9
movq 0x4b0(%r14), %rax
movq 0x4c0(%r14), %rsi
addq $-0x4, %rsi
cmpq %rsi, %rax
je 0x13daa
movl %edx, (%rax)
addq $0x4, %rax
movq %rax, 0x4b0(%r14)
jmp 0x13dbe
movq %r12, %rdi
leaq 0x10(%rsp), %rsi
callq 0x75be
movq 0x3b0(%r14), %rcx
movl 0xc(%rsp), %eax
movl (%rcx,%rax,4), %eax
incl %eax
movl 0x10(%rsp), %edx
movl %eax, (%rcx,%rdx,4)
movl 0x10(%rsp), %edx
movl (%rcx,%rdx,4), %esi
movl 0xc(%rsp), %eax
movl %eax, %edi
movl (%rcx,%rdi,4), %ecx
incl %ecx
cmpl %ecx, %esi
jne 0x13e2a
movq 0x380(%r14), %rax
movl (%rax,%rdi,4), %ecx
addl %ecx, (%rax,%rdx,4)
movl 0x10(%rsp), %eax
movq 0x368(%r14), %rcx
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x13e1e
movl 0xc(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x13e2a
movq %rbp, %rdx
callq 0x6f14
movl 0xc(%rsp), %eax
incq %r13
movl %eax, %ecx
movq (%r15), %rdx
leaq (%rcx,%rcx,2), %rsi
movq (%rdx,%rsi,8), %rcx
movq 0x8(%rdx,%rsi,8), %rdx
subq %rcx, %rdx
sarq $0x2, %rdx
cmpq %r13, %rdx
ja 0x13d6e
movq 0x490(%r14), %rcx
cmpq %rcx, 0x4b0(%r14)
jne 0x13d10
movq 0x60(%rsp), %rax
cmpq 0x40(%rsp), %rax
je 0x142b3
movl $0x1fc, %ebp            # imm = 0x1FC
leaq 0x14(%rsp), %r15
leaq 0x10(%rsp), %r12
movq 0x68(%rsp), %rdi
cmpq %rdi, %rax
je 0x13e99
movl -0x4(%rax), %ecx
addq $-0x4, %rax
movl %ecx, 0xc(%rsp)
jmp 0x13edc
movq 0x78(%rsp), %rax
movq -0x8(%rax), %rax
movl 0x1fc(%rax), %eax
movl %eax, 0xc(%rsp)
movl $0x200, %esi            # imm = 0x200
callq 0x2250
movq 0x78(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x78(%rsp)
movq -0x8(%rax), %rax
movq %rax, 0x68(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x70(%rsp)
addq %rbp, %rax
movq %rax, 0x60(%rsp)
movl 0x14(%rsp), %esi
movq 0x8(%r14), %rdi
movq 0x10(%r14), %r8
movq %rsi, %rax
xorl %edx, %edx
divq %r8
movq (%rdi,%rdx,8), %rax
testq %rax, %rax
je 0x13f0c
cmpl (%rax), %esi
je 0x140d6
movq 0x20(%rax), %rax
jmp 0x13ef9
movl 0xc(%rsp), %ecx
movl %ecx, %edi
movq 0x368(%r14), %r8
leaq (%rdi,%rdi,2), %rdx
movq (%r8,%rdx,8), %rax
cmpq %rax, 0x8(%r8,%rdx,8)
je 0x14052
xorl %r13d, %r13d
movl (%rax,%r13,4), %r9d
movq 0x380(%r14), %rax
movq 0x3c8(%r14), %rdx
xorps %xmm1, %xmm1
cvtsi2sdl (%rax,%r9,4), %xmm1
xorps %xmm0, %xmm0
cvtsi2sdl (%rax,%rdi,4), %xmm0
divsd %xmm0, %xmm1
movsd (%rdx,%rdi,8), %xmm0
addsd 0x1c0cd(%rip), %xmm0    # 0x30030
mulsd %xmm1, %xmm0
addsd (%rdx,%r9,8), %xmm0
movsd %xmm0, (%rdx,%r9,8)
movl 0x14(%rsp), %esi
movq 0x8(%r14), %r10
movq 0x10(%r14), %r11
movq %rsi, %rax
xorl %edx, %edx
divq %r11
movq (%r10,%rdx,8), %rax
testq %rax, %rax
je 0x14030
cmpl (%rax), %esi
je 0x13f9e
movq 0x20(%rax), %rax
jmp 0x13f8b
cmpq (%r10,%r11,8), %rax
je 0x14030
movq 0x410(%r14), %rax
movsd (%rax,%rdi,8), %xmm0
movsd %xmm1, 0x18(%rsp)
mulsd %xmm1, %xmm0
addsd (%rax,%r9,8), %xmm0
movsd %xmm0, (%rax,%r9,8)
movq 0x320(%r14), %rax
movl (%rax,%r9,4), %eax
movl %eax, 0x10(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0xd8ce
movsd (%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
movl 0xc(%rsp), %eax
movq 0x410(%r14), %rcx
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0x28(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0xd8ce
movsd 0x28(%rsp), %xmm0
mulsd 0x18(%rsp), %xmm0
addsd 0x20(%rsp), %xmm0
movsd %xmm0, (%rax)
movl 0xc(%rsp), %ecx
movq 0x368(%r14), %r8
incq %r13
movl %ecx, %edi
leaq (%rdi,%rdi,2), %rdx
movq (%r8,%rdx,8), %rax
movq 0x8(%r8,%rdx,8), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %r13, %rdx
ja 0x13f2f
cmpl %ecx, 0x14(%rsp)
je 0x140b0
movq 0x320(%r14), %rax
movl (%rax,%rdi,4), %eax
movl %eax, 0x10(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0xd8ce
movsd (%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
movl 0xc(%rsp), %eax
movq 0x3c8(%r14), %rcx
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0x20(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0xd8ce
movsd 0x18(%rsp), %xmm0
addsd 0x20(%rsp), %xmm0
movsd %xmm0, (%rax)
movl 0x14(%rsp), %ecx
movl %ecx, %eax
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdi
xorl %edx, %edx
divq %rdi
movq (%rsi,%rdx,8), %rax
testq %rax, %rax
je 0x141ba
cmpl (%rax), %ecx
je 0x1410a
movq 0x20(%rax), %rax
jmp 0x140c3
movq (%rdi,%r8,8), %r9
movl 0xc(%rsp), %ecx
cmpq %r9, %rax
je 0x13f10
movq %rcx, %rax
xorl %edx, %edx
divq %r8
movq (%rdi,%rdx,8), %rax
testq %rax, %rax
je 0x13f10
cmpl (%rax), %ecx
je 0x141cf
movq 0x20(%rax), %rax
jmp 0x140f3
cmpq (%rsi,%rdi,8), %rax
je 0x141ba
movq %r14, %rdi
movq %r15, %rsi
callq 0x6088
movq (%rax), %r13
movq %r14, %rdi
movq %r15, %rsi
callq 0x6088
movq 0x8(%rax), %rax
cmpq %rax, %r13
je 0x1414e
xorl %ecx, %ecx
addl (%r13), %ecx
addq $0x4, %r13
cmpq %rax, %r13
jne 0x14138
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
jmp 0x14152
xorpd %xmm0, %xmm0
movsd %xmm0, 0x18(%rsp)
movl 0xc(%rsp), %eax
movq 0x320(%r14), %rcx
movl (%rcx,%rax,4), %eax
movl %eax, 0x10(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0xd8ce
movsd (%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
movl 0xc(%rsp), %eax
movq 0x3c8(%r14), %rcx
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0x28(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0xd8ce
movsd 0x28(%rsp), %xmm0
mulsd 0x18(%rsp), %xmm0
addsd %xmm0, %xmm0
addsd 0x20(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x60(%rsp), %rax
cmpq 0x40(%rsp), %rax
jne 0x13e82
jmp 0x142b3
cmpl %ecx, %esi
je 0x13f10
cmpq %r9, %rax
je 0x13f10
movq %r14, %rdi
movq %r15, %rsi
callq 0x6088
movq (%rax), %rbp
movq %r14, %rdi
movq %r15, %rsi
callq 0x6088
movq 0x8(%rax), %rax
xorl %r13d, %r13d
cmpq %rax, %rbp
je 0x1420f
addl (%rbp), %r13d
addq $0x4, %rbp
jmp 0x14200
movq %r14, %rdi
leaq 0xc(%rsp), %rsi
callq 0x6088
movq (%rax), %rbp
movq %r14, %rdi
leaq 0xc(%rsp), %rsi
callq 0x6088
movq 0x8(%rax), %rcx
xorl %eax, %eax
cmpq %rcx, %rbp
je 0x14240
addl (%rbp), %eax
addq $0x4, %rbp
jmp 0x14232
imull %r13d, %eax
movl 0xc(%rsp), %ecx
movq 0x410(%r14), %rdx
cvtsi2sd %eax, %xmm1
movsd (%rdx,%rcx,8), %xmm0
movsd %xmm1, 0x18(%rsp)
addsd %xmm1, %xmm0
movsd %xmm0, (%rdx,%rcx,8)
movq 0x320(%r14), %rax
movl (%rax,%rcx,4), %eax
movl %eax, 0x10(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0xd8ce
movsd (%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0xd8ce
movsd 0x20(%rsp), %xmm0
addsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movl 0xc(%rsp), %ecx
movl $0x1fc, %ebp            # imm = 0x1FC
jmp 0x13f10
leaq 0x30(%rsp), %rdi
callq 0x690a
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x142df
jmp 0x142df
jmp 0x142df
jmp 0x142df
jmp 0x142df
jmp 0x142df
jmp 0x142df
jmp 0x142df
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x690a
movq %rbx, %rdi
callq 0x23b0