#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*/ decorr_image_sysrem(double *, double **, double **, double *,
                                       int, int, int **, double, double,
                                       double *, double);
int /*<<< orphan*/ decorr_star_sysrem(double *, double **, double **, double *,
                                      int, int, int **, double, double *,
                                      double);
int /*<<< orphan*/ free(double *);
int /*<<< orphan*/ isinf(double);
int /*<<< orphan*/ isnan(double);
double itersolve_chisqr_sysrem(double *, double *, int, int, double **,
                               double **, double *, double, double, double,
                               int **);
int /*<<< orphan*/ magcorr_sysrem(double *, double *, double **, double **, int,
                                  int);
scalar_t__ malloc(int);
double sqrt(double);
int iter_solve_sysrem(int starttype, int maxits, double convergeval,
                      double *star_coeff, double *image_coeff, double **mag,
                      double **sig, double *mag_ave, int numlc, int numJD,
                      int **clip, double sigma_clip2, double upperdiff,
                      double saturation) {
  double converged = 0, image_coeff_stddev, image_coeff_ave;
  int iternum = 0, ngood;
  double oldchisqr, newchisqr;
  double *old_star_coeff, *old_image_coeff;
  long double var1, var2;
  int j, k;
  oldchisqr = itersolve_chisqr_sysrem(star_coeff, image_coeff, numlc, numJD,
                                      mag, sig, mag_ave, sigma_clip2, upperdiff,
                                      saturation, clip);
  old_star_coeff = (double *)malloc(numlc * sizeof(double));
  old_image_coeff = (double *)malloc(numJD * sizeof(double));
  while (iternum <= maxits && !converged) {
    if (starttype == 1) {
      for (j = 0; j < numlc; j++)
        old_star_coeff[j] = star_coeff[j];
      decorr_star_sysrem(star_coeff, mag, sig, mag_ave, numlc, numJD, clip,
                         sigma_clip2, image_coeff, saturation);
      starttype = 0;
    } else {
      for (k = 0; k < numJD; k++)
        old_image_coeff[k] = image_coeff[k];
      decorr_image_sysrem(star_coeff, mag, sig, mag_ave, numlc, numJD, clip,
                          sigma_clip2, upperdiff, image_coeff, saturation);
      var1 = 0.;
      var2 = 0.;
      ngood = 0;
      for (k = 0; k < numJD; k++) {
        if (!isnan(image_coeff[k]) && !isinf(image_coeff[k])) {
          var1 += image_coeff[k];
          var2 += image_coeff[k] * image_coeff[k];
          ngood++;
        }
      }
      image_coeff_stddev =
          sqrt((double)(var2 / (long double)ngood -
                        (var1 * var1 / (long double)(ngood * ngood))));
      image_coeff_ave = (double)(var1 / (long double)ngood);
      for (k = 0; k < numJD; k++) {
        if (!isnan(image_coeff[k]) && !isinf(image_coeff[k])) {
          image_coeff[k] =
              (image_coeff[k] - image_coeff_ave) / image_coeff_stddev;
        }
      }
      starttype = 1;
    }
    iternum++;
    newchisqr = itersolve_chisqr_sysrem(star_coeff, image_coeff, numlc, numJD,
                                        mag, sig, mag_ave, sigma_clip2,
                                        upperdiff, saturation, clip);
    if (newchisqr > oldchisqr) {
      if (starttype == 1)
        for (k = 0; k < numJD; k++)
          image_coeff[k] = old_image_coeff[k];
      if (starttype == 0)
        for (j = 0; j < numlc; j++)
          star_coeff[j] = old_star_coeff[j];
      converged = 1;
    } else if (oldchisqr - newchisqr < convergeval)
      converged = 1;
    oldchisqr = newchisqr;
  }
  decorr_star_sysrem(star_coeff, mag, sig, mag_ave, numlc, numJD, clip,
                     sigma_clip2, image_coeff, saturation);
  free(old_star_coeff);
  free(old_image_coeff);
  magcorr_sysrem(star_coeff, image_coeff, mag, sig, numlc, numJD);
  return iternum;
}


x86 assembly (clang, -O0):
<iter_solve_sysrem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movsd  %xmm1,-0x38(%rbp)
movsd  %xmm2,-0x40(%rbp)
movsd  %xmm3,-0x48(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
movl   $0x0,-0x64(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    0x18(%rbp),%edx
mov    0x20(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    0x10(%rbp),%r10
movsd  -0x38(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm2
mov    0x28(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1040 <itersolve_chisqr_sysrem@plt>
movsd  %xmm0,-0x70(%rbp)
movslq 0x18(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0x80(%rbp)
movslq 0x20(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0x88(%rbp)
mov    -0x64(%rbp),%ecx
xor    %eax,%eax
cmp    -0x8(%rbp),%ecx
mov    %al,-0xe1(%rbp)
jg     127b <iter_solve_sysrem+0xeb>
movsd  -0x50(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
setne  %al
setp   %cl
or     %cl,%al
xor    $0xff,%al
mov    %al,-0xe1(%rbp)
mov    -0xe1(%rbp),%al
test   $0x1,%al
jne    128e <iter_solve_sysrem+0xfe>
jmp    1704 <iter_solve_sysrem+0x574>
cmpl   $0x1,-0x4(%rbp)
jne    1329 <iter_solve_sysrem+0x199>
movl   $0x0,-0xb4(%rbp)
mov    -0xb4(%rbp),%eax
cmp    0x18(%rbp),%eax
jge    12e5 <iter_solve_sysrem+0x155>
mov    -0x18(%rbp),%rax
movslq -0xb4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x80(%rbp),%rax
movslq -0xb4(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    12a2 <iter_solve_sysrem+0x112>
mov    -0x18(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    0x10(%rbp),%rcx
mov    0x18(%rbp),%r8d
mov    0x20(%rbp),%r9d
mov    0x28(%rbp),%r10
movsd  -0x38(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  -0x48(%rbp),%xmm1
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1070 <decorr_star_sysrem@plt>
movl   $0x0,-0x4(%rbp)
jmp    15a4 <iter_solve_sysrem+0x414>
movl   $0x0,-0xb8(%rbp)
mov    -0xb8(%rbp),%eax
cmp    0x20(%rbp),%eax
jge    1379 <iter_solve_sysrem+0x1e9>
mov    -0x20(%rbp),%rax
movslq -0xb8(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x88(%rbp),%rax
movslq -0xb8(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xb8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb8(%rbp)
jmp    1333 <iter_solve_sysrem+0x1a3>
mov    -0x18(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    0x10(%rbp),%rcx
mov    0x18(%rbp),%r8d
mov    0x20(%rbp),%r9d
mov    0x28(%rbp),%r10
movsd  -0x38(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
mov    -0x20(%rbp),%r11
movsd  -0x48(%rbp),%xmm2
mov    %rsp,%rax
mov    %r11,0x8(%rax)
mov    %r10,(%rax)
call   1050 <decorr_image_sysrem@plt>
fldz
fld    %st(0)
fstpt  -0xa0(%rbp)
fstpt  -0xb0(%rbp)
movl   $0x0,-0x68(%rbp)
movl   $0x0,-0xb8(%rbp)
mov    -0xb8(%rbp),%eax
cmp    0x20(%rbp),%eax
jge    1491 <iter_solve_sysrem+0x301>
mov    -0x20(%rbp),%rax
movslq -0xb8(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1090 <isnan@plt>
cmp    $0x0,%eax
jne    1478 <iter_solve_sysrem+0x2e8>
mov    -0x20(%rbp),%rax
movslq -0xb8(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   10b0 <isinf@plt>
cmp    $0x0,%eax
jne    1478 <iter_solve_sysrem+0x2e8>
mov    -0x20(%rbp),%rax
movslq -0xb8(%rbp),%rcx
fldl   (%rax,%rcx,8)
fldt   -0xa0(%rbp)
faddp  %st,%st(1)
fstpt  -0xa0(%rbp)
mov    -0x20(%rbp),%rax
movslq -0xb8(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  %xmm0,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
fldl   -0xe0(%rbp)
fldt   -0xb0(%rbp)
faddp  %st,%st(1)
fstpt  -0xb0(%rbp)
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    147d <iter_solve_sysrem+0x2ed>
mov    -0xb8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb8(%rbp)
jmp    13d8 <iter_solve_sysrem+0x248>
fldt   -0xb0(%rbp)
mov    -0x68(%rbp),%eax
mov    %eax,-0xc4(%rbp)
fildl  -0xc4(%rbp)
fdivrp %st,%st(1)
fldt   -0xa0(%rbp)
fmul   %st,%st(0)
imul   %eax,%eax
mov    %eax,-0xc0(%rbp)
fildl  -0xc0(%rbp)
fdivrp %st,%st(1)
fsubrp %st,%st(1)
fstpl  -0xd0(%rbp)
movsd  -0xd0(%rbp),%xmm0
ff
call   10a0 <sqrt@plt>
movsd  %xmm0,-0x58(%rbp)
fldt   -0xa0(%rbp)
mov    -0x68(%rbp),%eax
mov    %eax,-0xbc(%rbp)
fildl  -0xbc(%rbp)
fdivrp %st,%st(1)
fstpl  -0xd8(%rbp)
movsd  -0xd8(%rbp),%xmm0
ff
movsd  %xmm0,-0x60(%rbp)
movl   $0x0,-0xb8(%rbp)
mov    -0xb8(%rbp),%eax
cmp    0x20(%rbp),%eax
jge    159d <iter_solve_sysrem+0x40d>
mov    -0x20(%rbp),%rax
movslq -0xb8(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1090 <isnan@plt>
cmp    $0x0,%eax
jne    1584 <iter_solve_sysrem+0x3f4>
mov    -0x20(%rbp),%rax
movslq -0xb8(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   10b0 <isinf@plt>
cmp    $0x0,%eax
jne    1584 <iter_solve_sysrem+0x3f4>
mov    -0x20(%rbp),%rax
movslq -0xb8(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x60(%rbp),%xmm0
divsd  -0x58(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movslq -0xb8(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1589 <iter_solve_sysrem+0x3f9>
mov    -0xb8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb8(%rbp)
jmp    150f <iter_solve_sysrem+0x37f>
movl   $0x1,-0x4(%rbp)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    0x18(%rbp),%edx
mov    0x20(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    0x10(%rbp),%r10
movsd  -0x38(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm2
mov    0x28(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1040 <itersolve_chisqr_sysrem@plt>
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
ucomisd -0x70(%rbp),%xmm0
jbe    16ca <iter_solve_sysrem+0x53a>
cmpl   $0x1,-0x4(%rbp)
jne    165c <iter_solve_sysrem+0x4cc>
movl   $0x0,-0xb8(%rbp)
mov    -0xb8(%rbp),%eax
cmp    0x20(%rbp),%eax
jge    1657 <iter_solve_sysrem+0x4c7>
mov    -0x88(%rbp),%rax
movslq -0xb8(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0xb8(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xb8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb8(%rbp)
jmp    1611 <iter_solve_sysrem+0x481>
jmp    165c <iter_solve_sysrem+0x4cc>
cmpl   $0x0,-0x4(%rbp)
jne    16b8 <iter_solve_sysrem+0x528>
movl   $0x0,-0xb4(%rbp)
mov    -0xb4(%rbp),%eax
cmp    0x18(%rbp),%eax
jge    16b3 <iter_solve_sysrem+0x523>
mov    -0x80(%rbp),%rax
movslq -0xb4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0xb4(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    1670 <iter_solve_sysrem+0x4e0>
jmp    16b8 <iter_solve_sysrem+0x528>
movsd  0x940(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    16f5 <iter_solve_sysrem+0x565>
movsd  -0x70(%rbp),%xmm1
subsd  -0x78(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    16f0 <iter_solve_sysrem+0x560>
movsd  0x915(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    16f5 <iter_solve_sysrem+0x565>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
jmp    124b <iter_solve_sysrem+0xbb>
mov    -0x18(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    0x10(%rbp),%rcx
mov    0x18(%rbp),%r8d
mov    0x20(%rbp),%r9d
mov    0x28(%rbp),%r10
movsd  -0x38(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  -0x48(%rbp),%xmm1
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1070 <decorr_star_sysrem@plt>
mov    -0x80(%rbp),%rdi
call   1030 <free@plt>
mov    -0x88(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    0x18(%rbp),%r8d
mov    0x20(%rbp),%r9d
call   1060 <magcorr_sysrem@plt>
mov    -0x64(%rbp),%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iter_solve_sysrem>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x178,%rsp
mov    %r8,%r15
mov    %rcx,%r13
mov    %rdx,%r12
movsd  %xmm0,0x150(%rsp)
mov    %esi,%ebp
mov    %edi,0x4c(%rsp)
mov    0x1c0(%rsp),%ecx
mov    0x1b8(%rsp),%r14d
mov    %rdx,%rdi
mov    %r13,%rsi
mov    %r14d,%edx
mov    %r9,0x60(%rsp)
movsd  %xmm1,0x20(%rsp)
movapd %xmm1,%xmm0
movsd  %xmm2,0x70(%rsp)
movapd %xmm2,%xmm1
movsd  %xmm3,0x28(%rsp)
movaps %xmm3,%xmm2
push   0x1c8(%rsp)
push   0x1b8(%rsp)
call   1040 <itersolve_chisqr_sysrem@plt>
add    $0x10,%rsp
movsd  %xmm0,0xb8(%rsp)
lea    0x0(,%r14,8),%edi
call   1080 <malloc@plt>
mov    %rax,%rbx
mov    0x1c0(%rsp),%eax
lea    0x0(,%rax,8),%edi
call   1080 <malloc@plt>
mov    %ebp,0x88(%rsp)
test   %ebp,%ebp
mov    %rbx,0x68(%rsp)
mov    %rax,0x50(%rsp)
js     1aac <iter_solve_sysrem+0x91c>
mov    %rbx,%r11
cmp    $0x2,%r14d
mov    $0x1,%ecx
cmovge %r14d,%ecx
mov    %ecx,0x84(%rsp)
mov    0x1c0(%rsp),%ecx
mov    %ecx,%r10d
mov    %r14d,%ebp
lea    (%rax,%r10,8),%r8
lea    0x0(,%r10,8),%rcx
add    %r13,%rcx
mov    %r10d,%esi
and    $0xfffffffc,%esi
mov    %rsi,0x128(%rsp)
add    $0xfffffffffffffffc,%rsi
mov    %rsi,0xa8(%rsp)
shr    $0x2,%rsi
add    $0x1,%rsi
mov    %ebp,%edi
and    $0xfffffffc,%edi
mov    %rdi,0x120(%rsp)
add    $0xfffffffffffffffc,%rdi
mov    %rdi,0x118(%rsp)
shr    $0x2,%rdi
add    $0x1,%rdi
mov    %rcx,0xc8(%rsp)
cmp    %rcx,%rax
setb   %r9b
mov    %r8,0xd0(%rsp)
cmp    %r13,%r8
seta   %cl
and    %r9b,%cl
mov    %cl,0x7(%rsp)
mov    %esi,%edx
and    $0x3,%edx
mov    %rsi,0xc0(%rsp)
and    $0xfffffffffffffffc,%rsi
mov    %rsi,0xd8(%rsp)
mov    %r10,0x18(%rsp)
and    $0x3,%r10d
mov    %r10,0x130(%rsp)
lea    (%r12,%rbp,8),%rcx
cmp    %rcx,%rbx
setb   %sil
lea    (%rbx,%rbp,8),%rcx
cmp    %r12,%rcx
seta   %cl
and    %sil,%cl
mov    %cl,0x6(%rsp)
mov    %edi,%ecx
and    $0x3,%ecx
and    $0xfffffffffffffffc,%rdi
mov    %rdi,0xe0(%rsp)
mov    %ebp,%r8d
and    $0x3,%r8d
mov    %rdx,0x110(%rsp)
shl    $0x5,%rdx
mov    %rdx,0xa0(%rsp)
mov    %rcx,0x108(%rsp)
mov    %rcx,%rbx
shl    $0x5,%rbx
fldz
fstpt  0x94(%rsp)
add    $0x10,%rax
mov    %rax,0x100(%rsp)
lea    0x10(%r13),%rax
mov    %rax,0xf8(%rsp)
lea    0x10(%r11),%rax
mov    %rax,0xf0(%rsp)
lea    0x10(%r12),%rax
mov    %rax,0xe8(%rsp)
xor    %eax,%eax
mov    %rax,0x78(%rsp)
mov    %r15,0x40(%rsp)
movsd  0x28(%rsp),%xmm2
movsd  0x20(%rsp),%xmm3
mov    0x60(%rsp),%rdx
mov    0x4c(%rsp),%ecx
mov    %rbp,0x148(%rsp)
mov    %r8,0x140(%rsp)
mov    %rbx,0x138(%rsp)
mov    %r12,0x58(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmp    $0x1,%ecx
mov    %ecx,0x4c(%rsp)
jne    1420 <iter_solve_sysrem+0x290>
test   %r14d,%r14d
mov    0x68(%rsp),%rsi
jle    15eb <iter_solve_sysrem+0x45b>
cmp    $0x4,%r14d
setb   %al
or     0x6(%rsp),%al
je     147d <iter_solve_sysrem+0x2ed>
xor    %eax,%eax
jmp    157f <iter_solve_sysrem+0x3ef>
nopl   0x0(%rax,%rax,1)
mov    0x1c0(%rsp),%r9d
test   %r9d,%r9d
jle    144b <iter_solve_sysrem+0x2bb>
cmp    $0x4,%r9d
setb   %al
or     0x7(%rsp),%al
je     148f <iter_solve_sysrem+0x2ff>
xor    %eax,%eax
mov    0x50(%rsp),%rsi
mov    0x18(%rsp),%rdi
jmp    1728 <iter_solve_sysrem+0x598>
mov    %r12,%rdi
mov    %r15,%rsi
mov    0x1b0(%rsp),%rcx
mov    %r14d,%r8d
movapd %xmm3,%xmm0
movsd  0x70(%rsp),%xmm1
push   %r13
push   0x1d0(%rsp)
call   1050 <decorr_image_sysrem@plt>
add    $0x10,%rsp
jmp    1880 <iter_solve_sysrem+0x6f0>
cmpq   $0xc,0x118(%rsp)
jae    14b2 <iter_solve_sysrem+0x322>
xor    %eax,%eax
jmp    1524 <iter_solve_sysrem+0x394>
cmpq   $0xc,0xa8(%rsp)
jae    1644 <iter_solve_sysrem+0x4b4>
xor    %eax,%eax
mov    0x50(%rsp),%rsi
mov    0xa0(%rsp),%rbp
jmp    16c5 <iter_solve_sysrem+0x535>
mov    0xe0(%rsp),%rcx
xor    %eax,%eax
nopl   0x0(%rax)
movups (%r12,%rax,8),%xmm0
movups 0x10(%r12,%rax,8),%xmm1
movups %xmm0,(%rsi,%rax,8)
movups %xmm1,0x10(%rsi,%rax,8)
movups 0x20(%r12,%rax,8),%xmm0
movups 0x30(%r12,%rax,8),%xmm1
movups %xmm0,0x20(%rsi,%rax,8)
movups %xmm1,0x30(%rsi,%rax,8)
movups 0x40(%r12,%rax,8),%xmm0
movups 0x50(%r12,%rax,8),%xmm1
movups %xmm0,0x40(%rsi,%rax,8)
movups %xmm1,0x50(%rsi,%rax,8)
movupd 0x60(%r12,%rax,8),%xmm0
movupd 0x70(%r12,%rax,8),%xmm1
movupd %xmm0,0x60(%rsi,%rax,8)
movupd %xmm1,0x70(%rsi,%rax,8)
add    $0x10,%rax
add    $0xfffffffffffffffc,%rcx
jne    14c0 <iter_solve_sysrem+0x330>
cmpq   $0x0,0x108(%rsp)
je     156f <iter_solve_sysrem+0x3df>
mov    0xf0(%rsp),%rcx
lea    (%rcx,%rax,8),%rcx
mov    0xe8(%rsp),%rdi
lea    (%rdi,%rax,8),%rax
xor    %edi,%edi
nopl   0x0(%rax)
movupd -0x10(%rax,%rdi,1),%xmm0
movupd (%rax,%rdi,1),%xmm1
movupd %xmm0,-0x10(%rcx,%rdi,1)
movupd %xmm1,(%rcx,%rdi,1)
add    $0x20,%rdi
cmp    %rdi,%rbx
jne    1550 <iter_solve_sysrem+0x3c0>
mov    0x120(%rsp),%rcx
mov    %rcx,%rax
cmp    %rbp,%rcx
je     15eb <iter_solve_sysrem+0x45b>
mov    %rax,%rcx
not    %rcx
add    %rbp,%rcx
test   %r8,%r8
je     15a5 <iter_solve_sysrem+0x415>
mov    %r8,%rdi
movsd  (%r12,%rax,8),%xmm0
movsd  %xmm0,(%rsi,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rdi
jne    1590 <iter_solve_sysrem+0x400>
cmp    $0x3,%rcx
jb     15eb <iter_solve_sysrem+0x45b>
nopl   0x0(%rax,%rax,1)
movsd  (%r12,%rax,8),%xmm0
movsd  %xmm0,(%rsi,%rax,8)
movsd  0x8(%r12,%rax,8),%xmm0
movsd  %xmm0,0x8(%rsi,%rax,8)
movsd  0x10(%r12,%rax,8),%xmm0
movsd  %xmm0,0x10(%rsi,%rax,8)
movsd  0x18(%r12,%rax,8),%xmm0
movsd  %xmm0,0x18(%rsi,%rax,8)
add    $0x4,%rax
cmp    %rax,%rbp
jne    15b0 <iter_solve_sysrem+0x420>
mov    %r12,%rdi
mov    %r15,%rsi
mov    0x1b0(%rsp),%rcx
mov    %r14d,%r8d
mov    0x1c0(%rsp),%ebp
mov    %ebp,%r9d
movapd %xmm3,%xmm0
movapd %xmm2,%xmm1
push   %r13
mov    %rcx,%rbx
mov    0x1d0(%rsp),%r15
push   %r15
call   1070 <decorr_star_sysrem@plt>
movsd  0x30(%rsp),%xmm0
movsd  0x38(%rsp),%xmm2
add    $0x10,%rsp
mov    0x40(%rsp),%r8
movl   $0x0,0x34(%rsp)
jmp    19e7 <iter_solve_sysrem+0x857>
mov    0xd8(%rsp),%rcx
xor    %eax,%eax
mov    0x50(%rsp),%rsi
mov    0xa0(%rsp),%rbp
nopl   0x0(%rax,%rax,1)
movups 0x0(%r13,%rax,8),%xmm0
movups 0x10(%r13,%rax,8),%xmm1
movups %xmm0,(%rsi,%rax,8)
movups %xmm1,0x10(%rsi,%rax,8)
movups 0x20(%r13,%rax,8),%xmm0
movups 0x30(%r13,%rax,8),%xmm1
movups %xmm0,0x20(%rsi,%rax,8)
movups %xmm1,0x30(%rsi,%rax,8)
movups 0x40(%r13,%rax,8),%xmm0
movups 0x50(%r13,%rax,8),%xmm1
movups %xmm0,0x40(%rsi,%rax,8)
movups %xmm1,0x50(%rsi,%rax,8)
movupd 0x60(%r13,%rax,8),%xmm0
movupd 0x70(%r13,%rax,8),%xmm1
movupd %xmm0,0x60(%rsi,%rax,8)
movupd %xmm1,0x70(%rsi,%rax,8)
add    $0x10,%rax
add    $0xfffffffffffffffc,%rcx
jne    1660 <iter_solve_sysrem+0x4d0>
cmpq   $0x0,0x110(%rsp)
je     170f <iter_solve_sysrem+0x57f>
mov    0x100(%rsp),%rcx
lea    (%rcx,%rax,8),%rcx
mov    0xf8(%rsp),%rdi
lea    (%rdi,%rax,8),%rax
xor    %edi,%edi
nopw   0x0(%rax,%rax,1)
movupd -0x10(%rax,%rdi,1),%xmm0
movupd (%rax,%rdi,1),%xmm1
movupd %xmm0,-0x10(%rcx,%rdi,1)
movupd %xmm1,(%rcx,%rdi,1)
add    $0x20,%rdi
cmp    %rdi,%rbp
jne    16f0 <iter_solve_sysrem+0x560>
mov    0x128(%rsp),%rcx
mov    %rcx,%rax
mov    0x18(%rsp),%rdi
cmp    %rdi,%rcx
je     17ac <iter_solve_sysrem+0x61c>
mov    %rax,%rcx
not    %rcx
add    %rdi,%rcx
mov    0x130(%rsp),%rdi
test   %rdi,%rdi
je     1756 <iter_solve_sysrem+0x5c6>
xchg   %ax,%ax
movsd  0x0(%r13,%rax,8),%xmm0
movsd  %xmm0,(%rsi,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rdi
jne    1740 <iter_solve_sysrem+0x5b0>
cmp    $0x3,%rcx
mov    0x18(%rsp),%rcx
jb     17ac <iter_solve_sysrem+0x61c>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  0x0(%r13,%rax,8),%xmm0
movsd  %xmm0,(%rsi,%rax,8)
movsd  0x8(%r13,%rax,8),%xmm0
movsd  %xmm0,0x8(%rsi,%rax,8)
movsd  0x10(%r13,%rax,8),%xmm0
movsd  %xmm0,0x10(%rsi,%rax,8)
movsd  0x18(%r13,%rax,8),%xmm0
movsd  %xmm0,0x18(%rsi,%rax,8)
add    $0x4,%rax
cmp    %rax,%rcx
jne    1770 <iter_solve_sysrem+0x5e0>
mov    %r12,%rdi
mov    %r15,%rsi
mov    0x1b0(%rsp),%rcx
mov    %r14d,%r8d
mov    0x1c0(%rsp),%ebp
mov    %ebp,%r9d
movapd %xmm3,%xmm0
movsd  0x70(%rsp),%xmm1
push   %r13
push   0x1d0(%rsp)
call   1050 <decorr_image_sysrem@plt>
add    $0x10,%rsp
test   %ebp,%ebp
jle    1880 <iter_solve_sysrem+0x6f0>
xor    %r14d,%r14d
fldt   0x94(%rsp)
fld    %st(0)
fstpt  0x34(%rsp)
fstpt  0x8(%rsp)
xor    %ebp,%ebp
mov    0x18(%rsp),%rbx
jmp    1819 <iter_solve_sysrem+0x689>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r14
cmp    %r14,%rbx
je     1898 <iter_solve_sysrem+0x708>
movsd  0x0(%r13,%r14,8),%xmm0
call   1090 <isnan@plt>
test   %eax,%eax
jne    1810 <iter_solve_sysrem+0x680>
movsd  0x0(%r13,%r14,8),%xmm0
call   10b0 <isinf@plt>
test   %eax,%eax
jne    1810 <iter_solve_sysrem+0x680>
movsd  0x0(%r13,%r14,8),%xmm0
movsd  %xmm0,0x170(%rsp)
fldt   0x8(%rsp)
faddl  0x170(%rsp)
fstpt  0x8(%rsp)
mulsd  %xmm0,%xmm0
movsd  %xmm0,0x168(%rsp)
fldt   0x34(%rsp)
faddl  0x168(%rsp)
fstpt  0x34(%rsp)
add    $0x1,%ebp
jmp    1810 <iter_solve_sysrem+0x680>
nopl   0x0(%rax)
xor    %ebp,%ebp
fldt   0x94(%rsp)
fld    %st(0)
fstpt  0x8(%rsp)
fstpt  0x34(%rsp)
mov    0x18(%rsp),%rbx
mov    %ebp,0x8c(%rsp)
fildl  0x8c(%rsp)
fldt   0x34(%rsp)
fdiv   %st(1),%st
fldt   0x8(%rsp)
fmul   %st,%st(0)
imul   %ebp,%ebp
mov    %ebp,0x90(%rsp)
fidivl 0x90(%rsp)
fsubrp %st,%st(1)
fstpl  0x160(%rsp)
movsd  0x160(%rsp),%xmm0
ucomisd 0x723(%rip),%xmm0
jb     18f0 <iter_solve_sysrem+0x760>
sqrtsd %xmm0,%xmm0
jmp    18fd <iter_solve_sysrem+0x76d>
cs nopw 0x0(%rax,%rax,1)
nop
fstpt  0x34(%rsp)
call   10a0 <sqrt@plt>
fldt   0x34(%rsp)
movsd  %xmm0,0xb0(%rsp)
mov    0x1c0(%rsp),%ebp
movsd  0x28(%rsp),%xmm2
movsd  0x20(%rsp),%xmm0
fldt   0x8(%rsp)
fdivp  %st,%st(1)
fstpl  0x158(%rsp)
test   %ebp,%ebp
jle    19c2 <iter_solve_sysrem+0x832>
movl   $0x1,0x34(%rsp)
movsd  0x158(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
xor    %ebp,%ebp
jmp    1959 <iter_solve_sysrem+0x7c9>
nopl   0x0(%rax)
add    $0x1,%rbp
cmp    %rbp,%rbx
je     19a0 <iter_solve_sysrem+0x810>
movsd  0x0(%r13,%rbp,8),%xmm0
call   1090 <isnan@plt>
test   %eax,%eax
jne    1950 <iter_solve_sysrem+0x7c0>
movsd  0x0(%r13,%rbp,8),%xmm0
call   10b0 <isinf@plt>
test   %eax,%eax
jne    1950 <iter_solve_sysrem+0x7c0>
movsd  0x0(%r13,%rbp,8),%xmm0
subsd  0x8(%rsp),%xmm0
divsd  0xb0(%rsp),%xmm0
movsd  %xmm0,0x0(%r13,%rbp,8)
jmp    1950 <iter_solve_sysrem+0x7c0>
nopl   0x0(%rax,%rax,1)
mov    0x40(%rsp),%r8
mov    0x1c0(%rsp),%ebp
mov    0x1b8(%rsp),%r14d
movsd  0x28(%rsp),%xmm2
movsd  0x20(%rsp),%xmm0
jmp    19d7 <iter_solve_sysrem+0x847>
movl   $0x1,0x34(%rsp)
mov    0x40(%rsp),%r8
mov    0x1b8(%rsp),%r14d
mov    0x1b0(%rsp),%rbx
mov    0x1c8(%rsp),%r15
mov    0x78(%rsp),%rax
add    $0x1,%eax
mov    %eax,0x8(%rsp)
mov    %r12,%rdi
mov    %r13,%rsi
mov    %r14d,%edx
mov    %ebp,%ecx
mov    0x60(%rsp),%rbp
mov    %rbp,%r9
movsd  0x70(%rsp),%xmm1
push   %r15
push   %rbx
call   1040 <itersolve_chisqr_sysrem@plt>
add    $0x10,%rsp
movsd  0xb8(%rsp),%xmm2
ucomisd %xmm2,%xmm0
mov    %rbp,%rdx
ja     1ac5 <iter_solve_sysrem+0x935>
subsd  %xmm0,%xmm2
movsd  0x150(%rsp),%xmm1
ucomisd %xmm2,%xmm1
ja     1c91 <iter_solve_sysrem+0xb01>
mov    0x34(%rsp),%ecx
movsd  %xmm0,0xb8(%rsp)
mov    0x78(%rsp),%rax
cmp    0x88(%rsp),%eax
mov    0x8(%rsp),%r10d
mov    %r10d,%eax
mov    %rax,0x78(%rsp)
mov    0x40(%rsp),%r15
mov    0x1b8(%rsp),%r14d
movsd  0x28(%rsp),%xmm2
movsd  0x20(%rsp),%xmm3
mov    0x58(%rsp),%r12
mov    0x148(%rsp),%rbp
mov    0x140(%rsp),%r8
mov    0x138(%rsp),%rbx
jl     13f0 <iter_solve_sysrem+0x260>
jmp    1ead <iter_solve_sysrem+0xd1d>
xor    %r10d,%r10d
movsd  0x28(%rsp),%xmm2
movsd  0x20(%rsp),%xmm3
mov    0x60(%rsp),%rdx
jmp    1ead <iter_solve_sysrem+0xd1d>
cmpl   $0x1,0x4c(%rsp)
jne    1ba0 <iter_solve_sysrem+0xa10>
mov    0x1b8(%rsp),%r14d
test   %r14d,%r14d
mov    0x40(%rsp),%r15
movsd  0x28(%rsp),%xmm2
movsd  0x20(%rsp),%xmm3
mov    0x68(%rsp),%rax
mov    0x58(%rsp),%r12
jle    1caf <iter_solve_sysrem+0xb1f>
mov    0x84(%rsp),%ecx
mov    %ecx,%r9d
cmp    $0x4,%ecx
jb     1b25 <iter_solve_sysrem+0x995>
lea    (%rax,%r9,8),%rcx
cmp    %r12,%rcx
jbe    1cb9 <iter_solve_sysrem+0xb29>
lea    (%r12,%r9,8),%rcx
cmp    %rcx,%rax
jae    1cb9 <iter_solve_sysrem+0xb29>
xor    %ecx,%ecx
mov    %rcx,%rdi
not    %rdi
add    %r9,%rdi
mov    %r9,%rsi
and    $0x3,%rsi
je     1b55 <iter_solve_sysrem+0x9c5>
nopl   0x0(%rax)
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%r12,%rcx,8)
add    $0x1,%rcx
add    $0xffffffffffffffff,%rsi
jne    1b40 <iter_solve_sysrem+0x9b0>
cmp    $0x3,%rdi
jb     1caf <iter_solve_sysrem+0xb1f>
nop
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%r12,%rcx,8)
movsd  0x8(%rax,%rcx,8),%xmm0
movsd  %xmm0,0x8(%r12,%rcx,8)
movsd  0x10(%rax,%rcx,8),%xmm0
movsd  %xmm0,0x10(%r12,%rcx,8)
movsd  0x18(%rax,%rcx,8),%xmm0
movsd  %xmm0,0x18(%r12,%rcx,8)
add    $0x4,%rcx
cmp    %rcx,%r9
jne    1b60 <iter_solve_sysrem+0x9d0>
jmp    1caf <iter_solve_sysrem+0xb1f>
mov    %rdx,%r8
mov    0x1c0(%rsp),%eax
test   %eax,%eax
mov    0x40(%rsp),%r15
mov    0x1b8(%rsp),%r14d
movsd  0x28(%rsp),%xmm2
movsd  0x20(%rsp),%xmm3
mov    0x50(%rsp),%rcx
mov    0x58(%rsp),%r12
mov    0x8(%rsp),%r10d
jle    1eaa <iter_solve_sysrem+0xd1a>
cmp    $0x4,%eax
jb     1bfb <iter_solve_sysrem+0xa6b>
cmp    %r13,0xd0(%rsp)
jbe    1ce5 <iter_solve_sysrem+0xb55>
cmp    0xc8(%rsp),%rcx
jae    1ce5 <iter_solve_sysrem+0xb55>
xor    %eax,%eax
mov    %rax,%rsi
not    %rsi
mov    0x18(%rsp),%rdx
add    %rdx,%rsi
and    $0x3,%rdx
je     1c36 <iter_solve_sysrem+0xaa6>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  (%rcx,%rax,8),%xmm0
movsd  %xmm0,0x0(%r13,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    1c20 <iter_solve_sysrem+0xa90>
cmp    $0x3,%rsi
jb     1eaa <iter_solve_sysrem+0xd1a>
mov    0x18(%rsp),%rdx
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%rcx,%rax,8),%xmm0
movsd  %xmm0,0x0(%r13,%rax,8)
movsd  0x8(%rcx,%rax,8),%xmm0
movsd  %xmm0,0x8(%r13,%rax,8)
movsd  0x10(%rcx,%rax,8),%xmm0
movsd  %xmm0,0x10(%r13,%rax,8)
movsd  0x18(%rcx,%rax,8),%xmm0
movsd  %xmm0,0x18(%r13,%rax,8)
add    $0x4,%rax
cmp    %rax,%rdx
jne    1c50 <iter_solve_sysrem+0xac0>
jmp    1eaa <iter_solve_sysrem+0xd1a>
mov    0x40(%rsp),%r15
mov    0x1b8(%rsp),%r14d
movsd  0x28(%rsp),%xmm2
movsd  0x20(%rsp),%xmm3
mov    0x58(%rsp),%r12
mov    0x8(%rsp),%r10d
jmp    1ead <iter_solve_sysrem+0xd1d>
mov    %r9d,%ecx
and    $0x7ffffffc,%ecx
lea    -0x4(%rcx),%rdi
mov    %rdi,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
mov    %esi,%r8d
and    $0x3,%r8d
cmp    $0xc,%rdi
jae    1d10 <iter_solve_sysrem+0xb80>
xor    %edi,%edi
jmp    1d84 <iter_solve_sysrem+0xbf4>
mov    0x18(%rsp),%rax
and    $0xfffffffc,%eax
mov    0xc0(%rsp),%rdx
mov    %edx,%ebp
and    $0x3,%ebp
cmpq   $0xc,0xa8(%rsp)
jae    1dda <iter_solve_sysrem+0xc4a>
xor    %edx,%edx
jmp    1e55 <iter_solve_sysrem+0xcc5>
movabs $0x7ffffffffffffffc,%rdx
ff ff 7f
and    %rdx,%rsi
xor    %edi,%edi
nop
movups (%rax,%rdi,8),%xmm0
movups 0x10(%rax,%rdi,8),%xmm1
movups %xmm0,(%r12,%rdi,8)
movups %xmm1,0x10(%r12,%rdi,8)
movups 0x20(%rax,%rdi,8),%xmm0
movups 0x30(%rax,%rdi,8),%xmm1
movups %xmm0,0x20(%r12,%rdi,8)
movups %xmm1,0x30(%r12,%rdi,8)
movups 0x40(%rax,%rdi,8),%xmm0
movups 0x50(%rax,%rdi,8),%xmm1
movups %xmm0,0x40(%r12,%rdi,8)
movups %xmm1,0x50(%r12,%rdi,8)
movupd 0x60(%rax,%rdi,8),%xmm0
movupd 0x70(%rax,%rdi,8),%xmm1
movupd %xmm0,0x60(%r12,%rdi,8)
movupd %xmm1,0x70(%r12,%rdi,8)
add    $0x10,%rdi
add    $0xfffffffffffffffc,%rsi
jne    1d20 <iter_solve_sysrem+0xb90>
test   %r8,%r8
je     1dbf <iter_solve_sysrem+0xc2f>
lea    (%r12,%rdi,8),%rsi
add    $0x10,%rsi
lea    (%rax,%rdi,8),%rdi
add    $0x10,%rdi
shl    $0x5,%r8
xor    %ebp,%ebp
nop
movupd -0x10(%rdi,%rbp,1),%xmm0
movupd (%rdi,%rbp,1),%xmm1
movupd %xmm0,-0x10(%rsi,%rbp,1)
movupd %xmm1,(%rsi,%rbp,1)
add    $0x20,%rbp
cmp    %rbp,%r8
jne    1da0 <iter_solve_sysrem+0xc10>
cmp    %r9,%rcx
mov    0x60(%rsp),%rdx
mov    0x1b8(%rsp),%r14d
jne    1b27 <iter_solve_sysrem+0x997>
jmp    1caf <iter_solve_sysrem+0xb1f>
movabs $0x7ffffffffffffffc,%rsi
ff ff 7f
and    %rsi,%rdx
mov    %rdx,%rsi
xor    %edx,%edx
nopl   0x0(%rax)
movups (%rcx,%rdx,8),%xmm0
movups 0x10(%rcx,%rdx,8),%xmm1
movups %xmm0,0x0(%r13,%rdx,8)
movups %xmm1,0x10(%r13,%rdx,8)
movups 0x20(%rcx,%rdx,8),%xmm0
movups 0x30(%rcx,%rdx,8),%xmm1
movups %xmm0,0x20(%r13,%rdx,8)
movups %xmm1,0x30(%r13,%rdx,8)
movups 0x40(%rcx,%rdx,8),%xmm0
movups 0x50(%rcx,%rdx,8),%xmm1
movups %xmm0,0x40(%r13,%rdx,8)
movups %xmm1,0x50(%r13,%rdx,8)
movupd 0x60(%rcx,%rdx,8),%xmm0
movupd 0x70(%rcx,%rdx,8),%xmm1
movupd %xmm0,0x60(%r13,%rdx,8)
movupd %xmm1,0x70(%r13,%rdx,8)
add    $0x10,%rdx
add    $0xfffffffffffffffc,%rsi
jne    1df0 <iter_solve_sysrem+0xc60>
test   %rbp,%rbp
je     1e9f <iter_solve_sysrem+0xd0f>
lea    0x10(,%rdx,8),%rsi
add    %r13,%rsi
lea    (%rcx,%rdx,8),%rdx
add    $0x10,%rdx
shl    $0x5,%rbp
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movupd -0x10(%rdx,%rdi,1),%xmm0
movupd (%rdx,%rdi,1),%xmm1
movupd %xmm0,-0x10(%rsi,%rdi,1)
movupd %xmm1,(%rsi,%rdi,1)
add    $0x20,%rdi
cmp    %rdi,%rbp
jne    1e80 <iter_solve_sysrem+0xcf0>
cmp    0x18(%rsp),%rax
jne    1bfd <iter_solve_sysrem+0xa6d>
mov    %r8,%rdx
mov    %r12,%rdi
mov    %r15,%rsi
mov    0x1b0(%rsp),%rcx
mov    %r14d,%r8d
mov    %rdx,%rbx
mov    0x1c0(%rsp),%ebp
mov    %rbp,%r9
mov    %r10d,%ebp
movapd %xmm3,%xmm0
movapd %xmm2,%xmm1
push   %r13
push   0x1d0(%rsp)
call   1070 <decorr_star_sysrem@plt>
add    $0x10,%rsp
mov    0x68(%rsp),%rdi
call   1030 <free@plt>
mov    0x50(%rsp),%rdi
call   1030 <free@plt>
mov    %r12,%rdi
mov    %r13,%rsi
mov    %r15,%rdx
mov    %rbx,%rcx
mov    %r14d,%r8d
mov    0x1c0(%rsp),%r9d
call   1060 <magcorr_sysrem@plt>
mov    %ebp,%eax
add    $0x178,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @iter_solve_sysrem(i32 %0, i32 %1, double %2, double* %3, double* %4, double** %5, double** %6, double* %7, i32 %8, i32 %9, i32** %10, double %11, double %12, double %13) {
%15 = alloca i32
%16 = alloca i32
%17 = alloca double
%18 = alloca double*
%19 = alloca double*
%20 = alloca double**
%21 = alloca double**
%22 = alloca double*
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32**
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double
%30 = alloca double
%31 = alloca double
%32 = alloca i32
%33 = alloca i32
%34 = alloca double
%35 = alloca double
%36 = alloca double*
%37 = alloca double*
%38 = alloca x86_fp80
%39 = alloca x86_fp80
%40 = alloca i32
%41 = alloca i32
store i32 %0, i32* %15
store i32 %1, i32* %16
store double %2, double* %17
store double* %3, double** %18
store double* %4, double** %19
store double** %5, double*** %20
store double** %6, double*** %21
store double* %7, double** %22
store i32 %8, i32* %23
store i32 %9, i32* %24
store i32** %10, i32*** %25
store double %11, double* %26
store double %12, double* %27
store double %13, double* %28
store double 0.000000e+00, double* %29
store i32 0, i32* %32
%42 = load double*, double** %18
%43 = load double*, double** %19
%44 = load i32, i32* %23
%45 = load i32, i32* %24
%46 = load double**, double*** %20
%47 = load double**, double*** %21
%48 = load double*, double** %22
%49 = load double, double* %26
%50 = load double, double* %27
%51 = load double, double* %28
%52 = load i32**, i32*** %25
%53 = call double @itersolve_chisqr_sysrem(double* %42, double* %43, i32 %44, i32 %45, double** %46, double** %47, double* %48, double %49, double %50, double %51, i32** %52)
store double %53, double* %34
%54 = load i32, i32* %23
%55 = sext i32 %54 to i64
%56 = mul i64 %55, 8
%57 = trunc i64 %56 to i32
%58 = call i64 @malloc(i32 %57)
%59 = inttoptr i64 %58 to double*
store double* %59, double** %36
%60 = load i32, i32* %24
%61 = sext i32 %60 to i64
%62 = mul i64 %61, 8
%63 = trunc i64 %62 to i32
%64 = call i64 @malloc(i32 %63)
%65 = inttoptr i64 %64 to double*
store double* %65, double** %37
br label %66
66: ; preds = %320, %14
%67 = load i32, i32* %32
%68 = load i32, i32* %16
%69 = icmp sle i32 %67, %68
br i1 %69, label %70, label %74
70: ; preds = %66
%71 = load double, double* %29
%72 = fcmp une double %71, 0.000000e+00
%73 = xor i1 %72, true
br label %74
74: ; preds = %70, %66
%75 = phi i1 [ false, %66 ], [ %73, %70 ]
br i1 %75, label %76, label %322
76: ; preds = %74
%77 = load i32, i32* %15
%78 = icmp eq i32 %77, 1
br i1 %78, label %79, label %109
79: ; preds = %76
store i32 0, i32* %40
br label %80
80: ; preds = %94, %79
%81 = load i32, i32* %40
%82 = load i32, i32* %23
%83 = icmp slt i32 %81, %82
br i1 %83, label %84, label %97
84: ; preds = %80
%85 = load double*, double** %18
%86 = load i32, i32* %40
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds double, double* %85, i64 %87
%89 = load double, double* %88
%90 = load double*, double** %36
%91 = load i32, i32* %40
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds double, double* %90, i64 %92
store double %89, double* %93
br label %94
94: ; preds = %84
%95 = load i32, i32* %40
%96 = add nsw i32 %95, 1
store i32 %96, i32* %40
br label %80
97: ; preds = %80
%98 = load double*, double** %18
%99 = load double**, double*** %20
%100 = load double**, double*** %21
%101 = load double*, double** %22
%102 = load i32, i32* %23
%103 = load i32, i32* %24
%104 = load i32**, i32*** %25
%105 = load double, double* %26
%106 = load double*, double** %19
%107 = load double, double* %28
%108 = call i32 @decorr_star_sysrem(double* %98, double** %99, double** %100, double* %101, i32 %102, i32 %103, i32** %104, double %105, double* %106, double %107)
store i32 0, i32* %15
br label %249
109: ; preds = %76
store i32 0, i32* %41
br label %110
110: ; preds = %124, %109
%111 = load i32, i32* %41
%112 = load i32, i32* %24
%113 = icmp slt i32 %111, %112
br i1 %113, label %114, label %127
114: ; preds = %110
%115 = load double*, double** %19
%116 = load i32, i32* %41
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds double, double* %115, i64 %117
%119 = load double, double* %118
%120 = load double*, double** %37
%121 = load i32, i32* %41
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds double, double* %120, i64 %122
store double %119, double* %123
br label %124
124: ; preds = %114
%125 = load i32, i32* %41
%126 = add nsw i32 %125, 1
store i32 %126, i32* %41
br label %110
127: ; preds = %110
%128 = load double*, double** %18
%129 = load double**, double*** %20
%130 = load double**, double*** %21
%131 = load double*, double** %22
%132 = load i32, i32* %23
%133 = load i32, i32* %24
%134 = load i32**, i32*** %25
%135 = load double, double* %26
%136 = load double, double* %27
%137 = load double*, double** %19
%138 = load double, double* %28
%139 = call i32 @decorr_image_sysrem(double* %128, double** %129, double** %130, double* %131, i32 %132, i32 %133, i32** %134, double %135, double %136, double* %137, double %138)
store x86_fp80 0xK00000000000000000000, x86_fp80* %38
store x86_fp80 0xK00000000000000000000, x86_fp80* %39
store i32 0, i32* %33
store i32 0, i32* %41
br label %140
140: ; preds = %186, %127
%141 = load i32, i32* %41
%142 = load i32, i32* %24
%143 = icmp slt i32 %141, %142
br i1 %143, label %144, label %189
144: ; preds = %140
%145 = load double*, double** %19
%146 = load i32, i32* %41
%147 = sext i32 %146 to i64
%148 = getelementptr inbounds double, double* %145, i64 %147
%149 = load double, double* %148
%150 = call i32 @isnan(double %149)
%151 = icmp ne i32 %150, 0
br i1 %151, label %185, label %152
152: ; preds = %144
%153 = load double*, double** %19
%154 = load i32, i32* %41
%155 = sext i32 %154 to i64
%156 = getelementptr inbounds double, double* %153, i64 %155
%157 = load double, double* %156
%158 = call i32 @isinf(double %157)
%159 = icmp ne i32 %158, 0
br i1 %159, label %185, label %160
160: ; preds = %152
%161 = load double*, double** %19
%162 = load i32, i32* %41
%163 = sext i32 %162 to i64
%164 = getelementptr inbounds double, double* %161, i64 %163
%165 = load double, double* %164
%166 = fpext double %165 to x86_fp80
%167 = load x86_fp80, x86_fp80* %38
%168 = fadd x86_fp80 %167, %166
store x86_fp80 %168, x86_fp80* %38
%169 = load double*, double** %19
%170 = load i32, i32* %41
%171 = sext i32 %170 to i64
%172 = getelementptr inbounds double, double* %169, i64 %171
%173 = load double, double* %172
%174 = load double*, double** %19
%175 = load i32, i32* %41
%176 = sext i32 %175 to i64
%177 = getelementptr inbounds double, double* %174, i64 %176
%178 = load double, double* %177
%179 = fmul double %173, %178
%180 = fpext double %179 to x86_fp80
%181 = load x86_fp80, x86_fp80* %39
%182 = fadd x86_fp80 %181, %180
store x86_fp80 %182, x86_fp80* %39
%183 = load i32, i32* %33
%184 = add nsw i32 %183, 1
store i32 %184, i32* %33
br label %185
185: ; preds = %160, %152, %144
br label %186
186: ; preds = %185
%187 = load i32, i32* %41
%188 = add nsw i32 %187, 1
store i32 %188, i32* %41
br label %140
189: ; preds = %140
%190 = load x86_fp80, x86_fp80* %39
%191 = load i32, i32* %33
%192 = sitofp i32 %191 to x86_fp80
%193 = fdiv x86_fp80 %190, %192
%194 = load x86_fp80, x86_fp80* %38
%195 = load x86_fp80, x86_fp80* %38
%196 = fmul x86_fp80 %194, %195
%197 = load i32, i32* %33
%198 = load i32, i32* %33
%199 = mul nsw i32 %197, %198
%200 = sitofp i32 %199 to x86_fp80
%201 = fdiv x86_fp80 %196, %200
%202 = fsub x86_fp80 %193, %201
%203 = fptrunc x86_fp80 %202 to double
%204 = call double @sqrt(double %203)
store double %204, double* %30
%205 = load x86_fp80, x86_fp80* %38
%206 = load i32, i32* %33
%207 = sitofp i32 %206 to x86_fp80
%208 = fdiv x86_fp80 %205, %207
%209 = fptrunc x86_fp80 %208 to double
store double %209, double* %31
store i32 0, i32* %41
br label %210
210: ; preds = %245, %189
%211 = load i32, i32* %41
%212 = load i32, i32* %24
%213 = icmp slt i32 %211, %212
br i1 %213, label %214, label %248
214: ; preds = %210
%215 = load double*, double** %19
%216 = load i32, i32* %41
%217 = sext i32 %216 to i64
%218 = getelementptr inbounds double, double* %215, i64 %217
%219 = load double, double* %218
%220 = call i32 @isnan(double %219)
%221 = icmp ne i32 %220, 0
br i1 %221, label %244, label %222
222: ; preds = %214
%223 = load double*, double** %19
%224 = load i32, i32* %41
%225 = sext i32 %224 to i64
%226 = getelementptr inbounds double, double* %223, i64 %225
%227 = load double, double* %226
%228 = call i32 @isinf(double %227)
%229 = icmp ne i32 %228, 0
br i1 %229, label %244, label %230
230: ; preds = %222
%231 = load double*, double** %19
%232 = load i32, i32* %41
%233 = sext i32 %232 to i64
%234 = getelementptr inbounds double, double* %231, i64 %233
%235 = load double, double* %234
%236 = load double, double* %31
%237 = fsub double %235, %236
%238 = load double, double* %30
%239 = fdiv double %237, %238
%240 = load double*, double** %19
%241 = load i32, i32* %41
%242 = sext i32 %241 to i64
%243 = getelementptr inbounds double, double* %240, i64 %242
store double %239, double* %243
br label %244
244: ; preds = %230, %222, %214
br label %245
245: ; preds = %244
%246 = load i32, i32* %41
%247 = add nsw i32 %246, 1
store i32 %247, i32* %41
br label %210
248: ; preds = %210
store i32 1, i32* %15
br label %249
249: ; preds = %248, %97
%250 = load i32, i32* %32
%251 = add nsw i32 %250, 1
store i32 %251, i32* %32
%252 = load double*, double** %18
%253 = load double*, double** %19
%254 = load i32, i32* %23
%255 = load i32, i32* %24
%256 = load double**, double*** %20
%257 = load double**, double*** %21
%258 = load double*, double** %22
%259 = load double, double* %26
%260 = load double, double* %27
%261 = load double, double* %28
%262 = load i32**, i32*** %25
%263 = call double @itersolve_chisqr_sysrem(double* %252, double* %253, i32 %254, i32 %255, double** %256, double** %257, double* %258, double %259, double %260, double %261, i32** %262)
store double %263, double* %35
%264 = load double, double* %35
%265 = load double, double* %34
%266 = fcmp ogt double %264, %265
br i1 %266, label %267, label %312
267: ; preds = %249
%268 = load i32, i32* %15
%269 = icmp eq i32 %268, 1
br i1 %269, label %270, label %289
270: ; preds = %267
store i32 0, i32* %41
br label %271
271: ; preds = %285, %270
%272 = load i32, i32* %41
%273 = load i32, i32* %24
%274 = icmp slt i32 %272, %273
br i1 %274, label %275, label %288
275: ; preds = %271
%276 = load double*, double** %37
%277 = load i32, i32* %41
%278 = sext i32 %277 to i64
%279 = getelementptr inbounds double, double* %276, i64 %278
%280 = load double, double* %279
%281 = load double*, double** %19
%282 = load i32, i32* %41
%283 = sext i32 %282 to i64
%284 = getelementptr inbounds double, double* %281, i64 %283
store double %280, double* %284
br label %285
285: ; preds = %275
%286 = load i32, i32* %41
%287 = add nsw i32 %286, 1
store i32 %287, i32* %41
br label %271
288: ; preds = %271
br label %289
289: ; preds = %288, %267
%290 = load i32, i32* %15
%291 = icmp eq i32 %290, 0
br i1 %291, label %292, label %311
292: ; preds = %289
store i32 0, i32* %40
br label %293
293: ; preds = %307, %292
%294 = load i32, i32* %40
%295 = load i32, i32* %23
%296 = icmp slt i32 %294, %295
br i1 %296, label %297, label %310
297: ; preds = %293
%298 = load double*, double** %36
%299 = load i32, i32* %40
%300 = sext i32 %299 to i64
%301 = getelementptr inbounds double, double* %298, i64 %300
%302 = load double, double* %301
%303 = load double*, double** %18
%304 = load i32, i32* %40
%305 = sext i32 %304 to i64
%306 = getelementptr inbounds double, double* %303, i64 %305
store double %302, double* %306
br label %307
307: ; preds = %297
%308 = load i32, i32* %40
%309 = add nsw i32 %308, 1
store i32 %309, i32* %40
br label %293
310: ; preds = %293
br label %311
311: ; preds = %310, %289
store double 1.000000e+00, double* %29
br label %320
312: ; preds = %249
%313 = load double, double* %34
%314 = load double, double* %35
%315 = fsub double %313, %314
%316 = load double, double* %17
%317 = fcmp olt double %315, %316
br i1 %317, label %318, label %319
318: ; preds = %312
store double 1.000000e+00, double* %29
br label %319
319: ; preds = %318, %312
br label %320
320: ; preds = %319, %311
%321 = load double, double* %35
store double %321, double* %34
br label %66
322: ; preds = %74
%323 = load double*, double** %18
%324 = load double**, double*** %20
%325 = load double**, double*** %21
%326 = load double*, double** %22
%327 = load i32, i32* %23
%328 = load i32, i32* %24
%329 = load i32**, i32*** %25
%330 = load double, double* %26
%331 = load double*, double** %19
%332 = load double, double* %28
%333 = call i32 @decorr_star_sysrem(double* %323, double** %324, double** %325, double* %326, i32 %327, i32 %328, i32** %329, double %330, double* %331, double %332)
%334 = load double*, double** %36
%335 = call i32 @free(double* %334)
%336 = load double*, double** %37
%337 = call i32 @free(double* %336)
%338 = load double*, double** %18
%339 = load double*, double** %19
%340 = load double**, double*** %20
%341 = load double**, double*** %21
%342 = load i32, i32* %23
%343 = load i32, i32* %24
%344 = call i32 @magcorr_sysrem(double* %338, double* %339, double** %340, double** %341, i32 %342, i32 %343)
%345 = load i32, i32* %32
ret i32 %345
}

LLVM IR (-O2):
define i32 @iter_solve_sysrem(i32 %0, i32 %1, double %2, double* %3, double* %4, double** %5, double** %6, double* %7, i32 %8, i32 %9, i32** %10, double %11, double %12, double %13) {
%15 = tail call double @itersolve_chisqr_sysrem(double* %3, double* %4, i32 %8, i32 %9, double** %5, double** %6, double* %7, double %11, double %12, double %13, i32** %10)
%16 = shl i32 %8, 3
%17 = tail call i64 @malloc(i32 %16)
%18 = inttoptr i64 %17 to double*
%19 = inttoptr i64 %17 to i8*
%20 = shl i32 %9, 3
%21 = tail call i64 @malloc(i32 %20)
%22 = inttoptr i64 %21 to double*
%23 = inttoptr i64 %21 to i8*
%24 = icmp sgt i32 %1, -1
br i1 %24, label %25, label %617
25: ; preds = %14
%26 = icmp sgt i32 %9, 0
%27 = icmp sgt i32 %8, 0
%28 = call i32 @llvm.smax.i32(i32 %8, i32 1)
%29 = zext i32 %9 to i64
%30 = zext i32 %9 to i64
%31 = zext i32 %9 to i64
%32 = zext i32 %8 to i64
%33 = getelementptr double, double* %18, i64 %32
%34 = getelementptr double, double* %3, i64 %32
%35 = bitcast double* %34 to i8*
%36 = getelementptr double, double* %22, i64 %29
%37 = getelementptr double, double* %4, i64 %29
%38 = bitcast double* %37 to i8*
%39 = and i64 %29, 4294967292
%40 = add nsw i64 %39, -4
%41 = lshr exact i64 %40, 2
%42 = add nuw nsw i64 %41, 1
%43 = and i64 %32, 4294967292
%44 = add nsw i64 %43, -4
%45 = lshr exact i64 %44, 2
%46 = add nuw nsw i64 %45, 1
%47 = icmp ult i32 %9, 4
%48 = icmp ult i8* %23, %38
%49 = icmp ugt double* %36, %4
%50 = and i1 %48, %49
%51 = and i64 %29, 4294967292
%52 = and i64 %42, 3
%53 = icmp ult i64 %40, 12
%54 = and i64 %42, 9223372036854775804
%55 = icmp eq i64 %52, 0
%56 = icmp eq i64 %51, %29
%57 = and i64 %29, 3
%58 = icmp eq i64 %57, 0
%59 = icmp ult i32 %8, 4
%60 = icmp ult i8* %19, %35
%61 = icmp ugt double* %33, %3
%62 = and i1 %60, %61
%63 = and i64 %32, 4294967292
%64 = and i64 %46, 3
%65 = icmp ult i64 %44, 12
%66 = and i64 %46, 9223372036854775804
%67 = icmp eq i64 %64, 0
%68 = icmp eq i64 %63, %32
%69 = and i64 %32, 3
%70 = icmp eq i64 %69, 0
br label %71
71: ; preds = %612, %25
%72 = phi i32 [ %0, %25 ], [ %356, %612 ]
%73 = phi i32 [ 0, %25 ], [ %357, %612 ]
%74 = phi double [ %15, %25 ], [ %358, %612 ]
%75 = icmp eq i32 %72, 1
br i1 %75, label %166, label %76
76: ; preds = %71
br i1 %26, label %77, label %164
77: ; preds = %76
%78 = select i1 %47, i1 true, i1 %50
br i1 %78, label %148, label %79
79: ; preds = %77
br i1 %53, label %129, label %80
80: ; preds = %79, %80
%81 = phi i64 [ %126, %80 ], [ 0, %79 ]
%82 = phi i64 [ %127, %80 ], [ 0, %79 ]
%83 = getelementptr inbounds double, double* %4, i64 %81
%84 = bitcast double* %83 to <2 x double>*
%85 = load <2 x double>, <2 x double>* %84
%86 = getelementptr inbounds double, double* %83, i64 2
%87 = bitcast double* %86 to <2 x double>*
%88 = load <2 x double>, <2 x double>* %87
%89 = getelementptr inbounds double, double* %22, i64 %81
%90 = bitcast double* %89 to <2 x double>*
store <2 x double> %85, <2 x double>* %90
%91 = getelementptr inbounds double, double* %89, i64 2
%92 = bitcast double* %91 to <2 x double>*
store <2 x double> %88, <2 x double>* %92
%93 = or i64 %81, 4
%94 = getelementptr inbounds double, double* %4, i64 %93
%95 = bitcast double* %94 to <2 x double>*
%96 = load <2 x double>, <2 x double>* %95
%97 = getelementptr inbounds double, double* %94, i64 2
%98 = bitcast double* %97 to <2 x double>*
%99 = load <2 x double>, <2 x double>* %98
%100 = getelementptr inbounds double, double* %22, i64 %93
%101 = bitcast double* %100 to <2 x double>*
store <2 x double> %96, <2 x double>* %101
%102 = getelementptr inbounds double, double* %100, i64 2
%103 = bitcast double* %102 to <2 x double>*
store <2 x double> %99, <2 x double>* %103
%104 = or i64 %81, 8
%105 = getelementptr inbounds double, double* %4, i64 %104
%106 = bitcast double* %105 to <2 x double>*
%107 = load <2 x double>, <2 x double>* %106
%108 = getelementptr inbounds double, double* %105, i64 2
%109 = bitcast double* %108 to <2 x double>*
%110 = load <2 x double>, <2 x double>* %109
%111 = getelementptr inbounds double, double* %22, i64 %104
%112 = bitcast double* %111 to <2 x double>*
store <2 x double> %107, <2 x double>* %112
%113 = getelementptr inbounds double, double* %111, i64 2
%114 = bitcast double* %113 to <2 x double>*
store <2 x double> %110, <2 x double>* %114
%115 = or i64 %81, 12
%116 = getelementptr inbounds double, double* %4, i64 %115
%117 = bitcast double* %116 to <2 x double>*
%118 = load <2 x double>, <2 x double>* %117
%119 = getelementptr inbounds double, double* %116, i64 2
%120 = bitcast double* %119 to <2 x double>*
%121 = load <2 x double>, <2 x double>* %120
%122 = getelementptr inbounds double, double* %22, i64 %115
%123 = bitcast double* %122 to <2 x double>*
store <2 x double> %118, <2 x double>* %123
%124 = getelementptr inbounds double, double* %122, i64 2
%125 = bitcast double* %124 to <2 x double>*
store <2 x double> %121, <2 x double>* %125
%126 = add nuw i64 %81, 16
%127 = add nuw i64 %82, 4
%128 = icmp eq i64 %127, %54
br i1 %128, label %129, label %80
129: ; preds = %80, %79
%130 = phi i64 [ 0, %79 ], [ %126, %80 ]
br i1 %55, label %147, label %131
131: ; preds = %129, %131
%132 = phi i64 [ %144, %131 ], [ %130, %129 ]
%133 = phi i64 [ %145, %131 ], [ 0, %129 ]
%134 = getelementptr inbounds double, double* %4, i64 %132
%135 = bitcast double* %134 to <2 x double>*
%136 = load <2 x double>, <2 x double>* %135
%137 = getelementptr inbounds double, double* %134, i64 2
%138 = bitcast double* %137 to <2 x double>*
%139 = load <2 x double>, <2 x double>* %138
%140 = getelementptr inbounds double, double* %22, i64 %132
%141 = bitcast double* %140 to <2 x double>*
store <2 x double> %136, <2 x double>* %141
%142 = getelementptr inbounds double, double* %140, i64 2
%143 = bitcast double* %142 to <2 x double>*
store <2 x double> %139, <2 x double>* %143
%144 = add nuw i64 %132, 4
%145 = add i64 %133, 1
%146 = icmp eq i64 %145, %52
br i1 %146, label %147, label %131
147: ; preds = %131, %129
br i1 %56, label %294, label %148
148: ; preds = %77, %147
%149 = phi i64 [ 0, %77 ], [ %51, %147 ]
%150 = xor i64 %149, -1
%151 = add nsw i64 %150, %29
br i1 %58, label %161, label %152
152: ; preds = %148, %152
%153 = phi i64 [ %158, %152 ], [ %149, %148 ]
%154 = phi i64 [ %159, %152 ], [ 0, %148 ]
%155 = getelementptr inbounds double, double* %4, i64 %153
%156 = load double, double* %155
%157 = getelementptr inbounds double, double* %22, i64 %153
store double %156, double* %157
%158 = add nuw nsw i64 %153, 1
%159 = add i64 %154, 1
%160 = icmp eq i64 %159, %57
br i1 %160, label %161, label %152
161: ; preds = %152, %148
%162 = phi i64 [ %149, %148 ], [ %158, %152 ]
%163 = icmp ult i64 %151, 3
br i1 %163, label %294, label %275
164: ; preds = %76
%165 = tail call i32 @decorr_image_sysrem(double* %3, double** %5, double** %6, double* %7, i32 %8, i32 %9, i32** %10, double %11, double %12, double* %4, double %13)
br label %323
166: ; preds = %71
br i1 %27, label %167, label %273
167: ; preds = %166
%168 = select i1 %59, i1 true, i1 %62
br i1 %168, label %238, label %169
169: ; preds = %167
br i1 %65, label %219, label %170
170: ; preds = %169, %170
%171 = phi i64 [ %216, %170 ], [ 0, %169 ]
%172 = phi i64 [ %217, %170 ], [ 0, %169 ]
%173 = getelementptr inbounds double, double* %3, i64 %171
%174 = bitcast double* %173 to <2 x double>*
%175 = load <2 x double>, <2 x double>* %174
%176 = getelementptr inbounds double, double* %173, i64 2
%177 = bitcast double* %176 to <2 x double>*
%178 = load <2 x double>, <2 x double>* %177
%179 = getelementptr inbounds double, double* %18, i64 %171
%180 = bitcast double* %179 to <2 x double>*
store <2 x double> %175, <2 x double>* %180
%181 = getelementptr inbounds double, double* %179, i64 2
%182 = bitcast double* %181 to <2 x double>*
store <2 x double> %178, <2 x double>* %182
%183 = or i64 %171, 4
%184 = getelementptr inbounds double, double* %3, i64 %183
%185 = bitcast double* %184 to <2 x double>*
%186 = load <2 x double>, <2 x double>* %185
%187 = getelementptr inbounds double, double* %184, i64 2
%188 = bitcast double* %187 to <2 x double>*
%189 = load <2 x double>, <2 x double>* %188
%190 = getelementptr inbounds double, double* %18, i64 %183
%191 = bitcast double* %190 to <2 x double>*
store <2 x double> %186, <2 x double>* %191
%192 = getelementptr inbounds double, double* %190, i64 2
%193 = bitcast double* %192 to <2 x double>*
store <2 x double> %189, <2 x double>* %193
%194 = or i64 %171, 8
%195 = getelementptr inbounds double, double* %3, i64 %194
%196 = bitcast double* %195 to <2 x double>*
%197 = load <2 x double>, <2 x double>* %196
%198 = getelementptr inbounds double, double* %195, i64 2
%199 = bitcast double* %198 to <2 x double>*
%200 = load <2 x double>, <2 x double>* %199
%201 = getelementptr inbounds double, double* %18, i64 %194
%202 = bitcast double* %201 to <2 x double>*
store <2 x double> %197, <2 x double>* %202
%203 = getelementptr inbounds double, double* %201, i64 2
%204 = bitcast double* %203 to <2 x double>*
store <2 x double> %200, <2 x double>* %204
%205 = or i64 %171, 12
%206 = getelementptr inbounds double, double* %3, i64 %205
%207 = bitcast double* %206 to <2 x double>*
%208 = load <2 x double>, <2 x double>* %207
%209 = getelementptr inbounds double, double* %206, i64 2
%210 = bitcast double* %209 to <2 x double>*
%211 = load <2 x double>, <2 x double>* %210
%212 = getelementptr inbounds double, double* %18, i64 %205
%213 = bitcast double* %212 to <2 x double>*
store <2 x double> %208, <2 x double>* %213
%214 = getelementptr inbounds double, double* %212, i64 2
%215 = bitcast double* %214 to <2 x double>*
store <2 x double> %211, <2 x double>* %215
%216 = add nuw i64 %171, 16
%217 = add nuw i64 %172, 4
%218 = icmp eq i64 %217, %66
br i1 %218, label %219, label %170
219: ; preds = %170, %169
%220 = phi i64 [ 0, %169 ], [ %216, %170 ]
br i1 %67, label %237, label %221
221: ; preds = %219, %221
%222 = phi i64 [ %234, %221 ], [ %220, %219 ]
%223 = phi i64 [ %235, %221 ], [ 0, %219 ]
%224 = getelementptr inbounds double, double* %3, i64 %222
%225 = bitcast double* %224 to <2 x double>*
%226 = load <2 x double>, <2 x double>* %225
%227 = getelementptr inbounds double, double* %224, i64 2
%228 = bitcast double* %227 to <2 x double>*
%229 = load <2 x double>, <2 x double>* %228
%230 = getelementptr inbounds double, double* %18, i64 %222
%231 = bitcast double* %230 to <2 x double>*
store <2 x double> %226, <2 x double>* %231
%232 = getelementptr inbounds double, double* %230, i64 2
%233 = bitcast double* %232 to <2 x double>*
store <2 x double> %229, <2 x double>* %233
%234 = add nuw i64 %222, 4
%235 = add i64 %223, 1
%236 = icmp eq i64 %235, %64
br i1 %236, label %237, label %221
237: ; preds = %221, %219
br i1 %68, label %273, label %238
238: ; preds = %167, %237
%239 = phi i64 [ 0, %167 ], [ %63, %237 ]
%240 = xor i64 %239, -1
%241 = add nsw i64 %240, %32
br i1 %70, label %251, label %242
242: ; preds = %238, %242
%243 = phi i64 [ %248, %242 ], [ %239, %238 ]
%244 = phi i64 [ %249, %242 ], [ 0, %238 ]
%245 = getelementptr inbounds double, double* %3, i64 %243
%246 = load double, double* %245
%247 = getelementptr inbounds double, double* %18, i64 %243
store double %246, double* %247
%248 = add nuw nsw i64 %243, 1
%249 = add i64 %244, 1
%250 = icmp eq i64 %249, %69
br i1 %250, label %251, label %242
251: ; preds = %242, %238
%252 = phi i64 [ %239, %238 ], [ %248, %242 ]
%253 = icmp ult i64 %241, 3
br i1 %253, label %273, label %254
254: ; preds = %251, %254
%255 = phi i64 [ %271, %254 ], [ %252, %251 ]
%256 = getelementptr inbounds double, double* %3, i64 %255
%257 = load double, double* %256
%258 = getelementptr inbounds double, double* %18, i64 %255
store double %257, double* %258
%259 = add nuw nsw i64 %255, 1
%260 = getelementptr inbounds double, double* %3, i64 %259
%261 = load double, double* %260
%262 = getelementptr inbounds double, double* %18, i64 %259
store double %261, double* %262
%263 = add nuw nsw i64 %255, 2
%264 = getelementptr inbounds double, double* %3, i64 %263
%265 = load double, double* %264
%266 = getelementptr inbounds double, double* %18, i64 %263
store double %265, double* %266
%267 = add nuw nsw i64 %255, 3
%268 = getelementptr inbounds double, double* %3, i64 %267
%269 = load double, double* %268
%270 = getelementptr inbounds double, double* %18, i64 %267
store double %269, double* %270
%271 = add nuw nsw i64 %255, 4
%272 = icmp eq i64 %271, %32
br i1 %272, label %273, label %254
273: ; preds = %251, %254, %237, %166
%274 = tail call i32 @decorr_star_sysrem(double* %3, double** %5, double** %6, double* %7, i32 %8, i32 %9, i32** %10, double %11, double* %4, double %13)
br label %355
275: ; preds = %161, %275
%276 = phi i64 [ %292, %275 ], [ %162, %161 ]
%277 = getelementptr inbounds double, double* %4, i64 %276
%278 = load double, double* %277
%279 = getelementptr inbounds double, double* %22, i64 %276
store double %278, double* %279
%280 = add nuw nsw i64 %276, 1
%281 = getelementptr inbounds double, double* %4, i64 %280
%282 = load double, double* %281
%283 = getelementptr inbounds double, double* %22, i64 %280
store double %282, double* %283
%284 = add nuw nsw i64 %276, 2
%285 = getelementptr inbounds double, double* %4, i64 %284
%286 = load double, double* %285
%287 = getelementptr inbounds double, double* %22, i64 %284
store double %286, double* %287
%288 = add nuw nsw i64 %276, 3
%289 = getelementptr inbounds double, double* %4, i64 %288
%290 = load double, double* %289
%291 = getelementptr inbounds double, double* %22, i64 %288
store double %290, double* %291
%292 = add nuw nsw i64 %276, 4
%293 = icmp eq i64 %292, %29
br i1 %293, label %294, label %275
294: ; preds = %161, %275, %147
%295 = tail call i32 @decorr_image_sysrem(double* %3, double** %5, double** %6, double* %7, i32 %8, i32 %9, i32** %10, double %11, double %12, double* %4, double %13)
br i1 %26, label %296, label %323
296: ; preds = %294, %317
%297 = phi i64 [ %321, %317 ], [ 0, %294 ]
%298 = phi x86_fp80 [ %320, %317 ], [ 0xK00000000000000000000, %294 ]
%299 = phi x86_fp80 [ %319, %317 ], [ 0xK00000000000000000000, %294 ]
%300 = phi i32 [ %318, %317 ], [ 0, %294 ]
%301 = getelementptr inbounds double, double* %4, i64 %297
%302 = load double, double* %301
%303 = tail call i32 @isnan(double %302)
%304 = icmp eq i32 %303, 0
br i1 %304, label %305, label %317
305: ; preds = %296
%306 = load double, double* %301
%307 = tail call i32 @isinf(double %306)
%308 = icmp eq i32 %307, 0
br i1 %308, label %309, label %317
309: ; preds = %305
%310 = load double, double* %301
%311 = fpext double %310 to x86_fp80
%312 = fadd x86_fp80 %299, %311
%313 = fmul double %310, %310
%314 = fpext double %313 to x86_fp80
%315 = fadd x86_fp80 %298, %314
%316 = add nsw i32 %300, 1
br label %317
317: ; preds = %296, %305, %309
%318 = phi i32 [ %300, %296 ], [ %300, %305 ], [ %316, %309 ]
%319 = phi x86_fp80 [ %299, %296 ], [ %299, %305 ], [ %312, %309 ]
%320 = phi x86_fp80 [ %298, %296 ], [ %298, %305 ], [ %315, %309 ]
%321 = add nuw nsw i64 %297, 1
%322 = icmp eq i64 %321, %30
br i1 %322, label %323, label %296
323: ; preds = %317, %164, %294
%324 = phi i32 [ 0, %294 ], [ 0, %164 ], [ %318, %317 ]
%325 = phi x86_fp80 [ 0xK00000000000000000000, %294 ], [ 0xK00000000000000000000, %164 ], [ %319, %317 ]
%326 = phi x86_fp80 [ 0xK00000000000000000000, %294 ], [ 0xK00000000000000000000, %164 ], [ %320, %317 ]
%327 = sitofp i32 %324 to x86_fp80
%328 = fdiv x86_fp80 %326, %327
%329 = fmul x86_fp80 %325, %325
%330 = mul nsw i32 %324, %324
%331 = sitofp i32 %330 to x86_fp80
%332 = fdiv x86_fp80 %329, %331
%333 = fsub x86_fp80 %328, %332
%334 = fptrunc x86_fp80 %333 to double
%335 = tail call double @sqrt(double %334)
%336 = fdiv x86_fp80 %325, %327
%337 = fptrunc x86_fp80 %336 to double
br i1 %26, label %338, label %355
338: ; preds = %323, %352
%339 = phi i64 [ %353, %352 ], [ 0, %323 ]
%340 = getelementptr inbounds double, double* %4, i64 %339
%341 = load double, double* %340
%342 = tail call i32 @isnan(double %341)
%343 = icmp eq i32 %342, 0
br i1 %343, label %344, label %352
344: ; preds = %338
%345 = load double, double* %340
%346 = tail call i32 @isinf(double %345)
%347 = icmp eq i32 %346, 0
br i1 %347, label %348, label %352
348: ; preds = %344
%349 = load double, double* %340
%350 = fsub double %349, %337
%351 = fdiv double %350, %335
store double %351, double* %340
br label %352
352: ; preds = %338, %344, %348
%353 = add nuw nsw i64 %339, 1
%354 = icmp eq i64 %353, %31
br i1 %354, label %355, label %338
355: ; preds = %352, %323, %273
%356 = phi i32 [ 0, %273 ], [ 1, %323 ], [ 1, %352 ]
%357 = add nuw nsw i32 %73, 1
%358 = tail call double @itersolve_chisqr_sysrem(double* %3, double* %4, i32 %8, i32 %9, double** %5, double** %6, double* %7, double %11, double %12, double %13, i32** %10)
%359 = fcmp ogt double %358, %74
br i1 %359, label %360, label %612
360: ; preds = %355
br i1 %75, label %485, label %361
361: ; preds = %360
br i1 %26, label %362, label %617
362: ; preds = %361
%363 = zext i32 %9 to i64
%364 = icmp ult i32 %9, 4
br i1 %364, label %448, label %365
365: ; preds = %362
%366 = getelementptr double, double* %4, i64 %29
%367 = bitcast double* %366 to i8*
%368 = getelementptr double, double* %22, i64 %29
%369 = icmp ugt double* %368, %4
%370 = icmp ult i8* %23, %367
%371 = and i1 %369, %370
br i1 %371, label %448, label %372
372: ; preds = %365
%373 = and i64 %29, 4294967292
%374 = and i64 %42, 3
%375 = icmp ult i64 %40, 12
br i1 %375, label %427, label %376
376: ; preds = %372
%377 = and i64 %42, 9223372036854775804
br label %378
378: ; preds = %378, %376
%379 = phi i64 [ 0, %376 ], [ %424, %378 ]
%380 = phi i64 [ 0, %376 ], [ %425, %378 ]
%381 = getelementptr inbounds double, double* %22, i64 %379
%382 = bitcast double* %381 to <2 x double>*
%383 = load <2 x double>, <2 x double>* %382
%384 = getelementptr inbounds double, double* %381, i64 2
%385 = bitcast double* %384 to <2 x double>*
%386 = load <2 x double>, <2 x double>* %385
%387 = getelementptr inbounds double, double* %4, i64 %379
%388 = bitcast double* %387 to <2 x double>*
store <2 x double> %383, <2 x double>* %388
%389 = getelementptr inbounds double, double* %387, i64 2
%390 = bitcast double* %389 to <2 x double>*
store <2 x double> %386, <2 x double>* %390
%391 = or i64 %379, 4
%392 = getelementptr inbounds double, double* %22, i64 %391
%393 = bitcast double* %392 to <2 x double>*
%394 = load <2 x double>, <2 x double>* %393
%395 = getelementptr inbounds double, double* %392, i64 2
%396 = bitcast double* %395 to <2 x double>*
%397 = load <2 x double>, <2 x double>* %396
%398 = getelementptr inbounds double, double* %4, i64 %391
%399 = bitcast double* %398 to <2 x double>*
store <2 x double> %394, <2 x double>* %399
%400 = getelementptr inbounds double, double* %398, i64 2
%401 = bitcast double* %400 to <2 x double>*
store <2 x double> %397, <2 x double>* %401
%402 = or i64 %379, 8
%403 = getelementptr inbounds double, double* %22, i64 %402
%404 = bitcast double* %403 to <2 x double>*
%405 = load <2 x double>, <2 x double>* %404
%406 = getelementptr inbounds double, double* %403, i64 2
%407 = bitcast double* %406 to <2 x double>*
%408 = load <2 x double>, <2 x double>* %407
%409 = getelementptr inbounds double, double* %4, i64 %402
%410 = bitcast double* %409 to <2 x double>*
store <2 x double> %405, <2 x double>* %410
%411 = getelementptr inbounds double, double* %409, i64 2
%412 = bitcast double* %411 to <2 x double>*
store <2 x double> %408, <2 x double>* %412
%413 = or i64 %379, 12
%414 = getelementptr inbounds double, double* %22, i64 %413
%415 = bitcast double* %414 to <2 x double>*
%416 = load <2 x double>, <2 x double>* %415
%417 = getelementptr inbounds double, double* %414, i64 2
%418 = bitcast double* %417 to <2 x double>*
%419 = load <2 x double>, <2 x double>* %418
%420 = getelementptr inbounds double, double* %4, i64 %413
%421 = bitcast double* %420 to <2 x double>*
store <2 x double> %416, <2 x double>* %421
%422 = getelementptr inbounds double, double* %420, i64 2
%423 = bitcast double* %422 to <2 x double>*
store <2 x double> %419, <2 x double>* %423
%424 = add nuw i64 %379, 16
%425 = add nuw i64 %380, 4
%426 = icmp eq i64 %425, %377
br i1 %426, label %427, label %378
427: ; preds = %378, %372
%428 = phi i64 [ 0, %372 ], [ %424, %378 ]
%429 = icmp eq i64 %374, 0
br i1 %429, label %446, label %430
430: ; preds = %427, %430
%431 = phi i64 [ %443, %430 ], [ %428, %427 ]
%432 = phi i64 [ %444, %430 ], [ 0, %427 ]
%433 = getelementptr inbounds double, double* %22, i64 %431
%434 = bitcast double* %433 to <2 x double>*
%435 = load <2 x double>, <2 x double>* %434
%436 = getelementptr inbounds double, double* %433, i64 2
%437 = bitcast double* %436 to <2 x double>*
%438 = load <2 x double>, <2 x double>* %437
%439 = getelementptr inbounds double, double* %4, i64 %431
%440 = bitcast double* %439 to <2 x double>*
store <2 x double> %435, <2 x double>* %440
%441 = getelementptr inbounds double, double* %439, i64 2
%442 = bitcast double* %441 to <2 x double>*
store <2 x double> %438, <2 x double>* %442
%443 = add nuw i64 %431, 4
%444 = add i64 %432, 1
%445 = icmp eq i64 %444, %374
br i1 %445, label %446, label %430
446: ; preds = %430, %427
%447 = icmp eq i64 %373, %29
br i1 %447, label %617, label %448
448: ; preds = %365, %362, %446
%449 = phi i64 [ 0, %365 ], [ 0, %362 ], [ %373, %446 ]
%450 = xor i64 %449, -1
%451 = add nsw i64 %450, %29
%452 = and i64 %29, 3
%453 = icmp eq i64 %452, 0
br i1 %453, label %463, label %454
454: ; preds = %448, %454
%455 = phi i64 [ %460, %454 ], [ %449, %448 ]
%456 = phi i64 [ %461, %454 ], [ 0, %448 ]
%457 = getelementptr inbounds double, double* %22, i64 %455
%458 = load double, double* %457
%459 = getelementptr inbounds double, double* %4, i64 %455
store double %458, double* %459
%460 = add nuw nsw i64 %455, 1
%461 = add i64 %456, 1
%462 = icmp eq i64 %461, %452
br i1 %462, label %463, label %454
463: ; preds = %454, %448
%464 = phi i64 [ %449, %448 ], [ %460, %454 ]
%465 = icmp ult i64 %451, 3
br i1 %465, label %617, label %466
466: ; preds = %463, %466
%467 = phi i64 [ %483, %466 ], [ %464, %463 ]
%468 = getelementptr inbounds double, double* %22, i64 %467
%469 = load double, double* %468
%470 = getelementptr inbounds double, double* %4, i64 %467
store double %469, double* %470
%471 = add nuw nsw i64 %467, 1
%472 = getelementptr inbounds double, double* %22, i64 %471
%473 = load double, double* %472
%474 = getelementptr inbounds double, double* %4, i64 %471
store double %473, double* %474
%475 = add nuw nsw i64 %467, 2
%476 = getelementptr inbounds double, double* %22, i64 %475
%477 = load double, double* %476
%478 = getelementptr inbounds double, double* %4, i64 %475
store double %477, double* %478
%479 = add nuw nsw i64 %467, 3
%480 = getelementptr inbounds double, double* %22, i64 %479
%481 = load double, double* %480
%482 = getelementptr inbounds double, double* %4, i64 %479
store double %481, double* %482
%483 = add nuw nsw i64 %467, 4
%484 = icmp eq i64 %483, %363
br i1 %484, label %617, label %466
485: ; preds = %360
br i1 %27, label %486, label %617
486: ; preds = %485
%487 = zext i32 %28 to i64
%488 = icmp ult i32 %28, 4
br i1 %488, label %575, label %489
489: ; preds = %486
%490 = getelementptr double, double* %3, i64 %487
%491 = bitcast double* %490 to i8*
%492 = getelementptr double, double* %18, i64 %487
%493 = icmp ugt double* %492, %3
%494 = icmp ult i8* %19, %491
%495 = and i1 %493, %494
br i1 %495, label %575, label %496
496: ; preds = %489
%497 = and i64 %487, 2147483644
%498 = add nsw i64 %497, -4
%499 = lshr exact i64 %498, 2
%500 = add nuw nsw i64 %499, 1
%501 = and i64 %500, 3
%502 = icmp ult i64 %498, 12
br i1 %502, label %554, label %503
503: ; preds = %496
%504 = and i64 %500, 9223372036854775804
br label %505
505: ; preds = %505, %503
%506 = phi i64 [ 0, %503 ], [ %551, %505 ]
%507 = phi i64 [ 0, %503 ], [ %552, %505 ]
%508 = getelementptr inbounds double, double* %18, i64 %506
%509 = bitcast double* %508 to <2 x double>*
%510 = load <2 x double>, <2 x double>* %509
%511 = getelementptr inbounds double, double* %508, i64 2
%512 = bitcast double* %511 to <2 x double>*
%513 = load <2 x double>, <2 x double>* %512
%514 = getelementptr inbounds double, double* %3, i64 %506
%515 = bitcast double* %514 to <2 x double>*
store <2 x double> %510, <2 x double>* %515
%516 = getelementptr inbounds double, double* %514, i64 2
%517 = bitcast double* %516 to <2 x double>*
store <2 x double> %513, <2 x double>* %517
%518 = or i64 %506, 4
%519 = getelementptr inbounds double, double* %18, i64 %518
%520 = bitcast double* %519 to <2 x double>*
%521 = load <2 x double>, <2 x double>* %520
%522 = getelementptr inbounds double, double* %519, i64 2
%523 = bitcast double* %522 to <2 x double>*
%524 = load <2 x double>, <2 x double>* %523
%525 = getelementptr inbounds double, double* %3, i64 %518
%526 = bitcast double* %525 to <2 x double>*
store <2 x double> %521, <2 x double>* %526
%527 = getelementptr inbounds double, double* %525, i64 2
%528 = bitcast double* %527 to <2 x double>*
store <2 x double> %524, <2 x double>* %528
%529 = or i64 %506, 8
%530 = getelementptr inbounds double, double* %18, i64 %529
%531 = bitcast double* %530 to <2 x double>*
%532 = load <2 x double>, <2 x double>* %531
%533 = getelementptr inbounds double, double* %530, i64 2
%534 = bitcast double* %533 to <2 x double>*
%535 = load <2 x double>, <2 x double>* %534
%536 = getelementptr inbounds double, double* %3, i64 %529
%537 = bitcast double* %536 to <2 x double>*
store <2 x double> %532, <2 x double>* %537
%538 = getelementptr inbounds double, double* %536, i64 2
%539 = bitcast double* %538 to <2 x double>*
store <2 x double> %535, <2 x double>* %539
%540 = or i64 %506, 12
%541 = getelementptr inbounds double, double* %18, i64 %540
%542 = bitcast double* %541 to <2 x double>*
%543 = load <2 x double>, <2 x double>* %542
%544 = getelementptr inbounds double, double* %541, i64 2
%545 = bitcast double* %544 to <2 x double>*
%546 = load <2 x double>, <2 x double>* %545
%547 = getelementptr inbounds double, double* %3, i64 %540
%548 = bitcast double* %547 to <2 x double>*
store <2 x double> %543, <2 x double>* %548
%549 = getelementptr inbounds double, double* %547, i64 2
%550 = bitcast double* %549 to <2 x double>*
store <2 x double> %546, <2 x double>* %550
%551 = add nuw i64 %506, 16
%552 = add nuw i64 %507, 4
%553 = icmp eq i64 %552, %504
br i1 %553, label %554, label %505
554: ; preds = %505, %496
%555 = phi i64 [ 0, %496 ], [ %551, %505 ]
%556 = icmp eq i64 %501, 0
br i1 %556, label %573, label %557
557: ; preds = %554, %557
%558 = phi i64 [ %570, %557 ], [ %555, %554 ]
%559 = phi i64 [ %571, %557 ], [ 0, %554 ]
%560 = getelementptr inbounds double, double* %18, i64 %558
%561 = bitcast double* %560 to <2 x double>*
%562 = load <2 x double>, <2 x double>* %561
%563 = getelementptr inbounds double, double* %560, i64 2
%564 = bitcast double* %563 to <2 x double>*
%565 = load <2 x double>, <2 x double>* %564
%566 = getelementptr inbounds double, double* %3, i64 %558
%567 = bitcast double* %566 to <2 x double>*
store <2 x double> %562, <2 x double>* %567
%568 = getelementptr inbounds double, double* %566, i64 2
%569 = bitcast double* %568 to <2 x double>*
store <2 x double> %565, <2 x double>* %569
%570 = add nuw i64 %558, 4
%571 = add i64 %559, 1
%572 = icmp eq i64 %571, %501
br i1 %572, label %573, label %557
573: ; preds = %557, %554
%574 = icmp eq i64 %497, %487
br i1 %574, label %617, label %575
575: ; preds = %489, %486, %573
%576 = phi i64 [ 0, %489 ], [ 0, %486 ], [ %497, %573 ]
%577 = xor i64 %576, -1
%578 = add nsw i64 %577, %487
%579 = and i64 %487, 3
%580 = icmp eq i64 %579, 0
br i1 %580, label %590, label %581
581: ; preds = %575, %581
%582 = phi i64 [ %587, %581 ], [ %576, %575 ]
%583 = phi i64 [ %588, %581 ], [ 0, %575 ]
%584 = getelementptr inbounds double, double* %18, i64 %582
%585 = load double, double* %584
%586 = getelementptr inbounds double, double* %3, i64 %582
store double %585, double* %586
%587 = add nuw nsw i64 %582, 1
%588 = add i64 %583, 1
%589 = icmp eq i64 %588, %579
br i1 %589, label %590, label %581
590: ; preds = %581, %575
%591 = phi i64 [ %576, %575 ], [ %587, %581 ]
%592 = icmp ult i64 %578, 3
br i1 %592, label %617, label %593
593: ; preds = %590, %593
%594 = phi i64 [ %610, %593 ], [ %591, %590 ]
%595 = getelementptr inbounds double, double* %18, i64 %594
%596 = load double, double* %595
%597 = getelementptr inbounds double, double* %3, i64 %594
store double %596, double* %597
%598 = add nuw nsw i64 %594, 1
%599 = getelementptr inbounds double, double* %18, i64 %598
%600 = load double, double* %599
%601 = getelementptr inbounds double, double* %3, i64 %598
store double %600, double* %601
%602 = add nuw nsw i64 %594, 2
%603 = getelementptr inbounds double, double* %18, i64 %602
%604 = load double, double* %603
%605 = getelementptr inbounds double, double* %3, i64 %602
store double %604, double* %605
%606 = add nuw nsw i64 %594, 3
%607 = getelementptr inbounds double, double* %18, i64 %606
%608 = load double, double* %607
%609 = getelementptr inbounds double, double* %3, i64 %606
store double %608, double* %609
%610 = add nuw nsw i64 %594, 4
%611 = icmp eq i64 %610, %487
br i1 %611, label %617, label %593
612: ; preds = %355
%613 = fsub double %74, %358
%614 = fcmp uge double %613, %2
%615 = icmp slt i32 %73, %1
%616 = select i1 %614, i1 %615, i1 false
br i1 %616, label %71, label %617
617: ; preds = %612, %463, %466, %590, %593, %446, %573, %361, %485, %14
%618 = phi i32 [ 0, %14 ], [ %357, %485 ], [ %357, %361 ], [ %357, %573 ], [ %357, %446 ], [ %357, %593 ], [ %357, %590 ], [ %357, %466 ], [ %357, %463 ], [ %357, %612 ]
%619 = tail call i32 @decorr_star_sysrem(double* %3, double** %5, double** %6, double* %7, i32 %8, i32 %9, i32** %10, double %11, double* %4, double %13)
%620 = tail call i32 @free(double* %18)
%621 = tail call i32 @free(double* %22)
%622 = tail call i32 @magcorr_sysrem(double* %3, double* %4, double** %5, double** %6, i32 %8, i32 %9)
ret i32 %618
}