#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*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ free(float *);
scalar_t__ malloc(int);
int /*<<< orphan*/ sgeqrf_(int *, int *, float *, int *, float *, float *,
                           int *, int *);
int /*<<< orphan*/ sorgqr_(int *, int *, int *, float *, int *, float *,
                           float *, int *, int *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strtrs_(char *, char *, char *, int *, int *, float *, int *,
                           float *, int *, int *);
int sAx_eq_b_QR(float *A, float *B, float *x, int m) {
  static float *buf = NULL;
  static int buf_sz = 0;
  static int nb = 0;
  float *a, *tau, *r, *work;
  int a_sz, tau_sz, r_sz, tot_sz;
  register int i, j;
  int info, worksz, nrhs = 1;
  register float 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) {
    float tmp;
    worksz = -1;
    sgeqrf_((int *)&m, (int *)&m, NULL, (int *)&m, NULL, (float *)&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 = (float *)malloc(buf_sz * sizeof(float));
    if (!buf) {
      fprintf(stderr, "memory allocation in "
                      "sAx_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];
  sgeqrf_((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 "
              "sgeqrf_"
              " in "
              "sAx_eq_b_QR"
              "()\n",
              -info);
      exit(1);
    } else {
      fprintf(stderr,
              "Unknown LAPACK error %d for "
              "sgeqrf_"
              " in "
              "sAx_eq_b_QR"
              "()\n",
              info);
      return 0;
    }
  }
  for (i = 0; i < r_sz; i++)
    r[i] = a[i];
  sorgqr_((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 "
              "sorgqr_"
              " in "
              "sAx_eq_b_QR"
              "()\n",
              -info);
      exit(1);
    } else {
      fprintf(stderr,
              "Unknown LAPACK error (%d) in "
              "sAx_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;
  }
  strtrs_("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 "
              "strtrs_"
              " in "
              "sAx_eq_b_QR"
              "()\n",
              -info);
      exit(1);
    } else {
      fprintf(stderr,
              "LAPACK error: the %d-th diagonal element of A is zero (singular "
              "matrix) in "
              "sAx_eq_b_QR"
              "()\n",
              info);
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<sAx_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 <sAx_eq_b_QR+0x67>
cmpq   $0x0,0x2ebc(%rip)
je     11b6 <sAx_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 <sAx_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 <sAx_eq_b_QR+0xd0>
movl   $0xffffffff,-0x68(%rbp)
lea    -0x24(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%r8d
lea    -0x74(%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   1090 <sgeqrf_@plt>
cvttss2si -0x74(%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 <sAx_eq_b_QR+0x16b>
cmpq   $0x0,0x2ded(%rip)
je     1285 <sAx_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    $0x2,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,0x2db9(%rip)
cmpq   $0x0,0x2db1(%rip)
jne    12d6 <sAx_eq_b_QR+0x166>
mov    0x2d24(%rip),%rax
mov    (%rax),%edi
lea    0xd3b(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
jmp    12db <sAx_eq_b_QR+0x16b>
mov    0x2d7e(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x4c(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
movslq -0x50(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
movslq -0x54(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1394 <sAx_eq_b_QR+0x224>
movl   $0x0,-0x60(%rbp)
mov    -0x60(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1381 <sAx_eq_b_QR+0x211>
mov    -0x10(%rbp),%rax
mov    -0x5c(%rbp),%ecx
imul   -0x24(%rbp),%ecx
add    -0x60(%rbp),%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x30(%rbp),%rax
mov    -0x5c(%rbp),%ecx
mov    -0x60(%rbp),%edx
imul   -0x24(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    1339 <sAx_eq_b_QR+0x1c9>
jmp    1386 <sAx_eq_b_QR+0x216>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1326 <sAx_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   1090 <sgeqrf_@plt>
cmpl   $0x0,-0x64(%rbp)
je     1420 <sAx_eq_b_QR+0x2b0>
cmpl   $0x0,-0x64(%rbp)
jge    13fa <sAx_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   1060 <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   1060 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1627 <sAx_eq_b_QR+0x4b7>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x54(%rbp),%eax
jge    145b <sAx_eq_b_QR+0x2eb>
mov    -0x30(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1427 <sAx_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   1040 <sorgqr_@plt>
cmpl   $0x0,-0x64(%rbp)
je     14ef <sAx_eq_b_QR+0x37f>
cmpl   $0x0,-0x64(%rbp)
jge    14c9 <sAx_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   1060 <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   1060 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1627 <sAx_eq_b_QR+0x4b7>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1580 <sAx_eq_b_QR+0x410>
movl   $0x0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x70(%rbp)
mov    -0x60(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1560 <sAx_eq_b_QR+0x3f0>
mov    -0x30(%rbp),%rax
mov    -0x5c(%rbp),%ecx
imul   -0x24(%rbp),%ecx
add    -0x60(%rbp),%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x60(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm2
movss  -0x70(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x70(%rbp)
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    1511 <sAx_eq_b_QR+0x3a1>
movss  -0x70(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    14f6 <sAx_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   1050 <strtrs_@plt>
cmpl   $0x0,-0x64(%rbp)
je     1620 <sAx_eq_b_QR+0x4b0>
cmpl   $0x0,-0x64(%rbp)
jge    15fa <sAx_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   1060 <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   1060 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1627 <sAx_eq_b_QR+0x4b7>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sAx_eq_b_QR>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %ecx,0x4(%rsp)
movl   $0x1,0x1c(%rsp)
test   %rdi,%rdi
je     1388 <sAx_eq_b_QR+0x218>
mov    %ecx,%r12d
mov    %rsi,%r14
mov    %rdi,%r13
imul   %ecx,%ecx
mov    0x2ec7(%rip),%eax
mov    %r12d,%r8d
test   %eax,%eax
mov    %rdx,0x28(%rsp)
jne    11fe <sAx_eq_b_QR+0x8e>
movl   $0xffffffff,0xc(%rsp)
ff
lea    0x8(%rsp),%rax
lea    0xc(%rsp),%rbp
mov    %rcx,%rbx
lea    0x4(%rsp),%rcx
lea    0x18(%rsp),%r9
mov    %rcx,%rdi
mov    %rcx,%rsi
xor    %edx,%edx
xor    %r8d,%r8d
push   %rax
push   %rbp
call   1090 <sgeqrf_@plt>
mov    %rbx,%rcx
add    $0x10,%rsp
cvttss2si 0x18(%rsp),%eax
mov    0x4(%rsp),%r8d
cltd
idiv   %r8d
mov    %eax,0x2e6e(%rip)
imul   %r8d,%eax
mov    %eax,0xc(%rsp)
lea    (%r12,%rcx,2),%ebp
add    %eax,%ebp
mov    0x2e4d(%rip),%r15
cmp    0x2e4f(%rip),%ebp
jle    1256 <sAx_eq_b_QR+0xe6>
mov    %rcx,%rbx
test   %r15,%r15
je     122b <sAx_eq_b_QR+0xbb>
mov    %r15,%rdi
call   1030 <free@plt>
mov    %ebp,0x2e37(%rip)
shl    $0x2,%ebp
mov    %ebp,%edi
call   1070 <malloc@plt>
mov    %rax,0x2e1e(%rip)
test   %rax,%rax
je     1723 <sAx_eq_b_QR+0x5b3>
mov    %rax,%r15
mov    0x4(%rsp),%r8d
mov    %rbx,%rcx
mov    %rcx,0x30(%rsp)
mov    %ecx,%ecx
lea    (%r15,%rcx,4),%rax
movslq %r12d,%rdx
mov    %rax,%r12
mov    %rdx,0x10(%rsp)
lea    (%rax,%rdx,4),%rax
mov    %rax,0x40(%rsp)
mov    %rcx,0x38(%rsp)
lea    (%rax,%rcx,4),%rax
mov    %rax,0x20(%rsp)
test   %r8d,%r8d
jle    1336 <sAx_eq_b_QR+0x1c6>
mov    %r8d,%r9d
mov    %r9d,%edx
and    $0xfffffffe,%edx
lea    0x4(%r13),%rsi
lea    0x0(,%r9,4),%rdi
lea    0x0(,%r9,8),%rbp
xor    %r11d,%r11d
mov    %r15,%r10
jmp    12d0 <sAx_eq_b_QR+0x160>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%r11
add    %rdi,%rsi
add    $0x4,%r10
cmp    %r9,%r11
je     1336 <sAx_eq_b_QR+0x1c6>
cmp    $0x1,%r8d
jne    12e0 <sAx_eq_b_QR+0x170>
xor    %eax,%eax
jmp    1310 <sAx_eq_b_QR+0x1a0>
nopw   0x0(%rax,%rax,1)
mov    %r10,%rbx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nop
movss  -0x4(%rsi,%rax,4),%xmm0
movss  %xmm0,(%rbx)
movss  (%rsi,%rax,4),%xmm0
movss  %xmm0,(%rbx,%rdi,1)
add    $0x2,%rax
add    %rbp,%rbx
cmp    %rax,%rdx
jne    12f0 <sAx_eq_b_QR+0x180>
test   $0x1,%r9b
je     12c0 <sAx_eq_b_QR+0x150>
mov    %r11,%rcx
imul   %r9,%rcx
add    %rax,%rcx
movss  0x0(%r13,%rcx,4),%xmm0
imul   %r9,%rax
add    %r11,%rax
movss  %xmm0,(%r15,%rax,4)
jmp    12c0 <sAx_eq_b_QR+0x150>
lea    0x8(%rsp),%r13
lea    0xc(%rsp),%rbx
lea    0x4(%rsp),%rcx
mov    %rcx,%rdi
mov    %rcx,%rsi
mov    %r15,%rdx
mov    %r12,%r8
mov    0x20(%rsp),%rbp
mov    %rbp,%r9
push   %r13
push   %rbx
call   1090 <sgeqrf_@plt>
add    $0x10,%rsp
mov    0x8(%rsp),%edx
test   %edx,%edx
je     13b8 <sAx_eq_b_QR+0x248>
mov    0x2c6c(%rip),%rax
mov    (%rax),%edi
js     1718 <sAx_eq_b_QR+0x5a8>
lea    0xcf2(%rip),%rsi
jmp    16f7 <sAx_eq_b_QR+0x587>
mov    0x2cd1(%rip),%rdi
test   %rdi,%rdi
je     1399 <sAx_eq_b_QR+0x229>
call   1030 <free@plt>
movq   $0x0,0x2cbc(%rip)
movl   $0x0,0x2cba(%rip)
mov    $0x1,%ebx
jmp    1700 <sAx_eq_b_QR+0x590>
mov    %r12,%r9
mov    %rbx,%r10
mov    0x30(%rsp),%rax
test   %eax,%eax
mov    0x40(%rsp),%r12
mov    0x38(%rsp),%rbx
mov    %r13,%r11
je     1579 <sAx_eq_b_QR+0x409>
cmp    $0x8,%eax
jb     13fc <sAx_eq_b_QR+0x28c>
cmp    %r9,%r12
jae    1480 <sAx_eq_b_QR+0x310>
mov    0x10(%rsp),%rax
lea    (%rax,%rbx,2),%rax
lea    (%r15,%rax,4),%rax
cmp    %rax,%r15
jae    1480 <sAx_eq_b_QR+0x310>
xor    %eax,%eax
mov    %rax,%rcx
not    %rcx
add    %rbx,%rcx
mov    %rbx,%rdx
and    $0x3,%rdx
je     1426 <sAx_eq_b_QR+0x2b6>
movss  (%r15,%rax,4),%xmm0
movss  %xmm0,(%r12,%rax,4)
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    1410 <sAx_eq_b_QR+0x2a0>
cmp    $0x3,%rcx
jb     1579 <sAx_eq_b_QR+0x409>
mov    0x10(%rsp),%rcx
add    %rbx,%rcx
lea    (%r15,%rcx,4),%rcx
add    $0xc,%rcx
movss  (%r15,%rax,4),%xmm0
movss  %xmm0,-0xc(%rcx,%rax,4)
movss  0x4(%r15,%rax,4),%xmm0
movss  %xmm0,-0x8(%rcx,%rax,4)
movss  0x8(%r15,%rax,4),%xmm0
movss  %xmm0,-0x4(%rcx,%rax,4)
movss  0xc(%r15,%rax,4),%xmm0
movss  %xmm0,(%rcx,%rax,4)
add    $0x4,%rax
cmp    %rax,%rbx
jne    1440 <sAx_eq_b_QR+0x2d0>
jmp    1579 <sAx_eq_b_QR+0x409>
mov    %ebx,%eax
and    $0xfffffff8,%eax
lea    -0x8(%rax),%rsi
mov    %rsi,%rdx
shr    $0x3,%rdx
add    $0x1,%rdx
mov    %edx,%ecx
and    $0x3,%ecx
cmp    $0x18,%rsi
jae    14a6 <sAx_eq_b_QR+0x336>
xor    %esi,%esi
jmp    1529 <sAx_eq_b_QR+0x3b9>
and    $0xfffffffffffffffc,%rdx
lea    0x70(%r15),%rdi
lea    0x0(,%rbx,4),%rsi
mov    0x10(%rsp),%rbp
lea    (%rsi,%rbp,4),%rsi
lea    (%r15,%rsi,1),%rbp
add    $0x70,%rbp
xor    %esi,%esi
nopl   0x0(%rax)
movups -0x70(%rdi,%rsi,4),%xmm0
movups -0x60(%rdi,%rsi,4),%xmm1
movups %xmm0,-0x70(%rbp,%rsi,4)
movups %xmm1,-0x60(%rbp,%rsi,4)
movups -0x50(%rdi,%rsi,4),%xmm0
movups -0x40(%rdi,%rsi,4),%xmm1
movups %xmm0,-0x50(%rbp,%rsi,4)
movups %xmm1,-0x40(%rbp,%rsi,4)
movups -0x30(%rdi,%rsi,4),%xmm0
movups -0x20(%rdi,%rsi,4),%xmm1
movups %xmm0,-0x30(%rbp,%rsi,4)
movups %xmm1,-0x20(%rbp,%rsi,4)
movups -0x10(%rdi,%rsi,4),%xmm0
movups (%rdi,%rsi,4),%xmm1
movups %xmm0,-0x10(%rbp,%rsi,4)
movups %xmm1,0x0(%rbp,%rsi,4)
add    $0x20,%rsi
add    $0xfffffffffffffffc,%rdx
jne    14d0 <sAx_eq_b_QR+0x360>
test   %rcx,%rcx
je     156b <sAx_eq_b_QR+0x3fb>
mov    0x10(%rsp),%rdx
add    %rsi,%rdx
add    %rbx,%rdx
lea    (%r15,%rdx,4),%rdx
add    $0x10,%rdx
lea    (%r15,%rsi,4),%rsi
add    $0x10,%rsi
shl    $0x5,%rcx
xor    %edi,%edi
nop
movups -0x10(%rsi,%rdi,1),%xmm0
movups (%rsi,%rdi,1),%xmm1
movups %xmm0,-0x10(%rdx,%rdi,1)
movups %xmm1,(%rdx,%rdi,1)
add    $0x20,%rdi
cmp    %rdi,%rcx
jne    1550 <sAx_eq_b_QR+0x3e0>
cmp    %rbx,%rax
mov    0x20(%rsp),%rbp
jne    13fe <sAx_eq_b_QR+0x28e>
sub    $0x8,%rsp
lea    0xc(%rsp),%r13
mov    %r13,%rdi
mov    %r13,%rsi
mov    %r13,%rdx
mov    %r15,%rcx
mov    %r13,%r8
push   %r11
push   %r10
push   %rbp
call   1040 <sorgqr_@plt>
add    $0x20,%rsp
mov    0x8(%rsp),%edx
test   %edx,%edx
je     15c2 <sAx_eq_b_QR+0x452>
mov    0x2a32(%rip),%rax
mov    (%rax),%edi
js     1744 <sAx_eq_b_QR+0x5d4>
lea    0xb37(%rip),%rsi
jmp    16f7 <sAx_eq_b_QR+0x587>
mov    0x4(%rsp),%r9d
test   %r9d,%r9d
mov    0x28(%rsp),%r11
jle    16ac <sAx_eq_b_QR+0x53c>
lea    -0x1(%r9),%r8
mov    %r9d,%edx
and    $0x3,%edx
mov    %r9d,%esi
and    $0xfffffffc,%esi
lea    0xc(%r15),%rdi
lea    0x0(,%r9,4),%r10
xor    %ecx,%ecx
jmp    1619 <sAx_eq_b_QR+0x4a9>
cs nopw 0x0(%rax,%rax,1)
nop
movss  %xmm0,(%r11,%rcx,4)
add    $0x1,%rcx
add    %r10,%rdi
add    %r10,%r15
cmp    %r9,%rcx
je     16ac <sAx_eq_b_QR+0x53c>
xorps  %xmm0,%xmm0
xor    %ebx,%ebx
cmp    $0x3,%r8
jb     167b <sAx_eq_b_QR+0x50b>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movss  -0xc(%rdi,%rbx,4),%xmm1
movss  -0x8(%rdi,%rbx,4),%xmm2
mulss  (%r14,%rbx,4),%xmm1
mulss  0x4(%r14,%rbx,4),%xmm2
addss  %xmm0,%xmm1
movss  -0x4(%rdi,%rbx,4),%xmm3
mulss  0x8(%r14,%rbx,4),%xmm3
addss  %xmm1,%xmm2
movss  (%rdi,%rbx,4),%xmm0
mulss  0xc(%r14,%rbx,4),%xmm0
addss  %xmm2,%xmm3
addss  %xmm3,%xmm0
add    $0x4,%rbx
cmp    %rbx,%rsi
jne    1630 <sAx_eq_b_QR+0x4c0>
test   %rdx,%rdx
je     1600 <sAx_eq_b_QR+0x490>
lea    (%r14,%rbx,4),%rax
lea    (%r15,%rbx,4),%rbx
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
movss  (%rbx,%rbp,4),%xmm1
mulss  (%rax,%rbp,4),%xmm1
addss  %xmm1,%xmm0
add    $0x1,%rbp
cmp    %rbp,%rdx
jne    1690 <sAx_eq_b_QR+0x520>
jmp    1600 <sAx_eq_b_QR+0x490>
lea    0xa6d(%rip),%rdi
lea    0xa68(%rip),%rdx
lea    0x1c(%rsp),%r8
mov    %rdx,%rsi
mov    %r13,%rcx
mov    %r12,%r9
lea    0x8(%rsp),%rax
push   %rax
push   %r13
push   %r11
push   %r13
call   1050 <strtrs_@plt>
add    $0x20,%rsp
mov    0x8(%rsp),%edx
test   %edx,%edx
je     1711 <sAx_eq_b_QR+0x5a1>
mov    0x28f4(%rip),%rax
mov    (%rax),%edi
js     174f <sAx_eq_b_QR+0x5df>
lea    0xa76(%rip),%rsi
xor    %ebx,%ebx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    %ebx,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x1,%ebx
jmp    1700 <sAx_eq_b_QR+0x590>
neg    %edx
lea    0x90b(%rip),%rsi
jmp    1758 <sAx_eq_b_QR+0x5e8>
mov    0x28b6(%rip),%rax
mov    (%rax),%edi
lea    0x8cd(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
neg    %edx
lea    0x95e(%rip),%rsi
jmp    1758 <sAx_eq_b_QR+0x5e8>
neg    %edx
lea    0x9cc(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@sAx_eq_b_QR.buf = internal global float* null
@sAx_eq_b_QR.buf_sz = internal global i32 0
@sAx_eq_b_QR.nb = internal global i32 0
@stderr = global i32 0
@.str = [44 x i8] c"memory allocation in sAx_eq_b_QR() failed!\0A\00"
@.str.1 = [73 x i8] c"LAPACK error: illegal value for argument %d of sgeqrf_ in sAx_eq_b_QR()\0A\00"
@.str.2 = [54 x i8] c"Unknown LAPACK error %d for sgeqrf_ in sAx_eq_b_QR()\0A\00"
@.str.3 = [73 x i8] c"LAPACK error: illegal value for argument %d of sorgqr_ in sAx_eq_b_QR()\0A\00"
@.str.4 = [44 x i8] c"Unknown LAPACK error (%d) in sAx_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 strtrs_ in sAx_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 sAx_eq_b_QR()\0A\00"
define i32 @sAx_eq_b_QR(float* %0, float* %1, float* %2, i32 %3) {
%5 = alloca i32
%6 = alloca float*
%7 = alloca float*
%8 = alloca float*
%9 = alloca i32
%10 = alloca float*
%11 = alloca float*
%12 = alloca float*
%13 = alloca float*
%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 float
%24 = alloca float
store float* %0, float** %6
store float* %1, float** %7
store float* %2, float** %8
store i32 %3, i32* %9
store i32 1, i32* %22
%25 = load float*, float** %6
%26 = icmp ne float* %25, null
br i1 %26, label %34, label %27
27: ; preds = %4
%28 = load float*, float** @sAx_eq_b_QR.buf
%29 = icmp ne float* %28, null
br i1 %29, label %30, label %33
30: ; preds = %27
%31 = load float*, float** @sAx_eq_b_QR.buf
%32 = call i32 @free(float* %31)
br label %33
33: ; preds = %30, %27
store float* null, float** @sAx_eq_b_QR.buf
store i32 0, i32* @sAx_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* @sAx_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 @sgeqrf_(i32* %9, i32* %9, float* null, i32* %9, float* null, float* %24, i32* %21, i32* %20)
%46 = load float, float* %24
%47 = fptosi float %46 to i32
%48 = load i32, i32* %9
%49 = sdiv i32 %47, %48
store i32 %49, i32* @sAx_eq_b_QR.nb
br label %50
50: ; preds = %44, %34
%51 = load i32, i32* @sAx_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* @sAx_eq_b_QR.buf_sz
%63 = icmp sgt i32 %61, %62
br i1 %63, label %64, label %85
64: ; preds = %50
%65 = load float*, float** @sAx_eq_b_QR.buf
%66 = icmp ne float* %65, null
br i1 %66, label %67, label %70
67: ; preds = %64
%68 = load float*, float** @sAx_eq_b_QR.buf
%69 = call i32 @free(float* %68)
br label %70
70: ; preds = %67, %64
%71 = load i32, i32* %17
store i32 %71, i32* @sAx_eq_b_QR.buf_sz
%72 = load i32, i32* @sAx_eq_b_QR.buf_sz
%73 = sext i32 %72 to i64
%74 = mul i64 %73, 4
%75 = trunc i64 %74 to i32
%76 = call i64 @malloc(i32 %75)
%77 = inttoptr i64 %76 to float*
store float* %77, float** @sAx_eq_b_QR.buf
%78 = load float*, float** @sAx_eq_b_QR.buf
%79 = icmp ne float* %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 float*, float** @sAx_eq_b_QR.buf
store float* %86, float** %10
%87 = load float*, float** %10
%88 = load i32, i32* %14
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds float, float* %87, i64 %89
store float* %90, float** %11
%91 = load float*, float** %11
%92 = load i32, i32* %15
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds float, float* %91, i64 %93
store float* %94, float** %12
%95 = load float*, float** %12
%96 = load i32, i32* %16
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds float, float* %95, i64 %97
store float* %98, float** %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 float*, float** %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 float, float* %109, i64 %115
%117 = load float, float* %116
%118 = load float*, float** %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 float, float* %118, i64 %124
store float %117, float* %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 float*, float** %10
%135 = load float*, float** %11
%136 = load float*, float** %13
%137 = call i32 @sgeqrf_(i32* %9, i32* %9, float* %134, i32* %9, float* %135, float* %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 float*, float** %10
%160 = load i32, i32* %18
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds float, float* %159, i64 %161
%163 = load float, float* %162
%164 = load float*, float** %12
%165 = load i32, i32* %18
%166 = sext i32 %165 to i64
%167 = getelementptr inbounds float, float* %164, i64 %166
store float %163, float* %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 float*, float** %10
%173 = load float*, float** %11
%174 = load float*, float** %13
%175 = call i32 @sorgqr_(i32* %9, i32* %9, i32* %9, float* %172, i32* %9, float* %173, float* %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 float 0.000000e+00, float* %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 float*, float** %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 float, float* %202, i64 %208
%210 = load float, float* %209
%211 = load float*, float** %7
%212 = load i32, i32* %19
%213 = sext i32 %212 to i64
%214 = getelementptr inbounds float, float* %211, i64 %213
%215 = load float, float* %214
%216 = load float, float* %23
%217 = call float @llvm.fmuladd.f32(float %210, float %215, float %216)
store float %217, float* %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 float, float* %23
%223 = load float*, float** %8
%224 = load i32, i32* %18
%225 = sext i32 %224 to i64
%226 = getelementptr inbounds float, float* %223, i64 %225
store float %222, float* %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 float*, float** %12
%232 = load float*, float** %8
%233 = call i32 @strtrs_(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, float* %231, i32* %9, float* %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):
@sAx_eq_b_QR.buf = internal unnamed_addr global float* null
@sAx_eq_b_QR.buf_sz = internal unnamed_addr global i32 0
@sAx_eq_b_QR.nb = internal unnamed_addr global i32 0
@stderr = global i32 0
@.str = [44 x i8] c"memory allocation in sAx_eq_b_QR() failed!\0A\00"
@.str.1 = [73 x i8] c"LAPACK error: illegal value for argument %d of sgeqrf_ in sAx_eq_b_QR()\0A\00"
@.str.2 = [54 x i8] c"Unknown LAPACK error %d for sgeqrf_ in sAx_eq_b_QR()\0A\00"
@.str.3 = [73 x i8] c"LAPACK error: illegal value for argument %d of sorgqr_ in sAx_eq_b_QR()\0A\00"
@.str.4 = [44 x i8] c"Unknown LAPACK error (%d) in sAx_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 strtrs_ in sAx_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 sAx_eq_b_QR()\0A\00"
define i32 @sAx_eq_b_QR(float* %0, float* nocapture %1, float* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca float
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 float* %0, null
br i1 %13, label %14, label %20
14: ; preds = %4
%15 = load float*, float** @sAx_eq_b_QR.buf
%16 = icmp eq float* %15, null
br i1 %16, label %19, label %17
17: ; preds = %14
%18 = tail call i32 @free(float* %15)
br label %19
19: ; preds = %17, %14
store float* null, float** @sAx_eq_b_QR.buf
store i32 0, i32* @sAx_eq_b_QR.buf_sz
br label %342
20: ; preds = %4
%21 = mul i32 %3, %3
%22 = load i32, i32* @sAx_eq_b_QR.nb
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %31
24: ; preds = %20
%25 = bitcast float* %9 to i8*
store i32 -1, i32* %7
%26 = call i32 @sgeqrf_(i32* %5, i32* %5, float* null, i32* %5, float* null, float* %9, i32* %7, i32* %6)
%27 = load float, float* %9
%28 = fptosi float %27 to i32
%29 = load i32, i32* %5
%30 = sdiv i32 %28, %29
store i32 %30, i32* @sAx_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* @sAx_eq_b_QR.buf_sz
%39 = icmp sgt i32 %37, %38
%40 = load float*, float** @sAx_eq_b_QR.buf
br i1 %39, label %41, label %56
41: ; preds = %31
%42 = icmp eq float* %40, null
br i1 %42, label %45, label %43
43: ; preds = %41
%44 = call i32 @free(float* %40)
br label %45
45: ; preds = %43, %41
store i32 %37, i32* @sAx_eq_b_QR.buf_sz
%46 = shl i32 %37, 2
%47 = call i64 @malloc(i32 %46)
%48 = inttoptr i64 %47 to float*
store float* %48, float** @sAx_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 float* [ %48, %50 ], [ %40, %31 ]
%59 = zext i32 %21 to i64
%60 = getelementptr float, float* %58, i64 %59
%61 = sext i32 %3 to i64
%62 = getelementptr float, float* %60, i64 %61
%63 = getelementptr inbounds float, float* %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 float, float* %0, i64 %78
%80 = load float, float* %79
%81 = mul nsw i64 %76, %66
%82 = add nuw nsw i64 %81, %73
%83 = getelementptr inbounds float, float* %58, i64 %82
store float %80, float* %83
%84 = or i64 %76, 1
%85 = add nuw nsw i64 %84, %74
%86 = getelementptr inbounds float, float* %0, i64 %85
%87 = load float, float* %86
%88 = mul nsw i64 %84, %66
%89 = add nuw nsw i64 %88, %73
%90 = getelementptr inbounds float, float* %58, i64 %89
store float %87, float* %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 float, float* %0, i64 %97
%99 = load float, float* %98
%100 = mul nsw i64 %95, %66
%101 = add nuw nsw i64 %100, %73
%102 = getelementptr inbounds float, float* %58, i64 %101
store float %99, float* %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 @sgeqrf_(i32* %5, i32* %5, float* %58, i32* %5, float* %60, float* %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, 8
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 float, float* %58, i64 %116
%118 = icmp ult float* %62, %60
%119 = icmp ult float* %58, %117
%120 = and i1 %118, %119
br i1 %120, label %200, label %121
121: ; preds = %114
%122 = and i64 %59, 4294967288
%123 = add nsw i64 %122, -8
%124 = lshr exact i64 %123, 3
%125 = add nuw nsw i64 %124, 1
%126 = and i64 %125, 3
%127 = icmp ult i64 %123, 24
br i1 %127, label %179, label %128
128: ; preds = %121
%129 = and i64 %125, 4611686018427387900
br label %130
130: ; preds = %130, %128
%131 = phi i64 [ 0, %128 ], [ %176, %130 ]
%132 = phi i64 [ 0, %128 ], [ %177, %130 ]
%133 = getelementptr inbounds float, float* %58, i64 %131
%134 = bitcast float* %133 to <4 x float>*
%135 = load <4 x float>, <4 x float>* %134
%136 = getelementptr inbounds float, float* %133, i64 4
%137 = bitcast float* %136 to <4 x float>*
%138 = load <4 x float>, <4 x float>* %137
%139 = getelementptr inbounds float, float* %62, i64 %131
%140 = bitcast float* %139 to <4 x float>*
store <4 x float> %135, <4 x float>* %140
%141 = getelementptr inbounds float, float* %139, i64 4
%142 = bitcast float* %141 to <4 x float>*
store <4 x float> %138, <4 x float>* %142
%143 = or i64 %131, 8
%144 = getelementptr inbounds float, float* %58, i64 %143
%145 = bitcast float* %144 to <4 x float>*
%146 = load <4 x float>, <4 x float>* %145
%147 = getelementptr inbounds float, float* %144, i64 4
%148 = bitcast float* %147 to <4 x float>*
%149 = load <4 x float>, <4 x float>* %148
%150 = getelementptr inbounds float, float* %62, i64 %143
%151 = bitcast float* %150 to <4 x float>*
store <4 x float> %146, <4 x float>* %151
%152 = getelementptr inbounds float, float* %150, i64 4
%153 = bitcast float* %152 to <4 x float>*
store <4 x float> %149, <4 x float>* %153
%154 = or i64 %131, 16
%155 = getelementptr inbounds float, float* %58, i64 %154
%156 = bitcast float* %155 to <4 x float>*
%157 = load <4 x float>, <4 x float>* %156
%158 = getelementptr inbounds float, float* %155, i64 4
%159 = bitcast float* %158 to <4 x float>*
%160 = load <4 x float>, <4 x float>* %159
%161 = getelementptr inbounds float, float* %62, i64 %154
%162 = bitcast float* %161 to <4 x float>*
store <4 x float> %157, <4 x float>* %162
%163 = getelementptr inbounds float, float* %161, i64 4
%164 = bitcast float* %163 to <4 x float>*
store <4 x float> %160, <4 x float>* %164
%165 = or i64 %131, 24
%166 = getelementptr inbounds float, float* %58, i64 %165
%167 = bitcast float* %166 to <4 x float>*
%168 = load <4 x float>, <4 x float>* %167
%169 = getelementptr inbounds float, float* %166, i64 4
%170 = bitcast float* %169 to <4 x float>*
%171 = load <4 x float>, <4 x float>* %170
%172 = getelementptr inbounds float, float* %62, i64 %165
%173 = bitcast float* %172 to <4 x float>*
store <4 x float> %168, <4 x float>* %173
%174 = getelementptr inbounds float, float* %172, i64 4
%175 = bitcast float* %174 to <4 x float>*
store <4 x float> %171, <4 x float>* %175
%176 = add nuw i64 %131, 32
%177 = add 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 float, float* %58, i64 %183
%186 = bitcast float* %185 to <4 x float>*
%187 = load <4 x float>, <4 x float>* %186
%188 = getelementptr inbounds float, float* %185, i64 4
%189 = bitcast float* %188 to <4 x float>*
%190 = load <4 x float>, <4 x float>* %189
%191 = getelementptr inbounds float, float* %62, i64 %183
%192 = bitcast float* %191 to <4 x float>*
store <4 x float> %187, <4 x float>* %192
%193 = getelementptr inbounds float, float* %191, i64 4
%194 = bitcast float* %193 to <4 x float>*
store <4 x float> %190, <4 x float>* %194
%195 = add nuw i64 %183, 8
%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 float, float* %58, i64 %207
%210 = load float, float* %209
%211 = getelementptr inbounds float, float* %62, i64 %207
store float %210, float* %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 float, float* %58, i64 %228
%230 = load float, float* %229
%231 = getelementptr inbounds float, float* %62, i64 %228
store float %230, float* %231
%232 = add nuw nsw i64 %228, 1
%233 = getelementptr inbounds float, float* %58, i64 %232
%234 = load float, float* %233
%235 = getelementptr inbounds float, float* %62, i64 %232
store float %234, float* %235
%236 = add nuw nsw i64 %228, 2
%237 = getelementptr inbounds float, float* %58, i64 %236
%238 = load float, float* %237
%239 = getelementptr inbounds float, float* %62, i64 %236
store float %238, float* %239
%240 = add nuw nsw i64 %228, 3
%241 = getelementptr inbounds float, float* %58, i64 %240
%242 = load float, float* %241
%243 = getelementptr inbounds float, float* %62, i64 %240
store float %242, float* %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 @sorgqr_(i32* %5, i32* %5, i32* %5, float* %58, i32* %5, float* %60, float* %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 float [ %303, %273 ], [ 0.000000e+00, %270 ]
%276 = phi i64 [ %305, %273 ], [ 0, %270 ]
%277 = add nuw nsw i64 %274, %272
%278 = getelementptr inbounds float, float* %58, i64 %277
%279 = load float, float* %278
%280 = getelementptr inbounds float, float* %1, i64 %274
%281 = load float, float* %280
%282 = call float @llvm.fmuladd.f32(float %279, float %281, float %275)
%283 = or i64 %274, 1
%284 = add nuw nsw i64 %283, %272
%285 = getelementptr inbounds float, float* %58, i64 %284
%286 = load float, float* %285
%287 = getelementptr inbounds float, float* %1, i64 %283
%288 = load float, float* %287
%289 = call float @llvm.fmuladd.f32(float %286, float %288, float %282)
%290 = or i64 %274, 2
%291 = add nuw nsw i64 %290, %272
%292 = getelementptr inbounds float, float* %58, i64 %291
%293 = load float, float* %292
%294 = getelementptr inbounds float, float* %1, i64 %290
%295 = load float, float* %294
%296 = call float @llvm.fmuladd.f32(float %293, float %295, float %289)
%297 = or i64 %274, 3
%298 = add nuw nsw i64 %297, %272
%299 = getelementptr inbounds float, float* %58, i64 %298
%300 = load float, float* %299
%301 = getelementptr inbounds float, float* %1, i64 %297
%302 = load float, float* %301
%303 = call float @llvm.fmuladd.f32(float %300, float %302, float %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 float [ undef, %270 ], [ %303, %273 ]
%309 = phi i64 [ 0, %270 ], [ %304, %273 ]
%310 = phi float [ 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 float [ %320, %311 ], [ %310, %307 ]
%314 = phi i64 [ %322, %311 ], [ 0, %307 ]
%315 = add nuw nsw i64 %312, %272
%316 = getelementptr inbounds float, float* %58, i64 %315
%317 = load float, float* %316
%318 = getelementptr inbounds float, float* %1, i64 %312
%319 = load float, float* %318
%320 = call float @llvm.fmuladd.f32(float %317, float %319, float %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 float [ %308, %307 ], [ %320, %311 ]
%326 = getelementptr inbounds float, float* %2, i64 %271
store float %325, float* %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 @strtrs_(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, float* %62, i32* %5, float* %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
}