#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 */
double NAN;
scalar_t__ fabs(double);
double sqrt(double);
__attribute__((warn_unused_result)) int
orthoBaseFromVector(double *Ax, double *Ay, double *Az, double *A1x,
                    double *A1y, double *A1z, double *A2x, double *A2y,
                    double *A2z) {
  double normA = sqrt((*Ax) * (*Ax) + (*Ay) * (*Ay) + (*Az) * (*Az));
  if (normA == 0.) {
    (*Ax) = NAN;
    (*Ay) = NAN;
    (*Az) = NAN;
    (*A1x) = NAN;
    (*A1y) = NAN;
    (*A1z) = NAN;
    (*A2x) = NAN;
    (*A2y) = NAN;
    (*A2z) = NAN;
    return 1;
  }
  (*Ax) /= normA;
  (*Ay) /= normA;
  (*Az) /= normA;
  if (fabs(*Ax) > fabs(*Ay)) {
    if (fabs((*Ax)) > fabs((*Az))) {
      (*A1x) = (*Ay);
      (*A1y) = -(*Ax);
      (*A1z) = 0;
    } else {
      (*A1z) = (*Ax);
      (*A1y) = -(*Az);
      (*A1x) = 0;
    }
  } else if (fabs(*Ay) > fabs(*Az)) {
    (*A1y) = (*Ax);
    (*A1x) = -(*Ay);
    (*A1z) = 0;
  } else {
    (*A1z) = (*Ax);
    (*A1y) = -(*Az);
    (*A1x) = 0;
  }
  double normA1 = sqrt((*A1x) * (*A1x) + (*A1y) * (*A1y) + (*A1z) * (*A1z));
  (*A1x) /= normA1;
  (*A1y) /= normA1;
  (*A1z) /= normA1;
  (*A2x) = *Ay * *A1z - *Az * *A1y;
  (*A2y) = *Az * *A1x - *Ax * *A1z;
  (*A2z) = *Ax * *A1y - *Ay * *A1x;
  return 0;
}


x86 assembly (clang, -O0):
<orthoBaseFromVector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
mulsd  (%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1265 <orthoBaseFromVector+0x145>
jp     1265 <orthoBaseFromVector+0x145>
mov    0x2e43(%rip),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    0x2e30(%rip),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    0x2e1d(%rip),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    0x2e0a(%rip),%rax
movsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
mov    0x2df7(%rip),%rax
movsd  (%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
mov    0x2de4(%rip),%rax
movsd  (%rax),%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
mov    0x2dd1(%rip),%rax
movsd  (%rax),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    0x2dbe(%rip),%rax
movsd  (%rax),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    0x2dab(%rip),%rax
movsd  (%rax),%xmm0
mov    0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    15af <orthoBaseFromVector+0x48f>
movsd  -0x40(%rbp),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
movsd  -0x40(%rbp),%xmm1
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
movsd  -0x40(%rbp),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <fabs@plt>
mov    %rax,-0x50(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <fabs@plt>
mov    %rax,%rcx
mov    -0x50(%rbp),%rax
cmp    %rcx,%rax
jle    138e <orthoBaseFromVector+0x26e>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <fabs@plt>
mov    %rax,-0x58(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <fabs@plt>
mov    %rax,%rcx
mov    -0x58(%rbp),%rax
cmp    %rcx,%rax
jle    1347 <orthoBaseFromVector+0x227>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x38(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
jmp    1389 <orthoBaseFromVector+0x269>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
jmp    144a <orthoBaseFromVector+0x32a>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <fabs@plt>
mov    %rax,-0x60(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <fabs@plt>
mov    %rax,%rcx
mov    -0x60(%rbp),%rax
cmp    %rcx,%rax
jle    1403 <orthoBaseFromVector+0x2e3>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x38(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
jmp    1445 <orthoBaseFromVector+0x325>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
jmp    144a <orthoBaseFromVector+0x32a>
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x30(%rbp),%rax
mulsd  (%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm1
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
movsd  -0x48(%rbp),%xmm1
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
movsd  -0x48(%rbp),%xmm1
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x30(%rbp),%rax
mulsd  (%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x38(%rbp),%rax
mulsd  (%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x28(%rbp),%rax
mulsd  (%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<orthoBaseFromVector>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,%r15
mov    %r8,%rbx
mov    %rcx,%rbp
mov    %rdx,%r14
mov    %rsi,%r13
mov    %rdi,%r12
movsd  (%rdi),%xmm1
movsd  (%rsi),%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  (%rdx),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     116d <orthoBaseFromVector+0x4d>
sqrtsd %xmm0,%xmm0
jmp    1176 <orthoBaseFromVector+0x56>
call   1040 <sqrt@plt>
xorpd  %xmm1,%xmm1
mov    0x50(%rsp),%rcx
mov    0x48(%rsp),%rdx
mov    0x40(%rsp),%rsi
ucomisd %xmm1,%xmm0
jne    11e9 <orthoBaseFromVector+0xc9>
jp     11e9 <orthoBaseFromVector+0xc9>
mov    0x2e64(%rip),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,(%r12)
movsd  (%rax),%xmm0
movsd  %xmm0,0x0(%r13)
movsd  (%rax),%xmm0
movsd  %xmm0,(%r14)
movsd  (%rax),%xmm0
movsd  %xmm0,0x0(%rbp)
movsd  (%rax),%xmm0
movsd  %xmm0,(%rbx)
movsd  (%rax),%xmm0
movsd  %xmm0,(%r15)
movsd  (%rax),%xmm0
movsd  %xmm0,(%rsi)
movsd  (%rax),%xmm0
movsd  %xmm0,(%rdx)
movsd  (%rax),%xmm0
mov    $0x1,%eax
jmp    1393 <orthoBaseFromVector+0x273>
mov    %rbp,(%rsp)
mov    %r15,%rbp
movsd  (%r12),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%r12)
movsd  0x0(%r13),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x0(%r13)
movsd  (%r14),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%r14)
movsd  (%r12),%xmm0
call   1030 <fabs@plt>
mov    %rax,%r15
movsd  0x0(%r13),%xmm0
call   1030 <fabs@plt>
cmp    %rax,%r15
jle    1273 <orthoBaseFromVector+0x153>
movsd  (%r12),%xmm0
call   1030 <fabs@plt>
mov    %rax,%r15
movsd  (%r14),%xmm0
call   1030 <fabs@plt>
cmp    %rax,%r15
jle    12a9 <orthoBaseFromVector+0x189>
movsd  0x0(%r13),%xmm0
mov    (%rsp),%r15
movsd  %xmm0,(%r15)
mov    %r12,%rax
mov    %rbx,%rcx
mov    %rbp,%rdx
jmp    12c1 <orthoBaseFromVector+0x1a1>
movsd  0x0(%r13),%xmm0
call   1030 <fabs@plt>
mov    %rax,%r15
movsd  (%r14),%xmm0
call   1030 <fabs@plt>
movsd  (%r12),%xmm0
cmp    %rax,%r15
jle    12af <orthoBaseFromVector+0x18f>
movsd  %xmm0,(%rbx)
mov    %r13,%rax
mov    (%rsp),%r15
mov    %r15,%rcx
mov    %rbp,%rdx
jmp    12c1 <orthoBaseFromVector+0x1a1>
movsd  (%r12),%xmm0
movsd  %xmm0,0x0(%rbp)
mov    %r14,%rax
mov    %rbx,%rcx
mov    (%rsp),%r15
mov    %r15,%rdx
movsd  (%rax),%xmm0
xorps  0xd34(%rip),%xmm0
movlps %xmm0,(%rcx)
movq   $0x0,(%rdx)
movsd  (%r15),%xmm1
movsd  (%rbx),%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0x0(%rbp),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1308 <orthoBaseFromVector+0x1e8>
sqrtsd %xmm0,%xmm0
jmp    130d <orthoBaseFromVector+0x1ed>
call   1040 <sqrt@plt>
mov    0x50(%rsp),%rcx
mov    0x48(%rsp),%rax
mov    0x40(%rsp),%rdx
movsd  (%r15),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%r15)
movsd  (%rbx),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx)
movsd  0x0(%rbp),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x0(%rbp)
movsd  (%rbx),%xmm0
mulsd  (%r14),%xmm0
mulsd  0x0(%r13),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,(%rdx)
movsd  (%r14),%xmm0
movsd  0x0(%rbp),%xmm1
mulsd  (%r12),%xmm1
mulsd  (%r15),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
movsd  (%r12),%xmm0
movsd  (%r15),%xmm1
mulsd  0x0(%r13),%xmm1
mulsd  (%rbx),%xmm0
subsd  %xmm1,%xmm0
xor    %eax,%eax
movsd  %xmm0,(%rcx)
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@NAN = global double 0.000000e+00
define i32 @orthoBaseFromVector(double* %0, double* %1, double* %2, double* %3, double* %4, double* %5, double* %6, double* %7, double* %8) {
%10 = alloca i32
%11 = alloca double*
%12 = alloca double*
%13 = alloca double*
%14 = alloca double*
%15 = alloca double*
%16 = alloca double*
%17 = alloca double*
%18 = alloca double*
%19 = alloca double*
%20 = alloca double
%21 = alloca double
store double* %0, double** %11
store double* %1, double** %12
store double* %2, double** %13
store double* %3, double** %14
store double* %4, double** %15
store double* %5, double** %16
store double* %6, double** %17
store double* %7, double** %18
store double* %8, double** %19
%22 = load double*, double** %11
%23 = load double, double* %22
%24 = load double*, double** %11
%25 = load double, double* %24
%26 = load double*, double** %12
%27 = load double, double* %26
%28 = load double*, double** %12
%29 = load double, double* %28
%30 = fmul double %27, %29
%31 = call double @llvm.fmuladd.f64(double %23, double %25, double %30)
%32 = load double*, double** %13
%33 = load double, double* %32
%34 = load double*, double** %13
%35 = load double, double* %34
%36 = call double @llvm.fmuladd.f64(double %33, double %35, double %31)
%37 = call double @sqrt(double %36)
store double %37, double* %20
%38 = load double, double* %20
%39 = fcmp oeq double %38, 0.000000e+00
br i1 %39, label %40, label %59
40: ; preds = %9
%41 = load double, double* @NAN
%42 = load double*, double** %11
store double %41, double* %42
%43 = load double, double* @NAN
%44 = load double*, double** %12
store double %43, double* %44
%45 = load double, double* @NAN
%46 = load double*, double** %13
store double %45, double* %46
%47 = load double, double* @NAN
%48 = load double*, double** %14
store double %47, double* %48
%49 = load double, double* @NAN
%50 = load double*, double** %15
store double %49, double* %50
%51 = load double, double* @NAN
%52 = load double*, double** %16
store double %51, double* %52
%53 = load double, double* @NAN
%54 = load double*, double** %17
store double %53, double* %54
%55 = load double, double* @NAN
%56 = load double*, double** %18
store double %55, double* %56
%57 = load double, double* @NAN
%58 = load double*, double** %19
store double %57, double* %58
store i32 1, i32* %10
br label %198
59: ; preds = %9
%60 = load double, double* %20
%61 = load double*, double** %11
%62 = load double, double* %61
%63 = fdiv double %62, %60
store double %63, double* %61
%64 = load double, double* %20
%65 = load double*, double** %12
%66 = load double, double* %65
%67 = fdiv double %66, %64
store double %67, double* %65
%68 = load double, double* %20
%69 = load double*, double** %13
%70 = load double, double* %69
%71 = fdiv double %70, %68
store double %71, double* %69
%72 = load double*, double** %11
%73 = load double, double* %72
%74 = call i64 @fabs(double %73)
%75 = load double*, double** %12
%76 = load double, double* %75
%77 = call i64 @fabs(double %76)
%78 = icmp sgt i64 %74, %77
br i1 %78, label %79, label %106
79: ; preds = %59
%80 = load double*, double** %11
%81 = load double, double* %80
%82 = call i64 @fabs(double %81)
%83 = load double*, double** %13
%84 = load double, double* %83
%85 = call i64 @fabs(double %84)
%86 = icmp sgt i64 %82, %85
br i1 %86, label %87, label %96
87: ; preds = %79
%88 = load double*, double** %12
%89 = load double, double* %88
%90 = load double*, double** %14
store double %89, double* %90
%91 = load double*, double** %11
%92 = load double, double* %91
%93 = fneg double %92
%94 = load double*, double** %15
store double %93, double* %94
%95 = load double*, double** %16
store double 0.000000e+00, double* %95
br label %105
96: ; preds = %79
%97 = load double*, double** %11
%98 = load double, double* %97
%99 = load double*, double** %16
store double %98, double* %99
%100 = load double*, double** %13
%101 = load double, double* %100
%102 = fneg double %101
%103 = load double*, double** %15
store double %102, double* %103
%104 = load double*, double** %14
store double 0.000000e+00, double* %104
br label %105
105: ; preds = %96, %87
br label %133
106: ; preds = %59
%107 = load double*, double** %12
%108 = load double, double* %107
%109 = call i64 @fabs(double %108)
%110 = load double*, double** %13
%111 = load double, double* %110
%112 = call i64 @fabs(double %111)
%113 = icmp sgt i64 %109, %112
br i1 %113, label %114, label %123
114: ; preds = %106
%115 = load double*, double** %11
%116 = load double, double* %115
%117 = load double*, double** %15
store double %116, double* %117
%118 = load double*, double** %12
%119 = load double, double* %118
%120 = fneg double %119
%121 = load double*, double** %14
store double %120, double* %121
%122 = load double*, double** %16
store double 0.000000e+00, double* %122
br label %132
123: ; preds = %106
%124 = load double*, double** %11
%125 = load double, double* %124
%126 = load double*, double** %16
store double %125, double* %126
%127 = load double*, double** %13
%128 = load double, double* %127
%129 = fneg double %128
%130 = load double*, double** %15
store double %129, double* %130
%131 = load double*, double** %14
store double 0.000000e+00, double* %131
br label %132
132: ; preds = %123, %114
br label %133
133: ; preds = %132, %105
%134 = load double*, double** %14
%135 = load double, double* %134
%136 = load double*, double** %14
%137 = load double, double* %136
%138 = load double*, double** %15
%139 = load double, double* %138
%140 = load double*, double** %15
%141 = load double, double* %140
%142 = fmul double %139, %141
%143 = call double @llvm.fmuladd.f64(double %135, double %137, double %142)
%144 = load double*, double** %16
%145 = load double, double* %144
%146 = load double*, double** %16
%147 = load double, double* %146
%148 = call double @llvm.fmuladd.f64(double %145, double %147, double %143)
%149 = call double @sqrt(double %148)
store double %149, double* %21
%150 = load double, double* %21
%151 = load double*, double** %14
%152 = load double, double* %151
%153 = fdiv double %152, %150
store double %153, double* %151
%154 = load double, double* %21
%155 = load double*, double** %15
%156 = load double, double* %155
%157 = fdiv double %156, %154
store double %157, double* %155
%158 = load double, double* %21
%159 = load double*, double** %16
%160 = load double, double* %159
%161 = fdiv double %160, %158
store double %161, double* %159
%162 = load double*, double** %12
%163 = load double, double* %162
%164 = load double*, double** %16
%165 = load double, double* %164
%166 = load double*, double** %13
%167 = load double, double* %166
%168 = load double*, double** %15
%169 = load double, double* %168
%170 = fmul double %167, %169
%171 = fneg double %170
%172 = call double @llvm.fmuladd.f64(double %163, double %165, double %171)
%173 = load double*, double** %17
store double %172, double* %173
%174 = load double*, double** %13
%175 = load double, double* %174
%176 = load double*, double** %14
%177 = load double, double* %176
%178 = load double*, double** %11
%179 = load double, double* %178
%180 = load double*, double** %16
%181 = load double, double* %180
%182 = fmul double %179, %181
%183 = fneg double %182
%184 = call double @llvm.fmuladd.f64(double %175, double %177, double %183)
%185 = load double*, double** %18
store double %184, double* %185
%186 = load double*, double** %11
%187 = load double, double* %186
%188 = load double*, double** %15
%189 = load double, double* %188
%190 = load double*, double** %12
%191 = load double, double* %190
%192 = load double*, double** %14
%193 = load double, double* %192
%194 = fmul double %191, %193
%195 = fneg double %194
%196 = call double @llvm.fmuladd.f64(double %187, double %189, double %195)
%197 = load double*, double** %19
store double %196, double* %197
store i32 0, i32* %10
br label %198
198: ; preds = %133, %40
%199 = load i32, i32* %10
ret i32 %199
}

LLVM IR (-O2):
@NAN = global double 0.000000e+00
define i32 @orthoBaseFromVector(double* nocapture %0, double* nocapture %1, double* nocapture %2, double* nocapture %3, double* nocapture %4, double* nocapture %5, double* nocapture writeonly %6, double* nocapture writeonly %7, double* nocapture writeonly %8) {
%10 = load double, double* %0
%11 = load double, double* %1
%12 = fmul double %11, %11
%13 = tail call double @llvm.fmuladd.f64(double %10, double %10, double %12)
%14 = load double, double* %2
%15 = tail call double @llvm.fmuladd.f64(double %14, double %14, double %13)
%16 = tail call double @sqrt(double %15)
%17 = fcmp oeq double %16, 0.000000e+00
br i1 %17, label %18, label %28
18: ; preds = %9
%19 = load double, double* @NAN
store double %19, double* %0
%20 = load double, double* @NAN
store double %20, double* %1
%21 = load double, double* @NAN
store double %21, double* %2
%22 = load double, double* @NAN
store double %22, double* %3
%23 = load double, double* @NAN
store double %23, double* %4
%24 = load double, double* @NAN
store double %24, double* %5
%25 = load double, double* @NAN
store double %25, double* %6
%26 = load double, double* @NAN
store double %26, double* %7
%27 = load double, double* @NAN
br label %98
28: ; preds = %9
%29 = load double, double* %0
%30 = fdiv double %29, %16
store double %30, double* %0
%31 = load double, double* %1
%32 = fdiv double %31, %16
store double %32, double* %1
%33 = load double, double* %2
%34 = fdiv double %33, %16
store double %34, double* %2
%35 = load double, double* %0
%36 = tail call i64 @fabs(double %35)
%37 = load double, double* %1
%38 = tail call i64 @fabs(double %37)
%39 = icmp sgt i64 %36, %38
br i1 %39, label %40, label %50
40: ; preds = %28
%41 = load double, double* %0
%42 = tail call i64 @fabs(double %41)
%43 = load double, double* %2
%44 = tail call i64 @fabs(double %43)
%45 = icmp sgt i64 %42, %44
br i1 %45, label %46, label %48
46: ; preds = %40
%47 = load double, double* %1
store double %47, double* %3
br label %59
48: ; preds = %40
%49 = load double, double* %0
store double %49, double* %5
br label %59
50: ; preds = %28
%51 = load double, double* %1
%52 = tail call i64 @fabs(double %51)
%53 = load double, double* %2
%54 = tail call i64 @fabs(double %53)
%55 = icmp sgt i64 %52, %54
%56 = load double, double* %0
br i1 %55, label %57, label %58
57: ; preds = %50
store double %56, double* %4
br label %59
58: ; preds = %50
store double %56, double* %5
br label %59
59: ; preds = %57, %58, %46, %48
%60 = phi double* [ %1, %57 ], [ %2, %58 ], [ %0, %46 ], [ %2, %48 ]
%61 = phi double* [ %3, %57 ], [ %4, %58 ], [ %4, %46 ], [ %4, %48 ]
%62 = phi double* [ %5, %57 ], [ %3, %58 ], [ %5, %46 ], [ %3, %48 ]
%63 = load double, double* %60
%64 = fneg double %63
store double %64, double* %61
store double 0.000000e+00, double* %62
%65 = load double, double* %3
%66 = load double, double* %4
%67 = fmul double %66, %66
%68 = tail call double @llvm.fmuladd.f64(double %65, double %65, double %67)
%69 = load double, double* %5
%70 = tail call double @llvm.fmuladd.f64(double %69, double %69, double %68)
%71 = tail call double @sqrt(double %70)
%72 = load double, double* %3
%73 = fdiv double %72, %71
store double %73, double* %3
%74 = load double, double* %4
%75 = fdiv double %74, %71
store double %75, double* %4
%76 = load double, double* %5
%77 = fdiv double %76, %71
store double %77, double* %5
%78 = load double, double* %1
%79 = load double, double* %2
%80 = load double, double* %4
%81 = fneg double %79
%82 = fmul double %80, %81
%83 = tail call double @llvm.fmuladd.f64(double %78, double %77, double %82)
store double %83, double* %6
%84 = load double, double* %2
%85 = load double, double* %3
%86 = load double, double* %0
%87 = load double, double* %5
%88 = fneg double %86
%89 = fmul double %87, %88
%90 = tail call double @llvm.fmuladd.f64(double %84, double %85, double %89)
store double %90, double* %7
%91 = load double, double* %0
%92 = load double, double* %4
%93 = load double, double* %1
%94 = load double, double* %3
%95 = fneg double %93
%96 = fmul double %94, %95
%97 = tail call double @llvm.fmuladd.f64(double %91, double %92, double %96)
br label %98
98: ; preds = %59, %18
%99 = phi double [ %97, %59 ], [ %27, %18 ]
%100 = phi i32 [ 0, %59 ], [ 1, %18 ]
store double %99, double* %8
ret i32 %100
}