// File: /workspace/github_c_makefile_star2_O0/c-zhou[P]oatk/syncasm.c
// Function: scg_subgraph_stat
void scg_subgraph_stat(scg_t *scg, FILE *fo)
{
    uint32_t i, s, n_vtx;
    uint64_t j, n, n_scm, n_utg, n_arc;
    asmg_t *utg_asmg;
    uint8_t *visited, *flag;
    uint32_t *vtx;

    utg_asmg = scg->utg_asmg;
    n_utg = utg_asmg->n_vtx;

    MYCALLOC(visited, n_utg);
    MYMALLOC(flag, n_utg);
    s = 0;
    for (i = 0; i < n_utg; ++i) {
        if (visited[i])
            continue;
        vtx = asmg_subgraph(utg_asmg, &i, 1, 0, 0, &n_vtx, 0);
        MYBZERO(flag, n_utg);
        n_scm = 0;
        for (j = 0; j < n_vtx; ++j) {
            n_scm += utg_asmg->vtx[vtx[j]].n;
            flag[vtx[j]] = 1;
            visited[vtx[j]] = 1;
        }
        n_arc = 0;
        for (j = 0, n = utg_asmg->n_arc; j < n; ++j)
            if (!utg_asmg->arc[j].del &&
                    flag[utg_asmg->arc[j].v>>1] && 
                    flag[utg_asmg->arc[j].w>>1])
                ++n_arc;
        fprintf(fo, "[M::%s] syncmer graph stats for subgraph %u - seeding u%u\n", __func__, s++, vtx[0]);
        fprintf(fo, "[M::%s] number unitigs  : %u\n", __func__, n_vtx);
        fprintf(fo, "[M::%s] number syncmers : %lu\n", __func__, n_scm);
        fprintf(fo, "[M::%s] number arcs     : %lu\n", __func__, n_arc);
        free(vtx);
    }

    free(visited);
    free(flag);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movl $0x1, %esi
callq 0x2250
movq %rax, -0x58(%rbp)
movq -0x40(%rbp), %rdi
shlq $0x0, %rdi
callq 0x2320
movq %rax, -0x60(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpq -0x40(%rbp), %rax
jae 0x557d
movq -0x58(%rbp), %rax
movl -0x14(%rbp), %ecx
cmpb $0x0, (%rax,%rcx)
je 0x5387
jmp 0x556f
movq -0x50(%rbp), %rdi
leaq -0x14(%rbp), %rsi
movl $0x1, %edx
xorl %ecx, %ecx
xorl %eax, %eax
movl %eax, %r8d
leaq -0x1c(%rbp), %r9
movl $0x0, (%rsp)
callq 0x23760
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rdi
movq -0x40(%rbp), %rdx
shlq $0x0, %rdx
xorl %esi, %esi
callq 0x21f0
movq $0x0, -0x38(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl -0x1c(%rbp), %ecx
cmpq %rcx, %rax
jae 0x5437
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x68(%rbp), %rcx
movq -0x28(%rbp), %rdx
movl (%rcx,%rdx,4), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x60(%rbp), %rax
movq -0x68(%rbp), %rcx
movq -0x28(%rbp), %rdx
movl (%rcx,%rdx,4), %ecx
movb $0x1, (%rax,%rcx)
movq -0x58(%rbp), %rax
movq -0x68(%rbp), %rcx
movq -0x28(%rbp), %rdx
movl (%rcx,%rdx,4), %ecx
movb $0x1, (%rax,%rcx)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x53d2
movq $0x0, -0x48(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x54e5
movq -0x50(%rbp), %rax
movq 0x28(%rax), %rax
imulq $0x30, -0x28(%rbp), %rcx
addq %rcx, %rax
movl 0x20(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x54d2
movq -0x60(%rbp), %rax
movq -0x50(%rbp), %rcx
movq 0x28(%rcx), %rcx
imulq $0x30, -0x28(%rbp), %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
shrq %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x54d2
movq -0x60(%rbp), %rax
movq -0x50(%rbp), %rcx
movq 0x28(%rcx), %rcx
imulq $0x30, -0x28(%rbp), %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rcx
shrq %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x54d2
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x54d4
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x5453
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %ecx
movl %ecx, %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movq -0x68(%rbp), %rax
movl (%rax), %r8d
leaq 0x28354(%rip), %rsi     # 0x2d856
leaq 0x28388(%rip), %rdx     # 0x2d891
movb $0x0, %al
callq 0x2290
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %ecx
leaq 0x28385(%rip), %rsi     # 0x2d8a3
leaq 0x2836c(%rip), %rdx     # 0x2d891
movb $0x0, %al
callq 0x2290
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rcx
leaq 0x282dd(%rip), %rsi     # 0x2d818
leaq 0x2834f(%rip), %rdx     # 0x2d891
movb $0x0, %al
callq 0x2290
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rcx
leaq 0x282df(%rip), %rsi     # 0x2d837
leaq 0x28332(%rip), %rdx     # 0x2d891
movb $0x0, %al
callq 0x2290
movq -0x68(%rbp), %rdi
callq 0x2060
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x5368
movq -0x58(%rbp), %rdi
callq 0x2060
movq -0x60(%rbp), %rdi
callq 0x2060
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)