#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 */
double **alloc2d(int, int, int);
int /*<<< orphan*/ free2d(double **);
int /*<<< orphan*/ svd(double **, int, int, double *, double **);
void svd_lsq(double **A, int ni, int nj, double *z, double *std, double *w,
             double *sol) {
  double **V = alloc2d(ni, ni + nj, sizeof(double));
  double **B = &V[ni];
  int nijmin = (ni < nj) ? ni : nj;
  int i, j, ii;
  if (std != NULL)
    for (j = 0; j < nj; ++j) {
      z[j] /= std[j];
      for (i = 0; i < ni; ++i)
        A[j][i] /= std[j];
    }
  svd(A, ni, nj, w, V);
  for (j = 0; j < ni; ++j)
    for (i = 0; i < nijmin; ++i)
      if (w[i] != 0.0)
        V[j][i] /= w[i];
      else
        V[j][i] = 0.0;
  for (i = 0; i < ni; ++i) {
    double *v = V[i];
    for (j = 0; j < nj; ++j) {
      double *a = A[j];
      double *b = &B[j][i];
      for (ii = 0; ii < nijmin; ++ii)
        *b += v[ii] * a[ii];
    }
  }
  for (i = 0; i < ni; ++i) {
    sol[i] = 0.0;
    for (j = 0; j < nj; ++j)
      sol[i] += B[j][i] * z[j];
  }
  if (std != NULL)
    for (j = 0; j < nj; ++j)
      z[j] *= std[j];
  free2d(V);
}


x86 assembly (clang, -O0):
<svd_lsq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0xc(%rbp),%edi
mov    -0xc(%rbp),%esi
add    -0x10(%rbp),%esi
mov    $0x8,%edx
call   1030 <alloc2d@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
movslq -0xc(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1193 <svd_lsq+0x63>
mov    -0xc(%rbp),%eax
mov    %eax,-0x64(%rbp)
jmp    1199 <svd_lsq+0x69>
mov    -0x10(%rbp),%eax
mov    %eax,-0x64(%rbp)
mov    -0x64(%rbp),%eax
mov    %eax,-0x3c(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1244 <svd_lsq+0x114>
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    123f <svd_lsq+0x10f>
mov    -0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x18(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    122c <svd_lsq+0xfc>
mov    -0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x8(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    11e7 <svd_lsq+0xb7>
jmp    1231 <svd_lsq+0x101>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    11b1 <svd_lsq+0x81>
jmp    1244 <svd_lsq+0x114>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
call   1040 <svd@plt>
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1314 <svd_lsq+0x1e4>
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    1301 <svd_lsq+0x1d1>
mov    -0x28(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    12a6 <svd_lsq+0x176>
jp     12a6 <svd_lsq+0x176>
jmp    12d6 <svd_lsq+0x1a6>
mov    -0x28(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x30(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    12ee <svd_lsq+0x1be>
mov    -0x30(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x40(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    12f3 <svd_lsq+0x1c3>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1275 <svd_lsq+0x145>
jmp    1306 <svd_lsq+0x1d6>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1262 <svd_lsq+0x132>
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    13ea <svd_lsq+0x2ba>
mov    -0x30(%rbp),%rax
movslq -0x40(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x50(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    13d7 <svd_lsq+0x2a7>
mov    -0x8(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x58(%rbp)
mov    -0x38(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x40(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x60(%rbp)
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    13c4 <svd_lsq+0x294>
mov    -0x50(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x58(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x60(%rbp),%rax
movsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    137c <svd_lsq+0x24c>
jmp    13c9 <svd_lsq+0x299>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    133e <svd_lsq+0x20e>
jmp    13dc <svd_lsq+0x2ac>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    131b <svd_lsq+0x1eb>
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    147d <svd_lsq+0x34d>
mov    0x10(%rbp),%rax
movslq -0x40(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    146a <svd_lsq+0x33a>
mov    -0x38(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x10(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1414 <svd_lsq+0x2e4>
jmp    146f <svd_lsq+0x33f>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    13f1 <svd_lsq+0x2c1>
cmpq   $0x0,-0x20(%rbp)
je     14cd <svd_lsq+0x39d>
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    14c8 <svd_lsq+0x398>
mov    -0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x44(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    148f <svd_lsq+0x35f>
jmp    14cd <svd_lsq+0x39d>
mov    -0x30(%rbp),%rdi
call   1050 <free2d@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<svd_lsq>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %r9,%r15
mov    %r8,%r13
mov    %rcx,%r14
mov    %edx,%ebx
mov    %esi,%ebp
mov    %rdi,0x20(%rsp)
mov    0x70(%rsp),%rax
mov    %rax,0x30(%rsp)
lea    (%rbx,%rbp,1),%esi
mov    %ebp,%edi
mov    $0x8,%edx
call   1030 <alloc2d@plt>
mov    %rax,0x18(%rsp)
cmp    %ebx,%ebp
mov    %ebx,%r12d
cmovl  %ebp,%r12d
test   %r13,%r13
sete   %al
mov    %rbx,0x8(%rsp)
test   %ebx,%ebx
setle  %cl
or     %al,%cl
mov    %cl,0x7(%rsp)
mov    %ebp,%ebx
je     136c <svd_lsq+0x23c>
mov    %rbx,0x10(%rsp)
mov    0x20(%rsp),%rdi
mov    %ebp,%esi
mov    0x8(%rsp),%rdx
mov    %r15,%rcx
mov    0x18(%rsp),%rbx
mov    %rbx,%r8
call   1040 <svd@plt>
mov    %rbx,%rdi
test   %ebp,%ebp
jle    15c5 <svd_lsq+0x495>
movslq %ebp,%rbx
lea    (%rdi,%rbx,8),%r9
mov    %r12d,%r11d
lea    -0x1(%r11),%r10
mov    %r11d,%esi
and    $0xfffffffe,%esi
xor    %ecx,%ecx
jmp    11f4 <svd_lsq+0xc4>
nopl   0x0(%rax)
movsd  %xmm0,(%rdx,%rax,8)
add    $0x1,%rcx
cmp    0x10(%rsp),%rcx
je     1294 <svd_lsq+0x164>
test   %r12d,%r12d
jle    11e5 <svd_lsq+0xb5>
test   %r10,%r10
je     1260 <svd_lsq+0x130>
mov    (%rdi,%rcx,8),%rdx
xor    %eax,%eax
jmp    121f <svd_lsq+0xef>
cs nopw 0x0(%rax,%rax,1)
movsd  %xmm0,0x8(%rdx,%rax,8)
add    $0x2,%rax
cmp    %rax,%rsi
je     1262 <svd_lsq+0x132>
movsd  (%r15,%rax,8),%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
xorpd  %xmm2,%xmm2
jne    1235 <svd_lsq+0x105>
jnp    123e <svd_lsq+0x10e>
movsd  (%rdx,%rax,8),%xmm2
divsd  %xmm1,%xmm2
movsd  %xmm2,(%rdx,%rax,8)
movsd  0x8(%r15,%rax,8),%xmm1
ucomisd %xmm0,%xmm1
jne    1252 <svd_lsq+0x122>
jnp    1210 <svd_lsq+0xe0>
movsd  0x8(%rdx,%rax,8),%xmm0
divsd  %xmm1,%xmm0
jmp    1210 <svd_lsq+0xe0>
xchg   %ax,%ax
xor    %eax,%eax
test   $0x1,%r11b
je     11e5 <svd_lsq+0xb5>
movsd  (%r15,%rax,8),%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
mov    (%rdi,%rcx,8),%rdx
jne    1286 <svd_lsq+0x156>
jnp    11e0 <svd_lsq+0xb0>
movsd  (%rdx,%rax,8),%xmm0
divsd  %xmm1,%xmm0
jmp    11e0 <svd_lsq+0xb0>
test   %ebp,%ebp
jle    15c5 <svd_lsq+0x495>
mov    %rbx,0x28(%rsp)
mov    %rbp,%r8
mov    0x8(%rsp),%r15d
mov    %r11d,%ecx
and    $0xfffffffe,%ecx
xor    %ebp,%ebp
jmp    12cf <svd_lsq+0x19f>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%rbp
cmp    0x10(%rsp),%rbp
je     14e2 <svd_lsq+0x3b2>
cmpl   $0x0,0x8(%rsp)
jle    12c0 <svd_lsq+0x190>
mov    0x18(%rsp),%rax
mov    (%rax,%rbp,8),%rax
xor    %ebx,%ebx
jmp    12f9 <svd_lsq+0x1c9>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%rbx
cmp    %r15,%rbx
je     12c0 <svd_lsq+0x190>
test   %r12d,%r12d
jle    12f0 <svd_lsq+0x1c0>
mov    0x20(%rsp),%rdx
mov    (%rdx,%rbx,8),%rdx
mov    (%r9,%rbx,8),%rsi
movsd  (%rsi,%rbp,8),%xmm0
xor    %edi,%edi
test   %r10,%r10
je     1351 <svd_lsq+0x221>
nopw   0x0(%rax,%rax,1)
movsd  (%rax,%rdi,8),%xmm1
mulsd  (%rdx,%rdi,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rsi,%rbp,8)
movsd  0x8(%rax,%rdi,8),%xmm0
mulsd  0x8(%rdx,%rdi,8),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rsi,%rbp,8)
add    $0x2,%rdi
cmp    %rdi,%rcx
jne    1320 <svd_lsq+0x1f0>
test   $0x1,%r11b
je     12f0 <svd_lsq+0x1c0>
movsd  (%rax,%rdi,8),%xmm1
mulsd  (%rdx,%rdi,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rsi,%rbp,8)
jmp    12f0 <svd_lsq+0x1c0>
mov    0x8(%rsp),%eax
mov    %ebx,%r11d
and    $0xfffffffe,%r11d
lea    -0x2(%r11),%r9
mov    %r9,%r10
shr    %r10
add    $0x1,%r10
mov    %r10,%rcx
and    $0xfffffffffffffffe,%rcx
mov    %rcx,0x10(%rsp)
mov    %rbx,%rdi
neg    %rdi
xor    %edx,%edx
jmp    13b0 <svd_lsq+0x280>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rdx
cmp    %rax,%rdx
mov    %r8,%rbp
je     1195 <svd_lsq+0x65>
movsd  (%r14,%rdx,8),%xmm0
divsd  0x0(%r13,%rdx,8),%xmm0
movsd  %xmm0,(%r14,%rdx,8)
mov    %rbp,%r8
test   %ebp,%ebp
jle    13a0 <svd_lsq+0x270>
mov    0x20(%rsp),%rcx
mov    (%rcx,%rdx,8),%rsi
cmp    $0x1,%r8d
je     13fd <svd_lsq+0x2cd>
lea    0x8(,%rdx,8),%rcx
add    %r13,%rcx
cmp    %rcx,%rsi
jae    1462 <svd_lsq+0x332>
lea    0x0(,%rdx,8),%rcx
add    %r13,%rcx
lea    (%rsi,%rbx,8),%rbp
cmp    %rbp,%rcx
jae    1462 <svd_lsq+0x332>
xor    %ecx,%ecx
mov    %rcx,%rbp
test   $0x1,%bl
je     141f <svd_lsq+0x2ef>
movsd  (%rsi,%rcx,8),%xmm0
divsd  0x0(%r13,%rdx,8),%xmm0
movsd  %xmm0,(%rsi,%rcx,8)
mov    %rcx,%rbp
or     $0x1,%rbp
not    %rcx
cmp    %rdi,%rcx
je     13a0 <svd_lsq+0x270>
nopl   0x0(%rax,%rax,1)
movsd  (%rsi,%rbp,8),%xmm0
divsd  0x0(%r13,%rdx,8),%xmm0
movsd  0x8(%rsi,%rbp,8),%xmm1
movsd  %xmm0,(%rsi,%rbp,8)
divsd  0x0(%r13,%rdx,8),%xmm1
movsd  %xmm1,0x8(%rsi,%rbp,8)
add    $0x2,%rbp
cmp    %rbp,%rbx
jne    1430 <svd_lsq+0x300>
jmp    13a0 <svd_lsq+0x270>
test   %r9,%r9
je     14d8 <svd_lsq+0x3a8>
movsd  0x0(%r13,%rdx,8),%xmm0
unpcklpd %xmm0,%xmm0
mov    0x10(%rsp),%rcx
xor    %ebp,%ebp
nopl   0x0(%rax)
movupd (%rsi,%rbp,8),%xmm1
movupd 0x10(%rsi,%rbp,8),%xmm2
divpd  %xmm0,%xmm1
movupd %xmm1,(%rsi,%rbp,8)
divpd  %xmm0,%xmm2
movupd %xmm2,0x10(%rsi,%rbp,8)
add    $0x4,%rbp
add    $0xfffffffffffffffe,%rcx
jne    1480 <svd_lsq+0x350>
test   $0x1,%r10b
je     14c7 <svd_lsq+0x397>
movsd  0x0(%r13,%rdx,8),%xmm0
unpcklpd %xmm0,%xmm0
movupd (%rsi,%rbp,8),%xmm1
divpd  %xmm0,%xmm1
movupd %xmm1,(%rsi,%rbp,8)
mov    %r11,%rcx
cmp    %rbx,%r11
je     13a0 <svd_lsq+0x270>
jmp    13ff <svd_lsq+0x2cf>
xor    %ebp,%ebp
test   $0x1,%r10b
jne    14ae <svd_lsq+0x37e>
jmp    14c7 <svd_lsq+0x397>
test   %r8d,%r8d
mov    0x18(%rsp),%rdi
mov    0x30(%rsp),%rbp
mov    0x28(%rsp),%rax
jle    15c5 <svd_lsq+0x495>
mov    %r15d,%ecx
and    $0xfffffffe,%ecx
lea    (%rdi,%rax,8),%rdx
add    $0x8,%rdx
xor    %esi,%esi
mov    0x10(%rsp),%r8
jmp    152d <svd_lsq+0x3fd>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%rsi
cmp    %r8,%rsi
je     15c5 <svd_lsq+0x495>
movq   $0x0,0x0(%rbp,%rsi,8)
cmpl   $0x0,0x8(%rsp)
jle    1520 <svd_lsq+0x3f0>
cmpl   $0x1,0x8(%rsp)
jne    1550 <svd_lsq+0x420>
xorpd  %xmm0,%xmm0
xor    %eax,%eax
jmp    159d <svd_lsq+0x46d>
nopl   0x0(%rax)
xorpd  %xmm0,%xmm0
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
mov    -0x8(%rdx,%rax,8),%rbx
movsd  (%rbx,%rsi,8),%xmm1
mulsd  (%r14,%rax,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x0(%rbp,%rsi,8)
mov    (%rdx,%rax,8),%rbx
movsd  (%rbx,%rsi,8),%xmm0
mulsd  0x8(%r14,%rax,8),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x0(%rbp,%rsi,8)
add    $0x2,%rax
cmp    %rax,%rcx
jne    1560 <svd_lsq+0x430>
test   $0x1,%r15b
je     1520 <svd_lsq+0x3f0>
mov    (%r9,%rax,8),%rbx
movsd  (%rbx,%rsi,8),%xmm1
mulsd  (%r14,%rax,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x0(%rbp,%rsi,8)
jmp    1520 <svd_lsq+0x3f0>
cmpb   $0x0,0x7(%rsp)
jne    178b <svd_lsq+0x65b>
mov    0x8(%rsp),%rcx
mov    %ecx,%eax
cmp    $0x4,%ecx
jb     15fd <svd_lsq+0x4cd>
lea    0x0(,%rax,8),%rcx
add    %r13,%rcx
cmp    %r14,%rcx
jbe    16b0 <svd_lsq+0x580>
lea    (%r14,%rax,8),%rcx
cmp    %r13,%rcx
jbe    16b0 <svd_lsq+0x580>
xor    %ecx,%ecx
mov    %rcx,%rdx
not    %rdx
add    %rax,%rdx
mov    %rax,%rsi
and    $0x3,%rsi
je     163d <svd_lsq+0x50d>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  0x0(%r13,%rcx,8),%xmm0
mulsd  (%r14,%rcx,8),%xmm0
movsd  %xmm0,(%r14,%rcx,8)
add    $0x1,%rcx
add    $0xffffffffffffffff,%rsi
jne    1620 <svd_lsq+0x4f0>
cmp    $0x3,%rdx
jb     178b <svd_lsq+0x65b>
nopw   0x0(%rax,%rax,1)
movsd  0x0(%r13,%rcx,8),%xmm0
mulsd  (%r14,%rcx,8),%xmm0
movsd  %xmm0,(%r14,%rcx,8)
movsd  0x8(%r13,%rcx,8),%xmm0
mulsd  0x8(%r14,%rcx,8),%xmm0
movsd  %xmm0,0x8(%r14,%rcx,8)
movsd  0x10(%r13,%rcx,8),%xmm0
mulsd  0x10(%r14,%rcx,8),%xmm0
movsd  %xmm0,0x10(%r14,%rcx,8)
movsd  0x18(%r13,%rcx,8),%xmm0
mulsd  0x18(%r14,%rcx,8),%xmm0
movsd  %xmm0,0x18(%r14,%rcx,8)
add    $0x4,%rcx
cmp    %rcx,%rax
jne    1650 <svd_lsq+0x520>
jmp    178b <svd_lsq+0x65b>
mov    %eax,%ecx
and    $0xfffffffc,%ecx
lea    -0x4(%rcx),%rdx
mov    %rdx,%rbp
shr    $0x2,%rbp
add    $0x1,%rbp
test   %rdx,%rdx
je     179e <svd_lsq+0x66e>
mov    %rbp,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
movupd 0x0(%r13,%rdx,8),%xmm0
movupd 0x10(%r13,%rdx,8),%xmm1
movupd (%r14,%rdx,8),%xmm2
mulpd  %xmm0,%xmm2
movupd 0x10(%r14,%rdx,8),%xmm0
mulpd  %xmm1,%xmm0
movupd 0x20(%r14,%rdx,8),%xmm1
movupd 0x30(%r14,%rdx,8),%xmm3
movupd %xmm2,(%r14,%rdx,8)
movupd %xmm0,0x10(%r14,%rdx,8)
movupd 0x20(%r13,%rdx,8),%xmm0
mulpd  %xmm1,%xmm0
movupd 0x30(%r13,%rdx,8),%xmm1
mulpd  %xmm3,%xmm1
movupd %xmm0,0x20(%r14,%rdx,8)
movupd %xmm1,0x30(%r14,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rsi
jne    16e0 <svd_lsq+0x5b0>
test   $0x1,%bpl
je     1782 <svd_lsq+0x652>
movupd 0x0(%r13,%rdx,8),%xmm0
movupd 0x10(%r13,%rdx,8),%xmm1
movupd (%r14,%rdx,8),%xmm2
mulpd  %xmm0,%xmm2
movupd 0x10(%r14,%rdx,8),%xmm0
mulpd  %xmm1,%xmm0
movupd %xmm2,(%r14,%rdx,8)
movupd %xmm0,0x10(%r14,%rdx,8)
cmp    %rax,%rcx
jne    15ff <svd_lsq+0x4cf>
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <free2d@plt>
xor    %edx,%edx
test   $0x1,%bpl
jne    1752 <svd_lsq+0x622>
jmp    1782 <svd_lsq+0x652>

LLVM IR (-O0):
define void @svd_lsq(double** %0, i32 %1, i32 %2, double* %3, double* %4, double* %5, double* %6) {
%8 = alloca double**
%9 = alloca i32
%10 = alloca i32
%11 = alloca double*
%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 double*
%22 = alloca double*
%23 = alloca double*
store double** %0, double*** %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store double* %3, double** %11
store double* %4, double** %12
store double* %5, double** %13
store double* %6, double** %14
%24 = load i32, i32* %9
%25 = load i32, i32* %9
%26 = load i32, i32* %10
%27 = add nsw i32 %25, %26
%28 = call double** @alloc2d(i32 %24, i32 %27, i32 8)
store double** %28, double*** %15
%29 = load double**, double*** %15
%30 = load i32, i32* %9
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds double*, double** %29, i64 %31
store double** %32, double*** %16
%33 = load i32, i32* %9
%34 = load i32, i32* %10
%35 = icmp slt i32 %33, %34
br i1 %35, label %36, label %38
36: ; preds = %7
%37 = load i32, i32* %9
br label %40
38: ; preds = %7
%39 = load i32, i32* %10
br label %40
40: ; preds = %38, %36
%41 = phi i32 [ %37, %36 ], [ %39, %38 ]
store i32 %41, i32* %17
%42 = load double*, double** %12
%43 = icmp ne double* %42, null
br i1 %43, label %44, label %89
44: ; preds = %40
store i32 0, i32* %19
br label %45
45: ; preds = %85, %44
%46 = load i32, i32* %19
%47 = load i32, i32* %10
%48 = icmp slt i32 %46, %47
br i1 %48, label %49, label %88
49: ; preds = %45
%50 = load double*, double** %12
%51 = load i32, i32* %19
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds double, double* %50, i64 %52
%54 = load double, double* %53
%55 = load double*, double** %11
%56 = load i32, i32* %19
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds double, double* %55, i64 %57
%59 = load double, double* %58
%60 = fdiv double %59, %54
store double %60, double* %58
store i32 0, i32* %18
br label %61
61: ; preds = %81, %49
%62 = load i32, i32* %18
%63 = load i32, i32* %9
%64 = icmp slt i32 %62, %63
br i1 %64, label %65, label %84
65: ; preds = %61
%66 = load double*, double** %12
%67 = load i32, i32* %19
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds double, double* %66, i64 %68
%70 = load double, double* %69
%71 = load double**, double*** %8
%72 = load i32, i32* %19
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds double*, double** %71, i64 %73
%75 = load double*, double** %74
%76 = load i32, i32* %18
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds double, double* %75, i64 %77
%79 = load double, double* %78
%80 = fdiv double %79, %70
store double %80, double* %78
br label %81
81: ; preds = %65
%82 = load i32, i32* %18
%83 = add nsw i32 %82, 1
store i32 %83, i32* %18
br label %61
84: ; preds = %61
br label %85
85: ; preds = %84
%86 = load i32, i32* %19
%87 = add nsw i32 %86, 1
store i32 %87, i32* %19
br label %45
88: ; preds = %45
br label %89
89: ; preds = %88, %40
%90 = load double**, double*** %8
%91 = load i32, i32* %9
%92 = load i32, i32* %10
%93 = load double*, double** %13
%94 = load double**, double*** %15
%95 = call i32 @svd(double** %90, i32 %91, i32 %92, double* %93, double** %94)
store i32 0, i32* %19
br label %96
96: ; preds = %142, %89
%97 = load i32, i32* %19
%98 = load i32, i32* %9
%99 = icmp slt i32 %97, %98
br i1 %99, label %100, label %145
100: ; preds = %96
store i32 0, i32* %18
br label %101
101: ; preds = %138, %100
%102 = load i32, i32* %18
%103 = load i32, i32* %17
%104 = icmp slt i32 %102, %103
br i1 %104, label %105, label %141
105: ; preds = %101
%106 = load double*, double** %13
%107 = load i32, i32* %18
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds double, double* %106, i64 %108
%110 = load double, double* %109
%111 = fcmp une double %110, 0.000000e+00
br i1 %111, label %112, label %128
112: ; preds = %105
%113 = load double*, double** %13
%114 = load i32, i32* %18
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds double, double* %113, i64 %115
%117 = load double, double* %116
%118 = load double**, double*** %15
%119 = load i32, i32* %19
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds double*, double** %118, i64 %120
%122 = load double*, double** %121
%123 = load i32, i32* %18
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds double, double* %122, i64 %124
%126 = load double, double* %125
%127 = fdiv double %126, %117
store double %127, double* %125
br label %137
128: ; preds = %105
%129 = load double**, double*** %15
%130 = load i32, i32* %19
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds double*, double** %129, i64 %131
%133 = load double*, double** %132
%134 = load i32, i32* %18
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds double, double* %133, i64 %135
store double 0.000000e+00, double* %136
br label %137
137: ; preds = %128, %112
br label %138
138: ; preds = %137
%139 = load i32, i32* %18
%140 = add nsw i32 %139, 1
store i32 %140, i32* %18
br label %101
141: ; preds = %101
br label %142
142: ; preds = %141
%143 = load i32, i32* %19
%144 = add nsw i32 %143, 1
store i32 %144, i32* %19
br label %96
145: ; preds = %96
store i32 0, i32* %18
br label %146
146: ; preds = %200, %145
%147 = load i32, i32* %18
%148 = load i32, i32* %9
%149 = icmp slt i32 %147, %148
br i1 %149, label %150, label %203
150: ; preds = %146
%151 = load double**, double*** %15
%152 = load i32, i32* %18
%153 = sext i32 %152 to i64
%154 = getelementptr inbounds double*, double** %151, i64 %153
%155 = load double*, double** %154
store double* %155, double** %21
store i32 0, i32* %19
br label %156
156: ; preds = %196, %150
%157 = load i32, i32* %19
%158 = load i32, i32* %10
%159 = icmp slt i32 %157, %158
br i1 %159, label %160, label %199
160: ; preds = %156
%161 = load double**, double*** %8
%162 = load i32, i32* %19
%163 = sext i32 %162 to i64
%164 = getelementptr inbounds double*, double** %161, i64 %163
%165 = load double*, double** %164
store double* %165, double** %22
%166 = load double**, double*** %16
%167 = load i32, i32* %19
%168 = sext i32 %167 to i64
%169 = getelementptr inbounds double*, double** %166, i64 %168
%170 = load double*, double** %169
%171 = load i32, i32* %18
%172 = sext i32 %171 to i64
%173 = getelementptr inbounds double, double* %170, i64 %172
store double* %173, double** %23
store i32 0, i32* %20
br label %174
174: ; preds = %192, %160
%175 = load i32, i32* %20
%176 = load i32, i32* %17
%177 = icmp slt i32 %175, %176
br i1 %177, label %178, label %195
178: ; preds = %174
%179 = load double*, double** %21
%180 = load i32, i32* %20
%181 = sext i32 %180 to i64
%182 = getelementptr inbounds double, double* %179, i64 %181
%183 = load double, double* %182
%184 = load double*, double** %22
%185 = load i32, i32* %20
%186 = sext i32 %185 to i64
%187 = getelementptr inbounds double, double* %184, i64 %186
%188 = load double, double* %187
%189 = load double*, double** %23
%190 = load double, double* %189
%191 = call double @llvm.fmuladd.f64(double %183, double %188, double %190)
store double %191, double* %189
br label %192
192: ; preds = %178
%193 = load i32, i32* %20
%194 = add nsw i32 %193, 1
store i32 %194, i32* %20
br label %174
195: ; preds = %174
br label %196
196: ; preds = %195
%197 = load i32, i32* %19
%198 = add nsw i32 %197, 1
store i32 %198, i32* %19
br label %156
199: ; preds = %156
br label %200
200: ; preds = %199
%201 = load i32, i32* %18
%202 = add nsw i32 %201, 1
store i32 %202, i32* %18
br label %146
203: ; preds = %146
store i32 0, i32* %18
br label %204
204: ; preds = %242, %203
%205 = load i32, i32* %18
%206 = load i32, i32* %9
%207 = icmp slt i32 %205, %206
br i1 %207, label %208, label %245
208: ; preds = %204
%209 = load double*, double** %14
%210 = load i32, i32* %18
%211 = sext i32 %210 to i64
%212 = getelementptr inbounds double, double* %209, i64 %211
store double 0.000000e+00, double* %212
store i32 0, i32* %19
br label %213
213: ; preds = %238, %208
%214 = load i32, i32* %19
%215 = load i32, i32* %10
%216 = icmp slt i32 %214, %215
br i1 %216, label %217, label %241
217: ; preds = %213
%218 = load double**, double*** %16
%219 = load i32, i32* %19
%220 = sext i32 %219 to i64
%221 = getelementptr inbounds double*, double** %218, i64 %220
%222 = load double*, double** %221
%223 = load i32, i32* %18
%224 = sext i32 %223 to i64
%225 = getelementptr inbounds double, double* %222, i64 %224
%226 = load double, double* %225
%227 = load double*, double** %11
%228 = load i32, i32* %19
%229 = sext i32 %228 to i64
%230 = getelementptr inbounds double, double* %227, i64 %229
%231 = load double, double* %230
%232 = load double*, double** %14
%233 = load i32, i32* %18
%234 = sext i32 %233 to i64
%235 = getelementptr inbounds double, double* %232, i64 %234
%236 = load double, double* %235
%237 = call double @llvm.fmuladd.f64(double %226, double %231, double %236)
store double %237, double* %235
br label %238
238: ; preds = %217
%239 = load i32, i32* %19
%240 = add nsw i32 %239, 1
store i32 %240, i32* %19
br label %213
241: ; preds = %213
br label %242
242: ; preds = %241
%243 = load i32, i32* %18
%244 = add nsw i32 %243, 1
store i32 %244, i32* %18
br label %204
245: ; preds = %204
%246 = load double*, double** %12
%247 = icmp ne double* %246, null
br i1 %247, label %248, label %269
248: ; preds = %245
store i32 0, i32* %19
br label %249
249: ; preds = %265, %248
%250 = load i32, i32* %19
%251 = load i32, i32* %10
%252 = icmp slt i32 %250, %251
br i1 %252, label %253, label %268
253: ; preds = %249
%254 = load double*, double** %12
%255 = load i32, i32* %19
%256 = sext i32 %255 to i64
%257 = getelementptr inbounds double, double* %254, i64 %256
%258 = load double, double* %257
%259 = load double*, double** %11
%260 = load i32, i32* %19
%261 = sext i32 %260 to i64
%262 = getelementptr inbounds double, double* %259, i64 %261
%263 = load double, double* %262
%264 = fmul double %263, %258
store double %264, double* %262
br label %265
265: ; preds = %253
%266 = load i32, i32* %19
%267 = add nsw i32 %266, 1
store i32 %267, i32* %19
br label %249
268: ; preds = %249
br label %269
269: ; preds = %268, %245
%270 = load double**, double*** %15
%271 = call i32 @free2d(double** %270)
ret void
}

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