// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
leaq 0x1ab772(%rip), %rax    # 0x1b2330
movq (%rax), %rax
movq %rax, -0x28(%rbp)
leaq -0x58(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xbfe80
movq -0x60(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
testb $0x1, 0x2f(%rax)
je 0x6c28
movq -0x20(%rbp), %rdi
leaq 0x12c9c9(%rip), %rsi    # 0x1335cc
movb $0x0, %al
callq 0x56e0
movq $0x0, -0x68(%rbp)
movq -0x60(%rbp), %rdi
callq 0xc0720
movq -0x68(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x6e65
movq -0x18(%rbp), %rdi
callq 0x5170
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x78(%rbp)
movabsq $0x213393bef2495d15, %rax # imm = 0x213393BEF2495D15
cmpq %rax, -0x78(%rbp)
jne 0x6c60
movq -0x18(%rbp), %rdi
callq 0x6b70
movq %rax, -0x78(%rbp)
jmp 0x6c93
movabsq $-0x59040ffc58933ff2, %rax # imm = 0xA6FBF003A76CC00E
cmpq %rax, -0x78(%rbp)
jne 0x6c91
leaq 0x12c9d0(%rip), %rdi    # 0x133647
leaq 0x12c96a(%rip), %rsi    # 0x1335e8
movl $0x216, %edx            # imm = 0x216
leaq 0x12c96d(%rip), %rcx    # 0x1335f7
movb $0x0, %al
callq 0x9d0f0
jmp 0x6c93
movq -0x28(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x70(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x51d0
movq %rax, %rdi
callq 0xff550
movq -0xa0(%rbp), %rdi
movq %rax, %rcx
xorl %eax, %eax
movl %eax, %esi
movabsq $-0x503db0e6e1c2e704, %rdx # imm = 0xAFC24F191E3D18FC
callq 0xc01a0
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x98(%rbp)
movabsq $-0x2c53c3baa9910217, %rcx # imm = 0xD3AC3C45566EFDE9
subq %rcx, %rax
je 0x6d38
jmp 0x6cf4
movq -0x98(%rbp), %rax
movabsq $-0x12e90733f18038df, %rcx # imm = 0xED16F8CC0E7FC721
subq %rcx, %rax
je 0x6d4c
jmp 0x6d0c
movq -0x98(%rbp), %rax
movabsq $0x65c9718e19e3df34, %rcx # imm = 0x65C9718E19E3DF34
subq %rcx, %rax
jne 0x6d60
jmp 0x6d24
movq -0x20(%rbp), %rdi
leaq 0x1304b6(%rip), %rsi    # 0x1371e5
movb $0x0, %al
callq 0x56e0
jmp 0x6d62
movq -0x20(%rbp), %rdi
leaq 0x12c91e(%rip), %rsi    # 0x133661
movb $0x0, %al
callq 0x56e0
jmp 0x6d62
movq -0x20(%rbp), %rdi
leaq 0x12c90d(%rip), %rsi    # 0x133664
movb $0x0, %al
callq 0x56e0
jmp 0x6d62
jmp 0x6d62
movq -0x10(%rbp), %rax
testb $0x1, 0x28(%rax)
je 0x6d7e
movq -0x20(%rbp), %rdi
leaq 0x12c8ac(%rip), %rsi    # 0x133623
movb $0x0, %al
callq 0x56e0
movq -0x10(%rbp), %rax
testb $0x1, 0x29(%rax)
je 0x6d9a
movq -0x20(%rbp), %rdi
leaq 0x12c89f(%rip), %rsi    # 0x133632
movb $0x0, %al
callq 0x56e0
movq -0x80(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x6dec
movq -0x20(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rsi
callq 0x5a60
movq -0xa8(%rbp), %rdi
movq %rax, %rdx
leaq 0x12c882(%rip), %rsi    # 0x133667
movb $0x0, %al
callq 0x56e0
movq -0x20(%rbp), %rdi
movq -0x88(%rbp), %rdx
leaq 0x148127(%rip), %rsi    # 0x14ef25
movb $0x0, %al
callq 0x56e0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jle 0x6e2a
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdx
leaq 0x12c84e(%rip), %rsi    # 0x133671
movb $0x0, %al
callq 0x56e0
movq -0x10(%rbp), %rax
testb $0x1, 0x2a(%rax)
je 0x6e46
movq -0x20(%rbp), %rdi
leaq 0x12c7fd(%rip), %rsi    # 0x13363c
movb $0x0, %al
callq 0x56e0
movq $0x0, -0x90(%rbp)
movq -0x60(%rbp), %rdi
callq 0xc0720
movq -0x90(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)