#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*/ ArcCosEvalPts(int, double *);
int /*<<< orphan*/ InvSemiNaiveReduced(double *, int, int, double *, double *,
                                       double *, double *);
int /*<<< orphan*/ Naive_SynthesizeX(double *, int, int, double *, double *);
int /*<<< orphan*/ grid_invfourier(double *, double *, double *, double *, int,
                                   double *);
int /*<<< orphan*/ memcpy(double *, double *, int);
int /*<<< orphan*/ memset(double *, int /*<<< orphan*/, int);
double sin(double);
int sqrt(int);
int /*<<< orphan*/ transpose(double *, int);
void InvFST_semi_memo(double *rcoeffs, double *icoeffs, double *rdata,
                      double *idata, int size,
                      double **transpose_seminaive_naive_table,
                      double *workspace, int isReal, int cutoff) {
  int bw, m, i, n;
  double *rdataptr, *idataptr;
  double *rfourdata, *ifourdata;
  double *rinvfltres, *iminvfltres, *scratchpad;
  double *sin_values, *eval_pts;
  double tmpA;
  bw = size / 2;
  rfourdata = workspace;
  ifourdata = rfourdata + (size * size);
  rinvfltres = ifourdata + (size * size);
  iminvfltres = rinvfltres + (2 * bw);
  sin_values = iminvfltres + (2 * bw);
  eval_pts = sin_values + (2 * bw);
  scratchpad = eval_pts + (2 * bw);
  n = 2 * bw;
  ArcCosEvalPts(n, eval_pts);
  for (i = 0; i < n; i++)
    sin_values[i] = sin(eval_pts[i]);
  rdataptr = rcoeffs;
  idataptr = icoeffs;
  for (m = 0; m < bw; m++) {
    if (m < cutoff) {
      InvSemiNaiveReduced(rdataptr, bw, m, rinvfltres,
                          transpose_seminaive_naive_table[m], sin_values,
                          scratchpad);
      InvSemiNaiveReduced(idataptr, bw, m, iminvfltres,
                          transpose_seminaive_naive_table[m], sin_values,
                          scratchpad);
      memcpy(rfourdata + (m * size), rinvfltres, sizeof(double) * size);
      memcpy(ifourdata + (m * size), iminvfltres, sizeof(double) * size);
      rdataptr += bw - m;
      idataptr += bw - m;
    } else {
      Naive_SynthesizeX(rdataptr, bw, m, rinvfltres,
                        transpose_seminaive_naive_table[m]);
      Naive_SynthesizeX(idataptr, bw, m, iminvfltres,
                        transpose_seminaive_naive_table[m]);
      memcpy(rfourdata + (m * size), rinvfltres, sizeof(double) * size);
      memcpy(ifourdata + (m * size), iminvfltres, sizeof(double) * size);
      rdataptr += bw - m;
      idataptr += bw - m;
    }
  }
  memset(rfourdata + (bw * size), 0, sizeof(double) * size);
  memset(ifourdata + (bw * size), 0, sizeof(double) * size);
  if (isReal == 0) {
    for (m = bw + 1; m < size; m++) {
      if (size - m < cutoff) {
        InvSemiNaiveReduced(rdataptr, bw, size - m, rinvfltres,
                            transpose_seminaive_naive_table[size - m],
                            sin_values, scratchpad);
        InvSemiNaiveReduced(idataptr, bw, size - m, iminvfltres,
                            transpose_seminaive_naive_table[size - m],
                            sin_values, scratchpad);
        if ((m % 2) != 0)
          for (i = 0; i < size; i++) {
            rinvfltres[i] = -rinvfltres[i];
            iminvfltres[i] = -iminvfltres[i];
          }
        memcpy(rfourdata + (m * size), rinvfltres, sizeof(double) * size);
        memcpy(ifourdata + (m * size), iminvfltres, sizeof(double) * size);
        rdataptr += bw - (size - m);
        idataptr += bw - (size - m);
      } else {
        Naive_SynthesizeX(rdataptr, bw, size - m, rinvfltres,
                          transpose_seminaive_naive_table[size - m]);
        Naive_SynthesizeX(idataptr, bw, size - m, iminvfltres,
                          transpose_seminaive_naive_table[size - m]);
        if ((m % 2) != 0)
          for (i = 0; i < size; i++) {
            rinvfltres[i] = -rinvfltres[i];
            iminvfltres[i] = -iminvfltres[i];
          }
        memcpy(rfourdata + (m * size), rinvfltres, sizeof(double) * size);
        memcpy(ifourdata + (m * size), iminvfltres, sizeof(double) * size);
        rdataptr += bw - (size - m);
        idataptr += bw - (size - m);
      }
    }
  } else {
    for (m = bw + 1; m < size; m++) {
      memcpy(rfourdata + (m * size), rfourdata + ((size - m) * size),
             sizeof(double) * size);
      memcpy(ifourdata + (m * size), ifourdata + ((size - m) * size),
             sizeof(double) * size);
      for (i = 0; i < size; i++)
        ifourdata[(m * size) + i] *= -1.0;
    }
  }
  transpose(rfourdata, size);
  transpose(ifourdata, size);
  tmpA = 1. / sqrt(2. * 3.141592653589793);
  for (i = 0; i < size * size; i++) {
    rfourdata[i] *= tmpA;
    ifourdata[i] *= tmpA;
  }
  grid_invfourier(rfourdata, ifourdata, rdata, idata, size, scratchpad);
}


x86 assembly (clang, -O0):
<InvFST_semi_memo>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x24(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x34(%rbp)
mov    0x10(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rax
mov    -0x24(%rbp),%ecx
imul   -0x24(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rax
mov    -0x24(%rbp),%ecx
imul   -0x24(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rax
mov    -0x34(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x70(%rbp)
mov    -0x70(%rbp),%rax
mov    -0x34(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x80(%rbp)
mov    -0x80(%rbp),%rax
mov    -0x34(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x88(%rbp)
mov    -0x88(%rbp),%rax
mov    -0x34(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x78(%rbp)
mov    -0x34(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%edi
mov    -0x88(%rbp),%rsi
call   1040 <ArcCosEvalPts@plt>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x40(%rbp),%eax
jge    12c6 <InvFST_semi_memo+0x136>
mov    -0x88(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1070 <sin@plt>
mov    -0x80(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    128a <InvFST_semi_memo+0xfa>
mov    -0x8(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x50(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    149d <InvFST_semi_memo+0x30d>
mov    -0x38(%rbp),%eax
cmp    0x20(%rbp),%eax
jge    13ce <InvFST_semi_memo+0x23e>
mov    -0x48(%rbp),%rdi
mov    -0x34(%rbp),%esi
mov    -0x38(%rbp),%edx
mov    -0x68(%rbp),%rcx
mov    -0x30(%rbp),%rax
movslq -0x38(%rbp),%r8
mov    (%rax,%r8,8),%r8
mov    -0x80(%rbp),%r9
mov    -0x78(%rbp),%rax
mov    %rax,(%rsp)
call   1090 <InvSemiNaiveReduced@plt>
mov    -0x50(%rbp),%rdi
mov    -0x34(%rbp),%esi
mov    -0x38(%rbp),%edx
mov    -0x70(%rbp),%rcx
mov    -0x30(%rbp),%rax
movslq -0x38(%rbp),%r8
mov    (%rax,%r8,8),%r8
mov    -0x80(%rbp),%r9
mov    -0x78(%rbp),%rax
mov    %rax,(%rsp)
call   1090 <InvSemiNaiveReduced@plt>
mov    -0x58(%rbp),%rdi
mov    -0x38(%rbp),%eax
imul   -0x24(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x68(%rbp),%rsi
movslq -0x24(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edx
call   1080 <memcpy@plt>
mov    -0x60(%rbp),%rdi
mov    -0x38(%rbp),%eax
imul   -0x24(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x70(%rbp),%rsi
movslq -0x24(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edx
call   1080 <memcpy@plt>
mov    -0x34(%rbp),%ecx
sub    -0x38(%rbp),%ecx
mov    -0x48(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x48(%rbp)
mov    -0x34(%rbp),%ecx
sub    -0x38(%rbp),%ecx
mov    -0x50(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x50(%rbp)
jmp    148a <InvFST_semi_memo+0x2fa>
mov    -0x48(%rbp),%rdi
mov    -0x34(%rbp),%esi
mov    -0x38(%rbp),%edx
mov    -0x68(%rbp),%rcx
mov    -0x30(%rbp),%rax
movslq -0x38(%rbp),%r8
mov    (%rax,%r8,8),%r8
call   10a0 <Naive_SynthesizeX@plt>
mov    -0x50(%rbp),%rdi
mov    -0x34(%rbp),%esi
mov    -0x38(%rbp),%edx
mov    -0x70(%rbp),%rcx
mov    -0x30(%rbp),%rax
movslq -0x38(%rbp),%r8
mov    (%rax,%r8,8),%r8
call   10a0 <Naive_SynthesizeX@plt>
mov    -0x58(%rbp),%rdi
mov    -0x38(%rbp),%eax
imul   -0x24(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x68(%rbp),%rsi
movslq -0x24(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edx
call   1080 <memcpy@plt>
mov    -0x60(%rbp),%rdi
mov    -0x38(%rbp),%eax
imul   -0x24(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x70(%rbp),%rsi
movslq -0x24(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edx
call   1080 <memcpy@plt>
mov    -0x34(%rbp),%ecx
sub    -0x38(%rbp),%ecx
mov    -0x48(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x48(%rbp)
mov    -0x34(%rbp),%ecx
sub    -0x38(%rbp),%ecx
mov    -0x50(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x50(%rbp)
jmp    148f <InvFST_semi_memo+0x2ff>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    12dd <InvFST_semi_memo+0x14d>
mov    -0x58(%rbp),%rdi
mov    -0x34(%rbp),%eax
imul   -0x24(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
movslq -0x24(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edx
xor    %esi,%esi
call   1050 <memset@plt>
mov    -0x60(%rbp),%rdi
mov    -0x34(%rbp),%eax
imul   -0x24(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
movslq -0x24(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edx
xor    %esi,%esi
call   1050 <memset@plt>
cmpl   $0x0,0x18(%rbp)
jne    1836 <InvFST_semi_memo+0x6a6>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1831 <InvFST_semi_memo+0x6a1>
mov    -0x24(%rbp),%eax
sub    -0x38(%rbp),%eax
cmp    0x20(%rbp),%eax
jge    16a8 <InvFST_semi_memo+0x518>
mov    -0x48(%rbp),%rdi
mov    -0x34(%rbp),%esi
mov    -0x24(%rbp),%edx
sub    -0x38(%rbp),%edx
mov    -0x68(%rbp),%rcx
mov    -0x30(%rbp),%rax
mov    -0x24(%rbp),%r8d
sub    -0x38(%rbp),%r8d
movslq %r8d,%r8
mov    (%rax,%r8,8),%r8
mov    -0x80(%rbp),%r9
mov    -0x78(%rbp),%rax
mov    %rax,(%rsp)
call   1090 <InvSemiNaiveReduced@plt>
mov    -0x50(%rbp),%rdi
mov    -0x34(%rbp),%esi
mov    -0x24(%rbp),%edx
sub    -0x38(%rbp),%edx
mov    -0x70(%rbp),%rcx
mov    -0x30(%rbp),%rax
mov    -0x24(%rbp),%r8d
sub    -0x38(%rbp),%r8d
movslq %r8d,%r8
mov    (%rax,%r8,8),%r8
mov    -0x80(%rbp),%r9
mov    -0x78(%rbp),%rax
mov    %rax,(%rsp)
call   1090 <InvSemiNaiveReduced@plt>
mov    -0x38(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     161b <InvFST_semi_memo+0x48b>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1616 <InvFST_semi_memo+0x486>
mov    -0x68(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x68(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x70(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x70(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    159a <InvFST_semi_memo+0x40a>
jmp    161b <InvFST_semi_memo+0x48b>
mov    -0x58(%rbp),%rdi
mov    -0x38(%rbp),%eax
imul   -0x24(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x68(%rbp),%rsi
movslq -0x24(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edx
call   1080 <memcpy@plt>
mov    -0x60(%rbp),%rdi
mov    -0x38(%rbp),%eax
imul   -0x24(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x70(%rbp),%rsi
movslq -0x24(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edx
call   1080 <memcpy@plt>
mov    -0x34(%rbp),%ecx
mov    -0x24(%rbp),%eax
sub    -0x38(%rbp),%eax
sub    %eax,%ecx
mov    -0x48(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x48(%rbp)
mov    -0x34(%rbp),%ecx
mov    -0x24(%rbp),%eax
sub    -0x38(%rbp),%eax
sub    %eax,%ecx
mov    -0x50(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x50(%rbp)
jmp    181e <InvFST_semi_memo+0x68e>
mov    -0x48(%rbp),%rdi
mov    -0x34(%rbp),%esi
mov    -0x24(%rbp),%edx
sub    -0x38(%rbp),%edx
mov    -0x68(%rbp),%rcx
mov    -0x30(%rbp),%rax
mov    -0x24(%rbp),%r8d
sub    -0x38(%rbp),%r8d
movslq %r8d,%r8
mov    (%rax,%r8,8),%r8
call   10a0 <Naive_SynthesizeX@plt>
mov    -0x50(%rbp),%rdi
mov    -0x34(%rbp),%esi
mov    -0x24(%rbp),%edx
sub    -0x38(%rbp),%edx
mov    -0x70(%rbp),%rcx
mov    -0x30(%rbp),%rax
mov    -0x24(%rbp),%r8d
sub    -0x38(%rbp),%r8d
movslq %r8d,%r8
mov    (%rax,%r8,8),%r8
call   10a0 <Naive_SynthesizeX@plt>
mov    -0x38(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1796 <InvFST_semi_memo+0x606>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1791 <InvFST_semi_memo+0x601>
mov    -0x68(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x68(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x70(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x70(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1715 <InvFST_semi_memo+0x585>
jmp    1796 <InvFST_semi_memo+0x606>
mov    -0x58(%rbp),%rdi
mov    -0x38(%rbp),%eax
imul   -0x24(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x68(%rbp),%rsi
movslq -0x24(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edx
call   1080 <memcpy@plt>
mov    -0x60(%rbp),%rdi
mov    -0x38(%rbp),%eax
imul   -0x24(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x70(%rbp),%rsi
movslq -0x24(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edx
call   1080 <memcpy@plt>
mov    -0x34(%rbp),%ecx
mov    -0x24(%rbp),%eax
sub    -0x38(%rbp),%eax
sub    %eax,%ecx
mov    -0x48(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x48(%rbp)
mov    -0x34(%rbp),%ecx
mov    -0x24(%rbp),%eax
sub    -0x38(%rbp),%eax
sub    %eax,%ecx
mov    -0x50(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x50(%rbp)
jmp    1823 <InvFST_semi_memo+0x693>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    14fa <InvFST_semi_memo+0x36a>
jmp    191b <InvFST_semi_memo+0x78b>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1916 <InvFST_semi_memo+0x786>
mov    -0x58(%rbp),%rdi
mov    -0x38(%rbp),%eax
imul   -0x24(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x58(%rbp),%rsi
mov    -0x24(%rbp),%eax
sub    -0x38(%rbp),%eax
imul   -0x24(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
movslq -0x24(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edx
call   1080 <memcpy@plt>
mov    -0x60(%rbp),%rdi
mov    -0x38(%rbp),%eax
imul   -0x24(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x60(%rbp),%rsi
mov    -0x24(%rbp),%eax
sub    -0x38(%rbp),%eax
imul   -0x24(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
movslq -0x24(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edx
call   1080 <memcpy@plt>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1903 <InvFST_semi_memo+0x773>
mov    -0x60(%rbp),%rax
mov    -0x38(%rbp),%ecx
imul   -0x24(%rbp),%ecx
add    -0x3c(%rbp),%ecx
movslq %ecx,%rcx
movsd  0x715(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    18c6 <InvFST_semi_memo+0x736>
jmp    1908 <InvFST_semi_memo+0x778>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    183f <InvFST_semi_memo+0x6af>
jmp    191b <InvFST_semi_memo+0x78b>
mov    -0x58(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1060 <transpose@plt>
mov    -0x60(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1060 <transpose@plt>
mov    $0x6,%edi
call   10b0 <sqrt@plt>
cvtsi2sd %eax,%xmm1
movsd  0x6bf(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
mov    -0x24(%rbp),%ecx
imul   -0x24(%rbp),%ecx
cmp    %ecx,%eax
jge    19b0 <InvFST_semi_memo+0x820>
movsd  -0x90(%rbp),%xmm0
ff
mov    -0x58(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x90(%rbp),%xmm0
ff
mov    -0x60(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    195c <InvFST_semi_memo+0x7cc>
mov    -0x58(%rbp),%rdi
mov    -0x60(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
mov    -0x78(%rbp),%r9
call   1030 <grid_invfourier@plt>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<InvFST_semi_memo>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xe8,%rsp
mov    %r9,0x58(%rsp)
mov    %r8d,%r13d
mov    %rcx,%r15
mov    %rdx,0xd8(%rsp)
mov    %rsi,0x30(%rsp)
mov    %rdi,0x28(%rsp)
mov    0x130(%rsp),%eax
mov    %eax,0x88(%rsp)
mov    0x128(%rsp),%eax
mov    %eax,0x98(%rsp)
mov    0x120(%rsp),%rbp
mov    %r8d,%ebx
shr    $0x1f,%ebx
add    %r8d,%ebx
mov    %ebx,%eax
sar    %eax
mov    %rax,0x18(%rsp)
mov    %r8d,%eax
imul   %eax,%eax
lea    0x0(,%rax,8),%r14
add    %rbp,%r14
mov    %rax,0x60(%rsp)
lea    (%r14,%rax,8),%rax
and    $0xfffffffe,%ebx
movslq %ebx,%r12
mov    %rax,0x40(%rsp)
lea    (%rax,%r12,8),%rax
mov    %rax,0x10(%rsp)
lea    (%rax,%r12,8),%rax
mov    %rax,0x68(%rsp)
lea    (%rax,%r12,8),%rsi
lea    (%rsi,%r12,8),%rax
mov    %rax,0x90(%rsp)
mov    %r12d,%edi
call   1040 <ArcCosEvalPts@plt>
mov    %rbp,%rsi
cmp    $0x2,%r13d
mov    %r13,0x50(%rsp)
mov    %rbp,0x20(%rsp)
mov    %r14,0x70(%rsp)
mov    %r15,0xe0(%rsp)
mov    %r12,0x80(%rsp)
jl     14e2 <InvFST_semi_memo+0x352>
cmp    $0x2,%ebx
mov    $0x1,%r15d
cmovge %ebx,%r15d
lea    -0x1(%r15),%rax
mov    %r15d,%r14d
and    $0x3,%r14d
cmp    $0x3,%rax
jae    1294 <InvFST_semi_memo+0x104>
xor    %ebp,%ebp
jmp    1320 <InvFST_semi_memo+0x190>
and    $0x7ffffffc,%r15d
lea    (%r12,%r12,2),%rax
mov    0x60(%rsp),%rdx
lea    (%rdx,%rdx,1),%rcx
lea    (%rax,%rdx,2),%rax
lea    (%rsi,%rax,8),%r13
add    $0x18,%r13
lea    (%rcx,%r12,2),%rax
lea    (%rsi,%rax,8),%rbx
add    $0x18,%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  -0x18(%r13,%rbp,8),%xmm0
call   1070 <sin@plt>
movsd  %xmm0,-0x18(%rbx,%rbp,8)
movsd  -0x10(%r13,%rbp,8),%xmm0
call   1070 <sin@plt>
movsd  %xmm0,-0x10(%rbx,%rbp,8)
movsd  -0x8(%r13,%rbp,8),%xmm0
call   1070 <sin@plt>
movsd  %xmm0,-0x8(%rbx,%rbp,8)
movsd  0x0(%r13,%rbp,8),%xmm0
call   1070 <sin@plt>
movsd  %xmm0,(%rbx,%rbp,8)
add    $0x4,%rbp
cmp    %rbp,%r15
jne    12d0 <InvFST_semi_memo+0x140>
test   %r14,%r14
je     137a <InvFST_semi_memo+0x1ea>
lea    0x0(,%r12,2),%rax
add    %rbp,%rax
mov    0x60(%rsp),%rdx
lea    (%rax,%rdx,2),%rax
mov    0x20(%rsp),%rcx
lea    (%rcx,%rax,8),%r15
lea    (%r12,%r12,2),%rax
add    %rbp,%rax
lea    (%rax,%rdx,2),%rax
lea    (%rcx,%rax,8),%rbp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  0x0(%rbp,%rbx,8),%xmm0
call   1070 <sin@plt>
movsd  %xmm0,(%r15,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1360 <InvFST_semi_memo+0x1d0>
mov    0x50(%rsp),%r13
cmp    $0x1,%r13d
mov    0x20(%rsp),%rsi
mov    0x70(%rsp),%r14
jle    14e2 <InvFST_semi_memo+0x352>
lea    0x0(,%r13,8),%r12d
mov    0x18(%rsp),%r14
movslq %r14d,%rbx
mov    %r13d,%eax
movslq 0x88(%rsp),%rcx
mov    %rcx,0x78(%rsp)
shl    $0x3,%rax
mov    %rax,0x48(%rsp)
mov    %rsi,%r13
mov    0x60(%rsp),%rax
lea    0x0(,%rax,8),%rax
mov    %rax,0xa0(%rsp)
xor    %r15d,%r15d
mov    0x58(%rsp),%rbp
mov    0x28(%rsp),%rdi
mov    %r12d,0x3c(%rsp)
jmp    1475 <InvFST_semi_memo+0x2e5>
nopl   0x0(%rax,%rax,1)
mov    %r14d,%esi
mov    %r15d,%edx
mov    0x40(%rsp),%rcx
call   10a0 <Naive_SynthesizeX@plt>
mov    0x0(%rbp,%r15,8),%r8
mov    %r14,%rsi
mov    0x30(%rsp),%r14
mov    %r14,%rdi
mov    %r15d,%edx
mov    0x10(%rsp),%rbp
mov    %rbp,%rcx
call   10a0 <Naive_SynthesizeX@plt>
mov    %r13,%rdi
mov    0x40(%rsp),%rsi
mov    %r12d,%edx
call   1080 <memcpy@plt>
mov    0xa0(%rsp),%rax
lea    (%rax,%r13,1),%rdi
mov    %rbp,%rsi
mov    %r12d,%edx
call   1080 <memcpy@plt>
mov    0x28(%rsp),%rdi
lea    (%rdi,%rbx,8),%rdi
lea    (%r14,%rbx,8),%r14
mov    %r14,0x30(%rsp)
add    $0x1,%r15
add    0x48(%rsp),%r13
add    $0xffffffffffffffff,%rbx
mov    0x18(%rsp),%r14
cmp    %r15,%r14
mov    0x58(%rsp),%rbp
je     14ec <InvFST_semi_memo+0x35c>
mov    0x0(%rbp,%r15,8),%r8
cmp    0x78(%rsp),%r15
mov    %rdi,0x28(%rsp)
jge    13f0 <InvFST_semi_memo+0x260>
mov    0x90(%rsp),%rbp
mov    %rbp,(%rsp)
mov    %r14d,%esi
mov    %r15d,%edx
mov    0x40(%rsp),%rcx
mov    0x68(%rsp),%r9
call   1090 <InvSemiNaiveReduced@plt>
mov    0x58(%rsp),%rax
mov    (%rax,%r15,8),%r8
mov    %rbp,(%rsp)
mov    0x3c(%rsp),%r12d
mov    %r14,%rsi
mov    0x30(%rsp),%r14
mov    %r14,%rdi
mov    %r15d,%edx
mov    0x10(%rsp),%rbp
mov    %rbp,%rcx
mov    0x68(%rsp),%r9
call   1090 <InvSemiNaiveReduced@plt>
jmp    1420 <InvFST_semi_memo+0x290>
lea    0x0(,%r13,8),%r12d
jmp    1500 <InvFST_semi_memo+0x370>
mov    %rdi,0x28(%rsp)
mov    0x50(%rsp),%r13
mov    0x20(%rsp),%rsi
mov    0x70(%rsp),%r14
mov    %r12d,0x3c(%rsp)
mov    0x18(%rsp),%rbp
mov    %ebp,%eax
imul   %r13d,%eax
movslq %eax,%rbx
lea    (%rsi,%rbx,8),%rdi
xor    %esi,%esi
mov    %r12d,%edx
call   1050 <memset@plt>
lea    (%r14,%rbx,8),%rdi
xor    %esi,%esi
mov    %r12d,%edx
call   1050 <memset@plt>
lea    0x1(%rbp),%eax
cmpl   $0x0,0x98(%rsp)
je     1729 <InvFST_semi_memo+0x599>
cmp    %r13d,%eax
jge    1d98 <InvFST_semi_memo+0xc08>
mov    0x18(%rsp),%rax
add    $0x1,%eax
movslq %eax,%rdx
movslq %r13d,%rsi
mov    %r13d,%ebp
mov    %ebp,%eax
and    $0xfffffffc,%eax
mov    %rax,0x10(%rsp)
add    $0xfffffffffffffffc,%rax
mov    %rax,0x58(%rsp)
mov    %rax,%rcx
shr    $0x2,%rcx
add    $0x1,%rcx
mov    %rcx,%rax
mov    %rcx,0x18(%rsp)
and    $0xfffffffffffffffe,%rcx
mov    %rcx,0x68(%rsp)
mov    %rdx,%rax
imul   %rsi,%rax
add    0x60(%rsp),%rax
mov    0x20(%rsp),%rcx
lea    (%rcx,%rax,8),%r12
add    $0x30,%r12
mov    %rsi,0x48(%rsp)
lea    0x0(,%rsi,8),%rsi
mov    %rsi,0x40(%rsp)
lea    (%rcx,%rax,8),%r15
mov    0x3c(%rsp),%ebx
jmp    15dd <InvFST_semi_memo+0x44d>
xchg   %ax,%ax
mov    0x30(%rsp),%rdx
add    $0x1,%rdx
mov    0x40(%rsp),%rax
add    %rax,%r12
add    %rax,%r15
cmp    %r13d,%edx
je     1d98 <InvFST_semi_memo+0xc08>
mov    %rdx,%r13
mov    0x48(%rsp),%rcx
imul   %rcx,%r13
mov    0x20(%rsp),%rax
lea    (%rax,%r13,8),%rdi
mov    %rcx,%r14
mov    %rdx,0x30(%rsp)
sub    %rdx,%r14
imul   %rcx,%r14
lea    (%rax,%r14,8),%rsi
mov    %ebx,%edx
call   1080 <memcpy@plt>
mov    0x70(%rsp),%rax
mov    %r13,0x28(%rsp)
lea    (%rax,%r13,8),%rdi
lea    (%rax,%r14,8),%rsi
mov    %ebx,%edx
call   1080 <memcpy@plt>
movapd 0x9d3(%rip),%xmm4
mov    0x50(%rsp),%r13
test   %r13d,%r13d
jle    15c0 <InvFST_semi_memo+0x430>
cmp    $0x4,%r13d
jae    1650 <InvFST_semi_memo+0x4c0>
xor    %eax,%eax
jmp    1700 <InvFST_semi_memo+0x570>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmpq   $0x0,0x58(%rsp)
je     171e <InvFST_semi_memo+0x58e>
mov    0x68(%rsp),%rcx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movupd -0x30(%r12,%rax,8),%xmm0
movupd -0x20(%r12,%rax,8),%xmm1
movupd -0x10(%r12,%rax,8),%xmm2
movupd (%r12,%rax,8),%xmm3
xorpd  %xmm4,%xmm0
xorpd  %xmm4,%xmm1
movupd %xmm0,-0x30(%r12,%rax,8)
movupd %xmm1,-0x20(%r12,%rax,8)
xorpd  %xmm4,%xmm2
xorpd  %xmm4,%xmm3
movupd %xmm2,-0x10(%r12,%rax,8)
movupd %xmm3,(%r12,%rax,8)
add    $0x8,%rax
add    $0xfffffffffffffffe,%rcx
jne    1670 <InvFST_semi_memo+0x4e0>
testb  $0x1,0x18(%rsp)
je     16ef <InvFST_semi_memo+0x55f>
add    0x28(%rsp),%rax
mov    0x70(%rsp),%rcx
movupd (%rcx,%rax,8),%xmm0
movupd 0x10(%rcx,%rax,8),%xmm1
xorpd  %xmm4,%xmm0
xorpd  %xmm4,%xmm1
movupd %xmm0,(%rcx,%rax,8)
movupd %xmm1,0x10(%rcx,%rax,8)
mov    0x10(%rsp),%rcx
mov    %rcx,%rax
cmp    %rbp,%rcx
je     15c0 <InvFST_semi_memo+0x430>
movsd  (%r15,%rax,8),%xmm0
xorpd  %xmm4,%xmm0
movlpd %xmm0,(%r15,%rax,8)
add    $0x1,%rax
cmp    %rax,%rbp
jne    1700 <InvFST_semi_memo+0x570>
jmp    15c0 <InvFST_semi_memo+0x430>
xor    %eax,%eax
testb  $0x1,0x18(%rsp)
jne    16c7 <InvFST_semi_memo+0x537>
jmp    16ef <InvFST_semi_memo+0x55f>
cmp    %r13d,%eax
mov    0x28(%rsp),%rdi
jge    1d98 <InvFST_semi_memo+0xc08>
movslq 0x18(%rsp),%rax
mov    %rax,0x98(%rsp)
lea    0x1(%rax),%rbp
movslq %r13d,%rcx
movslq 0x88(%rsp),%rax
mov    %rax,0x88(%rsp)
mov    %r13d,%r10d
mov    0x60(%rsp),%r9
lea    (%r10,%r9,2),%rax
mov    0x20(%rsp),%rsi
lea    (%rsi,%rax,8),%rax
mov    0x80(%rsp),%r11
lea    (%r11,%r9,2),%r8
lea    (%r8,%r10,1),%rdx
lea    (%rsi,%rdx,8),%rdx
mov    %r10d,%ebx
and    $0xfffffffc,%ebx
mov    %rbx,0xc0(%rsp)
add    $0xfffffffffffffffc,%rbx
mov    %rbx,0xb8(%rsp)
shr    $0x2,%rbx
add    $0x1,%rbx
cmp    %rdx,0x40(%rsp)
setb   %dl
cmp    %rax,0x10(%rsp)
setb   %al
and    %dl,%al
mov    %al,0xf(%rsp)
mov    %rbx,%rax
mov    %rbx,0xb0(%rsp)
and    $0xfffffffffffffffe,%rbx
mov    %rbx,0xa8(%rsp)
mov    %r10,0xd0(%rsp)
neg    %r10
mov    %r10,0xc8(%rsp)
mov    %r9,%rax
shl    $0x4,%rax
lea    (%rax,%rsi,1),%rdx
lea    (%rdx,%r11,8),%r14
add    $0x30,%r14
lea    0x30(%rax,%rsi,1),%rbx
lea    0x8(%rsi,%r8,8),%rdx
mov    %rdx,0x80(%rsp)
lea    (%rax,%rsi,1),%r15
add    $0x8,%r15
mov    %rcx,0x78(%rsp)
jmp    189b <InvFST_semi_memo+0x70b>
nopl   (%rax)
mov    0x48(%rsp),%r12
imul   %rdx,%r12
mov    0x20(%rsp),%rax
lea    (%rax,%r12,8),%rdi
mov    %r13,%rsi
mov    0x3c(%rsp),%r13d
mov    %r13d,%edx
call   1080 <memcpy@plt>
mov    0x70(%rsp),%rax
lea    (%rax,%r12,8),%rdi
mov    0x48(%rsp),%rbp
mov    0x10(%rsp),%rsi
mov    %r13d,%edx
call   1080 <memcpy@plt>
mov    0x78(%rsp),%rcx
mov    0x98(%rsp),%rax
sub    0xa0(%rsp),%rax
mov    0x28(%rsp),%rdi
lea    (%rdi,%rax,8),%rdi
mov    0x30(%rsp),%rdx
lea    (%rdx,%rax,8),%rdx
mov    %rdx,0x30(%rsp)
add    $0x1,%rbp
mov    0x50(%rsp),%r13
cmp    %r13d,%ebp
je     1d98 <InvFST_semi_memo+0xc08>
mov    %rbp,0x48(%rsp)
sub    %rbp,%rcx
mov    0x58(%rsp),%rbp
mov    0x0(%rbp,%rcx,8),%r8
cmp    0x88(%rsp),%rcx
mov    %rdi,0x28(%rsp)
mov    %rcx,0xa0(%rsp)
jge    1970 <InvFST_semi_memo+0x7e0>
mov    0x90(%rsp),%rax
mov    %rax,(%rsp)
mov    0x18(%rsp),%rbp
mov    %ebp,%esi
mov    %rcx,%r12
mov    %r12d,%edx
mov    0x40(%rsp),%r13
mov    %r13,%rcx
mov    0x68(%rsp),%r9
call   1090 <InvSemiNaiveReduced@plt>
mov    0x58(%rsp),%rax
mov    (%rax,%r12,8),%r8
mov    0x90(%rsp),%rax
mov    %rax,(%rsp)
mov    0x30(%rsp),%rdi
mov    %ebp,%esi
mov    %r12d,%edx
mov    0x10(%rsp),%rcx
mov    0x68(%rsp),%r9
call   1090 <InvSemiNaiveReduced@plt>
movapd 0x6d7(%rip),%xmm2
mov    0x78(%rsp),%rdx
testb  $0x1,0x48(%rsp)
mov    0xd0(%rsp),%rsi
mov    0x80(%rsp),%rdi
je     1820 <InvFST_semi_memo+0x690>
cmpl   $0x0,0x50(%rsp)
jle    1820 <InvFST_semi_memo+0x690>
cmpl   $0x4,0x50(%rsp)
setb   %al
or     0xf(%rsp),%al
je     19f3 <InvFST_semi_memo+0x863>
xor    %ecx,%ecx
jmp    1b17 <InvFST_semi_memo+0x987>
nopl   (%rax)
mov    0x18(%rsp),%rsi
mov    %rcx,%r13
mov    %r13d,%edx
mov    0x40(%rsp),%r12
mov    %r12,%rcx
call   10a0 <Naive_SynthesizeX@plt>
mov    0x0(%rbp,%r13,8),%r8
mov    0x30(%rsp),%rdi
mov    0x18(%rsp),%rsi
mov    %r13d,%edx
mov    %r12,%r13
mov    0x10(%rsp),%rcx
call   10a0 <Naive_SynthesizeX@plt>
movapd 0x651(%rip),%xmm2
mov    0x78(%rsp),%rdx
testb  $0x1,0x48(%rsp)
mov    0xd0(%rsp),%rsi
mov    0x80(%rsp),%rdi
je     1820 <InvFST_semi_memo+0x690>
cmpl   $0x0,0x50(%rsp)
jle    1820 <InvFST_semi_memo+0x690>
cmpl   $0x4,0x50(%rsp)
setb   %al
or     0xf(%rsp),%al
je     1bae <InvFST_semi_memo+0xa1e>
xor    %ecx,%ecx
jmp    1cc7 <InvFST_semi_memo+0xb37>
cmpq   $0x0,0xb8(%rsp)
je     1d5e <InvFST_semi_memo+0xbce>
mov    0xa8(%rsp),%rcx
xor    %eax,%eax
movapd 0x5ec(%rip),%xmm3
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movupd -0x30(%rbx,%rax,8),%xmm0
movupd -0x20(%rbx,%rax,8),%xmm1
xorpd  %xmm3,%xmm0
xorpd  %xmm3,%xmm1
movupd %xmm0,-0x30(%rbx,%rax,8)
movupd %xmm1,-0x20(%rbx,%rax,8)
movupd -0x30(%r14,%rax,8),%xmm0
movupd -0x20(%r14,%rax,8),%xmm1
xorpd  %xmm3,%xmm0
xorpd  %xmm3,%xmm1
movupd %xmm0,-0x30(%r14,%rax,8)
movupd %xmm1,-0x20(%r14,%rax,8)
movupd -0x10(%rbx,%rax,8),%xmm0
movupd (%rbx,%rax,8),%xmm1
xorpd  %xmm3,%xmm0
xorpd  %xmm3,%xmm1
movupd %xmm0,-0x10(%rbx,%rax,8)
movupd %xmm1,(%rbx,%rax,8)
movupd -0x10(%r14,%rax,8),%xmm0
movupd (%r14,%rax,8),%xmm1
xorpd  %xmm3,%xmm0
xorpd  %xmm3,%xmm1
movupd %xmm0,-0x10(%r14,%rax,8)
movupd %xmm1,(%r14,%rax,8)
add    $0x8,%rax
add    $0xfffffffffffffffe,%rcx
jne    1a20 <InvFST_semi_memo+0x890>
testb  $0x1,0xb0(%rsp)
01
je     1b03 <InvFST_semi_memo+0x973>
movupd 0x0(%r13,%rax,8),%xmm0
movupd 0x10(%r13,%rax,8),%xmm1
xorpd  %xmm3,%xmm0
xorpd  %xmm3,%xmm1
movupd %xmm0,0x0(%r13,%rax,8)
movupd %xmm1,0x10(%r13,%rax,8)
mov    0x10(%rsp),%rcx
movupd (%rcx,%rax,8),%xmm0
movupd 0x10(%rcx,%rax,8),%xmm1
xorpd  %xmm3,%xmm0
xorpd  %xmm3,%xmm1
movupd %xmm0,(%rcx,%rax,8)
movupd %xmm1,0x10(%rcx,%rax,8)
mov    0xc0(%rsp),%rax
mov    %rax,%rcx
cmp    %rsi,%rax
je     1820 <InvFST_semi_memo+0x690>
mov    %rcx,%rax
test   $0x1,%sil
je     1b4c <InvFST_semi_memo+0x9bc>
movsd  0x0(%r13,%rcx,8),%xmm0
xorpd  %xmm2,%xmm0
movlpd %xmm0,0x0(%r13,%rcx,8)
mov    0x10(%rsp),%rax
movsd  (%rax,%rcx,8),%xmm0
xorpd  %xmm2,%xmm0
movlpd %xmm0,(%rax,%rcx,8)
mov    %rcx,%rax
or     $0x1,%rax
not    %rcx
cmp    0xc8(%rsp),%rcx
je     1820 <InvFST_semi_memo+0x690>
nopl   (%rax)
movsd  -0x8(%r15,%rax,8),%xmm0
xorpd  %xmm2,%xmm0
movlpd %xmm0,-0x8(%r15,%rax,8)
movsd  -0x8(%rdi,%rax,8),%xmm0
xorpd  %xmm2,%xmm0
movlpd %xmm0,-0x8(%rdi,%rax,8)
movsd  (%r15,%rax,8),%xmm0
xorpd  %xmm2,%xmm0
movlpd %xmm0,(%r15,%rax,8)
movsd  (%rdi,%rax,8),%xmm0
xorpd  %xmm2,%xmm0
movlpd %xmm0,(%rdi,%rax,8)
add    $0x2,%rax
cmp    %rax,%rsi
jne    1b60 <InvFST_semi_memo+0x9d0>
jmp    1820 <InvFST_semi_memo+0x690>
cmpq   $0x0,0xb8(%rsp)
je     1d7b <InvFST_semi_memo+0xbeb>
mov    0xa8(%rsp),%rcx
xor    %eax,%eax
movapd 0x431(%rip),%xmm3
nop
movupd -0x30(%rbx,%rax,8),%xmm0
movupd -0x20(%rbx,%rax,8),%xmm1
xorpd  %xmm3,%xmm0
xorpd  %xmm3,%xmm1
movupd %xmm0,-0x30(%rbx,%rax,8)
movupd %xmm1,-0x20(%rbx,%rax,8)
movupd -0x30(%r14,%rax,8),%xmm0
movupd -0x20(%r14,%rax,8),%xmm1
xorpd  %xmm3,%xmm0
xorpd  %xmm3,%xmm1
movupd %xmm0,-0x30(%r14,%rax,8)
movupd %xmm1,-0x20(%r14,%rax,8)
movupd -0x10(%rbx,%rax,8),%xmm0
movupd (%rbx,%rax,8),%xmm1
xorpd  %xmm3,%xmm0
xorpd  %xmm3,%xmm1
movupd %xmm0,-0x10(%rbx,%rax,8)
movupd %xmm1,(%rbx,%rax,8)
movupd -0x10(%r14,%rax,8),%xmm0
movupd (%r14,%rax,8),%xmm1
xorpd  %xmm3,%xmm0
xorpd  %xmm3,%xmm1
movupd %xmm0,-0x10(%r14,%rax,8)
movupd %xmm1,(%r14,%rax,8)
add    $0x8,%rax
add    $0xfffffffffffffffe,%rcx
jne    1bd0 <InvFST_semi_memo+0xa40>
testb  $0x1,0xb0(%rsp)
01
je     1cb3 <InvFST_semi_memo+0xb23>
movupd 0x0(%r13,%rax,8),%xmm0
movupd 0x10(%r13,%rax,8),%xmm1
xorpd  %xmm3,%xmm0
xorpd  %xmm3,%xmm1
movupd %xmm0,0x0(%r13,%rax,8)
movupd %xmm1,0x10(%r13,%rax,8)
mov    0x10(%rsp),%rcx
movupd (%rcx,%rax,8),%xmm0
movupd 0x10(%rcx,%rax,8),%xmm1
xorpd  %xmm3,%xmm0
xorpd  %xmm3,%xmm1
movupd %xmm0,(%rcx,%rax,8)
movupd %xmm1,0x10(%rcx,%rax,8)
mov    0xc0(%rsp),%rax
mov    %rax,%rcx
cmp    %rsi,%rax
je     1820 <InvFST_semi_memo+0x690>
mov    %rcx,%rax
test   $0x1,%sil
je     1cfc <InvFST_semi_memo+0xb6c>
movsd  0x0(%r13,%rcx,8),%xmm0
xorpd  %xmm2,%xmm0
movlpd %xmm0,0x0(%r13,%rcx,8)
mov    0x10(%rsp),%rax
movsd  (%rax,%rcx,8),%xmm0
xorpd  %xmm2,%xmm0
movlpd %xmm0,(%rax,%rcx,8)
mov    %rcx,%rax
or     $0x1,%rax
not    %rcx
cmp    0xc8(%rsp),%rcx
je     1820 <InvFST_semi_memo+0x690>
nopl   (%rax)
movsd  -0x8(%r15,%rax,8),%xmm0
xorpd  %xmm2,%xmm0
movlpd %xmm0,-0x8(%r15,%rax,8)
movsd  -0x8(%rdi,%rax,8),%xmm0
xorpd  %xmm2,%xmm0
movlpd %xmm0,-0x8(%rdi,%rax,8)
movsd  (%r15,%rax,8),%xmm0
xorpd  %xmm2,%xmm0
movlpd %xmm0,(%r15,%rax,8)
movsd  (%rdi,%rax,8),%xmm0
xorpd  %xmm2,%xmm0
movlpd %xmm0,(%rdi,%rax,8)
add    $0x2,%rax
cmp    %rax,%rsi
jne    1d10 <InvFST_semi_memo+0xb80>
jmp    1820 <InvFST_semi_memo+0x690>
xor    %eax,%eax
movapd 0x298(%rip),%xmm3
testb  $0x1,0xb0(%rsp)
01
jne    1abc <InvFST_semi_memo+0x92c>
jmp    1b03 <InvFST_semi_memo+0x973>
xor    %eax,%eax
movapd 0x27b(%rip),%xmm3
testb  $0x1,0xb0(%rsp)
01
jne    1c6c <InvFST_semi_memo+0xadc>
jmp    1cb3 <InvFST_semi_memo+0xb23>
mov    0x20(%rsp),%rbp
mov    %rbp,%rdi
mov    %r13d,%esi
call   1060 <transpose@plt>
mov    0x70(%rsp),%r14
mov    %r14,%rdi
mov    %r13d,%esi
call   1060 <transpose@plt>
mov    $0x6,%edi
call   10b0 <sqrt@plt>
mov    0x60(%rsp),%rdx
test   %rdx,%rdx
mov    %r13,%r8
mov    0xe0(%rsp),%rcx
je     1f59 <InvFST_semi_memo+0xdc9>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0x226(%rip),%xmm0
divsd  %xmm1,%xmm0
cmp    $0x4,%edx
jae    1dfa <InvFST_semi_memo+0xc6a>
xor    %eax,%eax
jmp    1f30 <InvFST_semi_memo+0xda0>
mov    %edx,%eax
and    $0x7ffffffc,%eax
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
lea    -0x4(%rax),%rsi
mov    %rsi,%r9
shr    $0x2,%r9
add    $0x1,%r9
test   %rsi,%rsi
je     1ece <InvFST_semi_memo+0xd3e>
mov    %r9,%rsi
and    $0xfffffffffffffffe,%rsi
lea    0x30(%rbp),%rdi
lea    0x30(%rbp,%rdx,8),%rbp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movupd -0x30(%rdi,%rbx,8),%xmm2
movupd -0x20(%rdi,%rbx,8),%xmm3
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,-0x30(%rdi,%rbx,8)
movupd %xmm3,-0x20(%rdi,%rbx,8)
movupd -0x30(%rbp,%rbx,8),%xmm2
movupd -0x20(%rbp,%rbx,8),%xmm3
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,-0x30(%rbp,%rbx,8)
movupd %xmm3,-0x20(%rbp,%rbx,8)
movupd -0x10(%rdi,%rbx,8),%xmm2
movupd (%rdi,%rbx,8),%xmm3
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,-0x10(%rdi,%rbx,8)
movupd %xmm3,(%rdi,%rbx,8)
movupd -0x10(%rbp,%rbx,8),%xmm2
movupd 0x0(%rbp,%rbx,8),%xmm3
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,-0x10(%rbp,%rbx,8)
movupd %xmm3,0x0(%rbp,%rbx,8)
add    $0x8,%rbx
add    $0xfffffffffffffffe,%rsi
jne    1e40 <InvFST_semi_memo+0xcb0>
jmp    1ed0 <InvFST_semi_memo+0xd40>
xor    %ebx,%ebx
test   $0x1,%r9b
mov    0x20(%rsp),%rbp
je     1f1d <InvFST_semi_memo+0xd8d>
movupd 0x0(%rbp,%rbx,8),%xmm2
movupd 0x10(%rbp,%rbx,8),%xmm3
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,0x0(%rbp,%rbx,8)
movupd %xmm3,0x10(%rbp,%rbx,8)
movupd (%r14,%rbx,8),%xmm2
movupd 0x10(%r14,%rbx,8),%xmm3
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,(%r14,%rbx,8)
movupd %xmm3,0x10(%r14,%rbx,8)
cmp    %rdx,%rax
je     1f59 <InvFST_semi_memo+0xdc9>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  0x0(%rbp,%rax,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x0(%rbp,%rax,8)
movsd  (%r14,%rax,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%r14,%rax,8)
add    $0x1,%rax
cmp    %rax,%rdx
jne    1f30 <InvFST_semi_memo+0xda0>
mov    %rbp,%rdi
mov    %r14,%rsi
mov    0xd8(%rsp),%rdx
mov    0x90(%rsp),%r9
add    $0xe8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <grid_invfourier@plt>

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

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