// File: /workspace/github_c_makefile_star2_O3/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 $0x58, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
leaq 0x15c747(%rip), %rax    # 0x19bdd0
movq (%rax), %rsi
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
callq 0xd6675
movq $0x0, 0x10(%rbx)
movq %r15, 0x8(%rsp)
movq %r15, %rdi
callq 0x145cb
movq %rax, %rbx
movq 0x20(%r14), %rdi
callq 0x1450e
movq %rbx, 0x20(%r14)
movq (%r12), %r15
leaq 0x152fd7(%rip), %rbp    # 0x1926a0
movl 0x152fd1(%rip), %eax    # 0x1926a0
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%rbp,%rax,8), %rcx
movq 0x18(%rbp,%rax,8), %rdx
andq %r15, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r15, %rdx
je 0x3f722
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r15, %rdx
je 0x3f722
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r15, %rdx
je 0x3f722
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r15, %rdx
jne 0x3f72b
movq (%rax,%rcx), %r13
testq %r13, %r13
jne 0x3f752
movabsq $-0x1e682f89ce03d7c8, %rdi # imm = 0xE197D07631FC2838
movq %r15, %rsi
callq 0xe9bc5
movq %rax, %r13
leaq 0x152f59(%rip), %rdi    # 0x1926a0
movq %r15, %rsi
movq %rax, %rdx
callq 0x115fac
movq %r12, %rdi
callq *0x30(%r13)
movq %rbx, %rdi
movq %rax, %rdx
callq 0x147df
movq %r12, 0x10(%r14)
movq (%r12), %rbx
movl 0x152f2e(%rip), %eax    # 0x1926a0
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%rbp,%rax,8), %rcx
movq 0x18(%rbp,%rax,8), %rdx
andq %rbx, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %rbx, %rdx
je 0x3f7c5
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %rbx, %rdx
je 0x3f7c5
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %rbx, %rdx
je 0x3f7c5
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %rbx, %rdx
jne 0x3f7ce
movq (%rax,%rcx), %r15
testq %r15, %r15
jne 0x3f7f5
movabsq $-0x1e682f89ce03d7c8, %rdi # imm = 0xE197D07631FC2838
movq %rbx, %rsi
callq 0xe9bc5
movq %rax, %r15
leaq 0x152eb6(%rip), %rdi    # 0x1926a0
movq %rbx, %rsi
movq %rax, %rdx
callq 0x115fac
movq %r12, %rdi
callq *0x20(%r15)
movq %rax, 0x18(%r14)
leaq 0x38(%r14), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
callq 0x3fa66
movq %r14, %rdi
callq 0x31fd3
movq 0x20(%r14), %r13
cmpq $0x0, 0x50(%r13)
je 0x3f903
callq 0x4a481
leaq 0x28(%rsp), %rdi
xorl %esi, %esi
movabsq $-0x6405245fa6b4cb9a, %rdx # imm = 0x9BFADBA0594B3466
movq %rax, %rcx
callq 0xd68a8
movq %rax, %r12
leaq 0xb0(%r14), %rbx
leaq 0xee1cc(%rip), %rsi     # 0x12da23
movq %rbx, %rdi
callq 0xd3d8e
movq %rax, %r15
leaq 0x18(%r12), %rdi
movq 0x20(%r14), %rax
movq 0x50(%rax), %rsi
addq $0x20, %rsi
callq 0xfef3
movq %r15, 0x10(%r12)
movq 0x28(%r14), %rax
movq %rax, 0x8(%r12)
cmpb $0x0, 0xd(%r14)
jne 0x3f8a3
movq 0x20(%r12), %rsi
movq 0x18(%r14), %rdi
callq 0x30b69
testb %al, %al
je 0x3fa1a
leaq 0x40(%r14), %rdi
movq 0x40(%r14), %rsi
movq %r12, %rdx
callq 0x55cc2
leaq 0x60(%r14), %rdi
movq 0x10(%r12), %rsi
movq 0x50(%r14), %rdx
decq %rdx
callq 0xc8a20
movq 0x18(%r14), %rdi
movq 0x20(%r14), %rax
movq 0x50(%rax), %rax
movq 0x28(%rax), %rsi
callq 0xe3d7
movq %rbx, %rdi
movq %rax, %rsi
callq 0xd3d8e
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0xe3d7
movq %rbx, %rdi
movq %rax, %rsi
callq 0xd3d8e
movq 0x20(%r14), %r13
movq 0x68(%r13), %rax
testq %rax, %rax
je 0x3fa16
leaq 0x40(%r14), %rcx
movq %rcx, 0x20(%rsp)
leaq 0x60(%r14), %rcx
movq %rcx, 0x18(%rsp)
leaq 0xb0(%r14), %rcx
movq %rcx, 0x10(%rsp)
xorl %ebp, %ebp
movq 0x60(%r13), %rcx
movq (%rcx,%rbp,8), %rbx
cmpq $0x0, 0x28(%rbx)
je 0x3fa0a
cmpq $0x0, 0x50(%rbx)
je 0x3fa0a
leaq 0x20(%rbx), %r15
callq 0x4a481
leaq 0x28(%rsp), %rdi
xorl %esi, %esi
movabsq $-0x6405245fa6b4cb9a, %rdx # imm = 0x9BFADBA0594B3466
movq %rax, %rcx
callq 0xd68a8
movq %rax, %r12
leaq 0x18(%rax), %rdi
movq %r15, %rsi
callq 0xfef3
movq 0x50(%rbx), %rax
movq %rax, 0x10(%r12)
movq 0x28(%r14), %rax
movq %rax, 0x8(%r12)
cmpb $0x0, 0xd(%r14)
jne 0x3f9aa
movq 0x20(%r12), %rsi
movq 0x18(%r14), %rdi
callq 0x30b69
testb %al, %al
je 0x3fa1a
movq 0x40(%r14), %rsi
movq 0x20(%rsp), %rdi
movq %r12, %rdx
callq 0x55cc2
movq 0x10(%r12), %rsi
movq 0x50(%r14), %rdx
decq %rdx
movq 0x18(%rsp), %rdi
callq 0xc8a20
movq 0x18(%r14), %rdi
movq 0x28(%rbx), %rsi
callq 0xe3d7
movq 0x10(%rsp), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0xd3d8e
movq 0x18(%r14), %rdi
movq 0x50(%rbx), %rsi
callq 0xe3d7
movq %r15, %rdi
movq %rax, %rsi
callq 0xd3d8e
movq 0x68(%r13), %rax
incq %rbp
cmpq %rax, %rbp
jb 0x3f930
xorl %ebx, %ebx
jmp 0x3fa4a
addq $0x10, %r12
movq 0x8(%rsp), %rbx
subq $-0x80, %rbx
movq (%r12), %rsi
movq %r14, %rdi
callq 0x31f9d
leaq 0xf15a2(%rip), %rsi     # 0x130fdc
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x13254
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xd6d2c
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq