#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 cosf(float);
float sinf(float);
int /*<<< orphan*/ tdMultiply(float *, float *, float *);
void tdRotateEA(float *f, float x, float y, float z) {
  float ftmp[16];
  float X = -x * 2 * 3.141592653589 / 360;
  float Y = -y * 2 * 3.141592653589 / 360;
  float Z = -z * 2 * 3.141592653589 / 360;
  float cx = cosf(X);
  float sx = sinf(X);
  float cy = cosf(Y);
  float sy = sinf(Y);
  float cz = cosf(Z);
  float sz = sinf(Z);
  ftmp[0] = cy * cz;
  ftmp[4] = (sx * sy * cz) - (cx * sz);
  ftmp[8] = (cx * sy * cz) + (sx * sz);
  ftmp[12] = 0;
  ftmp[1] = cy * sz;
  ftmp[5] = (sx * sy * sz) + (cx * cz);
  ftmp[9] = (cx * sy * sz) - (sx * cz);
  ftmp[13] = 0;
  ftmp[2] = -sy;
  ftmp[6] = sx * cy;
  ftmp[10] = cx * cy;
  ftmp[14] = 0;
  ftmp[3] = 0;
  ftmp[7] = 0;
  ftmp[11] = 0;
  ftmp[15] = 1;
  tdMultiply(f, ftmp, f);
}


x86 assembly (clang, -O0):
<tdRotateEA>:
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  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  0xe9c(%rip),%xmm1
mulss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe98(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe84(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x64(%rbp)
movss  -0x10(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  0xe59(%rip),%xmm1
mulss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe55(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe41(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x68(%rbp)
movss  -0x14(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  0xe16(%rip),%xmm1
mulss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe12(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdfe(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x6c(%rbp)
movss  -0x64(%rbp),%xmm0
call   1040 <cosf@plt>
movss  %xmm0,-0x70(%rbp)
movss  -0x64(%rbp),%xmm0
call   1030 <sinf@plt>
movss  %xmm0,-0x74(%rbp)
movss  -0x68(%rbp),%xmm0
call   1040 <cosf@plt>
movss  %xmm0,-0x78(%rbp)
movss  -0x68(%rbp),%xmm0
call   1030 <sinf@plt>
movss  %xmm0,-0x7c(%rbp)
movss  -0x6c(%rbp),%xmm0
call   1040 <cosf@plt>
movss  %xmm0,-0x80(%rbp)
movss  -0x6c(%rbp),%xmm0
call   1030 <sinf@plt>
movss  %xmm0,-0x84(%rbp)
ff
movss  -0x78(%rbp),%xmm0
mulss  -0x80(%rbp),%xmm0
movss  %xmm0,-0x60(%rbp)
movss  -0x74(%rbp),%xmm0
mulss  -0x7c(%rbp),%xmm0
movss  -0x80(%rbp),%xmm2
movss  -0x70(%rbp),%xmm1
mulss  -0x84(%rbp),%xmm1
ff
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x50(%rbp)
movss  -0x70(%rbp),%xmm0
mulss  -0x7c(%rbp),%xmm0
movss  -0x80(%rbp),%xmm2
movss  -0x74(%rbp),%xmm1
mulss  -0x84(%rbp),%xmm1
ff
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x78(%rbp),%xmm0
mulss  -0x84(%rbp),%xmm0
ff
movss  %xmm0,-0x5c(%rbp)
movss  -0x74(%rbp),%xmm0
mulss  -0x7c(%rbp),%xmm0
movss  -0x84(%rbp),%xmm2
ff
movss  -0x70(%rbp),%xmm1
mulss  -0x80(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x4c(%rbp)
movss  -0x70(%rbp),%xmm0
mulss  -0x7c(%rbp),%xmm0
movss  -0x84(%rbp),%xmm2
ff
movss  -0x74(%rbp),%xmm1
mulss  -0x80(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x3c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x7c(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x58(%rbp)
movss  -0x74(%rbp),%xmm0
mulss  -0x78(%rbp),%xmm0
movss  %xmm0,-0x48(%rbp)
movss  -0x70(%rbp),%xmm0
mulss  -0x78(%rbp),%xmm0
movss  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x54(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x44(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x34(%rbp)
movss  0xc40(%rip),%xmm0
movss  %xmm0,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x60(%rbp),%rsi
mov    -0x8(%rbp),%rdx
call   1050 <tdMultiply@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tdRotateEA>:
push   %rbx
sub    $0x70,%rsp
mov    %rdi,%rbx
movss  0xec0(%rip),%xmm3
mulss  %xmm3,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeb8(%rip),%xmm4
mulsd  %xmm4,%xmm0
movsd  0xeb4(%rip),%xmm5
divsd  %xmm5,%xmm0
cvtsd2ss %xmm0,%xmm6
movss  %xmm6,0xc(%rsp)
mulss  %xmm3,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
mulsd  %xmm4,%xmm0
divsd  %xmm5,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x20(%rsp)
mulss  %xmm3,%xmm2
xorps  %xmm0,%xmm0
cvtss2sd %xmm2,%xmm0
mulsd  %xmm4,%xmm0
divsd  %xmm5,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x10(%rsp)
movaps %xmm6,%xmm0
call   1040 <cosf@plt>
movss  %xmm0,0x1c(%rsp)
movss  0xc(%rsp),%xmm0
call   1030 <sinf@plt>
movss  %xmm0,0xc(%rsp)
movss  0x20(%rsp),%xmm0
call   1040 <cosf@plt>
movss  %xmm0,0x18(%rsp)
movss  0x20(%rsp),%xmm0
call   1030 <sinf@plt>
movaps %xmm0,0x20(%rsp)
movss  0x10(%rsp),%xmm0
call   1040 <cosf@plt>
movss  %xmm0,0x14(%rsp)
movss  0x10(%rsp),%xmm0
call   1030 <sinf@plt>
movss  0x18(%rsp),%xmm7
movaps %xmm7,%xmm1
movss  0x14(%rsp),%xmm12
mulss  %xmm12,%xmm1
movss  %xmm1,0x30(%rsp)
movss  0xc(%rsp),%xmm5
movaps %xmm5,%xmm1
movaps 0x20(%rsp),%xmm4
mulss  %xmm4,%xmm1
movaps %xmm1,%xmm2
movss  0x1c(%rsp),%xmm9
movaps %xmm9,%xmm3
mulss  %xmm4,%xmm3
movaps %xmm4,%xmm11
movaps %xmm5,%xmm4
movaps %xmm5,%xmm8
mulss  %xmm0,%xmm4
movaps %xmm3,%xmm5
movaps %xmm7,%xmm6
movaps %xmm7,%xmm10
mulss  %xmm0,%xmm6
mulss  %xmm0,%xmm1
mulss  %xmm0,%xmm3
mulss  %xmm9,%xmm0
movaps %xmm12,%xmm7
mulss  %xmm12,%xmm2
subss  %xmm0,%xmm2
movss  %xmm2,0x40(%rsp)
mulss  %xmm12,%xmm5
addss  %xmm4,%xmm5
movss  %xmm5,0x50(%rsp)
movss  %xmm6,0x34(%rsp)
movaps %xmm9,%xmm2
movaps %xmm9,%xmm0
mulss  %xmm12,%xmm0
addss  %xmm0,%xmm1
movss  %xmm1,0x44(%rsp)
movaps %xmm8,%xmm0
mulss  %xmm8,%xmm7
subss  %xmm7,%xmm3
movss  %xmm3,0x54(%rsp)
xorps  0xd5d(%rip),%xmm11
movss  %xmm11,0x38(%rsp)
mulss  %xmm10,%xmm0
movss  %xmm0,0x48(%rsp)
mulss  %xmm10,%xmm2
movss  %xmm2,0x58(%rsp)
movl   $0x0,0x3c(%rsp)
movl   $0x0,0x4c(%rsp)
xorps  %xmm0,%xmm0
movups %xmm0,0x5c(%rsp)
movl   $0x3f800000,0x6c(%rsp)
3f
lea    0x30(%rsp),%rsi
mov    %rbx,%rdi
mov    %rbx,%rdx
call   1050 <tdMultiply@plt>
add    $0x70,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define void @tdRotateEA(float* %0, float %1, float %2, float %3) {
%5 = alloca [16 x float]
%6 = bitcast [16 x float]* %5 to i8*
%7 = fmul float %1, -2.000000e+00
%8 = fpext float %7 to double
%9 = fmul double %8, 0x400921FB5444261E
%10 = fdiv double %9, 3.600000e+02
%11 = fptrunc double %10 to float
%12 = fmul float %2, -2.000000e+00
%13 = fpext float %12 to double
%14 = fmul double %13, 0x400921FB5444261E
%15 = fdiv double %14, 3.600000e+02
%16 = fptrunc double %15 to float
%17 = fmul float %3, -2.000000e+00
%18 = fpext float %17 to double
%19 = fmul double %18, 0x400921FB5444261E
%20 = fdiv double %19, 3.600000e+02
%21 = fptrunc double %20 to float
%22 = tail call float @cosf(float %11)
%23 = tail call float @sinf(float %11)
%24 = tail call float @cosf(float %16)
%25 = tail call float @sinf(float %16)
%26 = tail call float @cosf(float %21)
%27 = tail call float @sinf(float %21)
%28 = fmul float %24, %26
%29 = getelementptr inbounds [16 x float], [16 x float]* %5, i64 0, i64 0
store float %28, float* %29
%30 = fmul float %23, %25
%31 = fneg float %22
%32 = fmul float %27, %31
%33 = tail call float @llvm.fmuladd.f32(float %30, float %26, float %32)
%34 = getelementptr inbounds [16 x float], [16 x float]* %5, i64 0, i64 4
store float %33, float* %34
%35 = fmul float %22, %25
%36 = fmul float %23, %27
%37 = tail call float @llvm.fmuladd.f32(float %35, float %26, float %36)
%38 = getelementptr inbounds [16 x float], [16 x float]* %5, i64 0, i64 8
store float %37, float* %38
%39 = fmul float %24, %27
%40 = getelementptr inbounds [16 x float], [16 x float]* %5, i64 0, i64 1
store float %39, float* %40
%41 = fmul float %22, %26
%42 = tail call float @llvm.fmuladd.f32(float %30, float %27, float %41)
%43 = getelementptr inbounds [16 x float], [16 x float]* %5, i64 0, i64 5
store float %42, float* %43
%44 = fneg float %23
%45 = fmul float %26, %44
%46 = tail call float @llvm.fmuladd.f32(float %35, float %27, float %45)
%47 = getelementptr inbounds [16 x float], [16 x float]* %5, i64 0, i64 9
store float %46, float* %47
%48 = fneg float %25
%49 = getelementptr inbounds [16 x float], [16 x float]* %5, i64 0, i64 2
store float %48, float* %49
%50 = fmul float %23, %24
%51 = getelementptr inbounds [16 x float], [16 x float]* %5, i64 0, i64 6
store float %50, float* %51
%52 = fmul float %22, %24
%53 = getelementptr inbounds [16 x float], [16 x float]* %5, i64 0, i64 10
store float %52, float* %53
%54 = getelementptr inbounds [16 x float], [16 x float]* %5, i64 0, i64 3
store float 0.000000e+00, float* %54
%55 = getelementptr inbounds [16 x float], [16 x float]* %5, i64 0, i64 7
store float 0.000000e+00, float* %55
%56 = getelementptr inbounds [16 x float], [16 x float]* %5, i64 0, i64 11
%57 = bitcast float* %56 to <4 x float>*
store <4 x float> zeroinitializer, <4 x float>* %57
%58 = getelementptr inbounds [16 x float], [16 x float]* %5, i64 0, i64 15
store float 1.000000e+00, float* %58
%59 = call i32 @tdMultiply(float* %0, float* %29, float* %0)
ret void
}