// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/xoico/src/xoico.xo.c
// Function: xoico_group_s_finalize
er_t xoico_group_s_finalize( xoico_group_s* o, const xoico_host* host )
{
    // xoico_group.x:871:1
    
    /// default features
    BLM_TRY(xoico_group_s_push_inexpandable_feature_from_sc(o,"d @* clone( c @* o );" ))
    BLM_TRY(xoico_group_s_push_inexpandable_feature_from_sc(o,"void copy( m @* o, c @* src );" ))
    BLM_TRY(xoico_group_s_push_inexpandable_feature_from_sc(o,"void discard( m @* o );" ))
    BLM_TRY(xoico_group_s_push_inexpandable_func_from_sc(o,"d obliv @* t_create( tp_t t );" ))
    
    // check validity of trait name
    if( !xoico_compiler_s_is_group(xoico_host_a_compiler(host),o->trait_name ) )
    {
        return  x_source_point_s_parse_error_fa(o->source_point,"In group '#<sc_t>': Trait name '#<sc_t>' is not a group.", o->st_name.sc, xoico_host_a_nameof(host,o->trait_name ) );
    }
    
    {const xoico_group_s* __a=o ;if(__a)for(sz_t __i=0;__i<__a->size;__i++){xoico* e=__a->data[__i]; BLM_TRY(xoico_a_finalize(e,((const xoico_host*)(o ))))
    }}{const xoico_funcs_s* __a=&(o->funcs );if(__a)for(sz_t __i=0;__i<__a->size;__i++){xoico_func_s* func=__a->data[__i];
    {
        BLM_TRY(xoico_func_s_finalize(func,((const xoico_host*)(o ))))
        BLM_TRY(xoico_compiler_s_register_func(o->compiler,func ))
        bcore_hmap_tpvd_s_set(&(o->hmap_func),func->name, ( vd_t )func );
    }
    }}return  0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x94e33(%rip), %rsi     # 0xab41b
callq 0x13ea8
testq %rax, %rax
jne 0x1662e
leaq 0x94e38(%rip), %rsi     # 0xab431
movq %rbx, %rdi
callq 0x13ea8
testq %rax, %rax
jne 0x1662e
leaq 0x94e43(%rip), %rsi     # 0xab450
movq %rbx, %rdi
callq 0x13ea8
testq %rax, %rax
jne 0x1662e
leaq 0x94e47(%rip), %rsi     # 0xab468
movq %rbx, %rdi
callq 0x13ffa
testq %rax, %rax
je 0x16652
movq %rax, %r14
leaq 0x101798(%rip), %rax    # 0x117dd0
movq (%rax), %rdi
callq 0x71b64
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
callq 0xdab3
movq 0xb0(%rbx), %rsi
leaq 0x50(%rax), %rdi
callq 0x68f9b
testb %al, %al
je 0x1669a
xorl %r15d, %r15d
cmpq 0x10(%rbx), %r15
jae 0x166dc
movq 0x8(%rbx), %rax
movq (%rax,%r15,8), %r14
movq %r14, %rdi
callq 0x2d62b
movq %r14, %rdi
movq %rbx, %rsi
callq *0x30(%rax)
incq %r15
testq %rax, %rax
je 0x16671
jmp 0x1662e
movq 0x148(%rbx), %r14
movq 0x90(%rbx), %r12
movq 0xb0(%rbx), %rsi
movq %r15, %rdi
callq 0xdf58
leaq 0x94dc9(%rip), %rsi     # 0xab487
movq %r14, %rdi
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf256
leaq 0x178(%rbx), %r15
xorl %r14d, %r14d
xorl %ebp, %ebp
cmpq 0x128(%rbx), %rbp
jae 0x16640
movq 0x120(%rbx), %rax
movq (%rax,%rbp,8), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x116b0
testq %rax, %rax
jne 0x16739
movq 0x140(%rbx), %rdi
movq %r12, %rsi
callq 0x16753
testq %rax, %rax
jne 0x16739
movq 0x8(%r12), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x68dba
incq %rbp
jmp 0x166e8
movq %rax, %r13
leaq 0x10168d(%rip), %rax    # 0x117dd0
movq (%rax), %rdi
callq 0x71b64
movq %r13, %r14
jmp 0x16640