#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);
int /*<<< orphan*/ mtxRotateXApply(float *, float);
int /*<<< orphan*/ mtxRotateYApply(float *, float);
int /*<<< orphan*/ mtxRotateZApply(float *, float);
float sinf(float);
float sqrtf(float);
void mtxRotateApply(float *mtx, float deg, float xAxis, float yAxis,
                    float zAxis) {
  if (yAxis == 0.0f && zAxis == 0.0f) {
    mtxRotateXApply(mtx, deg);
  } else if (xAxis == 0.0f && zAxis == 0.0f) {
    mtxRotateYApply(mtx, deg);
  } else if (xAxis == 0.0f && yAxis == 0.0f) {
    mtxRotateZApply(mtx, deg);
  } else {
    float rad = deg * M_PI / 180.0f;
    float sin_a = sinf(rad);
    float cos_a = cosf(rad);
    float magnitude = sqrtf(xAxis * xAxis + yAxis * yAxis + zAxis * zAxis);
    float p = 1.0f / magnitude;
    float cos_am = 1.0f - cos_a;
    float xp = xAxis * p;
    float yp = yAxis * p;
    float zp = zAxis * p;
    float xx = xp * xp;
    float yy = yp * yp;
    float zz = zp * zp;
    float xy = xp * yp * cos_am;
    float yz = yp * zp * cos_am;
    float zx = zp * xp * cos_am;
    xp *= sin_a;
    yp *= sin_a;
    zp *= sin_a;
    float m0 = xx + cos_a * (1.0f - xx);
    float m1 = xy + zp;
    float m2 = zx - yp;
    float m4 = xy - zp;
    float m5 = yy + cos_a * (1.0f - yy);
    float m6 = yz + xp;
    float m8 = zx + yp;
    float m9 = yz - xp;
    float m10 = zz + cos_a * (1.0f - zz);
    float c1 = mtx[0];
    float c2 = mtx[4];
    float c3 = mtx[8];
    mtx[0] = c1 * m0 + c2 * m1 + c3 * m2;
    mtx[4] = c1 * m4 + c2 * m5 + c3 * m6;
    mtx[8] = c1 * m8 + c2 * m9 + c3 * m10;
    c1 = mtx[1];
    c2 = mtx[5];
    c3 = mtx[9];
    mtx[1] = c1 * m0 + c2 * m1 + c3 * m2;
    mtx[5] = c1 * m4 + c2 * m5 + c3 * m6;
    mtx[9] = c1 * m8 + c2 * m9 + c3 * m10;
    c1 = mtx[2];
    c2 = mtx[6];
    c3 = mtx[10];
    mtx[2] = c1 * m0 + c2 * m1 + c3 * m2;
    mtx[6] = c1 * m4 + c2 * m5 + c3 * m6;
    mtx[10] = c1 * m8 + c2 * m9 + c3 * m10;
    c1 = mtx[3];
    c2 = mtx[7];
    c3 = mtx[11];
    mtx[3] = c1 * m0 + c2 * m1 + c3 * m2;
    mtx[7] = c1 * m4 + c2 * m5 + c3 * m6;
    mtx[11] = c1 * m8 + c2 * m9 + c3 * m10;
  }
}


x86 assembly (clang, -O0):
<mtxRotateApply>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
movss  %xmm2,-0x14(%rbp)
movss  %xmm3,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    11c4 <mtxRotateApply+0x64>
jp     11c4 <mtxRotateApply+0x64>
movss  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    11c4 <mtxRotateApply+0x64>
jp     11c4 <mtxRotateApply+0x64>
mov    -0x8(%rbp),%rdi
movss  -0xc(%rbp),%xmm0
call   1040 <mtxRotateXApply@plt>
jmp    17de <mtxRotateApply+0x67e>
movss  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1205 <mtxRotateApply+0xa5>
jp     1205 <mtxRotateApply+0xa5>
movss  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1205 <mtxRotateApply+0xa5>
jp     1205 <mtxRotateApply+0xa5>
mov    -0x8(%rbp),%rdi
movss  -0xc(%rbp),%xmm0
call   1080 <mtxRotateYApply@plt>
jmp    17d9 <mtxRotateApply+0x679>
movss  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1246 <mtxRotateApply+0xe6>
jp     1246 <mtxRotateApply+0xe6>
movss  -0x14(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1246 <mtxRotateApply+0xe6>
jp     1246 <mtxRotateApply+0xe6>
mov    -0x8(%rbp),%rdi
movss  -0xc(%rbp),%xmm0
call   1060 <mtxRotateZApply@plt>
jmp    17d4 <mtxRotateApply+0x674>
movss  -0xc(%rbp),%xmm0
mov    0x2d96(%rip),%rax
mulss  (%rax),%xmm0
movss  0xda6(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
call   1030 <sinf@plt>
movss  %xmm0,-0x20(%rbp)
movss  -0x1c(%rbp),%xmm0
call   1050 <cosf@plt>
movss  %xmm0,-0x24(%rbp)
movss  -0x10(%rbp),%xmm1
movss  -0x10(%rbp),%xmm2
movss  -0x14(%rbp),%xmm0
mulss  -0x14(%rbp),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x18(%rbp),%xmm0
movss  -0x18(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1070 <sqrtf@plt>
movss  %xmm0,-0x28(%rbp)
movss  0xd3b(%rip),%xmm0
divss  -0x28(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  0xd29(%rip),%xmm0
subss  -0x24(%rbp),%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x10(%rbp),%xmm0
mulss  -0x2c(%rbp),%xmm0
movss  %xmm0,-0x34(%rbp)
movss  -0x14(%rbp),%xmm0
mulss  -0x2c(%rbp),%xmm0
movss  %xmm0,-0x38(%rbp)
movss  -0x18(%rbp),%xmm0
mulss  -0x2c(%rbp),%xmm0
movss  %xmm0,-0x3c(%rbp)
movss  -0x34(%rbp),%xmm0
mulss  -0x34(%rbp),%xmm0
movss  %xmm0,-0x40(%rbp)
movss  -0x38(%rbp),%xmm0
mulss  -0x38(%rbp),%xmm0
movss  %xmm0,-0x44(%rbp)
movss  -0x3c(%rbp),%xmm0
mulss  -0x3c(%rbp),%xmm0
movss  %xmm0,-0x48(%rbp)
movss  -0x34(%rbp),%xmm0
mulss  -0x38(%rbp),%xmm0
mulss  -0x30(%rbp),%xmm0
movss  %xmm0,-0x4c(%rbp)
movss  -0x38(%rbp),%xmm0
mulss  -0x3c(%rbp),%xmm0
mulss  -0x30(%rbp),%xmm0
movss  %xmm0,-0x50(%rbp)
movss  -0x3c(%rbp),%xmm0
mulss  -0x34(%rbp),%xmm0
mulss  -0x30(%rbp),%xmm0
movss  %xmm0,-0x54(%rbp)
movss  -0x20(%rbp),%xmm0
mulss  -0x34(%rbp),%xmm0
movss  %xmm0,-0x34(%rbp)
movss  -0x20(%rbp),%xmm0
mulss  -0x38(%rbp),%xmm0
movss  %xmm0,-0x38(%rbp)
movss  -0x20(%rbp),%xmm0
mulss  -0x3c(%rbp),%xmm0
movss  %xmm0,-0x3c(%rbp)
movss  -0x40(%rbp),%xmm1
movss  -0x24(%rbp),%xmm0
movss  0xc4a(%rip),%xmm2
subss  -0x40(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x58(%rbp)
movss  -0x4c(%rbp),%xmm0
addss  -0x3c(%rbp),%xmm0
movss  %xmm0,-0x5c(%rbp)
movss  -0x54(%rbp),%xmm0
subss  -0x38(%rbp),%xmm0
movss  %xmm0,-0x60(%rbp)
movss  -0x4c(%rbp),%xmm0
subss  -0x3c(%rbp),%xmm0
movss  %xmm0,-0x64(%rbp)
movss  -0x44(%rbp),%xmm1
movss  -0x24(%rbp),%xmm0
movss  0xbf9(%rip),%xmm2
subss  -0x44(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x68(%rbp)
movss  -0x50(%rbp),%xmm0
addss  -0x34(%rbp),%xmm0
movss  %xmm0,-0x6c(%rbp)
movss  -0x54(%rbp),%xmm0
addss  -0x38(%rbp),%xmm0
movss  %xmm0,-0x70(%rbp)
movss  -0x50(%rbp),%xmm0
subss  -0x34(%rbp),%xmm0
movss  %xmm0,-0x74(%rbp)
movss  -0x48(%rbp),%xmm1
movss  -0x24(%rbp),%xmm0
movss  0xba8(%rip),%xmm2
subss  -0x48(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x78(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x7c(%rbp)
mov    -0x8(%rbp),%rax
movss  0x10(%rax),%xmm0
movss  %xmm0,-0x80(%rbp)
mov    -0x8(%rbp),%rax
movss  0x20(%rax),%xmm0
movss  %xmm0,-0x84(%rbp)
ff
movss  -0x7c(%rbp),%xmm1
movss  -0x58(%rbp),%xmm2
movss  -0x80(%rbp),%xmm0
mulss  -0x5c(%rbp),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x84(%rbp),%xmm0
ff
movss  -0x60(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x7c(%rbp),%xmm1
movss  -0x64(%rbp),%xmm2
movss  -0x80(%rbp),%xmm0
mulss  -0x68(%rbp),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x84(%rbp),%xmm0
ff
movss  -0x6c(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x10(%rax)
movss  -0x7c(%rbp),%xmm1
movss  -0x70(%rbp),%xmm2
movss  -0x80(%rbp),%xmm0
mulss  -0x74(%rbp),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x84(%rbp),%xmm0
ff
movss  -0x78(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x20(%rax)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x7c(%rbp)
mov    -0x8(%rbp),%rax
movss  0x14(%rax),%xmm0
movss  %xmm0,-0x80(%rbp)
mov    -0x8(%rbp),%rax
movss  0x24(%rax),%xmm0
movss  %xmm0,-0x84(%rbp)
ff
movss  -0x7c(%rbp),%xmm1
movss  -0x58(%rbp),%xmm2
movss  -0x80(%rbp),%xmm0
mulss  -0x5c(%rbp),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x84(%rbp),%xmm0
ff
movss  -0x60(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
movss  -0x7c(%rbp),%xmm1
movss  -0x64(%rbp),%xmm2
movss  -0x80(%rbp),%xmm0
mulss  -0x68(%rbp),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x84(%rbp),%xmm0
ff
movss  -0x6c(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x14(%rax)
movss  -0x7c(%rbp),%xmm1
movss  -0x70(%rbp),%xmm2
movss  -0x80(%rbp),%xmm0
mulss  -0x74(%rbp),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x84(%rbp),%xmm0
ff
movss  -0x78(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x24(%rax)
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
movss  %xmm0,-0x7c(%rbp)
mov    -0x8(%rbp),%rax
movss  0x18(%rax),%xmm0
movss  %xmm0,-0x80(%rbp)
mov    -0x8(%rbp),%rax
movss  0x28(%rax),%xmm0
movss  %xmm0,-0x84(%rbp)
ff
movss  -0x7c(%rbp),%xmm1
movss  -0x58(%rbp),%xmm2
movss  -0x80(%rbp),%xmm0
mulss  -0x5c(%rbp),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x84(%rbp),%xmm0
ff
movss  -0x60(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
movss  -0x7c(%rbp),%xmm1
movss  -0x64(%rbp),%xmm2
movss  -0x80(%rbp),%xmm0
mulss  -0x68(%rbp),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x84(%rbp),%xmm0
ff
movss  -0x6c(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x18(%rax)
movss  -0x7c(%rbp),%xmm1
movss  -0x70(%rbp),%xmm2
movss  -0x80(%rbp),%xmm0
mulss  -0x74(%rbp),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x84(%rbp),%xmm0
ff
movss  -0x78(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x28(%rax)
mov    -0x8(%rbp),%rax
movss  0xc(%rax),%xmm0
movss  %xmm0,-0x7c(%rbp)
mov    -0x8(%rbp),%rax
movss  0x1c(%rax),%xmm0
movss  %xmm0,-0x80(%rbp)
mov    -0x8(%rbp),%rax
movss  0x2c(%rax),%xmm0
movss  %xmm0,-0x84(%rbp)
ff
movss  -0x7c(%rbp),%xmm1
movss  -0x58(%rbp),%xmm2
movss  -0x80(%rbp),%xmm0
mulss  -0x5c(%rbp),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x84(%rbp),%xmm0
ff
movss  -0x60(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0xc(%rax)
movss  -0x7c(%rbp),%xmm1
movss  -0x64(%rbp),%xmm2
movss  -0x80(%rbp),%xmm0
mulss  -0x68(%rbp),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x84(%rbp),%xmm0
ff
movss  -0x6c(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x1c(%rax)
movss  -0x7c(%rbp),%xmm1
movss  -0x70(%rbp),%xmm2
movss  -0x80(%rbp),%xmm0
mulss  -0x74(%rbp),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x84(%rbp),%xmm0
ff
movss  -0x78(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x2c(%rax)
jmp    17d9 <mtxRotateApply+0x679>
jmp    17de <mtxRotateApply+0x67e>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mtxRotateApply>:
push   %rbx
sub    $0x20,%rsp
mov    %rdi,%rbx
xorps  %xmm4,%xmm4
ucomiss %xmm4,%xmm2
jne    1186 <mtxRotateApply+0x26>
jp     1186 <mtxRotateApply+0x26>
ucomiss %xmm4,%xmm3
jne    1186 <mtxRotateApply+0x26>
jp     1186 <mtxRotateApply+0x26>
mov    %rbx,%rdi
add    $0x20,%rsp
pop    %rbx
jmp    1040 <mtxRotateXApply@plt>
ucomiss %xmm4,%xmm1
jne    11a4 <mtxRotateApply+0x44>
jp     11a4 <mtxRotateApply+0x44>
xorps  %xmm4,%xmm4
ucomiss %xmm4,%xmm3
jne    11a4 <mtxRotateApply+0x44>
jp     11a4 <mtxRotateApply+0x44>
mov    %rbx,%rdi
add    $0x20,%rsp
pop    %rbx
jmp    1080 <mtxRotateYApply@plt>
xorps  %xmm4,%xmm4
ucomiss %xmm4,%xmm1
jne    11c2 <mtxRotateApply+0x62>
jp     11c2 <mtxRotateApply+0x62>
ucomiss %xmm4,%xmm2
jne    11c2 <mtxRotateApply+0x62>
jp     11c2 <mtxRotateApply+0x62>
mov    %rbx,%rdi
add    $0x20,%rsp
pop    %rbx
jmp    1060 <mtxRotateZApply@plt>
mov    0x2e1f(%rip),%rax
mulss  (%rax),%xmm0
divss  0xe2b(%rip),%xmm0
movss  %xmm0,(%rsp)
movaps %xmm2,0x10(%rsp)
movss  %xmm1,0x8(%rsp)
movss  %xmm3,0x4(%rsp)
call   1030 <sinf@plt>
movss  %xmm0,0xc(%rsp)
movss  (%rsp),%xmm0
call   1050 <cosf@plt>
movss  0x4(%rsp),%xmm2
movss  0x8(%rsp),%xmm12
movaps 0x10(%rsp),%xmm11
movaps %xmm0,%xmm13
movaps %xmm11,%xmm0
mulss  %xmm11,%xmm0
movaps %xmm12,%xmm1
mulss  %xmm12,%xmm1
addss  %xmm0,%xmm1
movaps %xmm2,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
ucomiss 0xdc9(%rip),%xmm0
jb     1247 <mtxRotateApply+0xe7>
sqrtss %xmm0,%xmm0
jmp    126b <mtxRotateApply+0x10b>
movss  %xmm13,(%rsp)
call   1070 <sqrtf@plt>
movss  (%rsp),%xmm13
movss  0x4(%rsp),%xmm2
movss  0x8(%rsp),%xmm12
movaps 0x10(%rsp),%xmm11
movss  0xd91(%rip),%xmm1
movaps %xmm1,%xmm5
divss  %xmm0,%xmm5
movaps %xmm1,%xmm0
subss  %xmm13,%xmm0
mulss  %xmm5,%xmm12
mulss  %xmm5,%xmm11
mulss  %xmm2,%xmm5
movaps %xmm12,%xmm3
mulss  %xmm12,%xmm3
movaps %xmm11,%xmm9
mulss  %xmm11,%xmm9
movaps %xmm5,%xmm8
mulss  %xmm5,%xmm8
movaps %xmm12,%xmm2
mulss  %xmm11,%xmm2
mulss  %xmm0,%xmm2
movss  0xc(%rsp),%xmm4
movaps %xmm4,%xmm10
mulss  %xmm11,%xmm10
mulss  %xmm5,%xmm11
mulss  %xmm0,%xmm11
movaps %xmm5,%xmm7
mulss  %xmm12,%xmm7
mulss  %xmm0,%xmm7
mulss  %xmm4,%xmm12
mulss  %xmm4,%xmm5
movaps %xmm1,%xmm4
subss  %xmm3,%xmm4
mulss  %xmm13,%xmm4
addss  %xmm3,%xmm4
movaps %xmm5,%xmm3
addss  %xmm2,%xmm3
movaps %xmm7,%xmm0
subss  %xmm10,%xmm0
subss  %xmm5,%xmm2
movaps %xmm1,%xmm6
subss  %xmm9,%xmm6
mulss  %xmm13,%xmm6
addss  %xmm9,%xmm6
movaps %xmm12,%xmm5
addss  %xmm11,%xmm5
addss  %xmm10,%xmm7
subss  %xmm12,%xmm11
subss  %xmm8,%xmm1
mulss  %xmm13,%xmm1
addss  %xmm8,%xmm1
movups (%rbx),%xmm9
movups 0x10(%rbx),%xmm10
movups 0x20(%rbx),%xmm8
shufps $0x0,%xmm3,%xmm3
mulps  %xmm10,%xmm3
shufps $0x0,%xmm4,%xmm4
mulps  %xmm9,%xmm4
addps  %xmm3,%xmm4
shufps $0x0,%xmm0,%xmm0
mulps  %xmm8,%xmm0
addps  %xmm4,%xmm0
movups %xmm0,(%rbx)
shufps $0x0,%xmm6,%xmm6
mulps  %xmm10,%xmm6
shufps $0x0,%xmm2,%xmm2
mulps  %xmm9,%xmm2
addps  %xmm6,%xmm2
shufps $0x0,%xmm5,%xmm5
mulps  %xmm8,%xmm5
addps  %xmm2,%xmm5
movups %xmm5,0x10(%rbx)
shufps $0x0,%xmm11,%xmm11
mulps  %xmm10,%xmm11
shufps $0x0,%xmm7,%xmm7
mulps  %xmm9,%xmm7
addps  %xmm11,%xmm7
shufps $0x0,%xmm1,%xmm1
mulps  %xmm8,%xmm1
addps  %xmm7,%xmm1
movups %xmm1,0x20(%rbx)
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@M_PI = global float 0.000000e+00
define void @mtxRotateApply(float* %0, float %1, float %2, float %3, float %4) {
%6 = alloca float*
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
%15 = alloca float
%16 = alloca float
%17 = alloca float
%18 = alloca float
%19 = alloca float
%20 = alloca float
%21 = alloca float
%22 = alloca float
%23 = alloca float
%24 = alloca float
%25 = alloca float
%26 = alloca float
%27 = alloca float
%28 = alloca float
%29 = alloca float
%30 = alloca float
%31 = alloca float
%32 = alloca float
%33 = alloca float
%34 = alloca float
%35 = alloca float
%36 = alloca float
%37 = alloca float
store float* %0, float** %6
store float %1, float* %7
store float %2, float* %8
store float %3, float* %9
store float %4, float* %10
%38 = load float, float* %9
%39 = fcmp oeq float %38, 0.000000e+00
br i1 %39, label %40, label %47
40: ; preds = %5
%41 = load float, float* %10
%42 = fcmp oeq float %41, 0.000000e+00
br i1 %42, label %43, label %47
43: ; preds = %40
%44 = load float*, float** %6
%45 = load float, float* %7
%46 = call i32 @mtxRotateXApply(float* %44, float %45)
br label %335
47: ; preds = %40, %5
%48 = load float, float* %8
%49 = fcmp oeq float %48, 0.000000e+00
br i1 %49, label %50, label %57
50: ; preds = %47
%51 = load float, float* %10
%52 = fcmp oeq float %51, 0.000000e+00
br i1 %52, label %53, label %57
53: ; preds = %50
%54 = load float*, float** %6
%55 = load float, float* %7
%56 = call i32 @mtxRotateYApply(float* %54, float %55)
br label %334
57: ; preds = %50, %47
%58 = load float, float* %8
%59 = fcmp oeq float %58, 0.000000e+00
br i1 %59, label %60, label %67
60: ; preds = %57
%61 = load float, float* %9
%62 = fcmp oeq float %61, 0.000000e+00
br i1 %62, label %63, label %67
63: ; preds = %60
%64 = load float*, float** %6
%65 = load float, float* %7
%66 = call i32 @mtxRotateZApply(float* %64, float %65)
br label %333
67: ; preds = %60, %57
%68 = load float, float* %7
%69 = load float, float* @M_PI
%70 = fmul float %68, %69
%71 = fdiv float %70, 1.800000e+02
store float %71, float* %11
%72 = load float, float* %11
%73 = call float @sinf(float %72)
store float %73, float* %12
%74 = load float, float* %11
%75 = call float @cosf(float %74)
store float %75, float* %13
%76 = load float, float* %8
%77 = load float, float* %8
%78 = load float, float* %9
%79 = load float, float* %9
%80 = fmul float %78, %79
%81 = call float @llvm.fmuladd.f32(float %76, float %77, float %80)
%82 = load float, float* %10
%83 = load float, float* %10
%84 = call float @llvm.fmuladd.f32(float %82, float %83, float %81)
%85 = call float @sqrtf(float %84)
store float %85, float* %14
%86 = load float, float* %14
%87 = fdiv float 1.000000e+00, %86
store float %87, float* %15
%88 = load float, float* %13
%89 = fsub float 1.000000e+00, %88
store float %89, float* %16
%90 = load float, float* %8
%91 = load float, float* %15
%92 = fmul float %90, %91
store float %92, float* %17
%93 = load float, float* %9
%94 = load float, float* %15
%95 = fmul float %93, %94
store float %95, float* %18
%96 = load float, float* %10
%97 = load float, float* %15
%98 = fmul float %96, %97
store float %98, float* %19
%99 = load float, float* %17
%100 = load float, float* %17
%101 = fmul float %99, %100
store float %101, float* %20
%102 = load float, float* %18
%103 = load float, float* %18
%104 = fmul float %102, %103
store float %104, float* %21
%105 = load float, float* %19
%106 = load float, float* %19
%107 = fmul float %105, %106
store float %107, float* %22
%108 = load float, float* %17
%109 = load float, float* %18
%110 = fmul float %108, %109
%111 = load float, float* %16
%112 = fmul float %110, %111
store float %112, float* %23
%113 = load float, float* %18
%114 = load float, float* %19
%115 = fmul float %113, %114
%116 = load float, float* %16
%117 = fmul float %115, %116
store float %117, float* %24
%118 = load float, float* %19
%119 = load float, float* %17
%120 = fmul float %118, %119
%121 = load float, float* %16
%122 = fmul float %120, %121
store float %122, float* %25
%123 = load float, float* %12
%124 = load float, float* %17
%125 = fmul float %124, %123
store float %125, float* %17
%126 = load float, float* %12
%127 = load float, float* %18
%128 = fmul float %127, %126
store float %128, float* %18
%129 = load float, float* %12
%130 = load float, float* %19
%131 = fmul float %130, %129
store float %131, float* %19
%132 = load float, float* %20
%133 = load float, float* %13
%134 = load float, float* %20
%135 = fsub float 1.000000e+00, %134
%136 = call float @llvm.fmuladd.f32(float %133, float %135, float %132)
store float %136, float* %26
%137 = load float, float* %23
%138 = load float, float* %19
%139 = fadd float %137, %138
store float %139, float* %27
%140 = load float, float* %25
%141 = load float, float* %18
%142 = fsub float %140, %141
store float %142, float* %28
%143 = load float, float* %23
%144 = load float, float* %19
%145 = fsub float %143, %144
store float %145, float* %29
%146 = load float, float* %21
%147 = load float, float* %13
%148 = load float, float* %21
%149 = fsub float 1.000000e+00, %148
%150 = call float @llvm.fmuladd.f32(float %147, float %149, float %146)
store float %150, float* %30
%151 = load float, float* %24
%152 = load float, float* %17
%153 = fadd float %151, %152
store float %153, float* %31
%154 = load float, float* %25
%155 = load float, float* %18
%156 = fadd float %154, %155
store float %156, float* %32
%157 = load float, float* %24
%158 = load float, float* %17
%159 = fsub float %157, %158
store float %159, float* %33
%160 = load float, float* %22
%161 = load float, float* %13
%162 = load float, float* %22
%163 = fsub float 1.000000e+00, %162
%164 = call float @llvm.fmuladd.f32(float %161, float %163, float %160)
store float %164, float* %34
%165 = load float*, float** %6
%166 = getelementptr inbounds float, float* %165, i64 0
%167 = load float, float* %166
store float %167, float* %35
%168 = load float*, float** %6
%169 = getelementptr inbounds float, float* %168, i64 4
%170 = load float, float* %169
store float %170, float* %36
%171 = load float*, float** %6
%172 = getelementptr inbounds float, float* %171, i64 8
%173 = load float, float* %172
store float %173, float* %37
%174 = load float, float* %35
%175 = load float, float* %26
%176 = load float, float* %36
%177 = load float, float* %27
%178 = fmul float %176, %177
%179 = call float @llvm.fmuladd.f32(float %174, float %175, float %178)
%180 = load float, float* %37
%181 = load float, float* %28
%182 = call float @llvm.fmuladd.f32(float %180, float %181, float %179)
%183 = load float*, float** %6
%184 = getelementptr inbounds float, float* %183, i64 0
store float %182, float* %184
%185 = load float, float* %35
%186 = load float, float* %29
%187 = load float, float* %36
%188 = load float, float* %30
%189 = fmul float %187, %188
%190 = call float @llvm.fmuladd.f32(float %185, float %186, float %189)
%191 = load float, float* %37
%192 = load float, float* %31
%193 = call float @llvm.fmuladd.f32(float %191, float %192, float %190)
%194 = load float*, float** %6
%195 = getelementptr inbounds float, float* %194, i64 4
store float %193, float* %195
%196 = load float, float* %35
%197 = load float, float* %32
%198 = load float, float* %36
%199 = load float, float* %33
%200 = fmul float %198, %199
%201 = call float @llvm.fmuladd.f32(float %196, float %197, float %200)
%202 = load float, float* %37
%203 = load float, float* %34
%204 = call float @llvm.fmuladd.f32(float %202, float %203, float %201)
%205 = load float*, float** %6
%206 = getelementptr inbounds float, float* %205, i64 8
store float %204, float* %206
%207 = load float*, float** %6
%208 = getelementptr inbounds float, float* %207, i64 1
%209 = load float, float* %208
store float %209, float* %35
%210 = load float*, float** %6
%211 = getelementptr inbounds float, float* %210, i64 5
%212 = load float, float* %211
store float %212, float* %36
%213 = load float*, float** %6
%214 = getelementptr inbounds float, float* %213, i64 9
%215 = load float, float* %214
store float %215, float* %37
%216 = load float, float* %35
%217 = load float, float* %26
%218 = load float, float* %36
%219 = load float, float* %27
%220 = fmul float %218, %219
%221 = call float @llvm.fmuladd.f32(float %216, float %217, float %220)
%222 = load float, float* %37
%223 = load float, float* %28
%224 = call float @llvm.fmuladd.f32(float %222, float %223, float %221)
%225 = load float*, float** %6
%226 = getelementptr inbounds float, float* %225, i64 1
store float %224, float* %226
%227 = load float, float* %35
%228 = load float, float* %29
%229 = load float, float* %36
%230 = load float, float* %30
%231 = fmul float %229, %230
%232 = call float @llvm.fmuladd.f32(float %227, float %228, float %231)
%233 = load float, float* %37
%234 = load float, float* %31
%235 = call float @llvm.fmuladd.f32(float %233, float %234, float %232)
%236 = load float*, float** %6
%237 = getelementptr inbounds float, float* %236, i64 5
store float %235, float* %237
%238 = load float, float* %35
%239 = load float, float* %32
%240 = load float, float* %36
%241 = load float, float* %33
%242 = fmul float %240, %241
%243 = call float @llvm.fmuladd.f32(float %238, float %239, float %242)
%244 = load float, float* %37
%245 = load float, float* %34
%246 = call float @llvm.fmuladd.f32(float %244, float %245, float %243)
%247 = load float*, float** %6
%248 = getelementptr inbounds float, float* %247, i64 9
store float %246, float* %248
%249 = load float*, float** %6
%250 = getelementptr inbounds float, float* %249, i64 2
%251 = load float, float* %250
store float %251, float* %35
%252 = load float*, float** %6
%253 = getelementptr inbounds float, float* %252, i64 6
%254 = load float, float* %253
store float %254, float* %36
%255 = load float*, float** %6
%256 = getelementptr inbounds float, float* %255, i64 10
%257 = load float, float* %256
store float %257, float* %37
%258 = load float, float* %35
%259 = load float, float* %26
%260 = load float, float* %36
%261 = load float, float* %27
%262 = fmul float %260, %261
%263 = call float @llvm.fmuladd.f32(float %258, float %259, float %262)
%264 = load float, float* %37
%265 = load float, float* %28
%266 = call float @llvm.fmuladd.f32(float %264, float %265, float %263)
%267 = load float*, float** %6
%268 = getelementptr inbounds float, float* %267, i64 2
store float %266, float* %268
%269 = load float, float* %35
%270 = load float, float* %29
%271 = load float, float* %36
%272 = load float, float* %30
%273 = fmul float %271, %272
%274 = call float @llvm.fmuladd.f32(float %269, float %270, float %273)
%275 = load float, float* %37
%276 = load float, float* %31
%277 = call float @llvm.fmuladd.f32(float %275, float %276, float %274)
%278 = load float*, float** %6
%279 = getelementptr inbounds float, float* %278, i64 6
store float %277, float* %279
%280 = load float, float* %35
%281 = load float, float* %32
%282 = load float, float* %36
%283 = load float, float* %33
%284 = fmul float %282, %283
%285 = call float @llvm.fmuladd.f32(float %280, float %281, float %284)
%286 = load float, float* %37
%287 = load float, float* %34
%288 = call float @llvm.fmuladd.f32(float %286, float %287, float %285)
%289 = load float*, float** %6
%290 = getelementptr inbounds float, float* %289, i64 10
store float %288, float* %290
%291 = load float*, float** %6
%292 = getelementptr inbounds float, float* %291, i64 3
%293 = load float, float* %292
store float %293, float* %35
%294 = load float*, float** %6
%295 = getelementptr inbounds float, float* %294, i64 7
%296 = load float, float* %295
store float %296, float* %36
%297 = load float*, float** %6
%298 = getelementptr inbounds float, float* %297, i64 11
%299 = load float, float* %298
store float %299, float* %37
%300 = load float, float* %35
%301 = load float, float* %26
%302 = load float, float* %36
%303 = load float, float* %27
%304 = fmul float %302, %303
%305 = call float @llvm.fmuladd.f32(float %300, float %301, float %304)
%306 = load float, float* %37
%307 = load float, float* %28
%308 = call float @llvm.fmuladd.f32(float %306, float %307, float %305)
%309 = load float*, float** %6
%310 = getelementptr inbounds float, float* %309, i64 3
store float %308, float* %310
%311 = load float, float* %35
%312 = load float, float* %29
%313 = load float, float* %36
%314 = load float, float* %30
%315 = fmul float %313, %314
%316 = call float @llvm.fmuladd.f32(float %311, float %312, float %315)
%317 = load float, float* %37
%318 = load float, float* %31
%319 = call float @llvm.fmuladd.f32(float %317, float %318, float %316)
%320 = load float*, float** %6
%321 = getelementptr inbounds float, float* %320, i64 7
store float %319, float* %321
%322 = load float, float* %35
%323 = load float, float* %32
%324 = load float, float* %36
%325 = load float, float* %33
%326 = fmul float %324, %325
%327 = call float @llvm.fmuladd.f32(float %322, float %323, float %326)
%328 = load float, float* %37
%329 = load float, float* %34
%330 = call float @llvm.fmuladd.f32(float %328, float %329, float %327)
%331 = load float*, float** %6
%332 = getelementptr inbounds float, float* %331, i64 11
store float %330, float* %332
br label %333
333: ; preds = %67, %63
br label %334
334: ; preds = %333, %53
br label %335
335: ; preds = %334, %43
ret void
}

LLVM IR (-O2):
@M_PI = global float 0.000000e+00
define void @mtxRotateApply(float* %0, float %1, float %2, float %3, float %4) {
%6 = fcmp oeq float %3, 0.000000e+00
%7 = fcmp oeq float %4, 0.000000e+00
%8 = and i1 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %5
%10 = tail call i32 @mtxRotateXApply(float* %0, float %1)
br label %97
11: ; preds = %5
%12 = fcmp oeq float %2, 0.000000e+00
%13 = and i1 %12, %7
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = tail call i32 @mtxRotateYApply(float* %0, float %1)
br label %97
16: ; preds = %11
%17 = and i1 %12, %6
br i1 %17, label %18, label %20
18: ; preds = %16
%19 = tail call i32 @mtxRotateZApply(float* %0, float %1)
br label %97
20: ; preds = %16
%21 = load float, float* @M_PI
%22 = fmul float %21, %1
%23 = fdiv float %22, 1.800000e+02
%24 = tail call float @sinf(float %23)
%25 = tail call float @cosf(float %23)
%26 = fmul float %3, %3
%27 = tail call float @llvm.fmuladd.f32(float %2, float %2, float %26)
%28 = tail call float @llvm.fmuladd.f32(float %4, float %4, float %27)
%29 = tail call float @sqrtf(float %28)
%30 = fdiv float 1.000000e+00, %29
%31 = fsub float 1.000000e+00, %25
%32 = fmul float %30, %2
%33 = fmul float %30, %3
%34 = fmul float %30, %4
%35 = fmul float %32, %32
%36 = fmul float %33, %33
%37 = fmul float %34, %34
%38 = fmul float %32, %33
%39 = fmul float %31, %38
%40 = fmul float %33, %34
%41 = fmul float %31, %40
%42 = fmul float %34, %32
%43 = fmul float %31, %42
%44 = fmul float %24, %32
%45 = fmul float %24, %33
%46 = fmul float %24, %34
%47 = fsub float 1.000000e+00, %35
%48 = tail call float @llvm.fmuladd.f32(float %25, float %47, float %35)
%49 = fadd float %46, %39
%50 = fsub float %43, %45
%51 = fsub float %39, %46
%52 = fsub float 1.000000e+00, %36
%53 = tail call float @llvm.fmuladd.f32(float %25, float %52, float %36)
%54 = fadd float %44, %41
%55 = fadd float %45, %43
%56 = fsub float %41, %44
%57 = fsub float 1.000000e+00, %37
%58 = tail call float @llvm.fmuladd.f32(float %25, float %57, float %37)
%59 = getelementptr inbounds float, float* %0, i64 4
%60 = getelementptr inbounds float, float* %0, i64 8
%61 = bitcast float* %59 to <4 x float>*
%62 = load <4 x float>, <4 x float>* %61
%63 = bitcast float* %0 to <4 x float>*
%64 = load <4 x float>, <4 x float>* %63
%65 = bitcast float* %60 to <4 x float>*
%66 = load <4 x float>, <4 x float>* %65
%67 = insertelement <4 x float> poison, float %49, i64 0
%68 = shufflevector <4 x float> %67, <4 x float> poison, <4 x i32> zeroinitializer
%69 = fmul <4 x float> %62, %68
%70 = insertelement <4 x float> poison, float %48, i64 0
%71 = shufflevector <4 x float> %70, <4 x float> poison, <4 x i32> zeroinitializer
%72 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %64, <4 x float> %71, <4 x float> %69)
%73 = insertelement <4 x float> poison, float %50, i64 0
%74 = shufflevector <4 x float> %73, <4 x float> poison, <4 x i32> zeroinitializer
%75 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %66, <4 x float> %74, <4 x float> %72)
%76 = bitcast float* %0 to <4 x float>*
store <4 x float> %75, <4 x float>* %76
%77 = insertelement <4 x float> poison, float %53, i64 0
%78 = shufflevector <4 x float> %77, <4 x float> poison, <4 x i32> zeroinitializer
%79 = fmul <4 x float> %62, %78
%80 = insertelement <4 x float> poison, float %51, i64 0
%81 = shufflevector <4 x float> %80, <4 x float> poison, <4 x i32> zeroinitializer
%82 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %64, <4 x float> %81, <4 x float> %79)
%83 = insertelement <4 x float> poison, float %54, i64 0
%84 = shufflevector <4 x float> %83, <4 x float> poison, <4 x i32> zeroinitializer
%85 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %66, <4 x float> %84, <4 x float> %82)
%86 = bitcast float* %59 to <4 x float>*
store <4 x float> %85, <4 x float>* %86
%87 = insertelement <4 x float> poison, float %56, i64 0
%88 = shufflevector <4 x float> %87, <4 x float> poison, <4 x i32> zeroinitializer
%89 = fmul <4 x float> %62, %88
%90 = insertelement <4 x float> poison, float %55, i64 0
%91 = shufflevector <4 x float> %90, <4 x float> poison, <4 x i32> zeroinitializer
%92 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %64, <4 x float> %91, <4 x float> %89)
%93 = insertelement <4 x float> poison, float %58, i64 0
%94 = shufflevector <4 x float> %93, <4 x float> poison, <4 x i32> zeroinitializer
%95 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %66, <4 x float> %94, <4 x float> %92)
%96 = bitcast float* %60 to <4 x float>*
store <4 x float> %95, <4 x float>* %96
br label %97
97: ; preds = %14, %20, %18, %9
ret void
}