#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 cos(float const);
int /*<<< orphan*/ math_matrix_copy(float *, float *);
float sin(float const);
void math_matrix_rotate(float *matrix, const float x, const float y,
                        const float z) {
  float cache[16];
  float cosine;
  float sine;
  math_matrix_copy(matrix, cache);
  cosine = cos(x);
  sine = sin(x);
  matrix[4] = cache[4] * cosine + cache[8] * sine;
  matrix[5] = cache[5] * cosine + cache[9] * sine;
  matrix[6] = cache[6] * cosine + cache[10] * sine;
  matrix[7] = cache[7] * cosine + cache[11] * sine;
  matrix[8] = cache[8] * cosine - cache[4] * sine;
  matrix[9] = cache[9] * cosine - cache[5] * sine;
  matrix[10] = cache[10] * cosine - cache[6] * sine;
  matrix[11] = cache[11] * cosine - cache[7] * sine;
  math_matrix_copy(matrix, cache);
  cosine = cos(y);
  sine = sin(y);
  matrix[0] = cache[0] * cosine - cache[8] * sine;
  matrix[1] = cache[1] * cosine - cache[9] * sine;
  matrix[2] = cache[2] * cosine - cache[10] * sine;
  matrix[3] = cache[3] * cosine - cache[11] * sine;
  matrix[8] = cache[8] * cosine + cache[0] * sine;
  matrix[9] = cache[9] * cosine + cache[1] * sine;
  matrix[10] = cache[10] * cosine + cache[2] * sine;
  matrix[11] = cache[11] * cosine + cache[3] * sine;
  math_matrix_copy(matrix, cache);
  cosine = cos(z);
  sine = sin(z);
  matrix[0] = cache[0] * cosine + cache[4] * sine;
  matrix[1] = cache[1] * cosine + cache[5] * sine;
  matrix[2] = cache[2] * cosine + cache[6] * sine;
  matrix[3] = cache[3] * cosine + cache[7] * sine;
  matrix[4] = cache[4] * cosine - cache[0] * sine;
  matrix[5] = cache[5] * cosine - cache[1] * sine;
  matrix[6] = cache[6] * cosine - cache[2] * sine;
  matrix[7] = cache[7] * cosine - cache[3] * sine;
}


x86 assembly (clang, -O0):
<math_matrix_rotate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
movss  %xmm2,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x60(%rbp),%rsi
call   1030 <math_matrix_copy@plt>
movss  -0xc(%rbp),%xmm0
call   1050 <cos@plt>
movss  %xmm0,-0x64(%rbp)
movss  -0xc(%rbp),%xmm0
call   1040 <sin@plt>
movss  %xmm0,-0x68(%rbp)
movss  -0x50(%rbp),%xmm0
movss  -0x64(%rbp),%xmm2
movss  -0x40(%rbp),%xmm1
mulss  -0x68(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x10(%rax)
movss  -0x4c(%rbp),%xmm0
movss  -0x64(%rbp),%xmm2
movss  -0x3c(%rbp),%xmm1
mulss  -0x68(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x14(%rax)
movss  -0x48(%rbp),%xmm0
movss  -0x64(%rbp),%xmm2
movss  -0x38(%rbp),%xmm1
mulss  -0x68(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x18(%rax)
movss  -0x44(%rbp),%xmm0
movss  -0x64(%rbp),%xmm2
movss  -0x34(%rbp),%xmm1
mulss  -0x68(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x1c(%rax)
movss  -0x40(%rbp),%xmm0
movss  -0x64(%rbp),%xmm2
movss  -0x50(%rbp),%xmm1
mulss  -0x68(%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)
movss  -0x3c(%rbp),%xmm0
movss  -0x64(%rbp),%xmm2
movss  -0x4c(%rbp),%xmm1
mulss  -0x68(%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)
movss  -0x38(%rbp),%xmm0
movss  -0x64(%rbp),%xmm2
movss  -0x48(%rbp),%xmm1
mulss  -0x68(%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)
movss  -0x34(%rbp),%xmm0
movss  -0x64(%rbp),%xmm2
movss  -0x44(%rbp),%xmm1
mulss  -0x68(%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)
mov    -0x8(%rbp),%rdi
lea    -0x60(%rbp),%rsi
call   1030 <math_matrix_copy@plt>
movss  -0x10(%rbp),%xmm0
call   1050 <cos@plt>
movss  %xmm0,-0x64(%rbp)
movss  -0x10(%rbp),%xmm0
call   1040 <sin@plt>
movss  %xmm0,-0x68(%rbp)
movss  -0x60(%rbp),%xmm0
movss  -0x64(%rbp),%xmm2
movss  -0x40(%rbp),%xmm1
mulss  -0x68(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x5c(%rbp),%xmm0
movss  -0x64(%rbp),%xmm2
movss  -0x3c(%rbp),%xmm1
mulss  -0x68(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
movss  -0x58(%rbp),%xmm0
movss  -0x64(%rbp),%xmm2
movss  -0x38(%rbp),%xmm1
mulss  -0x68(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
movss  -0x54(%rbp),%xmm0
movss  -0x64(%rbp),%xmm2
movss  -0x34(%rbp),%xmm1
mulss  -0x68(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0xc(%rax)
movss  -0x40(%rbp),%xmm0
movss  -0x64(%rbp),%xmm2
movss  -0x60(%rbp),%xmm1
mulss  -0x68(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x20(%rax)
movss  -0x3c(%rbp),%xmm0
movss  -0x64(%rbp),%xmm2
movss  -0x5c(%rbp),%xmm1
mulss  -0x68(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x24(%rax)
movss  -0x38(%rbp),%xmm0
movss  -0x64(%rbp),%xmm2
movss  -0x58(%rbp),%xmm1
mulss  -0x68(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x28(%rax)
movss  -0x34(%rbp),%xmm0
movss  -0x64(%rbp),%xmm2
movss  -0x54(%rbp),%xmm1
mulss  -0x68(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x2c(%rax)
mov    -0x8(%rbp),%rdi
lea    -0x60(%rbp),%rsi
call   1030 <math_matrix_copy@plt>
movss  -0x14(%rbp),%xmm0
call   1050 <cos@plt>
movss  %xmm0,-0x64(%rbp)
movss  -0x14(%rbp),%xmm0
call   1040 <sin@plt>
movss  %xmm0,-0x68(%rbp)
movss  -0x60(%rbp),%xmm0
movss  -0x64(%rbp),%xmm2
movss  -0x50(%rbp),%xmm1
mulss  -0x68(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x5c(%rbp),%xmm0
movss  -0x64(%rbp),%xmm2
movss  -0x4c(%rbp),%xmm1
mulss  -0x68(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
movss  -0x58(%rbp),%xmm0
movss  -0x64(%rbp),%xmm2
movss  -0x48(%rbp),%xmm1
mulss  -0x68(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
movss  -0x54(%rbp),%xmm0
movss  -0x64(%rbp),%xmm2
movss  -0x44(%rbp),%xmm1
mulss  -0x68(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0xc(%rax)
movss  -0x50(%rbp),%xmm0
movss  -0x64(%rbp),%xmm2
movss  -0x60(%rbp),%xmm1
mulss  -0x68(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x10(%rax)
movss  -0x4c(%rbp),%xmm0
movss  -0x64(%rbp),%xmm2
movss  -0x5c(%rbp),%xmm1
mulss  -0x68(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x14(%rax)
movss  -0x48(%rbp),%xmm0
movss  -0x64(%rbp),%xmm2
movss  -0x58(%rbp),%xmm1
mulss  -0x68(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x18(%rax)
movss  -0x44(%rbp),%xmm0
movss  -0x64(%rbp),%xmm2
movss  -0x54(%rbp),%xmm1
mulss  -0x68(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x1c(%rax)
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<math_matrix_rotate>:
push   %r14
push   %rbx
sub    $0x88,%rsp
movss  %xmm2,0xc(%rsp)
movss  %xmm1,0x20(%rsp)
movss  %xmm0,0x10(%rsp)
mov    %rdi,%rbx
lea    0x40(%rsp),%r14
mov    %r14,%rsi
call   1030 <math_matrix_copy@plt>
movss  0x10(%rsp),%xmm0
call   1050 <cos@plt>
movaps %xmm0,0x30(%rsp)
movss  0x10(%rsp),%xmm0
call   1040 <sin@plt>
movaps 0x50(%rsp),%xmm1
movaps 0x60(%rsp),%xmm2
shufps $0x0,%xmm0,%xmm0
movaps %xmm0,%xmm3
mulps  %xmm2,%xmm3
movaps 0x30(%rsp),%xmm4
shufps $0x0,%xmm4,%xmm4
mulps  %xmm1,%xmm0
mulps  %xmm4,%xmm1
addps  %xmm3,%xmm1
movups %xmm1,0x10(%rbx)
mulps  %xmm2,%xmm4
subps  %xmm0,%xmm4
movups %xmm4,0x20(%rbx)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <math_matrix_copy@plt>
movss  0x20(%rsp),%xmm0
call   1050 <cos@plt>
movaps %xmm0,0x10(%rsp)
movss  0x20(%rsp),%xmm0
call   1040 <sin@plt>
movaps 0x40(%rsp),%xmm1
movaps 0x60(%rsp),%xmm2
shufps $0x0,%xmm0,%xmm0
movaps %xmm0,%xmm3
mulps  %xmm2,%xmm3
movaps 0x10(%rsp),%xmm4
shufps $0x0,%xmm4,%xmm4
mulps  %xmm1,%xmm0
mulps  %xmm4,%xmm1
subps  %xmm3,%xmm1
movups %xmm1,(%rbx)
mulps  %xmm2,%xmm4
addps  %xmm0,%xmm4
movups %xmm4,0x20(%rbx)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <math_matrix_copy@plt>
movss  0xc(%rsp),%xmm0
call   1050 <cos@plt>
movaps %xmm0,0x20(%rsp)
movss  0xc(%rsp),%xmm0
call   1040 <sin@plt>
movaps 0x40(%rsp),%xmm1
movaps 0x50(%rsp),%xmm2
shufps $0x0,%xmm0,%xmm0
movaps %xmm0,%xmm3
mulps  %xmm2,%xmm3
movaps 0x20(%rsp),%xmm4
shufps $0x0,%xmm4,%xmm4
mulps  %xmm1,%xmm0
mulps  %xmm4,%xmm1
addps  %xmm3,%xmm1
movups %xmm1,(%rbx)
mulps  %xmm2,%xmm4
subps  %xmm0,%xmm4
movups %xmm4,0x10(%rbx)
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @math_matrix_rotate(float* %0, float %1, float %2, float %3) {
%5 = alloca float*
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca [16 x float]
%10 = alloca float
%11 = alloca float
store float* %0, float** %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%12 = load float*, float** %5
%13 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 0
%14 = call i32 @math_matrix_copy(float* %12, float* %13)
%15 = load float, float* %6
%16 = call float @cos(float %15)
store float %16, float* %10
%17 = load float, float* %6
%18 = call float @sin(float %17)
store float %18, float* %11
%19 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 4
%20 = load float, float* %19
%21 = load float, float* %10
%22 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 8
%23 = load float, float* %22
%24 = load float, float* %11
%25 = fmul float %23, %24
%26 = call float @llvm.fmuladd.f32(float %20, float %21, float %25)
%27 = load float*, float** %5
%28 = getelementptr inbounds float, float* %27, i64 4
store float %26, float* %28
%29 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 5
%30 = load float, float* %29
%31 = load float, float* %10
%32 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 9
%33 = load float, float* %32
%34 = load float, float* %11
%35 = fmul float %33, %34
%36 = call float @llvm.fmuladd.f32(float %30, float %31, float %35)
%37 = load float*, float** %5
%38 = getelementptr inbounds float, float* %37, i64 5
store float %36, float* %38
%39 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 6
%40 = load float, float* %39
%41 = load float, float* %10
%42 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 10
%43 = load float, float* %42
%44 = load float, float* %11
%45 = fmul float %43, %44
%46 = call float @llvm.fmuladd.f32(float %40, float %41, float %45)
%47 = load float*, float** %5
%48 = getelementptr inbounds float, float* %47, i64 6
store float %46, float* %48
%49 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 7
%50 = load float, float* %49
%51 = load float, float* %10
%52 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 11
%53 = load float, float* %52
%54 = load float, float* %11
%55 = fmul float %53, %54
%56 = call float @llvm.fmuladd.f32(float %50, float %51, float %55)
%57 = load float*, float** %5
%58 = getelementptr inbounds float, float* %57, i64 7
store float %56, float* %58
%59 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 8
%60 = load float, float* %59
%61 = load float, float* %10
%62 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 4
%63 = load float, float* %62
%64 = load float, float* %11
%65 = fmul float %63, %64
%66 = fneg float %65
%67 = call float @llvm.fmuladd.f32(float %60, float %61, float %66)
%68 = load float*, float** %5
%69 = getelementptr inbounds float, float* %68, i64 8
store float %67, float* %69
%70 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 9
%71 = load float, float* %70
%72 = load float, float* %10
%73 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 5
%74 = load float, float* %73
%75 = load float, float* %11
%76 = fmul float %74, %75
%77 = fneg float %76
%78 = call float @llvm.fmuladd.f32(float %71, float %72, float %77)
%79 = load float*, float** %5
%80 = getelementptr inbounds float, float* %79, i64 9
store float %78, float* %80
%81 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 10
%82 = load float, float* %81
%83 = load float, float* %10
%84 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 6
%85 = load float, float* %84
%86 = load float, float* %11
%87 = fmul float %85, %86
%88 = fneg float %87
%89 = call float @llvm.fmuladd.f32(float %82, float %83, float %88)
%90 = load float*, float** %5
%91 = getelementptr inbounds float, float* %90, i64 10
store float %89, float* %91
%92 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 11
%93 = load float, float* %92
%94 = load float, float* %10
%95 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 7
%96 = load float, float* %95
%97 = load float, float* %11
%98 = fmul float %96, %97
%99 = fneg float %98
%100 = call float @llvm.fmuladd.f32(float %93, float %94, float %99)
%101 = load float*, float** %5
%102 = getelementptr inbounds float, float* %101, i64 11
store float %100, float* %102
%103 = load float*, float** %5
%104 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 0
%105 = call i32 @math_matrix_copy(float* %103, float* %104)
%106 = load float, float* %7
%107 = call float @cos(float %106)
store float %107, float* %10
%108 = load float, float* %7
%109 = call float @sin(float %108)
store float %109, float* %11
%110 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 0
%111 = load float, float* %110
%112 = load float, float* %10
%113 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 8
%114 = load float, float* %113
%115 = load float, float* %11
%116 = fmul float %114, %115
%117 = fneg float %116
%118 = call float @llvm.fmuladd.f32(float %111, float %112, float %117)
%119 = load float*, float** %5
%120 = getelementptr inbounds float, float* %119, i64 0
store float %118, float* %120
%121 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 1
%122 = load float, float* %121
%123 = load float, float* %10
%124 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 9
%125 = load float, float* %124
%126 = load float, float* %11
%127 = fmul float %125, %126
%128 = fneg float %127
%129 = call float @llvm.fmuladd.f32(float %122, float %123, float %128)
%130 = load float*, float** %5
%131 = getelementptr inbounds float, float* %130, i64 1
store float %129, float* %131
%132 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 2
%133 = load float, float* %132
%134 = load float, float* %10
%135 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 10
%136 = load float, float* %135
%137 = load float, float* %11
%138 = fmul float %136, %137
%139 = fneg float %138
%140 = call float @llvm.fmuladd.f32(float %133, float %134, float %139)
%141 = load float*, float** %5
%142 = getelementptr inbounds float, float* %141, i64 2
store float %140, float* %142
%143 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 3
%144 = load float, float* %143
%145 = load float, float* %10
%146 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 11
%147 = load float, float* %146
%148 = load float, float* %11
%149 = fmul float %147, %148
%150 = fneg float %149
%151 = call float @llvm.fmuladd.f32(float %144, float %145, float %150)
%152 = load float*, float** %5
%153 = getelementptr inbounds float, float* %152, i64 3
store float %151, float* %153
%154 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 8
%155 = load float, float* %154
%156 = load float, float* %10
%157 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 0
%158 = load float, float* %157
%159 = load float, float* %11
%160 = fmul float %158, %159
%161 = call float @llvm.fmuladd.f32(float %155, float %156, float %160)
%162 = load float*, float** %5
%163 = getelementptr inbounds float, float* %162, i64 8
store float %161, float* %163
%164 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 9
%165 = load float, float* %164
%166 = load float, float* %10
%167 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 1
%168 = load float, float* %167
%169 = load float, float* %11
%170 = fmul float %168, %169
%171 = call float @llvm.fmuladd.f32(float %165, float %166, float %170)
%172 = load float*, float** %5
%173 = getelementptr inbounds float, float* %172, i64 9
store float %171, float* %173
%174 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 10
%175 = load float, float* %174
%176 = load float, float* %10
%177 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 2
%178 = load float, float* %177
%179 = load float, float* %11
%180 = fmul float %178, %179
%181 = call float @llvm.fmuladd.f32(float %175, float %176, float %180)
%182 = load float*, float** %5
%183 = getelementptr inbounds float, float* %182, i64 10
store float %181, float* %183
%184 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 11
%185 = load float, float* %184
%186 = load float, float* %10
%187 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 3
%188 = load float, float* %187
%189 = load float, float* %11
%190 = fmul float %188, %189
%191 = call float @llvm.fmuladd.f32(float %185, float %186, float %190)
%192 = load float*, float** %5
%193 = getelementptr inbounds float, float* %192, i64 11
store float %191, float* %193
%194 = load float*, float** %5
%195 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 0
%196 = call i32 @math_matrix_copy(float* %194, float* %195)
%197 = load float, float* %8
%198 = call float @cos(float %197)
store float %198, float* %10
%199 = load float, float* %8
%200 = call float @sin(float %199)
store float %200, float* %11
%201 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 0
%202 = load float, float* %201
%203 = load float, float* %10
%204 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 4
%205 = load float, float* %204
%206 = load float, float* %11
%207 = fmul float %205, %206
%208 = call float @llvm.fmuladd.f32(float %202, float %203, float %207)
%209 = load float*, float** %5
%210 = getelementptr inbounds float, float* %209, i64 0
store float %208, float* %210
%211 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 1
%212 = load float, float* %211
%213 = load float, float* %10
%214 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 5
%215 = load float, float* %214
%216 = load float, float* %11
%217 = fmul float %215, %216
%218 = call float @llvm.fmuladd.f32(float %212, float %213, float %217)
%219 = load float*, float** %5
%220 = getelementptr inbounds float, float* %219, i64 1
store float %218, float* %220
%221 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 2
%222 = load float, float* %221
%223 = load float, float* %10
%224 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 6
%225 = load float, float* %224
%226 = load float, float* %11
%227 = fmul float %225, %226
%228 = call float @llvm.fmuladd.f32(float %222, float %223, float %227)
%229 = load float*, float** %5
%230 = getelementptr inbounds float, float* %229, i64 2
store float %228, float* %230
%231 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 3
%232 = load float, float* %231
%233 = load float, float* %10
%234 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 7
%235 = load float, float* %234
%236 = load float, float* %11
%237 = fmul float %235, %236
%238 = call float @llvm.fmuladd.f32(float %232, float %233, float %237)
%239 = load float*, float** %5
%240 = getelementptr inbounds float, float* %239, i64 3
store float %238, float* %240
%241 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 4
%242 = load float, float* %241
%243 = load float, float* %10
%244 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 0
%245 = load float, float* %244
%246 = load float, float* %11
%247 = fmul float %245, %246
%248 = fneg float %247
%249 = call float @llvm.fmuladd.f32(float %242, float %243, float %248)
%250 = load float*, float** %5
%251 = getelementptr inbounds float, float* %250, i64 4
store float %249, float* %251
%252 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 5
%253 = load float, float* %252
%254 = load float, float* %10
%255 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 1
%256 = load float, float* %255
%257 = load float, float* %11
%258 = fmul float %256, %257
%259 = fneg float %258
%260 = call float @llvm.fmuladd.f32(float %253, float %254, float %259)
%261 = load float*, float** %5
%262 = getelementptr inbounds float, float* %261, i64 5
store float %260, float* %262
%263 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 6
%264 = load float, float* %263
%265 = load float, float* %10
%266 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 2
%267 = load float, float* %266
%268 = load float, float* %11
%269 = fmul float %267, %268
%270 = fneg float %269
%271 = call float @llvm.fmuladd.f32(float %264, float %265, float %270)
%272 = load float*, float** %5
%273 = getelementptr inbounds float, float* %272, i64 6
store float %271, float* %273
%274 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 7
%275 = load float, float* %274
%276 = load float, float* %10
%277 = getelementptr inbounds [16 x float], [16 x float]* %9, i64 0, i64 3
%278 = load float, float* %277
%279 = load float, float* %11
%280 = fmul float %278, %279
%281 = fneg float %280
%282 = call float @llvm.fmuladd.f32(float %275, float %276, float %281)
%283 = load float*, float** %5
%284 = getelementptr inbounds float, float* %283, i64 7
store float %282, float* %284
ret void
}

LLVM IR (-O2):
define void @math_matrix_rotate(float* %0, float %1, float %2, float %3) {
%5 = alloca [16 x float]
%6 = bitcast [16 x float]* %5 to i8*
%7 = getelementptr inbounds [16 x float], [16 x float]* %5, i64 0, i64 0
%8 = call i32 @math_matrix_copy(float* %0, float* %7)
%9 = call float @cos(float %1)
%10 = call float @sin(float %1)
%11 = getelementptr inbounds [16 x float], [16 x float]* %5, i64 0, i64 4
%12 = getelementptr inbounds [16 x float], [16 x float]* %5, i64 0, i64 8
%13 = bitcast float* %12 to <4 x float>*
%14 = load <4 x float>, <4 x float>* %13
%15 = bitcast float* %11 to <4 x float>*
%16 = load <4 x float>, <4 x float>* %15
%17 = getelementptr inbounds float, float* %0, i64 4
%18 = insertelement <4 x float> poison, float %10, i64 0
%19 = shufflevector <4 x float> %18, <4 x float> poison, <4 x i32> zeroinitializer
%20 = fmul <4 x float> %19, %14
%21 = insertelement <4 x float> poison, float %9, i64 0
%22 = shufflevector <4 x float> %21, <4 x float> poison, <4 x i32> zeroinitializer
%23 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %16, <4 x float> %22, <4 x float> %20)
%24 = bitcast float* %17 to <4 x float>*
store <4 x float> %23, <4 x float>* %24
%25 = getelementptr inbounds float, float* %0, i64 8
%26 = fneg <4 x float> %16
%27 = fmul <4 x float> %19, %26
%28 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %14, <4 x float> %22, <4 x float> %27)
%29 = bitcast float* %25 to <4 x float>*
store <4 x float> %28, <4 x float>* %29
%30 = call i32 @math_matrix_copy(float* %0, float* %7)
%31 = call float @cos(float %2)
%32 = call float @sin(float %2)
%33 = bitcast [16 x float]* %5 to <4 x float>*
%34 = load <4 x float>, <4 x float>* %33
%35 = bitcast float* %12 to <4 x float>*
%36 = load <4 x float>, <4 x float>* %35
%37 = fneg <4 x float> %36
%38 = insertelement <4 x float> poison, float %32, i64 0
%39 = shufflevector <4 x float> %38, <4 x float> poison, <4 x i32> zeroinitializer
%40 = fmul <4 x float> %39, %37
%41 = insertelement <4 x float> poison, float %31, i64 0
%42 = shufflevector <4 x float> %41, <4 x float> poison, <4 x i32> zeroinitializer
%43 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %34, <4 x float> %42, <4 x float> %40)
%44 = bitcast float* %0 to <4 x float>*
store <4 x float> %43, <4 x float>* %44
%45 = fmul <4 x float> %39, %34
%46 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %36, <4 x float> %42, <4 x float> %45)
%47 = bitcast float* %25 to <4 x float>*
store <4 x float> %46, <4 x float>* %47
%48 = call i32 @math_matrix_copy(float* %0, float* %7)
%49 = call float @cos(float %3)
%50 = call float @sin(float %3)
%51 = bitcast [16 x float]* %5 to <4 x float>*
%52 = load <4 x float>, <4 x float>* %51
%53 = bitcast float* %11 to <4 x float>*
%54 = load <4 x float>, <4 x float>* %53
%55 = insertelement <4 x float> poison, float %50, i64 0
%56 = shufflevector <4 x float> %55, <4 x float> poison, <4 x i32> zeroinitializer
%57 = fmul <4 x float> %56, %54
%58 = insertelement <4 x float> poison, float %49, i64 0
%59 = shufflevector <4 x float> %58, <4 x float> poison, <4 x i32> zeroinitializer
%60 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %52, <4 x float> %59, <4 x float> %57)
%61 = bitcast float* %0 to <4 x float>*
store <4 x float> %60, <4 x float>* %61
%62 = fneg <4 x float> %52
%63 = fmul <4 x float> %56, %62
%64 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %54, <4 x float> %59, <4 x float> %63)
%65 = bitcast float* %17 to <4 x float>*
store <4 x float> %64, <4 x float>* %65
ret void
}