// File: /workspace/github_c_makefile_star2_O3/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, %r14 # imm = 0xAFC24F191E3D18FC
leaq 0x172320(%rip), %rax    # 0x19bdd0
movq (%rax), %rsi
leaq 0x38(%rsp), %r12
movq %r12, %rdi
callq 0xd6675
movq $0x0, 0x10(%r12)
movq 0xc8(%rbx), %rax
movq 0x140(%rax), %rax
movq %rax, 0x10(%rsp)
leaq 0x88(%rsp), %r15
movq %r15, %rdi
callq 0x109030
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xd68d9
leaq 0x68(%rsp), %r13
movq %r13, %rdi
callq 0x109030
movq %r12, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0xd68d9
leaq 0x104fec(%rip), %rsi    # 0x12eb08
movq %r15, %rdi
xorl %eax, %eax
callq 0x10a8a5
xorl %eax, %eax
callq 0xc326b
movabsq $-0x4b706df6ad0a9f1, %rdx # imm = 0xFB48F920952F560F
movq %r12, %rdi
xorl %esi, %esi
movq %rax, %rcx
callq 0xd68a8
movups 0x28(%rbx), %xmm0
movq %rax, 0x28(%rsp)
movups %xmm0, 0x8(%rax)
movq %rbx, 0x18(%rsp)
movq 0x40(%rbx), %r14
testq %r14, %r14
je 0x29d28
movq 0x10(%r14), %rax
testq %rax, %rax
je 0x29d28
xorl %r12d, %r12d
xorl %ebx, %ebx
movq %r14, 0x8(%rsp)
movq 0x8(%r14), %rbp
cmpb $0x1, 0x40(%rbp,%r12)
jne 0x29d18
leaq (%r12,%rbp), %r15
leaq 0xa8(%rsp), %rdi
movq %rdi, (%rsp)
leaq 0x38(%rsp), %rsi
callq 0xd6675
movq (%rsp), %r13
movq $0x5, 0x10(%r13)
xorl %eax, %eax
callq 0xbf9c2
movl $0x5, %esi
movq %r13, %rdi
movabsq $0x1a76aac8b75a6b47, %rdx # imm = 0x1A76AAC8B75A6B47
movq %rax, %rcx
callq 0xd68a8
movq %rax, %r13
movq %r15, %rdi
movq 0x28(%rsp), %rsi
movq %rax, %rdx
callq 0x29e97
testq %rax, %rax
jne 0x29e76
cmpq $0x0, (%r13)
je 0x29e3e
cmpq $0x0, 0x8(%r13)
je 0x29e47
movl 0x10(%r13), %edi
callq 0xbf798
testb %al, %al
jne 0x29e50
movl 0x10(%r13), %edi
callq 0xbf7da
testb %al, %al
jne 0x29e59
movq %rbp, 0x20(%rsp)
movl 0x10(%r13), %edi
callq 0xbf7ec
movq %rax, %r14
movq (%r13), %rdi
callq 0xda39e
movl %eax, %ebp
movl 0x10(%r13), %r15d
movq (%r13), %rdi
callq 0xd6ec4
movq %rax, 0x30(%rsp)
movq 0x8(%r13), %rdi
callq 0xd6ec4
movq %rax, %r13
testq %r14, %r14
je 0x29cb4
cmpl $0x5, %r15d
sete %al
orb %al, %bpl
leaq 0x104f96(%rip), %rsi    # 0x12ec0b
leaq 0x104f40(%rip), %rbp    # 0x12ebbc
movq 0x8(%rsp), %r14
jne 0x29ce0
movq 0x20(%rsp), %rax
cmpb $0x0, 0x41(%rax,%r12)
leaq 0x104fae(%rip), %rsi    # 0x12ec43
leaq 0x104f3a(%rip), %rax    # 0x12ebd6
cmovneq %rax, %rsi
leaq 0x104fb1(%rip), %rbp    # 0x12ec58
leaq 0x104f72(%rip), %rax    # 0x12ec20
cmovneq %rax, %rbp
jmp 0x29ce0
testb %bpl, %bpl
leaq 0x104f18(%rip), %rsi    # 0x12ebd6
leaq 0x104ee5(%rip), %rax    # 0x12ebaa
cmovneq %rax, %rsi
leaq 0x104f1b(%rip), %rbp    # 0x12ebeb
leaq 0x104ee5(%rip), %rax    # 0x12ebbc
cmovneq %rax, %rbp
movq 0x8(%rsp), %r14
leaq 0x88(%rsp), %rdi
movq 0x30(%rsp), %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x10a8a5
leaq 0x68(%rsp), %rdi
movq %rbp, %rsi
movq %r13, %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x10a8a5
movq %rsp, %rdi
callq 0xd6d0d
movq 0x10(%r14), %rax
incq %rbx
addq $0x48, %r12
cmpq %rax, %rbx
jb 0x29b7a
leaq 0x121236(%rip), %rsi    # 0x14af65
leaq 0x88(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x10a8a5
leaq 0xa8(%rsp), %r15
movq %r15, %rdi
callq 0x109030
leaq 0x38(%rsp), %rdi
movabsq $-0x503db0e6e1c2e704, %rsi # imm = 0xAFC24F191E3D18FC
movq %r15, %rdx
callq 0xd68d9
movq 0x8(%r14), %rdx
movq 0x70(%rsp), %rcx
leaq 0x104efb(%rip), %rsi    # 0x12ec73
movq %r15, %rdi
xorl %eax, %eax
callq 0x10a8a5
movq 0x10(%rsp), %rdi
addq $0x140, %rdi            # imm = 0x140
leaq 0x106ddf(%rip), %rsi    # 0x130b74
callq 0xd3d8e
movq 0x18(%rsp), %rbx
movq 0x68(%rbx), %rcx
testq %rcx, %rcx
je 0x29dde
movq 0x60(%rbx), %rsi
xorl %edx, %edx
movq (%rsi,%rdx,8), %rdi
cmpq %rax, 0x8(%rdi)
je 0x29dc2
incq %rdx
cmpq %rdx, %rcx
jne 0x29dae
jmp 0x29dde
testq %rdx, %rdx
js 0x29dde
addq $0x48, %rdi
leaq 0x104ec3(%rip), %rsi    # 0x12ec95
xorl %eax, %eax
callq 0x13254
movq %rax, %r15
jmp 0x29e37
callq 0x196b9
leaq 0x38(%rsp), %rdi
movabsq $-0x58b74b3ddbc4f8b6, %rdx # imm = 0xA748B4C2243B074A
xorl %esi, %esi
movq %rax, %rcx
callq 0xd68a8
movq %rax, %r14
movq 0xb0(%rsp), %rdx
movq %rax, %rdi
movq %rbx, %rsi
callq 0xde94
movq %rax, %r15
testq %rax, %rax
jne 0x29e37
addq $0x58, %rbx
movq %r14, %rdi
callq 0xbe7e4
movq (%rbx), %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x55b79
xorl %r15d, %r15d
leaq 0x38(%rsp), %rdi
jmp 0x29e7d
leaq 0x104cfc(%rip), %rsi    # 0x12eb41
jmp 0x29e60
leaq 0x104d0e(%rip), %rsi    # 0x12eb5c
jmp 0x29e60
leaq 0x104d20(%rip), %rsi    # 0x12eb77
jmp 0x29e60
leaq 0x104d32(%rip), %rsi    # 0x12eb92
leaq (%r12,%rbp), %rdi
addq $0x8, %rdi
leaq 0x104ca3(%rip), %rdx    # 0x12eb12
xorl %eax, %eax
callq 0x13254
movq %rax, %r15
movq (%rsp), %rdi
callq 0xd6d2c
movq %r15, %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq