// File: /workspace/github_cpp_makefile_star2_O1/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 0x6b50
movq %r14, %rdi
callq 0x2ed3a
movq %r15, %rdi
movq %rax, %rsi
callq 0x1fba8
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), %rax
movq 0x50(%rsp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x4eb7
movl 0xc(%rsp), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x4ec6
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x7644
movq 0x20(%rsp), %rax
cmpq %rax, 0x40(%rsp)
je 0x5081
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 0x4f08
addq $0x4, %rax
jmp 0x4f3a
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 0x4f62
movl 0x4(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x108(%r15)
jmp 0x4f6f
movq 0x60(%rsp), %rdi
movq %r13, %rdx
callq 0x6f98
movl 0x4(%rsp), %eax
movq (%r14), %rdx
leaq (%rax,%rax,2), %rsi
movq (%rdx,%rsi,8), %rcx
cmpq %rcx, 0x8(%rdx,%rsi,8)
je 0x5071
xorl %r12d, %r12d
movl (%rcx,%r12,4), %ecx
movl %ecx, 0x8(%rsp)
cmpl %ebp, %eax
jne 0x4fa0
cmpl %ebx, %ecx
je 0x504a
cmpl %ebx, %eax
jne 0x4fac
cmpl %ebp, %ecx
je 0x504a
movq 0x30(%r15), %rax
cmpl $0x0, (%rax,%rcx,4)
jns 0x4ff9
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rdx
addq $-0x4, %rdx
cmpq %rdx, %rax
je 0x4fd6
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x4fe5
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x7644
movl 0x4(%rsp), %eax
movq 0x30(%r15), %rcx
movl (%rcx,%rax,4), %eax
incl %eax
movl 0x8(%rsp), %edx
movl %eax, (%rcx,%rdx,4)
movl 0x8(%rsp), %eax
movq 0x30(%r15), %rdx
movl 0x4(%rsp), %ecx
movl (%rdx,%rcx,4), %esi
incl %esi
cmpl %esi, (%rdx,%rax,4)
jne 0x504a
movq 0x18(%r15), %rdx
movl (%rdx,%rcx,4), %ecx
addl %ecx, (%rdx,%rax,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 0x5042
movl 0x4(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x504a
movq %r13, %rdx
callq 0x6f98
incq %r12
movl 0x4(%rsp), %eax
movq (%r14), %rdx
leaq (%rax,%rax,2), %rsi
movq (%rdx,%rsi,8), %rcx
movq 0x8(%rdx,%rsi,8), %rdx
subq %rcx, %rdx
sarq $0x2, %rdx
cmpq %r12, %rdx
ja 0x4f8c
movq 0x20(%rsp), %rax
cmpq %rax, 0x40(%rsp)
jne 0x4eee
leaq 0x10(%rsp), %rdi
callq 0x6998
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x509e
jmp 0x509e
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x6998
movq %rbx, %rdi
callq 0x23b0