// File: /workspace/github_c_makefile_star2_O1/johsteffens[P]beth/xoico/src/xoico.xo.c
// Function: xoico_source_s_get_group_if_preexsting
er_t xoico_source_s_get_group_if_preexsting( xoico_source_s* o, const xoico_host* host, x_source* source, sc_t group_name, sc_t trait_name, xoico_group_s** group )
{
    // xoico_source.x:199:1
    
    xoico_compiler_s* compiler = xoico_host_a_compiler(host);
    if( xoico_compiler_s_is_group(compiler,xoico_host_a_entypeof(host,group_name ) ) )
    {
        (*(group)) = xoico_compiler_s_get_group(compiler,xoico_host_a_entypeof(host,group_name ) );
    
        // Extending a preexisting group is only allowed inside the same target
        if( (**(group)).xoico_source->target != o->target )
        {
            return  x_source_parse_error_fa(source,"Group '#<sc_t>' was defined in target '#<sc_t>'. It cannot be extended in a different target.", group_name, (**(group)).xoico_source->target->name.sc );
        }
    
        if( (**(group)).trait_name != xoico_compiler_s_entypeof(compiler,trait_name ) )
        {
            return  x_source_parse_error_fa(source,"Extending group '#<sc_t>' of trait '#<sc_t>' with a different trait '#<sc_t>'.", group_name, xoico_host_a_nameof(host,(**(group)).trait_name ), trait_name );
        }
    
    }
    else
    {
        (*(group)) = NULL;
    }
    return  0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, 0x8(%rsp)
movq %r8, 0x10(%rsp)
movq %rcx, %r13
movq %rdx, 0x18(%rsp)
movq %rsi, %r12
movq %rdi, 0x20(%rsp)
movq (%rsi), %r14
leaq 0x178dea(%rip), %rbx    # 0x19f6a0
movl 0x178de4(%rip), %eax    # 0x19f6a0
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%rbx,%rax,8), %rcx
movq 0x18(%rbx,%rax,8), %rdx
andq %r14, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r14, %rdx
je 0x26913
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r14, %rdx
je 0x26913
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r14, %rdx
je 0x26913
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r14, %rdx
jne 0x26c13
movq (%rax,%rcx), %r15
testq %r15, %r15
jne 0x26943
movabsq $-0x1e682f89ce03d7c8, %rdi # imm = 0xE197D07631FC2838
movq %r14, %rsi
callq 0xf3f85
movq %rax, %r15
leaq 0x178d68(%rip), %rdi    # 0x19f6a0
movq %r14, %rsi
movq %rax, %rdx
callq 0x12128c
movq %r12, %rdi
callq *0x20(%r15)
movq %rax, %r14
movq (%r12), %r15
movl 0x178d49(%rip), %eax    # 0x19f6a0
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%rbx,%rax,8), %rcx
movq 0x18(%rbx,%rax,8), %rdx
andq %r15, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r15, %rdx
je 0x269ae
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r15, %rdx
je 0x269ae
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r15, %rdx
je 0x269ae
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r15, %rdx
jne 0x26c1b
movq (%rax,%rcx), %rbp
testq %rbp, %rbp
jne 0x269de
movabsq $-0x1e682f89ce03d7c8, %rdi # imm = 0xE197D07631FC2838
movq %r15, %rsi
callq 0xf3f85
movq %rax, %rbp
leaq 0x178ccd(%rip), %rdi    # 0x19f6a0
movq %r15, %rsi
movq %rax, %rdx
callq 0x12128c
movq %r12, %rdi
movq %r13, %rsi
callq *0x50(%rbp)
leaq 0x50(%r14), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0xd4857
testb %al, %al
je 0x26ab3
movq %r13, (%rsp)
movq (%r12), %rbp
movl 0x178c94(%rip), %eax    # 0x19f6a0
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%rbx,%rax,8), %rcx
movq 0x18(%rbx,%rax,8), %rdx
andq %rbp, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %rbp, %rdx
je 0x26a63
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %rbp, %rdx
je 0x26a63
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %rbp, %rdx
je 0x26a63
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %rbp, %rdx
jne 0x26c22
movq (%rax,%rcx), %r13
testq %r13, %r13
jne 0x26a93
movabsq $-0x1e682f89ce03d7c8, %rdi # imm = 0xE197D07631FC2838
movq %rbp, %rsi
callq 0xf3f85
movq %rax, %r13
leaq 0x178c18(%rip), %rdi    # 0x19f6a0
movq %rbp, %rsi
movq %rax, %rdx
callq 0x12128c
movq %r12, %rdi
movq (%rsp), %rsi
callq *0x50(%r13)
movq %r15, %rdi
movq %rax, %rsi
callq 0xd4806
testq %rax, %rax
je 0x26ad0
movq (%rax), %rax
jmp 0x26ad2
movq 0x8(%rsp), %rax
movq $0x0, (%rax)
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
movq 0x8(%rsp), %r13
movq %rax, (%r13)
movq 0x138(%rax), %rcx
movq 0x90(%rcx), %rcx
movq 0x20(%rsp), %rdx
cmpq 0x90(%rdx), %rcx
movq (%rsp), %rdx
je 0x26b20
movq 0x10(%rcx), %rcx
leaq 0x113774(%rip), %rsi    # 0x13a27a
movq 0x18(%rsp), %rdi
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xddb2
movq 0xb0(%rax), %r15
addq $0x140, %r14            # imm = 0x140
movq %r14, %rdi
movq 0x10(%rsp), %rsi
callq 0xddb52
cmpq %rax, %r15
je 0x26abf
movq (%r13), %rax
movq 0xb0(%rax), %r14
movq (%r12), %r15
movl 0x178b47(%rip), %eax    # 0x19f6a0
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%rbx,%rax,8), %rcx
movq 0x18(%rbx,%rax,8), %rdx
andq %r15, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r15, %rdx
je 0x26bac
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r15, %rdx
je 0x26bac
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r15, %rdx
je 0x26bac
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r15, %rdx
jne 0x26c2a
movq (%rax,%rcx), %r13
testq %r13, %r13
jne 0x26bdc
movabsq $-0x1e682f89ce03d7c8, %rdi # imm = 0xE197D07631FC2838
movq %r15, %rsi
callq 0xf3f85
movq %rax, %r13
leaq 0x178acf(%rip), %rdi    # 0x19f6a0
movq %r15, %rsi
movq %rax, %rdx
callq 0x12128c
movq %r12, %rdi
movq %r14, %rsi
callq *0x48(%r13)
leaq 0x1136eb(%rip), %rsi    # 0x13a2d8
movq 0x18(%rsp), %rdi
movq (%rsp), %rdx
movq %rax, %rcx
movq 0x10(%rsp), %r8
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xddb2
xorl %r15d, %r15d
jmp 0x26917
xorl %ebp, %ebp
jmp 0x269b2
xorl %r13d, %r13d
jmp 0x26a67
xorl %r13d, %r13d
jmp 0x26bb0