// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_tbman.c
// Function: bcore_tbman_signal_handler
vd_t bcore_tbman_signal_handler( const bcore_signal_s* o )
{
    switch( bcore_signal_s_handle_type( o, typeof( "bcore_tbman" ) ) )
    {
        case TYPEOF_init0:
        {
            tbman_open();
        }
        break;

        case TYPEOF_init1:
        {
            tbman_s_quicktest(); // system critical test
        }
        break;

        case TYPEOF_down0:
        {
            s2_t verbosity = o->object ? *( s2_t* )o->object : 0;
            if( verbosity >= 0 )
            {
                uz_t space = bcore_tbman_total_granted_space();
                if( space > 0 )
                {
                    uz_t instances = bcore_tbman_total_instances();
                    uz_t references = bcore_tbman_total_references();
                    st_s_print_d( bcore_tbman_s_status( tbman_s_g, 1 ) );
                    WRN
                    (
                        "Leaking memory .... %zu bytes\n"
                        "     instances .... %zu\n"
                        "     references ... %zu\n",
                        space,
                        instances,
                        references
                    );
                }
            }
            tbman_close();
        }
        break;

        case TYPEOF_selftest:
        {
            st_s* log = st_s_create();
            tbman_s_diagnostic_test();
            tbman_s_instance_test();
            st_s_push_st_d( log, tbman_s_thread_test() );
            st_s_push_st_d( log, tbman_s_rctest() );
            st_s_push_st_d( log, tbman_s_memtest() );
            return log;
        }
        break;

        default: break;
    }
    return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
movabsq $0x5f44a7b28e3268cf, %rsi # imm = 0x5F44A7B28E3268CF
callq 0x75141
movabsq $-0x69a05554ee793861, %rcx # imm = 0x965FAAAB1186C79F
cmpq %rcx, %rax
je 0x96def
movabsq $0x6a72ce8f8250efc6, %rcx # imm = 0x6A72CE8F8250EFC6
cmpq %rcx, %rax
je 0x96525
movabsq $0x7ee758bbfced33e3, %rcx # imm = 0x7EE758BBFCED33E3
cmpq %rcx, %rax
je 0x96551
movabsq $0x6a72cf8f8250f179, %rcx # imm = 0x6A72CF8F8250F179
cmpq %rcx, %rax
jne 0x96e70
leaq 0x82e04(%rip), %rdi     # 0x119318
leaq 0x1353(%rip), %rsi      # 0x9786e
callq 0x97d2e
jmp 0x96e70
leaq -0x153c(%rip), %rdi     # 0x94ff0
pushq $0x1
popq %rdx
movl $0xc8, %esi
movl $0x1000, %ecx           # imm = 0x1000
movl $0x1567, %r8d           # imm = 0x1567
callq 0x95ea4
movq %rax, %rdi
callq 0x8edd4
jmp 0x96e70
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x8eb65
movq %rax, 0x30(%rsp)
callq 0x93c92
movq %rax, %rbx
movq %rax, 0x48(%rsp)
movq $0x3e8, 0x60(%rsp)      # imm = 0x3E8
movl $0x1f40, %edi           # imm = 0x1F40
callq 0x60245
movq %rax, %r14
movq %rax, 0x50(%rsp)
movl $0x1f40, %edi           # imm = 0x1F40
callq 0x60245
movq %rax, %r15
movq %rax, 0x58(%rsp)
movl $0x4d2, %ebp            # imm = 0x4D2
movl $0x4e20, %r13d          # imm = 0x4E20
cmpq $0x1f40, %r12           # imm = 0x1F40
je 0x965e2
movl %ebp, %eax
shrl $0x7, %eax
xorl %ebp, %eax
movl %eax, %ecx
shll $0x19, %ecx
xorl %eax, %ecx
movl %ecx, %ebp
shrl $0xc, %ebp
xorl %ecx, %ebp
movl %ebp, %eax
xorl %edx, %edx
divl %r13d
leaq (%r15,%r12), %rcx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x949f4
movq %rax, (%r14,%r12)
addq $0x8, %r12
jmp 0x965a5
movq %rbx, %rdi
callq 0x95123
cmpq $0x3e8, %rax            # imm = 0x3E8
je 0x9661b
leaq 0x1404e(%rip), %rdi     # 0xaa647
leaq 0x351ee(%rip), %rsi     # 0xcb7ee
leaq 0x3521e(%rip), %rdx     # 0xcb825
leaq 0x3470f(%rip), %rcx     # 0xcad1d
movl $0xc81, %r8d            # imm = 0xC81
xorl %eax, %eax
callq 0x5ffac
leaq 0x125b(%rip), %rsi      # 0x9787d
leaq 0x48(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rdx
callq 0x951d7
movq (%r14), %rdi
callq 0x950c9
testq %rax, %rax
je 0x96668
leaq 0x14001(%rip), %rdi     # 0xaa647
leaq 0x351f0(%rip), %rsi     # 0xcb83d
leaq 0x351d1(%rip), %rdx     # 0xcb825
leaq 0x346c2(%rip), %rcx     # 0xcad1d
movl $0xc86, %r8d            # imm = 0xC86
xorl %eax, %eax
callq 0x5ffac
movq 0x48(%rsp), %rdi
callq 0x95123
testq %rax, %rax
je 0x966a0
leaq 0x13fc9(%rip), %rdi     # 0xaa647
leaq 0x351eb(%rip), %rsi     # 0xcb870
leaq 0x35199(%rip), %rdx     # 0xcb825
leaq 0x3468a(%rip), %rcx     # 0xcad1d
movl $0xc87, %r8d            # imm = 0xC87
xorl %eax, %eax
callq 0x5ffac
leaq 0x48(%rsp), %rbx
movq 0x8(%rbx), %rdi
callq 0x60230
movq %rax, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x60230
movq %rax, 0x10(%rbx)
movq (%rbx), %rdi
callq 0x93cab
pushq $0x1
popq %r14
leaq 0x40(%rsp), %r12
leaq 0x13f70(%rip), %r13     # 0xaa647
leaq 0x35210(%rip), %rbp     # 0xcb8ee
leaq 0x34638(%rip), %rbx     # 0xcad1d
cmpq $0x98967f, %r14         # imm = 0x98967F
ja 0x9678f
andq $0x0, 0x48(%rsp)
xorl %edi, %edi
xorl %esi, %esi
movq %r14, %rdx
leaq 0x48(%rsp), %rcx
callq 0x94ff0
andq $0x0, 0x40(%rsp)
andq $0x0, 0x38(%rsp)
movq %rax, %r15
movq %r14, %rdi
shrq %rdi
addq %rax, %rdi
leaq 0x38(%rsp), %rsi
movq %r12, %rdx
callq 0x95093
cmpq %r15, 0x38(%rsp)
je 0x96752
movq %r13, %rdi
leaq 0x3519a(%rip), %rsi     # 0xcb8d9
movq %rbp, %rdx
movq %rbx, %rcx
movl $0xc56, %r8d            # imm = 0xC56
xorl %eax, %eax
callq 0x5ffac
movq 0x40(%rsp), %rax
cmpq 0x48(%rsp), %rax
je 0x9677b
movq %r13, %rdi
leaq 0x3519c(%rip), %rsi     # 0xcb904
movq %rbp, %rdx
movq %rbx, %rcx
movl $0xc57, %r8d            # imm = 0xC57
xorl %eax, %eax
callq 0x5ffac
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x94fdb
addq %r14, %r14
jmp 0x966e5
xorl %eax, %eax
callq 0x8eb65
movq %rax, %rbx
leaq -0x936(%rip), %r14      # 0x95e6a
movq %r14, %rdi
xorl %esi, %esi
callq 0x9806f
movzbl %dl, %esi
movq %rax, %rdi
callq 0x980a8
movq %rax, %r15
leaq 0x3515d(%rip), %rsi     # 0xcb91c
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x8f4ef
movq %r15, %rdi
callq 0x8edd4
movq %r14, %rdi
xorl %esi, %esi
callq 0x9806f
movq %rax, %r15
movl %edx, %r12d
movq %r14, %rdi
xorl %esi, %esi
callq 0x9806f
movq %rax, %r13
movl %edx, %ebp
movq %r14, %rdi
xorl %esi, %esi
callq 0x9806f
movq %rax, 0x28(%rsp)
movb %dl, 0x20(%rsp)
movq %r14, %rdi
xorl %esi, %esi
callq 0x9806f
movq %rax, 0x10(%rsp)
movl %edx, %r14d
movzbl %r12b, %esi
movq %r15, %rdi
callq 0x980a8
movq %rax, %r15
leaq 0x35107(%rip), %rsi     # 0xcb935
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x8f4ef
movq %r15, %rdi
callq 0x8edd4
movzbl %bpl, %esi
movq %r13, %rdi
callq 0x980a8
movq %rax, %r15
leaq 0x350ef(%rip), %rsi     # 0xcb948
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x8f4ef
movq %r15, %rdi
callq 0x8edd4
movzbl 0x20(%rsp), %esi
movq 0x28(%rsp), %rdi
callq 0x980a8
movq %rax, %r15
leaq 0x350d4(%rip), %rsi     # 0xcb95b
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x8f4ef
movq %r15, %rdi
callq 0x8edd4
movzbl %r14b, %esi
movq 0x10(%rsp), %rdi
callq 0x980a8
movq %rax, %r14
leaq 0x350ba(%rip), %rsi     # 0xcb96e
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x8f4ef
movq %r14, %rdi
callq 0x8edd4
movq 0x30(%rsp), %rdi
movq %rbx, %rsi
callq 0x8f2e5
leaq 0x350a4(%rip), %rdi     # 0xcb981
xorl %eax, %eax
callq 0x8ebc4
movq %rax, %rbx
pushq $0x50
popq %rdx
subq 0x10(%rax), %rdx
pushq $0x3d
popq %rsi
movq %rax, %rdi
callq 0x8f175
pushq $0xa
popq %rsi
movq %rbx, 0x10(%rsp)
movq %rbx, %rdi
callq 0x8f0ee
leaq 0x35084(%rip), %rdi     # 0xcb994
callq 0x65033
movq %rax, %r14
movq %rax, %rdi
callq 0x97930
testq %rax, %rax
je 0x9693c
movq %rax, %rbx
movq %r14, %rdi
callq 0x977d4
movq %rax, %rdi
movq %rbx, %rsi
callq *0xb8(%rax)
movq %r14, %rdi
callq 0x97930
movq %rax, 0x20(%rsp)
movq %r14, %rdi
callq 0x97930
movq %rax, 0x28(%rsp)
movl $0x557300, %esi         # imm = 0x557300
xorl %edi, %edi
xorl %edx, %edx
callq 0x94fdb
movq %rax, %r15
leaq 0x3505a(%rip), %r13     # 0xcb9c8
leaq 0x35057(%rip), %rbp     # 0xcb9cc
xorl %r12d, %r12d
cmpq $0x557300, %r12         # imm = 0x557300
je 0x969bb
leaq (%r15,%r12), %rbx
movq %r14, %rdi
callq 0x977d4
movq %rax, %rdi
movq %rbx, %rsi
callq *0x80(%rax)
movq %rbx, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x8f42b
movq %rbp, %rdi
xorl %eax, %eax
callq 0x8ebc4
movq %rax, 0x20(%r15,%r12)
addq $0x38, %r12
jmp 0x96978
movq %r15, %rdi
callq 0x94f54
movq %r14, %rdi
callq 0x977d4
leaq 0xf77(%rip), %rdi       # 0x97949
pushq $0x38
popq %r8
movl $0x186a0, %ecx          # imm = 0x186A0
movq %rax, %rsi
movq %r15, %rdx
callq 0x94fb1
xorl %ebx, %ebx
movl $0xc3500, %esi          # imm = 0xC3500
xorl %edi, %edi
xorl %edx, %edx
callq 0x94fdb
movq %rax, %r13
movl $0xc3500, %esi          # imm = 0xC3500
xorl %edi, %edi
xorl %edx, %edx
callq 0x94fdb
movq %rax, %rbp
callq 0xd340
movq %rax, 0x18(%rsp)
movq %r15, %r12
cmpq $0x186a0, %rbx          # imm = 0x186A0
je 0x96a36
movq %r12, %rdi
callq 0x94f54
movq %r12, (%r13,%rbx,8)
incq %rbx
addq $0x38, %r12
jmp 0x96a17
callq 0xd340
subq 0x18(%rsp), %rax
cvtsi2sd %rax, %xmm0
mulsd 0x29a03(%rip), %xmm0    # 0xc0450
divsd 0x342a3(%rip), %xmm0    # 0xcacf8
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x1dc77(%rip), %xmm0    # 0xb46e0
cvttsd2si %xmm0, %rdx
andq %rcx, %rdx
orq %rax, %rdx
leaq 0x34f55(%rip), %rsi     # 0xcb9d0
xorl %ebx, %ebx
movq 0x10(%rsp), %rdi
xorl %eax, %eax
callq 0x8f42b
callq 0xd340
movq %rax, 0x18(%rsp)
movq %r15, %r12
cmpq $0x186a0, %rbx          # imm = 0x186A0
je 0x96ab5
movq %r12, %rdi
callq 0x94f54
movq %r12, (%rbp,%rbx,8)
incq %rbx
addq $0x38, %r12
jmp 0x96a96
callq 0xd340
subq 0x18(%rsp), %rax
cvtsi2sd %rax, %xmm0
mulsd 0x29984(%rip), %xmm0    # 0xc0450
divsd 0x34224(%rip), %xmm0    # 0xcacf8
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x1dbf8(%rip), %xmm0    # 0xb46e0
cvttsd2si %xmm0, %rdx
andq %rcx, %rdx
orq %rax, %rdx
leaq 0x34eea(%rip), %rsi     # 0xcb9e4
xorl %r12d, %r12d
movq 0x10(%rsp), %rdi
xorl %eax, %eax
callq 0x8f42b
movq 0x28(%rsp), %rbx
movq %rbx, %rdi
callq 0x94f54
leaq 0x34eab(%rip), %rsi     # 0xcb9c8
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8f42b
movq %r14, %rdi
callq 0x977d4
leaq 0xe13(%rip), %rdi       # 0x97949
movq %rax, %rsi
movq 0x20(%rsp), %rdx
callq 0x94f84
movq %r14, %rdi
callq 0x977d4
leaq 0xdf7(%rip), %rdi       # 0x97949
movq %rax, %rsi
movq %rbx, %rdx
callq 0x94f84
movq %rbx, %rdi
callq 0x94f63
movq %r15, %rdi
callq 0x94fcc
leaq 0x34e84(%rip), %rsi     # 0xcb9f8
movq 0x10(%rsp), %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x8f42b
callq 0xd340
movq %rax, %rbx
cmpq $0x186a0, %r12          # imm = 0x186A0
je 0x96ba3
movq (%r13,%r12,8), %rdi
callq 0x94f63
incq %r12
jmp 0x96b8b
callq 0xd340
subq %rbx, %rax
cvtsi2sd %rax, %xmm0
mulsd 0x29898(%rip), %xmm0    # 0xc0450
divsd 0x34138(%rip), %xmm0    # 0xcacf8
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x1db0c(%rip), %xmm0    # 0xb46e0
cvttsd2si %xmm0, %rdx
andq %rcx, %rdx
orq %rax, %rdx
leaq 0x34e2a(%rip), %rsi     # 0xcba10
xorl %r14d, %r14d
movq 0x10(%rsp), %rdi
xorl %eax, %eax
callq 0x8f42b
callq 0xd340
movq %rax, %rbx
cmpq $0x186a0, %r14          # imm = 0x186A0
je 0x96c15
movq (%rbp,%r14,8), %rdi
callq 0x94f63
incq %r14
jmp 0x96bfd
callq 0xd340
subq %rbx, %rax
cvtsi2sd %rax, %xmm0
mulsd 0x29826(%rip), %xmm0    # 0xc0450
divsd 0x340c6(%rip), %xmm0    # 0xcacf8
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x1da9a(%rip), %xmm0    # 0xb46e0
cvttsd2si %xmm0, %rdx
andq %rcx, %rdx
orq %rax, %rdx
leaq 0x34dcc(%rip), %rsi     # 0xcba24
movq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x8f42b
movq %r15, %rdi
callq 0x94fcc
leaq 0x34d82(%rip), %rbx     # 0xcb9f8
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x8f42b
movq %r15, %rdi
callq 0x94f63
movq %r15, %rdi
callq 0x94fcc
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x8f42b
movq %r13, %rdi
callq 0x94f63
movq %rbp, %rdi
callq 0x94f63
pushq $0x3d
popq %r15
movq %r14, %rdi
movl %r15d, %esi
pushq $0x50
popq %rbx
movq %rbx, %rdx
callq 0x8f175
pushq $0xa
popq %rbp
movq %r14, %rdi
movl %ebp, %esi
callq 0x8f0ee
movq 0x82631(%rip), %rdi     # 0x119310
pushq $0x1
popq %r12
movl %r12d, %esi
callq 0x953b1
movq %r14, %rdi
movq %rax, %rsi
callq 0x8f2e5
movq 0x30(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x8f2e5
leaq 0x34d2b(%rip), %rdi     # 0xcba38
xorl %eax, %eax
callq 0x8ebc4
movq %rax, %r14
movq %rbx, %rdx
subq 0x10(%rax), %rdx
movq %rax, %rdi
movl %r15d, %esi
callq 0x8f175
movq %r14, %rdi
movl %ebp, %esi
callq 0x8f0ee
leaq 0x34d12(%rip), %rsi     # 0xcba4c
movq %r14, %rdi
xorl %eax, %eax
callq 0x8f42b
leaq -0x1d5b(%rip), %rdi     # 0x94ff0
pushq $0x5
popq %r15
movl $0x2710, %esi           # imm = 0x2710
movl $0x10000, %ecx          # imm = 0x10000
movq %r15, %rdx
movl $0x4d5, %r8d            # imm = 0x4D5
callq 0x95ea4
movq %r14, %rdi
movq %rax, %rsi
callq 0x8f2e5
movq 0x82597(%rip), %rdi     # 0x119310
movl %r12d, %esi
callq 0x953b1
movq %r14, %rdi
movq %rax, %rsi
callq 0x8f2e5
leaq 0x34cd1(%rip), %rsi     # 0xcba64
movq %r14, %rdi
xorl %eax, %eax
callq 0x8f42b
leaq -0x36a8(%rip), %rdi     # 0x936fc
movl $0x2710, %esi           # imm = 0x2710
movl $0x10000, %ecx          # imm = 0x10000
movq %r15, %rdx
movl $0x4d5, %r8d            # imm = 0x4D5
callq 0x95ea4
movq %r14, %rdi
movq %rax, %rsi
callq 0x8f2e5
movq %r14, %rdi
pushq $0x3d
popq %rsi
movq %rbx, %rdx
callq 0x8f175
movq %r14, %rdi
movl %ebp, %esi
callq 0x8f0ee
movq %r13, %rdi
movq %r14, %rsi
callq 0x8f2e5
jmp 0x96e73
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x96dfd
cmpl $0x0, (%rax)
js 0x96e5c
callq 0x9536f
testq %rax, %rax
je 0x96e5c
movq %rax, %rbx
callq 0x9537b
movq %rax, %r14
callq 0x95387
movq %rax, %r15
movq 0x824ef(%rip), %rdi     # 0x119310
pushq $0x1
popq %rsi
callq 0x953b1
movq %rax, %rdi
callq 0x90180
movq %r15, (%rsp)
leaq 0x34381(%rip), %rdi     # 0xcb1bd
leaq 0x33eda(%rip), %rsi     # 0xcad1d
leaq 0x3438e(%rip), %rcx     # 0xcb1d8
movl $0xcb9, %edx            # imm = 0xCB9
movq %rbx, %r8
movq %r14, %r9
xorl %eax, %eax
callq 0x5fd71
movq 0x824ad(%rip), %rdi     # 0x119310
callq 0x93cab
andq $0x0, 0x824a0(%rip)     # 0x119310
xorl %r13d, %r13d
movq %r13, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq