// File: /workspace/github_c_makefile_star2_O0/johsteffens[P]beth/xoico/src/xoico.xo.c
// Function: xoico_compiler_s_parse
er_t xoico_compiler_s_parse( xoico_compiler_s* o, sc_t target_name, sc_t target_ext, const st_s* target_output_folder, sc_t source_path, sc_t group_name, sc_t trait_name, tp_t embed_method, sz_t* p_target_index )
{
    // xoico_compiler.x:457:1
    BLM_INIT_LEVEL(0);
    const st_s* source_folder = ((st_s*)BLM_LEVEL_T_PUSH(0,st_s,bcore_file_folder_path(source_path )));
    const st_s* output_folder = target_output_folder ? target_output_folder : source_folder;
    st_s* target_output_path = ((st_s*)BLM_LEVEL_T_PUSH(0,st_s,st_s_create_fa("#<sc_t>/#<sc_t>.#<sc_t>", output_folder->sc, target_name, target_ext )));
    
    sz_t target_index = -1;
    for(sz_t i = 0; i < o->size; i++ )
    {
        if( sc_t_equal( target_name, o->data[ i ]->name.sc ) )
        {
            target_index = i;
            break;
        }
    }
    
    if( target_index == -1 )
    {
        xoico_target_s* target = xoico_target_s_create();
        target->compiler = o;
        st_s_copy_sc(&(target->name        ),target_name );
        st_s_copy_sc(&(target->ext         ),target_ext );
        st_s_copy_fa(&(target->include_path),"#<sc_t>.#<sc_t>", target_name, target_ext );
        st_s_copy(&(target->output_path),target_output_path );
        xoico_compiler_s_push_d(o,target );
        target_index = o->size - 1;
    }
    
    xoico_target_s* target = o->data[ target_index ];
    
    /// check paths and extensions
    if( !st_s_equal_sc(&(target->ext),target_ext ) )
    {
        ERR_fa( "Target '#<sc_t>': Assigned extension '#<sc_t>' differs from requested extension '#<sc_t>'.", target->name.sc, target->ext.sc, target_ext );
    }
    if( !st_s_equal_st(&(target->output_path),target_output_path ) )
    {
        ERR_fa( "Target '#<sc_t>': Assigned output path '#<sc_t>' differs from requested output path '#<sc_t>'.", target->name.sc, target->output_path.sc, target_output_path->sc );
    }
    
    BLM_TRY(xoico_target_s_parse_from_path(target,source_path, group_name, trait_name, embed_method ))
    if( p_target_index ) (*(p_target_index)) = target_index;
    
    BLM_RETURNV(er_t, 0)
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
leaq 0x190f0a(%rip), %rax    # 0x1b2330
movq (%rax), %rax
movq %rax, -0x40(%rbp)
leaq -0x70(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0xbfe80
movq -0x78(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x40(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0x30(%rbp), %rdi
callq 0x9f0e0
movq -0xd0(%rbp), %rdi
movq %rax, %rcx
xorl %eax, %eax
movl %eax, %esi
movabsq $-0x503db0e6e1c2e704, %rdx # imm = 0xAFC24F191E3D18FC
callq 0xc01a0
movq %rax, -0x80(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x2149f
movq -0x28(%rbp), %rax
movq %rax, -0xd8(%rbp)
jmp 0x214aa
movq -0x80(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0x88(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq 0x114e6e(%rip), %rdi    # 0x13634b
movb $0x0, %al
callq 0xff430
movq -0xe0(%rbp), %rdi
movq %rax, %rcx
xorl %eax, %eax
movl %eax, %esi
movabsq $-0x503db0e6e1c2e704, %rdx # imm = 0xAFC24F191E3D18FC
callq 0xc01a0
movq %rax, -0x90(%rbp)
movq $-0x1, -0x98(%rbp)
movq $0x0, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x2157b
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0xa0(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x10(%rax), %rsi
callq 0x159f0
testb $0x1, %al
jne 0x21555
jmp 0x21565
movq -0xa0(%rbp), %rax
movq %rax, -0x98(%rbp)
jmp 0x2157b
jmp 0x21567
movq -0xa0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa0(%rbp)
jmp 0x2151e
cmpq $-0x1, -0x98(%rbp)
jne 0x2162a
callq 0x1d5e0
movq %rax, -0xa8(%rbp)
movq -0x10(%rbp), %rcx
movq -0xa8(%rbp), %rax
movq %rcx, 0x138(%rax)
movq -0xa8(%rbp), %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rsi
callq 0xfea50
movq -0xa8(%rbp), %rdi
addq $0x28, %rdi
movq -0x20(%rbp), %rsi
callq 0xfea50
movq -0xa8(%rbp), %rdi
addq $0x58, %rdi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq 0x114d6a(%rip), %rsi    # 0x136353
movb $0x0, %al
callq 0xfec20
movq -0xa8(%rbp), %rdi
addq $0x78, %rdi
movq -0x90(%rbp), %rsi
callq 0xfe850
movq -0x10(%rbp), %rdi
movq -0xa8(%rbp), %rsi
callq 0x21190
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
subq $0x1, %rax
movq %rax, -0x98(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x98(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rdi
addq $0x28, %rdi
movq -0x20(%rbp), %rsi
callq 0x1c810
testb $0x1, %al
jne 0x2169b
movq -0xb0(%rbp), %rax
movq 0x10(%rax), %r8
movq -0xb0(%rbp), %rax
movq 0x30(%rax), %r9
movq -0x20(%rbp), %rax
leaq 0x114ce6(%rip), %rdi    # 0x136363
leaq 0x111f64(%rip), %rsi    # 0x1335e8
movl $0x174c, %edx           # imm = 0x174C
leaq 0x114cea(%rip), %rcx    # 0x13637a
movq %rax, (%rsp)
movb $0x0, %al
callq 0x9d0f0
movq -0xb0(%rbp), %rdi
addq $0x78, %rdi
movq -0x90(%rbp), %rsi
callq 0x1e740
testb $0x1, %al
jne 0x216ff
movq -0xb0(%rbp), %rax
movq 0x10(%rax), %r8
movq -0xb0(%rbp), %rax
movq 0x80(%rax), %r9
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rax
leaq 0x114c82(%rip), %rdi    # 0x136363
leaq 0x111f00(%rip), %rsi    # 0x1335e8
movl $0x1750, %edx           # imm = 0x1750
leaq 0x114ce1(%rip), %rcx    # 0x1363d5
movq %rax, (%rsp)
movb $0x0, %al
callq 0x9d0f0
movq -0xb0(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq 0x10(%rbp), %rcx
movq 0x18(%rbp), %r8
callq 0x1d880
movq %rax, -0xb8(%rbp)
cmpq $0x0, -0xb8(%rbp)
je 0x21750
movq -0xb8(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x78(%rbp), %rdi
callq 0xc0720
movq -0xc0(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x21784
cmpq $0x0, 0x20(%rbp)
je 0x21765
movq -0x98(%rbp), %rcx
movq 0x20(%rbp), %rax
movq %rcx, (%rax)
movq $0x0, -0xc8(%rbp)
movq -0x78(%rbp), %rdi
callq 0xc0720
movq -0xc8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xf0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)