// File: /workspace/github_c_makefile_star2_O3/johsteffens[P]beth/xoico/src/xoico.xo.c
// Function: xoico_compiler_s_get_type_member_function_info
bl_t xoico_compiler_s_get_type_member_function_info( const xoico_compiler_s* o, tp_t type, tp_t name, xoico_compiler_element_info_s* info )
{
    // xoico_compiler.x:596: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( ( info->func = ((xoico_func_s*)(xoico_stamp_s_get_traitline_func_from_name(stamp,name ))) ) ) /// trait-line function
        {
            success = true;
        }
        else if( ( self_item = bcore_self_s_get_item_by_name(self,name ) ) )
        {
            if( self_item->caps == BCORE_CAPS_EXTERNAL_FUNC )
            {
                info->func = ((xoico_func_s*)(xoico_stamp_s_get_func_from_name(stamp,name )));
                ASSERT( info->func );
                success = true;
            }
        }
    }
    else if( xoico_item->_ == ((tp_t)(TYPEOF_xoico_group_s)) )
    {
        const xoico_group_s* group = ((xoico_group_s*)(xoico_item));
        info->func = ((xoico_func_s*)(xoico_group_s_get_traitline_func_from_name(group,name )));
        if( info->func ) success = true;
    }
    
    if( !success )
    {
        if( xoico_compiler_s_is_func(o,name ) )
        {
            info->func = xoico_compiler_s_get_func(((xoico_compiler_s*)(o)),name );
            success = true;
        }
    }
    
    return  success;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %r15
addq $0x78, %rdi
callq 0xca94f
testq %rax, %rax
je 0x313e2
movq (%rax), %r12
testq %r12, %r12
jne 0x31403
leaq 0x50(%r15), %rdi
movq %r13, %rsi
callq 0xca94f
testq %rax, %rax
je 0x314f8
movq (%rax), %r12
testq %r12, %r12
je 0x314f8
testq %rbx, %rbx
jne 0x31431
leaq 0xfc238(%rip), %rdi     # 0x12d647
leaq 0xfed2d(%rip), %rsi     # 0x130143
leaq 0xfed2b(%rip), %rdx     # 0x130148
leaq 0xfbe6c(%rip), %rcx     # 0x12d290
movl $0x185d, %r8d           # imm = 0x185D
xorl %eax, %eax
callq 0xbe4ef
movq %r12, 0x40(%rbx)
movq (%r12), %rax
movabsq $0xc561a9d047fe9d3, %rcx # imm = 0xC561A9D047FE9D3
cmpq %rcx, %rax
je 0x314b6
movabsq $0x12d01d78049fae7, %rcx # imm = 0x12D01D78049FAE7
cmpq %rcx, %rax
jne 0x314cd
movq 0x50(%r12), %r13
movq %r12, %rdi
movq %r14, %rsi
callq 0x28b11
movq %rax, 0x48(%rbx)
movb $0x1, %bpl
testq %rax, %rax
jne 0x31505
movq %r13, %rdi
movq %r14, %rsi
callq 0xc3388
testq %rax, %rax
je 0x314cd
cmpl $0xe, 0x10(%rax)
jne 0x314cd
movq 0x68(%r12), %rax
testq %rax, %rax
je 0x31521
movq 0x60(%r12), %rdx
xorl %ecx, %ecx
movq (%rdx,%rcx,8), %rsi
cmpq %r14, 0x8(%rsi)
je 0x31516
incq %rcx
cmpq %rcx, %rax
jne 0x314a2
jmp 0x31521
movq %r12, %rdi
movq %r14, %rsi
callq 0x20bbb
movq %rax, 0x48(%rbx)
movb $0x1, %bpl
testq %rax, %rax
jne 0x31505
addq $0xa0, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xca9a0
testb %al, %al
je 0x314f8
movq %r15, %rdi
movq %r14, %rsi
callq 0xca94f
testq %rax, %rax
je 0x314fc
movq (%rax), %rax
jmp 0x314fe
xorl %ebp, %ebp
jmp 0x31505
xorl %eax, %eax
movq %rax, 0x48(%rbx)
movb $0x1, %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testq %rcx, %rcx
js 0x31521
movq %rsi, 0x48(%rbx)
jmp 0x31505
movq $0x0, 0x48(%rbx)
leaq 0xfc117(%rip), %rdi     # 0x12d647
leaq 0xfec40(%rip), %rsi     # 0x130177
leaq 0xfec0a(%rip), %rdx     # 0x130148
leaq 0xfbd4b(%rip), %rcx     # 0x12d290
movl $0x186f, %r8d           # imm = 0x186F
xorl %eax, %eax
callq 0xbe4ef
jmp 0x31505