#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*/ exit(int);
double fabs(double);
int /*<<< orphan*/ printf(char *);
double pythag(double, double);
void eigenvalue_tqli(double d[], double e[], int n) {
  register int m, l, iter, i;
  double s, r, p, g, f, dd, c, b;
  for (i = 2; i <= n; i++)
    e[i - 1] = e[i];
  e[n] = 0.0;
  for (l = 1; l <= n; l++) {
    iter = 0;
    do {
      for (m = l; m <= n - 1; m++) {
        dd = fabs(d[m]) + fabs(d[m + 1]);
        if ((double)(fabs(e[m]) + dd) == dd)
          break;
      }
      if (m != l) {
        if (iter++ == 30) {
          printf("\n\nToo many iterations in tqli.\n");
          exit(1);
        }
        g = (d[l + 1] - d[l]) / (2.0 * e[l]);
        r = pythag(g, 1.0);
        g = d[m] - d[l] + e[l] / (g + ((g) < 0 ? -fabs(r) : fabs(r)));
        s = c = 1.0;
        p = 0.0;
        for (i = m - 1; i >= l; i--) {
          f = s * e[i];
          b = c * e[i];
          e[i + 1] = (r = pythag(f, g));
          if (r == 0.0) {
            d[i + 1] -= p;
            e[m] = 0.0;
            break;
          }
          s = f / r;
          c = g / r;
          g = d[i + 1] - p;
          r = (d[i] - g) * s + 2.0 * c * b;
          d[i + 1] = g + (p = s * r);
          g = c * r - b;
        }
        if (r == 0.0 && i >= l)
          continue;
        d[l] -= p;
        e[l] = g;
        e[m] = 0.0;
      }
    } while (m != l);
  }
}


x86 assembly (clang, -O0):
<eigenvalue_tqli>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x2,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1186 <eigenvalue_tqli+0x56>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    114d <eigenvalue_tqli+0x1d>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     15cf <eigenvalue_tqli+0x49f>
movl   $0x0,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     124b <eigenvalue_tqli+0x11b>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xe25(%rip),%xmm1
pand   %xmm1,%xmm0
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movaps 0xe08(%rip),%xmm2
pand   %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xde7(%rip),%xmm1
pand   %xmm1,%xmm0
addsd  -0x58(%rbp),%xmm0
ucomisd -0x58(%rbp),%xmm0
jne    1238 <eigenvalue_tqli+0x108>
jp     1238 <eigenvalue_tqli+0x108>
jmp    124b <eigenvalue_tqli+0x11b>
jmp    123d <eigenvalue_tqli+0x10d>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11b6 <eigenvalue_tqli+0x86>
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
je     15ab <eigenvalue_tqli+0x47b>
mov    -0x20(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x20(%rbp)
cmp    $0x1e,%eax
jne    1281 <eigenvalue_tqli+0x151>
lea    0xdae(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x8(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  0xd68(%rip),%xmm1
mulsd  (%rax,%rcx,8),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  0xd45(%rip),%xmm1
call   1040 <pythag@plt>
movsd  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x48(%rbp),%xmm0
jbe    1352 <eigenvalue_tqli+0x222>
movsd  -0x38(%rbp),%xmm0
movaps 0xcd6(%rip),%xmm1
pand   %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
jmp    136a <eigenvalue_tqli+0x23a>
movsd  -0x38(%rbp),%xmm0
movaps 0xca2(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm3
ff
addsd  %xmm3,%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xc76(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xc69(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jl     1545 <eigenvalue_tqli+0x415>
movsd  -0x30(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x60(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
call   1040 <pythag@plt>
movsd  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x38(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    146a <eigenvalue_tqli+0x33a>
jp     146a <eigenvalue_tqli+0x33a>
movsd  -0x40(%rbp),%xmm1
mov    -0x8(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    1545 <eigenvalue_tqli+0x415>
movsd  -0x50(%rbp),%xmm0
divsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x48(%rbp),%xmm0
divsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x48(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm2
movsd  0xb55(%rip),%xmm1
mulsd  -0x60(%rbp),%xmm1
mulsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
movsd  %xmm1,-0x40(%rbp)
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x60(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x24(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
jmp    13bd <eigenvalue_tqli+0x28d>
movsd  -0x38(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    156e <eigenvalue_tqli+0x43e>
jp     156e <eigenvalue_tqli+0x43e>
mov    -0x24(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jl     156e <eigenvalue_tqli+0x43e>
jmp    15b0 <eigenvalue_tqli+0x480>
movsd  -0x40(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x48(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    15b0 <eigenvalue_tqli+0x480>
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jne    11b0 <eigenvalue_tqli+0x80>
jmp    15c1 <eigenvalue_tqli+0x491>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    119d <eigenvalue_tqli+0x6d>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eigenvalue_tqli>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %rsi,%r15
mov    %rdi,%rbx
cmp    $0x2,%edx
mov    %rdx,0x18(%rsp)
jge    117d <eigenvalue_tqli+0x3d>
movslq %edx,%r12
movq   $0x0,(%r15,%r12,8)
cmp    $0x1,%edx
je     11a1 <eigenvalue_tqli+0x61>
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x8(%r15),%rdi
lea    0x10(%r15),%rsi
add    $0xffffffff,%edx
shl    $0x3,%rdx
call   1050 <memmove@plt>
mov    0x18(%rsp),%rdx
mov    %edx,%r12d
movq   $0x0,(%r15,%r12,8)
lea    0x1(%rdx),%eax
mov    %rax,0x20(%rsp)
mov    $0x1,%ebp
movdqa 0xe4a(%rip),%xmm2
jmp    11d4 <eigenvalue_tqli+0x94>
nopl   0x0(%rax,%rax,1)
mov    0x28(%rsp),%rax
mov    %rax,%rbp
cmp    0x20(%rsp),%rax
mov    0x18(%rsp),%rdx
je     116e <eigenvalue_tqli+0x2e>
cmp    %ebp,%edx
mov    %ebp,%eax
cmovg  %edx,%eax
mov    %eax,0x14(%rsp)
lea    0x1(%rbp),%rax
mov    %rax,0x28(%rsp)
mov    %eax,%eax
mov    %rax,0x30(%rsp)
xor    %r13d,%r13d
jmp    1227 <eigenvalue_tqli+0xe7>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  (%rbx,%r13,8),%xmm0
subsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%rbx,%r13,8)
movq   $0x0,(%r15,%r14,8)
movdqa 0xdde(%rip),%xmm2
mov    0x4(%rsp),%r13d
mov    %rbp,%rcx
nopw   0x0(%rax,%rax,1)
cmp    %r12,%rcx
jge    1270 <eigenvalue_tqli+0x130>
lea    0x1(%rcx),%rax
movdqu (%rbx,%rcx,8),%xmm0
pand   %xmm2,%xmm0
pshufd $0xee,%xmm0,%xmm1
addsd  %xmm0,%xmm1
movq   (%r15,%rcx,8),%xmm0
pand   %xmm2,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm1,%xmm0
mov    %rax,%rcx
jne    1230 <eigenvalue_tqli+0xf0>
jp     1230 <eigenvalue_tqli+0xf0>
add    $0xffffffff,%eax
jmp    1274 <eigenvalue_tqli+0x134>
nopl   0x0(%rax)
mov    0x14(%rsp),%eax
mov    %eax,%r14d
cmp    %r14,%rbp
movsd  0xd9e(%rip),%xmm1
je     11c0 <eigenvalue_tqli+0x80>
cmp    $0x1e,%r13d
je     141d <eigenvalue_tqli+0x2dd>
mov    0x30(%rsp),%rax
movsd  (%rbx,%rax,8),%xmm0
subsd  (%rbx,%rbp,8),%xmm0
add    $0x1,%r13d
movsd  (%r15,%rbp,8),%xmm2
addsd  %xmm2,%xmm2
divsd  %xmm2,%xmm0
movsd  %xmm0,0x8(%rsp)
call   1040 <pythag@plt>
movsd  (%rbx,%r14,8),%xmm4
subsd  (%rbx,%rbp,8),%xmm4
movsd  (%r15,%rbp,8),%xmm1
movapd %xmm0,%xmm2
andpd  0xd25(%rip),%xmm2
orpd   0xd2d(%rip),%xmm0
xorpd  %xmm5,%xmm5
movsd  0x8(%rsp),%xmm6
movapd %xmm6,%xmm3
cmpltsd %xmm5,%xmm3
andpd  %xmm3,%xmm0
andnpd %xmm2,%xmm3
orpd   %xmm0,%xmm3
addsd  %xmm6,%xmm3
divsd  %xmm3,%xmm1
addsd  %xmm4,%xmm1
cmp    %r14,%rbp
mov    %r13d,0x4(%rsp)
jae    1400 <eigenvalue_tqli+0x2c0>
xorpd  %xmm5,%xmm5
mov    %r14,%r13
movsd  0xcf5(%rip),%xmm4
movapd %xmm4,%xmm2
nop
movsd  %xmm1,0x40(%rsp)
movsd  %xmm2,0x50(%rsp)
movsd  %xmm5,0x8(%rsp)
movsd  -0x8(%r15,%r13,8),%xmm0
movsd  %xmm0,0x38(%rsp)
mulsd  %xmm0,%xmm4
movsd  %xmm4,0x48(%rsp)
movapd %xmm4,%xmm0
call   1040 <pythag@plt>
movsd  %xmm0,(%r15,%r13,8)
ucomisd 0xcb8(%rip),%xmm0
jne    1378 <eigenvalue_tqli+0x238>
jnp    1200 <eigenvalue_tqli+0xc0>
movsd  0x50(%rsp),%xmm3
mulsd  0x38(%rsp),%xmm3
movsd  0x48(%rsp),%xmm4
divsd  %xmm0,%xmm4
movsd  0x40(%rsp),%xmm6
divsd  %xmm0,%xmm6
movsd  -0x8(%rbx,%r13,8),%xmm0
movsd  (%rbx,%r13,8),%xmm1
subsd  0x8(%rsp),%xmm1
subsd  %xmm1,%xmm0
movapd %xmm6,%xmm2
addsd  %xmm6,%xmm2
mulsd  %xmm3,%xmm2
mulsd  %xmm4,%xmm0
addsd  %xmm2,%xmm0
movapd %xmm4,%xmm5
mulsd  %xmm0,%xmm5
addsd  %xmm5,%xmm1
movsd  %xmm1,(%rbx,%r13,8)
lea    -0x1(%r13),%rax
mulsd  %xmm6,%xmm0
subsd  %xmm3,%xmm0
mov    %rax,%r13
movapd %xmm6,%xmm2
movapd %xmm0,%xmm1
cmp    %rbp,%rax
jg     1330 <eigenvalue_tqli+0x1f0>
jmp    1404 <eigenvalue_tqli+0x2c4>
nopw   0x0(%rax,%rax,1)
movapd %xmm1,%xmm0
movsd  (%rbx,%rbp,8),%xmm1
subsd  %xmm5,%xmm1
movsd  %xmm1,(%rbx,%rbp,8)
movsd  %xmm0,(%r15,%rbp,8)
jmp    1212 <eigenvalue_tqli+0xd2>
lea    0xc0c(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"\0A\0AToo many iterations in tqli.\0A\00"
define void @eigenvalue_tqli(double* %0, double* %1, i32 %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%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
store double* %0, double** %4
store double* %1, double** %5
store i32 %2, i32* %6
store i32 2, i32* %10
br label %19
19: ; preds = %34, %3
%20 = load i32, i32* %10
%21 = load i32, i32* %6
%22 = icmp sle i32 %20, %21
br i1 %22, label %23, label %37
23: ; preds = %19
%24 = load double*, double** %5
%25 = load i32, i32* %10
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds double, double* %24, i64 %26
%28 = load double, double* %27
%29 = load double*, double** %5
%30 = load i32, i32* %10
%31 = sub nsw i32 %30, 1
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds double, double* %29, i64 %32
store double %28, double* %33
br label %34
34: ; preds = %23
%35 = load i32, i32* %10
%36 = add nsw i32 %35, 1
store i32 %36, i32* %10
br label %19
37: ; preds = %19
%38 = load double*, double** %5
%39 = load i32, i32* %6
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds double, double* %38, i64 %40
store double 0.000000e+00, double* %41
store i32 1, i32* %8
br label %42
42: ; preds = %269, %37
%43 = load i32, i32* %8
%44 = load i32, i32* %6
%45 = icmp sle i32 %43, %44
br i1 %45, label %46, label %272
46: ; preds = %42
store i32 0, i32* %9
br label %47
47: ; preds = %264, %46
%48 = load i32, i32* %8
store i32 %48, i32* %7
br label %49
49: ; preds = %81, %47
%50 = load i32, i32* %7
%51 = load i32, i32* %6
%52 = sub nsw i32 %51, 1
%53 = icmp sle i32 %50, %52
br i1 %53, label %54, label %84
54: ; preds = %49
%55 = load double*, double** %4
%56 = load i32, i32* %7
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds double, double* %55, i64 %57
%59 = load double, double* %58
%60 = call double @llvm.fabs.f64(double %59)
%61 = load double*, double** %4
%62 = load i32, i32* %7
%63 = add nsw i32 %62, 1
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds double, double* %61, i64 %64
%66 = load double, double* %65
%67 = call double @llvm.fabs.f64(double %66)
%68 = fadd double %60, %67
store double %68, double* %16
%69 = load double*, double** %5
%70 = load i32, i32* %7
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds double, double* %69, i64 %71
%73 = load double, double* %72
%74 = call double @llvm.fabs.f64(double %73)
%75 = load double, double* %16
%76 = fadd double %74, %75
%77 = load double, double* %16
%78 = fcmp oeq double %76, %77
br i1 %78, label %79, label %80
79: ; preds = %54
br label %84
80: ; preds = %54
br label %81
81: ; preds = %80
%82 = load i32, i32* %7
%83 = add nsw i32 %82, 1
store i32 %83, i32* %7
br label %49
84: ; preds = %79, %49
%85 = load i32, i32* %7
%86 = load i32, i32* %8
%87 = icmp ne i32 %85, %86
br i1 %87, label %88, label %263
88: ; preds = %84
%89 = load i32, i32* %9
%90 = add nsw i32 %89, 1
store i32 %90, i32* %9
%91 = icmp eq i32 %89, 30
br i1 %91, label %92, label %95
92: ; preds = %88
%93 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%94 = call i32 @exit(i32 1)
unreachable
95: ; preds = %88
%96 = load double*, double** %4
%97 = load i32, i32* %8
%98 = add nsw i32 %97, 1
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds double, double* %96, i64 %99
%101 = load double, double* %100
%102 = load double*, double** %4
%103 = load i32, i32* %8
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds double, double* %102, i64 %104
%106 = load double, double* %105
%107 = fsub double %101, %106
%108 = load double*, double** %5
%109 = load i32, i32* %8
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds double, double* %108, i64 %110
%112 = load double, double* %111
%113 = fmul double 2.000000e+00, %112
%114 = fdiv double %107, %113
store double %114, double* %14
%115 = load double, double* %14
%116 = call double @pythag(double %115, double 1.000000e+00)
store double %116, double* %12
%117 = load double*, double** %4
%118 = load i32, i32* %7
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds double, double* %117, i64 %119
%121 = load double, double* %120
%122 = load double*, double** %4
%123 = load i32, i32* %8
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds double, double* %122, i64 %124
%126 = load double, double* %125
%127 = fsub double %121, %126
%128 = load double*, double** %5
%129 = load i32, i32* %8
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds double, double* %128, i64 %130
%132 = load double, double* %131
%133 = load double, double* %14
%134 = load double, double* %14
%135 = fcmp olt double %134, 0.000000e+00
br i1 %135, label %136, label %140
136: ; preds = %95
%137 = load double, double* %12
%138 = call double @llvm.fabs.f64(double %137)
%139 = fneg double %138
br label %143
140: ; preds = %95
%141 = load double, double* %12
%142 = call double @llvm.fabs.f64(double %141)
br label %143
143: ; preds = %140, %136
%144 = phi double [ %139, %136 ], [ %142, %140 ]
%145 = fadd double %133, %144
%146 = fdiv double %132, %145
%147 = fadd double %127, %146
store double %147, double* %14
store double 1.000000e+00, double* %17
store double 1.000000e+00, double* %11
store double 0.000000e+00, double* %13
%148 = load i32, i32* %7
%149 = sub nsw i32 %148, 1
store i32 %149, i32* %10
br label %150
150: ; preds = %235, %143
%151 = load i32, i32* %10
%152 = load i32, i32* %8
%153 = icmp sge i32 %151, %152
br i1 %153, label %154, label %238
154: ; preds = %150
%155 = load double, double* %11
%156 = load double*, double** %5
%157 = load i32, i32* %10
%158 = sext i32 %157 to i64
%159 = getelementptr inbounds double, double* %156, i64 %158
%160 = load double, double* %159
%161 = fmul double %155, %160
store double %161, double* %15
%162 = load double, double* %17
%163 = load double*, double** %5
%164 = load i32, i32* %10
%165 = sext i32 %164 to i64
%166 = getelementptr inbounds double, double* %163, i64 %165
%167 = load double, double* %166
%168 = fmul double %162, %167
store double %168, double* %18
%169 = load double, double* %15
%170 = load double, double* %14
%171 = call double @pythag(double %169, double %170)
store double %171, double* %12
%172 = load double*, double** %5
%173 = load i32, i32* %10
%174 = add nsw i32 %173, 1
%175 = sext i32 %174 to i64
%176 = getelementptr inbounds double, double* %172, i64 %175
store double %171, double* %176
%177 = load double, double* %12
%178 = fcmp oeq double %177, 0.000000e+00
br i1 %178, label %179, label %192
179: ; preds = %154
%180 = load double, double* %13
%181 = load double*, double** %4
%182 = load i32, i32* %10
%183 = add nsw i32 %182, 1
%184 = sext i32 %183 to i64
%185 = getelementptr inbounds double, double* %181, i64 %184
%186 = load double, double* %185
%187 = fsub double %186, %180
store double %187, double* %185
%188 = load double*, double** %5
%189 = load i32, i32* %7
%190 = sext i32 %189 to i64
%191 = getelementptr inbounds double, double* %188, i64 %190
store double 0.000000e+00, double* %191
br label %238
192: ; preds = %154
%193 = load double, double* %15
%194 = load double, double* %12
%195 = fdiv double %193, %194
store double %195, double* %11
%196 = load double, double* %14
%197 = load double, double* %12
%198 = fdiv double %196, %197
store double %198, double* %17
%199 = load double*, double** %4
%200 = load i32, i32* %10
%201 = add nsw i32 %200, 1
%202 = sext i32 %201 to i64
%203 = getelementptr inbounds double, double* %199, i64 %202
%204 = load double, double* %203
%205 = load double, double* %13
%206 = fsub double %204, %205
store double %206, double* %14
%207 = load double*, double** %4
%208 = load i32, i32* %10
%209 = sext i32 %208 to i64
%210 = getelementptr inbounds double, double* %207, i64 %209
%211 = load double, double* %210
%212 = load double, double* %14
%213 = fsub double %211, %212
%214 = load double, double* %11
%215 = load double, double* %17
%216 = fmul double 2.000000e+00, %215
%217 = load double, double* %18
%218 = fmul double %216, %217
%219 = call double @llvm.fmuladd.f64(double %213, double %214, double %218)
store double %219, double* %12
%220 = load double, double* %14
%221 = load double, double* %11
%222 = load double, double* %12
%223 = fmul double %221, %222
store double %223, double* %13
%224 = fadd double %220, %223
%225 = load double*, double** %4
%226 = load i32, i32* %10
%227 = add nsw i32 %226, 1
%228 = sext i32 %227 to i64
%229 = getelementptr inbounds double, double* %225, i64 %228
store double %224, double* %229
%230 = load double, double* %17
%231 = load double, double* %12
%232 = load double, double* %18
%233 = fneg double %232
%234 = call double @llvm.fmuladd.f64(double %230, double %231, double %233)
store double %234, double* %14
br label %235
235: ; preds = %192
%236 = load i32, i32* %10
%237 = add nsw i32 %236, -1
store i32 %237, i32* %10
br label %150
238: ; preds = %179, %150
%239 = load double, double* %12
%240 = fcmp oeq double %239, 0.000000e+00
br i1 %240, label %241, label %246
241: ; preds = %238
%242 = load i32, i32* %10
%243 = load i32, i32* %8
%244 = icmp sge i32 %242, %243
br i1 %244, label %245, label %246
245: ; preds = %241
br label %264
246: ; preds = %241, %238
%247 = load double, double* %13
%248 = load double*, double** %4
%249 = load i32, i32* %8
%250 = sext i32 %249 to i64
%251 = getelementptr inbounds double, double* %248, i64 %250
%252 = load double, double* %251
%253 = fsub double %252, %247
store double %253, double* %251
%254 = load double, double* %14
%255 = load double*, double** %5
%256 = load i32, i32* %8
%257 = sext i32 %256 to i64
%258 = getelementptr inbounds double, double* %255, i64 %257
store double %254, double* %258
%259 = load double*, double** %5
%260 = load i32, i32* %7
%261 = sext i32 %260 to i64
%262 = getelementptr inbounds double, double* %259, i64 %261
store double 0.000000e+00, double* %262
br label %263
263: ; preds = %246, %84
br label %264
264: ; preds = %263, %245
%265 = load i32, i32* %7
%266 = load i32, i32* %8
%267 = icmp ne i32 %265, %266
br i1 %267, label %47, label %268
268: ; preds = %264
br label %269
269: ; preds = %268
%270 = load i32, i32* %8
%271 = add nsw i32 %270, 1
store i32 %271, i32* %8
br label %42
272: ; preds = %42
ret void
}

LLVM IR (-O2):
@str = [31 x i8] c"\0A\0AToo many iterations in tqli.\00"
define void @eigenvalue_tqli(double* nocapture %0, double* nocapture %1, i32 %2) {
%4 = icmp slt i32 %2, 2
br i1 %4, label %15, label %5
5: ; preds = %3
%6 = getelementptr double, double* %1, i64 1
%7 = bitcast double* %6 to i8*
%8 = getelementptr double, double* %1, i64 2
%9 = bitcast double* %8 to i8*
%10 = add nsw i32 %2, -1
%11 = zext i32 %10 to i64
%12 = shl nuw nsw i64 %11, 3
%13 = zext i32 %2 to i64
%14 = getelementptr inbounds double, double* %1, i64 %13
store double 0.000000e+00, double* %14
br label %19
15: ; preds = %3
%16 = sext i32 %2 to i64
%17 = getelementptr inbounds double, double* %1, i64 %16
store double 0.000000e+00, double* %17
%18 = icmp eq i32 %2, 1
br i1 %18, label %19, label %128
19: ; preds = %5, %15
%20 = phi i64 [ %13, %5 ], [ %16, %15 ]
%21 = add nuw i32 %2, 1
%22 = zext i32 %21 to i64
br label %23
23: ; preds = %19, %126
%24 = phi i64 [ 1, %19 ], [ %27, %126 ]
%25 = trunc i64 %24 to i32
%26 = call i32 @llvm.smax.i32(i32 %2, i32 %25)
%27 = add nuw nsw i64 %24, 1
%28 = and i64 %27, 4294967295
%29 = getelementptr inbounds double, double* %0, i64 %28
%30 = getelementptr inbounds double, double* %0, i64 %24
%31 = getelementptr inbounds double, double* %1, i64 %24
br label %32
32: ; preds = %124, %23
%33 = phi i32 [ %58, %124 ], [ 0, %23 ]
br label %34
34: ; preds = %37, %32
%35 = phi i64 [ %39, %37 ], [ %24, %32 ]
%36 = icmp slt i64 %35, %20
br i1 %36, label %37, label %53
37: ; preds = %34
%38 = getelementptr inbounds double, double* %0, i64 %35
%39 = add nuw nsw i64 %35, 1
%40 = bitcast double* %38 to <2 x double>*
%41 = load <2 x double>, <2 x double>* %40
%42 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %41)
%43 = shufflevector <2 x double> %42, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%44 = fadd <2 x double> %42, %43
%45 = extractelement <2 x double> %44, i64 0
%46 = getelementptr inbounds double, double* %1, i64 %35
%47 = load double, double* %46
%48 = tail call double @llvm.fabs.f64(double %47)
%49 = fadd double %48, %45
%50 = fcmp oeq double %49, %45
br i1 %50, label %51, label %34
51: ; preds = %37
%52 = trunc i64 %35 to i32
br label %53
53: ; preds = %34, %51
%54 = phi i32 [ %52, %51 ], [ %26, %34 ]
%55 = zext i32 %54 to i64
%56 = icmp eq i64 %24, %55
br i1 %56, label %126, label %57
57: ; preds = %53
%58 = add nuw nsw i32 %33, 1
%59 = icmp eq i32 %33, 30
br i1 %59, label %60, label %63
60: ; preds = %57
%61 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%62 = tail call i32 @exit(i32 1)
unreachable
63: ; preds = %57
%64 = load double, double* %29
%65 = load double, double* %30
%66 = fsub double %64, %65
%67 = load double, double* %31
%68 = fmul double %67, 2.000000e+00
%69 = fdiv double %66, %68
%70 = tail call double @pythag(double %69, double 1.000000e+00)
%71 = getelementptr inbounds double, double* %0, i64 %55
%72 = load double, double* %71
%73 = load double, double* %30
%74 = fsub double %72, %73
%75 = load double, double* %31
%76 = fcmp olt double %69, 0.000000e+00
%77 = tail call double @llvm.fabs.f64(double %70)
%78 = fneg double %77
%79 = select i1 %76, double %78, double %77
%80 = fadd double %69, %79
%81 = fdiv double %75, %80
%82 = fadd double %74, %81
%83 = icmp ult i64 %24, %55
br i1 %83, label %84, label %119
84: ; preds = %63, %98
%85 = phi i64 [ %90, %98 ], [ %55, %63 ]
%86 = phi double [ %100, %98 ], [ 1.000000e+00, %63 ]
%87 = phi double [ %113, %98 ], [ %82, %63 ]
%88 = phi double [ %110, %98 ], [ 0.000000e+00, %63 ]
%89 = phi double [ %99, %98 ], [ 1.000000e+00, %63 ]
%90 = add nsw i64 %85, -1
%91 = getelementptr inbounds double, double* %1, i64 %90
%92 = load double, double* %91
%93 = fmul double %89, %92
%94 = fmul double %86, %92
%95 = tail call double @pythag(double %93, double %87)
%96 = getelementptr inbounds double, double* %1, i64 %85
store double %95, double* %96
%97 = fcmp oeq double %95, 0.000000e+00
br i1 %97, label %115, label %98
98: ; preds = %84
%99 = fdiv double %93, %95
%100 = fdiv double %87, %95
%101 = getelementptr inbounds double, double* %0, i64 %85
%102 = load double, double* %101
%103 = fsub double %102, %88
%104 = getelementptr inbounds double, double* %0, i64 %90
%105 = load double, double* %104
%106 = fsub double %105, %103
%107 = fmul double %100, 2.000000e+00
%108 = fmul double %94, %107
%109 = tail call double @llvm.fmuladd.f64(double %106, double %99, double %108)
%110 = fmul double %99, %109
%111 = fadd double %103, %110
store double %111, double* %101
%112 = fneg double %94
%113 = tail call double @llvm.fmuladd.f64(double %100, double %109, double %112)
%114 = icmp sgt i64 %90, %24
br i1 %114, label %84, label %119
115: ; preds = %84
%116 = getelementptr inbounds double, double* %0, i64 %85
%117 = load double, double* %116
%118 = fsub double %117, %88
store double %118, double* %116
br label %124
119: ; preds = %98, %63
%120 = phi double [ 0.000000e+00, %63 ], [ %110, %98 ]
%121 = phi double [ %82, %63 ], [ %113, %98 ]
%122 = load double, double* %30
%123 = fsub double %122, %120
store double %123, double* %30
store double %121, double* %31
br label %124
124: ; preds = %115, %119
%125 = getelementptr inbounds double, double* %1, i64 %55
store double 0.000000e+00, double* %125
br label %32
126: ; preds = %53
%127 = icmp eq i64 %27, %22
br i1 %127, label %128, label %23
128: ; preds = %126, %15
ret void
}