#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*/ dgesvd_(char *, char *, int *, int *, double *, int *,
                           double *, double *, 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_SVD(double *A, double *B, double *x, int m) {
  static double *buf = NULL;
  static int buf_sz = 0;
  static double eps = (-1.0);
  register int i, j;
  double *a, *u, *s, *vt, *work;
  int a_sz, u_sz, s_sz, vt_sz, tot_sz;
  double thresh, one_over_denom;
  register double sum;
  int info, rank, worksz, *iwork, iworksz;
  if (!A) {
    if (buf)
      free(buf);
    buf = NULL;
    buf_sz = 0;
    return 1;
  }
  worksz = -1;
  dgesvd_("A", "A", (int *)&m, (int *)&m, NULL, (int *)&m, NULL, NULL,
          (int *)&m, NULL, (int *)&m, (double *)&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(double) +
           iworksz * sizeof(int);
  if (tot_sz > buf_sz) {
    if (buf)
      free(buf);
    buf_sz = tot_sz;
    buf = (double *)malloc(buf_sz);
    if (!buf) {
      fprintf(stderr, "memory allocation in "
                      "dAx_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];
  dgesvd_("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 "
              "dgesvd_"
              "\"/\" dgesdd_"
              " in "
              "dAx_eq_b_SVD"
              "()\n",
              -info);
      exit(1);
    } else {
      fprintf(
          stderr,
          "LAPACK error: dgesdd (dbdsdc)/dgesvd (dbdsqr) failed to converge in "
          "dAx_eq_b_SVD"
          "() [info=%d]\n",
          info);
      return 0;
    }
  }
  if (eps < 0.0) {
    double aux;
    for (eps = (1.0); aux = eps + (1.0), aux - (1.0) > 0.0; eps *= (0.5))
      ;
    eps *= (2.0);
  }
  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.0) / 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):
<dAx_eq_b_SVD>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x100,%rsp
mov    %rdi,-0x30(%rbp)
mov    %rsi,-0x38(%rbp)
mov    %rdx,-0x40(%rbp)
mov    %ecx,-0x44(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    11b7 <dAx_eq_b_SVD+0x67>
cmpq   $0x0,0x2ed4(%rip)
je     1196 <dAx_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    1791 <dAx_eq_b_SVD+0x641>
movl   $0xffffffff,-0xb4(%rbp)
ff ff ff
lea    0xe50(%rip),%rsi
lea    -0x44(%rbp),%rbx
xor    %eax,%eax
mov    %eax,%r8d
lea    -0x98(%rbp),%r11
lea    -0xb4(%rbp),%r10
lea    -0xac(%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   1060 <dgesvd_@plt>
cvttsd2si -0x98(%rbp),%eax
ff
mov    %eax,-0xb4(%rbp)
mov    -0x44(%rbp),%eax
shl    $0x3,%eax
mov    %eax,-0xc4(%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    -0xb4(%rbp),%eax
cltq
shl    $0x3,%rax
movslq -0xc4(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %eax,-0x8c(%rbp)
mov    -0x8c(%rbp),%eax
cmp    0x2db4(%rip),%eax
jle    131e <dAx_eq_b_SVD+0x1ce>
cmpq   $0x0,0x2d9e(%rip)
je     12cc <dAx_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   1050 <malloc@plt>
mov    %rax,0x2d6e(%rip)
cmpq   $0x0,0x2d66(%rip)
jne    1319 <dAx_eq_b_SVD+0x1c9>
mov    0x2ce1(%rip),%rax
mov    (%rax),%edi
lea    0xd12(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
jmp    131e <dAx_eq_b_SVD+0x1ce>
mov    0x2d33(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rax
movslq -0x7c(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rax
movslq -0x80(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rax
movslq -0x84(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x70(%rbp)
mov    -0x70(%rbp),%rax
movslq -0x88(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x78(%rbp)
mov    -0x78(%rbp),%rax
movslq -0xb4(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xc0(%rbp)
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    1409 <dAx_eq_b_SVD+0x2b9>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    13f6 <dAx_eq_b_SVD+0x2a6>
mov    -0x30(%rbp),%rax
mov    -0x48(%rbp),%ecx
imul   -0x44(%rbp),%ecx
add    -0x4c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x58(%rbp),%rax
mov    -0x48(%rbp),%ecx
mov    -0x4c(%rbp),%edx
imul   -0x44(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    13ae <dAx_eq_b_SVD+0x25e>
jmp    13fb <dAx_eq_b_SVD+0x2ab>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    139b <dAx_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    0xbf4(%rip),%rsi
lea    -0x44(%rbp),%rbx
lea    -0xb4(%rbp),%r10
lea    -0xac(%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   1060 <dgesvd_@plt>
cmpl   $0x0,-0xac(%rbp)
je     14da <dAx_eq_b_SVD+0x38a>
cmpl   $0x0,-0xac(%rbp)
jge    14b1 <dAx_eq_b_SVD+0x361>
mov    0x2b51(%rip),%rax
mov    (%rax),%edi
xor    %edx,%edx
sub    -0xac(%rbp),%edx
lea    0xba7(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    0x2b28(%rip),%rax
mov    (%rax),%edi
mov    -0xac(%rbp),%edx
lea    0xbd5(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0x0,-0x24(%rbp)
jmp    1791 <dAx_eq_b_SVD+0x641>
xorps  %xmm0,%xmm0
ucomisd 0x2b63(%rip),%xmm0
jbe    156e <dAx_eq_b_SVD+0x41e>
movsd  0xb0d(%rip),%xmm0
movsd  %xmm0,0x2b4d(%rip)
movsd  0xafd(%rip),%xmm0
addsd  0x2b3d(%rip),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xd0(%rbp),%xmm0
ff
movsd  0xadd(%rip),%xmm1
subsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1556 <dAx_eq_b_SVD+0x406>
jmp    1539 <dAx_eq_b_SVD+0x3e9>
movsd  0xacf(%rip),%xmm0
mulsd  0x2aff(%rip),%xmm0
movsd  %xmm0,0x2af7(%rip)
jmp    14fb <dAx_eq_b_SVD+0x3ab>
movsd  0xaaa(%rip),%xmm0
mulsd  0x2ae2(%rip),%xmm0
movsd  %xmm0,0x2ada(%rip)
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x7c(%rbp),%eax
jge    159f <dAx_eq_b_SVD+0x44f>
mov    -0x58(%rbp),%rax
movslq -0x48(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1575 <dAx_eq_b_SVD+0x425>
movl   $0x0,-0xb0(%rbp)
movsd  0x2a97(%rip),%xmm0
mov    -0x68(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0xb0(%rbp),%ecx
xor    %eax,%eax
cmp    -0x44(%rbp),%ecx
mov    %al,-0xd1(%rbp)
jge    15f9 <dAx_eq_b_SVD+0x4a9>
mov    -0x68(%rbp),%rax
movslq -0xb0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd -0x98(%rbp),%xmm0
ff
seta   %al
mov    %al,-0xd1(%rbp)
mov    -0xd1(%rbp),%al
test   $0x1,%al
jne    160c <dAx_eq_b_SVD+0x4bc>
jmp    16ed <dAx_eq_b_SVD+0x59d>
mov    -0x68(%rbp),%rax
movslq -0xb0(%rbp),%rcx
movsd  0x9e1(%rip),%xmm0
divsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    16d4 <dAx_eq_b_SVD+0x584>
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    16c1 <dAx_eq_b_SVD+0x571>
mov    -0x70(%rbp),%rax
mov    -0xb0(%rbp),%ecx
mov    -0x48(%rbp),%edx
imul   -0x44(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x60(%rbp),%rax
mov    -0x4c(%rbp),%ecx
mov    -0xb0(%rbp),%edx
imul   -0x44(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  -0xa0(%rbp),%xmm2
ff
mov    -0x58(%rbp),%rax
mov    -0x48(%rbp),%ecx
imul   -0x44(%rbp),%ecx
add    -0x4c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1646 <dAx_eq_b_SVD+0x4f6>
jmp    16c6 <dAx_eq_b_SVD+0x576>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1633 <dAx_eq_b_SVD+0x4e3>
jmp    16d9 <dAx_eq_b_SVD+0x589>
mov    -0xb0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb0(%rbp)
jmp    15c1 <dAx_eq_b_SVD+0x471>
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    178a <dAx_eq_b_SVD+0x63a>
movl   $0x0,-0x4c(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x4c(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    1767 <dAx_eq_b_SVD+0x617>
mov    -0x58(%rbp),%rax
mov    -0x48(%rbp),%ecx
imul   -0x44(%rbp),%ecx
add    -0x4c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0xa8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1712 <dAx_eq_b_SVD+0x5c2>
movsd  -0xa8(%rbp),%xmm0
ff
mov    -0x40(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    16f4 <dAx_eq_b_SVD+0x5a4>
movl   $0x1,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x100,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<dAx_eq_b_SVD>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %ecx,(%rsp)
test   %rdi,%rdi
je     1265 <dAx_eq_b_SVD+0x105>
mov    %rdx,%r15
mov    %rdi,%r13
mov    %rsi,0x40(%rsp)
movl   $0xffffffff,0x4(%rsp)
ff
sub    $0x40,%rsp
lea    0x5c(%rsp),%rax
mov    %rax,0x38(%rsp)
lea    0x44(%rsp),%rax
mov    %rax,0x30(%rsp)
lea    0x68(%rsp),%rax
mov    %rax,0x28(%rsp)
lea    0x40(%rsp),%r12
mov    %r12,0x20(%rsp)
mov    %r12,0x10(%rsp)
xorpd  %xmm0,%xmm0
movupd %xmm0,(%rsp)
movq   $0x0,0x18(%rsp)
lea    0xe41(%rip),%rdi
mov    %rdi,%rsi
mov    %r12,%rdx
mov    %r12,%rcx
xor    %r8d,%r8d
mov    %r12,%r9
call   1070 <dgesvd_@plt>
add    $0x40,%rsp
cvttsd2si 0x28(%rsp),%eax
mov    %eax,0x4(%rsp)
mov    (%rsp),%r14d
mov    %r14d,%ecx
shl    $0x5,%ecx
mov    %r14d,%edx
imul   %edx,%edx
add    %r14d,%eax
add    %edx,%eax
lea    (%rax,%rdx,2),%eax
lea    (%rcx,%rax,8),%ebp
mov    0x2e45(%rip),%rbx
cmp    0x2e47(%rip),%ebp
mov    %r15,0x48(%rsp)
mov    %rdx,0x10(%rsp)
jle    1296 <dAx_eq_b_SVD+0x136>
test   %rbx,%rbx
je     123a <dAx_eq_b_SVD+0xda>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,0x2e28(%rip)
mov    %ebp,%edi
call   1060 <malloc@plt>
mov    %rax,0x2e12(%rip)
test   %rax,%rax
je     1737 <dAx_eq_b_SVD+0x5d7>
mov    %rax,%rbx
mov    (%rsp),%r8d
mov    0x10(%rsp),%rdx
jmp    1299 <dAx_eq_b_SVD+0x139>
mov    0x2df4(%rip),%rdi
test   %rdi,%rdi
je     1276 <dAx_eq_b_SVD+0x116>
call   1030 <free@plt>
movq   $0x0,0x2ddf(%rip)
movl   $0x0,0x2ddd(%rip)
mov    $0x1,%r15d
jmp    13da <dAx_eq_b_SVD+0x27a>
mov    %r14d,%r8d
movslq %r14d,%rcx
mov    %edx,%edx
lea    (%rbx,%rdx,8),%rbp
lea    0x0(,%rdx,8),%rax
add    %rbp,%rax
mov    %rax,0x30(%rsp)
mov    %rcx,0x20(%rsp)
lea    (%rax,%rcx,8),%rax
mov    %rax,0x38(%rsp)
mov    %rdx,0x8(%rsp)
lea    (%rax,%rdx,8),%r10
test   %r8d,%r8d
jle    1375 <dAx_eq_b_SVD+0x215>
mov    %r8d,%r9d
mov    %r9d,%r15d
and    $0xfffffffe,%r15d
lea    0x8(%r13),%rsi
lea    0x0(,%r9,8),%rdi
mov    %r9,%rcx
shl    $0x4,%rcx
xor    %r14d,%r14d
mov    %rbx,%r11
jmp    1310 <dAx_eq_b_SVD+0x1b0>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r14
add    %rdi,%rsi
add    $0x8,%r11
cmp    %r9,%r14
je     1375 <dAx_eq_b_SVD+0x215>
cmp    $0x1,%r8d
jne    1320 <dAx_eq_b_SVD+0x1c0>
xor    %eax,%eax
jmp    1350 <dAx_eq_b_SVD+0x1f0>
nopw   0x0(%rax,%rax,1)
mov    %r11,%rdx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nop
movsd  -0x8(%rsi,%rax,8),%xmm0
movsd  %xmm0,(%rdx)
movsd  (%rsi,%rax,8),%xmm0
movsd  %xmm0,(%rdx,%rdi,1)
add    $0x2,%rax
add    %rcx,%rdx
cmp    %rax,%r15
jne    1330 <dAx_eq_b_SVD+0x1d0>
test   $0x1,%r9b
je     1300 <dAx_eq_b_SVD+0x1a0>
mov    %r14,%rdx
imul   %r9,%rdx
add    %rax,%rdx
movsd  0x0(%r13,%rdx,8),%xmm0
imul   %r9,%rax
add    %r14,%rax
movsd  %xmm0,(%rbx,%rax,8)
jmp    1300 <dAx_eq_b_SVD+0x1a0>
lea    0xc9c(%rip),%rdi
mov    %rdi,%rsi
mov    %r12,%rdx
mov    %r12,%rcx
mov    %rbx,%r8
mov    %r12,%r9
lea    0x1c(%rsp),%rax
push   %rax
lea    0xc(%rsp),%rax
push   %rax
push   %r10
push   %r12
push   0x58(%rsp)
push   %r12
push   %rbp
mov    0x68(%rsp),%r14
push   %r14
call   1070 <dgesvd_@plt>
add    $0x40,%rsp
mov    0x1c(%rsp),%edx
test   %edx,%edx
je     13ec <dAx_eq_b_SVD+0x28c>
mov    0x2c1f(%rip),%rax
mov    (%rax),%edi
js     171d <dAx_eq_b_SVD+0x5bd>
lea    0xccc(%rip),%rsi
xor    %r15d,%r15d
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    %r15d,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
movsd  0x2c5c(%rip),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
mov    0x10(%rsp),%rax
jbe    1460 <dAx_eq_b_SVD+0x300>
movsd  0xbf5(%rip),%xmm2
movsd  0xbf5(%rip),%xmm3
movsd  0xbf5(%rip),%xmm4
movapd %xmm2,%xmm0
nop
mulsd  %xmm3,%xmm0
mulsd  %xmm3,%xmm0
mulsd  %xmm3,%xmm0
mulsd  %xmm3,%xmm0
mulsd  %xmm3,%xmm0
movapd %xmm0,%xmm5
addsd  %xmm2,%xmm5
addsd  %xmm4,%xmm5
ucomisd %xmm1,%xmm5
jbe    1454 <dAx_eq_b_SVD+0x2f4>
mulsd  %xmm3,%xmm0
mulsd  %xmm3,%xmm0
mulsd  %xmm3,%xmm0
jmp    1420 <dAx_eq_b_SVD+0x2c0>
addsd  %xmm0,%xmm0
movsd  %xmm0,0x2bf0(%rip)
test   %eax,%eax
je     1483 <dAx_eq_b_SVD+0x323>
mov    0x8(%rsp),%rax
lea    0x0(,%rax,8),%rdx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
movsd  0x2bcd(%rip),%xmm0
mulsd  (%r14),%xmm0
movsd  %xmm0,0x28(%rsp)
mov    (%rsp),%eax
mov    $0x1,%r15d
test   %eax,%eax
jle    13da <dAx_eq_b_SVD+0x27a>
movsd  (%r14),%xmm2
ucomisd %xmm0,%xmm2
jbe    1631 <dAx_eq_b_SVD+0x4d1>
mov    %eax,%ecx
and    $0xfffffffe,%ecx
lea    0x0(,%rax,8),%rdx
mov    %rdx,0x50(%rsp)
mov    %rax,%rsi
shl    $0x4,%rsi
mov    0x8(%rsp),%rdi
shl    $0x4,%rdi
mov    0x20(%rsp),%rdx
lea    (%rdi,%rdx,8),%rdx
mov    %rdx,0x8(%rsp)
lea    (%rdx,%rax,8),%rdx
mov    %rdx,0x20(%rsp)
xor    %r13d,%r13d
movsd  0xb0e(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movapd %xmm0,%xmm1
divsd  %xmm2,%xmm1
mov    %r13,0x10(%rsp)
imul   %rax,%r13
xor    %r10d,%r10d
mov    0x50(%rsp),%r15
xor    %r12d,%r12d
jmp    1535 <dAx_eq_b_SVD+0x3d5>
xchg   %ax,%ax
add    $0x1,%r12
add    $0x8,%r15
add    $0x8,%r10
cmp    %rax,%r12
je     1600 <dAx_eq_b_SVD+0x4a0>
lea    (%r12,%r13,1),%r8
cmp    $0x1,%eax
jne    1550 <dAx_eq_b_SVD+0x3f0>
xor    %r14d,%r14d
jmp    15bb <dAx_eq_b_SVD+0x45b>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    0x8(%rsp),%r9
mov    %r10,%rdx
mov    0x20(%rsp),%r11
mov    %r15,%rdi
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  (%rbx,%r9,1),%xmm2
mulsd  0x0(%rbp,%r8,8),%xmm2
mulsd  %xmm1,%xmm2
addsd  (%rbx,%rdx,1),%xmm2
movsd  %xmm2,(%rbx,%rdx,1)
movsd  (%rbx,%r11,1),%xmm2
mulsd  0x0(%rbp,%r8,8),%xmm2
mulsd  %xmm1,%xmm2
addsd  (%rbx,%rdi,1),%xmm2
movsd  %xmm2,(%rbx,%rdi,1)
add    $0x2,%r14
add    %rsi,%rdi
add    %rsi,%r11
add    %rsi,%rdx
add    %rsi,%r9
cmp    %r14,%rcx
jne    1570 <dAx_eq_b_SVD+0x410>
test   $0x1,%al
je     1520 <dAx_eq_b_SVD+0x3c0>
imul   %rax,%r14
mov    0x10(%rsp),%rdx
add    %r14,%rdx
mov    0x38(%rsp),%rdi
movsd  (%rdi,%rdx,8),%xmm2
mulsd  0x0(%rbp,%r8,8),%xmm2
add    %r12,%r14
mulsd  %xmm1,%xmm2
addsd  (%rbx,%r14,8),%xmm2
movsd  %xmm2,(%rbx,%r14,8)
jmp    1520 <dAx_eq_b_SVD+0x3c0>
nopl   0x0(%rax,%rax,1)
mov    0x10(%rsp),%r13
add    $0x1,%r13
cmp    %rax,%r13
mov    0x30(%rsp),%rdx
je     1631 <dAx_eq_b_SVD+0x4d1>
movsd  (%rdx,%r13,8),%xmm2
addq   $0x8,0x20(%rsp)
addq   $0x8,0x8(%rsp)
ucomisd 0x28(%rsp),%xmm2
ja     1500 <dAx_eq_b_SVD+0x3a0>
test   %eax,%eax
jle    128b <dAx_eq_b_SVD+0x12b>
lea    -0x1(%rax),%r8
mov    %eax,%r15d
and    $0x3,%r15d
mov    %eax,%r11d
and    $0xfffffffc,%r11d
lea    0x18(%rbx),%rdi
lea    0x0(,%rax,8),%r9
xor    %r10d,%r10d
mov    0x48(%rsp),%r14
mov    0x40(%rsp),%rdx
jmp    1689 <dAx_eq_b_SVD+0x529>
cs nopw 0x0(%rax,%rax,1)
movsd  %xmm0,(%r14,%r10,8)
add    $0x1,%r10
add    %r9,%rdi
add    %r9,%rbx
cmp    %rax,%r10
je     128b <dAx_eq_b_SVD+0x12b>
xorpd  %xmm0,%xmm0
xor    %ebp,%ebp
cmp    $0x3,%r8
jb     16e7 <dAx_eq_b_SVD+0x587>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  -0x18(%rdi,%rbp,8),%xmm1
movsd  -0x10(%rdi,%rbp,8),%xmm2
mulsd  (%rdx,%rbp,8),%xmm1
mulsd  0x8(%rdx,%rbp,8),%xmm2
addsd  %xmm0,%xmm1
movsd  -0x8(%rdi,%rbp,8),%xmm3
mulsd  0x10(%rdx,%rbp,8),%xmm3
addsd  %xmm1,%xmm2
movsd  (%rdi,%rbp,8),%xmm0
mulsd  0x18(%rdx,%rbp,8),%xmm0
addsd  %xmm2,%xmm3
addsd  %xmm3,%xmm0
add    $0x4,%rbp
cmp    %rbp,%r11
jne    16a0 <dAx_eq_b_SVD+0x540>
test   %r15,%r15
je     1670 <dAx_eq_b_SVD+0x510>
lea    (%rdx,%rbp,8),%rcx
lea    (%rbx,%rbp,8),%rbp
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
movsd  0x0(%rbp,%rsi,8),%xmm1
mulsd  (%rcx,%rsi,8),%xmm1
addsd  %xmm1,%xmm0
add    $0x1,%rsi
cmp    %rsi,%r15
jne    1700 <dAx_eq_b_SVD+0x5a0>
jmp    1670 <dAx_eq_b_SVD+0x510>
neg    %edx
lea    0x921(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
mov    0x28a2(%rip),%rax
mov    (%rax),%edi
lea    0x8d3(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@dAx_eq_b_SVD.buf = internal global double* null
@dAx_eq_b_SVD.buf_sz = internal global i32 0
@dAx_eq_b_SVD.eps = internal global double -1.000000e+00
@.str = [2 x i8] c"A\00"
@stderr = global i32 0
@.str.1 = [45 x i8] c"memory allocation in dAx_eq_b_SVD() failed!\0A\00"
@.str.2 = [85 x i8] c"LAPACK error: illegal value for argument %d of dgesvd_\22/\22 dgesdd_ in dAx_eq_b_SVD()\0A\00"
@.str.3 = [94 x i8] c"LAPACK error: dgesdd (dbdsdc)/dgesvd (dbdsqr) failed to converge in dAx_eq_b_SVD() [info=%d]\0A\00"
define i32 @dAx_eq_b_SVD(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 i32
%11 = alloca i32
%12 = alloca double*
%13 = alloca double*
%14 = alloca double*
%15 = alloca double*
%16 = alloca double*
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32*
%29 = alloca i32
%30 = alloca double
store double* %0, double** %6
store double* %1, double** %7
store double* %2, double** %8
store i32 %3, i32* %9
%31 = load double*, double** %6
%32 = icmp ne double* %31, null
br i1 %32, label %40, label %33
33: ; preds = %4
%34 = load double*, double** @dAx_eq_b_SVD.buf
%35 = icmp ne double* %34, null
br i1 %35, label %36, label %39
36: ; preds = %33
%37 = load double*, double** @dAx_eq_b_SVD.buf
%38 = call i32 @free(double* %37)
br label %39
39: ; preds = %36, %33
store double* null, double** @dAx_eq_b_SVD.buf
store i32 0, i32* @dAx_eq_b_SVD.buf_sz
store i32 1, i32* %5
br label %320
40: ; preds = %4
store i32 -1, i32* %27
%41 = call i32 @dgesvd_(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, double* null, i32* %9, double* null, double* null, i32* %9, double* null, i32* %9, double* %22, i32* %27, i32* %25)
%42 = load double, double* %22
%43 = fptosi double %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, 8
%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* @dAx_eq_b_SVD.buf_sz
%74 = icmp sgt i32 %72, %73
br i1 %74, label %75, label %93
75: ; preds = %40
%76 = load double*, double** @dAx_eq_b_SVD.buf
%77 = icmp ne double* %76, null
br i1 %77, label %78, label %81
78: ; preds = %75
%79 = load double*, double** @dAx_eq_b_SVD.buf
%80 = call i32 @free(double* %79)
br label %81
81: ; preds = %78, %75
%82 = load i32, i32* %21
store i32 %82, i32* @dAx_eq_b_SVD.buf_sz
%83 = load i32, i32* @dAx_eq_b_SVD.buf_sz
%84 = call i64 @malloc(i32 %83)
%85 = inttoptr i64 %84 to double*
store double* %85, double** @dAx_eq_b_SVD.buf
%86 = load double*, double** @dAx_eq_b_SVD.buf
%87 = icmp ne double* %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 double*, double** @dAx_eq_b_SVD.buf
store double* %94, double** %12
%95 = load double*, double** %12
%96 = load i32, i32* %17
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds double, double* %95, i64 %97
store double* %98, double** %13
%99 = load double*, double** %13
%100 = load i32, i32* %18
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds double, double* %99, i64 %101
store double* %102, double** %14
%103 = load double*, double** %14
%104 = load i32, i32* %19
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds double, double* %103, i64 %105
store double* %106, double** %15
%107 = load double*, double** %15
%108 = load i32, i32* %20
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds double, double* %107, i64 %109
store double* %110, double** %16
%111 = load double*, double** %16
%112 = load i32, i32* %27
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds double, double* %111, i64 %113
%115 = bitcast double* %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 double*, double** %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 double, double* %126, i64 %132
%134 = load double, double* %133
%135 = load double*, double** %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 double, double* %135, i64 %141
store double %134, double* %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 double*, double** %12
%152 = load double*, double** %14
%153 = load double*, double** %13
%154 = load double*, double** %15
%155 = load double*, double** %16
%156 = call i32 @dgesvd_(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, double* %151, i32* %9, double* %152, double* %153, i32* %9, double* %154, i32* %9, double* %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 %320
172: ; preds = %150
%173 = load double, double* @dAx_eq_b_SVD.eps
%174 = fcmp olt double %173, 0.000000e+00
br i1 %174, label %175, label %189
175: ; preds = %172
store double 1.000000e+00, double* @dAx_eq_b_SVD.eps
br label %176
176: ; preds = %183, %175
%177 = load double, double* @dAx_eq_b_SVD.eps
%178 = fadd double %177, 1.000000e+00
store double %178, double* %30
%179 = load double, double* %30
%180 = fsub double %179, 1.000000e+00
%181 = fcmp ogt double %180, 0.000000e+00
br i1 %181, label %182, label %186
182: ; preds = %176
br label %183
183: ; preds = %182
%184 = load double, double* @dAx_eq_b_SVD.eps
%185 = fmul double %184, 5.000000e-01
store double %185, double* @dAx_eq_b_SVD.eps
br label %176
186: ; preds = %176
%187 = load double, double* @dAx_eq_b_SVD.eps
%188 = fmul double %187, 2.000000e+00
store double %188, double* @dAx_eq_b_SVD.eps
br label %189
189: ; preds = %186, %172
store i32 0, i32* %10
br label %190
190: ; preds = %199, %189
%191 = load i32, i32* %10
%192 = load i32, i32* %17
%193 = icmp slt i32 %191, %192
br i1 %193, label %194, label %202
194: ; preds = %190
%195 = load double*, double** %12
%196 = load i32, i32* %10
%197 = sext i32 %196 to i64
%198 = getelementptr inbounds double, double* %195, i64 %197
store double 0.000000e+00, double* %198
br label %199
199: ; preds = %194
%200 = load i32, i32* %10
%201 = add nsw i32 %200, 1
store i32 %201, i32* %10
br label %190
202: ; preds = %190
store i32 0, i32* %26
%203 = load double, double* @dAx_eq_b_SVD.eps
%204 = load double*, double** %14
%205 = getelementptr inbounds double, double* %204, i64 0
%206 = load double, double* %205
%207 = fmul double %203, %206
store double %207, double* %22
br label %208
208: ; preds = %277, %202
%209 = load i32, i32* %26
%210 = load i32, i32* %9
%211 = icmp slt i32 %209, %210
br i1 %211, label %212, label %220
212: ; preds = %208
%213 = load double*, double** %14
%214 = load i32, i32* %26
%215 = sext i32 %214 to i64
%216 = getelementptr inbounds double, double* %213, i64 %215
%217 = load double, double* %216
%218 = load double, double* %22
%219 = fcmp ogt double %217, %218
br label %220
220: ; preds = %212, %208
%221 = phi i1 [ false, %208 ], [ %219, %212 ]
br i1 %221, label %222, label %280
222: ; preds = %220
%223 = load double*, double** %14
%224 = load i32, i32* %26
%225 = sext i32 %224 to i64
%226 = getelementptr inbounds double, double* %223, i64 %225
%227 = load double, double* %226
%228 = fdiv double 1.000000e+00, %227
store double %228, double* %23
store i32 0, i32* %11
br label %229
229: ; preds = %273, %222
%230 = load i32, i32* %11
%231 = load i32, i32* %9
%232 = icmp slt i32 %230, %231
br i1 %232, label %233, label %276
233: ; preds = %229
store i32 0, i32* %10
br label %234
234: ; preds = %269, %233
%235 = load i32, i32* %10
%236 = load i32, i32* %9
%237 = icmp slt i32 %235, %236
br i1 %237, label %238, label %272
238: ; preds = %234
%239 = load double*, double** %15
%240 = load i32, i32* %26
%241 = load i32, i32* %10
%242 = load i32, i32* %9
%243 = mul nsw i32 %241, %242
%244 = add nsw i32 %240, %243
%245 = sext i32 %244 to i64
%246 = getelementptr inbounds double, double* %239, i64 %245
%247 = load double, double* %246
%248 = load double*, double** %13
%249 = load i32, i32* %11
%250 = load i32, i32* %26
%251 = load i32, i32* %9
%252 = mul nsw i32 %250, %251
%253 = add nsw i32 %249, %252
%254 = sext i32 %253 to i64
%255 = getelementptr inbounds double, double* %248, i64 %254
%256 = load double, double* %255
%257 = fmul double %247, %256
%258 = load double, double* %23
%259 = load double*, double** %12
%260 = load i32, i32* %10
%261 = load i32, i32* %9
%262 = mul nsw i32 %260, %261
%263 = load i32, i32* %11
%264 = add nsw i32 %262, %263
%265 = sext i32 %264 to i64
%266 = getelementptr inbounds double, double* %259, i64 %265
%267 = load double, double* %266
%268 = call double @llvm.fmuladd.f64(double %257, double %258, double %267)
store double %268, double* %266
br label %269
269: ; preds = %238
%270 = load i32, i32* %10
%271 = add nsw i32 %270, 1
store i32 %271, i32* %10
br label %234
272: ; preds = %234
br label %273
273: ; preds = %272
%274 = load i32, i32* %11
%275 = add nsw i32 %274, 1
store i32 %275, i32* %11
br label %229
276: ; preds = %229
br label %277
277: ; preds = %276
%278 = load i32, i32* %26
%279 = add nsw i32 %278, 1
store i32 %279, i32* %26
br label %208
280: ; preds = %220
store i32 0, i32* %10
br label %281
281: ; preds = %316, %280
%282 = load i32, i32* %10
%283 = load i32, i32* %9
%284 = icmp slt i32 %282, %283
br i1 %284, label %285, label %319
285: ; preds = %281
store i32 0, i32* %11
store double 0.000000e+00, double* %24
br label %286
286: ; preds = %307, %285
%287 = load i32, i32* %11
%288 = load i32, i32* %9
%289 = icmp slt i32 %287, %288
br i1 %289, label %290, label %310
290: ; preds = %286
%291 = load double*, double** %12
%292 = load i32, i32* %10
%293 = load i32, i32* %9
%294 = mul nsw i32 %292, %293
%295 = load i32, i32* %11
%296 = add nsw i32 %294, %295
%297 = sext i32 %296 to i64
%298 = getelementptr inbounds double, double* %291, i64 %297
%299 = load double, double* %298
%300 = load double*, double** %7
%301 = load i32, i32* %11
%302 = sext i32 %301 to i64
%303 = getelementptr inbounds double, double* %300, i64 %302
%304 = load double, double* %303
%305 = load double, double* %24
%306 = call double @llvm.fmuladd.f64(double %299, double %304, double %305)
store double %306, double* %24
br label %307
307: ; preds = %290
%308 = load i32, i32* %11
%309 = add nsw i32 %308, 1
store i32 %309, i32* %11
br label %286
310: ; preds = %286
%311 = load double, double* %24
%312 = load double*, double** %8
%313 = load i32, i32* %10
%314 = sext i32 %313 to i64
%315 = getelementptr inbounds double, double* %312, i64 %314
store double %311, double* %315
br label %316
316: ; preds = %310
%317 = load i32, i32* %10
%318 = add nsw i32 %317, 1
store i32 %318, i32* %10
br label %281
319: ; preds = %281
store i32 1, i32* %5
br label %320
320: ; preds = %319, %168, %39
%321 = load i32, i32* %5
ret i32 %321
}

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