// File: /workspace/github_cpp_makefile_star2_O1/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 0x11b64(%rip), %rdi     # 0x31c8a
xorl %eax, %eax
callq 0x2030
leaq 0x88(%rsp), %rdi
callq 0x240d4
leaq 0x60(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x11b30(%rip), %rsi     # 0x31c7a
leaq 0x11b38(%rip), %rdx     # 0x31c89
leaq 0x50(%rsp), %rdi
callq 0x24852
leaq 0x88(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x1e17a
movq 0x50(%rsp), %rdi
cmpq %rbx, %rdi
je 0x20184
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 0x328c
leaq 0x1b0(%rsp), %rdi
callq 0x6220
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 0x67d6
addq $0x10, %rsp
leaq 0x1b0(%rsp), %rdi
movl $0x2, 0x228(%rdi)
leaq 0x88(%rsp), %rsi
callq 0x2f63a
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 0x3783
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
subq %rax, %rcx
je 0x20273
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 0x2025c
leaq 0x88(%rsp), %rdi
movl $0x3, %esi
movl $0x12, %edx
callq 0x1de06
leaq 0x70(%rsp), %rdi
leaq 0x88(%rsp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0xaa17
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
subq %rax, %rcx
je 0x202f9
sarq $0x3, %rcx
movb $0x1, %bpl
movq 0x70(%rsp), %rdx
xorl %esi, %esi
movapd 0x1198a(%rip), %xmm0    # 0x31c50
movsd 0x11972(%rip), %xmm1    # 0x31c40
movsd (%rax,%rsi,8), %xmm2
subsd (%rdx,%rsi,8), %xmm2
andpd %xmm0, %xmm2
ucomisd %xmm1, %xmm2
movl $0x0, %edi
ja 0x202eb
movzbl %bpl, %edi
movl %edi, %ebp
incq %rsi
movl %esi, %edi
cmpq %rdi, %rcx
ja 0x202ce
jmp 0x202fc
movb $0x1, %bpl
leaq 0x11bd7(%rip), %rax     # 0x31eda
leaq 0x11bc9(%rip), %rdi     # 0x31ed3
testb $0x1, %bpl
cmovneq %rax, %rdi
callq 0x2350
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x20331
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x20348
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq %rbx, %rdi
callq 0x68e6
leaq 0x1b0(%rsp), %rdi
callq 0x6460
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x20374
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq 0x88(%rsp), %rdi
callq 0x2426c
andb $0x1, %bpl
movl %ebp, %eax
addq $0x3e0, %rsp            # imm = 0x3E0
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x203c2
movq %rax, %r14
jmp 0x203dc
movq %rax, %r14
jmp 0x203e4
jmp 0x203a1
movq %rax, %r14
jmp 0x203f1
movq %rax, %r14
movq 0x50(%rsp), %rdi
cmpq %rbx, %rdi
je 0x20408
movq 0x60(%rsp), %rsi
incq %rsi
jmp 0x20403
movq %rax, %r14
jmp 0x20408
movq %rax, %r14
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x203dc
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
movq %rbx, %rdi
callq 0x68e6
leaq 0x1b0(%rsp), %rdi
callq 0x6460
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x20408
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq 0x88(%rsp), %rdi
callq 0x2426c
movq %r14, %rdi
callq 0x23b0