// File: /workspace/github_cpp_makefile_star2_O1/fjamour[P]icentral/src/unit_tests.h
// Function: test__Update_BC()
bool test__Update_BC()
{
    bool passed = false;
    printf("Testing [Update_BC] ...\t");
    vector<double> BC_vec;
    graph_t g;
    edge_t e = make_pair(100, 3455);
    
    g.read_graph(string("Erdos02.lcc.net"));
    //fill_test_graph(g);
    
    e = *g.edge_set.begin();
    g.remove_edge(e.first, e.second);
    //printf("(%d, %d)\n", e.first, e.second);
       
    fast_brandes_BC(g, BC_vec);
    Update_BC(BC_vec, g, BCC, e);
    
    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 %r15
pushq %r14
pushq %rbx
subq $0x180, %rsp            # imm = 0x180
leaq 0x11872(%rip), %rdi     # 0x31ca2
xorl %eax, %eax
callq 0x2030
xorpd %xmm0, %xmm0
movapd %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x240d4
leaq 0x30(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x11817(%rip), %rsi     # 0x31c7a
leaq 0x1181f(%rip), %rdx     # 0x31c89
leaq 0x20(%rsp), %rdi
callq 0x24852
leaq 0x58(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x1e17a
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x2049a
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2250
leaq 0x58(%rsp), %rdi
movq 0x48(%rdi), %rax
movl 0x20(%rax), %ebx
movl 0x24(%rax), %r14d
movl %ebx, %esi
movl %r14d, %edx
callq 0x1deda
leaq 0x58(%rsp), %rdi
movq %rsp, %rsi
callq 0x328c
movq %r14, %rcx
shlq $0x20, %rcx
orq %rbx, %rcx
movq %rsp, %rdi
leaq 0x58(%rsp), %rsi
xorl %edx, %edx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x3456
leaq 0x58(%rsp), %rdi
movl %ebx, %esi
movl %r14d, %edx
callq 0x1de06
leaq 0x40(%rsp), %rdi
leaq 0x58(%rsp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0xaa17
movq (%rsp), %rax
cmpq %rax, 0x8(%rsp)
je 0x20589
movb $0x1, %bl
xorl %r14d, %r14d
movapd 0x11732(%rip), %xmm3    # 0x31c50
movsd 0x1171a(%rip), %xmm4    # 0x31c40
leaq 0x1178e(%rip), %r15     # 0x31cbb
movsd (%rax,%r14,8), %xmm0
movq 0x40(%rsp), %rax
movsd (%rax,%r14,8), %xmm1
movapd %xmm0, %xmm2
subsd %xmm1, %xmm2
andpd %xmm3, %xmm2
ucomisd %xmm4, %xmm2
jbe 0x2056f
movq %r15, %rdi
movl %r14d, %esi
movb $0x2, %al
callq 0x2030
movsd 0x116db(%rip), %xmm4    # 0x31c40
movapd 0x116e3(%rip), %xmm3    # 0x31c50
xorl %ebx, %ebx
incl %r14d
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r14, %rcx
ja 0x2052d
jmp 0x2058b
movb $0x1, %bl
leaq 0x11948(%rip), %rax     # 0x31eda
leaq 0x1193a(%rip), %rdi     # 0x31ed3
testb $0x1, %bl
cmovneq %rax, %rdi
callq 0x2350
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x205bc
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq 0x58(%rsp), %rdi
callq 0x2426c
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x205dc
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
andb $0x1, %bl
movl %ebx, %eax
addq $0x180, %rsp            # imm = 0x180
popq %rbx
popq %r14
popq %r15
retq
jmp 0x20613
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x20616
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2250
jmp 0x20616
jmp 0x20613
movq %rax, %rbx
jmp 0x20620
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x2426c
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x20636
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq %rbx, %rdi
callq 0x23b0