#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);
double sqrt(int);
int EigenTridagQLImplicit(double d[], double e[], int n, double z[]) {
  int m, j, iter, niter = 30, status = 0, i, k;
  double s, r, p, g, f, dd, c, b, aa, bb;
  for (i = 1; i < n; i++)
    e[i - 1] = e[i];
  e[n - 1] = 0;
  for (j = 0; j < n; j++) {
    iter = 0;
    do {
      for (m = j; m < n - 1; m++) {
        dd = fabs(d[m]) + fabs(d[m + 1]);
        if (fabs(e[m]) + dd == dd)
          break;
      }
      if (m != j) {
        if (iter++ == niter) {
          status = -1;
          break;
        }
        g = (d[j + 1] - d[j]) / (2 * e[j]);
        if ((aa = fabs(g)) > 1)
          r = aa * sqrt(1 + 1 / (g * g));
        else
          r = sqrt(1 + g * g);
        g = d[m] - d[j] + e[j] / (g + ((g) >= 0.0 ? fabs(r) : -fabs(r)));
        s = c = 1;
        p = 0;
        for (i = m - 1; i >= j; i--) {
          f = s * e[i];
          b = c * e[i];
          aa = fabs(f);
          bb = fabs(g);
          if (aa > bb) {
            bb /= aa;
            r = aa * sqrt(1 + bb * bb);
          } else if (bb == 0)
            r = 0;
          else {
            aa /= bb;
            r = bb * sqrt(1 + aa * aa);
          }
          e[i + 1] = r;
          if (r == 0) {
            d[i + 1] -= p;
            e[m] = 0;
            break;
          }
          s = f / r;
          c = g / r;
          g = d[i + 1] - p;
          r = (d[i] - g) * s + 2 * 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 && i >= j)
          continue;
        d[j] -= p;
        e[j] = g;
        e[m] = 0;
      }
    } while (m != j);
  }
  return (status);
}


x86 assembly (clang, -O0):
<EigenTridagQLImplicit>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x1e,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x1,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1178 <EigenTridagQLImplicit+0x68>
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    113f <EigenTridagQLImplicit+0x2f>
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    1880 <EigenTridagQLImplicit+0x770>
movl   $0x0,-0x2c(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1242 <EigenTridagQLImplicit+0x132>
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xe2e(%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 0xe11(%rip),%xmm2
pand   %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xdf0(%rip),%xmm1
pand   %xmm1,%xmm0
addsd  -0x70(%rbp),%xmm0
ucomisd -0x70(%rbp),%xmm0
jne    122f <EigenTridagQLImplicit+0x11f>
jp     122f <EigenTridagQLImplicit+0x11f>
jmp    1242 <EigenTridagQLImplicit+0x132>
jmp    1234 <EigenTridagQLImplicit+0x124>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11ad <EigenTridagQLImplicit+0x9d>
mov    -0x24(%rbp),%eax
cmp    -0x28(%rbp),%eax
je     185c <EigenTridagQLImplicit+0x74c>
mov    -0x2c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x2c(%rbp)
cmp    -0x30(%rbp),%eax
jne    126e <EigenTridagQLImplicit+0x15e>
movl   $0xffffffff,-0x34(%rbp)
jmp    186d <EigenTridagQLImplicit+0x75d>
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  0xd7b(%rip),%xmm1
mulsd  (%rax,%rcx,8),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
movaps 0xd49(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xd45(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1329 <EigenTridagQLImplicit+0x219>
movsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  0xd19(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  0xd0d(%rip),%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x98(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    1351 <EigenTridagQLImplicit+0x241>
movsd  -0x60(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xcd1(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <sqrt@plt>
movsd  %xmm0,-0x50(%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,-0xb0(%rbp)
ff
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     13c4 <EigenTridagQLImplicit+0x2b4>
movsd  -0x50(%rbp),%xmm0
movaps 0xc4d(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
jmp    13f3 <EigenTridagQLImplicit+0x2e3>
movsd  -0x50(%rbp),%xmm0
movaps 0xc30(%rip),%xmm1
pand   %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
movsd  -0xa8(%rbp),%xmm1
ff
movsd  -0xa0(%rbp),%xmm2
ff
movsd  -0xb8(%rbp),%xmm3
ff
addsd  %xmm3,%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xbe4(%rip),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0xbd7(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x24(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x28(%rbp),%eax
jl     17f6 <EigenTridagQLImplicit+0x6e6>
movsd  -0x48(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x78(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x68(%rbp),%xmm0
movaps 0xb6b(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
movaps 0xb53(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
ucomisd -0x90(%rbp),%xmm0
ff
jbe    153d <EigenTridagQLImplicit+0x42d>
movsd  -0x88(%rbp),%xmm1
ff
movsd  -0x90(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
movsd  0xaf9(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0xc0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    15d3 <EigenTridagQLImplicit+0x4c3>
movsd  -0x90(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1565 <EigenTridagQLImplicit+0x455>
jp     1565 <EigenTridagQLImplicit+0x455>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    15ce <EigenTridagQLImplicit+0x4be>
movsd  -0x90(%rbp),%xmm1
ff
movsd  -0x88(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
movsd  0xa63(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0xc8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    15d3 <EigenTridagQLImplicit+0x4c3>
movsd  -0x50(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x50(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1637 <EigenTridagQLImplicit+0x527>
jp     1637 <EigenTridagQLImplicit+0x527>
movsd  -0x58(%rbp),%xmm1
mov    -0x8(%rbp),%rax
mov    -0x38(%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    17f6 <EigenTridagQLImplicit+0x6e6>
movsd  -0x68(%rbp),%xmm0
divsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x60(%rbp),%xmm0
divsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x60(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  0x988(%rip),%xmm1
mulsd  -0x78(%rbp),%xmm1
mulsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
movsd  %xmm1,-0x58(%rbp)
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x78(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x80(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    17e3 <EigenTridagQLImplicit+0x6d3>
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x38(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x48(%rbp),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x38(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x38(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x78(%rbp),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x38(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  -0x68(%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    -0x3c(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x38(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    170b <EigenTridagQLImplicit+0x5fb>
jmp    17e8 <EigenTridagQLImplicit+0x6d8>
mov    -0x38(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x38(%rbp)
jmp    144f <EigenTridagQLImplicit+0x33f>
movsd  -0x50(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    181f <EigenTridagQLImplicit+0x70f>
jp     181f <EigenTridagQLImplicit+0x70f>
mov    -0x38(%rbp),%eax
cmp    -0x28(%rbp),%eax
jl     181f <EigenTridagQLImplicit+0x70f>
jmp    1861 <EigenTridagQLImplicit+0x751>
movsd  -0x58(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x60(%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    1861 <EigenTridagQLImplicit+0x751>
mov    -0x24(%rbp),%eax
cmp    -0x28(%rbp),%eax
jne    11a7 <EigenTridagQLImplicit+0x97>
jmp    1872 <EigenTridagQLImplicit+0x762>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1194 <EigenTridagQLImplicit+0x84>
mov    -0x34(%rbp),%eax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EigenTridagQLImplicit>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xd8,%rsp
mov    %rcx,%rbx
mov    %edx,%r13d
mov    %rsi,%r8
cmp    $0x2,%edx
mov    %rsi,0x20(%rsp)
mov    %rdi,0x8(%rsp)
jl     117a <EigenTridagQLImplicit+0x5a>
lea    0x8(%r8),%rsi
lea    -0x1(%r13),%ebp
lea    0x0(,%rbp,8),%rdx
mov    %r8,%rdi
call   1030 <memmove@plt>
mov    0x8(%rsp),%rdi
mov    0x20(%rsp),%r8
mov    %rbp,0x48(%rsp)
movq   $0x0,(%r8,%rbp,8)
jmp    119f <EigenTridagQLImplicit+0x7f>
movslq %r13d,%rax
movq   $0x0,-0x8(%r8,%rax,8)
xor    %eax,%eax
mov    %rax,0x48(%rsp)
movl   $0x0,0x4(%rsp)
cmp    $0x1,%r13d
jne    1693 <EigenTridagQLImplicit+0x573>
mov    %r13d,%eax
mov    %rax,%rbp
shl    $0x20,%rbp
lea    -0x8(%rbx),%rcx
mov    %rcx,0x78(%rsp)
mov    %rax,0x58(%rsp)
lea    0x0(,%rax,8),%r12
xor    %eax,%eax
movq   $0xffffffffffffffff,0x50(%rsp)
ff ff
movdqa 0xe2e(%rip),%xmm3
movsd  0xe45(%rip),%xmm9
movl   $0x0,0x4(%rsp)
jmp    1209 <EigenTridagQLImplicit+0xe9>
cs nopw 0x0(%rax,%rax,1)
nop
movl   $0xffffffff,0x4(%rsp)
ff
addq   $0x1,0x50(%rsp)
cmp    0x58(%rsp),%rax
je     1693 <EigenTridagQLImplicit+0x573>
mov    %rax,%rcx
mov    0x48(%rsp),%rax
cmp    %eax,%ecx
cmovg  %ecx,%eax
mov    %rax,0x80(%rsp)
neg    %rax
mov    %rax,0x88(%rsp)
mov    %rcx,0x10(%rsp)
lea    0x1(%rcx),%rax
mov    %rax,0x90(%rsp)
movl   $0x0,0x1c(%rsp)
jmp    1280 <EigenTridagQLImplicit+0x160>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  0xdc7(%rip),%xmm9
mov    0x10(%rsp),%rax
movsd  (%rdi,%rax,8),%xmm0
subsd  %xmm8,%xmm0
movsd  %xmm0,(%rdi,%rax,8)
movsd  %xmm5,(%r8,%rax,8)
mov    0x28(%rsp),%rax
movq   $0x0,(%r8,%rax,8)
mov    0x50(%rsp),%rax
mov    0x88(%rsp),%rdx
nopl   (%rax)
lea    (%rdx,%rax,1),%rcx
cmp    $0xffffffffffffffff,%rcx
je     12d0 <EigenTridagQLImplicit+0x1b0>
movdqu 0x8(%rdi,%rax,8),%xmm0
pand   %xmm3,%xmm0
pshufd $0xee,%xmm0,%xmm1
addsd  %xmm0,%xmm1
movq   0x8(%r8,%rax,8),%xmm0
pand   %xmm3,%xmm0
addsd  %xmm1,%xmm0
add    $0x1,%rax
ucomisd %xmm1,%xmm0
jne    1290 <EigenTridagQLImplicit+0x170>
jp     1290 <EigenTridagQLImplicit+0x170>
mov    %eax,%r15d
jmp    12d8 <EigenTridagQLImplicit+0x1b8>
nopl   (%rax)
mov    0x80(%rsp),%r15
cmp    0x10(%rsp),%r15
mov    0x90(%rsp),%rax
mov    0x1c(%rsp),%r14d
je     11f8 <EigenTridagQLImplicit+0xd8>
cmp    $0x1e,%r14d
je     11f0 <EigenTridagQLImplicit+0xd0>
movsd  (%rdi,%rax,8),%xmm4
mov    0x10(%rsp),%rax
subsd  (%rdi,%rax,8),%xmm4
movsd  (%r8,%rax,8),%xmm0
addsd  %xmm0,%xmm0
divsd  %xmm0,%xmm4
movapd %xmm4,%xmm5
andpd  %xmm3,%xmm5
ucomisd %xmm9,%xmm5
movapd %xmm4,0x30(%rsp)
movapd %xmm4,%xmm0
mulsd  %xmm4,%xmm0
jbe    1380 <EigenTridagQLImplicit+0x260>
movapd %xmm9,%xmm1
divsd  %xmm0,%xmm1
addsd  %xmm9,%xmm1
cvttsd2si %xmm1,%edi
movapd %xmm5,0x60(%rsp)
call   1040 <sqrt@plt>
movapd 0x60(%rsp),%xmm6
movapd 0x30(%rsp),%xmm4
movapd 0xc9b(%rip),%xmm3
mov    0x8(%rsp),%rdi
mov    0x20(%rsp),%r8
mulsd  %xmm0,%xmm6
jmp    13aa <EigenTridagQLImplicit+0x28a>
cs nopw 0x0(%rax,%rax,1)
nop
addsd  %xmm9,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sqrt@plt>
movapd 0x30(%rsp),%xmm4
movapd 0xc64(%rip),%xmm3
mov    0x8(%rsp),%rdi
mov    0x20(%rsp),%r8
movapd %xmm0,%xmm6
add    $0x1,%r14d
movsd  (%rdi,%r15,8),%xmm0
mov    0x10(%rsp),%rax
subsd  (%rdi,%rax,8),%xmm0
movsd  (%r8,%rax,8),%xmm5
movapd %xmm6,%xmm1
andpd  %xmm3,%xmm1
orpd   0xc3c(%rip),%xmm6
xorpd  %xmm8,%xmm8
xorpd  %xmm2,%xmm2
cmpnlesd %xmm4,%xmm2
andpd  %xmm2,%xmm6
andnpd %xmm1,%xmm2
orpd   %xmm6,%xmm2
addsd  %xmm4,%xmm2
divsd  %xmm2,%xmm5
addsd  %xmm0,%xmm5
cmp    %rax,%r15
mov    %r14d,0x1c(%rsp)
mov    %r15,0x28(%rsp)
jbe    1250 <EigenTridagQLImplicit+0x130>
mov    %r15,%r13
shl    $0x20,%r13
mov    0x78(%rsp),%rax
lea    (%rax,%r15,8),%r14
xorpd  %xmm8,%xmm8
movsd  0xbf5(%rip),%xmm9
movapd %xmm9,%xmm6
movapd %xmm9,%xmm7
cs nopw 0x0(%rax,%rax,1)
nop
movsd  -0x8(%r8,%r15,8),%xmm4
mulsd  %xmm4,%xmm7
movapd %xmm7,%xmm2
movapd 0xba9(%rip),%xmm1
andpd  %xmm1,%xmm2
movapd %xmm5,%xmm0
andpd  %xmm1,%xmm0
ucomisd %xmm0,%xmm2
movapd %xmm5,0x30(%rsp)
movapd %xmm8,0x60(%rsp)
movapd %xmm7,0xc0(%rsp)
movapd %xmm6,0xb0(%rsp)
movsd  %xmm4,0x98(%rsp)
jbe    14b0 <EigenTridagQLImplicit+0x390>
divsd  %xmm2,%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm9,%xmm0
movapd %xmm2,0xa0(%rsp)
jmp    14de <EigenTridagQLImplicit+0x3be>
nopl   0x0(%rax)
ucomisd 0xb70(%rip),%xmm5
jne    14c0 <EigenTridagQLImplicit+0x3a0>
jnp    1674 <EigenTridagQLImplicit+0x554>
movapd %xmm0,%xmm1
divsd  %xmm0,%xmm2
mulsd  %xmm2,%xmm2
addsd  %xmm9,%xmm2
movapd %xmm2,%xmm0
movapd %xmm1,0xa0(%rsp)
cvttsd2si %xmm0,%edi
call   1040 <sqrt@plt>
mulsd  0xa0(%rsp),%xmm0
mov    0x20(%rsp),%r8
movsd  %xmm0,(%r8,%r15,8)
ucomisd 0xb25(%rip),%xmm0
jne    150b <EigenTridagQLImplicit+0x3eb>
jnp    161a <EigenTridagQLImplicit+0x4fa>
lea    -0x1(%r15),%r9
movapd 0xb0(%rsp),%xmm1
mulsd  0x98(%rsp),%xmm1
movapd 0xc0(%rsp),%xmm7
divsd  %xmm0,%xmm7
movapd 0x30(%rsp),%xmm6
divsd  %xmm0,%xmm6
mov    0x8(%rsp),%rdi
movsd  (%rdi,%r15,8),%xmm0
subsd  0x60(%rsp),%xmm0
movsd  (%rdi,%r9,8),%xmm5
subsd  %xmm0,%xmm5
movapd %xmm6,%xmm2
addsd  %xmm6,%xmm2
mulsd  %xmm1,%xmm2
mulsd  %xmm7,%xmm5
addsd  %xmm2,%xmm5
movapd %xmm7,%xmm8
mulsd  %xmm5,%xmm8
addsd  %xmm8,%xmm0
movsd  %xmm0,(%rdi,%r15,8)
mulsd  %xmm6,%xmm5
subsd  %xmm1,%xmm5
movapd %xmm7,%xmm0
xorpd  0xa80(%rip),%xmm0
mov    0x58(%rsp),%rcx
mov    %r14,%rdx
mov    %r13,%rax
nopl   0x0(%rax,%rax,1)
mov    %rax,%rsi
sar    $0x1d,%rsi
movsd  (%rbx,%rsi,1),%xmm1
movsd  (%rdx),%xmm2
movapd %xmm6,%xmm3
mulsd  %xmm1,%xmm3
movapd %xmm7,%xmm4
mulsd  %xmm2,%xmm4
addsd  %xmm3,%xmm4
movsd  %xmm4,(%rbx,%rsi,1)
mulsd  %xmm0,%xmm1
mulsd  %xmm6,%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,(%rdx)
add    %rbp,%rax
add    %r12,%rdx
add    $0xffffffffffffffff,%rcx
jne    15a0 <EigenTridagQLImplicit+0x480>
movabs $0xffffffff00000000,%rax
ff ff ff
add    %rax,%r13
add    $0xfffffffffffffff8,%r14
mov    %r9,%r15
cmp    0x10(%rsp),%r9
movapd 0x9fa(%rip),%xmm3
movsd  0xa11(%rip),%xmm9
jg     1440 <EigenTridagQLImplicit+0x320>
jmp    1259 <EigenTridagQLImplicit+0x139>
mov    0x8(%rsp),%rdi
movsd  (%rdi,%r15,8),%xmm1
movapd 0x60(%rsp),%xmm8
subsd  %xmm8,%xmm1
movsd  %xmm1,(%rdi,%r15,8)
mov    0x28(%rsp),%rax
movq   $0x0,(%r8,%rax,8)
ucomisd 0x9dc(%rip),%xmm0
movapd 0x9ac(%rip),%xmm3
movsd  0x9c3(%rip),%xmm9
movapd 0x30(%rsp),%xmm5
jne    1259 <EigenTridagQLImplicit+0x139>
jp     1259 <EigenTridagQLImplicit+0x139>
jmp    1280 <EigenTridagQLImplicit+0x160>
movslq %r15d,%rax
movq   $0x0,(%r8,%rax,8)
movsd  (%rdi,%rax,8),%xmm0
subsd  %xmm8,%xmm0
movsd  %xmm0,(%rdi,%rax,8)
jmp    1273 <EigenTridagQLImplicit+0x153>
mov    0x4(%rsp),%eax
add    $0xd8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @EigenTridagQLImplicit(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 %186
20: ; preds = %6, %15
%21 = phi i32 [ %10, %6 ], [ 0, %15 ]
%22 = zext i32 %2 to i64
%23 = zext i32 %2 to i64
br label %24
24: ; preds = %20, %183
%25 = phi i64 [ 0, %20 ], [ %29, %183 ]
%26 = phi i32 [ 0, %20 ], [ %184, %183 ]
%27 = trunc i64 %25 to i32
%28 = call i32 @llvm.smax.i32(i32 %27, i32 %21)
%29 = add nuw nsw i64 %25, 1
%30 = getelementptr inbounds double, double* %0, i64 %29
%31 = getelementptr inbounds double, double* %0, i64 %25
%32 = getelementptr inbounds double, double* %1, i64 %25
%33 = zext i32 %28 to i64
br label %34
34: ; preds = %182, %24
%35 = phi i32 [ 0, %24 ], [ %59, %182 ]
br label %36
36: ; preds = %39, %34
%37 = phi i64 [ %41, %39 ], [ %25, %34 ]
%38 = icmp eq i64 %37, %33
br i1 %38, label %55, label %39
39: ; preds = %36
%40 = getelementptr inbounds double, double* %0, i64 %37
%41 = add nuw nsw i64 %37, 1
%42 = bitcast double* %40 to <2 x double>*
%43 = load <2 x double>, <2 x double>* %42
%44 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %43)
%45 = shufflevector <2 x double> %44, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%46 = fadd <2 x double> %44, %45
%47 = extractelement <2 x double> %46, i64 0
%48 = getelementptr inbounds double, double* %1, i64 %37
%49 = load double, double* %48
%50 = tail call double @llvm.fabs.f64(double %49)
%51 = fadd double %50, %47
%52 = fcmp oeq double %51, %47
br i1 %52, label %53, label %36
53: ; preds = %39
%54 = and i64 %37, 4294967295
br label %55
55: ; preds = %36, %53
%56 = phi i64 [ %54, %53 ], [ %33, %36 ]
%57 = icmp eq i64 %56, %25
br i1 %57, label %183, label %58
58: ; preds = %55
%59 = add nuw nsw i32 %35, 1
%60 = icmp eq i32 %35, 30
br i1 %60, label %183, label %61
61: ; preds = %58
%62 = load double, double* %30
%63 = load double, double* %31
%64 = fsub double %62, %63
%65 = load double, double* %32
%66 = fmul double %65, 2.000000e+00
%67 = fdiv double %64, %66
%68 = tail call double @llvm.fabs.f64(double %67)
%69 = fcmp ogt double %68, 1.000000e+00
br i1 %69, label %70, label %77
70: ; preds = %61
%71 = fmul double %67, %67
%72 = fdiv double 1.000000e+00, %71
%73 = fadd double %72, 1.000000e+00
%74 = fptosi double %73 to i32
%75 = tail call double @sqrt(i32 %74)
%76 = fmul double %68, %75
br label %81
77: ; preds = %61
%78 = tail call double @llvm.fmuladd.f64(double %67, double %67, double 1.000000e+00)
%79 = fptosi double %78 to i32
%80 = tail call double @sqrt(i32 %79)
br label %81
81: ; preds = %77, %70
%82 = phi double [ %76, %70 ], [ %80, %77 ]
%83 = getelementptr inbounds double, double* %0, i64 %56
%84 = load double, double* %83
%85 = load double, double* %31
%86 = fsub double %84, %85
%87 = load double, double* %32
%88 = fcmp ult double %67, 0.000000e+00
%89 = tail call double @llvm.fabs.f64(double %82)
%90 = fneg double %89
%91 = select i1 %88, double %90, double %89
%92 = fadd double %67, %91
%93 = fdiv double %87, %92
%94 = fadd double %86, %93
%95 = icmp ugt i64 %56, %25
br i1 %95, label %98, label %175
96: ; preds = %152
%97 = icmp sgt i64 %104, %25
br i1 %97, label %98, label %175
98: ; preds = %81, %96
%99 = phi i64 [ %104, %96 ], [ %56, %81 ]
%100 = phi double [ %137, %96 ], [ 1.000000e+00, %81 ]
%101 = phi double [ %150, %96 ], [ %94, %81 ]
%102 = phi double [ %147, %96 ], [ 0.000000e+00, %81 ]
%103 = phi double [ %136, %96 ], [ 1.000000e+00, %81 ]
%104 = add nsw i64 %99, -1
%105 = getelementptr inbounds double, double* %1, i64 %104
%106 = load double, double* %105
%107 = fmul double %103, %106
%108 = fmul double %100, %106
%109 = tail call double @llvm.fabs.f64(double %107)
%110 = tail call double @llvm.fabs.f64(double %101)
%111 = fcmp ogt double %109, %110
br i1 %111, label %112, label %115
112: ; preds = %98
%113 = fdiv double %110, %109
%114 = tail call double @llvm.fmuladd.f64(double %113, double %113, double 1.000000e+00)
br label %127
115: ; preds = %98
%116 = fcmp oeq double %101, 0.000000e+00
br i1 %116, label %117, label %124
117: ; preds = %115
%118 = shl i64 %99, 32
%119 = ashr exact i64 %118, 32
%120 = getelementptr inbounds double, double* %1, i64 %119
store double 0.000000e+00, double* %120
%121 = getelementptr inbounds double, double* %0, i64 %119
%122 = load double, double* %121
%123 = fsub double %122, %102
store double %123, double* %121
br label %180
124: ; preds = %115
%125 = fdiv double %109, %110
%126 = tail call double @llvm.fmuladd.f64(double %125, double %125, double 1.000000e+00)
br label %127
127: ; preds = %124, %112
%128 = phi double [ %126, %124 ], [ %114, %112 ]
%129 = phi double [ %110, %124 ], [ %109, %112 ]
%130 = fptosi double %128 to i32
%131 = tail call double @sqrt(i32 %130)
%132 = fmul double %129, %131
%133 = getelementptr inbounds double, double* %1, i64 %99
store double %132, double* %133
%134 = fcmp oeq double %132, 0.000000e+00
br i1 %134, label %169, label %135
135: ; preds = %127
%136 = fdiv double %107, %132
%137 = fdiv double %101, %132
%138 = getelementptr inbounds double, double* %0, i64 %99
%139 = load double, double* %138
%140 = fsub double %139, %102
%141 = getelementptr inbounds double, double* %0, i64 %104
%142 = load double, double* %141
%143 = fsub double %142, %140
%144 = fmul double %137, 2.000000e+00
%145 = fmul double %108, %144
%146 = tail call double @llvm.fmuladd.f64(double %143, double %136, double %145)
%147 = fmul double %136, %146
%148 = fadd double %140, %147
store double %148, double* %138
%149 = fneg double %108
%150 = tail call double @llvm.fmuladd.f64(double %137, double %146, double %149)
%151 = fneg double %136
br label %152
152: ; preds = %135, %152
%153 = phi i64 [ 0, %135 ], [ %167, %152 ]
%154 = mul nsw i64 %153, %22
%155 = add nsw i64 %154, %104
%156 = add i64 %154, %99
%157 = shl i64 %156, 32
%158 = ashr exact i64 %157, 32
%159 = getelementptr inbounds double, double* %3, i64 %158
%160 = load double, double* %159
%161 = getelementptr inbounds double, double* %3, i64 %155
%162 = load double, double* %161
%163 = fmul double %137, %160
%164 = tail call double @llvm.fmuladd.f64(double %136, double %162, double %163)
store double %164, double* %159
%165 = fmul double %160, %151
%166 = tail call double @llvm.fmuladd.f64(double %137, double %162, double %165)
store double %166, double* %161
%167 = add nuw nsw i64 %153, 1
%168 = icmp eq i64 %167, %23
br i1 %168, label %96, label %152
169: ; preds = %127
%170 = getelementptr inbounds double, double* %0, i64 %99
%171 = load double, double* %170
%172 = fsub double %171, %102
store double %172, double* %170
%173 = getelementptr inbounds double, double* %1, i64 %56
store double 0.000000e+00, double* %173
%174 = fcmp une double %132, 0.000000e+00
br i1 %174, label %175, label %182
175: ; preds = %96, %81, %169
%176 = phi double [ %102, %169 ], [ 0.000000e+00, %81 ], [ %147, %96 ]
%177 = phi double [ %101, %169 ], [ %94, %81 ], [ %150, %96 ]
%178 = load double, double* %31
%179 = fsub double %178, %176
store double %179, double* %31
store double %177, double* %32
br label %180
180: ; preds = %175, %117
%181 = getelementptr inbounds double, double* %1, i64 %56
store double 0.000000e+00, double* %181
br label %182
182: ; preds = %180, %169
br label %34
183: ; preds = %55, %58
%184 = phi i32 [ %26, %55 ], [ -1, %58 ]
%185 = icmp eq i64 %29, %23
br i1 %185, label %186, label %24
186: ; preds = %183, %15
%187 = phi i32 [ 0, %15 ], [ %184, %183 ]
ret i32 %187
}