#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 glmGenerateAxisAngleRotationMatrix3dDeg(double m[9], 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.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):
<glmGenerateAxisAngleRotationMatrix3dDeg>:
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,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  0xddd(%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  0xd85(%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  0xd4c(%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  0xd0f(%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  0xcce(%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  0xc76(%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  0xc3d(%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):
<glmGenerateAxisAngleRotationMatrix3dDeg>:
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),%xmm2
mulsd  %xmm2,%xmm2
movsd  0xe92(%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 @glmGenerateAxisAngleRotationMatrix3dDeg(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 3
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 6
store double %60, 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 4
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 7
store double %108, double* %110
%111 = load double*, double** %5
%112 = getelementptr inbounds double, double* %111, i64 1
%113 = load double, double* %112
%114 = load double, double* %8
%115 = load double*, double** %5
%116 = getelementptr inbounds double, double* %115, i64 0
%117 = load double, double* %116
%118 = load double*, double** %5
%119 = getelementptr inbounds double, double* %118, i64 2
%120 = load double, double* %119
%121 = fmul double %117, %120
%122 = load double, double* %7
%123 = fsub double 1.000000e+00, %122
%124 = fmul double %121, %123
%125 = call double @llvm.fmuladd.f64(double %113, double %114, double %124)
%126 = load double*, double** %4
%127 = getelementptr inbounds double, double* %126, i64 2
store double %125, double* %127
%128 = load double*, double** %5
%129 = getelementptr inbounds double, double* %128, i64 0
%130 = load double, double* %129
%131 = fneg double %130
%132 = load double, double* %8
%133 = load double*, double** %5
%134 = getelementptr inbounds double, double* %133, i64 1
%135 = load double, double* %134
%136 = load double*, double** %5
%137 = getelementptr inbounds double, double* %136, i64 2
%138 = load double, double* %137
%139 = fmul double %135, %138
%140 = load double, double* %7
%141 = fsub double 1.000000e+00, %140
%142 = fmul double %139, %141
%143 = call double @llvm.fmuladd.f64(double %131, double %132, double %142)
%144 = load double*, double** %4
%145 = getelementptr inbounds double, double* %144, i64 5
store double %143, double* %145
%146 = load double, double* %7
%147 = load double*, double** %5
%148 = getelementptr inbounds double, double* %147, i64 2
%149 = load double, double* %148
%150 = load double*, double** %5
%151 = getelementptr inbounds double, double* %150, i64 2
%152 = load double, double* %151
%153 = fmul double %149, %152
%154 = load double, double* %7
%155 = fsub double 1.000000e+00, %154
%156 = call double @llvm.fmuladd.f64(double %153, double %155, double %146)
%157 = load double*, double** %4
%158 = getelementptr inbounds double, double* %157, i64 8
store double %156, double* %158
ret void
}

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