// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/xoico/src/xoico.xo.c
// Function: xoico_stamp_s_push_compact_initializer_func
er_t xoico_stamp_s_push_compact_initializer_func( xoico_stamp_s* o )
{
    // xoico_stamp.x:615:1
    BLM_INIT_LEVEL(0);
    xoico_compiler_s* compiler = o->group->compiler;
    
    st_s sig;BLM_T_INIT_SPUSH(st_s, &sig);;
    st_s body;BLM_T_INIT_SPUSH(st_s, &body);;
    st_s_push_fa(&(sig),"o _(m@* o" );
    
    bcore_self_s* self = ((bcore_self_s*)BLM_LEVEL_T_PUSH(0,bcore_self_s,bcore_self_s_create())); self->type = o->tp_name; self->trait = o->trait_name;
    
    sc_t err_prefix = "Cannot setup member for compact initialization";
    
    {const xoico_stamp_arr_self_item_s* __a=o->arr_self_item ;if(__a)for(sz_t __i=0;__i<__a->size;__i++){const xoico_stamp_self_item_s* self_item=&(__a->data[__i]);
    {
        if( self_item->arg_of_initializer )
        {BLM_INIT_LEVEL(5);
            bcore_self_item_s* item = ((bcore_self_item_s*)BLM_LEVEL_T_PUSH(5,bcore_self_item_s,bcore_self_item_s_create()));
            BLM_TRY(xoico_stamp_self_item_s_to_bcore_self_item(self_item,self, item ))
    
            if( !item->type ) BLM_RETURNV(er_t, x_source_point_s_parse_error_fa(&(self_item->source_point),"#<sc_t>: Item has no type.", err_prefix ))
            if( !item->name ) BLM_RETURNV(er_t, x_source_point_s_parse_error_fa(&(self_item->source_point),"#<sc_t>: Item has no name.", err_prefix ))
            if( bcore_flect_caps_is_array( item->caps ) ) BLM_RETURNV(er_t, x_source_point_s_parse_error_fa(&(self_item->source_point),"#<sc_t>: Item is an array.", err_prefix ))
            if( bcore_flect_caps_is_typed( item->caps ) ) BLM_RETURNV(er_t, x_source_point_s_parse_error_fa(&(self_item->source_point),"#<sc_t>: Item is typed.", err_prefix ))
            sz_t indirection = bcore_flect_caps_get_indirection( item->caps );
            bl_t is_leaf = bcore_type_is_leaf( item->type );
            bl_t is_pointer = ( item->caps == BCORE_CAPS_POINTER );
    
            sc_t sc_type = bnameof( item->type );
            sc_t sc_name = bnameof( item->name );
    
            if( indirection == 0 )
            {
                if( is_leaf )
                {
                    st_s_push_fa(&(sig),", #<sc_t> #<sc_t>", sc_type, sc_name );
                    st_s_push_fa(&(body),"    o.#<sc_t> = #<sc_t>;\n", sc_name, sc_name );
                }
                else
                {
                    st_s_push_fa(&(sig),", c #<sc_t>* #<sc_t>", sc_type, sc_name );
                    st_s_push_fa(&(body),"    o.#<sc_t>.copy( #<sc_t> );\n", sc_name, sc_name );
                }
            }
            else
            {
                if( is_leaf || is_pointer )
                {
                    st_s_push_fa(&(sig),", m #<sc_t>* #<sc_t>", sc_type, sc_name );
                    st_s_push_fa(&(body),"    o.#<sc_t> = #<sc_t>;\n", sc_name, sc_name );
                }
                else if( self_item->copy_from_initializer )
                {
                    st_s_push_fa(&(sig),", c #<sc_t>* #<sc_t>", sc_type, sc_name );
                    st_s_push_fa(&(body),"    o.#<sc_t> =< #<sc_t>.clone();\n", sc_name, sc_name );
                }
                else
                {
                    st_s_push_fa(&(sig),", d #<sc_t>* #<sc_t>", sc_type, sc_name );
                    st_s_push_fa(&(body),"    o.#<sc_t> =< #<sc_t>;\n", sc_name, sc_name );
                }
            }
        BLM_DOWN();}
    }
    }}st_s_push_fa(&(sig),")" );
    
    st_s st_func;BLM_T_INIT_SPUSH(st_s, &st_func);st_s_push_fa(&(st_func),"#<sc_t>\n"
        "{\n"
        "#<sc_t>"
        "    return o;\n"
        "};",
        sig.sc,
        body.sc
    );
    
    sz_t idx = xoico_funcs_s_get_index_from_name(&(o->funcs),xoico_compiler_s_entypeof(compiler,"_" ) );
    if( idx >= 0 )
    {
        BLM_RETURNV(er_t, x_source_point_s_parse_error_fa(&(o->funcs.data[ idx ]->source_point),"Explicit compact function declaration not possible because this stamp has one or more member elements marked for compact initialization."
        ))
    }
    
    xoico_func_s* func = ((xoico_func_s*)BLM_LEVEL_T_PUSH(0,xoico_func_s,xoico_func_s_create()));
    BLM_TRY(xoico_parse_sc(((xoico*)(func)),((const xoico_host*)(o)), st_func.sc ))
    x_array_push_d(((x_array*)(&(o->funcs))),((x_inst*)(((xoico_func_s*)bcore_fork(func)) )));
    
    BLM_RETURNV(er_t, 0)
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
movabsq $-0x503db0e6e1c2e704, %r13 # imm = 0xAFC24F191E3D18FC
leaq 0xffd73(%rip), %rax     # 0x117dd0
movq (%rax), %rsi
leaq 0x38(%rsp), %r15
movq %r15, %rdi
callq 0x717f5
andq $0x0, 0x10(%r15)
movq 0xc8(%rbx), %rax
movq 0x140(%rax), %rax
movq %rax, 0x8(%rsp)
leaq 0x88(%rsp), %r14
movq %r14, %rdi
callq 0x8e048
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x71998
leaq 0x68(%rsp), %r12
movq %r12, %rdi
callq 0x8e048
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x71998
leaq 0x93a43(%rip), %rsi     # 0xabb08
movq %r14, %rdi
xorl %eax, %eax
callq 0x8f4ef
xorl %eax, %eax
callq 0x63846
movabsq $-0x4b706df6ad0a9f1, %rdx # imm = 0xFB48F920952F560F
movq %r15, %rdi
xorl %esi, %esi
movq %rax, %rcx
callq 0x71967
movups 0x28(%rbx), %xmm0
movq %rax, 0x20(%rsp)
movups %xmm0, 0x8(%rax)
movq %rbx, 0x10(%rsp)
movq 0x40(%rbx), %rax
testq %rax, %rax
je 0x182d4
leaq 0x93a2e(%rip), %rbx     # 0xabb41
xorl %r13d, %r13d
xorl %ecx, %ecx
movq %rax, 0x18(%rsp)
cmpq 0x10(%rax), %rcx
jae 0x182d4
movq 0x8(%rax), %rbp
cmpb $0x1, 0x40(%rbp,%r13)
jne 0x182c8
movq %rcx, 0x30(%rsp)
movq %rbp, %r14
addq %r13, %r14
leaq 0xa8(%rsp), %rdi
movq %rdi, (%rsp)
leaq 0x38(%rsp), %rsi
callq 0x717f5
movq (%rsp), %r15
movq $0x5, 0x10(%r15)
xorl %eax, %eax
callq 0x61245
movq %r15, %rdi
pushq $0x5
popq %rsi
movabsq $0x1a76aac8b75a6b47, %rdx # imm = 0x1A76AAC8B75A6B47
movq %rax, %rcx
callq 0x71967
movq %rax, %r15
movq %r14, %rdi
movq 0x20(%rsp), %rsi
movq %rax, %rdx
callq 0x1842d
testq %rax, %rax
jne 0x1840c
cmpq $0x0, (%r15)
je 0x183f0
cmpq $0x0, 0x8(%r15)
je 0x183d7
movl 0x10(%r15), %edi
callq 0x61078
testb %al, %al
jne 0x183e0
movl 0x10(%r15), %edi
callq 0x610ba
testb %al, %al
jne 0x183e9
movl 0x10(%r15), %edi
callq 0x610cc
movq %rax, %rbx
movq (%r15), %rdi
callq 0x73359
movl %eax, %r14d
movl 0x10(%r15), %r12d
movq (%r15), %rdi
callq 0x71db6
movq %rax, 0x28(%rsp)
movq 0x8(%r15), %rdi
callq 0x71db6
movq %rax, %r15
testq %rbx, %rbx
je 0x1825c
cmpl $0x5, %r12d
sete %al
orb %al, %r14b
leaq 0x939eb(%rip), %rsi     # 0xabc0b
leaq 0x93995(%rip), %r14     # 0xabbbc
leaq 0x93913(%rip), %rbx     # 0xabb41
jne 0x1828a
cmpb $0x0, 0x41(%rbp,%r13)
leaq 0x93a06(%rip), %rsi     # 0xabc43
leaq 0x93992(%rip), %rax     # 0xabbd6
cmovneq %rax, %rsi
leaq 0x93a09(%rip), %r14     # 0xabc58
leaq 0x939ca(%rip), %rax     # 0xabc20
cmovneq %rax, %r14
jmp 0x1828a
testb %r14b, %r14b
leaq 0x93970(%rip), %rsi     # 0xabbd6
leaq 0x9393d(%rip), %rax     # 0xabbaa
cmovneq %rax, %rsi
leaq 0x93973(%rip), %r14     # 0xabbeb
leaq 0x9393d(%rip), %rax     # 0xabbbc
cmovneq %rax, %r14
leaq 0x938b7(%rip), %rbx     # 0xabb41
leaq 0x88(%rsp), %rdi
movq 0x28(%rsp), %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x8f4ef
leaq 0x68(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x8f4ef
movq %rsp, %rdi
callq 0x71b48
movq 0x18(%rsp), %rax
movq 0x30(%rsp), %rcx
incq %rcx
addq $0x48, %r13
jmp 0x1811d
leaq 0xb0c0c(%rip), %rsi     # 0xc8ee7
leaq 0x88(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8f4ef
leaq 0xa8(%rsp), %r14
movq %r14, %rdi
callq 0x8e048
leaq 0x38(%rsp), %rdi
movabsq $-0x503db0e6e1c2e704, %rsi # imm = 0xAFC24F191E3D18FC
movq %r14, %rdx
callq 0x71998
movq 0x8(%rbx), %rdx
movq 0x70(%rsp), %rcx
leaq 0x9394f(%rip), %rsi     # 0xabc73
movq %r14, %rdi
xorl %eax, %eax
callq 0x8f4ef
movq 0x10(%rsp), %rbx
leaq 0x58(%rbx), %r15
movq 0x8(%rsp), %rdi
addq $0x140, %rdi            # imm = 0x140
leaq 0x9582a(%rip), %rsi     # 0xadb74
callq 0x6f48c
movq %r15, %rdi
movq %rax, %rsi
callq 0x11598
testq %rax, %rax
js 0x1837e
movq 0x60(%rbx), %rcx
movq (%rcx,%rax,8), %rdi
addq $0x48, %rdi
leaq 0x93923(%rip), %rsi     # 0xabc95
xorl %eax, %eax
callq 0xf256
movq %rax, %r12
jmp 0x183d0
callq 0x10ebb
leaq 0x38(%rsp), %rdi
movabsq $-0x58b74b3ddbc4f8b6, %rdx # imm = 0xA748B4C2243B074A
xorl %esi, %esi
movq %rax, %rcx
callq 0x71967
movq %rax, %r14
movq 0xb0(%rsp), %rdx
movq %rax, %rdi
movq %rbx, %rsi
callq 0xd848
movq %rax, %r12
testq %rax, %rax
jne 0x183d0
movq %r14, %rdi
callq 0x6026d
movq %r15, %rdi
movq %rax, %rsi
callq 0xf6dd
xorl %r12d, %r12d
leaq 0x38(%rsp), %rdi
jmp 0x18413
leaq 0x9377e(%rip), %rbx     # 0xabb5c
jmp 0x183f0
leaq 0x93790(%rip), %rbx     # 0xabb77
jmp 0x183f0
leaq 0x937a2(%rip), %rbx     # 0xabb92
leaq 0x8(,%r13), %rdi
addq %rbp, %rdi
leaq 0x93710(%rip), %rdx     # 0xabb12
movq %rbx, %rsi
xorl %eax, %eax
callq 0xf256
movq %rax, %r12
movq (%rsp), %rdi
callq 0x71b64
movq %r12, %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq