#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 **allocMatrix(int, int);
double *allocVect(int);
int *calloc(int, size_t);
float fabs(double);
int /*<<< orphan*/ free(int *);
int /*<<< orphan*/ freeMatrix(double **, int);
int /*<<< orphan*/ freeVect(double *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ svdcmp(double **, int, int, double *, double **);
void DOsvd(float *a, float *res, float *comp, float *values, int nframes,
           int framesize, int compressedsize) {
  int usedfs;
  int *remap;
  int i, j;
  double **da;
  double **v;
  double *w;
  int DOFerr;
  float mx;
  int bestat;
  if (nframes > framesize) {
    usedfs = nframes;
  } else {
    usedfs = framesize;
  }
  da = allocMatrix(usedfs, nframes);
  v = allocMatrix(nframes, nframes);
  w = allocVect(nframes);
  DOFerr = 0;
  for (i = 0; i < nframes; i++) {
    for (j = 0; j < framesize; j++)
      da[j + 1][i + 1] = a[i * framesize + j];
    for (; j < usedfs; j++)
      da[j + 1][i + 1] = 0.0;
  }
  svdcmp(da, usedfs, nframes, w, v);
  remap = calloc(sizeof(int), (size_t)nframes);
  for (i = 0; i < nframes; i++)
    remap[i] = -1;
  for (j = 0; j < compressedsize; j++) {
    mx = -1.0f;
    for (i = 0; i < nframes; i++) {
      if (remap[i] < 0 && fabs(w[i + 1]) > mx) {
        mx = (float)fabs(w[i + 1]);
        bestat = i;
      }
    }
    if (mx > 0) {
      remap[bestat] = j;
    } else {
      DOFerr = 1;
    }
  }
  if (DOFerr) {
    printf("Warning:  To many degrees of freedom!  File size may increase\n");
    for (i = 0; i < compressedsize; i++) {
      values[i] = 0;
      for (j = 0; j < framesize; j++)
        res[i * framesize + j] = 0;
    }
  }
  for (i = 0; i < nframes; i++) {
    if (remap[i] < 0) {
      w[i + 1] = 0.0;
    } else {
      values[remap[i]] = (float)w[i + 1];
      for (j = 0; j < framesize; j++)
        res[remap[i] * framesize + j] = (float)da[j + 1][i + 1];
    }
  }
  freeVect(w);
  freeMatrix(v, nframes);
  freeMatrix(da, framesize);
  free(remap);
}


x86 assembly (clang, -O0):
<DOsvd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x28(%rbp),%eax
jle    11ca <DOsvd+0x3a>
mov    -0x24(%rbp),%eax
mov    %eax,-0x2c(%rbp)
jmp    11d0 <DOsvd+0x40>
mov    -0x28(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%edi
mov    -0x24(%rbp),%esi
call   1040 <allocMatrix@plt>
mov    %rax,-0x48(%rbp)
mov    -0x24(%rbp),%edi
mov    -0x24(%rbp),%esi
call   1040 <allocMatrix@plt>
mov    %rax,-0x50(%rbp)
mov    -0x24(%rbp),%edi
call   10a0 <allocVect@plt>
mov    %rax,-0x58(%rbp)
movl   $0x0,-0x5c(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    12c2 <DOsvd+0x132>
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x28(%rbp),%eax
jge    126e <DOsvd+0xde>
mov    -0x8(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x28(%rbp),%ecx
add    -0x40(%rbp),%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x48(%rbp),%rax
mov    -0x40(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x3c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    121b <DOsvd+0x8b>
jmp    1273 <DOsvd+0xe3>
mov    -0x40(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    12af <DOsvd+0x11f>
mov    -0x48(%rbp),%rax
mov    -0x40(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x3c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1273 <DOsvd+0xe3>
jmp    12b4 <DOsvd+0x124>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1208 <DOsvd+0x78>
mov    -0x48(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    -0x58(%rbp),%rcx
mov    -0x50(%rbp),%r8
call   1090 <svdcmp@plt>
movslq -0x24(%rbp),%rsi
mov    $0x4,%edi
call   1060 <calloc@plt>
mov    %rax,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    131b <DOsvd+0x18b>
mov    -0x38(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movl   $0xffffffff,(%rax,%rcx,4)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    12f2 <DOsvd+0x162>
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    0x10(%rbp),%eax
jge    13f4 <DOsvd+0x264>
movss  0xcca(%rip),%xmm0
movss  %xmm0,-0x60(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    13b6 <DOsvd+0x226>
mov    -0x38(%rbp),%rax
movslq -0x3c(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jge    13a3 <DOsvd+0x213>
mov    -0x58(%rbp),%rax
mov    -0x3c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1070 <fabs@plt>
ucomiss -0x60(%rbp),%xmm0
jbe    13a3 <DOsvd+0x213>
mov    -0x58(%rbp),%rax
mov    -0x3c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1070 <fabs@plt>
movss  %xmm0,-0x60(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x64(%rbp)
jmp    13a8 <DOsvd+0x218>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1342 <DOsvd+0x1b2>
movss  -0x60(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    13da <DOsvd+0x24a>
mov    -0x40(%rbp),%edx
mov    -0x38(%rbp),%rax
movslq -0x64(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
jmp    13e1 <DOsvd+0x251>
movl   $0x1,-0x5c(%rbp)
jmp    13e6 <DOsvd+0x256>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1322 <DOsvd+0x192>
cmpl   $0x0,-0x5c(%rbp)
je     147f <DOsvd+0x2ef>
lea    0xbff(%rip),%rdi
call   1050 <printf@plt>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    0x10(%rbp),%eax
jge    147a <DOsvd+0x2ea>
mov    -0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x28(%rbp),%eax
jge    1467 <DOsvd+0x2d7>
mov    -0x10(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x28(%rbp),%ecx
add    -0x40(%rbp),%ecx
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1434 <DOsvd+0x2a4>
jmp    146c <DOsvd+0x2dc>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1411 <DOsvd+0x281>
jmp    147f <DOsvd+0x2ef>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1563 <DOsvd+0x3d3>
mov    -0x38(%rbp),%rax
movslq -0x3c(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jge    14be <DOsvd+0x32e>
mov    -0x58(%rbp),%rax
mov    -0x3c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    1550 <DOsvd+0x3c0>
mov    -0x58(%rbp),%rax
mov    -0x3c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x20(%rbp),%rax
mov    -0x38(%rbp),%rcx
movslq -0x3c(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
movss  %xmm0,(%rax,%rcx,4)
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x28(%rbp),%eax
jge    154b <DOsvd+0x3bb>
mov    -0x48(%rbp),%rax
mov    -0x40(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x3c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%rcx
movslq -0x3c(%rbp),%rdx
mov    (%rcx,%rdx,4),%ecx
imul   -0x28(%rbp),%ecx
add    -0x40(%rbp),%ecx
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    14f0 <DOsvd+0x360>
jmp    1550 <DOsvd+0x3c0>
jmp    1555 <DOsvd+0x3c5>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1486 <DOsvd+0x2f6>
mov    -0x58(%rbp),%rdi
call   1080 <freeVect@plt>
mov    -0x50(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   10b0 <freeMatrix@plt>
mov    -0x48(%rbp),%rdi
mov    -0x28(%rbp),%esi
call   10b0 <freeMatrix@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DOsvd>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %r9d,%r15d
mov    %r8d,%r13d
mov    %rcx,0x40(%rsp)
mov    %rsi,0x20(%rsp)
mov    %rdi,(%rsp)
mov    0x90(%rsp),%eax
mov    %eax,0x10(%rsp)
cmp    %r9d,%r8d
mov    %r9d,%r12d
cmovg  %r8d,%r12d
mov    %r12d,%edi
mov    %r8d,%esi
call   1040 <allocMatrix@plt>
mov    %rax,%rbp
mov    %r13d,%edi
mov    %r13d,%esi
call   1040 <allocMatrix@plt>
mov    %rax,0x50(%rsp)
mov    %r13d,%edi
call   10b0 <allocVect@plt>
mov    %rax,0x8(%rsp)
mov    %r13d,%eax
mov    %rax,0x30(%rsp)
mov    %r15d,%eax
mov    %rax,0x28(%rsp)
test   %r13d,%r13d
jle    1372 <DOsvd+0x1d2>
movslq %r15d,%r8
xor    %ecx,%ecx
test   %r15d,%r15d
mov    $0x0,%r9d
cmovg  %r15d,%r9d
mov    %r12d,%r14d
mov    %r12d,%r10d
sub    %r9d,%r10d
not    %r9
add    %r14,%r9
mov    0x28(%rsp),%rbx
and    $0xfffffffe,%ebx
and    $0x3,%r10d
mov    (%rsp),%rax
add    $0x4,%rax
lea    0x0(,%r8,4),%r11
jmp    126e <DOsvd+0xce>
nopw   0x0(%rax,%rax,1)
add    %r11,%rax
cmp    0x30(%rsp),%rcx
je     1372 <DOsvd+0x1d2>
mov    $0x0,%edx
test   %r15d,%r15d
jle    12e1 <DOsvd+0x141>
xor    %edi,%edi
cmp    $0x1,%r15d
je     12b2 <DOsvd+0x112>
movss  -0x4(%rax,%rdi,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    0x8(%rbp,%rdi,8),%rdx
movsd  %xmm0,0x8(%rdx,%rcx,8)
movss  (%rax,%rdi,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    0x10(%rbp,%rdi,8),%rdx
add    $0x2,%rdi
movsd  %xmm0,0x8(%rdx,%rcx,8)
cmp    %rdi,%rbx
jne    1280 <DOsvd+0xe0>
mov    %r15d,%edx
testb  $0x1,0x28(%rsp)
je     12e1 <DOsvd+0x141>
mov    %rcx,%rdx
imul   %r8,%rdx
add    %rdi,%rdx
mov    (%rsp),%rsi
movss  (%rsi,%rdx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    0x8(%rbp,%rdi,8),%rdx
movsd  %xmm0,0x8(%rdx,%rcx,8)
mov    %r15d,%edx
add    $0x1,%rcx
cmp    %r12d,%edx
jge    1260 <DOsvd+0xc0>
mov    %edx,%edi
test   %r10,%r10
je     1317 <DOsvd+0x177>
mov    %r10,%rdx
nopl   0x0(%rax,%rax,1)
mov    0x8(%rbp,%rdi,8),%rsi
add    $0x1,%rdi
movq   $0x0,(%rsi,%rcx,8)
add    $0xffffffffffffffff,%rdx
jne    1300 <DOsvd+0x160>
cmp    $0x3,%r9
jb     1260 <DOsvd+0xc0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x8(%rbp,%rdi,8),%rdx
movq   $0x0,(%rdx,%rcx,8)
mov    0x10(%rbp,%rdi,8),%rdx
movq   $0x0,(%rdx,%rcx,8)
mov    0x18(%rbp,%rdi,8),%rdx
movq   $0x0,(%rdx,%rcx,8)
mov    0x20(%rbp,%rdi,8),%rdx
add    $0x4,%rdi
movq   $0x0,(%rdx,%rcx,8)
cmp    %rdi,%r14
jne    1330 <DOsvd+0x190>
jmp    1260 <DOsvd+0xc0>
mov    %rbp,%rdi
mov    %r12d,%esi
mov    %r13d,%edx
mov    0x8(%rsp),%rcx
mov    0x50(%rsp),%r8
call   10a0 <svdcmp@plt>
movslq %r13d,%rsi
mov    $0x4,%edi
call   1070 <calloc@plt>
mov    %rax,%r12
test   %r13d,%r13d
jle    13b9 <DOsvd+0x219>
mov    0x30(%rsp),%rax
lea    0x0(,%rax,4),%rdx
mov    %r12,%rdi
mov    $0xff,%esi
call   1060 <memset@plt>
cmpl   $0x0,0x10(%rsp)
jle    15da <DOsvd+0x43a>
mov    %r15,0x18(%rsp)
mov    0x30(%rsp),%r14
and    $0xfffffffe,%r14d
xor    %eax,%eax
mov    %rax,0x48(%rsp)
xor    %r15d,%r15d
mov    %r13d,0x14(%rsp)
jmp    1409 <DOsvd+0x269>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x1,%eax
mov    %rax,0x48(%rsp)
add    $0x1,%r15d
cmp    0x10(%rsp),%r15d
je     1554 <DOsvd+0x3b4>
test   %r13d,%r13d
jle    13f0 <DOsvd+0x250>
xor    %ebx,%ebx
movss  0xbe8(%rip),%xmm0
cmp    $0x1,%r13d
jne    1490 <DOsvd+0x2f0>
movss  %xmm0,(%rsp)
testb  $0x1,0x30(%rsp)
je     1470 <DOsvd+0x2d0>
cmpl   $0x0,(%r12,%rbx,4)
jns    1470 <DOsvd+0x2d0>
mov    0x8(%rsp),%rax
movsd  0x8(%rax,%rbx,8),%xmm0
call   1080 <fabs@plt>
ucomiss (%rsp),%xmm0
jbe    1470 <DOsvd+0x2d0>
mov    0x8(%rsp),%rax
movsd  0x8(%rax,%rbx,8),%xmm0
call   1080 <fabs@plt>
movss  %xmm0,(%rsp)
mov    %ebx,%eax
mov    %ebx,0x38(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movss  (%rsp),%xmm0
ucomiss 0xb88(%rip),%xmm0
jbe    1540 <DOsvd+0x3a0>
movslq 0x38(%rsp),%rax
mov    %r15d,(%r12,%rax,4)
jmp    154a <DOsvd+0x3aa>
movss  %xmm0,(%rsp)
jmp    14a9 <DOsvd+0x309>
nopw   0x0(%rax,%rax,1)
cmp    %rbx,%r14
je     1423 <DOsvd+0x283>
mov    %rbx,%r13
cmpl   $0x0,(%r12,%rbx,4)
jns    14f0 <DOsvd+0x350>
mov    0x8(%rsp),%rax
movsd  0x8(%rax,%r13,8),%xmm0
call   1080 <fabs@plt>
ucomiss (%rsp),%xmm0
jbe    14f0 <DOsvd+0x350>
mov    0x8(%rsp),%rax
movsd  0x8(%rax,%r13,8),%xmm0
call   1080 <fabs@plt>
movss  %xmm0,(%rsp)
mov    %r13d,%eax
mov    %r13d,0x38(%rsp)
nopl   0x0(%rax,%rax,1)
lea    0x2(%r13),%rbx
cmpl   $0x0,0x4(%r12,%r13,4)
jns    14a0 <DOsvd+0x300>
mov    0x8(%rsp),%rax
movsd  0x10(%rax,%r13,8),%xmm0
call   1080 <fabs@plt>
ucomiss (%rsp),%xmm0
jbe    14a0 <DOsvd+0x300>
mov    0x8(%rsp),%rax
movsd  0x10(%rax,%r13,8),%xmm0
call   1080 <fabs@plt>
movss  %xmm0,(%rsp)
add    $0x1,%r13d
mov    %r13d,%eax
mov    %r13d,0x38(%rsp)
jmp    14a0 <DOsvd+0x300>
nopw   0x0(%rax,%rax,1)
mov    $0x1,%eax
mov    %rax,0x48(%rsp)
mov    0x14(%rsp),%r13d
jmp    13fa <DOsvd+0x25a>
cmpl   $0x0,0x48(%rsp)
mov    0x18(%rsp),%r15
je     15da <DOsvd+0x43a>
lea    0xaa1(%rip),%rdi
call   1050 <puts@plt>
cmpl   $0x0,0x10(%rsp)
jle    15da <DOsvd+0x43a>
mov    0x28(%rsp),%rax
lea    0x0(,%rax,4),%rax
mov    %rax,(%rsp)
mov    0x10(%rsp),%eax
mov    %eax,%ecx
xor    %r15d,%r15d
cmp    $0x1,%eax
mov    %rcx,0x38(%rsp)
jne    16f7 <DOsvd+0x557>
xor    %ebx,%ebx
testb  $0x1,0x38(%rsp)
mov    0x18(%rsp),%r15
mov    0x14(%rsp),%r13d
je     15da <DOsvd+0x43a>
mov    0x40(%rsp),%rax
movl   $0x0,(%rax,%rbx,4)
test   %r15d,%r15d
jle    15da <DOsvd+0x43a>
imul   %r15d,%ebx
movslq %ebx,%rax
mov    0x20(%rsp),%rcx
lea    (%rcx,%rax,4),%rdi
xor    %esi,%esi
mov    (%rsp),%rdx
call   1060 <memset@plt>
test   %r13d,%r13d
mov    0x40(%rsp),%r10
jle    16bf <DOsvd+0x51f>
mov    0x28(%rsp),%rax
and    $0xfffffffe,%eax
mov    0x20(%rsp),%rcx
lea    0x4(%rcx),%r8
xor    %edx,%edx
jmp    1618 <DOsvd+0x478>
nopl   (%rax)
mov    0x8(%rsp),%rcx
movq   $0x0,(%rcx,%rdx,8)
cmp    0x30(%rsp),%rdx
je     16bf <DOsvd+0x51f>
mov    (%r12,%rdx,4),%esi
add    $0x1,%rdx
test   %esi,%esi
js     1600 <DOsvd+0x460>
mov    0x8(%rsp),%rcx
movsd  (%rcx,%rdx,8),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,(%r10,%rsi,4)
test   %r15d,%r15d
jle    160d <DOsvd+0x46d>
imul   %r15d,%esi
movslq %esi,%r9
cmp    $0x1,%r15d
jne    164e <DOsvd+0x4ae>
xor    %ecx,%ecx
jmp    1693 <DOsvd+0x4f3>
lea    (%r8,%r9,4),%rbx
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x8(%rbp,%rdi,8),%rcx
movsd  (%rcx,%rdx,8),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbx,%rdi,4)
lea    0x2(%rdi),%rcx
mov    0x10(%rbp,%rdi,8),%rsi
movsd  (%rsi,%rdx,8),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,(%rbx,%rdi,4)
mov    %rcx,%rdi
cmp    %rcx,%rax
jne    1660 <DOsvd+0x4c0>
testb  $0x1,0x28(%rsp)
je     160d <DOsvd+0x46d>
mov    0x8(%rbp,%rcx,8),%rsi
movsd  (%rsi,%rdx,8),%xmm0
cvtsd2ss %xmm0,%xmm0
add    %rcx,%r9
mov    0x20(%rsp),%rcx
movss  %xmm0,(%rcx,%r9,4)
jmp    160d <DOsvd+0x46d>
mov    0x8(%rsp),%rdi
call   1090 <freeVect@plt>
mov    0x50(%rsp),%rdi
mov    %r13d,%esi
call   10c0 <freeMatrix@plt>
mov    %rbp,%rdi
mov    %r15d,%esi
call   10c0 <freeMatrix@plt>
mov    %r12,%rdi
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>
mov    %ecx,%r13d
and    $0xfffffffe,%r13d
mov    0x18(%rsp),%rax
lea    (%rax,%rax,1),%r14d
xor    %ebx,%ebx
jmp    1720 <DOsvd+0x580>
nopl   0x0(%rax,%rax,1)
add    $0x2,%rbx
add    %r14d,%r15d
cmp    %rbx,%r13
je     159d <DOsvd+0x3fd>
mov    0x40(%rsp),%rax
movl   $0x0,(%rax,%rbx,4)
cmpl   $0x0,0x18(%rsp)
jle    174a <DOsvd+0x5aa>
movslq %r15d,%rax
mov    0x20(%rsp),%rcx
lea    (%rcx,%rax,4),%rdi
xor    %esi,%esi
mov    (%rsp),%rdx
call   1060 <memset@plt>
mov    0x40(%rsp),%rax
movl   $0x0,0x4(%rax,%rbx,4)
mov    0x18(%rsp),%rax
test   %eax,%eax
jle    1710 <DOsvd+0x570>
add    %r15d,%eax
cltq
mov    0x20(%rsp),%rcx
lea    (%rcx,%rax,4),%rdi
xor    %esi,%esi
mov    (%rsp),%rdx
call   1060 <memset@plt>
jmp    1710 <DOsvd+0x570>

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

LLVM IR (-O2):
@str = [62 x i8] c"Warning: To many degrees of freedom! File size may increase\00"
define void @DOsvd(float* nocapture %0, float* nocapture writeonly %1, float* nocapture readnone %2, float* nocapture writeonly %3, i32 %4, i32 %5, i32 %6) {
%8 = icmp sgt i32 %4, %5
%9 = select i1 %8, i32 %4, i32 %5
%10 = tail call double** @allocMatrix(i32 %9, i32 %4)
%11 = tail call double** @allocMatrix(i32 %4, i32 %4)
%12 = tail call double* @allocVect(i32 %4)
%13 = icmp sgt i32 %4, 0
br i1 %13, label %14, label %107
14: ; preds = %7
%15 = icmp sgt i32 %5, 0
%16 = sext i32 %5 to i64
%17 = zext i32 %4 to i64
%18 = zext i32 %5 to i64
%19 = zext i32 %9 to i64
%20 = call i32 @llvm.smax.i32(i32 %5, i32 0)
%21 = zext i32 %20 to i64
%22 = sub nsw i64 %19, %21
%23 = xor i64 %21, -1
%24 = add nsw i64 %23, %19
%25 = and i64 %18, 1
%26 = icmp eq i32 %5, 1
%27 = and i64 %18, 4294967294
%28 = icmp eq i64 %25, 0
%29 = and i64 %22, 3
%30 = icmp eq i64 %29, 0
%31 = icmp ult i64 %24, 3
br label %32
32: ; preds = %14, %105
%33 = phi i64 [ 0, %14 ], [ %51, %105 ]
br i1 %15, label %34, label %48
34: ; preds = %32
%35 = mul nsw i64 %33, %16
%36 = add nuw nsw i64 %33, 1
br i1 %26, label %37, label %65
37: ; preds = %65, %34
%38 = phi i64 [ 0, %34 ], [ %80, %65 ]
br i1 %28, label %48, label %39
39: ; preds = %37
%40 = add nsw i64 %38, %35
%41 = getelementptr inbounds float, float* %0, i64 %40
%42 = load float, float* %41
%43 = fpext float %42 to double
%44 = add nuw nsw i64 %38, 1
%45 = getelementptr inbounds double*, double** %10, i64 %44
%46 = load double*, double** %45
%47 = getelementptr inbounds double, double* %46, i64 %36
store double %43, double* %47
br label %48
48: ; preds = %39, %37, %32
%49 = phi i32 [ 0, %32 ], [ %5, %37 ], [ %5, %39 ]
%50 = icmp slt i32 %49, %9
%51 = add nuw nsw i64 %33, 1
br i1 %50, label %52, label %105
52: ; preds = %48
%53 = zext i32 %49 to i64
br i1 %30, label %63, label %54
54: ; preds = %52, %54
%55 = phi i64 [ %57, %54 ], [ %53, %52 ]
%56 = phi i64 [ %61, %54 ], [ 0, %52 ]
%57 = add nuw nsw i64 %55, 1
%58 = getelementptr inbounds double*, double** %10, i64 %57
%59 = load double*, double** %58
%60 = getelementptr inbounds double, double* %59, i64 %51
store double 0.000000e+00, double* %60
%61 = add i64 %56, 1
%62 = icmp eq i64 %61, %29
br i1 %62, label %63, label %54
63: ; preds = %54, %52
%64 = phi i64 [ %53, %52 ], [ %57, %54 ]
br i1 %31, label %105, label %86
65: ; preds = %34, %65
%66 = phi i64 [ %80, %65 ], [ 0, %34 ]
%67 = phi i64 [ %84, %65 ], [ 0, %34 ]
%68 = add nsw i64 %66, %35
%69 = getelementptr inbounds float, float* %0, i64 %68
%70 = load float, float* %69
%71 = fpext float %70 to double
%72 = or i64 %66, 1
%73 = getelementptr inbounds double*, double** %10, i64 %72
%74 = load double*, double** %73
%75 = getelementptr inbounds double, double* %74, i64 %36
store double %71, double* %75
%76 = add nsw i64 %72, %35
%77 = getelementptr inbounds float, float* %0, i64 %76
%78 = load float, float* %77
%79 = fpext float %78 to double
%80 = add nuw nsw i64 %66, 2
%81 = getelementptr inbounds double*, double** %10, i64 %80
%82 = load double*, double** %81
%83 = getelementptr inbounds double, double* %82, i64 %36
store double %79, double* %83
%84 = add nuw i64 %67, 2
%85 = icmp eq i64 %84, %27
br i1 %85, label %37, label %65
86: ; preds = %63, %86
%87 = phi i64 [ %100, %86 ], [ %64, %63 ]
%88 = add nuw nsw i64 %87, 1
%89 = getelementptr inbounds double*, double** %10, i64 %88
%90 = load double*, double** %89
%91 = getelementptr inbounds double, double* %90, i64 %51
store double 0.000000e+00, double* %91
%92 = add nuw nsw i64 %87, 2
%93 = getelementptr inbounds double*, double** %10, i64 %92
%94 = load double*, double** %93
%95 = getelementptr inbounds double, double* %94, i64 %51
store double 0.000000e+00, double* %95
%96 = add nuw nsw i64 %87, 3
%97 = getelementptr inbounds double*, double** %10, i64 %96
%98 = load double*, double** %97
%99 = getelementptr inbounds double, double* %98, i64 %51
store double 0.000000e+00, double* %99
%100 = add nuw nsw i64 %87, 4
%101 = getelementptr inbounds double*, double** %10, i64 %100
%102 = load double*, double** %101
%103 = getelementptr inbounds double, double* %102, i64 %51
store double 0.000000e+00, double* %103
%104 = icmp eq i64 %100, %19
br i1 %104, label %105, label %86
105: ; preds = %63, %86, %48
%106 = icmp eq i64 %51, %17
br i1 %106, label %107, label %32
107: ; preds = %105, %7
%108 = tail call i32 @svdcmp(double** %10, i32 %9, i32 %4, double* %12, double** %11)
%109 = sext i32 %4 to i64
%110 = tail call i32* @calloc(i32 4, i64 %109)
br i1 %13, label %111, label %115
111: ; preds = %107
%112 = bitcast i32* %110 to i8*
%113 = zext i32 %4 to i64
%114 = shl nuw nsw i64 %113, 2
br label %115
115: ; preds = %111, %107
%116 = icmp sgt i32 %6, 0
br i1 %116, label %117, label %246
117: ; preds = %115
%118 = zext i32 %4 to i64
%119 = and i64 %118, 1
%120 = icmp eq i32 %4, 1
%121 = and i64 %118, 4294967294
%122 = icmp eq i64 %119, 0
br label %123
123: ; preds = %117, %194
%124 = phi i32 [ undef, %117 ], [ %195, %194 ]
%125 = phi i32 [ 0, %117 ], [ %196, %194 ]
%126 = phi i32 [ 0, %117 ], [ %197, %194 ]
br i1 %13, label %127, label %194
127: ; preds = %123
br i1 %120, label %167, label %128
128: ; preds = %127, %162
%129 = phi i64 [ %152, %162 ], [ 0, %127 ]
%130 = phi i32 [ %164, %162 ], [ %124, %127 ]
%131 = phi float [ %163, %162 ], [ -1.000000e+00, %127 ]
%132 = phi i64 [ %165, %162 ], [ 0, %127 ]
%133 = getelementptr inbounds i32, i32* %110, i64 %129
%134 = load i32, i32* %133
%135 = icmp slt i32 %134, 0
%136 = or i64 %129, 1
br i1 %135, label %137, label %146
137: ; preds = %128
%138 = getelementptr inbounds double, double* %12, i64 %136
%139 = load double, double* %138
%140 = tail call float @fabs(double %139)
%141 = fcmp ogt float %140, %131
br i1 %141, label %142, label %146
142: ; preds = %137
%143 = load double, double* %138
%144 = tail call float @fabs(double %143)
%145 = trunc i64 %129 to i32
br label %146
146: ; preds = %128, %137, %142
%147 = phi float [ %131, %137 ], [ %144, %142 ], [ %131, %128 ]
%148 = phi i32 [ %130, %137 ], [ %145, %142 ], [ %130, %128 ]
%149 = getelementptr inbounds i32, i32* %110, i64 %136
%150 = load i32, i32* %149
%151 = icmp slt i32 %150, 0
%152 = add nuw nsw i64 %129, 2
br i1 %151, label %153, label %162
153: ; preds = %146
%154 = getelementptr inbounds double, double* %12, i64 %152
%155 = load double, double* %154
%156 = tail call float @fabs(double %155)
%157 = fcmp ogt float %156, %147
br i1 %157, label %158, label %162
158: ; preds = %153
%159 = load double, double* %154
%160 = tail call float @fabs(double %159)
%161 = trunc i64 %136 to i32
br label %162
162: ; preds = %158, %153, %146
%163 = phi float [ %147, %153 ], [ %160, %158 ], [ %147, %146 ]
%164 = phi i32 [ %148, %153 ], [ %161, %158 ], [ %148, %146 ]
%165 = add i64 %132, 2
%166 = icmp eq i64 %165, %121
br i1 %166, label %167, label %128
167: ; preds = %162, %127
%168 = phi float [ undef, %127 ], [ %163, %162 ]
%169 = phi i32 [ undef, %127 ], [ %164, %162 ]
%170 = phi i64 [ 0, %127 ], [ %152, %162 ]
%171 = phi i32 [ %124, %127 ], [ %164, %162 ]
%172 = phi float [ -1.000000e+00, %127 ], [ %163, %162 ]
br i1 %122, label %187, label %173
173: ; preds = %167
%174 = getelementptr inbounds i32, i32* %110, i64 %170
%175 = load i32, i32* %174
%176 = icmp slt i32 %175, 0
br i1 %176, label %177, label %187
177: ; preds = %173
%178 = add nuw nsw i64 %170, 1
%179 = getelementptr inbounds double, double* %12, i64 %178
%180 = load double, double* %179
%181 = tail call float @fabs(double %180)
%182 = fcmp ogt float %181, %172
br i1 %182, label %183, label %187
183: ; preds = %177
%184 = load double, double* %179
%185 = tail call float @fabs(double %184)
%186 = trunc i64 %170 to i32
br label %187
187: ; preds = %173, %177, %183, %167
%188 = phi float [ %168, %167 ], [ %172, %177 ], [ %185, %183 ], [ %172, %173 ]
%189 = phi i32 [ %169, %167 ], [ %171, %177 ], [ %186, %183 ], [ %171, %173 ]
%190 = fcmp ogt float %188, 0.000000e+00
br i1 %190, label %191, label %194
191: ; preds = %187
%192 = sext i32 %189 to i64
%193 = getelementptr inbounds i32, i32* %110, i64 %192
store i32 %126, i32* %193
br label %194
194: ; preds = %123, %187, %191
%195 = phi i32 [ %189, %191 ], [ %189, %187 ], [ %124, %123 ]
%196 = phi i32 [ %125, %191 ], [ 1, %187 ], [ 1, %123 ]
%197 = add nuw nsw i32 %126, 1
%198 = icmp eq i32 %197, %6
br i1 %198, label %199, label %123
199: ; preds = %194
%200 = icmp eq i32 %196, 0
br i1 %200, label %246, label %201
201: ; preds = %199
%202 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str, i64 0, i64 0))
br i1 %116, label %203, label %246
203: ; preds = %201
%204 = icmp sgt i32 %5, 0
%205 = zext i32 %5 to i64
%206 = shl nuw nsw i64 %205, 2
%207 = zext i32 %6 to i64
%208 = and i64 %207, 1
%209 = icmp eq i32 %6, 1
br i1 %209, label %235, label %210
210: ; preds = %203
%211 = and i64 %207, 4294967294
br label %212
212: ; preds = %231, %210
%213 = phi i64 [ 0, %210 ], [ %232, %231 ]
%214 = phi i64 [ 0, %210 ], [ %233, %231 ]
%215 = getelementptr inbounds float, float* %3, i64 %213
store float 0.000000e+00, float* %215
br i1 %204, label %216, label %222
216: ; preds = %212
%217 = trunc i64 %213 to i32
%218 = mul i32 %217, %5
%219 = sext i32 %218 to i64
%220 = getelementptr float, float* %1, i64 %219
%221 = bitcast float* %220 to i8*
br label %222
222: ; preds = %216, %212
%223 = or i64 %213, 1
%224 = getelementptr inbounds float, float* %3, i64 %223
store float 0.000000e+00, float* %224
br i1 %204, label %225, label %231
225: ; preds = %222
%226 = trunc i64 %223 to i32
%227 = mul i32 %226, %5
%228 = sext i32 %227 to i64
%229 = getelementptr float, float* %1, i64 %228
%230 = bitcast float* %229 to i8*
br label %231
231: ; preds = %225, %222
%232 = add nuw nsw i64 %213, 2
%233 = add i64 %214, 2
%234 = icmp eq i64 %233, %211
br i1 %234, label %235, label %212
235: ; preds = %231, %203
%236 = phi i64 [ 0, %203 ], [ %232, %231 ]
%237 = icmp eq i64 %208, 0
br i1 %237, label %246, label %238
238: ; preds = %235
%239 = getelementptr inbounds float, float* %3, i64 %236
store float 0.000000e+00, float* %239
br i1 %204, label %240, label %246
240: ; preds = %238
%241 = trunc i64 %236 to i32
%242 = mul i32 %241, %5
%243 = sext i32 %242 to i64
%244 = getelementptr float, float* %1, i64 %243
%245 = bitcast float* %244 to i8*
br label %246
246: ; preds = %235, %240, %238, %115, %201, %199
br i1 %13, label %247, label %305
247: ; preds = %246
%248 = icmp sgt i32 %5, 0
%249 = zext i32 %4 to i64
%250 = zext i32 %5 to i64
%251 = and i64 %250, 1
%252 = icmp eq i32 %5, 1
%253 = and i64 %250, 4294967294
%254 = icmp eq i64 %251, 0
br label %255
255: ; preds = %247, %303
%256 = phi i64 [ 0, %247 ], [ %260, %303 ]
%257 = getelementptr inbounds i32, i32* %110, i64 %256
%258 = load i32, i32* %257
%259 = icmp slt i32 %258, 0
%260 = add nuw nsw i64 %256, 1
%261 = getelementptr inbounds double, double* %12, i64 %260
br i1 %259, label %262, label %263
262: ; preds = %255
store double 0.000000e+00, double* %261
br label %303
263: ; preds = %255
%264 = load double, double* %261
%265 = fptrunc double %264 to float
%266 = zext i32 %258 to i64
%267 = getelementptr inbounds float, float* %3, i64 %266
store float %265, float* %267
br i1 %248, label %268, label %303
268: ; preds = %263
%269 = mul nsw i32 %258, %5
%270 = sext i32 %269 to i64
br i1 %252, label %292, label %271
271: ; preds = %268, %271
%272 = phi i64 [ %282, %271 ], [ 0, %268 ]
%273 = phi i64 [ %290, %271 ], [ 0, %268 ]
%274 = or i64 %272, 1
%275 = getelementptr inbounds double*, double** %10, i64 %274
%276 = load double*, double** %275
%277 = getelementptr inbounds double, double* %276, i64 %260
%278 = load double, double* %277
%279 = fptrunc double %278 to float
%280 = add nsw i64 %272, %270
%281 = getelementptr inbounds float, float* %1, i64 %280
store float %279, float* %281
%282 = add nuw nsw i64 %272, 2
%283 = getelementptr inbounds double*, double** %10, i64 %282
%284 = load double*, double** %283
%285 = getelementptr inbounds double, double* %284, i64 %260
%286 = load double, double* %285
%287 = fptrunc double %286 to float
%288 = add nsw i64 %274, %270
%289 = getelementptr inbounds float, float* %1, i64 %288
store float %287, float* %289
%290 = add i64 %273, 2
%291 = icmp eq i64 %290, %253
br i1 %291, label %292, label %271
292: ; preds = %271, %268
%293 = phi i64 [ 0, %268 ], [ %282, %271 ]
br i1 %254, label %303, label %294
294: ; preds = %292
%295 = add nuw nsw i64 %293, 1
%296 = getelementptr inbounds double*, double** %10, i64 %295
%297 = load double*, double** %296
%298 = getelementptr inbounds double, double* %297, i64 %260
%299 = load double, double* %298
%300 = fptrunc double %299 to float
%301 = add nsw i64 %293, %270
%302 = getelementptr inbounds float, float* %1, i64 %301
store float %300, float* %302
br label %303
303: ; preds = %294, %292, %263, %262
%304 = icmp eq i64 %260, %249
br i1 %304, label %305, label %255
305: ; preds = %303, %246
%306 = tail call i32 @freeVect(double* %12)
%307 = tail call i32 @freeMatrix(double** %11, i32 %4)
%308 = tail call i32 @freeMatrix(double** %10, i32 %5)
%309 = tail call i32 @free(i32* %110)
ret void
}