// File: /workspace/github_c_makefile_star2_O3/johsteffens[P]beth/xoico/src/xoico.xo.c
// Function: xoico_source_s_parse
er_t xoico_source_s_parse( xoico_source_s* o, const xoico_host* host, x_source* source, sc_t group_name, sc_t trait_name, tp_t embed_method )
{
    // xoico_source.x:227:1
    BLM_INIT_LEVEL(0);
    xoico_compiler_s* compiler = o->target->compiler;
    
    if( embed_method == TYPEOF_as_header )
    {
        while( !x_source_eos(source) )
        {
            if( x_source_parse_bl(source," #?w'XOILA_DEFINE_GROUP'" ) )
            {BLM_INIT_LEVEL(3);
                st_s st_trait_name;BLM_T_INIT_SPUSH(st_s, &st_trait_name);;
                st_s st_group_name;BLM_T_INIT_SPUSH(st_s, &st_group_name);;
                BLM_TRY(x_source_parse_fa(source," ( #name , #name", (&(st_group_name)), (&(st_trait_name)) ))
                xoico_group_s* group = NULL;
                BLM_TRY(xoico_source_s_get_group_if_preexsting(o,host, source, st_group_name.sc, st_trait_name.sc, (&(group)) ))
                if( !group )
                {
                    group = xoico_source_s_push_d(o,xoico_group_s_create() );
                    group->xoico_source = o;
                    group->compiler = compiler;
                    xoico_group_s_set_name_sc(group,host, st_group_name.sc );
                    group->trait_name = xoico_compiler_s_entypeof(compiler,st_trait_name.sc );
                }
    
                if( x_source_parse_bl(source," #=?','" ) )
                {
                    while( x_source_parse_bl(source," #?','" ) )
                    {BLM_INIT_LEVEL(5);
                        st_s* embed_file = ((st_s*)BLM_LEVEL_T_PUSH(5,st_s,st_s_create()));
                        BLM_TRY(x_source_parse_fa(source," #string", embed_file ))
                        x_source* embed_source = NULL;
                        BLM_TRY(xoico_embed_file_open(source, embed_file->sc, (&(embed_source)) ))
                        ((x_source*)BLM_LEVEL_A_PUSH(0,embed_source));
                        bcore_arr_st_s_push_st(&(group->explicit_embeddings),embed_file );
                        BLM_TRY(xoico_group_s_parse(group,((const xoico_host*)(o)), false, embed_source ))
                    BLM_DOWN();}
                    BLM_TRY(x_source_parse_fa(source," )" ))
                }
                else
                {
                    BLM_TRY(x_source_parse_fa(source," )" ))
                    BLM_TRY(xoico_group_s_parse(group,((const xoico_host*)(o)), false, source ))
                }
                BLM_TRY(xoico_compiler_s_register_group(o->target->compiler,group ))
            BLM_DOWN();}
            else
            {
                x_source_get_u0(source);
            }
        }
    }
    else
    {
        xoico_group_s* group = NULL;
    
        BLM_TRY(xoico_source_s_get_group_if_preexsting(o,host, source, group_name, trait_name, (&(group)) ))
        if( group )
        {
            if( group->xoico_source != o )
            {BLM_INIT_LEVEL(3);
                bcore_arr_st_s_push_st(&(group->explicit_embeddings),((st_s*)BLM_LEVEL_T_PUSH(3,st_s,st_s_create_fa("#<sc_t>.#<sc_t>", o->name.sc, o->ext.sc ))) );
            BLM_DOWN();}
        }
        else
        {
            group = xoico_source_s_push_d(o,xoico_group_s_create() );
            group->xoico_source = o;
            group->compiler = compiler;
            xoico_group_s_set_name_sc(group,host, group_name );
            group->trait_name = xoico_compiler_s_entypeof(compiler,trait_name );
            group->is_manifesto = true;
        }
    
        if( embed_method == TYPEOF_as_group )
        {
            BLM_TRY(xoico_group_s_parse(group,((const xoico_host*)(o)), false, source ))
        }
        else
        {
            BLM_TRY(xoico_group_s_parse_embed(group,((const xoico_host*)(o)), source, embed_method ))
        }
    
        BLM_TRY(xoico_compiler_s_register_group(compiler,group ))
    }
    
    BLM_RETURNV(er_t, 0)
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %r9, %rbx
movq %r8, 0x38(%rsp)
movq %rcx, %r13
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbp
leaq 0x16f4c8(%rip), %rax    # 0x19bdd0
movq (%rax), %rsi
leaq 0x68(%rsp), %r12
movq %r12, %rdi
callq 0xd6675
movq $0x0, 0x10(%r12)
movq 0x90(%rbp), %rax
movq 0x138(%rax), %rcx
movabsq $-0x9b90fe183067569, %rax # imm = 0xF646F01E7CF98A97
movq %rbx, 0x28(%rsp)
cmpq %rax, %rbx
movq %rbp, 0x8(%rsp)
movq %rcx, 0x30(%rsp)
jne 0x2cf22
movq %r15, 0x38(%rsp)
leaq 0x140(%rcx), %rax
movq %rax, 0x28(%rsp)
leaq 0x17035f(%rip), %rbx    # 0x19ccc8
movq (%r14), %r12
movl (%rbx), %eax
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%rbx,%rax,8), %rcx
movq 0x18(%rbx,%rax,8), %rdx
andq %r12, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r12, %rdx
je 0x2c9c1
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r12, %rdx
je 0x2c9c1
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r12, %rdx
je 0x2c9c1
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r12, %rdx
jne 0x2c9ca
movq (%rax,%rcx), %r13
testq %r13, %r13
jne 0x2c9ed
movabsq $-0x7e8ee9b9b4bbaa8, %rdi # imm = 0xF817116464B44558
movq %r12, %rsi
callq 0xe9bc5
movq %rax, %r13
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x115fac
movq 0x40(%r13), %rax
testq %rax, %rax
jne 0x2ca09
movq %r13, %rdi
leaq 0x10d389(%rip), %rsi    # 0x139d89
callq 0xeb49c
movq 0x40(%r13), %rax
movq %r14, %rdi
callq *%rax
testb %al, %al
jne 0x2d0c9
movq (%r14), %r12
movl (%rbx), %eax
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%rbx,%rax,8), %rcx
movq 0x18(%rbx,%rax,8), %rdx
andq %r12, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r12, %rdx
je 0x2ca6e
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r12, %rdx
je 0x2ca6e
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r12, %rdx
je 0x2ca6e
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r12, %rdx
jne 0x2ca77
movq (%rax,%rcx), %r13
testq %r13, %r13
jne 0x2ca9a
movabsq $-0x7e8ee9b9b4bbaa8, %rdi # imm = 0xF817116464B44558
movq %r12, %rsi
callq 0xe9bc5
movq %rax, %r13
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x115fac
movq %r13, %rdi
movq %r14, %rsi
leaq 0x102880(%rip), %rdx    # 0x12f327
callq 0xffe2b
testb %al, %al
je 0x2cdfe
movq %rbx, %rbp
leaq 0xb8(%rsp), %rdi
movq %rdi, 0x10(%rsp)
leaq 0x68(%rsp), %rsi
callq 0xd6675
movq 0x10(%rsp), %r12
movq $0x3, 0x10(%r12)
leaq 0x48(%rsp), %r15
movq %r15, %rdi
callq 0x109030
movq %r12, %rdi
movabsq $-0x503db0e6e1c2e704, %r13 # imm = 0xAFC24F191E3D18FC
movq %r13, %rsi
movq %r15, %rdx
callq 0xd68d9
leaq 0x98(%rsp), %rbx
movq %rbx, %rdi
callq 0x109030
movq %r12, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0xd68d9
movq %r14, %rdi
leaq 0x102817(%rip), %rsi    # 0x12f340
movq %rbx, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0xda80
testq %rax, %rax
movq 0x38(%rsp), %r13
jne 0x2cff8
movq $0x0, 0x18(%rsp)
movq 0xa0(%rsp), %rcx
movq 0x50(%rsp), %r8
movq 0x8(%rsp), %rdi
movq %r13, %rsi
movq %r14, %rdx
leaq 0x18(%rsp), %r9
callq 0x254d9
testq %rax, %rax
jne 0x2cff8
cmpq $0x0, 0x18(%rsp)
jne 0x2cbde
callq 0x206d9
movq 0x8(%rsp), %rbx
movq (%rbx), %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x55b79
movq %rax, %r12
movq %rax, 0x18(%rsp)
movq %rbx, 0x138(%rax)
movq 0x30(%rsp), %rax
movq %rax, 0x140(%r12)
movq 0xa0(%rsp), %rdx
movq %r12, %rdi
movq %r13, %rsi
callq 0x20900
movq 0x50(%rsp), %rsi
movq 0x28(%rsp), %rdi
callq 0xd3d8e
movq %rax, 0xb0(%r12)
movq (%r14), %r12
movq %rbp, %rbx
movl (%rbp), %eax
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%rbp,%rax,8), %rcx
movq 0x18(%rbp,%rax,8), %rdx
andq %r12, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r12, %rdx
leaq 0x102744(%rip), %r15    # 0x12f359
je 0x2cc41
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r12, %rdx
je 0x2cc41
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r12, %rdx
je 0x2cc41
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r12, %rdx
jne 0x2cc4a
movq (%rax,%rcx), %r13
testq %r13, %r13
jne 0x2cc6d
movabsq $-0x7e8ee9b9b4bbaa8, %rdi # imm = 0xF817116464B44558
movq %r12, %rsi
callq 0xe9bc5
movq %rax, %r13
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x115fac
movq %r13, %rdi
movq %r14, %rsi
leaq 0x1026d7(%rip), %rdx    # 0x12f351
callq 0xffe2b
testb %al, %al
movq 0x8(%rsp), %rbp
je 0x2cea5
movq (%r14), %r12
movl (%rbx), %eax
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%rbx,%rax,8), %rcx
movq 0x18(%rbx,%rax,8), %rdx
andq %r12, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r12, %rdx
je 0x2cce4
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r12, %rdx
je 0x2cce4
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r12, %rdx
je 0x2cce4
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r12, %rdx
jne 0x2cced
movq (%rax,%rcx), %r13
testq %r13, %r13
jne 0x2cd10
movabsq $-0x7e8ee9b9b4bbaa8, %rdi # imm = 0xF817116464B44558
movq %r12, %rsi
callq 0xe9bc5
movq %rax, %r13
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x115fac
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xffe2b
testb %al, %al
je 0x2cede
movq 0x10(%rsp), %rsi
leaq 0xe8(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0xd6675
movq 0x20(%rsp), %rbp
movq $0x5, 0x10(%rbp)
xorl %eax, %eax
callq 0x109c82
movl $0x5, %esi
movq %rbp, %rdi
movabsq $-0x503db0e6e1c2e704, %rdx # imm = 0xAFC24F191E3D18FC
movq %rax, %rcx
callq 0xd68a8
movq %rax, %r13
movq %r14, %rdi
leaq 0x1014e3(%rip), %rsi    # 0x12e25b
movq %rax, %rdx
xorl %eax, %eax
callq 0xda80
testq %rax, %rax
jne 0x2cfeb
movq $0x0, 0x40(%rsp)
movq 0x8(%r13), %rsi
movq %r14, %rdi
leaq 0x40(%rsp), %rdx
callq 0xdbcc
testq %rax, %rax
jne 0x2cfeb
movq 0x40(%rsp), %r12
movq %rbp, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0xd6b17
movq 0x18(%rsp), %rbp
leaq 0x68(%rbp), %rdi
movq %r13, %rsi
callq 0xb9e01
movq %rbp, %rdi
movq 0x8(%rsp), %rbp
movq %rbp, %rsi
xorl %edx, %edx
movq %r12, %rcx
callq 0x21c85
testq %rax, %rax
jne 0x2cfeb
leaq 0x20(%rsp), %rdi
callq 0xd6d0d
jmp 0x2cc8c
movq (%r14), %r12
movl (%rbx), %eax
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%rbx,%rax,8), %rcx
movq 0x18(%rbx,%rax,8), %rdx
andq %r12, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r12, %rdx
je 0x2ce56
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r12, %rdx
je 0x2ce56
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r12, %rdx
je 0x2ce56
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r12, %rdx
jne 0x2ce5f
movq (%rax,%rcx), %r13
testq %r13, %r13
jne 0x2ce82
movabsq $-0x7e8ee9b9b4bbaa8, %rdi # imm = 0xF817116464B44558
movq %r12, %rsi
callq 0xe9bc5
movq %rax, %r13
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x115fac
movq 0x10(%r13), %rax
movb $0x0, 0xb8(%rsp)
movl $0x1, %edx
movq %r14, %rdi
leaq 0xb8(%rsp), %rsi
callq *%rax
jmp 0x2c969
movq %r14, %rdi
leaq 0x11e0b5(%rip), %rsi    # 0x14af64
xorl %eax, %eax
callq 0xda80
testq %rax, %rax
jne 0x2cff8
movq 0x18(%rsp), %r13
movq %r13, %rdi
movq %rbp, %rsi
xorl %edx, %edx
movq %r14, %rcx
callq 0x21c85
testq %rax, %rax
je 0x2cefd
jmp 0x2cff8
movq %r14, %rdi
leaq 0x11e07c(%rip), %rsi    # 0x14af64
xorl %eax, %eax
callq 0xda80
testq %rax, %rax
jne 0x2cff8
movq 0x18(%rsp), %r13
movq 0x90(%rbp), %rax
movq 0x138(%rax), %rdi
movq %r13, %rsi
callq 0x25878
leaq 0x10(%rsp), %rdi
callq 0xd6d0d
jmp 0x2c969
leaq 0xe8(%rsp), %r9
movq $0x0, (%r9)
movq %rbp, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r13, %rcx
movq 0x38(%rsp), %rbx
movq %rbx, %r8
callq 0x254d9
testq %rax, %rax
jne 0x2d09a
movq 0xe8(%rsp), %rbp
testq %rbp, %rbp
je 0x2d005
movq 0x8(%rsp), %rbx
cmpq %rbx, 0x138(%rbp)
je 0x2d060
leaq 0xb8(%rsp), %r13
leaq 0x48(%rsp), %r12
movq %r13, (%r12)
leaq 0x68(%rsp), %rsi
movq %r13, %rdi
callq 0xd6675
movq $0x3, 0x10(%r13)
movq %rbp, %r15
addq $0x68, %rbp
movq 0x30(%rbx), %rsi
movq 0x50(%rbx), %rdx
leaq 0x103096(%rip), %rdi    # 0x130048
xorl %eax, %eax
callq 0x109dca
movabsq $-0x503db0e6e1c2e704, %rdx # imm = 0xAFC24F191E3D18FC
movl $0x3, %esi
movq %r13, %rdi
movq %rax, %rcx
callq 0xd68a8
movq %rbp, %rdi
movq %r15, %rbp
movq %rax, %rsi
callq 0xb9e01
movq %r12, %rdi
callq 0xd6d0d
jmp 0x2d060
movq %rax, %r12
movq 0x20(%rsp), %rdi
jmp 0x2d0a2
movq %rax, %r12
movq 0x10(%rsp), %rdi
jmp 0x2d0a2
callq 0x206d9
movq 0x8(%rsp), %r12
movq (%r12), %rsi
movq %r12, %rdi
movq %rax, %rdx
callq 0x55b79
movq %rax, %rbp
movq %r12, 0x138(%rax)
movq 0x30(%rsp), %r12
movq %r12, 0x140(%rax)
movq %rax, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x20900
leaq 0x140(%r12), %rdi
movq %rbx, %rsi
callq 0xd3d8e
movq %rax, 0xb0(%rbp)
movb $0x1, 0xc9(%rbp)
movabsq $0x56176620137ff69, %rax # imm = 0x56176620137FF69
movq 0x28(%rsp), %rcx
movq %rbp, %rdi
cmpq %rax, %rcx
jne 0x2d088
movq 0x8(%rsp), %rsi
xorl %edx, %edx
movq %r14, %rcx
callq 0x21c85
jmp 0x2d095
movq 0x8(%rsp), %rsi
movq %r14, %rdx
callq 0x258b5
testq %rax, %rax
je 0x2d0bc
movq %rax, %r12
leaq 0x68(%rsp), %rdi
callq 0xd6d2c
movq %r12, %rax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x30(%rsp), %rdi
movq %rbp, %rsi
callq 0x25878
leaq 0x68(%rsp), %rdi
callq 0xd6d2c
xorl %r12d, %r12d
jmp 0x2d0a7