// File: /workspace/github_c_makefile_star2_O0/johsteffens[P]beth/xoico/src/xoico.xo.c
// Function: xoico_typespec_s_expand
er_t xoico_typespec_s_expand( const xoico_typespec_s* o, const xoico_host* host, x_sink* sink )
{
    // xoico_typespec.x:216: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)) )
    {
        //if( !sc_obj_type ) ERR_fa( "Cannot resolve 'type_object' at this point." );
        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 ) )));
    
    sc_t sc_type = st_type->sc;
    if( o->flag_static   ) x_sink_push_fa(sink,"static " );
    if( o->access_class == TYPEOF_const ) x_sink_push_fa(sink,"const " );
    if( o->flag_volatile ) x_sink_push_fa(sink,"volatile " );
    x_sink_push_fa(sink,"#<sc_t>", sc_type );
    
    for(sz_t i = 0; i < o->indirection; i++ ) x_sink_push_fa(sink,"*" );
    if( o->flag_restrict ) x_sink_push_fa(sink," restrict " );
    
    BLM_RETURNV(er_t, 0)
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
leaq 0x1ab9f2(%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 0x69a8
movq -0x20(%rbp), %rdi
leaq 0x12cc49(%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 0x6b57
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 0x69e0
movq -0x18(%rbp), %rdi
callq 0x6b70
movq %rax, -0x78(%rbp)
jmp 0x6a13
movabsq $-0x59040ffc58933ff2, %rax # imm = 0xA6FBF003A76CC00E
cmpq %rax, -0x78(%rbp)
jne 0x6a11
leaq 0x12cbd9(%rip), %rdi    # 0x1335d0
leaq 0x12cbea(%rip), %rsi    # 0x1335e8
movl $0x1f1, %edx            # imm = 0x1F1
leaq 0x12cbed(%rip), %rcx    # 0x1335f7
movb $0x0, %al
callq 0x9d0f0
jmp 0x6a13
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 -0x80(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x10(%rbp), %rax
testb $0x1, 0x28(%rax)
je 0x6a7f
movq -0x20(%rbp), %rdi
leaq 0x12cbab(%rip), %rsi    # 0x133623
movb $0x0, %al
callq 0x56e0
movq -0x10(%rbp), %rax
movabsq $0x65c9718e19e3df34, %rcx # imm = 0x65C9718E19E3DF34
cmpq %rcx, 0x10(%rax)
jne 0x6aa5
movq -0x20(%rbp), %rdi
leaq 0x12cb8d(%rip), %rsi    # 0x13362b
movb $0x0, %al
callq 0x56e0
movq -0x10(%rbp), %rax
testb $0x1, 0x29(%rax)
je 0x6ac1
movq -0x20(%rbp), %rdi
leaq 0x12cb78(%rip), %rsi    # 0x133632
movb $0x0, %al
callq 0x56e0
movq -0x20(%rbp), %rdi
movq -0x88(%rbp), %rdx
leaq 0x148452(%rip), %rsi    # 0x14ef25
movb $0x0, %al
callq 0x56e0
movq $0x0, -0x90(%rbp)
movq -0x90(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jge 0x6b1c
movq -0x20(%rbp), %rdi
leaq 0x139ec1(%rip), %rsi    # 0x1409c2
movb $0x0, %al
callq 0x56e0
movq -0x90(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x90(%rbp)
jmp 0x6ae5
movq -0x10(%rbp), %rax
testb $0x1, 0x2a(%rax)
je 0x6b38
movq -0x20(%rbp), %rdi
leaq 0x12cb0b(%rip), %rsi    # 0x13363c
movb $0x0, %al
callq 0x56e0
movq $0x0, -0x98(%rbp)
movq -0x60(%rbp), %rdi
callq 0xc0720
movq -0x98(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)