LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_tbman.c
// Function: tbman_s_diagnostic_test_callback
static void tbman_s_diagnostic_test_callback( vd_t arg, vd_t ptr, uz_t space )
{
    diagnostic_s* d = arg;
    bl_t found = false;
    for( sz_t i = 0; i < d->size; i++ )
    {
        if( ptr == d->ptr_arr[ i ] )
        {
            found = true;
            ASSERT( space == d->spc_arr[ i ] );
        }
    }
    ASSERT( found );
    bcore_tbman_s_b_alloc( d->man, ptr, 0, NULL );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
xorl %r13d, %r13d
leaq 0x33482(%rip), %r12     # 0xcad1d
xorl %ebp, %ebp
cmpq 0x18(%r14), %rbp
jge 0x978e4
movq 0x8(%r14), %rax
cmpq %rbx, (%rax,%rbp,8)
jne 0x978df
movq 0x10(%r14), %rax
movb $0x1, %r13b
cmpq %r15, (%rax,%rbp,8)
je 0x978df
leaq 0x12d86(%rip), %rdi     # 0xaa647
leaq 0x33fd7(%rip), %rsi     # 0xcb89f
leaq 0x33fe9(%rip), %rdx     # 0xcb8b8
movq %r12, %rcx
movl $0xc69, %r8d            # imm = 0xC69
xorl %eax, %eax
callq 0x5ffac
incq %rbp
jmp 0x9789d
testb $0x1, %r13b
jne 0x97913
leaq 0x12d56(%rip), %rdi     # 0xaa647
leaq 0x2d394(%rip), %rsi     # 0xc4c8c
leaq 0x33fb9(%rip), %rdx     # 0xcb8b8
leaq 0x33417(%rip), %rcx     # 0xcad1d
movl $0xc6c, %r8d            # imm = 0xC6C
xorl %eax, %eax
callq 0x5ffac
movq (%r14), %rdi
movq %rbx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x949f4
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_threads.c
// Function: bcore_mutex_s_init
void bcore_mutex_s_init( bcore_mutex_s* o )
{
    bcore_memzero( o, sizeof( *o  ) );
    int ern = pthread_mutex_init( &o->_mutex, NULL );
    if( ern == EAGAIN ) ERR( "Resources exceeded." );
    if( ern == ENOMEM ) ERR( "Memory exhaused." );
    if( ern == EPERM  ) ERR( "Unpriviledged call." );
    if( ern ) ERR( "function returned error %i", ern );
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
pushq $0x28
popq %rsi
callq 0x6028b
movq %rbx, %rdi
xorl %esi, %esi
callq 0xd1c0
testl %eax, %eax
je 0x979f7
movl %eax, %ebx
cmpl $0x1, %eax
je 0x9799c
cmpl $0xc, %ebx
je 0x979b5
cmpl $0xb, %ebx
jne 0x979d4
leaq 0x340f2(%rip), %rdi     # 0xcba7c
leaq 0x340fe(%rip), %rsi     # 0xcba8f
leaq 0x34107(%rip), %rcx     # 0xcba9f
pushq $0x21
jmp 0x979cc
leaq 0x340d9(%rip), %rdi     # 0xcba7c
leaq 0x340e5(%rip), %rsi     # 0xcba8f
leaq 0x34113(%rip), %rcx     # 0xcbac4
pushq $0x23
jmp 0x979cc
leaq 0x340c0(%rip), %rdi     # 0xcba7c
leaq 0x340cc(%rip), %rsi     # 0xcba8f
leaq 0x340e9(%rip), %rcx     # 0xcbab3
pushq $0x22
popq %rdx
xorl %eax, %eax
callq 0x60031
leaq 0x340a1(%rip), %rdi     # 0xcba7c
leaq 0x340ad(%rip), %rsi     # 0xcba8f
leaq 0x340ef(%rip), %rcx     # 0xcbad8
pushq $0x24
popq %rdx
movl %ebx, %r8d
xorl %eax, %eax
popq %rbx
jmp 0x60031
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_threads.c
// Function: bcore_mutex_s_down
void bcore_mutex_s_down( bcore_mutex_s* o )
{
    int ern = pthread_mutex_destroy( &o->_mutex );
    if( ern == EBUSY  ) ERR( "Mutex is locked." );
    if( ern == EINVAL ) ERR( "Invalid mutex." );
    if( ern ) ERR( "function returned error %i", ern );
}

// Assembly:
pushq %rbx
callq 0xd440
testl %eax, %eax
je 0x97a6a
movl %eax, %ebx
cmpl $0x16, %eax
je 0x97a28
cmpl $0x10, %ebx
jne 0x97a47
leaq 0x340dd(%rip), %rdi     # 0xcbaf3
leaq 0x34072(%rip), %rsi     # 0xcba8f
leaq 0x340e2(%rip), %rcx     # 0xcbb06
pushq $0x2a
jmp 0x97a3f
leaq 0x340c4(%rip), %rdi     # 0xcbaf3
leaq 0x34059(%rip), %rsi     # 0xcba8f
leaq 0x340da(%rip), %rcx     # 0xcbb17
pushq $0x2b
popq %rdx
xorl %eax, %eax
callq 0x60031
leaq 0x340a5(%rip), %rdi     # 0xcbaf3
leaq 0x3403a(%rip), %rsi     # 0xcba8f
leaq 0x3407c(%rip), %rcx     # 0xcbad8
pushq $0x2c
popq %rdx
movl %ebx, %r8d
xorl %eax, %eax
popq %rbx
jmp 0x60031
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_threads.c
// Function: bcore_thread_s_join
vd_t bcore_thread_s_join( bcore_thread_s* o )
{
    vd_t ret = NULL;
    if( o->_join )
    {
        int ern = pthread_join( o->_thread, &ret );
        if( ern == EINVAL )  ERR( "No joinable thread" );
        if( ern == ESRCH )   ERR( "Invalid thread id" );
        if( ern == EDEADLK ) ERR( "Deadlock detected." );
        if( ern ) ERR( "function returned error %i", ern );
        o->_join = false;
    }
    return ret;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
andq $0x0, (%rsp)
cmpb $0x1, 0x8(%rdi)
jne 0x97f30
movq %rdi, %rbx
movq (%rdi), %rdi
movq %rsp, %rsi
callq 0xd040
testl %eax, %eax
je 0x97f95
movl %eax, %ebp
cmpl $0x3, %eax
je 0x97f34
cmpl $0x23, %ebp
je 0x97f50
cmpl $0x16, %ebp
jne 0x97f71
leaq 0x33cd4(%rip), %rdi     # 0xcbbef
leaq 0x33b6d(%rip), %rsi     # 0xcba8f
leaq 0x33cda(%rip), %rcx     # 0xcbc03
movl $0x16c, %edx            # imm = 0x16C
jmp 0x97f6a
xorl %eax, %eax
jmp 0x97f9d
leaq 0x33cb4(%rip), %rdi     # 0xcbbef
leaq 0x33b4d(%rip), %rsi     # 0xcba8f
leaq 0x33ccd(%rip), %rcx     # 0xcbc16
movl $0x16d, %edx            # imm = 0x16D
jmp 0x97f6a
leaq 0x33c98(%rip), %rdi     # 0xcbbef
leaq 0x33b31(%rip), %rsi     # 0xcba8f
leaq 0x33cc3(%rip), %rcx     # 0xcbc28
movl $0x16e, %edx            # imm = 0x16E
xorl %eax, %eax
callq 0x60031
leaq 0x33c77(%rip), %rdi     # 0xcbbef
leaq 0x33b10(%rip), %rsi     # 0xcba8f
leaq 0x33b52(%rip), %rcx     # 0xcbad8
movl $0x16f, %edx            # imm = 0x16F
movl %ebp, %r8d
xorl %eax, %eax
callq 0x60031
movb $0x0, 0x8(%rbx)
movq (%rsp), %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_threads.c
// Function: bcore_thread_s_call
void bcore_thread_s_call( bcore_thread_s* o, bcore_fp_thread func, vd_t arg )
{
    bcore_thread_s_join( o );
    int ern = pthread_create( &o->_thread, NULL, func, arg );
    if( ern ) ERR( "function returned error %i", ern );
    o->_join = true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x97edf
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0xd1f0
testl %eax, %eax
je 0x98065
leaq 0x33b93(%rip), %rdi     # 0xcbbdb
leaq 0x33a40(%rip), %rsi     # 0xcba8f
leaq 0x33a82(%rip), %rcx     # 0xcbad8
movl $0x15a, %edx            # imm = 0x15A
movl %eax, %r8d
xorl %eax, %eax
callq 0x60031
movb $0x1, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_threads.c
// Function: bcore_thread_arr_s_push_call
uz_t bcore_thread_arr_s_push_call( bcore_thread_arr_s* o, bcore_fp_thread func, vd_t arg )
{
    bcore_thread_s* thread = bcore_thread_s_create();
    bcore_thread_s_call( thread, func, arg );
    bcore_array_a_push( (bcore_array*)o, sr_tsm( TYPEOF_bcore_thread_s, thread ) );
    return o->size - 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x97ff3
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x9801a
movabsq $-0x6b951732b6f4fa73, %rdi # imm = 0x946AE8CD490B058D
callq 0x8cd25
movq %r12, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movq $0x2, 0x30(%rsp)
movq (%rbx), %rdi
callq 0x9878f
movq 0x30(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x7c34a
movq 0x10(%rbx), %rax
decq %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_threads.c
// Function: bcore_thread_arr_s_join_pop
vd_t bcore_thread_arr_s_join_pop( bcore_thread_arr_s* o )
{
    if( o->size == 0 ) return NULL;
    bcore_thread_s* thread = bcore_thread_arr_s_get_thread( o, o->size - 1 );
    vd_t ret = bcore_thread_s_join( thread );
    bcore_array_a_pop( (bcore_array*)o );
    return ret;
}

// Assembly:
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x9828a
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rcx
shlq $0x4, %rax
leaq (%rcx,%rax), %rdi
addq $-0x10, %rdi
callq 0x97edf
movq %rax, %r14
movq (%rbx), %rdi
callq 0x9878f
movq %rax, %rdi
movq %rbx, %rsi
callq 0x7c5cd
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_threads.c
// Function: bcore_sleep_ns
void bcore_sleep_ns( u3_t ns )
{
    struct timespec ts = { 0 };
    ts.tv_sec  = ns / 1000000000;
    ts.tv_nsec = ns % 1000000000;

    // it seems the nanosleep prototype is not necessarily defined in <time.h>
    // so we do it here.
    int nanosleep( const struct timespec* requested, struct timespec* remaining );

    nanosleep( &ts, NULL );
}

// Assembly:
subq $0x18, %rsp
movq %rdi, %rax
movl $0x3b9aca00, %ecx       # imm = 0x3B9ACA00
xorl %edx, %edx
divq %rcx
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
movq %rdx, 0x8(%rdi)
xorl %esi, %esi
callq 0xd350
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_threads.c
// Function: bcore_threads_signal_handler
vd_t bcore_threads_signal_handler( const bcore_signal_s* o )
{
    switch( bcore_signal_s_handle_type( o, typeof( "bcore_threads" ) ) )
    {
        case TYPEOF_init1:
        {
            BCORE_REGISTER_OBJECT( bcore_mutex_s );
            BCORE_REGISTER_OBJECT( bcore_lock_s );
            BCORE_REGISTER_OBJECT( bcore_unlock_s );
            BCORE_REGISTER_OBJECT( bcore_condition_s );
            BCORE_REGISTER_OBJECT( bcore_thread_s );
            BCORE_REGISTER_OBJECT( bcore_thread_arr_s );
        }
        break;

        case TYPEOF_get_quicktypes:
        {
            BCORE_REGISTER_QUICKTYPE( bcore_mutex_s );
            BCORE_REGISTER_QUICKTYPE( bcore_lock_s );
            BCORE_REGISTER_QUICKTYPE( bcore_unlock_s );
            BCORE_REGISTER_QUICKTYPE( bcore_condition_s );
            BCORE_REGISTER_QUICKTYPE( bcore_thread_s );
            BCORE_REGISTER_QUICKTYPE( bcore_thread_arr_s );
        };

        default: break;
    }

    return NULL;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x33962(%rip), %rdi     # 0xcbc3b
callq 0x98435
movq %rbx, %rdi
movq %rax, %rsi
callq 0x75141
movabsq $-0x1fb07977e4413a54, %rcx # imm = 0xE04F86881BBEC5AC
cmpq %rcx, %rax
je 0x983b3
movabsq $0x6a72ce8f8250efc6, %rcx # imm = 0x6A72CE8F8250EFC6
cmpq %rcx, %rax
jne 0x98431
leaq 0x33933(%rip), %rdi     # 0xcbc49
callq 0x98435
leaq 0x14b(%rip), %rsi       # 0x9846d
movq %rax, %rdi
callq 0x6513b
leaq 0x33926(%rip), %rdi     # 0xcbc57
callq 0x98435
leaq 0x1a2(%rip), %rsi       # 0x984df
movq %rax, %rdi
callq 0x6513b
leaq 0x33918(%rip), %rdi     # 0xcbc64
callq 0x98435
leaq 0x1f9(%rip), %rsi       # 0x98551
movq %rax, %rdi
callq 0x6513b
leaq 0x3390c(%rip), %rdi     # 0xcbc73
callq 0x98435
leaq 0x250(%rip), %rsi       # 0x985c3
movq %rax, %rdi
callq 0x6513b
leaq 0x33903(%rip), %rdi     # 0xcbc85
callq 0x98435
leaq 0x2a7(%rip), %rsi       # 0x98635
movq %rax, %rdi
callq 0x6513b
leaq 0x338f7(%rip), %rdi     # 0xcbc94
callq 0x98435
leaq 0x2fe(%rip), %rsi       # 0x986a7
movq %rax, %rdi
callq 0x6513b
jmp 0x98431
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x98431
leaq 0x33886(%rip), %rsi     # 0xcbc49
callq 0x986b9
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x98431
leaq 0x3387f(%rip), %rsi     # 0xcbc57
callq 0x986b9
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x98431
leaq 0x33877(%rip), %rsi     # 0xcbc64
callq 0x986b9
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x98431
leaq 0x33871(%rip), %rsi     # 0xcbc73
callq 0x986b9
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x98431
leaq 0x3386e(%rip), %rsi     # 0xcbc85
callq 0x986b9
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x98431
leaq 0x33868(%rip), %rsi     # 0xcbc94
callq 0x986b9
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_threads.c
// Function: bcore_mutex_s_create_self
static bcore_self_s* bcore_mutex_s_create_self( void )
{
    bcore_self_s* self = BCORE_SELF_S_BUILD_PARSE_SC( "bcore_mutex_s = { ... }", bcore_mutex_s );
    bcore_self_s_push_ns_func( self, ( fp_t )bcore_mutex_s_init, "bcore_fp_init", "init" );
    bcore_self_s_push_ns_func( self, ( fp_t )bcore_mutex_s_down, "bcore_fp_down", "down" );
    bcore_self_s_push_ns_func( self, ( fp_t )bcore_mutex_s_copy, "bcore_fp_copy", "copy" );
    return self;
}

// Assembly:
pushq %rbx
leaq 0x33832(%rip), %rdi     # 0xcbca7
pushq $0x28
popq %rsi
pushq $0x8
popq %rdx
callq 0x64356
movq %rax, %rbx
leaq -0xb36(%rip), %rsi      # 0x97954
leaq 0x2832a(%rip), %rdx     # 0xc07bb
leaq 0x2832c(%rip), %rcx     # 0xc07c4
movq %rax, %rdi
callq 0x63a2b
leaq -0xaae(%rip), %rsi      # 0x979f9
leaq 0x2831b(%rip), %rdx     # 0xc07c9
leaq 0x1c133(%rip), %rcx     # 0xb45e8
movq %rbx, %rdi
callq 0x63a2b
leaq -0xa58(%rip), %rsi      # 0x97a6c
leaq 0x2830c(%rip), %rdx     # 0xc07d7
leaq 0x23882(%rip), %rcx     # 0xbbd54
movq %rbx, %rdi
callq 0x63a2b
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_threads.c
// Function: bcore_lock_s_create_self
static bcore_self_s* bcore_lock_s_create_self( void )
{
    bcore_self_s* self = BCORE_SELF_S_BUILD_PARSE_SC( "bcore_lock_s = { aware_t _; private bcore_mutex_s* mutex; }", bcore_lock_s );
    bcore_self_s_push_ns_func( self, ( fp_t )bcore_lock_s_init, "bcore_fp_init", "init" );
    bcore_self_s_push_ns_func( self, ( fp_t )bcore_lock_s_down, "bcore_fp_down", "down" );
    bcore_self_s_push_ns_func( self, ( fp_t )bcore_lock_s_copy, "bcore_fp_copy", "copy" );
    return self;
}

// Assembly:
pushq %rbx
leaq 0x337d8(%rip), %rdi     # 0xcbcbf
pushq $0x10
popq %rsi
pushq $0x8
popq %rdx
callq 0x64356
movq %rax, %rbx
leaq -0x92c(%rip), %rsi      # 0x97bd0
leaq 0x282b8(%rip), %rdx     # 0xc07bb
leaq 0x282ba(%rip), %rcx     # 0xc07c4
movq %rax, %rdi
callq 0x63a2b
leaq -0x92e(%rip), %rsi      # 0x97beb
leaq 0x282a9(%rip), %rdx     # 0xc07c9
leaq 0x1c0c1(%rip), %rcx     # 0xb45e8
movq %rbx, %rdi
callq 0x63a2b
leaq -0x92d(%rip), %rsi      # 0x97c09
leaq 0x2829a(%rip), %rdx     # 0xc07d7
leaq 0x23810(%rip), %rcx     # 0xbbd54
movq %rbx, %rdi
callq 0x63a2b
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_threads.c
// Function: bcore_unlock_s_create_self
static bcore_self_s* bcore_unlock_s_create_self( void )
{
    bcore_self_s* self = BCORE_SELF_S_BUILD_PARSE_SC( "bcore_unlock_s = { aware_t _; private bcore_mutex_s* mutex; }", bcore_unlock_s );
    bcore_self_s_push_ns_func( self, ( fp_t )bcore_unlock_s_init, "bcore_fp_init", "init" );
    bcore_self_s_push_ns_func( self, ( fp_t )bcore_unlock_s_down, "bcore_fp_down", "down" );
    bcore_self_s_push_ns_func( self, ( fp_t )bcore_unlock_s_copy, "bcore_fp_copy", "copy" );
    return self;
}

// Assembly:
pushq %rbx
leaq 0x337a2(%rip), %rdi     # 0xcbcfb
pushq $0x10
popq %rsi
pushq $0x8
popq %rdx
callq 0x64356
movq %rax, %rbx
leaq -0x8ef(%rip), %rsi      # 0x97c7f
leaq 0x28246(%rip), %rdx     # 0xc07bb
leaq 0x28248(%rip), %rcx     # 0xc07c4
movq %rax, %rdi
callq 0x63a2b
leaq -0x8f1(%rip), %rsi      # 0x97c9a
leaq 0x28237(%rip), %rdx     # 0xc07c9
leaq 0x1c04f(%rip), %rcx     # 0xb45e8
movq %rbx, %rdi
callq 0x63a2b
leaq -0x8f0(%rip), %rsi      # 0x97cb8
leaq 0x28228(%rip), %rdx     # 0xc07d7
leaq 0x2379e(%rip), %rcx     # 0xbbd54
movq %rbx, %rdi
callq 0x63a2b
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_threads.c
// Function: bcore_condition_s_create_self
static bcore_self_s* bcore_condition_s_create_self( void )
{
    bcore_self_s* self = BCORE_SELF_S_BUILD_PARSE_SC( "bcore_condition_s = { ... }", bcore_condition_s );
    bcore_self_s_push_ns_func( self, ( fp_t )bcore_condition_s_init, "bcore_fp_init", "init" );
    bcore_self_s_push_ns_func( self, ( fp_t )bcore_condition_s_down, "bcore_fp_down", "down" );
    bcore_self_s_push_ns_func( self, ( fp_t )bcore_condition_s_copy, "bcore_fp_copy", "copy" );
    return self;
}

// Assembly:
pushq %rbx
leaq 0x3376e(%rip), %rdi     # 0xcbd39
pushq $0x30
popq %rsi
pushq $0x8
popq %rdx
callq 0x64356
movq %rax, %rbx
leaq -0x880(%rip), %rsi      # 0x97d60
leaq 0x281d4(%rip), %rdx     # 0xc07bb
leaq 0x281d6(%rip), %rcx     # 0xc07c4
movq %rax, %rdi
callq 0x63a2b
leaq -0x869(%rip), %rsi      # 0x97d94
leaq 0x281c5(%rip), %rdx     # 0xc07c9
leaq 0x1bfdd(%rip), %rcx     # 0xb45e8
movq %rbx, %rdi
callq 0x63a2b
leaq -0x854(%rip), %rsi      # 0x97dc6
leaq 0x281b6(%rip), %rdx     # 0xc07d7
leaq 0x2372c(%rip), %rcx     # 0xbbd54
movq %rbx, %rdi
callq 0x63a2b
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_threads.c
// Function: bcore_thread_s_create_self
BCORE_DEFINE_FUNCTIONS_CDC( bcore_thread_s )

static bcore_self_s* bcore_thread_s_create_self( void )
{
    bcore_self_s* self = BCORE_SELF_S_BUILD_PARSE_SC( "bcore_thread_s = { ... }", bcore_thread_s );
    bcore_self_s_push_ns_func( self, ( fp_t )bcore_thread_s_init, "bcore_fp_init", "init" );
    bcore_self_s_push_ns_func( self, ( fp_t )bcore_thread_s_down, "bcore_fp_down", "down" );
    bcore_self_s_push_ns_func( self, ( fp_t )bcore_thread_s_copy, "bcore_fp_copy", "copy" );
    return self;
}

// Assembly:
pushq %rbx
leaq 0x33718(%rip), %rdi     # 0xcbd55
pushq $0x10
popq %rsi
pushq $0x8
popq %rdx
callq 0x64356
movq %rax, %rbx
leaq -0x780(%rip), %rsi      # 0x97ed2
leaq 0x28162(%rip), %rdx     # 0xc07bb
leaq 0x28164(%rip), %rcx     # 0xc07c4
movq %rax, %rdi
callq 0x63a2b
leaq -0x795(%rip), %rsi      # 0x97eda
leaq 0x28153(%rip), %rdx     # 0xc07c9
leaq 0x1bf6b(%rip), %rcx     # 0xb45e8
movq %rbx, %rdi
callq 0x63a2b
leaq -0x6e8(%rip), %rsi      # 0x97fa4
leaq 0x28144(%rip), %rdx     # 0xc07d7
leaq 0x236ba(%rip), %rcx     # 0xbbd54
movq %rbx, %rdi
callq 0x63a2b
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_tp.c
// Function: bcore_tp_is_numeric
tp_t bcore_tp_is_numeric( tp_t t )
{
    switch( t )
    {
        case TYPEOF_s3_t: return true;
        case TYPEOF_s2_t: return true;
        case TYPEOF_s1_t: return true;
        case TYPEOF_s0_t: return true;
        case TYPEOF_u3_t: return true;
        case TYPEOF_u2_t: return true;
        case TYPEOF_u1_t: return true;
        case TYPEOF_u0_t: return true;
        case TYPEOF_f3_t: return true;
        case TYPEOF_f2_t: return true;
        case TYPEOF_sz_t: return true;
        case TYPEOF_uz_t: return true;
        case TYPEOF_tp_t: return true;
        case TYPEOF_er_t: return true;
        case TYPEOF_bl_t: return true;
        case TYPEOF_aware_t: return true;
        default: return false;
    }
}

// Assembly:
pushq $0x1
popq %rax
movabsq $-0x73f6ae1ad309fd45, %rcx # imm = 0x8C0951E52CF602BB
cmpq %rcx, %rdi
je 0x988f1
movabsq $-0x6bce971ace902370, %rcx # imm = 0x943168E5316FDC90
cmpq %rcx, %rdi
je 0x988f1
movabsq $-0x6119581ac7eacd63, %rcx # imm = 0x9EE6A7E53815329D
cmpq %rcx, %rdi
je 0x988f1
movabsq $-0x5fc2af85f419929b, %rcx # imm = 0xA03D507A0BE66D65
cmpq %rcx, %rdi
je 0x988f1
movabsq $-0x5aa4411ac4e2880e, %rcx # imm = 0xA55BBEE53B1D77F2
cmpq %rcx, %rdi
je 0x988f1
movabsq $-0x58737885f0577326, %rcx # imm = 0xA78C877A0FA88CDA
cmpq %rcx, %rdi
je 0x988f1
movabsq $-0x4db4989f9014f113, %rcx # imm = 0xB24B67606FEB0EED
cmpq %rcx, %rdi
je 0x988f1
movabsq $-0x4882601bdca6aefb, %rcx # imm = 0xB77D9FE423595105
cmpq %rcx, %rdi
je 0x988f1
movabsq $-0x3f1363e6d8155aed, %rcx # imm = 0xC0EC9C1927EAA513
cmpq %rcx, %rdi
je 0x988f1
movabsq $-0x3ac242643d9c35a8, %rcx # imm = 0xC53DBD9BC263CA58
cmpq %rcx, %rdi
je 0x988f1
movabsq $-0x388c46b188de83fe, %rcx # imm = 0xC773B94E77217C02
cmpq %rcx, %rdi
je 0x988f1
movabsq $0x510c2417c67dabeb, %rcx # imm = 0x510C2417C67DABEB
cmpq %rcx, %rdi
je 0x988f1
movabsq $0x585a3b17ca3de200, %rcx # imm = 0x585A3B17CA3DE200
cmpq %rcx, %rdi
je 0x988f1
movabsq $0x62367a17d02b474d, %rcx # imm = 0x62367A17D02B474D
cmpq %rcx, %rdi
je 0x988f1
movabsq $0x69849117d3eb7d62, %rcx # imm = 0x69849117D3EB7D62
cmpq %rcx, %rdi
je 0x988f1
movabsq $0x6d07f9ef5b68e8a2, %rcx # imm = 0x6D07F9EF5B68E8A2
cmpq %rcx, %rdi
je 0x988f1
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_tp.c
// Function: bcore_tp_is_unsigned
tp_t bcore_tp_is_unsigned( tp_t t )
{
    switch( t )
    {
        case TYPEOF_u3_t:    return true;
        case TYPEOF_u2_t:    return true;
        case TYPEOF_u1_t:    return true;
        case TYPEOF_u0_t:    return true;
        case TYPEOF_uz_t:    return true;
        case TYPEOF_tp_t:    return true;
        case TYPEOF_aware_t: return true;
        default: return false;
    }
}

// Assembly:
pushq $0x1
popq %rax
movabsq $-0x73f6ae1ad309fd45, %rcx # imm = 0x8C0951E52CF602BB
cmpq %rcx, %rdi
je 0x989be
movabsq $-0x6bce971ace902370, %rcx # imm = 0x943168E5316FDC90
cmpq %rcx, %rdi
je 0x989be
movabsq $-0x6119581ac7eacd63, %rcx # imm = 0x9EE6A7E53815329D
cmpq %rcx, %rdi
je 0x989be
movabsq $-0x5aa4411ac4e2880e, %rcx # imm = 0xA55BBEE53B1D77F2
cmpq %rcx, %rdi
je 0x989be
movabsq $-0x4882601bdca6aefb, %rcx # imm = 0xB77D9FE423595105
cmpq %rcx, %rdi
je 0x989be
movabsq $-0x388c46b188de83fe, %rcx # imm = 0xC773B94E77217C02
cmpq %rcx, %rdi
je 0x989be
movabsq $0x6d07f9ef5b68e8a2, %rcx # imm = 0x6D07F9EF5B68E8A2
cmpq %rcx, %rdi
je 0x989be
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_tp_fastmap.c
// Function: bcore_tp_fastmap_table_s_keys
uz_t bcore_tp_fastmap_table_s_keys( bcore_tp_fastmap_table_s* o )
{
    uz_t count = 0;
    for( uz_t i = 0; i < o->size; i++ )
    {
        if( o->arr[ i ].key ) count++;
    }
    return count;
}

// Assembly:
xorl %ecx, %ecx
xorl %eax, %eax
xorl %edx, %edx
cmpq (%rdi), %rdx
jae 0x98a24
movq 0x10(%rdi), %rsi
movq (%rsi,%rcx), %rsi
cmpq $0x1, %rsi
sbbq $-0x1, %rax
incq %rdx
addq $0x10, %rcx
jmp 0x98a06
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_tp_fastmap.c
// Function: bcore_tp_fastmap_table_s_set
bl_t bcore_tp_fastmap_table_s_set( bcore_tp_fastmap_table_s* o, tp_t key, vc_t val )
{
    uz_t idx = key & o->mask;
    if( o->arr[ idx ].key == key ) return true;
    if( o->arr[ idx ].key == 0   ) { o->arr[ idx ].key = key; o->arr[ idx ].val = val; return true; }
    idx++;
    if( o->arr[ idx ].key == key ) return true;
    if( o->arr[ idx ].key == 0   ) { o->arr[ idx ].key = key; o->arr[ idx ].val = val; return true; }
    idx++;
    if( o->arr[ idx ].key == key ) return true;
    if( o->arr[ idx ].key == 0   ) { o->arr[ idx ].key = key; o->arr[ idx ].val = val; return true; }
    idx++;
    if( o->arr[ idx ].key == key ) return true;
    if( o->arr[ idx ].key == 0   ) { o->arr[ idx ].key = key; o->arr[ idx ].val = val; return true; }
    return false;
}

// Assembly:
movq 0x8(%rdi), %rcx
andq %rsi, %rcx
movq 0x10(%rdi), %rax
movq %rcx, %r8
shlq $0x4, %r8
movq (%rax,%r8), %r9
movb $0x1, %al
cmpq %rsi, %r9
je 0x98adc
movq 0x10(%rdi), %r9
movq (%r9,%r8), %r8
testq %r8, %r8
je 0x98ac8
leaq 0x1(%rcx), %r8
movq 0x10(%rdi), %r10
movq %r8, %r9
shlq $0x4, %r9
movq (%r10,%r9), %r10
cmpq %rsi, %r10
je 0x98adc
movq 0x10(%rdi), %r10
movq (%r10,%r9), %r9
testq %r9, %r9
je 0x98acb
leaq 0x2(%rcx), %r8
movq 0x10(%rdi), %r10
movq %r8, %r9
shlq $0x4, %r9
movq (%r10,%r9), %r10
cmpq %rsi, %r10
je 0x98adc
movq 0x10(%rdi), %r10
movq (%r10,%r9), %r9
testq %r9, %r9
je 0x98acb
addq $0x3, %rcx
movq 0x10(%rdi), %r9
movq %rcx, %r8
shlq $0x4, %r8
movq (%r9,%r8), %r9
cmpq %rsi, %r9
je 0x98adc
movq 0x10(%rdi), %r9
movq (%r9,%r8), %r9
movq %rcx, %r8
testq %r9, %r9
je 0x98acb
xorl %eax, %eax
retq
movq %rcx, %r8
movq 0x10(%rdi), %rcx
shlq $0x4, %r8
xchgq %rsi, (%rcx,%r8)
xchgq %rdx, 0x8(%rcx,%r8)
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_tp_fastmap.c
// Function: bcore_tp_fastmap_table_s_init_new
void bcore_tp_fastmap_table_s_init_new( bcore_tp_fastmap_table_s* o, const bcore_tp_fastmap_table_s* src )
{
    o->size = src ? src->size << 1 : BCORE_TP_FASTMAP_START_SIZE;
    o->mask = ( o->size - 1 ) ^ ( BCORE_TP_FASTMAP_SCAN_LENGTH - 1 );

    uz_t alloc_size = sizeof( bcore_tp_fastmap_kv_s ) * o->size;
    o->arr = bcore_malloc( alloc_size );
    bcore_memzero( o->arr, alloc_size );
    if( src )
    {
        for( uz_t i = 0; i < src->size; i++ )
        {
            if( src->arr[ i ].key ) bcore_tp_fastmap_table_s_set( o, src->arr[ i ].key, src->arr[ i ].val );
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rsi, %rsi
je 0x98b6b
movq %rsi, %r14
movq (%rsi), %r15
leaq (%r15,%r15), %rax
movq %rax, (%rbx)
leaq -0x1(,%r15,2), %rax
xorq $0x3, %rax
movq %rax, 0x8(%rbx)
shlq $0x5, %r15
movq %r15, %rdi
callq 0x60245
movq %rax, 0x10(%rbx)
movq %rax, %rdi
movq %r15, %rsi
callq 0x6028b
xorl %r15d, %r15d
xorl %r12d, %r12d
cmpq (%r14), %r12
jae 0x98b5f
movq 0x10(%r14), %rax
movq (%rax,%r15), %rax
testq %rax, %rax
je 0x98b56
movq 0x10(%r14), %rax
movq (%rax,%r15), %rsi
movq 0x10(%r14), %rax
movq 0x8(%rax,%r15), %rdx
movq %rbx, %rdi
callq 0x98a25
incq %r12
addq $0x10, %r15
jmp 0x98b2b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq $0x4, (%rbx)
andq $0x0, 0x8(%rbx)
pushq $0x40
popq %r14
movq %r14, %rdi
callq 0x60245
movq %rax, 0x10(%rbx)
movq %rax, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x6028b
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_tp_fastmap.c
// Function: bcore_tp_fastmap_s_init
void bcore_tp_fastmap_s_init( bcore_tp_fastmap_s* o )
{
    bcore_memzero( o, sizeof( *o ) );
    bcore_mutex_s_init( &o->mutex );

    bcore_mutex_s_lock( &o->mutex );
    for( uz_t i = 0; i < BCORE_TP_FASTMAP_MAX_TABLES; i++ ) bcore_tp_fastmap_table_s_init( &o->table_arr[ i ] );
    bcore_tp_fastmap_table_s_init_new( &o->table_arr[ 0 ], NULL );
    bcore_mutex_s_unlock( &o->mutex );

    o->locked = false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x218, %esi            # imm = 0x218
callq 0x6028b
leaq 0x1f0(%rbx), %r14
movq %r14, %rdi
callq 0x97954
movq %r14, %rdi
callq 0x97ae2
leaq 0x10(%rbx), %r15
pushq $0x10
popq %r12
cmpq $0x1f0, %r12            # imm = 0x1F0
je 0x98be9
leaq (%rbx,%r12), %rdi
callq 0x989d4
addq $0x18, %r12
jmp 0x98bd1
movq %r15, %rdi
xorl %esi, %esi
callq 0x98add
movq %r14, %rdi
callq 0x97b12
movb $0x0, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_tp_fastmap.c
// Function: bcore_tp_fastmap_s_clear
void bcore_tp_fastmap_s_clear( bcore_tp_fastmap_s* o )
{
    bcore_mutex_s_lock( &o->mutex );
    for( uz_t i = 0; i < BCORE_TP_FASTMAP_MAX_TABLES; i++ ) bcore_tp_fastmap_table_s_clear( &o->table_arr[ i ] );
    o->table_index_get = 0;
    o->table_index_set = 0;
    bcore_tp_fastmap_table_s_init_new( &o->table_arr[ 0 ], NULL );
    bcore_mutex_s_unlock( &o->mutex );
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x1f0(%rdi), %rbx
movq %rbx, %rdi
callq 0x97ae2
leaq 0x10(%r14), %r15
pushq $0x10
popq %r12
cmpq $0x1f0, %r12            # imm = 0x1F0
je 0x98c45
leaq (%r14,%r12), %rdi
callq 0x989dc
addq $0x18, %r12
jmp 0x98c2d
xorl %eax, %eax
xchgl %eax, (%r14)
xorl %eax, %eax
xchgl %eax, 0x4(%r14)
movq %r15, %rdi
xorl %esi, %esi
callq 0x98add
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x97b12
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_tp_fastmap.c
// Function: bcore_tp_fastmap_s_down
void bcore_tp_fastmap_s_down( bcore_tp_fastmap_s* o )
{
    bcore_mutex_s_lock( &o->mutex );
    for( uz_t i = 0; i < BCORE_TP_FASTMAP_MAX_TABLES; i++ ) bcore_tp_fastmap_table_s_down( &o->table_arr[ i ] );
    bcore_mutex_s_unlock( &o->mutex );

    bcore_mutex_s_down( &o->mutex );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x1f0(%rdi), %rbx
movq %rbx, %rdi
callq 0x97ae2
pushq $0x10
popq %r15
cmpq $0x1f0, %r15            # imm = 0x1F0
je 0x98ca0
leaq (%r14,%r15), %rdi
callq 0x989dc
addq $0x18, %r15
jmp 0x98c88
movq %rbx, %rdi
callq 0x97b12
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x979f9
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_tp_fastmap.c
// Function: bcore_tp_fastmap_s_set
bl_t bcore_tp_fastmap_s_set( bcore_tp_fastmap_s* o, tp_t key, vc_t val )
{
    bcore_mutex_s_lock( &o->mutex );
    if( o->locked )
    {
        bcore_mutex_s_unlock( &o->mutex );
        return false; // no change during lock
    }
    bcore_tp_fastmap_table_s* table = &o->table_arr[ o->table_index_set ];
    if( bcore_tp_fastmap_table_s_set( table, key, val ) )
    {
        bcore_mutex_s_unlock( &o->mutex );
        return true;
    }

    if( o->table_index_set == BCORE_TP_FASTMAP_MAX_TABLES - 1 )
    {
        bcore_mutex_s_unlock( &o->mutex );
        return false; // table size limit reached
    }


    o->table_index_set++;
    bcore_tp_fastmap_table_s* new_table = &o->table_arr[ o->table_index_set ];
    bcore_tp_fastmap_table_s_init_new( new_table, table );
    bcore_mutex_s_unlock( &o->mutex );

    // inserting a fence to prevent table_index_get being updated too early
    bcore_mutex_s_lock( &o->mutex );
    o->table_index_get = o->table_index_set; // this update must be locked to prevent table_index_get being left with a lower value in a race condition
    bcore_mutex_s_unlock( &o->mutex );

    return bcore_tp_fastmap_s_set( o, key, val );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x1f0(%rdi), %rbx
leaq 0x10(%rdi), %rbp
movq %rbx, %rdi
callq 0x97ae2
cmpb $0x0, 0x8(%r12)
jne 0x98de3
movl 0x4(%r12), %eax
cltq
imulq $0x18, %rax, %r13
addq %rbp, %r13
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x98a25
testb %al, %al
jne 0x98de7
movl 0x4(%r12), %eax
cmpl $0x13, %eax
je 0x98de3
lock
incl 0x4(%r12)
movl 0x4(%r12), %eax
cltq
imulq $0x18, %rax, %rdi
addq %rbp, %rdi
movq %r13, %rsi
callq 0x98add
movq %rbx, %rdi
callq 0x97b12
movq %rbx, %rdi
callq 0x97ae2
movl 0x4(%r12), %eax
xchgl %eax, (%r12)
movq %rbx, %rdi
callq 0x97b12
jmp 0x98d6a
xorl %ebp, %ebp
jmp 0x98dea
movb $0x1, %bpl
movq %rbx, %rdi
callq 0x97b12
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_tp_fastmap.c
// Function: bcore_tp_fastmap_s_size
uz_t bcore_tp_fastmap_s_size( bcore_tp_fastmap_s* o )
{
    bcore_mutex_s_lock( &o->mutex );
    uz_t size = o->table_arr[ o->table_index_set ].size;
    bcore_mutex_s_unlock( &o->mutex );
    return size;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1f0(%rdi), %r14
movq %r14, %rdi
callq 0x97ae2
movl 0x4(%rbx), %eax
cltq
imulq $0x18, %rax, %rax
movq 0x10(%rbx,%rax), %rbx
movq %r14, %rdi
callq 0x97b12
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_tp_fastmap.c
// Function: bcore_tp_fastmap_s_keys
uz_t bcore_tp_fastmap_s_keys( bcore_tp_fastmap_s* o )
{
    bcore_mutex_s_lock( &o->mutex );
    uz_t keys = bcore_tp_fastmap_table_s_keys( &o->table_arr[ o->table_index_set ] );
    bcore_mutex_s_unlock( &o->mutex );
    return keys;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1f0(%rdi), %r14
movq %r14, %rdi
callq 0x97ae2
movl 0x4(%rbx), %eax
cltq
imulq $0x18, %rax, %rax
leaq (%rbx,%rax), %rdi
addq $0x10, %rdi
callq 0x98a00
movq %rax, %rbx
movq %r14, %rdi
callq 0x97b12
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_trait.c
// Function: bcore_trait_require_function
void bcore_trait_require_function( tp_t trait, tp_t function, tp_t name )
{
    assert( trait != 0 );
    system_s_g_lock();
    assert( !bcore_hmap_tptp_s_exists( &system_s_g->type_map, trait ) );
    trait_s_push_function( get_trait( trait ), function, name );
    system_s_g_unlock();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x99dac
movq %r15, %rdi
callq 0x992d2
movq %rax, %r15
movq 0x8(%rax), %rax
movq 0x10(%r15), %rdx
cmpq 0x18(%r15), %rdx
jne 0x99389
movq %r15, %r8
addq $0x18, %r8
leaq (%rdx,%rdx), %rsi
testq %rdx, %rdx
pushq $0x1
popq %rcx
cmovneq %rsi, %rcx
pushq $0x10
popq %rdi
movq %rax, %rsi
callq 0x60263
movq %rax, 0x8(%r15)
movq 0x10(%r15), %rdx
leaq 0x1(%rdx), %rcx
movq %rcx, 0x10(%r15)
shlq $0x4, %rdx
movq %r14, (%rax,%rdx)
movq %rbx, 0x8(%rax,%rdx)
popq %rbx
popq %r14
popq %r15
jmp 0x99dbc
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_trait.c
// Function: bcore_trait_register_fp_support
void bcore_trait_register_fp_support( tp_t trait, bcore_trait_fp_supports f )
{
    assert( trait != 0 );
    system_s_g_lock();
    assert( !bcore_hmap_tptp_s_exists( &system_s_g->type_map, trait ) );
    trait_s_push_fp_support( get_trait( trait ), f );
    system_s_g_unlock();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x99dac
movq %r14, %rdi
callq 0x992d2
movq %rax, %r14
movq 0x20(%rax), %rax
movq 0x28(%r14), %rdx
cmpq 0x30(%r14), %rdx
jne 0x993f8
movq %r14, %r8
addq $0x30, %r8
leaq (%rdx,%rdx), %rsi
testq %rdx, %rdx
pushq $0x1
popq %rcx
cmovneq %rsi, %rcx
pushq $0x8
popq %rdi
movq %rax, %rsi
callq 0x60263
movq %rax, 0x20(%r14)
movq 0x28(%r14), %rdx
leaq 0x1(%rdx), %rcx
movq %rcx, 0x28(%r14)
movq %rbx, (%rax,%rdx,8)
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x99dbc
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_trait.c
// Function: bcore_trait_set
void bcore_trait_set( tp_t trait, tp_t parent )
{
    system_s_g_lock();
    if( trait_is_of( parent, trait ) )
    {
        system_s_g_unlock();
        ERR( "Declaring trait '%s' with parent '%s' causes cyclic ancestry.", ifnameof( trait ), ifnameof( parent ) );
    }
    bcore_hmap_tptp_s_set( &system_s_g->type_map, trait, parent );
    system_s_g_unlock();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x99dac
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9948a
testb %al, %al
je 0x9946e
callq 0x99dbc
movq %r14, %rdi
callq 0x994c3
movq %rax, %r15
movq %rbx, %rdi
callq 0x994c3
leaq 0x32aff(%rip), %rdi     # 0xcbf4d
leaq 0x32b08(%rip), %rsi     # 0xcbf5d
leaq 0x32b0f(%rip), %rcx     # 0xcbf6b
movl $0x11b, %edx            # imm = 0x11B
movq %r15, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x60031
movq 0x7feab(%rip), %rdi     # 0x119320
movq %r14, %rsi
movq %rbx, %rdx
callq 0x68977
popq %rbx
popq %r14
popq %r15
jmp 0x99dbc
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_trait.c
// Function: trait_is_of
static bl_t trait_is_of( tp_t trait, tp_t ancestor )
{
    for(;;)
    {
        if( trait == ancestor ) return true;
        tp_t* parent = bcore_hmap_tptp_s_get( &system_s_g->type_map, trait );
        if( !parent || !(*parent) ) return false;
        trait = *parent;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpq %rbx, %rdi
je 0x994b5
movq 0x7fe80(%rip), %rdi     # 0x119320
movq %r14, %rsi
callq 0x6887a
testq %rax, %rax
je 0x994b5
movq (%rax), %rdi
testq %rdi, %rdi
jne 0x99491
cmpq %rbx, %r14
sete %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_trait.c
// Function: bcore_trait_exists
bl_t bcore_trait_exists( tp_t trait )
{
    system_s_g_lock();
    bl_t flag = bcore_hmap_tptp_s_exists( &system_s_g->type_map, trait );
    system_s_g_unlock();
    return flag;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x99dac
movq 0x7fe37(%rip), %rdi     # 0x119320
movq %rbx, %rsi
callq 0x68ad7
movl %eax, %ebx
callq 0x99dbc
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_trait.c
// Function: bcore_trait_parent
tp_t bcore_trait_parent( tp_t trait )
{
    system_s_g_lock();
    tp_t* parent = bcore_hmap_tptp_s_get( &system_s_g->type_map, trait );
    system_s_g_unlock();
    return parent ? *parent : 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x99dac
movq 0x7fe14(%rip), %rdi     # 0x119320
movq %rbx, %rsi
callq 0x6887a
movq %rax, %rbx
callq 0x99dbc
testq %rbx, %rbx
je 0x99526
movq (%rbx), %rax
jmp 0x99528
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_trait.c
// Function: bcore_trait_is_of
bl_t bcore_trait_is_of( tp_t trait, tp_t ancestor )
{
    system_s_g_lock();
    bl_t flag = trait_is_of( trait, ancestor );
    system_s_g_unlock();
    return flag;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x99dac
movq %r14, %rdi
movq %rbx, %rsi
callq 0x9948a
movl %eax, %ebx
callq 0x99dbc
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_trait.c
// Function: bcore_get_traits_of_parent
void bcore_get_traits_of_parent( tp_t parent, bcore_arr_tp_s* traits )
{
    system_s_g_lock();
    bcore_arr_tp_s_clear( traits );
    for( sz_t i = 0; i < system_s_g->type_map.size; i++ )
    {
        tp_t key = bcore_hmap_tptp_s_idx_key( &system_s_g->type_map, i );
        if( key && key != parent )
        {
            tp_t val = bcore_hmap_tptp_s_idx_val( &system_s_g->type_map, i );
            if( val == parent ) bcore_arr_tp_s_push( traits, key );
        }
    }
    system_s_g_unlock();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x99dac
movq %rbx, %rdi
callq 0x5b98f
xorl %r15d, %r15d
movq 0x7fda6(%rip), %rdi     # 0x119320
cmpq 0x18(%rdi), %r15
jae 0x995bf
movq %r15, %rsi
callq 0x68b41
movq %rax, %r12
testq %rax, %rax
sete %al
cmpq %r14, %r12
sete %cl
orb %al, %cl
jne 0x995ba
movq 0x7fd7e(%rip), %rdi     # 0x119320
movq %r15, %rsi
callq 0x68b4e
cmpq %r14, %rax
jne 0x995ba
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5baa8
incq %r15
jmp 0x99573
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x99dbc
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_trait.c
// Function: bcore_push_traits_of_ancestor
void bcore_push_traits_of_ancestor( tp_t ancestor, bcore_arr_tp_s* traits )
{
    system_s_g_lock();
    for( sz_t i = 0; i < system_s_g->type_map.size; i++ )
    {
        tp_t key = bcore_hmap_tptp_s_idx_key( &system_s_g->type_map, i );
        if( key && key != ancestor )
        {
            if( trait_is_of( key, ancestor ) ) bcore_arr_tp_s_push( traits, key );
        }
    }
    system_s_g_unlock();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x99dac
xorl %r15d, %r15d
movq 0x7fd34(%rip), %rdi     # 0x119320
cmpq 0x18(%rdi), %r15
jae 0x9962c
movq %r15, %rsi
callq 0x68b41
movq %rax, %r12
testq %rax, %rax
sete %al
cmpq %r14, %r12
sete %cl
orb %al, %cl
jne 0x99627
movq %r12, %rdi
movq %r14, %rsi
callq 0x9948a
testb %al, %al
je 0x99627
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5baa8
incq %r15
jmp 0x995e5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x99dbc
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_trait.c
// Function: bcore_get_traits_of_parent_to_sink
void bcore_get_traits_of_parent_to_sink( tp_t parent, bcore_sink* sink )
{
    bcore_arr_tp_s* traits = bcore_arr_tp_s_create();
    bcore_get_traits_of_parent( parent, traits );
    for( sz_t i = 0; i < traits->size; i++ )
    {
        bcore_sink_a_push_fa( sink, "#<sc_t>\n", ifnameof( traits->data[ i ] ) );
    }
    bcore_arr_tp_s_discard( traits );
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
xorl %eax, %eax
callq 0x5b931
movq %rax, %r14
movq %r15, %rdi
movq %rax, %rsi
callq 0x99555
leaq 0x32a1e(%rip), %r15     # 0xcc0a8
xorl %r12d, %r12d
cmpq 0x10(%r14), %r12
jae 0x996b5
movq 0x8(%r14), %rax
movq (%rax,%r12,8), %rdi
callq 0x994c3
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x87cf1
incq %r12
jmp 0x9968d
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x5b94c
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_trait.c
// Function: bcore_get_traits_of_ancestor_to_sink
void bcore_get_traits_of_ancestor_to_sink( tp_t ancestor, bcore_sink* sink )
{
    bcore_arr_tp_s* traits = bcore_arr_tp_s_create();
    bcore_get_traits_of_ancestor( ancestor, traits );
    for( sz_t i = 0; i < traits->size; i++ )
    {
        bcore_sink_a_push_fa( sink, "#<sc_t>\n", ifnameof( traits->data[ i ] ) );
    }
    bcore_arr_tp_s_discard( traits );
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
xorl %eax, %eax
callq 0x5b931
movq %rax, %r14
movq %r15, %rdi
movq %rax, %rsi
callq 0x9963c
leaq 0x329b6(%rip), %r15     # 0xcc0a8
xorl %r12d, %r12d
cmpq 0x10(%r14), %r12
jae 0x9971d
movq 0x8(%r14), %rax
movq (%rax,%r12,8), %rdi
callq 0x994c3
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x87cf1
incq %r12
jmp 0x996f5
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x5b94c
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_trait.c
// Function: bcore_trait_satisfied_type
bl_t bcore_trait_satisfied_type( tp_t trait, tp_t object_type, st_s* log )
{
    if( object_type == trait                      ) return true;
    const bcore_self_s* self = bcore_flect_try_self( object_type );
    if( !self )
    {
        if( log )
        {
            st_s_pushf( log, "Object '%s' has no self reflection.", ifnameof( object_type ) );
        }
        return false;
    }
    if( bcore_trait_satisfied_self( trait, self, log ) ) return true;
    return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movb $0x1, %bpl
cmpq %rdi, %rsi
jne 0x9997d
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
callq 0x6427e
testq %rax, %rax
je 0x999ab
movq %r15, %rdi
movq %rax, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x99922
testq %rbx, %rbx
je 0x999d0
movq %r14, %rdi
callq 0x994c3
leaq 0x32672(%rip), %rsi     # 0xcc031
xorl %ebp, %ebp
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x8f42b
jmp 0x99970
xorl %ebp, %ebp
jmp 0x99970
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_trait.c
// Function: bcore_trait_assert_satisfied_type
void bcore_trait_assert_satisfied_type( tp_t trait, tp_t object_type )
{
    if( bcore_trait_satisfied_type( trait, object_type, NULL ) )
    {
        return;
    }
    else
    {
        st_s* s = st_s_create();
        bcore_trait_satisfied_type( trait, object_type, s );
        ERR_fa( "'#<sc_t>' is not supported by '#<sc_t>'. Reason:\n#<sc_t>\n", ifnameof( object_type ), ifnameof( trait ), s->sc );
        st_s_discard( s );
    }

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r15
movq %rdi, %rbx
xorl %edx, %edx
callq 0x99961
testb %al, %al
je 0x999f8
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
xorl %eax, %eax
callq 0x8eb65
movq %rax, %r14
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x99961
movq %r15, %rdi
callq 0x994c3
movq %rax, %r15
movq %rbx, %rdi
callq 0x994c3
movq 0x8(%r14), %rcx
movq %rcx, (%rsp)
leaq 0x32623(%rip), %rdi     # 0xcc055
leaq 0x32524(%rip), %rsi     # 0xcbf5d
leaq 0x32637(%rip), %rcx     # 0xcc077
movl $0x1fb, %edx            # imm = 0x1FB
movq %r15, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x60186
movq %r14, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x8edd4
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_trait.c
// Function: bcore_trait_size
sz_t bcore_trait_size()
{
    system_s_g_lock();
    sz_t size = bcore_hmap_tptp_s_keys( &system_s_g->type_map );
    system_s_g_unlock();
    return size;
}

// Assembly:
pushq %rbx
callq 0x99dac
movq 0x7f8b0(%rip), %rdi     # 0x119320
callq 0x68b1a
movq %rax, %rbx
callq 0x99dbc
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore_trait.c
// Function: bcore_trait_show
st_s* bcore_trait_show()
{
    system_s_g_lock();
    st_s* log = st_s_create();
    uz_t size = bcore_hmap_tptp_s_size( &system_s_g->type_map );
    for( uz_t i = 0; i < size; i++ )
    {
        tp_t key = bcore_hmap_tptp_s_idx_key( &system_s_g->type_map, i );
        if( key )
        {
            tp_t val = bcore_hmap_tptp_s_idx_val( &system_s_g->type_map, i );
            system_s_g_unlock();
            if( bcore_name_exists( key ) )
            {
                st_s_push_fa( log, "#<sc_t>", ifnameof( key ) );
            }
            else
            {
                st_s_push_fa( log, "#<tp_t>", key );
            }

            system_s_g_lock();
            while( val )
            {
                system_s_g_unlock();
                st_s_push_fa( log, "->#<sc_t>", ifnameof( val ) );
                system_s_g_lock();
                val = *bcore_hmap_tptp_s_get( &system_s_g->type_map, val );
            }
            system_s_g_unlock();
            st_s_push_char( log, '\n' );
            system_s_g_lock();
        }
    }
    system_s_g_unlock();
    st_s_push_char( log, '\n' );
    return log;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x99dac
xorl %eax, %eax
callq 0x8eb65
movq %rax, %rbx
movq 0x7f87d(%rip), %rdi     # 0x119320
callq 0x68b3c
movq %rax, %r14
leaq 0x325ff(%rip), %r12     # 0xcc0b1
xorl %r15d, %r15d
cmpq %r14, %r15
je 0x99b80
movq 0x7f85b(%rip), %rdi     # 0x119320
movq %r15, %rsi
callq 0x68b41
testq %rax, %rax
je 0x99b78
movq %rax, %rbp
movq 0x7f840(%rip), %rdi     # 0x119320
movq %r15, %rsi
callq 0x68b4e
movq %rax, %r13
callq 0x99dbc
movq %rbp, %rdi
callq 0x71db6
testq %rax, %rax
je 0x99b14
movq %rbp, %rdi
callq 0x994c3
movq %rbx, %rdi
leaq 0x28ffa(%rip), %rsi     # 0xc2b09
movq %rax, %rdx
jmp 0x99b21
movq %rbx, %rdi
leaq 0x2793d(%rip), %rsi     # 0xc145b
movq %rbp, %rdx
xorl %eax, %eax
callq 0x8f4ef
callq 0x99dac
callq 0x99dbc
testq %r13, %r13
je 0x99b68
movq %r13, %rdi
callq 0x994c3
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x8f4ef
callq 0x99dac
movq 0x7f7c5(%rip), %rdi     # 0x119320
movq %r13, %rsi
callq 0x6887a
movq (%rax), %r13
jmp 0x99b2d
movq %rbx, %rdi
pushq $0xa
popq %rsi
callq 0x8f0ee
callq 0x99dac
incq %r15
jmp 0x99ab5
callq 0x99dbc
pushq $0xa
popq %rsi
movq %rbx, %rdi
callq 0x8f0ee
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq