// File: /workspace/github_cpp_makefile_star2_O3/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 $0x508, %rsp            # imm = 0x508
leaq 0xf44c(%rip), %rdi      # 0x30d3b
xorl %eax, %eax
callq 0x2030
xorpd %xmm0, %xmm0
movapd %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x23f22
leaq 0x88(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0xf351(%rip), %rsi      # 0x30c7a
leaq 0xf359(%rip), %rdx      # 0x30c89
leaq 0x78(%rsp), %rdi
callq 0x246ba
leaq 0x98(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x1dfe6
movq 0x78(%rsp), %rdi
cmpq %rbx, %rdi
je 0x21966
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x2250
leaq 0x98(%rsp), %rdi
movq 0x48(%rdi), %rax
movl 0x20(%rax), %ebx
movl 0x24(%rax), %r14d
movl %ebx, %esi
movl %r14d, %edx
callq 0x1dd70
leaq 0xe940(%rip), %rdi      # 0x302ca
movl %ebx, %esi
movl %r14d, %edx
xorl %eax, %eax
callq 0x2030
xorpd %xmm0, %xmm0
movapd %xmm0, 0x50(%rsp)
movq $0x0, 0x60(%rsp)
leaq 0x2d8(%rsp), %rdi
callq 0x6192
leaq 0x4d0(%rsp), %rdi
leaq 0xc(%rsp), %rax
leaq 0xf(%rsp), %r10
leaq 0xe(%rsp), %rdx
leaq 0x1c0(%rsp), %rcx
leaq 0x30(%rsp), %r8
leaq 0xd(%rsp), %r9
movl $0xa, %esi
pushq %rax
pushq %r10
callq 0x6748
addq $0x10, %rsp
leaq 0x2d8(%rsp), %rdi
movl $0x2, 0x228(%rdi)
leaq 0x98(%rsp), %rsi
callq 0x2f2b8
xorpd %xmm0, %xmm0
movapd %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x1dfcc
leaq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0x5be8
movq %r14, 0x68(%rsp)
movq %rbx, 0x70(%rsp)
xorl %ebp, %ebp
leaq 0x2b8(%rsp), %r14
leaq 0x98(%rsp), %r12
leaq 0x1c0(%rsp), %r13
leaq 0x2d8(%rsp), %rbx
leaq 0x50(%rsp), %r15
movq %r12, %rdi
callq 0x1dfcc
movl %ebp, %ecx
cmpq %rcx, %rax
jbe 0x21b07
movq $0x0, 0x2a8(%rsp)
movl $0x0, 0x2b0(%rsp)
movl $0xe4, %edx
movq %r13, %rdi
xorl %esi, %esi
callq 0x2110
xorpd %xmm0, %xmm0
movupd %xmm0, (%r14)
movupd %xmm0, 0x10(%r14)
movq %r12, %rdi
callq 0x1dfcc
movq %r13, %rdi
movq %rax, %rsi
callq 0x1f9ec
movq %r13, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x41ba
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
movl %ebp, %edx
movq %r13, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x441f
movq %r15, %rdi
movq %r13, %rsi
callq 0x241d0
movq %r13, %rdi
callq 0x5c1a
incl %ebp
jmp 0x21a6d
leaq 0x98(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x32cc
movq 0x70(%rsp), %rbx
movq 0x68(%rsp), %r14
movq %r14, %rcx
shlq $0x20, %rcx
orq %rbx, %rcx
leaq 0x10(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0x50(%rsp), %r8
movl $0x2, %edx
callq 0x7c3c
leaq 0x98(%rsp), %rdi
movl %ebx, %esi
movl %r14d, %edx
callq 0x1dc86
leaq 0x1c0(%rsp), %rdi
leaq 0x98(%rsp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0xaa33
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movb $0x1, %bpl
cmpq %rax, %rcx
je 0x21c19
xorl %ebx, %ebx
movapd 0xf0bb(%rip), %xmm3     # 0x30c50
movsd 0xf0a3(%rip), %xmm4     # 0x30c40
leaq 0xf117(%rip), %r14      # 0x30cbb
movsd (%rax,%rbx,8), %xmm0
movq 0x1c0(%rsp), %rdx
movsd (%rdx,%rbx,8), %xmm1
movapd %xmm0, %xmm2
subsd %xmm1, %xmm2
andpd %xmm3, %xmm2
ucomisd %xmm4, %xmm2
jbe 0x21bf0
movq %r14, %rdi
movl %ebx, %esi
movb $0x2, %al
callq 0x2030
movsd 0xf064(%rip), %xmm4     # 0x30c40
movapd 0xf06c(%rip), %xmm3     # 0x30c50
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
xorl %ebp, %ebp
incl %ebx
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %rbx, %rdx
ja 0x21ba4
leaq 0xf2d2(%rip), %rax      # 0x30eda
leaq 0xf2c4(%rip), %rdi      # 0x30ed3
testb $0x1, %bpl
cmovneq %rax, %rdi
jmp 0x21c20
leaq 0xf2ba(%rip), %rdi      # 0x30eda
callq 0x2350
movq 0x1c0(%rsp), %rdi
testq %rdi, %rdi
je 0x21c42
movq 0x1d0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x21c59
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq 0x4d0(%rsp), %rdi
callq 0x6858
leaq 0x2d8(%rsp), %rdi
callq 0x63d2
leaq 0x50(%rsp), %rdi
callq 0x24200
leaq 0x98(%rsp), %rdi
callq 0x240ba
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x21ca1
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
andb $0x1, %bpl
movl %ebp, %eax
addq $0x508, %rsp            # imm = 0x508
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x21cf2
movq %rax, %r14
jmp 0x21d1e
movq %rax, %r14
jmp 0x21d2b
movq %rax, %r14
jmp 0x21d38
jmp 0x21ceb
movq %rax, %r14
movq 0x78(%rsp), %rdi
cmpq %rbx, %rdi
je 0x21d42
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x2250
jmp 0x21d42
movq %rax, %r14
jmp 0x21d42
jmp 0x21cf2
movq %rax, %r14
jmp 0x21d07
movq %rax, %r14
leaq 0x1c0(%rsp), %rdi
callq 0x5c1a
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x21d1e
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq 0x4d0(%rsp), %rdi
callq 0x6858
leaq 0x2d8(%rsp), %rdi
callq 0x63d2
leaq 0x50(%rsp), %rdi
callq 0x24200
leaq 0x98(%rsp), %rdi
callq 0x240ba
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x21d66
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq %r14, %rdi
callq 0x23b0