LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x111e3a
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
je 0x111e2a
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x111e2c
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x111df8
movq -0x10(%rbp), %rax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x112087
movq -0x10(%rbp), %rax
movq (%rax), %rax
shlq %rax
movq %rax, -0x28(%rbp)
jmp 0x112092
movl $0x4, %eax
movq %rax, -0x28(%rbp)
jmp 0x112092
movq -0x28(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
subq $0x1, %rcx
xorq $0x3, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
shlq $0x4, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x9d270
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x9d4f0
cmpq $0x0, -0x10(%rbp)
je 0x112167
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x112165
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
je 0x112155
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
shlq $0x4, %rcx
movq (%rax,%rcx), %rsi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
shlq $0x4, %rcx
movq %rax, %rdx
addq %rcx, %rdx
movq 0x8(%rax,%rcx), %rdx
callq 0x111e40
jmp 0x112157
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x1120f7
jmp 0x112167
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x218, %esi            # imm = 0x218
callq 0x9d4f0
movq -0x8(%rbp), %rdi
addq $0x1f0, %rdi            # imm = 0x1F0
callq 0x10f980
movq -0x8(%rbp), %rdi
addq $0x1f0, %rdi            # imm = 0x1F0
callq 0x10fc20
movq $0x0, -0x10(%rbp)
cmpq $0x14, -0x10(%rbp)
jae 0x1121dc
movq -0x8(%rbp), %rdi
addq $0x10, %rdi
imulq $0x18, -0x10(%rbp), %rax
addq %rax, %rdi
callq 0x111d50
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x1121b2
movq -0x8(%rbp), %rdi
addq $0x10, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x112060
movq -0x8(%rbp), %rdi
addq $0x1f0, %rdi            # imm = 0x1F0
callq 0x10fc70
movq -0x8(%rbp), %rax
movb $0x0, 0x8(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
addq $0x1f0, %rdi            # imm = 0x1F0
callq 0x10fc20
movq $0x0, -0x10(%rbp)
cmpq $0x14, -0x10(%rbp)
jae 0x11225e
movq -0x8(%rbp), %rdi
addq $0x10, %rdi
imulq $0x18, -0x10(%rbp), %rax
addq %rax, %rdi
callq 0x111d70
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x112234
movq -0x8(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
xchgl %ecx, (%rdx)
movq -0x8(%rbp), %rcx
xchgl %eax, 0x4(%rcx)
movq -0x8(%rbp), %rdi
addq $0x10, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x112060
movq -0x8(%rbp), %rdi
addq $0x1f0, %rdi            # imm = 0x1F0
callq 0x10fc70
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
addq $0x1f0, %rdi            # imm = 0x1F0
callq 0x10fc20
movq $0x0, -0x10(%rbp)
cmpq $0x14, -0x10(%rbp)
jae 0x1122ee
movq -0x8(%rbp), %rdi
addq $0x10, %rdi
imulq $0x18, -0x10(%rbp), %rax
addq %rax, %rdi
callq 0x111dc0
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x1122c4
movq -0x8(%rbp), %rdi
addq $0x1f0, %rdi            # imm = 0x1F0
callq 0x10fc70
movq -0x8(%rbp), %rdi
addq $0x1f0, %rdi            # imm = 0x1F0
callq 0x10fa50
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
addq $0x1f0, %rdi            # imm = 0x1F0
callq 0x10fc20
movq -0x10(%rbp), %rax
testb $0x1, 0x8(%rax)
je 0x1124a7
movq -0x10(%rbp), %rdi
addq $0x1f0, %rdi            # imm = 0x1F0
callq 0x10fc70
movb $0x0, -0x1(%rbp)
jmp 0x112591
movq -0x10(%rbp), %rax
addq $0x10, %rax
movq -0x10(%rbp), %rcx
movslq 0x4(%rcx), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x111e40
testb $0x1, %al
jne 0x1124d9
jmp 0x1124f2
movq -0x10(%rbp), %rdi
addq $0x1f0, %rdi            # imm = 0x1F0
callq 0x10fc70
movb $0x1, -0x1(%rbp)
jmp 0x112591
movq -0x10(%rbp), %rax
cmpl $0x13, 0x4(%rax)
jne 0x112512
movq -0x10(%rbp), %rdi
addq $0x1f0, %rdi            # imm = 0x1F0
callq 0x10fc70
movb $0x0, -0x1(%rbp)
jmp 0x112591
movq -0x10(%rbp), %rax
lock
incl 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
leaq 0x10(%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x112060
movq -0x10(%rbp), %rdi
addq $0x1f0, %rdi            # imm = 0x1F0
callq 0x10fc70
movq -0x10(%rbp), %rdi
addq $0x1f0, %rdi            # imm = 0x1F0
callq 0x10fc20
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x10(%rbp), %rcx
xchgl %eax, (%rcx)
movq -0x10(%rbp), %rdi
addq $0x1f0, %rdi            # imm = 0x1F0
callq 0x10fc70
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x112460
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
addq $0x1f0, %rdi            # imm = 0x1F0
callq 0x10fc20
movq -0x8(%rbp), %rax
addq $0x10, %rax
movq -0x8(%rbp), %rcx
movslq 0x4(%rcx), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0x1f0, %rdi            # imm = 0x1F0
callq 0x10fc70
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
addq $0x1f0, %rdi            # imm = 0x1F0
callq 0x10fc20
movq -0x8(%rbp), %rdi
addq $0x10, %rdi
movq -0x8(%rbp), %rax
movslq 0x4(%rax), %rax
imulq $0x18, %rax, %rax
addq %rax, %rdi
callq 0x111de0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0x1f0, %rdi            # imm = 0x1F0
callq 0x10fc70
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/johsteffens[P]beth/lib/bcore/bcore_tp_fastmap.c
// Function: bcore_tp_fastmap_signal_handler
vd_t bcore_tp_fastmap_signal_handler( const bcore_signal_s* o )
{
    switch( bcore_signal_s_handle_type( o, typeof( "bcore_tp_fastmap" ) ) )
    {
        case TYPEOF_init1:
        {
        }
        break;

        case TYPEOF_selftest:
        {
            return selftest();
        }
        break;

        default: break;
    }

    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x45efd(%rip), %rdi     # 0x158578
callq 0x1126e0
movq -0x20(%rbp), %rdi
movq %rax, %rsi
callq 0xc7f40
movq %rax, %rcx
movq %rcx, -0x18(%rbp)
movabsq $0x6a72ce8f8250efc6, %rcx # imm = 0x6A72CE8F8250EFC6
subq %rcx, %rax
je 0x1126b9
jmp 0x1126a4
movq -0x18(%rbp), %rax
movabsq $0x7ee758bbfced33e3, %rcx # imm = 0x7EE758BBFCED33E3
subq %rcx, %rax
je 0x1126bb
jmp 0x1126c6
jmp 0x1126c8
callq 0x112700
movq %rax, -0x8(%rbp)
jmp 0x1126d0
jmp 0x1126c8
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
callq 0x114410
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x113580
testb $0x1, %al
jne 0x113518
jmp 0x11355b
callq 0x114430
movq -0x8(%rbp), %rdi
callq 0x1135f0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1135f0
movq -0x18(%rbp), %r8
movq %rax, %r9
leaq 0x45175(%rip), %rdi     # 0x1586b6
leaq 0x4517e(%rip), %rsi     # 0x1586c6
movl $0x11b, %edx            # imm = 0x11B
leaq 0x45180(%rip), %rcx     # 0x1586d4
movb $0x0, %al
callq 0x9cf40
movq 0xa031e(%rip), %rdi     # 0x1b3880
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0xaf440
callq 0x114430
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/johsteffens[P]beth/lib/bcore/bcore_trait.c
// Function: trait_is_of
static bl_t trait_is_of( tp_t trait, tp_t ancestor )
{
    for(;;)
    {
        if( trait == ancestor ) return true;
        tp_t* parent = bcore_hmap_tptp_s_get( &system_s_g->type_map, trait );
        if( !parent || !(*parent) ) return false;
        trait = *parent;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jne 0x1135a0
movb $0x1, -0x1(%rbp)
jmp 0x1135d8
movq 0xa02d9(%rip), %rdi     # 0x1b3880
movq -0x10(%rbp), %rsi
callq 0xaf260
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x1135c5
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x1135cb
movb $0x0, -0x1(%rbp)
jmp 0x1135d8
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x113590
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
callq 0x114410
movq 0xa0228(%rip), %rdi     # 0x1b3880
movq -0x8(%rbp), %rsi
callq 0xaf740
andb $0x1, %al
movb %al, -0x9(%rbp)
callq 0x114430
movb -0x9(%rbp), %al
andb $0x1, %al
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
callq 0x114410
movq 0xa01e8(%rip), %rdi     # 0x1b3880
movq -0x8(%rbp), %rsi
callq 0xaf260
movq %rax, -0x10(%rbp)
callq 0x114430
cmpq $0x0, -0x10(%rbp)
je 0x1136be
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x1136c6
xorl %eax, %eax
movq %rax, -0x18(%rbp)
jmp 0x1136c6
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
callq 0x114410
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x113580
andb $0x1, %al
movb %al, -0x11(%rbp)
callq 0x114430
movb -0x11(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
callq 0x114410
movq -0x10(%rbp), %rdi
callq 0x94650
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0xa013f(%rip), %rcx     # 0x1b3880
cmpq 0x18(%rcx), %rax
jae 0x1137a9
movq 0xa0132(%rip), %rdi     # 0x1b3880
movq -0x18(%rbp), %rsi
callq 0xaf880
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x113799
movq -0x20(%rbp), %rax
cmpq -0x8(%rbp), %rax
je 0x113799
movq 0xa010d(%rip), %rdi     # 0x1b3880
movq -0x18(%rbp), %rsi
callq 0xaf8b0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x8(%rbp), %rax
jne 0x113797
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x948a0
jmp 0x113799
jmp 0x11379b
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x113736
callq 0x114430
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
callq 0x114410
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0xa0098(%rip), %rcx     # 0x1b3880
cmpq 0x18(%rcx), %rax
jae 0x113845
movq 0xa008b(%rip), %rdi     # 0x1b3880
movq -0x18(%rbp), %rsi
callq 0xaf880
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x113835
movq -0x20(%rbp), %rax
cmpq -0x8(%rbp), %rax
je 0x113835
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x113580
testb $0x1, %al
jne 0x113826
jmp 0x113833
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x948a0
jmp 0x113835
jmp 0x113837
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x1137dd
callq 0x114430
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, %al
callq 0x945a0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x113710
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x1138fe
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1135f0
movq -0x28(%rbp), %rdi
movq %rax, %rdx
leaq 0x44f28(%rip), %rsi     # 0x158811
movb $0x0, %al
callq 0xf0e20
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x1138b0
movq -0x18(%rbp), %rdi
callq 0x945d0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, %al
callq 0x945a0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x113850
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x11398e
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1135f0
movq -0x28(%rbp), %rdi
movq %rax, %rdx
leaq 0x44e98(%rip), %rsi     # 0x158811
movb $0x0, %al
callq 0xf0e20
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x113940
movq -0x18(%rbp), %rdi
callq 0x945d0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/johsteffens[P]beth/lib/bcore/bcore_trait.c
// Function: bcore_trait_satisfied_self
bl_t bcore_trait_satisfied_self( tp_t trait, const bcore_self_s* self, st_s* log )
{
    if( self->type == trait                       ) return true;
    if( bcore_trait_is_of( self->trait, trait )   ) return true;
    if( bcore_trait_supported( trait, self, log ) ) return true;
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x113ca8
movb $0x1, -0x1(%rbp)
jmp 0x113ce6
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x1136d0
testb $0x1, %al
jne 0x113cbf
jmp 0x113cc5
movb $0x1, -0x1(%rbp)
jmp 0x113ce6
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x1139a0
testb $0x1, %al
jne 0x113cdc
jmp 0x113ce2
movb $0x1, -0x1(%rbp)
jmp 0x113ce6
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x10(%rbp), %rax
jne 0x113d24
movb $0x1, -0x1(%rbp)
jmp 0x113d8c
movq -0x18(%rbp), %rdi
callq 0xa6610
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x113d6b
cmpq $0x0, -0x20(%rbp)
je 0x113d65
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1135f0
movq -0x30(%rbp), %rdi
movq %rax, %rdx
leaq 0x44a3c(%rip), %rsi     # 0x15879a
movb $0x0, %al
callq 0x100120
movb $0x0, -0x1(%rbp)
jmp 0x113d8c
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x113c80
testb $0x1, %al
jne 0x113d82
jmp 0x113d88
movb $0x1, -0x1(%rbp)
jmp 0x113d8c
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x113d00
testb $0x1, %al
jne 0x113dc7
jmp 0x113dc9
jmp 0x113e38
movb $0x0, %al
callq 0xff2e0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x113d00
movq -0x10(%rbp), %rdi
callq 0x1135f0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1135f0
movq -0x20(%rbp), %r8
movq %rax, %r9
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
leaq 0x449ad(%rip), %rdi     # 0x1587be
leaq 0x448ae(%rip), %rsi     # 0x1586c6
movl $0x1fb, %edx            # imm = 0x1FB
leaq 0x449bc(%rip), %rcx     # 0x1587e0
movq %rax, (%rsp)
movb $0x0, %al
callq 0x9d0f0
movq -0x18(%rbp), %rdi
callq 0xff600
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x114410
movq 0x9fa2c(%rip), %rdi     # 0x1b3880
callq 0xaf7f0
movq %rax, -0x8(%rbp)
callq 0x114430
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/johsteffens[P]beth/lib/bcore/bcore_trait.c
// Function: bcore_trait_show
st_s* bcore_trait_show()
{
    system_s_g_lock();
    st_s* log = st_s_create();
    uz_t size = bcore_hmap_tptp_s_size( &system_s_g->type_map );
    for( uz_t i = 0; i < size; i++ )
    {
        tp_t key = bcore_hmap_tptp_s_idx_key( &system_s_g->type_map, i );
        if( key )
        {
            tp_t val = bcore_hmap_tptp_s_idx_val( &system_s_g->type_map, i );
            system_s_g_unlock();
            if( bcore_name_exists( key ) )
            {
                st_s_push_fa( log, "#<sc_t>", ifnameof( key ) );
            }
            else
            {
                st_s_push_fa( log, "#<tp_t>", key );
            }

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
callq 0x114410
movb $0x0, %al
callq 0xff2e0
movq %rax, -0x8(%rbp)
movq 0x9f9f1(%rip), %rdi     # 0x1b3880
callq 0xaf860
movq %rax, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x113fb3
movq 0x9f9cb(%rip), %rdi     # 0x1b3880
movq -0x18(%rbp), %rsi
callq 0xaf880
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x113fa0
movq 0x9f9ac(%rip), %rdi     # 0x1b3880
movq -0x18(%rbp), %rsi
callq 0xaf8b0
movq %rax, -0x28(%rbp)
callq 0x114430
movq -0x20(%rbp), %rdi
callq 0x113fd0
testb $0x1, %al
jne 0x113ef5
jmp 0x113f1d
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
callq 0x1135f0
movq -0x30(%rbp), %rdi
movq %rax, %rdx
leaq 0x3b011(%rip), %rsi     # 0x14ef25
movb $0x0, %al
callq 0x100210
jmp 0x113f33
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq 0x39933(%rip), %rsi     # 0x14d85f
movb $0x0, %al
callq 0x100210
callq 0x114410
cmpq $0x0, -0x28(%rbp)
je 0x113f88
callq 0x114430
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rdi
callq 0x1135f0
movq -0x38(%rbp), %rdi
movq %rax, %rdx
leaq 0x448b7(%rip), %rsi     # 0x15881a
movb $0x0, %al
callq 0x100210
callq 0x114410
movq 0x9f90a(%rip), %rdi     # 0x1b3880
movq -0x28(%rbp), %rsi
callq 0xaf260
movq (%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x113f38
callq 0x114430
movq -0x8(%rbp), %rdi
movl $0xa, %esi
callq 0xffba0
callq 0x114410
jmp 0x113fa2
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x113ea0
callq 0x114430
movq -0x8(%rbp), %rdi
movl $0xa, %esi
callq 0xffba0
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/johsteffens[P]beth/lib/bcore/bcore_trait.c
// Function: bcore_trait_signal_handler
vd_t bcore_trait_signal_handler( const bcore_signal_s* o )
{
    switch( bcore_signal_s_handle_type( o, typeof( "bcore_trait" ) ) )
    {
        case TYPEOF_init0:
        {
            trait_manager_open();
        }
        break;

        case TYPEOF_init1:
        {
            bcore_flect_define_creator( typeof( "bcore_trait_ft_s" ), trait_ft_s_create_self  );
            bcore_flect_define_creator( typeof( "bcore_trait_s"    ), trait_s_create_self  );
        }
        break;

        case TYPEOF_down0:
        {
            s2_t verbosity = o->object ? *( s2_t* )o->object : 0;
            if( verbosity > 0 )
            {
                uz_t count = bcore_trait_size();
                uz_t space = bcore_tbman_total_granted_space();
                trait_manager_close();
                space -= bcore_tbman_total_granted_space();
                bcore_msg( "  trait manager ....... % 7zu (by % 4zu traits       )\n", space, count );
            }
            else
            {
                trait_manager_close();
            }
        }
        break;

        default: break;
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0x44789(%rip), %rdi     # 0x158824
callq 0x1141c0
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0xc7f40
movq %rax, %rcx
movq %rcx, -0x28(%rbp)
movabsq $-0x69a05554ee793861, %rcx # imm = 0x965FAAAB1186C79F
subq %rcx, %rax
je 0x114134
jmp 0x1140c4
movq -0x28(%rbp), %rax
movabsq $0x6a72ce8f8250efc6, %rcx # imm = 0x6A72CE8F8250EFC6
subq %rcx, %rax
je 0x1140fc
jmp 0x1140d9
movq -0x28(%rbp), %rax
movabsq $0x6a72cf8f8250f179, %rcx # imm = 0x6A72CF8F8250F179
subq %rcx, %rax
jne 0x1141aa
jmp 0x1140f2
callq 0x1145f0
jmp 0x1141ac
leaq 0x4472d(%rip), %rdi     # 0x158830
callq 0x1141c0
movq %rax, %rdi
leaq 0xce(%rip), %rsi        # 0x1141e0
callq 0xa7b60
leaq 0x44723(%rip), %rdi     # 0x158841
callq 0x1141c0
movq %rax, %rdi
leaq 0xd3(%rip), %rsi        # 0x114200
callq 0xa7b60
jmp 0x1141ac
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x11414e
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl (%rax), %eax
movl %eax, -0x34(%rbp)
jmp 0x114155
xorl %eax, %eax
movl %eax, -0x34(%rbp)
jmp 0x114155
movl -0x34(%rbp), %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0x1141a3
callq 0x113e40
movq %rax, -0x18(%rbp)
callq 0x109a60
movq %rax, -0x20(%rbp)
callq 0x1146c0
callq 0x109a60
movq %rax, %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq 0x446b5(%rip), %rdi     # 0x15884f
movb $0x0, %al
callq 0x9c910
jmp 0x1141a8
callq 0x1146c0
jmp 0x1141ac
jmp 0x1141ac
xorl %eax, %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/johsteffens[P]beth/lib/bcore/bcore_trait.c
// Function: system_s_init
static void system_s_init( system_s* o )
{
    bcore_hmap_tptp_s_init( &o->type_map );
    bcore_hmap_tpto_s_init( &o->trait_map );
    bcore_hmap_tpto_s_set_type( &o->trait_map, typeof( "bcore_trait_s" ) );
    bcore_mutex_s_init( &o->mutex );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0xaedc0
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
callq 0xb0920
movq -0x8(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x10(%rbp)
leaq 0x441ac(%rip), %rdi     # 0x158841
callq 0x1141c0
movq -0x10(%rbp), %rdi
movq %rax, %rsi
callq 0xb1080
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
callq 0x10f980
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/johsteffens[P]beth/lib/bcore/bcore_trait.c
// Function: system_s_down
static void system_s_down( system_s* o )
{
    bcore_mutex_s_lock( &o->mutex );

    /// we explicitly discard here to avoid implicitly creating an instance perspective
    for( uz_t i = 0; i < o->trait_map.size; i++ )
    {
        tp_t key  = bcore_hmap_tpto_s_idx_key( &o->trait_map, i );
        vd_t* dst = bcore_hmap_tpto_s_get( &o->trait_map, key );
        if( dst )
        {
            bcore_trait_s_discard( *dst );
            *dst = NULL;
        }
    }

    bcore_hmap_tpto_s_down( &o->trait_map );
    bcore_hmap_tptp_s_down( &o->type_map );
    bcore_mutex_s_unlock( &o->mutex );
    bcore_mutex_s_down( &o->mutex );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
callq 0x10fc20
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x48(%rcx), %rax
jae 0x1147a7
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
movq -0x10(%rbp), %rsi
callq 0xb1910
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
movq -0x18(%rbp), %rsi
callq 0xb11b0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x114797
movq -0x20(%rbp), %rax
movq (%rax), %rdi
callq 0x1131c0
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
jmp 0x114799
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x114741
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
callq 0xb0960
movq -0x8(%rbp), %rdi
callq 0xaee00
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
callq 0x10fc70
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
callq 0x10fa50
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/johsteffens[P]beth/lib/bcore/bcore_txt_ml.c
// Function: bcore_txt_ml_x_to_file
void bcore_txt_ml_x_to_file( sr_s obj, sc_t file )
{
    bcore_life_s* l = bcore_life_s_create();
    bcore_sink_chain_s* chain = bcore_life_s_push_aware( l, bcore_sink_chain_s_create() );
    bcore_sink_chain_s_push_d( chain, bcore_sink_file_s_create_name( file ) );
    bcore_sink_chain_s_push_d( chain, bcore_inst_t_create( typeof( "bcore_sink_buffer_s" ) ) );
    bcore_translate_x( sr_asm( bcore_txt_ml_translator_s_create() ), obj, sr_awm( chain ) );
    bcore_life_s_discard( l );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movq %rdi, -0x8(%rbp)
movb $0x0, %al
callq 0xbfdd0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
movb $0x0, %al
callq 0xc88d0
movq -0x68(%rbp), %rdi
movq %rax, %rsi
callq 0xc0460
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rdi
callq 0xc91a0
movq -0x60(%rbp), %rdi
movq %rax, %rsi
callq 0xc8990
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq 0x3bb3f(%rip), %rdi     # 0x1513ec
callq 0x1159a0
movq %rax, %rdi
callq 0x115960
movq -0x58(%rbp), %rdi
movq %rax, %rsi
callq 0xc8990
callq 0x114d30
movq %rax, %rsi
leaq -0x30(%rbp), %rdi
callq 0x1156b0
movq -0x18(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x115720
movq -0x50(%rbp), %rcx
leaq -0x30(%rbp), %rdx
leaq -0x48(%rbp), %rax
movq (%rdx), %rsi
movq %rsi, (%rsp)
movq 0x8(%rdx), %rsi
movq %rsi, 0x8(%rsp)
movq 0x10(%rdx), %rdx
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
movq 0x8(%rcx), %rdx
movq %rdx, 0x20(%rsp)
movq 0x10(%rcx), %rcx
movq %rcx, 0x28(%rsp)
movq (%rax), %rcx
movq %rcx, 0x30(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x38(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x40(%rsp)
callq 0xf5680
movq -0x10(%rbp), %rdi
callq 0xbfe00
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/johsteffens[P]beth/lib/bcore/bcore_txt_ml.c
// Function: bcore_txt_ml_from_source
sr_s bcore_txt_ml_from_source( bcore_source* source )
{
    bcore_txt_ml_interpreter_s* interpreter = bcore_txt_ml_interpreter_s_create();
    sr_s ret = interpret( interpreter, sr_null(), sr_awm( source ) );
    bcore_txt_ml_interpreter_s_discard( interpreter );
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x58(%rbp)
movq %rdi, -0x48(%rbp)
movq %rsi, -0x8(%rbp)
callq 0x1161e0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x119b10
movq -0x8(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x115720
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
leaq -0x28(%rbp), %rcx
leaq -0x40(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, (%rsp)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsp)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rsp)
movq (%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
callq 0x116310
movq -0x10(%rbp), %rdi
callq 0x116210
movq -0x48(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/johsteffens[P]beth/lib/bcore/bcore_txt_ml.c
// Function: bcore_txt_ml_from_file
sr_s bcore_txt_ml_from_file( sc_t file )
{
    sr_s chain = sr_asm( bcore_source_chain_s_create() );
    bcore_source_chain_s_push_d( chain.o, bcore_source_file_s_create_name( file ) );
    bcore_source_chain_s_push_d( chain.o, bcore_inst_t_create( typeof( "bcore_source_string_s" ) ) );
    sr_s ret = bcore_interpret_x( bcore_inst_t_create_sr( TYPEOF_bcore_txt_ml_interpreter_s ), chain );
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x48(%rbp)
movq %rdi, -0x40(%rbp)
movq %rsi, -0x8(%rbp)
movb $0x0, %al
callq 0xcb0b0
movq %rax, %rsi
leaq -0x20(%rbp), %rdi
callq 0x1156b0
movq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rdi
callq 0xcc860
movq -0x58(%rbp), %rdi
movq %rax, %rsi
callq 0xcb170
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq 0x3a261(%rip), %rdi     # 0x151397
callq 0x1159a0
movq %rax, %rdi
callq 0x115960
movq -0x50(%rbp), %rdi
movq %rax, %rsi
callq 0xcb170
leaq -0x38(%rbp), %rdi
movabsq $0x2a141542c016dc6c, %rsi # imm = 0x2A141542C016DC6C
callq 0x114950
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rcx
leaq -0x20(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, (%rsp)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsp)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rsp)
movq (%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
callq 0xef320
movq -0x40(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/johsteffens[P]beth/lib/bcore/bcore_txt_ml.c
// Function: bcore_txt_ml_from_string
sr_s bcore_txt_ml_from_string( const st_s* string )
{
    sr_s chain = sr_asm( bcore_source_chain_s_create() );
    bcore_source_chain_s_push_d( chain.o, bcore_source_string_s_create_from_string( string ) );
    sr_s ret = bcore_interpret_x( bcore_inst_t_create_sr( TYPEOF_bcore_txt_ml_interpreter_s ), chain );
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x48(%rbp)
movq %rdi, -0x40(%rbp)
movq %rsi, -0x8(%rbp)
movb $0x0, %al
callq 0xcb0b0
movq %rax, %rsi
leaq -0x20(%rbp), %rdi
callq 0x1156b0
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0xcbf50
movq -0x50(%rbp), %rdi
movq %rax, %rsi
callq 0xcb170
leaq -0x38(%rbp), %rdi
movabsq $0x2a141542c016dc6c, %rsi # imm = 0x2A141542C016DC6C
callq 0x114950
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rcx
leaq -0x20(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, (%rsp)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsp)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rsp)
movq (%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
callq 0xef320
movq -0x40(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/johsteffens[P]beth/lib/bcore/bcore_txt_ml.c
// Function: bcore_txt_ml_from_sc
sr_s bcore_txt_ml_from_sc( sc_t sc )
{
    st_s st;
    st_s_init_weak_sc( &st, sc );
    sr_s ret = bcore_txt_ml_from_string( &st );
    st_s_down( &st );
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x38(%rbp)
movq %rdi, -0x30(%rbp)
movq %rsi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0xfe6c0
movq -0x38(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x1171c0
leaq -0x28(%rbp), %rdi
callq 0xfe700
movq -0x30(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/johsteffens[P]beth/lib/bcore/bcore_txt_ml.c
// Function: bcore_txt_ml_contains_valid_syntax
bl_t bcore_txt_ml_contains_valid_syntax( bcore_source* source )
{
    BLM_INIT();
    sz_t index = bcore_source_a_get_index( source );

    if( !bcore_source_a_parse_bl( source, " #?'<'" ) )
    {
        bcore_source_a_set_index( source, index );
        BLM_RETURNV( bl_t, false );
    }

    st_s* name = BLM_A_PUSH( st_s_create() );

    bcore_source_a_parse_fa( source, "#name", name );

    if( name->size == 0 )
    {
        bcore_source_a_set_index( source, index );
        BLM_RETURNV( bl_t, false );
    }

    if( !bcore_source_a_parse_bl( source, "#?'>'" ) )
    {
        bcore_source_a_set_index( source, index );
        BLM_RETURNV( bl_t, false );
    }

    bcore_source_a_set_index( source, index );
    BLM_RETURNV( bl_t, true );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
leaq 0x9af6a(%rip), %rax     # 0x1b2330
movq (%rax), %rax
movq %rax, -0x18(%rbp)
leaq -0x48(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xbfe80
movq -0x50(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x117500
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x1d27d(%rip), %rsi     # 0x13467f
callq 0x117530
testb $0x1, %al
jne 0x117432
movq -0x10(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x117570
movb $0x0, -0x59(%rbp)
movq -0x50(%rbp), %rdi
callq 0xc0720
movb -0x59(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x1174f0
movq -0x18(%rbp), %rax
movq %rax, -0x78(%rbp)
movb $0x0, %al
callq 0xff2e0
movq -0x78(%rbp), %rdi
movq %rax, %rsi
callq 0xc0460
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rdi
movq -0x68(%rbp), %rdx
leaq 0x370e4(%rip), %rsi     # 0x14e544
movb $0x0, %al
callq 0xf3450
movq -0x68(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x117496
movq -0x10(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x117570
movb $0x0, -0x69(%rbp)
movq -0x50(%rbp), %rdi
callq 0xc0720
movb -0x69(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x1174f0
movq -0x10(%rbp), %rdi
leaq 0x413e6(%rip), %rsi     # 0x158887
callq 0x117530
testb $0x1, %al
jne 0x1174ce
movq -0x10(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x117570
movb $0x0, -0x6a(%rbp)
movq -0x50(%rbp), %rdi
callq 0xc0720
movb -0x6a(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x1174f0
movq -0x10(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x117570
movb $0x1, -0x6b(%rbp)
movq -0x50(%rbp), %rdi
callq 0xc0720
movb -0x6b(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x80, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/johsteffens[P]beth/lib/bcore/bcore_txt_ml.c
// Function: bcore_txt_ml_signal_handler
vd_t bcore_txt_ml_signal_handler( const bcore_signal_s* o )
{
    switch( bcore_signal_s_handle_type( o, typeof( "bcore_txt_ml" ) ) )
    {
        case TYPEOF_init1:
        {
            bcore_flect_define_creator( TYPEOF_bcore_txt_ml_translator_s,  translator_s_create_self  );
            bcore_flect_define_creator( TYPEOF_bcore_txt_ml_interpreter_s, interpreter_s_create_self );
        }
        break;

        case TYPEOF_selftest:
        {
            return txt_ml_selftest();
        }
        break;

        default: break;
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x410dc(%rip), %rdi     # 0x1588b7
callq 0x1159a0
movq -0x20(%rbp), %rdi
movq %rax, %rsi
callq 0xc7f40
movq %rax, %rcx
movq %rcx, -0x18(%rbp)
movabsq $0x6a72ce8f8250efc6, %rcx # imm = 0x6A72CE8F8250EFC6
subq %rcx, %rax
je 0x117819
jmp 0x117804
movq -0x18(%rbp), %rax
movabsq $0x7ee758bbfced33e3, %rcx # imm = 0x7EE758BBFCED33E3
subq %rcx, %rax
je 0x117847
jmp 0x117852
movabsq $-0x7c4788a4d080fe1c, %rdi # imm = 0x83B8775B2F7F01E4
leaq 0x46(%rip), %rsi        # 0x117870
callq 0xa7b60
movabsq $0x2a141542c016dc6c, %rdi # imm = 0x2A141542C016DC6C
leaq 0xa0(%rip), %rsi        # 0x1178e0
callq 0xa7b60
jmp 0x117854
callq 0x117950
movq %rax, -0x8(%rbp)
jmp 0x11785c
jmp 0x117854
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/johsteffens[P]beth/lib/bcore/bcore_txt_ml.c
// Function: translator_s_create_self
static bcore_self_s* translator_s_create_self( void )
{
    bcore_self_s* self = BCORE_SELF_S_BUILD_PARSE_SC( "bcore_txt_ml_translator_s = bcore_translator { aware_t _; uz_t indent; }", bcore_txt_ml_translator_s );
    bcore_self_s_push_ns_func( self, ( fp_t )bcore_txt_ml_translator_s_init,      "bcore_fp_init",      "init"      );
    bcore_self_s_push_ns_func( self, ( fp_t )bcore_txt_ml_translator_s_translate, "bcore_fp_translate", "translate" );
    return self;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x41101(%rip), %rdi     # 0x158980
movl $0x10, %esi
movl $0x8, %edx
callq 0xa67c0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x2c7d(%rip), %rsi     # 0x114c20
leaq 0x3531e(%rip), %rdx     # 0x14cbc2
leaq 0x35320(%rip), %rcx     # 0x14cbcb
callq 0xa5930
movq -0x8(%rbp), %rdi
leaq -0x2adb(%rip), %rsi     # 0x114de0
leaq 0x41107(%rip), %rdx     # 0x1589c9
leaq 0x22384(%rip), %rcx     # 0x139c4d
callq 0xa5930
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/johsteffens[P]beth/lib/bcore/bcore_txt_ml.c
// Function: interpreter_s_create_self
static bcore_self_s* interpreter_s_create_self( void )
{
    bcore_self_s* self = BCORE_SELF_S_BUILD_PARSE_SC( "bcore_txt_ml_interpreter_s = bcore_interpreter { aware_t _; }", bcore_txt_ml_interpreter_s );
    bcore_self_s_push_ns_func( self, ( fp_t )bcore_txt_ml_interpreter_s_init,             "bcore_fp_init", "init" );
    bcore_self_s_push_ns_func( self, ( fp_t )bcore_txt_ml_interpreter_s_interpret,        "bcore_fp_interpret",        "interpret"        );
    return self;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x410ed(%rip), %rdi     # 0x1589dc
movl $0x8, %edx
movq %rdx, %rsi
callq 0xa67c0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x17bb(%rip), %rsi     # 0x116150
leaq 0x352b0(%rip), %rdx     # 0x14cbc2
leaq 0x352b2(%rip), %rcx     # 0x14cbcb
callq 0xa5930
movq -0x8(%rbp), %rdi
leaq -0x1699(%rip), %rsi     # 0x116290
leaq 0x410ea(%rip), %rdx     # 0x158a1a
leaq 0x410ec(%rip), %rcx     # 0x158a23
callq 0xa5930
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)