// File: /workspace/github_cpp_makefile_star2_O2/fjamour[P]icentral/src/experiments.cc
// Function: compare_brandes_hash_vs_vector(graph_t&, int)
void compare_brandes_hash_vs_vector(graph_t& graph, int num_iter)
{
    printf("==========================================================\n");
    printf("Graph: \t\t\t%s\n", graph.graph_name.c_str());
    printf("Graph # nodes: \t\t%d\n", graph.size());
    printf("Graph # edges: \t\t%d\n", graph.edge_set.size());
    graph_hash_t g;
    g.fill_graph(graph);
    
    double brandes_time;
    timer tm;

    printf("\n");
    printf("Brandes runtime: \t\t");
    tm.start();
    vector<double> bc_vec = brandes_bc(graph, num_iter);
    tm.stop();
    brandes_time = (tm.interval()*g.size()/num_iter);
    printf("%f\n", brandes_time);
    printf("Brandes avg iter time: \t\t%f\n", tm.interval()/num_iter);
    printf("\n");
    
    printf("Brandes hash runtime: \t\t");
    tm.start();
    tr1_map_t(double) bc_map = brandes_bc_hash(g, num_iter);
    tm.stop();
    brandes_time = (tm.interval()*g.size()/num_iter);
    printf("%f\n", brandes_time);
    printf("Brandes hash avg iter time: \t%f\n", tm.interval()/num_iter);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x320, %rsp            # imm = 0x320
movl %esi, %ebx
movq %rdi, %r14
leaq 0x13e6d(%rip), %rdi     # 0x28b00
callq 0x2360
movq 0x108(%r14), %rsi
leaq 0x1356a(%rip), %rdi     # 0x28210
xorl %eax, %eax
callq 0x2030
movq %r14, %rdi
callq 0x18d3c
leaq 0x13562(%rip), %rdi     # 0x2821e
movq %rax, %rsi
xorl %eax, %eax
callq 0x2030
movq 0x58(%r14), %rsi
leaq 0x13562(%rip), %rdi     # 0x28233
xorl %eax, %eax
callq 0x2030
leaq 0x78(%rsp), %r15
movq %r15, %rdi
callq 0x11468
movq %r15, %rdi
movq %r14, %rsi
callq 0x17db0
pushq $0xa
popq %rdi
callq 0x2300
leaq 0x13b00(%rip), %rdi     # 0x287ff
xorl %eax, %eax
callq 0x2030
leaq 0x10(%rsp), %rdi
callq 0xb094
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x8fa3
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0xb09c
movq %r14, %rdi
callq 0xb0a8
movsd %xmm0, (%rsp)
leaq 0x78(%rsp), %rdi
callq 0x176f6
movq %rax, %xmm0
punpckldq 0x134a0(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x134a8(%rip), %xmm0    # 0x28200
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movsd (%rsp), %xmm0
mulsd %xmm1, %xmm0
cvtsi2sd %ebx, %xmm1
movsd %xmm1, (%rsp)
divsd %xmm1, %xmm0
leaq 0x13699(%rip), %rdi     # 0x2841a
movb $0x1, %al
callq 0x2030
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0xb0a8
divsd (%rsp), %xmm0
leaq 0x13a72(%rip), %rdi     # 0x28813
movb $0x1, %al
callq 0x2030
pushq $0xa
popq %rdi
callq 0x2300
leaq 0x13a79(%rip), %rdi     # 0x28830
xorl %eax, %eax
callq 0x2030
movq %r14, %rdi
callq 0xb094
leaq 0x48(%rsp), %rdi
leaq 0x78(%rsp), %rsi
movl %ebx, %edx
callq 0xab13
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0xb09c
movq %rbx, %rdi
callq 0xb0a8
movsd %xmm0, 0x8(%rsp)
leaq 0x78(%rsp), %rdi
callq 0x176f6
movq %rax, %xmm0
punpckldq 0x133e7(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x133ef(%rip), %xmm0    # 0x28200
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
mulsd %xmm1, %xmm0
divsd (%rsp), %xmm0
leaq 0x135e7(%rip), %rdi     # 0x2841a
movb $0x1, %al
callq 0x2030
leaq 0x10(%rsp), %rdi
callq 0xb0a8
divsd (%rsp), %xmm0
leaq 0x139f9(%rip), %rdi     # 0x28849
movb $0x1, %al
callq 0x2030
leaq 0x48(%rsp), %rdi
callq 0xb070
leaq 0x30(%rsp), %rdi
callq 0x5754
leaq 0x78(%rsp), %rdi
callq 0x1173e
addq $0x320, %rsp            # imm = 0x320
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0xb070
jmp 0x14e96
jmp 0x14e93
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x5754
jmp 0x14ea7
jmp 0x14ea4
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x1173e
movq %rbx, %rdi
callq 0x23d0