#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*/ balance(double *, int, int *, int *, double *);
int /*<<< orphan*/ elemhess(int, double *, int, int, int, double *, double *,
                            int *);
double fabs(double);
int /*<<< orphan*/ pow(double, double);
int realeig(int, double *, int, int, int, double *, double *, double *,
            double *);
double sqrt(int /*<<< orphan*/);
int /*<<< orphan*/ unbalance(int, double *, double *, int, int, double *);
int eigen(int job, double *A, int n, double *rr, double *ri, double *vr,
          double *vi, double *work) {
  int low, hi, i, j, k, it, istate = 0;
  double tiny = sqrt(pow((double)2, (double)(1 - 40))), t;
  balance(A, n, &low, &hi, work);
  elemhess(job, A, n, low, hi, vr, vi, (int *)(work + n));
  if (-1 == realeig(job, A, n, low, hi, rr, ri, vr, vi))
    return (-1);
  if (job)
    unbalance(n, vr, vi, low, hi, work);
  for (i = 0; i < n; i++) {
    for (j = i + 1, it = i, t = rr[i]; j < n; j++)
      if (t < rr[j]) {
        t = rr[j];
        it = j;
      }
    rr[it] = rr[i];
    rr[i] = t;
    t = ri[it];
    ri[it] = ri[i];
    ri[i] = t;
    for (k = 0; k < n; k++) {
      t = vr[k * n + it];
      vr[k * n + it] = vr[k * n + i];
      vr[k * n + i] = t;
      t = vi[k * n + it];
      vi[k * n + it] = vi[k * n + i];
      vi[k * n + i] = t;
    }
    if (fabs(ri[i]) > tiny)
      istate = 1;
  }
  return (istate);
}


x86 assembly (clang, -O0):
<eigen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x0,-0x4c(%rbp)
movsd  0xe68(%rip),%xmm0
movsd  0xe68(%rip),%xmm1
call   1070 <pow@plt>
mov    %eax,%edi
call   1080 <sqrt@plt>
movsd  %xmm0,-0x58(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    0x18(%rbp),%r8
lea    -0x34(%rbp),%rdx
lea    -0x38(%rbp),%rcx
call   1030 <balance@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x34(%rbp),%ecx
mov    -0x38(%rbp),%r8d
mov    -0x30(%rbp),%r9
mov    0x10(%rbp),%r10
mov    0x18(%rbp),%rax
movslq -0x14(%rbp),%r11
shl    $0x3,%r11
add    %r11,%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1050 <elemhess@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x34(%rbp),%ecx
mov    -0x38(%rbp),%r8d
mov    -0x20(%rbp),%r9
mov    -0x28(%rbp),%r11
mov    -0x30(%rbp),%r10
mov    0x10(%rbp),%rax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1060 <realeig@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
jne    124e <eigen+0xee>
movl   $0xffffffff,-0x4(%rbp)
jmp    148c <eigen+0x32c>
cmpl   $0x0,-0x8(%rbp)
je     1273 <eigen+0x113>
mov    -0x14(%rbp),%edi
mov    -0x30(%rbp),%rsi
mov    0x10(%rbp),%rdx
mov    -0x34(%rbp),%ecx
mov    -0x38(%rbp),%r8d
mov    0x18(%rbp),%r9
call   1040 <unbalance@plt>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1486 <eigen+0x326>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    12fa <eigen+0x19a>
movsd  -0x60(%rbp),%xmm1
mov    -0x20(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jbe    12e7 <eigen+0x187>
mov    -0x20(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x40(%rbp),%eax
mov    %eax,-0x48(%rbp)
jmp    12ec <eigen+0x18c>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    12a7 <eigen+0x147>
mov    -0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x60(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x60(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1449 <eigen+0x2e9>
mov    -0x30(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x48(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x30(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x3c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x48(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x60(%rbp),%xmm0
mov    -0x30(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x3c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x10(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x48(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    0x10(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x3c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x48(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x60(%rbp),%xmm0
mov    0x10(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x3c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    136b <eigen+0x20b>
mov    -0x28(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xbb3(%rip),%xmm1
pand   %xmm1,%xmm0
ucomisd -0x58(%rbp),%xmm0
jbe    1473 <eigen+0x313>
movl   $0x1,-0x4c(%rbp)
jmp    1478 <eigen+0x318>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    127a <eigen+0x11a>
mov    -0x4c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eigen>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %r9,%r14
mov    %r8,%r15
mov    %rcx,%r12
mov    %edx,%ebx
mov    %rsi,%rbp
mov    %edi,0x1c(%rsp)
mov    0x68(%rsp),%r13
movsd  0xe73(%rip),%xmm0
movsd  0xe73(%rip),%xmm1
call   1070 <pow@plt>
mov    %eax,%edi
call   1080 <sqrt@plt>
movsd  %xmm0,0x20(%rsp)
lea    0xc(%rsp),%rdx
lea    0x8(%rsp),%rcx
mov    %rbp,%rdi
mov    %ebx,%esi
mov    %r13,%r8
call   1030 <balance@plt>
mov    0xc(%rsp),%ecx
mov    0x8(%rsp),%r8d
mov    %ebx,0x18(%rsp)
movslq %ebx,%r13
mov    0x1c(%rsp),%ebx
mov    0x68(%rsp),%rax
lea    (%rax,%r13,8),%rax
mov    %ebx,%edi
mov    %rbp,%rsi
mov    %r13d,%edx
mov    %r14,%r9
push   %rax
push   0x68(%rsp)
call   1050 <elemhess@plt>
add    $0x10,%rsp
mov    0xc(%rsp),%ecx
mov    0x8(%rsp),%r8d
sub    $0x8,%rsp
mov    %ebx,%edi
mov    %rbp,%rsi
mov    %r13d,%edx
mov    %r12,%r9
push   0x68(%rsp)
mov    %r14,0x20(%rsp)
push   %r14
push   %r15
call   1060 <realeig@plt>
add    $0x20,%rsp
cmp    $0xffffffff,%eax
je     138b <eigen+0x22b>
test   %ebx,%ebx
mov    0x18(%rsp),%ebx
je     1252 <eigen+0xf2>
mov    0xc(%rsp),%ecx
mov    0x8(%rsp),%r8d
mov    %ebx,%edi
mov    0x10(%rsp),%rsi
mov    0x60(%rsp),%rdx
mov    0x68(%rsp),%r9
call   1040 <unbalance@plt>
test   %ebx,%ebx
jle    1392 <eigen+0x232>
mov    %ebx,%r8d
lea    0x0(,%r13,8),%rdx
xor    %r11d,%r11d
mov    $0x1,%r9d
movapd 0xd9a(%rip),%xmm0
mov    0x60(%rsp),%rbp
mov    0x10(%rsp),%rdi
xor    %eax,%eax
movsd  0x20(%rsp),%xmm4
nopl   0x0(%rax,%rax,1)
lea    0x1(%r11),%r10
movsd  (%r12,%r11,8),%xmm1
cmp    %r13,%r10
jge    12d0 <eigen+0x170>
mov    %r9,%rbx
movapd %xmm1,%xmm3
mov    %r11d,%esi
nopl   0x0(%rax)
movsd  (%r12,%rbx,8),%xmm2
ucomisd %xmm3,%xmm2
cmova  %ebx,%esi
maxsd  %xmm3,%xmm2
add    $0x1,%rbx
movapd %xmm2,%xmm3
cmp    %rbx,%r8
jne    12b0 <eigen+0x150>
jmp    12d7 <eigen+0x177>
mov    %r11d,%esi
movapd %xmm1,%xmm2
movslq %esi,%rcx
movsd  %xmm1,(%r12,%rcx,8)
movsd  %xmm2,(%r12,%r11,8)
movsd  (%r15,%rcx,8),%xmm1
movsd  (%r15,%r11,8),%xmm2
movsd  %xmm2,(%r15,%rcx,8)
movsd  %xmm1,(%r15,%r11,8)
mov    0x10(%rsp),%rsi
lea    (%rsi,%rcx,8),%rsi
mov    0x60(%rsp),%rbx
lea    (%rbx,%rcx,8),%rbx
mov    %r8,%rcx
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
movsd  (%rsi,%r14,1),%xmm1
movsd  (%rdi,%r14,1),%xmm2
movsd  %xmm2,(%rsi,%r14,1)
movsd  %xmm1,(%rdi,%r14,1)
movsd  (%rbx,%r14,1),%xmm1
movsd  0x0(%rbp,%r14,1),%xmm2
movsd  %xmm2,(%rbx,%r14,1)
movsd  %xmm1,0x0(%rbp,%r14,1)
add    %rdx,%r14
add    $0xffffffffffffffff,%rcx
jne    1320 <eigen+0x1c0>
movsd  (%r15,%r11,8),%xmm1
andpd  %xmm0,%xmm1
ucomisd %xmm4,%xmm1
mov    $0x1,%ecx
cmova  %ecx,%eax
add    $0x1,%r9
add    $0x8,%rdi
add    $0x8,%rbp
mov    %r10,%r11
cmp    %r8,%r10
jne    1290 <eigen+0x130>
jmp    1394 <eigen+0x234>
mov    $0xffffffff,%eax
jmp    1394 <eigen+0x234>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @eigen(i32 %0, double* %1, i32 %2, double* %3, double* %4, double* %5, double* %6, double* %7) {
%9 = alloca i32
%10 = alloca i32
%11 = bitcast i32* %9 to i8*
%12 = bitcast i32* %10 to i8*
%13 = tail call i32 @pow(double 2.000000e+00, double -3.900000e+01)
%14 = tail call double @sqrt(i32 %13)
%15 = call i32 @balance(double* %1, i32 %2, i32* %9, i32* %10, double* %7)
%16 = load i32, i32* %9
%17 = load i32, i32* %10
%18 = sext i32 %2 to i64
%19 = getelementptr inbounds double, double* %7, i64 %18
%20 = bitcast double* %19 to i32*
%21 = call i32 @elemhess(i32 %0, double* %1, i32 %2, i32 %16, i32 %17, double* %5, double* %6, i32* %20)
%22 = load i32, i32* %9
%23 = load i32, i32* %10
%24 = call i32 @realeig(i32 %0, double* %1, i32 %2, i32 %22, i32 %23, double* %3, double* %4, double* %5, double* %6)
%25 = icmp eq i32 %24, -1
br i1 %25, label %88, label %26
26: ; preds = %8
%27 = icmp eq i32 %0, 0
br i1 %27, label %32, label %28
28: ; preds = %26
%29 = load i32, i32* %9
%30 = load i32, i32* %10
%31 = call i32 @unbalance(i32 %2, double* %5, double* %6, i32 %29, i32 %30, double* %7)
br label %32
32: ; preds = %28, %26
%33 = icmp sgt i32 %2, 0
br i1 %33, label %34, label %88
34: ; preds = %32
%35 = zext i32 %2 to i64
br label %36
36: ; preds = %34, %81
%37 = phi i64 [ 0, %34 ], [ %40, %81 ]
%38 = phi i64 [ 1, %34 ], [ %86, %81 ]
%39 = phi i32 [ 0, %34 ], [ %85, %81 ]
%40 = add nuw nsw i64 %37, 1
%41 = getelementptr inbounds double, double* %3, i64 %37
%42 = load double, double* %41
%43 = icmp slt i64 %40, %18
%44 = trunc i64 %37 to i32
br i1 %43, label %45, label %57
45: ; preds = %36, %45
%46 = phi i64 [ %55, %45 ], [ %38, %36 ]
%47 = phi double [ %54, %45 ], [ %42, %36 ]
%48 = phi i32 [ %53, %45 ], [ %44, %36 ]
%49 = getelementptr inbounds double, double* %3, i64 %46
%50 = load double, double* %49
%51 = fcmp olt double %47, %50
%52 = trunc i64 %46 to i32
%53 = select i1 %51, i32 %52, i32 %48
%54 = select i1 %51, double %50, double %47
%55 = add nuw nsw i64 %46, 1
%56 = icmp eq i64 %55, %35
br i1 %56, label %57, label %45
57: ; preds = %45, %36
%58 = phi i32 [ %44, %36 ], [ %53, %45 ]
%59 = phi double [ %42, %36 ], [ %54, %45 ]
%60 = sext i32 %58 to i64
%61 = getelementptr inbounds double, double* %3, i64 %60
store double %42, double* %61
store double %59, double* %41
%62 = getelementptr inbounds double, double* %4, i64 %60
%63 = load double, double* %62
%64 = getelementptr inbounds double, double* %4, i64 %37
%65 = load double, double* %64
store double %65, double* %62
store double %63, double* %64
br label %66
66: ; preds = %57, %66
%67 = phi i64 [ 0, %57 ], [ %79, %66 ]
%68 = mul nsw i64 %67, %18
%69 = add nsw i64 %68, %60
%70 = getelementptr inbounds double, double* %5, i64 %69
%71 = load double, double* %70
%72 = add nsw i64 %68, %37
%73 = getelementptr inbounds double, double* %5, i64 %72
%74 = load double, double* %73
store double %74, double* %70
store double %71, double* %73
%75 = getelementptr inbounds double, double* %6, i64 %69
%76 = load double, double* %75
%77 = getelementptr inbounds double, double* %6, i64 %72
%78 = load double, double* %77
store double %78, double* %75
store double %76, double* %77
%79 = add nuw nsw i64 %67, 1
%80 = icmp eq i64 %79, %35
br i1 %80, label %81, label %66
81: ; preds = %66
%82 = load double, double* %64
%83 = call double @llvm.fabs.f64(double %82)
%84 = fcmp ogt double %83, %14
%85 = select i1 %84, i32 1, i32 %39
%86 = add nuw nsw i64 %38, 1
%87 = icmp eq i64 %40, %35
br i1 %87, label %88, label %36
88: ; preds = %81, %32, %8
%89 = phi i32 [ -1, %8 ], [ 0, %32 ], [ %85, %81 ]
ret i32 %89
}