// File: /workspace/github_c_makefile_star2_O1/johsteffens[P]beth/xoico/src/xoico.xo.c
// Function: xoico_che_s_push_typespec
er_t xoico_che_s_push_typespec( xoico_che_s* o, const xoico_typespec_s* typespec, xoico_che_result* result )
{
    // xoico_che.x:1121:1
    BLM_INIT_LEVEL(0);
    tp_t type = typespec->type;
    
    if( type == ((tp_t)(TYPEOF_type_object)) )
    {
        ERR_fa( "Cannot resolve 'type_object' at this point." );
    }
    else if( type == ((tp_t)(TYPEOF_type_deduce)) )
    {
        ERR_fa( "Cannot resolve 'type_deduce' at this point." );
    }
    else if( type == 0 )
    {
        ERR_fa( "Type is 0." );
    }
    
    st_s* st_type = ((st_s*)BLM_LEVEL_T_PUSH(0,st_s,st_s_create_sc(xoico_che_s_nameof(o,type ) )));
    
    if( st_type->size == 0 )
    {
        ERR_fa( "Type '#<tp_t>' has no name.", type );
    }
    
    sc_t sc_type = st_type->sc;
    if( typespec->flag_static   ) BLM_TRY(xoico_che_result_push_fa(result,"static " ))
    if( typespec->access_class == TYPEOF_const ) BLM_TRY(xoico_che_result_push_fa(result,"const " ))
    if( typespec->flag_volatile ) BLM_TRY(xoico_che_result_push_fa(result,"volatile " ))
    BLM_TRY(xoico_che_result_push_fa(result,"#<sc_t>", sc_type ))
    
    for(sz_t i = 0; i < typespec->indirection; i++ ) BLM_TRY(xoico_che_result_push_fa(result,"*" ))
    if( typespec->flag_restrict ) BLM_TRY(xoico_che_result_push_fa(result,"restrict " ))
    
    BLM_RETURNV(er_t, 0)
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
leaq 0x17467e(%rip), %rax    # 0x1a8dd0
movq (%rax), %rsi
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0xe0431
movq $0x0, 0x10(%r15)
movq 0x8(%r14), %r15
movabsq $-0x59040ffc58933ff2, %rax # imm = 0xA6FBF003A76CC00E
cmpq %rax, %r15
je 0x347c9
testq %r15, %r15
je 0x347ad
movabsq $0x213393bef2495d15, %rax # imm = 0x213393BEF2495D15
cmpq %rax, %r15
jne 0x347ea
leaq 0x1071ba(%rip), %rdi    # 0x13b952
leaq 0x103af1(%rip), %rsi    # 0x138290
leaq 0x1071c6(%rip), %rcx    # 0x13b96c
movl $0x1c9a, %edx           # imm = 0x1C9A
jmp 0x347e3
leaq 0x10719e(%rip), %rdi    # 0x13b952
leaq 0x103ad5(%rip), %rsi    # 0x138290
leaq 0x1071d6(%rip), %rcx    # 0x13b998
movl $0x1ca2, %edx           # imm = 0x1CA2
jmp 0x347e3
leaq 0x107182(%rip), %rdi    # 0x13b952
leaq 0x103ab9(%rip), %rsi    # 0x138290
leaq 0x103ac1(%rip), %rcx    # 0x13829f
movl $0x1c9e, %edx           # imm = 0x1C9E
xorl %eax, %eax
callq 0xc825d
movq %r12, %rdi
movq %r15, %rsi
callq 0x3417e
movq %rax, %rdi
callq 0x114e47
leaq 0x8(%rsp), %rdi
movabsq $-0x503db0e6e1c2e704, %rdx # imm = 0xAFC24F191E3D18FC
xorl %esi, %esi
movq %rax, %rcx
callq 0xe0676
movq %rax, %r12
cmpq $0x0, 0x10(%rax)
jne 0x34844
leaq 0x10712b(%rip), %rdi    # 0x13b952
leaq 0x103a62(%rip), %rsi    # 0x138290
leaq 0x10716e(%rip), %rcx    # 0x13b9a3
movl $0x1ca9, %edx           # imm = 0x1CA9
movq %r15, %r8
xorl %eax, %eax
callq 0xc825d
movq 0x8(%r12), %r12
cmpb $0x1, 0x28(%r14)
jne 0x34878
leaq 0x103a74(%rip), %rsi    # 0x1382cb
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3bd77
movq %rax, %r15
testq %rax, %rax
je 0x34878
leaq 0x8(%rsp), %rdi
callq 0xe0b30
jmp 0x34999
movabsq $0x65c9718e19e3df34, %rax # imm = 0x65C9718E19E3DF34
cmpq %rax, 0x10(%r14)
jne 0x348b7
leaq 0x103a44(%rip), %rsi    # 0x1382d3
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3bd77
movq %rax, %r13
testq %rax, %rax
je 0x348ae
leaq 0x8(%rsp), %rdi
callq 0xe0b30
movq %r13, %r15
testq %r13, %r13
jne 0x34999
cmpb $0x1, 0x29(%r14)
jne 0x348ed
leaq 0x103a15(%rip), %rsi    # 0x1382da
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3bd77
movq %rax, %r13
testq %rax, %rax
je 0x348e4
leaq 0x8(%rsp), %rdi
callq 0xe0b30
movq %r13, %r15
testq %r13, %r13
jne 0x34999
leaq 0x11b370(%rip), %rsi    # 0x14fc64
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x3bd77
movq %rax, %r12
testq %rax, %rax
je 0x34916
leaq 0x8(%rsp), %rdi
callq 0xe0b30
movq %r12, %r15
testq %r12, %r12
jne 0x34999
cmpq $0x0, 0x20(%r14)
setg %r13b
jle 0x34961
xorl %r12d, %r12d
movq %rbx, %rdi
leaq 0x10f52b(%rip), %rsi    # 0x143e5e
xorl %eax, %eax
callq 0x3bd77
movq %rax, %rbp
testq %rax, %rax
je 0x3494f
leaq 0x8(%rsp), %rdi
callq 0xe0b30
movq %rbp, %r15
testq %rbp, %rbp
jne 0x34961
incq %r12
cmpq 0x20(%r14), %r12
setl %r13b
jl 0x34929
testb $0x1, %r13b
jne 0x34999
cmpb $0x1, 0x2a(%r14)
jne 0x349ab
leaq 0x103970(%rip), %rsi    # 0x1382e5
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3bd77
movq %rax, %rbx
testq %rax, %rax
je 0x34994
leaq 0x8(%rsp), %rdi
callq 0xe0b30
movq %rbx, %r15
testq %rbx, %rbx
je 0x349ab
movq %r15, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r15d, %r15d
jmp 0x34869