#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 */
double fabs(float);
void mat4_identity(float *);
int sqrtf(float);
void mat4_lookAt(float *dst, float *eye, float *center, float *up) {
  float x0, x1, x2, y0, y1, y2, z0, z1, z2, len;
  float eyex = eye[0];
  float eyey = eye[1];
  float eyez = eye[2];
  float upx = up[0];
  float upy = up[1];
  float upz = up[2];
  float centerx = center[0];
  float centery = center[1];
  float centerz = center[2];
  if (fabs(eyex - centerx) < 0.000001 && fabs(eyey - centery) < 0.000001 &&
      fabs(eyez - centerz) < 0.000001) {
    return mat4_identity(dst);
  }
  z0 = eyex - centerx;
  z1 = eyey - centery;
  z2 = eyez - centerz;
  len = 1 / sqrtf(z0 * z0 + z1 * z1 + z2 * z2);
  z0 *= len;
  z1 *= len;
  z2 *= len;
  x0 = upy * z2 - upz * z1;
  x1 = upz * z0 - upx * z2;
  x2 = upx * z1 - upy * z0;
  len = sqrtf(x0 * x0 + x1 * x1 + x2 * x2);
  if (!len) {
    x0 = 0;
    x1 = 0;
    x2 = 0;
  } else {
    len = 1 / len;
    x0 *= len;
    x1 *= len;
    x2 *= len;
  }
  y0 = z1 * x2 - z2 * x1;
  y1 = z2 * x0 - z0 * x2;
  y2 = z0 * x1 - z1 * x0;
  len = sqrtf(y0 * y0 + y1 * y1 + y2 * y2);
  if (!len) {
    y0 = 0;
    y1 = 0;
    y2 = 0;
  } else {
    len = 1 / len;
    y0 *= len;
    y1 *= len;
    y2 *= len;
  }
  dst[0] = x0;
  dst[1] = y0;
  dst[2] = z0;
  dst[3] = 0;
  dst[4] = x1;
  dst[5] = y1;
  dst[6] = z1;
  dst[7] = 0;
  dst[8] = x2;
  dst[9] = y2;
  dst[10] = z2;
  dst[11] = 0;
  dst[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);
  dst[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);
  dst[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);
  dst[15] = 1;
}


x86 assembly (clang, -O0):
<mat4_lookAt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x4c(%rbp)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
movss  %xmm0,-0x54(%rbp)
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x58(%rbp)
mov    -0x20(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x5c(%rbp)
mov    -0x20(%rbp),%rax
movss  0x8(%rax),%xmm0
movss  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x64(%rbp)
mov    -0x18(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x68(%rbp)
mov    -0x18(%rbp),%rax
movss  0x8(%rax),%xmm0
movss  %xmm0,-0x6c(%rbp)
movss  -0x4c(%rbp),%xmm0
subss  -0x64(%rbp),%xmm0
call   1040 <fabs@plt>
movaps %xmm0,%xmm1
movsd  0xe23(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    123d <mat4_lookAt+0x10d>
movss  -0x50(%rbp),%xmm0
subss  -0x68(%rbp),%xmm0
call   1040 <fabs@plt>
movaps %xmm0,%xmm1
movsd  0xdff(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    123d <mat4_lookAt+0x10d>
movss  -0x54(%rbp),%xmm0
subss  -0x6c(%rbp),%xmm0
call   1040 <fabs@plt>
movaps %xmm0,%xmm1
movsd  0xddb(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    123d <mat4_lookAt+0x10d>
mov    -0x8(%rbp),%rdi
call   1030 <mat4_identity@plt>
jmp    16cd <mat4_lookAt+0x59d>
movss  -0x4c(%rbp),%xmm0
subss  -0x64(%rbp),%xmm0
movss  %xmm0,-0x3c(%rbp)
movss  -0x50(%rbp),%xmm0
subss  -0x68(%rbp),%xmm0
movss  %xmm0,-0x40(%rbp)
movss  -0x54(%rbp),%xmm0
subss  -0x6c(%rbp),%xmm0
movss  %xmm0,-0x44(%rbp)
movss  -0x3c(%rbp),%xmm1
movss  -0x3c(%rbp),%xmm2
movss  -0x40(%rbp),%xmm0
mulss  -0x40(%rbp),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x44(%rbp),%xmm0
movss  -0x44(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1050 <sqrtf@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x48(%rbp)
movss  -0x48(%rbp),%xmm0
mulss  -0x3c(%rbp),%xmm0
movss  %xmm0,-0x3c(%rbp)
movss  -0x48(%rbp),%xmm0
mulss  -0x40(%rbp),%xmm0
movss  %xmm0,-0x40(%rbp)
movss  -0x48(%rbp),%xmm0
mulss  -0x44(%rbp),%xmm0
movss  %xmm0,-0x44(%rbp)
movss  -0x5c(%rbp),%xmm0
movss  -0x44(%rbp),%xmm2
movss  -0x60(%rbp),%xmm1
mulss  -0x40(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x60(%rbp),%xmm0
movss  -0x3c(%rbp),%xmm2
movss  -0x58(%rbp),%xmm1
mulss  -0x44(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x58(%rbp),%xmm0
movss  -0x40(%rbp),%xmm2
movss  -0x5c(%rbp),%xmm1
mulss  -0x3c(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x24(%rbp),%xmm1
movss  -0x24(%rbp),%xmm2
movss  -0x28(%rbp),%xmm0
mulss  -0x28(%rbp),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x2c(%rbp),%xmm0
movss  -0x2c(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1050 <sqrtf@plt>
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x48(%rbp)
movss  -0x48(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    13d7 <mat4_lookAt+0x2a7>
jp     13d7 <mat4_lookAt+0x2a7>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x24(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x2c(%rbp)
jmp    1416 <mat4_lookAt+0x2e6>
movss  0xc29(%rip),%xmm0
divss  -0x48(%rbp),%xmm0
movss  %xmm0,-0x48(%rbp)
movss  -0x48(%rbp),%xmm0
mulss  -0x24(%rbp),%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x48(%rbp),%xmm0
mulss  -0x28(%rbp),%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x48(%rbp),%xmm0
mulss  -0x2c(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x40(%rbp),%xmm0
movss  -0x2c(%rbp),%xmm2
movss  -0x44(%rbp),%xmm1
mulss  -0x28(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x44(%rbp),%xmm0
movss  -0x24(%rbp),%xmm2
movss  -0x3c(%rbp),%xmm1
mulss  -0x2c(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x34(%rbp)
movss  -0x3c(%rbp),%xmm0
movss  -0x28(%rbp),%xmm2
movss  -0x40(%rbp),%xmm1
mulss  -0x24(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x38(%rbp)
movss  -0x30(%rbp),%xmm1
movss  -0x30(%rbp),%xmm2
movss  -0x34(%rbp),%xmm0
mulss  -0x34(%rbp),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x38(%rbp),%xmm0
movss  -0x38(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1050 <sqrtf@plt>
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x48(%rbp)
movss  -0x48(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1510 <mat4_lookAt+0x3e0>
jp     1510 <mat4_lookAt+0x3e0>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x34(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x38(%rbp)
jmp    154f <mat4_lookAt+0x41f>
movss  0xaf0(%rip),%xmm0
divss  -0x48(%rbp),%xmm0
movss  %xmm0,-0x48(%rbp)
movss  -0x48(%rbp),%xmm0
mulss  -0x30(%rbp),%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x48(%rbp),%xmm0
mulss  -0x34(%rbp),%xmm0
movss  %xmm0,-0x34(%rbp)
movss  -0x48(%rbp),%xmm0
mulss  -0x38(%rbp),%xmm0
movss  %xmm0,-0x38(%rbp)
movss  -0x24(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x30(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
movss  -0x3c(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0xc(%rax)
movss  -0x28(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x10(%rax)
movss  -0x34(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x14(%rax)
movss  -0x40(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x18(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x1c(%rax)
movss  -0x2c(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x20(%rax)
movss  -0x38(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x24(%rax)
movss  -0x44(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x28(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x2c(%rax)
movss  -0x24(%rbp),%xmm1
movss  -0x4c(%rbp),%xmm2
movss  -0x28(%rbp),%xmm0
mulss  -0x50(%rbp),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x2c(%rbp),%xmm0
movss  -0x54(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x30(%rax)
movss  -0x30(%rbp),%xmm1
movss  -0x4c(%rbp),%xmm2
movss  -0x34(%rbp),%xmm0
mulss  -0x50(%rbp),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x38(%rbp),%xmm0
movss  -0x54(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x34(%rax)
movss  -0x3c(%rbp),%xmm1
movss  -0x4c(%rbp),%xmm2
movss  -0x40(%rbp),%xmm0
mulss  -0x50(%rbp),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x44(%rbp),%xmm0
movss  -0x54(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x38(%rax)
mov    -0x8(%rbp),%rax
movss  0x940(%rip),%xmm0
movss  %xmm0,0x3c(%rax)
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mat4_lookAt>:
push   %rbx
sub    $0xa0,%rsp
mov    %rdi,%rbx
movss  (%rsi),%xmm0
movss  0x4(%rsi),%xmm1
movss  0x8(%rsi),%xmm2
movaps %xmm2,0x70(%rsp)
movsd  (%rcx),%xmm2
movaps %xmm2,0x60(%rsp)
movss  0x8(%rcx),%xmm2
movaps %xmm2,0x40(%rsp)
movss  0x8(%rdx),%xmm2
movss  %xmm2,(%rsp)
movss  %xmm0,0x1c(%rsp)
subss  (%rdx),%xmm0
movss  %xmm1,0x18(%rsp)
subss  0x4(%rdx),%xmm1
movaps %xmm1,0x20(%rsp)
movaps %xmm0,0x50(%rsp)
call   1040 <fabs@plt>
movsd  0xe69(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    11e3 <mat4_lookAt+0xb3>
movapd 0x20(%rsp),%xmm0
call   1040 <fabs@plt>
movsd  0xe50(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    11e3 <mat4_lookAt+0xb3>
movaps 0x70(%rsp),%xmm0
subss  (%rsp),%xmm0
call   1040 <fabs@plt>
movsd  0xe33(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    11e3 <mat4_lookAt+0xb3>
mov    %rbx,%rdi
add    $0xa0,%rsp
pop    %rbx
jmp    1030 <mat4_identity@plt>
movaps 0x60(%rsp),%xmm0
shufps $0xe1,%xmm0,%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0x70(%rsp),%xmm2
subss  (%rsp),%xmm2
movaps %xmm2,(%rsp)
movaps 0x20(%rsp),%xmm0
mulss  %xmm0,%xmm0
movaps 0x50(%rsp),%xmm1
mulss  %xmm1,%xmm1
addss  %xmm0,%xmm1
movaps %xmm2,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1050 <sqrtf@plt>
lea    0x1(%rax),%ecx
xor    %edx,%edx
cmp    $0x3,%ecx
cmovb  %eax,%edx
xorps  %xmm1,%xmm1
cvtsi2ss %edx,%xmm1
movaps 0x50(%rsp),%xmm4
mulss  %xmm1,%xmm4
movaps (%rsp),%xmm0
unpcklps 0x20(%rsp),%xmm0
shufps $0x0,%xmm1,%xmm1
mulps  %xmm0,%xmm1
movaps %xmm1,%xmm0
shufps $0x55,%xmm1,%xmm0
movaps %xmm0,(%rsp)
movaps %xmm1,%xmm0
movaps 0x60(%rsp),%xmm2
mulss  %xmm2,%xmm0
movaps 0x40(%rsp),%xmm3
movss  %xmm3,%xmm2
mulss  %xmm4,%xmm3
subss  %xmm0,%xmm3
movaps %xmm4,0x50(%rsp)
movaps %xmm4,%xmm0
shufps $0xd4,%xmm1,%xmm0
shufps $0x52,%xmm1,%xmm0
mulps  %xmm2,%xmm0
movaps %xmm1,0x20(%rsp)
movaps 0x30(%rsp),%xmm2
mulps  %xmm1,%xmm2
subps  %xmm0,%xmm2
movaps %xmm2,%xmm0
shufps $0x55,%xmm2,%xmm0
movaps %xmm3,0x40(%rsp)
movaps %xmm3,%xmm1
mulss  %xmm3,%xmm1
movaps %xmm2,0x30(%rsp)
mulss  %xmm2,%xmm2
addss  %xmm1,%xmm2
mulss  %xmm0,%xmm0
addss  %xmm2,%xmm0
call   1050 <sqrtf@plt>
xorps  %xmm5,%xmm5
xorps  %xmm4,%xmm4
test   %eax,%eax
je     12f7 <mat4_lookAt+0x1c7>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  0xd27(%rip),%xmm4
divss  %xmm0,%xmm4
movaps 0x40(%rsp),%xmm5
mulss  %xmm4,%xmm5
shufps $0x0,%xmm4,%xmm4
mulps  0x30(%rsp),%xmm4
movaps 0x50(%rsp),%xmm2
movaps %xmm2,%xmm0
movaps 0x20(%rsp),%xmm3
unpcklps %xmm3,%xmm0
movaps %xmm4,%xmm1
shufps $0x55,%xmm4,%xmm1
movaps %xmm1,0x60(%rsp)
movaps %xmm5,%xmm1
shufps $0xd4,%xmm4,%xmm1
shufps $0x52,%xmm4,%xmm1
mulps  %xmm0,%xmm1
mulps  %xmm4,%xmm3
subps  %xmm1,%xmm3
movaps %xmm3,%xmm1
shufps $0x55,%xmm3,%xmm1
movaps %xmm4,0x40(%rsp)
movaps %xmm4,%xmm0
mulss  (%rsp),%xmm0
movaps %xmm5,0x30(%rsp)
mulss  %xmm5,%xmm2
subss  %xmm0,%xmm2
movaps %xmm3,0x90(%rsp)
movaps %xmm3,%xmm0
mulss  %xmm3,%xmm0
mulss  %xmm1,%xmm1
addss  %xmm0,%xmm1
movaps %xmm2,0x80(%rsp)
movaps %xmm2,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1050 <sqrtf@plt>
test   %eax,%eax
xorps  %xmm1,%xmm1
xorps  %xmm6,%xmm6
je     13b2 <mat4_lookAt+0x282>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  0xc78(%rip),%xmm1
divss  %xmm0,%xmm1
movaps 0x80(%rsp),%xmm0
mulss  %xmm1,%xmm0
shufps $0x0,%xmm1,%xmm1
movaps 0x90(%rsp),%xmm6
mulps  %xmm1,%xmm6
movaps %xmm0,%xmm1
movaps 0x40(%rsp),%xmm3
movss  %xmm3,(%rbx)
movaps %xmm6,%xmm0
shufps $0x55,%xmm6,%xmm0
movss  %xmm0,0x4(%rbx)
movaps 0x50(%rsp),%xmm4
movss  %xmm4,0x8(%rbx)
movl   $0x0,0xc(%rbx)
movaps 0x30(%rsp),%xmm2
movss  %xmm2,0x10(%rbx)
movss  %xmm6,0x14(%rbx)
movaps (%rsp),%xmm7
movss  %xmm7,0x18(%rbx)
movl   $0x0,0x1c(%rbx)
movaps 0x60(%rsp),%xmm5
movss  %xmm5,0x20(%rbx)
movss  %xmm1,0x24(%rbx)
movaps 0x20(%rsp),%xmm9
movss  %xmm9,0x28(%rbx)
movl   $0x0,0x2c(%rbx)
movss  0x18(%rsp),%xmm11
mulss  %xmm11,%xmm2
movss  0x1c(%rsp),%xmm10
mulss  %xmm10,%xmm3
addss  %xmm2,%xmm3
movaps 0x70(%rsp),%xmm2
mulss  %xmm2,%xmm5
addss  %xmm3,%xmm5
movaps 0xbc6(%rip),%xmm8
xorps  %xmm8,%xmm5
movss  %xmm5,0x30(%rbx)
mulss  %xmm11,%xmm6
mulss  %xmm10,%xmm0
addss  %xmm6,%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
xorps  %xmm8,%xmm1
movss  %xmm1,0x34(%rbx)
mulss  %xmm11,%xmm7
mulss  %xmm10,%xmm4
addss  %xmm7,%xmm4
mulss  %xmm9,%xmm2
addss  %xmm4,%xmm2
xorps  %xmm8,%xmm2
movss  %xmm2,0x38(%rbx)
movl   $0x3f800000,0x3c(%rbx)
add    $0xa0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @mat4_lookAt(float* %0, float* %1, float* %2, float* %3) {
%5 = alloca float*
%6 = alloca float*
%7 = alloca float*
%8 = alloca float*
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
%15 = alloca float
%16 = alloca float
%17 = alloca float
%18 = alloca float
%19 = alloca float
%20 = alloca float
%21 = alloca float
%22 = alloca float
%23 = alloca float
%24 = alloca float
%25 = alloca float
%26 = alloca float
%27 = alloca float
store float* %0, float** %5
store float* %1, float** %6
store float* %2, float** %7
store float* %3, float** %8
%28 = load float*, float** %6
%29 = getelementptr inbounds float, float* %28, i64 0
%30 = load float, float* %29
store float %30, float* %19
%31 = load float*, float** %6
%32 = getelementptr inbounds float, float* %31, i64 1
%33 = load float, float* %32
store float %33, float* %20
%34 = load float*, float** %6
%35 = getelementptr inbounds float, float* %34, i64 2
%36 = load float, float* %35
store float %36, float* %21
%37 = load float*, float** %8
%38 = getelementptr inbounds float, float* %37, i64 0
%39 = load float, float* %38
store float %39, float* %22
%40 = load float*, float** %8
%41 = getelementptr inbounds float, float* %40, i64 1
%42 = load float, float* %41
store float %42, float* %23
%43 = load float*, float** %8
%44 = getelementptr inbounds float, float* %43, i64 2
%45 = load float, float* %44
store float %45, float* %24
%46 = load float*, float** %7
%47 = getelementptr inbounds float, float* %46, i64 0
%48 = load float, float* %47
store float %48, float* %25
%49 = load float*, float** %7
%50 = getelementptr inbounds float, float* %49, i64 1
%51 = load float, float* %50
store float %51, float* %26
%52 = load float*, float** %7
%53 = getelementptr inbounds float, float* %52, i64 2
%54 = load float, float* %53
store float %54, float* %27
%55 = load float, float* %19
%56 = load float, float* %25
%57 = fsub float %55, %56
%58 = call double @fabs(float %57)
%59 = fcmp olt double %58, 0x3EB0C6F7A0B5ED8D
br i1 %59, label %60, label %74
60: ; preds = %4
%61 = load float, float* %20
%62 = load float, float* %26
%63 = fsub float %61, %62
%64 = call double @fabs(float %63)
%65 = fcmp olt double %64, 0x3EB0C6F7A0B5ED8D
br i1 %65, label %66, label %74
66: ; preds = %60
%67 = load float, float* %21
%68 = load float, float* %27
%69 = fsub float %67, %68
%70 = call double @fabs(float %69)
%71 = fcmp olt double %70, 0x3EB0C6F7A0B5ED8D
br i1 %71, label %72, label %74
72: ; preds = %66
%73 = load float*, float** %5
br label %272
74: ; preds = %66, %60, %4
%75 = load float, float* %19
%76 = load float, float* %25
%77 = fsub float %75, %76
store float %77, float* %15
%78 = load float, float* %20
%79 = load float, float* %26
%80 = fsub float %78, %79
store float %80, float* %16
%81 = load float, float* %21
%82 = load float, float* %27
%83 = fsub float %81, %82
store float %83, float* %17
%84 = load float, float* %15
%85 = load float, float* %15
%86 = load float, float* %16
%87 = load float, float* %16
%88 = fmul float %86, %87
%89 = call float @llvm.fmuladd.f32(float %84, float %85, float %88)
%90 = load float, float* %17
%91 = load float, float* %17
%92 = call float @llvm.fmuladd.f32(float %90, float %91, float %89)
%93 = call i32 @sqrtf(float %92)
%94 = sdiv i32 1, %93
%95 = sitofp i32 %94 to float
store float %95, float* %18
%96 = load float, float* %18
%97 = load float, float* %15
%98 = fmul float %97, %96
store float %98, float* %15
%99 = load float, float* %18
%100 = load float, float* %16
%101 = fmul float %100, %99
store float %101, float* %16
%102 = load float, float* %18
%103 = load float, float* %17
%104 = fmul float %103, %102
store float %104, float* %17
%105 = load float, float* %23
%106 = load float, float* %17
%107 = load float, float* %24
%108 = load float, float* %16
%109 = fmul float %107, %108
%110 = fneg float %109
%111 = call float @llvm.fmuladd.f32(float %105, float %106, float %110)
store float %111, float* %9
%112 = load float, float* %24
%113 = load float, float* %15
%114 = load float, float* %22
%115 = load float, float* %17
%116 = fmul float %114, %115
%117 = fneg float %116
%118 = call float @llvm.fmuladd.f32(float %112, float %113, float %117)
store float %118, float* %10
%119 = load float, float* %22
%120 = load float, float* %16
%121 = load float, float* %23
%122 = load float, float* %15
%123 = fmul float %121, %122
%124 = fneg float %123
%125 = call float @llvm.fmuladd.f32(float %119, float %120, float %124)
store float %125, float* %11
%126 = load float, float* %9
%127 = load float, float* %9
%128 = load float, float* %10
%129 = load float, float* %10
%130 = fmul float %128, %129
%131 = call float @llvm.fmuladd.f32(float %126, float %127, float %130)
%132 = load float, float* %11
%133 = load float, float* %11
%134 = call float @llvm.fmuladd.f32(float %132, float %133, float %131)
%135 = call i32 @sqrtf(float %134)
%136 = sitofp i32 %135 to float
store float %136, float* %18
%137 = load float, float* %18
%138 = fcmp une float %137, 0.000000e+00
br i1 %138, label %140, label %139
139: ; preds = %74
store float 0.000000e+00, float* %9
store float 0.000000e+00, float* %10
store float 0.000000e+00, float* %11
br label %152
140: ; preds = %74
%141 = load float, float* %18
%142 = fdiv float 1.000000e+00, %141
store float %142, float* %18
%143 = load float, float* %18
%144 = load float, float* %9
%145 = fmul float %144, %143
store float %145, float* %9
%146 = load float, float* %18
%147 = load float, float* %10
%148 = fmul float %147, %146
store float %148, float* %10
%149 = load float, float* %18
%150 = load float, float* %11
%151 = fmul float %150, %149
store float %151, float* %11
br label %152
152: ; preds = %140, %139
%153 = load float, float* %16
%154 = load float, float* %11
%155 = load float, float* %17
%156 = load float, float* %10
%157 = fmul float %155, %156
%158 = fneg float %157
%159 = call float @llvm.fmuladd.f32(float %153, float %154, float %158)
store float %159, float* %12
%160 = load float, float* %17
%161 = load float, float* %9
%162 = load float, float* %15
%163 = load float, float* %11
%164 = fmul float %162, %163
%165 = fneg float %164
%166 = call float @llvm.fmuladd.f32(float %160, float %161, float %165)
store float %166, float* %13
%167 = load float, float* %15
%168 = load float, float* %10
%169 = load float, float* %16
%170 = load float, float* %9
%171 = fmul float %169, %170
%172 = fneg float %171
%173 = call float @llvm.fmuladd.f32(float %167, float %168, float %172)
store float %173, float* %14
%174 = load float, float* %12
%175 = load float, float* %12
%176 = load float, float* %13
%177 = load float, float* %13
%178 = fmul float %176, %177
%179 = call float @llvm.fmuladd.f32(float %174, float %175, float %178)
%180 = load float, float* %14
%181 = load float, float* %14
%182 = call float @llvm.fmuladd.f32(float %180, float %181, float %179)
%183 = call i32 @sqrtf(float %182)
%184 = sitofp i32 %183 to float
store float %184, float* %18
%185 = load float, float* %18
%186 = fcmp une float %185, 0.000000e+00
br i1 %186, label %188, label %187
187: ; preds = %152
store float 0.000000e+00, float* %12
store float 0.000000e+00, float* %13
store float 0.000000e+00, float* %14
br label %200
188: ; preds = %152
%189 = load float, float* %18
%190 = fdiv float 1.000000e+00, %189
store float %190, float* %18
%191 = load float, float* %18
%192 = load float, float* %12
%193 = fmul float %192, %191
store float %193, float* %12
%194 = load float, float* %18
%195 = load float, float* %13
%196 = fmul float %195, %194
store float %196, float* %13
%197 = load float, float* %18
%198 = load float, float* %14
%199 = fmul float %198, %197
store float %199, float* %14
br label %200
200: ; preds = %188, %187
%201 = load float, float* %9
%202 = load float*, float** %5
%203 = getelementptr inbounds float, float* %202, i64 0
store float %201, float* %203
%204 = load float, float* %12
%205 = load float*, float** %5
%206 = getelementptr inbounds float, float* %205, i64 1
store float %204, float* %206
%207 = load float, float* %15
%208 = load float*, float** %5
%209 = getelementptr inbounds float, float* %208, i64 2
store float %207, float* %209
%210 = load float*, float** %5
%211 = getelementptr inbounds float, float* %210, i64 3
store float 0.000000e+00, float* %211
%212 = load float, float* %10
%213 = load float*, float** %5
%214 = getelementptr inbounds float, float* %213, i64 4
store float %212, float* %214
%215 = load float, float* %13
%216 = load float*, float** %5
%217 = getelementptr inbounds float, float* %216, i64 5
store float %215, float* %217
%218 = load float, float* %16
%219 = load float*, float** %5
%220 = getelementptr inbounds float, float* %219, i64 6
store float %218, float* %220
%221 = load float*, float** %5
%222 = getelementptr inbounds float, float* %221, i64 7
store float 0.000000e+00, float* %222
%223 = load float, float* %11
%224 = load float*, float** %5
%225 = getelementptr inbounds float, float* %224, i64 8
store float %223, float* %225
%226 = load float, float* %14
%227 = load float*, float** %5
%228 = getelementptr inbounds float, float* %227, i64 9
store float %226, float* %228
%229 = load float, float* %17
%230 = load float*, float** %5
%231 = getelementptr inbounds float, float* %230, i64 10
store float %229, float* %231
%232 = load float*, float** %5
%233 = getelementptr inbounds float, float* %232, i64 11
store float 0.000000e+00, float* %233
%234 = load float, float* %9
%235 = load float, float* %19
%236 = load float, float* %10
%237 = load float, float* %20
%238 = fmul float %236, %237
%239 = call float @llvm.fmuladd.f32(float %234, float %235, float %238)
%240 = load float, float* %11
%241 = load float, float* %21
%242 = call float @llvm.fmuladd.f32(float %240, float %241, float %239)
%243 = fneg float %242
%244 = load float*, float** %5
%245 = getelementptr inbounds float, float* %244, i64 12
store float %243, float* %245
%246 = load float, float* %12
%247 = load float, float* %19
%248 = load float, float* %13
%249 = load float, float* %20
%250 = fmul float %248, %249
%251 = call float @llvm.fmuladd.f32(float %246, float %247, float %250)
%252 = load float, float* %14
%253 = load float, float* %21
%254 = call float @llvm.fmuladd.f32(float %252, float %253, float %251)
%255 = fneg float %254
%256 = load float*, float** %5
%257 = getelementptr inbounds float, float* %256, i64 13
store float %255, float* %257
%258 = load float, float* %15
%259 = load float, float* %19
%260 = load float, float* %16
%261 = load float, float* %20
%262 = fmul float %260, %261
%263 = call float @llvm.fmuladd.f32(float %258, float %259, float %262)
%264 = load float, float* %17
%265 = load float, float* %21
%266 = call float @llvm.fmuladd.f32(float %264, float %265, float %263)
%267 = fneg float %266
%268 = load float*, float** %5
%269 = getelementptr inbounds float, float* %268, i64 14
store float %267, float* %269
%270 = load float*, float** %5
%271 = getelementptr inbounds float, float* %270, i64 15
store float 1.000000e+00, float* %271
br label %272
272: ; preds = %200, %72
ret void
}

LLVM IR (-O2):
define void @mat4_lookAt(float* %0, float* nocapture %1, float* nocapture %2, float* nocapture %3) {
%5 = load float, float* %1
%6 = getelementptr inbounds float, float* %1, i64 1
%7 = load float, float* %6
%8 = getelementptr inbounds float, float* %1, i64 2
%9 = load float, float* %8
%10 = bitcast float* %3 to <2 x float>*
%11 = load <2 x float>, <2 x float>* %10
%12 = shufflevector <2 x float> %11, <2 x float> poison, <2 x i32> <i32 1, i32 0>
%13 = getelementptr inbounds float, float* %3, i64 2
%14 = load float, float* %13
%15 = load float, float* %2
%16 = getelementptr inbounds float, float* %2, i64 1
%17 = load float, float* %16
%18 = getelementptr inbounds float, float* %2, i64 2
%19 = load float, float* %18
%20 = fsub float %5, %15
%21 = tail call double @fabs(float %20)
%22 = fcmp olt double %21, 0x3EB0C6F7A0B5ED8D
%23 = fsub float %7, %17
br i1 %22, label %24, label %32
24: ; preds = %4
%25 = tail call double @fabs(float %23)
%26 = fcmp olt double %25, 0x3EB0C6F7A0B5ED8D
br i1 %26, label %27, label %32
27: ; preds = %24
%28 = fsub float %9, %19
%29 = tail call double @fabs(float %28)
%30 = fcmp olt double %29, 0x3EB0C6F7A0B5ED8D
br i1 %30, label %31, label %32
31: ; preds = %27
tail call void @mat4_identity(float* %0)
br label %135
32: ; preds = %4, %27, %24
%33 = fsub float %9, %19
%34 = fmul float %23, %23
%35 = tail call float @llvm.fmuladd.f32(float %20, float %20, float %34)
%36 = tail call float @llvm.fmuladd.f32(float %33, float %33, float %35)
%37 = tail call i32 @sqrtf(float %36)
%38 = add i32 %37, 1
%39 = icmp ult i32 %38, 3
%40 = select i1 %39, i32 %37, i32 0
%41 = sitofp i32 %40 to float
%42 = fmul float %20, %41
%43 = insertelement <2 x float> poison, float %23, i64 1
%44 = insertelement <2 x float> %43, float %33, i64 0
%45 = insertelement <2 x float> poison, float %41, i64 0
%46 = shufflevector <2 x float> %45, <2 x float> poison, <2 x i32> zeroinitializer
%47 = fmul <2 x float> %44, %46
%48 = extractelement <2 x float> %11, i64 0
%49 = fneg float %48
%50 = extractelement <2 x float> %47, i64 0
%51 = fmul float %50, %49
%52 = tail call float @llvm.fmuladd.f32(float %14, float %42, float %51)
%53 = insertelement <2 x float> %11, float %14, i64 0
%54 = fneg <2 x float> %53
%55 = extractelement <2 x float> %47, i64 1
%56 = insertelement <2 x float> poison, float %55, i64 0
%57 = insertelement <2 x float> %56, float %42, i64 1
%58 = fmul <2 x float> %57, %54
%59 = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %12, <2 x float> %47, <2 x float> %58)
%60 = fmul float %52, %52
%61 = extractelement <2 x float> %59, i64 0
%62 = tail call float @llvm.fmuladd.f32(float %61, float %61, float %60)
%63 = extractelement <2 x float> %59, i64 1
%64 = tail call float @llvm.fmuladd.f32(float %63, float %63, float %62)
%65 = tail call i32 @sqrtf(float %64)
%66 = icmp eq i32 %65, 0
br i1 %66, label %74, label %67
67: ; preds = %32
%68 = sitofp i32 %65 to float
%69 = fdiv float 1.000000e+00, %68
%70 = fmul float %69, %52
%71 = insertelement <2 x float> poison, float %69, i64 0
%72 = shufflevector <2 x float> %71, <2 x float> poison, <2 x i32> zeroinitializer
%73 = fmul <2 x float> %72, %59
br label %74
74: ; preds = %32, %67
%75 = phi float [ %70, %67 ], [ 0.000000e+00, %32 ]
%76 = phi <2 x float> [ %73, %67 ], [ zeroinitializer, %32 ]
%77 = insertelement <2 x float> poison, float %42, i64 0
%78 = shufflevector <2 x float> %77, <2 x float> %47, <2 x i32> <i32 0, i32 2>
%79 = fneg <2 x float> %78
%80 = extractelement <2 x float> %76, i64 1
%81 = insertelement <2 x float> poison, float %80, i64 0
%82 = insertelement <2 x float> %81, float %75, i64 1
%83 = fmul <2 x float> %82, %79
%84 = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %47, <2 x float> %76, <2 x float> %83)
%85 = fneg float %55
%86 = extractelement <2 x float> %76, i64 0
%87 = fmul float %86, %85
%88 = tail call float @llvm.fmuladd.f32(float %42, float %75, float %87)
%89 = fmul <2 x float> %84, %84
%90 = extractelement <2 x float> %89, i64 0
%91 = extractelement <2 x float> %84, i64 1
%92 = tail call float @llvm.fmuladd.f32(float %91, float %91, float %90)
%93 = tail call float @llvm.fmuladd.f32(float %88, float %88, float %92)
%94 = tail call i32 @sqrtf(float %93)
%95 = icmp eq i32 %94, 0
br i1 %95, label %103, label %96
96: ; preds = %74
%97 = sitofp i32 %94 to float
%98 = fdiv float 1.000000e+00, %97
%99 = insertelement <2 x float> poison, float %98, i64 0
%100 = shufflevector <2 x float> %99, <2 x float> poison, <2 x i32> zeroinitializer
%101 = fmul <2 x float> %84, %100
%102 = fmul float %88, %98
br label %103
103: ; preds = %74, %96
%104 = phi float [ %102, %96 ], [ 0.000000e+00, %74 ]
%105 = phi <2 x float> [ %101, %96 ], [ zeroinitializer, %74 ]
store float %86, float* %0
%106 = getelementptr inbounds float, float* %0, i64 1
%107 = extractelement <2 x float> %105, i64 1
store float %107, float* %106
%108 = getelementptr inbounds float, float* %0, i64 2
store float %42, float* %108
%109 = getelementptr inbounds float, float* %0, i64 3
store float 0.000000e+00, float* %109
%110 = getelementptr inbounds float, float* %0, i64 4
store float %75, float* %110
%111 = getelementptr inbounds float, float* %0, i64 5
%112 = extractelement <2 x float> %105, i64 0
store float %112, float* %111
%113 = getelementptr inbounds float, float* %0, i64 6
store float %55, float* %113
%114 = getelementptr inbounds float, float* %0, i64 7
store float 0.000000e+00, float* %114
%115 = getelementptr inbounds float, float* %0, i64 8
store float %80, float* %115
%116 = getelementptr inbounds float, float* %0, i64 9
store float %104, float* %116
%117 = getelementptr inbounds float, float* %0, i64 10
store float %50, float* %117
%118 = getelementptr inbounds float, float* %0, i64 11
store float 0.000000e+00, float* %118
%119 = fmul float %7, %75
%120 = tail call float @llvm.fmuladd.f32(float %86, float %5, float %119)
%121 = tail call float @llvm.fmuladd.f32(float %80, float %9, float %120)
%122 = fneg float %121
%123 = getelementptr inbounds float, float* %0, i64 12
store float %122, float* %123
%124 = fmul float %7, %112
%125 = tail call float @llvm.fmuladd.f32(float %107, float %5, float %124)
%126 = tail call float @llvm.fmuladd.f32(float %104, float %9, float %125)
%127 = fneg float %126
%128 = getelementptr inbounds float, float* %0, i64 13
store float %127, float* %128
%129 = fmul float %7, %55
%130 = tail call float @llvm.fmuladd.f32(float %42, float %5, float %129)
%131 = tail call float @llvm.fmuladd.f32(float %50, float %9, float %130)
%132 = fneg float %131
%133 = getelementptr inbounds float, float* %0, i64 14
store float %132, float* %133
%134 = getelementptr inbounds float, float* %0, i64 15
store float 1.000000e+00, float* %134
br label %135
135: ; preds = %103, %31
ret void
}