#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ dgeqrf_(int *, int *, double *, int *, double *, double *,
                           int *, int *);
int /*<<< orphan*/ dorgqr_(int *, int *, int *, double *, int *, double *,
                           double *, int *, int *);
int /*<<< orphan*/ dtrtrs_(char *, char *, char *, int *, int *, double *,
                           int *, double *, int *, int *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ free(double *);
scalar_t__ malloc(int);
int /*<<< orphan*/ stderr;
int dAx_eq_b_QR(double *A, double *B, double *x, int m) {
  static double *buf = NULL;
  static int buf_sz = 0;
  static int nb = 0;
  double *a, *tau, *r, *work;
  int a_sz, tau_sz, r_sz, tot_sz;
  register int i, j;
  int info, worksz, nrhs = 1;
  register double sum;
  if (!A) {
    if (buf)
      free(buf);
    buf = NULL;
    buf_sz = 0;
    return 1;
  }
  a_sz = m * m;
  tau_sz = m;
  r_sz = m * m;
  if (!nb) {
    double tmp;
    worksz = -1;
    dgeqrf_((int *)&m, (int *)&m, NULL, (int *)&m, NULL, (double *)&tmp,
            (int *)&worksz, (int *)&info);
    nb = ((int)tmp) / m;
  }
  worksz = nb * m;
  tot_sz = a_sz + tau_sz + r_sz + worksz;
  if (tot_sz > buf_sz) {
    if (buf)
      free(buf);
    buf_sz = tot_sz;
    buf = (double *)malloc(buf_sz * sizeof(double));
    if (!buf) {
      fprintf(stderr, "memory allocation in "
                      "dAx_eq_b_QR"
                      "() failed!\n");
      exit(1);
    }
  }
  a = buf;
  tau = a + a_sz;
  r = tau + tau_sz;
  work = r + r_sz;
  for (i = 0; i < m; i++)
    for (j = 0; j < m; j++)
      a[i + j * m] = A[i * m + j];
  dgeqrf_((int *)&m, (int *)&m, a, (int *)&m, tau, work, (int *)&worksz,
          (int *)&info);
  if (info != 0) {
    if (info < 0) {
      fprintf(stderr,
              "LAPACK error: illegal value for argument %d of "
              "dgeqrf_"
              " in "
              "dAx_eq_b_QR"
              "()\n",
              -info);
      exit(1);
    } else {
      fprintf(stderr,
              "Unknown LAPACK error %d for "
              "dgeqrf_"
              " in "
              "dAx_eq_b_QR"
              "()\n",
              info);
      return 0;
    }
  }
  for (i = 0; i < r_sz; i++)
    r[i] = a[i];
  dorgqr_((int *)&m, (int *)&m, (int *)&m, a, (int *)&m, tau, work,
          (int *)&worksz, (int *)&info);
  if (info != 0) {
    if (info < 0) {
      fprintf(stderr,
              "LAPACK error: illegal value for argument %d of "
              "dorgqr_"
              " in "
              "dAx_eq_b_QR"
              "()\n",
              -info);
      exit(1);
    } else {
      fprintf(stderr,
              "Unknown LAPACK error (%d) in "
              "dAx_eq_b_QR"
              "()\n",
              info);
      return 0;
    }
  }
  for (i = 0; i < m; i++) {
    for (j = 0, sum = 0.0; j < m; j++)
      sum += a[i * m + j] * B[j];
    x[i] = sum;
  }
  dtrtrs_("U", "N", "N", (int *)&m, (int *)&nrhs, r, (int *)&m, x, (int *)&m,
          &info);
  if (info != 0) {
    if (info < 0) {
      fprintf(stderr,
              "LAPACK error: illegal value for argument %d of "
              "dtrtrs_"
              " in "
              "dAx_eq_b_QR"
              "()\n",
              -info);
      exit(1);
    } else {
      fprintf(stderr,
              "LAPACK error: the %d-th diagonal element of A is zero (singular "
              "matrix) in "
              "dAx_eq_b_QR"
              "()\n",
              info);
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<dAx_eq_b_QR>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
movl   $0x1,-0x6c(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    11d7 <dAx_eq_b_QR+0x67>
cmpq   $0x0,0x2ebc(%rip)
je     11b6 <dAx_eq_b_QR+0x46>
mov    0x2eaf(%rip),%rdi
call   1030 <free@plt>
movq   $0x0,0x2e9f(%rip)
movl   $0x0,0x2e9d(%rip)
movl   $0x1,-0x4(%rbp)
jmp    1627 <dAx_eq_b_QR+0x4b7>
mov    -0x24(%rbp),%eax
imul   -0x24(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x24(%rbp),%eax
imul   -0x24(%rbp),%eax
mov    %eax,-0x54(%rbp)
cmpl   $0x0,0x2e74(%rip)
jne    1240 <dAx_eq_b_QR+0xd0>
movl   $0xffffffff,-0x68(%rbp)
lea    -0x24(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%r8d
lea    -0x80(%rbp),%r9
lea    -0x68(%rbp),%r10
lea    -0x64(%rbp),%rax
mov    %rcx,%rdi
mov    %rcx,%rsi
mov    %r8,%rdx
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1040 <dgeqrf_@plt>
cvttsd2si -0x80(%rbp),%eax
cltd
idivl  -0x24(%rbp)
mov    %eax,0x2e2c(%rip)
mov    0x2e26(%rip),%eax
imul   -0x24(%rbp),%eax
mov    %eax,-0x68(%rbp)
mov    -0x4c(%rbp),%eax
add    -0x50(%rbp),%eax
add    -0x54(%rbp),%eax
add    -0x68(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0x58(%rbp),%eax
cmp    0x2e03(%rip),%eax
jle    12db <dAx_eq_b_QR+0x16b>
cmpq   $0x0,0x2ded(%rip)
je     1285 <dAx_eq_b_QR+0x115>
mov    0x2de0(%rip),%rdi
call   1030 <free@plt>
mov    -0x58(%rbp),%eax
mov    %eax,0x2dda(%rip)
movslq 0x2dd3(%rip),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,0x2db9(%rip)
cmpq   $0x0,0x2db1(%rip)
jne    12d6 <dAx_eq_b_QR+0x166>
mov    0x2d24(%rip),%rax
mov    (%rax),%edi
lea    0xd3b(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
jmp    12db <dAx_eq_b_QR+0x16b>
mov    0x2d7e(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x4c(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
movslq -0x50(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
movslq -0x54(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1394 <dAx_eq_b_QR+0x224>
movl   $0x0,-0x60(%rbp)
mov    -0x60(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1381 <dAx_eq_b_QR+0x211>
mov    -0x10(%rbp),%rax
mov    -0x5c(%rbp),%ecx
imul   -0x24(%rbp),%ecx
add    -0x60(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
mov    -0x5c(%rbp),%ecx
mov    -0x60(%rbp),%edx
imul   -0x24(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    1339 <dAx_eq_b_QR+0x1c9>
jmp    1386 <dAx_eq_b_QR+0x216>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1326 <dAx_eq_b_QR+0x1b6>
mov    -0x30(%rbp),%rdx
mov    -0x38(%rbp),%r8
mov    -0x48(%rbp),%r9
lea    -0x24(%rbp),%rcx
lea    -0x68(%rbp),%r10
lea    -0x64(%rbp),%rax
mov    %rcx,%rdi
mov    %rcx,%rsi
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1040 <dgeqrf_@plt>
cmpl   $0x0,-0x64(%rbp)
je     1420 <dAx_eq_b_QR+0x2b0>
cmpl   $0x0,-0x64(%rbp)
jge    13fa <dAx_eq_b_QR+0x28a>
mov    0x2c05(%rip),%rax
mov    (%rax),%edi
xor    %edx,%edx
sub    -0x64(%rbp),%edx
lea    0xc43(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
mov    0x2bdf(%rip),%rax
mov    (%rax),%edi
mov    -0x64(%rbp),%edx
lea    0xc68(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1627 <dAx_eq_b_QR+0x4b7>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x54(%rbp),%eax
jge    145b <dAx_eq_b_QR+0x2eb>
mov    -0x30(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1427 <dAx_eq_b_QR+0x2b7>
mov    -0x30(%rbp),%rcx
mov    -0x38(%rbp),%r9
mov    -0x48(%rbp),%r11
lea    -0x24(%rbp),%r8
lea    -0x68(%rbp),%r10
lea    -0x64(%rbp),%rax
mov    %r8,%rdi
mov    %r8,%rsi
mov    %r8,%rdx
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1090 <dorgqr_@plt>
cmpl   $0x0,-0x64(%rbp)
je     14ef <dAx_eq_b_QR+0x37f>
cmpl   $0x0,-0x64(%rbp)
jge    14c9 <dAx_eq_b_QR+0x359>
mov    0x2b36(%rip),%rax
mov    (%rax),%edi
xor    %edx,%edx
sub    -0x64(%rbp),%edx
lea    0xbf3(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
mov    0x2b10(%rip),%rax
mov    (%rax),%edi
mov    -0x64(%rbp),%edx
lea    0xc18(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1627 <dAx_eq_b_QR+0x4b7>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1580 <dAx_eq_b_QR+0x410>
movl   $0x0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x60(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1560 <dAx_eq_b_QR+0x3f0>
mov    -0x30(%rbp),%rax
mov    -0x5c(%rbp),%ecx
imul   -0x24(%rbp),%ecx
add    -0x60(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    1511 <dAx_eq_b_QR+0x3a1>
movsd  -0x78(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    14f6 <dAx_eq_b_QR+0x386>
mov    -0x40(%rbp),%r9
mov    -0x20(%rbp),%r11
lea    0xb91(%rip),%rdi
lea    0xb8c(%rip),%rdx
lea    -0x24(%rbp),%r10
lea    -0x6c(%rbp),%r8
lea    -0x64(%rbp),%rax
mov    %rdx,%rsi
mov    %r10,%rcx
mov    %r10,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1070 <dtrtrs_@plt>
cmpl   $0x0,-0x64(%rbp)
je     1620 <dAx_eq_b_QR+0x4b0>
cmpl   $0x0,-0x64(%rbp)
jge    15fa <dAx_eq_b_QR+0x48a>
mov    0x2a05(%rip),%rax
mov    (%rax),%edi
xor    %edx,%edx
sub    -0x64(%rbp),%edx
lea    0xb3b(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
mov    0x29df(%rip),%rax
mov    (%rax),%edi
mov    -0x64(%rbp),%edx
lea    0xb60(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1627 <dAx_eq_b_QR+0x4b7>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dAx_eq_b_QR>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %ecx,0xc(%rsp)
movl   $0x1,0x24(%rsp)
test   %rdi,%rdi
je     1378 <dAx_eq_b_QR+0x208>
mov    %ecx,%r12d
mov    %rsi,%r14
mov    %rdi,%r13
imul   %ecx,%ecx
mov    0x2ec7(%rip),%eax
mov    %r12d,%r8d
test   %eax,%eax
mov    %rdx,0x30(%rsp)
jne    11fe <dAx_eq_b_QR+0x8e>
movl   $0xffffffff,0x14(%rsp)
ff
lea    0x10(%rsp),%rax
lea    0x14(%rsp),%rbp
mov    %rcx,%rbx
lea    0xc(%rsp),%rcx
lea    0x50(%rsp),%r9
mov    %rcx,%rdi
mov    %rcx,%rsi
xor    %edx,%edx
xor    %r8d,%r8d
push   %rax
push   %rbp
call   1040 <dgeqrf_@plt>
mov    %rbx,%rcx
add    $0x10,%rsp
cvttsd2si 0x50(%rsp),%eax
mov    0xc(%rsp),%r8d
cltd
idiv   %r8d
mov    %eax,0x2e6e(%rip)
imul   %r8d,%eax
mov    %eax,0x14(%rsp)
lea    (%r12,%rcx,2),%ebp
add    %eax,%ebp
mov    0x2e4d(%rip),%r15
cmp    0x2e4f(%rip),%ebp
jle    1256 <dAx_eq_b_QR+0xe6>
mov    %rcx,%rbx
test   %r15,%r15
je     122b <dAx_eq_b_QR+0xbb>
mov    %r15,%rdi
call   1030 <free@plt>
mov    %ebp,0x2e37(%rip)
shl    $0x3,%ebp
mov    %ebp,%edi
call   1060 <malloc@plt>
mov    %rax,0x2e1e(%rip)
test   %rax,%rax
je     1723 <dAx_eq_b_QR+0x5b3>
mov    %rax,%r15
mov    0xc(%rsp),%r8d
mov    %rbx,%rcx
mov    %rcx,0x38(%rsp)
mov    %ecx,%ecx
lea    (%r15,%rcx,8),%rax
movslq %r12d,%rdx
mov    %rax,%r12
mov    %rdx,0x18(%rsp)
lea    (%rax,%rdx,8),%rax
mov    %rax,0x48(%rsp)
mov    %rcx,0x40(%rsp)
lea    (%rax,%rcx,8),%rax
mov    %rax,0x28(%rsp)
test   %r8d,%r8d
jle    1326 <dAx_eq_b_QR+0x1b6>
mov    %r8d,%r9d
mov    %r9d,%edx
and    $0xfffffffe,%edx
lea    0x8(%r13),%rsi
lea    0x0(,%r9,8),%rdi
mov    %r9,%rax
shl    $0x4,%rax
xor    %r11d,%r11d
mov    %r15,%r10
jmp    12c0 <dAx_eq_b_QR+0x150>
add    $0x1,%r11
add    %rdi,%rsi
add    $0x8,%r10
cmp    %r9,%r11
je     1326 <dAx_eq_b_QR+0x1b6>
cmp    $0x1,%r8d
jne    12d0 <dAx_eq_b_QR+0x160>
xor    %ebp,%ebp
jmp    1300 <dAx_eq_b_QR+0x190>
nopw   0x0(%rax,%rax,1)
mov    %r10,%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
movsd  -0x8(%rsi,%rbp,8),%xmm0
movsd  %xmm0,(%rbx)
movsd  (%rsi,%rbp,8),%xmm0
movsd  %xmm0,(%rbx,%rdi,1)
add    $0x2,%rbp
add    %rax,%rbx
cmp    %rbp,%rdx
jne    12e0 <dAx_eq_b_QR+0x170>
test   $0x1,%r9b
je     12b0 <dAx_eq_b_QR+0x140>
mov    %r11,%rcx
imul   %r9,%rcx
add    %rbp,%rcx
movsd  0x0(%r13,%rcx,8),%xmm0
imul   %r9,%rbp
add    %r11,%rbp
movsd  %xmm0,(%r15,%rbp,8)
jmp    12b0 <dAx_eq_b_QR+0x140>
lea    0x10(%rsp),%r13
lea    0x14(%rsp),%rbx
lea    0xc(%rsp),%rcx
mov    %rcx,%rdi
mov    %rcx,%rsi
mov    %r15,%rdx
mov    %r12,%r8
mov    0x28(%rsp),%rbp
mov    %rbp,%r9
push   %r13
push   %rbx
call   1040 <dgeqrf_@plt>
add    $0x10,%rsp
mov    0x10(%rsp),%edx
test   %edx,%edx
je     13a8 <dAx_eq_b_QR+0x238>
mov    0x2c7c(%rip),%rax
mov    (%rax),%edi
js     1718 <dAx_eq_b_QR+0x5a8>
lea    0xd02(%rip),%rsi
jmp    16f7 <dAx_eq_b_QR+0x587>
mov    0x2ce1(%rip),%rdi
test   %rdi,%rdi
je     1389 <dAx_eq_b_QR+0x219>
call   1030 <free@plt>
movq   $0x0,0x2ccc(%rip)
movl   $0x0,0x2cca(%rip)
mov    $0x1,%ebx
jmp    1700 <dAx_eq_b_QR+0x590>
mov    %r12,%r9
mov    %rbx,%r10
mov    0x38(%rsp),%rax
test   %eax,%eax
mov    0x48(%rsp),%r12
mov    0x40(%rsp),%rbx
mov    %r13,%r11
je     157d <dAx_eq_b_QR+0x40d>
cmp    $0x4,%eax
jb     13ec <dAx_eq_b_QR+0x27c>
cmp    %r9,%r12
jae    1470 <dAx_eq_b_QR+0x300>
mov    0x18(%rsp),%rax
lea    (%rax,%rbx,2),%rax
lea    (%r15,%rax,8),%rax
cmp    %rax,%r15
jae    1470 <dAx_eq_b_QR+0x300>
xor    %eax,%eax
mov    %rax,%rcx
not    %rcx
add    %rbx,%rcx
mov    %rbx,%rdx
and    $0x3,%rdx
je     1416 <dAx_eq_b_QR+0x2a6>
movsd  (%r15,%rax,8),%xmm0
movsd  %xmm0,(%r12,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    1400 <dAx_eq_b_QR+0x290>
cmp    $0x3,%rcx
jb     157d <dAx_eq_b_QR+0x40d>
mov    0x18(%rsp),%rcx
add    %rbx,%rcx
lea    (%r15,%rcx,8),%rcx
add    $0x18,%rcx
movsd  (%r15,%rax,8),%xmm0
movsd  %xmm0,-0x18(%rcx,%rax,8)
movsd  0x8(%r15,%rax,8),%xmm0
movsd  %xmm0,-0x10(%rcx,%rax,8)
movsd  0x10(%r15,%rax,8),%xmm0
movsd  %xmm0,-0x8(%rcx,%rax,8)
movsd  0x18(%r15,%rax,8),%xmm0
movsd  %xmm0,(%rcx,%rax,8)
add    $0x4,%rax
cmp    %rax,%rbx
jne    1430 <dAx_eq_b_QR+0x2c0>
jmp    157d <dAx_eq_b_QR+0x40d>
mov    %ebx,%eax
and    $0xfffffffc,%eax
lea    -0x4(%rax),%rsi
mov    %rsi,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
mov    %edx,%ecx
and    $0x3,%ecx
cmp    $0xc,%rsi
jae    1496 <dAx_eq_b_QR+0x326>
xor    %esi,%esi
jmp    151d <dAx_eq_b_QR+0x3ad>
and    $0xfffffffffffffffc,%rdx
lea    0x70(%r15),%rdi
lea    0x0(,%rbx,8),%rsi
mov    0x18(%rsp),%rbp
lea    (%rsi,%rbp,8),%rsi
lea    (%r15,%rsi,1),%rbp
add    $0x70,%rbp
xor    %esi,%esi
nopl   0x0(%rax)
movups -0x70(%rdi,%rsi,8),%xmm0
movups -0x60(%rdi,%rsi,8),%xmm1
movups %xmm0,-0x70(%rbp,%rsi,8)
movups %xmm1,-0x60(%rbp,%rsi,8)
movups -0x50(%rdi,%rsi,8),%xmm0
movups -0x40(%rdi,%rsi,8),%xmm1
movups %xmm0,-0x50(%rbp,%rsi,8)
movups %xmm1,-0x40(%rbp,%rsi,8)
movups -0x30(%rdi,%rsi,8),%xmm0
movups -0x20(%rdi,%rsi,8),%xmm1
movups %xmm0,-0x30(%rbp,%rsi,8)
movups %xmm1,-0x20(%rbp,%rsi,8)
movupd -0x10(%rdi,%rsi,8),%xmm0
movupd (%rdi,%rsi,8),%xmm1
movupd %xmm0,-0x10(%rbp,%rsi,8)
movupd %xmm1,0x0(%rbp,%rsi,8)
add    $0x10,%rsi
add    $0xfffffffffffffffc,%rdx
jne    14c0 <dAx_eq_b_QR+0x350>
test   %rcx,%rcx
je     156f <dAx_eq_b_QR+0x3ff>
mov    0x18(%rsp),%rdx
add    %rsi,%rdx
add    %rbx,%rdx
lea    (%r15,%rdx,8),%rdx
add    $0x10,%rdx
lea    (%r15,%rsi,8),%rsi
add    $0x10,%rsi
shl    $0x5,%rcx
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movupd -0x10(%rsi,%rdi,1),%xmm0
movupd (%rsi,%rdi,1),%xmm1
movupd %xmm0,-0x10(%rdx,%rdi,1)
movupd %xmm1,(%rdx,%rdi,1)
add    $0x20,%rdi
cmp    %rdi,%rcx
jne    1550 <dAx_eq_b_QR+0x3e0>
cmp    %rbx,%rax
mov    0x28(%rsp),%rbp
jne    13ee <dAx_eq_b_QR+0x27e>
sub    $0x8,%rsp
lea    0x14(%rsp),%r13
mov    %r13,%rdi
mov    %r13,%rsi
mov    %r13,%rdx
mov    %r15,%rcx
mov    %r13,%r8
push   %r11
push   %r10
push   %rbp
call   1090 <dorgqr_@plt>
add    $0x20,%rsp
mov    0x10(%rsp),%edx
test   %edx,%edx
je     15c6 <dAx_eq_b_QR+0x456>
mov    0x2a2e(%rip),%rax
mov    (%rax),%edi
js     1744 <dAx_eq_b_QR+0x5d4>
lea    0xb33(%rip),%rsi
jmp    16f7 <dAx_eq_b_QR+0x587>
mov    0xc(%rsp),%r9d
test   %r9d,%r9d
mov    0x30(%rsp),%r11
jle    16ac <dAx_eq_b_QR+0x53c>
lea    -0x1(%r9),%r8
mov    %r9d,%edx
and    $0x3,%edx
mov    %r9d,%esi
and    $0xfffffffc,%esi
lea    0x18(%r15),%rdi
lea    0x0(,%r9,8),%r10
xor    %ecx,%ecx
jmp    1619 <dAx_eq_b_QR+0x4a9>
nopl   0x0(%rax)
movsd  %xmm0,(%r11,%rcx,8)
add    $0x1,%rcx
add    %r10,%rdi
add    %r10,%r15
cmp    %r9,%rcx
je     16ac <dAx_eq_b_QR+0x53c>
xorpd  %xmm0,%xmm0
xor    %ebx,%ebx
cmp    $0x3,%r8
jb     167b <dAx_eq_b_QR+0x50b>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  -0x18(%rdi,%rbx,8),%xmm1
movsd  -0x10(%rdi,%rbx,8),%xmm2
mulsd  (%r14,%rbx,8),%xmm1
mulsd  0x8(%r14,%rbx,8),%xmm2
addsd  %xmm0,%xmm1
movsd  -0x8(%rdi,%rbx,8),%xmm3
mulsd  0x10(%r14,%rbx,8),%xmm3
addsd  %xmm1,%xmm2
movsd  (%rdi,%rbx,8),%xmm0
mulsd  0x18(%r14,%rbx,8),%xmm0
addsd  %xmm2,%xmm3
addsd  %xmm3,%xmm0
add    $0x4,%rbx
cmp    %rbx,%rsi
jne    1630 <dAx_eq_b_QR+0x4c0>
test   %rdx,%rdx
je     1600 <dAx_eq_b_QR+0x490>
lea    (%r14,%rbx,8),%rax
lea    (%r15,%rbx,8),%rbx
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
movsd  (%rbx,%rbp,8),%xmm1
mulsd  (%rax,%rbp,8),%xmm1
addsd  %xmm1,%xmm0
add    $0x1,%rbp
cmp    %rbp,%rdx
jne    1690 <dAx_eq_b_QR+0x520>
jmp    1600 <dAx_eq_b_QR+0x490>
lea    0xa6d(%rip),%rdi
lea    0xa68(%rip),%rdx
lea    0x24(%rsp),%r8
mov    %rdx,%rsi
mov    %r13,%rcx
mov    %r12,%r9
lea    0x10(%rsp),%rax
push   %rax
push   %r13
push   %r11
push   %r13
call   1070 <dtrtrs_@plt>
add    $0x20,%rsp
mov    0x10(%rsp),%edx
test   %edx,%edx
je     1711 <dAx_eq_b_QR+0x5a1>
mov    0x28f4(%rip),%rax
mov    (%rax),%edi
js     174f <dAx_eq_b_QR+0x5df>
lea    0xa76(%rip),%rsi
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    %ebx,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x1,%ebx
jmp    1700 <dAx_eq_b_QR+0x590>
neg    %edx
lea    0x90b(%rip),%rsi
jmp    1758 <dAx_eq_b_QR+0x5e8>
mov    0x28b6(%rip),%rax
mov    (%rax),%edi
lea    0x8cd(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
neg    %edx
lea    0x95e(%rip),%rsi
jmp    1758 <dAx_eq_b_QR+0x5e8>
neg    %edx
lea    0x9cc(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@dAx_eq_b_QR.buf = internal global double* null
@dAx_eq_b_QR.buf_sz = internal global i32 0
@dAx_eq_b_QR.nb = internal global i32 0
@stderr = global i32 0
@.str = [44 x i8] c"memory allocation in dAx_eq_b_QR() failed!\0A\00"
@.str.1 = [73 x i8] c"LAPACK error: illegal value for argument %d of dgeqrf_ in dAx_eq_b_QR()\0A\00"
@.str.2 = [54 x i8] c"Unknown LAPACK error %d for dgeqrf_ in dAx_eq_b_QR()\0A\00"
@.str.3 = [73 x i8] c"LAPACK error: illegal value for argument %d of dorgqr_ in dAx_eq_b_QR()\0A\00"
@.str.4 = [44 x i8] c"Unknown LAPACK error (%d) in dAx_eq_b_QR()\0A\00"
@.str.5 = [2 x i8] c"U\00"
@.str.6 = [2 x i8] c"N\00"
@.str.7 = [73 x i8] c"LAPACK error: illegal value for argument %d of dtrtrs_ in dAx_eq_b_QR()\0A\00"
@.str.8 = [90 x i8] c"LAPACK error: the %d-th diagonal element of A is zero (singular matrix) in dAx_eq_b_QR()\0A\00"
define i32 @dAx_eq_b_QR(double* %0, double* %1, double* %2, i32 %3) {
%5 = alloca i32
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
%9 = alloca i32
%10 = alloca double*
%11 = alloca double*
%12 = alloca double*
%13 = alloca double*
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca double
%24 = alloca double
store double* %0, double** %6
store double* %1, double** %7
store double* %2, double** %8
store i32 %3, i32* %9
store i32 1, i32* %22
%25 = load double*, double** %6
%26 = icmp ne double* %25, null
br i1 %26, label %34, label %27
27: ; preds = %4
%28 = load double*, double** @dAx_eq_b_QR.buf
%29 = icmp ne double* %28, null
br i1 %29, label %30, label %33
30: ; preds = %27
%31 = load double*, double** @dAx_eq_b_QR.buf
%32 = call i32 @free(double* %31)
br label %33
33: ; preds = %30, %27
store double* null, double** @dAx_eq_b_QR.buf
store i32 0, i32* @dAx_eq_b_QR.buf_sz
store i32 1, i32* %5
br label %250
34: ; preds = %4
%35 = load i32, i32* %9
%36 = load i32, i32* %9
%37 = mul nsw i32 %35, %36
store i32 %37, i32* %14
%38 = load i32, i32* %9
store i32 %38, i32* %15
%39 = load i32, i32* %9
%40 = load i32, i32* %9
%41 = mul nsw i32 %39, %40
store i32 %41, i32* %16
%42 = load i32, i32* @dAx_eq_b_QR.nb
%43 = icmp ne i32 %42, 0
br i1 %43, label %50, label %44
44: ; preds = %34
store i32 -1, i32* %21
%45 = call i32 @dgeqrf_(i32* %9, i32* %9, double* null, i32* %9, double* null, double* %24, i32* %21, i32* %20)
%46 = load double, double* %24
%47 = fptosi double %46 to i32
%48 = load i32, i32* %9
%49 = sdiv i32 %47, %48
store i32 %49, i32* @dAx_eq_b_QR.nb
br label %50
50: ; preds = %44, %34
%51 = load i32, i32* @dAx_eq_b_QR.nb
%52 = load i32, i32* %9
%53 = mul nsw i32 %51, %52
store i32 %53, i32* %21
%54 = load i32, i32* %14
%55 = load i32, i32* %15
%56 = add nsw i32 %54, %55
%57 = load i32, i32* %16
%58 = add nsw i32 %56, %57
%59 = load i32, i32* %21
%60 = add nsw i32 %58, %59
store i32 %60, i32* %17
%61 = load i32, i32* %17
%62 = load i32, i32* @dAx_eq_b_QR.buf_sz
%63 = icmp sgt i32 %61, %62
br i1 %63, label %64, label %85
64: ; preds = %50
%65 = load double*, double** @dAx_eq_b_QR.buf
%66 = icmp ne double* %65, null
br i1 %66, label %67, label %70
67: ; preds = %64
%68 = load double*, double** @dAx_eq_b_QR.buf
%69 = call i32 @free(double* %68)
br label %70
70: ; preds = %67, %64
%71 = load i32, i32* %17
store i32 %71, i32* @dAx_eq_b_QR.buf_sz
%72 = load i32, i32* @dAx_eq_b_QR.buf_sz
%73 = sext i32 %72 to i64
%74 = mul i64 %73, 8
%75 = trunc i64 %74 to i32
%76 = call i64 @malloc(i32 %75)
%77 = inttoptr i64 %76 to double*
store double* %77, double** @dAx_eq_b_QR.buf
%78 = load double*, double** @dAx_eq_b_QR.buf
%79 = icmp ne double* %78, null
br i1 %79, label %84, label %80
80: ; preds = %70
%81 = load i32, i32* @stderr
%82 = call i32 (i32, i8*, ...) @fprintf(i32 %81, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%83 = call i32 @exit(i32 1)
unreachable
84: ; preds = %70
br label %85
85: ; preds = %84, %50
%86 = load double*, double** @dAx_eq_b_QR.buf
store double* %86, double** %10
%87 = load double*, double** %10
%88 = load i32, i32* %14
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds double, double* %87, i64 %89
store double* %90, double** %11
%91 = load double*, double** %11
%92 = load i32, i32* %15
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds double, double* %91, i64 %93
store double* %94, double** %12
%95 = load double*, double** %12
%96 = load i32, i32* %16
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds double, double* %95, i64 %97
store double* %98, double** %13
store i32 0, i32* %18
br label %99
99: ; preds = %130, %85
%100 = load i32, i32* %18
%101 = load i32, i32* %9
%102 = icmp slt i32 %100, %101
br i1 %102, label %103, label %133
103: ; preds = %99
store i32 0, i32* %19
br label %104
104: ; preds = %126, %103
%105 = load i32, i32* %19
%106 = load i32, i32* %9
%107 = icmp slt i32 %105, %106
br i1 %107, label %108, label %129
108: ; preds = %104
%109 = load double*, double** %6
%110 = load i32, i32* %18
%111 = load i32, i32* %9
%112 = mul nsw i32 %110, %111
%113 = load i32, i32* %19
%114 = add nsw i32 %112, %113
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds double, double* %109, i64 %115
%117 = load double, double* %116
%118 = load double*, double** %10
%119 = load i32, i32* %18
%120 = load i32, i32* %19
%121 = load i32, i32* %9
%122 = mul nsw i32 %120, %121
%123 = add nsw i32 %119, %122
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds double, double* %118, i64 %124
store double %117, double* %125
br label %126
126: ; preds = %108
%127 = load i32, i32* %19
%128 = add nsw i32 %127, 1
store i32 %128, i32* %19
br label %104
129: ; preds = %104
br label %130
130: ; preds = %129
%131 = load i32, i32* %18
%132 = add nsw i32 %131, 1
store i32 %132, i32* %18
br label %99
133: ; preds = %99
%134 = load double*, double** %10
%135 = load double*, double** %11
%136 = load double*, double** %13
%137 = call i32 @dgeqrf_(i32* %9, i32* %9, double* %134, i32* %9, double* %135, double* %136, i32* %21, i32* %20)
%138 = load i32, i32* %20
%139 = icmp ne i32 %138, 0
br i1 %139, label %140, label %153
140: ; preds = %133
%141 = load i32, i32* %20
%142 = icmp slt i32 %141, 0
br i1 %142, label %143, label %149
143: ; preds = %140
%144 = load i32, i32* @stderr
%145 = load i32, i32* %20
%146 = sub nsw i32 0, %145
%147 = call i32 (i32, i8*, ...) @fprintf(i32 %144, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.1, i64 0, i64 0), i32 %146)
%148 = call i32 @exit(i32 1)
unreachable
149: ; preds = %140
%150 = load i32, i32* @stderr
%151 = load i32, i32* %20
%152 = call i32 (i32, i8*, ...) @fprintf(i32 %150, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.2, i64 0, i64 0), i32 %151)
store i32 0, i32* %5
br label %250
153: ; preds = %133
store i32 0, i32* %18
br label %154
154: ; preds = %168, %153
%155 = load i32, i32* %18
%156 = load i32, i32* %16
%157 = icmp slt i32 %155, %156
br i1 %157, label %158, label %171
158: ; preds = %154
%159 = load double*, double** %10
%160 = load i32, i32* %18
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds double, double* %159, i64 %161
%163 = load double, double* %162
%164 = load double*, double** %12
%165 = load i32, i32* %18
%166 = sext i32 %165 to i64
%167 = getelementptr inbounds double, double* %164, i64 %166
store double %163, double* %167
br label %168
168: ; preds = %158
%169 = load i32, i32* %18
%170 = add nsw i32 %169, 1
store i32 %170, i32* %18
br label %154
171: ; preds = %154
%172 = load double*, double** %10
%173 = load double*, double** %11
%174 = load double*, double** %13
%175 = call i32 @dorgqr_(i32* %9, i32* %9, i32* %9, double* %172, i32* %9, double* %173, double* %174, i32* %21, i32* %20)
%176 = load i32, i32* %20
%177 = icmp ne i32 %176, 0
br i1 %177, label %178, label %191
178: ; preds = %171
%179 = load i32, i32* %20
%180 = icmp slt i32 %179, 0
br i1 %180, label %181, label %187
181: ; preds = %178
%182 = load i32, i32* @stderr
%183 = load i32, i32* %20
%184 = sub nsw i32 0, %183
%185 = call i32 (i32, i8*, ...) @fprintf(i32 %182, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.3, i64 0, i64 0), i32 %184)
%186 = call i32 @exit(i32 1)
unreachable
187: ; preds = %178
%188 = load i32, i32* @stderr
%189 = load i32, i32* %20
%190 = call i32 (i32, i8*, ...) @fprintf(i32 %188, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.4, i64 0, i64 0), i32 %189)
store i32 0, i32* %5
br label %250
191: ; preds = %171
store i32 0, i32* %18
br label %192
192: ; preds = %227, %191
%193 = load i32, i32* %18
%194 = load i32, i32* %9
%195 = icmp slt i32 %193, %194
br i1 %195, label %196, label %230
196: ; preds = %192
store i32 0, i32* %19
store double 0.000000e+00, double* %23
br label %197
197: ; preds = %218, %196
%198 = load i32, i32* %19
%199 = load i32, i32* %9
%200 = icmp slt i32 %198, %199
br i1 %200, label %201, label %221
201: ; preds = %197
%202 = load double*, double** %10
%203 = load i32, i32* %18
%204 = load i32, i32* %9
%205 = mul nsw i32 %203, %204
%206 = load i32, i32* %19
%207 = add nsw i32 %205, %206
%208 = sext i32 %207 to i64
%209 = getelementptr inbounds double, double* %202, i64 %208
%210 = load double, double* %209
%211 = load double*, double** %7
%212 = load i32, i32* %19
%213 = sext i32 %212 to i64
%214 = getelementptr inbounds double, double* %211, i64 %213
%215 = load double, double* %214
%216 = load double, double* %23
%217 = call double @llvm.fmuladd.f64(double %210, double %215, double %216)
store double %217, double* %23
br label %218
218: ; preds = %201
%219 = load i32, i32* %19
%220 = add nsw i32 %219, 1
store i32 %220, i32* %19
br label %197
221: ; preds = %197
%222 = load double, double* %23
%223 = load double*, double** %8
%224 = load i32, i32* %18
%225 = sext i32 %224 to i64
%226 = getelementptr inbounds double, double* %223, i64 %225
store double %222, double* %226
br label %227
227: ; preds = %221
%228 = load i32, i32* %18
%229 = add nsw i32 %228, 1
store i32 %229, i32* %18
br label %192
230: ; preds = %192
%231 = load double*, double** %12
%232 = load double*, double** %8
%233 = call i32 @dtrtrs_(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i32* %9, i32* %22, double* %231, i32* %9, double* %232, i32* %9, i32* %20)
%234 = load i32, i32* %20
%235 = icmp ne i32 %234, 0
br i1 %235, label %236, label %249
236: ; preds = %230
%237 = load i32, i32* %20
%238 = icmp slt i32 %237, 0
br i1 %238, label %239, label %245
239: ; preds = %236
%240 = load i32, i32* @stderr
%241 = load i32, i32* %20
%242 = sub nsw i32 0, %241
%243 = call i32 (i32, i8*, ...) @fprintf(i32 %240, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.7, i64 0, i64 0), i32 %242)
%244 = call i32 @exit(i32 1)
unreachable
245: ; preds = %236
%246 = load i32, i32* @stderr
%247 = load i32, i32* %20
%248 = call i32 (i32, i8*, ...) @fprintf(i32 %246, i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.8, i64 0, i64 0), i32 %247)
store i32 0, i32* %5
br label %250
249: ; preds = %230
store i32 1, i32* %5
br label %250
250: ; preds = %249, %245, %187, %149, %33
%251 = load i32, i32* %5
ret i32 %251
}

LLVM IR (-O2):
@dAx_eq_b_QR.buf = internal unnamed_addr global double* null
@dAx_eq_b_QR.buf_sz = internal unnamed_addr global i32 0
@dAx_eq_b_QR.nb = internal unnamed_addr global i32 0
@stderr = global i32 0
@.str = [44 x i8] c"memory allocation in dAx_eq_b_QR() failed!\0A\00"
@.str.1 = [73 x i8] c"LAPACK error: illegal value for argument %d of dgeqrf_ in dAx_eq_b_QR()\0A\00"
@.str.2 = [54 x i8] c"Unknown LAPACK error %d for dgeqrf_ in dAx_eq_b_QR()\0A\00"
@.str.3 = [73 x i8] c"LAPACK error: illegal value for argument %d of dorgqr_ in dAx_eq_b_QR()\0A\00"
@.str.4 = [44 x i8] c"Unknown LAPACK error (%d) in dAx_eq_b_QR()\0A\00"
@.str.5 = [2 x i8] c"U\00"
@.str.6 = [2 x i8] c"N\00"
@.str.7 = [73 x i8] c"LAPACK error: illegal value for argument %d of dtrtrs_ in dAx_eq_b_QR()\0A\00"
@.str.8 = [90 x i8] c"LAPACK error: the %d-th diagonal element of A is zero (singular matrix) in dAx_eq_b_QR()\0A\00"
define i32 @dAx_eq_b_QR(double* %0, double* nocapture %1, double* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca double
store i32 %3, i32* %5
%10 = bitcast i32* %6 to i8*
%11 = bitcast i32* %7 to i8*
%12 = bitcast i32* %8 to i8*
store i32 1, i32* %8
%13 = icmp eq double* %0, null
br i1 %13, label %14, label %20
14: ; preds = %4
%15 = load double*, double** @dAx_eq_b_QR.buf
%16 = icmp eq double* %15, null
br i1 %16, label %19, label %17
17: ; preds = %14
%18 = tail call i32 @free(double* %15)
br label %19
19: ; preds = %17, %14
store double* null, double** @dAx_eq_b_QR.buf
store i32 0, i32* @dAx_eq_b_QR.buf_sz
br label %342
20: ; preds = %4
%21 = mul i32 %3, %3
%22 = load i32, i32* @dAx_eq_b_QR.nb
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %31
24: ; preds = %20
%25 = bitcast double* %9 to i8*
store i32 -1, i32* %7
%26 = call i32 @dgeqrf_(i32* %5, i32* %5, double* null, i32* %5, double* null, double* %9, i32* %7, i32* %6)
%27 = load double, double* %9
%28 = fptosi double %27 to i32
%29 = load i32, i32* %5
%30 = sdiv i32 %28, %29
store i32 %30, i32* @dAx_eq_b_QR.nb
br label %31
31: ; preds = %24, %20
%32 = phi i32 [ %29, %24 ], [ %3, %20 ]
%33 = phi i32 [ %30, %24 ], [ %22, %20 ]
%34 = mul nsw i32 %32, %33
store i32 %34, i32* %7
%35 = shl nuw i32 %21, 1
%36 = add i32 %35, %3
%37 = add nsw i32 %36, %34
%38 = load i32, i32* @dAx_eq_b_QR.buf_sz
%39 = icmp sgt i32 %37, %38
%40 = load double*, double** @dAx_eq_b_QR.buf
br i1 %39, label %41, label %56
41: ; preds = %31
%42 = icmp eq double* %40, null
br i1 %42, label %45, label %43
43: ; preds = %41
%44 = call i32 @free(double* %40)
br label %45
45: ; preds = %43, %41
store i32 %37, i32* @dAx_eq_b_QR.buf_sz
%46 = shl i32 %37, 3
%47 = call i64 @malloc(i32 %46)
%48 = inttoptr i64 %47 to double*
store double* %48, double** @dAx_eq_b_QR.buf
%49 = icmp eq i64 %47, 0
br i1 %49, label %52, label %50
50: ; preds = %45
%51 = load i32, i32* %5
br label %56
52: ; preds = %45
%53 = load i32, i32* @stderr
%54 = call i32 (i32, i8*, ...) @fprintf(i32 %53, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%55 = call i32 @exit(i32 1)
unreachable
56: ; preds = %31, %50
%57 = phi i32 [ %51, %50 ], [ %32, %31 ]
%58 = phi double* [ %48, %50 ], [ %40, %31 ]
%59 = zext i32 %21 to i64
%60 = getelementptr double, double* %58, i64 %59
%61 = sext i32 %3 to i64
%62 = getelementptr double, double* %60, i64 %61
%63 = getelementptr inbounds double, double* %62, i64 %59
%64 = icmp sgt i32 %57, 0
br i1 %64, label %65, label %106
65: ; preds = %56
%66 = zext i32 %57 to i64
%67 = zext i32 %57 to i64
%68 = and i64 %67, 1
%69 = icmp eq i32 %57, 1
%70 = and i64 %67, 4294967294
%71 = icmp eq i64 %68, 0
br label %72
72: ; preds = %103, %65
%73 = phi i64 [ 0, %65 ], [ %104, %103 ]
%74 = mul nsw i64 %73, %66
br i1 %69, label %94, label %75
75: ; preds = %72, %75
%76 = phi i64 [ %91, %75 ], [ 0, %72 ]
%77 = phi i64 [ %92, %75 ], [ 0, %72 ]
%78 = add nuw nsw i64 %76, %74
%79 = getelementptr inbounds double, double* %0, i64 %78
%80 = load double, double* %79
%81 = mul nsw i64 %76, %66
%82 = add nuw nsw i64 %81, %73
%83 = getelementptr inbounds double, double* %58, i64 %82
store double %80, double* %83
%84 = or i64 %76, 1
%85 = add nuw nsw i64 %84, %74
%86 = getelementptr inbounds double, double* %0, i64 %85
%87 = load double, double* %86
%88 = mul nsw i64 %84, %66
%89 = add nuw nsw i64 %88, %73
%90 = getelementptr inbounds double, double* %58, i64 %89
store double %87, double* %90
%91 = add nuw nsw i64 %76, 2
%92 = add i64 %77, 2
%93 = icmp eq i64 %92, %70
br i1 %93, label %94, label %75
94: ; preds = %75, %72
%95 = phi i64 [ 0, %72 ], [ %91, %75 ]
br i1 %71, label %103, label %96
96: ; preds = %94
%97 = add nuw nsw i64 %95, %74
%98 = getelementptr inbounds double, double* %0, i64 %97
%99 = load double, double* %98
%100 = mul nsw i64 %95, %66
%101 = add nuw nsw i64 %100, %73
%102 = getelementptr inbounds double, double* %58, i64 %101
store double %99, double* %102
br label %103
103: ; preds = %94, %96
%104 = add nuw nsw i64 %73, 1
%105 = icmp eq i64 %104, %67
br i1 %105, label %106, label %72
106: ; preds = %103, %56
%107 = call i32 @dgeqrf_(i32* %5, i32* %5, double* %58, i32* %5, double* %60, double* %63, i32* %7, i32* %6)
%108 = load i32, i32* %6
%109 = icmp eq i32 %108, 0
br i1 %109, label %110, label %218
110: ; preds = %106
%111 = icmp eq i32 %21, 0
br i1 %111, label %246, label %112
112: ; preds = %110
%113 = icmp ult i32 %21, 4
br i1 %113, label %200, label %114
114: ; preds = %112
%115 = shl nuw nsw i64 %59, 1
%116 = add nsw i64 %115, %61
%117 = getelementptr double, double* %58, i64 %116
%118 = icmp ult double* %62, %60
%119 = icmp ult double* %58, %117
%120 = and i1 %118, %119
br i1 %120, label %200, label %121
121: ; preds = %114
%122 = and i64 %59, 4294967292
%123 = add nsw i64 %122, -4
%124 = lshr exact i64 %123, 2
%125 = add nuw nsw i64 %124, 1
%126 = and i64 %125, 3
%127 = icmp ult i64 %123, 12
br i1 %127, label %179, label %128
128: ; preds = %121
%129 = and i64 %125, 9223372036854775804
br label %130
130: ; preds = %130, %128
%131 = phi i64 [ 0, %128 ], [ %176, %130 ]
%132 = phi i64 [ 0, %128 ], [ %177, %130 ]
%133 = getelementptr inbounds double, double* %58, i64 %131
%134 = bitcast double* %133 to <2 x double>*
%135 = load <2 x double>, <2 x double>* %134
%136 = getelementptr inbounds double, double* %133, i64 2
%137 = bitcast double* %136 to <2 x double>*
%138 = load <2 x double>, <2 x double>* %137
%139 = getelementptr inbounds double, double* %62, i64 %131
%140 = bitcast double* %139 to <2 x double>*
store <2 x double> %135, <2 x double>* %140
%141 = getelementptr inbounds double, double* %139, i64 2
%142 = bitcast double* %141 to <2 x double>*
store <2 x double> %138, <2 x double>* %142
%143 = or i64 %131, 4
%144 = getelementptr inbounds double, double* %58, i64 %143
%145 = bitcast double* %144 to <2 x double>*
%146 = load <2 x double>, <2 x double>* %145
%147 = getelementptr inbounds double, double* %144, i64 2
%148 = bitcast double* %147 to <2 x double>*
%149 = load <2 x double>, <2 x double>* %148
%150 = getelementptr inbounds double, double* %62, i64 %143
%151 = bitcast double* %150 to <2 x double>*
store <2 x double> %146, <2 x double>* %151
%152 = getelementptr inbounds double, double* %150, i64 2
%153 = bitcast double* %152 to <2 x double>*
store <2 x double> %149, <2 x double>* %153
%154 = or i64 %131, 8
%155 = getelementptr inbounds double, double* %58, 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 = getelementptr inbounds double, double* %62, i64 %154
%162 = bitcast double* %161 to <2 x double>*
store <2 x double> %157, <2 x double>* %162
%163 = getelementptr inbounds double, double* %161, i64 2
%164 = bitcast double* %163 to <2 x double>*
store <2 x double> %160, <2 x double>* %164
%165 = or i64 %131, 12
%166 = getelementptr inbounds double, double* %58, i64 %165
%167 = bitcast double* %166 to <2 x double>*
%168 = load <2 x double>, <2 x double>* %167
%169 = getelementptr inbounds double, double* %166, i64 2
%170 = bitcast double* %169 to <2 x double>*
%171 = load <2 x double>, <2 x double>* %170
%172 = getelementptr inbounds double, double* %62, i64 %165
%173 = bitcast double* %172 to <2 x double>*
store <2 x double> %168, <2 x double>* %173
%174 = getelementptr inbounds double, double* %172, i64 2
%175 = bitcast double* %174 to <2 x double>*
store <2 x double> %171, <2 x double>* %175
%176 = add nuw i64 %131, 16
%177 = add nuw i64 %132, 4
%178 = icmp eq i64 %177, %129
br i1 %178, label %179, label %130
179: ; preds = %130, %121
%180 = phi i64 [ 0, %121 ], [ %176, %130 ]
%181 = icmp eq i64 %126, 0
br i1 %181, label %198, label %182
182: ; preds = %179, %182
%183 = phi i64 [ %195, %182 ], [ %180, %179 ]
%184 = phi i64 [ %196, %182 ], [ 0, %179 ]
%185 = getelementptr inbounds double, double* %58, i64 %183
%186 = bitcast double* %185 to <2 x double>*
%187 = load <2 x double>, <2 x double>* %186
%188 = getelementptr inbounds double, double* %185, i64 2
%189 = bitcast double* %188 to <2 x double>*
%190 = load <2 x double>, <2 x double>* %189
%191 = getelementptr inbounds double, double* %62, i64 %183
%192 = bitcast double* %191 to <2 x double>*
store <2 x double> %187, <2 x double>* %192
%193 = getelementptr inbounds double, double* %191, i64 2
%194 = bitcast double* %193 to <2 x double>*
store <2 x double> %190, <2 x double>* %194
%195 = add nuw i64 %183, 4
%196 = add i64 %184, 1
%197 = icmp eq i64 %196, %126
br i1 %197, label %198, label %182
198: ; preds = %182, %179
%199 = icmp eq i64 %122, %59
br i1 %199, label %246, label %200
200: ; preds = %114, %112, %198
%201 = phi i64 [ 0, %114 ], [ 0, %112 ], [ %122, %198 ]
%202 = xor i64 %201, -1
%203 = add nsw i64 %202, %59
%204 = and i64 %59, 3
%205 = icmp eq i64 %204, 0
br i1 %205, label %215, label %206
206: ; preds = %200, %206
%207 = phi i64 [ %212, %206 ], [ %201, %200 ]
%208 = phi i64 [ %213, %206 ], [ 0, %200 ]
%209 = getelementptr inbounds double, double* %58, i64 %207
%210 = load double, double* %209
%211 = getelementptr inbounds double, double* %62, i64 %207
store double %210, double* %211
%212 = add nuw nsw i64 %207, 1
%213 = add i64 %208, 1
%214 = icmp eq i64 %213, %204
br i1 %214, label %215, label %206
215: ; preds = %206, %200
%216 = phi i64 [ %201, %200 ], [ %212, %206 ]
%217 = icmp ult i64 %203, 3
br i1 %217, label %246, label %227
218: ; preds = %106
%219 = icmp slt i32 %108, 0
%220 = load i32, i32* @stderr
br i1 %219, label %221, label %225
221: ; preds = %218
%222 = sub nsw i32 0, %108
%223 = call i32 (i32, i8*, ...) @fprintf(i32 %220, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.1, i64 0, i64 0), i32 %222)
%224 = call i32 @exit(i32 1)
unreachable
225: ; preds = %218
%226 = call i32 (i32, i8*, ...) @fprintf(i32 %220, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.2, i64 0, i64 0), i32 %108)
br label %342
227: ; preds = %215, %227
%228 = phi i64 [ %244, %227 ], [ %216, %215 ]
%229 = getelementptr inbounds double, double* %58, i64 %228
%230 = load double, double* %229
%231 = getelementptr inbounds double, double* %62, i64 %228
store double %230, double* %231
%232 = add nuw nsw i64 %228, 1
%233 = getelementptr inbounds double, double* %58, i64 %232
%234 = load double, double* %233
%235 = getelementptr inbounds double, double* %62, i64 %232
store double %234, double* %235
%236 = add nuw nsw i64 %228, 2
%237 = getelementptr inbounds double, double* %58, i64 %236
%238 = load double, double* %237
%239 = getelementptr inbounds double, double* %62, i64 %236
store double %238, double* %239
%240 = add nuw nsw i64 %228, 3
%241 = getelementptr inbounds double, double* %58, i64 %240
%242 = load double, double* %241
%243 = getelementptr inbounds double, double* %62, i64 %240
store double %242, double* %243
%244 = add nuw nsw i64 %228, 4
%245 = icmp eq i64 %244, %59
br i1 %245, label %246, label %227
246: ; preds = %215, %227, %198, %110
%247 = call i32 @dorgqr_(i32* %5, i32* %5, i32* %5, double* %58, i32* %5, double* %60, double* %63, i32* %7, i32* %6)
%248 = load i32, i32* %6
%249 = icmp eq i32 %248, 0
br i1 %249, label %250, label %261
250: ; preds = %246
%251 = load i32, i32* %5
%252 = icmp sgt i32 %251, 0
br i1 %252, label %253, label %329
253: ; preds = %250
%254 = zext i32 %251 to i64
%255 = zext i32 %251 to i64
%256 = add nsw i64 %255, -1
%257 = and i64 %255, 3
%258 = icmp ult i64 %256, 3
%259 = and i64 %255, 4294967292
%260 = icmp eq i64 %257, 0
br label %270
261: ; preds = %246
%262 = icmp slt i32 %248, 0
%263 = load i32, i32* @stderr
br i1 %262, label %264, label %268
264: ; preds = %261
%265 = sub nsw i32 0, %248
%266 = call i32 (i32, i8*, ...) @fprintf(i32 %263, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.3, i64 0, i64 0), i32 %265)
%267 = call i32 @exit(i32 1)
unreachable
268: ; preds = %261
%269 = call i32 (i32, i8*, ...) @fprintf(i32 %263, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.4, i64 0, i64 0), i32 %248)
br label %342
270: ; preds = %324, %253
%271 = phi i64 [ 0, %253 ], [ %327, %324 ]
%272 = mul nsw i64 %271, %254
br i1 %258, label %307, label %273
273: ; preds = %270, %273
%274 = phi i64 [ %304, %273 ], [ 0, %270 ]
%275 = phi double [ %303, %273 ], [ 0.000000e+00, %270 ]
%276 = phi i64 [ %305, %273 ], [ 0, %270 ]
%277 = add nuw nsw i64 %274, %272
%278 = getelementptr inbounds double, double* %58, i64 %277
%279 = load double, double* %278
%280 = getelementptr inbounds double, double* %1, i64 %274
%281 = load double, double* %280
%282 = call double @llvm.fmuladd.f64(double %279, double %281, double %275)
%283 = or i64 %274, 1
%284 = add nuw nsw i64 %283, %272
%285 = getelementptr inbounds double, double* %58, i64 %284
%286 = load double, double* %285
%287 = getelementptr inbounds double, double* %1, i64 %283
%288 = load double, double* %287
%289 = call double @llvm.fmuladd.f64(double %286, double %288, double %282)
%290 = or i64 %274, 2
%291 = add nuw nsw i64 %290, %272
%292 = getelementptr inbounds double, double* %58, i64 %291
%293 = load double, double* %292
%294 = getelementptr inbounds double, double* %1, i64 %290
%295 = load double, double* %294
%296 = call double @llvm.fmuladd.f64(double %293, double %295, double %289)
%297 = or i64 %274, 3
%298 = add nuw nsw i64 %297, %272
%299 = getelementptr inbounds double, double* %58, i64 %298
%300 = load double, double* %299
%301 = getelementptr inbounds double, double* %1, i64 %297
%302 = load double, double* %301
%303 = call double @llvm.fmuladd.f64(double %300, double %302, double %296)
%304 = add nuw nsw i64 %274, 4
%305 = add i64 %276, 4
%306 = icmp eq i64 %305, %259
br i1 %306, label %307, label %273
307: ; preds = %273, %270
%308 = phi double [ undef, %270 ], [ %303, %273 ]
%309 = phi i64 [ 0, %270 ], [ %304, %273 ]
%310 = phi double [ 0.000000e+00, %270 ], [ %303, %273 ]
br i1 %260, label %324, label %311
311: ; preds = %307, %311
%312 = phi i64 [ %321, %311 ], [ %309, %307 ]
%313 = phi double [ %320, %311 ], [ %310, %307 ]
%314 = phi i64 [ %322, %311 ], [ 0, %307 ]
%315 = add nuw nsw i64 %312, %272
%316 = getelementptr inbounds double, double* %58, i64 %315
%317 = load double, double* %316
%318 = getelementptr inbounds double, double* %1, i64 %312
%319 = load double, double* %318
%320 = call double @llvm.fmuladd.f64(double %317, double %319, double %313)
%321 = add nuw nsw i64 %312, 1
%322 = add i64 %314, 1
%323 = icmp eq i64 %322, %257
br i1 %323, label %324, label %311
324: ; preds = %311, %307
%325 = phi double [ %308, %307 ], [ %320, %311 ]
%326 = getelementptr inbounds double, double* %2, i64 %271
store double %325, double* %326
%327 = add nuw nsw i64 %271, 1
%328 = icmp eq i64 %327, %255
br i1 %328, label %329, label %270
329: ; preds = %324, %250
%330 = call i32 @dtrtrs_(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i32* %5, i32* %8, double* %62, i32* %5, double* %2, i32* %5, i32* %6)
%331 = load i32, i32* %6
%332 = icmp eq i32 %331, 0
br i1 %332, label %342, label %333
333: ; preds = %329
%334 = icmp slt i32 %331, 0
%335 = load i32, i32* @stderr
br i1 %334, label %336, label %340
336: ; preds = %333
%337 = sub nsw i32 0, %331
%338 = call i32 (i32, i8*, ...) @fprintf(i32 %335, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.7, i64 0, i64 0), i32 %337)
%339 = call i32 @exit(i32 1)
unreachable
340: ; preds = %333
%341 = call i32 (i32, i8*, ...) @fprintf(i32 %335, i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.8, i64 0, i64 0), i32 %331)
br label %342
342: ; preds = %329, %340, %268, %225, %19
%343 = phi i32 [ 0, %225 ], [ 0, %268 ], [ 0, %340 ], [ 1, %19 ], [ 1, %329 ]
ret i32 %343
}