// File: /workspace/github_c_makefile_star2_O0/johsteffens[P]beth/lib/bcore/bcore_btree.c
// Function: bcore_btree_vd_s_status
st_s* bcore_btree_vd_s_status( bcore_btree_vd_s* o )
{
    uz_t blocks = 0;
    uz_t nodes = 0;
    uz_t deleted_nodes = 0;
    if( o->chain_beg )
    {
        bcore_btree_node_vd_s* chain_beg = o->chain_beg;
        while( chain_beg )
        {
            chain_beg = *( bcore_btree_node_vd_s** )( chain_beg + o->block_size );
            blocks++;
        }
        nodes = blocks * o->block_size - ( o->chain_end - o->chain_ins );
    }
    if( o->del_chain )
    {
        bcore_btree_node_vd_s* del_chain = o->del_chain;
        while( del_chain )
        {
            del_chain = del_chain->parent;
            deleted_nodes++;
        }
    }

    st_s* string = st_s_create();
    uz_t used_nodes = nodes - deleted_nodes;
    st_s_pushf( string, "keys ........... %lu\n", bcore_btree_node_vd_s_keys( o->root ) );
    st_s_pushf( string, "nodes .......... %lu\n", used_nodes );
    st_s_pushf( string, "keys/nodes ..... %5.4f\n", used_nodes > 0 ? ( double )( bcore_btree_node_vd_s_keys( o->root ) ) / used_nodes : 0 );
    st_s_pushf( string, "depth .......... %lu\n", bcore_btree_node_vd_s_depth( o->root ) );
    st_s_pushf( string, "block size ..... %lu\n", o->block_size );
    st_s_pushf( string, "blocks ......... %lu\n", blocks );
    st_s_pushf( string, "deleted nodes .. %lu\n", deleted_nodes );
    return string;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x128ec3
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x128e87
movq -0x28(%rbp), %rax
movq -0x8(%rbp), %rcx
imulq $0x30, 0x30(%rcx), %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x128e5b
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
imulq 0x30(%rcx), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
subq %rcx, %rax
movl $0x30, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq -0x48(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x128efd
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x128efb
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x128eda
jmp 0x128efd
movb $0x0, %al
callq 0xff2e0
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
subq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x1273e0
movq -0x58(%rbp), %rdi
movq %rax, %rdx
leaq 0x30285(%rip), %rsi     # 0x1591bb
movb $0x0, %al
callq 0x100120
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rdx
leaq 0x26a76(%rip), %rsi     # 0x14f9c2
movb $0x0, %al
callq 0x100120
movq -0x38(%rbp), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x40(%rbp)
jbe 0x128fb8
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x1273e0
movq %rax, %xmm0
movaps 0x15f86(%rip), %xmm3    # 0x13ef00
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x15f8a(%rip), %xmm2    # 0x13ef10
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movq -0x40(%rbp), %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(%rbp)
jmp 0x128fc2
xorps %xmm0, %xmm0
movsd %xmm0, -0x60(%rbp)
jmp 0x128fc2
movq -0x50(%rbp), %rdi
movsd -0x60(%rbp), %xmm0
leaq 0x26a06(%rip), %rsi     # 0x14f9d8
movb $0x1, %al
callq 0x100120
movq -0x38(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x127490
movq -0x68(%rbp), %rdi
movq %rax, %rdx
leaq 0x301d6(%rip), %rsi     # 0x1591d1
movb $0x0, %al
callq 0x100120
movq -0x38(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdx
leaq 0x301d2(%rip), %rsi     # 0x1591e7
movb $0x0, %al
callq 0x100120
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0x301d2(%rip), %rsi     # 0x1591fd
movb $0x0, %al
callq 0x100120
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq 0x301d2(%rip), %rsi     # 0x159213
movb $0x0, %al
callq 0x100120
movq -0x38(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)