// File: /workspace/github_c_makefile_star2_O0/johsteffens[P]beth/lib/bcore/bcore_flect.c
// Function: bcore_self_s_parse_src
bcore_self_s* bcore_self_s_parse_src( sr_s src, uz_t size_of, uz_t align_of, sc_t namespace, bl_t advanced_checks )
{
    bcore_life_s* l = bcore_life_s_create();
    src = bcore_life_s_push_sr( l, sr_cp( src, TYPEOF_bcore_source_s ) );
    bcore_self_s* o = bcore_self_s_create();

    st_s* identifier = st_s_create_l( l );

    if( bcore_source_r_parse_bl_fa( &src, " #?':'" ) )
    {
        ASSERT( namespace );
        st_s* name = st_s_create();
        bcore_source_r_parse_fa( &src, " #name", name );
        st_s_copy_fa( identifier, "#<sc_t>_#<sc_t>", namespace, name->sc );
        st_s_discard( name );
    }
    else
    {
        bcore_source_r_parse_fa( &src, " #name", identifier );
    }

    o->type = ( identifier->size > 0 ) ? entypeof( identifier->sc ) : 0;
    if( o->type ) bcore_source_r_parse_fa( &src, " =" );

    bl_t aware = bcore_source_r_parse_bl_fa( &src, " #?w'aware'" );

    bcore_source_r_parse_fa( &src, " #name", identifier );
    tp_t type2 = ( identifier->size > 0 ) ? entypeof( identifier->sc ) : 0;

    bcore_source_r_parse_fa( &src, " #name", identifier );
    tp_t type3 = ( identifier->size > 0 ) ? entypeof( identifier->sc ) : 0;

    if( aware || bcore_source_r_parse_bl_fa( &src, " #=?'{'" ) )
    {
        o->trait  = type2 ? type2 : typeof( "bcore_inst" );
        o->parent = type3;
        o->body = bcore_self_body_s_create();
        bcore_self_body_s_parse_src( o->body, src, o, aware, advanced_checks );

        if( !o->type )
        {
            o->type = bcore_self_body_s_fold_tp( o->body, bcore_tp_init() );
        }
    }
    else
    {
        if( !o->type ) bcore_source_r_parse_errf( &src, "Anonymous types need a body." );
        const bcore_self_s* self_l = bcore_flect_try_self( type2 );
        if( !self_l ) bcore_source_r_parse_errf( &src, "Type %s not defined.", ifnameof( type2 ) );
        o->trait = self_l->trait;
        o->parent = self_l->parent;
        o->body = bcore_self_body_s_clone( self_l->body );
        o->size = self_l->size;
    }

    o->size = size_of;
    o->align = align_of;
    bcore_life_s_discard( l );
    return o;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movb %cl, %al
leaq 0x10(%rbp), %rcx
movq %rcx, -0x98(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
movb $0x0, %al
callq 0xbfdd0
movq %rax, %rcx
movq -0x98(%rbp), %rax
movq %rcx, -0x28(%rbp)
movq -0x28(%rbp), %rcx
movq %rcx, -0xa0(%rbp)
leaq -0x58(%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 -0xa0(%rbp), %rsi
leaq -0x40(%rbp), %rdi
leaq -0x58(%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 -0x98(%rbp), %rax
movq -0x40(%rbp), %rcx
movq %rcx, (%rax)
movq -0x38(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rcx
movq %rcx, 0x10(%rax)
callq 0xa5460
movq %rax, -0x60(%rbp)
movq -0x28(%rbp), %rdi
callq 0xff5c0
movq -0x98(%rbp), %rdi
movq %rax, -0x68(%rbp)
leaq 0x8e2ee(%rip), %rsi     # 0x1342d2
callq 0xa12a0
testb $0x1, %al
jne 0xa5fef
jmp 0xa606c
cmpq $0x0, -0x18(%rbp)
jne 0xa601f
leaq 0x8d9a2(%rip), %rdi     # 0x13399f
leaq 0xab159(%rip), %rsi     # 0x15115d
leaq 0xa7dd6(%rip), %rdx     # 0x14dde1
leaq 0xa77b0(%rip), %rcx     # 0x14d7c2
movl $0x6fc, %r8d            # imm = 0x6FC
movb $0x0, %al
callq 0x9cea0
movb $0x0, %al
callq 0xff2e0
movq -0x98(%rbp), %rdi
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rdx
leaq 0xa8507(%rip), %rsi     # 0x14e543
movb $0x0, %al
callq 0xf3f70
movq -0x68(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rcx
leaq 0x8e07a(%rip), %rsi     # 0x1340d4
movb $0x0, %al
callq 0xfec20
movq -0x70(%rbp), %rdi
callq 0xff600
jmp 0xa6085
movq -0x98(%rbp), %rdi
movq -0x68(%rbp), %rdx
leaq 0xa84c5(%rip), %rsi     # 0x14e543
movb $0x0, %al
callq 0xf3f70
movq -0x68(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jbe 0xa60a6
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0xa0b50
movq %rax, -0xa8(%rbp)
jmp 0xa60b1
xorl %eax, %eax
movq %rax, -0xa8(%rbp)
jmp 0xa60b1
movq -0xa8(%rbp), %rcx
movq -0x60(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x60(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xa60e0
movq -0x98(%rbp), %rdi
leaq 0x8f232(%rip), %rsi     # 0x13530b
movb $0x0, %al
callq 0xf3f70
movq -0x98(%rbp), %rdi
leaq 0x8d410(%rip), %rsi     # 0x1334fe
callq 0xa12a0
movq -0x98(%rbp), %rdi
andb $0x1, %al
movb %al, -0x71(%rbp)
movq -0x68(%rbp), %rdx
leaq 0xa8439(%rip), %rsi     # 0x14e543
movb $0x0, %al
callq 0xf3f70
movq -0x68(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jbe 0xa6132
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0xa0b50
movq %rax, -0xb0(%rbp)
jmp 0xa613d
xorl %eax, %eax
movq %rax, -0xb0(%rbp)
jmp 0xa613d
movq -0x98(%rbp), %rdi
movq -0xb0(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x68(%rbp), %rdx
leaq 0xa83e9(%rip), %rsi     # 0x14e543
movb $0x0, %al
callq 0xf3f70
movq -0x68(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jbe 0xa6182
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0xa0b50
movq %rax, -0xb8(%rbp)
jmp 0xa618d
xorl %eax, %eax
movq %rax, -0xb8(%rbp)
jmp 0xa618d
movq -0xb8(%rbp), %rax
movq %rax, -0x88(%rbp)
testb $0x1, -0x71(%rbp)
jne 0xa61bd
movq -0x98(%rbp), %rdi
leaq 0x8d774(%rip), %rsi     # 0x133923
callq 0xa12a0
testb $0x1, %al
jne 0xa61bd
jmp 0xa6292
cmpq $0x0, -0x80(%rbp)
je 0xa61d1
movq -0x80(%rbp), %rax
movq %rax, -0xc0(%rbp)
jmp 0xa61e4
leaq 0xa7c20(%rip), %rdi     # 0x14ddf8
callq 0xa63d0
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rcx
movq -0x60(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x88(%rbp), %rcx
movq -0x60(%rbp), %rax
movq %rcx, 0x18(%rax)
callq 0xa4a50
movq -0x98(%rbp), %rdx
movq %rax, %rcx
movq -0x60(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x60(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x60(%rbp), %rsi
movb -0x71(%rbp), %cl
movb -0x19(%rbp), %al
andb $0x1, %cl
andb $0x1, %al
movq (%rdx), %r8
movq %r8, (%rsp)
movq 0x8(%rdx), %r8
movq %r8, 0x8(%rsp)
movq 0x10(%rdx), %rdx
movq %rdx, 0x10(%rsp)
movzbl %cl, %edx
movzbl %al, %ecx
callq 0xa63f0
movq -0x60(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0xa628d
movq -0x60(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0xc8(%rbp)
callq 0xa8910
movq -0xc8(%rbp), %rdi
movq %rax, %rsi
callq 0xa4db0
movq %rax, %rcx
movq -0x60(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0xa6341
movq -0x60(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0xa62b2
movq -0x98(%rbp), %rdi
leaq 0xa7b58(%rip), %rsi     # 0x14de03
movb $0x0, %al
callq 0xf41c0
movq -0x80(%rbp), %rdi
callq 0xa6610
movq %rax, -0x90(%rbp)
cmpq $0x0, -0x90(%rbp)
jne 0xa62ed
movq -0x80(%rbp), %rdi
callq 0xa0a30
movq -0x98(%rbp), %rdi
movq %rax, %rdx
leaq 0xa7b3a(%rip), %rsi     # 0x14de20
movb $0x0, %al
callq 0xf41c0
movq -0x90(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x60(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x90(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x60(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x90(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0xa4ab0
movq %rax, %rcx
movq -0x60(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x90(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x60(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rcx
movq -0x60(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rcx
movq -0x60(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x28(%rbp), %rdi
callq 0xbfe00
movq -0x60(%rbp), %rax
addq $0xe0, %rsp
popq %rbp
retq
nop