// File: /workspace/github_c_makefile_star2_O3/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, %rbx
movq %rcx, %rbp
movq %rdx, 0x10(%rsp)
movq %rsi, %r12
movq %rdi, 0x20(%rsp)
movq (%rsi), %r14
leaq 0x16d197(%rip), %r13    # 0x1926a0
movl 0x16d191(%rip), %eax    # 0x1926a0
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%r13,%rax,8), %rcx
movq 0x18(%r13,%rax,8), %rdx
andq %r14, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r14, %rdx
je 0x25562
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r14, %rdx
je 0x25562
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r14, %rdx
je 0x25562
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r14, %rdx
jne 0x2556b
movq (%rax,%rcx), %r15
testq %r15, %r15
jne 0x25592
movabsq $-0x1e682f89ce03d7c8, %rdi # imm = 0xE197D07631FC2838
movq %r14, %rsi
callq 0xe9bc5
movq %rax, %r15
leaq 0x16d119(%rip), %rdi    # 0x1926a0
movq %r14, %rsi
movq %rax, %rdx
callq 0x115fac
movq %r12, %rdi
callq *0x20(%r15)
movq %rax, %r14
movq (%r12), %r15
movl 0x16d0fa(%rip), %eax    # 0x1926a0
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%r13,%rax,8), %rcx
movq 0x18(%r13,%rax,8), %rdx
andq %r15, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r15, %rdx
je 0x255f9
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r15, %rdx
je 0x255f9
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r15, %rdx
je 0x255f9
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r15, %rdx
jne 0x25602
movq (%rax,%rcx), %r13
testq %r13, %r13
jne 0x25629
movabsq $-0x1e682f89ce03d7c8, %rdi # imm = 0xE197D07631FC2838
movq %r15, %rsi
callq 0xe9bc5
movq %rax, %r13
leaq 0x16d082(%rip), %rdi    # 0x1926a0
movq %r15, %rsi
movq %rax, %rdx
callq 0x115fac
movq %r12, %rdi
movq %rbp, %rsi
callq *0x50(%r13)
leaq 0x50(%r14), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0xca9a0
testb %al, %al
je 0x25704
movq %rbx, 0x18(%rsp)
movq %rbp, %rbx
movq (%r12), %r13
movl 0x16d044(%rip), %eax    # 0x1926a0
cltq
leaq (%rax,%rax,2), %rax
leaq 0x16d037(%rip), %rdx    # 0x1926a0
movq 0x20(%rdx,%rax,8), %rcx
movq 0x18(%rdx,%rax,8), %rdx
andq %r13, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r13, %rdx
je 0x256b6
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r13, %rdx
je 0x256b6
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r13, %rdx
je 0x256b6
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r13, %rdx
jne 0x256bf
movq (%rax,%rcx), %rbp
testq %rbp, %rbp
jne 0x256e6
movabsq $-0x1e682f89ce03d7c8, %rdi # imm = 0xE197D07631FC2838
movq %r13, %rsi
callq 0xe9bc5
movq %rax, %rbp
leaq 0x16cfc5(%rip), %rdi    # 0x1926a0
movq %r13, %rsi
movq %rax, %rdx
callq 0x115fac
movq %r12, %rdi
movq %rbx, %rsi
callq *0x50(%rbp)
movq %r15, %rdi
movq %rax, %rsi
callq 0xca94f
testq %rax, %rax
je 0x25721
movq (%rax), %rax
jmp 0x25723
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 %rbx, %rbp
je 0x25773
movq 0x10(%rcx), %rcx
leaq 0x109b24(%rip), %rsi    # 0x12f27a
movq 0x10(%rsp), %rdi
movq %rbp, %rdx
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xde10
movq 0xb0(%rax), %r15
addq $0x140, %r14            # imm = 0x140
movq %r14, %rdi
movq 0x18(%rsp), %rbx
movq %rbx, %rsi
callq 0xd3d8e
cmpq %rax, %r15
je 0x25710
movq (%r13), %rax
movq 0xb0(%rax), %r14
movq (%r12), %r15
movl 0x16cef1(%rip), %eax    # 0x1926a0
cltq
leaq (%rax,%rax,2), %rax
leaq 0x16cee4(%rip), %rdx    # 0x1926a0
movq 0x20(%rdx,%rax,8), %rcx
movq 0x18(%rdx,%rax,8), %rdx
andq %r15, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r15, %rdx
je 0x25809
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r15, %rdx
je 0x25809
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r15, %rdx
je 0x25809
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r15, %rdx
jne 0x25812
movq (%rax,%rcx), %r13
testq %r13, %r13
jne 0x25839
movabsq $-0x1e682f89ce03d7c8, %rdi # imm = 0xE197D07631FC2838
movq %r15, %rsi
callq 0xe9bc5
movq %rax, %r13
leaq 0x16ce72(%rip), %rdi    # 0x1926a0
movq %r15, %rsi
movq %rax, %rdx
callq 0x115fac
movq %r12, %rdi
movq %r14, %rsi
callq *0x48(%r13)
leaq 0x109a8e(%rip), %rsi    # 0x12f2d8
movq 0x10(%rsp), %rdi
movq %rbp, %rdx
movq %rax, %rcx
movq %rbx, %r8
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xde10