// File: /workspace/github_cpp_makefile_star2_O2/fjamour[P]icentral/src/unit_tests.h
// Function: test__Update_BC_mem()
bool test__Update_BC_mem()
{
    bool passed = false;
    printf("Testing [Update_BC_mem] ...\t");
    vector<double> BC_vec;
    graph_t g;
    
    
    edge_t e = make_pair(0, 2);
    //fill_test_graph(g);
    g.read_graph(string("Erdos02.lcc.net"));
    e = *(g.edge_set.begin());
    g.remove_edge(e.first, e.second);
    
    printf("(%d, %d)\n", e.first, e.second);
    
    
    vector<iter_info_t> iter_info_vec;
    component_t comp;
    comp.comp_type = GRAPH;
    comp.subgraph.fill_graph(g);
    vector<double> dummy_BC_vec;
    dummy_BC_vec.resize(g.size());
    for (node_id_t s = 0; s < g.size(); ++s) {
        iter_info_t iter_info;
        iter_info.init_all(g.size());
        BBFS(iter_info, comp, s);
        RBFS(dummy_BC_vec, comp, s, iter_info, false, false);
        iter_info_vec.push_back(iter_info);
    }
    
    fast_brandes_BC(g, BC_vec);
    Update_BC_mem(BC_vec, g, GRAPH, e, iter_info_vec);
    
    g.insert_edge(e.first, e.second);
    vector<double> ref_BC_vec = brandes_bc(g);
    passed = true;
    for(node_id_t v = 0; v < BC_vec.size(); ++v) {
        if(abs((BC_vec[v] - ref_BC_vec[v])) > EPS) {
            passed = false;
            printf("(%d) --\t[%f]\t\t[%f]\n", v, BC_vec[v], ref_BC_vec[v]);
        }
        //printf("(%d) --\t[%f]\t\t[%f]\n", v, BC_vec[v], ref_BC_vec[v]);
    }
    if(passed) {
        printf("PASSED\n");
    } else {
        printf("FAILED\n");
    }
    return passed;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4f8, %rsp            # imm = 0x4F8
leaq 0xd6a8(%rip), %rdi      # 0x28cfb
xorl %eax, %eax
callq 0x2030
xorpd %xmm0, %xmm0
movapd %xmm0, (%rsp)
andq $0x0, 0x10(%rsp)
leaq 0x88(%rsp), %rdi
callq 0x1d14e
leaq 0xd5bd(%rip), %rsi      # 0x28c3a
leaq 0x68(%rsp), %rdi
leaq 0x2c8(%rsp), %rdx
callq 0x1d278
leaq 0x88(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x18d4c
leaq 0x68(%rsp), %rdi
callq 0x20d0
leaq 0x88(%rsp), %rdi
movq 0x48(%rdi), %rax
movl 0x20(%rax), %ebx
movl 0x24(%rax), %r14d
movl %ebx, %esi
movl %r14d, %edx
callq 0x18bfe
leaq 0xcbbb(%rip), %rdi      # 0x2828a
movl %ebx, %esi
movl %r14d, %edx
xorl %eax, %eax
callq 0x2030
xorpd %xmm0, %xmm0
movapd %xmm0, 0x40(%rsp)
andq $0x0, 0x50(%rsp)
leaq 0x2c8(%rsp), %rdi
callq 0x4622
leaq 0x2c8(%rsp), %rdi
movl $0x2, 0x228(%rdi)
leaq 0x88(%rsp), %rsi
callq 0x26858
xorpd %xmm0, %xmm0
movapd %xmm0, 0x20(%rsp)
andq $0x0, 0x30(%rsp)
leaq 0x88(%rsp), %rdi
callq 0x18d3c
leaq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x45f0
movq %r14, 0x58(%rsp)
movq %rbx, 0x60(%rsp)
xorl %ebp, %ebp
leaq 0x2a8(%rsp), %rbx
leaq 0x88(%rsp), %r15
leaq 0x1b0(%rsp), %r12
leaq 0x2c8(%rsp), %r13
leaq 0x40(%rsp), %r14
movq %r15, %rdi
callq 0x18d3c
movl %ebp, %ecx
cmpq %rcx, %rax
jbe 0x1b800
andq $0x0, 0x298(%rsp)
andl $0x0, 0x2a0(%rsp)
movl $0xe4, %edx
movq %r12, %rdi
xorl %esi, %esi
callq 0x2110
xorpd %xmm0, %xmm0
movupd %xmm0, (%rbx)
movupd %xmm0, 0x10(%rbx)
movq %r15, %rdi
callq 0x18d3c
movq %r12, %rdi
movq %rax, %rsi
callq 0x1a0fc
movq %r12, %rdi
movq %r13, %rsi
movl %ebp, %edx
callq 0x32e4
leaq 0x20(%rsp), %rdi
movq %r13, %rsi
movl %ebp, %edx
movq %r12, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x342f
movq %r14, %rdi
movq %r12, %rsi
callq 0x1d364
movq %r12, %rdi
callq 0x4668
incl %ebp
jmp 0x1b772
leaq 0x88(%rsp), %rdi
movq %rsp, %rsi
callq 0x272c
movq 0x60(%rsp), %rbx
movq 0x58(%rsp), %r14
movq %r14, %rcx
shlq $0x20, %rcx
orq %rbx, %rcx
movq %rsp, %rdi
leaq 0x88(%rsp), %rsi
pushq $0x2
popq %rdx
leaq 0x40(%rsp), %r8
callq 0x6914
leaq 0x88(%rsp), %rdi
movl %ebx, %esi
movl %r14d, %edx
callq 0x18b56
leaq 0x1b0(%rsp), %rdi
leaq 0x88(%rsp), %rsi
pushq $-0x1
popq %rdx
callq 0x8fa3
xorl %r14d, %r14d
movb $0x1, %bl
movapd 0xd39d(%rip), %xmm3     # 0x28c10
movsd 0xd385(%rip), %xmm4     # 0x28c00
leaq 0xd3f9(%rip), %r15      # 0x28c7b
movl %r14d, %r14d
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r14, %rcx
jbe 0x1b8e4
movsd (%rax,%r14,8), %xmm0
movq 0x1b0(%rsp), %rax
movsd (%rax,%r14,8), %xmm1
movapd %xmm0, %xmm2
subsd %xmm1, %xmm2
andpd %xmm3, %xmm2
ucomisd %xmm4, %xmm2
jbe 0x1b8df
movq %r15, %rdi
movl %r14d, %esi
movb $0x2, %al
callq 0x2030
movsd 0xd32b(%rip), %xmm4     # 0x28c00
movapd 0xd333(%rip), %xmm3     # 0x28c10
xorl %ebx, %ebx
incl %r14d
jmp 0x1b882
leaq 0xd5af(%rip), %rax      # 0x28e9a
leaq 0xd5a1(%rip), %rdi      # 0x28e93
andb $0x1, %bl
cmovneq %rax, %rdi
callq 0x2360
leaq 0x1b0(%rsp), %rdi
callq 0x5754
leaq 0x20(%rsp), %rdi
callq 0x5754
leaq 0x2c8(%rsp), %rdi
callq 0x46de
leaq 0x40(%rsp), %rdi
callq 0x1d394
leaq 0x88(%rsp), %rdi
callq 0x1d2b4
movq %rsp, %rdi
callq 0x5754
movl %ebx, %eax
addq $0x4f8, %rsp            # imm = 0x4F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1b97e
movq %rax, %rbx
jmp 0x1b99d
movq %rax, %rbx
jmp 0x1b9aa
jmp 0x1b972
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x20d0
jmp 0x1b9b4
movq %rax, %rbx
jmp 0x1b9b4
movq %rax, %rbx
jmp 0x1b9c1
jmp 0x1b97e
movq %rax, %rbx
jmp 0x1b993
movq %rax, %rbx
leaq 0x1b0(%rsp), %rdi
callq 0x4668
leaq 0x20(%rsp), %rdi
callq 0x5754
leaq 0x2c8(%rsp), %rdi
callq 0x46de
leaq 0x40(%rsp), %rdi
callq 0x1d394
leaq 0x88(%rsp), %rdi
callq 0x1d2b4
movq %rsp, %rdi
callq 0x5754
movq %rbx, %rdi
callq 0x23d0