// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/xoico/src/xoico.xo.c
// Function: xoico_target_s_expand_h
er_t xoico_target_s_expand_h( const xoico_target_s* o, sz_t indent, x_sink* sink, tp_t* body_signature )
{
    // xoico_target.x:302:1
    BLM_INIT_LEVEL(0);
    BLM_TRY(xoico_target_s_expand_update_time(o,indent, sink ))
    
    st_s sink_buf;BLM_T_INIT_SPUSH(st_s, &sink_buf);;
    
    BLM_TRY(xoico_target_s_expand_heading(o,indent, sink ))
    st_s_push_fa(&(sink_buf),"\n" );
    st_s_push_fa(&(sink_buf),"#rn{ }##ifndef __#<sc_t>_#<sc_t>_H\n", indent, o->name.sc, o->ext.sc );
    st_s_push_fa(&(sink_buf),"#rn{ }##define __#<sc_t>_#<sc_t>_H\n", indent, o->name.sc, o->ext.sc );
    
    st_s_push_fa(&(sink_buf),"\n" );
    st_s_push_fa(&(sink_buf),"#rn{ }##include \"bcore_control.h\"\n", indent );
    st_s_push_fa(&(sink_buf),"#rn{ }##include \"bcore_xoila.h\"\n", indent );
    
    /// include generated headers this target depends on
    {const bcore_arr_sz_s* __a=&(o->dependencies );if(__a)for(sz_t __i=0;__i<__a->size;__i++){sz_t target_idx=__a->data[__i];
    {
        const xoico_target_s* target = o->compiler->data[ target_idx ];
        st_s_push_fa(&(sink_buf),"#rn{ }##include \"#<sc_t>.h\"\n", indent, target->include_path.sc );
    }
    
    }}st_s_push_fa(&(sink_buf),"\n" );
    
    st_s_push_fa(&(sink_buf),"#rn{ }##define TYPEOF_#<sc_t> 0x#pl16'0'{#X<tp_t>}ull\n", indent, o->name.sc, btypeof( o->name.sc ) );
    
    {const xoico_target_s* __a=o ;if(__a)for(sz_t __i=0;__i<__a->size;__i++){xoico_source_s* e=__a->data[__i]; BLM_TRY(xoico_source_s_expand_declaration(e,((const xoico_host*)(o)), indent,((x_sink*)(&( sink_buf )))))
    
    }}st_s_push_fa(&(sink_buf),"\n" );
    st_s_push_fa(&(sink_buf),"#rn{ }/*#rn{*}*/\n", indent, sz_max( 0, 116 - indent ) );
    st_s_push_fa(&(sink_buf),"\n" );
    st_s_push_fa(&(sink_buf),"#rn{ }vd_t #<sc_t>_#<sc_t>_signal_handler( const bcore_signal_s* o );\n", indent, o->name.sc, o->ext.sc );
    
    st_s_push_fa(&(sink_buf),"\n" );
    st_s_push_fa(&(sink_buf),"#rn{ }/*#rn{*}*/\n", indent, sz_max( 0, 116 - indent ) );
    st_s_push_fa(&(sink_buf),"// Manifesto\n" );
    st_s_push_fa(&(sink_buf),"\n" );
    {const xoico_target_s* __a=o ;if(__a)for(sz_t __i=0;__i<__a->size;__i++){xoico_source_s* e=__a->data[__i]; BLM_TRY(xoico_source_s_expand_manifesto(e,((const xoico_host*)(o)), indent,((x_sink*)(&( sink_buf )))))
    
    }}st_s_push_fa(&(sink_buf),"\n" );
    st_s_push_fa(&(sink_buf),"#rn{ }##endif // __#<sc_t>_#<sc_t>_H\n", indent, o->name.sc, o->ext.sc );
    
    x_sink_push_data(sink,( vc_t )sink_buf.sc, sink_buf.size );
    
    tp_t body_hash = bcore_tp_fold_sc( bcore_tp_init(), sink_buf.sc );
    x_sink_push_fa(sink,"// XOICO_BODY_SIGNATURE 0x#pl16'0'{#X<tp_t>}\n", body_hash );
    if( body_signature ) (*(body_signature)) = body_hash;
    
    BLM_RETURNV(er_t, 0)
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rcx, 0x10(%rsp)
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0xfd056(%rip), %rax     # 0x117dd0
movq (%rax), %rsi
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
callq 0x717f5
andq $0x0, 0x10(%rbx)
movq %r14, %rdx
callq 0x1aa2f
leaq 0x18(%rsp), %r13
movq %r13, %rdi
callq 0x8e048
movabsq $-0x503db0e6e1c2e704, %rsi # imm = 0xAFC24F191E3D18FC
movq %rbx, %rdi
movq %r13, %rdx
callq 0x71998
movq %r12, %rdi
movq %r14, 0x8(%rsp)
movq %r14, %rdx
callq 0x1aabf
leaq 0xab7fb(%rip), %rbx     # 0xc65cb
movq %r13, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x8f4ef
movq 0x10(%r12), %rcx
movq 0x30(%r12), %r8
leaq 0x91860(%rip), %rsi     # 0xac64e
movq %r13, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x8f4ef
movq 0x10(%r12), %rcx
movq 0x30(%r12), %r8
leaq 0x91866(%rip), %rsi     # 0xac672
movq %r13, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x8f4ef
movq %r13, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x8f4ef
leaq 0x91869(%rip), %rsi     # 0xac696
movq %r13, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x8f4ef
leaq 0x91878(%rip), %rsi     # 0xac6b9
movq %r13, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x8f4ef
leaq 0x91885(%rip), %rbx     # 0xac6da
xorl %r14d, %r14d
cmpq 0xe8(%r12), %r14
jae 0x1ae97
movq 0xe0(%r12), %rax
movq 0x138(%r12), %rcx
movq (%rax,%r14,8), %rax
movq 0x8(%rcx), %rcx
movq (%rcx,%rax,8), %rax
movq 0x60(%rax), %rcx
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x8f4ef
incq %r14
jmp 0x1ae58
leaq 0xab72d(%rip), %rsi     # 0xc65cb
xorl %ebp, %ebp
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8f4ef
movq 0x10(%r12), %r14
movq %r14, %rdi
callq 0x10aad
leaq 0x8f1e6(%rip), %rsi     # 0xaa0a9
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0x8f4ef
cmpq 0xa0(%r12), %rbp
jae 0x1af07
movq 0x98(%r12), %rax
movq (%rax,%rbp,8), %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x197ea
incq %rbp
testq %rax, %rax
je 0x1aed6
movq %rax, %r13
jmp 0x1b060
leaq 0xab6bd(%rip), %rbp     # 0xc65cb
xorl %r14d, %r14d
leaq 0x18(%rsp), %r13
movq %r13, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0x8f4ef
pushq $0x74
popq %rbx
subq %r15, %rbx
testq %rbx, %rbx
cmovleq %r14, %rbx
leaq 0x912b4(%rip), %rsi     # 0xac1eb
movq %r13, %rdi
movq %r15, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x8f4ef
movq %r13, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0x8f4ef
movq 0x10(%r12), %rcx
movq 0x30(%r12), %r8
leaq 0x91792(%rip), %rsi     # 0xac6f7
movq %r13, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x8f4ef
movq %r13, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0x8f4ef
movq %r13, %rdi
leaq 0x91262(%rip), %rsi     # 0xac1eb
movq %r15, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x8f4ef
leaq 0x917a1(%rip), %rsi     # 0xac73e
movq %r13, %rdi
xorl %eax, %eax
callq 0x8f4ef
movq %r13, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0x8f4ef
cmpq 0xa0(%r12), %r14
jae 0x1afda
movq 0x98(%r12), %rax
movq (%rax,%r14,8), %rdi
movq %r15, %rdx
movq %r13, %rcx
callq 0x19d9e
incq %r14
jmp 0x1afb4
leaq 0xab5ea(%rip), %rsi     # 0xc65cb
xorl %r13d, %r13d
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8f4ef
movq 0x10(%r12), %rcx
movq 0x30(%r12), %r8
leaq 0x91748(%rip), %rsi     # 0xac74c
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x8f4ef
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
movq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x1b07c
movq 0x8(%rbx), %rsi
movabsq $-0x340d631b7bdddcdb, %rdi # imm = 0xCBF29CE484222325
callq 0x10500
movq %rax, %rbx
leaq 0x9172f(%rip), %rsi     # 0xac772
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xdd43
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x1b060
movq %rbx, (%rax)
xorl %r13d, %r13d
leaq 0x38(%rsp), %rdi
callq 0x71b64
movq %r13, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq