#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*/ fprintf(int /*<<< orphan*/, char *);
double pythaga(double, double);
int /*<<< orphan*/ stderr;
void tqlia(double *d, double *e, int n, 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.0;
  for (l = 0; l < n; l++) {
    iter = 0;
    do {
      for (m = l; m <= (n - 2); m++) {
        dd = fabs(d[m]) + fabs(d[m + 1]);
        if ((double)(fabs(e[m]) + dd) == dd)
          break;
      }
      if (m != l) {
        if (iter++ == 30) {
          fprintf(stderr, "Error: Too many iterations in eigen evaluation.\n");
          exit(-1);
        }
        g = (d[l + 1] - d[l]) / (2.0 * e[l]);
        r = pythaga(g, 1.0);
        g = d[m] - d[l] + e[l] / (g + ((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 = pythaga(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):
<tqlia>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x1,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    118a <tqlia+0x5a>
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%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    1151 <tqlia+0x21>
mov    -0x10(%rbp),%rax
mov    -0x14(%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    -0x14(%rbp),%eax
jge    16d5 <tqlia+0x5a5>
movl   $0x0,-0x2c(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jg     1254 <tqlia+0x124>
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xe1c(%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 0xdff(%rip),%xmm2
pand   %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xdde(%rip),%xmm1
pand   %xmm1,%xmm0
addsd  -0x68(%rbp),%xmm0
ucomisd -0x68(%rbp),%xmm0
jne    1241 <tqlia+0x111>
jp     1241 <tqlia+0x111>
jmp    1254 <tqlia+0x124>
jmp    1246 <tqlia+0x116>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11bf <tqlia+0x8f>
mov    -0x24(%rbp),%eax
cmp    -0x28(%rbp),%eax
je     16b1 <tqlia+0x581>
mov    -0x2c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x2c(%rbp)
cmp    $0x1e,%eax
jne    1293 <tqlia+0x163>
mov    0x2d65(%rip),%rax
mov    (%rax),%edi
lea    0xd9c(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@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    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  0xd56(%rip),%xmm1
mulsd  (%rax,%rcx,8),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  0xd33(%rip),%xmm1
call   1050 <pythaga@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    -0x10(%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     1357 <tqlia+0x227>
movsd  -0x48(%rbp),%xmm0
movaps 0xcba(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
jmp    1386 <tqlia+0x256>
movsd  -0x48(%rbp),%xmm0
movaps 0xc9d(%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  0xc54(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xc47(%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     164b <tqlia+0x51b>
movsd  -0x40(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x70(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
call   1050 <pythaga@plt>
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%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    148c <tqlia+0x35c>
jp     148c <tqlia+0x35c>
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    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    164b <tqlia+0x51b>
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  0xb33(%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    -0x14(%rbp),%eax
jge    1638 <tqlia+0x508>
mov    -0x20(%rbp),%rax
mov    -0x34(%rbp),%ecx
imul   -0x14(%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   -0x14(%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   -0x14(%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   -0x14(%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   -0x14(%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    1560 <tqlia+0x430>
jmp    163d <tqlia+0x50d>
mov    -0x30(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x30(%rbp)
jmp    13df <tqlia+0x2af>
movsd  -0x48(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1674 <tqlia+0x544>
jp     1674 <tqlia+0x544>
mov    -0x30(%rbp),%eax
cmp    -0x28(%rbp),%eax
jl     1674 <tqlia+0x544>
jmp    16b6 <tqlia+0x586>
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    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    16b6 <tqlia+0x586>
mov    -0x24(%rbp),%eax
cmp    -0x28(%rbp),%eax
jne    11b9 <tqlia+0x89>
jmp    16c7 <tqlia+0x597>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11a6 <tqlia+0x76>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tqlia>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
mov    %rcx,%rbx
mov    %edx,%r12d
mov    %rsi,%r15
mov    %rdi,%r13
cmp    $0x2,%edx
jl     1185 <tqlia+0x45>
lea    0x8(%r15),%rsi
lea    -0x1(%r12),%ebp
lea    0x0(,%rbp,8),%rdx
mov    %r15,%rdi
call   1040 <memmove@plt>
movq   $0x0,(%r15,%rbp,8)
jmp    119b <tqlia+0x5b>
movslq %r12d,%rax
movq   $0x0,-0x8(%r15,%rax,8)
cmp    $0x1,%r12d
jne    1532 <tqlia+0x3f2>
lea    -0x2(%r12),%eax
movslq %eax,%rsi
mov    %r12d,%eax
mov    %rax,%rbp
shl    $0x20,%rbp
lea    -0x8(%rbx),%rcx
mov    %rcx,0x58(%rsp)
mov    %rax,0x38(%rsp)
lea    0x0(,%rax,8),%r12
xor    %edi,%edi
movsd  0xe53(%rip),%xmm1
movdqa 0xe2b(%rip),%xmm3
mov    %r15,0x18(%rsp)
mov    %r13,0x10(%rsp)
mov    %rsi,0x28(%rsp)
jmp    1203 <tqlia+0xc3>
cs nopw 0x0(%rax,%rax,1)
mov    0x30(%rsp),%rax
mov    %rax,%rdi
cmp    0x38(%rsp),%rax
je     1532 <tqlia+0x3f2>
lea    0x1(%rdi),%rax
mov    %rax,0x30(%rsp)
xor    %r8d,%r8d
mov    %rdi,0x20(%rsp)
jmp    126a <tqlia+0x12a>
cs nopw 0x0(%rax,%rax,1)
mov    0x10(%rsp),%r13
movsd  0x0(%r13,%rdi,8),%xmm0
subsd  %xmm8,%xmm0
movsd  %xmm0,0x0(%r13,%rdi,8)
mov    0x18(%rsp),%r15
movsd  %xmm1,(%r15,%rdi,8)
mov    0x8(%rsp),%rax
movq   $0x0,(%r15,%rax,8)
mov    0x28(%rsp),%rsi
movsd  0xdc3(%rip),%xmm1
movdqa 0xd9b(%rip),%xmm3
mov    0x4(%rsp),%r8d
mov    %edi,%edx
mov    %rdi,%rcx
nop
mov    %rcx,%rax
mov    %edx,%r14d
cmp    %rsi,%rcx
jg     12ad <tqlia+0x16d>
lea    0x1(%rax),%rcx
movdqu 0x0(%r13,%rax,8),%xmm0
pand   %xmm3,%xmm0
pshufd $0xee,%xmm0,%xmm2
addsd  %xmm0,%xmm2
movq   (%r15,%rax,8),%xmm0
pand   %xmm3,%xmm0
addsd  %xmm2,%xmm0
lea    0x1(%r14),%edx
ucomisd %xmm2,%xmm0
jne    1270 <tqlia+0x130>
jp     1270 <tqlia+0x130>
mov    %eax,%ecx
cmp    %rdi,%rcx
je     11f0 <tqlia+0xb0>
cmp    $0x1e,%r8d
je     1544 <tqlia+0x404>
mov    0x30(%rsp),%rax
movsd  0x0(%r13,%rax,8),%xmm0
subsd  0x0(%r13,%rdi,8),%xmm0
add    $0x1,%r8d
mov    %r8d,0x4(%rsp)
movsd  (%r15,%rdi,8),%xmm2
addsd  %xmm2,%xmm2
divsd  %xmm2,%xmm0
movsd  %xmm0,0x40(%rsp)
mov    %rcx,0x8(%rsp)
call   1060 <pythaga@plt>
mov    0x8(%rsp),%rcx
mov    0x20(%rsp),%rdi
movsd  0x0(%r13,%rcx,8),%xmm4
subsd  0x0(%r13,%rdi,8),%xmm4
movsd  (%r15,%rdi,8),%xmm1
movapd %xmm0,%xmm2
andpd  0xcda(%rip),%xmm2
orpd   0xce2(%rip),%xmm0
xorpd  %xmm8,%xmm8
pxor   %xmm3,%xmm3
movsd  0x40(%rsp),%xmm5
cmpnlesd %xmm5,%xmm3
andpd  %xmm3,%xmm0
andnpd %xmm2,%xmm3
orpd   %xmm0,%xmm3
addsd  %xmm5,%xmm3
divsd  %xmm3,%xmm1
addsd  %xmm4,%xmm1
cmp    %rdi,%rcx
jbe    1220 <tqlia+0xe0>
mov    %r14d,%r9d
mov    0x58(%rsp),%rax
lea    (%rax,%r9,8),%r13
shl    $0x20,%r9
xorpd  %xmm8,%xmm8
mov    %rcx,%r15
movsd  0xc9d(%rip),%xmm0
movapd %xmm0,%xmm6
nopw   0x0(%rax,%rax,1)
movsd  %xmm1,0x60(%rsp)
movsd  %xmm6,0x70(%rsp)
mov    %r9,0x78(%rsp)
movapd %xmm8,0x40(%rsp)
mov    0x18(%rsp),%r14
movsd  -0x8(%r14,%r15,8),%xmm2
movsd  %xmm2,0x68(%rsp)
mulsd  %xmm2,%xmm0
movapd %xmm0,0x80(%rsp)
call   1060 <pythaga@plt>
movsd  %xmm0,(%r14,%r15,8)
ucomisd 0xc4e(%rip),%xmm0
jne    13e2 <tqlia+0x2a2>
jnp    14f0 <tqlia+0x3b0>
lea    -0x1(%r15),%r8
movsd  0x70(%rsp),%xmm3
mulsd  0x68(%rsp),%xmm3
movapd 0x80(%rsp),%xmm4
divsd  %xmm0,%xmm4
movsd  0x60(%rsp),%xmm6
divsd  %xmm0,%xmm6
mov    0x10(%rsp),%rcx
movsd  (%rcx,%r15,8),%xmm0
subsd  0x40(%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  0xbaf(%rip),%xmm7
mov    0x38(%rsp),%rcx
mov    %r13,%rdx
mov    0x78(%rsp),%r9
mov    %r9,%rsi
movapd %xmm4,%xmm0
cs nopw 0x0(%rax,%rax,1)
nop
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    1480 <tqlia+0x340>
movabs $0xffffffff00000000,%rcx
ff ff ff
add    %rcx,%r9
add    $0xfffffffffffffff8,%r13
mov    %r8,%r15
mov    0x20(%rsp),%rdi
cmp    %rdi,%r8
jg     1390 <tqlia+0x250>
jmp    1220 <tqlia+0xe0>
nopl   0x0(%rax)
mov    0x10(%rsp),%r13
movsd  0x0(%r13,%r15,8),%xmm0
subsd  0x40(%rsp),%xmm0
movsd  %xmm0,0x0(%r13,%r15,8)
mov    0x18(%rsp),%r15
mov    0x8(%rsp),%rax
movq   $0x0,(%r15,%rax,8)
mov    0x28(%rsp),%rsi
movsd  0xaf8(%rip),%xmm1
mov    0x20(%rsp),%rdi
jmp    125d <tqlia+0x11d>
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2a95(%rip),%rax
mov    (%rax),%edi
lea    0xadc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

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

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