LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/johsteffens[P]beth/lib/bcore/bcore_tbman.c
// Function: external_manager_s_free_ext
static void external_manager_s_free_ext( external_manager_s* o, vd_t ptr, ext_s* ext )
{
    // reference control
    if( ext->rc_count )
    {
        ext->rc_count--;
        return;
    }

    if( ext->rc_down )
    {
        down_s* down = ext->rc_down;
        bcore_mutex_s_unlock( o->mutex );
        down->_( down, ptr );
        bcore_mutex_s_lock( o->mutex );
        assert( o->down_manager );
        down_s_discard( o->down_manager, down );
        ext->rc_down = NULL;
    }

    bcore_btree_pp_s_remove( o->ex_btree, ptr );
    ext_s_discard( o, ext );
    free( ptr );
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq 0x8(%rdx), %rax
testq %rax, %rax
je 0x113a20
decq %rax
movq %rax, 0x8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rsi, %rbx
movq %rdi, %r15
movq 0x10(%r14), %r12
testq %r12, %r12
je 0x113a68
movq 0x98(%r15), %rdi
callq 0x1142fb
movq %r12, %rdi
movq %rbx, %rsi
callq *(%r12)
movq 0x98(%r15), %rdi
callq 0x1142c9
movq 0x90(%r15), %rdi
movq %r12, %rsi
callq 0x1139b1
movq $0x0, 0x10(%r14)
movq 0x78(%r15), %rdi
movq %rbx, %rsi
callq 0x125550
cmpb $0x1, 0x88(%r15)
jne 0x113a8f
xorl %edi, %edi
subq 0x80(%r15), %rdi
andq %r14, %rdi
subq %rdi, %r14
jmp 0x113aa1
movq 0x70(%r15), %rdi
movq %r14, %rsi
callq 0x1268f9
movq %rax, %rdi
subq %rax, %r14
movq %r14, %rax
xorl %edx, %edx
divq 0x8(%rdi)
movzwl %ax, %esi
callq 0x11378d
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xd220
// File: /workspace/github_c_makefile_star2_O3/johsteffens[P]beth/lib/bcore/bcore_tbman.c
// Function: external_manager_s_free
static void external_manager_s_free( external_manager_s* o, vd_t ptr )
{
    vd_t* ext_p = bcore_btree_pp_s_val( o->ex_btree, ptr );
    if( !ext_p )
    {
        ERR( "Attempt to free invalid memory" );
    }
    external_manager_s_free_ext( o, ptr, *ext_p );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x78(%rdi), %rdi
callq 0x125444
movq %rax, %r15
testq %rax, %rax
jne 0x113f16
leaq 0x39561(%rip), %rdi     # 0x14d45d
leaq 0x38dea(%rip), %rsi     # 0x14cced
leaq 0x3956b(%rip), %rcx     # 0x14d475
movl $0x4a4, %edx            # imm = 0x4A4
xorl %eax, %eax
callq 0xbe592
movq (%r15), %rdx
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x1139f9
// File: /workspace/github_c_makefile_star2_O3/johsteffens[P]beth/lib/bcore/bcore_tbman.c
// Function: external_manager_s_malloc
static vd_t external_manager_s_malloc( external_manager_s* o, uz_t requested_bytes, uz_t* granted_bytes )
{
    vd_t ptr = aligned_alloc( TBMAN_ALIGN, requested_bytes );
    if( !ptr ) ERR( "Failed allocating %zu bytes.", requested_bytes );
    if( granted_bytes ) *granted_bytes = requested_bytes;
    ext_s* ext = ext_s_create( o );
    ext->size = requested_bytes;
    if( bcore_btree_pp_s_set( o->ex_btree, ptr, ext ) != 1 ) ERR( "Registering new address failed" );
    return ptr;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r14
movl $0x100, %edi            # imm = 0x100
callq 0xd1d0
movq %rax, %rbx
testq %rax, %rax
jne 0x113f70
leaq 0x3958d(%rip), %rdi     # 0x14d4e0
leaq 0x38d93(%rip), %rsi     # 0x14cced
leaq 0x39599(%rip), %rcx     # 0x14d4fa
movl $0x47a, %edx            # imm = 0x47A
movq %r15, %r8
xorl %eax, %eax
callq 0xbe592
testq %r12, %r12
je 0x113f79
movq %r15, (%r12)
movq %r14, %rdi
callq 0x113ac5
movq %rax, %r12
movl $0x18, %esi
movq %rax, %rdi
callq 0xbe802
movq %r15, (%r12)
movq 0x78(%r14), %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x125489
cmpl $0x1, %eax
je 0x113fca
leaq 0x39530(%rip), %rdi     # 0x14d4e0
leaq 0x38d36(%rip), %rsi     # 0x14cced
leaq 0x39559(%rip), %rcx     # 0x14d517
movl $0x47e, %edx            # imm = 0x47E
xorl %eax, %eax
callq 0xbe592
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rax
testq %rax, %rax
jle 0x1140a1
movq %rdx, %r15
xorl %r13d, %r13d
leaq 0x38c9c(%rip), %r12     # 0x14cced
xorl %ebp, %ebp
movq 0x8(%r14), %rcx
cmpq %rbx, (%rcx,%rbp,8)
jne 0x114093
movq 0x10(%r14), %rcx
movb $0x1, %r13b
cmpq %r15, (%rcx,%rbp,8)
je 0x114093
leaq 0x195d6(%rip), %rdi     # 0x12d647
leaq 0x397f7(%rip), %rsi     # 0x14d86f
leaq 0x39809(%rip), %rdx     # 0x14d888
movq %r12, %rcx
movl $0xc69, %r8d            # imm = 0xC69
xorl %eax, %eax
callq 0xbe4ef
movq 0x18(%r14), %rax
incq %rbp
cmpq %rax, %rbp
jl 0x114053
testb $0x1, %r13b
jne 0x1140ca
leaq 0x1959f(%rip), %rdi     # 0x12d647
leaq 0x32c96(%rip), %rsi     # 0x146d45
leaq 0x397d2(%rip), %rdx     # 0x14d888
leaq 0x38c30(%rip), %rcx     # 0x14cced
movl $0xc6c, %r8d            # imm = 0xC6C
xorl %eax, %eax
callq 0xbe4ef
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 0x110841
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x28, %esi
callq 0xbe802
movq %rbx, %rdi
xorl %esi, %esi
callq 0xd1c0
movl %eax, %ebx
cmpl $0xa, %eax
jg 0x114134
testl %ebx, %ebx
je 0x11415a
cmpl $0x1, %ebx
jne 0x11417d
leaq 0x3992d(%rip), %rdi     # 0x14da4c
leaq 0x39939(%rip), %rsi     # 0x14da5f
leaq 0x39967(%rip), %rcx     # 0x14da94
movl $0x23, %edx
jmp 0x114176
cmpl $0xc, %ebx
je 0x11415c
cmpl $0xb, %ebx
jne 0x11417d
leaq 0x39907(%rip), %rdi     # 0x14da4c
leaq 0x39913(%rip), %rsi     # 0x14da5f
leaq 0x3991c(%rip), %rcx     # 0x14da6f
movl $0x21, %edx
jmp 0x114176
popq %rbx
retq
leaq 0x398e9(%rip), %rdi     # 0x14da4c
leaq 0x398f5(%rip), %rsi     # 0x14da5f
leaq 0x39912(%rip), %rcx     # 0x14da83
movl $0x22, %edx
xorl %eax, %eax
callq 0xbe592
leaq 0x398c8(%rip), %rdi     # 0x14da4c
leaq 0x398d4(%rip), %rsi     # 0x14da5f
leaq 0x39916(%rip), %rcx     # 0x14daa8
movl $0x24, %edx
movl %ebx, %r8d
xorl %eax, %eax
popq %rbx
jmp 0xbe592
// File: /workspace/github_c_makefile_star2_O3/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 0x11421a
movl %eax, %ebx
cmpl $0x16, %eax
je 0x1141d4
cmpl $0x10, %ebx
jne 0x1141f5
leaq 0x39904(%rip), %rdi     # 0x14dac3
leaq 0x39899(%rip), %rsi     # 0x14da5f
leaq 0x39909(%rip), %rcx     # 0x14dad6
movl $0x2a, %edx
jmp 0x1141ee
leaq 0x398e8(%rip), %rdi     # 0x14dac3
leaq 0x3987d(%rip), %rsi     # 0x14da5f
leaq 0x398fe(%rip), %rcx     # 0x14dae7
movl $0x2b, %edx
xorl %eax, %eax
callq 0xbe592
leaq 0x398c7(%rip), %rdi     # 0x14dac3
leaq 0x3985c(%rip), %rsi     # 0x14da5f
leaq 0x3989e(%rip), %rcx     # 0x14daa8
movl $0x2c, %edx
movl %ebx, %r8d
xorl %eax, %eax
popq %rbx
jmp 0xbe592
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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
movq $0x0, (%rsp)
cmpb $0x1, 0x8(%rdi)
jne 0x114894
movq %rdi, %rbx
movq (%rdi), %rdi
movq %rsp, %rsi
callq 0xd040
movl %eax, %ebp
cmpl $0x15, %eax
jg 0x114898
testl %ebp, %ebp
je 0x114903
cmpl $0x3, %ebp
jne 0x1148df
leaq 0x39340(%rip), %rdi     # 0x14dbbf
leaq 0x391d9(%rip), %rsi     # 0x14da5f
leaq 0x39359(%rip), %rcx     # 0x14dbe6
movl $0x16d, %edx            # imm = 0x16D
jmp 0x1148d8
xorl %eax, %eax
jmp 0x11490b
cmpl $0x23, %ebp
je 0x1148be
cmpl $0x16, %ebp
jne 0x1148df
leaq 0x39316(%rip), %rdi     # 0x14dbbf
leaq 0x391af(%rip), %rsi     # 0x14da5f
leaq 0x3931c(%rip), %rcx     # 0x14dbd3
movl $0x16c, %edx            # imm = 0x16C
jmp 0x1148d8
leaq 0x392fa(%rip), %rdi     # 0x14dbbf
leaq 0x39193(%rip), %rsi     # 0x14da5f
leaq 0x39325(%rip), %rcx     # 0x14dbf8
movl $0x16e, %edx            # imm = 0x16E
xorl %eax, %eax
callq 0xbe592
leaq 0x392d9(%rip), %rdi     # 0x14dbbf
leaq 0x39172(%rip), %rsi     # 0x14da5f
leaq 0x391b4(%rip), %rcx     # 0x14daa8
movl $0x16f, %edx            # imm = 0x16F
movl %ebp, %r8d
xorl %eax, %eax
callq 0xbe592
movb $0x0, 0x8(%rbx)
movq (%rsp), %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x114845
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0xd1f0
testl %eax, %eax
je 0x114a14
leaq 0x391b4(%rip), %rdi     # 0x14dbab
leaq 0x39061(%rip), %rsi     # 0x14da5f
leaq 0x390a3(%rip), %rcx     # 0x14daa8
movl $0x15a, %edx            # imm = 0x15A
movl %eax, %r8d
xorl %eax, %eax
callq 0xbe592
movb $0x1, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x10, %esi
xorl %edi, %edi
callq 0xbe7b1
movq %rax, %r12
movl $0x10, %esi
movq %rax, %rdi
callq 0xbe802
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1149c9
movabsq $-0x6b951732b6f4fa73, %rdi # imm = 0x946AE8CD490B058D
callq 0x1074f1
movq %r12, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movq $0x2, 0x30(%rsp)
movq (%rbx), %r14
leaq 0x86e96(%rip), %rax     # 0x19be20
movl (%rax), %ecx
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x20(%rax,%rcx,8), %rdx
movq 0x18(%rax,%rcx,8), %rcx
andq %r14, %rcx
shlq $0x4, %rcx
leaq (%rdx,%rcx), %rax
movq (%rdx,%rcx), %rdx
movl $0x8, %ecx
cmpq %r14, %rdx
je 0x114fe0
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r14, %rdx
je 0x114fe0
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r14, %rdx
je 0x114fe0
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r14, %rdx
jne 0x114fe9
movq (%rax,%rcx), %r15
testq %r15, %r15
jne 0x115010
movabsq $-0x5073d588c3beb52e, %rdi # imm = 0xAF8C2A773C414AD2
movq %r14, %rsi
callq 0xe9bc5
movq %rax, %r15
leaq 0x86e1b(%rip), %rdi     # 0x19be20
movq %r14, %rsi
movq %rax, %rdx
callq 0x115fac
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r15, %rdi
movq %rbx, %rsi
callq 0xed355
movq 0x10(%rbx), %rax
decq %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x11510e
movq %rdi, %rbx
movq 0x8(%rdi), %rcx
shlq $0x4, %rax
leaq (%rcx,%rax), %rdi
addq $-0x10, %rdi
callq 0x114845
movq %rax, %r14
movq (%rbx), %r15
leaq 0x86da5(%rip), %rax     # 0x19be20
movl (%rax), %ecx
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x20(%rax,%rcx,8), %rdx
movq 0x18(%rax,%rcx,8), %rcx
andq %r15, %rcx
shlq $0x4, %rcx
leaq (%rdx,%rcx), %rax
movq (%rdx,%rcx), %rdx
movl $0x8, %ecx
cmpq %r15, %rdx
je 0x1150d1
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r15, %rdx
je 0x1150d1
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r15, %rdx
je 0x1150d1
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r15, %rdx
jne 0x1150da
movq (%rax,%rcx), %r12
testq %r12, %r12
jne 0x115101
movabsq $-0x5073d588c3beb52e, %rdi # imm = 0xAF8C2A773C414AD2
movq %r15, %rsi
callq 0xe9bc5
movq %rax, %r12
leaq 0x86d2a(%rip), %rdi     # 0x19be20
movq %r15, %rsi
movq %rax, %rdx
callq 0x115fac
movq %r12, %rdi
movq %rbx, %rsi
callq 0xeda34
jmp 0x115111
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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
shrq $0x9, %rax
movabsq $0x44b82fa09b5a53, %rcx # imm = 0x44B82FA09B5A53
mulq %rcx
shrq $0xb, %rdx
leaq 0x8(%rsp), %rax
movq %rdx, (%rax)
imulq $0x3b9aca00, %rdx, %rcx # imm = 0x3B9ACA00
subq %rcx, %rdi
movq %rdi, 0x8(%rax)
movq %rax, %rdi
xorl %esi, %esi
callq 0xd350
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x385c2(%rip), %rdi     # 0x14dc69
movl $0x28, %esi
movl $0x8, %edx
callq 0xc447e
movq %rax, %rbx
leaq -0x15d0(%rip), %rsi     # 0x1140f0
leaq 0x2d36e(%rip), %rdx     # 0x142a35
leaq 0x2d370(%rip), %rcx     # 0x142a3e
movq %rax, %rdi
callq 0xc34ab
leaq -0x153b(%rip), %rsi     # 0x1141a2
leaq 0x2d35f(%rip), %rdx     # 0x142a43
leaq 0x21adf(%rip), %rcx     # 0x1371ca
movq %rbx, %rdi
callq 0xc34ab
leaq -0x14de(%rip), %rsi     # 0x11421c
leaq 0x2d350(%rip), %rdx     # 0x142a51
leaq 0x28c53(%rip), %rcx     # 0x13e35b
movq %rbx, %rdi
callq 0xc34ab
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x38564(%rip), %rdi     # 0x14dc81
movl $0x10, %esi
movl $0x8, %edx
callq 0xc447e
movq %rax, %rbx
leaq -0x1327(%rip), %rsi     # 0x11440f
leaq 0x2d2f8(%rip), %rdx     # 0x142a35
leaq 0x2d2fa(%rip), %rcx     # 0x142a3e
movq %rax, %rdi
callq 0xc34ab
leaq -0x1327(%rip), %rsi     # 0x11442c
leaq 0x2d2e9(%rip), %rdx     # 0x142a43
leaq 0x21a69(%rip), %rcx     # 0x1371ca
movq %rbx, %rdi
callq 0xc34ab
leaq -0x130c(%rip), %rsi     # 0x114464
leaq 0x2d2da(%rip), %rdx     # 0x142a51
leaq 0x28bdd(%rip), %rcx     # 0x13e35b
movq %rbx, %rdi
callq 0xc34ab
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3852a(%rip), %rdi     # 0x14dcbd
movl $0x10, %esi
movl $0x8, %edx
callq 0xc447e
movq %rax, %rbx
leaq -0x1277(%rip), %rsi     # 0x114535
leaq 0x2d282(%rip), %rdx     # 0x142a35
leaq 0x2d284(%rip), %rcx     # 0x142a3e
movq %rax, %rdi
callq 0xc34ab
leaq -0x1277(%rip), %rsi     # 0x114552
leaq 0x2d273(%rip), %rdx     # 0x142a43
leaq 0x219f3(%rip), %rcx     # 0x1371ca
movq %rbx, %rdi
callq 0xc34ab
leaq -0x125c(%rip), %rsi     # 0x11458a
leaq 0x2d264(%rip), %rdx     # 0x142a51
leaq 0x28b67(%rip), %rcx     # 0x13e35b
movq %rbx, %rdi
callq 0xc34ab
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x384f2(%rip), %rdi     # 0x14dcfb
movl $0x30, %esi
movl $0x8, %edx
callq 0xc447e
movq %rax, %rbx
leaq -0x1195(%rip), %rsi     # 0x11468d
leaq 0x2d20c(%rip), %rdx     # 0x142a35
leaq 0x2d20e(%rip), %rcx     # 0x142a3e
movq %rax, %rdi
callq 0xc34ab
leaq -0x117e(%rip), %rsi     # 0x1146c1
leaq 0x2d1fd(%rip), %rdx     # 0x142a43
leaq 0x2197d(%rip), %rcx     # 0x1371ca
movq %rbx, %rdi
callq 0xc34ab
leaq -0x1169(%rip), %rsi     # 0x1146f3
leaq 0x2d1ee(%rip), %rdx     # 0x142a51
leaq 0x28af1(%rip), %rcx     # 0x13e35b
movq %rbx, %rdi
callq 0xc34ab
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x38498(%rip), %rdi     # 0x14dd17
movl $0x10, %esi
movl $0x8, %edx
callq 0xc447e
movq %rax, %rbx
leaq -0x1062(%rip), %rsi     # 0x114836
leaq 0x2d196(%rip), %rdx     # 0x142a35
leaq 0x2d198(%rip), %rcx     # 0x142a3e
movq %rax, %rdi
callq 0xc34ab
leaq -0x1075(%rip), %rsi     # 0x114840
leaq 0x2d187(%rip), %rdx     # 0x142a43
leaq 0x21907(%rip), %rcx     # 0x1371ca
movq %rbx, %rdi
callq 0xc34ab
leaq -0xfc0(%rip), %rsi      # 0x114912
leaq 0x2d178(%rip), %rdx     # 0x142a51
leaq 0x28a7b(%rip), %rcx     # 0x13e35b
movq %rbx, %rdi
callq 0xc34ab
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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:
movl $0x1, %eax
movabsq $-0x3f1363e6d8155aee, %rcx # imm = 0xC0EC9C1927EAA512
cmpq %rcx, %rdi
jg 0x11595c
movabsq $-0x5aa4411ac4e2880f, %rcx # imm = 0xA55BBEE53B1D77F1
cmpq %rcx, %rdi
jg 0x1159a0
movabsq $-0x6119581ac7eacd64, %rcx # imm = 0x9EE6A7E53815329C
cmpq %rcx, %rdi
jg 0x1159ff
movabsq $-0x73f6ae1ad309fd45, %rcx # imm = 0x8C0951E52CF602BB
cmpq %rcx, %rdi
je 0x115a6e
movabsq $-0x6bce971ace902370, %rcx # imm = 0x943168E5316FDC90
jmp 0x115a69
movabsq $0x585a3b17ca3de1ff, %rcx # imm = 0x585A3B17CA3DE1FF
cmpq %rcx, %rdi
jg 0x1159d5
movabsq $-0x388c46b188de83ff, %rcx # imm = 0xC773B94E77217C01
cmpq %rcx, %rdi
jg 0x115a1a
movabsq $-0x3f1363e6d8155aed, %rcx # imm = 0xC0EC9C1927EAA513
cmpq %rcx, %rdi
je 0x115a6e
movabsq $-0x3ac242643d9c35a8, %rcx # imm = 0xC53DBD9BC263CA58
jmp 0x115a69
movabsq $-0x4db4989f9014f114, %rcx # imm = 0xB24B67606FEB0EEC
cmpq %rcx, %rdi
jg 0x115a35
movabsq $-0x5aa4411ac4e2880e, %rcx # imm = 0xA55BBEE53B1D77F2
cmpq %rcx, %rdi
je 0x115a6e
movabsq $-0x58737885f0577326, %rcx # imm = 0xA78C877A0FA88CDA
jmp 0x115a69
movabsq $0x69849117d3eb7d61, %rcx # imm = 0x69849117D3EB7D61
cmpq %rcx, %rdi
jg 0x115a50
movabsq $0x585a3b17ca3de200, %rcx # imm = 0x585A3B17CA3DE200
cmpq %rcx, %rdi
je 0x115a6e
movabsq $0x62367a17d02b474d, %rcx # imm = 0x62367A17D02B474D
jmp 0x115a69
movabsq $-0x6119581ac7eacd63, %rcx # imm = 0x9EE6A7E53815329D
cmpq %rcx, %rdi
je 0x115a6e
movabsq $-0x5fc2af85f419929b, %rcx # imm = 0xA03D507A0BE66D65
jmp 0x115a69
movabsq $-0x388c46b188de83fe, %rcx # imm = 0xC773B94E77217C02
cmpq %rcx, %rdi
je 0x115a6e
movabsq $0x510c2417c67dabeb, %rcx # imm = 0x510C2417C67DABEB
jmp 0x115a69
movabsq $-0x4db4989f9014f113, %rcx # imm = 0xB24B67606FEB0EED
cmpq %rcx, %rdi
je 0x115a6e
movabsq $-0x4882601bdca6aefb, %rcx # imm = 0xB77D9FE423595105
jmp 0x115a69
movabsq $0x69849117d3eb7d62, %rcx # imm = 0x69849117D3EB7D62
cmpq %rcx, %rdi
je 0x115a6e
movabsq $0x6d07f9ef5b68e8a2, %rcx # imm = 0x6D07F9EF5B68E8A2
cmpq %rcx, %rdi
jne 0x115a6f
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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:
movl $0x1, %eax
movabsq $-0x5aa4411ac4e2880f, %rcx # imm = 0xA55BBEE53B1D77F1
cmpq %rcx, %rdi
jle 0x115b0e
movabsq $-0x388c46b188de83ff, %rcx # imm = 0xC773B94E77217C01
cmpq %rcx, %rdi
jg 0x115b38
movabsq $-0x5aa4411ac4e2880e, %rcx # imm = 0xA55BBEE53B1D77F2
cmpq %rcx, %rdi
je 0x115b56
movabsq $-0x4882601bdca6aefb, %rcx # imm = 0xB77D9FE423595105
jmp 0x115b51
movabsq $-0x73f6ae1ad309fd45, %rcx # imm = 0x8C0951E52CF602BB
cmpq %rcx, %rdi
je 0x115b56
movabsq $-0x6bce971ace902370, %rcx # imm = 0x943168E5316FDC90
cmpq %rcx, %rdi
je 0x115b56
movabsq $-0x6119581ac7eacd63, %rcx # imm = 0x9EE6A7E53815329D
jmp 0x115b51
movabsq $-0x388c46b188de83fe, %rcx # imm = 0xC773B94E77217C02
cmpq %rcx, %rdi
je 0x115b56
movabsq $0x6d07f9ef5b68e8a2, %rcx # imm = 0x6D07F9EF5B68E8A2
cmpq %rcx, %rdi
jne 0x115b57
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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:
cmpq $0x0, (%rdi)
je 0x115be7
xorl %ecx, %ecx
xorl %edx, %edx
xorl %eax, %eax
movq 0x10(%rdi), %rsi
movq (%rsi,%rcx), %rsi
cmpq $0x1, %rsi
sbbq $-0x1, %rax
incq %rdx
addq $0x10, %rcx
cmpq (%rdi), %rdx
jb 0x115bca
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x115ca1
movq 0x10(%rdi), %r9
movq (%r9,%r8), %r8
testq %r8, %r8
je 0x115c8d
leaq 0x1(%rcx), %r8
movq 0x10(%rdi), %r10
movq %r8, %r9
shlq $0x4, %r9
movq (%r10,%r9), %r10
cmpq %rsi, %r10
je 0x115ca1
movq 0x10(%rdi), %r10
movq (%r10,%r9), %r9
testq %r9, %r9
je 0x115c90
leaq 0x2(%rcx), %r8
movq 0x10(%rdi), %r10
movq %r8, %r9
shlq $0x4, %r9
movq (%r10,%r9), %r10
cmpq %rsi, %r10
je 0x115ca1
movq 0x10(%rdi), %r10
movq (%r10,%r9), %r9
testq %r9, %r9
je 0x115c90
addq $0x3, %rcx
movq 0x10(%rdi), %r9
movq %rcx, %r8
shlq $0x4, %r8
movq (%r9,%r8), %r9
cmpq %rsi, %r9
je 0x115ca1
movq 0x10(%rdi), %r9
movq (%r9,%r8), %r9
movq %rcx, %r8
testq %r9, %r9
je 0x115c90
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_O3/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 0x115d38
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 0xbe7b8
movq %rax, 0x10(%rbx)
movq %rax, %rdi
movq %r15, %rsi
callq 0xbe802
cmpq $0x0, (%r14)
je 0x115d2c
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x10(%r14), %rax
movq (%rax,%r15), %rax
testq %rax, %rax
je 0x115d20
movq 0x10(%r14), %rax
movq (%rax,%r15), %rsi
movq 0x10(%r14), %rax
movq 0x8(%rax,%r15), %rdx
movq %rbx, %rdi
callq 0x115bea
incq %r12
addq $0x10, %r15
cmpq (%r14), %r12
jb 0x115cfa
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq $0x4, (%rbx)
movq $0x0, 0x8(%rbx)
movl $0x40, %edi
callq 0xbe7b8
movq %rax, 0x10(%rbx)
movl $0x40, %esi
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xbe802
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
movq %rdi, %rbx
movl $0x218, %esi            # imm = 0x218
callq 0xbe802
leaq 0x1f0(%rbx), %r14
movq %r14, %rdi
callq 0x1140f0
movq %r14, %rdi
callq 0x1142c9
movl $0x10, %r15d
leaq (%rbx,%r15), %rdi
movl $0x18, %esi
callq 0xbe802
addq $0x18, %r15
cmpq $0x1f0, %r15            # imm = 0x1F0
jne 0x115d9c
movq $0x4, 0x10(%rbx)
movq $0x0, 0x18(%rbx)
movl $0x40, %edi
callq 0xbe7b8
movq %rax, 0x20(%rbx)
movl $0x40, %esi
movq %rax, %rdi
callq 0xbe802
movq %r14, %rdi
callq 0x1142fb
movb $0x0, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
movq %rdi, %r14
leaq 0x1f0(%rdi), %rbx
movq %rbx, %rdi
callq 0x1142c9
movl $0x20, %r15d
movq (%r14,%r15), %rdi
testq %rdi, %rdi
je 0x115e1f
callq 0xbe7e9
leaq (%r14,%r15), %rax
addq $-0x10, %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
addq $0x18, %r15
cmpq $0x200, %r15            # imm = 0x200
jne 0x115e11
xorl %eax, %eax
xchgl %eax, (%r14)
xorl %eax, %eax
xchgl %eax, 0x4(%r14)
movq $0x4, 0x10(%r14)
movq $0x0, 0x18(%r14)
movl $0x40, %edi
callq 0xbe7b8
movq %rax, 0x20(%r14)
movl $0x40, %esi
movq %rax, %rdi
callq 0xbe802
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1142fb
// File: /workspace/github_c_makefile_star2_O3/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 0x1142c9
movl $0x20, %r15d
movq (%r14,%r15), %rdi
testq %rdi, %rdi
je 0x115eb0
callq 0xbe7e9
leaq (%r14,%r15), %rax
addq $-0x10, %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
addq $0x18, %r15
cmpq $0x200, %r15            # imm = 0x200
jne 0x115ea2
movq %rbx, %rdi
callq 0x1142fb
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1141a2
// File: /workspace/github_c_makefile_star2_O3/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, (%rsp)
movq %rsi, %r15
movq %rdi, %r12
leaq 0x1f0(%rdi), %rbx
movq %rbx, %rdi
callq 0x1142c9
cmpb $0x0, 0x8(%r12)
je 0x115fdf
xorl %ebp, %ebp
jmp 0x116060
leaq 0x10(%r12), %r14
movl 0x4(%r12), %eax
cltq
leaq (%rax,%rax,2), %rax
leaq (%r14,%rax,8), %r13
movq %r13, %rdi
movq %r15, %rsi
movq (%rsp), %rdx
callq 0x115bea
movl %eax, %ebp
testb %al, %al
jne 0x116060
movl 0x4(%r12), %eax
cmpl $0x13, %eax
je 0x116060
lock
incl 0x4(%r12)
movl 0x4(%r12), %eax
cltq
leaq (%rax,%rax,2), %rax
leaq (%r14,%rax,8), %rdi
movq %r13, %rsi
callq 0x115ca2
movq %rbx, %rdi
callq 0x1142fb
movq %rbx, %rdi
callq 0x1142c9
movl 0x4(%r12), %eax
xchgl %eax, (%r12)
movq %rbx, %rdi
callq 0x1142fb
movq %rbx, %rdi
callq 0x1142c9
cmpb $0x1, 0x8(%r12)
jne 0x115fe4
movq %rbx, %rdi
callq 0x1142fb
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_O3/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 0x1142c9
movl 0x4(%rbx), %eax
cltq
leaq (%rax,%rax,2), %rax
movq 0x10(%rbx,%rax,8), %rbx
movq %r14, %rdi
callq 0x1142fb
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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, %r14
leaq 0x1f0(%rdi), %rbx
movq %rbx, %rdi
callq 0x1142c9
movl 0x4(%r14), %eax
cltq
leaq (%rax,%rax,2), %rax
cmpq $0x0, 0x10(%r14,%rax,8)
je 0x116105
leaq (%r14,%rax,8), %rax
addq $0x10, %rax
xorl %ecx, %ecx
xorl %edx, %edx
xorl %r14d, %r14d
movq 0x10(%rax), %rsi
movq (%rsi,%rcx), %rsi
cmpq $0x1, %rsi
sbbq $-0x1, %r14
incq %rdx
addq $0x10, %rcx
cmpq (%rax), %rdx
jb 0x1160e7
jmp 0x116108
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x1142fb
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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
movq 0x86b73(%rip), %rdi     # 0x19d320
addq $0x58, %rdi
callq 0x1142c9
movq %r15, %rdi
callq 0x116709
movq %rax, %r15
movq 0x8(%rax), %rax
movq 0x10(%r15), %rdx
cmpq 0x18(%r15), %rdx
jne 0x1167fb
movq %r15, %r8
addq $0x18, %r8
leaq (%rdx,%rdx), %rsi
testq %rdx, %rdx
movl $0x1, %ecx
cmovneq %rsi, %rcx
movl $0x10, %edi
movq %rax, %rsi
callq 0xbe7da
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)
movq 0x86b09(%rip), %rdi     # 0x19d320
addq $0x58, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1142fb
// File: /workspace/github_c_makefile_star2_O3/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
movq 0x86aea(%rip), %rdi     # 0x19d320
addq $0x58, %rdi
callq 0x1142c9
movq %r14, %rdi
callq 0x116709
movq %rax, %r14
movq 0x20(%rax), %rax
movq 0x28(%r14), %rdx
cmpq 0x30(%r14), %rdx
jne 0x116884
movq %r14, %r8
addq $0x30, %r8
leaq (%rdx,%rdx), %rsi
testq %rdx, %rdx
movl $0x1, %ecx
cmovneq %rsi, %rcx
movl $0x8, %edi
movq %rax, %rsi
callq 0xbe7da
movq %rax, 0x20(%r14)
movq 0x28(%r14), %rdx
leaq 0x1(%rdx), %rcx
movq %rcx, 0x28(%r14)
movq %rbx, (%rax,%rdx,8)
movq 0x86a89(%rip), %rdi     # 0x19d320
addq $0x58, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1142fb
// File: /workspace/github_c_makefile_star2_O3/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 %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x86a64(%rip), %rdi     # 0x19d320
addq $0x58, %rdi
callq 0x1142c9
movq %rbx, %rsi
movq 0x86a51(%rip), %rdi     # 0x19d320
cmpq %r14, %rsi
je 0x1168e8
callq 0xc9f2a
testq %rax, %rax
je 0x116940
movq (%rax), %rsi
testq %rsi, %rsi
jne 0x1168c8
jmp 0x116940
addq $0x58, %rdi
callq 0x1142fb
movq %r14, %rdi
callq 0xd6ec4
movq %rax, %r15
testq %rax, %rax
leaq 0x31e0f(%rip), %r12     # 0x148715
cmoveq %r12, %r15
movq %rbx, %rdi
callq 0xd6ec4
testq %rax, %rax
cmovneq %rax, %r12
leaq 0x375ed(%rip), %rdi     # 0x14df0d
leaq 0x375f6(%rip), %rsi     # 0x14df1d
leaq 0x375fd(%rip), %rcx     # 0x14df2b
movl $0x11b, %edx            # imm = 0x11B
movq %r15, %r8
movq %r12, %r9
xorl %eax, %eax
callq 0xbe592
movq 0x869d9(%rip), %rdi     # 0x19d320
movq %r14, %rsi
movq %rbx, %rdx
callq 0xca10b
movq 0x869c7(%rip), %rdi     # 0x19d320
addq $0x58, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1142fb
// File: /workspace/github_c_makefile_star2_O3/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
movq 0x869a8(%rip), %rdi     # 0x19d320
addq $0x58, %rdi
callq 0x1142c9
movq 0x86998(%rip), %rdi     # 0x19d320
movq %rbx, %rsi
callq 0xca2e3
movl %eax, %ebx
movq 0x86987(%rip), %rdi     # 0x19d320
addq $0x58, %rdi
callq 0x1142fb
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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
movq 0x8696f(%rip), %rdi     # 0x19d320
addq $0x58, %rdi
callq 0x1142c9
movq 0x8695f(%rip), %rdi     # 0x19d320
movq %rbx, %rsi
callq 0xc9f2a
movq %rax, %rbx
movq 0x8694d(%rip), %rdi     # 0x19d320
addq $0x58, %rdi
callq 0x1142fb
testq %rbx, %rbx
je 0x1169e6
movq (%rbx), %rax
jmp 0x1169e8
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
movq 0x86924(%rip), %rdi     # 0x19d320
addq $0x58, %rdi
callq 0x1142c9
movq %r15, %r14
cmpq %rbx, %r15
je 0x116a29
movq 0x8690c(%rip), %rdi     # 0x19d320
movq %r14, %rsi
callq 0xc9f2a
testq %rax, %rax
je 0x116a29
movq (%rax), %r15
testq %r15, %r15
jne 0x116a05
cmpq %rbx, %r14
sete %bl
movq 0x868ea(%rip), %rdi     # 0x19d320
addq $0x58, %rdi
callq 0x1142fb
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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
movq 0x868c4(%rip), %rdi     # 0x19d320
addq $0x58, %rdi
callq 0x1142c9
movq %rbx, %rdi
callq 0xb8fab
movq 0x868ac(%rip), %rdi     # 0x19d320
cmpq $0x0, 0x18(%rdi)
je 0x116ac8
xorl %r15d, %r15d
movq %r15, %rsi
callq 0xca352
movq %rax, %r12
testq %rax, %rax
sete %al
cmpq %r14, %r12
sete %cl
orb %al, %cl
jne 0x116ab8
movq 0x86880(%rip), %rdi     # 0x19d320
movq %r15, %rsi
callq 0xca35f
cmpq %r14, %rax
jne 0x116ab8
movq %rbx, %rdi
movq %r12, %rsi
callq 0xb90d3
incq %r15
movq 0x8685e(%rip), %rdi     # 0x19d320
cmpq 0x18(%rdi), %r15
jb 0x116a7e
addq $0x58, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1142fb
// File: /workspace/github_c_makefile_star2_O3/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
movq 0x8682f(%rip), %rdi     # 0x19d320
addq $0x58, %rdi
callq 0x1142c9
movq 0x8681f(%rip), %rdi     # 0x19d320
cmpq $0x0, 0x18(%rdi)
je 0x116b64
xorl %r15d, %r15d
movq %r15, %rsi
callq 0xca352
movq %rax, %r12
testq %rax, %rax
sete %al
cmpq %r14, %r12
sete %cl
orb %al, %cl
jne 0x116b54
movq %r12, %rsi
cmpq %r14, %rsi
je 0x116b49
movq 0x867eb(%rip), %rdi     # 0x19d320
callq 0xc9f2a
testq %rax, %rax
je 0x116b54
movq (%rax), %rsi
testq %rsi, %rsi
jne 0x116b29
jmp 0x116b54
movq %rbx, %rdi
movq %r12, %rsi
callq 0xb90d3
incq %r15
movq 0x867c2(%rip), %rdi     # 0x19d320
cmpq 0x18(%rdi), %r15
jb 0x116b0b
addq $0x58, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1142fb
// File: /workspace/github_c_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
xorl %eax, %eax
callq 0xb8f17
movq %rax, %r14
movq %r15, %rdi
movq %rax, %rsi
callq 0x116a47
cmpq $0x0, 0x10(%r14)
je 0x116c05
leaq 0x31b47(%rip), %r12     # 0x148715
leaq 0x37493(%rip), %r15     # 0x14e068
xorl %r13d, %r13d
movq 0x8(%r14), %rax
movq (%rax,%r13,8), %rdi
callq 0xd6ec4
testq %rax, %rax
cmoveq %r12, %rax
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0xfe6d6
incq %r13
cmpq 0x10(%r14), %r13
jb 0x116bd8
movq %r14, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xb8f46
// File: /workspace/github_c_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
xorl %eax, %eax
callq 0xb8f17
movq %rax, %r14
movq %rax, %rdi
callq 0xb8fab
movq %r15, %rdi
movq %r14, %rsi
callq 0x116adc
cmpq $0x0, 0x10(%r14)
je 0x116c87
leaq 0x31ac5(%rip), %r12     # 0x148715
leaq 0x37411(%rip), %r15     # 0x14e068
xorl %r13d, %r13d
movq 0x8(%r14), %rax
movq (%rax,%r13,8), %rdi
callq 0xd6ec4
testq %rax, %rax
cmoveq %r12, %rax
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0xfe6d6
incq %r13
cmpq 0x10(%r14), %r13
jb 0x116c5a
movq %r14, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xb8f46
// File: /workspace/github_c_makefile_star2_O3/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 0x116f4e
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 0xc43ac
testq %rax, %rax
je 0x116f7c
movq %r15, %rdi
movq %rax, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x116ef3
testq %rbx, %rbx
je 0x116fac
movq %r14, %rdi
callq 0xd6ec4
testq %rax, %rax
leaq 0x31782(%rip), %rdx     # 0x148715
cmovneq %rax, %rdx
leaq 0x37053(%rip), %rsi     # 0x14dff1
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %eax, %eax
callq 0x10a7d0
jmp 0x116f41
xorl %ebp, %ebp
jmp 0x116f41