// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/xoico/src/xoico.xo.c
// Function: xoico_target_s_parse_from_path
er_t xoico_target_s_parse_from_path( xoico_target_s* o, sc_t source_path, sc_t group_name, sc_t trait_name, tp_t embed_method )
{
    // xoico_target.x:120:1
    BLM_INIT_LEVEL(0);
    bl_t source_exists = false;
    
    {const xoico_target_s* __a=o ;if(__a)for(sz_t __i=0;__i<__a->size;__i++){xoico_source_s* e=__a->data[__i];
    {
        if( sc_t_equal( e->full_path.sc, source_path ) )
        {
            source_exists = true;
            break;
        }
    }
    
    }}if( !source_exists )
    {BLM_INIT_LEVEL(1);
        xoico_source_s* xsource = ((xoico_source_s*)BLM_LEVEL_T_PUSH(0,xoico_source_s,xoico_source_s_create()));
        xsource->target = o;
    
        sc_t file_extension = bcore_file_extension(source_path );
    
        st_s_copy_sc(&(xsource->full_path),source_path );
        st_s_copy_sc(&(xsource->name),((st_s*)BLM_LEVEL_T_PUSH(1,st_s,bcore_file_strip_extension(bcore_file_name(source_path ) )))->sc );
        st_s_copy_sc(&(xsource->ext),file_extension );
    
        if( bcore_file_exists(source_path ) )
        {
            BLM_TRY(xoico_source_s_parse(xsource,((const xoico_host*)(o)),((x_source*)( ((bcore_source*)BLM_LEVEL_A_PUSH(0,bcore_file_open_source(source_path ))))), group_name, trait_name, embed_method ))
        }
        else
        {
            BLM_RETURNV(er_t, bcore_error_push_fa(((tp_t)(TYPEOF_general_error)), "Could not open '#<sc_t>'.", source_path ))
        }
    
        xoico_target_s_push_d(o,((xoico_source_s*)bcore_fork(xsource)) );
    BLM_DOWN();}
    
    BLM_RETURNV(er_t, 0)
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %rbp
movq %rsi, %r13
movq %rdi, %rbx
leaq 0xfd8e0(%rip), %rax     # 0x117dd0
movq (%rax), %rsi
leaq 0x58(%rsp), %r14
movq %r14, %rdi
callq 0x717f5
andq $0x0, 0x10(%r14)
testq %rbx, %rbx
je 0x1a539
xorl %r14d, %r14d
cmpq 0xa0(%rbx), %r14
jae 0x1a539
movq 0x98(%rbx), %rax
movq (%rax,%r14,8), %rax
movq 0x10(%rax), %rdi
movq %r13, %rsi
callq 0x16421
incq %r14
testb %al, %al
je 0x1a50d
jmp 0x1a64d
movq %rbp, 0x8(%rsp)
movq %r12, 0x10(%rsp)
movq %r15, 0x18(%rsp)
leaq 0x28(%rsp), %r14
movq %r14, 0x20(%rsp)
leaq 0x58(%rsp), %rsi
movq %r14, %rdi
callq 0x717f5
movq $0x1, 0x10(%r14)
callq 0x196ad
movabsq $0x11bbcc12ff458d9d, %rdx # imm = 0x11BBCC12FF458D9D
movq %r14, %rdi
xorl %esi, %esi
movq %rax, %rcx
callq 0x71967
movq %rax, %rbp
movq %rbx, 0x90(%rax)
movq %r13, %rdi
callq 0x60db1
movq %rax, %r15
leaq 0x8(%rbp), %rdi
movq %r13, %rsi
callq 0x8e611
leaq 0x28(%rbp), %r12
movq %r13, %rdi
callq 0x60e04
movq %rax, %rdi
callq 0x60e47
pushq $0x1
popq %rsi
movabsq $-0x503db0e6e1c2e704, %rdx # imm = 0xAFC24F191E3D18FC
movq %r14, %rdi
movq %rax, %rcx
callq 0x71967
movq 0x8(%rax), %rsi
movq %r12, %rdi
callq 0x8e611
leaq 0x48(%rbp), %rdi
movq %r15, %rsi
callq 0x8e611
movq %r13, %rdi
callq 0x60eaa
testb %al, %al
je 0x1a65c
movq %r13, %rdi
callq 0x61037
leaq 0x28(%rsp), %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x71a90
movq %rbp, %rdi
movq %rbx, %rsi
movq %rax, %rdx
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %r8
movq 0x18(%rsp), %r9
callq 0x19e46
movq %rax, %r14
testq %rax, %rax
jne 0x1a67a
movq %rbp, %rdi
callq 0x6026d
movq %rbx, %rdi
movq %rax, %rsi
callq 0xf6dd
leaq 0x20(%rsp), %rdi
callq 0x71b48
leaq 0x58(%rsp), %rdi
callq 0x71b64
xorl %r14d, %r14d
jmp 0x1a684
leaq 0x91d23(%rip), %rsi     # 0xac386
movabsq $0x4d9e984c5b21faea, %rdi # imm = 0x4D9E984C5B21FAEA
movq %r13, %rdx
xorl %eax, %eax
callq 0x605f4
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x71b64
movq %r14, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq