// File: /workspace/github_c_makefile_star2_O0/johsteffens[P]beth/lib/bcore/bcore_spect.c
// Function: bcore_spect_status
st_s* bcore_spect_status()
{
    bcore_life_s* l = bcore_life_s_create();
    assert( hmap_s_g != NULL );
    const bcore_hmap_u3vd_s* map  = &hmap_s_g->map;
    bcore_hmap_tpuz_s* hist = bcore_life_s_push_aware( l, bcore_hmap_tpuz_s_create() );
    st_s* log = st_s_create();

    {
        st_s* s = st_s_create();
        st_s_push_sc( s, "registered perspectives " );
        st_s_push_char_n( s, '.', 32 - s->size );
        bcore_mutex_s_lock( &hmap_s_g->mutex );
        st_s_pushf( s, "% 4zu\n", bcore_hmap_u3vd_s_keys( map ) );
        bcore_mutex_s_unlock( &hmap_s_g->mutex );
        st_s_push_st_d( log, s );
    }

    for( uz_t i = 0; i < map->size; i++ )
    {
        bcore_mutex_s_lock( &hmap_s_g->mutex );
        vd_t val = bcore_hmap_u3vd_s_idx_val( map, i );
        bcore_mutex_s_unlock( &hmap_s_g->mutex );
        if( val ) ( *bcore_hmap_tpuz_s_fget( hist, *( aware_t* )val, 0 ) )++;
    }

    sr_s nc_arr = sr_cl( bcore_inst_t_create_sr( bcore_flect_type_parse_fa( "{ { uz_t count; tp_t type; } [] arr; }" ) ), l );

    for( uz_t i = 0; i < hist->size; i++ )
    {
        tp_t key   = bcore_hmap_tpuz_s_idx_key( hist, i );
        uz_t count = bcore_hmap_tpuz_s_idx_val( hist, i );
        if( key )
        {
            bcore_array_x_push( nc_arr, sr_null() );
            sr_s pair = sr_cl( bcore_array_x_get_last( nc_arr ), l );
            bcore_via_x_nset_tp( pair, typeof( "type" ),  key   );
            bcore_via_x_nset_uz( pair, typeof( "count" ), count );
        }
    }

    bcore_array_x_sort( nc_arr, 0, -1, -1 );

    for( uz_t i = 0; i < bcore_array_x_get_size( nc_arr ); i++ )
    {
        sr_s pair = sr_cl( bcore_array_x_get( nc_arr, i ), l );
        const tp_t* p_type  = sr_cl( bcore_via_x_nget( pair, typeof( "type"  ) ), l ).o;
        const uz_t* p_count = sr_cl( bcore_via_x_nget( pair, typeof( "count" ) ), l ).o;
        st_s* s = st_s_create();
        st_s_pushf( s, "  %s ", ifnameof( *p_type ) );
        sz_t padding = 32 - s->size;
        padding = padding < 0 ? 0 : padding;
        st_s_push_char_n( s, '.', padding );
        st_s_pushf( s, "% 4zu\n", *p_count );
        st_s_push_st_d( log, s );
    }

    st_s_push_fa( log, "spect mananger cache:\n" );
    st_s_push_fa( log, "   keys: #<uz_t>\n", bcore_tp_fastmap_s_keys( &hmap_s_g->cache ) );
    st_s_push_fa( log, "   size: #<uz_t>\n", bcore_tp_fastmap_s_size( &hmap_s_g->cache ) );

    bcore_life_s_discard( l );
    return log;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1f0, %rsp            # imm = 0x1F0
movb $0x0, %al
callq 0xbfdd0
movq %rax, -0x8(%rbp)
movq 0xdfe1b(%rip), %rax     # 0x1b2368
addq $0x20, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x190(%rbp)
movb $0x0, %al
callq 0xacc10
movq -0x190(%rbp), %rdi
movq %rax, %rsi
callq 0xc0460
movq %rax, -0x18(%rbp)
movb $0x0, %al
callq 0xff2e0
movq %rax, -0x20(%rbp)
movb $0x0, %al
callq 0xff2e0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
leaq 0x80561(%rip), %rsi     # 0x152afc
callq 0x100040
movq -0x28(%rbp), %rdi
movq -0x28(%rbp), %rax
movl $0x20, %edx
subq 0x10(%rax), %rdx
movl $0x2e, %esi
callq 0xffca0
movq 0xdfda6(%rip), %rdi     # 0x1b2368
addq $0x60, %rdi
callq 0x10fc20
movq -0x28(%rbp), %rax
movq %rax, -0x188(%rbp)
movq -0x10(%rbp), %rdi
callq 0xac5c0
movq -0x188(%rbp), %rdi
movq %rax, %rdx
leaq 0x80525(%rip), %rsi     # 0x152b15
movb $0x0, %al
callq 0x100120
movq 0xdfd6a(%rip), %rdi     # 0x1b2368
addq $0x60, %rdi
callq 0x10fc70
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xfff40
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0xd2690
movq 0xdfd37(%rip), %rdi     # 0x1b2368
addq $0x60, %rdi
callq 0x10fc20
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0xac6a0
movq %rax, -0x38(%rbp)
movq 0xdfd16(%rip), %rdi     # 0x1b2368
addq $0x60, %rdi
callq 0x10fc70
cmpq $0x0, -0x38(%rbp)
je 0xd2680
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rax
movq (%rax), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0xad200
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0xd2682
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0xd261c
leaq 0x80485(%rip), %rdi     # 0x152b1c
movb $0x0, %al
callq 0xa7aa0
movq %rax, %rsi
leaq -0x68(%rbp), %rdi
callq 0xd1030
movq -0x8(%rbp), %rsi
leaq -0x50(%rbp), %rdi
leaq -0x68(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xfb970
movq $0x0, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jae 0xd2846
movq -0x18(%rbp), %rdi
movq -0x70(%rbp), %rsi
callq 0xad6e0
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rdi
movq -0x70(%rbp), %rsi
callq 0xad710
movq %rax, -0x80(%rbp)
cmpq $0x0, -0x78(%rbp)
je 0xd2833
leaq -0x98(%rbp), %rdi
callq 0xd3750
leaq -0x50(%rbp), %rcx
leaq -0x98(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, (%rsp)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsp)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rsp)
movq (%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
callq 0xd2ba0
leaq -0xc8(%rbp), %rdi
leaq -0x50(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xd2c50
movq -0x8(%rbp), %rsi
leaq -0xb0(%rbp), %rdi
leaq -0xc8(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xfb970
leaq 0x6fa32(%rip), %rdi     # 0x1421fc
callq 0xd2da0
movq %rax, %rdi
movq -0x78(%rbp), %rsi
leaq -0xb0(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xd2cf0
leaq 0x80341(%rip), %rdi     # 0x152b43
callq 0xd2da0
movq %rax, %rdi
movq -0x80(%rbp), %rsi
leaq -0xb0(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xd2dc0
jmp 0xd2835
movq -0x70(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x70(%rbp)
jmp 0xd26dc
leaq -0x50(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %edi
movq $-0x1, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xd2e70
movq $0x0, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0x198(%rbp)
leaq -0x50(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xd2f10
movq %rax, %rcx
movq -0x198(%rbp), %rax
cmpq %rcx, %rax
jae 0xd2b01
movq -0xd0(%rbp), %rsi
leaq -0x100(%rbp), %rdi
leaq -0x50(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xd2fb0
movq -0x8(%rbp), %rsi
leaq -0xe8(%rbp), %rdi
leaq -0x100(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xfb970
leaq 0x6f8cf(%rip), %rdi     # 0x1421fc
callq 0xd2da0
movq %rax, %rsi
leaq -0x120(%rbp), %rdi
leaq -0xe8(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xd3050
movq -0x8(%rbp), %rsi
leaq -0x138(%rbp), %rdi
leaq -0x120(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xfb970
movq -0x138(%rbp), %rax
movq %rax, -0x108(%rbp)
leaq 0x8019d(%rip), %rdi     # 0x152b43
callq 0xd2da0
movq %rax, %rsi
leaq -0x158(%rbp), %rdi
leaq -0xe8(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xd3050
movq -0x8(%rbp), %rsi
leaq -0x170(%rbp), %rdi
leaq -0x158(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xfb970
movq -0x170(%rbp), %rax
movq %rax, -0x140(%rbp)
movb $0x0, %al
callq 0xff2e0
movq %rax, -0x178(%rbp)
movq -0x178(%rbp), %rax
movq %rax, -0x1a0(%rbp)
movq -0x108(%rbp), %rax
movq (%rax), %rdi
callq 0xd17a0
movq -0x1a0(%rbp), %rdi
movq %rax, %rdx
leaq 0x800f5(%rip), %rsi     # 0x152b49
movb $0x0, %al
callq 0x100120
movq -0x178(%rbp), %rcx
movl $0x20, %eax
subq 0x10(%rcx), %rax
movq %rax, -0x180(%rbp)
cmpq $0x0, -0x180(%rbp)
jge 0xd2a87
xorl %eax, %eax
movq %rax, -0x1a8(%rbp)
jmp 0xd2a95
movq -0x180(%rbp), %rax
movq %rax, -0x1a8(%rbp)
movq -0x1a8(%rbp), %rax
movq %rax, -0x180(%rbp)
movq -0x178(%rbp), %rdi
movq -0x180(%rbp), %rdx
movl $0x2e, %esi
callq 0xffca0
movq -0x178(%rbp), %rdi
movq -0x140(%rbp), %rax
movq (%rax), %rdx
leaq 0x80042(%rip), %rsi     # 0x152b15
movb $0x0, %al
callq 0x100120
movq -0x20(%rbp), %rdi
movq -0x178(%rbp), %rsi
callq 0xfff40
movq -0xd0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xd0(%rbp)
jmp 0xd2883
movq -0x20(%rbp), %rdi
leaq 0x80043(%rip), %rsi     # 0x152b4f
movb $0x0, %al
callq 0x100210
movq -0x20(%rbp), %rax
movq %rax, -0x1b8(%rbp)
movq 0xdf843(%rip), %rdi     # 0x1b2368
addq $0x88, %rdi
callq 0x112600
movq -0x1b8(%rbp), %rdi
movq %rax, %rdx
leaq 0x80024(%rip), %rsi     # 0x152b66
movb $0x0, %al
callq 0x100210
movq -0x20(%rbp), %rax
movq %rax, -0x1b0(%rbp)
movq 0xdf80d(%rip), %rdi     # 0x1b2368
addq $0x88, %rdi
callq 0x1125a0
movq -0x1b0(%rbp), %rdi
movq %rax, %rdx
leaq 0x80000(%rip), %rsi     # 0x152b78
movb $0x0, %al
callq 0x100210
movq -0x8(%rbp), %rdi
callq 0xbfe00
movq -0x20(%rbp), %rax
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbp
retq
nopw %cs:(%rax,%rax)