// File: /workspace/github_cpp_makefile_star2_O2/fjamour[P]icentral/src/unit_tests.h
// Function: test__iCentral()
bool test__iCentral()
{
    bool passed = false;
    printf("Testing [iCentral] ...\t");
    
    edge_t e = make_pair(3, 18);
    graph_t g;
    g.read_graph(string("Erdos02.lcc.net"));
    //fill_test_graph(g);
    vector<double> BC_vec;
    fast_brandes_BC(g, BC_vec);
    
    component_t comp;
    comp.comp_type = GRAPH;
    comp.subgraph.fill_graph(g);
    vector<double> dBC_vec;
    iCentral(dBC_vec, comp, e);
    for(int i = 0; i < dBC_vec.size(); ++i) {
        BC_vec[i] += dBC_vec[i];
    }
    
    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("[%f]\t\t[%f]\n", BC_vec[v], ref_BC_vec[v]);
    }
    if(passed) {
        printf("PASSED\n");
    } else {
        printf("FAILED\n");
    }
    
    return passed;
}

// Assembly:
pushq %rbx
subq $0x3d0, %rsp            # imm = 0x3D0
leaq 0xe755(%rip), %rdi      # 0x28c4a
xorl %eax, %eax
callq 0x2030
leaq 0x78(%rsp), %rdi
callq 0x1d14e
leaq 0xe72d(%rip), %rsi      # 0x28c3a
leaq 0x58(%rsp), %rdi
leaq 0x1a0(%rsp), %rdx
callq 0x1d278
leaq 0x78(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x18d4c
leaq 0x58(%rsp), %rdi
callq 0x20d0
xorpd %xmm0, %xmm0
movq %rsp, %rsi
movapd %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
leaq 0x78(%rsp), %rdi
callq 0x272c
leaq 0x1a0(%rsp), %rdi
callq 0x4622
leaq 0x1a0(%rsp), %rdi
movl $0x2, 0x228(%rdi)
leaq 0x78(%rsp), %rsi
callq 0x26858
xorpd %xmm0, %xmm0
leaq 0x20(%rsp), %rdi
movapd %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
leaq 0x1a0(%rsp), %rsi
movabsq $0x1200000003, %rdx     # imm = 0x1200000003
xorl %ecx, %ecx
callq 0x2ac6
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movq (%rsp), %rdx
xorl %esi, %esi
cmpq %rsi, %rcx
je 0x1a5d6
movsd (%rax,%rsi,8), %xmm0
addsd (%rdx,%rsi,8), %xmm0
movsd %xmm0, (%rdx,%rsi,8)
incq %rsi
jmp 0x1a5bd
leaq 0x78(%rsp), %rdi
pushq $0x3
popq %rsi
pushq $0x12
popq %rdx
callq 0x18b56
leaq 0x40(%rsp), %rdi
leaq 0x78(%rsp), %rsi
pushq $-0x1
popq %rdx
callq 0x8fa3
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
xorl %esi, %esi
movb $0x1, %bl
movq 0x40(%rsp), %rdx
movapd 0xe5f7(%rip), %xmm0     # 0x28c10
movsd 0xe5df(%rip), %xmm1     # 0x28c00
movl %esi, %esi
cmpq %rsi, %rcx
jbe 0x1a645
movsd (%rax,%rsi,8), %xmm2
subsd (%rdx,%rsi,8), %xmm2
andpd %xmm0, %xmm2
ucomisd %xmm1, %xmm2
setbe %dil
andb %dil, %bl
incl %esi
jmp 0x1a621
leaq 0xe84e(%rip), %rax      # 0x28e9a
leaq 0xe840(%rip), %rdi      # 0x28e93
andb $0x1, %bl
cmovneq %rax, %rdi
callq 0x2360
leaq 0x40(%rsp), %rdi
callq 0x5754
leaq 0x20(%rsp), %rdi
callq 0x5754
leaq 0x1a0(%rsp), %rdi
callq 0x46de
movq %rsp, %rdi
callq 0x5754
leaq 0x78(%rsp), %rdi
callq 0x1d2b4
movl %ebx, %eax
addq $0x3d0, %rsp            # imm = 0x3D0
popq %rbx
retq
jmp 0x1a6bf
movq %rax, %rbx
jmp 0x1a6cc
jmp 0x1a6a6
movq %rax, %rbx
jmp 0x1a6d9
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x20d0
jmp 0x1a6e1
movq %rax, %rbx
jmp 0x1a6e1
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x5754
leaq 0x1a0(%rsp), %rdi
callq 0x46de
movq %rsp, %rdi
callq 0x5754
leaq 0x78(%rsp), %rdi
callq 0x1d2b4
movq %rbx, %rdi
callq 0x23d0