// File: /workspace/github_cpp_makefile_star2_O1/fjamour[P]icentral/src/_bc.cc
// Function: BBFS(iter_info_t&, component_t&, unsigned int)
void BBFS(
        iter_info_t&    iter_info,  // iteration info to be computed
        component_t&    comp,       // component
        node_id_t       s          // source of the iteration
        )
{
    subgraph_t& g = comp.subgraph;
    
    vector<vector<node_id_t> >&  P = iter_info.P; 
    vector<int>&                 sigma_vec = iter_info.sigma_vec;
    vector<int>&                 dist_vec = iter_info.dist_vec;
    vector<node_id_t>&           S = iter_info.S;
    
    queue<node_id_t>             Q;
    
    // Assumes iter_info is initialized
    sigma_vec[s] = 1;
    dist_vec[s] = 0;
    Q.push(s);
    while(!Q.empty()) {
        node_id_t v_i = Q.front(); Q.pop();
        S.push_back(v_i);
        for(int i = 0; i < g.nodes_vec[v_i].size(); ++i) {
            node_id_t v_n = g.nodes_vec[v_i][i];
            if(dist_vec[v_n] < 0) {
                Q.push(v_n);
                dist_vec[v_n] = dist_vec[v_i] + 1;
            }
            if(dist_vec[v_n] == dist_vec[v_i] + 1) {
                sigma_vec[v_n] = sigma_vec[v_n] + sigma_vec[v_i];
                P[v_n].push_back(v_i);
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, 0xc(%rsp)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r15
movaps %xmm0, 0x40(%r15)
movaps %xmm0, 0x30(%r15)
movaps %xmm0, 0x20(%r15)
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
movq %r15, %rdi
xorl %esi, %esi
callq 0x6b50
movl 0xc(%rsp), %eax
movq 0x18(%r14), %rcx
movl $0x1, (%rcx,%rax,4)
movl 0xc(%rsp), %eax
movq 0x30(%r14), %rcx
movl $0x0, (%rcx,%rax,4)
movq 0x30(%r15), %rax
movq 0x40(%r15), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x41d6
movl 0xc(%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x41e5
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x7644
movq 0x20(%rsp), %rax
cmpq %rax, 0x40(%rsp)
je 0x4387
leaq 0x100(%r14), %rcx
movq %rcx, 0x60(%rsp)
leaq 0x4(%rsp), %r12
leaq 0x10(%rsp), %r13
leaq 0x8(%rsp), %rbp
movl (%rax), %ecx
movl %ecx, 0x4(%rsp)
movq 0x30(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x422a
addq $0x4, %rax
jmp 0x425c
movq 0x28(%rsp), %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x2250
movq 0x38(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x38(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x28(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x30(%rsp)
movq %rax, 0x20(%rsp)
movq 0x108(%r14), %rsi
cmpq 0x110(%r14), %rsi
je 0x4284
movl 0x4(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x108(%r14)
jmp 0x4291
movq 0x60(%rsp), %rdi
movq %r12, %rdx
callq 0x6f98
movl 0x4(%rsp), %eax
movq (%rbx), %rcx
leaq (%rax,%rax,2), %rdx
movq (%rcx,%rdx,8), %rax
cmpq %rax, 0x8(%rcx,%rdx,8)
je 0x4377
xorl %r15d, %r15d
movl (%rax,%r15,4), %eax
movl %eax, 0x8(%rsp)
movq 0x30(%r14), %rcx
cmpl $0x0, (%rcx,%rax,4)
jns 0x42ff
movq 0x40(%rsp), %rcx
movq 0x50(%rsp), %rdx
addq $-0x4, %rdx
cmpq %rdx, %rcx
je 0x42e0
movl %eax, (%rcx)
addq $0x4, %rcx
movq %rcx, 0x40(%rsp)
jmp 0x42eb
movq %r13, %rdi
movq %rbp, %rsi
callq 0x7644
movl 0x4(%rsp), %eax
movq 0x30(%r14), %rcx
movl (%rcx,%rax,4), %eax
incl %eax
movl 0x8(%rsp), %edx
movl %eax, (%rcx,%rdx,4)
movl 0x8(%rsp), %eax
movq 0x30(%r14), %rdx
movl 0x4(%rsp), %ecx
movl (%rdx,%rcx,4), %esi
incl %esi
cmpl %esi, (%rdx,%rax,4)
jne 0x4350
movq 0x18(%r14), %rdx
movl (%rdx,%rcx,4), %ecx
addl %ecx, (%rdx,%rax,4)
movl 0x8(%rsp), %eax
movq (%r14), %rcx
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x4348
movl 0x4(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x4350
movq %r12, %rdx
callq 0x6f98
incq %r15
movl 0x4(%rsp), %eax
movq (%rbx), %rcx
leaq (%rax,%rax,2), %rdx
movq (%rcx,%rdx,8), %rax
movq 0x8(%rcx,%rdx,8), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r15, %rcx
ja 0x42ae
movq 0x20(%rsp), %rax
cmpq %rax, 0x40(%rsp)
jne 0x4210
leaq 0x10(%rsp), %rdi
callq 0x6998
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x43a4
jmp 0x43a4
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x6998
movq %rbx, %rdi
callq 0x23b0