// File: fjamour[P]icentral/src/graph_t.cc
// Function: graph_t::insert_edge_update_bc_experimental(unsigned int, unsigned int, bcc_stat_t&, int, int)
void graph_t::insert_edge_update_bc_experimental(node_id_t src,
                          node_id_t dst,
                          bcc_stat_t& bcc_stat,
                          int max_iter_d1,
                          int max_iter_d2)
{
    /*
     * 1. edge must be in the graph so that bcc extraction works properly
     * 2. the subgraph in the bcc must not have the edge (done inside bcc_delta_t::compute_bc)
     */
    timer tm;//
    
    insert_edge(src, dst);    
    bcc_delta_t bcc;
    tm.start();//
    find_edge_bcc(bcc, src, dst);
    tm.stop();//
    bcc_stat.bcc_num_nodes = bcc.bcc_subgraph.nodes_map.size();
    bcc_stat.bcc_num_edges = bcc.bcc_subgraph.edge_set.size();
    bcc_stat.bcc_find_time = tm.interval();//
    tm.start();
    if(max_iter_d1 != -1 || max_iter_d2 != -1)
        bcc.compute_bc_maxiter_exp(bc_map, src, dst, bcc_stat, max_iter_d1, max_iter_d2);
    else
        bcc.compute_bc_exp(bc_map, src, dst, bcc_stat, max_iter_d1, max_iter_d2);
    tm.stop();//
    bcc_stat.bc_update_time = tm.interval();//
    
    bcc.bcc_subgraph.remove_edge(src, dst);
    bcc.bcc_subgraph.find_pruning_counts_exp(src, 
                        dst, bcc_stat.tot_d0_iter, 
                        bcc_stat.tot_d1_iter, 
                        bcc_stat.tot_d2_iter);
    bcc.bcc_subgraph.insert_edge(src, dst);
}

// Assembly:
subq $0x548, %rsp            # imm = 0x548
movq %rdi, 0x540(%rsp)
movl %esi, 0x53c(%rsp)
movl %edx, 0x538(%rsp)
movq %rcx, 0x530(%rsp)
movl %r8d, 0x52c(%rsp)
movl %r9d, 0x528(%rsp)
movq 0x540(%rsp), %rdi
movq %rdi, 0x20(%rsp)
movl 0x53c(%rsp), %esi
movl 0x538(%rsp), %edx
callq 0x56720
leaq 0x38(%rsp), %rdi
callq 0x589b0
leaq 0x508(%rsp), %rdi
callq 0x2d430
jmp 0x5765e
movq 0x20(%rsp), %rdi
movl 0x53c(%rsp), %edx
movl 0x538(%rsp), %ecx
leaq 0x38(%rsp), %rsi
callq 0x33ad0
jmp 0x5767d
leaq 0x508(%rsp), %rdi
callq 0x2d450
jmp 0x5768c
leaq 0x68(%rsp), %rdi
callq 0x4dcd0
movq %rax, 0x18(%rsp)
jmp 0x5769d
movq 0x18(%rsp), %rax
movl %eax, %ecx
movq 0x530(%rsp), %rax
movl %ecx, (%rax)
leaq 0x98(%rsp), %rdi
callq 0x4dbe0
movl %eax, %ecx
movq 0x530(%rsp), %rax
movl %ecx, 0x4(%rax)
leaq 0x508(%rsp), %rdi
callq 0x2d470
movsd %xmm0, 0x10(%rsp)
jmp 0x576dd
movsd 0x10(%rsp), %xmm0
movq 0x530(%rsp), %rax
movsd %xmm0, 0x38(%rax)
leaq 0x508(%rsp), %rdi
callq 0x2d430
jmp 0x576ff
cmpl $-0x1, 0x52c(%rsp)
jne 0x57713
cmpl $-0x1, 0x528(%rsp)
je 0x57774
movq 0x20(%rsp), %rsi
addq $0xd8, %rsi
movl 0x53c(%rsp), %edx
movl 0x538(%rsp), %ecx
movq 0x530(%rsp), %r8
movl 0x52c(%rsp), %r9d
movl 0x528(%rsp), %edi
movq %rsp, %rax
movl %edi, (%rax)
leaq 0x38(%rsp), %rdi
callq 0x350d0
jmp 0x57755
jmp 0x577b8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x58a90
jmp 0x57869
movq 0x20(%rsp), %rsi
addq $0xd8, %rsi
movl 0x53c(%rsp), %edx
movl 0x538(%rsp), %ecx
movq 0x530(%rsp), %r8
movl 0x52c(%rsp), %r9d
movl 0x528(%rsp), %edi
movq %rsp, %rax
movl %edi, (%rax)
leaq 0x38(%rsp), %rdi
callq 0x34be0
jmp 0x577b6
jmp 0x577b8
leaq 0x508(%rsp), %rdi
callq 0x2d450
jmp 0x577c7
leaq 0x508(%rsp), %rdi
callq 0x2d470
movsd %xmm0, 0x8(%rsp)
jmp 0x577dc
movsd 0x8(%rsp), %xmm0
movq 0x530(%rsp), %rax
movsd %xmm0, 0x40(%rax)
leaq 0x68(%rsp), %rdi
movl 0x53c(%rsp), %esi
movl 0x538(%rsp), %edx
callq 0x52580
jmp 0x57809
leaq 0x68(%rsp), %rdi
movl 0x53c(%rsp), %esi
movl 0x538(%rsp), %edx
movq 0x530(%rsp), %r9
movq %r9, %rcx
addq $0x50, %rcx
movq %r9, %r8
addq $0x54, %r8
addq $0x58, %r9
callq 0x53700
jmp 0x5783d
leaq 0x68(%rsp), %rdi
movl 0x53c(%rsp), %esi
movl 0x538(%rsp), %edx
callq 0x52420
jmp 0x57857
leaq 0x38(%rsp), %rdi
callq 0x58a90
addq $0x548, %rsp            # imm = 0x548
retq
movq 0x30(%rsp), %rdi
callq 0x9cf0
nopw %cs:(%rax,%rax)