// File: /workspace/github_c_makefile_star2_O0/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:192: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
movq %rsp, %rbp
subq $0x190, %rsp            # imm = 0x190
movb %sil, %al
movq %rdi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq %rdx, -0x20(%rbp)
leaq 0x17a2ce(%rip), %rax    # 0x1b2330
movq (%rax), %rax
movq %rax, -0x28(%rbp)
leaq -0x58(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xbfe80
movq -0x60(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x150(%rbp)
movb $0x0, %al
callq 0xff2e0
movq -0x150(%rbp), %rdi
movq %rax, %rcx
xorl %eax, %eax
movl %eax, %esi
movabsq $-0x503db0e6e1c2e704, %rdx # imm = 0xAFC24F191E3D18FC
callq 0xc01a0
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xfea50
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
je 0x3816c
movq -0x28(%rbp), %rax
movq %rax, -0x160(%rbp)
movb $0x0, %al
callq 0xff2e0
movq -0x160(%rbp), %rdi
movq %rax, %rcx
xorl %eax, %eax
movl %eax, %esi
movabsq $-0x503db0e6e1c2e704, %rdx # imm = 0xAFC24F191E3D18FC
callq 0xc01a0
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rdi
callq 0xa9840
movq -0x28(%rbp), %rax
movq %rax, -0x158(%rbp)
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0xfb28c(%rip), %rdi     # 0x1333d0
movb $0x0, %al
callq 0xff430
movq -0x158(%rbp), %rdi
movq %rax, %rcx
xorl %eax, %eax
movl %eax, %esi
movabsq $-0x503db0e6e1c2e704, %rdx # imm = 0xAFC24F191E3D18FC
callq 0xc01a0
movq %rax, -0x68(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x168(%rbp)
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x9f1f0
movq -0x168(%rbp), %rdi
movq %rax, %rcx
xorl %eax, %eax
movl %eax, %esi
movabsq $-0x503db0e6e1c2e704, %rdx # imm = 0xAFC24F191E3D18FC
callq 0xc01a0
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rdi
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x386e0
movq %rax, -0x78(%rbp)
cmpq $0x0, -0x78(%rbp)
je 0x381df
movq -0x78(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x60(%rbp), %rdi
callq 0xc0720
movq -0x80(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x386d3
movq -0x10(%rbp), %rdi
addq $0xb0, %rdi
movq -0x68(%rbp), %rsi
callq 0xfe850
testb $0x1, -0x11(%rbp)
je 0x38201
movq -0x10(%rbp), %rax
movb $0x1, 0x20(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x3824c
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rdx
movabsq $0x4d9e984c5b21faea, %rdi # imm = 0x4D9E984C5B21FAEA
leaq 0xffd04(%rip), %rsi     # 0x137f29
movb $0x0, %al
callq 0x9e090
movq %rax, -0x88(%rbp)
movq -0x60(%rbp), %rdi
callq 0xc0720
movq -0x88(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x386d3
movq -0x10(%rbp), %rax
cmpq $0x0, 0x98(%rax)
je 0x3834f
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rsi
callq 0x37cf0
movq %rax, -0x90(%rbp)
cmpq $0x0, -0x90(%rbp)
je 0x3834d
movq -0x90(%rbp), %rdi
addq $0xb0, %rdi
movq -0x10(%rbp), %rsi
addq $0xb0, %rsi
callq 0x1e740
testb $0x1, %al
jne 0x382b3
jmp 0x382f3
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rdx
movabsq $0x4d9e984c5b21faea, %rdi # imm = 0x4D9E984C5B21FAEA
leaq 0xffc96(%rip), %rsi     # 0x137f62
movb $0x0, %al
callq 0x9e090
movq %rax, -0x98(%rbp)
movq -0x60(%rbp), %rdi
callq 0xc0720
movq -0x98(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x386d3
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdx
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x90(%rbp), %rax
movq 0xb8(%rax), %r8
movabsq $0x4d9e984c5b21faea, %rdi # imm = 0x4D9E984C5B21FAEA
leaq 0xffc72(%rip), %rsi     # 0x137f98
movb $0x0, %al
callq 0x9e090
movq %rax, -0xa0(%rbp)
movq -0x60(%rbp), %rdi
callq 0xc0720
movq -0xa0(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x386d3
jmp 0x3834f
movq -0x10(%rbp), %rax
addq $0x38, %rax
movq %rax, -0xa8(%rbp)
cmpq $0x0, -0xa8(%rbp)
je 0x386b4
movq $0x0, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movq -0xa8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x386b2
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0xb0(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xb8(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0xc0(%rbp)
leaq -0xf0(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rdi
movq -0xc0(%rbp), %rsi
callq 0xbfe80
movq -0xf8(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rax
movq $0x4, 0x10(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0xa8(%rax)
jne 0x38416
callq 0x37a20
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xa8(%rax)
movq -0xc0(%rbp), %rax
movq %rax, -0x170(%rbp)
movb $0x0, %al
callq 0xff2e0
movq -0x170(%rbp), %rdi
movq %rax, %rcx
movl $0x4, %esi
movabsq $-0x503db0e6e1c2e704, %rdx # imm = 0xAFC24F191E3D18FC
callq 0xc01a0
movq %rax, -0x100(%rbp)
movq -0xb8(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
je 0x38491
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x3848f
movq -0x100(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rdx
leaq 0xffb5b(%rip), %rsi     # 0x137fe3
movb $0x0, %al
callq 0x100210
jmp 0x38491
movq -0x10(%rbp), %rax
movb 0x20(%rax), %al
andb $0x1, %al
movb %al, -0x101(%rbp)
movq -0xc0(%rbp), %rax
movq %rax, -0x178(%rbp)
movq -0xb8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x4e20
movq -0x178(%rbp), %rdi
movq %rax, %rdx
movl $0x4, %esi
callq 0xc0500
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rdi
movq -0x100(%rbp), %rdx
leaq 0xffafe(%rip), %rsi     # 0x137fec
movb $0x0, %al
callq 0x4a20
movq %rax, -0x118(%rbp)
cmpq $0x0, -0x118(%rbp)
je 0x38530
movq -0x118(%rbp), %rax
movq %rax, -0x120(%rbp)
movq -0xf8(%rbp), %rdi
callq 0xc0720
movq -0x120(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x386d3
jmp 0x38532
movq -0x100(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %ecx
movb $0x1, %al
cmpl $0x20, %ecx
movb %al, -0x179(%rbp)
je 0x38567
movq -0x100(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %eax
cmpl $0x9, %eax
sete %al
movb %al, -0x179(%rbp)
movb -0x179(%rbp), %al
testb $0x1, %al
jne 0x38573
jmp 0x38581
movq -0x100(%rbp), %rdi
callq 0xffd20
jmp 0x38532
movq -0x110(%rbp), %rdi
leaq 0xfbd44(%rip), %rsi     # 0x1342d3
callq 0x6700
testb $0x1, %al
jne 0x3859a
jmp 0x385f6
movq -0x110(%rbp), %rdi
leaq 0xffa50(%rip), %rsi     # 0x137ff8
callq 0x6700
testb $0x1, %al
jne 0x385b3
jmp 0x385bc
movb $0x1, -0x101(%rbp)
jmp 0x385f4
movq -0x110(%rbp), %rdi
leaq 0xffa3d(%rip), %rsi     # 0x138007
movb $0x0, %al
callq 0x4c80
movq %rax, -0x128(%rbp)
movq -0xf8(%rbp), %rdi
callq 0xc0720
movq -0x128(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x386d3
jmp 0x385f6
movq -0x10(%rbp), %rax
movq 0xa8(%rax), %rax
movq %rax, -0x188(%rbp)
callq 0x37b50
movq -0x188(%rbp), %rdi
movq %rax, %rsi
callq 0x85f0
movq %rax, -0x130(%rbp)
movq -0x10(%rbp), %rcx
movq -0x130(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x130(%rbp), %rdi
movb -0x101(%rbp), %al
movq -0x100(%rbp), %rcx
movq 0x8(%rcx), %rdx
andb $0x1, %al
movzbl %al, %esi
callq 0x38040
movq %rax, -0x138(%rbp)
cmpq $0x0, -0x138(%rbp)
je 0x3868f
movq -0x138(%rbp), %rax
movq %rax, -0x140(%rbp)
movq -0xf8(%rbp), %rdi
callq 0xc0720
movq -0x140(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x386d3
leaq -0xf8(%rbp), %rdi
callq 0xc06e0
movq -0xb0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xb0(%rbp)
jmp 0x38377
jmp 0x386b4
movq $0x0, -0x148(%rbp)
movq -0x60(%rbp), %rdi
callq 0xc0720
movq -0x148(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x190, %rsp            # imm = 0x190
popq %rbp
retq