#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 */
int /*<<< orphan*/ copyvector(float *, float *);
float cos(float);
int /*<<< orphan*/ crossproduct(float *, float *, float *);
float dotproduct(float *, float *);
float fabs(float);
int /*<<< orphan*/ normalizevector(float *, float *);
float sin(float);
float vectorlength(float *);
void rotateorientation(float orientation[3][3], float *rotationvector,
                       float rotationangle) {
  int count;
  float pointtemp[3], cosnormal[3], sinnormal[3];
  float axisnormal[3];
  float vectorlengthvalue, dotproductvalue;
  normalizevector(axisnormal, rotationvector);
  if (fabs(rotationangle) < .003f)
    return;
  for (count = 0; count < 3; count++) {
    copyvector(pointtemp, orientation[count]);
    crossproduct(sinnormal, axisnormal, pointtemp);
    normalizevector(sinnormal, sinnormal);
    crossproduct(cosnormal, sinnormal, axisnormal);
    normalizevector(cosnormal, cosnormal);
    dotproductvalue = dotproduct(axisnormal, pointtemp);
    pointtemp[0] -= axisnormal[0] * dotproductvalue;
    pointtemp[1] -= axisnormal[1] * dotproductvalue;
    pointtemp[2] -= axisnormal[2] * dotproductvalue;
    vectorlengthvalue = vectorlength(pointtemp);
    orientation[count][0] =
        axisnormal[0] * dotproductvalue +
        cosnormal[0] * cos(rotationangle) * vectorlengthvalue +
        sinnormal[0] * sin(rotationangle) * vectorlengthvalue;
    orientation[count][1] =
        axisnormal[1] * dotproductvalue +
        cosnormal[1] * cos(rotationangle) * vectorlengthvalue +
        sinnormal[1] * sin(rotationangle) * vectorlengthvalue;
    orientation[count][2] =
        axisnormal[2] * dotproductvalue +
        cosnormal[2] * cos(rotationangle) * vectorlengthvalue +
        sinnormal[2] * sin(rotationangle) * vectorlengthvalue;
    normalizevector(orientation[count], orientation[count]);
  }
}


x86 assembly (clang, -O0):
<rotateorientation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
lea    -0x48(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   10a0 <normalizevector@plt>
movss  -0x14(%rbp),%xmm0
call   1050 <fabs@plt>
movaps %xmm0,%xmm1
movss  0xe46(%rip),%xmm0
ucomiss %xmm1,%xmm0
jbe    11c8 <rotateorientation+0x48>
jmp    14cc <rotateorientation+0x34c>
movl   $0x0,-0x18(%rbp)
cmpl   $0x3,-0x18(%rbp)
jge    14cc <rotateorientation+0x34c>
lea    -0x24(%rbp),%rdi
mov    -0x8(%rbp),%rsi
movslq -0x18(%rbp),%rax
imul   $0xc,%rax,%rax
add    %rax,%rsi
call   1070 <copyvector@plt>
lea    -0x3c(%rbp),%rdi
lea    -0x48(%rbp),%rsi
lea    -0x24(%rbp),%rdx
call   1090 <crossproduct@plt>
lea    -0x3c(%rbp),%rdi
lea    -0x3c(%rbp),%rsi
call   10a0 <normalizevector@plt>
lea    -0x30(%rbp),%rdi
lea    -0x3c(%rbp),%rsi
lea    -0x48(%rbp),%rdx
call   1090 <crossproduct@plt>
lea    -0x30(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   10a0 <normalizevector@plt>
lea    -0x48(%rbp),%rdi
lea    -0x24(%rbp),%rsi
call   1030 <dotproduct@plt>
movss  %xmm0,-0x50(%rbp)
movss  -0x48(%rbp),%xmm0
movss  -0x50(%rbp),%xmm2
movss  -0x24(%rbp),%xmm1
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x44(%rbp),%xmm0
movss  -0x50(%rbp),%xmm2
movss  -0x20(%rbp),%xmm1
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x40(%rbp),%xmm0
movss  -0x50(%rbp),%xmm2
movss  -0x1c(%rbp),%xmm1
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
lea    -0x24(%rbp),%rdi
call   1040 <vectorlength@plt>
movss  %xmm0,-0x4c(%rbp)
movss  -0x48(%rbp),%xmm0
movss  %xmm0,-0x84(%rbp)
ff
movss  -0x50(%rbp),%xmm0
movss  %xmm0,-0x88(%rbp)
ff
movss  -0x30(%rbp),%xmm0
movss  %xmm0,-0x8c(%rbp)
ff
movss  -0x14(%rbp),%xmm0
call   1080 <cos@plt>
movss  -0x8c(%rbp),%xmm1
movss  -0x88(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movss  -0x84(%rbp),%xmm0
ff
mulss  %xmm3,%xmm1
mulss  -0x4c(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x80(%rbp)
movss  -0x3c(%rbp),%xmm0
movss  %xmm0,-0x7c(%rbp)
movss  -0x14(%rbp),%xmm0
call   1060 <sin@plt>
movss  -0x80(%rbp),%xmm1
movaps %xmm0,%xmm2
movss  -0x7c(%rbp),%xmm0
mulss  %xmm2,%xmm0
movss  -0x4c(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movss  %xmm0,(%rax)
movss  -0x44(%rbp),%xmm0
movss  %xmm0,-0x70(%rbp)
movss  -0x50(%rbp),%xmm0
movss  %xmm0,-0x74(%rbp)
movss  -0x2c(%rbp),%xmm0
movss  %xmm0,-0x78(%rbp)
movss  -0x14(%rbp),%xmm0
call   1080 <cos@plt>
movss  -0x78(%rbp),%xmm1
movss  -0x74(%rbp),%xmm2
movaps %xmm0,%xmm3
movss  -0x70(%rbp),%xmm0
mulss  %xmm3,%xmm1
mulss  -0x4c(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x6c(%rbp)
movss  -0x38(%rbp),%xmm0
movss  %xmm0,-0x68(%rbp)
movss  -0x14(%rbp),%xmm0
call   1060 <sin@plt>
movss  -0x6c(%rbp),%xmm1
movaps %xmm0,%xmm2
movss  -0x68(%rbp),%xmm0
mulss  %xmm2,%xmm0
movss  -0x4c(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movss  %xmm0,0x4(%rax)
movss  -0x40(%rbp),%xmm0
movss  %xmm0,-0x5c(%rbp)
movss  -0x50(%rbp),%xmm0
movss  %xmm0,-0x60(%rbp)
movss  -0x28(%rbp),%xmm0
movss  %xmm0,-0x64(%rbp)
movss  -0x14(%rbp),%xmm0
call   1080 <cos@plt>
movss  -0x64(%rbp),%xmm1
movss  -0x60(%rbp),%xmm2
movaps %xmm0,%xmm3
movss  -0x5c(%rbp),%xmm0
mulss  %xmm3,%xmm1
mulss  -0x4c(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x58(%rbp)
movss  -0x34(%rbp),%xmm0
movss  %xmm0,-0x54(%rbp)
movss  -0x14(%rbp),%xmm0
call   1060 <sin@plt>
movss  -0x58(%rbp),%xmm1
movaps %xmm0,%xmm2
movss  -0x54(%rbp),%xmm0
mulss  %xmm2,%xmm0
movss  -0x4c(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movss  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rdi
movslq -0x18(%rbp),%rax
imul   $0xc,%rax,%rax
add    %rax,%rdi
mov    -0x8(%rbp),%rsi
movslq -0x18(%rbp),%rax
imul   $0xc,%rax,%rax
add    %rax,%rsi
call   10a0 <normalizevector@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11cf <rotateorientation+0x4f>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotateorientation>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
movaps %xmm0,0x30(%rsp)
mov    %rdi,%rbp
lea    0x18(%rsp),%rdi
call   1090 <normalizevector@plt>
movaps 0xe69(%rip),%xmm0
andps  0x30(%rsp),%xmm0
movss  0xe6c(%rip),%xmm1
ucomiss %xmm0,%xmm1
ja     13dc <rotateorientation+0x26c>
xor    %r12d,%r12d
lea    (%r12,%rbp,1),%rsi
mov    %rsi,0x60(%rsp)
lea    0x24(%rsp),%r15
mov    %r15,%rdi
call   1060 <copyvector@plt>
lea    0x48(%rsp),%rbx
mov    %rbx,%rdi
lea    0x18(%rsp),%r13
mov    %r13,%rsi
mov    %r15,%rdx
call   1080 <crossproduct@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
call   1090 <normalizevector@plt>
lea    0x54(%rsp),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r13,%rdx
call   1080 <crossproduct@plt>
mov    %r14,%rdi
mov    %r14,%rsi
call   1090 <normalizevector@plt>
mov    %r13,%rdi
mov    %r15,%rsi
call   1030 <dotproduct@plt>
movss  %xmm0,0x10(%rsp)
movss  0x18(%rsp),%xmm2
mulss  %xmm0,%xmm2
movss  0x24(%rsp),%xmm1
subss  %xmm2,%xmm1
movss  0x28(%rsp),%xmm2
movss  %xmm1,0x24(%rsp)
movss  0x1c(%rsp),%xmm1
mulss  %xmm0,%xmm1
subss  %xmm1,%xmm2
movss  %xmm2,0x28(%rsp)
movss  0x2c(%rsp),%xmm2
movss  0x20(%rsp),%xmm1
mulss  %xmm0,%xmm1
subss  %xmm1,%xmm2
movss  %xmm2,0x2c(%rsp)
mov    %r15,%rdi
call   1040 <vectorlength@plt>
movss  %xmm0,0x14(%rsp)
movss  0x54(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
movss  0x18(%rsp),%xmm0
mulss  0x10(%rsp),%xmm0
movss  %xmm0,0x8(%rsp)
movaps 0x30(%rsp),%xmm0
call   1070 <cos@plt>
mulss  0xc(%rsp),%xmm0
mulss  0x14(%rsp),%xmm0
addss  0x8(%rsp),%xmm0
movss  %xmm0,0x8(%rsp)
movss  0x48(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
movaps 0x30(%rsp),%xmm0
call   1050 <sin@plt>
mulss  0xc(%rsp),%xmm0
mulss  0x14(%rsp),%xmm0
addss  0x8(%rsp),%xmm0
movss  %xmm0,0x0(%rbp,%r12,1)
movss  0x58(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
movss  0x1c(%rsp),%xmm0
mulss  0x10(%rsp),%xmm0
movss  %xmm0,0x8(%rsp)
movaps 0x30(%rsp),%xmm0
call   1070 <cos@plt>
mulss  0xc(%rsp),%xmm0
mulss  0x14(%rsp),%xmm0
addss  0x8(%rsp),%xmm0
movss  %xmm0,0x8(%rsp)
movss  0x4c(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
movaps 0x30(%rsp),%xmm0
call   1050 <sin@plt>
mulss  0xc(%rsp),%xmm0
mulss  0x14(%rsp),%xmm0
addss  0x8(%rsp),%xmm0
movss  %xmm0,0x4(%rbp,%r12,1)
movss  0x5c(%rsp),%xmm0
movss  %xmm0,0x8(%rsp)
movss  0x10(%rsp),%xmm0
mulss  0x20(%rsp),%xmm0
movss  %xmm0,0x10(%rsp)
movaps 0x30(%rsp),%xmm0
call   1070 <cos@plt>
mulss  0x8(%rsp),%xmm0
mulss  0x14(%rsp),%xmm0
addss  0x10(%rsp),%xmm0
movss  %xmm0,0x10(%rsp)
movss  0x50(%rsp),%xmm0
movss  %xmm0,0x8(%rsp)
movaps 0x30(%rsp),%xmm0
call   1050 <sin@plt>
mulss  0x8(%rsp),%xmm0
mulss  0x14(%rsp),%xmm0
addss  0x10(%rsp),%xmm0
movss  %xmm0,0x8(%rbp,%r12,1)
mov    0x60(%rsp),%rdi
mov    %rdi,%rsi
call   1090 <normalizevector@plt>
add    $0xc,%r12
cmp    $0x24,%r12
jne    11b0 <rotateorientation+0x40>
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @rotateorientation([3 x float]* %0, float* %1, float %2) {
%4 = alloca [3 x float]*
%5 = alloca float*
%6 = alloca float
%7 = alloca i32
%8 = alloca [3 x float]
%9 = alloca [3 x float]
%10 = alloca [3 x float]
%11 = alloca [3 x float]
%12 = alloca float
%13 = alloca float
store [3 x float]* %0, [3 x float]** %4
store float* %1, float** %5
store float %2, float* %6
%14 = getelementptr inbounds [3 x float], [3 x float]* %11, i64 0, i64 0
%15 = load float*, float** %5
%16 = call i32 @normalizevector(float* %14, float* %15)
%17 = load float, float* %6
%18 = call float @fabs(float %17)
%19 = fcmp olt float %18, 0x3F689374C0000000
br i1 %19, label %20, label %21
20: ; preds = %3
br label %156
21: ; preds = %3
store i32 0, i32* %7
br label %22
22: ; preds = %153, %21
%23 = load i32, i32* %7
%24 = icmp slt i32 %23, 3
br i1 %24, label %25, label %156
25: ; preds = %22
%26 = getelementptr inbounds [3 x float], [3 x float]* %8, i64 0, i64 0
%27 = load [3 x float]*, [3 x float]** %4
%28 = load i32, i32* %7
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [3 x float], [3 x float]* %27, i64 %29
%31 = getelementptr inbounds [3 x float], [3 x float]* %30, i64 0, i64 0
%32 = call i32 @copyvector(float* %26, float* %31)
%33 = getelementptr inbounds [3 x float], [3 x float]* %10, i64 0, i64 0
%34 = getelementptr inbounds [3 x float], [3 x float]* %11, i64 0, i64 0
%35 = getelementptr inbounds [3 x float], [3 x float]* %8, i64 0, i64 0
%36 = call i32 @crossproduct(float* %33, float* %34, float* %35)
%37 = getelementptr inbounds [3 x float], [3 x float]* %10, i64 0, i64 0
%38 = getelementptr inbounds [3 x float], [3 x float]* %10, i64 0, i64 0
%39 = call i32 @normalizevector(float* %37, float* %38)
%40 = getelementptr inbounds [3 x float], [3 x float]* %9, i64 0, i64 0
%41 = getelementptr inbounds [3 x float], [3 x float]* %10, i64 0, i64 0
%42 = getelementptr inbounds [3 x float], [3 x float]* %11, i64 0, i64 0
%43 = call i32 @crossproduct(float* %40, float* %41, float* %42)
%44 = getelementptr inbounds [3 x float], [3 x float]* %9, i64 0, i64 0
%45 = getelementptr inbounds [3 x float], [3 x float]* %9, i64 0, i64 0
%46 = call i32 @normalizevector(float* %44, float* %45)
%47 = getelementptr inbounds [3 x float], [3 x float]* %11, i64 0, i64 0
%48 = getelementptr inbounds [3 x float], [3 x float]* %8, i64 0, i64 0
%49 = call float @dotproduct(float* %47, float* %48)
store float %49, float* %13
%50 = getelementptr inbounds [3 x float], [3 x float]* %11, i64 0, i64 0
%51 = load float, float* %50
%52 = load float, float* %13
%53 = getelementptr inbounds [3 x float], [3 x float]* %8, i64 0, i64 0
%54 = load float, float* %53
%55 = fneg float %51
%56 = call float @llvm.fmuladd.f32(float %55, float %52, float %54)
store float %56, float* %53
%57 = getelementptr inbounds [3 x float], [3 x float]* %11, i64 0, i64 1
%58 = load float, float* %57
%59 = load float, float* %13
%60 = getelementptr inbounds [3 x float], [3 x float]* %8, i64 0, i64 1
%61 = load float, float* %60
%62 = fneg float %58
%63 = call float @llvm.fmuladd.f32(float %62, float %59, float %61)
store float %63, float* %60
%64 = getelementptr inbounds [3 x float], [3 x float]* %11, i64 0, i64 2
%65 = load float, float* %64
%66 = load float, float* %13
%67 = getelementptr inbounds [3 x float], [3 x float]* %8, i64 0, i64 2
%68 = load float, float* %67
%69 = fneg float %65
%70 = call float @llvm.fmuladd.f32(float %69, float %66, float %68)
store float %70, float* %67
%71 = getelementptr inbounds [3 x float], [3 x float]* %8, i64 0, i64 0
%72 = call float @vectorlength(float* %71)
store float %72, float* %12
%73 = getelementptr inbounds [3 x float], [3 x float]* %11, i64 0, i64 0
%74 = load float, float* %73
%75 = load float, float* %13
%76 = getelementptr inbounds [3 x float], [3 x float]* %9, i64 0, i64 0
%77 = load float, float* %76
%78 = load float, float* %6
%79 = call float @cos(float %78)
%80 = fmul float %77, %79
%81 = load float, float* %12
%82 = fmul float %80, %81
%83 = call float @llvm.fmuladd.f32(float %74, float %75, float %82)
%84 = getelementptr inbounds [3 x float], [3 x float]* %10, i64 0, i64 0
%85 = load float, float* %84
%86 = load float, float* %6
%87 = call float @sin(float %86)
%88 = fmul float %85, %87
%89 = load float, float* %12
%90 = call float @llvm.fmuladd.f32(float %88, float %89, float %83)
%91 = load [3 x float]*, [3 x float]** %4
%92 = load i32, i32* %7
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds [3 x float], [3 x float]* %91, i64 %93
%95 = getelementptr inbounds [3 x float], [3 x float]* %94, i64 0, i64 0
store float %90, float* %95
%96 = getelementptr inbounds [3 x float], [3 x float]* %11, i64 0, i64 1
%97 = load float, float* %96
%98 = load float, float* %13
%99 = getelementptr inbounds [3 x float], [3 x float]* %9, i64 0, i64 1
%100 = load float, float* %99
%101 = load float, float* %6
%102 = call float @cos(float %101)
%103 = fmul float %100, %102
%104 = load float, float* %12
%105 = fmul float %103, %104
%106 = call float @llvm.fmuladd.f32(float %97, float %98, float %105)
%107 = getelementptr inbounds [3 x float], [3 x float]* %10, i64 0, i64 1
%108 = load float, float* %107
%109 = load float, float* %6
%110 = call float @sin(float %109)
%111 = fmul float %108, %110
%112 = load float, float* %12
%113 = call float @llvm.fmuladd.f32(float %111, float %112, float %106)
%114 = load [3 x float]*, [3 x float]** %4
%115 = load i32, i32* %7
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds [3 x float], [3 x float]* %114, i64 %116
%118 = getelementptr inbounds [3 x float], [3 x float]* %117, i64 0, i64 1
store float %113, float* %118
%119 = getelementptr inbounds [3 x float], [3 x float]* %11, i64 0, i64 2
%120 = load float, float* %119
%121 = load float, float* %13
%122 = getelementptr inbounds [3 x float], [3 x float]* %9, i64 0, i64 2
%123 = load float, float* %122
%124 = load float, float* %6
%125 = call float @cos(float %124)
%126 = fmul float %123, %125
%127 = load float, float* %12
%128 = fmul float %126, %127
%129 = call float @llvm.fmuladd.f32(float %120, float %121, float %128)
%130 = getelementptr inbounds [3 x float], [3 x float]* %10, i64 0, i64 2
%131 = load float, float* %130
%132 = load float, float* %6
%133 = call float @sin(float %132)
%134 = fmul float %131, %133
%135 = load float, float* %12
%136 = call float @llvm.fmuladd.f32(float %134, float %135, float %129)
%137 = load [3 x float]*, [3 x float]** %4
%138 = load i32, i32* %7
%139 = sext i32 %138 to i64
%140 = getelementptr inbounds [3 x float], [3 x float]* %137, i64 %139
%141 = getelementptr inbounds [3 x float], [3 x float]* %140, i64 0, i64 2
store float %136, float* %141
%142 = load [3 x float]*, [3 x float]** %4
%143 = load i32, i32* %7
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds [3 x float], [3 x float]* %142, i64 %144
%146 = getelementptr inbounds [3 x float], [3 x float]* %145, i64 0, i64 0
%147 = load [3 x float]*, [3 x float]** %4
%148 = load i32, i32* %7
%149 = sext i32 %148 to i64
%150 = getelementptr inbounds [3 x float], [3 x float]* %147, i64 %149
%151 = getelementptr inbounds [3 x float], [3 x float]* %150, i64 0, i64 0
%152 = call i32 @normalizevector(float* %146, float* %151)
br label %153
153: ; preds = %25
%154 = load i32, i32* %7
%155 = add nsw i32 %154, 1
store i32 %155, i32* %7
br label %22
156: ; preds = %20, %22
ret void
}

LLVM IR (-O2):
define void @rotateorientation([3 x float]* %0, float* %1, float %2) {
%4 = alloca [3 x float]
%5 = alloca [3 x float]
%6 = alloca [3 x float]
%7 = alloca [3 x float]
%8 = bitcast [3 x float]* %4 to i8*
%9 = bitcast [3 x float]* %5 to i8*
%10 = bitcast [3 x float]* %6 to i8*
%11 = bitcast [3 x float]* %7 to i8*
%12 = getelementptr inbounds [3 x float], [3 x float]* %7, i64 0, i64 0
%13 = call i32 @normalizevector(float* %12, float* %1)
%14 = call float @llvm.fabs.f32(float %2)
%15 = fcmp olt float %14, 0x3F689374C0000000
br i1 %15, label %85, label %16
16: ; preds = %3
%17 = getelementptr inbounds [3 x float], [3 x float]* %4, i64 0, i64 0
%18 = getelementptr inbounds [3 x float], [3 x float]* %6, i64 0, i64 0
%19 = getelementptr inbounds [3 x float], [3 x float]* %5, i64 0, i64 0
%20 = getelementptr inbounds [3 x float], [3 x float]* %7, i64 0, i64 1
%21 = getelementptr inbounds [3 x float], [3 x float]* %4, i64 0, i64 1
%22 = getelementptr inbounds [3 x float], [3 x float]* %7, i64 0, i64 2
%23 = getelementptr inbounds [3 x float], [3 x float]* %4, i64 0, i64 2
%24 = getelementptr inbounds [3 x float], [3 x float]* %5, i64 0, i64 1
%25 = getelementptr inbounds [3 x float], [3 x float]* %6, i64 0, i64 1
%26 = getelementptr inbounds [3 x float], [3 x float]* %5, i64 0, i64 2
%27 = getelementptr inbounds [3 x float], [3 x float]* %6, i64 0, i64 2
br label %28
28: ; preds = %16, %28
%29 = phi i64 [ 0, %16 ], [ %83, %28 ]
%30 = getelementptr inbounds [3 x float], [3 x float]* %0, i64 %29, i64 0
%31 = call i32 @copyvector(float* %17, float* %30)
%32 = call i32 @crossproduct(float* %18, float* %12, float* %17)
%33 = call i32 @normalizevector(float* %18, float* %18)
%34 = call i32 @crossproduct(float* %19, float* %18, float* %12)
%35 = call i32 @normalizevector(float* %19, float* %19)
%36 = call float @dotproduct(float* %12, float* %17)
%37 = load float, float* %12
%38 = load float, float* %17
%39 = fneg float %37
%40 = call float @llvm.fmuladd.f32(float %39, float %36, float %38)
store float %40, float* %17
%41 = load float, float* %20
%42 = load float, float* %21
%43 = fneg float %41
%44 = call float @llvm.fmuladd.f32(float %43, float %36, float %42)
store float %44, float* %21
%45 = load float, float* %22
%46 = load float, float* %23
%47 = fneg float %45
%48 = call float @llvm.fmuladd.f32(float %47, float %36, float %46)
store float %48, float* %23
%49 = call float @vectorlength(float* %17)
%50 = load float, float* %12
%51 = load float, float* %19
%52 = call float @cos(float %2)
%53 = fmul float %51, %52
%54 = fmul float %49, %53
%55 = call float @llvm.fmuladd.f32(float %50, float %36, float %54)
%56 = load float, float* %18
%57 = call float @sin(float %2)
%58 = fmul float %56, %57
%59 = call float @llvm.fmuladd.f32(float %58, float %49, float %55)
store float %59, float* %30
%60 = load float, float* %20
%61 = load float, float* %24
%62 = call float @cos(float %2)
%63 = fmul float %61, %62
%64 = fmul float %49, %63
%65 = call float @llvm.fmuladd.f32(float %60, float %36, float %64)
%66 = load float, float* %25
%67 = call float @sin(float %2)
%68 = fmul float %66, %67
%69 = call float @llvm.fmuladd.f32(float %68, float %49, float %65)
%70 = getelementptr inbounds [3 x float], [3 x float]* %0, i64 %29, i64 1
store float %69, float* %70
%71 = load float, float* %22
%72 = load float, float* %26
%73 = call float @cos(float %2)
%74 = fmul float %72, %73
%75 = fmul float %49, %74
%76 = call float @llvm.fmuladd.f32(float %71, float %36, float %75)
%77 = load float, float* %27
%78 = call float @sin(float %2)
%79 = fmul float %77, %78
%80 = call float @llvm.fmuladd.f32(float %79, float %49, float %76)
%81 = getelementptr inbounds [3 x float], [3 x float]* %0, i64 %29, i64 2
store float %80, float* %81
%82 = call i32 @normalizevector(float* %30, float* %30)
%83 = add nuw nsw i64 %29, 1
%84 = icmp eq i64 %83, 3
br i1 %84, label %85, label %28
85: ; preds = %28, %3
ret void
}