// File: fjamour[P]icentral/src/bc.cc
// Function: incremental_brandes(graph_t&, unsigned int, unsigned int, std::vector<double, std::allocator<double>>&)
void incremental_brandes(graph_t& graph_in,
        node_id_t src,
        node_id_t dst,
        vector<double>& bc_vec)
{
    vector<int> d_src_vec, d_dst_vec;
    d_src_vec.resize(graph_in.size());
    d_dst_vec.resize(graph_in.size());
    fill(d_src_vec.begin(), d_src_vec.end(), -1);
    fill(d_dst_vec.begin(), d_dst_vec.end(), -1);
    graph_in.find_sssp(src, d_src_vec);
    graph_in.find_sssp(dst, d_dst_vec);
    
    //fill(bc_vec.begin(), bc_vec.end(), 0);
    
    for(node_id_t s = 0; s < graph_in.size(); ++s) {
        if(d_src_vec[s] != d_dst_vec[s]) { 
            brandes_delta_iter(graph_in,
                    s, 
                    src, 
                    dst, 
                    d_src_vec[s], 
                    d_dst_vec[s], 
                    bc_vec);
        }
    }
}

// Assembly:
subq $0xe8, %rsp
movq %rdi, 0xe0(%rsp)
movl %esi, 0xdc(%rsp)
movl %edx, 0xd8(%rsp)
movq %rcx, 0xd0(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0xfc40
leaq 0xa0(%rsp), %rdi
callq 0xfc40
movq 0xe0(%rsp), %rdi
callq 0x56b40
movq %rax, 0x58(%rsp)
jmp 0x29c93
movq 0x58(%rsp), %rsi
leaq 0xb8(%rsp), %rdi
callq 0x2cfc0
jmp 0x29ca7
movq 0xe0(%rsp), %rdi
callq 0x56b40
movq %rax, 0x50(%rsp)
jmp 0x29cbb
movq 0x50(%rsp), %rsi
leaq 0xa0(%rsp), %rdi
callq 0x2cfc0
jmp 0x29ccf
leaq 0xb8(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x109f0
movq 0x48(%rsp), %rdi
movq %rax, 0x88(%rsp)
callq 0x10a20
movq %rax, 0x80(%rsp)
movl $0xffffffff, 0x7c(%rsp) # imm = 0xFFFFFFFF
movq 0x88(%rsp), %rdi
movq 0x80(%rsp), %rsi
leaq 0x7c(%rsp), %rdx
callq 0x21f20
jmp 0x29d1f
leaq 0xa0(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x109f0
movq 0x40(%rsp), %rdi
movq %rax, 0x70(%rsp)
callq 0x10a20
movq %rax, 0x68(%rsp)
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
movq 0x70(%rsp), %rdi
movq 0x68(%rsp), %rsi
leaq 0x64(%rsp), %rdx
callq 0x21f20
jmp 0x29d63
movq 0xe0(%rsp), %rdi
movl 0xdc(%rsp), %esi
leaq 0xb8(%rsp), %rdx
callq 0x57410
jmp 0x29d81
movq 0xe0(%rsp), %rdi
movl 0xd8(%rsp), %esi
leaq 0xa0(%rsp), %rdx
callq 0x57410
jmp 0x29d9f
movl $0x0, 0x60(%rsp)
movl 0x60(%rsp), %eax
movq %rax, 0x30(%rsp)
movq 0xe0(%rsp), %rdi
callq 0x56b40
movq %rax, 0x38(%rsp)
jmp 0x29dc4
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
cmpq %rcx, %rax
jae 0x29ed7
movl 0x60(%rsp), %eax
movl %eax, %esi
leaq 0xb8(%rsp), %rdi
callq 0xfc50
movl (%rax), %eax
movl %eax, 0x2c(%rsp)
movl 0x60(%rsp), %eax
movl %eax, %esi
leaq 0xa0(%rsp), %rdi
callq 0xfc50
movq %rax, %rcx
movl 0x2c(%rsp), %eax
cmpl (%rcx), %eax
je 0x29ec5
movq 0xe0(%rsp), %rax
movq %rax, 0x10(%rsp)
movl 0x60(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0xdc(%rsp), %ecx
movl %ecx, 0x20(%rsp)
movl 0xd8(%rsp), %ecx
movl %ecx, 0x24(%rsp)
movl %eax, %esi
leaq 0xb8(%rsp), %rdi
callq 0xfc50
movl (%rax), %eax
movl %eax, 0x28(%rsp)
movl 0x60(%rsp), %eax
movl %eax, %esi
leaq 0xa0(%rsp), %rdi
callq 0xfc50
movq 0x10(%rsp), %rdi
movl 0x1c(%rsp), %esi
movl 0x20(%rsp), %edx
movl 0x24(%rsp), %ecx
movl 0x28(%rsp), %r8d
movl (%rax), %r9d
movq 0xd0(%rsp), %r10
movq %rsp, %rax
movq %r10, (%rax)
callq 0x29f10
jmp 0x29e93
jmp 0x29ec5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0xfc70
leaq 0xb8(%rsp), %rdi
callq 0xfc70
jmp 0x29ef9
jmp 0x29ec7
movl 0x60(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x60(%rsp)
jmp 0x29da7
leaq 0xa0(%rsp), %rdi
callq 0xfc70
leaq 0xb8(%rsp), %rdi
callq 0xfc70
addq $0xe8, %rsp
retq
movq 0x98(%rsp), %rdi
callq 0x9cf0
nopw %cs:(%rax,%rax)