// File: /workspace/github_c_makefile_star2_O0/johsteffens[P]beth/xoico/src/xoico.xo.c
// Function: xoico_target_s_expand_phase2
er_t xoico_target_s_expand_phase2( xoico_target_s* o, bl_t* p_modified )
{
    // xoico_target.x:583:1
    BLM_INIT_LEVEL(0);
    if( !o->modified )
    {
        if( (p_modified) ) (*(p_modified)) = false;
        BLM_RETURNV(er_t, 0)
    }
    
    ASSERT( o->target_h );
    ASSERT( o->target_c );
    
    st_s* file_h = ((st_s*)BLM_LEVEL_T_PUSH(0,st_s,st_s_create_fa("#<sc_t>.h", o->output_path.sc )));
    st_s* file_c = ((st_s*)BLM_LEVEL_T_PUSH(0,st_s,st_s_create_fa("#<sc_t>.c", o->output_path.sc )));
    st_s* file_state = ((st_s*)BLM_LEVEL_T_PUSH(0,st_s,st_s_create_fa("#<sc_t>.state", o->output_path.sc )));
    
    if( o->readonly )
    {
    //        bcore_msg_fa( "Affected: #<sc_t>\n", file_h.sc );
    //        bcore_msg_fa( "Affected: #<sc_t>\n", file_c.sc );
        if( (p_modified) ) (*(p_modified)) = false;
    }
    else
    {
        {
            bl_t clear_to_overwrite = false;
            tp_t body_signature = o->update_target_on_body_signature ? o->body_signature_h : 0;
            BLM_TRY(xoico_compiler_s_check_overwrite(o->compiler,file_h->sc, body_signature, (&(clear_to_overwrite)) ))
            if( clear_to_overwrite )
            {
                bcore_msg_fa( "Writing: #<sc_t>\n", file_h->sc );
                BLM_TRY(xoico_target_write_with_signature(file_h->sc, o->target_h ))
                if( (p_modified) ) (*(p_modified)) = true;
            }
        }
    
        {
            bl_t clear_to_overwrite = false;
            tp_t body_signature = o->update_target_on_body_signature ? o->body_signature_c : 0;
            BLM_TRY(xoico_compiler_s_check_overwrite(o->compiler,file_c->sc, body_signature, (&(clear_to_overwrite)) ))
            if( clear_to_overwrite )
            {
                bcore_msg_fa( "Writing: #<sc_t>\n", file_c->sc );
                BLM_TRY(xoico_target_write_with_signature(file_c->sc, o->target_c ))
                if( (p_modified) ) (*(p_modified)) = true;
            }
        }
    
        {
            bl_t clear_to_overwrite = false;
            BLM_TRY(xoico_compiler_s_check_overwrite(o->compiler,file_state->sc, 0, (&(clear_to_overwrite)) ))
            if( clear_to_overwrite )
            {
                bcore_msg_fa( "Writing: #<sc_t>\n", file_state->sc );
                BLM_TRY(xoico_target_write_with_signature(file_state->sc, o->target_state ))
                if( (p_modified) ) (*(p_modified)) = true;
            }
        }
    
    }
    BLM_RETURNV(er_t, 0)
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
leaq 0x192276(%rip), %rax    # 0x1b2330
movq (%rax), %rax
movq %rax, -0x20(%rbp)
leaq -0x50(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xbfe80
movq -0x58(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
testb $0x1, 0xf9(%rax)
jne 0x20123
cmpq $0x0, -0x18(%rbp)
je 0x20105
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movq $0x0, -0x60(%rbp)
movq -0x58(%rbp), %rdi
callq 0xc0720
movq -0x60(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x205ac
movq -0x10(%rbp), %rax
cmpq $0x0, 0x100(%rax)
jne 0x2015a
leaq 0x113867(%rip), %rdi    # 0x13399f
leaq 0x115f04(%rip), %rsi    # 0x136043
leaq 0x115f09(%rip), %rdx    # 0x13604f
leaq 0x11349b(%rip), %rcx    # 0x1335e8
movl $0x15a0, %r8d           # imm = 0x15A0
movb $0x0, %al
callq 0x9cea0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x108(%rax)
jne 0x20191
leaq 0x113830(%rip), %rdi    # 0x13399f
leaq 0x115ef6(%rip), %rsi    # 0x13606c
leaq 0x115ed2(%rip), %rdx    # 0x13604f
leaq 0x113464(%rip), %rcx    # 0x1335e8
movl $0x15a1, %r8d           # imm = 0x15A1
movb $0x0, %al
callq 0x9cea0
movq -0x20(%rbp), %rax
movq %rax, -0x120(%rbp)
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rsi
leaq 0x115eca(%rip), %rdi    # 0x136078
movb $0x0, %al
callq 0xff430
movq -0x120(%rbp), %rdi
movq %rax, %rcx
xorl %eax, %eax
movl %eax, %esi
movabsq $-0x503db0e6e1c2e704, %rdx # imm = 0xAFC24F191E3D18FC
callq 0xc01a0
movq %rax, -0x68(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x118(%rbp)
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rsi
leaq 0x115e8f(%rip), %rdi    # 0x136082
movb $0x0, %al
callq 0xff430
movq -0x118(%rbp), %rdi
movq %rax, %rcx
xorl %eax, %eax
movl %eax, %esi
movabsq $-0x503db0e6e1c2e704, %rdx # imm = 0xAFC24F191E3D18FC
callq 0xc01a0
movq %rax, -0x70(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rsi
leaq 0x115de8(%rip), %rdi    # 0x136020
movb $0x0, %al
callq 0xff430
movq -0x110(%rbp), %rdi
movq %rax, %rcx
xorl %eax, %eax
movl %eax, %esi
movabsq $-0x503db0e6e1c2e704, %rdx # imm = 0xAFC24F191E3D18FC
callq 0xc01a0
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rax
testb $0x1, 0xfa(%rax)
je 0x20280
cmpq $0x0, -0x18(%rbp)
je 0x2027b
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
jmp 0x2058d
movb $0x0, -0x79(%rbp)
movq -0x10(%rbp), %rax
testb $0x1, 0x50(%rax)
je 0x202a2
movq -0x10(%rbp), %rax
movq 0x118(%rax), %rax
movq %rax, -0x128(%rbp)
jmp 0x202ad
xorl %eax, %eax
movq %rax, -0x128(%rbp)
jmp 0x202ad
movq -0x128(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x10(%rbp), %rax
movq 0x138(%rax), %rdi
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x88(%rbp), %rdx
leaq -0x79(%rbp), %rcx
callq 0x205c0
movq %rax, -0x90(%rbp)
cmpq $0x0, -0x90(%rbp)
je 0x20316
movq -0x90(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x58(%rbp), %rdi
callq 0xc0720
movq -0x98(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x205ac
testb $0x1, -0x79(%rbp)
je 0x20392
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0x115d61(%rip), %rdi    # 0x13608c
movb $0x0, %al
callq 0x9c9e0
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x100(%rax), %rsi
callq 0x20910
movq %rax, -0xa0(%rbp)
cmpq $0x0, -0xa0(%rbp)
je 0x20382
movq -0xa0(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x58(%rbp), %rdi
callq 0xc0720
movq -0xa8(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x205ac
cmpq $0x0, -0x18(%rbp)
je 0x20390
movq -0x18(%rbp), %rax
movb $0x1, (%rax)
jmp 0x20392
movb $0x0, -0xa9(%rbp)
movq -0x10(%rbp), %rax
testb $0x1, 0x50(%rax)
je 0x203b7
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rax
movq %rax, -0x130(%rbp)
jmp 0x203c2
xorl %eax, %eax
movq %rax, -0x130(%rbp)
jmp 0x203c2
movq -0x130(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x10(%rbp), %rax
movq 0x138(%rax), %rdi
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0xb8(%rbp), %rdx
leaq -0xa9(%rbp), %rcx
callq 0x205c0
movq %rax, -0xc0(%rbp)
cmpq $0x0, -0xc0(%rbp)
je 0x2042e
movq -0xc0(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x58(%rbp), %rdi
callq 0xc0720
movq -0xc8(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x205ac
testb $0x1, -0xa9(%rbp)
je 0x204ad
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0x115c46(%rip), %rdi    # 0x13608c
movb $0x0, %al
callq 0x9c9e0
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rsi
callq 0x20910
movq %rax, -0xd0(%rbp)
cmpq $0x0, -0xd0(%rbp)
je 0x2049d
movq -0xd0(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x58(%rbp), %rdi
callq 0xc0720
movq -0xd8(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x205ac
cmpq $0x0, -0x18(%rbp)
je 0x204ab
movq -0x18(%rbp), %rax
movb $0x1, (%rax)
jmp 0x204ad
movb $0x0, -0xd9(%rbp)
movq -0x10(%rbp), %rax
movq 0x138(%rax), %rdi
movq -0x78(%rbp), %rax
movq 0x8(%rax), %rsi
xorl %eax, %eax
movl %eax, %edx
leaq -0xd9(%rbp), %rcx
callq 0x205c0
movq %rax, -0xe8(%rbp)
cmpq $0x0, -0xe8(%rbp)
je 0x2050f
movq -0xe8(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0x58(%rbp), %rdi
callq 0xc0720
movq -0xf0(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x205ac
testb $0x1, -0xd9(%rbp)
je 0x2058b
movq -0x78(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0x115b65(%rip), %rdi    # 0x13608c
movb $0x0, %al
callq 0x9c9e0
movq -0x78(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x110(%rax), %rsi
callq 0x20910
movq %rax, -0xf8(%rbp)
cmpq $0x0, -0xf8(%rbp)
je 0x2057b
movq -0xf8(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0x58(%rbp), %rdi
callq 0xc0720
movq -0x100(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x205ac
cmpq $0x0, -0x18(%rbp)
je 0x20589
movq -0x18(%rbp), %rax
movb $0x1, (%rax)
jmp 0x2058b
jmp 0x2058d
movq $0x0, -0x108(%rbp)
movq -0x58(%rbp), %rdi
callq 0xc0720
movq -0x108(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nopl (%rax)