#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
float DotProd3fv(float const *, float const *);
void Viewing2CoordFrame16fv(const float *M, float X[3], float Y[3], float Z[3],
                            float O[3]) {
  X[0] = M[0];
  X[1] = M[4];
  X[2] = M[8];
  O[0] = -DotProd3fv(M, M + 12);
  Y[0] = M[1];
  Y[1] = M[5];
  Y[2] = M[9];
  O[1] = -DotProd3fv(M + 4, M + 12);
  Z[0] = M[2];
  Z[1] = M[6];
  Z[2] = M[10];
  O[2] = -DotProd3fv(M + 8, M + 12);
}


x86 assembly (clang, -O0):
<Viewing2CoordFrame16fv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movss  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
movss  0x20(%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0x30,%rsi
call   1030 <DotProd3fv@plt>
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mov    -0x28(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movss  0x14(%rax),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
movss  0x24(%rax),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rdi
add    $0x10,%rdi
mov    -0x8(%rbp),%rsi
add    $0x30,%rsi
call   1030 <DotProd3fv@plt>
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mov    -0x28(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movss  0x18(%rax),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
movss  0x28(%rax),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rdi
add    $0x20,%rdi
mov    -0x8(%rbp),%rsi
add    $0x30,%rsi
call   1030 <DotProd3fv@plt>
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mov    -0x28(%rbp),%rax
movss  %xmm0,0x8(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Viewing2CoordFrame16fv>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r8,%r14
mov    %rcx,%r15
mov    %rdx,%rbp
mov    %rdi,%rbx
movss  (%rdi),%xmm0
movss  %xmm0,(%rsi)
lea    0x10(%rdi),%r12
movss  0x10(%rdi),%xmm0
movss  %xmm0,0x4(%rsi)
lea    0x20(%rdi),%rax
mov    %rax,(%rsp)
movss  0x20(%rdi),%xmm0
movss  %xmm0,0x8(%rsi)
lea    0x30(%rdi),%r13
mov    %r13,%rsi
call   1030 <DotProd3fv@plt>
xorps  0xe9e(%rip),%xmm0
movss  %xmm0,(%r14)
movss  0x4(%rbx),%xmm0
movss  %xmm0,0x0(%rbp)
movss  0x14(%rbx),%xmm0
movss  %xmm0,0x4(%rbp)
movss  0x24(%rbx),%xmm0
movss  %xmm0,0x8(%rbp)
mov    %r12,%rdi
mov    %r13,%rsi
call   1030 <DotProd3fv@plt>
xorps  0xe69(%rip),%xmm0
movss  %xmm0,0x4(%r14)
movss  0x8(%rbx),%xmm0
movss  %xmm0,(%r15)
movss  0x18(%rbx),%xmm0
movss  %xmm0,0x4(%r15)
movss  0x28(%rbx),%xmm0
movss  %xmm0,0x8(%r15)
mov    (%rsp),%rdi
mov    %r13,%rsi
call   1030 <DotProd3fv@plt>
xorps  0xe30(%rip),%xmm0
movss  %xmm0,0x8(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @Viewing2CoordFrame16fv(float* %0, float* %1, float* %2, float* %3, float* %4) {
%6 = alloca float*
%7 = alloca float*
%8 = alloca float*
%9 = alloca float*
%10 = alloca float*
store float* %0, float** %6
store float* %1, float** %7
store float* %2, float** %8
store float* %3, float** %9
store float* %4, float** %10
%11 = load float*, float** %6
%12 = getelementptr inbounds float, float* %11, i64 0
%13 = load float, float* %12
%14 = load float*, float** %7
%15 = getelementptr inbounds float, float* %14, i64 0
store float %13, float* %15
%16 = load float*, float** %6
%17 = getelementptr inbounds float, float* %16, i64 4
%18 = load float, float* %17
%19 = load float*, float** %7
%20 = getelementptr inbounds float, float* %19, i64 1
store float %18, float* %20
%21 = load float*, float** %6
%22 = getelementptr inbounds float, float* %21, i64 8
%23 = load float, float* %22
%24 = load float*, float** %7
%25 = getelementptr inbounds float, float* %24, i64 2
store float %23, float* %25
%26 = load float*, float** %6
%27 = load float*, float** %6
%28 = getelementptr inbounds float, float* %27, i64 12
%29 = call float @DotProd3fv(float* %26, float* %28)
%30 = fneg float %29
%31 = load float*, float** %10
%32 = getelementptr inbounds float, float* %31, i64 0
store float %30, float* %32
%33 = load float*, float** %6
%34 = getelementptr inbounds float, float* %33, i64 1
%35 = load float, float* %34
%36 = load float*, float** %8
%37 = getelementptr inbounds float, float* %36, i64 0
store float %35, float* %37
%38 = load float*, float** %6
%39 = getelementptr inbounds float, float* %38, i64 5
%40 = load float, float* %39
%41 = load float*, float** %8
%42 = getelementptr inbounds float, float* %41, i64 1
store float %40, float* %42
%43 = load float*, float** %6
%44 = getelementptr inbounds float, float* %43, i64 9
%45 = load float, float* %44
%46 = load float*, float** %8
%47 = getelementptr inbounds float, float* %46, i64 2
store float %45, float* %47
%48 = load float*, float** %6
%49 = getelementptr inbounds float, float* %48, i64 4
%50 = load float*, float** %6
%51 = getelementptr inbounds float, float* %50, i64 12
%52 = call float @DotProd3fv(float* %49, float* %51)
%53 = fneg float %52
%54 = load float*, float** %10
%55 = getelementptr inbounds float, float* %54, i64 1
store float %53, float* %55
%56 = load float*, float** %6
%57 = getelementptr inbounds float, float* %56, i64 2
%58 = load float, float* %57
%59 = load float*, float** %9
%60 = getelementptr inbounds float, float* %59, i64 0
store float %58, float* %60
%61 = load float*, float** %6
%62 = getelementptr inbounds float, float* %61, i64 6
%63 = load float, float* %62
%64 = load float*, float** %9
%65 = getelementptr inbounds float, float* %64, i64 1
store float %63, float* %65
%66 = load float*, float** %6
%67 = getelementptr inbounds float, float* %66, i64 10
%68 = load float, float* %67
%69 = load float*, float** %9
%70 = getelementptr inbounds float, float* %69, i64 2
store float %68, float* %70
%71 = load float*, float** %6
%72 = getelementptr inbounds float, float* %71, i64 8
%73 = load float*, float** %6
%74 = getelementptr inbounds float, float* %73, i64 12
%75 = call float @DotProd3fv(float* %72, float* %74)
%76 = fneg float %75
%77 = load float*, float** %10
%78 = getelementptr inbounds float, float* %77, i64 2
store float %76, float* %78
ret void
}

LLVM IR (-O2):
define void @Viewing2CoordFrame16fv(float* %0, float* nocapture writeonly %1, float* nocapture writeonly %2, float* nocapture writeonly %3, float* nocapture writeonly %4) {
%6 = load float, float* %0
store float %6, float* %1
%7 = getelementptr inbounds float, float* %0, i64 4
%8 = load float, float* %7
%9 = getelementptr inbounds float, float* %1, i64 1
store float %8, float* %9
%10 = getelementptr inbounds float, float* %0, i64 8
%11 = load float, float* %10
%12 = getelementptr inbounds float, float* %1, i64 2
store float %11, float* %12
%13 = getelementptr inbounds float, float* %0, i64 12
%14 = tail call float @DotProd3fv(float* %0, float* %13)
%15 = fneg float %14
store float %15, float* %4
%16 = getelementptr inbounds float, float* %0, i64 1
%17 = load float, float* %16
store float %17, float* %2
%18 = getelementptr inbounds float, float* %0, i64 5
%19 = load float, float* %18
%20 = getelementptr inbounds float, float* %2, i64 1
store float %19, float* %20
%21 = getelementptr inbounds float, float* %0, i64 9
%22 = load float, float* %21
%23 = getelementptr inbounds float, float* %2, i64 2
store float %22, float* %23
%24 = tail call float @DotProd3fv(float* %7, float* %13)
%25 = fneg float %24
%26 = getelementptr inbounds float, float* %4, i64 1
store float %25, float* %26
%27 = getelementptr inbounds float, float* %0, i64 2
%28 = load float, float* %27
store float %28, float* %3
%29 = getelementptr inbounds float, float* %0, i64 6
%30 = load float, float* %29
%31 = getelementptr inbounds float, float* %3, i64 1
store float %30, float* %31
%32 = getelementptr inbounds float, float* %0, i64 10
%33 = load float, float* %32
%34 = getelementptr inbounds float, float* %3, i64 2
store float %33, float* %34
%35 = tail call float @DotProd3fv(float* %10, float* %13)
%36 = fneg float %35
%37 = getelementptr inbounds float, float* %4, i64 2
store float %36, float* %37
ret void
}