#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 glmGenerateAxisAngleRotationMatrix3dRad(double m[9], const double axis[3],
                                             double angle) {
  double rcos, rsin;
  rcos = cos(angle);
  rsin = sin(angle);
  m[0] = rcos + axis[0] * axis[0] * (1.0f - rcos);
  m[3] = axis[2] * rsin + axis[1] * axis[0] * (1.0f - rcos);
  m[6] = -axis[1] * rsin + axis[2] * axis[0] * (1.0f - rcos);
  m[1] = -axis[2] * rsin + axis[0] * axis[1] * (1.0f - rcos);
  m[4] = rcos + axis[1] * axis[1] * (1.0f - rcos);
  m[7] = axis[0] * rsin + axis[2] * axis[1] * (1.0f - rcos);
  m[2] = axis[1] * rsin + axis[0] * axis[2] * (1.0f - rcos);
  m[5] = -axis[0] * rsin + axis[1] * axis[2] * (1.0f - rcos);
  m[8] = rcos + axis[2] * axis[2] * (1.0f - rcos);
}


x86 assembly (clang, -O0):
<glmGenerateAxisAngleRotationMatrix3dRad>:
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,0x18(%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,0x30(%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  0xda4(%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  0xd6b(%rip),%xmm2
subsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x20(%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  0xd2e(%rip),%xmm3
subsd  -0x20(%rbp),%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x38(%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  0xced(%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  0xc95(%rip),%xmm3
subsd  -0x20(%rbp),%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x28(%rax)
movsd  -0x20(%rbp),%xmm1
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x10(%rax),%xmm0
movsd  0xc5c(%rip),%xmm2
subsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x40(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmGenerateAxisAngleRotationMatrix3dRad>:
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),%xmm2
mulsd  %xmm2,%xmm2
movsd  0xea7(%rip),%xmm1
movsd  0x10(%rsp),%xmm4
subsd  %xmm4,%xmm1
mulsd  %xmm1,%xmm2
addsd  %xmm4,%xmm2
movsd  %xmm2,(%r14)
movsd  0x8(%rbx),%xmm2
mulsd  (%rbx),%xmm2
mulsd  %xmm1,%xmm2
movsd  0x10(%rbx),%xmm3
mulsd  %xmm0,%xmm3
addsd  %xmm2,%xmm3
movsd  %xmm3,0x18(%r14)
movsd  0x10(%rbx),%xmm2
mulsd  (%rbx),%xmm2
mulsd  %xmm1,%xmm2
movsd  0x8(%rbx),%xmm3
mulsd  %xmm0,%xmm3
subsd  %xmm3,%xmm2
movsd  %xmm2,0x30(%r14)
movsd  (%rbx),%xmm2
mulsd  0x8(%rbx),%xmm2
mulsd  %xmm1,%xmm2
movsd  0x10(%rbx),%xmm3
mulsd  %xmm0,%xmm3
subsd  %xmm3,%xmm2
movsd  %xmm2,0x8(%r14)
movsd  0x8(%rbx),%xmm2
mulsd  %xmm2,%xmm2
mulsd  %xmm1,%xmm2
addsd  %xmm4,%xmm2
movsd  %xmm2,0x20(%r14)
movsd  0x10(%rbx),%xmm2
mulsd  0x8(%rbx),%xmm2
mulsd  %xmm1,%xmm2
movsd  (%rbx),%xmm3
mulsd  %xmm0,%xmm3
addsd  %xmm2,%xmm3
movsd  %xmm3,0x38(%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,0x28(%r14)
movsd  0x10(%rbx),%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm0
addsd  %xmm4,%xmm0
movsd  %xmm0,0x40(%r14)
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @glmGenerateAxisAngleRotationMatrix3dRad(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 3
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 6
store double %58, double* %60
%61 = load double*, double** %5
%62 = getelementptr inbounds double, double* %61, i64 2
%63 = load double, double* %62
%64 = fneg double %63
%65 = load double, double* %8
%66 = load double*, double** %5
%67 = getelementptr inbounds double, double* %66, i64 0
%68 = load double, double* %67
%69 = load double*, double** %5
%70 = getelementptr inbounds double, double* %69, i64 1
%71 = load double, double* %70
%72 = fmul double %68, %71
%73 = load double, double* %7
%74 = fsub double 1.000000e+00, %73
%75 = fmul double %72, %74
%76 = call double @llvm.fmuladd.f64(double %64, double %65, double %75)
%77 = load double*, double** %4
%78 = getelementptr inbounds double, double* %77, i64 1
store double %76, double* %78
%79 = load double, double* %7
%80 = load double*, double** %5
%81 = getelementptr inbounds double, double* %80, i64 1
%82 = load double, double* %81
%83 = load double*, double** %5
%84 = getelementptr inbounds double, double* %83, i64 1
%85 = load double, double* %84
%86 = fmul double %82, %85
%87 = load double, double* %7
%88 = fsub double 1.000000e+00, %87
%89 = call double @llvm.fmuladd.f64(double %86, double %88, double %79)
%90 = load double*, double** %4
%91 = getelementptr inbounds double, double* %90, i64 4
store double %89, double* %91
%92 = load double*, double** %5
%93 = getelementptr inbounds double, double* %92, i64 0
%94 = load double, double* %93
%95 = load double, double* %8
%96 = load double*, double** %5
%97 = getelementptr inbounds double, double* %96, i64 2
%98 = load double, double* %97
%99 = load double*, double** %5
%100 = getelementptr inbounds double, double* %99, i64 1
%101 = load double, double* %100
%102 = fmul double %98, %101
%103 = load double, double* %7
%104 = fsub double 1.000000e+00, %103
%105 = fmul double %102, %104
%106 = call double @llvm.fmuladd.f64(double %94, double %95, double %105)
%107 = load double*, double** %4
%108 = getelementptr inbounds double, double* %107, i64 7
store double %106, double* %108
%109 = load double*, double** %5
%110 = getelementptr inbounds double, double* %109, i64 1
%111 = load double, double* %110
%112 = load double, double* %8
%113 = load double*, double** %5
%114 = getelementptr inbounds double, double* %113, i64 0
%115 = load double, double* %114
%116 = load double*, double** %5
%117 = getelementptr inbounds double, double* %116, i64 2
%118 = load double, double* %117
%119 = fmul double %115, %118
%120 = load double, double* %7
%121 = fsub double 1.000000e+00, %120
%122 = fmul double %119, %121
%123 = call double @llvm.fmuladd.f64(double %111, double %112, double %122)
%124 = load double*, double** %4
%125 = getelementptr inbounds double, double* %124, i64 2
store double %123, double* %125
%126 = load double*, double** %5
%127 = getelementptr inbounds double, double* %126, i64 0
%128 = load double, double* %127
%129 = fneg double %128
%130 = load double, double* %8
%131 = load double*, double** %5
%132 = getelementptr inbounds double, double* %131, i64 1
%133 = load double, double* %132
%134 = load double*, double** %5
%135 = getelementptr inbounds double, double* %134, i64 2
%136 = load double, double* %135
%137 = fmul double %133, %136
%138 = load double, double* %7
%139 = fsub double 1.000000e+00, %138
%140 = fmul double %137, %139
%141 = call double @llvm.fmuladd.f64(double %129, double %130, double %140)
%142 = load double*, double** %4
%143 = getelementptr inbounds double, double* %142, i64 5
store double %141, double* %143
%144 = load double, double* %7
%145 = load double*, double** %5
%146 = getelementptr inbounds double, double* %145, i64 2
%147 = load double, double* %146
%148 = load double*, double** %5
%149 = getelementptr inbounds double, double* %148, i64 2
%150 = load double, double* %149
%151 = fmul double %147, %150
%152 = load double, double* %7
%153 = fsub double 1.000000e+00, %152
%154 = call double @llvm.fmuladd.f64(double %151, double %153, double %144)
%155 = load double*, double** %4
%156 = getelementptr inbounds double, double* %155, i64 8
store double %154, double* %156
ret void
}

LLVM IR (-O2):
define void @glmGenerateAxisAngleRotationMatrix3dRad(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 3
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 6
store double %25, double* %26
%27 = load double, double* %10
%28 = fneg double %27
%29 = load double, double* %1
%30 = load double, double* %12
%31 = fmul double %29, %30
%32 = fmul double %8, %31
%33 = tail call double @llvm.fmuladd.f64(double %28, double %5, double %32)
%34 = getelementptr inbounds double, double* %0, i64 1
store double %33, double* %34
%35 = load double, double* %12
%36 = fmul double %35, %35
%37 = tail call double @llvm.fmuladd.f64(double %36, double %8, double %4)
%38 = getelementptr inbounds double, double* %0, i64 4
store double %37, double* %38
%39 = load double, double* %1
%40 = load double, double* %10
%41 = load double, double* %12
%42 = fmul double %40, %41
%43 = fmul double %8, %42
%44 = tail call double @llvm.fmuladd.f64(double %39, double %5, double %43)
%45 = getelementptr inbounds double, double* %0, i64 7
store double %44, double* %45
%46 = load double, double* %12
%47 = load double, double* %1
%48 = load double, double* %10
%49 = fmul double %47, %48
%50 = fmul double %8, %49
%51 = tail call double @llvm.fmuladd.f64(double %46, double %5, double %50)
%52 = getelementptr inbounds double, double* %0, i64 2
store double %51, double* %52
%53 = load double, double* %1
%54 = fneg double %53
%55 = load double, double* %12
%56 = load double, double* %10
%57 = fmul double %55, %56
%58 = fmul double %8, %57
%59 = tail call double @llvm.fmuladd.f64(double %54, double %5, double %58)
%60 = getelementptr inbounds double, double* %0, i64 5
store double %59, double* %60
%61 = load double, double* %10
%62 = fmul double %61, %61
%63 = tail call double @llvm.fmuladd.f64(double %62, double %8, double %4)
%64 = getelementptr inbounds double, double* %0, i64 8
store double %63, double* %64
ret void
}