#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 cos(double);
double glmRadd(double);
double sin(double);
void glmGenerateAxisAngleRotationMatrix4dDeg(double m[16], const double axis[3],
                                             double angle) {
  double rcos, rsin;
  angle = glmRadd(angle);
  rcos = cos(angle);
  rsin = sin(angle);
  m[0] = rcos + axis[0] * axis[0] * (1.0 - rcos);
  m[4] = axis[2] * rsin + axis[1] * axis[0] * (1.0 - rcos);
  m[8] = -axis[1] * rsin + axis[2] * axis[0] * (1.0 - rcos);
  m[12] = 0;
  m[1] = -axis[2] * rsin + axis[0] * axis[1] * (1.0 - rcos);
  m[5] = rcos + axis[1] * axis[1] * (1.0 - rcos);
  m[9] = axis[0] * rsin + axis[2] * axis[1] * (1.0 - rcos);
  m[13] = 0;
  m[2] = axis[1] * rsin + axis[0] * axis[2] * (1.0 - rcos);
  m[6] = -axis[0] * rsin + axis[1] * axis[2] * (1.0 - rcos);
  m[10] = rcos + axis[2] * axis[2] * (1.0 - rcos);
  m[14] = 0;
  m[3] = 0;
  m[7] = 0;
  m[11] = 0;
  m[15] = 1;
}


x86 assembly (clang, -O0):
<glmGenerateAxisAngleRotationMatrix4dDeg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <glmRadd@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1050 <cos@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  0xe71(%rip),%xmm2
subsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  -0x28(%rbp),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  (%rax),%xmm1
movsd  0xe35(%rip),%xmm3
subsd  -0x20(%rbp),%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x20(%rax)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x28(%rbp),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  (%rax),%xmm1
movsd  0xddd(%rip),%xmm3
subsd  -0x20(%rbp),%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x40(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x60(%rax)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x28(%rbp),%xmm2
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm1
movsd  0xd79(%rip),%xmm3
subsd  -0x20(%rbp),%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x20(%rbp),%xmm1
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm0
movsd  0xd40(%rip),%xmm2
subsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x28(%rax)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x28(%rbp),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm1
movsd  0xd03(%rip),%xmm3
subsd  -0x20(%rbp),%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x48(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x68(%rax)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  -0x28(%rbp),%xmm2
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x10(%rax),%xmm1
movsd  0xcb6(%rip),%xmm3
subsd  -0x20(%rbp),%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x28(%rbp),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x10(%rax),%xmm1
movsd  0xc5e(%rip),%xmm3
subsd  -0x20(%rbp),%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x30(%rax)
movsd  -0x20(%rbp),%xmm1
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x10(%rax),%xmm0
movsd  0xc25(%rip),%xmm2
subsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x50(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x70(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x18(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x38(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x58(%rax)
mov    -0x8(%rbp),%rax
movsd  0xbd3(%rip),%xmm0
movsd  %xmm0,0x78(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmGenerateAxisAngleRotationMatrix4dDeg>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
mov    %rdi,%r14
call   1030 <glmRadd@plt>
movsd  %xmm0,0x8(%rsp)
call   1050 <cos@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1040 <sin@plt>
movsd  (%rbx),%xmm3
mulsd  %xmm3,%xmm3
movsd  0xe92(%rip),%xmm2
movapd %xmm2,%xmm1
movsd  0x10(%rsp),%xmm5
subsd  %xmm5,%xmm1
mulsd  %xmm1,%xmm3
addsd  %xmm5,%xmm3
movsd  %xmm3,(%r14)
movsd  0x8(%rbx),%xmm3
mulsd  (%rbx),%xmm3
mulsd  %xmm1,%xmm3
movsd  0x10(%rbx),%xmm4
mulsd  %xmm0,%xmm4
addsd  %xmm3,%xmm4
movsd  %xmm4,0x20(%r14)
movsd  0x10(%rbx),%xmm3
mulsd  (%rbx),%xmm3
mulsd  %xmm1,%xmm3
movsd  0x8(%rbx),%xmm4
mulsd  %xmm0,%xmm4
subsd  %xmm4,%xmm3
movsd  %xmm3,0x40(%r14)
movq   $0x0,0x60(%r14)
movsd  (%rbx),%xmm3
mulsd  0x8(%rbx),%xmm3
mulsd  %xmm1,%xmm3
movsd  0x10(%rbx),%xmm4
mulsd  %xmm0,%xmm4
subsd  %xmm4,%xmm3
movsd  %xmm3,0x8(%r14)
movsd  0x8(%rbx),%xmm3
mulsd  %xmm3,%xmm3
mulsd  %xmm1,%xmm3
addsd  %xmm5,%xmm3
movsd  %xmm3,0x28(%r14)
movsd  0x10(%rbx),%xmm3
mulsd  0x8(%rbx),%xmm3
xorpd  %xmm4,%xmm4
unpcklpd %xmm2,%xmm4
mulsd  %xmm1,%xmm3
movsd  (%rbx),%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm3,%xmm2
movsd  %xmm2,0x48(%r14)
movq   $0x0,0x68(%r14)
movsd  (%rbx),%xmm2
mulsd  0x10(%rbx),%xmm2
mulsd  %xmm1,%xmm2
movsd  0x8(%rbx),%xmm3
mulsd  %xmm0,%xmm3
addsd  %xmm2,%xmm3
movsd  %xmm3,0x10(%r14)
movsd  0x8(%rbx),%xmm2
mulsd  0x10(%rbx),%xmm2
mulsd  (%rbx),%xmm0
mulsd  %xmm1,%xmm2
subsd  %xmm0,%xmm2
movsd  %xmm2,0x30(%r14)
movsd  0x10(%rbx),%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm0
addsd  %xmm5,%xmm0
movsd  %xmm0,0x50(%r14)
movq   $0x0,0x18(%r14)
movq   $0x0,0x38(%r14)
movq   $0x0,0x58(%r14)
movupd %xmm4,0x70(%r14)
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @glmGenerateAxisAngleRotationMatrix4dDeg(double* %0, double* %1, double %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double* %0, double** %4
store double* %1, double** %5
store double %2, double* %6
%9 = load double, double* %6
%10 = call double @glmRadd(double %9)
store double %10, double* %6
%11 = load double, double* %6
%12 = call double @cos(double %11)
store double %12, double* %7
%13 = load double, double* %6
%14 = call double @sin(double %13)
store double %14, double* %8
%15 = load double, double* %7
%16 = load double*, double** %5
%17 = getelementptr inbounds double, double* %16, i64 0
%18 = load double, double* %17
%19 = load double*, double** %5
%20 = getelementptr inbounds double, double* %19, i64 0
%21 = load double, double* %20
%22 = fmul double %18, %21
%23 = load double, double* %7
%24 = fsub double 1.000000e+00, %23
%25 = call double @llvm.fmuladd.f64(double %22, double %24, double %15)
%26 = load double*, double** %4
%27 = getelementptr inbounds double, double* %26, i64 0
store double %25, double* %27
%28 = load double*, double** %5
%29 = getelementptr inbounds double, double* %28, i64 2
%30 = load double, double* %29
%31 = load double, double* %8
%32 = load double*, double** %5
%33 = getelementptr inbounds double, double* %32, i64 1
%34 = load double, double* %33
%35 = load double*, double** %5
%36 = getelementptr inbounds double, double* %35, i64 0
%37 = load double, double* %36
%38 = fmul double %34, %37
%39 = load double, double* %7
%40 = fsub double 1.000000e+00, %39
%41 = fmul double %38, %40
%42 = call double @llvm.fmuladd.f64(double %30, double %31, double %41)
%43 = load double*, double** %4
%44 = getelementptr inbounds double, double* %43, i64 4
store double %42, double* %44
%45 = load double*, double** %5
%46 = getelementptr inbounds double, double* %45, i64 1
%47 = load double, double* %46
%48 = fneg double %47
%49 = load double, double* %8
%50 = load double*, double** %5
%51 = getelementptr inbounds double, double* %50, i64 2
%52 = load double, double* %51
%53 = load double*, double** %5
%54 = getelementptr inbounds double, double* %53, i64 0
%55 = load double, double* %54
%56 = fmul double %52, %55
%57 = load double, double* %7
%58 = fsub double 1.000000e+00, %57
%59 = fmul double %56, %58
%60 = call double @llvm.fmuladd.f64(double %48, double %49, double %59)
%61 = load double*, double** %4
%62 = getelementptr inbounds double, double* %61, i64 8
store double %60, double* %62
%63 = load double*, double** %4
%64 = getelementptr inbounds double, double* %63, i64 12
store double 0.000000e+00, double* %64
%65 = load double*, double** %5
%66 = getelementptr inbounds double, double* %65, i64 2
%67 = load double, double* %66
%68 = fneg double %67
%69 = load double, double* %8
%70 = load double*, double** %5
%71 = getelementptr inbounds double, double* %70, i64 0
%72 = load double, double* %71
%73 = load double*, double** %5
%74 = getelementptr inbounds double, double* %73, i64 1
%75 = load double, double* %74
%76 = fmul double %72, %75
%77 = load double, double* %7
%78 = fsub double 1.000000e+00, %77
%79 = fmul double %76, %78
%80 = call double @llvm.fmuladd.f64(double %68, double %69, double %79)
%81 = load double*, double** %4
%82 = getelementptr inbounds double, double* %81, i64 1
store double %80, double* %82
%83 = load double, double* %7
%84 = load double*, double** %5
%85 = getelementptr inbounds double, double* %84, i64 1
%86 = load double, double* %85
%87 = load double*, double** %5
%88 = getelementptr inbounds double, double* %87, i64 1
%89 = load double, double* %88
%90 = fmul double %86, %89
%91 = load double, double* %7
%92 = fsub double 1.000000e+00, %91
%93 = call double @llvm.fmuladd.f64(double %90, double %92, double %83)
%94 = load double*, double** %4
%95 = getelementptr inbounds double, double* %94, i64 5
store double %93, double* %95
%96 = load double*, double** %5
%97 = getelementptr inbounds double, double* %96, i64 0
%98 = load double, double* %97
%99 = load double, double* %8
%100 = load double*, double** %5
%101 = getelementptr inbounds double, double* %100, i64 2
%102 = load double, double* %101
%103 = load double*, double** %5
%104 = getelementptr inbounds double, double* %103, i64 1
%105 = load double, double* %104
%106 = fmul double %102, %105
%107 = load double, double* %7
%108 = fsub double 1.000000e+00, %107
%109 = fmul double %106, %108
%110 = call double @llvm.fmuladd.f64(double %98, double %99, double %109)
%111 = load double*, double** %4
%112 = getelementptr inbounds double, double* %111, i64 9
store double %110, double* %112
%113 = load double*, double** %4
%114 = getelementptr inbounds double, double* %113, i64 13
store double 0.000000e+00, double* %114
%115 = load double*, double** %5
%116 = getelementptr inbounds double, double* %115, i64 1
%117 = load double, double* %116
%118 = load double, double* %8
%119 = load double*, double** %5
%120 = getelementptr inbounds double, double* %119, i64 0
%121 = load double, double* %120
%122 = load double*, double** %5
%123 = getelementptr inbounds double, double* %122, i64 2
%124 = load double, double* %123
%125 = fmul double %121, %124
%126 = load double, double* %7
%127 = fsub double 1.000000e+00, %126
%128 = fmul double %125, %127
%129 = call double @llvm.fmuladd.f64(double %117, double %118, double %128)
%130 = load double*, double** %4
%131 = getelementptr inbounds double, double* %130, i64 2
store double %129, double* %131
%132 = load double*, double** %5
%133 = getelementptr inbounds double, double* %132, i64 0
%134 = load double, double* %133
%135 = fneg double %134
%136 = load double, double* %8
%137 = load double*, double** %5
%138 = getelementptr inbounds double, double* %137, i64 1
%139 = load double, double* %138
%140 = load double*, double** %5
%141 = getelementptr inbounds double, double* %140, i64 2
%142 = load double, double* %141
%143 = fmul double %139, %142
%144 = load double, double* %7
%145 = fsub double 1.000000e+00, %144
%146 = fmul double %143, %145
%147 = call double @llvm.fmuladd.f64(double %135, double %136, double %146)
%148 = load double*, double** %4
%149 = getelementptr inbounds double, double* %148, i64 6
store double %147, double* %149
%150 = load double, double* %7
%151 = load double*, double** %5
%152 = getelementptr inbounds double, double* %151, i64 2
%153 = load double, double* %152
%154 = load double*, double** %5
%155 = getelementptr inbounds double, double* %154, i64 2
%156 = load double, double* %155
%157 = fmul double %153, %156
%158 = load double, double* %7
%159 = fsub double 1.000000e+00, %158
%160 = call double @llvm.fmuladd.f64(double %157, double %159, double %150)
%161 = load double*, double** %4
%162 = getelementptr inbounds double, double* %161, i64 10
store double %160, double* %162
%163 = load double*, double** %4
%164 = getelementptr inbounds double, double* %163, i64 14
store double 0.000000e+00, double* %164
%165 = load double*, double** %4
%166 = getelementptr inbounds double, double* %165, i64 3
store double 0.000000e+00, double* %166
%167 = load double*, double** %4
%168 = getelementptr inbounds double, double* %167, i64 7
store double 0.000000e+00, double* %168
%169 = load double*, double** %4
%170 = getelementptr inbounds double, double* %169, i64 11
store double 0.000000e+00, double* %170
%171 = load double*, double** %4
%172 = getelementptr inbounds double, double* %171, i64 15
store double 1.000000e+00, double* %172
ret void
}

LLVM IR (-O2):
define void @glmGenerateAxisAngleRotationMatrix4dDeg(double* nocapture writeonly %0, double* nocapture %1, double %2) {
%4 = tail call double @glmRadd(double %2)
%5 = tail call double @cos(double %4)
%6 = tail call double @sin(double %4)
%7 = load double, double* %1
%8 = fmul double %7, %7
%9 = fsub double 1.000000e+00, %5
%10 = tail call double @llvm.fmuladd.f64(double %8, double %9, double %5)
store double %10, double* %0
%11 = getelementptr inbounds double, double* %1, i64 2
%12 = load double, double* %11
%13 = getelementptr inbounds double, double* %1, i64 1
%14 = load double, double* %13
%15 = load double, double* %1
%16 = fmul double %14, %15
%17 = fmul double %9, %16
%18 = tail call double @llvm.fmuladd.f64(double %12, double %6, double %17)
%19 = getelementptr inbounds double, double* %0, i64 4
store double %18, double* %19
%20 = load double, double* %13
%21 = fneg double %20
%22 = load double, double* %11
%23 = load double, double* %1
%24 = fmul double %22, %23
%25 = fmul double %9, %24
%26 = tail call double @llvm.fmuladd.f64(double %21, double %6, double %25)
%27 = getelementptr inbounds double, double* %0, i64 8
store double %26, double* %27
%28 = getelementptr inbounds double, double* %0, i64 12
store double 0.000000e+00, double* %28
%29 = load double, double* %11
%30 = fneg double %29
%31 = load double, double* %1
%32 = load double, double* %13
%33 = fmul double %31, %32
%34 = fmul double %9, %33
%35 = tail call double @llvm.fmuladd.f64(double %30, double %6, double %34)
%36 = getelementptr inbounds double, double* %0, i64 1
store double %35, double* %36
%37 = load double, double* %13
%38 = fmul double %37, %37
%39 = tail call double @llvm.fmuladd.f64(double %38, double %9, double %5)
%40 = getelementptr inbounds double, double* %0, i64 5
store double %39, double* %40
%41 = load double, double* %1
%42 = load double, double* %11
%43 = load double, double* %13
%44 = fmul double %42, %43
%45 = fmul double %9, %44
%46 = tail call double @llvm.fmuladd.f64(double %41, double %6, double %45)
%47 = getelementptr inbounds double, double* %0, i64 9
store double %46, double* %47
%48 = getelementptr inbounds double, double* %0, i64 13
store double 0.000000e+00, double* %48
%49 = load double, double* %13
%50 = load double, double* %1
%51 = load double, double* %11
%52 = fmul double %50, %51
%53 = fmul double %9, %52
%54 = tail call double @llvm.fmuladd.f64(double %49, double %6, double %53)
%55 = getelementptr inbounds double, double* %0, i64 2
store double %54, double* %55
%56 = load double, double* %1
%57 = fneg double %56
%58 = load double, double* %13
%59 = load double, double* %11
%60 = fmul double %58, %59
%61 = fmul double %9, %60
%62 = tail call double @llvm.fmuladd.f64(double %57, double %6, double %61)
%63 = getelementptr inbounds double, double* %0, i64 6
store double %62, double* %63
%64 = load double, double* %11
%65 = fmul double %64, %64
%66 = tail call double @llvm.fmuladd.f64(double %65, double %9, double %5)
%67 = getelementptr inbounds double, double* %0, i64 10
store double %66, double* %67
%68 = getelementptr inbounds double, double* %0, i64 14
%69 = getelementptr inbounds double, double* %0, i64 3
store double 0.000000e+00, double* %69
%70 = getelementptr inbounds double, double* %0, i64 7
store double 0.000000e+00, double* %70
%71 = getelementptr inbounds double, double* %0, i64 11
store double 0.000000e+00, double* %71
%72 = bitcast double* %68 to <2 x double>*
store <2 x double> <double 0.000000e+00, double 1.000000e+00>, <2 x double>* %72
ret void
}