#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*/ sgesvd_(char *, char *, int *, int *, float *, int *,
                           float *, float *, int *, float *, int *, float *,
                           int *, int *);
int /*<<< orphan*/ stderr;
int sAx_eq_b_SVD(float *A, float *B, float *x, int m) {
  static float *buf = NULL;
  static int buf_sz = 0;
  static float eps = -1.0F;
  register int i, j;
  float *a, *u, *s, *vt, *work;
  int a_sz, u_sz, s_sz, vt_sz, tot_sz;
  float thresh, one_over_denom;
  register float sum;
  int info, rank, worksz, *iwork, iworksz;
  if (!A) {
    if (buf)
      free(buf);
    buf = NULL;
    buf_sz = 0;
    return 1;
  }
  worksz = -1;
  sgesvd_("A", "A", (int *)&m, (int *)&m, NULL, (int *)&m, NULL, NULL,
          (int *)&m, NULL, (int *)&m, (float *)&thresh, (int *)&worksz, &info);
  worksz = (int)thresh;
  iworksz = 8 * m;
  a_sz = m * m;
  u_sz = m * m;
  s_sz = m;
  vt_sz = m * m;
  tot_sz = (a_sz + u_sz + s_sz + vt_sz + worksz) * sizeof(float) +
           iworksz * sizeof(int);
  if (tot_sz > buf_sz) {
    if (buf)
      free(buf);
    buf_sz = tot_sz;
    buf = (float *)malloc(buf_sz);
    if (!buf) {
      fprintf(stderr, "memory allocation in "
                      "sAx_eq_b_SVD"
                      "() failed!\n");
      exit(1);
    }
  }
  a = buf;
  u = a + a_sz;
  s = u + u_sz;
  vt = s + s_sz;
  work = vt + vt_sz;
  iwork = (int *)(work + worksz);
  for (i = 0; i < m; i++)
    for (j = 0; j < m; j++)
      a[i + j * m] = A[i * m + j];
  sgesvd_("A", "A", (int *)&m, (int *)&m, a, (int *)&m, s, u, (int *)&m, vt,
          (int *)&m, work, (int *)&worksz, &info);
  if (info != 0) {
    if (info < 0) {
      fprintf(stderr,
              "LAPACK error: illegal value for argument %d of "
              "sgesvd_"
              "\"/\" sgesdd_"
              " in "
              "sAx_eq_b_SVD"
              "()\n",
              -info);
      exit(1);
    } else {
      fprintf(
          stderr,
          "LAPACK error: dgesdd (dbdsdc)/dgesvd (dbdsqr) failed to converge in "
          "sAx_eq_b_SVD"
          "() [info=%d]\n",
          info);
      return 0;
    }
  }
  if (eps < 0.0) {
    float aux;
    for (eps = 1.0F; aux = eps + 1.0F, aux - 1.0F > 0.0; eps *= 0.5F)
      ;
    eps *= 2.0F;
  }
  for (i = 0; i < a_sz; i++)
    a[i] = 0.0;
  for (rank = 0, thresh = eps * s[0]; rank < m && s[rank] > thresh; rank++) {
    one_over_denom = 1.0F / s[rank];
    for (j = 0; j < m; j++)
      for (i = 0; i < m; i++)
        a[i * m + j] += vt[rank + i * m] * u[j + rank * m] * one_over_denom;
  }
  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;
  }
  return 1;
}


x86 assembly (clang, -O0):
<sAx_eq_b_SVD>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xe0,%rsp
mov    %rdi,-0x30(%rbp)
mov    %rsi,-0x38(%rbp)
mov    %rdx,-0x40(%rbp)
mov    %ecx,-0x44(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    11b7 <sAx_eq_b_SVD+0x67>
cmpq   $0x0,0x2ed4(%rip)
je     1196 <sAx_eq_b_SVD+0x46>
mov    0x2ec7(%rip),%rdi
call   1030 <free@plt>
movq   $0x0,0x2eb7(%rip)
movl   $0x0,0x2eb5(%rip)
movl   $0x1,-0x24(%rbp)
jmp    179c <sAx_eq_b_SVD+0x64c>
movl   $0xffffffff,-0xa4(%rbp)
ff ff ff
lea    0xe44(%rip),%rsi
lea    -0x44(%rbp),%rbx
xor    %eax,%eax
mov    %eax,%r8d
lea    -0x90(%rbp),%r11
lea    -0xa4(%rbp),%r10
lea    -0x9c(%rbp),%rax
mov    %rsi,%rdi
mov    %rbx,%rdx
mov    %rbx,%rcx
mov    %rbx,%r9
movq   $0x0,(%rsp)
movq   $0x0,0x8(%rsp)
mov    %rbx,0x10(%rsp)
movq   $0x0,0x18(%rsp)
mov    %rbx,0x20(%rsp)
mov    %r11,0x28(%rsp)
mov    %r10,0x30(%rsp)
mov    %rax,0x38(%rsp)
call   1050 <sgesvd_@plt>
cvttss2si -0x90(%rbp),%eax
ff
mov    %eax,-0xa4(%rbp)
mov    -0x44(%rbp),%eax
shl    $0x3,%eax
mov    %eax,-0xb4(%rbp)
mov    -0x44(%rbp),%eax
imul   -0x44(%rbp),%eax
mov    %eax,-0x7c(%rbp)
mov    -0x44(%rbp),%eax
imul   -0x44(%rbp),%eax
mov    %eax,-0x80(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0x84(%rbp)
mov    -0x44(%rbp),%eax
imul   -0x44(%rbp),%eax
mov    %eax,-0x88(%rbp)
mov    -0x7c(%rbp),%eax
add    -0x80(%rbp),%eax
add    -0x84(%rbp),%eax
add    -0x88(%rbp),%eax
add    -0xa4(%rbp),%eax
cltq
shl    $0x2,%rax
movslq -0xb4(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %eax,-0x8c(%rbp)
mov    -0x8c(%rbp),%eax
cmp    0x2db4(%rip),%eax
jle    131e <sAx_eq_b_SVD+0x1ce>
cmpq   $0x0,0x2d9e(%rip)
je     12cc <sAx_eq_b_SVD+0x17c>
mov    0x2d91(%rip),%rdi
call   1030 <free@plt>
mov    -0x8c(%rbp),%eax
mov    %eax,0x2d88(%rip)
mov    0x2d82(%rip),%edi
call   1060 <malloc@plt>
mov    %rax,0x2d6e(%rip)
cmpq   $0x0,0x2d66(%rip)
jne    1319 <sAx_eq_b_SVD+0x1c9>
mov    0x2ce1(%rip),%rax
mov    (%rax),%edi
lea    0xd06(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
jmp    131e <sAx_eq_b_SVD+0x1ce>
mov    0x2d33(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rax
movslq -0x7c(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rax
movslq -0x80(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rax
movslq -0x84(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x70(%rbp)
mov    -0x70(%rbp),%rax
movslq -0x88(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x78(%rbp)
mov    -0x78(%rbp),%rax
movslq -0xa4(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0xb0(%rbp)
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    1409 <sAx_eq_b_SVD+0x2b9>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    13f6 <sAx_eq_b_SVD+0x2a6>
mov    -0x30(%rbp),%rax
mov    -0x48(%rbp),%ecx
imul   -0x44(%rbp),%ecx
add    -0x4c(%rbp),%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x58(%rbp),%rax
mov    -0x48(%rbp),%ecx
mov    -0x4c(%rbp),%edx
imul   -0x44(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    13ae <sAx_eq_b_SVD+0x25e>
jmp    13fb <sAx_eq_b_SVD+0x2ab>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    139b <sAx_eq_b_SVD+0x24b>
mov    -0x58(%rbp),%r8
mov    -0x68(%rbp),%r12
mov    -0x60(%rbp),%r15
mov    -0x70(%rbp),%r14
mov    -0x78(%rbp),%r11
lea    0xbe8(%rip),%rsi
lea    -0x44(%rbp),%rbx
lea    -0xa4(%rbp),%r10
lea    -0x9c(%rbp),%rax
mov    %rsi,%rdi
mov    %rbx,%rdx
mov    %rbx,%rcx
mov    %rbx,%r9
mov    %r12,(%rsp)
mov    %r15,0x8(%rsp)
mov    %rbx,0x10(%rsp)
mov    %r14,0x18(%rsp)
mov    %rbx,0x20(%rsp)
mov    %r11,0x28(%rsp)
mov    %r10,0x30(%rsp)
mov    %rax,0x38(%rsp)
call   1050 <sgesvd_@plt>
cmpl   $0x0,-0x9c(%rbp)
je     14da <sAx_eq_b_SVD+0x38a>
cmpl   $0x0,-0x9c(%rbp)
jge    14b1 <sAx_eq_b_SVD+0x361>
mov    0x2b51(%rip),%rax
mov    (%rax),%edi
xor    %edx,%edx
sub    -0x9c(%rbp),%edx
lea    0xb9b(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    0x2b28(%rip),%rax
mov    (%rax),%edi
mov    -0x9c(%rbp),%edx
lea    0xbc9(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0x0,-0x24(%rbp)
jmp    179c <sAx_eq_b_SVD+0x64c>
movss  0x2b66(%rip),%xmm0
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    157a <sAx_eq_b_SVD+0x42a>
movss  0xb05(%rip),%xmm0
movss  %xmm0,0x2b45(%rip)
movss  0xaf5(%rip),%xmm0
addss  0x2b35(%rip),%xmm0
movss  %xmm0,-0xb8(%rbp)
ff
movss  -0xb8(%rbp),%xmm0
ff
movss  0xad5(%rip),%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1562 <sAx_eq_b_SVD+0x412>
jmp    1545 <sAx_eq_b_SVD+0x3f5>
movss  0xabb(%rip),%xmm0
mulss  0x2af3(%rip),%xmm0
movss  %xmm0,0x2aeb(%rip)
jmp    1503 <sAx_eq_b_SVD+0x3b3>
movss  0xa9a(%rip),%xmm0
mulss  0x2ad6(%rip),%xmm0
movss  %xmm0,0x2ace(%rip)
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x7c(%rbp),%eax
jge    15ab <sAx_eq_b_SVD+0x45b>
mov    -0x58(%rbp),%rax
movslq -0x48(%rbp),%rcx
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1581 <sAx_eq_b_SVD+0x431>
movl   $0x0,-0xa0(%rbp)
movss  0x2a8b(%rip),%xmm0
mov    -0x68(%rbp),%rax
mulss  (%rax),%xmm0
movss  %xmm0,-0x90(%rbp)
ff
mov    -0xa0(%rbp),%ecx
xor    %eax,%eax
cmp    -0x44(%rbp),%ecx
mov    %al,-0xb9(%rbp)
jge    1604 <sAx_eq_b_SVD+0x4b4>
mov    -0x68(%rbp),%rax
movslq -0xa0(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
ucomiss -0x90(%rbp),%xmm0
seta   %al
mov    %al,-0xb9(%rbp)
mov    -0xb9(%rbp),%al
test   $0x1,%al
jne    1617 <sAx_eq_b_SVD+0x4c7>
jmp    16f8 <sAx_eq_b_SVD+0x5a8>
mov    -0x68(%rbp),%rax
movslq -0xa0(%rbp),%rcx
movss  0x9d6(%rip),%xmm0
divss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x94(%rbp)
ff
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    16df <sAx_eq_b_SVD+0x58f>
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    16cc <sAx_eq_b_SVD+0x57c>
mov    -0x70(%rbp),%rax
mov    -0xa0(%rbp),%ecx
mov    -0x48(%rbp),%edx
imul   -0x44(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x60(%rbp),%rax
mov    -0x4c(%rbp),%ecx
mov    -0xa0(%rbp),%edx
imul   -0x44(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
mulss  (%rax,%rcx,4),%xmm0
movss  -0x94(%rbp),%xmm2
ff
mov    -0x58(%rbp),%rax
mov    -0x48(%rbp),%ecx
imul   -0x44(%rbp),%ecx
add    -0x4c(%rbp),%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1651 <sAx_eq_b_SVD+0x501>
jmp    16d1 <sAx_eq_b_SVD+0x581>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    163e <sAx_eq_b_SVD+0x4ee>
jmp    16e4 <sAx_eq_b_SVD+0x594>
mov    -0xa0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa0(%rbp)
jmp    15cd <sAx_eq_b_SVD+0x47d>
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    1795 <sAx_eq_b_SVD+0x645>
movl   $0x0,-0x4c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x98(%rbp)
ff
mov    -0x4c(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    1772 <sAx_eq_b_SVD+0x622>
mov    -0x58(%rbp),%rax
mov    -0x48(%rbp),%ecx
imul   -0x44(%rbp),%ecx
add    -0x4c(%rbp),%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x38(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm2
movss  -0x98(%rbp),%xmm1
ff
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x98(%rbp)
ff
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    171d <sAx_eq_b_SVD+0x5cd>
movss  -0x98(%rbp),%xmm0
ff
mov    -0x40(%rbp),%rax
movslq -0x48(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    16ff <sAx_eq_b_SVD+0x5af>
movl   $0x1,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0xe0,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<sAx_eq_b_SVD>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %ecx,0x4(%rsp)
test   %rdi,%rdi
je     125f <sAx_eq_b_SVD+0xff>
mov    %rdx,%r12
mov    %rsi,%r15
mov    %rdi,%r13
movl   $0xffffffff,0x8(%rsp)
ff
sub    $0x40,%rsp
lea    0x64(%rsp),%rax
mov    %rax,0x38(%rsp)
lea    0x48(%rsp),%rax
mov    %rax,0x30(%rsp)
lea    0x4c(%rsp),%rax
mov    %rax,0x28(%rsp)
lea    0x44(%rsp),%rcx
mov    %rcx,0x20(%rsp)
mov    %rcx,0x10(%rsp)
xorps  %xmm0,%xmm0
movups %xmm0,(%rsp)
movq   $0x0,0x18(%rsp)
lea    0xe34(%rip),%rdi
mov    %rdi,%rsi
mov    %rcx,%rdx
xor    %r8d,%r8d
mov    %rcx,%r9
call   1060 <sgesvd_@plt>
add    $0x40,%rsp
cvttss2si 0xc(%rsp),%eax
mov    %eax,0x8(%rsp)
mov    0x4(%rsp),%r14d
mov    %r14d,%ecx
imul   %ecx,%ecx
add    %r14d,%eax
add    %ecx,%eax
lea    (%rax,%r14,8),%eax
lea    (%rax,%rcx,2),%ebp
shl    $0x2,%ebp
mov    0x2e4c(%rip),%rbx
cmp    0x2e4e(%rip),%ebp
mov    %r12,0x48(%rsp)
mov    %rcx,0x18(%rsp)
jle    1290 <sAx_eq_b_SVD+0x130>
test   %rbx,%rbx
je     1233 <sAx_eq_b_SVD+0xd3>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,0x2e2f(%rip)
mov    %ebp,%edi
call   1070 <malloc@plt>
mov    %rax,0x2e19(%rip)
test   %rax,%rax
je     1702 <sAx_eq_b_SVD+0x5a2>
mov    %rax,%rbx
mov    0x4(%rsp),%r8d
mov    0x18(%rsp),%rcx
jmp    1293 <sAx_eq_b_SVD+0x133>
mov    0x2dfa(%rip),%rdi
test   %rdi,%rdi
je     1270 <sAx_eq_b_SVD+0x110>
call   1030 <free@plt>
movq   $0x0,0x2de5(%rip)
movl   $0x0,0x2de3(%rip)
mov    $0x1,%r12d
jmp    13de <sAx_eq_b_SVD+0x27e>
mov    %r14d,%r8d
movslq %r14d,%rdx
mov    %ecx,%ecx
lea    (%rbx,%rcx,4),%rbp
lea    0x0(,%rcx,4),%rax
add    %rbp,%rax
mov    %rax,0x38(%rsp)
mov    %rdx,0x28(%rsp)
lea    (%rax,%rdx,4),%rax
mov    %rax,0x40(%rsp)
mov    %rcx,0x10(%rsp)
lea    (%rax,%rcx,4),%rax
mov    %rax,0x30(%rsp)
test   %r8d,%r8d
jle    1377 <sAx_eq_b_SVD+0x217>
mov    %r8d,%r12d
mov    %r12d,%r9d
and    $0xfffffffe,%r9d
lea    0x4(%r13),%rsi
lea    0x0(,%r12,4),%rdi
lea    0x0(,%r12,8),%rax
xor    %r14d,%r14d
mov    %rbx,%r10
jmp    1310 <sAx_eq_b_SVD+0x1b0>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r14
add    %rdi,%rsi
add    $0x4,%r10
cmp    %r12,%r14
je     1377 <sAx_eq_b_SVD+0x217>
cmp    $0x1,%r8d
jne    1320 <sAx_eq_b_SVD+0x1c0>
xor    %ecx,%ecx
jmp    1352 <sAx_eq_b_SVD+0x1f2>
nopw   0x0(%rax,%rax,1)
mov    %r10,%r11
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movss  -0x4(%rsi,%rcx,4),%xmm0
movss  %xmm0,(%r11)
movss  (%rsi,%rcx,4),%xmm0
movss  %xmm0,(%r11,%rdi,1)
add    $0x2,%rcx
add    %rax,%r11
cmp    %rcx,%r9
jne    1330 <sAx_eq_b_SVD+0x1d0>
test   $0x1,%r12b
je     1300 <sAx_eq_b_SVD+0x1a0>
mov    %r14,%rdx
imul   %r12,%rdx
add    %rcx,%rdx
movss  0x0(%r13,%rdx,4),%xmm0
imul   %r12,%rcx
add    %r14,%rcx
movss  %xmm0,(%rbx,%rcx,4)
jmp    1300 <sAx_eq_b_SVD+0x1a0>
lea    0xc8a(%rip),%rdi
mov    %rdi,%rsi
lea    0x4(%rsp),%rcx
mov    %rcx,%rdx
mov    %rbx,%r8
mov    %rcx,%r9
lea    0x24(%rsp),%rax
push   %rax
lea    0x10(%rsp),%rax
push   %rax
push   0x40(%rsp)
push   %rcx
push   0x60(%rsp)
push   %rcx
push   %rbp
mov    0x70(%rsp),%r14
push   %r14
call   1060 <sgesvd_@plt>
add    $0x40,%rsp
mov    0x24(%rsp),%edx
test   %edx,%edx
je     13f0 <sAx_eq_b_SVD+0x290>
mov    0x2c1b(%rip),%rax
mov    (%rax),%edi
js     16e8 <sAx_eq_b_SVD+0x588>
lea    0xcb8(%rip),%rsi
xor    %r12d,%r12d
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    %r12d,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
movss  0x2c58(%rip),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm0,%xmm1
jbe    1412 <sAx_eq_b_SVD+0x2b2>
movl   $0x34000000,0x2c46(%rip)
movss  0xbee(%rip),%xmm0
cmpl   $0x0,0x18(%rsp)
je     1438 <sAx_eq_b_SVD+0x2d8>
mov    0x10(%rsp),%rax
lea    0x0(,%rax,4),%rdx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
movss  0x2c18(%rip),%xmm0
mulss  (%r14),%xmm0
movss  %xmm0,0xc(%rsp)
mov    0x4(%rsp),%eax
mov    $0x1,%r12d
test   %eax,%eax
jle    13de <sAx_eq_b_SVD+0x27e>
movss  (%r14),%xmm2
ucomiss %xmm0,%xmm2
jbe    15ef <sAx_eq_b_SVD+0x48f>
mov    %eax,%ecx
and    $0xfffffffe,%ecx
lea    0x0(,%rax,4),%rdx
mov    %rdx,0x50(%rsp)
lea    0x0(,%rax,8),%rsi
mov    0x28(%rsp),%rdx
shl    $0x2,%rdx
mov    0x10(%rsp),%rdi
lea    (%rdx,%rdi,8),%rdx
mov    %rdx,0x10(%rsp)
lea    (%rdx,%rax,4),%rdx
mov    %rdx,0x28(%rsp)
xor    %edi,%edi
movss  0xb61(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movaps %xmm0,%xmm1
divss  %xmm2,%xmm1
mov    %rdi,0x18(%rsp)
imul   %rax,%rdi
mov    %rdi,0x30(%rsp)
xor    %r10d,%r10d
mov    0x50(%rsp),%r13
xor    %r12d,%r12d
jmp    14f5 <sAx_eq_b_SVD+0x395>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%r12
add    $0x4,%r13
add    $0x4,%r10
cmp    %rax,%r12
je     15c0 <sAx_eq_b_SVD+0x460>
mov    0x30(%rsp),%rdx
lea    (%r12,%rdx,1),%r8
cmp    $0x1,%eax
jne    1510 <sAx_eq_b_SVD+0x3b0>
xor    %r14d,%r14d
jmp    157b <sAx_eq_b_SVD+0x41b>
nopl   0x0(%rax,%rax,1)
mov    0x10(%rsp),%r9
mov    %r10,%rdx
mov    0x28(%rsp),%r11
mov    %r13,%rdi
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movss  (%rbx,%r9,1),%xmm2
mulss  0x0(%rbp,%r8,4),%xmm2
mulss  %xmm1,%xmm2
addss  (%rbx,%rdx,1),%xmm2
movss  %xmm2,(%rbx,%rdx,1)
movss  (%rbx,%r11,1),%xmm2
mulss  0x0(%rbp,%r8,4),%xmm2
mulss  %xmm1,%xmm2
addss  (%rbx,%rdi,1),%xmm2
movss  %xmm2,(%rbx,%rdi,1)
add    $0x2,%r14
add    %rsi,%rdi
add    %rsi,%r11
add    %rsi,%rdx
add    %rsi,%r9
cmp    %r14,%rcx
jne    1530 <sAx_eq_b_SVD+0x3d0>
test   $0x1,%al
je     14e0 <sAx_eq_b_SVD+0x380>
imul   %rax,%r14
mov    0x18(%rsp),%rdx
add    %r14,%rdx
mov    0x40(%rsp),%rdi
movss  (%rdi,%rdx,4),%xmm2
mulss  0x0(%rbp,%r8,4),%xmm2
add    %r12,%r14
mulss  %xmm1,%xmm2
addss  (%rbx,%r14,4),%xmm2
movss  %xmm2,(%rbx,%r14,4)
jmp    14e0 <sAx_eq_b_SVD+0x380>
nopl   0x0(%rax,%rax,1)
mov    0x18(%rsp),%rdi
add    $0x1,%rdi
cmp    %rax,%rdi
mov    0x38(%rsp),%rdx
je     15ef <sAx_eq_b_SVD+0x48f>
movss  (%rdx,%rdi,4),%xmm2
addq   $0x4,0x28(%rsp)
addq   $0x4,0x10(%rsp)
ucomiss 0xc(%rsp),%xmm2
ja     14b0 <sAx_eq_b_SVD+0x350>
test   %eax,%eax
jle    16dd <sAx_eq_b_SVD+0x57d>
lea    -0x1(%rax),%r8
mov    %eax,%edx
and    $0x3,%edx
mov    %eax,%r11d
and    $0xfffffffc,%r11d
lea    0xc(%rbx),%rdi
lea    0x0(,%rax,4),%r9
xor    %r10d,%r10d
mov    0x48(%rsp),%r14
mov    $0x1,%r12d
jmp    1649 <sAx_eq_b_SVD+0x4e9>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movss  %xmm0,(%r14,%r10,4)
add    $0x1,%r10
add    %r9,%rdi
add    %r9,%rbx
cmp    %rax,%r10
je     13de <sAx_eq_b_SVD+0x27e>
xorps  %xmm0,%xmm0
xor    %ebp,%ebp
cmp    $0x3,%r8
jb     16ab <sAx_eq_b_SVD+0x54b>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movss  -0xc(%rdi,%rbp,4),%xmm1
movss  -0x8(%rdi,%rbp,4),%xmm2
mulss  (%r15,%rbp,4),%xmm1
mulss  0x4(%r15,%rbp,4),%xmm2
addss  %xmm0,%xmm1
movss  -0x4(%rdi,%rbp,4),%xmm3
mulss  0x8(%r15,%rbp,4),%xmm3
addss  %xmm1,%xmm2
movss  (%rdi,%rbp,4),%xmm0
mulss  0xc(%r15,%rbp,4),%xmm0
addss  %xmm2,%xmm3
addss  %xmm3,%xmm0
add    $0x4,%rbp
cmp    %rbp,%r11
jne    1660 <sAx_eq_b_SVD+0x500>
test   %rdx,%rdx
je     1630 <sAx_eq_b_SVD+0x4d0>
lea    (%r15,%rbp,4),%rcx
lea    (%rbx,%rbp,4),%rbp
xor    %esi,%esi
nopw   0x0(%rax,%rax,1)
movss  0x0(%rbp,%rsi,4),%xmm1
mulss  (%rcx,%rsi,4),%xmm1
addss  %xmm1,%xmm0
add    $0x1,%rsi
cmp    %rsi,%rdx
jne    16c0 <sAx_eq_b_SVD+0x560>
jmp    1630 <sAx_eq_b_SVD+0x4d0>
mov    $0x1,%r12d
jmp    13de <sAx_eq_b_SVD+0x27e>
neg    %edx
lea    0x946(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
mov    0x28d7(%rip),%rax
mov    (%rax),%edi
lea    0x8f8(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>

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

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