void lm_qrfac(int m, int n, double *a, int pivot, int *ipvt, double *rdiag,
              double *acnorm, double *wa) {
  int i, j, k, kmax, minmn;
  double ajnorm, sum, temp;
  for (j = 0; j < n; j++) {
    acnorm[j] = lm_enorm(m, &a[j * m]);
    rdiag[j] = acnorm[j];
    wa[j] = rdiag[j];
    if (pivot)
      ipvt[j] = j;
  }
  minmn = (((m) <= (n)) ? (m) : (n));
  for (j = 0; j < minmn; j++) {
    if (!pivot)
      goto pivot_ok;
    kmax = j;
    for (k = j + 1; k < n; k++)
      if (rdiag[k] > rdiag[kmax])
        kmax = k;
    if (kmax == j)
      goto pivot_ok;
    for (i = 0; i < m; i++) {
      temp = a[j * m + i];
      a[j * m + i] = a[kmax * m + i];
      a[kmax * m + i] = temp;
    }
    rdiag[kmax] = rdiag[j];
    wa[kmax] = wa[j];
    k = ipvt[j];
    ipvt[j] = ipvt[kmax];
    ipvt[kmax] = k;
  pivot_ok:
    ajnorm = lm_enorm(m - j, &a[j * m + j]);
    if (ajnorm == 0.) {
      rdiag[j] = 0;
      continue;
    }
    if (a[j * m + j] < 0.)
      ajnorm = -ajnorm;
    for (i = j; i < m; i++)
      a[j * m + i] /= ajnorm;
    a[j * m + j] += 1;
    for (k = j + 1; k < n; k++) {
      sum = 0;
      for (i = j; i < m; i++)
        sum += a[j * m + i] * a[k * m + i];
      temp = sum / a[j + m * j];
      for (i = j; i < m; i++)
        a[k * m + i] -= temp * a[j * m + i];
      if (pivot && rdiag[k] != 0.) {
        temp = a[m * k + j] / rdiag[k];
        temp = (((0.) >= (1 - temp * temp)) ? (0.) : (1 - temp * temp));
        rdiag[k] *= sqrt(temp);
        temp = rdiag[k] / wa[k];
        if (0.05 * (temp) * (temp) <= 1.2e-16) {
          rdiag[k] = lm_enorm(m - j - 1, &a[m * k + j + 1]);
          wa[k] = rdiag[k];
        }
      }
    }
    rdiag[j] = -ajnorm;
  }
}


x86 assembly (clang, -O0):
<lm_qrfac>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11e6 <lm_qrfac+0xc6>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x30(%rbp),%eax
imul   -0x4(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
mov    $0x0,%al
call   1030 <lm_enorm@plt>
cvtsi2sd %eax,%xmm0
mov    0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
cmpl   $0x0,-0x14(%rbp)
je     11d3 <lm_qrfac+0xb3>
mov    -0x30(%rbp),%edx
mov    -0x20(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
jmp    11d8 <lm_qrfac+0xb8>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    114c <lm_qrfac+0x2c>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11fd <lm_qrfac+0xdd>
mov    -0x4(%rbp),%eax
mov    %eax,-0x5c(%rbp)
jmp    1203 <lm_qrfac+0xe3>
mov    -0x8(%rbp),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    1771 <lm_qrfac+0x651>
cmpl   $0x0,-0x14(%rbp)
jne    122b <lm_qrfac+0x10b>
jmp    1379 <lm_qrfac+0x259>
mov    -0x30(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    127f <lm_qrfac+0x15f>
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x38(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jbe    126c <lm_qrfac+0x14c>
mov    -0x34(%rbp),%eax
mov    %eax,-0x38(%rbp)
jmp    1271 <lm_qrfac+0x151>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    123a <lm_qrfac+0x11a>
mov    -0x38(%rbp),%eax
cmp    -0x30(%rbp),%eax
jne    1290 <lm_qrfac+0x170>
jmp    1379 <lm_qrfac+0x259>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1313 <lm_qrfac+0x1f3>
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x58(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1297 <lm_qrfac+0x177>
mov    -0x28(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x34(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x20(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x34(%rbp),%edx
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x4(%rbp),%edi
sub    -0x30(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x30(%rbp),%eax
imul   -0x4(%rbp),%eax
add    -0x30(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
mov    $0x0,%al
call   1030 <lm_enorm@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    13d3 <lm_qrfac+0x2b3>
jp     13d3 <lm_qrfac+0x2b3>
mov    -0x28(%rbp),%rax
movslq -0x30(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    1763 <lm_qrfac+0x643>
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
ucomisd (%rax,%rcx,8),%xmm0
jbe    1413 <lm_qrfac+0x2f3>
movsd  -0x48(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x30(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1457 <lm_qrfac+0x337>
movsd  -0x48(%rbp),%xmm1
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1419 <lm_qrfac+0x2f9>
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  0xb90(%rip),%xmm0
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    173a <lm_qrfac+0x61a>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x30(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    14f5 <lm_qrfac+0x3d5>
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    149d <lm_qrfac+0x37d>
movsd  -0x50(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x4(%rbp),%edx
imul   -0x30(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
divsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x30(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    158c <lm_qrfac+0x46c>
movsd  -0x58(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    -0x2c(%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)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    151d <lm_qrfac+0x3fd>
cmpl   $0x0,-0x14(%rbp)
je     1727 <lm_qrfac+0x607>
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    15bb <lm_qrfac+0x49b>
jp     15bb <lm_qrfac+0x49b>
jmp    1727 <lm_qrfac+0x607>
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
imul   -0x34(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm0
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm0,%xmm1
movsd  0x9f0(%rip),%xmm0
addsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jb     162e <lm_qrfac+0x50e>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
jmp    1664 <lm_qrfac+0x544>
movsd  -0x58(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0x9a5(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
call   1040 <sqrt@plt>
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0x95f(%rip),%xmm1
mulsd  -0x58(%rbp),%xmm1
mulsd  -0x58(%rbp),%xmm1
movsd  0x945(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1722 <lm_qrfac+0x602>
mov    -0x4(%rbp),%edi
sub    -0x30(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
mov    -0x4(%rbp),%eax
imul   -0x34(%rbp),%eax
add    -0x30(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
mov    $0x0,%al
call   1030 <lm_enorm@plt>
cvtsi2sd %eax,%xmm0
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1727 <lm_qrfac+0x607>
jmp    172c <lm_qrfac+0x60c>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1483 <lm_qrfac+0x363>
movsd  -0x48(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x28(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1210 <lm_qrfac+0xf0>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lm_qrfac>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x168,%rsp
mov    %r9,0x28(%rsp)
mov    %r8,0x80(%rsp)
mov    %ecx,0x1c(%rsp)
mov    %rdx,0x20(%rsp)
mov    %esi,%r14d
mov    %edi,0x4(%rsp)
movslq %edi,%rax
mov    %rax,0x40(%rsp)
mov    %esi,%esi
test   %r14d,%r14d
mov    %rsi,0x30(%rsp)
jle    11d7 <lm_qrfac+0xb7>
mov    0x1a0(%rsp),%r15
mov    0x40(%rsp),%rax
lea    0x0(,%rax,8),%r12
mov    0x20(%rsp),%rbp
xor    %ebx,%ebx
jmp    1191 <lm_qrfac+0x71>
add    $0x1,%rbx
add    %r12,%rbp
mov    0x30(%rsp),%rsi
cmp    %rbx,%rsi
je     11d7 <lm_qrfac+0xb7>
mov    0x4(%rsp),%edi
mov    %rbp,%rsi
xor    %eax,%eax
call   1030 <lm_enorm@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%r15,%rbx,8)
mov    0x28(%rsp),%rax
movsd  %xmm0,(%rax,%rbx,8)
mov    0x1a8(%rsp),%rax
movsd  %xmm0,(%rax,%rbx,8)
cmpl   $0x0,0x1c(%rsp)
je     1180 <lm_qrfac+0x60>
mov    0x80(%rsp),%rax
mov    %ebx,(%rax,%rbx,4)
jmp    1180 <lm_qrfac+0x60>
mov    0x4(%rsp),%eax
cmp    %r14d,%eax
cmovg  %r14d,%eax
test   %eax,%eax
mov    0x28(%rsp),%r9
mov    0x20(%rsp),%r10
mov    0x40(%rsp),%r11
jle    1bf0 <lm_qrfac+0xad0>
movslq %r14d,%rcx
mov    %rcx,0x88(%rsp)
mov    %eax,%eax
mov    %rax,0xe8(%rsp)
mov    0x4(%rsp),%ebp
lea    (%r11,%rbp,1),%rax
mov    %rax,0xe0(%rsp)
lea    0x1(%r11),%rax
mov    %rax,0x70(%rsp)
lea    (%r10,%rbp,8),%r13
mov    %ebp,%eax
and    $0xfffffffc,%eax
mov    %rax,0xd8(%rsp)
add    $0xfffffffffffffffc,%rax
mov    %rax,0xd0(%rsp)
mov    %rax,%rcx
shr    $0x2,%rcx
add    $0x1,%rcx
mov    %rcx,%rax
mov    %rcx,0xc8(%rsp)
and    $0xfffffffffffffffe,%rcx
mov    %rcx,0xc0(%rsp)
mov    %rbp,%rdi
neg    %rdi
lea    0x30(%r10),%rax
mov    %rax,0xb8(%rsp)
lea    0x8(%r10),%rax
mov    %rax,0x60(%rsp)
lea    0x10(%r10),%rax
mov    %rax,0x68(%rsp)
lea    0x8(%r10,%r11,8),%r12
lea    0x0(,%r11,8),%rax
mov    %rax,0xa8(%rsp)
lea    0x10(%r10,%r11,8),%rax
mov    %rax,0x98(%rsp)
mov    $0x1,%eax
mov    %rax,0x48(%rsp)
xor    %eax,%eax
mov    %rax,0x90(%rsp)
xor    %r15d,%r15d
mov    %r13,0x78(%rsp)
mov    %rdi,0x10(%rsp)
jmp    132b <lm_qrfac+0x20b>
nop
movapd 0x150(%rsp),%xmm0
xorpd  %xmm6,%xmm0
movlpd %xmm0,(%r9,%rdx,8)
mov    0xf0(%rsp),%rcx
mov    %rcx,%r15
mov    0x78(%rsp),%r13
mov    0xa0(%rsp),%r12
addq   $0x1,0x48(%rsp)
addq   $0x1,0x90(%rsp)
mov    0xa8(%rsp),%rax
add    %rax,%r12
add    %rax,0x98(%rsp)
cmp    0xe8(%rsp),%rcx
je     1bf0 <lm_qrfac+0xad0>
cmpl   $0x0,0x1c(%rsp)
mov    %r15,0x8(%rsp)
je     15bc <lm_qrfac+0x49c>
lea    0x1(%r15),%rcx
mov    %r15d,%eax
cmp    0x88(%rsp),%rcx
jge    1390 <lm_qrfac+0x270>
mov    0x48(%rsp),%rcx
mov    0x8(%rsp),%rax
mov    %eax,%edx
jmp    136b <lm_qrfac+0x24b>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rcx
mov    %eax,%edx
cmp    %rcx,%rsi
je     1390 <lm_qrfac+0x270>
movsd  (%r9,%rcx,8),%xmm0
movslq %edx,%rax
ucomisd (%r9,%rax,8),%xmm0
mov    %ecx,%eax
ja     1360 <lm_qrfac+0x240>
mov    %edx,%eax
jmp    1360 <lm_qrfac+0x240>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %eax,%ecx
mov    0x8(%rsp),%r15
cmp    %rcx,%r15
je     15bc <lm_qrfac+0x49c>
cmpl   $0x0,0x4(%rsp)
jle    1580 <lm_qrfac+0x460>
mov    0x8(%rsp),%rcx
imul   %r11,%rcx
mov    %eax,%edx
mov    0x4(%rsp),%esi
imul   %esi,%edx
movslq %edx,%r8
cmp    $0x4,%esi
jb     13f5 <lm_qrfac+0x2d5>
lea    (%r10,%rcx,8),%rdx
lea    0x0(,%r8,8),%rsi
add    %r13,%rsi
cmp    %rsi,%rdx
jae    148a <lm_qrfac+0x36a>
lea    0x0(,%rcx,8),%rdx
add    %r13,%rdx
lea    (%r10,%r8,8),%rsi
cmp    %rdx,%rsi
jae    148a <lm_qrfac+0x36a>
xor    %edx,%edx
mov    %rdx,%rsi
test   $0x1,%bpl
je     142c <lm_qrfac+0x30c>
lea    (%rdx,%rcx,1),%rsi
movsd  (%r10,%rsi,8),%xmm0
lea    (%rdx,%r8,1),%rdi
movsd  (%r10,%rdi,8),%xmm1
movsd  %xmm1,(%r10,%rsi,8)
movsd  %xmm0,(%r10,%rdi,8)
mov    0x10(%rsp),%rdi
mov    %rdx,%rsi
or     $0x1,%rsi
not    %rdx
cmp    %rdi,%rdx
je     1580 <lm_qrfac+0x460>
mov    0x60(%rsp),%rdi
lea    (%rdi,%r8,8),%rdx
lea    (%rdi,%rcx,8),%rcx
cs nopw 0x0(%rax,%rax,1)
nop
movsd  -0x8(%rcx,%rsi,8),%xmm0
movsd  -0x8(%rdx,%rsi,8),%xmm1
movsd  %xmm1,-0x8(%rcx,%rsi,8)
movsd  %xmm0,-0x8(%rdx,%rsi,8)
movsd  (%rcx,%rsi,8),%xmm0
movsd  (%rdx,%rsi,8),%xmm1
movsd  %xmm1,(%rcx,%rsi,8)
movsd  %xmm0,(%rdx,%rsi,8)
add    $0x2,%rsi
cmp    %rsi,%rbp
jne    1450 <lm_qrfac+0x330>
jmp    1580 <lm_qrfac+0x460>
cmpq   $0x0,0xd0(%rsp)
je     1bdb <lm_qrfac+0xabb>
mov    0xb8(%rsp),%rdx
lea    (%rdx,%rcx,8),%rdi
lea    (%rdx,%r8,8),%rbx
mov    0xc0(%rsp),%rdx
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movups -0x30(%rdi,%rsi,8),%xmm0
movups -0x20(%rdi,%rsi,8),%xmm1
movups -0x30(%rbx,%rsi,8),%xmm2
movups -0x20(%rbx,%rsi,8),%xmm3
movups %xmm2,-0x30(%rdi,%rsi,8)
movups %xmm3,-0x20(%rdi,%rsi,8)
movups %xmm0,-0x30(%rbx,%rsi,8)
movups %xmm1,-0x20(%rbx,%rsi,8)
movupd -0x10(%rdi,%rsi,8),%xmm0
movupd (%rdi,%rsi,8),%xmm1
movupd -0x10(%rbx,%rsi,8),%xmm2
movupd (%rbx,%rsi,8),%xmm3
movupd %xmm2,-0x10(%rdi,%rsi,8)
movupd %xmm3,(%rdi,%rsi,8)
movupd %xmm0,-0x10(%rbx,%rsi,8)
movupd %xmm1,(%rbx,%rsi,8)
add    $0x8,%rsi
add    $0xfffffffffffffffe,%rdx
jne    14c0 <lm_qrfac+0x3a0>
testb  $0x1,0xc8(%rsp)
01
je     1563 <lm_qrfac+0x443>
lea    (%rsi,%rcx,1),%rdx
movupd (%r10,%rdx,8),%xmm0
movupd 0x10(%r10,%rdx,8),%xmm1
add    %r8,%rsi
movupd (%r10,%rsi,8),%xmm2
movupd 0x10(%r10,%rsi,8),%xmm3
movupd %xmm2,(%r10,%rdx,8)
movupd %xmm3,0x10(%r10,%rdx,8)
movupd %xmm0,(%r10,%rsi,8)
movupd %xmm1,0x10(%r10,%rsi,8)
mov    0xd8(%rsp),%rsi
mov    %rsi,%rdx
cmp    %rbp,%rsi
mov    0x10(%rsp),%rdi
jne    13f7 <lm_qrfac+0x2d7>
nopl   0x0(%rax)
mov    0x8(%rsp),%r15
movsd  (%r9,%r15,8),%xmm0
cltq
movsd  %xmm0,(%r9,%rax,8)
mov    0x1a8(%rsp),%rcx
movsd  (%rcx,%r15,8),%xmm0
movsd  %xmm0,(%rcx,%rax,8)
mov    0x80(%rsp),%rsi
mov    (%rsi,%r15,4),%ecx
mov    (%rsi,%rax,4),%edx
mov    %edx,(%rsi,%r15,4)
mov    %ecx,(%rsi,%rax,4)
mov    %r11,%rdi
sub    %r15,%rdi
mov    %r15d,%eax
imul   0x4(%rsp),%eax
cltq
add    %r15,%rax
lea    (%r10,%rax,8),%r14
mov    %rdi,0x50(%rsp)
mov    %r14,%rsi
xor    %eax,%eax
mov    %r11,%rbx
call   1030 <lm_enorm@plt>
test   %eax,%eax
je     1ba0 <lm_qrfac+0xa80>
mov    %r15,%rcx
imul   %rbx,%rcx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mov    %r14,0x58(%rsp)
movsd  (%r14),%xmm2
movapd %xmm0,%xmm1
movapd 0x9ef(%rip),%xmm6
xorpd  %xmm6,%xmm1
xorpd  %xmm7,%xmm7
cmpltsd %xmm7,%xmm2
andpd  %xmm2,%xmm1
andnpd %xmm0,%xmm2
orpd   %xmm1,%xmm2
movapd %xmm2,%xmm1
mov    %rbp,%rdx
sub    %r15,%rdx
mov    %r15,%rax
mov    %rdx,%rsi
mov    %rdx,0x38(%rsp)
cmp    $0x2,%rdx
mov    0x28(%rsp),%r9
mov    0x20(%rsp),%r10
mov    %rbx,%r11
mov    0x30(%rsp),%rsi
mov    0x10(%rsp),%rdi
mov    %r15,%rdx
movapd %xmm2,0x150(%rsp)
mov    %r12,0xa0(%rsp)
jb     172a <lm_qrfac+0x60a>
mov    %rcx,%rbx
mov    0x38(%rsp),%rax
and    $0xfffffffffffffffe,%rax
movapd %xmm1,%xmm0
unpcklpd %xmm1,%xmm0
lea    -0x2(%rax),%rdx
mov    %rdx,%rcx
shr    %rcx
add    $0x1,%rcx
test   %rdx,%rdx
je     1bcb <lm_qrfac+0xaab>
mov    %rcx,%rsi
and    $0xfffffffffffffffe,%rsi
mov    0x70(%rsp),%rdx
imul   0x8(%rsp),%rdx
mov    0x68(%rsp),%rdi
lea    (%rdi,%rdx,8),%rdi
xor    %edx,%edx
nopl   0x0(%rax)
movupd -0x10(%rdi,%rdx,8),%xmm1
movupd (%rdi,%rdx,8),%xmm2
divpd  %xmm0,%xmm1
movupd %xmm1,-0x10(%rdi,%rdx,8)
divpd  %xmm0,%xmm2
movupd %xmm2,(%rdi,%rdx,8)
add    $0x4,%rdx
add    $0xfffffffffffffffe,%rsi
jne    16c0 <lm_qrfac+0x5a0>
test   $0x1,%cl
je     1705 <lm_qrfac+0x5e5>
add    0x8(%rsp),%rdx
add    %rbx,%rdx
movupd (%r10,%rdx,8),%xmm1
divpd  %xmm0,%xmm1
movupd %xmm1,(%r10,%rdx,8)
cmp    %rax,0x38(%rsp)
mov    0x30(%rsp),%rsi
mov    0x10(%rsp),%rdi
mov    0x8(%rsp),%rdx
movapd 0x150(%rsp),%xmm1
je     1757 <lm_qrfac+0x637>
add    %rdx,%rax
mov    %rbx,%rcx
mov    %rcx,%rbx
lea    (%r10,%rcx,8),%rcx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  (%rcx,%rax,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rcx,%rax,8)
add    $0x1,%rax
cmp    %rax,%rbp
jne    1740 <lm_qrfac+0x620>
mov    0x58(%rsp),%rax
movsd  (%rax),%xmm0
addsd  0x8a8(%rip),%xmm0
movsd  %xmm0,(%rax)
lea    0x1(%rdx),%rax
mov    %rax,0xf0(%rsp)
cmp    0x88(%rsp),%rax
jge    12d0 <lm_qrfac+0x1b0>
mov    0x90(%rsp),%rcx
imul   %r11,%rcx
mov    0xe0(%rsp),%rax
add    %rcx,%rax
mov    %rax,0x110(%rsp)
add    %r11,%rcx
mov    0x50(%rsp),%rax
add    $0xffffffff,%eax
mov    %rax,0x50(%rsp)
add    %rdx,%rcx
mov    %rcx,0x138(%rsp)
mov    0x70(%rsp),%rax
imul   %rdx,%rax
lea    (%r10,%rax,8),%rcx
mov    %rcx,0x108(%rsp)
mov    0x78(%rsp),%rcx
lea    (%rcx,%rbx,8),%rcx
mov    %rcx,0x130(%rsp)
mov    %rdx,%rcx
not    %rcx
mov    %rcx,0x148(%rsp)
lea    (%rdx,%rbx,1),%rcx
mov    %rcx,0x128(%rsp)
lea    0x1(%rdx),%rcx
mov    %rcx,0x120(%rsp)
mov    0x38(%rsp),%rcx
and    $0xfffffffffffffffc,%rcx
mov    %rcx,0x100(%rsp)
add    %rdx,%rcx
mov    %rcx,0xf8(%rsp)
mov    0x60(%rsp),%rcx
mov    %rbx,0x118(%rsp)
lea    (%rcx,%rbx,8),%rbx
mov    0x68(%rsp),%rcx
lea    (%rcx,%rax,8),%r12
mov    0x58(%rsp),%rcx
mov    0x98(%rsp),%rax
lea    (%rax,%rdx,8),%r15
mov    0xa0(%rsp),%r13
xor    %eax,%eax
mov    %rax,0xb0(%rsp)
mov    0x48(%rsp),%r14
jmp    1899 <lm_qrfac+0x779>
nopl   0x0(%rax)
add    $0x1,%r14
addq   $0x1,0xb0(%rsp)
mov    0xa8(%rsp),%rax
add    %rax,%r13
add    %rax,%r15
cmp    %rsi,%r14
mov    0x58(%rsp),%rcx
je     12d0 <lm_qrfac+0x1b0>
mov    %r14,%r8
imul   %r11,%r8
xorpd  %xmm1,%xmm1
mov    %rdx,%rax
testb  $0x1,0x38(%rsp)
je     18d6 <lm_qrfac+0x7b6>
mov    0x128(%rsp),%rax
movsd  (%r10,%rax,8),%xmm0
lea    (%rdx,%r8,1),%rax
mulsd  (%r10,%rax,8),%xmm0
addsd  %xmm7,%xmm0
mov    0x120(%rsp),%rax
movapd %xmm0,%xmm1
cmp    %rdi,0x148(%rsp)
je     190e <lm_qrfac+0x7ee>
movsd  -0x8(%rbx,%rax,8),%xmm2
movsd  (%rbx,%rax,8),%xmm0
mulsd  -0x8(%r13,%rax,8),%xmm2
mulsd  0x0(%r13,%rax,8),%xmm0
addsd  %xmm1,%xmm2
addsd  %xmm2,%xmm0
add    $0x2,%rax
movapd %xmm0,%xmm1
cmp    %rax,%rbp
jne    18e0 <lm_qrfac+0x7c0>
xorpd  %xmm6,%xmm0
divsd  (%rcx),%xmm0
mov    %rdx,%rax
cmpq   $0x4,0x38(%rsp)
jb     19e0 <lm_qrfac+0x8c0>
mov    0xb0(%rsp),%rax
imul   %r11,%rax
mov    0x138(%rsp),%rcx
add    %rax,%rcx
lea    (%r10,%rcx,8),%rcx
cmp    0x130(%rsp),%rcx
jae    1963 <lm_qrfac+0x843>
add    0x110(%rsp),%rax
lea    (%r10,%rax,8),%rcx
mov    %rdx,%rax
cmp    %rcx,0x108(%rsp)
jb     19e0 <lm_qrfac+0x8c0>
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
xor    %eax,%eax
mov    0x100(%rsp),%rcx
cs nopw 0x0(%rax,%rax,1)
nop
movupd -0x10(%r12,%rax,8),%xmm2
movupd (%r12,%rax,8),%xmm3
movupd -0x10(%r15,%rax,8),%xmm4
movupd (%r15,%rax,8),%xmm5
mulpd  %xmm1,%xmm2
addpd  %xmm4,%xmm2
mulpd  %xmm1,%xmm3
addpd  %xmm5,%xmm3
movupd %xmm2,-0x10(%r15,%rax,8)
movupd %xmm3,(%r15,%rax,8)
add    $0x4,%rax
cmp    %rax,%rcx
jne    1980 <lm_qrfac+0x860>
mov    0xf8(%rsp),%rax
cmp    %rcx,0x38(%rsp)
je     1a68 <lm_qrfac+0x948>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebp,%edx
sub    %eax,%edx
mov    %rax,%rcx
test   $0x1,%dl
je     1a15 <lm_qrfac+0x8f5>
mov    0x118(%rsp),%rcx
add    %rax,%rcx
lea    (%rax,%r8,1),%rdx
movsd  (%r10,%rcx,8),%xmm1
mulsd  %xmm0,%xmm1
addsd  (%r10,%rdx,8),%xmm1
movsd  %xmm1,(%r10,%rdx,8)
lea    0x1(%rax),%rcx
not    %rax
cmp    %rdi,%rax
mov    0x8(%rsp),%rdx
je     1a68 <lm_qrfac+0x948>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  -0x8(%rbx,%rcx,8),%xmm1
mulsd  %xmm0,%xmm1
addsd  -0x8(%r13,%rcx,8),%xmm1
movsd  %xmm1,-0x8(%r13,%rcx,8)
movsd  (%rbx,%rcx,8),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x0(%r13,%rcx,8),%xmm1
movsd  %xmm1,0x0(%r13,%rcx,8)
add    $0x2,%rcx
cmp    %rcx,%rbp
jne    1a30 <lm_qrfac+0x910>
cmpl   $0x0,0x1c(%rsp)
je     1870 <lm_qrfac+0x750>
movsd  (%r9,%r14,8),%xmm0
ucomisd %xmm7,%xmm0
jne    1a85 <lm_qrfac+0x965>
jnp    1870 <lm_qrfac+0x750>
add    %rdx,%r8
mov    %r8,0x140(%rsp)
movsd  (%r10,%r8,8),%xmm1
divsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm1
movsd  0x56a(%rip),%xmm2
subsd  %xmm1,%xmm2
movapd %xmm2,%xmm0
cmplesd %xmm7,%xmm0
andnpd %xmm2,%xmm0
ucomisd %xmm7,%xmm0
jb     1ac3 <lm_qrfac+0x9a3>
sqrtsd %xmm0,%xmm0
jmp    1af2 <lm_qrfac+0x9d2>
call   1040 <sqrt@plt>
mov    0x8(%rsp),%rdx
xorpd  %xmm7,%xmm7
movapd 0x527(%rip),%xmm6
mov    0x10(%rsp),%rdi
mov    0x30(%rsp),%rsi
mov    0x40(%rsp),%r11
mov    0x20(%rsp),%r10
mov    0x28(%rsp),%r9
mulsd  (%r9,%r14,8),%xmm0
movsd  %xmm0,(%r9,%r14,8)
mov    0x1a8(%rsp),%rax
divsd  (%rax,%r14,8),%xmm0
movapd %xmm0,%xmm1
mulsd  0x500(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  0x4fc(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1870 <lm_qrfac+0x750>
mov    0x140(%rsp),%rax
lea    (%r10,%rax,8),%rsi
add    $0x8,%rsi
mov    0x50(%rsp),%rdi
xor    %eax,%eax
call   1030 <lm_enorm@plt>
mov    0x8(%rsp),%rdx
xorpd  %xmm7,%xmm7
movapd 0x4a5(%rip),%xmm6
mov    0x10(%rsp),%rdi
mov    0x30(%rsp),%rsi
mov    0x40(%rsp),%r11
mov    0x20(%rsp),%r10
mov    0x28(%rsp),%r9
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%r9,%r14,8)
mov    0x1a8(%rsp),%rax
movsd  %xmm0,(%rax,%r14,8)
jmp    1870 <lm_qrfac+0x750>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x28(%rsp),%r9
movq   $0x0,(%r9,%r15,8)
add    $0x1,%r15
mov    %r15,%rcx
mov    0x20(%rsp),%r10
mov    %rbx,%r11
mov    0x30(%rsp),%rsi
mov    0x10(%rsp),%rdi
jmp    12fb <lm_qrfac+0x1db>
xor    %edx,%edx
test   $0x1,%cl
jne    16ed <lm_qrfac+0x5cd>
jmp    1705 <lm_qrfac+0x5e5>
xor    %esi,%esi
testb  $0x1,0xc8(%rsp)
01
jne    1528 <lm_qrfac+0x408>
jmp    1563 <lm_qrfac+0x443>
add    $0x168,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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