// File: /workspace/github_cpp_makefile_star2_O3/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x328, %rsp            # imm = 0x328
movl %esi, %ebx
movq %rdi, %r14
leaq 0x173d3(%rip), %rdi     # 0x30b40
callq 0x2350
movq 0x108(%r14), %rsi
leaq 0x16ad0(%rip), %rdi     # 0x30250
xorl %eax, %eax
callq 0x2030
movq %r14, %rdi
callq 0x1dfcc
leaq 0x16ac8(%rip), %rdi     # 0x3025e
movq %rax, %rsi
xorl %eax, %eax
callq 0x2030
movq 0x58(%r14), %rsi
leaq 0x16ac8(%rip), %rdi     # 0x30273
xorl %eax, %eax
callq 0x2030
leaq 0x80(%rsp), %r15
movq %r15, %rdi
callq 0x152ae
movq %r15, %rdi
movq %r14, %rsi
callq 0x1cf40
movl $0xa, %edi
callq 0x22f0
leaq 0x17061(%rip), %rdi     # 0x3083f
xorl %eax, %eax
callq 0x2030
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x2360
leaq 0x38(%rsp), %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0xaa33
leaq 0x28(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x2360
movq -0x10(%r14), %r15
movq -0x8(%r14), %r12
movq (%r14), %r13
movq 0x8(%r14), %rbp
leaq 0x80(%rsp), %rdi
callq 0x1c4e0
cvtsi2sd %rbp, %xmm0
movsd 0x16968(%rip), %xmm1    # 0x301a0
divsd %xmm1, %xmm0
cvtsi2sd %r13, %xmm2
addsd %xmm0, %xmm2
movapd %xmm2, %xmm3
xorps %xmm0, %xmm0
cvtsi2sd %r12, %xmm0
divsd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %r15, %xmm1
addsd %xmm0, %xmm1
movq %rax, %xmm2
punpckldq 0x169b2(%rip), %xmm2 # xmm2 = xmm2[0],mem[0],xmm2[1],mem[1]
subpd 0x169ba(%rip), %xmm2    # 0x30230
subsd %xmm1, %xmm3
movsd %xmm3, 0x8(%rsp)
movapd %xmm2, %xmm0
unpckhpd %xmm2, %xmm0            # xmm0 = xmm0[1],xmm2[1]
addsd %xmm2, %xmm0
mulsd %xmm3, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %ebx, %xmm1
movsd %xmm1, 0x10(%rsp)
divsd %xmm1, %xmm0
leaq 0x16bb2(%rip), %rdi     # 0x3045a
movb $0x1, %al
callq 0x2030
movsd 0x8(%rsp), %xmm0
divsd 0x10(%rsp), %xmm0
leaq 0x16f91(%rip), %rdi     # 0x30853
movb $0x1, %al
callq 0x2030
movl $0xa, %edi
callq 0x22f0
leaq 0x16f96(%rip), %rdi     # 0x30870
xorl %eax, %eax
callq 0x2030
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x2360
leaq 0x50(%rsp), %rdi
leaq 0x80(%rsp), %rsi
movl %ebx, %edx
callq 0xd272
movq %r14, %rdi
xorl %esi, %esi
callq 0x2360
movq 0x18(%rsp), %rbx
movq 0x20(%rsp), %r14
movq 0x28(%rsp), %r15
movq 0x30(%rsp), %r12
leaq 0x80(%rsp), %rdi
callq 0x1c4e0
xorps %xmm0, %xmm0
cvtsi2sd %r12, %xmm0
movsd 0x16864(%rip), %xmm2    # 0x301a0
divsd %xmm2, %xmm0
xorps %xmm3, %xmm3
cvtsi2sd %r15, %xmm3
xorps %xmm1, %xmm1
cvtsi2sd %r14, %xmm1
addsd %xmm0, %xmm3
divsd %xmm2, %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %rbx, %xmm0
addsd %xmm1, %xmm0
movq %rax, %xmm1
punpckldq 0x168af(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subsd %xmm0, %xmm3
movsd %xmm3, 0x8(%rsp)
subpd 0x168ad(%rip), %xmm1    # 0x30230
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
mulsd %xmm3, %xmm0
divsd 0x10(%rsp), %xmm0
leaq 0x16aba(%rip), %rdi     # 0x3045a
movb $0x1, %al
callq 0x2030
movsd 0x8(%rsp), %xmm0
divsd 0x10(%rsp), %xmm0
leaq 0x16ecf(%rip), %rdi     # 0x30889
movb $0x1, %al
callq 0x2030
leaq 0x50(%rsp), %rdi
callq 0xd912
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x199e2
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq 0x80(%rsp), %rdi
callq 0x15650
addq $0x328, %rsp            # imm = 0x328
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0xd912
jmp 0x19a15
jmp 0x19a12
movq %rax, %rbx
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x19a33
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
jmp 0x19a33
jmp 0x19a30
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x15650
movq %rbx, %rdi
callq 0x23b0