// File: /workspace/github_c_makefile_star2_O1/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, %ebp
movq %rdi, 0x10(%rsp)
movabsq $-0x503db0e6e1c2e704, %rbx # imm = 0xAFC24F191E3D18FC
leaq 0x156f49(%rip), %r12    # 0x1a8dd0
movq (%r12), %rsi
leaq 0x48(%rsp), %r14
movq %r14, %rdi
callq 0xe0431
movq $0x0, 0x10(%r14)
xorl %eax, %eax
callq 0x114bbb
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %rax, %rcx
callq 0xe0676
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0x11454b
movq 0x8(%r14), %rax
cmpb $0x2f, (%rax)
movl %ebp, 0x8(%rsp)
je 0x51f29
xorl %eax, %eax
callq 0x114bbb
leaq 0x48(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %rax, %rcx
callq 0xe0676
movq %r12, %r13
movq %rax, %r12
movq %rax, %rdi
callq 0xd067d
movq 0x8(%r12), %rsi
movq %r13, %r12
movq 0x8(%r14), %rdx
leaq 0xe6169(%rip), %rdi     # 0x138078
xorl %eax, %eax
callq 0x114d03
movq %r15, %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %rax, %rcx
callq 0xe0676
movq %rax, %r14
movq 0x8(%r14), %rdi
callq 0xc8ee1
leaq 0x48(%rsp), %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %rax, %rcx
callq 0xe0676
movq %rax, %r13
movq 0x8(%rax), %r15
movq 0x10(%rsp), %rbp
movq (%rbp), %rbx
movq (%r12), %rsi
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0xe0431
xorl %eax, %eax
movq %rax, 0x10(%r14)
movq %r15, %rdi
callq 0x5b0e7
movq %r14, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0xe0900
movq %rax, %r15
movq (%r12), %rsi
leaq 0x78(%rsp), %r12
movq %r12, %rdi
callq 0xe0431
xorl %eax, %eax
movq %rax, 0x10(%r12)
xorl %eax, %eax
callq 0x8580d
movabsq $0x56270522f5daaafb, %rdx # imm = 0x56270522F5DAAAFB
movq %r12, %rdi
xorl %esi, %esi
movq %rax, %rcx
callq 0xe0676
movq %rax, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
movq %r15, %rcx
callq 0x85a42
movq %rax, %rbx
movq %r12, %rdi
callq 0xe0b30
movq %r14, %rdi
callq 0xe0b30
testq %rbx, %rbx
je 0x52001
leaq 0x48(%rsp), %rdi
callq 0xe0b30
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb8(%rbp), %rdi
movq %r13, %rsi
callq 0x114440
cmpb $0x0, 0x8(%rsp)
je 0x5201b
movb $0x1, 0x20(%rbp)
movq 0x8(%rbp), %rax
testq %rax, %rax
je 0x52092
movq 0xa0(%rbp), %rdi
testq %rdi, %rdi
je 0x520ed
movq 0x8(%rax), %rsi
callq 0x51b18
movq %rax, %rbp
testq %rax, %rax
je 0x520df
movq 0xc0(%rbp), %rdi
movq 0x10(%rsp), %r14
movq 0xc0(%r14), %rsi
callq 0xc84cd
testl %eax, %eax
je 0x520b6
movq 0x8(%r14), %rax
movq 0x8(%rax), %rdx
movq 0x8(%r13), %rcx
movq 0xc0(%rbp), %r8
leaq 0xeac0e(%rip), %rsi     # 0x13cc8d
movabsq $0x4d9e984c5b21faea, %rdi # imm = 0x4D9E984C5B21FAEA
xorl %eax, %eax
callq 0xc87b0
jmp 0x520d2
movq 0x8(%r13), %rdx
leaq 0xeab81(%rip), %rsi     # 0x13cc1e
movabsq $0x4d9e984c5b21faea, %rdi # imm = 0x4D9E984C5B21FAEA
xorl %eax, %eax
callq 0xc87b0
movq %rax, %rbx
jmp 0x51fe2
movq 0x8(%r13), %rdx
leaq 0xeab96(%rip), %rsi     # 0x13cc57
movabsq $0x4d9e984c5b21faea, %rdi # imm = 0x4D9E984C5B21FAEA
xorl %eax, %eax
callq 0xc87b0
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0xe0b30
testq %rbp, %rbp
movq 0x10(%rsp), %rbp
jne 0x51fec
movq %rbx, 0x8(%rsp)
cmpq $0x0, 0x48(%rbp)
setne %al
je 0x5243c
xorl %r12d, %r12d
movabsq $-0x503db0e6e1c2e704, %r13 # imm = 0xAFC24F191E3D18FC
leaq 0x78(%rsp), %rdi
movb %al, 0x7(%rsp)
movq 0x40(%rbp), %rax
movq (%rax,%r12,8), %r15
movq %rdi, 0x18(%rsp)
leaq 0x48(%rsp), %rsi
callq 0xe0431
movq 0x18(%rsp), %r14
movq $0x4, 0x10(%r14)
cmpq $0x0, 0xb0(%rbp)
jne 0x52150
callq 0x51361
movq %rax, 0xb0(%rbp)
xorl %eax, %eax
callq 0x114bbb
movl $0x4, %esi
movq %r14, %rdi
movq %r13, %rdx
movq %rax, %rcx
callq 0xe0676
movq %rax, %r13
movq 0x8(%r15), %rax
cmpb $0x2f, (%rax)
je 0x52194
movq 0x18(%rbp), %rax
testq %rax, %rax
je 0x52194
movq 0x8(%rax), %rdx
movq %r13, %rdi
leaq 0xeab4b(%rip), %rsi     # 0x13ccd8
xorl %eax, %eax
callq 0x1157cb
movb 0x20(%rbp), %bl
movq 0x8(%r15), %rdi
callq 0xee802
movl $0x4, %esi
movq %r14, %rdi
movq %rax, %rdx
callq 0xe0900
movq %rax, %rbp
movq %rax, %rdi
leaq 0xeab24(%rip), %rsi     # 0x13cce1
movq %r13, %rdx
xorl %eax, %eax
callq 0xda10
movq %rax, %r14
testq %rax, %rax
je 0x521de
movq 0x18(%rsp), %rdi
callq 0xe0b30
movq %r14, 0x8(%rsp)
testq %r14, %r14
je 0x52220
xorl %r15d, %r15d
movabsq $-0x503db0e6e1c2e704, %r13 # imm = 0xAFC24F191E3D18FC
movq 0x10(%rsp), %rbp
testb %r15b, %r15b
leaq 0x78(%rsp), %rdi
je 0x52438
incq %r12
cmpq 0x48(%rbp), %r12
setb %al
jb 0x52112
jmp 0x5243c
movq %r13, %rdi
callq 0x115450
movq 0x8(%r13), %rax
movzbl (%rax), %eax
cmpl $0x20, %eax
je 0x52218
cmpl $0x9, %eax
je 0x52218
movq (%rbp), %r14
leaq 0x157a8c(%rip), %rdx    # 0x1a9cc8
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 0x52295
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r14, %rdx
je 0x52295
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r14, %rdx
je 0x52295
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r14, %rdx
jne 0x52428
movq (%rax,%rcx), %r15
testq %r15, %r15
jne 0x522c5
movabsq $-0x7e8ee9b9b4bbaa8, %rdi # imm = 0xF817116464B44558
movq %r14, %rsi
callq 0xf3f85
movq %rax, %r15
leaq 0x157a0e(%rip), %rdi    # 0x1a9cc8
movq %r14, %rsi
movq %rax, %rdx
callq 0x12128c
movq %r15, %rdi
movq %rbp, %rsi
leaq 0xe6cac(%rip), %rdx     # 0x138f7e
callq 0x10aa16
testb %al, %al
je 0x5238b
movq (%rbp), %r14
leaq 0x1579de(%rip), %rdx    # 0x1a9cc8
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 0x52343
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r14, %rdx
je 0x52343
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r14, %rdx
je 0x52343
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r14, %rdx
jne 0x52430
movq (%rax,%rcx), %r15
testq %r15, %r15
jne 0x52373
movabsq $-0x7e8ee9b9b4bbaa8, %rdi # imm = 0xF817116464B44558
movq %r14, %rsi
callq 0xf3f85
movq %rax, %r15
leaq 0x157960(%rip), %rdi    # 0x1a9cc8
movq %r14, %rsi
movq %rax, %rdx
callq 0x12128c
movq %r15, %rdi
movq %rbp, %rsi
leaq 0xea96d(%rip), %rdx     # 0x13cced
callq 0x10aa16
movb $0x1, %bl
testb %al, %al
je 0x52400
movq 0x10(%rsp), %rbp
movq 0xb0(%rbp), %r14
callq 0x517d8
movq (%r14), %rsi
movq %r14, %rdi
movq %rax, %rdx
callq 0x5b3a7
movq %rbp, 0xa0(%rax)
movq 0x8(%r13), %rdx
movzbl %bl, %esi
movq %rax, %rdi
callq 0x51e5b
movq %rax, %r14
testq %rax, %rax
sete %r15b
je 0x523db
movq 0x18(%rsp), %rdi
callq 0xe0b30
movq %r14, 0x8(%rsp)
testq %r14, %r14
movabsq $-0x503db0e6e1c2e704, %r13 # imm = 0xAFC24F191E3D18FC
jne 0x521f5
leaq 0x18(%rsp), %rdi
callq 0xe0b11
movb $0x1, %r15b
jmp 0x521f5
xorl %r15d, %r15d
movq %rbp, %rdi
leaq 0xea8ef(%rip), %rsi     # 0x13ccfc
xorl %eax, %eax
callq 0xddb2
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
callq 0xe0b30
jmp 0x521e6
xorl %r15d, %r15d
jmp 0x52299
xorl %r15d, %r15d
jmp 0x52347
movb 0x7(%rsp), %al
testb $0x1, %al
movq 0x8(%rsp), %rbx
jne 0x51fec
xorl %ebx, %ebx
jmp 0x51fe2