// File: /workspace/github_cpp_makefile_star2_O1/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 0x18331(%rip), %rdi     # 0x31b40
callq 0x2350
movq 0x108(%r14), %rsi
leaq 0x17a2e(%rip), %rdi     # 0x31250
xorl %eax, %eax
callq 0x2030
movq %r14, %rdi
callq 0x1e160
leaq 0x17a26(%rip), %rdi     # 0x3125e
movq %rax, %rsi
xorl %eax, %eax
callq 0x2030
movq 0x58(%r14), %rsi
leaq 0x17a26(%rip), %rdi     # 0x31273
xorl %eax, %eax
callq 0x2030
leaq 0x80(%rsp), %r15
movq %r15, %rdi
callq 0x153ae
movq %r15, %rdi
movq %r14, %rsi
callq 0x1d062
movl $0xa, %edi
callq 0x22f0
leaq 0x17fbf(%rip), %rdi     # 0x3183f
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 0xaa17
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 0x1c62c
cvtsi2sd %rbp, %xmm0
movsd 0x178c6(%rip), %xmm1    # 0x311a0
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 0x17910(%rip), %xmm2 # xmm2 = xmm2[0],mem[0],xmm2[1],mem[1]
subpd 0x17918(%rip), %xmm2    # 0x31230
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 0x17b10(%rip), %rdi     # 0x3145a
movb $0x1, %al
callq 0x2030
movsd 0x8(%rsp), %xmm0
divsd 0x10(%rsp), %xmm0
leaq 0x17eef(%rip), %rdi     # 0x31853
movb $0x1, %al
callq 0x2030
movl $0xa, %edi
callq 0x22f0
leaq 0x17ef4(%rip), %rdi     # 0x31870
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 0xd21a
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 0x1c62c
xorps %xmm0, %xmm0
cvtsi2sd %r12, %xmm0
movsd 0x177c2(%rip), %xmm2    # 0x311a0
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 0x1780d(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subsd %xmm0, %xmm3
movsd %xmm3, 0x8(%rsp)
subpd 0x1780b(%rip), %xmm1    # 0x31230
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
mulsd %xmm3, %xmm0
divsd 0x10(%rsp), %xmm0
leaq 0x17a18(%rip), %rdi     # 0x3145a
movb $0x1, %al
callq 0x2030
movsd 0x8(%rsp), %xmm0
divsd 0x10(%rsp), %xmm0
leaq 0x17e2d(%rip), %rdi     # 0x31889
movb $0x1, %al
callq 0x2030
leaq 0x50(%rsp), %rdi
callq 0xd8b4
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x19a84
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq 0x80(%rsp), %rdi
callq 0x15750
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 0xd8b4
jmp 0x19ab7
jmp 0x19ab4
movq %rax, %rbx
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x19ad5
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x2250
jmp 0x19ad5
jmp 0x19ad2
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x15750
movq %rbx, %rdi
callq 0x23b0