// File: /workspace/github_cpp_makefile_star2_O1/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 0x16a0f(%rip), %rdi     # 0x31b40
callq 0x2350
movq 0x108(%rbx), %rsi
leaq 0x1610c(%rip), %rdi     # 0x31250
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x2030
movq %rbx, %rdi
callq 0x1e160
leaq 0x16101(%rip), %rdi     # 0x3125e
movq %rax, %rsi
xorl %eax, %eax
callq 0x2030
movq 0x58(%rbx), %rsi
leaq 0x16101(%rip), %rdi     # 0x31273
xorl %eax, %eax
callq 0x2030
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rsi
movaps %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
movq %rbx, %rdi
callq 0x147a2
movq %rbx, 0x8(%rsp)
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
sarq $0x3, %rax
movabsq $-0x303030303030303, %rcx # imm = 0xFCFCFCFCFCFCFCFD
imulq %rcx, %rax
cmpq $0x2, %rax
jb 0x1b24b
movq 0x10(%rsp), %rdi
movl $0x0, %ebp
movl $0x0, %r13d
cmpq %rdi, 0x18(%rsp)
je 0x1b250
xorl %r12d, %r12d
xorl %ebx, %ebx
xorl %r13d, %r13d
xorl %ebp, %ebp
xorl %r15d, %r15d
xorl %r14d, %r14d
addq %r12, %rdi
callq 0x1c62c
movslq %r14d, %rcx
cmpq %rcx, %rax
jbe 0x1b209
movq 0x10(%rsp), %rdi
addq %r12, %rdi
callq 0x1c62c
movq %rax, %r14
movl %ebx, %r13d
movq 0x10(%rsp), %rdi
movq 0x58(%rdi,%r12), %rax
movslq %r15d, %r15
cmpq %r15, %rax
cmoval %eax, %r15d
cmoval %ebx, %ebp
movq 0x18(%rsp), %rax
incq %rbx
subq %rdi, %rax
sarq $0x3, %rax
movabsq $-0x303030303030303, %rcx # imm = 0xFCFCFCFCFCFCFCFD
imulq %rcx, %rax
addq $0x2a8, %r12            # imm = 0x2A8
cmpq %rbx, %rax
ja 0x1b1e6
jmp 0x1b250
xorl %ebp, %ebp
xorl %r13d, %r13d
cmpl %ebp, %r13d
je 0x1b261
leaq 0x1691f(%rip), %rdi     # 0x31b7b
callq 0x2350
movslq %r13d, %rax
movq 0x10(%rsp), %rcx
imulq $0x2a8, %rax, %rax      # imm = 0x2A8
movq 0x58(%rcx,%rax), %r15
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x1e160
cvtsi2sd %r14d, %xmm4
movq %rax, %xmm0
movq 0x15f8c(%rip), %xmm1    # 0x31220
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x15f90(%rip), %xmm2    # 0x31230
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, 0x30(%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, 0x8(%rsp)
leaq 0x167c1(%rip), %rdi     # 0x31aaa
movl %r14d, %esi
xorl %eax, %eax
callq 0x2030
leaq 0x167c4(%rip), %rdi     # 0x31abe
movl %r15d, %esi
xorl %eax, %eax
callq 0x2030
leaq 0x167c7(%rip), %rdi     # 0x31ad2
movsd 0x30(%rsp), %xmm0
movb $0x1, %al
callq 0x2030
leaq 0x167c9(%rip), %rdi     # 0x31ae8
movsd 0x8(%rsp), %xmm0
movb $0x1, %al
callq 0x2030
leaq 0x10(%rsp), %rdi
callq 0x15802
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1b349
jmp 0x1b349
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x15802
movq %rbx, %rdi
callq 0x23b0