// File: /workspace/github_c_makefile_star2_O2/buf1024[P]mysch/dict.c
// Function: dict_print_stats_ht
static void _dict_print_stats_ht(dictht *ht)
{
    unsigned long i, slots = 0, chainlen, maxchainlen = 0;
    unsigned long totchainlen = 0;
    unsigned long clvector[DICT_STATS_VECTLEN];

    if (ht->used == 0)
    {
        printf("No stats available for empty dictionaries\n");
        return;
    }

    for (i = 0; i < DICT_STATS_VECTLEN; i++)
        clvector[i] = 0;
    for (i = 0; i < ht->size; i++)
    {
        dict_entry *he;

        if (ht->table[i] == NULL)
        {
            clvector[0]++;
            continue;
        }
        slots++;
        /* For each hash entry on this slot... */
        chainlen = 0;
        he = ht->table[i];
        while (he)
        {
            chainlen++;
            he = he->next;
        }
        clvector[(chainlen <
                  DICT_STATS_VECTLEN) ? chainlen : (DICT_STATS_VECTLEN - 1)]++;
        if (chainlen > maxchainlen)
            maxchainlen = chainlen;
        totchainlen += chainlen;
    }
    printf("Hash table stats:\n");
    printf(" table size: %ld\n", ht->size);
    printf(" number of elements: %ld\n", ht->used);
    printf(" different slots: %ld\n", slots);
    printf(" max chain length: %ld\n", maxchainlen);
    printf(" avg chain length (counted): %.02f\n", (float) totchainlen / slots);
    printf(" avg chain length (computed): %.02f\n", (float) ht->used / slots);
    printf(" Chain length distribution:\n");
    for (i = 0; i < DICT_STATS_VECTLEN - 1; i++)
    {
        if (clvector[i] == 0)
            continue;
        printf("   %s%ld: %ld (%.02f%%)\n",
               (i == DICT_STATS_VECTLEN - 1) ? ">= " : "", i, clvector[i],
               ((float) clvector[i] / ht->size) * 100);
    }
}

// Assembly:
cmpq $0x0, 0x18(%rdi)
je 0x2f8b
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rdi, %rbx
xorl %eax, %eax
cmpq $0x32, %rax
je 0x2ec7
andq $0x0, -0x1c0(%rbp,%rax,8)
incq %rax
jmp 0x2eb3
movq 0x8(%rbx), %rax
xorl %ecx, %ecx
pushq $0x31
popq %rdx
xorl %r15d, %r15d
xorl %r12d, %r12d
xorl %r13d, %r13d
cmpq %rax, %rcx
je 0x2f2a
movq (%rbx), %rsi
movq (%rsi,%rcx,8), %rdi
testq %rdi, %rdi
je 0x2f1e
xorl %esi, %esi
testq %rdi, %rdi
je 0x2efa
incq %rsi
movq 0x18(%rdi), %rdi
jmp 0x2eec
incq %r15
cmpq $0x31, %rsi
movq %rdx, %rdi
cmovbq %rsi, %rdi
movl %edi, %edi
incq -0x1c0(%rbp,%rdi,8)
cmpq %r12, %rsi
cmovaq %rsi, %r12
addq %rsi, %r13
jmp 0x2f25
incq -0x1c0(%rbp)
incq %rcx
jmp 0x2ed9
leaq 0x41ad(%rip), %rdi      # 0x70de
callq 0x20b0
movq 0x8(%rbx), %rsi
leaq 0x40c7(%rip), %rdi      # 0x7008
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x2160
movq 0x18(%rbx), %rsi
leaq 0x40c4(%rip), %rdi      # 0x701a
xorl %eax, %eax
callq 0x2160
leaq 0x40d0(%rip), %rdi      # 0x7034
movq %r15, %rsi
xorl %eax, %eax
callq 0x2160
leaq 0x40d6(%rip), %rdi      # 0x704b
movq %r12, %rsi
xorl %eax, %eax
callq 0x2160
testq %r13, %r13
js 0x2f97
cvtsi2ss %r13, %xmm0
jmp 0x2fad
leaq 0x417a(%rip), %rdi      # 0x710c
jmp 0x20b0
movq %r13, %rax
shrq %rax
andl $0x1, %r13d
orq %rax, %r13
cvtsi2ss %r13, %xmm0
addss %xmm0, %xmm0
testq %r15, %r15
js 0x2fb9
cvtsi2ss %r15, %xmm1
jmp 0x2fcf
movq %r15, %rax
shrq %rax
andl $0x1, %r15d
orq %rax, %r15
cvtsi2ss %r15, %xmm1
addss %xmm1, %xmm1
movss %xmm1, -0x2c(%rbp)
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x4080(%rip), %rdi      # 0x7063
movb $0x1, %al
callq 0x2160
movq 0x18(%rbx), %rax
testq %rax, %rax
js 0x2ffa
cvtsi2ss %rax, %xmm0
jmp 0x300f
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
cvtsi2ss %rax, %xmm0
addss %xmm0, %xmm0
divss -0x2c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x4068(%rip), %rdi      # 0x7087
movb $0x1, %al
callq 0x2160
leaq 0x40c3(%rip), %rdi      # 0x70f0
callq 0x20b0
leaq 0x4073(%rip), %r15      # 0x70ac
leaq 0x415a(%rip), %r12      # 0x719a
cmpq $0x31, %r14
je 0x30bd
movq -0x1c0(%rbp,%r14,8), %rcx
testq %rcx, %rcx
je 0x30b8
js 0x305c
cvtsi2ss %rcx, %xmm0
jmp 0x3073
movq %rcx, %rax
shrq %rax
movl %ecx, %edx
andl $0x1, %edx
orq %rax, %rdx
cvtsi2ss %rdx, %xmm0
addss %xmm0, %xmm0
movq 0x8(%rbx), %rax
testq %rax, %rax
js 0x3083
cvtsi2ss %rax, %xmm1
jmp 0x3098
movq %rax, %rdx
shrq %rdx
andl $0x1, %eax
orq %rdx, %rax
cvtsi2ss %rax, %xmm1
addss %xmm1, %xmm1
divss %xmm1, %xmm0
mulss 0x3f60(%rip), %xmm0     # 0x7004
cvtss2sd %xmm0, %xmm0
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
movb $0x1, %al
callq 0x2160
incq %r14
jmp 0x3040
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq