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


x86 assembly (clang, -O0):
<tqli>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x1,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    117a <tqli+0x5a>
mov    -0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1141 <tqli+0x21>
mov    -0x18(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    16b2 <tqli+0x592>
movl   $0x0,-0x2c(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1244 <tqli+0x124>
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xe2c(%rip),%xmm1
pand   %xmm1,%xmm0
mov    -0x8(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movaps 0xe0f(%rip),%xmm2
pand   %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xdee(%rip),%xmm1
pand   %xmm1,%xmm0
addsd  -0x68(%rbp),%xmm0
ucomisd -0x68(%rbp),%xmm0
jne    1231 <tqli+0x111>
jp     1231 <tqli+0x111>
jmp    1244 <tqli+0x124>
jmp    1236 <tqli+0x116>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11af <tqli+0x8f>
mov    -0x24(%rbp),%eax
cmp    -0x28(%rbp),%eax
je     168e <tqli+0x56e>
mov    -0x2c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x2c(%rbp)
cmp    $0x1e,%eax
jne    1270 <tqli+0x150>
lea    0xdb5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x28(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  0xd79(%rip),%xmm1
mulsd  (%rax,%rcx,8),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  0xd56(%rip),%xmm1
call   1040 <pythag@plt>
movsd  %xmm0,-0x48(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x28(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x18(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x58(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1334 <tqli+0x214>
movsd  -0x48(%rbp),%xmm0
movaps 0xcdd(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
jmp    1363 <tqli+0x243>
movsd  -0x48(%rbp),%xmm0
movaps 0xcc0(%rip),%xmm1
pand   %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x88(%rbp),%xmm1
ff
movsd  -0x80(%rbp),%xmm2
movsd  -0x98(%rbp),%xmm3
ff
addsd  %xmm3,%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xc77(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xc6a(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x24(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x28(%rbp),%eax
jl     1628 <tqli+0x508>
movsd  -0x40(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x70(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
call   1040 <pythag@plt>
movsd  %xmm0,-0x48(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x48(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1469 <tqli+0x349>
jp     1469 <tqli+0x349>
movsd  -0x50(%rbp),%xmm1
mov    -0x8(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    1628 <tqli+0x508>
movsd  -0x60(%rbp),%xmm0
divsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x58(%rbp),%xmm0
divsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x58(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  0xb56(%rip),%xmm1
mulsd  -0x70(%rbp),%xmm1
mulsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
mulsd  -0x48(%rbp),%xmm1
movsd  %xmm1,-0x50(%rbp)
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x70(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1615 <tqli+0x4f5>
mov    -0x20(%rbp),%rax
mov    -0x34(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x30(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x40(%rbp),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x34(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
mov    -0x34(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x30(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x70(%rbp),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x34(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  -0x60(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
mov    -0x34(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    153d <tqli+0x41d>
jmp    161a <tqli+0x4fa>
mov    -0x30(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x30(%rbp)
jmp    13bc <tqli+0x29c>
movsd  -0x48(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1651 <tqli+0x531>
jp     1651 <tqli+0x531>
mov    -0x30(%rbp),%eax
cmp    -0x28(%rbp),%eax
jl     1651 <tqli+0x531>
jmp    1693 <tqli+0x573>
movsd  -0x50(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x58(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    1693 <tqli+0x573>
mov    -0x24(%rbp),%eax
cmp    -0x28(%rbp),%eax
jne    11a9 <tqli+0x89>
jmp    16a4 <tqli+0x584>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1196 <tqli+0x76>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tqli>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
mov    %rcx,%rbx
mov    %rdx,%r14
mov    %esi,%r12d
mov    %rdi,%r13
cmp    $0x2,%esi
jl     117a <tqli+0x4a>
lea    0x8(%r14),%rsi
lea    -0x1(%r12),%ebp
lea    0x0(,%rbp,8),%rdx
mov    %r14,%rdi
call   1050 <memmove@plt>
mov    %rbp,0x28(%rsp)
movq   $0x0,(%r14,%rbp,8)
jmp    1197 <tqli+0x67>
movslq %r12d,%rax
movq   $0x0,-0x8(%r14,%rax,8)
xor    %eax,%eax
mov    %rax,0x28(%rsp)
cmp    $0x1,%r12d
jne    1585 <tqli+0x455>
mov    %r12d,%eax
mov    %rax,%rbp
shl    $0x20,%rbp
lea    -0x8(%rbx),%rcx
mov    %rcx,0x60(%rsp)
mov    %rax,0x48(%rsp)
lea    0x0(,%rax,8),%r12
movq   $0xffffffffffffffff,0x40(%rsp)
ff ff
xor    %r15d,%r15d
movsd  0xe55(%rip),%xmm1
movdqa 0xe2d(%rip),%xmm3
mov    %r14,0x20(%rsp)
mov    %r13,0x10(%rsp)
jmp    11f9 <tqli+0xc9>
nop
addq   $0x1,0x40(%rsp)
mov    0x38(%rsp),%rax
mov    %rax,%r15
cmp    0x48(%rsp),%rax
je     1585 <tqli+0x455>
mov    0x28(%rsp),%rax
cmp    %eax,%r15d
cmovg  %r15d,%eax
mov    %rax,0x68(%rsp)
mov    %rax,%rdx
neg    %rdx
lea    0x1(%r15),%rax
mov    %rax,0x38(%rsp)
xor    %esi,%esi
mov    %r15,0x18(%rsp)
mov    %rdx,0x30(%rsp)
jmp    127e <tqli+0x14e>
nopw   0x0(%rax,%rax,1)
mov    0x10(%rsp),%r13
mov    0x18(%rsp),%r15
movsd  0x0(%r13,%r15,8),%xmm0
subsd  %xmm8,%xmm0
movsd  %xmm0,0x0(%r13,%r15,8)
mov    0x20(%rsp),%r14
movsd  %xmm1,(%r14,%r15,8)
mov    0x8(%rsp),%rax
movq   $0x0,(%r14,%rax,8)
movsd  0xdb3(%rip),%xmm1
movdqa 0xd8b(%rip),%xmm3
mov    0x30(%rsp),%rdx
mov    0x4(%rsp),%esi
mov    0x40(%rsp),%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    (%rdx,%rax,1),%rcx
cmp    $0xffffffffffffffff,%rcx
je     12e0 <tqli+0x1b0>
movdqu 0x8(%r13,%rax,8),%xmm0
pand   %xmm3,%xmm0
pshufd $0xee,%xmm0,%xmm2
addsd  %xmm0,%xmm2
movq   0x8(%r14,%rax,8),%xmm0
pand   %xmm3,%xmm0
addsd  %xmm2,%xmm0
add    $0x1,%rax
ucomisd %xmm2,%xmm0
jne    1290 <tqli+0x160>
jp     1290 <tqli+0x160>
mov    %eax,%eax
cmp    %r15,%rax
jne    12ee <tqli+0x1be>
jmp    11e0 <tqli+0xb0>
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x68(%rsp),%rax
cmp    %r15,%rax
je     11e0 <tqli+0xb0>
mov    %rax,0x8(%rsp)
cmp    $0x1e,%esi
jne    1314 <tqli+0x1e4>
lea    0xd31(%rip),%rdi
mov    %esi,0x4(%rsp)
call   1030 <printf@plt>
mov    0x4(%rsp),%esi
movsd  0xd0c(%rip),%xmm1
mov    0x38(%rsp),%rax
movsd  0x0(%r13,%rax,8),%xmm0
subsd  0x0(%r13,%r15,8),%xmm0
add    $0x1,%esi
mov    %esi,0x4(%rsp)
movsd  (%r14,%r15,8),%xmm2
addsd  %xmm2,%xmm2
divsd  %xmm2,%xmm0
movsd  %xmm0,0x50(%rsp)
call   1040 <pythag@plt>
mov    0x8(%rsp),%rcx
movsd  0x0(%r13,%rcx,8),%xmm4
subsd  0x0(%r13,%r15,8),%xmm4
movsd  (%r14,%r15,8),%xmm1
movapd %xmm0,%xmm2
andpd  0xc94(%rip),%xmm2
orpd   0xc9c(%rip),%xmm0
xorpd  %xmm8,%xmm8
pxor   %xmm3,%xmm3
movsd  0x50(%rsp),%xmm5
cmpnlesd %xmm5,%xmm3
andpd  %xmm3,%xmm0
andnpd %xmm2,%xmm3
orpd   %xmm0,%xmm3
addsd  %xmm5,%xmm3
divsd  %xmm3,%xmm1
addsd  %xmm4,%xmm1
cmp    %r15,%rcx
jbe    1230 <tqli+0x100>
mov    %rcx,%r9
shl    $0x20,%r9
mov    0x60(%rsp),%rax
lea    (%rax,%rcx,8),%r13
xorpd  %xmm8,%xmm8
mov    %rcx,%r15
movsd  0xc57(%rip),%xmm0
movapd %xmm0,%xmm6
nopl   (%rax)
movsd  %xmm1,0x70(%rsp)
movsd  %xmm6,0x80(%rsp)
mov    %r9,0x88(%rsp)
movapd %xmm8,0x50(%rsp)
mov    0x20(%rsp),%r14
movsd  -0x8(%r14,%r15,8),%xmm2
movsd  %xmm2,0x78(%rsp)
mulsd  %xmm2,%xmm0
movapd %xmm0,0x90(%rsp)
call   1040 <pythag@plt>
movsd  %xmm0,(%r14,%r15,8)
ucomisd 0xc08(%rip),%xmm0
jne    1428 <tqli+0x2f8>
jnp    1540 <tqli+0x410>
lea    -0x1(%r15),%r8
movsd  0x80(%rsp),%xmm3
mulsd  0x78(%rsp),%xmm3
movapd 0x90(%rsp),%xmm4
divsd  %xmm0,%xmm4
movsd  0x70(%rsp),%xmm6
divsd  %xmm0,%xmm6
mov    0x10(%rsp),%rcx
movsd  (%rcx,%r15,8),%xmm0
subsd  0x50(%rsp),%xmm0
movsd  (%rcx,%r8,8),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm6,%xmm2
addsd  %xmm6,%xmm2
mulsd  %xmm3,%xmm2
mulsd  %xmm4,%xmm1
addsd  %xmm2,%xmm1
movapd %xmm4,%xmm8
mulsd  %xmm1,%xmm8
addsd  %xmm8,%xmm0
movsd  %xmm0,(%rcx,%r15,8)
mulsd  %xmm6,%xmm1
subsd  %xmm3,%xmm1
movapd %xmm4,%xmm7
xorpd  0xb66(%rip),%xmm7
mov    0x48(%rsp),%rcx
mov    %r13,%rdx
mov    0x88(%rsp),%r9
mov    %r9,%rsi
movapd %xmm4,%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rsi,%rdi
sar    $0x1d,%rdi
movsd  (%rbx,%rdi,1),%xmm5
movsd  (%rdx),%xmm2
movapd %xmm6,%xmm3
mulsd  %xmm5,%xmm3
movapd %xmm0,%xmm4
mulsd  %xmm2,%xmm4
addsd  %xmm3,%xmm4
movsd  %xmm4,(%rbx,%rdi,1)
mulsd  %xmm7,%xmm5
mulsd  %xmm6,%xmm2
addsd  %xmm5,%xmm2
movsd  %xmm2,(%rdx)
add    %rbp,%rsi
add    %r12,%rdx
add    $0xffffffffffffffff,%rcx
jne    14d0 <tqli+0x3a0>
movabs $0xffffffff00000000,%rcx
ff ff ff
add    %rcx,%r9
add    $0xfffffffffffffff8,%r13
mov    %r8,%r15
cmp    0x18(%rsp),%r8
jg     13d0 <tqli+0x2a0>
jmp    1230 <tqli+0x100>
nopl   0x0(%rax)
mov    0x10(%rsp),%r13
movsd  0x0(%r13,%r15,8),%xmm0
subsd  0x50(%rsp),%xmm0
movsd  %xmm0,0x0(%r13,%r15,8)
mov    0x20(%rsp),%r14
mov    0x8(%rsp),%rax
movq   $0x0,(%r14,%rax,8)
movsd  0xaad(%rip),%xmm1
movdqa 0xa85(%rip),%xmm3
mov    0x18(%rsp),%r15
jmp    1275 <tqli+0x145>
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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