void lm_qrsolv(int n, double *r, int ldr, int *ipvt, double *diag, double *qtb,
               double *x, double *sdiag, double *wa) {
  int i, kk, j, k, nsing;
  double qtbpj, sum, temp;
  double sin, cos, tan, cotan;
  static double p25 = 0.25;
  static double p5 = 0.5;
  for (j = 0; j < n; j++) {
    for (i = j; i < n; i++)
      r[j * ldr + i] = r[i * ldr + j];
    x[j] = r[j * ldr + j];
    wa[j] = qtb[j];
  }
  for (j = 0; j < n; j++) {
    if (diag[ipvt[j]] == 0.)
      goto L90;
    for (k = j; k < n; k++)
      sdiag[k] = 0.;
    sdiag[j] = diag[ipvt[j]];
    qtbpj = 0.;
    for (k = j; k < n; k++) {
      if (sdiag[k] == 0.)
        continue;
      kk = k + ldr * k;
      if (fabs(r[kk]) < fabs(sdiag[k])) {
        cotan = r[kk] / sdiag[k];
        sin = p5 / sqrt(p25 + p25 * (cotan) * (cotan));
        cos = sin * cotan;
      } else {
        tan = sdiag[k] / r[kk];
        cos = p5 / sqrt(p25 + p25 * (tan) * (tan));
        sin = cos * tan;
      }
      r[kk] = cos * r[kk] + sin * sdiag[k];
      temp = cos * wa[k] + sin * qtbpj;
      qtbpj = -sin * wa[k] + cos * qtbpj;
      wa[k] = temp;
      for (i = k + 1; i < n; i++) {
        temp = cos * r[k * ldr + i] + sin * sdiag[i];
        sdiag[i] = -sin * r[k * ldr + i] + cos * sdiag[i];
        r[k * ldr + i] = temp;
      }
    }
  L90:
    sdiag[j] = r[j * ldr + j];
    r[j * ldr + j] = x[j];
  }
  nsing = n;
  for (j = 0; j < n; j++) {
    if (sdiag[j] == 0. && nsing == n)
      nsing = j;
    if (nsing < n)
      wa[j] = 0;
  }
  for (j = nsing - 1; j >= 0; j--) {
    sum = 0;
    for (i = j + 1; i < nsing; i++)
      sum += r[j * ldr + i] * wa[i];
    wa[j] = (wa[j] - sum) / sdiag[j];
  }
  for (j = 0; j < n; j++)
    x[ipvt[j]] = wa[j];
}


x86 assembly (clang, -O0):
<lm_qrsolv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    11e7 <lm_qrsolv+0xd7>
mov    -0x3c(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    119c <lm_qrsolv+0x8c>
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x3c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1156 <lm_qrsolv+0x46>
mov    -0x10(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x3c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1144 <lm_qrsolv+0x34>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    15e9 <lm_qrsolv+0x4d9>
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%rcx
movslq -0x3c(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1227 <lm_qrsolv+0x117>
jp     1227 <lm_qrsolv+0x117>
jmp    1595 <lm_qrsolv+0x485>
mov    -0x3c(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1257 <lm_qrsolv+0x147>
mov    0x18(%rbp),%rax
movslq -0x40(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    122d <lm_qrsolv+0x11d>
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%rcx
movslq -0x3c(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1590 <lm_qrsolv+0x480>
mov    0x18(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    12b8 <lm_qrsolv+0x1a8>
jp     12b8 <lm_qrsolv+0x1a8>
jmp    1582 <lm_qrsolv+0x472>
mov    -0x40(%rbp),%eax
mov    -0x14(%rbp),%ecx
imul   -0x40(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movaps 0xd25(%rip),%xmm0
pand   %xmm0,%xmm1
mov    0x18(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xd0d(%rip),%xmm2
pand   %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    137f <lm_qrsolv+0x26f>
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x40(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  0x2d08(%rip),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0x2cf0(%rip),%xmm1
movsd  0x2ce8(%rip),%xmm0
mulsd  -0x80(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x88(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
mulsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
jmp    13f8 <lm_qrsolv+0x2e8>
mov    0x18(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0x2c8a(%rip),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0x2c72(%rip),%xmm1
movsd  0x2c6a(%rip),%xmm0
mulsd  -0x78(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x90(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
mulsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x70(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x68(%rbp),%xmm1
mov    0x18(%rbp),%rax
movslq -0x40(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x70(%rbp),%xmm0
mov    0x20(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x68(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    0x20(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x60(%rbp),%xmm0
mov    0x20(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    157d <lm_qrsolv+0x46d>
movsd  -0x70(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x68(%rbp),%xmm1
mov    0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x68(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x10(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x70(%rbp),%xmm1
mov    0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x60(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    14b5 <lm_qrsolv+0x3a5>
jmp    1582 <lm_qrsolv+0x472>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1287 <lm_qrsolv+0x177>
jmp    1595 <lm_qrsolv+0x485>
mov    -0x10(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x3c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x3c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    11ee <lm_qrsolv+0xde>
mov    -0x4(%rbp),%eax
mov    %eax,-0x44(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1663 <lm_qrsolv+0x553>
mov    0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1634 <lm_qrsolv+0x524>
jp     1634 <lm_qrsolv+0x524>
mov    -0x44(%rbp),%eax
cmp    -0x4(%rbp),%eax
jne    1634 <lm_qrsolv+0x524>
mov    -0x3c(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1650 <lm_qrsolv+0x540>
mov    0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    1655 <lm_qrsolv+0x545>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    15f6 <lm_qrsolv+0x4e6>
mov    -0x44(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x3c(%rbp)
cmpl   $0x0,-0x3c(%rbp)
jl     1710 <lm_qrsolv+0x600>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    16d6 <lm_qrsolv+0x5c6>
mov    -0x10(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1687 <lm_qrsolv+0x577>
mov    0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x58(%rbp),%xmm0
mov    0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x3c(%rbp)
jmp    166c <lm_qrsolv+0x55c>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1753 <lm_qrsolv+0x643>
mov    0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
movslq -0x3c(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1717 <lm_qrsolv+0x607>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lm_qrsolv>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xd8,%rsp
mov    %r8,0x80(%rsp)
mov    %edx,0x14(%rsp)
test   %edi,%edi
jle    1b68 <lm_qrsolv+0xa48>
mov    0x120(%rsp),%r10
mov    0x110(%rsp),%r8
movslq 0x14(%rsp),%r13
mov    %edi,%ebx
lea    0x8(,%r13,8),%r11
xor    %r14d,%r14d
mov    %rbx,%rdx
mov    %rsi,(%rsp)
xchg   %ax,%ax
xor    %eax,%eax
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  (%rsi,%rax,8),%xmm0
movsd  %xmm0,(%rsi,%rbp,8)
add    $0x1,%rbp
add    %r13,%rax
cmp    %rbp,%rdx
jne    1180 <lm_qrsolv+0x60>
mov    %r14d,%eax
imul   0x14(%rsp),%eax
cltq
add    %r14,%rax
mov    (%rsp),%rbp
movsd  0x0(%rbp,%rax,8),%xmm0
movsd  %xmm0,(%r8,%r14,8)
movsd  (%r9,%r14,8),%xmm0
movsd  %xmm0,(%r10,%r14,8)
add    $0x1,%r14
add    %r11,%rsi
add    $0xffffffffffffffff,%rdx
cmp    %rbx,%r14
jne    1170 <lm_qrsolv+0x50>
test   %edi,%edi
mov    0x118(%rsp),%rbp
mov    (%rsp),%r9
jle    1b68 <lm_qrsolv+0xa48>
mov    %edi,0x10(%rsp)
lea    0x8(%r9),%rax
mov    %rax,0xb0(%rsp)
lea    0x18(%rbp),%rax
mov    %rax,0x78(%rsp)
mov    $0x1,%eax
mov    %rax,0x70(%rsp)
mov    $0x3,%eax
mov    %rax,0x68(%rsp)
mov    $0x2,%eax
mov    %rax,0x60(%rsp)
movq   $0xfffffffffffffffd,0x58(%rsp)
ff ff
xor    %edx,%edx
xorpd  %xmm8,%xmm8
mov    %rbx,0x28(%rsp)
mov    %rcx,0xa8(%rsp)
mov    %r13,0x30(%rsp)
jmp    12ab <lm_qrsolv+0x18b>
xchg   %ax,%ax
mov    0x40(%rsp),%rdx
mov    %rdx,%rax
mov    %r12,%r13
imul   %r12,%rax
add    %rdx,%rax
movsd  (%r9,%rax,8),%xmm0
mov    0x88(%rsp),%rcx
movsd  %xmm0,(%rcx)
mov    0x110(%rsp),%r12
movsd  (%r12,%rdx,8),%xmm0
movsd  %xmm0,(%r9,%rax,8)
add    $0x1,%rdx
addq   $0x1,0x70(%rsp)
addq   $0x8,0x78(%rsp)
addq   $0x1,0x68(%rsp)
addq   $0x1,0x60(%rsp)
addq   $0xffffffffffffffff,0x58(%rsp)
cmp    %rbx,%rdx
mov    0xa8(%rsp),%rcx
je     18a0 <lm_qrsolv+0x780>
lea    0x0(,%rdx,8),%rax
add    %rbp,%rax
mov    %rax,0x88(%rsp)
mov    %rdx,0x40(%rsp)
movslq (%rcx,%rdx,4),%r14
mov    0x80(%rsp),%rax
movsd  (%rax,%r14,8),%xmm0
ucomisd %xmm8,%xmm0
mov    %r13,%r12
jne    12e5 <lm_qrsolv+0x1c5>
jnp    1240 <lm_qrsolv+0x120>
mov    0x40(%rsp),%r15
lea    0x2(%r15),%rax
mov    %rax,0xd0(%rsp)
mov    %r15,%rax
not    %rax
mov    %rax,0xb8(%rsp)
mov    %r15d,%eax
not    %eax
add    0x10(%rsp),%eax
lea    0x8(,%rax,8),%rdx
mov    0x88(%rsp),%r12
mov    %r12,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
xorpd  %xmm8,%xmm8
mov    (%rsp),%r9
mov    0x118(%rsp),%rbp
mov    0x28(%rsp),%rbx
mov    0x120(%rsp),%r10
mov    0x80(%rsp),%rax
movsd  (%rax,%r14,8),%xmm10
movsd  %xmm10,(%r12)
mov    %r13,%r12
xorpd  %xmm9,%xmm9
mov    0x58(%rsp),%r11
mov    0x60(%rsp),%rdi
mov    0x68(%rsp),%rsi
mov    0x78(%rsp),%rcx
mov    %rcx,0x18(%rsp)
xor    %edx,%edx
mov    %r15,0x20(%rsp)
mov    0x70(%rsp),%r8
jmp    13d0 <lm_qrsolv+0x2b0>
nopl   0x0(%rax,%rax,1)
mov    0x20(%rsp),%rax
add    $0x1,%rax
mov    0x18(%rsp),%rcx
cmp    %rbx,%rax
je     1240 <lm_qrsolv+0x120>
add    $0x1,%r8
mov    %rax,0x20(%rsp)
movsd  0x0(%rbp,%rax,8),%xmm10
add    $0x1,%rdx
add    $0x8,%rcx
mov    %rcx,0x18(%rsp)
add    $0x1,%rsi
add    $0x1,%rdi
add    $0xffffffffffffffff,%r11
cmp    %rbx,%rdi
mov    %rbx,%r15
cmova  %rdi,%r15
mov    0xd0(%rsp),%rax
lea    (%rax,%rdx,1),%r14
cmp    %rbx,%r14
mov    %rbx,%rcx
cmova  %r14,%rcx
cmp    %rbx,%r14
mov    %rbx,%rax
cmova  %r14,%rax
mov    %rbx,%r13
cmova  %r14,%r13
ucomisd %xmm8,%xmm10
jne    140a <lm_qrsolv+0x2ea>
jnp    1390 <lm_qrsolv+0x270>
mov    %rcx,0xc0(%rsp)
mov    %rax,0xc8(%rsp)
mov    %rsi,0x38(%rsp)
mov    0x20(%rsp),%rcx
mov    %ecx,%eax
imul   0x14(%rsp),%eax
cltq
add    %rcx,%rax
movsd  (%r9,%rax,8),%xmm11
movapd %xmm11,%xmm0
movapd 0xbbd(%rip),%xmm2
andpd  %xmm2,%xmm0
movapd %xmm10,%xmm1
andpd  %xmm2,%xmm1
ucomisd %xmm0,%xmm1
jbe    1485 <lm_qrsolv+0x365>
divsd  %xmm10,%xmm11
movapd %xmm11,%xmm0
movsd  0xbb8(%rip),%xmm1
mulsd  %xmm1,%xmm0
mulsd  %xmm11,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm8,%xmm0
jb     14b8 <lm_qrsolv+0x398>
sqrtsd %xmm0,%xmm0
jmp    1523 <lm_qrsolv+0x403>
divsd  %xmm11,%xmm10
movapd %xmm10,%xmm0
movsd  0xb89(%rip),%xmm1
mulsd  %xmm1,%xmm0
mulsd  %xmm10,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm8,%xmm0
jb     1538 <lm_qrsolv+0x418>
sqrtsd %xmm0,%xmm0
jmp    15a3 <lm_qrsolv+0x483>
movsd  %xmm9,0x8(%rsp)
mov    %r11,%rbx
mov    %rdi,0x50(%rsp)
mov    %rdx,%rbp
mov    %r8,0x48(%rsp)
movapd %xmm11,0x90(%rsp)
mov    %rax,%r12
call   1040 <sqrt@plt>
mov    %r12,%rax
movapd 0x90(%rsp),%xmm11
mov    0x48(%rsp),%r8
mov    %rbp,%rdx
mov    0x50(%rsp),%rdi
mov    %rbx,%r11
movsd  0x8(%rsp),%xmm9
xorpd  %xmm8,%xmm8
mov    (%rsp),%r9
mov    0x118(%rsp),%rbp
mov    0x28(%rsp),%rbx
mov    0x120(%rsp),%r10
movsd  0xafc(%rip),%xmm10
divsd  %xmm0,%xmm10
mulsd  %xmm10,%xmm11
jmp    15b6 <lm_qrsolv+0x496>
movsd  %xmm9,0x8(%rsp)
mov    %r11,%rbx
mov    %rdi,0x50(%rsp)
mov    %rdx,%rbp
mov    %r8,0x48(%rsp)
movapd %xmm10,0x90(%rsp)
mov    %rax,%r12
call   1040 <sqrt@plt>
mov    %r12,%rax
movapd 0x90(%rsp),%xmm10
mov    0x48(%rsp),%r8
mov    %rbp,%rdx
mov    0x50(%rsp),%rdi
mov    %rbx,%r11
movsd  0x8(%rsp),%xmm9
xorpd  %xmm8,%xmm8
mov    (%rsp),%r9
mov    0x118(%rsp),%rbp
mov    0x28(%rsp),%rbx
mov    0x120(%rsp),%r10
movsd  0xa7c(%rip),%xmm11
divsd  %xmm0,%xmm11
mulsd  %xmm11,%xmm10
mov    0x20(%rsp),%r12
movsd  0x0(%rbp,%r12,8),%xmm0
mulsd  %xmm10,%xmm0
movsd  (%r9,%rax,8),%xmm1
mulsd  %xmm11,%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%r9,%rax,8)
movsd  (%r10,%r12,8),%xmm0
movapd %xmm9,%xmm1
mulsd  %xmm10,%xmm1
movapd %xmm11,%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
mulsd  %xmm11,%xmm9
mulsd  %xmm10,%xmm0
subsd  %xmm0,%xmm9
movsd  %xmm2,(%r10,%r12,8)
lea    0x1(%r12),%rax
cmp    %rbx,%rax
jge    1707 <lm_qrsolv+0x5e7>
mov    0xb8(%rsp),%rcx
mov    %rdx,0x8(%rsp)
sub    %rdx,%rcx
mov    0xc8(%rsp),%rdx
add    %rcx,%rdx
imul   0x30(%rsp),%r12
movapd %xmm10,%xmm0
xorpd  0x9c6(%rip),%xmm0
mov    %r8,%rsi
cmp    $0x2,%rdx
jb     1819 <lm_qrsolv+0x6f9>
mov    %rdx,%r9
lea    0x0(,%r8,8),%rdx
add    %rbp,%rdx
lea    0x0(%r13,%r12,1),%rsi
mov    %rdi,%r10
mov    0xb0(%rsp),%rdi
lea    (%rdi,%rsi,8),%rsi
add    $0xfffffffffffffff8,%rsi
mov    %r10,%rdi
cmp    %rsi,%rdx
jae    16c0 <lm_qrsolv+0x5a0>
mov    0x40(%rsp),%rdx
mov    0x8(%rsp),%rsi
add    %rsi,%rdx
sub    %rdx,%r13
lea    0x0(,%r14,8),%rdx
add    %rbp,%rdx
lea    -0x10(%rdx,%r13,8),%rdx
lea    (%r8,%r12,1),%rsi
mov    (%rsp),%rdi
lea    (%rdi,%rsi,8),%rdi
mov    %r8,%rsi
cmp    %rdx,%rdi
mov    %r10,%rdi
jb     1819 <lm_qrsolv+0x6f9>
mov    0xc0(%rsp),%rdx
add    %rcx,%rdx
add    $0xfffffffffffffffe,%rdx
mov    %rdx,%r10
shr    %r10
add    $0x1,%r10
movapd %xmm10,%xmm3
unpcklpd %xmm10,%xmm3
movapd %xmm11,%xmm1
unpcklpd %xmm11,%xmm1
movapd %xmm0,%xmm2
unpcklpd %xmm0,%xmm2
cmp    $0x2,%rdx
jae    1716 <lm_qrsolv+0x5f6>
xor    %edx,%edx
mov    0x18(%rsp),%rcx
jmp    17b6 <lm_qrsolv+0x696>
mov    0x30(%rsp),%r12
mov    0x38(%rsp),%rsi
jmp    1399 <lm_qrsolv+0x279>
add    %r11,%r15
shr    %r15
add    $0x1,%r15
and    $0xfffffffffffffffe,%r15
mov    0x38(%rsp),%rdx
add    %r12,%rdx
mov    (%rsp),%rcx
lea    (%rcx,%rdx,8),%rsi
xor    %edx,%edx
mov    0x18(%rsp),%rcx
nopl   0x0(%rax,%rax,1)
movupd -0x10(%rsi,%rdx,8),%xmm4
movupd -0x10(%rcx,%rdx,8),%xmm5
movapd %xmm3,%xmm6
mulpd  %xmm5,%xmm6
movapd %xmm1,%xmm7
mulpd  %xmm4,%xmm7
addpd  %xmm6,%xmm7
mulpd  %xmm1,%xmm5
mulpd  %xmm2,%xmm4
addpd  %xmm5,%xmm4
movupd %xmm4,-0x10(%rcx,%rdx,8)
movupd %xmm7,-0x10(%rsi,%rdx,8)
movupd (%rsi,%rdx,8),%xmm4
movupd (%rcx,%rdx,8),%xmm5
movapd %xmm3,%xmm6
mulpd  %xmm5,%xmm6
movapd %xmm1,%xmm7
mulpd  %xmm4,%xmm7
addpd  %xmm6,%xmm7
mulpd  %xmm1,%xmm5
mulpd  %xmm2,%xmm4
addpd  %xmm5,%xmm4
movupd %xmm4,(%rcx,%rdx,8)
movupd %xmm7,(%rsi,%rdx,8)
add    $0x4,%rdx
add    $0xfffffffffffffffe,%r15
jne    1740 <lm_qrsolv+0x620>
mov    %r9,%rsi
and    $0xfffffffffffffffe,%rsi
test   $0x1,%r10b
je     1802 <lm_qrsolv+0x6e2>
add    %r8,%rdx
lea    (%rdx,%r12,1),%r10
mov    (%rsp),%r14
movupd (%r14,%r10,8),%xmm4
movupd 0x0(%rbp,%rdx,8),%xmm5
mulpd  %xmm5,%xmm3
movapd %xmm1,%xmm6
mulpd  %xmm4,%xmm6
addpd  %xmm3,%xmm6
mulpd  %xmm5,%xmm1
mulpd  %xmm4,%xmm2
addpd  %xmm1,%xmm2
movupd %xmm2,0x0(%rbp,%rdx,8)
movupd %xmm6,(%r14,%r10,8)
cmp    %rsi,%r9
jne    1816 <lm_qrsolv+0x6f6>
mov    0x120(%rsp),%r10
mov    0x38(%rsp),%rsi
jmp    1884 <lm_qrsolv+0x764>
add    %r8,%rsi
mov    (%rsp),%rcx
lea    (%rcx,%r12,8),%rcx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  (%rcx,%rsi,8),%xmm1
movsd  0x0(%rbp,%rsi,8),%xmm2
movapd %xmm10,%xmm3
mulsd  %xmm2,%xmm3
movapd %xmm11,%xmm4
mulsd  %xmm1,%xmm4
addsd  %xmm3,%xmm4
mulsd  %xmm11,%xmm2
mulsd  %xmm0,%xmm1
addsd  %xmm2,%xmm1
movsd  %xmm1,0x0(%rbp,%rsi,8)
movsd  %xmm4,(%rcx,%rsi,8)
add    $0x1,%rsi
cmp    %rbx,%rsi
jb     1830 <lm_qrsolv+0x710>
mov    0x120(%rsp),%r10
mov    0x38(%rsp),%rsi
mov    0x18(%rsp),%rcx
mov    0x8(%rsp),%rdx
mov    (%rsp),%r9
mov    0x30(%rsp),%r12
cmp    %rbx,%rax
jne    13a7 <lm_qrsolv+0x287>
jmp    1240 <lm_qrsolv+0x120>
mov    0x10(%rsp),%r11d
test   %r11d,%r11d
jle    1b68 <lm_qrsolv+0xa48>
mov    %r9,%r8
mov    %rbx,%rax
add    $0xffffffffffffffff,%rax
mov    %rax,0x20(%rsp)
je     193b <lm_qrsolv+0x81b>
mov    %ebx,%r9d
and    $0xfffffffe,%r9d
xor    %esi,%esi
xorpd  %xmm0,%xmm0
mov    %r11d,%edx
jmp    18e9 <lm_qrsolv+0x7c9>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%rsi
cmp    %r9,%rsi
je     1935 <lm_qrsolv+0x815>
mov    %rsi,%rax
cmp    %r11d,%edx
mov    %eax,%edi
cmovne %edx,%edi
ucomisd 0x0(%rbp,%rsi,8),%xmm0
cmovne %edx,%edi
cmovp  %edx,%edi
cmp    %r11d,%edi
jge    190d <lm_qrsolv+0x7ed>
movq   $0x0,(%r10,%rax,8)
lea    0x1(%rax),%rsi
cmp    %r11d,%edi
mov    %esi,%edx
cmovne %edi,%edx
ucomisd 0x8(%rbp,%rax,8),%xmm0
cmovne %edi,%edx
cmovp  %edi,%edx
cmp    %r11d,%edx
jge    18e0 <lm_qrsolv+0x7c0>
movq   $0x0,0x8(%r10,%rax,8)
jmp    18e0 <lm_qrsolv+0x7c0>
add    $0x2,%rax
jmp    1940 <lm_qrsolv+0x820>
xor    %eax,%eax
mov    %r11d,%edx
mov    %edx,%esi
test   $0x1,%bl
je     196c <lm_qrsolv+0x84c>
cmp    %r11d,%edx
mov    %eax,%esi
cmovne %edx,%esi
xorpd  %xmm0,%xmm0
ucomisd 0x0(%rbp,%rax,8),%xmm0
cmovne %edx,%esi
cmovp  %edx,%esi
cmp    %r11d,%esi
jge    196c <lm_qrsolv+0x84c>
movq   $0x0,(%r10,%rax,8)
test   %esi,%esi
jle    1abc <lm_qrsolv+0x99c>
mov    %r13,%rbp
mov    %esi,%r13d
mov    %r13,%r15
neg    %r15
mov    0x120(%rsp),%rax
lea    (%rax,%r13,8),%rsi
lea    -0x1(%r13),%rax
imul   %rbp,%rax
lea    (%rax,%r13,1),%rdx
lea    (%r8,%rdx,8),%rdi
shl    $0x3,%rbp
mov    %rbp,%r9
xor    $0xfffffffffffffff8,%r9
lea    (%r8,%rax,8),%rax
add    $0x10,%rax
neg    %rbp
mov    %rbp,%r8
xor    %edx,%edx
mov    %r13,%r10
jmp    19fa <lm_qrsolv+0x8da>
nopl   0x0(%rax)
movsd  (%rbx,%r10,8),%xmm1
subsd  %xmm0,%xmm1
mov    0x118(%rsp),%rbp
divsd  0x0(%rbp,%r10,8),%xmm1
movsd  %xmm1,(%rbx,%r10,8)
add    $0x1,%edx
add    $0x1,%r15
add    $0xfffffffffffffff8,%rsi
add    %r9,%rdi
add    %r8,%rax
cmp    $0x1,%r11
jle    1abc <lm_qrsolv+0x99c>
mov    %r10,%r11
add    $0xffffffffffffffff,%r10
xorpd  %xmm0,%xmm0
cmp    %r13,%r11
mov    0x120(%rsp),%rbx
jge    19c0 <lm_qrsolv+0x8a0>
lea    -0x1(%rdx),%r14d
test   $0x3,%dl
je     1a4b <lm_qrsolv+0x92b>
mov    %edx,%ebx
and    $0x3,%ebx
xorpd  %xmm0,%xmm0
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
movsd  (%rdi,%rbp,8),%xmm1
mulsd  (%rsi,%rbp,8),%xmm1
addsd  %xmm1,%xmm0
add    $0x1,%rbp
cmp    %ebp,%ebx
jne    1a30 <lm_qrsolv+0x910>
sub    %r15,%rbp
jmp    1a52 <lm_qrsolv+0x932>
xorpd  %xmm0,%xmm0
mov    %r11,%rbp
cmp    $0x3,%r14d
mov    0x120(%rsp),%rbx
jb     19c0 <lm_qrsolv+0x8a0>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  -0x10(%rax,%rbp,8),%xmm1
movsd  -0x8(%rax,%rbp,8),%xmm2
mulsd  (%rbx,%rbp,8),%xmm1
mulsd  0x8(%rbx,%rbp,8),%xmm2
addsd  %xmm0,%xmm1
movsd  (%rax,%rbp,8),%xmm3
mulsd  0x10(%rbx,%rbp,8),%xmm3
addsd  %xmm1,%xmm2
movsd  0x8(%rax,%rbp,8),%xmm0
mulsd  0x18(%rbx,%rbp,8),%xmm0
addsd  %xmm2,%xmm3
addsd  %xmm3,%xmm0
add    $0x4,%rbp
cmp    %ebp,%r13d
jne    1a70 <lm_qrsolv+0x950>
jmp    19c0 <lm_qrsolv+0x8a0>
cmpl   $0x0,0x10(%rsp)
mov    0x120(%rsp),%rdi
mov    0x28(%rsp),%rax
jle    1b68 <lm_qrsolv+0xa48>
mov    %eax,%ebp
and    $0x3,%ebp
cmpq   $0x3,0x20(%rsp)
jae    1ae5 <lm_qrsolv+0x9c5>
xor    %esi,%esi
jmp    1b3b <lm_qrsolv+0xa1b>
and    $0xfffffffc,%eax
xor    %esi,%esi
nopw   0x0(%rax,%rax,1)
movsd  (%rdi,%rsi,8),%xmm0
movslq (%rcx,%rsi,4),%rdx
movsd  %xmm0,(%r12,%rdx,8)
movsd  0x8(%rdi,%rsi,8),%xmm0
movslq 0x4(%rcx,%rsi,4),%rdx
movsd  %xmm0,(%r12,%rdx,8)
movsd  0x10(%rdi,%rsi,8),%xmm0
movslq 0x8(%rcx,%rsi,4),%rdx
movsd  %xmm0,(%r12,%rdx,8)
movsd  0x18(%rdi,%rsi,8),%xmm0
movslq 0xc(%rcx,%rsi,4),%rdx
movsd  %xmm0,(%r12,%rdx,8)
add    $0x4,%rsi
cmp    %rsi,%rax
jne    1af0 <lm_qrsolv+0x9d0>
test   %rbp,%rbp
je     1b68 <lm_qrsolv+0xa48>
lea    (%rcx,%rsi,4),%rdx
lea    (%rdi,%rsi,8),%rcx
xor    %esi,%esi
nopw   0x0(%rax,%rax,1)
movsd  (%rcx,%rsi,8),%xmm0
movslq (%rdx,%rsi,4),%rdi
movsd  %xmm0,(%r12,%rdi,8)
add    $0x1,%rsi
cmp    %rsi,%rbp
jne    1b50 <lm_qrsolv+0xa30>
add    $0xd8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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