// File: /workspace/github_c_makefile_star2_O3/johsteffens[P]beth/xoico/src/xoico.xo.c
// Function: xoico_target_s_expand_phase1
er_t xoico_target_s_expand_phase1( xoico_target_s* o, bl_t* p_modified )
{
    // xoico_target.x:536:1
    BLM_INIT_LEVEL(0);
    st_s_attach( &(o->target_h ),  NULL);
    st_s_attach( &(o->target_c ),  NULL);
    st_s_attach( &(o->target_state ),  NULL);
    o->modified = false;
    
    if( xoico_target_s_to_be_modified(o) )
    {
        o->target_h = st_s_create();
        o->target_c = st_s_create();
        o->target_state = st_s_create();
        if( !o->compiler->dry_run )
        {
            BLM_TRY(xoico_target_s_expand_h(o,0,((x_sink*)( o->target_h)), (&(o->body_signature_h)) ))
            BLM_TRY(xoico_target_s_expand_c(o,0,((x_sink*)( o->target_c)), (&(o->body_signature_c)) ))
            BLM_TRY(xoico_target_s_expand_state(o,((x_sink*)(o->target_state ))))
        }
        else
        {
            st_s* buf = ((st_s*)BLM_LEVEL_T_PUSH(0,st_s,st_s_create()));
            BLM_TRY(xoico_target_s_expand_h(o,0,((x_sink*)( buf)), (&(o->body_signature_h)) ))
            BLM_TRY(xoico_target_s_expand_c(o,0,((x_sink*)( buf)), (&(o->body_signature_c)) ))
            BLM_TRY(xoico_target_s_expand_state(o,((x_sink*)(buf ))))
        }
        o->modified = true;
    }
    
    if( p_modified ) (*(p_modified)) = o->modified;
    
    BLM_RETURNV(er_t, 0)
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x16c8d3(%rip), %rax    # 0x19bdd0
movq (%rax), %rsi
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0xd6675
xorl %r12d, %r12d
movq %r12, 0x10(%r15)
movq 0x100(%r14), %rdi
callq 0x10a028
movq %r12, 0x100(%r14)
movq 0x108(%r14), %rdi
callq 0x10a028
movq %r12, 0x108(%r14)
movq 0x110(%r14), %rdi
callq 0x10a028
movq %r12, 0x110(%r14)
movb $0x0, 0xf9(%r14)
movq %r14, %rdi
callq 0x2f117
testb %al, %al
je 0x2f667
xorl %eax, %eax
callq 0x109c82
movq %rax, 0x100(%r14)
xorl %eax, %eax
callq 0x109c82
movq %rax, 0x108(%r14)
xorl %eax, %eax
callq 0x109c82
movq %rax, 0x110(%r14)
movq 0x138(%r14), %rax
cmpb $0x0, 0x184(%rax)
je 0x2f5f6
xorl %eax, %eax
callq 0x109c82
leaq 0x8(%rsp), %rdi
movabsq $-0x503db0e6e1c2e704, %rdx # imm = 0xAFC24F191E3D18FC
xorl %esi, %esi
movq %rax, %rcx
callq 0xd68a8
movq %rax, %r15
leaq 0x118(%r14), %rcx
movq %r14, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x2e327
testq %rax, %rax
jne 0x2f630
leaq 0x120(%r14), %rcx
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x2e7a6
testq %rax, %rax
jne 0x2f630
jmp 0x2f63c
movq 0x100(%r14), %rdx
leaq 0x118(%r14), %rcx
movq %r14, %rdi
xorl %esi, %esi
callq 0x2e327
testq %rax, %rax
jne 0x2f630
movq 0x108(%r14), %rdx
leaq 0x120(%r14), %rcx
movq %r14, %rdi
xorl %esi, %esi
callq 0x2e7a6
testq %rax, %rax
je 0x2f635
movq %rax, %r12
jmp 0x2f678
movq 0x110(%r14), %r15
movq 0x10(%r14), %r12
movq %r14, %rdi
callq 0x2d834
leaq 0x1006a1(%rip), %rsi    # 0x12fcf0
movq %r15, %rdi
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xed3f
movb $0x1, 0xf9(%r14)
testq %rbx, %rbx
je 0x2f675
movb 0xf9(%r14), %al
movb %al, (%rbx)
xorl %r12d, %r12d
leaq 0x8(%rsp), %rdi
callq 0xd6d2c
movq %r12, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq