#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 M_PI;
double cos(double);
double sin(double);
double sqrt(double);
int matMakeRotMat(double angle, double a1, double a2, double a3, double *rm) {
  double sa, ca;
  double x, y, z, xx, xy, xz, yy, yz, zz;
  double v, vv;
  int i;
  sa = sin(angle * M_PI / 180.0);
  ca = cos(angle * M_PI / 180.0);
  v = sqrt(a1 * a1 + a2 * a2 + a3 * a3);
  if (v == 0.0) {
    for (i = 0; i < 15; i++)
      rm[i] = 0.0;
    rm[0] = 1.0;
    rm[5] = 1.0;
    rm[10] = 1.0;
    rm[15] = 1.0;
    return -1;
  }
  vv = 1.0 / v;
  x = a1 * vv;
  y = a2 * vv;
  z = a3 * vv;
  xx = x * x;
  xy = x * y;
  xz = x * z;
  yy = y * y;
  yz = y * z;
  zz = z * z;
  rm[0] = xx + ca - xx * ca;
  rm[4] = xy - ca * xy - sa * z;
  rm[8] = xz - ca * xz + sa * y;
  rm[12] = 0.0;
  rm[1] = xy - ca * xy + sa * z;
  rm[5] = yy + ca - ca * yy;
  rm[9] = yz - ca * yz - sa * x;
  rm[13] = 0.0;
  rm[2] = xz - ca * xz - sa * y;
  rm[6] = yz - ca * yz + sa * x;
  rm[10] = zz + ca - ca * zz;
  rm[14] = 0.0;
  rm[3] = 0.0;
  rm[7] = 0.0;
  rm[11] = 0.0;
  rm[15] = 1.0;
  return 0;
}


x86 assembly (clang, -O0):
<matMakeRotMat>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
mov    %rdi,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    0x2e89(%rip),%rax
mulsd  (%rax),%xmm0
movsd  0xe95(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    0x2e63(%rip),%rax
mulsd  (%rax),%xmm0
movsd  0xe6f(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <cos@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1050 <sqrt@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1282 <matMakeRotMat+0x152>
jp     1282 <matMakeRotMat+0x152>
movl   $0x0,-0x9c(%rbp)
cmpl   $0xf,-0x9c(%rbp)
jge    1233 <matMakeRotMat+0x103>
mov    -0x30(%rbp),%rax
movslq -0x9c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x9c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9c(%rbp)
jmp    11ff <matMakeRotMat+0xcf>
mov    -0x30(%rbp),%rax
movsd  0xdc9(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x30(%rbp),%rax
movsd  0xdb9(%rip),%xmm0
movsd  %xmm0,0x28(%rax)
mov    -0x30(%rbp),%rax
movsd  0xda8(%rip),%xmm0
movsd  %xmm0,0x50(%rax)
mov    -0x30(%rbp),%rax
movsd  0xd97(%rip),%xmm0
movsd  %xmm0,0x78(%rax)
movl   $0xffffffff,-0x4(%rbp)
jmp    1641 <matMakeRotMat+0x511>
movsd  0xd7e(%rip),%xmm0
divsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
mulsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x48(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x50(%rbp)
movsd  -0x28(%rbp),%xmm0
mulsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x58(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x50(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x50(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x58(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x60(%rbp),%xmm1
addsd  -0x40(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x68(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  -0x70(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x40(%rax)
mov    -0x30(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x60(%rax)
movsd  -0x68(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x78(%rbp),%xmm1
addsd  -0x40(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x28(%rax)
movsd  -0x80(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  -0x80(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x48(%rax)
mov    -0x30(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x68(%rax)
movsd  -0x70(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0x80(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  -0x80(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x30(%rax)
movsd  -0x88(%rbp),%xmm1
ff
addsd  -0x40(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm0
movsd  -0x88(%rbp),%xmm2
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x50(%rax)
mov    -0x30(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x70(%rax)
mov    -0x30(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x18(%rax)
mov    -0x30(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x38(%rax)
mov    -0x30(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x58(%rax)
mov    -0x30(%rbp),%rax
movsd  0x9d3(%rip),%xmm0
movsd  %xmm0,0x78(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<matMakeRotMat>:
push   %r14
push   %rbx
sub    $0x58,%rsp
mov    %rdi,%rbx
movapd %xmm3,0x20(%rsp)
movapd %xmm2,0x30(%rsp)
movaps %xmm1,0x10(%rsp)
movapd %xmm0,%xmm1
movsd  %xmm0,(%rsp)
mov    0x2e8d(%rip),%r14
movsd  (%r14),%xmm0
mulsd  %xmm1,%xmm0
divsd  0xe94(%rip),%xmm0
call   1030 <sin@plt>
movapd %xmm0,0x40(%rsp)
movsd  (%rsp),%xmm0
mulsd  (%r14),%xmm0
divsd  0xe77(%rip),%xmm0
call   1040 <cos@plt>
movapd %xmm0,%xmm14
movapd 0x30(%rsp),%xmm0
mulsd  %xmm0,%xmm0
movapd 0x10(%rsp),%xmm1
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movapd 0x20(%rsp),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     11c9 <matMakeRotMat+0x99>
sqrtsd %xmm0,%xmm0
jmp    11de <matMakeRotMat+0xae>
movapd %xmm14,(%rsp)
call   1050 <sqrt@plt>
xorpd  %xmm1,%xmm1
movapd (%rsp),%xmm14
ucomisd %xmm1,%xmm0
movabs $0x3ff0000000000000,%rcx
jne    1236 <matMakeRotMat+0x106>
jp     1236 <matMakeRotMat+0x106>
xorpd  %xmm0,%xmm0
movupd %xmm0,0x68(%rbx)
movupd %xmm0,0x58(%rbx)
movupd %xmm0,0x48(%rbx)
movupd %xmm0,0x38(%rbx)
movupd %xmm0,0x28(%rbx)
movupd %xmm0,0x18(%rbx)
movupd %xmm0,0x8(%rbx)
mov    %rcx,(%rbx)
mov    $0xffffffff,%eax
mov    $0xa,%edx
movsd  0xddc(%rip),%xmm0
mov    $0x5,%esi
jmp    13a7 <matMakeRotMat+0x277>
movsd  0xdca(%rip),%xmm2
divsd  %xmm0,%xmm2
movapd %xmm2,%xmm0
unpcklpd %xmm2,%xmm0
movapd 0x30(%rsp),%xmm7
unpcklpd 0x10(%rsp),%xmm7
mulpd  %xmm0,%xmm7
movapd %xmm7,%xmm12
unpckhpd %xmm7,%xmm12
movapd %xmm12,%xmm1
mulsd  %xmm12,%xmm1
movapd %xmm12,%xmm9
mulsd  %xmm7,%xmm9
unpcklpd %xmm7,%xmm2
movapd 0x20(%rsp),%xmm4
unpcklpd %xmm7,%xmm4
mulpd  %xmm2,%xmm4
movapd %xmm7,%xmm3
shufpd $0x1,%xmm7,%xmm3
movapd %xmm4,%xmm2
unpcklpd %xmm4,%xmm2
mulpd  %xmm3,%xmm2
movapd %xmm4,%xmm0
mulsd  %xmm4,%xmm0
movapd %xmm14,%xmm6
addsd  %xmm1,%xmm6
movapd 0xd58(%rip),%xmm5
xorpd  %xmm5,%xmm1
movapd 0x40(%rsp),%xmm13
movapd %xmm13,%xmm11
unpcklpd %xmm14,%xmm11
xorpd  %xmm11,%xmm5
pshufd $0xee,%xmm5,%xmm8
movapd %xmm14,%xmm10
unpcklpd %xmm4,%xmm10
mulpd  %xmm4,%xmm11
unpckhpd %xmm4,%xmm4
addsd  %xmm14,%xmm4
movapd %xmm14,%xmm3
addsd  %xmm0,%xmm14
mulsd  %xmm8,%xmm0
mulsd  %xmm9,%xmm8
addsd  %xmm9,%xmm8
unpcklpd %xmm13,%xmm1
mulpd  %xmm1,%xmm10
unpcklpd %xmm8,%xmm6
addpd  %xmm10,%xmm6
movupd %xmm6,(%rbx)
unpcklpd %xmm4,%xmm8
subpd  %xmm11,%xmm8
movupd %xmm8,0x20(%rbx)
unpcklpd %xmm3,%xmm3
mulpd  %xmm2,%xmm3
subpd  %xmm3,%xmm2
movapd %xmm13,%xmm1
unpcklpd %xmm5,%xmm1
mulpd  %xmm7,%xmm1
addpd  %xmm2,%xmm1
movupd %xmm1,0x40(%rbx)
xorpd  %xmm1,%xmm1
movupd %xmm1,0x60(%rbx)
mulsd  %xmm7,%xmm5
addsd  %xmm2,%xmm5
movsd  %xmm5,0x10(%rbx)
unpckhpd %xmm2,%xmm2
mulsd  %xmm13,%xmm12
addsd  %xmm2,%xmm12
movsd  %xmm12,0x30(%rbx)
addsd  %xmm14,%xmm0
movsd  %xmm0,0x50(%rbx)
movq   $0x0,0x70(%rbx)
movq   $0x0,0x18(%rbx)
xor    %eax,%eax
mov    $0xb,%edx
xorpd  %xmm0,%xmm0
mov    $0x7,%esi
movsd  %xmm0,(%rbx,%rsi,8)
movsd  %xmm0,(%rbx,%rdx,8)
mov    %rcx,0x78(%rbx)
add    $0x58,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define i32 @matMakeRotMat(double %0, double %1, double %2, double %3, double* %4) {
%6 = alloca i32
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double*
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca i32
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double* %4, double** %11
%26 = load double, double* %7
%27 = load double, double* @M_PI
%28 = fmul double %26, %27
%29 = fdiv double %28, 1.800000e+02
%30 = call double @sin(double %29)
store double %30, double* %12
%31 = load double, double* %7
%32 = load double, double* @M_PI
%33 = fmul double %31, %32
%34 = fdiv double %33, 1.800000e+02
%35 = call double @cos(double %34)
store double %35, double* %13
%36 = load double, double* %8
%37 = load double, double* %8
%38 = load double, double* %9
%39 = load double, double* %9
%40 = fmul double %38, %39
%41 = call double @llvm.fmuladd.f64(double %36, double %37, double %40)
%42 = load double, double* %10
%43 = load double, double* %10
%44 = call double @llvm.fmuladd.f64(double %42, double %43, double %41)
%45 = call double @sqrt(double %44)
store double %45, double* %23
%46 = load double, double* %23
%47 = fcmp oeq double %46, 0.000000e+00
br i1 %47, label %48, label %69
48: ; preds = %5
store i32 0, i32* %25
br label %49
49: ; preds = %57, %48
%50 = load i32, i32* %25
%51 = icmp slt i32 %50, 15
br i1 %51, label %52, label %60
52: ; preds = %49
%53 = load double*, double** %11
%54 = load i32, i32* %25
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds double, double* %53, i64 %55
store double 0.000000e+00, double* %56
br label %57
57: ; preds = %52
%58 = load i32, i32* %25
%59 = add nsw i32 %58, 1
store i32 %59, i32* %25
br label %49
60: ; preds = %49
%61 = load double*, double** %11
%62 = getelementptr inbounds double, double* %61, i64 0
store double 1.000000e+00, double* %62
%63 = load double*, double** %11
%64 = getelementptr inbounds double, double* %63, i64 5
store double 1.000000e+00, double* %64
%65 = load double*, double** %11
%66 = getelementptr inbounds double, double* %65, i64 10
store double 1.000000e+00, double* %66
%67 = load double*, double** %11
%68 = getelementptr inbounds double, double* %67, i64 15
store double 1.000000e+00, double* %68
store i32 -1, i32* %6
br label %203
69: ; preds = %5
%70 = load double, double* %23
%71 = fdiv double 1.000000e+00, %70
store double %71, double* %24
%72 = load double, double* %8
%73 = load double, double* %24
%74 = fmul double %72, %73
store double %74, double* %14
%75 = load double, double* %9
%76 = load double, double* %24
%77 = fmul double %75, %76
store double %77, double* %15
%78 = load double, double* %10
%79 = load double, double* %24
%80 = fmul double %78, %79
store double %80, double* %16
%81 = load double, double* %14
%82 = load double, double* %14
%83 = fmul double %81, %82
store double %83, double* %17
%84 = load double, double* %14
%85 = load double, double* %15
%86 = fmul double %84, %85
store double %86, double* %18
%87 = load double, double* %14
%88 = load double, double* %16
%89 = fmul double %87, %88
store double %89, double* %19
%90 = load double, double* %15
%91 = load double, double* %15
%92 = fmul double %90, %91
store double %92, double* %20
%93 = load double, double* %15
%94 = load double, double* %16
%95 = fmul double %93, %94
store double %95, double* %21
%96 = load double, double* %16
%97 = load double, double* %16
%98 = fmul double %96, %97
store double %98, double* %22
%99 = load double, double* %17
%100 = load double, double* %13
%101 = fadd double %99, %100
%102 = load double, double* %17
%103 = load double, double* %13
%104 = fneg double %102
%105 = call double @llvm.fmuladd.f64(double %104, double %103, double %101)
%106 = load double*, double** %11
%107 = getelementptr inbounds double, double* %106, i64 0
store double %105, double* %107
%108 = load double, double* %18
%109 = load double, double* %13
%110 = load double, double* %18
%111 = fneg double %109
%112 = call double @llvm.fmuladd.f64(double %111, double %110, double %108)
%113 = load double, double* %12
%114 = load double, double* %16
%115 = fneg double %113
%116 = call double @llvm.fmuladd.f64(double %115, double %114, double %112)
%117 = load double*, double** %11
%118 = getelementptr inbounds double, double* %117, i64 4
store double %116, double* %118
%119 = load double, double* %19
%120 = load double, double* %13
%121 = load double, double* %19
%122 = fneg double %120
%123 = call double @llvm.fmuladd.f64(double %122, double %121, double %119)
%124 = load double, double* %12
%125 = load double, double* %15
%126 = call double @llvm.fmuladd.f64(double %124, double %125, double %123)
%127 = load double*, double** %11
%128 = getelementptr inbounds double, double* %127, i64 8
store double %126, double* %128
%129 = load double*, double** %11
%130 = getelementptr inbounds double, double* %129, i64 12
store double 0.000000e+00, double* %130
%131 = load double, double* %18
%132 = load double, double* %13
%133 = load double, double* %18
%134 = fneg double %132
%135 = call double @llvm.fmuladd.f64(double %134, double %133, double %131)
%136 = load double, double* %12
%137 = load double, double* %16
%138 = call double @llvm.fmuladd.f64(double %136, double %137, double %135)
%139 = load double*, double** %11
%140 = getelementptr inbounds double, double* %139, i64 1
store double %138, double* %140
%141 = load double, double* %20
%142 = load double, double* %13
%143 = fadd double %141, %142
%144 = load double, double* %13
%145 = load double, double* %20
%146 = fneg double %144
%147 = call double @llvm.fmuladd.f64(double %146, double %145, double %143)
%148 = load double*, double** %11
%149 = getelementptr inbounds double, double* %148, i64 5
store double %147, double* %149
%150 = load double, double* %21
%151 = load double, double* %13
%152 = load double, double* %21
%153 = fneg double %151
%154 = call double @llvm.fmuladd.f64(double %153, double %152, double %150)
%155 = load double, double* %12
%156 = load double, double* %14
%157 = fneg double %155
%158 = call double @llvm.fmuladd.f64(double %157, double %156, double %154)
%159 = load double*, double** %11
%160 = getelementptr inbounds double, double* %159, i64 9
store double %158, double* %160
%161 = load double*, double** %11
%162 = getelementptr inbounds double, double* %161, i64 13
store double 0.000000e+00, double* %162
%163 = load double, double* %19
%164 = load double, double* %13
%165 = load double, double* %19
%166 = fneg double %164
%167 = call double @llvm.fmuladd.f64(double %166, double %165, double %163)
%168 = load double, double* %12
%169 = load double, double* %15
%170 = fneg double %168
%171 = call double @llvm.fmuladd.f64(double %170, double %169, double %167)
%172 = load double*, double** %11
%173 = getelementptr inbounds double, double* %172, i64 2
store double %171, double* %173
%174 = load double, double* %21
%175 = load double, double* %13
%176 = load double, double* %21
%177 = fneg double %175
%178 = call double @llvm.fmuladd.f64(double %177, double %176, double %174)
%179 = load double, double* %12
%180 = load double, double* %14
%181 = call double @llvm.fmuladd.f64(double %179, double %180, double %178)
%182 = load double*, double** %11
%183 = getelementptr inbounds double, double* %182, i64 6
store double %181, double* %183
%184 = load double, double* %22
%185 = load double, double* %13
%186 = fadd double %184, %185
%187 = load double, double* %13
%188 = load double, double* %22
%189 = fneg double %187
%190 = call double @llvm.fmuladd.f64(double %189, double %188, double %186)
%191 = load double*, double** %11
%192 = getelementptr inbounds double, double* %191, i64 10
store double %190, double* %192
%193 = load double*, double** %11
%194 = getelementptr inbounds double, double* %193, i64 14
store double 0.000000e+00, double* %194
%195 = load double*, double** %11
%196 = getelementptr inbounds double, double* %195, i64 3
store double 0.000000e+00, double* %196
%197 = load double*, double** %11
%198 = getelementptr inbounds double, double* %197, i64 7
store double 0.000000e+00, double* %198
%199 = load double*, double** %11
%200 = getelementptr inbounds double, double* %199, i64 11
store double 0.000000e+00, double* %200
%201 = load double*, double** %11
%202 = getelementptr inbounds double, double* %201, i64 15
store double 1.000000e+00, double* %202
store i32 0, i32* %6
br label %203
203: ; preds = %69, %60
%204 = load i32, i32* %6
ret i32 %204
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define i32 @matMakeRotMat(double %0, double %1, double %2, double %3, double* writeonly %4) {
%6 = load double, double* @M_PI
%7 = fmul double %6, %0
%8 = fdiv double %7, 1.800000e+02
%9 = tail call double @sin(double %8)
%10 = load double, double* @M_PI
%11 = fmul double %10, %0
%12 = fdiv double %11, 1.800000e+02
%13 = tail call double @cos(double %12)
%14 = fmul double %2, %2
%15 = tail call double @llvm.fmuladd.f64(double %1, double %1, double %14)
%16 = tail call double @llvm.fmuladd.f64(double %3, double %3, double %15)
%17 = tail call double @sqrt(double %16)
%18 = fcmp oeq double %17, 0.000000e+00
br i1 %18, label %19, label %22
19: ; preds = %5
%20 = getelementptr inbounds double, double* %4, i64 1
%21 = bitcast double* %20 to i8*
store double 1.000000e+00, double* %4
br label %84
22: ; preds = %5
%23 = fdiv double 1.000000e+00, %17
%24 = insertelement <2 x double> poison, double %23, i64 0
%25 = shufflevector <2 x double> %24, <2 x double> poison, <2 x i32> zeroinitializer
%26 = insertelement <2 x double> poison, double %2, i64 0
%27 = insertelement <2 x double> %26, double %1, i64 1
%28 = fmul <2 x double> %25, %27
%29 = extractelement <2 x double> %28, i64 1
%30 = fmul double %29, %29
%31 = extractelement <2 x double> %28, i64 0
%32 = fmul double %29, %31
%33 = shufflevector <2 x double> %24, <2 x double> %28, <2 x i32> <i32 0, i32 2>
%34 = insertelement <2 x double> poison, double %3, i64 0
%35 = shufflevector <2 x double> %34, <2 x double> %28, <2 x i32> <i32 0, i32 2>
%36 = fmul <2 x double> %33, %35
%37 = shufflevector <2 x double> %28, <2 x double> undef, <2 x i32> <i32 1, i32 0>
%38 = shufflevector <2 x double> %36, <2 x double> undef, <2 x i32> zeroinitializer
%39 = fmul <2 x double> %37, %38
%40 = fmul <2 x double> %36, %36
%41 = extractelement <2 x double> %40, i64 0
%42 = fadd double %13, %30
%43 = fneg double %30
%44 = insertelement <2 x double> poison, double %9, i64 0
%45 = insertelement <2 x double> %44, double %13, i64 1
%46 = fneg <2 x double> %45
%47 = extractelement <2 x double> %46, i64 1
%48 = tail call double @llvm.fmuladd.f64(double %47, double %32, double %32)
%49 = getelementptr inbounds double, double* %4, i64 4
%50 = getelementptr inbounds double, double* %4, i64 8
%51 = getelementptr inbounds double, double* %4, i64 12
%52 = insertelement <2 x double> poison, double %43, i64 0
%53 = insertelement <2 x double> %52, double %9, i64 1
%54 = insertelement <2 x double> poison, double %13, i64 0
%55 = shufflevector <2 x double> %54, <2 x double> %36, <2 x i32> <i32 0, i32 2>
%56 = insertelement <2 x double> poison, double %42, i64 0
%57 = insertelement <2 x double> %56, double %48, i64 1
%58 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %53, <2 x double> %55, <2 x double> %57)
%59 = bitcast double* %4 to <2 x double>*
store <2 x double> %58, <2 x double>* %59
%60 = extractelement <2 x double> %36, i64 1
%61 = fadd double %13, %60
%62 = insertelement <2 x double> poison, double %48, i64 0
%63 = insertelement <2 x double> %62, double %61, i64 1
%64 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %46, <2 x double> %36, <2 x double> %63)
%65 = bitcast double* %49 to <2 x double>*
store <2 x double> %64, <2 x double>* %65
%66 = shufflevector <2 x double> %46, <2 x double> undef, <2 x i32> <i32 1, i32 1>
%67 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %66, <2 x double> %39, <2 x double> %39)
%68 = extractelement <2 x double> %46, i64 0
%69 = shufflevector <2 x double> %44, <2 x double> %46, <2 x i32> <i32 0, i32 2>
%70 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %69, <2 x double> %28, <2 x double> %67)
%71 = bitcast double* %50 to <2 x double>*
store <2 x double> %70, <2 x double>* %71
%72 = bitcast double* %51 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %72
%73 = extractelement <2 x double> %67, i64 0
%74 = tail call double @llvm.fmuladd.f64(double %68, double %31, double %73)
%75 = getelementptr inbounds double, double* %4, i64 2
store double %74, double* %75
%76 = extractelement <2 x double> %67, i64 1
%77 = tail call double @llvm.fmuladd.f64(double %9, double %29, double %76)
%78 = getelementptr inbounds double, double* %4, i64 6
store double %77, double* %78
%79 = fadd double %13, %41
%80 = tail call double @llvm.fmuladd.f64(double %47, double %41, double %79)
%81 = getelementptr inbounds double, double* %4, i64 10
store double %80, double* %81
%82 = getelementptr inbounds double, double* %4, i64 14
store double 0.000000e+00, double* %82
%83 = getelementptr inbounds double, double* %4, i64 3
store double 0.000000e+00, double* %83
br label %84
84: ; preds = %22, %19
%85 = phi i64 [ 7, %22 ], [ 5, %19 ]
%86 = phi double [ 0.000000e+00, %22 ], [ 1.000000e+00, %19 ]
%87 = phi i64 [ 11, %22 ], [ 10, %19 ]
%88 = phi i32 [ 0, %22 ], [ -1, %19 ]
%89 = getelementptr inbounds double, double* %4, i64 %85
store double %86, double* %89
%90 = getelementptr inbounds double, double* %4, i64 %87
store double %86, double* %90
%91 = getelementptr inbounds double, double* %4, i64 15
store double 1.000000e+00, double* %91
ret i32 %88
}