// File: /workspace/github_c_makefile_star2_O1/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 $0xe8, %rsp
movq %rdi, %rbx
movabsq $-0x503db0e6e1c2e704, %rbp # imm = 0xAFC24F191E3D18FC
leaq 0x17d956(%rip), %rax    # 0x1a8dd0
movq (%rax), %rsi
leaq 0x48(%rsp), %r15
movq %r15, %rdi
callq 0xe0431
movq $0x0, 0x10(%r15)
movq 0xc8(%rbx), %rax
movq 0x140(%rax), %r13
leaq 0x98(%rsp), %r14
movq %r14, %rdi
callq 0x113f7c
movq %r15, %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0xe06ab
leaq 0x78(%rsp), %r12
movq %r12, %rdi
callq 0x113f7c
movq %r15, %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0xe06ab
leaq 0x10e628(%rip), %rsi    # 0x139b08
movq %r14, %rdi
xorl %eax, %eax
callq 0x1157cb
xorl %eax, %eax
callq 0xcd355
movabsq $-0x4b706df6ad0a9f1, %rdx # imm = 0xFB48F920952F560F
movq %r15, %rdi
xorl %esi, %esi
movq %rax, %rcx
callq 0xe0676
movq 0x28(%rbx), %rcx
movq %rcx, 0x8(%rax)
movq 0x30(%rbx), %rcx
movq %rax, 0x40(%rsp)
movq %rcx, 0x10(%rax)
movq 0x40(%rbx), %rcx
testq %rcx, %rcx
movq %rbx, 0x30(%rsp)
movq %r13, 0x28(%rsp)
je 0x2b77e
cmpq $0x0, 0x10(%rcx)
sete %bpl
je 0x2b781
xorl %ebx, %ebx
xorl %r13d, %r13d
movq %rcx, 0x38(%rsp)
movq 0x8(%rcx), %r12
movb $0x1, %r14b
cmpb $0x1, 0x40(%r12,%rbx)
jne 0x2b673
leaq (%r12,%rbx), %r14
leaq 0xb8(%rsp), %rdi
movq %rdi, (%rsp)
leaq 0x48(%rsp), %rsi
callq 0xe0431
movq (%rsp), %r15
movq $0x5, 0x10(%r15)
xorl %eax, %eax
callq 0xc953a
movl $0x5, %esi
movq %r15, %rdi
movabsq $0x1a76aac8b75a6b47, %rdx # imm = 0x1A76AAC8B75A6B47
movq %rax, %rcx
callq 0xe0676
movq %rax, %r15
movq %r14, %rdi
movq 0x40(%rsp), %rsi
movq %rax, %rdx
callq 0x2b91a
movq %rax, %r14
testq %rax, %rax
je 0x2b5d0
movq (%rsp), %rdi
callq 0xe0b30
movq %r14, 0x8(%rsp)
testq %r14, %r14
je 0x2b5dd
xorl %r14d, %r14d
jmp 0x2b66e
cmpq $0x0, (%r15)
je 0x2b60b
cmpq $0x0, 0x8(%r15)
je 0x2b61f
movl 0x10(%r15), %edi
callq 0xc9310
testb %al, %al
je 0x2b633
leaq (%r12,%rbx), %rdi
addq $0x8, %rdi
xorl %r14d, %r14d
leaq 0x10e56e(%rip), %rsi    # 0x139b77
jmp 0x2b652
leaq (%r12,%rbx), %rdi
addq $0x8, %rdi
xorl %r14d, %r14d
leaq 0x10e524(%rip), %rsi    # 0x139b41
jmp 0x2b652
leaq (%r12,%rbx), %rdi
addq $0x8, %rdi
xorl %r14d, %r14d
leaq 0x10e52b(%rip), %rsi    # 0x139b5c
jmp 0x2b652
movl 0x10(%r15), %edi
callq 0xc9352
testb %al, %al
je 0x2b696
leaq (%r12,%rbx), %rdi
addq $0x8, %rdi
xorl %r14d, %r14d
leaq 0x10e540(%rip), %rsi    # 0x139b92
leaq 0x10e4b9(%rip), %rdx    # 0x139b12
xorl %eax, %eax
callq 0x13591
movq %rax, 0x8(%rsp)
movq (%rsp), %rdi
callq 0xe0b30
movq 0x38(%rsp), %rcx
testb %r14b, %r14b
je 0x2b781
incq %r13
addq $0x48, %rbx
cmpq 0x10(%rcx), %r13
setae %bpl
jb 0x2b54d
jmp 0x2b781
movl 0x10(%r15), %edi
callq 0xc9364
movq %rax, 0x18(%rsp)
movq (%r15), %rdi
callq 0xe4075
movl %eax, %r14d
movl 0x10(%r15), %eax
movl %eax, 0x14(%rsp)
movq (%r15), %rdi
callq 0xe0cbc
movq %rax, 0x20(%rsp)
movq 0x8(%r15), %rdi
callq 0xe0cbc
movq %rax, %r15
cmpq $0x0, 0x18(%rsp)
je 0x2b71b
cmpl $0x5, 0x14(%rsp)
sete %al
orb %al, %r14b
leaq 0x10e521(%rip), %rsi    # 0x139c0b
leaq 0x10e4cb(%rip), %r14    # 0x139bbc
jne 0x2b742
cmpb $0x0, 0x41(%r12,%rbx)
leaq 0x10e543(%rip), %rsi    # 0x139c43
leaq 0x10e4cf(%rip), %rax    # 0x139bd6
cmovneq %rax, %rsi
leaq 0x10e546(%rip), %r14    # 0x139c58
leaq 0x10e507(%rip), %rax    # 0x139c20
jmp 0x2b73e
testb %r14b, %r14b
leaq 0x10e4b1(%rip), %rsi    # 0x139bd6
leaq 0x10e47e(%rip), %rax    # 0x139baa
cmovneq %rax, %rsi
leaq 0x10e4b4(%rip), %r14    # 0x139beb
leaq 0x10e47e(%rip), %rax    # 0x139bbc
cmovneq %rax, %r14
leaq 0x98(%rsp), %rdi
movq 0x20(%rsp), %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x1157cb
leaq 0x78(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x1157cb
movq %rsp, %rdi
callq 0xe0b11
movb $0x1, %r14b
jmp 0x2b66e
movb $0x1, %bpl
testb $0x1, %bpl
je 0x2b824
leaq 0x12a7ab(%rip), %rsi    # 0x155f3d
leaq 0x98(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x1157cb
leaq 0xb8(%rsp), %r15
movq %r15, %rdi
callq 0x113f7c
leaq 0x48(%rsp), %rdi
movabsq $-0x503db0e6e1c2e704, %rsi # imm = 0xAFC24F191E3D18FC
movq %r15, %rdx
callq 0xe06ab
movq 0x8(%r14), %rdx
movq 0x80(%rsp), %rcx
leaq 0x10e495(%rip), %rsi    # 0x139c73
movq %r15, %rdi
xorl %eax, %eax
callq 0x1157cb
movq 0x28(%rsp), %rdi
addq $0x140, %rdi            # imm = 0x140
leaq 0x110379(%rip), %rsi    # 0x13bb74
callq 0xddb52
movq 0x30(%rsp), %rbx
movq 0x68(%rbx), %rcx
testq %rcx, %rcx
movq 0x8(%rsp), %r12
je 0x2b82e
movq 0x60(%rbx), %rsi
movq (%rsi), %rdx
cmpq %rax, 0x8(%rdx)
jne 0x2b837
xorl %eax, %eax
jmp 0x2b867
movq 0x8(%rsp), %r12
jmp 0x2b8e3
movq $-0x1, %rax
jmp 0x2b867
movl $0x1, %r8d
xorl %edx, %edx
movq %r8, %rdi
cmpq %r8, %rcx
je 0x2b859
movq (%rsi,%rdi,8), %r9
leaq 0x1(%rdi), %r8
cmpq %rax, 0x8(%r9)
cmoveq %rdi, %rdx
jne 0x2b83f
cmpq %rcx, %rdi
movq $-0x1, %rax
cmovbq %rdx, %rax
testq %rax, %rax
js 0x2b895
movq 0x60(%rbx), %rcx
movq (%rcx,%rax,8), %rdi
addq $0x48, %rdi
leaq 0x10e416(%rip), %rsi    # 0x139c95
xorl %eax, %eax
callq 0x13591
movq %rax, %r12
leaq 0x48(%rsp), %rdi
callq 0xe0b30
jmp 0x2b8e3
callq 0x19c7d
leaq 0x48(%rsp), %rdi
movabsq $-0x58b74b3ddbc4f8b6, %rdx # imm = 0xA748B4C2243B074A
xorl %esi, %esi
movq %rax, %rcx
callq 0xe0676
movq %rax, %r14
movq 0xc0(%rsp), %rdx
movq %rax, %rdi
movq %rbx, %rsi
callq 0xde36
movq %rax, %r15
testq %rax, %rax
je 0x2b8de
leaq 0x48(%rsp), %rdi
callq 0xe0b30
movq %r15, %r12
testq %r15, %r15
je 0x2b8f8
movq %r12, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq $0x58, %rbx
movq %r14, %rdi
callq 0xc8348
movq (%rbx), %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x5b3a7
xorl %r12d, %r12d
jmp 0x2b889