#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 */
float M_PI;
float cosf(float);
float sinf(float);
void mtxRotateXApply(float *mtx, float deg) {
  float rad = deg * (M_PI / 180.0f);
  float cosrad = cosf(rad);
  float sinrad = sinf(rad);
  float mtx04 = mtx[4];
  float mtx05 = mtx[5];
  float mtx06 = mtx[6];
  float mtx07 = mtx[7];
  mtx[4] = mtx[8] * sinrad + mtx04 * cosrad;
  mtx[8] = mtx[8] * cosrad - mtx04 * sinrad;
  mtx[5] = mtx[9] * sinrad + mtx05 * cosrad;
  mtx[9] = mtx[9] * cosrad - mtx05 * sinrad;
  mtx[6] = mtx[10] * sinrad + mtx06 * cosrad;
  mtx[10] = mtx[10] * cosrad - mtx06 * sinrad;
  mtx[7] = mtx[11] * sinrad + mtx07 * cosrad;
  mtx[11] = mtx[11] * cosrad - mtx07 * sinrad;
}


x86 assembly (clang, -O0):
<mtxRotateXApply>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
mov    0x2eab(%rip),%rax
movss  (%rax),%xmm1
movss  0xeb7(%rip),%xmm2
divss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
call   1040 <cosf@plt>
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm0
call   1030 <sinf@plt>
movss  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movss  0x10(%rax),%xmm0
movss  %xmm0,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
movss  0x14(%rax),%xmm0
movss  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movss  0x18(%rax),%xmm0
movss  %xmm0,-0x24(%rbp)
mov    -0x8(%rbp),%rax
movss  0x1c(%rax),%xmm0
movss  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%rax
movss  0x20(%rax),%xmm0
movss  -0x18(%rbp),%xmm2
movss  -0x1c(%rbp),%xmm1
mulss  -0x14(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x10(%rax)
mov    -0x8(%rbp),%rax
movss  0x20(%rax),%xmm0
movss  -0x14(%rbp),%xmm2
movss  -0x1c(%rbp),%xmm1
mulss  -0x18(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x20(%rax)
mov    -0x8(%rbp),%rax
movss  0x24(%rax),%xmm0
movss  -0x18(%rbp),%xmm2
movss  -0x20(%rbp),%xmm1
mulss  -0x14(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x14(%rax)
mov    -0x8(%rbp),%rax
movss  0x24(%rax),%xmm0
movss  -0x14(%rbp),%xmm2
movss  -0x20(%rbp),%xmm1
mulss  -0x18(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x24(%rax)
mov    -0x8(%rbp),%rax
movss  0x28(%rax),%xmm0
movss  -0x18(%rbp),%xmm2
movss  -0x24(%rbp),%xmm1
mulss  -0x14(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x18(%rax)
mov    -0x8(%rbp),%rax
movss  0x28(%rax),%xmm0
movss  -0x14(%rbp),%xmm2
movss  -0x24(%rbp),%xmm1
mulss  -0x18(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x28(%rax)
mov    -0x8(%rbp),%rax
movss  0x2c(%rax),%xmm0
movss  -0x18(%rbp),%xmm2
movss  -0x28(%rbp),%xmm1
mulss  -0x14(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x1c(%rax)
mov    -0x8(%rbp),%rax
movss  0x2c(%rax),%xmm0
movss  -0x14(%rbp),%xmm2
movss  -0x28(%rbp),%xmm1
mulss  -0x18(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x2c(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mtxRotateXApply>:
push   %rbx
sub    $0x20,%rsp
mov    %rdi,%rbx
mov    0x2eb9(%rip),%rax
movss  (%rax),%xmm1
divss  0xec5(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,0xc(%rsp)
call   1040 <cosf@plt>
movaps %xmm0,0x10(%rsp)
movss  0xc(%rsp),%xmm0
call   1030 <sinf@plt>
movups 0x10(%rbx),%xmm1
movups 0x20(%rbx),%xmm2
movaps 0x10(%rsp),%xmm4
shufps $0x0,%xmm4,%xmm4
movaps %xmm4,%xmm3
mulps  %xmm1,%xmm3
shufps $0x0,%xmm0,%xmm0
mulps  %xmm2,%xmm4
mulps  %xmm0,%xmm2
addps  %xmm3,%xmm2
movups %xmm2,0x10(%rbx)
mulps  %xmm1,%xmm0
subps  %xmm0,%xmm4
movups %xmm4,0x20(%rbx)
add    $0x20,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@M_PI = global float 0.000000e+00
define void @mtxRotateXApply(float* nocapture %0, float %1) {
%3 = load float, float* @M_PI
%4 = fdiv float %3, 1.800000e+02
%5 = fmul float %4, %1
%6 = tail call float @cosf(float %5)
%7 = tail call float @sinf(float %5)
%8 = getelementptr inbounds float, float* %0, i64 4
%9 = bitcast float* %8 to <4 x float>*
%10 = load <4 x float>, <4 x float>* %9
%11 = getelementptr inbounds float, float* %0, i64 8
%12 = bitcast float* %11 to <4 x float>*
%13 = load <4 x float>, <4 x float>* %12
%14 = insertelement <4 x float> poison, float %6, i64 0
%15 = shufflevector <4 x float> %14, <4 x float> poison, <4 x i32> zeroinitializer
%16 = fmul <4 x float> %15, %10
%17 = insertelement <4 x float> poison, float %7, i64 0
%18 = shufflevector <4 x float> %17, <4 x float> poison, <4 x i32> zeroinitializer
%19 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %13, <4 x float> %18, <4 x float> %16)
%20 = bitcast float* %8 to <4 x float>*
store <4 x float> %19, <4 x float>* %20
%21 = fneg <4 x float> %10
%22 = fmul <4 x float> %18, %21
%23 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %13, <4 x float> %15, <4 x float> %22)
%24 = bitcast float* %11 to <4 x float>*
store <4 x float> %23, <4 x float>* %24
ret void
}