// File: /workspace/github_cpp_makefile_star2_O3/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, %rbp
movq %rsi, %r14
movq %rdi, %r15
movl %edx, 0xc(%rsp)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, 0x40(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
xorl %esi, %esi
callq 0x6ad0
movq %r14, %rdi
callq 0x2e9da
movq %r15, %rdi
movq %rax, %rsi
callq 0x1f9ec
movl 0xc(%rsp), %eax
movq 0x18(%r15), %rcx
movl $0x1, (%rcx,%rax,4)
movl 0xc(%rsp), %eax
movq 0x30(%r15), %rcx
movl $0x0, (%rcx,%rax,4)
movq 0x40(%rsp), %rcx
movq 0x50(%rsp), %rax
addq $-0x4, %rax
cmpq %rax, %rcx
je 0x4eb6
movl 0xc(%rsp), %eax
movl %eax, (%rcx)
addq $0x4, %rcx
movq %rcx, 0x40(%rsp)
jmp 0x4eca
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x75be
movq 0x40(%rsp), %rcx
movq 0x20(%rsp), %rax
cmpq %rax, %rcx
je 0x5088
movq %rbp, %rbx
shrq $0x20, %rbx
leaq 0x100(%r15), %rcx
movq %rcx, 0x60(%rsp)
leaq 0x4(%rsp), %r13
movl (%rax), %ecx
movl %ecx, 0x4(%rsp)
movq 0x30(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x4f0a
addq $0x4, %rax
jmp 0x4f3c
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(%r15), %rsi
cmpq 0x110(%r15), %rsi
je 0x4f64
movl 0x4(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x108(%r15)
jmp 0x4f75
movq 0x60(%rsp), %rdi
movq %r13, %rdx
callq 0x6f14
movl 0x4(%rsp), %eax
movl %eax, %ecx
movq (%r14), %rdx
leaq (%rcx,%rcx,2), %rsi
movq (%rdx,%rsi,8), %rcx
cmpq %rcx, 0x8(%rdx,%rsi,8)
je 0x5078
xorl %r12d, %r12d
movl (%rcx,%r12,4), %ecx
movl %ecx, 0x8(%rsp)
cmpl %ebp, %eax
jne 0x4fa4
cmpl %ebx, %ecx
je 0x5053
cmpl %ebx, %eax
jne 0x4fb0
cmpl %ebp, %ecx
je 0x5053
movq 0x30(%r15), %rdx
movl (%rdx,%rcx,4), %esi
testl %esi, %esi
jns 0x5009
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rsi
addq $-0x4, %rsi
cmpq %rsi, %rax
je 0x4fdb
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x4fee
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x75be
movq 0x30(%r15), %rdx
movl 0x4(%rsp), %eax
movl (%rdx,%rax,4), %eax
incl %eax
movl 0x8(%rsp), %ecx
movl %eax, (%rdx,%rcx,4)
movl 0x8(%rsp), %ecx
movl (%rdx,%rcx,4), %esi
movl 0x4(%rsp), %eax
movl %eax, %edi
movl (%rdx,%rdi,4), %edx
incl %edx
cmpl %edx, %esi
jne 0x5053
movq 0x18(%r15), %rax
movl (%rax,%rdi,4), %edx
addl %edx, (%rax,%rcx,4)
movl 0x8(%rsp), %eax
movq (%r15), %rcx
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x5047
movl 0x4(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x5053
movq %r13, %rdx
callq 0x6f14
movl 0x4(%rsp), %eax
incq %r12
movl %eax, %ecx
movq (%r14), %rdx
leaq (%rcx,%rcx,2), %rsi
movq (%rdx,%rsi,8), %rcx
movq 0x8(%rdx,%rsi,8), %rdx
subq %rcx, %rdx
sarq $0x2, %rdx
cmpq %r12, %rdx
ja 0x4f90
movq 0x20(%rsp), %rax
cmpq %rax, 0x40(%rsp)
jne 0x4ef0
leaq 0x10(%rsp), %rdi
callq 0x690a
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x50a5
jmp 0x50a5
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x690a
movq %rbx, %rdi
callq 0x23b0