// File: /workspace/github_c_makefile_star2_O1/johsteffens[P]beth/xoico/src/xoico.xo.c
// Function: xoico_typespec_s_expand_x
er_t xoico_typespec_s_expand_x( const xoico_typespec_s* o, const xoico_host* host, x_sink* sink )
{
    // xoico_typespec.x:254:1
    BLM_INIT_LEVEL(0);
    if( o->flag_variadic )
    {
        x_sink_push_fa(sink,"..." );
        BLM_RETURNV(er_t, 0)
    }
    
    xoico_compiler_s* compiler = xoico_host_a_compiler(host);
    
    tp_t type = o->type;
    
    if( type == ((tp_t)(TYPEOF_type_object)) )
    {
        type = xoico_host_a_obj_type(host); //compiler.entypeof( sc_obj_type );
    }
    else if( type == ((tp_t)(TYPEOF_type_deduce)) )
    {
        ERR_fa( "Cannot resolve 'type_deduce' at this point." );
    }
    
    st_s* st_type = ((st_s*)BLM_LEVEL_T_PUSH(0,st_s,st_s_create_sc(xoico_compiler_s_nameof(compiler,type ) )));
    
    switch( o->access_class )
    {
        case TYPEOF_const:       x_sink_push_fa(sink,"c " ); break;
        case TYPEOF_mutable:     x_sink_push_fa(sink,"m " ); break;
        case TYPEOF_discardable: x_sink_push_fa(sink,"d " ); break;
        default: break;
    }
    
    if( o->flag_static   ) x_sink_push_fa(sink,"static " );
    if( o->flag_volatile ) x_sink_push_fa(sink,"volatile " );
    sc_t sc_type = st_type->sc;
    
    if( o->transient )
    {
        x_sink_push_fa(sink,"(#<sc_t>)", xoico_host_a_nameof(host,o->transient->class ) );
    }
    
    x_sink_push_fa(sink,"#<sc_t>", sc_type );
    
    if( o->indirection > 0 ) x_sink_push_fa(sink,".#<sz_t>", o->indirection );
    if( o->flag_restrict ) x_sink_push_fa(sink," 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, %r15
movq %rdi, %r14
leaq 0x197031(%rip), %rax    # 0x1a8dd0
movq (%rax), %rsi
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0xe0431
movq $0x0, 0x10(%r12)
cmpb $0x0, 0x2f(%r14)
je 0x11dcb
leaq 0x1264ae(%rip), %rsi    # 0x138274
jmp 0x12114
movq (%r15), %r12
leaq 0x18d8cb(%rip), %rbp    # 0x19f6a0
movl 0x18d8c5(%rip), %eax    # 0x19f6a0
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%rbp,%rax,8), %rcx
movq 0x18(%rbp,%rax,8), %rdx
andq %r12, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r12, %rdx
je 0x11e32
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r12, %rdx
je 0x11e32
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r12, %rdx
je 0x11e32
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r12, %rdx
jne 0x12139
movq (%rax,%rcx), %r13
testq %r13, %r13
jne 0x11e62
movabsq $-0x1e682f89ce03d7c8, %rdi # imm = 0xE197D07631FC2838
movq %r12, %rsi
callq 0xf3f85
movq %rax, %r13
leaq 0x18d849(%rip), %rdi    # 0x19f6a0
movq %r12, %rsi
movq %rax, %rdx
callq 0x12128c
movq %r15, %rdi
callq *0x20(%r13)
movq %rax, %r12
movq 0x8(%r14), %rsi
movabsq $-0x59040ffc58933ff2, %r13 # imm = 0xA6FBF003A76CC00E
cmpq %r13, %rsi
je 0x11f38
movabsq $0x213393bef2495d15, %rax # imm = 0x213393BEF2495D15
cmpq %rax, %rsi
jne 0x11f5c
movq (%r15), %r13
movl 0x18d801(%rip), %eax    # 0x19f6a0
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%rbp,%rax,8), %rcx
movq 0x18(%rbp,%rax,8), %rdx
andq %r13, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r13, %rdx
je 0x11ef6
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r13, %rdx
je 0x11ef6
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r13, %rdx
je 0x11ef6
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r13, %rdx
jne 0x12149
movq (%rax,%rcx), %rbp
testq %rbp, %rbp
jne 0x11f26
movabsq $-0x1e682f89ce03d7c8, %rdi # imm = 0xE197D07631FC2838
movq %r13, %rsi
callq 0xf3f85
movq %rax, %rbp
leaq 0x18d785(%rip), %rdi    # 0x19f6a0
movq %r13, %rsi
movq %rax, %rdx
callq 0x12128c
movq %r15, %rdi
callq *0x30(%rbp)
movq %rax, %rsi
leaq 0x18d76a(%rip), %rbp    # 0x19f6a0
jmp 0x11f5c
leaq 0x1263b0(%rip), %rdi    # 0x1382ef
leaq 0x12634a(%rip), %rsi    # 0x138290
leaq 0x126352(%rip), %rcx    # 0x13829f
movl $0x21e, %edx            # imm = 0x21E
xorl %eax, %eax
callq 0xc825d
movq %r13, %rsi
movq %r12, %rdi
callq 0xe39f
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
movq 0x10(%r14), %rax
movabsq $0x65c9718e19e3df34, %rcx # imm = 0x65C9718E19E3DF34
cmpq %rcx, %rax
je 0x11fcb
movabsq $-0x12e90733f18038df, %rcx # imm = 0xED16F8CC0E7FC721
cmpq %rcx, %rax
je 0x11fc2
movabsq $-0x2c53c3baa9910217, %rcx # imm = 0xD3AC3C45566EFDE9
cmpq %rcx, %rax
jne 0x11fdc
leaq 0x126349(%rip), %rsi    # 0x138309
jmp 0x11fd2
leaq 0x126343(%rip), %rsi    # 0x13830c
jmp 0x11fd2
leaq 0x129f08(%rip), %rsi    # 0x13beda
movq %rbx, %rdi
xorl %eax, %eax
callq 0xee2a
cmpb $0x1, 0x28(%r14)
jne 0x11ff4
leaq 0x1262e1(%rip), %rsi    # 0x1382cb
movq %rbx, %rdi
xorl %eax, %eax
callq 0xee2a
cmpb $0x1, 0x29(%r14)
jne 0x1200c
leaq 0x1262d8(%rip), %rsi    # 0x1382da
movq %rbx, %rdi
xorl %eax, %eax
callq 0xee2a
movq 0x8(%r12), %r12
movq 0x18(%r14), %rax
testq %rax, %rax
je 0x120d8
movq 0x8(%rax), %rsi
movq %rbp, %rdx
movq (%r15), %rbp
movl 0x18d672(%rip), %eax    # 0x19f6a0
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%rdx,%rax,8), %rcx
movq 0x18(%rdx,%rax,8), %rdx
andq %rbp, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %rbp, %rdx
je 0x12085
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %rbp, %rdx
je 0x12085
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %rbp, %rdx
je 0x12085
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %rbp, %rdx
jne 0x12141
movq (%rax,%rcx), %r13
testq %r13, %r13
jne 0x120bd
movabsq $-0x1e682f89ce03d7c8, %rdi # imm = 0xE197D07631FC2838
movq %rsi, (%rsp)
movq %rbp, %rsi
callq 0xf3f85
movq %rax, %r13
leaq 0x18d5f2(%rip), %rdi    # 0x19f6a0
movq %rbp, %rsi
movq %rax, %rdx
callq 0x12128c
movq (%rsp), %rsi
movq %r15, %rdi
callq *0x48(%r13)
leaq 0x126244(%rip), %rsi    # 0x13830f
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xee2a
leaq 0x13db85(%rip), %rsi    # 0x14fc64
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0xee2a
movq 0x20(%r14), %rdx
testq %rdx, %rdx
jle 0x12106
leaq 0x12621d(%rip), %rsi    # 0x138319
movq %rbx, %rdi
xorl %eax, %eax
callq 0xee2a
cmpb $0x1, 0x2a(%r14)
jne 0x1211e
leaq 0x1261d0(%rip), %rsi    # 0x1382e4
movq %rbx, %rdi
xorl %eax, %eax
callq 0xee2a
leaq 0x8(%rsp), %rdi
callq 0xe0b30
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r13d, %r13d
jmp 0x11e36
xorl %r13d, %r13d
jmp 0x12089
xorl %ebp, %ebp
jmp 0x11efa