#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 */
scalar_t__ fast_eigen3x3(double **, double **, double *);
int /*<<< orphan*/ tql2(double **, double *, double *);
int /*<<< orphan*/ tred2(double **, double *, double *);
void eigen_decomposition(double A[3][3], double V[3][3], double d[3]) {
  double e[3];
  double da[3];
  double dt, dat;
  double vet[3];
  int i, j;
  if (fast_eigen3x3(A, V, d)) {
    return;
  }
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 3; j++) {
      V[i][j] = A[i][j];
    }
  }
  tred2(V, d, e);
  tql2(V, d, e);
  da[0] = ((d[0]) > (-d[0]) ? (d[0]) : (-d[0]));
  da[1] = ((d[1]) > (-d[1]) ? (d[1]) : (-d[1]));
  da[2] = ((d[2]) > (-d[2]) ? (d[2]) : (-d[2]));
  if ((da[0] >= da[1]) && (da[0] > da[2])) {
    dt = d[2];
    dat = da[2];
    vet[0] = V[0][2];
    vet[1] = V[1][2];
    vet[2] = V[2][2];
    d[2] = d[0];
    da[2] = da[0];
    V[0][2] = V[0][0];
    V[1][2] = V[1][0];
    V[2][2] = V[2][0];
    d[0] = dt;
    da[0] = dat;
    V[0][0] = vet[0];
    V[1][0] = vet[1];
    V[2][0] = vet[2];
  } else if ((da[1] >= da[0]) && (da[1] > da[2])) {
    dt = d[2];
    dat = da[2];
    vet[0] = V[0][2];
    vet[1] = V[1][2];
    vet[2] = V[2][2];
    d[2] = d[1];
    da[2] = da[1];
    V[0][2] = V[0][1];
    V[1][2] = V[1][1];
    V[2][2] = V[2][1];
    d[1] = dt;
    da[1] = dat;
    V[0][1] = vet[0];
    V[1][1] = vet[1];
    V[2][1] = vet[2];
  }
  if (da[0] > da[1]) {
    dt = d[1];
    dat = da[1];
    vet[0] = V[0][1];
    vet[1] = V[1][1];
    vet[2] = V[2][1];
    d[1] = d[0];
    da[1] = da[0];
    V[0][1] = V[0][0];
    V[1][1] = V[1][0];
    V[2][1] = V[2][0];
    d[0] = dt;
    da[0] = dat;
    V[0][0] = vet[0];
    V[1][0] = vet[1];
    V[2][0] = vet[2];
  }
}


x86 assembly (clang, -O0):
<eigen_decomposition>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <fast_eigen3x3@plt>
cmp    $0x0,%rax
je     1167 <eigen_decomposition+0x37>
jmp    166a <eigen_decomposition+0x53a>
movl   $0x0,-0x84(%rbp)
cmpl   $0x3,-0x84(%rbp)
jge    11fe <eigen_decomposition+0xce>
movl   $0x0,-0x88(%rbp)
cmpl   $0x3,-0x88(%rbp)
jge    11e5 <eigen_decomposition+0xb5>
mov    -0x8(%rbp),%rax
movslq -0x84(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x88(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x84(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x88(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    1188 <eigen_decomposition+0x58>
jmp    11ea <eigen_decomposition+0xba>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    1171 <eigen_decomposition+0x41>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    -0x30(%rbp),%rdx
call   1030 <tred2@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    -0x30(%rbp),%rdx
call   1050 <tql2@plt>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
ucomisd %xmm1,%xmm0
jbe    1266 <eigen_decomposition+0x136>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
jmp    128d <eigen_decomposition+0x15d>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x50(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
ucomisd %xmm1,%xmm0
jbe    12e3 <eigen_decomposition+0x1b3>
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
jmp    130b <eigen_decomposition+0x1db>
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x48(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
ucomisd %xmm1,%xmm0
jbe    1361 <eigen_decomposition+0x231>
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
jmp    1389 <eigen_decomposition+0x259>
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0x40(%rbp)
movsd  -0x50(%rbp),%xmm0
ucomisd -0x48(%rbp),%xmm0
jb     148d <eigen_decomposition+0x35d>
movsd  -0x50(%rbp),%xmm0
ucomisd -0x40(%rbp),%xmm0
jbe    148d <eigen_decomposition+0x35d>
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x28(%rax)
mov    -0x10(%rbp),%rax
movsd  0x30(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x40(%rax)
movsd  -0x58(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x80(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x78(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x18(%rax)
movsd  -0x70(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x30(%rax)
jmp    1588 <eigen_decomposition+0x458>
movsd  -0x48(%rbp),%xmm0
ucomisd -0x50(%rbp),%xmm0
jb     1583 <eigen_decomposition+0x453>
movsd  -0x48(%rbp),%xmm0
ucomisd -0x40(%rbp),%xmm0
jbe    1583 <eigen_decomposition+0x453>
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x28(%rax)
mov    -0x10(%rbp),%rax
movsd  0x38(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x40(%rax)
movsd  -0x58(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x80(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x78(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  -0x70(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x38(%rax)
jmp    1588 <eigen_decomposition+0x458>
movsd  -0x50(%rbp),%xmm0
ucomisd -0x48(%rbp),%xmm0
jbe    166a <eigen_decomposition+0x53a>
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x38(%rax),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x20(%rax)
mov    -0x10(%rbp),%rax
movsd  0x30(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x38(%rax)
movsd  -0x58(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x80(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x78(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x18(%rax)
movsd  -0x70(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x30(%rax)
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eigen_decomposition>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
call   1040 <fast_eigen3x3@plt>
test   %rax,%rax
jne    1301 <eigen_decomposition+0x1d1>
movsd  (%rbx),%xmm0
movsd  %xmm0,(%r15)
movsd  0x8(%rbx),%xmm0
movsd  %xmm0,0x8(%r15)
movsd  0x10(%rbx),%xmm0
movsd  %xmm0,0x10(%r15)
movsd  0x18(%rbx),%xmm0
movsd  %xmm0,0x18(%r15)
movsd  0x20(%rbx),%xmm0
movsd  %xmm0,0x20(%r15)
movsd  0x28(%rbx),%xmm0
movsd  %xmm0,0x28(%r15)
movsd  0x30(%rbx),%xmm0
movsd  %xmm0,0x30(%r15)
movsd  0x38(%rbx),%xmm0
movsd  %xmm0,0x38(%r15)
movsd  0x40(%rbx),%xmm0
movsd  %xmm0,0x40(%r15)
mov    %rsp,%rbx
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <tred2@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1050 <tql2@plt>
movsd  (%r14),%xmm3
movsd  0x8(%r14),%xmm5
movapd 0xe1d(%rip),%xmm6
movapd %xmm3,%xmm1
xorpd  %xmm6,%xmm1
movapd %xmm3,%xmm0
maxsd  %xmm1,%xmm0
movapd %xmm5,%xmm2
xorpd  %xmm6,%xmm2
movapd %xmm5,%xmm1
maxsd  %xmm2,%xmm1
movsd  0x10(%r14),%xmm2
xorpd  %xmm2,%xmm6
movapd %xmm2,%xmm4
maxsd  %xmm6,%xmm4
ucomisd %xmm1,%xmm0
jb     1235 <eigen_decomposition+0x105>
ucomisd %xmm4,%xmm0
jbe    1235 <eigen_decomposition+0x105>
lea    0x18(%r15),%rax
lea    0x30(%r15),%rcx
mov    %r15,%rdx
mov    %r14,%rsi
movapd %xmm4,%xmm0
jmp    1259 <eigen_decomposition+0x129>
ucomisd %xmm0,%xmm1
jb     129f <eigen_decomposition+0x16f>
ucomisd %xmm4,%xmm1
jbe    129f <eigen_decomposition+0x16f>
lea    0x8(%r15),%rdx
lea    0x20(%r15),%rax
lea    0x38(%r15),%rcx
lea    0x8(%r14),%rsi
movapd %xmm5,%xmm3
movapd %xmm4,%xmm1
movsd  0x10(%r15),%xmm4
movsd  0x28(%r15),%xmm5
movsd  0x40(%r15),%xmm6
movsd  %xmm3,0x10(%r14)
movsd  (%rdx),%xmm3
movsd  %xmm3,0x10(%r15)
movsd  (%rax),%xmm3
movsd  %xmm3,0x28(%r15)
movsd  (%rcx),%xmm3
movsd  %xmm3,0x40(%r15)
movsd  %xmm2,(%rsi)
movsd  %xmm4,(%rdx)
movsd  %xmm5,(%rax)
movsd  %xmm6,(%rcx)
ucomisd %xmm1,%xmm0
jbe    1301 <eigen_decomposition+0x1d1>
movsd  (%r14),%xmm0
movsd  0x8(%r14),%xmm1
movsd  0x8(%r15),%xmm2
movsd  0x20(%r15),%xmm3
movsd  0x38(%r15),%xmm4
movsd  %xmm0,0x8(%r14)
movsd  (%r15),%xmm0
movsd  0x18(%r15),%xmm5
movsd  %xmm0,0x8(%r15)
movsd  %xmm5,0x20(%r15)
movsd  0x30(%r15),%xmm0
movsd  %xmm0,0x38(%r15)
movsd  %xmm1,(%r14)
movsd  %xmm2,(%r15)
movsd  %xmm3,0x18(%r15)
movsd  %xmm4,0x30(%r15)
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @eigen_decomposition([3 x double]* %0, [3 x double]* %1, double* %2) {
%4 = alloca [3 x double]*
%5 = alloca [3 x double]*
%6 = alloca double*
%7 = alloca [3 x double]
%8 = alloca [3 x double]
%9 = alloca double
%10 = alloca double
%11 = alloca [3 x double]
%12 = alloca i32
%13 = alloca i32
store [3 x double]* %0, [3 x double]** %4
store [3 x double]* %1, [3 x double]** %5
store double* %2, double** %6
%14 = load [3 x double]*, [3 x double]** %4
%15 = bitcast [3 x double]* %14 to double**
%16 = load [3 x double]*, [3 x double]** %5
%17 = bitcast [3 x double]* %16 to double**
%18 = load double*, double** %6
%19 = call i64 @fast_eigen3x3(double** %15, double** %17, double* %18)
%20 = icmp ne i64 %19, 0
br i1 %20, label %21, label %22
21: ; preds = %3
br label %364
22: ; preds = %3
store i32 0, i32* %12
br label %23
23: ; preds = %50, %22
%24 = load i32, i32* %12
%25 = icmp slt i32 %24, 3
br i1 %25, label %26, label %53
26: ; preds = %23
store i32 0, i32* %13
br label %27
27: ; preds = %46, %26
%28 = load i32, i32* %13
%29 = icmp slt i32 %28, 3
br i1 %29, label %30, label %49
30: ; preds = %27
%31 = load [3 x double]*, [3 x double]** %4
%32 = load i32, i32* %12
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [3 x double], [3 x double]* %31, i64 %33
%35 = load i32, i32* %13
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [3 x double], [3 x double]* %34, i64 0, i64 %36
%38 = load double, double* %37
%39 = load [3 x double]*, [3 x double]** %5
%40 = load i32, i32* %12
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [3 x double], [3 x double]* %39, i64 %41
%43 = load i32, i32* %13
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [3 x double], [3 x double]* %42, i64 0, i64 %44
store double %38, double* %45
br label %46
46: ; preds = %30
%47 = load i32, i32* %13
%48 = add nsw i32 %47, 1
store i32 %48, i32* %13
br label %27
49: ; preds = %27
br label %50
50: ; preds = %49
%51 = load i32, i32* %12
%52 = add nsw i32 %51, 1
store i32 %52, i32* %12
br label %23
53: ; preds = %23
%54 = load [3 x double]*, [3 x double]** %5
%55 = bitcast [3 x double]* %54 to double**
%56 = load double*, double** %6
%57 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
%58 = call i32 @tred2(double** %55, double* %56, double* %57)
%59 = load [3 x double]*, [3 x double]** %5
%60 = bitcast [3 x double]* %59 to double**
%61 = load double*, double** %6
%62 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
%63 = call i32 @tql2(double** %60, double* %61, double* %62)
%64 = load double*, double** %6
%65 = getelementptr inbounds double, double* %64, i64 0
%66 = load double, double* %65
%67 = load double*, double** %6
%68 = getelementptr inbounds double, double* %67, i64 0
%69 = load double, double* %68
%70 = fneg double %69
%71 = fcmp ogt double %66, %70
br i1 %71, label %72, label %76
72: ; preds = %53
%73 = load double*, double** %6
%74 = getelementptr inbounds double, double* %73, i64 0
%75 = load double, double* %74
br label %81
76: ; preds = %53
%77 = load double*, double** %6
%78 = getelementptr inbounds double, double* %77, i64 0
%79 = load double, double* %78
%80 = fneg double %79
br label %81
81: ; preds = %76, %72
%82 = phi double [ %75, %72 ], [ %80, %76 ]
%83 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 0
store double %82, double* %83
%84 = load double*, double** %6
%85 = getelementptr inbounds double, double* %84, i64 1
%86 = load double, double* %85
%87 = load double*, double** %6
%88 = getelementptr inbounds double, double* %87, i64 1
%89 = load double, double* %88
%90 = fneg double %89
%91 = fcmp ogt double %86, %90
br i1 %91, label %92, label %96
92: ; preds = %81
%93 = load double*, double** %6
%94 = getelementptr inbounds double, double* %93, i64 1
%95 = load double, double* %94
br label %101
96: ; preds = %81
%97 = load double*, double** %6
%98 = getelementptr inbounds double, double* %97, i64 1
%99 = load double, double* %98
%100 = fneg double %99
br label %101
101: ; preds = %96, %92
%102 = phi double [ %95, %92 ], [ %100, %96 ]
%103 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 1
store double %102, double* %103
%104 = load double*, double** %6
%105 = getelementptr inbounds double, double* %104, i64 2
%106 = load double, double* %105
%107 = load double*, double** %6
%108 = getelementptr inbounds double, double* %107, i64 2
%109 = load double, double* %108
%110 = fneg double %109
%111 = fcmp ogt double %106, %110
br i1 %111, label %112, label %116
112: ; preds = %101
%113 = load double*, double** %6
%114 = getelementptr inbounds double, double* %113, i64 2
%115 = load double, double* %114
br label %121
116: ; preds = %101
%117 = load double*, double** %6
%118 = getelementptr inbounds double, double* %117, i64 2
%119 = load double, double* %118
%120 = fneg double %119
br label %121
121: ; preds = %116, %112
%122 = phi double [ %115, %112 ], [ %120, %116 ]
%123 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 2
store double %122, double* %123
%124 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 0
%125 = load double, double* %124
%126 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 1
%127 = load double, double* %126
%128 = fcmp oge double %125, %127
br i1 %128, label %129, label %205
129: ; preds = %121
%130 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 0
%131 = load double, double* %130
%132 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 2
%133 = load double, double* %132
%134 = fcmp ogt double %131, %133
br i1 %134, label %135, label %205
135: ; preds = %129
%136 = load double*, double** %6
%137 = getelementptr inbounds double, double* %136, i64 2
%138 = load double, double* %137
store double %138, double* %9
%139 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 2
%140 = load double, double* %139
store double %140, double* %10
%141 = load [3 x double]*, [3 x double]** %5
%142 = getelementptr inbounds [3 x double], [3 x double]* %141, i64 0
%143 = getelementptr inbounds [3 x double], [3 x double]* %142, i64 0, i64 2
%144 = load double, double* %143
%145 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 0
store double %144, double* %145
%146 = load [3 x double]*, [3 x double]** %5
%147 = getelementptr inbounds [3 x double], [3 x double]* %146, i64 1
%148 = getelementptr inbounds [3 x double], [3 x double]* %147, i64 0, i64 2
%149 = load double, double* %148
%150 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 1
store double %149, double* %150
%151 = load [3 x double]*, [3 x double]** %5
%152 = getelementptr inbounds [3 x double], [3 x double]* %151, i64 2
%153 = getelementptr inbounds [3 x double], [3 x double]* %152, i64 0, i64 2
%154 = load double, double* %153
%155 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 2
store double %154, double* %155
%156 = load double*, double** %6
%157 = getelementptr inbounds double, double* %156, i64 0
%158 = load double, double* %157
%159 = load double*, double** %6
%160 = getelementptr inbounds double, double* %159, i64 2
store double %158, double* %160
%161 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 0
%162 = load double, double* %161
%163 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 2
store double %162, double* %163
%164 = load [3 x double]*, [3 x double]** %5
%165 = getelementptr inbounds [3 x double], [3 x double]* %164, i64 0
%166 = getelementptr inbounds [3 x double], [3 x double]* %165, i64 0, i64 0
%167 = load double, double* %166
%168 = load [3 x double]*, [3 x double]** %5
%169 = getelementptr inbounds [3 x double], [3 x double]* %168, i64 0
%170 = getelementptr inbounds [3 x double], [3 x double]* %169, i64 0, i64 2
store double %167, double* %170
%171 = load [3 x double]*, [3 x double]** %5
%172 = getelementptr inbounds [3 x double], [3 x double]* %171, i64 1
%173 = getelementptr inbounds [3 x double], [3 x double]* %172, i64 0, i64 0
%174 = load double, double* %173
%175 = load [3 x double]*, [3 x double]** %5
%176 = getelementptr inbounds [3 x double], [3 x double]* %175, i64 1
%177 = getelementptr inbounds [3 x double], [3 x double]* %176, i64 0, i64 2
store double %174, double* %177
%178 = load [3 x double]*, [3 x double]** %5
%179 = getelementptr inbounds [3 x double], [3 x double]* %178, i64 2
%180 = getelementptr inbounds [3 x double], [3 x double]* %179, i64 0, i64 0
%181 = load double, double* %180
%182 = load [3 x double]*, [3 x double]** %5
%183 = getelementptr inbounds [3 x double], [3 x double]* %182, i64 2
%184 = getelementptr inbounds [3 x double], [3 x double]* %183, i64 0, i64 2
store double %181, double* %184
%185 = load double, double* %9
%186 = load double*, double** %6
%187 = getelementptr inbounds double, double* %186, i64 0
store double %185, double* %187
%188 = load double, double* %10
%189 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 0
store double %188, double* %189
%190 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 0
%191 = load double, double* %190
%192 = load [3 x double]*, [3 x double]** %5
%193 = getelementptr inbounds [3 x double], [3 x double]* %192, i64 0
%194 = getelementptr inbounds [3 x double], [3 x double]* %193, i64 0, i64 0
store double %191, double* %194
%195 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 1
%196 = load double, double* %195
%197 = load [3 x double]*, [3 x double]** %5
%198 = getelementptr inbounds [3 x double], [3 x double]* %197, i64 1
%199 = getelementptr inbounds [3 x double], [3 x double]* %198, i64 0, i64 0
store double %196, double* %199
%200 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 2
%201 = load double, double* %200
%202 = load [3 x double]*, [3 x double]** %5
%203 = getelementptr inbounds [3 x double], [3 x double]* %202, i64 2
%204 = getelementptr inbounds [3 x double], [3 x double]* %203, i64 0, i64 0
store double %201, double* %204
br label %288
205: ; preds = %129, %121
%206 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 1
%207 = load double, double* %206
%208 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 0
%209 = load double, double* %208
%210 = fcmp oge double %207, %209
br i1 %210, label %211, label %287
211: ; preds = %205
%212 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 1
%213 = load double, double* %212
%214 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 2
%215 = load double, double* %214
%216 = fcmp ogt double %213, %215
br i1 %216, label %217, label %287
217: ; preds = %211
%218 = load double*, double** %6
%219 = getelementptr inbounds double, double* %218, i64 2
%220 = load double, double* %219
store double %220, double* %9
%221 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 2
%222 = load double, double* %221
store double %222, double* %10
%223 = load [3 x double]*, [3 x double]** %5
%224 = getelementptr inbounds [3 x double], [3 x double]* %223, i64 0
%225 = getelementptr inbounds [3 x double], [3 x double]* %224, i64 0, i64 2
%226 = load double, double* %225
%227 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 0
store double %226, double* %227
%228 = load [3 x double]*, [3 x double]** %5
%229 = getelementptr inbounds [3 x double], [3 x double]* %228, i64 1
%230 = getelementptr inbounds [3 x double], [3 x double]* %229, i64 0, i64 2
%231 = load double, double* %230
%232 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 1
store double %231, double* %232
%233 = load [3 x double]*, [3 x double]** %5
%234 = getelementptr inbounds [3 x double], [3 x double]* %233, i64 2
%235 = getelementptr inbounds [3 x double], [3 x double]* %234, i64 0, i64 2
%236 = load double, double* %235
%237 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 2
store double %236, double* %237
%238 = load double*, double** %6
%239 = getelementptr inbounds double, double* %238, i64 1
%240 = load double, double* %239
%241 = load double*, double** %6
%242 = getelementptr inbounds double, double* %241, i64 2
store double %240, double* %242
%243 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 1
%244 = load double, double* %243
%245 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 2
store double %244, double* %245
%246 = load [3 x double]*, [3 x double]** %5
%247 = getelementptr inbounds [3 x double], [3 x double]* %246, i64 0
%248 = getelementptr inbounds [3 x double], [3 x double]* %247, i64 0, i64 1
%249 = load double, double* %248
%250 = load [3 x double]*, [3 x double]** %5
%251 = getelementptr inbounds [3 x double], [3 x double]* %250, i64 0
%252 = getelementptr inbounds [3 x double], [3 x double]* %251, i64 0, i64 2
store double %249, double* %252
%253 = load [3 x double]*, [3 x double]** %5
%254 = getelementptr inbounds [3 x double], [3 x double]* %253, i64 1
%255 = getelementptr inbounds [3 x double], [3 x double]* %254, i64 0, i64 1
%256 = load double, double* %255
%257 = load [3 x double]*, [3 x double]** %5
%258 = getelementptr inbounds [3 x double], [3 x double]* %257, i64 1
%259 = getelementptr inbounds [3 x double], [3 x double]* %258, i64 0, i64 2
store double %256, double* %259
%260 = load [3 x double]*, [3 x double]** %5
%261 = getelementptr inbounds [3 x double], [3 x double]* %260, i64 2
%262 = getelementptr inbounds [3 x double], [3 x double]* %261, i64 0, i64 1
%263 = load double, double* %262
%264 = load [3 x double]*, [3 x double]** %5
%265 = getelementptr inbounds [3 x double], [3 x double]* %264, i64 2
%266 = getelementptr inbounds [3 x double], [3 x double]* %265, i64 0, i64 2
store double %263, double* %266
%267 = load double, double* %9
%268 = load double*, double** %6
%269 = getelementptr inbounds double, double* %268, i64 1
store double %267, double* %269
%270 = load double, double* %10
%271 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 1
store double %270, double* %271
%272 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 0
%273 = load double, double* %272
%274 = load [3 x double]*, [3 x double]** %5
%275 = getelementptr inbounds [3 x double], [3 x double]* %274, i64 0
%276 = getelementptr inbounds [3 x double], [3 x double]* %275, i64 0, i64 1
store double %273, double* %276
%277 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 1
%278 = load double, double* %277
%279 = load [3 x double]*, [3 x double]** %5
%280 = getelementptr inbounds [3 x double], [3 x double]* %279, i64 1
%281 = getelementptr inbounds [3 x double], [3 x double]* %280, i64 0, i64 1
store double %278, double* %281
%282 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 2
%283 = load double, double* %282
%284 = load [3 x double]*, [3 x double]** %5
%285 = getelementptr inbounds [3 x double], [3 x double]* %284, i64 2
%286 = getelementptr inbounds [3 x double], [3 x double]* %285, i64 0, i64 1
store double %283, double* %286
br label %287
287: ; preds = %217, %211, %205
br label %288
288: ; preds = %287, %135
%289 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 0
%290 = load double, double* %289
%291 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 1
%292 = load double, double* %291
%293 = fcmp ogt double %290, %292
br i1 %293, label %294, label %364
294: ; preds = %288
%295 = load double*, double** %6
%296 = getelementptr inbounds double, double* %295, i64 1
%297 = load double, double* %296
store double %297, double* %9
%298 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 1
%299 = load double, double* %298
store double %299, double* %10
%300 = load [3 x double]*, [3 x double]** %5
%301 = getelementptr inbounds [3 x double], [3 x double]* %300, i64 0
%302 = getelementptr inbounds [3 x double], [3 x double]* %301, i64 0, i64 1
%303 = load double, double* %302
%304 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 0
store double %303, double* %304
%305 = load [3 x double]*, [3 x double]** %5
%306 = getelementptr inbounds [3 x double], [3 x double]* %305, i64 1
%307 = getelementptr inbounds [3 x double], [3 x double]* %306, i64 0, i64 1
%308 = load double, double* %307
%309 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 1
store double %308, double* %309
%310 = load [3 x double]*, [3 x double]** %5
%311 = getelementptr inbounds [3 x double], [3 x double]* %310, i64 2
%312 = getelementptr inbounds [3 x double], [3 x double]* %311, i64 0, i64 1
%313 = load double, double* %312
%314 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 2
store double %313, double* %314
%315 = load double*, double** %6
%316 = getelementptr inbounds double, double* %315, i64 0
%317 = load double, double* %316
%318 = load double*, double** %6
%319 = getelementptr inbounds double, double* %318, i64 1
store double %317, double* %319
%320 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 0
%321 = load double, double* %320
%322 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 1
store double %321, double* %322
%323 = load [3 x double]*, [3 x double]** %5
%324 = getelementptr inbounds [3 x double], [3 x double]* %323, i64 0
%325 = getelementptr inbounds [3 x double], [3 x double]* %324, i64 0, i64 0
%326 = load double, double* %325
%327 = load [3 x double]*, [3 x double]** %5
%328 = getelementptr inbounds [3 x double], [3 x double]* %327, i64 0
%329 = getelementptr inbounds [3 x double], [3 x double]* %328, i64 0, i64 1
store double %326, double* %329
%330 = load [3 x double]*, [3 x double]** %5
%331 = getelementptr inbounds [3 x double], [3 x double]* %330, i64 1
%332 = getelementptr inbounds [3 x double], [3 x double]* %331, i64 0, i64 0
%333 = load double, double* %332
%334 = load [3 x double]*, [3 x double]** %5
%335 = getelementptr inbounds [3 x double], [3 x double]* %334, i64 1
%336 = getelementptr inbounds [3 x double], [3 x double]* %335, i64 0, i64 1
store double %333, double* %336
%337 = load [3 x double]*, [3 x double]** %5
%338 = getelementptr inbounds [3 x double], [3 x double]* %337, i64 2
%339 = getelementptr inbounds [3 x double], [3 x double]* %338, i64 0, i64 0
%340 = load double, double* %339
%341 = load [3 x double]*, [3 x double]** %5
%342 = getelementptr inbounds [3 x double], [3 x double]* %341, i64 2
%343 = getelementptr inbounds [3 x double], [3 x double]* %342, i64 0, i64 1
store double %340, double* %343
%344 = load double, double* %9
%345 = load double*, double** %6
%346 = getelementptr inbounds double, double* %345, i64 0
store double %344, double* %346
%347 = load double, double* %10
%348 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 0
store double %347, double* %348
%349 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 0
%350 = load double, double* %349
%351 = load [3 x double]*, [3 x double]** %5
%352 = getelementptr inbounds [3 x double], [3 x double]* %351, i64 0
%353 = getelementptr inbounds [3 x double], [3 x double]* %352, i64 0, i64 0
store double %350, double* %353
%354 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 1
%355 = load double, double* %354
%356 = load [3 x double]*, [3 x double]** %5
%357 = getelementptr inbounds [3 x double], [3 x double]* %356, i64 1
%358 = getelementptr inbounds [3 x double], [3 x double]* %357, i64 0, i64 0
store double %355, double* %358
%359 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 2
%360 = load double, double* %359
%361 = load [3 x double]*, [3 x double]** %5
%362 = getelementptr inbounds [3 x double], [3 x double]* %361, i64 2
%363 = getelementptr inbounds [3 x double], [3 x double]* %362, i64 0, i64 0
store double %360, double* %363
br label %364
364: ; preds = %21, %294, %288
ret void
}

LLVM IR (-O2):
define void @eigen_decomposition([3 x double]* %0, [3 x double]* %1, double* %2) {
%4 = alloca [3 x double]
%5 = bitcast [3 x double]* %4 to i8*
%6 = bitcast [3 x double]* %0 to double**
%7 = bitcast [3 x double]* %1 to double**
%8 = tail call i64 @fast_eigen3x3(double** %6, double** %7, double* %2)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %89
10: ; preds = %3
%11 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 0, i64 0
%12 = load double, double* %11
%13 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 0, i64 0
store double %12, double* %13
%14 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 0, i64 1
%15 = load double, double* %14
%16 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 0, i64 1
store double %15, double* %16
%17 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 0, i64 2
%18 = load double, double* %17
%19 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 0, i64 2
store double %18, double* %19
%20 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 0
%21 = load double, double* %20
%22 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 1, i64 0
store double %21, double* %22
%23 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 1
%24 = load double, double* %23
%25 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 1, i64 1
store double %24, double* %25
%26 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 2
%27 = load double, double* %26
%28 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 1, i64 2
store double %27, double* %28
%29 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 2, i64 0
%30 = load double, double* %29
%31 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 2, i64 0
store double %30, double* %31
%32 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 2, i64 1
%33 = load double, double* %32
%34 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 2, i64 1
store double %33, double* %34
%35 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 2, i64 2
%36 = load double, double* %35
%37 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 2, i64 2
store double %36, double* %37
%38 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
%39 = call i32 @tred2(double** %7, double* %2, double* %38)
%40 = call i32 @tql2(double** %7, double* %2, double* %38)
%41 = load double, double* %2
%42 = fneg double %41
%43 = fcmp ogt double %41, %42
%44 = select i1 %43, double %41, double %42
%45 = getelementptr inbounds double, double* %2, i64 1
%46 = load double, double* %45
%47 = fneg double %46
%48 = fcmp ogt double %46, %47
%49 = select i1 %48, double %46, double %47
%50 = getelementptr inbounds double, double* %2, i64 2
%51 = load double, double* %50
%52 = fneg double %51
%53 = fcmp ogt double %51, %52
%54 = select i1 %53, double %51, double %52
%55 = fcmp oge double %44, %49
%56 = fcmp ogt double %44, %54
%57 = select i1 %55, i1 %56, i1 false
br i1 %57, label %62, label %58
58: ; preds = %10
%59 = fcmp oge double %49, %44
%60 = fcmp ogt double %49, %54
%61 = select i1 %59, i1 %60, i1 false
br i1 %61, label %62, label %76
62: ; preds = %58, %10
%63 = phi double [ %41, %10 ], [ %46, %58 ]
%64 = phi double* [ %13, %10 ], [ %16, %58 ]
%65 = phi double* [ %22, %10 ], [ %25, %58 ]
%66 = phi double* [ %31, %10 ], [ %34, %58 ]
%67 = phi double* [ %2, %10 ], [ %45, %58 ]
%68 = phi double [ %49, %10 ], [ %54, %58 ]
%69 = phi double [ %54, %10 ], [ %44, %58 ]
%70 = load double, double* %19
%71 = load double, double* %28
%72 = load double, double* %37
store double %63, double* %50
%73 = load double, double* %64
store double %73, double* %19
%74 = load double, double* %65
store double %74, double* %28
%75 = load double, double* %66
store double %75, double* %37
store double %51, double* %67
store double %70, double* %64
store double %71, double* %65
store double %72, double* %66
br label %76
76: ; preds = %62, %58
%77 = phi double [ %49, %58 ], [ %68, %62 ]
%78 = phi double [ %44, %58 ], [ %69, %62 ]
%79 = fcmp ogt double %78, %77
br i1 %79, label %80, label %89
80: ; preds = %76
%81 = load double, double* %45
%82 = load double, double* %16
%83 = load double, double* %25
%84 = load double, double* %34
%85 = load double, double* %2
store double %85, double* %45
%86 = load double, double* %13
store double %86, double* %16
%87 = load double, double* %22
store double %87, double* %25
%88 = load double, double* %31
store double %88, double* %34
store double %81, double* %2
store double %82, double* %13
store double %83, double* %22
store double %84, double* %31
br label %89
89: ; preds = %76, %80, %3
ret void
}