// File: /workspace/github_c_makefile_star2_O3/johsteffens[P]beth/xoico/src/xoico.xo.c
// Function: xoico_builder_target_s_load
er_t xoico_builder_target_s_load( xoico_builder_target_s* o, bl_t readonly, sc_t path )
{
    // xoico_builder.x:198:1
    BLM_INIT_LEVEL(0);
    st_s* st_path = ((st_s*)BLM_LEVEL_T_PUSH(0,st_s,st_s_create()));
    st_s_copy_sc(st_path,path );
    
    if( st_path->sc[ 0 ] != '/' )
    {
        st_s* current_folder = ((st_s*)BLM_LEVEL_T_PUSH(0,st_s,st_s_create()));
        bcore_folder_get_current( current_folder );
        st_path = ((st_s*)BLM_LEVEL_T_PUSH(0,st_s,st_s_create_fa("#<sc_t>/#<sc_t>", current_folder->sc, st_path->sc )));
    }
    
    st_path = ((st_s*)BLM_LEVEL_T_PUSH(0,st_s,bcore_file_path_minimized(st_path->sc )));
    
    BLM_TRY(x_btcl_from_file(((x_btcl*)(o)),st_path->sc ))
    st_s_copy(&(o->full_path_),st_path );
    if( readonly ) o->readonly = true;
    
    if( !o->name ) BLM_RETURNV(er_t, bcore_error_push_fa(((tp_t)(TYPEOF_general_error)), "In target file: '#<sc_t>'\nTarget name must be specified.", st_path->sc ))
    
    /// check for dependency cycles
    if( o->parent_ )
    {
        const xoico_builder_target_s* match = xoico_builder_target_s_name_match(o->parent_,o->name->sc );
        if( match )
        {
            if( st_s_equal_st(&(match->full_path_),&(o->full_path_ )) )
            {
                BLM_RETURNV(er_t, bcore_error_push_fa(((tp_t)(TYPEOF_general_error)), "In target file: '#<sc_t>'\nCyclic dependency detected.", st_path->sc ))
            }
            else
            {
                BLM_RETURNV(er_t, bcore_error_push_fa(((tp_t)(TYPEOF_general_error)), "Same target name '#<sc_t>' used in different target files:\n#<sc_t>\n#<sc_t>", o->name->sc, st_path->sc, match->full_path_.sc ))
            }
        }
    }
    
    {const bcore_arr_st_s* __a=&(o->dependencies );if(__a)for(sz_t __i=0;__i<__a->size;__i++){st_s* e=__a->data[__i];
    {BLM_INIT_LEVEL(4);
        if( !o->dependencies_target_ ) o->dependencies_target_ = xoico_builder_arr_target_s_create();
    
        st_s* file_path = ((st_s*)BLM_LEVEL_T_PUSH(4,st_s,st_s_create()));
        if( e->sc[ 0 ] != '/' )
        {
            if( o->root_folder ) st_s_push_fa(file_path,"#<sc_t>/", o->root_folder->sc );
        }
    
        bl_t dep_readonly = o->readonly;
    
        x_source* source = ((x_source*)BLM_LEVEL_A_PUSH(4,x_source_create_from_sc(e->sc )));
        BLM_TRY(x_source_parse_fa(source," #:until':'", file_path ))
    
        /// remove trailing spaces
        while( file_path->sc[ 0 ] == ' ' || file_path->sc[ 0 ] == '\t' ) st_s_pop_char(file_path);
    
        if( x_source_parse_bl(source,"#?':'" ) )
        {
            if( x_source_parse_bl(source," #?w'readonly'" ) )
            {
                dep_readonly = true;
            }
            else
            {
                BLM_RETURNV(er_t, x_source_parse_error_fa(source,"Syntax error in dependency declaration." ))
            }
        }
    
        xoico_builder_target_s* target = ((xoico_builder_target_s*)(x_array_push_d(((x_array*)(o->dependencies_target_)),((x_inst*)(xoico_builder_target_s_create() )))));
        target->parent_ = o;
    
        BLM_TRY(xoico_builder_target_s_load(target,dep_readonly, file_path->sc ))
    BLM_DOWN();}
    
    }}BLM_RETURNV(er_t, 0)
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %r15
movl %esi, 0xc(%rsp)
movq %rdi, 0x10(%rsp)
movabsq $-0x503db0e6e1c2e704, %r13 # imm = 0xAFC24F191E3D18FC
leaq 0x14f400(%rip), %r12    # 0x19bdd0
movq (%r12), %rsi
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0xd6675
movq $0x0, 0x10(%r14)
xorl %eax, %eax
callq 0x109c82
movq %r14, %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %rax, %rcx
callq 0xd68a8
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0x109612
movq 0x8(%r14), %rdi
cmpb $0x2f, (%rdi)
je 0x4ca6f
xorl %eax, %eax
callq 0x109c82
leaq 0x18(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %rax, %rcx
callq 0xd68a8
movq %r12, %rbx
movq %rax, %r12
movq %rax, %rdi
callq 0xc6491
movq 0x8(%r12), %rsi
movq %rbx, %r12
movq 0x8(%r14), %rdx
leaq 0xe0624(%rip), %rdi     # 0x12d078
xorl %eax, %eax
callq 0x109dca
movq %r15, %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %rax, %rcx
callq 0xd68a8
movq 0x8(%rax), %rdi
callq 0xbf369
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %rax, %rcx
callq 0xd68a8
movq %rax, %rbx
movq 0x8(%rax), %rbp
movq 0x10(%rsp), %r15
movq (%r15), %r14
movq (%r12), %rsi
leaq 0x48(%rsp), %r13
movq %r13, %rdi
callq 0xd6675
xorl %eax, %eax
movq %rax, 0x10(%r13)
movq %rbp, %rdi
callq 0x558c7
movq %r13, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0xd6b17
movq %rax, %rbp
movq (%r12), %rsi
leaq 0x78(%rsp), %r12
movq %r12, %rdi
callq 0xd6675
xorl %eax, %eax
movq %rax, 0x10(%r12)
xorl %eax, %eax
callq 0x7e0d5
movabsq $0x56270522f5daaafb, %rdx # imm = 0x56270522F5DAAAFB
movq %r12, %rdi
xorl %esi, %esi
movq %rax, %rcx
callq 0xd68a8
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbp, %rcx
callq 0x7e2fc
movq %rax, %r14
movq %r12, %rdi
callq 0xd6d2c
movq %r13, %rdi
callq 0xd6d2c
testq %r14, %r14
jne 0x4ce61
leaq 0xb8(%r15), %rdi
movq %rbx, %rsi
callq 0x1094fa
cmpb $0x0, 0xc(%rsp)
movq %r15, %rbp
movq %rbx, %r15
je 0x4cb47
movb $0x1, 0x20(%rbp)
movq 0x8(%rbp), %rax
testq %rax, %rax
movabsq $-0x503db0e6e1c2e704, %r13 # imm = 0xAFC24F191E3D18FC
je 0x4ce42
movq 0xa0(%rbp), %rbx
testq %rbx, %rbx
je 0x4cb97
movq 0x8(%rax), %r14
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x4cb8b
movq 0x8(%rax), %rsi
movq %r14, %rdi
callq 0xdfa34
testl %eax, %eax
je 0x4ce80
movq 0xa0(%rbx), %rbx
testq %rbx, %rbx
jne 0x4cb6e
cmpq $0x0, 0x48(%rbp)
je 0x4ce33
xorl %r15d, %r15d
movq 0x40(%rbp), %rax
movq (%rax,%r15,8), %rbx
leaq 0x78(%rsp), %rdi
movq %rdi, 0x48(%rsp)
leaq 0x18(%rsp), %rsi
callq 0xd6675
movq 0x48(%rsp), %r14
movq $0x4, 0x10(%r14)
cmpq $0x0, 0xb0(%rbp)
jne 0x4cbe4
callq 0x4bee1
movq %rax, 0xb0(%rbp)
xorl %eax, %eax
callq 0x109c82
movl $0x4, %esi
movq %r14, %rdi
movq %r13, %rdx
movq %rax, %rcx
callq 0xd68a8
movq %rax, %r13
movq 0x8(%rbx), %rdi
cmpb $0x2f, (%rdi)
je 0x4cc2c
movq 0x18(%rbp), %rax
testq %rax, %rax
je 0x4cc2c
movq 0x8(%rax), %rdx
movq %r13, %rdi
leaq 0xe50b7(%rip), %rsi     # 0x131cd8
xorl %eax, %eax
callq 0x10a8a5
movq 0x8(%rbx), %rdi
movb 0x20(%rbp), %bl
callq 0xe4688
movl $0x4, %esi
movq %r14, %rdi
movq %rax, %rdx
callq 0xd6b17
movq %rax, %rbp
movq %rax, %rdi
leaq 0xe5090(%rip), %rsi     # 0x131ce1
movq %r13, %rdx
xorl %eax, %eax
callq 0xda80
testq %rax, %rax
je 0x4cc6d
jmp 0x4cee5
movq %r13, %rdi
callq 0x10a519
movq 0x8(%r13), %rax
movzbl (%rax), %eax
cmpl $0x20, %eax
je 0x4cc65
cmpl $0x9, %eax
je 0x4cc65
movq (%rbp), %r14
leaq 0x15003f(%rip), %rdx    # 0x19ccc8
movl (%rdx), %eax
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%rdx,%rax,8), %rcx
movq 0x18(%rdx,%rax,8), %rdx
andq %r14, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r14, %rdx
je 0x4ccde
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r14, %rdx
je 0x4ccde
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r14, %rdx
je 0x4ccde
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r14, %rdx
jne 0x4cce7
movq (%rax,%rcx), %r12
testq %r12, %r12
jne 0x4cd0e
movabsq $-0x7e8ee9b9b4bbaa8, %rdi # imm = 0xF817116464B44558
movq %r14, %rsi
callq 0xe9bc5
movq %rax, %r12
leaq 0x14ffc5(%rip), %rdi    # 0x19ccc8
movq %r14, %rsi
movq %rax, %rdx
callq 0x115fac
movq %r12, %rdi
movq %rbp, %rsi
leaq 0xe1263(%rip), %rdx     # 0x12df7e
callq 0xffe2b
testb %al, %al
je 0x4cdd4
movq (%rbp), %r14
leaq 0x14ff95(%rip), %rdx    # 0x19ccc8
movl (%rdx), %eax
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%rdx,%rax,8), %rcx
movq 0x18(%rdx,%rax,8), %rdx
andq %r14, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r14, %rdx
je 0x4cd88
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r14, %rdx
je 0x4cd88
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r14, %rdx
je 0x4cd88
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r14, %rdx
jne 0x4cd91
movq (%rax,%rcx), %r12
testq %r12, %r12
jne 0x4cdb8
movabsq $-0x7e8ee9b9b4bbaa8, %rdi # imm = 0xF817116464B44558
movq %r14, %rsi
callq 0xe9bc5
movq %rax, %r12
leaq 0x14ff1b(%rip), %rdi    # 0x19ccc8
movq %r14, %rsi
movq %rax, %rdx
callq 0x115fac
movq %r12, %rdi
movq %rbp, %rsi
leaq 0xe4f28(%rip), %rdx     # 0x131ced
callq 0xffe2b
movb $0x1, %bl
testb %al, %al
je 0x4ced4
movq 0x10(%rsp), %rbp
movq 0xb0(%rbp), %r14
callq 0x4c33b
movq (%r14), %rsi
movq %r14, %rdi
movq %rax, %rdx
callq 0x55b79
movq %rbp, 0xa0(%rax)
movq 0x8(%r13), %rdx
movzbl %bl, %esi
movq %rax, %rdi
callq 0x4c9a2
testq %rax, %rax
jne 0x4cee5
leaq 0x48(%rsp), %rdi
callq 0xd6d0d
incq %r15
cmpq 0x48(%rbp), %r15
movabsq $-0x503db0e6e1c2e704, %r13 # imm = 0xAFC24F191E3D18FC
jb 0x4cba5
leaq 0x18(%rsp), %rdi
callq 0xd6d2c
xorl %r14d, %r14d
jmp 0x4ce6b
movq 0x8(%r15), %rdx
leaq 0xe4dd1(%rip), %rsi     # 0x131c1e
movabsq $0x4d9e984c5b21faea, %rdi # imm = 0x4D9E984C5B21FAEA
xorl %eax, %eax
callq 0xbec3c
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0xd6d2c
movq %r14, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xc0(%rbx), %rdi
movq 0xc0(%rbp), %rsi
callq 0xbe959
testl %eax, %eax
je 0x4cec4
movq 0x8(%rbp), %rax
movq 0x8(%rax), %rdx
movq 0x8(%r15), %rcx
movq 0xc0(%rbx), %r8
leaq 0xe4ddc(%rip), %rsi     # 0x131c8d
movabsq $0x4d9e984c5b21faea, %rdi # imm = 0x4D9E984C5B21FAEA
xorl %eax, %eax
callq 0xbec3c
jmp 0x4ce5e
movq 0x8(%r15), %rdx
leaq 0xe4d88(%rip), %rsi     # 0x131c57
jmp 0x4ce4d
leaq 0xe4e21(%rip), %rsi     # 0x131cfc
movq %rbp, %rdi
xorl %eax, %eax
callq 0xde10
movq %rax, %r14
movq 0x48(%rsp), %rdi
jmp 0x4ce66