// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/xoico/src/xoico.xo.c
// Function: xoico_che_s_setup
er_t xoico_che_s_setup( xoico_che_s* o, const xoico_host* host, const xoico_signature_s* signature )
{
    // xoico_che.x:2093:1
    BLM_INIT_LEVEL(0);
    xoico_signature_s_attach( &(o->signature ),  xoico_signature_s_clone(signature));
    BLM_TRY(xoico_signature_s_relent(o->signature,host, xoico_host_a_obj_type(host) ))
    
    o->host     = ((xoico_host*)(host));
    o->compiler = xoico_host_a_compiler(host);
    o->block_level     = 0;
    o->try_block_level = 0;
    xoico_che_stack_var_s_clear(&(o->stack_var));
    xoico_che_s_init_level0(o);
    
    if( o->signature->arg_o )
    {
        xoico_che_stack_var_unit_s* unit = ((xoico_che_stack_var_unit_s*)BLM_LEVEL_T_PUSH(0,xoico_che_stack_var_unit_s,xoico_che_stack_var_unit_s_create()));
        tp_t tp_member_obj_name  = xoico_che_s_entypeof(o,"o" );
    
        xoico_typespec_s_copy(&(unit->typespec),&(o->signature->arg_o->typespec ));
        unit->name = tp_member_obj_name;
        unit->level = o->block_level;
    
        if( !o->waive_unknown_type && !xoico_che_s_is_type(o,unit->typespec.type ) )
        {
            BLM_RETURNV(er_t, x_source_point_s_parse_error_fa(&(signature->source_point),"Declaration: Argument '#<sc_t>' has an unknown type.", xoico_che_s_nameof(o,unit->name ) ))
        }
    
        xoico_che_stack_var_s_push_unit(&(o->stack_var),unit );
        bcore_hmap_name_s_set_sc(&(o->hmap_name),xoico_compiler_s_nameof(o->compiler,o->signature->arg_o->typespec.type ) );
        bcore_hmap_name_s_set_sc(&(o->hmap_name),xoico_compiler_s_nameof(o->compiler,tp_member_obj_name ) );
    }
    
    {const xoico_args_s* __a=&(o->signature->args );if(__a)for(sz_t __i=0;__i<__a->size;__i++){xoico_arg_s* arg=__a->data[__i];
    {
        if( arg->typespec.type && arg->name )
        {
            xoico_che_stack_var_unit_s* unit = ((xoico_che_stack_var_unit_s*)BLM_LEVEL_T_PUSH(0,xoico_che_stack_var_unit_s,xoico_che_stack_var_unit_s_create()));
            xoico_typespec_s_copy(&(unit->typespec),&(arg->typespec ));
            unit->name = arg->name;
            unit->level = o->block_level;
    
            if( !o->waive_unknown_type && !xoico_che_s_is_type(o,unit->typespec.type ) )
            {
                BLM_RETURNV(er_t, x_source_point_s_parse_error_fa(&(signature->source_point),"Declaration: Argument '#<sc_t>' has an unknown type.", xoico_che_s_nameof(o,unit->name ) ))
            }
    
            xoico_che_stack_var_s_push_unit(&(o->stack_var),unit );
            bcore_hmap_name_s_set_sc(&(o->hmap_name),xoico_compiler_s_nameof(o->compiler,arg->typespec.type ) );
            bcore_hmap_name_s_set_sc(&(o->hmap_name),xoico_compiler_s_nameof(o->compiler,arg->name ) );
        }
    }
    }}BLM_RETURNV(er_t, 0)
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xf5cac(%rip), %rax     # 0x117dd0
movq (%rax), %rsi
leaq 0x18(%rsp), %r12
movq %r12, %rdi
callq 0x717f5
andq $0x0, 0x10(%r12)
leaq 0x20(%r14), %r12
movq %r15, 0x8(%rsp)
movq %r15, %rdi
callq 0xf979
movq %r12, %rdi
movq %rax, %rsi
callq 0x11556
movq 0x20(%r14), %r12
movq %rbx, %rdi
callq 0xe8a0
movq %r12, %rdi
movq %rax, %rdx
callq 0xfa05
movq %rbx, 0x10(%r14)
movq %rbx, %rdi
callq 0xdab3
movq %rax, 0x18(%r14)
leaq 0x38(%r14), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
movq %rdi, (%rsp)
callq 0x2238e
movq %r14, %rdi
callq 0x1cfd3
movq 0x20(%r14), %rbx
cmpq $0x0, 0x50(%rbx)
je 0x22266
callq 0x26cb1
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
movabsq $-0x6405245fa6b4cb9a, %rdx # imm = 0x9BFADBA0594B3466
movq %rax, %rcx
callq 0x71967
movq %rax, %r13
leaq 0xb0(%r14), %rbx
leaq 0x8884b(%rip), %rsi     # 0xaaa23
movq %rbx, %rdi
callq 0x6f48c
movq %rax, %rbp
leaq 0x18(%r13), %rdi
movq 0x20(%r14), %rax
movq 0x50(%rax), %rsi
addq $0x20, %rsi
callq 0xe075
movq %rbp, 0x10(%r13)
movq 0x28(%r14), %rax
movq %rax, 0x8(%r13)
cmpb $0x0, 0xd(%r14)
jne 0x2221f
movq 0x20(%r13), %rsi
movq %r14, %rdi
callq 0x1e88a
testb %al, %al
je 0x22342
movq (%rsp), %rdi
movq %r13, %rsi
callq 0x1d225
movq 0x18(%r14), %rdi
movq 0x20(%r14), %rax
movq 0x50(%rax), %rax
movq 0x28(%rax), %rsi
callq 0xdad8
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6f48c
movq 0x18(%r14), %rdi
movq %rbp, %rsi
callq 0xdad8
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6f48c
movq 0x20(%r14), %rbx
leaq 0xb0(%r14), %rax
movq %rax, 0x10(%rsp)
xorl %r12d, %r12d
cmpq 0x68(%rbx), %r12
jae 0x2233e
movq 0x60(%rbx), %rax
movq (%rax,%r12,8), %rbp
cmpq $0x0, 0x28(%rbp)
je 0x22336
cmpq $0x0, 0x50(%rbp)
je 0x22336
leaq 0x20(%rbp), %r15
callq 0x26cb1
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
movabsq $-0x6405245fa6b4cb9a, %rdx # imm = 0x9BFADBA0594B3466
movq %rax, %rcx
callq 0x71967
movq %rax, %r13
leaq 0x18(%rax), %rdi
movq %r15, %rsi
callq 0xe075
movq 0x50(%rbp), %rax
movq %rax, 0x10(%r13)
movq 0x28(%r14), %rax
movq %rax, 0x8(%r13)
cmpb $0x0, 0xd(%r14)
jne 0x222f5
movq 0x20(%r13), %rsi
movq %r14, %rdi
callq 0x1e88a
testb %al, %al
je 0x22342
movq (%rsp), %rdi
movq %r13, %rsi
callq 0x1d225
movq 0x18(%r14), %rdi
movq 0x28(%rbp), %rsi
callq 0xdad8
movq 0x10(%rsp), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0x6f48c
movq 0x18(%r14), %rdi
movq 0x50(%rbp), %rsi
callq 0xdad8
movq %r15, %rdi
movq %rax, %rsi
callq 0x6f48c
incq %r12
jmp 0x22275
xorl %ebx, %ebx
jmp 0x22372
addq $0x10, %r13
movq 0x8(%rsp), %rbx
subq $-0x80, %rbx
movq (%r13), %rsi
movq %r14, %rdi
callq 0x1cf9d
leaq 0x8bc7a(%rip), %rsi     # 0xadfdc
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xf256
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x71b64
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq