int MagellanRotationMatrix(Rotate, c, b, a)
double Rotate[4][4];
double c, b, a;
{
  double ca, cb, cc, sa, sb, sc;
  ca = cos(a);
  sa = sin(a);
  cb = cos(b);
  sb = sin(b);
  cc = cos(c);
  sc = sin(c);
  Rotate[0][0] = ca * cb;
  Rotate[1][0] = sa * cb;
  Rotate[2][0] = -sb;
  Rotate[0][1] = -sa * cc + ca * sc * sb;
  Rotate[1][1] = ca * cc + sa * sc * sb;
  Rotate[2][1] = cb * sc;
  Rotate[0][2] = sa * sc + ca * cc * sb;
  Rotate[1][2] = -ca * sc + sa * cc * sb;
  Rotate[2][2] = cb * cc;
  Rotate[0][3] = 0.0;
  Rotate[1][3] = 0.0;
  Rotate[2][3] = 0.0;
  Rotate[3][0] = 0.0;
  Rotate[3][1] = 0.0;
  Rotate[3][2] = 0.0;
  Rotate[3][3] = 1.0;
  return (1 == 1);
}


x86 assembly (clang, -O0):
<MagellanRotationMatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1040 <cos@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <cos@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <cos@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x28(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  -0x48(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x40(%rax)
movsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x38(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
mulsd  -0x48(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x28(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
mulsd  -0x48(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x28(%rax)
movsd  -0x30(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x48(%rax)
movsd  -0x40(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
mulsd  -0x48(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
mulsd  -0x48(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x30(%rax)
movsd  -0x30(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x50(%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
xorps  %xmm0,%xmm0
movsd  %xmm0,0x60(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x68(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x70(%rax)
mov    -0x8(%rbp),%rax
movsd  0xcd1(%rip),%xmm0
movsd  %xmm0,0x78(%rax)
mov    $0x1,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MagellanRotationMatrix>:
push   %rbx
sub    $0x60,%rsp
movsd  %xmm2,0x20(%rsp)
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
mov    %rdi,%rbx
movaps %xmm2,%xmm0
call   1040 <cos@plt>
movaps %xmm0,0x50(%rsp)
movsd  0x20(%rsp),%xmm0
call   1030 <sin@plt>
movaps %xmm0,0x20(%rsp)
movsd  0x10(%rsp),%xmm0
call   1040 <cos@plt>
movaps %xmm0,0x30(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <sin@plt>
movaps %xmm0,0x40(%rsp)
movsd  0x8(%rsp),%xmm0
call   1040 <cos@plt>
movaps %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <sin@plt>
movapd 0x50(%rsp),%xmm6
movapd %xmm6,%xmm1
movapd 0x30(%rsp),%xmm5
mulsd  %xmm5,%xmm1
movsd  %xmm1,(%rbx)
movapd 0x20(%rsp),%xmm4
movapd %xmm4,%xmm1
mulsd  %xmm5,%xmm1
movapd %xmm5,%xmm8
movsd  %xmm1,0x20(%rbx)
movapd 0xe36(%rip),%xmm2
movapd 0x40(%rsp),%xmm5
movapd %xmm5,%xmm1
xorpd  %xmm2,%xmm1
movlpd %xmm1,0x40(%rbx)
movapd %xmm4,%xmm3
movapd %xmm4,%xmm7
xorpd  %xmm2,%xmm3
movapd %xmm6,%xmm4
movapd %xmm6,%xmm9
unpcklpd %xmm6,%xmm4
movapd %xmm0,%xmm1
movapd 0x10(%rsp),%xmm6
unpcklpd %xmm6,%xmm1
mulpd  %xmm1,%xmm4
unpcklpd %xmm5,%xmm5
mulpd  %xmm5,%xmm4
unpcklpd %xmm7,%xmm3
unpcklpd %xmm0,%xmm6
mulpd  %xmm6,%xmm3
addpd  %xmm4,%xmm3
movupd %xmm3,0x8(%rbx)
movapd %xmm9,%xmm0
xorpd  %xmm9,%xmm2
movapd %xmm7,%xmm3
unpcklpd %xmm7,%xmm3
mulpd  %xmm1,%xmm3
mulpd  %xmm5,%xmm3
unpcklpd %xmm2,%xmm0
mulpd  %xmm6,%xmm0
addpd  %xmm3,%xmm0
movupd %xmm0,0x28(%rbx)
movapd %xmm8,%xmm0
unpcklpd %xmm8,%xmm0
mulpd  %xmm1,%xmm0
movupd %xmm0,0x48(%rbx)
movq   $0x0,0x18(%rbx)
movq   $0x0,0x38(%rbx)
xorpd  %xmm0,%xmm0
movupd %xmm0,0x58(%rbx)
movupd %xmm0,0x68(%rbx)
movabs $0x3ff0000000000000,%rax
mov    %rax,0x78(%rbx)
mov    $0x1,%eax
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @MagellanRotationMatrix([4 x double]* %0, double %1, double %2, double %3) {
%5 = alloca [4 x double]*
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
store [4 x double]* %0, [4 x double]** %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%15 = load double, double* %8
%16 = call double @cos(double %15)
store double %16, double* %9
%17 = load double, double* %8
%18 = call double @sin(double %17)
store double %18, double* %12
%19 = load double, double* %7
%20 = call double @cos(double %19)
store double %20, double* %10
%21 = load double, double* %7
%22 = call double @sin(double %21)
store double %22, double* %13
%23 = load double, double* %6
%24 = call double @cos(double %23)
store double %24, double* %11
%25 = load double, double* %6
%26 = call double @sin(double %25)
store double %26, double* %14
%27 = load double, double* %9
%28 = load double, double* %10
%29 = fmul double %27, %28
%30 = load [4 x double]*, [4 x double]** %5
%31 = getelementptr inbounds [4 x double], [4 x double]* %30, i64 0
%32 = getelementptr inbounds [4 x double], [4 x double]* %31, i64 0, i64 0
store double %29, double* %32
%33 = load double, double* %12
%34 = load double, double* %10
%35 = fmul double %33, %34
%36 = load [4 x double]*, [4 x double]** %5
%37 = getelementptr inbounds [4 x double], [4 x double]* %36, i64 1
%38 = getelementptr inbounds [4 x double], [4 x double]* %37, i64 0, i64 0
store double %35, double* %38
%39 = load double, double* %13
%40 = fneg double %39
%41 = load [4 x double]*, [4 x double]** %5
%42 = getelementptr inbounds [4 x double], [4 x double]* %41, i64 2
%43 = getelementptr inbounds [4 x double], [4 x double]* %42, i64 0, i64 0
store double %40, double* %43
%44 = load double, double* %12
%45 = fneg double %44
%46 = load double, double* %11
%47 = load double, double* %9
%48 = load double, double* %14
%49 = fmul double %47, %48
%50 = load double, double* %13
%51 = fmul double %49, %50
%52 = call double @llvm.fmuladd.f64(double %45, double %46, double %51)
%53 = load [4 x double]*, [4 x double]** %5
%54 = getelementptr inbounds [4 x double], [4 x double]* %53, i64 0
%55 = getelementptr inbounds [4 x double], [4 x double]* %54, i64 0, i64 1
store double %52, double* %55
%56 = load double, double* %9
%57 = load double, double* %11
%58 = load double, double* %12
%59 = load double, double* %14
%60 = fmul double %58, %59
%61 = load double, double* %13
%62 = fmul double %60, %61
%63 = call double @llvm.fmuladd.f64(double %56, double %57, double %62)
%64 = load [4 x double]*, [4 x double]** %5
%65 = getelementptr inbounds [4 x double], [4 x double]* %64, i64 1
%66 = getelementptr inbounds [4 x double], [4 x double]* %65, i64 0, i64 1
store double %63, double* %66
%67 = load double, double* %10
%68 = load double, double* %14
%69 = fmul double %67, %68
%70 = load [4 x double]*, [4 x double]** %5
%71 = getelementptr inbounds [4 x double], [4 x double]* %70, i64 2
%72 = getelementptr inbounds [4 x double], [4 x double]* %71, i64 0, i64 1
store double %69, double* %72
%73 = load double, double* %12
%74 = load double, double* %14
%75 = load double, double* %9
%76 = load double, double* %11
%77 = fmul double %75, %76
%78 = load double, double* %13
%79 = fmul double %77, %78
%80 = call double @llvm.fmuladd.f64(double %73, double %74, double %79)
%81 = load [4 x double]*, [4 x double]** %5
%82 = getelementptr inbounds [4 x double], [4 x double]* %81, i64 0
%83 = getelementptr inbounds [4 x double], [4 x double]* %82, i64 0, i64 2
store double %80, double* %83
%84 = load double, double* %9
%85 = fneg double %84
%86 = load double, double* %14
%87 = load double, double* %12
%88 = load double, double* %11
%89 = fmul double %87, %88
%90 = load double, double* %13
%91 = fmul double %89, %90
%92 = call double @llvm.fmuladd.f64(double %85, double %86, double %91)
%93 = load [4 x double]*, [4 x double]** %5
%94 = getelementptr inbounds [4 x double], [4 x double]* %93, i64 1
%95 = getelementptr inbounds [4 x double], [4 x double]* %94, i64 0, i64 2
store double %92, double* %95
%96 = load double, double* %10
%97 = load double, double* %11
%98 = fmul double %96, %97
%99 = load [4 x double]*, [4 x double]** %5
%100 = getelementptr inbounds [4 x double], [4 x double]* %99, i64 2
%101 = getelementptr inbounds [4 x double], [4 x double]* %100, i64 0, i64 2
store double %98, double* %101
%102 = load [4 x double]*, [4 x double]** %5
%103 = getelementptr inbounds [4 x double], [4 x double]* %102, i64 0
%104 = getelementptr inbounds [4 x double], [4 x double]* %103, i64 0, i64 3
store double 0.000000e+00, double* %104
%105 = load [4 x double]*, [4 x double]** %5
%106 = getelementptr inbounds [4 x double], [4 x double]* %105, i64 1
%107 = getelementptr inbounds [4 x double], [4 x double]* %106, i64 0, i64 3
store double 0.000000e+00, double* %107
%108 = load [4 x double]*, [4 x double]** %5
%109 = getelementptr inbounds [4 x double], [4 x double]* %108, i64 2
%110 = getelementptr inbounds [4 x double], [4 x double]* %109, i64 0, i64 3
store double 0.000000e+00, double* %110
%111 = load [4 x double]*, [4 x double]** %5
%112 = getelementptr inbounds [4 x double], [4 x double]* %111, i64 3
%113 = getelementptr inbounds [4 x double], [4 x double]* %112, i64 0, i64 0
store double 0.000000e+00, double* %113
%114 = load [4 x double]*, [4 x double]** %5
%115 = getelementptr inbounds [4 x double], [4 x double]* %114, i64 3
%116 = getelementptr inbounds [4 x double], [4 x double]* %115, i64 0, i64 1
store double 0.000000e+00, double* %116
%117 = load [4 x double]*, [4 x double]** %5
%118 = getelementptr inbounds [4 x double], [4 x double]* %117, i64 3
%119 = getelementptr inbounds [4 x double], [4 x double]* %118, i64 0, i64 2
store double 0.000000e+00, double* %119
%120 = load [4 x double]*, [4 x double]** %5
%121 = getelementptr inbounds [4 x double], [4 x double]* %120, i64 3
%122 = getelementptr inbounds [4 x double], [4 x double]* %121, i64 0, i64 3
store double 1.000000e+00, double* %122
ret i32 1
}

LLVM IR (-O2):
define i32 @MagellanRotationMatrix([4 x double]* nocapture writeonly %0, double %1, double %2, double %3) {
%5 = tail call double @cos(double %3)
%6 = tail call double @sin(double %3)
%7 = tail call double @cos(double %2)
%8 = tail call double @sin(double %2)
%9 = tail call double @cos(double %1)
%10 = tail call double @sin(double %1)
%11 = fmul double %5, %7
%12 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 0, i64 0
store double %11, double* %12
%13 = fmul double %6, %7
%14 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 1, i64 0
store double %13, double* %14
%15 = fneg double %8
%16 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 2, i64 0
store double %15, double* %16
%17 = fneg double %6
%18 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 0, i64 1
%19 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 1, i64 1
%20 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 2, i64 1
%21 = insertelement <2 x double> poison, double %5, i64 0
%22 = shufflevector <2 x double> %21, <2 x double> poison, <2 x i32> zeroinitializer
%23 = insertelement <2 x double> poison, double %10, i64 0
%24 = insertelement <2 x double> %23, double %9, i64 1
%25 = fmul <2 x double> %22, %24
%26 = insertelement <2 x double> poison, double %8, i64 0
%27 = shufflevector <2 x double> %26, <2 x double> poison, <2 x i32> zeroinitializer
%28 = fmul <2 x double> %27, %25
%29 = insertelement <2 x double> poison, double %17, i64 0
%30 = insertelement <2 x double> %29, double %6, i64 1
%31 = insertelement <2 x double> poison, double %9, i64 0
%32 = insertelement <2 x double> %31, double %10, i64 1
%33 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %30, <2 x double> %32, <2 x double> %28)
%34 = bitcast double* %18 to <2 x double>*
store <2 x double> %33, <2 x double>* %34
%35 = fneg double %5
%36 = insertelement <2 x double> poison, double %6, i64 0
%37 = shufflevector <2 x double> %36, <2 x double> poison, <2 x i32> zeroinitializer
%38 = fmul <2 x double> %37, %24
%39 = fmul <2 x double> %27, %38
%40 = insertelement <2 x double> %21, double %35, i64 1
%41 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %40, <2 x double> %32, <2 x double> %39)
%42 = bitcast double* %19 to <2 x double>*
store <2 x double> %41, <2 x double>* %42
%43 = insertelement <2 x double> poison, double %7, i64 0
%44 = shufflevector <2 x double> %43, <2 x double> poison, <2 x i32> zeroinitializer
%45 = fmul <2 x double> %44, %24
%46 = bitcast double* %20 to <2 x double>*
store <2 x double> %45, <2 x double>* %46
%47 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 0, i64 3
store double 0.000000e+00, double* %47
%48 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 1, i64 3
store double 0.000000e+00, double* %48
%49 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 2, i64 3
%50 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 3, i64 3
%51 = bitcast double* %49 to i8*
store double 1.000000e+00, double* %50
ret i32 1
}