// File: /workspace/github_c_makefile_star2_O0/johsteffens[P]beth/lib/bcore/bcore_flect.c
// Function: bcore_self_item_s_parse_func_src
static er_t bcore_self_item_s_parse_func_src( bcore_self_item_s* o, sr_s src, const bcore_self_s* self, bl_t advanced_checks )
{
    BLM_INIT();
    src = bcore_life_s_push_sr( __bcore_life_curent, sr_cp( src, TYPEOF_bcore_source_s ) );

    tp_t parent_type = self ? self->type : 0;

    st_s* type_name = BLM_CREATE( st_s );
    st_s* item_name = BLM_CREATE( st_s );

    bl_t extend_type_name = false;
    bl_t use_trait = false;
    BLM_TRY( bcore_source_r_parse_em_fa( &src, "#name #?'^' #?':' #name", type_name, &use_trait, &extend_type_name, item_name ) );

    if( extend_type_name )
    {
        if( use_trait )
        {
            if( type_name->size != 0 )
            {
                BLM_TRY( bcore_source_a_parse_error_fa( src.o, "Parent '#<sc_t>':\nMisplaced type name '#<sc_t>'", ifnameof( parent_type ), type_name->sc ) );
            }

            if( self && self->trait )
            {
                st_s_copy_sc( type_name, ifnameof( self->trait ) );
            }
            else
            {
                BLM_TRY( bcore_source_a_parse_error_fa( src.o, "Parent '#<sc_t>':\nFunction declaration with trait expansion: Parent has no trait.", ifnameof( parent_type ) ) );
            }
        }
        else if( type_name->size == 0 )
        {
//                BLM_TRY( bcore_source_a_parse_error_fa( src.o, "Parent '#<sc_t>':\nType name expected.", ifnameof( parent_type ), type_name->sc ) );
        }

        st_s* type_prefix = st_s_clone( type_name );
        st_s_copy_fa( type_name, "#<sc_t>_#<sc_t>", type_prefix->sc, item_name->sc );
        st_s_discard( type_prefix );
    }
    else if( use_trait )
    {
        BLM_TRY( bcore_source_a_parse_error_fa( src.o, "Parent '#<sc_t>':\nMisplaced '^'", ifnameof( parent_type ) ) );
    }

    o->type = entypeof( type_name->sc );
    o->name = entypeof( item_name->sc );
    o->caps = BCORE_CAPS_EXTERNAL_FUNC;
    st_s* assign_name = BLM_CREATE( st_s );

    if( bcore_source_r_parse_bl_fa( &src, " #?'=' " ) )
    {
        BLM_TRY( bcore_source_r_parse_em_fa( &src, "#name", assign_name ) );
    }
    else if( parent_type )
    {
        st_s_push_fa( assign_name, "#<sc_t>_#<sc_t>", ifnameof( parent_type ), item_name->sc );
    }

    if( !st_s_equal_sc( assign_name, "" ) )
    {
        tp_t func_tp = entypeof( assign_name->sc );
        if( advanced_checks && !bcore_function_exists( func_tp ) )
        {
            BLM_TRY( bcore_source_a_parse_error_fa( src.o, "Parent '#<sc_t>':\nFunction '#<sc_t>' was not registered.", ifnameof( parent_type ), ifnameof( func_tp ) ) );
        }

        o->default_tp = func_tp;
        if( advanced_checks && bcore_trait_exists( func_tp ) )
        {
            if( !bcore_trait_is_of( func_tp, o->type ) )
            {
                BLM_TRY( bcore_source_a_parse_error_fa( src.o, "Parent '#<sc_t>':\nFunction '#<sc_t>' is not of feature '#<sc_t>'.", ifnameof( parent_type ), ifnameof( func_tp ), ifnameof( o->type ) ) );
            }
        }
    }
    BLM_RETURNV( er_t, 0 );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1e0, %rsp            # imm = 0x1E0
movb %dl, %al
leaq 0x10(%rbp), %rcx
movq %rcx, -0x148(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
leaq 0x110ff4(%rip), %rax    # 0x1b2330
movq (%rax), %rax
movq %rax, -0x28(%rbp)
leaq -0x58(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xbfe80
movq -0x148(%rbp), %rax
movq -0x60(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movq -0x28(%rbp), %rcx
movq %rcx, -0x150(%rbp)
leaq -0x90(%rbp), %rdi
movabsq $-0x7e8ee9b9b4bbaa8, %rsi # imm = 0xF817116464B44558
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xa6370
movq -0x150(%rbp), %rsi
leaq -0x78(%rbp), %rdi
leaq -0x90(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xc02c0
movq -0x148(%rbp), %rax
movq -0x78(%rbp), %rcx
movq %rcx, (%rax)
movq -0x70(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x68(%rbp), %rcx
movq %rcx, 0x10(%rax)
cmpq $0x0, -0x18(%rbp)
je 0xa1407
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x158(%rbp)
jmp 0xa1412
xorl %eax, %eax
movq %rax, -0x158(%rbp)
jmp 0xa1412
movq -0x158(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x168(%rbp)
movb $0x0, %al
callq 0xff2e0
movq -0x168(%rbp), %rdi
movq %rax, %rdx
movabsq $-0x503db0e6e1c2e704, %rsi # imm = 0xAFC24F191E3D18FC
callq 0xc00e0
movq %rax, -0xa0(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x160(%rbp)
movb $0x0, %al
callq 0xff2e0
movq -0x160(%rbp), %rdi
movq %rax, %rdx
movabsq $-0x503db0e6e1c2e704, %rsi # imm = 0xAFC24F191E3D18FC
callq 0xc00e0
movq -0x148(%rbp), %rdi
movq %rax, -0xa8(%rbp)
movb $0x0, -0xa9(%rbp)
movb $0x0, -0xaa(%rbp)
movq -0xa0(%rbp), %rdx
movq -0xa8(%rbp), %r9
leaq 0xad084(%rip), %rsi     # 0x14e532
leaq -0xaa(%rbp), %rcx
leaq -0xa9(%rbp), %r8
movb $0x0, %al
callq 0xf4090
movq %rax, -0xb8(%rbp)
cmpq $0x0, -0xb8(%rbp)
je 0xa14fb
movq -0xb8(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x60(%rbp), %rdi
callq 0xc0720
movq -0xc0(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xa1a33
testb $0x1, -0xa9(%rbp)
je 0xa16aa
testb $0x1, -0xaa(%rbp)
je 0xa164c
movq -0xa0(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0xa159d
movq -0x148(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x170(%rbp)
movq -0x98(%rbp), %rdi
callq 0xa0a30
movq -0x170(%rbp), %rdi
movq %rax, %rdx
movq -0xa0(%rbp), %rax
movq 0x8(%rax), %rcx
leaq 0xacfee(%rip), %rsi     # 0x14e54a
movb $0x0, %al
callq 0xf4910
movq %rax, -0xc8(%rbp)
cmpq $0x0, -0xc8(%rbp)
je 0xa159b
movq -0xc8(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0x60(%rbp), %rdi
callq 0xc0720
movq -0xd0(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xa1a33
jmp 0xa159d
cmpq $0x0, -0x18(%rbp)
je 0xa15db
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0xa15db
movq -0xa0(%rbp), %rax
movq %rax, -0x178(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xa0a30
movq -0x178(%rbp), %rdi
movq %rax, %rsi
callq 0xfea50
jmp 0xa164a
movq -0x148(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x180(%rbp)
movq -0x98(%rbp), %rdi
callq 0xa0a30
movq -0x180(%rbp), %rdi
movq %rax, %rdx
leaq 0xacf71(%rip), %rsi     # 0x14e57a
movb $0x0, %al
callq 0xf4910
movq %rax, -0xd8(%rbp)
cmpq $0x0, -0xd8(%rbp)
je 0xa1648
movq -0xd8(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0x60(%rbp), %rdi
callq 0xc0720
movq -0xe0(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xa1a33
jmp 0xa164a
jmp 0xa165e
movq -0xa0(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0xa165c
jmp 0xa165c
jmp 0xa165e
movq -0xa0(%rbp), %rdi
callq 0xff990
movq %rax, -0xe8(%rbp)
movq -0xa0(%rbp), %rdi
movq -0xe8(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rcx
leaq 0x92a3f(%rip), %rsi     # 0x1340d4
movb $0x0, %al
callq 0xfec20
movq -0xe8(%rbp), %rdi
callq 0xff600
jmp 0xa1724
testb $0x1, -0xaa(%rbp)
je 0xa1722
movq -0x148(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x188(%rbp)
movq -0x98(%rbp), %rdi
callq 0xa0a30
movq -0x188(%rbp), %rdi
movq %rax, %rdx
leaq 0xaceeb(%rip), %rsi     # 0x14e5cc
movb $0x0, %al
callq 0xf4910
movq %rax, -0xf0(%rbp)
cmpq $0x0, -0xf0(%rbp)
je 0xa1720
movq -0xf0(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0x60(%rbp), %rdi
callq 0xc0720
movq -0xf8(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xa1a33
jmp 0xa1722
jmp 0xa1724
movq -0xa0(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0xa0b50
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0xa0b50
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl $0xe, 0x10(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x190(%rbp)
movb $0x0, %al
callq 0xff2e0
movq -0x190(%rbp), %rdi
movq %rax, %rdx
movabsq $-0x503db0e6e1c2e704, %rsi # imm = 0xAFC24F191E3D18FC
callq 0xc00e0
movq -0x148(%rbp), %rdi
movq %rax, -0x100(%rbp)
leaq 0x92d88(%rip), %rsi     # 0x13452c
callq 0xa12a0
testb $0x1, %al
jne 0xa17af
jmp 0xa1805
movq -0x148(%rbp), %rdi
movq -0x100(%rbp), %rdx
leaq 0xacd80(%rip), %rsi     # 0x14e544
movb $0x0, %al
callq 0xf4090
movq %rax, -0x108(%rbp)
cmpq $0x0, -0x108(%rbp)
je 0xa1803
movq -0x108(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x60(%rbp), %rdi
callq 0xc0720
movq -0x110(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xa1a33
jmp 0xa184e
cmpq $0x0, -0x98(%rbp)
je 0xa184c
movq -0x100(%rbp), %rax
movq %rax, -0x198(%rbp)
movq -0x98(%rbp), %rdi
callq 0xa0a30
movq -0x198(%rbp), %rdi
movq %rax, %rdx
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rcx
leaq 0x9288f(%rip), %rsi     # 0x1340d4
movb $0x0, %al
callq 0x100210
jmp 0xa184e
movq -0x100(%rbp), %rdi
leaq 0xb11c6(%rip), %rsi     # 0x152a22
callq 0xa88c0
testb $0x1, %al
jne 0xa1a14
movq -0x100(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0xa0b50
movq %rax, -0x118(%rbp)
testb $0x1, -0x19(%rbp)
je 0xa1927
movq -0x118(%rbp), %rdi
callq 0xaa750
testb $0x1, %al
jne 0xa1927
movq -0x148(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x1a8(%rbp)
movq -0x98(%rbp), %rdi
callq 0xa0a30
movq %rax, -0x1a0(%rbp)
movq -0x118(%rbp), %rdi
callq 0xa0a30
movq -0x1a8(%rbp), %rdi
movq -0x1a0(%rbp), %rdx
movq %rax, %rcx
leaq 0xacd06(%rip), %rsi     # 0x14e5ec
movb $0x0, %al
callq 0xf4910
movq %rax, -0x120(%rbp)
cmpq $0x0, -0x120(%rbp)
je 0xa1925
movq -0x120(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x60(%rbp), %rdi
callq 0xc0720
movq -0x128(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xa1a33
jmp 0xa1927
movq -0x118(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
testb $0x1, -0x19(%rbp)
je 0xa1a12
movq -0x118(%rbp), %rdi
callq 0x113640
testb $0x1, %al
jne 0xa1955
jmp 0xa1a12
movq -0x118(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x1136d0
testb $0x1, %al
jne 0xa1a10
movq -0x148(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x1c0(%rbp)
movq -0x98(%rbp), %rdi
callq 0xa0a30
movq %rax, -0x1b8(%rbp)
movq -0x118(%rbp), %rdi
callq 0xa0a30
movq %rax, -0x1b0(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0xa0a30
movq -0x1c0(%rbp), %rdi
movq -0x1b8(%rbp), %rdx
movq -0x1b0(%rbp), %rcx
movq %rax, %r8
leaq 0xacc53(%rip), %rsi     # 0x14e625
movb $0x0, %al
callq 0xf4910
movq %rax, -0x130(%rbp)
cmpq $0x0, -0x130(%rbp)
je 0xa1a0e
movq -0x130(%rbp), %rax
movq %rax, -0x138(%rbp)
movq -0x60(%rbp), %rdi
callq 0xc0720
movq -0x138(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xa1a33
jmp 0xa1a10
jmp 0xa1a12
jmp 0xa1a14
movq $0x0, -0x140(%rbp)
movq -0x60(%rbp), %rdi
callq 0xc0720
movq -0x140(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x1e0, %rsp            # imm = 0x1E0
popq %rbp
retq