// File: /workspace/github_c_makefile_star2_O3/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, 0x30(%rsp)
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r13
leaq 0x16da86(%rip), %rax    # 0x19bdd0
movq (%rax), %rsi
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
callq 0xd6675
movq $0x0, 0x10(%rbx)
movq %r14, %rdx
callq 0x2e00d
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x109030
movabsq $-0x503db0e6e1c2e704, %rsi # imm = 0xAFC24F191E3D18FC
movq %rbx, %rdi
movq %r15, %rdx
callq 0xd68d9
movq %r13, %rdi
movq %r14, 0x8(%rsp)
movq %r14, %rdx
callq 0x2e0a0
leaq 0x11a371(%rip), %rbx    # 0x148714
movq %r15, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x10a8a5
movq 0x10(%r13), %rcx
movq 0x30(%r13), %r8
leaq 0x10128f(%rip), %rsi    # 0x12f64e
movq %r15, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x10a8a5
movq 0x10(%r13), %rcx
movq 0x30(%r13), %r8
leaq 0x101297(%rip), %rsi    # 0x12f672
movq %r15, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x10a8a5
movq %r15, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x10a8a5
leaq 0x10129a(%rip), %rsi    # 0x12f696
movq %r15, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x10a8a5
leaq 0x1012a9(%rip), %rsi    # 0x12f6b9
movq %r15, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x10a8a5
cmpq $0x0, 0xe8(%r13)
je 0x2e470
leaq 0x1012ac(%rip), %rbx    # 0x12f6da
leaq 0x10(%rsp), %r14
xorl %r15d, %r15d
movq 0xe0(%r13), %rax
movq 0x138(%r13), %rcx
movq (%rax,%r15,8), %rax
movq 0x8(%rcx), %rcx
movq (%rcx,%rax,8), %rax
movq 0x60(%rax), %rcx
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x10a8a5
incq %r15
cmpq 0xe8(%r13), %r15
jb 0x2e436
movabsq $-0x340d631b7bdddcdb, %rbp # imm = 0xCBF29CE484222325
movabsq $-0x509c42b379fe4821, %r15 # imm = 0xAF63BD4C8601B7DF
leaq 0x11a289(%rip), %rsi    # 0x148714
leaq 0x10(%rsp), %rdi
xorl %eax, %eax
callq 0x10a8a5
movq 0x10(%r13), %rcx
movq %r15, %r8
testq %rcx, %rcx
je 0x2e4ed
movb (%rcx), %al
movq %rbp, %r8
testb %al, %al
je 0x2e4ed
movabsq $0x100000001b3, %rdx    # imm = 0x100000001B3
leaq 0x1(%rcx), %rsi
movq %rbp, %r8
movzbl %al, %eax
xorq %rax, %r8
imulq %rdx, %r8
movb (%rsi), %al
incq %rsi
testb %al, %al
jne 0x2e4bd
leaq 0xfebd2(%rip), %rsi     # 0x12d0a9
leaq 0x10(%rsp), %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x10a8a5
testq %r13, %r13
jne 0x2e503
jmp 0x2e53d
leaq 0xfebb5(%rip), %rsi     # 0x12d0a9
leaq 0x10(%rsp), %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x10a8a5
cmpq $0x0, 0xa0(%r13)
je 0x2e53d
xorl %r14d, %r14d
movq 0x98(%r13), %rax
movq (%rax,%r14,8), %rdi
movq %r12, %rdx
leaq 0x10(%rsp), %rcx
callq 0x2c005
testq %rax, %rax
jne 0x2e758
incq %r14
cmpq 0xa0(%r13), %r14
jb 0x2e510
leaq 0x11a1d0(%rip), %rsi    # 0x148714
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x10a8a5
movl $0x74, %eax
subq %r12, %rax
testq %rax, %rax
movl $0x0, %r14d
cmovgq %rax, %r14
leaq 0x100c7c(%rip), %rsi    # 0x12f1eb
movq %rbx, %rdi
movq %r12, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x10a8a5
movq %rbx, %rdi
leaq 0x11a18b(%rip), %rsi    # 0x148714
xorl %eax, %eax
callq 0x10a8a5
movq 0x10(%r13), %rcx
movq 0x30(%r13), %r8
leaq 0x101158(%rip), %rsi    # 0x12f6f7
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x10a8a5
movq %rbx, %rdi
leaq 0x11a15e(%rip), %rsi    # 0x148714
xorl %eax, %eax
callq 0x10a8a5
movq %rbx, %rdi
leaq 0x100c24(%rip), %rsi    # 0x12f1eb
movq %r12, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x10a8a5
leaq 0x101163(%rip), %rsi    # 0x12f73e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x10a8a5
movq %rbx, %rdi
leaq 0x11a125(%rip), %rsi    # 0x148714
xorl %eax, %eax
callq 0x10a8a5
cmpq $0x0, 0xa0(%r13)
je 0x2e62a
xorl %r14d, %r14d
leaq 0x10(%rsp), %rbx
movq 0x98(%r13), %rax
movq (%rax,%r14,8), %rdi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x2c7f6
incq %r14
cmpq 0xa0(%r13), %r14
jb 0x2e608
leaq 0x11a0e3(%rip), %rsi    # 0x148714
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x10a8a5
movq 0x10(%r13), %rcx
movq 0x30(%r13), %r8
leaq 0x1010fd(%rip), %rsi    # 0x12f74c
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x10a8a5
movq 0x8(%rbx), %r12
movq 0x10(%rbx), %r13
movq 0x8(%rsp), %rax
movq (%rax), %rbx
leaq 0x16e43d(%rip), %rax    # 0x19cab0
movl (%rax), %ecx
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x20(%rax,%rcx,8), %rdx
movq 0x18(%rax,%rcx,8), %rcx
andq %rbx, %rcx
shlq $0x4, %rcx
leaq (%rdx,%rcx), %rax
movq (%rdx,%rcx), %rdx
movl $0x8, %ecx
cmpq %rbx, %rdx
je 0x2e6c9
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %rbx, %rdx
je 0x2e6c9
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %rbx, %rdx
je 0x2e6c9
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %rbx, %rdx
jne 0x2e6d2
movq (%rax,%rcx), %r14
testq %r14, %r14
jne 0x2e6f9
movabsq $0x5ea8cabb93ff3b7e, %rdi # imm = 0x5EA8CABB93FF3B7E
movq %rbx, %rsi
callq 0xe9bc5
movq %rax, %r14
leaq 0x16e3c2(%rip), %rdi    # 0x19cab0
movq %rbx, %rsi
movq %rax, %rdx
callq 0x115fac
movq 0x10(%r14), %rax
testq %rax, %rax
jne 0x2e715
leaq 0x10ba2d(%rip), %rsi    # 0x13a136
movq %r14, %rdi
callq 0xeb49c
movq 0x10(%r14), %rax
movq 0x8(%rsp), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq *%rax
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x2e760
movb (%rax), %dl
testb %dl, %dl
je 0x2e75d
movabsq $0x100000001b3, %rcx    # imm = 0x100000001B3
incq %rax
movzbl %dl, %r15d
xorq %rbp, %r15
imulq %rcx, %r15
movb (%rax), %dl
incq %rax
movq %r15, %rbp
testb %dl, %dl
jne 0x2e73f
jmp 0x2e760
movq %rax, %rbx
jmp 0x2e787
movq %rbp, %r15
leaq 0x10100b(%rip), %rsi    # 0x12f772
xorl %ebx, %ebx
movq 0x8(%rsp), %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xed3f
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0x2e787
movq %r15, (%rax)
xorl %ebx, %ebx
leaq 0x38(%rsp), %rdi
callq 0xd6d2c
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq