// File: /workspace/github_c_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
movq 0x10(%rdi), %r12
testq %r12, %r12
je 0x2c50c
movabsq $-0x340d631b7bdddcdb, %rsi # imm = 0xCBF29CE484222325
movb (%r12), %dl
testb %dl, %dl
je 0x2c518
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 0x2c4f3
jmp 0x2c51b
movabsq $-0x509c42b379fe4821, %r8 # imm = 0xAF63BD4C8601B7DF
jmp 0x2c51b
movq %rsi, %r8
leaq 0x10bb87(%rip), %rsi    # 0x1380a9
movq %rbx, %rdi
movq %r14, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0xee2a
leaq 0x10db84(%rip), %rsi    # 0x13a0bd
movq %rbx, %rdi
movq %r14, %rdx
movq %r12, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0xee2a
leaq 0x10db92(%rip), %rsi    # 0x13a0e5
movq %rbx, %rdi
movq %r14, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0xee2a
leaq 0x12253c(%rip), %rsi    # 0x14eaa6
movq %rbx, %rdi
xorl %eax, %eax
callq 0xee2a
movq 0x50(%r15), %rdi
addq $0x2, %r14
movq %r14, %rsi
movq %rbx, %rdx
callq 0xcd0de
leaq 0x11033a(%rip), %rsi    # 0x13c8c8
movq %rbx, %rdi
xorl %eax, %eax
callq 0xee2a
cmpq $0x0, 0x68(%r15)
je 0x2c5c1
xorl %r12d, %r12d
movq 0x60(%r15), %rax
movq (%rax,%r12,8), %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x1bbe1
incq %r12
cmpq 0x68(%r15), %r12
jb 0x2c5a2
cmpq $0x0, 0x68(%r15)
setne %bpl
je 0x2c614
xorl %r12d, %r12d
movq 0x60(%r15), %rax
movq (%rax,%r12,8), %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x1bd5e
movq %rax, %r13
testq %rax, %rax
je 0x2c600
leaq 0x17c7dc(%rip), %rax    # 0x1a8dd0
movq (%rax), %rdi
callq 0xe0b30
movq %r13, (%rsp)
testq %r13, %r13
jne 0x2c614
incq %r12
cmpq 0x68(%r15), %r12
setb %bpl
jb 0x2c5cf
jmp 0x2c614
testb $0x1, %bpl
movq (%rsp), %r14
jne 0x2c632
leaq 0x1270c9(%rip), %rsi    # 0x1536ee
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %eax, %eax
callq 0xee2a
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq