// File: /workspace/github_c_makefile_star2_O3/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, %r15
movq %rdi, %r12
addq $0x78, %rdi
callq 0xca94f
testq %rax, %rax
je 0x3157f
movq (%rax), %r13
testq %r13, %r13
jne 0x315a3
addq $0x50, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0xca94f
testq %rax, %rax
je 0x316e1
movq (%rax), %r13
testq %r13, %r13
je 0x316e1
testq %rbx, %rbx
jne 0x315d1
leaq 0xfc098(%rip), %rdi     # 0x12d647
leaq 0xfeb8d(%rip), %rsi     # 0x130143
leaq 0xfebc5(%rip), %rdx     # 0x130182
leaq 0xfbccc(%rip), %rcx     # 0x12d290
movl $0x1893, %r8d           # imm = 0x1893
xorl %eax, %eax
callq 0xbe4ef
movq %r13, 0x40(%rbx)
movq (%r13), %rcx
movabsq $0x12d01d78049fae7, %rax # imm = 0x12D01D78049FAE7
cmpq %rax, %rcx
jne 0x31633
movq 0x50(%r13), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0xc3388
testq %rax, %rax
je 0x31675
movq %rax, %r15
movl 0x10(%rax), %edi
callq 0xbf7ac
testb %al, %al
je 0x316d4
movabsq $-0x2c53c3baa9910217, %rax # imm = 0xD3AC3C45566EFDE9
movq %rax, 0x20(%rbx)
movq (%r15), %rax
movq %rax, 0x18(%rbx)
movl $0x1, %eax
movl $0x30, %ecx
jmp 0x31711
xorl %eax, %eax
movabsq $-0x509bedb379fdb7b2, %rdx # imm = 0xAF64124C8602484E
cmpq %rdx, %r14
jne 0x31717
movabsq $0xc561a9d047fe9d3, %rdx # imm = 0xC561A9D047FE9D3
cmpq %rdx, %rcx
jne 0x31717
movabsq $-0x388c46b188de83fe, %rax # imm = 0xC773B94E77217C02
movq %rax, 0x18(%rbx)
movl $0x30, %ecx
xorl %eax, %eax
jmp 0x31711
movq %r12, %rdi
callq 0xc33e5
testq %rax, %rax
je 0x316e1
movq %rax, %rcx
xorl %eax, %eax
movabsq $0x436cf28ab247e3e4, %rdx # imm = 0x436CF28AB247E3E4
cmpq %rdx, %r14
jg 0x31721
movabsq $-0x7aa4aa98cf5cb5fb, %rdx # imm = 0x855B556730A34A05
cmpq %rdx, %r14
je 0x3175f
movabsq $-0x586bc610840563d3, %rdx # imm = 0xA79439EF7BFA9C2D
cmpq %rdx, %r14
jne 0x31717
movl 0x10(%rcx), %edi
callq 0xbf7da
testb %al, %al
je 0x316e1
movabsq $0x6d07f9ef5b68e8a2, %rax # imm = 0x6D07F9EF5B68E8A2
jmp 0x31749
movl 0x10(%r15), %edi
callq 0xbf7a2
testb %al, %al
je 0x316e5
xorl %eax, %eax
jmp 0x31717
movl 0x10(%r15), %edi
callq 0xbf7ec
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
movl $0x20, %ecx
movq %rax, (%rbx,%rcx)
movb $0x1, %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movabsq $0x436cf28ab247e3e5, %rcx # imm = 0x436CF28AB247E3E5
cmpq %rcx, %r14
je 0x3173f
movabsq $0x4dea9618e618ae3c, %rcx # imm = 0x4DEA9618E618AE3C
cmpq %rcx, %r14
jne 0x31717
movabsq $-0x4882601bdca6aefb, %rax # imm = 0xB77D9FE423595105
movq %rax, 0x18(%rbx)
movq $0x0, 0x30(%rbx)
movl $0x20, %ecx
jmp 0x3166e
movabsq $-0x2c53c3baa9910217, %rax # imm = 0xD3AC3C45566EFDE9
movq %rax, 0x20(%rbx)
movq (%rcx), %rax
testq %rax, %rax
movabsq $-0x3b1008a961ddaa8, %rdx # imm = 0xFC4EFF7569E22558
cmovneq %rax, %rdx
movq %rdx, 0x18(%rbx)
movl 0x10(%rcx), %edi
callq 0xbf7ec
incq %rax
jmp 0x31629