// File: /workspace/github_c_makefile_star2_O1/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, %r12
movq %rcx, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x1798c0(%rip), %rax    # 0x1a8dd0
movq (%rax), %rsi
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0xe0431
movq $0x0, 0x10(%r14)
testq %rbx, %rbx
je 0x2f57b
cmpq $0x0, 0xa0(%rbx)
je 0x2f57b
xorl %r14d, %r14d
movl $0x1, %ebp
xorl %r15d, %r15d
movq 0x98(%rbx), %rax
movq (%rax,%r15,8), %rax
movq 0x10(%rax), %rdi
movq %r13, %rsi
callq 0xe99c9
movzbl %r14b, %r14d
testl %eax, %eax
cmovel %ebp, %r14d
je 0x2f571
incq %r15
cmpq 0xa0(%rbx), %r15
jb 0x2f542
testb $0x1, %r14b
jne 0x2f6ca
movq %r12, 0x10(%rsp)
leaq 0x58(%rsp), %rdi
movq %rdi, 0x8(%rsp)
leaq 0x28(%rsp), %rsi
callq 0xe0431
movq 0x8(%rsp), %r14
movq $0x1, 0x10(%r14)
callq 0x2d85b
movabsq $0x11bbcc12ff458d9d, %rdx # imm = 0x11BBCC12FF458D9D
movq %r14, %rdi
xorl %esi, %esi
movq %rax, %rcx
callq 0xe0676
movq %rax, %rbp
movq %rbx, 0x90(%rax)
movq %r13, %rdi
callq 0xc8ff0
movq %rax, %r15
leaq 0x8(%rbp), %rdi
movq %r13, %rsi
callq 0x11454b
leaq 0x28(%rbp), %r12
movq %r13, %rdi
callq 0xc9049
movq %rax, %rdi
callq 0xc9092
movabsq $-0x503db0e6e1c2e704, %rdx # imm = 0xAFC24F191E3D18FC
movl $0x1, %esi
movq %r14, %rdi
movq %rax, %rcx
callq 0xe0676
movq 0x8(%rax), %rsi
movq %r12, %rdi
callq 0x11454b
leaq 0x48(%rbp), %rdi
movq %r15, %rsi
callq 0x11454b
movq %r13, %rdi
callq 0xc90fb
testb %al, %al
je 0x2f678
movq %r13, %rdi
callq 0xc92d1
movq %r14, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0xe0900
movq %rbp, %rdi
movq %rbx, %rsi
movq %rax, %rdx
movq 0x18(%rsp), %rcx
movq 0x20(%rsp), %r8
movq 0x10(%rsp), %r9
callq 0x2e611
movq %rax, %r14
testq %rax, %rax
je 0x2f6a4
movq 0x8(%rsp), %rdi
callq 0xe0b30
xorl %ebx, %ebx
jmp 0x2f6c6
leaq 0x10ad07(%rip), %rsi    # 0x13a386
xorl %ebx, %ebx
movabsq $0x4d9e984c5b21faea, %rdi # imm = 0x4D9E984C5B21FAEA
movq %r13, %rdx
xorl %eax, %eax
callq 0xc87b0
movq %rax, %r14
movq 0x8(%rsp), %rdi
callq 0xe0b30
jmp 0x2f6c6
movq %rbp, %rdi
callq 0xc8348
movq (%rbx), %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x5b3a7
leaq 0x8(%rsp), %rdi
callq 0xe0b11
movb $0x1, %bl
testb %bl, %bl
je 0x2f6d7
leaq 0x28(%rsp), %rdi
callq 0xe0b30
xorl %r14d, %r14d
movq %r14, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq