#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double fabs(double);
scalar_t__ isnan(double);
double sqrt(double);
int fasper(double *x, double *y, int n, double ofac, double hifac, double *wk1,
           double *wk2, int nwk, int *nout) {
  void avevar(double *data, int n, double *ave, double *var);
  void realft(double *data, int n, int isign);
  int spread(double y, double *yy, int n, double x, int m);
  int j, k, ndim, nfreq, nfreqt, ngood;
  double ave, ck, ckk, cterm, cwt, den, df, fac, fndim, hc2wt;
  double hs2wt, hypo, pmax, sterm, swt, var, xdif, xmax, xmin;
  *nout = 0.5 * ofac * hifac * n;
  nfreqt = ofac * hifac * n * 4;
  nfreq = 64;
  while (nfreq < nfreqt)
    nfreq <<= 1;
  ndim = nfreq << 1;
  if (ndim > nwk) {
    return (1);
  }
  avevar(y, n, &ave, &var);
  if (var == 0.0) {
    return (1);
  }
  j = 0;
  ngood = 0;
  while (isnan(x[j]))
    j++;
  xmin = x[j];
  ngood = 1;
  xmax = xmin;
  for (j = j + 1; j < n; j++) {
    if (!isnan(x[j])) {
      ngood++;
      if (x[j] < xmin)
        xmin = x[j];
      if (x[j] > xmax)
        xmax = x[j];
    }
  }
  xdif = xmax - xmin;
  for (j = 0; j < ndim; j++)
    wk1[j] = wk2[j] = 0.0;
  fac = ndim / (xdif * ofac);
  fndim = ndim;
  for (j = 0; j < n; j++) {
    if (!isnan(x[j])) {
      ck = (x[j] - xmin) * fac;
      while ((ck) >= (fndim))
        (ck) -= (fndim);
      ckk = 2.0 * (ck++);
      while ((ckk) >= (fndim))
        (ckk) -= (fndim);
      ++ckk;
      if (spread(y[j] - ave, wk1, ndim, ck, 4))
        return (1);
      if (spread(1.0, wk2, ndim, ckk, 4))
        return (1);
    }
  }
  realft(wk1, ndim, 1);
  realft(wk2, ndim, 1);
  df = 1.0 / (xdif * ofac);
  pmax = -1.0;
  for (k = 3, j = 1; j <= (*nout); j++, k += 2) {
    hypo = sqrt(wk2[k - 1] * wk2[k - 1] + wk2[k] * wk2[k]);
    hc2wt = 0.5 * wk2[k - 1] / hypo;
    hs2wt = 0.5 * wk2[k] / hypo;
    cwt = sqrt(0.5 + hc2wt);
    swt = ((hs2wt) >= 0.0 ? fabs(sqrt(0.5 - hc2wt)) : -fabs(sqrt(0.5 - hc2wt)));
    den = 0.5 * n + hc2wt * wk2[k - 1] + hs2wt * wk2[k];
    cterm = ((cwt * wk1[k - 1] + swt * wk1[k]) *
             (cwt * wk1[k - 1] + swt * wk1[k])) /
            den;
    sterm = ((cwt * wk1[k] - swt * wk1[k - 1]) *
             (cwt * wk1[k] - swt * wk1[k - 1])) /
            (n - den);
    wk1[j - 1] = j * df;
    wk2[j - 1] = (cterm + sterm) / (2.0 * var);
  }
  return (0);
}


x86 assembly (clang, -O0):
<fasper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movsd  %xmm0,-0x28(%rbp)
movsd  %xmm1,-0x30(%rbp)
mov    %rcx,-0x38(%rbp)
mov    %r8,-0x40(%rbp)
mov    %r9d,-0x44(%rbp)
movsd  0xe80(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
cvtsi2sdl -0x1c(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%ecx
mov    0x10(%rbp),%rax
mov    %ecx,(%rax)
movsd  -0x28(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
cvtsi2sdl -0x1c(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe40(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x58(%rbp)
movl   $0x40,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x58(%rbp),%eax
jge    11ec <fasper+0x9c>
mov    -0x54(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    11d2 <fasper+0x82>
mov    -0x54(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x44(%rbp),%eax
jle    120d <fasper+0xbd>
movl   $0x1,-0x4(%rbp)
jmp    1916 <fasper+0x7c6>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
lea    -0x68(%rbp),%rdx
lea    -0xe0(%rbp),%rcx
call   1040 <avevar@plt>
movsd  -0xe0(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    124b <fasper+0xfb>
jp     124b <fasper+0xfb>
movl   $0x1,-0x4(%rbp)
jmp    1916 <fasper+0x7c6>
movl   $0x0,-0x48(%rbp)
movl   $0x0,-0x5c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1060 <isnan@plt>
cmp    $0x0,%rax
je     1283 <fasper+0x133>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1259 <fasper+0x109>
mov    -0x10(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movl   $0x1,-0x5c(%rbp)
movsd  -0xf8(%rbp),%xmm0
ff
movsd  %xmm0,-0xf0(%rbp)
ff
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1365 <fasper+0x215>
mov    -0x10(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1060 <isnan@plt>
cmp    $0x0,%rax
jne    1352 <fasper+0x202>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0xf8(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    131d <fasper+0x1cd>
mov    -0x10(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
mov    -0x10(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd -0xf0(%rbp),%xmm0
ff
jbe    134d <fasper+0x1fd>
mov    -0x10(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
jmp    1352 <fasper+0x202>
jmp    1357 <fasper+0x207>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    12b8 <fasper+0x168>
movsd  -0xf0(%rbp),%xmm0
ff
subsd  -0xf8(%rbp),%xmm0
ff
movsd  %xmm0,-0xe8(%rbp)
ff
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x50(%rbp),%eax
jge    13be <fasper+0x26e>
mov    -0x40(%rbp),%rax
movslq -0x48(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%rax
movslq -0x48(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1384 <fasper+0x234>
cvtsi2sdl -0x50(%rbp),%xmm0
movsd  -0xe8(%rbp),%xmm1
ff
mulsd  -0x28(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
cvtsi2sdl -0x50(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    155a <fasper+0x40a>
mov    -0x10(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1060 <isnan@plt>
cmp    $0x0,%rax
jne    1547 <fasper+0x3f7>
mov    -0x10(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0xf8(%rbp),%xmm0
ff
mulsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
ucomisd -0xa8(%rbp),%xmm0
ff
jb     1468 <fasper+0x318>
movsd  -0xa8(%rbp),%xmm1
ff
movsd  -0x70(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
jmp    143a <fasper+0x2ea>
movsd  -0x70(%rbp),%xmm1
movsd  0xba3(%rip),%xmm2
movaps %xmm1,%xmm0
addsd  %xmm2,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xb97(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
ucomisd -0xa8(%rbp),%xmm0
ff
jb     14c0 <fasper+0x370>
movsd  -0xa8(%rbp),%xmm1
ff
movsd  -0x78(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
jmp    1492 <fasper+0x342>
movsd  0xb50(%rip),%xmm0
addsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x68(%rbp),%xmm0
mov    -0x38(%rbp),%rdi
mov    -0x50(%rbp),%esi
movsd  -0x70(%rbp),%xmm1
mov    $0x4,%edx
call   1050 <spread@plt>
cmp    $0x0,%eax
je     150f <fasper+0x3bf>
movl   $0x1,-0x4(%rbp)
jmp    1916 <fasper+0x7c6>
mov    -0x40(%rbp),%rdi
mov    -0x50(%rbp),%esi
movsd  -0x78(%rbp),%xmm1
movsd  0xaf5(%rip),%xmm0
mov    $0x4,%edx
call   1050 <spread@plt>
cmp    $0x0,%eax
je     1542 <fasper+0x3f2>
movl   $0x1,-0x4(%rbp)
jmp    1916 <fasper+0x7c6>
jmp    1547 <fasper+0x3f7>
jmp    154c <fasper+0x3fc>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    13f0 <fasper+0x2a0>
mov    -0x38(%rbp),%rdi
mov    -0x50(%rbp),%esi
mov    $0x1,%edx
call   1030 <realft@plt>
mov    -0x40(%rbp),%rdi
mov    -0x50(%rbp),%esi
mov    $0x1,%edx
call   1030 <realft@plt>
movsd  -0xe8(%rbp),%xmm1
ff
mulsd  -0x28(%rbp),%xmm1
movsd  0xa87(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  0xa6b(%rip),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movl   $0x3,-0x4c(%rbp)
movl   $0x1,-0x48(%rbp)
mov    -0x48(%rbp),%eax
mov    0x10(%rbp),%rcx
cmp    (%rcx),%eax
jg     190f <fasper+0x7bf>
mov    -0x40(%rbp),%rax
mov    -0x4c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
mov    -0x4c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x40(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x40(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1070 <sqrt@plt>
movsd  %xmm0,-0xc0(%rbp)
ff
mov    -0x40(%rbp),%rax
mov    -0x4c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  0x9d6(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
divsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x40(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  0x9b1(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
divsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  0x994(%rip),%xmm0
addsd  -0xb0(%rbp),%xmm0
ff
call   1070 <sqrt@plt>
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     16cb <fasper+0x57b>
movsd  0x962(%rip),%xmm0
subsd  -0xb0(%rbp),%xmm0
ff
call   1070 <sqrt@plt>
movaps 0x976(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
jmp    170a <fasper+0x5ba>
movsd  0x935(%rip),%xmm0
subsd  -0xb0(%rbp),%xmm0
ff
call   1070 <sqrt@plt>
movaps 0x949(%rip),%xmm1
pand   %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0x100(%rbp),%xmm0
ff
movsd  %xmm0,-0xd8(%rbp)
ff
cvtsi2sdl -0x1c(%rbp),%xmm1
movsd  -0xb0(%rbp),%xmm0
ff
mov    -0x40(%rbp),%rax
mov    -0x4c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  0x8c7(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0xb8(%rbp),%xmm0
ff
mov    -0x40(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
mov    -0x4c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0xd8(%rbp),%xmm1
ff
mov    -0x38(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x88(%rbp),%xmm1
ff
mov    -0x38(%rbp),%rax
mov    -0x4c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm3
movsd  -0xd8(%rbp),%xmm2
ff
mov    -0x38(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
divsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x80(%rbp)
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0xd8(%rbp),%xmm1
ff
mov    -0x38(%rbp),%rax
mov    -0x4c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x88(%rbp),%xmm1
ff
mov    -0x38(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm3
movsd  -0xd8(%rbp),%xmm2
ff
mov    -0x38(%rbp),%rax
mov    -0x4c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x1c(%rbp),%xmm1
subsd  -0x90(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
cvtsi2sdl -0x48(%rbp),%xmm0
mulsd  -0x98(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
mov    -0x48(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x80(%rbp),%xmm0
addsd  -0xd0(%rbp),%xmm0
ff
movsd  0x746(%rip),%xmm1
mulsd  -0xe0(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
mov    -0x40(%rbp),%rax
mov    -0x48(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
mov    -0x4c(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x4c(%rbp)
jmp    15bb <fasper+0x46b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fasper>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %r8,%r15
mov    %rcx,%r14
mov    %edx,%ebx
mov    %rdi,%r13
mov    0x90(%rsp),%rcx
movsd  0xe87(%rip),%xmm3
mulsd  %xmm0,%xmm3
cvtsi2sd %edx,%xmm2
mulsd  %xmm1,%xmm3
mulsd  %xmm2,%xmm3
cvttsd2si %xmm3,%eax
movsd  %xmm0,0x20(%rsp)
mulsd  %xmm0,%xmm1
movsd  %xmm2,0x40(%rsp)
mulsd  %xmm2,%xmm1
mulsd  0xe5f(%rip),%xmm1
mov    %eax,(%rcx)
cvttsd2si %xmm1,%eax
mov    $0x40,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %ebp,%ecx
lea    (%rcx,%rcx,1),%ebp
cmp    %eax,%ecx
jl     11c0 <fasper+0x70>
mov    $0x1,%r12d
cmp    %r9d,%ebp
jg     1755 <fasper+0x605>
lea    0x50(%rsp),%rdx
lea    0x48(%rsp),%rcx
mov    %rsi,%rdi
mov    %rsi,0x30(%rsp)
mov    %ebx,%esi
call   1040 <avevar@plt>
movsd  0x48(%rsp),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1207 <fasper+0xb7>
jnp    1755 <fasper+0x605>
mov    %ebx,0x8(%rsp)
xor    %ebx,%ebx
nopl   (%rax)
movsd  0x0(%r13,%rbx,8),%xmm0
call   1060 <isnan@plt>
add    $0x1,%rbx
test   %rax,%rax
jne    1210 <fasper+0xc0>
lea    -0x1(%rbx),%eax
movsd  0x0(%r13,%rax,8),%xmm2
mov    0x8(%rsp),%esi
cmp    %esi,%ebx
mov    %r13,0x28(%rsp)
jge    12b7 <fasper+0x167>
mov    %ebx,%eax
lea    0x0(%r13,%rax,8),%r13
xor    %r12d,%r12d
movapd %xmm2,%xmm3
jmp    1277 <fasper+0x127>
nopl   0x0(%rax)
movsd  0x10(%rsp),%xmm1
movsd  0x18(%rsp),%xmm0
mov    0x8(%rsp),%esi
lea    (%rbx,%r12,1),%eax
add    $0x1,%eax
add    $0x1,%r12
movapd %xmm0,%xmm2
movapd %xmm1,%xmm3
cmp    %esi,%eax
jge    12bf <fasper+0x16f>
movsd  %xmm3,0x10(%rsp)
movsd  %xmm2,0x18(%rsp)
movsd  0x0(%r13,%r12,8),%xmm0
call   1060 <isnan@plt>
test   %rax,%rax
jne    1250 <fasper+0x100>
movsd  0x0(%r13,%r12,8),%xmm1
movapd %xmm1,%xmm0
minsd  0x18(%rsp),%xmm0
movsd  0x10(%rsp),%xmm2
ucomisd %xmm2,%xmm1
ja     125c <fasper+0x10c>
movapd %xmm2,%xmm1
jmp    125c <fasper+0x10c>
movapd %xmm2,%xmm1
movapd %xmm2,%xmm0
movsd  %xmm0,0x10(%rsp)
subsd  %xmm0,%xmm1
test   %ebp,%ebp
mov    0x30(%rsp),%r12
jle    1424 <fasper+0x2d4>
mov    %ebp,%eax
lea    (%r14,%rax,8),%rcx
cmp    %r15,%rcx
jbe    1344 <fasper+0x1f4>
lea    (%r15,%rax,8),%rcx
cmp    %r14,%rcx
jbe    1344 <fasper+0x1f4>
xor    %ecx,%ecx
nopl   0x0(%rax)
movq   $0x0,(%r15,%rcx,8)
movq   $0x0,(%r14,%rcx,8)
movq   $0x0,0x8(%r15,%rcx,8)
movq   $0x0,0x8(%r14,%rcx,8)
movq   $0x0,0x10(%r15,%rcx,8)
movq   $0x0,0x10(%r14,%rcx,8)
movq   $0x0,0x18(%r15,%rcx,8)
movq   $0x0,0x18(%r14,%rcx,8)
add    $0x4,%rcx
cmp    %rcx,%rax
jne    12f0 <fasper+0x1a0>
jmp    1424 <fasper+0x2d4>
add    $0xfffffffffffffffc,%rax
shr    $0x2,%rax
add    $0x1,%rax
mov    %eax,%ecx
and    $0x3,%ecx
and    $0xfffffffffffffffc,%rax
mov    $0x70,%edx
xorpd  %xmm0,%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movupd %xmm0,-0x70(%r15,%rdx,1)
movupd %xmm0,-0x60(%r15,%rdx,1)
movupd %xmm0,-0x70(%r14,%rdx,1)
movupd %xmm0,-0x60(%r14,%rdx,1)
movupd %xmm0,-0x50(%r15,%rdx,1)
movupd %xmm0,-0x40(%r15,%rdx,1)
movupd %xmm0,-0x50(%r14,%rdx,1)
movupd %xmm0,-0x40(%r14,%rdx,1)
movupd %xmm0,-0x30(%r15,%rdx,1)
movupd %xmm0,-0x20(%r15,%rdx,1)
movupd %xmm0,-0x30(%r14,%rdx,1)
movupd %xmm0,-0x20(%r14,%rdx,1)
movupd %xmm0,-0x10(%r15,%rdx,1)
movupd %xmm0,(%r15,%rdx,1)
movupd %xmm0,-0x10(%r14,%rdx,1)
movupd %xmm0,(%r14,%rdx,1)
sub    $0xffffffffffffff80,%rdx
add    $0xfffffffffffffffc,%rax
jne    1370 <fasper+0x220>
test   %rcx,%rcx
je     1424 <fasper+0x2d4>
add    $0xffffffffffffffa0,%rdx
xorpd  %xmm0,%xmm0
cs nopw 0x0(%rax,%rax,1)
nop
movupd %xmm0,-0x10(%r15,%rdx,1)
movupd %xmm0,(%r15,%rdx,1)
movupd %xmm0,-0x10(%r14,%rdx,1)
movupd %xmm0,(%r14,%rdx,1)
add    $0x20,%rdx
add    $0xffffffffffffffff,%rcx
jne    1400 <fasper+0x2b0>
mulsd  0x20(%rsp),%xmm1
movsd  %xmm1,0x38(%rsp)
test   %esi,%esi
jle    1533 <fasper+0x3e3>
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
movsd  %xmm0,0x8(%rsp)
divsd  0x38(%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
mov    %esi,%r13d
xor    %ebx,%ebx
jmp    146d <fasper+0x31d>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbx
cmp    %r13,%rbx
je     1533 <fasper+0x3e3>
mov    0x28(%rsp),%rax
movsd  (%rax,%rbx,8),%xmm0
call   1060 <isnan@plt>
test   %rax,%rax
jne    1460 <fasper+0x310>
mov    0x28(%rsp),%rax
movsd  (%rax,%rbx,8),%xmm2
subsd  0x10(%rsp),%xmm2
mulsd  0x20(%rsp),%xmm2
movsd  0x8(%rsp),%xmm0
ucomisd %xmm0,%xmm2
jb     14ba <fasper+0x36a>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
subsd  %xmm0,%xmm2
ucomisd %xmm0,%xmm2
jae    14b0 <fasper+0x360>
movapd %xmm2,%xmm1
addsd  0xb4a(%rip),%xmm1
addsd  %xmm2,%xmm2
ucomisd %xmm0,%xmm2
jb     14da <fasper+0x38a>
subsd  %xmm0,%xmm2
ucomisd %xmm0,%xmm2
jae    14d0 <fasper+0x380>
movsd  %xmm2,0x18(%rsp)
movsd  (%r12,%rbx,8),%xmm0
subsd  0x50(%rsp),%xmm0
mov    %r14,%rdi
mov    %ebp,%esi
mov    $0x4,%edx
call   1050 <spread@plt>
test   %eax,%eax
jne    1528 <fasper+0x3d8>
movsd  0xb09(%rip),%xmm0
movsd  0x18(%rsp),%xmm1
addsd  %xmm0,%xmm1
mov    %r15,%rdi
mov    %ebp,%esi
mov    $0x4,%edx
call   1050 <spread@plt>
test   %eax,%eax
je     1460 <fasper+0x310>
mov    $0x1,%r12d
jmp    1755 <fasper+0x605>
mov    %r14,%rdi
mov    %ebp,%esi
mov    $0x1,%edx
call   1030 <realft@plt>
mov    %r15,%rdi
mov    %ebp,%esi
mov    $0x1,%edx
call   1030 <realft@plt>
mov    0x90(%rsp),%r12
cmpl   $0x0,(%r12)
jle    1752 <fasper+0x602>
movsd  0xaa4(%rip),%xmm0
divsd  0x38(%rsp),%xmm0
movsd  %xmm0,0x28(%rsp)
mov    $0x3,%ebp
xor    %ebx,%ebx
xorpd  %xmm5,%xmm5
movsd  0xa75(%rip),%xmm0
mulsd  0x40(%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
jmp    1695 <fasper+0x545>
nopl   0x0(%rax)
movsd  %xmm6,0x30(%rsp)
call   1070 <sqrt@plt>
movsd  0x10(%rsp),%xmm3
movsd  0x30(%rsp),%xmm6
xorpd  %xmm5,%xmm5
movsd  0x18(%rsp),%xmm7
movsd  0x8(%rsp),%xmm1
divsd  %xmm1,%xmm7
movapd %xmm0,%xmm2
andpd  0xa49(%rip),%xmm2
orpd   0xa51(%rip),%xmm0
xorpd  %xmm1,%xmm1
cmpnlesd %xmm7,%xmm1
andpd  %xmm1,%xmm0
andnpd %xmm2,%xmm1
orpd   %xmm0,%xmm1
mulsd  -0x8(%r15,%rbp,8),%xmm3
mulsd  (%r15,%rbp,8),%xmm7
addsd  0x20(%rsp),%xmm3
addsd  %xmm3,%xmm7
movsd  -0x8(%r14,%rbp,8),%xmm0
movsd  (%r14,%rbp,8),%xmm2
movapd %xmm1,%xmm3
mulsd  %xmm2,%xmm3
movapd %xmm6,%xmm4
mulsd  %xmm0,%xmm4
addsd  %xmm3,%xmm4
mulsd  %xmm4,%xmm4
divsd  %xmm7,%xmm4
mulsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm6
subsd  %xmm1,%xmm6
mulsd  %xmm6,%xmm6
movsd  0x40(%rsp),%xmm0
subsd  %xmm7,%xmm0
divsd  %xmm0,%xmm6
addsd  %xmm4,%xmm6
lea    0x1(%rbx),%rax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x28(%rsp),%xmm0
movsd  %xmm0,(%r14,%rbx,8)
movsd  0x48(%rsp),%xmm0
addsd  %xmm0,%xmm0
divsd  %xmm0,%xmm6
movsd  %xmm6,(%r15,%rbx,8)
add    $0x2,%rbp
movslq (%r12),%rcx
mov    %rax,%rbx
cmp    %rcx,%rax
jge    1752 <fasper+0x602>
movsd  -0x8(%r15,%rbp,8),%xmm0
movsd  (%r15,%rbp,8),%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm5,%xmm0
jb     16c0 <fasper+0x570>
xorps  %xmm4,%xmm4
sqrtsd %xmm0,%xmm4
jmp    16cd <fasper+0x57d>
nopl   (%rax)
call   1070 <sqrt@plt>
xorpd  %xmm5,%xmm5
movapd %xmm0,%xmm4
movsd  -0x8(%r15,%rbp,8),%xmm3
movsd  0x924(%rip),%xmm1
mulsd  %xmm1,%xmm3
divsd  %xmm4,%xmm3
movsd  (%r15,%rbp,8),%xmm2
mulsd  %xmm1,%xmm2
movapd %xmm3,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm5,%xmm0
movsd  %xmm2,0x18(%rsp)
movsd  %xmm3,0x10(%rsp)
movsd  %xmm4,0x8(%rsp)
jb     1720 <fasper+0x5d0>
xorps  %xmm6,%xmm6
sqrtsd %xmm0,%xmm6
jmp    1733 <fasper+0x5e3>
nopw   0x0(%rax,%rax,1)
call   1070 <sqrt@plt>
movsd  0x10(%rsp),%xmm3
xorpd  %xmm5,%xmm5
movapd %xmm0,%xmm6
movsd  0x8c5(%rip),%xmm0
subsd  %xmm3,%xmm0
ucomisd %xmm5,%xmm0
jb     15a0 <fasper+0x450>
sqrtsd %xmm0,%xmm0
jmp    15bb <fasper+0x46b>
xor    %r12d,%r12d
mov    %r12d,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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