#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*/ free(double *);
int /*<<< orphan*/ isnan(double);
scalar_t__ malloc(int);
double sqrt(double);
int /*<<< orphan*/ w_ave(int, double *, double *, double *, double *);
void getJstet(int ngood, double tmin, double wkmax, double *time, double *mag,
              double *sig, double *wtave, double *jst, double *kur,
              double *lst) {
  int i, j, flag = 0, npair = 0;
  double dt, wave = 0.0, sigma = 0.0, *ws, wtave1, delta, *delt, *pk, *wk,
             dumval, s = 0.0, weight;
  for (i = 0; i < ngood; i++) {
    if (!isnan(mag[i]) && !isnan(sig[i])) {
      sigma += 1.0 / (sig[i] * sig[i]);
      wave += mag[i] / (sig[i] * sig[i]);
    }
  }
  wave /= sigma;
  ws = (double *)malloc(2 * ngood * sizeof(double));
  for (i = 0; i < ngood; i++)
    ws[i] = 1.0;
  w_ave(ngood, mag, sig, ws, wtave);
  do {
    w_ave(ngood, mag, sig, ws, &wtave1);
    delta = ((*wtave - wtave1) > 0 ? (*wtave - wtave1) : -(*wtave - wtave1));
    *wtave = wtave1;
  } while (delta > 0.00001);
  free(ws);
  dumval = sqrt((double)ngood / (double)(ngood - 1));
  delt = (double *)malloc(2 * ngood * sizeof(double));
  pk = (double *)malloc(2 * ngood * sizeof(double));
  wk = (double *)malloc(2 * ngood * sizeof(double));
  for (j = 0; j < ngood; j++)
    if (!isnan(mag[j]) && !isnan(sig[j]))
      delt[j] = dumval * (mag[j] - *wtave) / sig[j];
  *kur = 0.0;
  for (j = 0; j < ngood; j++) {
    if (!isnan(mag[j]) && !isnan(sig[j])) {
      *kur += ((delt[j]) > 0 ? (delt[j]) : -(delt[j]));
      s += (delt[j] * delt[j]);
    }
  }
  *kur /= (double)ngood;
  s = 0.798 * sqrt(s / (double)ngood);
  *kur /= s;
  flag = 0;
  for (j = 0; j < ngood - 1; j++) {
    if (!isnan(mag[j]) && !isnan(mag[j + 1]) && !isnan(sig[j]) &&
        !isnan(sig[j + 1])) {
      dt = ((time[j + 1] - time[j]) > 0 ? (time[j + 1] - time[j])
                                        : -(time[j + 1] - time[j]));
      if (dt > tmin && !flag) {
        pk[npair] = (delt[j] * delt[j]) - 1.0;
        wk[npair] = 0.1;
        npair++;
        flag = 0;
      }
      if (dt > tmin && flag)
        flag = 0;
      if (dt <= tmin) {
        pk[npair] = delt[j + 1] * delt[j];
        wk[npair] = 1.0;
        npair++;
        flag = 1;
      }
    }
  }
  if (!flag) {
    pk[npair] = (delt[ngood - 1] * delt[ngood - 1]) - 1.0;
    wk[npair] = 0.1;
    npair++;
  }
  weight = 0.0;
  *jst = 0.0;
  for (j = 0; j < npair; j++) {
    s = pk[j] / ((pk[j]) > 0 ? (pk[j]) : -(pk[j])) *
        sqrt(((pk[j]) > 0 ? (pk[j]) : -(pk[j])));
    *jst += wk[j] * s;
    weight += wk[j];
  }
  *jst /= weight;
  *lst = (*jst) * (*kur) * weight / wkmax;
  *jst = (*jst) * weight / wkmax;
  free(delt);
  free(pk);
  free(wk);
}


x86 assembly (clang, -O0):
<getJstet>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    %r8,-0x38(%rbp)
mov    %r9,-0x40(%rbp)
movl   $0x0,-0x4c(%rbp)
movl   $0x0,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    126e <getJstet+0x11e>
mov    -0x28(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1060 <isnan@plt>
cmp    $0x0,%eax
jne    125b <getJstet+0x10b>
mov    -0x30(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1060 <isnan@plt>
cmp    $0x0,%eax
jne    125b <getJstet+0x10b>
mov    -0x30(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x30(%rbp),%rax
movslq -0x44(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
movsd  0xe08(%rip),%xmm0
divsd  %xmm1,%xmm0
addsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x30(%rbp),%rax
movslq -0x44(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
divsd  %xmm1,%xmm0
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    1260 <getJstet+0x110>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    11b4 <getJstet+0x64>
movsd  -0x68(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x70(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    12ce <getJstet+0x17e>
mov    -0x70(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  0xd65(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    129f <getJstet+0x14f>
mov    -0x4(%rbp),%edi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x70(%rbp),%rcx
mov    -0x38(%rbp),%r8
call   1040 <w_ave@plt>
mov    -0x4(%rbp),%edi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x70(%rbp),%rcx
lea    -0x78(%rbp),%r8
call   1040 <w_ave@plt>
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm0
subsd  -0x78(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1332 <getJstet+0x1e2>
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm0
subsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
jmp    135e <getJstet+0x20e>
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm0
subsd  -0x78(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0x80(%rbp)
movsd  -0x78(%rbp),%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x80(%rbp),%xmm0
movsd  0xc7b(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     12e6 <getJstet+0x196>
mov    -0x70(%rbp),%rdi
call   1030 <free@plt>
cvtsi2sdl -0x4(%rbp),%xmm0
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
call   1070 <sqrt@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x88(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x90(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x98(%rbp)
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    14a0 <getJstet+0x350>
mov    -0x28(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1060 <isnan@plt>
cmp    $0x0,%eax
jne    148d <getJstet+0x33d>
mov    -0x30(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1060 <isnan@plt>
cmp    $0x0,%eax
jne    148d <getJstet+0x33d>
movsd  -0xa0(%rbp),%xmm0
ff
mov    -0x28(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x38(%rbp),%rax
subsd  (%rax),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movslq -0x48(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    -0x88(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1492 <getJstet+0x342>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    140d <getJstet+0x2bd>
mov    0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    15bc <getJstet+0x46c>
mov    -0x28(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1060 <isnan@plt>
cmp    $0x0,%eax
jne    15a9 <getJstet+0x459>
mov    -0x30(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1060 <isnan@plt>
cmp    $0x0,%eax
jne    15a9 <getJstet+0x459>
mov    -0x88(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    152e <getJstet+0x3de>
mov    -0x88(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
jmp    155d <getJstet+0x40d>
mov    -0x88(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
mov    0x10(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x88(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x88(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0xa8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
jmp    15ae <getJstet+0x45e>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    14b2 <getJstet+0x362>
cvtsi2sdl -0x4(%rbp),%xmm1
mov    0x10(%rbp),%rax
movsd  (%rax),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
movsd  -0xa8(%rbp),%xmm0
ff
cvtsi2sdl -0x4(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1070 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xa16(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0xa8(%rbp),%xmm1
ff
mov    0x10(%rbp),%rax
movsd  (%rax),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
movl   $0x0,-0x4c(%rbp)
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    187a <getJstet+0x72a>
mov    -0x28(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1060 <isnan@plt>
cmp    $0x0,%eax
jne    1867 <getJstet+0x717>
mov    -0x28(%rbp),%rax
mov    -0x48(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1060 <isnan@plt>
cmp    $0x0,%eax
jne    1867 <getJstet+0x717>
mov    -0x30(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1060 <isnan@plt>
cmp    $0x0,%eax
jne    1867 <getJstet+0x717>
mov    -0x30(%rbp),%rax
mov    -0x48(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1060 <isnan@plt>
cmp    $0x0,%eax
jne    1867 <getJstet+0x717>
mov    -0x20(%rbp),%rax
mov    -0x48(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x48(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1703 <getJstet+0x5b3>
mov    -0x20(%rbp),%rax
mov    -0x48(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x48(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
jmp    1741 <getJstet+0x5f1>
mov    -0x20(%rbp),%rax
mov    -0x48(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x48(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    17d0 <getJstet+0x680>
cmpl   $0x0,-0x4c(%rbp)
jne    17d0 <getJstet+0x680>
mov    -0x88(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x88(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x884(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    -0x90(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x98(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  0x855(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
movl   $0x0,-0x4c(%rbp)
movsd  -0x58(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    17f1 <getJstet+0x6a1>
cmpl   $0x0,-0x4c(%rbp)
je     17f1 <getJstet+0x6a1>
movl   $0x0,-0x4c(%rbp)
movsd  -0x58(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1862 <getJstet+0x712>
mov    -0x88(%rbp),%rax
mov    -0x48(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x88(%rbp),%rax
movslq -0x48(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x90(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x98(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  0x7d3(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
movl   $0x1,-0x4c(%rbp)
jmp    1867 <getJstet+0x717>
jmp    186c <getJstet+0x71c>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1624 <getJstet+0x4d4>
cmpl   $0x0,-0x4c(%rbp)
jne    18ef <getJstet+0x79f>
mov    -0x88(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x88(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x75e(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    -0x90(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x98(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  0x72f(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x40(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x50(%rbp),%eax
jge    1a9c <getJstet+0x94c>
mov    -0x90(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
mov    -0x90(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    196a <getJstet+0x81a>
mov    -0x90(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
jmp    1999 <getJstet+0x849>
mov    -0x90(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xd0(%rbp),%xmm0
ff
movsd  -0xd8(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
mov    -0x90(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    19ef <getJstet+0x89f>
mov    -0x90(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
jmp    1a1e <getJstet+0x8ce>
mov    -0x90(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0xe8(%rbp),%xmm0
ff
call   1070 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0xe0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x98(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0xa8(%rbp),%xmm2
ff
mov    -0x40(%rbp),%rax
movsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x98(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    190c <getJstet+0x7bc>
movsd  -0xb0(%rbp),%xmm1
ff
mov    -0x40(%rbp),%rax
movsd  (%rax),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x40(%rbp),%rax
movsd  (%rax),%xmm0
mov    0x10(%rbp),%rax
mulsd  (%rax),%xmm0
mulsd  -0xb0(%rbp),%xmm0
ff
divsd  -0x18(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x40(%rbp),%rax
movsd  (%rax),%xmm0
mulsd  -0xb0(%rbp),%xmm0
ff
divsd  -0x18(%rbp),%xmm0
mov    -0x40(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x88(%rbp),%rdi
call   1030 <free@plt>
mov    -0x90(%rbp),%rdi
call   1030 <free@plt>
mov    -0x98(%rbp),%rdi
call   1030 <free@plt>
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getJstet>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %r9,0x78(%rsp)
mov    %r8,%rbp
mov    %rcx,%rbx
mov    %rdx,%r15
mov    %rsi,0x60(%rsp)
movsd  %xmm1,0x70(%rsp)
mov    %edi,%r14d
mov    %edi,%r13d
test   %edi,%edi
mov    %r14,0x10(%rsp)
movsd  %xmm0,0x58(%rsp)
mov    %r13,0x38(%rsp)
jle    11f3 <getJstet+0xa3>
mov    %rbx,%r14
xor    %ebx,%ebx
jmp    11a9 <getJstet+0x59>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbx
cmp    %rbx,%r13
je     11c5 <getJstet+0x75>
movsd  (%r15,%rbx,8),%xmm0
call   1060 <isnan@plt>
test   %eax,%eax
jne    11a0 <getJstet+0x50>
movsd  (%r14,%rbx,8),%xmm0
call   1060 <isnan@plt>
jmp    11a0 <getJstet+0x50>
mov    0x10(%rsp),%rbx
mov    %ebx,%edi
shl    $0x4,%edi
mov    %edi,0x8(%rsp)
call   1050 <malloc@plt>
mov    %rax,%r12
test   %ebx,%ebx
jle    120a <getJstet+0xba>
cmp    $0x4,%ebx
jae    1218 <getJstet+0xc8>
xor    %eax,%eax
mov    %r14,%rbx
mov    0x10(%rsp),%r14
jmp    1329 <getJstet+0x1d9>
mov    %r14d,%edi
shl    $0x4,%edi
mov    %edi,0x8(%rsp)
call   1050 <malloc@plt>
mov    %rax,%r12
jmp    134d <getJstet+0x1fd>
mov    %r14,%rax
mov    %rbx,%r14
mov    %rax,%rbx
jmp    134d <getJstet+0x1fd>
mov    %r13d,%eax
and    $0xfffffffc,%eax
lea    -0x4(%rax),%rsi
mov    %rsi,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
mov    %edx,%ecx
and    $0x7,%ecx
cmp    $0x1c,%rsi
jae    1247 <getJstet+0xf7>
xor    %esi,%esi
mov    %r14,%rbx
mov    0x10(%rsp),%r14
jmp    12f5 <getJstet+0x1a5>
and    $0xfffffffffffffff8,%rdx
xor    %esi,%esi
movapd 0xdab(%rip),%xmm0
mov    %r14,%rbx
mov    0x10(%rsp),%r14
nopl   (%rax)
movupd %xmm0,(%r12,%rsi,8)
movupd %xmm0,0x10(%r12,%rsi,8)
movupd %xmm0,0x20(%r12,%rsi,8)
movupd %xmm0,0x30(%r12,%rsi,8)
movupd %xmm0,0x40(%r12,%rsi,8)
movupd %xmm0,0x50(%r12,%rsi,8)
movupd %xmm0,0x60(%r12,%rsi,8)
movupd %xmm0,0x70(%r12,%rsi,8)
movupd %xmm0,0x80(%r12,%rsi,8)
movupd %xmm0,0x90(%r12,%rsi,8)
movupd %xmm0,0xa0(%r12,%rsi,8)
movupd %xmm0,0xb0(%r12,%rsi,8)
movupd %xmm0,0xc0(%r12,%rsi,8)
movupd %xmm0,0xd0(%r12,%rsi,8)
movupd %xmm0,0xe0(%r12,%rsi,8)
movupd %xmm0,0xf0(%r12,%rsi,8)
add    $0x20,%rsi
add    $0xfffffffffffffff8,%rdx
jne    1260 <getJstet+0x110>
test   %rcx,%rcx
je     1324 <getJstet+0x1d4>
lea    (%r12,%rsi,8),%rdx
add    $0x10,%rdx
shl    $0x5,%rcx
xor    %esi,%esi
movapd 0xcf0(%rip),%xmm0
movupd %xmm0,-0x10(%rdx,%rsi,1)
movupd %xmm0,(%rdx,%rsi,1)
add    $0x20,%rsi
cmp    %rsi,%rcx
jne    1310 <getJstet+0x1c0>
cmp    %r13,%rax
je     134d <getJstet+0x1fd>
movabs $0x3ff0000000000000,%rcx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rcx,(%r12,%rax,8)
add    $0x1,%rax
cmp    %rax,%r13
jne    1340 <getJstet+0x1f0>
mov    %r14d,%edi
mov    %r15,%rsi
mov    %rbx,%rdx
mov    %r12,%rcx
mov    %rbp,%r8
call   1040 <w_ave@plt>
lea    0x80(%rsp),%r13
nopl   0x0(%rax)
mov    %r14d,%edi
mov    %r15,%rsi
mov    %rbx,%rdx
mov    %r12,%rcx
mov    %r13,%r8
call   1040 <w_ave@plt>
movsd  0x0(%rbp),%xmm0
movsd  0x80(%rsp),%xmm1
subsd  %xmm1,%xmm0
movapd %xmm0,%xmm2
xorpd  0xc6e(%rip),%xmm2
xorpd  %xmm3,%xmm3
cmpltsd %xmm0,%xmm3
andpd  %xmm3,%xmm0
andnpd %xmm2,%xmm3
orpd   %xmm0,%xmm3
movsd  %xmm1,0x0(%rbp)
ucomisd 0xc5c(%rip),%xmm3
ja     1370 <getJstet+0x220>
mov    %r12,%rdi
call   1030 <free@plt>
xorps  %xmm2,%xmm2
cvtsi2sd %r14d,%xmm2
lea    -0x1(%r14),%eax
mov    %eax,0x40(%rsp)
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movapd %xmm2,%xmm0
divsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
movsd  %xmm2,0x68(%rsp)
jb     1403 <getJstet+0x2b3>
sqrtsd %xmm0,%xmm0
jmp    1408 <getJstet+0x2b8>
call   1070 <sqrt@plt>
movsd  %xmm0,0x20(%rsp)
mov    %rbx,%r14
mov    0x38(%rsp),%r13
mov    0x8(%rsp),%ebx
mov    %ebx,%edi
call   1050 <malloc@plt>
mov    %rax,0x30(%rsp)
mov    %ebx,%edi
call   1050 <malloc@plt>
mov    %rax,0x8(%rsp)
mov    %ebx,%edi
call   1050 <malloc@plt>
mov    %rax,%r12
cmpl   $0x0,0x10(%rsp)
jle    157c <getJstet+0x42c>
xor    %ebx,%ebx
jmp    1459 <getJstet+0x309>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbx
cmp    %rbx,%r13
je     149a <getJstet+0x34a>
movsd  (%r15,%rbx,8),%xmm0
call   1060 <isnan@plt>
test   %eax,%eax
jne    1450 <getJstet+0x300>
movsd  (%r14,%rbx,8),%xmm0
call   1060 <isnan@plt>
test   %eax,%eax
jne    1450 <getJstet+0x300>
movsd  (%r15,%rbx,8),%xmm0
subsd  0x0(%rbp),%xmm0
mulsd  0x20(%rsp),%xmm0
divsd  (%r14,%rbx,8),%xmm0
mov    0x30(%rsp),%rax
movsd  %xmm0,(%rax,%rbx,8)
jmp    1450 <getJstet+0x300>
mov    0xc0(%rsp),%rax
movq   $0x0,(%rax)
xorpd  %xmm2,%xmm2
cmpl   $0x0,0x10(%rsp)
mov    %r14,%rbx
movapd 0xb53(%rip),%xmm3
xorpd  %xmm1,%xmm1
jle    1597 <getJstet+0x447>
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x20(%rsp)
xor    %ebp,%ebp
jmp    14f1 <getJstet+0x3a1>
cs nopw 0x0(%rax,%rax,1)
nop
movapd 0xb28(%rip),%xmm3
add    $0x1,%rbp
cmp    %rbp,%r13
je     1568 <getJstet+0x418>
movsd  (%r15,%rbp,8),%xmm0
call   1060 <isnan@plt>
test   %eax,%eax
jne    14e0 <getJstet+0x390>
movsd  (%rbx,%rbp,8),%xmm0
call   1060 <isnan@plt>
test   %eax,%eax
jne    14e0 <getJstet+0x390>
mov    0x30(%rsp),%rcx
movsd  (%rcx,%rbp,8),%xmm0
movapd %xmm0,%xmm1
movapd 0xaec(%rip),%xmm3
xorpd  %xmm3,%xmm1
xorpd  %xmm2,%xmm2
cmpltsd %xmm0,%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm1,%xmm2
orpd   %xmm0,%xmm2
mov    0xc0(%rsp),%rax
addsd  (%rax),%xmm2
movsd  %xmm2,(%rax)
movsd  (%rcx,%rbp,8),%xmm0
mulsd  %xmm0,%xmm0
movsd  0x20(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x20(%rsp)
jmp    14e8 <getJstet+0x398>
mov    0xc0(%rsp),%rax
movsd  (%rax),%xmm1
movsd  0x20(%rsp),%xmm2
jmp    1597 <getJstet+0x447>
xorpd  %xmm2,%xmm2
mov    0xc0(%rsp),%rax
movapd 0xa80(%rip),%xmm3
mov    %r14,%rbx
xorpd  %xmm1,%xmm1
movsd  0x68(%rsp),%xmm0
divsd  %xmm0,%xmm1
movsd  %xmm1,(%rax)
divsd  %xmm0,%xmm2
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm2
mov    %rax,%r13
movapd %xmm2,%xmm0
jb     15c0 <getJstet+0x470>
sqrtsd %xmm0,%xmm0
jmp    15cd <getJstet+0x47d>
call   1070 <sqrt@plt>
movapd 0xa43(%rip),%xmm3
mov    0x10(%rsp),%rax
mulsd  0xa4e(%rip),%xmm0
movsd  0x0(%r13),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x0(%r13)
xor    %edx,%edx
movabs $0x3fb999999999999a,%rsi
99 b9 3f
cmp    $0x2,%eax
jl     1784 <getJstet+0x634>
mov    0x40(%rsp),%r13d
xor    %ebp,%ebp
movl   $0x0,0x10(%rsp)
xor    %eax,%eax
mov    %rax,0x20(%rsp)
jmp    1669 <getJstet+0x519>
mov    0x30(%rsp),%rax
movsd  0x8(%rax,%r14,8),%xmm0
mulsd  (%rax,%r14,8),%xmm0
mov    0x20(%rsp),%rcx
movslq %ecx,%rcx
mov    0x8(%rsp),%rax
movsd  %xmm0,(%rax,%rcx,8)
movabs $0x3ff0000000000000,%rax
mov    %rax,(%r12,%rcx,8)
add    $0x1,%ecx
mov    %rcx,0x20(%rsp)
movl   $0x1,0x10(%rsp)
nopl   0x0(%rax)
cmp    %rbp,%r13
je     175e <getJstet+0x60e>
mov    %rbp,%r14
movsd  (%r15,%rbp,8),%xmm0
call   1060 <isnan@plt>
add    $0x1,%rbp
test   %eax,%eax
jne    1660 <getJstet+0x510>
movsd  0x8(%r15,%r14,8),%xmm0
call   1060 <isnan@plt>
test   %eax,%eax
jne    1660 <getJstet+0x510>
movsd  (%rbx,%r14,8),%xmm0
call   1060 <isnan@plt>
test   %eax,%eax
jne    1660 <getJstet+0x510>
movsd  0x8(%rbx,%r14,8),%xmm0
call   1060 <isnan@plt>
test   %eax,%eax
jne    1660 <getJstet+0x510>
mov    0x60(%rsp),%rax
movsd  0x8(%rax,%r14,8),%xmm1
subsd  (%rax,%r14,8),%xmm1
movapd %xmm1,%xmm2
xorpd  0x944(%rip),%xmm2
xorpd  %xmm0,%xmm0
cmpltsd %xmm1,%xmm0
andpd  %xmm0,%xmm1
andnpd %xmm2,%xmm0
orpd   %xmm1,%xmm0
movsd  0x58(%rsp),%xmm2
ucomisd %xmm2,%xmm0
jbe    1738 <getJstet+0x5e8>
mov    0x10(%rsp),%ecx
test   %ecx,%ecx
jne    173c <getJstet+0x5ec>
mov    0x30(%rsp),%rax
movsd  (%rax,%r14,8),%xmm1
mulsd  %xmm1,%xmm1
addsd  0x924(%rip),%xmm1
mov    0x20(%rsp),%rcx
movslq %ecx,%rcx
mov    0x8(%rsp),%rax
movsd  %xmm1,(%rax,%rcx,8)
movabs $0x3fb999999999999a,%rax
99 b9 3f
mov    %rax,(%r12,%rcx,8)
add    $0x1,%ecx
mov    %rcx,0x20(%rsp)
xor    %ecx,%ecx
jmp    173c <getJstet+0x5ec>
mov    0x10(%rsp),%ecx
xor    %eax,%eax
test   %ecx,%ecx
jne    1744 <getJstet+0x5f4>
mov    %ecx,%eax
ucomisd %xmm2,%xmm0
cmova  %eax,%ecx
ucomisd %xmm0,%xmm2
jae    1617 <getJstet+0x4c7>
mov    %ecx,0x10(%rsp)
jmp    1660 <getJstet+0x510>
cmpl   $0x0,0x10(%rsp)
mov    0xc0(%rsp),%r13
movapd 0x89d(%rip),%xmm3
mov    0x20(%rsp),%rdx
movabs $0x3fb999999999999a,%rsi
99 b9 3f
jne    17b3 <getJstet+0x663>
movslq 0x40(%rsp),%rax
mov    0x30(%rsp),%rcx
movsd  (%rcx,%rax,8),%xmm0
mulsd  %xmm0,%xmm0
addsd  0x891(%rip),%xmm0
movslq %edx,%rdx
mov    0x8(%rsp),%rax
movsd  %xmm0,(%rax,%rdx,8)
mov    %rsi,(%r12,%rdx,8)
add    $0x1,%edx
mov    0x78(%rsp),%rbx
movq   $0x0,(%rbx)
test   %edx,%edx
jle    187c <getJstet+0x72c>
mov    %edx,%r14d
xorpd  %xmm5,%xmm5
xor    %ebp,%ebp
xorpd  %xmm2,%xmm2
mov    0xc8(%rsp),%r15
jmp    183e <getJstet+0x6ee>
xchg   %ax,%ax
movapd %xmm6,%xmm0
movapd %xmm2,0x10(%rsp)
movapd %xmm4,0x20(%rsp)
movapd %xmm6,0x40(%rsp)
call   1070 <sqrt@plt>
movapd 0x40(%rsp),%xmm6
xorpd  %xmm5,%xmm5
movapd 0x20(%rsp),%xmm4
movapd 0x10(%rsp),%xmm2
movapd 0x7f7(%rip),%xmm3
divsd  %xmm6,%xmm4
mulsd  %xmm0,%xmm4
mulsd  (%r12,%rbp,8),%xmm4
addsd  (%rbx),%xmm4
movsd  %xmm4,(%rbx)
addsd  (%r12,%rbp,8),%xmm2
add    $0x1,%rbp
cmp    %rbp,%r14
je     188c <getJstet+0x73c>
mov    0x8(%rsp),%rax
movsd  (%rax,%rbp,8),%xmm4
movapd %xmm4,%xmm0
xorpd  %xmm3,%xmm0
xorpd  %xmm6,%xmm6
cmpltsd %xmm4,%xmm6
movapd %xmm6,%xmm1
andpd  %xmm4,%xmm1
andnpd %xmm0,%xmm6
orpd   %xmm1,%xmm6
ucomisd %xmm5,%xmm6
jb     17e0 <getJstet+0x690>
xorps  %xmm0,%xmm0
sqrtsd %xmm6,%xmm0
jmp    1819 <getJstet+0x6c9>
xorpd  %xmm4,%xmm4
xorpd  %xmm2,%xmm2
mov    0xc8(%rsp),%r15
divsd  %xmm2,%xmm4
movsd  %xmm4,(%rbx)
mulsd  0x0(%r13),%xmm4
mulsd  %xmm2,%xmm4
movsd  0x70(%rsp),%xmm0
divsd  %xmm0,%xmm4
movsd  %xmm4,(%r15)
mulsd  (%rbx),%xmm2
divsd  %xmm0,%xmm2
movsd  %xmm2,(%rbx)
mov    0x30(%rsp),%rdi
call   1030 <free@plt>
mov    0x8(%rsp),%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1030 <free@plt>
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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