// File: fjamour[P]icentral/src/experiments.cc
// Function: lbcc_stat(graph_t&)
void lbcc_stat(graph_t& graph)
{
    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());
    vector<graph_hash_t> bcc_vec;
    graph.find_bicon_comp(bcc_vec);
    
    int lbcc_i = 0;//index of the lbcc, # of nodes
    int lbcc_j = 0;//index of the lbcc, # of edges
    int lbcc_n = 0;//highest # of nodes
    int lbcc_m = 0;//highest # of edges
    if(bcc_vec.size() > 1) {
        for(int i = 0; i < bcc_vec.size(); ++i) {
            if(bcc_vec[i].size() > lbcc_n) {
                lbcc_n = bcc_vec[i].size();
                lbcc_i = i;
            }
            if(bcc_vec[i].edge_set.size() > lbcc_m) {
                lbcc_m = bcc_vec[i].edge_set.size();
                lbcc_j = i;
            }
        }
    }
    if(lbcc_i != lbcc_j) {
        printf("LBCC_m is not LBCC_n!\n");
    }
    int num_nodes = lbcc_n;
    int num_edges = bcc_vec[lbcc_i].edge_set.size();
    double frac_nodes = (double)num_nodes/graph.size();
    double frac_edges = (double)num_edges/graph.edge_set.size();
    printf("\tLBCC # nodes:\t\t%d\n", num_nodes);
    printf("\tLBCC # edges:\t\t%d\n", num_edges);
    printf("\tLBCC frac nodes:\t%f\n", frac_nodes);
    printf("\tLBCC frac edges:\t%f\n", frac_edges);
    
}

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0xb0(%rsp)
leaq 0x2db8a(%rip), %rdi     # 0x7b2e0
xorl %eax, %eax
movb %al, 0x57(%rsp)
callq 0x9040
movq 0xb0(%rsp), %rdi
addq $0x108, %rdi            # imm = 0x108
callq 0x9250
movq %rax, %rsi
movb 0x57(%rsp), %al
leaq 0x2db99(%rip), %rdi     # 0x7b31c
callq 0x9040
movq 0xb0(%rsp), %rdi
callq 0x56b40
movq %rax, %rsi
movb 0x57(%rsp), %al
leaq 0x2db87(%rip), %rdi     # 0x7b32a
callq 0x9040
movq 0xb0(%rsp), %rdi
addq $0x30, %rdi
callq 0x4dbe0
movq %rax, %rsi
movb 0x57(%rsp), %al
leaq 0x2db78(%rip), %rdi     # 0x7b33f
callq 0x9040
leaq 0x98(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0x42080
movq 0x58(%rsp), %rsi
movq 0xb0(%rsp), %rdi
callq 0x40080
jmp 0x4d7f2
movl $0x0, 0x88(%rsp)
movl $0x0, 0x84(%rsp)
movl $0x0, 0x80(%rsp)
movl $0x0, 0x7c(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x42090
cmpq $0x1, %rax
jbe 0x4d95e
movl $0x0, 0x78(%rsp)
movslq 0x78(%rsp), %rax
movq %rax, 0x48(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x42090
movq %rax, %rcx
movq 0x48(%rsp), %rax
cmpq %rcx, %rax
jae 0x4d95c
movslq 0x78(%rsp), %rsi
leaq 0x98(%rsp), %rdi
callq 0x420b0
movq %rax, %rdi
callq 0x52790
movq %rax, 0x40(%rsp)
jmp 0x4d883
movq 0x40(%rsp), %rax
movslq 0x80(%rsp), %rcx
cmpq %rcx, %rax
jbe 0x4d8f5
movslq 0x78(%rsp), %rsi
leaq 0x98(%rsp), %rdi
callq 0x420b0
movq %rax, %rdi
callq 0x52790
movq %rax, 0x38(%rsp)
jmp 0x4d8b6
movq 0x38(%rsp), %rax
movl %eax, 0x80(%rsp)
movl 0x78(%rsp), %eax
movl %eax, 0x88(%rsp)
jmp 0x4d8f5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x421a0
jmp 0x4dacc
movslq 0x78(%rsp), %rsi
leaq 0x98(%rsp), %rdi
callq 0x420b0
movq %rax, %rdi
addq $0x30, %rdi
callq 0x4dbe0
movslq 0x7c(%rsp), %rcx
cmpq %rcx, %rax
jbe 0x4d94a
movslq 0x78(%rsp), %rsi
leaq 0x98(%rsp), %rdi
callq 0x420b0
movq %rax, %rdi
addq $0x30, %rdi
callq 0x4dbe0
movl %eax, 0x7c(%rsp)
movl 0x78(%rsp), %eax
movl %eax, 0x84(%rsp)
jmp 0x4d94c
movl 0x78(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x78(%rsp)
jmp 0x4d83a
jmp 0x4d95e
movl 0x88(%rsp), %eax
cmpl 0x84(%rsp), %eax
je 0x4d980
leaq 0x2e246(%rip), %rdi     # 0x7bbbb
xorl %eax, %eax
callq 0x9040
jmp 0x4d97e
jmp 0x4d980
movl 0x80(%rsp), %eax
movl %eax, 0x74(%rsp)
movslq 0x88(%rsp), %rsi
leaq 0x98(%rsp), %rdi
callq 0x420b0
movq %rax, %rdi
addq $0x30, %rdi
callq 0x4dbe0
movl %eax, 0x70(%rsp)
cvtsi2sdl 0x74(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
movq 0xb0(%rsp), %rdi
callq 0x56b40
movq %rax, 0x30(%rsp)
jmp 0x4d9d0
movsd 0x28(%rsp), %xmm0
movq 0x30(%rsp), %rax
movq %rax, %xmm1
movaps 0x2d8c9(%rip), %xmm2    # 0x7b2b0
movaps %xmm2, (%rsp)
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x2d8c9(%rip), %xmm2    # 0x7b2c0
movaps %xmm2, 0x10(%rsp)
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x68(%rsp)
cvtsi2sdl 0x70(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movq 0xb0(%rsp), %rdi
addq $0x30, %rdi
callq 0x4dbe0
movaps (%rsp), %xmm3
movaps 0x10(%rsp), %xmm2
movsd 0x20(%rsp), %xmm0
movq %rax, %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x60(%rsp)
movl 0x74(%rsp), %esi
leaq 0x2e164(%rip), %rdi     # 0x7bbd2
xorl %eax, %eax
callq 0x9040
jmp 0x4da77
movl 0x70(%rsp), %esi
leaq 0x2e164(%rip), %rdi     # 0x7bbe6
xorl %eax, %eax
callq 0x9040
jmp 0x4da8b
movsd 0x68(%rsp), %xmm0
leaq 0x2e162(%rip), %rdi     # 0x7bbfa
movb $0x1, %al
callq 0x9040
jmp 0x4daa1
movsd 0x60(%rsp), %xmm0
leaq 0x2e162(%rip), %rdi     # 0x7bc10
movb $0x1, %al
callq 0x9040
jmp 0x4dab7
leaq 0x98(%rsp), %rdi
callq 0x421a0
addq $0xb8, %rsp
retq
movq 0x90(%rsp), %rdi
callq 0x9cf0
nopl (%rax)