#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*/ add3d(double *, double *, double *);
int /*<<< orphan*/ cross_product3d(double *, double *, double *);
int /*<<< orphan*/ normalize3d(double *);
int /*<<< orphan*/ recondition44d(double *);
int /*<<< orphan*/ remove_component3d(double *, double *, double *);
int /*<<< orphan*/ scale3d(double *, double, double *);
void reorient44d(double *matrix) {
  double tmp[16];
  int a;
  for (a = 0; a < 3; a++) {
    normalize3d(matrix);
    normalize3d(matrix + 4);
    normalize3d(matrix + 8);
    cross_product3d(matrix + 4, matrix + 8, tmp);
    cross_product3d(matrix + 8, matrix, tmp + 4);
    cross_product3d(matrix, matrix + 4, tmp + 8);
    normalize3d(tmp);
    normalize3d(tmp + 4);
    normalize3d(tmp + 8);
    scale3d(tmp, 2.0, tmp);
    scale3d(tmp + 4, 2.0, tmp + 4);
    scale3d(tmp + 8, 2.0, tmp + 8);
    add3d(matrix, tmp, tmp);
    add3d(matrix + 4, tmp + 4, tmp + 4);
    add3d(matrix + 8, tmp + 8, tmp + 8);
    {
      (matrix)[0] = (tmp)[0];
      (matrix)[1] = (tmp)[1];
      (matrix)[2] = (tmp)[2];
    };
    {
      (matrix + 4)[0] = (tmp + 4)[0];
      (matrix + 4)[1] = (tmp + 4)[1];
      (matrix + 4)[2] = (tmp + 4)[2];
    };
    {
      (matrix + 8)[0] = (tmp + 8)[0];
      (matrix + 8)[1] = (tmp + 8)[1];
      (matrix + 8)[2] = (tmp + 8)[2];
    };
  }
  normalize3d(matrix);
  normalize3d(matrix + 4);
  normalize3d(matrix + 8);
  {
    (tmp)[0] = (matrix)[0];
    (tmp)[1] = (matrix)[1];
    (tmp)[2] = (matrix)[2];
  };
  remove_component3d(matrix + 4, tmp, tmp + 4);
  cross_product3d(tmp, tmp + 4, tmp + 8);
  normalize3d(tmp + 4);
  normalize3d(tmp + 8);
  recondition44d(tmp);
  {
    (matrix)[0] = (tmp)[0];
    (matrix)[1] = (tmp)[1];
    (matrix)[2] = (tmp)[2];
  };
  {
    (matrix + 4)[0] = (tmp + 4)[0];
    (matrix + 4)[1] = (tmp + 4)[1];
    (matrix + 4)[2] = (tmp + 4)[2];
  };
  {
    (matrix + 8)[0] = (tmp + 8)[0];
    (matrix + 8)[1] = (tmp + 8)[1];
    (matrix + 8)[2] = (tmp + 8)[2];
  };
}


x86 assembly (clang, -O0):
<reorient44d>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x94(%rbp)
cmpl   $0x3,-0x94(%rbp)
jge    137e <reorient44d+0x21e>
mov    -0x8(%rbp),%rdi
call   1050 <normalize3d@plt>
mov    -0x8(%rbp),%rdi
add    $0x20,%rdi
call   1050 <normalize3d@plt>
mov    -0x8(%rbp),%rdi
add    $0x40,%rdi
call   1050 <normalize3d@plt>
mov    -0x8(%rbp),%rdi
add    $0x20,%rdi
mov    -0x8(%rbp),%rsi
add    $0x40,%rsi
lea    -0x90(%rbp),%rdx
call   1070 <cross_product3d@plt>
mov    -0x8(%rbp),%rdi
add    $0x40,%rdi
mov    -0x8(%rbp),%rsi
lea    -0x90(%rbp),%rdx
add    $0x20,%rdx
call   1070 <cross_product3d@plt>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0x20,%rsi
lea    -0x90(%rbp),%rdx
add    $0x40,%rdx
call   1070 <cross_product3d@plt>
lea    -0x90(%rbp),%rdi
call   1050 <normalize3d@plt>
lea    -0x90(%rbp),%rdi
add    $0x20,%rdi
call   1050 <normalize3d@plt>
lea    -0x90(%rbp),%rdi
add    $0x40,%rdi
call   1050 <normalize3d@plt>
lea    -0x90(%rbp),%rdi
lea    -0x90(%rbp),%rsi
movsd  0xdc1(%rip),%xmm0
call   1080 <scale3d@plt>
lea    -0x90(%rbp),%rdi
add    $0x20,%rdi
lea    -0x90(%rbp),%rsi
add    $0x20,%rsi
movsd  0xd9e(%rip),%xmm0
call   1080 <scale3d@plt>
lea    -0x90(%rbp),%rdi
add    $0x40,%rdi
lea    -0x90(%rbp),%rsi
add    $0x40,%rsi
movsd  0xd7b(%rip),%xmm0
call   1080 <scale3d@plt>
mov    -0x8(%rbp),%rdi
lea    -0x90(%rbp),%rsi
lea    -0x90(%rbp),%rdx
call   1040 <add3d@plt>
mov    -0x8(%rbp),%rdi
add    $0x20,%rdi
lea    -0x90(%rbp),%rsi
add    $0x20,%rsi
lea    -0x90(%rbp),%rdx
add    $0x20,%rdx
call   1040 <add3d@plt>
mov    -0x8(%rbp),%rdi
add    $0x40,%rdi
lea    -0x90(%rbp),%rsi
add    $0x40,%rsi
lea    -0x90(%rbp),%rdx
add    $0x40,%rdx
call   1040 <add3d@plt>
movsd  -0x90(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x80(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0x70(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  -0x68(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x28(%rax)
movsd  -0x60(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x30(%rax)
movsd  -0x50(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x40(%rax)
movsd  -0x48(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x48(%rax)
movsd  -0x40(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x50(%rax)
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    1179 <reorient44d+0x19>
mov    -0x8(%rbp),%rdi
call   1050 <normalize3d@plt>
mov    -0x8(%rbp),%rdi
add    $0x20,%rdi
call   1050 <normalize3d@plt>
mov    -0x8(%rbp),%rdi
add    $0x40,%rdi
call   1050 <normalize3d@plt>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x20,%rdi
lea    -0x90(%rbp),%rsi
lea    -0x90(%rbp),%rdx
add    $0x20,%rdx
call   1060 <remove_component3d@plt>
lea    -0x90(%rbp),%rdi
lea    -0x90(%rbp),%rsi
add    $0x20,%rsi
lea    -0x90(%rbp),%rdx
add    $0x40,%rdx
call   1070 <cross_product3d@plt>
lea    -0x90(%rbp),%rdi
add    $0x20,%rdi
call   1050 <normalize3d@plt>
lea    -0x90(%rbp),%rdi
add    $0x40,%rdi
call   1050 <normalize3d@plt>
lea    -0x90(%rbp),%rdi
call   1030 <recondition44d@plt>
movsd  -0x90(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x80(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0x70(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  -0x68(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x28(%rax)
movsd  -0x60(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x30(%rax)
movsd  -0x50(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x40(%rax)
movsd  -0x48(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x48(%rax)
movsd  -0x40(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x50(%rax)
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reorient44d>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
mov    %rdi,%rbx
lea    0x20(%rdi),%rax
mov    %rax,0x18(%rsp)
lea    0x40(%rdi),%rax
mov    %rax,0x10(%rsp)
mov    $0x3,%eax
mov    0x18(%rsp),%r13
mov    0x10(%rsp),%r14
cs nopw 0x0(%rax,%rax,1)
nop
mov    %eax,0xc(%rsp)
mov    %rbx,%rdi
call   1050 <normalize3d@plt>
mov    %r13,%rdi
call   1050 <normalize3d@plt>
mov    %r14,%rdi
call   1050 <normalize3d@plt>
mov    %r13,%rdi
mov    %r14,%rsi
lea    0x20(%rsp),%r12
mov    %r12,%rdx
call   1070 <cross_product3d@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
lea    0x40(%rsp),%rbp
mov    %rbp,%rdx
call   1070 <cross_product3d@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
lea    0x60(%rsp),%r15
mov    %r15,%rdx
call   1070 <cross_product3d@plt>
mov    %r12,%rdi
call   1050 <normalize3d@plt>
mov    %rbp,%rdi
call   1050 <normalize3d@plt>
mov    %r15,%rdi
call   1050 <normalize3d@plt>
mov    %r12,%rdi
movsd  0xde8(%rip),%xmm0
mov    %r12,%rsi
call   1080 <scale3d@plt>
mov    %rbp,%rdi
movsd  0xdd5(%rip),%xmm0
mov    %rbp,%rsi
call   1080 <scale3d@plt>
mov    %r15,%rdi
movsd  0xdc2(%rip),%xmm0
mov    %r15,%rsi
call   1080 <scale3d@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r12,%rdx
call   1040 <add3d@plt>
mov    %r13,%rdi
mov    %rbp,%rsi
mov    %rbp,%rdx
call   1040 <add3d@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r15,%rdx
call   1040 <add3d@plt>
mov    0xc(%rsp),%eax
movaps 0x20(%rsp),%xmm0
movups %xmm0,(%rbx)
movsd  0x30(%rsp),%xmm0
movsd  %xmm0,0x10(%rbx)
movaps 0x40(%rsp),%xmm0
movups %xmm0,0x20(%rbx)
movsd  0x50(%rsp),%xmm0
movsd  %xmm0,0x30(%rbx)
movaps 0x60(%rsp),%xmm0
movups %xmm0,0x40(%rbx)
movsd  0x70(%rsp),%xmm0
movsd  %xmm0,0x50(%rbx)
add    $0xffffffff,%eax
jne    11a0 <reorient44d+0x40>
mov    %rbx,%rdi
call   1050 <normalize3d@plt>
mov    0x18(%rsp),%rbp
mov    %rbp,%rdi
call   1050 <normalize3d@plt>
mov    0x10(%rsp),%rdi
call   1050 <normalize3d@plt>
movups (%rbx),%xmm0
movaps %xmm0,0x20(%rsp)
movsd  0x10(%rbx),%xmm0
movsd  %xmm0,0x30(%rsp)
lea    0x20(%rsp),%r14
mov    %rbp,%rdi
mov    %r14,%rsi
lea    0x40(%rsp),%r15
mov    %r15,%rdx
call   1060 <remove_component3d@plt>
mov    %r14,%rdi
mov    %r15,%rsi
lea    0x60(%rsp),%rbp
mov    %rbp,%rdx
call   1070 <cross_product3d@plt>
mov    %r15,%rdi
call   1050 <normalize3d@plt>
mov    %rbp,%rdi
call   1050 <normalize3d@plt>
mov    %r14,%rdi
call   1030 <recondition44d@plt>
movaps 0x20(%rsp),%xmm0
movups %xmm0,(%rbx)
movsd  0x30(%rsp),%xmm0
movsd  %xmm0,0x10(%rbx)
movaps 0x40(%rsp),%xmm0
movups %xmm0,0x20(%rbx)
movsd  0x50(%rsp),%xmm0
movsd  %xmm0,0x30(%rbx)
movaps 0x60(%rsp),%xmm0
movups %xmm0,0x40(%rbx)
movsd  0x70(%rsp),%xmm0
movsd  %xmm0,0x50(%rbx)
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @reorient44d(double* %0) {
%2 = alloca double*
%3 = alloca [16 x double]
%4 = alloca i32
store double* %0, double** %2
store i32 0, i32* %4
br label %5
5: ; preds = %128, %1
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 3
br i1 %7, label %8, label %131
8: ; preds = %5
%9 = load double*, double** %2
%10 = call i32 @normalize3d(double* %9)
%11 = load double*, double** %2
%12 = getelementptr inbounds double, double* %11, i64 4
%13 = call i32 @normalize3d(double* %12)
%14 = load double*, double** %2
%15 = getelementptr inbounds double, double* %14, i64 8
%16 = call i32 @normalize3d(double* %15)
%17 = load double*, double** %2
%18 = getelementptr inbounds double, double* %17, i64 4
%19 = load double*, double** %2
%20 = getelementptr inbounds double, double* %19, i64 8
%21 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%22 = call i32 @cross_product3d(double* %18, double* %20, double* %21)
%23 = load double*, double** %2
%24 = getelementptr inbounds double, double* %23, i64 8
%25 = load double*, double** %2
%26 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%27 = getelementptr inbounds double, double* %26, i64 4
%28 = call i32 @cross_product3d(double* %24, double* %25, double* %27)
%29 = load double*, double** %2
%30 = load double*, double** %2
%31 = getelementptr inbounds double, double* %30, i64 4
%32 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%33 = getelementptr inbounds double, double* %32, i64 8
%34 = call i32 @cross_product3d(double* %29, double* %31, double* %33)
%35 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%36 = call i32 @normalize3d(double* %35)
%37 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%38 = getelementptr inbounds double, double* %37, i64 4
%39 = call i32 @normalize3d(double* %38)
%40 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%41 = getelementptr inbounds double, double* %40, i64 8
%42 = call i32 @normalize3d(double* %41)
%43 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%44 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%45 = call i32 @scale3d(double* %43, double 2.000000e+00, double* %44)
%46 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%47 = getelementptr inbounds double, double* %46, i64 4
%48 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%49 = getelementptr inbounds double, double* %48, i64 4
%50 = call i32 @scale3d(double* %47, double 2.000000e+00, double* %49)
%51 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%52 = getelementptr inbounds double, double* %51, i64 8
%53 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%54 = getelementptr inbounds double, double* %53, i64 8
%55 = call i32 @scale3d(double* %52, double 2.000000e+00, double* %54)
%56 = load double*, double** %2
%57 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%58 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%59 = call i32 @add3d(double* %56, double* %57, double* %58)
%60 = load double*, double** %2
%61 = getelementptr inbounds double, double* %60, i64 4
%62 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%63 = getelementptr inbounds double, double* %62, i64 4
%64 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%65 = getelementptr inbounds double, double* %64, i64 4
%66 = call i32 @add3d(double* %61, double* %63, double* %65)
%67 = load double*, double** %2
%68 = getelementptr inbounds double, double* %67, i64 8
%69 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%70 = getelementptr inbounds double, double* %69, i64 8
%71 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%72 = getelementptr inbounds double, double* %71, i64 8
%73 = call i32 @add3d(double* %68, double* %70, double* %72)
%74 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%75 = load double, double* %74
%76 = load double*, double** %2
%77 = getelementptr inbounds double, double* %76, i64 0
store double %75, double* %77
%78 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 1
%79 = load double, double* %78
%80 = load double*, double** %2
%81 = getelementptr inbounds double, double* %80, i64 1
store double %79, double* %81
%82 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 2
%83 = load double, double* %82
%84 = load double*, double** %2
%85 = getelementptr inbounds double, double* %84, i64 2
store double %83, double* %85
%86 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%87 = getelementptr inbounds double, double* %86, i64 4
%88 = getelementptr inbounds double, double* %87, i64 0
%89 = load double, double* %88
%90 = load double*, double** %2
%91 = getelementptr inbounds double, double* %90, i64 4
%92 = getelementptr inbounds double, double* %91, i64 0
store double %89, double* %92
%93 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%94 = getelementptr inbounds double, double* %93, i64 4
%95 = getelementptr inbounds double, double* %94, i64 1
%96 = load double, double* %95
%97 = load double*, double** %2
%98 = getelementptr inbounds double, double* %97, i64 4
%99 = getelementptr inbounds double, double* %98, i64 1
store double %96, double* %99
%100 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%101 = getelementptr inbounds double, double* %100, i64 4
%102 = getelementptr inbounds double, double* %101, i64 2
%103 = load double, double* %102
%104 = load double*, double** %2
%105 = getelementptr inbounds double, double* %104, i64 4
%106 = getelementptr inbounds double, double* %105, i64 2
store double %103, double* %106
%107 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%108 = getelementptr inbounds double, double* %107, i64 8
%109 = getelementptr inbounds double, double* %108, i64 0
%110 = load double, double* %109
%111 = load double*, double** %2
%112 = getelementptr inbounds double, double* %111, i64 8
%113 = getelementptr inbounds double, double* %112, i64 0
store double %110, double* %113
%114 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%115 = getelementptr inbounds double, double* %114, i64 8
%116 = getelementptr inbounds double, double* %115, i64 1
%117 = load double, double* %116
%118 = load double*, double** %2
%119 = getelementptr inbounds double, double* %118, i64 8
%120 = getelementptr inbounds double, double* %119, i64 1
store double %117, double* %120
%121 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%122 = getelementptr inbounds double, double* %121, i64 8
%123 = getelementptr inbounds double, double* %122, i64 2
%124 = load double, double* %123
%125 = load double*, double** %2
%126 = getelementptr inbounds double, double* %125, i64 8
%127 = getelementptr inbounds double, double* %126, i64 2
store double %124, double* %127
br label %128
128: ; preds = %8
%129 = load i32, i32* %4
%130 = add nsw i32 %129, 1
store i32 %130, i32* %4
br label %5
131: ; preds = %5
%132 = load double*, double** %2
%133 = call i32 @normalize3d(double* %132)
%134 = load double*, double** %2
%135 = getelementptr inbounds double, double* %134, i64 4
%136 = call i32 @normalize3d(double* %135)
%137 = load double*, double** %2
%138 = getelementptr inbounds double, double* %137, i64 8
%139 = call i32 @normalize3d(double* %138)
%140 = load double*, double** %2
%141 = getelementptr inbounds double, double* %140, i64 0
%142 = load double, double* %141
%143 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
store double %142, double* %143
%144 = load double*, double** %2
%145 = getelementptr inbounds double, double* %144, i64 1
%146 = load double, double* %145
%147 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 1
store double %146, double* %147
%148 = load double*, double** %2
%149 = getelementptr inbounds double, double* %148, i64 2
%150 = load double, double* %149
%151 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 2
store double %150, double* %151
%152 = load double*, double** %2
%153 = getelementptr inbounds double, double* %152, i64 4
%154 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%155 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%156 = getelementptr inbounds double, double* %155, i64 4
%157 = call i32 @remove_component3d(double* %153, double* %154, double* %156)
%158 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%159 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%160 = getelementptr inbounds double, double* %159, i64 4
%161 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%162 = getelementptr inbounds double, double* %161, i64 8
%163 = call i32 @cross_product3d(double* %158, double* %160, double* %162)
%164 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%165 = getelementptr inbounds double, double* %164, i64 4
%166 = call i32 @normalize3d(double* %165)
%167 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%168 = getelementptr inbounds double, double* %167, i64 8
%169 = call i32 @normalize3d(double* %168)
%170 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%171 = call i32 @recondition44d(double* %170)
%172 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%173 = load double, double* %172
%174 = load double*, double** %2
%175 = getelementptr inbounds double, double* %174, i64 0
store double %173, double* %175
%176 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 1
%177 = load double, double* %176
%178 = load double*, double** %2
%179 = getelementptr inbounds double, double* %178, i64 1
store double %177, double* %179
%180 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 2
%181 = load double, double* %180
%182 = load double*, double** %2
%183 = getelementptr inbounds double, double* %182, i64 2
store double %181, double* %183
%184 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%185 = getelementptr inbounds double, double* %184, i64 4
%186 = getelementptr inbounds double, double* %185, i64 0
%187 = load double, double* %186
%188 = load double*, double** %2
%189 = getelementptr inbounds double, double* %188, i64 4
%190 = getelementptr inbounds double, double* %189, i64 0
store double %187, double* %190
%191 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%192 = getelementptr inbounds double, double* %191, i64 4
%193 = getelementptr inbounds double, double* %192, i64 1
%194 = load double, double* %193
%195 = load double*, double** %2
%196 = getelementptr inbounds double, double* %195, i64 4
%197 = getelementptr inbounds double, double* %196, i64 1
store double %194, double* %197
%198 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%199 = getelementptr inbounds double, double* %198, i64 4
%200 = getelementptr inbounds double, double* %199, i64 2
%201 = load double, double* %200
%202 = load double*, double** %2
%203 = getelementptr inbounds double, double* %202, i64 4
%204 = getelementptr inbounds double, double* %203, i64 2
store double %201, double* %204
%205 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%206 = getelementptr inbounds double, double* %205, i64 8
%207 = getelementptr inbounds double, double* %206, i64 0
%208 = load double, double* %207
%209 = load double*, double** %2
%210 = getelementptr inbounds double, double* %209, i64 8
%211 = getelementptr inbounds double, double* %210, i64 0
store double %208, double* %211
%212 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%213 = getelementptr inbounds double, double* %212, i64 8
%214 = getelementptr inbounds double, double* %213, i64 1
%215 = load double, double* %214
%216 = load double*, double** %2
%217 = getelementptr inbounds double, double* %216, i64 8
%218 = getelementptr inbounds double, double* %217, i64 1
store double %215, double* %218
%219 = getelementptr inbounds [16 x double], [16 x double]* %3, i64 0, i64 0
%220 = getelementptr inbounds double, double* %219, i64 8
%221 = getelementptr inbounds double, double* %220, i64 2
%222 = load double, double* %221
%223 = load double*, double** %2
%224 = getelementptr inbounds double, double* %223, i64 8
%225 = getelementptr inbounds double, double* %224, i64 2
store double %222, double* %225
ret void
}

LLVM IR (-O2):
define void @reorient44d(double* %0) {
%2 = alloca [16 x double]
%3 = bitcast [16 x double]* %2 to i8*
%4 = getelementptr inbounds double, double* %0, i64 4
%5 = getelementptr inbounds double, double* %0, i64 8
%6 = getelementptr inbounds [16 x double], [16 x double]* %2, i64 0, i64 0
%7 = getelementptr inbounds [16 x double], [16 x double]* %2, i64 0, i64 4
%8 = getelementptr inbounds [16 x double], [16 x double]* %2, i64 0, i64 8
%9 = getelementptr inbounds [16 x double], [16 x double]* %2, i64 0, i64 2
%10 = getelementptr inbounds double, double* %0, i64 2
%11 = getelementptr inbounds [16 x double], [16 x double]* %2, i64 0, i64 6
%12 = getelementptr inbounds double, double* %0, i64 6
%13 = getelementptr inbounds [16 x double], [16 x double]* %2, i64 0, i64 10
%14 = getelementptr inbounds double, double* %0, i64 10
%15 = bitcast [16 x double]* %2 to <2 x double>*
%16 = bitcast double* %0 to <2 x double>*
%17 = bitcast double* %7 to <2 x double>*
%18 = bitcast double* %4 to <2 x double>*
%19 = bitcast double* %8 to <2 x double>*
%20 = bitcast double* %5 to <2 x double>*
br label %21
21: ; preds = %1, %21
%22 = phi i32 [ 0, %1 ], [ %44, %21 ]
%23 = call i32 @normalize3d(double* %0)
%24 = call i32 @normalize3d(double* %4)
%25 = call i32 @normalize3d(double* %5)
%26 = call i32 @cross_product3d(double* %4, double* %5, double* %6)
%27 = call i32 @cross_product3d(double* %5, double* %0, double* %7)
%28 = call i32 @cross_product3d(double* %0, double* %4, double* %8)
%29 = call i32 @normalize3d(double* %6)
%30 = call i32 @normalize3d(double* %7)
%31 = call i32 @normalize3d(double* %8)
%32 = call i32 @scale3d(double* %6, double 2.000000e+00, double* %6)
%33 = call i32 @scale3d(double* %7, double 2.000000e+00, double* %7)
%34 = call i32 @scale3d(double* %8, double 2.000000e+00, double* %8)
%35 = call i32 @add3d(double* %0, double* %6, double* %6)
%36 = call i32 @add3d(double* %4, double* %7, double* %7)
%37 = call i32 @add3d(double* %5, double* %8, double* %8)
%38 = load <2 x double>, <2 x double>* %15
store <2 x double> %38, <2 x double>* %16
%39 = load double, double* %9
store double %39, double* %10
%40 = load <2 x double>, <2 x double>* %17
store <2 x double> %40, <2 x double>* %18
%41 = load double, double* %11
store double %41, double* %12
%42 = load <2 x double>, <2 x double>* %19
store <2 x double> %42, <2 x double>* %20
%43 = load double, double* %13
store double %43, double* %14
%44 = add nuw nsw i32 %22, 1
%45 = icmp eq i32 %44, 3
br i1 %45, label %46, label %21
46: ; preds = %21
%47 = call i32 @normalize3d(double* %0)
%48 = call i32 @normalize3d(double* %4)
%49 = call i32 @normalize3d(double* %5)
%50 = bitcast double* %0 to <2 x double>*
%51 = load <2 x double>, <2 x double>* %50
%52 = bitcast [16 x double]* %2 to <2 x double>*
store <2 x double> %51, <2 x double>* %52
%53 = load double, double* %10
store double %53, double* %9
%54 = call i32 @remove_component3d(double* %4, double* %6, double* %7)
%55 = call i32 @cross_product3d(double* %6, double* %7, double* %8)
%56 = call i32 @normalize3d(double* %7)
%57 = call i32 @normalize3d(double* %8)
%58 = call i32 @recondition44d(double* %6)
%59 = bitcast [16 x double]* %2 to <2 x double>*
%60 = load <2 x double>, <2 x double>* %59
%61 = bitcast double* %0 to <2 x double>*
store <2 x double> %60, <2 x double>* %61
%62 = load double, double* %9
store double %62, double* %10
%63 = bitcast double* %7 to <2 x double>*
%64 = load <2 x double>, <2 x double>* %63
%65 = bitcast double* %4 to <2 x double>*
store <2 x double> %64, <2 x double>* %65
%66 = load double, double* %11
store double %66, double* %12
%67 = bitcast double* %8 to <2 x double>*
%68 = load <2 x double>, <2 x double>* %67
%69 = bitcast double* %5 to <2 x double>*
store <2 x double> %68, <2 x double>* %69
%70 = load double, double* %13
store double %70, double* %14
ret void
}