// File: /workspace/github_cpp_makefile_star2_O1/fjamour[P]icentral/src/bc.cc
// Function: brandes_iter(graph_t&, unsigned int, std::vector<double, std::allocator<double>>&)
void brandes_iter(graph_t& graph_in,
        node_id_t s,
        vector<double>& bc_vec)
{
    stack<node_id_t> S;
    vector<vector<node_id_t> > P;
    vector<int> path_cnt_vec;
    vector<int> dist_vec;
    queue<node_id_t> Q;
    vector<double> pair_dep_vec;

    P.resize(graph_in.size());
    path_cnt_vec.resize(graph_in.size());
    fill(path_cnt_vec.begin(), path_cnt_vec.end(), 0);
    path_cnt_vec[s] = 1;
    dist_vec.resize(graph_in.size());
    fill(dist_vec.begin(), dist_vec.end(), -1);
    dist_vec[s] = 0;
    pair_dep_vec.resize(graph_in.size());
    fill(pair_dep_vec.begin(), pair_dep_vec.end(), 0.0);

    Q.push(s);

    while (!Q.empty()) {
        node_id_t v = Q.front();
        Q.pop();
        S.push(v);
        vector<node_id_t> nbr_vec = graph_in.get_nbrs(v);
        for (int nbr_idx = 0; nbr_idx < nbr_vec.size(); ++nbr_idx) {
            node_id_t w = nbr_vec[nbr_idx];
            if (dist_vec[w] < 0) {
                Q.push(w);
                dist_vec[w] = dist_vec[v] + 1;
            }
            if (dist_vec[w] == dist_vec[v] + 1) {
                path_cnt_vec[w] += path_cnt_vec[v];
                P[w].push_back(v);
            }
        }
    }

    while (!S.empty()) {
        node_id_t w = S.top();
        S.pop();
        for (int idx = 0; idx < P[w].size(); ++idx) {
            node_id_t v = P[w][idx];
            pair_dep_vec[v] += (((double) path_cnt_vec[v] / path_cnt_vec[w]) * (1 + pair_dep_vec[w]));
        }
        if (w != s) {
            bc_vec[w] += pair_dep_vec[w];
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movq %rdx, %r12
movq %rdi, %r14
movl %esi, 0x8(%rsp)
xorpd %xmm0, %xmm0
leaq 0x100(%rsp), %rdi
movapd %xmm0, 0x40(%rdi)
movapd %xmm0, 0x30(%rdi)
movapd %xmm0, 0x20(%rdi)
movapd %xmm0, 0x10(%rdi)
movapd %xmm0, (%rdi)
xorl %ebx, %ebx
xorl %esi, %esi
callq 0x6b50
movq %rbx, 0x90(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x80(%rsp)
movq %rbx, 0x60(%rsp)
movapd %xmm0, 0x50(%rsp)
movq %rbx, 0x20(%rsp)
movapd %xmm0, 0x10(%rsp)
leaq 0xa0(%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 0x6b50
xorpd %xmm0, %xmm0
movapd %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
movq %r14, %rdi
callq 0x1e160
leaq 0x80(%rsp), %rdi
movq %rax, %rsi
callq 0x5eac
movq %r14, %rdi
callq 0x1e160
leaq 0x50(%rsp), %rdi
movq %rax, %rsi
callq 0xd7da
movq 0x50(%rsp), %r15
movq 0x58(%rsp), %rdx
cmpq %rdx, %r15
je 0xac25
subq %r15, %rdx
addq $-0x4, %rdx
andq $-0x4, %rdx
addq $0x4, %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x2110
movl 0x8(%rsp), %eax
movl $0x1, (%r15,%rax,4)
movq %r14, %rdi
callq 0x1e160
leaq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0xd7da
movq 0x10(%rsp), %r15
movq 0x18(%rsp), %rdx
cmpq %rdx, %r15
je 0xac71
subq %r15, %rdx
addq $-0x4, %rdx
andq $-0x4, %rdx
addq $0x4, %rdx
movq %r15, %rdi
movl $0xff, %esi
callq 0x2110
movl 0x8(%rsp), %eax
movl $0x0, (%r15,%rax,4)
movq %r14, %rdi
callq 0x1e160
leaq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0x5c58
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rdx
cmpq %rdx, %rdi
je 0xacb7
subq %rdi, %rdx
addq $-0x8, %rdx
andq $-0x8, %rdx
addq $0x8, %rdx
xorl %esi, %esi
callq 0x2110
movq 0xd0(%rsp), %rax
movq 0xe0(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0xace4
movl 0x8(%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0xd0(%rsp)
jmp 0xacf6
leaq 0xa0(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x7644
movq %r12, 0xf8(%rsp)
movq 0xb0(%rsp), %rax
cmpq %rax, 0xd0(%rsp)
je 0xaeef
leaq 0x4(%rsp), %r12
leaq 0x68(%rsp), %r13
leaq 0xa0(%rsp), %rbp
leaq 0xc(%rsp), %r15
movl (%rax), %ecx
movl %ecx, 0x4(%rsp)
movq 0xc0(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0xad48
addq $0x4, %rax
jmp 0xad89
movq 0xb8(%rsp), %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x2250
movq 0xc8(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0xc8(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0xb8(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0xc0(%rsp)
movq %rax, 0xb0(%rsp)
movq 0x130(%rsp), %rax
movq 0x140(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0xadbe
movl 0x4(%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x130(%rsp)
jmp 0xadce
leaq 0x100(%rsp), %rdi
movq %r12, %rsi
callq 0x7644
movl 0x4(%rsp), %esi
movq %r14, %rdi
callq 0x1ddf8
movq %r13, %rdi
movq %rax, %rsi
callq 0x61a0
movq 0x68(%rsp), %rdi
cmpq %rdi, 0x70(%rsp)
je 0xaec7
xorl %ebx, %ebx
movl (%rdi,%rbx,4), %eax
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rcx
cmpl $0x0, (%rcx,%rax,4)
jns 0xae52
movq 0xd0(%rsp), %rcx
movq 0xe0(%rsp), %rdx
addq $-0x4, %rdx
cmpq %rdx, %rcx
je 0xae32
movl %eax, (%rcx)
addq $0x4, %rcx
movq %rcx, 0xd0(%rsp)
jmp 0xae3d
movq %rbp, %rdi
movq %r15, %rsi
callq 0x7644
movl 0x4(%rsp), %eax
movq 0x10(%rsp), %rcx
movl (%rcx,%rax,4), %eax
incl %eax
movl 0xc(%rsp), %edx
movl %eax, (%rcx,%rdx,4)
movl 0xc(%rsp), %eax
movq 0x10(%rsp), %rdx
movl 0x4(%rsp), %ecx
movl (%rdx,%rcx,4), %esi
incl %esi
cmpl %esi, (%rdx,%rax,4)
jne 0xaeaa
movq 0x50(%rsp), %rdx
movl (%rdx,%rcx,4), %ecx
addl %ecx, (%rdx,%rax,4)
movl 0xc(%rsp), %eax
movq 0x80(%rsp), %rcx
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0xaea2
movl 0x4(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0xaeaa
movq %r12, %rdx
callq 0x6f98
incq %rbx
movq 0x68(%rsp), %rdi
movq 0x70(%rsp), %rax
subq %rdi, %rax
sarq $0x2, %rax
cmpq %rbx, %rax
ja 0xadf7
testq %rdi, %rdi
je 0xaed9
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0xb0(%rsp), %rax
cmpq %rax, 0xd0(%rsp)
jne 0xad2b
movq 0x130(%rsp), %rax
cmpq 0x110(%rsp), %rax
movq 0xf8(%rsp), %r15
je 0xb036
movl $0x200, %r14d           # imm = 0x200
movsd 0x26115(%rip), %xmm3    # 0x31030
movq 0x138(%rsp), %rdi
movq %rax, %rcx
cmpq %rdi, %rax
jne 0xaf3a
movq 0x148(%rsp), %rcx
movq -0x8(%rcx), %rcx
addq %r14, %rcx
movl -0x4(%rcx), %ebx
cmpq %rdi, %rax
je 0xaf48
addq $-0x4, %rax
jmp 0xaf8f
movl $0x200, %esi            # imm = 0x200
callq 0x2250
movsd 0x260d6(%rip), %xmm3    # 0x31030
movq 0x148(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x148(%rsp)
movq -0x8(%rax), %rax
movq %rax, 0x138(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x140(%rsp)
addq $0x1fc, %rax            # imm = 0x1FC
movq %rax, 0x130(%rsp)
movq 0x80(%rsp), %rcx
leaq (%rbx,%rbx,2), %rdx
movq (%rcx,%rdx,8), %rax
movq 0x8(%rcx,%rdx,8), %rcx
subq %rax, %rcx
je 0xb003
sarq $0x2, %rcx
movq 0x50(%rsp), %rdx
xorps %xmm0, %xmm0
cvtsi2sdl (%rdx,%rbx,4), %xmm0
movq 0x30(%rsp), %rsi
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorl %edi, %edi
movl (%rax,%rdi,4), %r8d
xorps %xmm1, %xmm1
cvtsi2sdl (%rdx,%r8,4), %xmm1
divsd %xmm0, %xmm1
movsd (%rsi,%rbx,8), %xmm2
addsd %xmm3, %xmm2
mulsd %xmm1, %xmm2
addsd (%rsi,%r8,8), %xmm2
movsd %xmm2, (%rsi,%r8,8)
incq %rdi
cmpq %rdi, %rcx
jne 0xafd1
cmpl 0x8(%rsp), %ebx
je 0xb020
movq 0x30(%rsp), %rax
movsd (%rax,%rbx,8), %xmm0
movq (%r15), %rax
addsd (%rax,%rbx,8), %xmm0
movsd %xmm0, (%rax,%rbx,8)
movq 0x130(%rsp), %rax
cmpq 0x110(%rsp), %rax
jne 0xaf1b
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xb04d
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq 0xa0(%rsp), %rdi
callq 0x6998
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xb071
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0xb088
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq 0x80(%rsp), %rdi
callq 0x60b8
leaq 0x100(%rsp), %rdi
callq 0x6998
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0xb100
jmp 0xb0bd
jmp 0xb0bd
movq %rax, %rbx
jmp 0xb0dc
movq %rax, %rbx
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0xb0dc
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xb0f3
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq 0xa0(%rsp), %rdi
callq 0x6998
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xb117
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0xb12e
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq 0x80(%rsp), %rdi
callq 0x60b8
leaq 0x100(%rsp), %rdi
callq 0x6998
movq %rbx, %rdi
callq 0x23b0