// File: /workspace/github_cpp_makefile_star2_O2/fjamour[P]icentral/src/_bc.cc
// Function: partial_BBFS_deletion(iter_info_t&, component_t&, unsigned int, std::pair<unsigned int, unsigned int>)
void partial_BBFS_deletion(
        iter_info_t&    iter_info,  // iteration info to be computed
        component_t&    comp,       // component
        node_id_t       s,          // source of the iteration
        edge_t          e           // deleted edge
        )
{
    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;
    
    //for now everything is computed from scratch, so old values are irrelevant
    iter_info.init_all(g.size());
    // Assumes iter_info is initialized
    
    // IMP: careful bitch, graph_t is not thread safe!
    //g.remove_edge(e.first, e.second);
    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(v_i == e.first && v_n == e.second || v_i == e.second && v_n == e.first) continue;
            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);
            }
        }
    }
    //g.insert_edge(e.first, e.second);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rcx, %r12
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movl %edx, 0xc(%rsp)
leaq 0x18(%rsp), %rdi
callq 0x4a40
movq %r14, %rdi
callq 0x2622a
movq %r15, %rdi
movq %rax, %rsi
callq 0x1a0fc
movl %ebp, %eax
movq 0x18(%r15), %rcx
movl $0x1, (%rcx,%rax,4)
movq 0x30(%r15), %rcx
andl $0x0, (%rcx,%rax,4)
leaq 0x18(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x62da
movq %r12, %rbx
shrq $0x20, %rbx
leaq 0x100(%r15), %rax
movq %rax, 0x10(%rsp)
leaq 0x8(%rsp), %rbp
movq 0x28(%rsp), %rax
cmpq %rax, 0x48(%rsp)
je 0x3d32
movl (%rax), %eax
movl %eax, 0x8(%rsp)
leaq 0x18(%rsp), %rdi
callq 0x650e
movq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x478c
xorl %r13d, %r13d
movl 0x8(%rsp), %eax
movq (%r14), %rdx
imulq $0x18, %rax, %rsi
movq (%rdx,%rsi), %rcx
movq 0x8(%rdx,%rsi), %rdx
subq %rcx, %rdx
sarq $0x2, %rdx
cmpq %r13, %rdx
jbe 0x3c61
movl (%rcx,%r13,4), %ecx
movl %ecx, 0x4(%rsp)
cmpl %r12d, %eax
jne 0x3cc2
cmpl %ebx, %ecx
je 0x3d2a
cmpl %ebx, %eax
jne 0x3ccb
cmpl %r12d, %ecx
je 0x3d2a
movq 0x30(%r15), %rdx
movl (%rdx,%rcx,4), %esi
testl %esi, %esi
jns 0x3d04
leaq 0x18(%rsp), %rdi
leaq 0x4(%rsp), %rsi
callq 0x62da
movl 0x8(%rsp), %eax
movq 0x30(%r15), %rdx
movl (%rdx,%rax,4), %eax
incl %eax
movl 0x4(%rsp), %ecx
movl %eax, (%rdx,%rcx,4)
movl 0x4(%rsp), %ecx
movl (%rdx,%rcx,4), %esi
movl 0x8(%rsp), %eax
movl (%rdx,%rax,4), %edx
incl %edx
cmpl %edx, %esi
jne 0x3d2a
movq 0x18(%r15), %rdx
movl (%rdx,%rax,4), %eax
addl %eax, (%rdx,%rcx,4)
movl 0x4(%rsp), %eax
imulq $0x18, %rax, %rdi
addq (%r15), %rdi
movq %rbp, %rsi
callq 0x478c
incq %r13
jmp 0x3c91
leaq 0x18(%rsp), %rdi
callq 0x5280
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3d4f
jmp 0x3d4f
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x5280
movq %rbx, %rdi
callq 0x23d0