#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(double);
void Double_QR_Step(double *H, int min_row, int max_row, int min_col,
                    double trace, double det, double *S, int n) {
  double s, x, y, z;
  double a, b, c;
  double *pH;
  double *tH;
  double *pS;
  int i, j, k;
  int last_test_row_col = max_row - 1;
  k = min_col;
  pH = H + min_col * n;
  a = (pH[k] * (pH[k] - trace) + det) / pH[n + k] + pH[k + 1];
  b = pH[k] + pH[n + k + 1] - trace;
  c = pH[n + n + k + 1];
  s = fabs(a) + fabs(b) + fabs(c);
  a /= s;
  b /= s;
  c /= s;
  for (; k <= last_test_row_col; k++, pH += n) {
    if (k > min_col) {
      c = (k == last_test_row_col) ? 0.0 : pH[n + n + k - 1];
      x = fabs(pH[k - 1]) + fabs(pH[n + k - 1]) + fabs(c);
      if (x == 0.0)
        continue;
      a = pH[k - 1] / x;
      b = pH[n + k - 1] / x;
      c /= x;
    }
    s = sqrt(a * a + b * b + c * c);
    if (a < 0.0)
      s = -s;
    if (k > min_col)
      pH[k - 1] = -s * x;
    else if (min_row != min_col)
      pH[k - 1] = -pH[k - 1];
    a += s;
    x = a / s;
    y = b / s;
    z = c / s;
    b /= a;
    c /= a;
    for (j = k; j < n; j++) {
      a = pH[j] + b * pH[n + j];
      if (k != last_test_row_col) {
        a += c * pH[n + n + j];
        pH[n + n + j] -= a * z;
      }
      pH[n + j] -= a * y;
      pH[j] -= a * x;
    }
    j = k + 3;
    if (j > max_row)
      j = max_row;
    for (i = 0, tH = H; i <= j; i++, tH += n) {
      a = x * tH[k] + y * tH[k + 1];
      if (k != last_test_row_col) {
        a += z * tH[k + 2];
        tH[k + 2] -= a * c;
      }
      tH[k + 1] -= a * b;
      tH[k] -= a;
    }
    for (i = 0, pS = S; i < n; pS += n, i++) {
      a = x * pS[k] + y * pS[k + 1];
      if (k != last_test_row_col) {
        a += z * pS[k + 2];
        pS[k + 2] -= a * c;
      }
      pS[k + 1] -= a * b;
      pS[k] -= a;
    }
  };
}


x86 assembly (clang, -O0):
<Double_QR_Step>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9d,-0x34(%rbp)
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x98(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x94(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
imul   -0x34(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x78(%rbp)
mov    -0x78(%rbp),%rax
movslq -0x94(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x78(%rbp),%rax
movslq -0x94(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
subsd  -0x20(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x78(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    -0x94(%rbp),%ecx
movslq %ecx,%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    -0x78(%rbp),%rax
mov    -0x94(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x78(%rbp),%rax
movslq -0x94(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x78(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    -0x94(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x78(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    -0x34(%rbp),%ecx
add    -0x94(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x60(%rbp),%xmm0
movaps 0xdd9(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  -0x68(%rbp),%xmm1
movaps 0xdc9(%rip),%xmm2
pand   %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  -0x70(%rbp),%xmm1
movaps 0xdb5(%rip),%xmm2
pand   %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x40(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x40(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x94(%rbp),%eax
cmp    -0x98(%rbp),%eax
jg     19eb <Double_QR_Step+0x8db>
mov    -0x94(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    13d5 <Double_QR_Step+0x2c5>
mov    -0x94(%rbp),%eax
cmp    -0x98(%rbp),%eax
jne    12d4 <Double_QR_Step+0x1c4>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
jmp    12f7 <Double_QR_Step+0x1e7>
mov    -0x78(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    -0x34(%rbp),%ecx
add    -0x94(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0x70(%rbp)
mov    -0x78(%rbp),%rax
mov    -0x94(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xce0(%rip),%xmm1
pand   %xmm1,%xmm0
mov    -0x78(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    -0x94(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movaps 0xcbd(%rip),%xmm2
pand   %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  -0x70(%rbp),%xmm1
movaps 0xca9(%rip),%xmm2
pand   %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1381 <Double_QR_Step+0x271>
jp     1381 <Double_QR_Step+0x271>
jmp    19c2 <Double_QR_Step+0x8b2>
mov    -0x78(%rbp),%rax
mov    -0x94(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x78(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    -0x94(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x48(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x60(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x70(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x60(%rbp),%xmm0
jbe    143c <Double_QR_Step+0x32c>
movsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x94(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    1486 <Double_QR_Step+0x376>
movsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x48(%rbp),%xmm0
mov    -0x78(%rbp),%rax
mov    -0x94(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    14d8 <Double_QR_Step+0x3c8>
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
je     14d3 <Double_QR_Step+0x3c3>
mov    -0x78(%rbp),%rax
mov    -0x94(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x78(%rbp),%rax
mov    -0x94(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    14d8 <Double_QR_Step+0x3c8>
movsd  -0x40(%rbp),%xmm0
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x68(%rbp),%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x70(%rbp),%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x60(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x60(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x94(%rbp),%eax
mov    %eax,-0x90(%rbp)
mov    -0x90(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    16a8 <Double_QR_Step+0x598>
mov    -0x78(%rbp),%rax
movslq -0x90(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x68(%rbp),%xmm0
mov    -0x78(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    -0x90(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x94(%rbp),%eax
cmp    -0x98(%rbp),%eax
je     1613 <Double_QR_Step+0x503>
movsd  -0x70(%rbp),%xmm0
mov    -0x78(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    -0x34(%rbp),%ecx
add    -0x90(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
mov    -0x78(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    -0x34(%rbp),%ecx
add    -0x90(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movq   %xmm0,%rdx
movabs $0x8000000000000000,%rsi
xor    %rsi,%rdx
movq   %rdx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x60(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
mov    -0x78(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    -0x90(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movq   %xmm0,%rdx
movabs $0x8000000000000000,%rsi
xor    %rsi,%rdx
movq   %rdx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x60(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
mov    -0x78(%rbp),%rax
movslq -0x90(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movq   %xmm0,%rdx
movabs $0x8000000000000000,%rsi
xor    %rsi,%rdx
movq   %rdx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x90(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x90(%rbp)
jmp    1546 <Double_QR_Step+0x436>
mov    -0x94(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x90(%rbp)
mov    -0x90(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    16cf <Double_QR_Step+0x5bf>
mov    -0x10(%rbp),%eax
mov    %eax,-0x90(%rbp)
movl   $0x0,-0x8c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x8c(%rbp),%eax
cmp    -0x90(%rbp),%eax
jg     183a <Double_QR_Step+0x72a>
movsd  -0x48(%rbp),%xmm0
mov    -0x80(%rbp),%rax
movslq -0x94(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x50(%rbp),%xmm1
mov    -0x80(%rbp),%rax
mov    -0x94(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x94(%rbp),%eax
cmp    -0x98(%rbp),%eax
je     17b0 <Double_QR_Step+0x6a0>
movsd  -0x58(%rbp),%xmm0
mov    -0x80(%rbp),%rax
mov    -0x94(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
mov    -0x80(%rbp),%rax
mov    -0x94(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movq   %xmm0,%rdx
movabs $0x8000000000000000,%rsi
xor    %rsi,%rdx
movq   %rdx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x60(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
mov    -0x80(%rbp),%rax
mov    -0x94(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movq   %xmm0,%rdx
movabs $0x8000000000000000,%rsi
xor    %rsi,%rdx
movq   %rdx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x60(%rbp),%xmm1
mov    -0x80(%rbp),%rax
movslq -0x94(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
mov    -0x34(%rbp),%ecx
mov    -0x80(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x80(%rbp)
jmp    16e1 <Double_QR_Step+0x5d1>
movl   $0x0,-0x8c(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x8c(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    19bd <Double_QR_Step+0x8ad>
movsd  -0x48(%rbp),%xmm0
mov    -0x88(%rbp),%rax
movslq -0x94(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x50(%rbp),%xmm1
mov    -0x88(%rbp),%rax
mov    -0x94(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x94(%rbp),%eax
cmp    -0x98(%rbp),%eax
je     1927 <Double_QR_Step+0x817>
movsd  -0x58(%rbp),%xmm0
mov    -0x88(%rbp),%rax
mov    -0x94(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
mov    -0x88(%rbp),%rax
mov    -0x94(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movq   %xmm0,%rdx
movabs $0x8000000000000000,%rsi
xor    %rsi,%rdx
movq   %rdx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x60(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
mov    -0x88(%rbp),%rax
mov    -0x94(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movq   %xmm0,%rdx
movabs $0x8000000000000000,%rsi
xor    %rsi,%rdx
movq   %rdx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x60(%rbp),%xmm1
mov    -0x88(%rbp),%rax
movslq -0x94(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%ecx
mov    -0x88(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x88(%rbp)
mov    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
jmp    184f <Double_QR_Step+0x73f>
jmp    19c2 <Double_QR_Step+0x8b2>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
mov    -0x34(%rbp),%ecx
mov    -0x78(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x78(%rbp)
jmp    1291 <Double_QR_Step+0x181>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Double_QR_Step>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xb8,%rsp
mov    %r9,0x8(%rsp)
mov    %esi,0x18(%rsp)
mov    %rcx,0x20(%rsp)
cmp    %edx,%ecx
jge    16ac <Double_QR_Step+0x59c>
mov    0x8(%rsp),%rbx
mov    %ebx,%eax
mov    0x20(%rsp),%rsi
imul   %esi,%eax
movslq %eax,%r14
lea    (%rdi,%r14,8),%r10
movslq %esi,%r9
movsd  (%r10,%r9,8),%xmm6
movapd %xmm6,%xmm2
subsd  %xmm0,%xmm2
mulsd  %xmm6,%xmm2
addsd  %xmm1,%xmm2
lea    (%rbx,%rsi,1),%ecx
movslq %ecx,%rcx
divsd  (%r10,%rcx,8),%xmm2
lea    0x1(%r9),%ebp
movslq %ebp,%rbp
addsd  (%r10,%rbp,8),%xmm2
addsd  0x8(%r10,%rcx,8),%xmm6
subsd  %xmm0,%xmm6
lea    (%rbx,%rbx,1),%ebp
lea    0x1(%r9,%rbx,2),%ecx
movslq %ecx,%rcx
movsd  (%r10,%rcx,8),%xmm0
movapd 0xe5d(%rip),%xmm3
movapd %xmm2,%xmm1
andpd  %xmm3,%xmm1
movapd %xmm6,%xmm4
andpd  %xmm3,%xmm4
addsd  %xmm1,%xmm4
unpcklpd %xmm0,%xmm6
andpd  %xmm3,%xmm0
addsd  %xmm4,%xmm0
lea    -0x1(%rdx),%ecx
divsd  %xmm0,%xmm2
unpcklpd %xmm0,%xmm0
divpd  %xmm0,%xmm6
movslq %ebx,%rax
mov    %rbp,%rbx
mov    %rbp,0x38(%rsp)
movslq %ebp,%rbp
lea    0x3(%rsi),%r11d
movslq %edx,%r13
movslq %ecx,%r15
lea    (%r9,%r14,1),%rcx
add    %rcx,%rbp
lea    (%rdi,%rbp,8),%rsi
mov    %rsi,0x30(%rsp)
lea    0x0(,%rax,8),%rbx
lea    0x8(,%rax,8),%rsi
mov    %rsi,0x68(%rsp)
lea    (%rax,%r9,1),%rsi
add    %r14,%rsi
lea    (%rdi,%rsi,8),%rbp
mov    %rax,%rsi
lea    (%rdi,%rcx,8),%r14
lea    (%rdi,%r9,8),%rax
add    $0x10,%rax
mov    %rax,0x28(%rsp)
lea    0x10(%r8,%r9,8),%rax
mov    %rax,0x10(%rsp)
mov    %r13,%r8
xorpd  %xmm9,%xmm9
movapd 0xdc7(%rip),%xmm10
mov    %r9,%r12
mov    %rdx,0x58(%rsp)
mov    %r9,0x50(%rsp)
mov    %rsi,0x48(%rsp)
mov    %r13,0x40(%rsp)
jmp    1308 <Double_QR_Step+0x1f8>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  -0x8(%r10,%r12,8),%xmm0
movapd %xmm0,%xmm5
movapd 0xd7d(%rip),%xmm4
andpd  %xmm4,%xmm5
add    0x8(%rsp),%eax
cltq
movsd  (%r10,%rax,8),%xmm1
movapd %xmm1,%xmm3
andpd  %xmm4,%xmm3
addsd  %xmm5,%xmm3
movapd %xmm12,%xmm11
andpd  %xmm4,%xmm11
addsd  %xmm3,%xmm11
ucomisd %xmm9,%xmm11
jne    133f <Double_QR_Step+0x22f>
jp     133f <Double_QR_Step+0x22f>
unpcklpd %xmm6,%xmm11
mov    0x10(%rsp),%rdi
add    $0x1,%r12
lea    (%r10,%rsi,8),%r10
add    $0x1,%r11d
movapd %xmm11,%xmm6
shufpd $0x1,%xmm12,%xmm6
mov    0x68(%rsp),%rax
add    %rax,0x30(%rsp)
add    %rax,%rbp
add    %rax,%r14
addq   $0x8,0x28(%rsp)
add    $0x8,%rdi
mov    %rdi,0x10(%rsp)
cmp    %r8,%r12
je     16ac <Double_QR_Step+0x59c>
cmp    %r11d,%edx
mov    %r11d,%r13d
cmovl  %edx,%r13d
cmp    %r9,%r12
jle    135f <Double_QR_Step+0x24f>
lea    -0x1(%r12),%eax
xorpd  %xmm12,%xmm12
cmp    %r15,%r12
je     1270 <Double_QR_Step+0x160>
mov    0x38(%rsp),%rcx
add    %eax,%ecx
movslq %ecx,%rcx
movsd  (%r10,%rcx,8),%xmm12
jmp    1270 <Double_QR_Step+0x160>
divsd  %xmm11,%xmm0
unpcklpd %xmm12,%xmm1
movapd %xmm11,%xmm2
unpcklpd %xmm11,%xmm2
divpd  %xmm2,%xmm1
movapd %xmm0,%xmm2
movapd %xmm1,%xmm6
movapd %xmm6,%xmm0
mulsd  %xmm6,%xmm0
movapd %xmm2,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movapd %xmm6,%xmm12
unpckhpd %xmm6,%xmm12
movapd %xmm12,%xmm0
mulsd  %xmm12,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm9,%xmm0
jb     13a0 <Double_QR_Step+0x290>
sqrtsd %xmm0,%xmm0
jmp    1421 <Double_QR_Step+0x311>
nopl   0x0(%rax,%rax,1)
mov    %r10,0x60(%rsp)
movapd %xmm2,0xa0(%rsp)
mov    %r11d,0x1c(%rsp)
movapd %xmm11,0x90(%rsp)
movapd %xmm12,0x80(%rsp)
movapd %xmm6,0x70(%rsp)
call   1030 <sqrt@plt>
movapd 0x70(%rsp),%xmm6
movapd 0x80(%rsp),%xmm12
movapd 0x90(%rsp),%xmm11
movapd 0xc1b(%rip),%xmm10
xorpd  %xmm9,%xmm9
mov    0x40(%rsp),%r8
mov    0x1c(%rsp),%r11d
movapd 0xa0(%rsp),%xmm2
mov    0x48(%rsp),%rsi
mov    0x50(%rsp),%r9
mov    0x60(%rsp),%r10
mov    0x58(%rsp),%rdx
movapd %xmm0,%xmm1
xorpd  %xmm10,%xmm1
movapd %xmm2,%xmm3
cmpltsd %xmm9,%xmm3
andpd  %xmm3,%xmm1
andnpd %xmm0,%xmm3
orpd   %xmm1,%xmm3
cmp    %r9,%r12
jle    1460 <Double_QR_Step+0x350>
movapd %xmm3,%xmm0
xorpd  %xmm10,%xmm0
mulsd  %xmm0,%xmm11
movsd  %xmm11,-0x8(%r10,%r12,8)
jmp    147d <Double_QR_Step+0x36d>
nopl   0x0(%rax)
mov    0x18(%rsp),%eax
cmp    0x20(%rsp),%eax
je     147d <Double_QR_Step+0x36d>
movsd  -0x8(%r10,%r12,8),%xmm0
xorpd  %xmm10,%xmm0
movlpd %xmm0,-0x8(%r10,%r12,8)
addsd  %xmm3,%xmm2
movapd %xmm6,%xmm0
divsd  %xmm3,%xmm0
movapd %xmm12,%xmm8
divsd  %xmm3,%xmm8
movapd %xmm2,%xmm11
unpcklpd %xmm6,%xmm11
unpcklpd %xmm2,%xmm3
divpd  %xmm3,%xmm11
divsd  %xmm2,%xmm12
movapd %xmm11,%xmm1
unpckhpd %xmm11,%xmm1
cmp    %rsi,%r12
jge    1570 <Double_QR_Step+0x460>
xor    %eax,%eax
jmp    153c <Double_QR_Step+0x42c>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x30(%rsp),%rcx
movsd  (%rcx,%rax,8),%xmm4
movapd %xmm12,%xmm3
mulsd  %xmm4,%xmm3
addsd  %xmm3,%xmm2
movapd %xmm2,%xmm3
xorpd  %xmm10,%xmm3
movapd %xmm2,%xmm5
mulsd  %xmm8,%xmm5
subsd  %xmm5,%xmm4
movsd  %xmm4,(%rcx,%rax,8)
movsd  0x0(%rbp,%rax,8),%xmm4
movapd %xmm3,%xmm5
mulsd  %xmm0,%xmm5
addsd  %xmm4,%xmm5
movsd  %xmm5,0x0(%rbp,%rax,8)
mulsd  %xmm11,%xmm3
addsd  (%r14,%rax,8),%xmm3
movsd  %xmm3,(%r14,%rax,8)
lea    (%r12,%rax,1),%rcx
add    $0x1,%rcx
add    $0x1,%rax
cmp    %rsi,%rcx
jge    1570 <Double_QR_Step+0x460>
movsd  0x0(%rbp,%rax,8),%xmm4
movapd %xmm1,%xmm2
mulsd  %xmm4,%xmm2
addsd  (%r14,%rax,8),%xmm2
cmp    %r15,%r12
jne    14d0 <Double_QR_Step+0x3c0>
movapd %xmm2,%xmm3
xorpd  %xmm10,%xmm3
jmp    1508 <Double_QR_Step+0x3f8>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    0x3(%r12),%rax
cmp    %r8,%rax
cmovg  %edx,%eax
test   %eax,%eax
js     1610 <Double_QR_Step+0x500>
add    $0x1,%r13d
mov    0x28(%rsp),%rax
jmp    15da <Double_QR_Step+0x4ca>
xchg   %ax,%ax
movsd  (%rax),%xmm6
movapd %xmm8,%xmm5
mulsd  %xmm6,%xmm5
addsd  %xmm5,%xmm2
movapd %xmm2,%xmm5
xorpd  %xmm10,%xmm5
movapd %xmm2,%xmm7
mulsd  %xmm12,%xmm7
subsd  %xmm7,%xmm6
movsd  %xmm6,(%rax)
mulsd  %xmm1,%xmm5
addsd  %xmm4,%xmm5
movsd  %xmm5,-0x8(%rax)
subsd  %xmm2,%xmm3
movsd  %xmm3,-0x10(%rax)
add    %rbx,%rax
add    $0xffffffff,%r13d
je     1610 <Double_QR_Step+0x500>
movsd  -0x10(%rax),%xmm3
movsd  -0x8(%rax),%xmm4
movapd %xmm0,%xmm5
mulsd  %xmm4,%xmm5
movapd %xmm11,%xmm2
mulsd  %xmm3,%xmm2
addsd  %xmm5,%xmm2
cmp    %r15,%r12
jne    1590 <Double_QR_Step+0x480>
movapd %xmm2,%xmm5
xorpd  %xmm10,%xmm5
jmp    15bb <Double_QR_Step+0x4ab>
nopl   0x0(%rax)
cmpl   $0x0,0x8(%rsp)
jle    12c4 <Double_QR_Step+0x1b4>
mov    0x10(%rsp),%rdi
mov    %rdi,%rax
mov    0x8(%rsp),%rcx
jmp    167d <Double_QR_Step+0x56d>
nopw   0x0(%rax,%rax,1)
movsd  (%rax),%xmm6
movapd %xmm8,%xmm5
mulsd  %xmm6,%xmm5
addsd  %xmm5,%xmm2
movapd %xmm2,%xmm5
xorpd  %xmm10,%xmm5
movapd %xmm2,%xmm7
mulsd  %xmm12,%xmm7
subsd  %xmm7,%xmm6
movsd  %xmm6,(%rax)
mulsd  %xmm1,%xmm5
addsd  %xmm4,%xmm5
movsd  %xmm5,-0x8(%rax)
subsd  %xmm2,%xmm3
movsd  %xmm3,-0x10(%rax)
add    %rbx,%rax
add    $0xffffffff,%ecx
je     12c9 <Double_QR_Step+0x1b9>
movsd  -0x10(%rax),%xmm3
movsd  -0x8(%rax),%xmm4
movapd %xmm0,%xmm5
mulsd  %xmm4,%xmm5
movapd %xmm11,%xmm2
mulsd  %xmm3,%xmm2
addsd  %xmm5,%xmm2
cmp    %r15,%r12
jne    1630 <Double_QR_Step+0x520>
movapd %xmm2,%xmm5
xorpd  %xmm10,%xmm5
jmp    165b <Double_QR_Step+0x54b>
add    $0xb8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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