#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*/ rotation_matrix3f(float, float, float, float, float *);
void get_rotation_about3f3fTTTf(float angle, float *dir, float *origin,
                                float *ttt) {
  float rot[9];
  rotation_matrix3f(angle, dir[0], dir[1], dir[2], rot);
  ttt[0] = rot[0];
  ttt[1] = rot[1];
  ttt[2] = rot[2];
  ttt[4] = rot[3];
  ttt[5] = rot[4];
  ttt[6] = rot[5];
  ttt[8] = rot[6];
  ttt[9] = rot[7];
  ttt[10] = rot[8];
  ttt[12] = -origin[0];
  ttt[13] = -origin[1];
  ttt[14] = -origin[2];
  ttt[3] = origin[0];
  ttt[7] = origin[1];
  ttt[11] = origin[2];
  ttt[15] = 1.0F;
}


x86 assembly (clang, -O0):
<get_rotation_about3f3fTTTf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movss  -0x4(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm2
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm3
lea    -0x50(%rbp),%rdi
call   1030 <rotation_matrix3f@plt>
movss  -0x50(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x4c(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x4(%rax)
movss  -0x48(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x8(%rax)
movss  -0x44(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x10(%rax)
movss  -0x40(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x14(%rax)
movss  -0x3c(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x18(%rax)
movss  -0x38(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x20(%rax)
movss  -0x34(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x24(%rax)
movss  -0x30(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x28(%rax)
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x30(%rax)
mov    -0x18(%rbp),%rax
movss  0x4(%rax),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x34(%rax)
mov    -0x18(%rbp),%rax
movss  0x8(%rax),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x38(%rax)
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0xc(%rax)
mov    -0x18(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x1c(%rax)
mov    -0x18(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x2c(%rax)
mov    -0x20(%rbp),%rax
movss  0xd95(%rip),%xmm0
movss  %xmm0,0x3c(%rax)
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_rotation_about3f3fTTTf>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rdx,%rbx
mov    %rsi,%r14
movss  (%rdi),%xmm1
movss  0x4(%rdi),%xmm2
movss  0x8(%rdi),%xmm3
mov    %rsp,%rdi
call   1030 <rotation_matrix3f@plt>
movss  (%rsp),%xmm0
movss  %xmm0,(%rbx)
movss  0x4(%rsp),%xmm0
movss  %xmm0,0x4(%rbx)
movss  0x8(%rsp),%xmm0
movss  %xmm0,0x8(%rbx)
movss  0xc(%rsp),%xmm0
movss  %xmm0,0x10(%rbx)
movss  0x10(%rsp),%xmm0
movss  %xmm0,0x14(%rbx)
movss  0x14(%rsp),%xmm0
movss  %xmm0,0x18(%rbx)
movss  0x18(%rsp),%xmm0
movss  %xmm0,0x20(%rbx)
movss  0x1c(%rsp),%xmm0
movss  %xmm0,0x24(%rbx)
movss  0x20(%rsp),%xmm0
movss  %xmm0,0x28(%rbx)
movss  (%r14),%xmm0
movaps 0xe60(%rip),%xmm1
xorps  %xmm1,%xmm0
movss  %xmm0,0x30(%rbx)
movss  0x4(%r14),%xmm0
xorps  %xmm1,%xmm0
movss  %xmm0,0x34(%rbx)
movss  0x8(%r14),%xmm0
xorps  %xmm1,%xmm0
movss  %xmm0,0x38(%rbx)
movss  (%r14),%xmm0
movss  %xmm0,0xc(%rbx)
movss  0x4(%r14),%xmm0
movss  %xmm0,0x1c(%rbx)
movss  0x8(%r14),%xmm0
movss  %xmm0,0x2c(%rbx)
movl   $0x3f800000,0x3c(%rbx)
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @get_rotation_about3f3fTTTf(float %0, float* %1, float* %2, float* %3) {
%5 = alloca float
%6 = alloca float*
%7 = alloca float*
%8 = alloca float*
%9 = alloca [9 x float]
store float %0, float* %5
store float* %1, float** %6
store float* %2, float** %7
store float* %3, float** %8
%10 = load float, float* %5
%11 = load float*, float** %6
%12 = getelementptr inbounds float, float* %11, i64 0
%13 = load float, float* %12
%14 = load float*, float** %6
%15 = getelementptr inbounds float, float* %14, i64 1
%16 = load float, float* %15
%17 = load float*, float** %6
%18 = getelementptr inbounds float, float* %17, i64 2
%19 = load float, float* %18
%20 = getelementptr inbounds [9 x float], [9 x float]* %9, i64 0, i64 0
%21 = call i32 @rotation_matrix3f(float %10, float %13, float %16, float %19, float* %20)
%22 = getelementptr inbounds [9 x float], [9 x float]* %9, i64 0, i64 0
%23 = load float, float* %22
%24 = load float*, float** %8
%25 = getelementptr inbounds float, float* %24, i64 0
store float %23, float* %25
%26 = getelementptr inbounds [9 x float], [9 x float]* %9, i64 0, i64 1
%27 = load float, float* %26
%28 = load float*, float** %8
%29 = getelementptr inbounds float, float* %28, i64 1
store float %27, float* %29
%30 = getelementptr inbounds [9 x float], [9 x float]* %9, i64 0, i64 2
%31 = load float, float* %30
%32 = load float*, float** %8
%33 = getelementptr inbounds float, float* %32, i64 2
store float %31, float* %33
%34 = getelementptr inbounds [9 x float], [9 x float]* %9, i64 0, i64 3
%35 = load float, float* %34
%36 = load float*, float** %8
%37 = getelementptr inbounds float, float* %36, i64 4
store float %35, float* %37
%38 = getelementptr inbounds [9 x float], [9 x float]* %9, i64 0, i64 4
%39 = load float, float* %38
%40 = load float*, float** %8
%41 = getelementptr inbounds float, float* %40, i64 5
store float %39, float* %41
%42 = getelementptr inbounds [9 x float], [9 x float]* %9, i64 0, i64 5
%43 = load float, float* %42
%44 = load float*, float** %8
%45 = getelementptr inbounds float, float* %44, i64 6
store float %43, float* %45
%46 = getelementptr inbounds [9 x float], [9 x float]* %9, i64 0, i64 6
%47 = load float, float* %46
%48 = load float*, float** %8
%49 = getelementptr inbounds float, float* %48, i64 8
store float %47, float* %49
%50 = getelementptr inbounds [9 x float], [9 x float]* %9, i64 0, i64 7
%51 = load float, float* %50
%52 = load float*, float** %8
%53 = getelementptr inbounds float, float* %52, i64 9
store float %51, float* %53
%54 = getelementptr inbounds [9 x float], [9 x float]* %9, i64 0, i64 8
%55 = load float, float* %54
%56 = load float*, float** %8
%57 = getelementptr inbounds float, float* %56, i64 10
store float %55, float* %57
%58 = load float*, float** %7
%59 = getelementptr inbounds float, float* %58, i64 0
%60 = load float, float* %59
%61 = fneg float %60
%62 = load float*, float** %8
%63 = getelementptr inbounds float, float* %62, i64 12
store float %61, float* %63
%64 = load float*, float** %7
%65 = getelementptr inbounds float, float* %64, i64 1
%66 = load float, float* %65
%67 = fneg float %66
%68 = load float*, float** %8
%69 = getelementptr inbounds float, float* %68, i64 13
store float %67, float* %69
%70 = load float*, float** %7
%71 = getelementptr inbounds float, float* %70, i64 2
%72 = load float, float* %71
%73 = fneg float %72
%74 = load float*, float** %8
%75 = getelementptr inbounds float, float* %74, i64 14
store float %73, float* %75
%76 = load float*, float** %7
%77 = getelementptr inbounds float, float* %76, i64 0
%78 = load float, float* %77
%79 = load float*, float** %8
%80 = getelementptr inbounds float, float* %79, i64 3
store float %78, float* %80
%81 = load float*, float** %7
%82 = getelementptr inbounds float, float* %81, i64 1
%83 = load float, float* %82
%84 = load float*, float** %8
%85 = getelementptr inbounds float, float* %84, i64 7
store float %83, float* %85
%86 = load float*, float** %7
%87 = getelementptr inbounds float, float* %86, i64 2
%88 = load float, float* %87
%89 = load float*, float** %8
%90 = getelementptr inbounds float, float* %89, i64 11
store float %88, float* %90
%91 = load float*, float** %8
%92 = getelementptr inbounds float, float* %91, i64 15
store float 1.000000e+00, float* %92
ret void
}

LLVM IR (-O2):
define void @get_rotation_about3f3fTTTf(float %0, float* nocapture %1, float* nocapture %2, float* nocapture writeonly %3) {
%5 = alloca [9 x float]
%6 = bitcast [9 x float]* %5 to i8*
%7 = load float, float* %1
%8 = getelementptr inbounds float, float* %1, i64 1
%9 = load float, float* %8
%10 = getelementptr inbounds float, float* %1, i64 2
%11 = load float, float* %10
%12 = getelementptr inbounds [9 x float], [9 x float]* %5, i64 0, i64 0
%13 = call i32 @rotation_matrix3f(float %0, float %7, float %9, float %11, float* %12)
%14 = load float, float* %12
store float %14, float* %3
%15 = getelementptr inbounds [9 x float], [9 x float]* %5, i64 0, i64 1
%16 = load float, float* %15
%17 = getelementptr inbounds float, float* %3, i64 1
store float %16, float* %17
%18 = getelementptr inbounds [9 x float], [9 x float]* %5, i64 0, i64 2
%19 = load float, float* %18
%20 = getelementptr inbounds float, float* %3, i64 2
store float %19, float* %20
%21 = getelementptr inbounds [9 x float], [9 x float]* %5, i64 0, i64 3
%22 = load float, float* %21
%23 = getelementptr inbounds float, float* %3, i64 4
store float %22, float* %23
%24 = getelementptr inbounds [9 x float], [9 x float]* %5, i64 0, i64 4
%25 = load float, float* %24
%26 = getelementptr inbounds float, float* %3, i64 5
store float %25, float* %26
%27 = getelementptr inbounds [9 x float], [9 x float]* %5, i64 0, i64 5
%28 = load float, float* %27
%29 = getelementptr inbounds float, float* %3, i64 6
store float %28, float* %29
%30 = getelementptr inbounds [9 x float], [9 x float]* %5, i64 0, i64 6
%31 = load float, float* %30
%32 = getelementptr inbounds float, float* %3, i64 8
store float %31, float* %32
%33 = getelementptr inbounds [9 x float], [9 x float]* %5, i64 0, i64 7
%34 = load float, float* %33
%35 = getelementptr inbounds float, float* %3, i64 9
store float %34, float* %35
%36 = getelementptr inbounds [9 x float], [9 x float]* %5, i64 0, i64 8
%37 = load float, float* %36
%38 = getelementptr inbounds float, float* %3, i64 10
store float %37, float* %38
%39 = load float, float* %2
%40 = fneg float %39
%41 = getelementptr inbounds float, float* %3, i64 12
store float %40, float* %41
%42 = getelementptr inbounds float, float* %2, i64 1
%43 = load float, float* %42
%44 = fneg float %43
%45 = getelementptr inbounds float, float* %3, i64 13
store float %44, float* %45
%46 = getelementptr inbounds float, float* %2, i64 2
%47 = load float, float* %46
%48 = fneg float %47
%49 = getelementptr inbounds float, float* %3, i64 14
store float %48, float* %49
%50 = load float, float* %2
%51 = getelementptr inbounds float, float* %3, i64 3
store float %50, float* %51
%52 = load float, float* %42
%53 = getelementptr inbounds float, float* %3, i64 7
store float %52, float* %53
%54 = load float, float* %46
%55 = getelementptr inbounds float, float* %3, i64 11
store float %54, float* %55
%56 = getelementptr inbounds float, float* %3, i64 15
store float 1.000000e+00, float* %56
ret void
}