LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 0x11f1be
leaq 0x392e7(%rip), %rdi     # 0x158488
leaq 0x38aed(%rip), %rsi     # 0x157c95
leaq 0x392f3(%rip), %rcx     # 0x1584a2
movl $0x47a, %edx            # imm = 0x47A
movq %r15, %r8
xorl %eax, %eax
callq 0xc80f6
testq %r12, %r12
je 0x11f1c7
movq %r15, (%r12)
movq %r14, %rdi
callq 0x11edc1
movq %rax, %r12
movl $0x18, %esi
movq %rax, %rdi
callq 0xc8366
movq %r15, (%r12)
movq 0x78(%r14), %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x130a83
cmpl $0x1, %eax
je 0x11f218
leaq 0x3928a(%rip), %rdi     # 0x158488
leaq 0x38a90(%rip), %rsi     # 0x157c95
leaq 0x392b3(%rip), %rcx     # 0x1584bf
movl $0x47e, %edx            # imm = 0x47E
xorl %eax, %eax
callq 0xc80f6
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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
cmpq $0x0, 0x18(%rdi)
jle 0x11f2ea
movq %rdx, %r15
xorl %r13d, %r13d
leaq 0x389f8(%rip), %r12     # 0x157c95
xorl %ebp, %ebp
movq 0x8(%r14), %rax
cmpq %rbx, (%rax,%rbp,8)
jne 0x11f2db
movq 0x10(%r14), %rax
movb $0x1, %r13b
cmpq %r15, (%rax,%rbp,8)
je 0x11f2db
leaq 0x1938a(%rip), %rdi     # 0x138647
leaq 0x39553(%rip), %rsi     # 0x158817
leaq 0x39565(%rip), %rdx     # 0x158830
movq %r12, %rcx
movl $0xc69, %r8d            # imm = 0xC69
xorl %eax, %eax
callq 0xc8053
incq %rbp
cmpq 0x18(%r14), %rbp
jl 0x11f29f
testb $0x1, %r13b
jne 0x11f313
leaq 0x19356(%rip), %rdi     # 0x138647
leaq 0x32a27(%rip), %rsi     # 0x151d1f
leaq 0x39531(%rip), %rdx     # 0x158830
leaq 0x3898f(%rip), %rcx     # 0x157c95
movl $0xc6c, %r8d            # imm = 0xC6C
xorl %eax, %eax
callq 0xc8053
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 0x11baba
// File: /workspace/github_c_makefile_star2_O1/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 0xc8366
movq %rbx, %rdi
xorl %esi, %esi
callq 0xd1c0
movl %eax, %ebx
cmpl $0xa, %eax
jg 0x11f380
testl %ebx, %ebx
je 0x11f3a6
cmpl $0x1, %ebx
jne 0x11f3c9
leaq 0x39689(%rip), %rdi     # 0x1589f4
leaq 0x39695(%rip), %rsi     # 0x158a07
leaq 0x396c3(%rip), %rcx     # 0x158a3c
movl $0x23, %edx
jmp 0x11f3c2
cmpl $0xc, %ebx
je 0x11f3a8
cmpl $0xb, %ebx
jne 0x11f3c9
leaq 0x39663(%rip), %rdi     # 0x1589f4
leaq 0x3966f(%rip), %rsi     # 0x158a07
leaq 0x39678(%rip), %rcx     # 0x158a17
movl $0x21, %edx
jmp 0x11f3c2
popq %rbx
retq
leaq 0x39645(%rip), %rdi     # 0x1589f4
leaq 0x39651(%rip), %rsi     # 0x158a07
leaq 0x3966e(%rip), %rcx     # 0x158a2b
movl $0x22, %edx
xorl %eax, %eax
callq 0xc80f6
leaq 0x39624(%rip), %rdi     # 0x1589f4
leaq 0x39630(%rip), %rsi     # 0x158a07
leaq 0x39672(%rip), %rcx     # 0x158a50
movl $0x24, %edx
movl %ebx, %r8d
xorl %eax, %eax
popq %rbx
jmp 0xc80f6
// File: /workspace/github_c_makefile_star2_O1/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 0xd430
testl %eax, %eax
je 0x11f466
movl %eax, %ebx
cmpl $0x16, %eax
je 0x11f420
cmpl $0x10, %ebx
jne 0x11f441
leaq 0x39660(%rip), %rdi     # 0x158a6b
leaq 0x395f5(%rip), %rsi     # 0x158a07
leaq 0x39665(%rip), %rcx     # 0x158a7e
movl $0x2a, %edx
jmp 0x11f43a
leaq 0x39644(%rip), %rdi     # 0x158a6b
leaq 0x395d9(%rip), %rsi     # 0x158a07
leaq 0x3965a(%rip), %rcx     # 0x158a8f
movl $0x2b, %edx
xorl %eax, %eax
callq 0xc80f6
leaq 0x39623(%rip), %rdi     # 0x158a6b
leaq 0x395b8(%rip), %rsi     # 0x158a07
leaq 0x395fa(%rip), %rcx     # 0x158a50
movl $0x2c, %edx
movl %ebx, %r8d
xorl %eax, %eax
popq %rbx
jmp 0xc80f6
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x11fb53
movq %rdi, %rbx
movq (%rdi), %rdi
movq %rsp, %rsi
callq 0xd040
movl %eax, %ebp
cmpl $0x15, %eax
jg 0x11fae4
testl %ebp, %ebp
je 0x11fb4f
cmpl $0x3, %ebp
jne 0x11fb2b
leaq 0x39098(%rip), %rdi     # 0x158b67
leaq 0x38f31(%rip), %rsi     # 0x158a07
leaq 0x390b1(%rip), %rcx     # 0x158b8e
movl $0x16d, %edx            # imm = 0x16D
jmp 0x11fb24
cmpl $0x23, %ebp
je 0x11fb0a
cmpl $0x16, %ebp
jne 0x11fb2b
leaq 0x39072(%rip), %rdi     # 0x158b67
leaq 0x38f0b(%rip), %rsi     # 0x158a07
leaq 0x39078(%rip), %rcx     # 0x158b7b
movl $0x16c, %edx            # imm = 0x16C
jmp 0x11fb24
leaq 0x39056(%rip), %rdi     # 0x158b67
leaq 0x38eef(%rip), %rsi     # 0x158a07
leaq 0x39081(%rip), %rcx     # 0x158ba0
movl $0x16e, %edx            # imm = 0x16E
xorl %eax, %eax
callq 0xc80f6
leaq 0x39035(%rip), %rdi     # 0x158b67
leaq 0x38ece(%rip), %rsi     # 0x158a07
leaq 0x38f10(%rip), %rcx     # 0x158a50
movl $0x16f, %edx            # imm = 0x16F
movl %ebp, %r8d
xorl %eax, %eax
callq 0xc80f6
movb $0x0, 0x8(%rbx)
movq (%rsp), %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x11fa91
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0xd1f0
testl %eax, %eax
je 0x11fc60
leaq 0x38f10(%rip), %rdi     # 0x158b53
leaq 0x38dbd(%rip), %rsi     # 0x158a07
leaq 0x38dff(%rip), %rcx     # 0x158a50
movl $0x15a, %edx            # imm = 0x15A
movl %eax, %r8d
xorl %eax, %eax
callq 0xc80f6
movb $0x1, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xc8315
movq %rax, %r12
movl $0x10, %esi
movq %rax, %rdi
callq 0xc8366
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x11fc15
movabsq $-0x6b951732b6f4fa73, %rdi # imm = 0x946AE8CD490B058D
callq 0x1123e1
movq %r12, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movq $0x2, 0x30(%rsp)
movq (%rbx), %r14
leaq 0x88c2d(%rip), %rax     # 0x1a8e20
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 0x120249
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r14, %rdx
je 0x120249
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r14, %rdx
je 0x120249
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r14, %rdx
jne 0x1202aa
movq (%rax,%rcx), %r15
testq %r15, %r15
jne 0x120279
movabsq $-0x5073d588c3beb52e, %rdi # imm = 0xAF8C2A773C414AD2
movq %r14, %rsi
callq 0xf3f85
movq %rax, %r15
leaq 0x88bb2(%rip), %rdi     # 0x1a8e20
movq %r14, %rsi
movq %rax, %rdx
callq 0x12128c
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r15, %rdi
movq %rbx, %rsi
callq 0xf7857
movq 0x10(%rbx), %rax
decq %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %r15d, %r15d
jmp 0x12024d
// File: /workspace/github_c_makefile_star2_O1/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 0x12037c
movq %rdi, %rbx
movq 0x8(%rdi), %rcx
shlq $0x4, %rax
leaq (%rcx,%rax), %rdi
addq $-0x10, %rdi
callq 0x11fa91
movq %rax, %r14
movq (%rbx), %r15
leaq 0x88b37(%rip), %rax     # 0x1a8e20
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 0x12033f
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r15, %rdx
je 0x12033f
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r15, %rdx
je 0x12033f
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r15, %rdx
jne 0x12038e
movq (%rax,%rcx), %r12
testq %r12, %r12
jne 0x12036f
movabsq $-0x5073d588c3beb52e, %rdi # imm = 0xAF8C2A773C414AD2
movq %r15, %rsi
callq 0xf3f85
movq %rax, %r12
leaq 0x88abc(%rip), %rdi     # 0x1a8e20
movq %r15, %rsi
movq %rax, %rdx
callq 0x12128c
movq %r12, %rdi
movq %rbx, %rsi
callq 0xf7f5c
jmp 0x12037f
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %r12d, %r12d
jmp 0x120343
// File: /workspace/github_c_makefile_star2_O1/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
xorps %xmm0, %xmm0
movq %rsp, %rcx
movaps %xmm0, (%rcx)
movq %rdi, %rax
shrq $0x9, %rax
movabsq $0x44b82fa09b5a53, %rdx # imm = 0x44B82FA09B5A53
mulq %rdx
shrq $0xb, %rdx
movq %rdx, (%rcx)
imulq $0x3b9aca00, %rdx, %rax # imm = 0x3B9ACA00
subq %rax, %rdi
movq %rdi, 0x8(%rcx)
movq %rcx, %rdi
xorl %esi, %esi
callq 0xd350
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x3828e(%rip), %rdi     # 0x158c11
movl $0x28, %esi
movl $0x8, %edx
callq 0xce5c6
movq %rax, %rbx
leaq -0x1660(%rip), %rsi     # 0x11f33c
leaq 0x2d052(%rip), %rdx     # 0x14d9f5
leaq 0x2d054(%rip), %rcx     # 0x14d9fe
movq %rax, %rdi
callq 0xcd5ad
leaq -0x15cb(%rip), %rsi     # 0x11f3ee
leaq 0x2d043(%rip), %rdx     # 0x14da03
leaq 0x21803(%rip), %rcx     # 0x1421ca
movq %rbx, %rdi
callq 0xcd5ad
leaq -0x156e(%rip), %rsi     # 0x11f468
leaq 0x2d034(%rip), %rdx     # 0x14da11
leaq 0x28aff(%rip), %rcx     # 0x1494e3
movq %rbx, %rdi
callq 0xcd5ad
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x38230(%rip), %rdi     # 0x158c29
movl $0x10, %esi
movl $0x8, %edx
callq 0xce5c6
movq %rax, %rbx
leaq -0x13b7(%rip), %rsi     # 0x11f65b
leaq 0x2cfdc(%rip), %rdx     # 0x14d9f5
leaq 0x2cfde(%rip), %rcx     # 0x14d9fe
movq %rax, %rdi
callq 0xcd5ad
leaq -0x13b7(%rip), %rsi     # 0x11f678
leaq 0x2cfcd(%rip), %rdx     # 0x14da03
leaq 0x2178d(%rip), %rcx     # 0x1421ca
movq %rbx, %rdi
callq 0xcd5ad
leaq -0x139c(%rip), %rsi     # 0x11f6b0
leaq 0x2cfbe(%rip), %rdx     # 0x14da11
leaq 0x28a89(%rip), %rcx     # 0x1494e3
movq %rbx, %rdi
callq 0xcd5ad
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x381f6(%rip), %rdi     # 0x158c65
movl $0x10, %esi
movl $0x8, %edx
callq 0xce5c6
movq %rax, %rbx
leaq -0x1307(%rip), %rsi     # 0x11f781
leaq 0x2cf66(%rip), %rdx     # 0x14d9f5
leaq 0x2cf68(%rip), %rcx     # 0x14d9fe
movq %rax, %rdi
callq 0xcd5ad
leaq -0x1307(%rip), %rsi     # 0x11f79e
leaq 0x2cf57(%rip), %rdx     # 0x14da03
leaq 0x21717(%rip), %rcx     # 0x1421ca
movq %rbx, %rdi
callq 0xcd5ad
leaq -0x12ec(%rip), %rsi     # 0x11f7d6
leaq 0x2cf48(%rip), %rdx     # 0x14da11
leaq 0x28a13(%rip), %rcx     # 0x1494e3
movq %rbx, %rdi
callq 0xcd5ad
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x381be(%rip), %rdi     # 0x158ca3
movl $0x30, %esi
movl $0x8, %edx
callq 0xce5c6
movq %rax, %rbx
leaq -0x1225(%rip), %rsi     # 0x11f8d9
leaq 0x2cef0(%rip), %rdx     # 0x14d9f5
leaq 0x2cef2(%rip), %rcx     # 0x14d9fe
movq %rax, %rdi
callq 0xcd5ad
leaq -0x120e(%rip), %rsi     # 0x11f90d
leaq 0x2cee1(%rip), %rdx     # 0x14da03
leaq 0x216a1(%rip), %rcx     # 0x1421ca
movq %rbx, %rdi
callq 0xcd5ad
leaq -0x11f9(%rip), %rsi     # 0x11f93f
leaq 0x2ced2(%rip), %rdx     # 0x14da11
leaq 0x2899d(%rip), %rcx     # 0x1494e3
movq %rbx, %rdi
callq 0xcd5ad
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x38164(%rip), %rdi     # 0x158cbf
movl $0x10, %esi
movl $0x8, %edx
callq 0xce5c6
movq %rax, %rbx
leaq -0x10f2(%rip), %rsi     # 0x11fa82
leaq 0x2ce7a(%rip), %rdx     # 0x14d9f5
leaq 0x2ce7c(%rip), %rcx     # 0x14d9fe
movq %rax, %rdi
callq 0xcd5ad
leaq -0x1105(%rip), %rsi     # 0x11fa8c
leaq 0x2ce6b(%rip), %rdx     # 0x14da03
leaq 0x2162b(%rip), %rcx     # 0x1421ca
movq %rbx, %rdi
callq 0xcd5ad
leaq -0x1050(%rip), %rsi     # 0x11fb5e
leaq 0x2ce5c(%rip), %rdx     # 0x14da11
leaq 0x28927(%rip), %rcx     # 0x1494e3
movq %rbx, %rdi
callq 0xcd5ad
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x120c38
movabsq $-0x5aa4411ac4e2880f, %rcx # imm = 0xA55BBEE53B1D77F1
cmpq %rcx, %rdi
jg 0x120c7c
movabsq $-0x6119581ac7eacd64, %rcx # imm = 0x9EE6A7E53815329C
cmpq %rcx, %rdi
jg 0x120cdb
movabsq $-0x73f6ae1ad309fd45, %rcx # imm = 0x8C0951E52CF602BB
cmpq %rcx, %rdi
je 0x120d4a
movabsq $-0x6bce971ace902370, %rcx # imm = 0x943168E5316FDC90
jmp 0x120d45
movabsq $0x585a3b17ca3de1ff, %rcx # imm = 0x585A3B17CA3DE1FF
cmpq %rcx, %rdi
jg 0x120cb1
movabsq $-0x388c46b188de83ff, %rcx # imm = 0xC773B94E77217C01
cmpq %rcx, %rdi
jg 0x120cf6
movabsq $-0x3f1363e6d8155aed, %rcx # imm = 0xC0EC9C1927EAA513
cmpq %rcx, %rdi
je 0x120d4a
movabsq $-0x3ac242643d9c35a8, %rcx # imm = 0xC53DBD9BC263CA58
jmp 0x120d45
movabsq $-0x4db4989f9014f114, %rcx # imm = 0xB24B67606FEB0EEC
cmpq %rcx, %rdi
jg 0x120d11
movabsq $-0x5aa4411ac4e2880e, %rcx # imm = 0xA55BBEE53B1D77F2
cmpq %rcx, %rdi
je 0x120d4a
movabsq $-0x58737885f0577326, %rcx # imm = 0xA78C877A0FA88CDA
jmp 0x120d45
movabsq $0x69849117d3eb7d61, %rcx # imm = 0x69849117D3EB7D61
cmpq %rcx, %rdi
jg 0x120d2c
movabsq $0x585a3b17ca3de200, %rcx # imm = 0x585A3B17CA3DE200
cmpq %rcx, %rdi
je 0x120d4a
movabsq $0x62367a17d02b474d, %rcx # imm = 0x62367A17D02B474D
jmp 0x120d45
movabsq $-0x6119581ac7eacd63, %rcx # imm = 0x9EE6A7E53815329D
cmpq %rcx, %rdi
je 0x120d4a
movabsq $-0x5fc2af85f419929b, %rcx # imm = 0xA03D507A0BE66D65
jmp 0x120d45
movabsq $-0x388c46b188de83fe, %rcx # imm = 0xC773B94E77217C02
cmpq %rcx, %rdi
je 0x120d4a
movabsq $0x510c2417c67dabeb, %rcx # imm = 0x510C2417C67DABEB
jmp 0x120d45
movabsq $-0x4db4989f9014f113, %rcx # imm = 0xB24B67606FEB0EED
cmpq %rcx, %rdi
je 0x120d4a
movabsq $-0x4882601bdca6aefb, %rcx # imm = 0xB77D9FE423595105
jmp 0x120d45
movabsq $0x69849117d3eb7d62, %rcx # imm = 0x69849117D3EB7D62
cmpq %rcx, %rdi
je 0x120d4a
movabsq $0x6d07f9ef5b68e8a2, %rcx # imm = 0x6D07F9EF5B68E8A2
cmpq %rcx, %rdi
jne 0x120d4b
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x120dea
movabsq $-0x388c46b188de83ff, %rcx # imm = 0xC773B94E77217C01
cmpq %rcx, %rdi
jg 0x120e14
movabsq $-0x5aa4411ac4e2880e, %rcx # imm = 0xA55BBEE53B1D77F2
cmpq %rcx, %rdi
je 0x120e32
movabsq $-0x4882601bdca6aefb, %rcx # imm = 0xB77D9FE423595105
jmp 0x120e2d
movabsq $-0x73f6ae1ad309fd45, %rcx # imm = 0x8C0951E52CF602BB
cmpq %rcx, %rdi
je 0x120e32
movabsq $-0x6bce971ace902370, %rcx # imm = 0x943168E5316FDC90
cmpq %rcx, %rdi
je 0x120e32
movabsq $-0x6119581ac7eacd63, %rcx # imm = 0x9EE6A7E53815329D
jmp 0x120e2d
movabsq $-0x388c46b188de83fe, %rcx # imm = 0xC773B94E77217C02
cmpq %rcx, %rdi
je 0x120e32
movabsq $0x6d07f9ef5b68e8a2, %rcx # imm = 0x6D07F9EF5B68E8A2
cmpq %rcx, %rdi
jne 0x120e33
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x120ec3
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 0x120ea6
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x120f81
movq 0x10(%rdi), %r9
movq (%r9,%r8), %r8
testq %r8, %r8
je 0x120f69
leaq 0x1(%rcx), %r8
movq 0x10(%rdi), %r10
movq %r8, %r9
shlq $0x4, %r9
movq (%r10,%r9), %r10
cmpq %rsi, %r10
je 0x120f81
movq 0x10(%rdi), %r10
movq (%r10,%r9), %r9
testq %r9, %r9
je 0x120f6c
leaq 0x2(%rcx), %r8
movq 0x10(%rdi), %r10
movq %r8, %r9
shlq $0x4, %r9
movq (%r10,%r9), %r10
cmpq %rsi, %r10
je 0x120f81
movq 0x10(%rdi), %r10
movq (%r10,%r9), %r9
testq %r9, %r9
je 0x120f6c
addq $0x3, %rcx
movq 0x10(%rdi), %r9
movq %rcx, %r8
shlq $0x4, %r8
movq (%r9,%r8), %r9
cmpq %rsi, %r9
je 0x120f81
movq 0x10(%rdi), %r9
movq (%r9,%r8), %r9
movq %rcx, %r8
testq %r9, %r9
je 0x120f6c
xorl %eax, %eax
retq
movq %rcx, %r8
movq 0x10(%rdi), %rcx
shlq $0x4, %r8
xchgq %rsi, (%rcx,%r8)
movq 0x10(%rdi), %rcx
xchgq %rdx, 0x8(%rcx,%r8)
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x121018
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 0xc831c
movq %rax, 0x10(%rbx)
movq %rax, %rdi
movq %r15, %rsi
callq 0xc8366
cmpq $0x0, (%r14)
je 0x12100c
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x10(%r14), %rax
movq (%rax,%r15), %rax
testq %rax, %rax
je 0x121000
movq 0x10(%r14), %rax
movq (%rax,%r15), %rsi
movq 0x10(%r14), %rax
movq 0x8(%rax,%r15), %rdx
movq %rbx, %rdi
callq 0x120ec6
incq %r12
addq $0x10, %r15
cmpq (%r14), %r12
jb 0x120fda
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq $0x4, (%rbx)
movq $0x0, 0x8(%rbx)
movl $0x40, %edi
callq 0xc831c
movq %rax, 0x10(%rbx)
movl $0x40, %esi
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xc8366
// File: /workspace/github_c_makefile_star2_O1/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 0xc8366
leaq 0x1f0(%rbx), %r14
movq %r14, %rdi
callq 0x11f33c
movq %r14, %rdi
callq 0x11f515
movl $0x10, %r15d
leaq (%rbx,%r15), %rdi
movl $0x18, %esi
callq 0xc8366
addq $0x18, %r15
cmpq $0x1f0, %r15            # imm = 0x1F0
jne 0x12107c
movq $0x4, 0x10(%rbx)
movq $0x0, 0x18(%rbx)
movl $0x40, %edi
callq 0xc831c
movq %rax, 0x20(%rbx)
movl $0x40, %esi
movq %rax, %rdi
callq 0xc8366
movq %r14, %rdi
callq 0x11f547
movb $0x0, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x11f515
movl $0x20, %r15d
movq (%r14,%r15), %rdi
testq %rdi, %rdi
je 0x1210ff
callq 0xc834d
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 0x1210f1
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 0xc831c
movq %rax, 0x20(%r14)
movl $0x40, %esi
movq %rax, %rdi
callq 0xc8366
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x11f547
// File: /workspace/github_c_makefile_star2_O1/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 0x11f515
movl $0x20, %r15d
movq (%r14,%r15), %rdi
testq %rdi, %rdi
je 0x121190
callq 0xc834d
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 0x121182
movq %rbx, %rdi
callq 0x11f547
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x11f3ee
// File: /workspace/github_c_makefile_star2_O1/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 0x11f515
cmpb $0x1, 0x8(%r12)
je 0x121334
movl 0x4(%r12), %eax
cltq
leaq (%rax,%rax,2), %rax
leaq (%r12,%rax,8), %r13
addq $0x10, %r13
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x120ec6
testb %al, %al
jne 0x121340
movl 0x4(%r12), %eax
cmpl $0x13, %eax
je 0x121334
lock
incl 0x4(%r12)
movl 0x4(%r12), %eax
cltq
leaq (%rax,%rax,2), %rax
leaq (,%rax,8), %rdi
addq %rbp, %rdi
movq %r13, %rsi
callq 0x120f82
movq %rbx, %rdi
callq 0x11f547
movq %rbx, %rdi
callq 0x11f515
movl 0x4(%r12), %eax
xchgl %eax, (%r12)
movq %rbx, %rdi
callq 0x11f547
jmp 0x1212ab
movq %rbx, %rdi
callq 0x11f547
xorl %eax, %eax
jmp 0x12134a
movq %rbx, %rdi
callq 0x11f547
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x11f515
movl 0x4(%rbx), %eax
cltq
leaq (%rax,%rax,2), %rax
movq 0x10(%rbx,%rax,8), %rbx
movq %r14, %rdi
callq 0x11f547
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x11f515
movl 0x4(%r14), %eax
cltq
leaq (%rax,%rax,2), %rax
cmpq $0x0, 0x10(%r14,%rax,8)
je 0x1213e5
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 0x1213c7
jmp 0x1213e8
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x11f547
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x888af(%rip), %rdi     # 0x1aa320
addq $0x58, %rdi
callq 0x11f515
movq %r15, %rdi
callq 0x1219cd
movq %rax, %r15
movq 0x18(%rax), %rdx
cmpq %rdx, 0x10(%rax)
jne 0x121ab8
movq %r15, %r8
addq $0x18, %r8
movq 0x8(%r15), %rsi
leaq (%rdx,%rdx), %rax
testq %rdx, %rdx
movl $0x1, %ecx
cmovneq %rax, %rcx
movl $0x10, %edi
callq 0xc833e
movq %rax, 0x8(%r15)
movq 0x8(%r15), %rax
movq 0x10(%r15), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%r15)
shlq $0x4, %rcx
movq %r14, (%rax,%rcx)
movq %rbx, 0x8(%rax,%rcx)
movq 0x88844(%rip), %rdi     # 0x1aa320
addq $0x58, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x11f547
// File: /workspace/github_c_makefile_star2_O1/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 0x88825(%rip), %rdi     # 0x1aa320
addq $0x58, %rdi
callq 0x11f515
movq %r14, %rdi
callq 0x1219cd
movq %rax, %r14
movq 0x30(%rax), %rdx
cmpq %rdx, 0x28(%rax)
jne 0x121b42
movq %r14, %r8
addq $0x30, %r8
movq 0x20(%r14), %rsi
leaq (%rdx,%rdx), %rax
testq %rdx, %rdx
movl $0x1, %ecx
cmovneq %rax, %rcx
movl $0x8, %edi
callq 0xc833e
movq %rax, 0x20(%r14)
movq 0x20(%r14), %rax
movq 0x28(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x28(%r14)
movq %rbx, (%rax,%rcx,8)
movq 0x887c3(%rip), %rdi     # 0x1aa320
addq $0x58, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x11f547
// File: /workspace/github_c_makefile_star2_O1/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 0x8879e(%rip), %rdi     # 0x1aa320
addq $0x58, %rdi
callq 0x11f515
movq %rbx, %rax
cmpq %r14, %rax
je 0x121bc7
movq %rax, %r15
movq 0x88783(%rip), %rdi     # 0x1aa320
movq %rax, %rsi
callq 0xd3f11
testq %rax, %rax
je 0x121bb9
movq (%rax), %rax
testq %rax, %rax
setne %cl
cmoveq %r15, %rax
jmp 0x121bbe
xorl %ecx, %ecx
movq %r15, %rax
testb %cl, %cl
jne 0x121b8e
cmpq %r14, %r15
jne 0x121c26
movq 0x88752(%rip), %rdi     # 0x1aa320
addq $0x58, %rdi
callq 0x11f547
movq %r14, %rdi
callq 0xe0cbc
movq %rax, %r15
testq %rax, %rax
leaq 0x31b03(%rip), %r12     # 0x1536ef
cmoveq %r12, %r15
movq %rbx, %rdi
callq 0xe0cbc
testq %rax, %rax
cmovneq %rax, %r12
leaq 0x372a7(%rip), %rdi     # 0x158ead
leaq 0x372b0(%rip), %rsi     # 0x158ebd
leaq 0x372b7(%rip), %rcx     # 0x158ecb
movl $0x11b, %edx            # imm = 0x11B
movq %r15, %r8
movq %r12, %r9
xorl %eax, %eax
callq 0xc80f6
movq 0x886f3(%rip), %rdi     # 0x1aa320
movq %r14, %rsi
movq %rbx, %rdx
callq 0xd409a
movq 0x886e1(%rip), %rdi     # 0x1aa320
addq $0x58, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x11f547
// File: /workspace/github_c_makefile_star2_O1/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 0x886c2(%rip), %rdi     # 0x1aa320
addq $0x58, %rdi
callq 0x11f515
movq 0x886b2(%rip), %rdi     # 0x1aa320
movq %rbx, %rsi
callq 0xd4200
movl %eax, %ebx
movq 0x886a1(%rip), %rdi     # 0x1aa320
addq $0x58, %rdi
callq 0x11f547
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x88689(%rip), %rdi     # 0x1aa320
addq $0x58, %rdi
callq 0x11f515
movq 0x88679(%rip), %rdi     # 0x1aa320
movq %rbx, %rsi
callq 0xd3f11
movq %rax, %rbx
movq 0x88667(%rip), %rdi     # 0x1aa320
addq $0x58, %rdi
callq 0x11f547
testq %rbx, %rbx
je 0x121ccc
movq (%rbx), %rax
jmp 0x121cce
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x8863e(%rip), %rdi     # 0x1aa320
addq $0x58, %rdi
callq 0x11f515
movq %r15, %r14
cmpq %rbx, %r15
je 0x121d1f
movq 0x88626(%rip), %rdi     # 0x1aa320
movq %r14, %rsi
callq 0xd3f11
testq %rax, %rax
je 0x121d16
movq (%rax), %r15
testq %r15, %r15
setne %al
cmoveq %r14, %r15
jmp 0x121d1b
xorl %eax, %eax
movq %r14, %r15
testb %al, %al
jne 0x121ceb
cmpq %rbx, %r14
sete %bl
movq 0x885f4(%rip), %rdi     # 0x1aa320
addq $0x58, %rdi
callq 0x11f547
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x885ce(%rip), %rdi     # 0x1aa320
addq $0x58, %rdi
callq 0x11f515
movq %rbx, %rdi
callq 0xc2a47
movq 0x885b6(%rip), %rdi     # 0x1aa320
cmpq $0x0, 0x18(%rdi)
je 0x121dbe
xorl %r15d, %r15d
movq %r15, %rsi
callq 0xd426f
movq %rax, %r12
testq %rax, %rax
sete %al
cmpq %r14, %r12
sete %cl
orb %al, %cl
jne 0x121dae
movq 0x8858a(%rip), %rdi     # 0x1aa320
movq %r15, %rsi
callq 0xd427c
cmpq %r14, %rax
jne 0x121dae
movq %rbx, %rdi
movq %r12, %rsi
callq 0xc2b6f
incq %r15
movq 0x88568(%rip), %rdi     # 0x1aa320
cmpq 0x18(%rdi), %r15
jb 0x121d74
addq $0x58, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x11f547
// File: /workspace/github_c_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x88538(%rip), %rdi     # 0x1aa320
addq $0x58, %rdi
callq 0x11f515
movq 0x88528(%rip), %rdi     # 0x1aa320
cmpq $0x0, 0x18(%rdi)
je 0x121e74
xorl %r15d, %r15d
movq %r15, %rsi
callq 0xd426f
movq %rax, %r12
testq %rax, %rax
sete %al
cmpq %r14, %r12
sete %cl
orb %al, %cl
jne 0x121e64
movq %r12, %rax
cmpq %r14, %rax
je 0x121e59
movq %rax, %r13
movq 0x884f1(%rip), %rdi     # 0x1aa320
movq %rax, %rsi
callq 0xd3f11
testq %rax, %rax
je 0x121e4b
movq (%rax), %rax
testq %rax, %rax
setne %cl
cmoveq %r13, %rax
jmp 0x121e50
xorl %ecx, %ecx
movq %r13, %rax
testb %cl, %cl
jne 0x121e20
cmpq %r14, %r13
jne 0x121e64
movq %rbx, %rdi
movq %r12, %rsi
callq 0xc2b6f
incq %r15
movq 0x884b2(%rip), %rdi     # 0x1aa320
cmpq 0x18(%rdi), %r15
jb 0x121e02
addq $0x58, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x11f547
// File: /workspace/github_c_makefile_star2_O1/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 0xc29b3
movq %rax, %r14
movq %r15, %rdi
movq %rax, %rsi
callq 0x121d3d
cmpq $0x0, 0x10(%r14)
je 0x121f13
leaq 0x31813(%rip), %r12     # 0x1536ef
leaq 0x37125(%rip), %r15     # 0x159008
xorl %r13d, %r13d
movq 0x8(%r14), %rax
movq (%rax,%r13,8), %rdi
callq 0xe0cbc
testq %rax, %rax
cmoveq %r12, %rax
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x109273
incq %r13
cmpq 0x10(%r14), %r13
jb 0x121ee6
movq %r14, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xc29e2
// File: /workspace/github_c_makefile_star2_O1/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 0xc29b3
movq %rax, %r14
movq %rax, %rdi
callq 0xc2a47
movq %r15, %rdi
movq %r14, %rsi
callq 0x121dd2
cmpq $0x0, 0x10(%r14)
je 0x121f95
leaq 0x31791(%rip), %r12     # 0x1536ef
leaq 0x370a3(%rip), %r15     # 0x159008
xorl %r13d, %r13d
movq 0x8(%r14), %rax
movq (%rax,%r13,8), %rdi
callq 0xe0cbc
testq %rax, %rax
cmoveq %r12, %rax
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x109273
incq %r13
cmpq 0x10(%r14), %r13
jb 0x121f68
movq %r14, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xc29e2
// File: /workspace/github_c_makefile_star2_O1/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 0x12225b
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 0xce4f4
testq %rax, %rax
je 0x122289
movq %r15, %rdi
movq %rax, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x122200
testq %rbx, %rbx
je 0x1222b9
movq %r14, %rdi
callq 0xe0cbc
testq %rax, %rax
leaq 0x3144f(%rip), %rdx     # 0x1536ef
cmovneq %rax, %rdx
leaq 0x36ce6(%rip), %rsi     # 0x158f91
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1156f6
jmp 0x12224e
xorl %ebp, %ebp
jmp 0x12224e
// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
xorl %edx, %edx
callq 0x12223f
testb %al, %al
je 0x1222e2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %eax, %eax
callq 0x114bbb
movq %rax, %rbx
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x12223f
movq %r15, %rdi
callq 0xe0cbc
movq %rax, %r15
testq %rax, %rax
leaq 0x313e0(%rip), %r12     # 0x1536ef
cmoveq %r12, %r15
movq %r14, %rdi
callq 0xe0cbc
testq %rax, %rax
cmovneq %rax, %r12
movq 0x8(%rbx), %rax
movq %rax, (%rsp)
leaq 0x36c84(%rip), %rdi     # 0x158fb5
leaq 0x36b85(%rip), %rsi     # 0x158ebd
leaq 0x36c98(%rip), %rcx     # 0x158fd7
movl $0x1fb, %edx            # imm = 0x1FB
movq %r15, %r8
movq %r12, %r9
xorl %eax, %eax
callq 0xc825d
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x114f61
// File: /workspace/github_c_makefile_star2_O1/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
movq 0x87fb4(%rip), %rdi     # 0x1aa320
addq $0x58, %rdi
callq 0x11f515
movq 0x87fa4(%rip), %rdi     # 0x1aa320
callq 0xd4246
movq %rax, %rbx
movq 0x87f95(%rip), %rdi     # 0x1aa320
addq $0x58, %rdi
callq 0x11f547
movq %rbx, %rax
popq %rbx
retq