// File: /workspace/github_cpp_makefile_star2_O1/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 0x1029b(%rip), %rdi     # 0x31d3b
xorl %eax, %eax
callq 0x2030
xorpd %xmm0, %xmm0
movapd %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x240d4
leaq 0x88(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x101a0(%rip), %rsi     # 0x31c7a
leaq 0x101a8(%rip), %rdx     # 0x31c89
leaq 0x78(%rsp), %rdi
callq 0x24852
leaq 0x98(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x1e17a
movq 0x78(%rsp), %rdi
cmpq %rbx, %rdi
je 0x21b17
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 0x1deda
leaq 0xf78f(%rip), %rdi      # 0x312ca
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 0x6220
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 0x67d6
addq $0x10, %rsp
leaq 0x2d8(%rsp), %rdi
movl $0x2, 0x228(%rdi)
leaq 0x98(%rsp), %rsi
callq 0x2f63a
xorpd %xmm0, %xmm0
movapd %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x1e160
leaq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0x5c58
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 0x1e160
movl %ebp, %ecx
cmpq %rcx, %rax
jbe 0x21cb8
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 0x1e160
movq %r13, %rdi
movq %rax, %rsi
callq 0x1fba8
movq %r13, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x4154
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
movl %ebp, %edx
movq %r13, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x43b9
movq %r15, %rdi
movq %r13, %rsi
callq 0x2437c
movq %r13, %rdi
callq 0x5c8a
incl %ebp
jmp 0x21c1e
leaq 0x98(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x328c
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 0x7c98
leaq 0x98(%rsp), %rdi
movl %ebx, %esi
movl %r14d, %edx
callq 0x1de06
leaq 0x1c0(%rsp), %rdi
leaq 0x98(%rsp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0xaa17
movq 0x10(%rsp), %rax
cmpq %rax, 0x18(%rsp)
je 0x21daa
movb $0x1, %bpl
xorl %ebx, %ebx
movapd 0xff11(%rip), %xmm3     # 0x31c50
movsd 0xfef9(%rip), %xmm4     # 0x31c40
leaq 0xff6d(%rip), %r14      # 0x31cbb
movsd (%rax,%rbx,8), %xmm0
movq 0x1c0(%rsp), %rax
movsd (%rax,%rbx,8), %xmm1
movapd %xmm0, %xmm2
subsd %xmm1, %xmm2
andpd %xmm3, %xmm2
ucomisd %xmm4, %xmm2
jbe 0x21d90
movq %r14, %rdi
movl %ebx, %esi
movb $0x2, %al
callq 0x2030
movsd 0xfeba(%rip), %xmm4     # 0x31c40
movapd 0xfec2(%rip), %xmm3     # 0x31c50
xorl %ebp, %ebp
incl %ebx
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rbx, %rcx
ja 0x21d4e
jmp 0x21dad
movb $0x1, %bpl
leaq 0x10126(%rip), %rax     # 0x31eda
leaq 0x10118(%rip), %rdi     # 0x31ed3
testb $0x1, %bpl
cmovneq %rax, %rdi
callq 0x2350
movq 0x1c0(%rsp), %rdi
testq %rdi, %rdi
je 0x21de5
movq 0x1d0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x21dfc
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq 0x4d0(%rsp), %rdi
callq 0x68e6
leaq 0x2d8(%rsp), %rdi
callq 0x6460
leaq 0x50(%rsp), %rdi
callq 0x243ac
leaq 0x98(%rsp), %rdi
callq 0x2426c
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x21e44
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 0x21e9a
movq %rax, %r14
jmp 0x21ec6
movq %rax, %r14
jmp 0x21ed3
movq %rax, %r14
jmp 0x21ee0
jmp 0x21e8e
movq %rax, %r14
movq 0x78(%rsp), %rdi
cmpq %rbx, %rdi
je 0x21eea
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x2250
jmp 0x21eea
movq %rax, %r14
jmp 0x21eea
movq %rax, %r14
jmp 0x21ef7
jmp 0x21e9a
movq %rax, %r14
jmp 0x21eaf
movq %rax, %r14
leaq 0x1c0(%rsp), %rdi
callq 0x5c8a
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x21ec6
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq 0x4d0(%rsp), %rdi
callq 0x68e6
leaq 0x2d8(%rsp), %rdi
callq 0x6460
leaq 0x50(%rsp), %rdi
callq 0x243ac
leaq 0x98(%rsp), %rdi
callq 0x2426c
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x21f0e
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq %r14, %rdi
callq 0x23b0