// File: /workspace/github_c_makefile_star2_O3/johsteffens[P]beth/xoico/src/xoico.xo.c
// Function: xoico_stamp_s_expand_declaration
er_t xoico_stamp_s_expand_declaration( const xoico_stamp_s* o, const xoico_host* host, sz_t indent, x_sink* sink )
{
    // xoico_stamp.x:946:1
    
    sc_t sc_name = o->st_name.sc;
    
    x_sink_push_fa(sink,"#rn{ }##define TYPEOF_#<sc_t> 0x#pl16'0'{#X<tp_t>}ull\n", indent, sc_name, btypeof( sc_name ) );
    
    x_sink_push_fa(sink,"#rn{ }##define BETH_EXPAND_ITEM_#<sc_t>", indent, sc_name, sc_name );
    x_sink_push_fa(sink," \\\n#rn{ }  BCORE_DECLARE_OBJECT( #<sc_t> )", indent, sc_name );
    x_sink_push_fa(sink," \\\n" );
    
    bcore_self_s_struct_body_to_sink_newline_escaped( o->self, indent + 2, ( bcore_sink* )sink );
    x_sink_push_fa(sink,";" );
    
    {const xoico_funcs_s* __a=&(o->funcs );if(__a)for(sz_t __i=0;__i<__a->size;__i++){xoico_func_s* func=__a->data[__i]; BLM_TRY(xoico_func_s_expand_forward(func,((const xoico_host*)(o)), indent + 2, sink )) // expands all prototypes
    }}{const xoico_funcs_s* __a=&(o->funcs );if(__a)for(sz_t __i=0;__i<__a->size;__i++){xoico_func_s* func=__a->data[__i]; BLM_TRY(xoico_func_s_expand_declaration(func,((const xoico_host*)(o)), indent + 2, sink )) // only expands static inline functions
    
    }}x_sink_push_fa(sink,"\n" );
    return  0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
movq 0x10(%rdi), %r12
testq %r12, %r12
je 0x2a8ec
movabsq $-0x340d631b7bdddcdb, %rsi # imm = 0xCBF29CE484222325
movb (%r12), %dl
testb %dl, %dl
je 0x2a8f8
leaq 0x1(%r12), %rax
movabsq $0x100000001b3, %rcx    # imm = 0x100000001B3
movzbl %dl, %r8d
xorq %rsi, %r8
imulq %rcx, %r8
movb (%rax), %dl
incq %rax
movq %r8, %rsi
testb %dl, %dl
jne 0x2a8d3
jmp 0x2a8fb
movabsq $-0x509c42b379fe4821, %r8 # imm = 0xAF63BD4C8601B7DF
jmp 0x2a8fb
movq %rsi, %r8
leaq 0x1027a7(%rip), %rsi    # 0x12d0a9
movq %rbx, %rdi
movq %r14, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0xed3f
leaq 0x1047a4(%rip), %rsi    # 0x12f0bd
movq %rbx, %rdi
movq %r14, %rdx
movq %r12, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0xed3f
leaq 0x1047b2(%rip), %rsi    # 0x12f0e5
movq %rbx, %rdi
movq %r14, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0xed3f
leaq 0x11919c(%rip), %rsi    # 0x143ae6
movq %rbx, %rdi
xorl %eax, %eax
callq 0xed3f
movq 0x50(%r15), %rdi
addq $0x2, %r14
movq %r14, %rsi
movq %rbx, %rdx
callq 0xc2ff8
leaq 0x106f5a(%rip), %rsi    # 0x1318c8
movq %rbx, %rdi
xorl %eax, %eax
callq 0xed3f
cmpq $0x0, 0x68(%r15)
je 0x2a9d0
xorl %r12d, %r12d
movq 0x60(%r15), %rax
movq (%rax,%r12,8), %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x1b482
incq %r12
movq 0x68(%r15), %rax
cmpq %rax, %r12
jb 0x2a982
testq %rax, %rax
je 0x2a9d0
xorl %r13d, %r13d
movq 0x60(%r15), %rax
movq (%rax,%r13,8), %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x1b5f4
testq %rax, %rax
jne 0x2a9f1
incq %r13
cmpq 0x68(%r15), %r13
jb 0x2a9ac
leaq 0x11dd3d(%rip), %rsi    # 0x148714
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %eax, %eax
callq 0xed3f
movq %r12, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r12
leaq 0x1713d5(%rip), %rax    # 0x19bdd0
movq (%rax), %rdi
callq 0xd6d2c
jmp 0x2a9e4