// File: /workspace/github_c_makefile_star2_O1/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 0x178b73(%rip), %rax    # 0x1a8dd0
movq (%rax), %rsi
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
callq 0xe0431
movq $0x0, 0x10(%rbx)
movq %r14, %rdx
callq 0x2ff14
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x113f7c
movabsq $-0x503db0e6e1c2e704, %rsi # imm = 0xAFC24F191E3D18FC
movq %rbx, %rdi
movq %r15, %rdx
callq 0xe06ab
movq %r13, %rdi
movq %r14, 0x28(%rsp)
movq %r14, %rdx
callq 0x2ffa7
leaq 0x123438(%rip), %rbx    # 0x1536ee
movq %r15, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1157cb
movq 0x10(%r13), %rcx
movq 0x30(%r13), %r8
leaq 0x10a37c(%rip), %rsi    # 0x13a64e
movq %r15, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x1157cb
movq 0x10(%r13), %rcx
movq 0x30(%r13), %r8
leaq 0x10a384(%rip), %rsi    # 0x13a672
movq %r15, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x1157cb
movq %r15, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1157cb
leaq 0x10a387(%rip), %rsi    # 0x13a696
movq %r15, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x1157cb
leaq 0x10a396(%rip), %rsi    # 0x13a6b9
movq %r15, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x1157cb
cmpq $0x0, 0xe8(%r13)
je 0x30383
leaq 0x10a399(%rip), %rbx    # 0x13a6da
leaq 0x8(%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 0x1157cb
incq %r15
cmpq 0xe8(%r13), %r15
jb 0x30349
movabsq $-0x509c42b379fe4821, %r15 # imm = 0xAF63BD4C8601B7DF
leaq 0x12335a(%rip), %rsi    # 0x1536ee
leaq 0x8(%rsp), %rdi
xorl %eax, %eax
callq 0x1157cb
movq 0x10(%r13), %rcx
movq %r15, %r8
testq %rcx, %rcx
je 0x303ea
movabsq $-0x340d631b7bdddcdb, %rdi # imm = 0xCBF29CE484222325
movb (%rcx), %sil
testb %sil, %sil
je 0x303e7
movabsq $0x100000001b3, %rax    # imm = 0x100000001B3
leaq 0x1(%rcx), %rdx
movzbl %sil, %r8d
xorq %rdi, %r8
imulq %rax, %r8
movb (%rdx), %sil
incq %rdx
movq %r8, %rdi
testb %sil, %sil
jne 0x303cc
jmp 0x303ea
movq %rdi, %r8
leaq 0x107cb8(%rip), %rsi    # 0x1380a9
leaq 0x8(%rsp), %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x1157cb
testq %r13, %r13
je 0x30461
cmpq $0x0, 0xa0(%r13)
sete %bl
je 0x3046d
movq $0x0, (%rsp)
xorl %r14d, %r14d
movq 0x98(%r13), %rax
movq (%rax,%r14,8), %rdi
movq %r12, %rdx
leaq 0x8(%rsp), %rcx
callq 0x2dce1
movq %rax, %rbp
testq %rax, %rax
je 0x3044b
leaq 0x38(%rsp), %rdi
callq 0xe0b30
movq %rbp, (%rsp)
testq %rbp, %rbp
jne 0x30475
incq %r14
cmpq 0xa0(%r13), %r14
setae %bl
jb 0x3041d
jmp 0x30475
movq $0x0, (%rsp)
movb $0x1, %bl
jmp 0x30475
movq $0x0, (%rsp)
testb $0x1, %bl
movq (%rsp), %rax
je 0x306d0
leaq 0x123265(%rip), %rbp    # 0x1536ee
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0x1157cb
movl $0x74, %eax
subq %r12, %rax
testq %rax, %rax
movl $0x0, %r14d
cmovgq %rax, %r14
leaq 0x109d34(%rip), %rsi    # 0x13a1eb
movq %rbx, %rdi
movq %r12, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x1157cb
movq %rbx, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0x1157cb
movq 0x10(%r13), %rcx
movq 0x30(%r13), %r8
leaq 0x10a214(%rip), %rsi    # 0x13a6f7
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x1157cb
movq %rbx, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0x1157cb
movq %rbx, %rdi
leaq 0x109ce4(%rip), %rsi    # 0x13a1eb
movq %r12, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x1157cb
leaq 0x10a223(%rip), %rsi    # 0x13a73e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1157cb
movq %rbx, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0x1157cb
testq %r13, %r13
je 0x3056b
cmpq $0x0, 0xa0(%r13)
je 0x3056b
xorl %r14d, %r14d
leaq 0x8(%rsp), %rbx
movq 0x98(%r13), %rax
movq (%rax,%r14,8), %rdi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x2e535
incq %r14
cmpq 0xa0(%r13), %r14
jb 0x30549
leaq 0x12317c(%rip), %rsi    # 0x1536ee
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1157cb
movq 0x10(%r13), %rcx
movq 0x30(%r13), %r8
leaq 0x10a1bc(%rip), %rsi    # 0x13a74c
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x1157cb
movq 0x8(%rbx), %r12
movq 0x10(%rbx), %r13
movq 0x28(%rsp), %r14
movq (%r14), %rbp
leaq 0x1794fc(%rip), %rax    # 0x1a9ab0
movl (%rax), %ecx
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x20(%rax,%rcx,8), %rdx
movq 0x18(%rax,%rcx,8), %rcx
andq %rbp, %rcx
shlq $0x4, %rcx
leaq (%rdx,%rcx), %rax
movq (%rdx,%rcx), %rdx
movl $0x8, %ecx
cmpq %rbp, %rdx
je 0x3060e
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %rbp, %rdx
je 0x3060e
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %rbp, %rdx
je 0x3060e
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %rbp, %rdx
jne 0x306df
movq (%rax,%rcx), %rbx
testq %rbx, %rbx
jne 0x3063e
movabsq $0x5ea8cabb93ff3b7e, %rdi # imm = 0x5EA8CABB93FF3B7E
movq %rbp, %rsi
callq 0xf3f85
movq %rax, %rbx
leaq 0x17947d(%rip), %rdi    # 0x1a9ab0
movq %rbp, %rsi
movq %rax, %rdx
callq 0x12128c
cmpq $0x0, 0x10(%rbx)
jne 0x30654
leaq 0x114c72(%rip), %rsi    # 0x1452be
movq %rbx, %rdi
callq 0xf592c
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq *0x10(%rbx)
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x306a3
movabsq $-0x340d631b7bdddcdb, %rsi # imm = 0xCBF29CE484222325
movb (%rax), %dl
testb %dl, %dl
je 0x306a0
movabsq $0x100000001b3, %rcx    # imm = 0x100000001B3
incq %rax
movzbl %dl, %r15d
xorq %rsi, %r15
imulq %rcx, %r15
movb (%rax), %dl
incq %rax
movq %r15, %rsi
testb %dl, %dl
jne 0x30687
jmp 0x306a3
movq %rsi, %r15
leaq 0x10a0c8(%rip), %rsi    # 0x13a772
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xee2a
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0x306c4
movq %r15, (%rax)
leaq 0x38(%rsp), %rdi
callq 0xe0b30
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
jmp 0x30612