#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 sin(double);
void glmGenerateAxisAngleRotationMatrix4dRad(double m[16], const double axis[3],
                                             double angle) {
  double rcos, rsin;
  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):
<glmGenerateAxisAngleRotationMatrix4dRad>:
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   1040 <cos@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <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  0xe90(%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  0xe54(%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  0xdfc(%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  0xd98(%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  0xd5f(%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  0xd22(%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  0xcd5(%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  0xc7d(%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  0xc44(%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  0xbf2(%rip),%xmm0
movsd  %xmm0,0x78(%rax)
add    $0x30,%rsp
pop    %rbp
ret

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

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