// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/xoico/src/xoico.xo.c
// Function: xoico_compiler_s_get_type_member_object_info
bl_t xoico_compiler_s_get_type_member_object_info( const xoico_compiler_s* o, tp_t type, tp_t name, xoico_compiler_element_info_s* info )
{
    // xoico_compiler.x:650:1
    
    const xoico* xoico_item = xoico_compiler_s_get_const_item(o,type );
    if( !xoico_item )
    {
        xoico_item =((const xoico*)( xoico_compiler_s_get_group(((xoico_compiler_s*)(o)),type )));
        if( !xoico_item ) return  false;
    }
    
    bl_t success = false;
    ASSERT( info );
    info->type_info.item = ((xoico*)(xoico_item));
    
    if( xoico_item->_ == ((tp_t)(TYPEOF_xoico_stamp_s)) )
    {
        const xoico_stamp_s* stamp = ((const xoico_stamp_s*)(xoico_item));
        const bcore_self_s* self = stamp->self;
        const bcore_self_item_s* self_item = NULL; // returns NULL in case of no match
    
        if( ( self_item = bcore_self_s_get_item_by_name(self,name ) ) )
        {
            if( bcore_flect_caps_is_array_fix( self_item->caps ) )
            {
                info->type_info.typespec.access_class = TYPEOF_mutable;
                info->type_info.typespec.type = self_item->type;
                info->type_info.typespec.indirection = 1;
                success = true;
            }
            else if( !bcore_flect_caps_is_array_dyn( self_item->caps ) ) // dynamic arrays are handled separately
            {
                sz_t indirection = bcore_flect_caps_get_indirection( self_item->caps );
                info->type_info.typespec.type = self_item->type;
                info->type_info.typespec.indirection = indirection;
                info->type_info.typespec.access_class = ( indirection > 0 ) ? TYPEOF_mutable : 0;
                success = true;
            }
        }
        else if( ( self_item = bcore_self_s_get_first_anonymous_array_item( self ) ) ) /// builtin elements for arrays
        {
            if( name == TYPEOF_size )
            {
                info->type_info.typespec.type = ((tp_t)(TYPEOF_uz_t));
                info->type_info.typespec.indirection = 0;
                info->type_info.typespec.access_class = 0;
                success = true;
            }
            else if( name == TYPEOF_space )
            {
                info->type_info.typespec.type = ((tp_t)(TYPEOF_uz_t));
                info->type_info.typespec.indirection = 0;
                info->type_info.typespec.access_class = 0;
                success = true;
            }
            else if( name == TYPEOF_data )
            {
                info->type_info.typespec.access_class = TYPEOF_mutable;
                info->type_info.typespec.type = self_item->type ? self_item->type : ((tp_t)(TYPEOF_x_inst));
                info->type_info.typespec.indirection = bcore_flect_caps_get_indirection( self_item->caps ) + 1;
                success = true;
            }
            else if( name == TYPEOF_type )
            {
                if( bcore_flect_caps_is_typed( self_item->caps ) )
                {
                    info->type_info.typespec.type = ((tp_t)(TYPEOF_tp_t));
                    info->type_info.typespec.indirection = 0;
                    info->type_info.typespec.access_class = 0;
                    success = true;
                }
            }
        }
    }
    else if( xoico_item->_ == ((tp_t)(TYPEOF_xoico_group_s)) )
    {
        if( name == TYPEOF__ ) // group builtin element '_'
        {
            info->type_info.typespec.type = ((tp_t)(TYPEOF_aware_t));
            info->type_info.typespec.indirection = 0;
            success = true;
        }
    }
    
    return  success;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r13
callq 0x162bb
testq %rax, %rax
jne 0x1ca41
movq %r13, %rdi
movq %r12, %rsi
callq 0x1393c
testq %rax, %rax
je 0x1cb7e
movq %rax, %r15
testq %rbx, %rbx
jne 0x1ca72
leaq 0x8dbf7(%rip), %rdi     # 0xaa647
leaq 0x906ec(%rip), %rsi     # 0xad143
leaq 0x90724(%rip), %rdx     # 0xad182
leaq 0x8d82b(%rip), %rcx     # 0xaa290
movl $0x1893, %r8d           # imm = 0x1893
xorl %eax, %eax
callq 0x5ffac
movq %r15, 0x40(%rbx)
movq (%r15), %rax
movabsq $0x12d01d78049fae7, %rcx # imm = 0x12D01D78049FAE7
cmpq %rcx, %rax
jne 0x1cace
movq 0x50(%r15), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x6392e
testq %rax, %rax
je 0x1cb09
movq %rax, %r15
movl 0x10(%rax), %edi
callq 0x6108c
testb %al, %al
je 0x1cb71
movabsq $-0x2c53c3baa9910217, %rax # imm = 0xD3AC3C45566EFDE9
movq %rax, 0x20(%rbx)
movq (%r15), %rax
movq %rax, 0x18(%rbx)
pushq $0x1
popq %rax
pushq $0x30
jmp 0x1cbab
movabsq $0xc561a9d047fe9d3, %rcx # imm = 0xC561A9D047FE9D3
xorq %rcx, %rax
movabsq $-0x509bedb379fdb7b2, %rcx # imm = 0xAF64124C8602484E
xorq %rcx, %r14
orq %rax, %r14
jne 0x1cb7e
movabsq $-0x388c46b188de83fe, %rax # imm = 0xC773B94E77217C02
movq %rax, 0x18(%rbx)
pushq $0x30
popq %rcx
xorl %eax, %eax
jmp 0x1cbac
movq %r12, %rdi
callq 0x63983
testq %rax, %rax
je 0x1cb7e
movabsq $-0x7aa4aa98cf5cb5fb, %rcx # imm = 0x855B556730A34A05
cmpq %rcx, %r14
je 0x1cbd4
movabsq $-0x586bc610840563d3, %rcx # imm = 0xA79439EF7BFA9C2D
cmpq %rcx, %r14
je 0x1cbbc
movabsq $0x436cf28ab247e3e5, %rax # imm = 0x436CF28AB247E3E5
cmpq %rax, %r14
je 0x1cb5a
movabsq $0x4dea9618e618ae3c, %rax # imm = 0x4DEA9618E618AE3C
cmpq %rax, %r14
jne 0x1cb7e
movabsq $-0x4882601bdca6aefb, %rax # imm = 0xB77D9FE423595105
movq %rax, 0x18(%rbx)
andq $0x0, 0x30(%rbx)
pushq $0x20
jmp 0x1cb01
movl 0x10(%r15), %edi
callq 0x61082
testb %al, %al
je 0x1cb82
xorl %eax, %eax
jmp 0x1cbb2
movl 0x10(%r15), %edi
callq 0x610cc
movq (%r15), %rcx
movq %rcx, 0x18(%rbx)
movq %rax, 0x30(%rbx)
xorl %ecx, %ecx
testq %rax, %rax
movabsq $-0x2c53c3baa9910217, %rax # imm = 0xD3AC3C45566EFDE9
cmovleq %rcx, %rax
pushq $0x20
popq %rcx
movq %rax, (%rbx,%rcx)
movb $0x1, %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl 0x10(%rax), %edi
callq 0x610ba
testb %al, %al
je 0x1cb7e
movabsq $0x6d07f9ef5b68e8a2, %rax # imm = 0x6D07F9EF5B68E8A2
jmp 0x1cb64
movabsq $-0x2c53c3baa9910217, %rcx # imm = 0xD3AC3C45566EFDE9
movq %rcx, 0x20(%rbx)
movq (%rax), %rcx
testq %rcx, %rcx
movabsq $-0x3b1008a961ddaa8, %rdx # imm = 0xFC4EFF7569E22558
cmovneq %rcx, %rdx
movq %rdx, 0x18(%rbx)
movl 0x10(%rax), %edi
callq 0x610cc
incq %rax
jmp 0x1cac7