// File: /workspace/github_cpp_makefile_star2_O3/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 %rbp
pushq %r14
pushq %rbx
subq $0x3e0, %rsp            # imm = 0x3E0
leaq 0x10d1f(%rip), %rdi     # 0x30c8a
xorl %eax, %eax
callq 0x2030
leaq 0x88(%rsp), %rdi
callq 0x23f22
leaq 0x60(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x10ceb(%rip), %rsi     # 0x30c7a
leaq 0x10cf3(%rip), %rdx     # 0x30c89
leaq 0x50(%rsp), %rdi
callq 0x246ba
leaq 0x88(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x1dfe6
movq 0x50(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1ffc9
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x2250
xorpd %xmm0, %xmm0
leaq 0x30(%rsp), %rsi
movapd %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
leaq 0x88(%rsp), %rdi
callq 0x32cc
leaq 0x1b0(%rsp), %rdi
callq 0x6192
leaq 0x3a8(%rsp), %rbx
leaq 0xc(%rsp), %rax
leaq 0xf(%rsp), %r10
leaq 0xe(%rsp), %rdx
leaq 0x10(%rsp), %rcx
leaq 0x70(%rsp), %r8
leaq 0xd(%rsp), %r9
movl $0xa, %esi
movq %rbx, %rdi
pushq %rax
pushq %r10
callq 0x6748
addq $0x10, %rsp
leaq 0x1b0(%rsp), %rdi
movl $0x2, 0x228(%rdi)
leaq 0x88(%rsp), %rsi
callq 0x2f2b8
xorpd %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movapd %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq 0x1b0(%rsp), %rsi
movabsq $0x1200000003, %rdx     # imm = 0x1200000003
xorl %ecx, %ecx
callq 0x37de
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
subq %rax, %rcx
je 0x200b8
sarq $0x3, %rcx
movq 0x30(%rsp), %rdx
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorl %esi, %esi
movsd (%rax,%rsi,8), %xmm0
addsd (%rdx,%rsi,8), %xmm0
movsd %xmm0, (%rdx,%rsi,8)
incq %rsi
cmpq %rsi, %rcx
jne 0x200a1
leaq 0x88(%rsp), %rdi
movl $0x3, %esi
movl $0x12, %edx
callq 0x1dc86
leaq 0x70(%rsp), %rdi
leaq 0x88(%rsp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0xaa33
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
subq %rax, %rcx
je 0x2014d
sarq $0x3, %rcx
movb $0x1, %bpl
movq 0x70(%rsp), %rdx
xorl %esi, %esi
movapd 0x10b45(%rip), %xmm0    # 0x30c50
movsd 0x10b2d(%rip), %xmm1    # 0x30c40
movsd (%rax,%rsi,8), %xmm2
subsd (%rdx,%rsi,8), %xmm2
andpd %xmm0, %xmm2
ucomisd %xmm1, %xmm2
setbe %dil
andb %dil, %bpl
incq %rsi
movl %esi, %edi
cmpq %rdi, %rcx
ja 0x20113
leaq 0x10d9d(%rip), %rax     # 0x30eda
leaq 0x10d8f(%rip), %rdi     # 0x30ed3
testb %bpl, %bpl
cmovneq %rax, %rdi
jmp 0x20157
movb $0x1, %bpl
leaq 0x10d83(%rip), %rdi     # 0x30eda
callq 0x2350
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x20176
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x2018d
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq %rbx, %rdi
callq 0x6858
leaq 0x1b0(%rsp), %rdi
callq 0x63d2
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x201b9
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq 0x88(%rsp), %rdi
callq 0x240ba
movl %ebp, %eax
addq $0x3e0, %rsp            # imm = 0x3E0
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x20203
movq %rax, %r14
jmp 0x2021d
movq %rax, %r14
jmp 0x20225
jmp 0x201e2
movq %rax, %r14
jmp 0x20232
movq %rax, %r14
movq 0x50(%rsp), %rdi
cmpq %rbx, %rdi
je 0x20249
movq 0x60(%rsp), %rsi
incq %rsi
jmp 0x20244
movq %rax, %r14
jmp 0x20249
movq %rax, %r14
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x2021d
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq %rbx, %rdi
callq 0x6858
leaq 0x1b0(%rsp), %rdi
callq 0x63d2
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x20249
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq 0x88(%rsp), %rdi
callq 0x240ba
movq %r14, %rdi
callq 0x23b0