// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
leaq 0x194a8a(%rip), %rax    # 0x1b2330
movq (%rax), %rax
movq %rax, -0x38(%rbp)
leaq -0x68(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0xbfe80
movq -0x70(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq $0x0, 0x10(%rax)
movb $0x0, -0x71(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
cmpq $0x0, -0x80(%rbp)
je 0x1d95d
movq $0x0, -0x88(%rbp)
movq -0x88(%rbp), %rax
movq -0x80(%rbp), %rcx
cmpq 0xa0(%rcx), %rax
jae 0x1d95b
movq -0x80(%rbp), %rax
movq 0x98(%rax), %rax
movq -0x88(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x159f0
testb $0x1, %al
jne 0x1d93f
jmp 0x1d945
movb $0x1, -0x71(%rbp)
jmp 0x1d95b
jmp 0x1d947
movq -0x88(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x88(%rbp)
jmp 0x1d8f4
jmp 0x1d95d
testb $0x1, -0x71(%rbp)
jne 0x1dbb5
movq -0x70(%rbp), %rax
movq %rax, -0x98(%rbp)
leaq -0xc8(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rdi
movq -0x98(%rbp), %rsi
callq 0xbfe80
movq -0xd0(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq $0x1, 0x10(%rax)
movq -0x98(%rbp), %rax
movq %rax, -0x118(%rbp)
callq 0x1bec0
movq -0x118(%rbp), %rdi
movq %rax, %rcx
xorl %eax, %eax
movl %eax, %esi
movabsq $0x11bbcc12ff458d9d, %rdx # imm = 0x11BBCC12FF458D9D
callq 0xc01a0
movq %rax, -0xd8(%rbp)
movq -0x10(%rbp), %rcx
movq -0xd8(%rbp), %rax
movq %rcx, 0x90(%rax)
movq -0x18(%rbp), %rdi
callq 0x9f3f0
movq %rax, -0xe0(%rbp)
movq -0xd8(%rbp), %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rsi
callq 0xfea50
movq -0xd8(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x108(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x18(%rbp), %rdi
callq 0x9f460
movq %rax, %rdi
callq 0x9f4e0
movq -0x110(%rbp), %rdi
movq %rax, %rcx
movl $0x1, %esi
movabsq $-0x503db0e6e1c2e704, %rdx # imm = 0xAFC24F191E3D18FC
callq 0xc01a0
movq -0x108(%rbp), %rdi
movq 0x8(%rax), %rsi
callq 0xfea50
movq -0xd8(%rbp), %rdi
addq $0x48, %rdi
movq -0xe0(%rbp), %rsi
callq 0xfea50
movq -0x18(%rbp), %rdi
callq 0x9f5b0
testb $0x1, %al
jne 0x1daa5
jmp 0x1db47
movq -0xd8(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x120(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x18(%rbp), %rdi
callq 0x9f880
movq -0x130(%rbp), %rdi
movq %rax, %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0xc0500
movq -0x128(%rbp), %rdi
movq -0x120(%rbp), %rsi
movq %rax, %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
callq 0x1cc30
movq %rax, -0xe8(%rbp)
cmpq $0x0, -0xe8(%rbp)
je 0x1db45
movq -0xe8(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0xd0(%rbp), %rdi
callq 0xc0720
movq -0xf0(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1dbd4
jmp 0x1db83
movq -0x18(%rbp), %rdx
movabsq $0x4d9e984c5b21faea, %rdi # imm = 0x4D9E984C5B21FAEA
leaq 0x117b3d(%rip), %rsi    # 0x135699
movb $0x0, %al
callq 0x9e090
movq %rax, -0xf8(%rbp)
movq -0xd0(%rbp), %rdi
callq 0xc0720
movq -0xf8(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1dbd4
movq -0x10(%rbp), %rax
movq %rax, -0x138(%rbp)
movq -0xd8(%rbp), %rdi
callq 0x9d3d0
movq -0x138(%rbp), %rdi
movq %rax, %rsi
callq 0x1d7d0
leaq -0xd0(%rbp), %rdi
callq 0xc06e0
movq $0x0, -0x100(%rbp)
movq -0x70(%rbp), %rdi
callq 0xc0720
movq -0x100(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
nopw %cs:(%rax,%rax)