// File: /workspace/github_cpp_makefile_star2_O3/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 0x10a31(%rip), %rdi     # 0x30ca2
xorl %eax, %eax
callq 0x2030
xorpd %xmm0, %xmm0
movapd %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x23f22
leaq 0x30(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x109d6(%rip), %rsi     # 0x30c7a
leaq 0x109de(%rip), %rdx     # 0x30c89
leaq 0x20(%rsp), %rdi
callq 0x246ba
leaq 0x58(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x1dfe6
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x202db
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 0x1dd70
leaq 0x58(%rsp), %rdi
movq %rsp, %rsi
callq 0x32cc
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 0x3496
leaq 0x58(%rsp), %rdi
movl %ebx, %esi
movl %r14d, %edx
callq 0x1dc86
leaq 0x40(%rsp), %rdi
leaq 0x58(%rsp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0xaa33
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
movb $0x1, %bl
cmpq %rax, %rcx
je 0x203e9
xorl %r14d, %r14d
movapd 0x108ea(%rip), %xmm3    # 0x30c50
movsd 0x108d2(%rip), %xmm4    # 0x30c40
leaq 0x10946(%rip), %r15     # 0x30cbb
movsd (%rax,%r14,8), %xmm0
movq 0x40(%rsp), %rdx
movsd (%rdx,%r14,8), %xmm1
movapd %xmm0, %xmm2
subsd %xmm1, %xmm2
andpd %xmm3, %xmm2
ucomisd %xmm4, %xmm2
jbe 0x203c0
movq %r15, %rdi
movl %r14d, %esi
movb $0x2, %al
callq 0x2030
movsd 0x10893(%rip), %xmm4    # 0x30c40
movapd 0x1089b(%rip), %xmm3    # 0x30c50
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
xorl %ebx, %ebx
incl %r14d
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %r14, %rdx
ja 0x20375
leaq 0x10b01(%rip), %rax     # 0x30eda
leaq 0x10af3(%rip), %rdi     # 0x30ed3
testb $0x1, %bl
cmovneq %rax, %rdi
jmp 0x203f0
leaq 0x10aea(%rip), %rdi     # 0x30eda
callq 0x2350
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x2040c
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq 0x58(%rsp), %rdi
callq 0x240ba
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x2042c
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 0x2045e
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x20461
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2250
jmp 0x20461
jmp 0x2045e
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x240ba
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x20481
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq %rbx, %rdi
callq 0x23b0