// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x12997(%rip), %rdi     # 0x28b00
callq 0x2360
movq 0x108(%rbx), %rsi
leaq 0x12094(%rip), %rdi     # 0x28210
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x2030
movq %rbx, %rdi
callq 0x18d3c
leaq 0x12089(%rip), %rdi     # 0x2821e
movq %rax, %rsi
xorl %eax, %eax
callq 0x2030
movq 0x58(%rbx), %rsi
leaq 0x12089(%rip), %rdi     # 0x28233
xorl %eax, %eax
callq 0x2030
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rsi
movaps %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
movq %rbx, %rdi
callq 0x10aca
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rcx
movq %rcx, %rax
subq %rdi, %rax
movl $0x2a8, %esi            # imm = 0x2A8
cqto
idivq %rsi
cmpq $0x2, %rax
jb 0x1625e
movq %rbx, 0x8(%rsp)
xorl %r12d, %r12d
xorl %ebx, %ebx
xorl %r14d, %r14d
xorl %ebp, %ebp
xorl %r13d, %r13d
xorl %r15d, %r15d
subq %rdi, %rcx
movq %rcx, %rax
cqto
movl $0x2a8, %ecx            # imm = 0x2A8
idivq %rcx
cmpq %rbx, %rax
jbe 0x16263
addq %r12, %rdi
callq 0x176f6
movslq %r14d, %rcx
cmpq %rcx, %rax
jbe 0x16236
movq 0x10(%rsp), %rdi
addq %r12, %rdi
callq 0x176f6
movq %rax, %r14
movl %ebx, %r15d
movq 0x10(%rsp), %rdi
movq 0x58(%rdi,%r12), %rax
movslq %ebp, %rbp
cmpq %rbp, %rax
cmoval %eax, %ebp
cmoval %ebx, %r13d
movq 0x18(%rsp), %rcx
incq %rbx
addq $0x2a8, %r12            # imm = 0x2A8
jmp 0x161fe
xorl %r14d, %r14d
jmp 0x16283
cmpl %r13d, %r15d
jne 0x1626d
movl %r13d, %r15d
jmp 0x1627e
leaq 0x128c7(%rip), %rdi     # 0x28b3b
callq 0x2360
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rbx
movslq %r15d, %rax
imulq $0x2a8, %rax, %rax      # imm = 0x2A8
movq 0x58(%rdi,%rax), %r15
movq %rbx, %rdi
callq 0x18d3c
cvtsi2sd %r14d, %xmm4
movq %rax, %xmm0
movq 0x11f44(%rip), %xmm1    # 0x281f0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x11f48(%rip), %xmm2    # 0x28200
subpd %xmm2, %xmm0
movapd %xmm0, %xmm3
unpckhpd %xmm0, %xmm3            # xmm3 = xmm3[1],xmm0[1]
addsd %xmm0, %xmm3
cvtsi2sd %r15d, %xmm5
divsd %xmm3, %xmm4
movsd %xmm4, 0x8(%rsp)
movq 0x58(%rbx), %xmm0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
subpd %xmm2, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
divsd %xmm1, %xmm5
movsd %xmm5, 0x30(%rsp)
leaq 0x12769(%rip), %rdi     # 0x28a6a
movl %r14d, %esi
xorl %eax, %eax
callq 0x2030
leaq 0x1276c(%rip), %rdi     # 0x28a7e
movl %r15d, %esi
xorl %eax, %eax
callq 0x2030
leaq 0x1276f(%rip), %rdi     # 0x28a92
movsd 0x8(%rsp), %xmm0
movb $0x1, %al
callq 0x2030
leaq 0x12771(%rip), %rdi     # 0x28aa8
movsd 0x30(%rsp), %xmm0
movb $0x1, %al
callq 0x2030
leaq 0x10(%rsp), %rdi
callq 0x11800
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x16361
jmp 0x16361
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x11800
movq %rbx, %rdi
callq 0x23d0