// File: 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:
subq $0x378, %rsp            # imm = 0x378
movq %rdi, 0x370(%rsp)
movl %esi, 0x36c(%rsp)
leaq 0x300f3(%rip), %rdi     # 0x7b2e0
xorl %eax, %eax
movb %al, 0x37(%rsp)
callq 0x9040
movq 0x370(%rsp), %rdi
addq $0x108, %rdi            # imm = 0x108
callq 0x9250
movq %rax, %rsi
movb 0x37(%rsp), %al
leaq 0x30102(%rip), %rdi     # 0x7b31c
callq 0x9040
movq 0x370(%rsp), %rdi
callq 0x56b40
movq %rax, %rsi
movb 0x37(%rsp), %al
leaq 0x300f0(%rip), %rdi     # 0x7b32a
callq 0x9040
movq 0x370(%rsp), %rdi
addq $0x30, %rdi
callq 0x4dbe0
movq %rax, %rsi
movb 0x37(%rsp), %al
leaq 0x300e1(%rip), %rdi     # 0x7b33f
callq 0x9040
leaq 0xc0(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x41780
movq 0x38(%rsp), %rdi
movq 0x370(%rsp), %rsi
callq 0x53670
jmp 0x4b289
leaq 0x30b92(%rip), %rdi     # 0x7be22
xorl %eax, %eax
callq 0x9040
jmp 0x4b299
leaq 0x306b0(%rip), %rdi     # 0x7b950
xorl %eax, %eax
callq 0x9040
jmp 0x4b2a9
leaq 0x88(%rsp), %rdi
callq 0x2d430
jmp 0x4b2b8
movq 0x370(%rsp), %rsi
movl 0x36c(%rsp), %edx
leaq 0x70(%rsp), %rdi
callq 0x28720
jmp 0x4b2d3
leaq 0x88(%rsp), %rdi
callq 0x2d450
jmp 0x4b2e2
leaq 0x88(%rsp), %rdi
callq 0x2d470
movsd %xmm0, 0x28(%rsp)
jmp 0x4b2f7
leaq 0xc0(%rsp), %rdi
callq 0x52790
movq %rax, 0x20(%rsp)
jmp 0x4b30b
movsd 0x28(%rsp), %xmm0
movq 0x20(%rsp), %rax
movq %rax, %xmm1
movaps 0x2ff8e(%rip), %xmm2    # 0x7b2b0
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x2ff92(%rip), %xmm2    # 0x7b2c0
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
cvtsi2sdl 0x36c(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0xa8(%rsp)
movsd 0xa8(%rsp), %xmm0
leaq 0x301e9(%rip), %rdi     # 0x7b550
movb $0x1, %al
callq 0x9040
jmp 0x4b370
leaq 0x88(%rsp), %rdi
callq 0x2d470
movsd %xmm0, 0x18(%rsp)
jmp 0x4b385
movsd 0x18(%rsp), %xmm0
cvtsi2sdl 0x36c(%rsp), %xmm1
divsd %xmm1, %xmm0
leaq 0x305c5(%rip), %rdi     # 0x7b964
movb $0x1, %al
callq 0x9040
jmp 0x4b3a8
leaq 0x30a73(%rip), %rdi     # 0x7be22
xorl %eax, %eax
callq 0x9040
jmp 0x4b3b8
leaq 0x305c2(%rip), %rdi     # 0x7b981
xorl %eax, %eax
callq 0x9040
jmp 0x4b3c8
leaq 0x88(%rsp), %rdi
callq 0x2d430
jmp 0x4b3d7
movl 0x36c(%rsp), %edx
leaq 0x40(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x2c530
jmp 0x4b3f2
leaq 0x88(%rsp), %rdi
callq 0x2d450
jmp 0x4b401
leaq 0x88(%rsp), %rdi
callq 0x2d470
movsd %xmm0, 0x10(%rsp)
jmp 0x4b416
leaq 0xc0(%rsp), %rdi
callq 0x52790
movq %rax, 0x8(%rsp)
jmp 0x4b42a
movsd 0x10(%rsp), %xmm0
movq 0x8(%rsp), %rax
movq %rax, %xmm1
movaps 0x2fe6f(%rip), %xmm2    # 0x7b2b0
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x2fe73(%rip), %xmm2    # 0x7b2c0
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
cvtsi2sdl 0x36c(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0xa8(%rsp)
movsd 0xa8(%rsp), %xmm0
leaq 0x300ca(%rip), %rdi     # 0x7b550
movb $0x1, %al
callq 0x9040
jmp 0x4b48f
leaq 0x88(%rsp), %rdi
callq 0x2d470
movsd %xmm0, (%rsp)
jmp 0x4b4a3
movsd (%rsp), %xmm0
cvtsi2sdl 0x36c(%rsp), %xmm1
divsd %xmm1, %xmm0
leaq 0x304de(%rip), %rdi     # 0x7b99a
movb $0x1, %al
callq 0x9040
jmp 0x4b4c5
leaq 0x40(%rsp), %rdi
callq 0x2d420
leaq 0x70(%rsp), %rdi
callq 0xfa50
leaq 0xc0(%rsp), %rdi
callq 0x41f20
addq $0x378, %rsp            # imm = 0x378
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
jmp 0x4b542
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
jmp 0x4b538
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x2d420
leaq 0x70(%rsp), %rdi
callq 0xfa50
leaq 0xc0(%rsp), %rdi
callq 0x41f20
movq 0xb8(%rsp), %rdi
callq 0x9cf0
nopl (%rax)