#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*/ OURpermute(double *, double *, int);
int /*<<< orphan*/ PartitionAdd(double *, double *, int, int);
double *get_mods(unsigned int);
int /*<<< orphan*/ memcpy(double *, double *, int);
void kFCT(double *data, double *result, double *workspace, int n, int k,
          int permflag) {
  double *lowpoly, *highpoly, *lowptr, *highptr;
  const double *modptr;
  double *temp, dn2;
  int p2, p3;
  unsigned int i, j, levelsize, highsize, lowsize, loopcntr;
  double modptr0;
  double e0, e1, f0, f1;
  lowpoly = workspace;
  lowptr = lowpoly;
  highpoly = workspace + n;
  highptr = highpoly;
  levelsize = n;
  modptr = get_mods(levelsize);
  if (permflag == 1)
    OURpermute(data, lowpoly, n);
  else {
    memcpy(lowpoly, data, sizeof(double) * n);
  }
  for (i = 0; i < n; i += 2) {
    *highptr++ = *lowptr + *(lowptr + 1);
    *highptr++ = *modptr * (*(lowptr + 1) - *lowptr);
    modptr += 2;
    lowptr += 2;
  }
  lowptr = highpoly;
  highptr = lowpoly;
  loopcntr = 0;
  if (k > 2) {
    levelsize /= 2;
    modptr = get_mods(levelsize);
    highsize = 4;
    lowsize = 2;
    p2 = lowsize - 1;
    p3 = 1;
    while (highsize <= k) {
      for (j = 0; j < n; j += highsize) {
        for (i = 0; i < lowsize; i++)
          *highptr++ = lowptr[i] + lowptr[i + lowsize];
        modptr0 = modptr[0];
        *highptr++ = modptr0 * (lowptr[lowsize] - lowptr[0]);
        modptr0 *= 2.0;
        e0 = modptr0 * (lowptr[p3 + lowsize] - lowptr[p3]);
        e1 = lowptr[p2 + lowsize] + lowptr[p2];
        *highptr++ = e0 - e1;
        p2--;
        p3++;
        for (i = 0; i < (lowsize - 2); i += 2) {
          e0 = -lowptr[p3] + lowptr[p3 + lowsize];
          f0 = -lowptr[p3 + 1] + lowptr[p3 + lowsize + 1];
          f1 = lowptr[p2 - 1] + lowptr[p2 + lowsize - 1];
          e1 = lowptr[p2] + lowptr[p2 + lowsize];
          *highptr++ = modptr0 * e0 - e1;
          *highptr++ = modptr0 * f0 - f1;
          p2 -= 2;
          p3 += 2;
        }
        lowptr += highsize;
        modptr += 2;
        p2 = lowsize - 1;
        p3 = 1;
      }
      levelsize /= 2;
      modptr = get_mods(levelsize);
      highsize *= 2;
      lowsize *= 2;
      p2 = lowsize - 1;
      p3 = 1;
      if ((loopcntr % 2) == 0) {
        lowptr = lowpoly;
        highptr = highpoly;
      } else {
        lowptr = highpoly;
        highptr = lowpoly;
      }
      loopcntr++;
    }
  }
  if (!(loopcntr % 2))
    temp = highpoly;
  else
    temp = lowpoly;
  if (k < n)
    PartitionAdd(temp, result, n, k);
  else
    memcpy(result, temp, sizeof(double) * n);
  dn2 = 2.0 / ((double)n);
  result[0] /= ((double)n);
  for (i = 1; i < k; i++)
    result[i] *= dn2;
}


x86 assembly (clang, -O0):
<kFCT>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x74(%rbp)
mov    -0x74(%rbp),%edi
call   1060 <get_mods@plt>
mov    %rax,-0x50(%rbp)
cmpl   $0x1,-0x24(%rbp)
jne    11be <kFCT+0x7e>
mov    -0x8(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <OURpermute@plt>
jmp    11d5 <kFCT+0x95>
mov    -0x30(%rbp),%rdi
mov    -0x8(%rbp),%rsi
movslq -0x1c(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edx
call   1040 <memcpy@plt>
movl   $0x0,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jae    1262 <kFCT+0x122>
mov    -0x40(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x40(%rbp),%rax
addsd  0x8(%rax),%xmm0
mov    -0x48(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x48(%rbp)
movsd  %xmm0,(%rax)
mov    -0x50(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x40(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x40(%rbp),%rax
subsd  (%rax),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x48(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x48(%rbp)
movsd  %xmm0,(%rax)
mov    -0x50(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x50(%rbp)
mov    -0x40(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x40(%rbp)
mov    -0x6c(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x6c(%rbp)
jmp    11dc <kFCT+0x9c>
mov    -0x38(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x80(%rbp)
cmpl   $0x2,-0x20(%rbp)
jle    166c <kFCT+0x52c>
mov    -0x74(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x74(%rbp)
mov    -0x74(%rbp),%edi
call   1060 <get_mods@plt>
mov    %rax,-0x50(%rbp)
movl   $0x4,-0x78(%rbp)
movl   $0x2,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x64(%rbp)
movl   $0x1,-0x68(%rbp)
mov    -0x78(%rbp),%eax
cmp    -0x20(%rbp),%eax
ja     1667 <kFCT+0x527>
movl   $0x0,-0x70(%rbp)
mov    -0x70(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jae    15ee <kFCT+0x4ae>
movl   $0x0,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
cmp    -0x7c(%rbp),%eax
jae    1326 <kFCT+0x1e6>
mov    -0x40(%rbp),%rax
mov    -0x6c(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
mov    -0x6c(%rbp),%ecx
add    -0x7c(%rbp),%ecx
mov    %ecx,%ecx
addsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x48(%rbp)
movsd  %xmm0,(%rax)
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    12dc <kFCT+0x19c>
mov    -0x50(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x40(%rbp),%rax
mov    -0x7c(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x40(%rbp),%rax
subsd  (%rax),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x48(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x48(%rbp)
movsd  %xmm0,(%rax)
movsd  0xc8f(%rip),%xmm0
mulsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x40(%rbp),%rax
mov    -0x68(%rbp),%ecx
add    -0x7c(%rbp),%ecx
mov    %ecx,%ecx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x40(%rbp),%rax
movslq -0x68(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x40(%rbp),%rax
mov    -0x64(%rbp),%ecx
add    -0x7c(%rbp),%ecx
mov    %ecx,%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x64(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
subsd  -0x98(%rbp),%xmm0
ff
mov    -0x48(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x48(%rbp)
movsd  %xmm0,(%rax)
mov    -0x64(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x64(%rbp)
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
movl   $0x0,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
mov    -0x7c(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jae    15b0 <kFCT+0x470>
mov    -0x40(%rbp),%rax
movslq -0x68(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x40(%rbp),%rax
mov    -0x68(%rbp),%ecx
add    -0x7c(%rbp),%ecx
mov    %ecx,%ecx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x40(%rbp),%rax
mov    -0x68(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x40(%rbp),%rax
mov    -0x68(%rbp),%ecx
add    -0x7c(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,%ecx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x40(%rbp),%rax
mov    -0x64(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
mov    -0x64(%rbp),%ecx
add    -0x7c(%rbp),%ecx
sub    $0x1,%ecx
mov    %ecx,%ecx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x40(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
mov    -0x64(%rbp),%ecx
add    -0x7c(%rbp),%ecx
mov    %ecx,%ecx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  -0x90(%rbp),%xmm2
ff
movsd  -0x98(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x48(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x48(%rbp)
movsd  %xmm0,(%rax)
movsd  -0x88(%rbp),%xmm0
ff
movsd  -0xa0(%rbp),%xmm2
ff
movsd  -0xa8(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x48(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x48(%rbp)
movsd  %xmm0,(%rax)
mov    -0x64(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x64(%rbp)
mov    -0x68(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x68(%rbp)
mov    -0x6c(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x6c(%rbp)
jmp    1415 <kFCT+0x2d5>
mov    -0x78(%rbp),%ecx
mov    -0x40(%rbp),%rax
mov    %ecx,%ecx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x40(%rbp)
mov    -0x50(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x50(%rbp)
mov    -0x7c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x64(%rbp)
movl   $0x1,-0x68(%rbp)
mov    -0x78(%rbp),%eax
add    -0x70(%rbp),%eax
mov    %eax,-0x70(%rbp)
jmp    12c9 <kFCT+0x189>
mov    -0x74(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x74(%rbp)
mov    -0x74(%rbp),%edi
call   1060 <get_mods@plt>
mov    %rax,-0x50(%rbp)
mov    -0x78(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x78(%rbp)
mov    -0x7c(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x64(%rbp)
movl   $0x1,-0x68(%rbp)
mov    -0x80(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    1649 <kFCT+0x509>
mov    -0x30(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x48(%rbp)
jmp    1659 <kFCT+0x519>
mov    -0x38(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    12b6 <kFCT+0x176>
jmp    166c <kFCT+0x52c>
mov    -0x80(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    1688 <kFCT+0x548>
mov    -0x38(%rbp),%rax
mov    %rax,-0x58(%rbp)
jmp    1690 <kFCT+0x550>
mov    -0x30(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    16b4 <kFCT+0x574>
mov    -0x58(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
call   1050 <PartitionAdd@plt>
jmp    16cb <kFCT+0x58b>
mov    -0x10(%rbp),%rdi
mov    -0x58(%rbp),%rsi
movslq -0x1c(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edx
call   1040 <memcpy@plt>
cvtsi2sdl -0x1c(%rbp),%xmm1
movsd  0x928(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
cvtsi2sdl -0x1c(%rbp),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
movl   $0x1,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jae    172d <kFCT+0x5ed>
movsd  -0x60(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x6c(%rbp),%ecx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    16fd <kFCT+0x5bd>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kFCT>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
mov    %r9d,%r15d
mov    %r8d,0x14(%rsp)
mov    %ecx,%r13d
mov    %rdx,%rbp
mov    %rsi,0x28(%rsp)
mov    %rdi,%r14
movslq %ecx,%rbx
mov    %ebx,%edi
call   1060 <get_mods@plt>
mov    %rax,%r12
cmp    $0x1,%r15d
jne    118a <kFCT+0x4a>
mov    %r14,%rdi
mov    %rbp,%rsi
mov    %r13d,%edx
call   1030 <OURpermute@plt>
jmp    119d <kFCT+0x5d>
lea    0x0(,%r13,8),%edx
mov    %rbp,%rdi
mov    %r14,%rsi
call   1040 <memcpy@plt>
mov    %rbp,%r14
lea    0x0(,%rbx,8),%r15
add    %rbp,%r15
test   %r13d,%r13d
mov    %r13,0x8(%rsp)
mov    %rbp,0x20(%rsp)
mov    %r15,0x18(%rsp)
je     13a2 <kFCT+0x262>
lea    -0x1(%r13),%ecx
xor    %r8d,%r8d
cmp    $0x4,%ecx
jae    11dd <kFCT+0x9d>
mov    %r14,%rdx
mov    %r15,%rsi
mov    %r12,%rdi
jmp    1365 <kFCT+0x225>
mov    %ecx,%eax
and    $0xfffffffe,%eax
lea    (%rax,%rbx,1),%rdx
lea    (%r14,%rdx,8),%rbp
add    $0x8,%rbp
lea    0x8(%r14,%rbx,8),%rdi
lea    0x10(%r14,%rdx,8),%rdx
lea    0x8(%r14,%rax,8),%r9
lea    0x8(%r14),%r11
lea    0x10(%r14,%rax,8),%r10
mov    %r14,%rbx
mov    %r15,%rsi
lea    (%r12,%rax,8),%r15
add    $0x8,%r15
cmp    %rdx,%rsi
setb   0x40(%rsp)
cmp    %rbp,%rdi
setb   %r14b
cmp    %r9,%rsi
setb   %al
cmp    %rbx,%rbp
seta   0x38(%rsp)
cmp    %r10,%rsi
setb   %r8b
cmp    %rbp,%r11
setb   0x4(%rsp)
cmp    %r15,%rsi
setb   %r13b
cmp    %rbp,%r12
setb   %bpl
cmp    %r9,%rdi
setb   %r9b
cmp    %rbx,%rdx
seta   %sil
cmp    %r10,%rdi
setb   %r10b
cmp    %rdx,%r11
setb   %bl
cmp    %r15,%rdi
setb   %r11b
cmp    %rdx,%r12
setb   %dl
test   %r14b,0x40(%rsp)
jne    1a2b <kFCT+0x8eb>
and    0x38(%rsp),%al
jne    1a2b <kFCT+0x8eb>
and    0x4(%rsp),%r8b
mov    0x20(%rsp),%r14
mov    0x18(%rsp),%r15
jne    1a26 <kFCT+0x8e6>
and    %bpl,%r13b
jne    1a26 <kFCT+0x8e6>
and    %sil,%r9b
mov    0x8(%rsp),%r13
jne    1359 <kFCT+0x219>
and    %bl,%r10b
jne    1359 <kFCT+0x219>
and    %dl,%r11b
jne    1359 <kFCT+0x219>
shr    %ecx
add    $0x1,%ecx
mov    %ecx,%eax
and    $0x1,%eax
test   %rax,%rax
mov    $0x2,%edx
cmovne %rax,%rdx
sub    %rdx,%rcx
mov    %rcx,%rax
shl    $0x4,%rax
lea    (%r14,%rax,1),%rdx
lea    (%r15,%rax,1),%rsi
lea    (%rcx,%rcx,1),%r8d
mov    %r12,%rdi
add    %rax,%rdi
xor    %ebp,%ebp
nopl   (%rax)
movupd (%r14,%rbp,1),%xmm0
movupd 0x10(%r14,%rbp,1),%xmm1
movapd %xmm0,%xmm2
unpcklpd %xmm1,%xmm2
unpckhpd %xmm1,%xmm0
movapd %xmm2,%xmm1
addpd  %xmm0,%xmm1
movupd (%r12,%rbp,1),%xmm3
movhpd 0x10(%r12,%rbp,1),%xmm3
subpd  %xmm2,%xmm0
mulpd  %xmm3,%xmm0
movapd %xmm1,%xmm2
unpcklpd %xmm0,%xmm2
movhlps %xmm1,%xmm0
movups %xmm0,0x10(%r15,%rbp,1)
movupd %xmm2,(%r15,%rbp,1)
add    $0x20,%rbp
add    $0xfffffffffffffffe,%rcx
jne    1300 <kFCT+0x1c0>
jmp    1365 <kFCT+0x225>
mov    %r14,%rdx
mov    %r15,%rsi
mov    %r12,%rdi
xor    %r8d,%r8d
mov    %r8d,%eax
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
movsd  (%rdx,%rcx,8),%xmm0
addsd  0x8(%rdx,%rcx,8),%xmm0
movsd  %xmm0,(%rsi,%rcx,8)
movsd  0x8(%rdx,%rcx,8),%xmm0
subsd  (%rdx,%rcx,8),%xmm0
mulsd  (%rdi,%rcx,8),%xmm0
movsd  %xmm0,0x8(%rsi,%rcx,8)
add    $0x2,%rcx
lea    (%rax,%rcx,1),%ebp
cmp    %r13d,%ebp
jb     1370 <kFCT+0x230>
mov    0x14(%rsp),%ebp
cmp    $0x3,%ebp
jl     18c5 <kFCT+0x785>
mov    %r13d,%ebx
shr    %ebx
mov    %ebx,%edi
call   1060 <get_mods@plt>
cmp    $0x3,%ebp
je     18c5 <kFCT+0x785>
mov    $0x1,%esi
mov    $0x4,%r12d
mov    $0x2,%edx
xor    %edi,%edi
mov    %r15,0x30(%rsp)
mov    %r14,%r11
jmp    1431 <kFCT+0x2f1>
mov    0x4c(%rsp),%ebx
shr    %ebx
mov    %ebx,%edi
mov    %rdx,%rbp
call   1060 <get_mods@plt>
add    %r12d,%r12d
lea    -0x1(%rbp,%rbp,1),%esi
mov    %ebp,%edx
add    %ebp,%edx
mov    0x58(%rsp),%rdi
test   $0x1,%dil
mov    0x20(%rsp),%rcx
mov    %rcx,%r11
mov    0x18(%rsp),%r15
cmove  %r15,%r11
mov    %r15,%rbp
cmove  %rcx,%rbp
mov    %rbp,0x30(%rsp)
add    $0x1,%edi
mov    0x14(%rsp),%ebp
cmp    %ebp,%r12d
ja     18bd <kFCT+0x77d>
mov    %rdi,0x58(%rsp)
mov    %ebx,0x4c(%rsp)
test   %r13d,%r13d
je     13e0 <kFCT+0x2a0>
mov    %edx,%r15d
mov    %edx,%ecx
or     $0x1,%ecx
mov    %rcx,0xa0(%rsp)
lea    -0x2(%rdx),%r9d
mov    %r12d,%r8d
lea    -0x1(%rdx),%ecx
mov    %ecx,0x54(%rsp)
lea    -0x1(%r15),%rcx
lea    (%r15,%r15,1),%rdi
mov    %rdi,0x88(%rsp)
mov    %r15d,%edi
and    $0xfffffffc,%edi
mov    %rdi,0x80(%rsp)
add    $0xfffffffffffffffc,%rdi
mov    %rdi,0x78(%rsp)
mov    %rdi,%rbp
shr    $0x2,%rbp
add    $0x1,%rbp
mov    %ecx,%edi
add    %edx,%edi
setb   %bl
shr    $0x20,%rcx
setne  %cl
or     %bl,%cl
mov    %cl,0x3(%rsp)
mov    %rbp,%rcx
mov    %rbp,0x70(%rsp)
movabs $0x7ffffffffffffffe,%rcx
ff ff 7f
and    %rcx,%rbp
mov    %rbp,0x68(%rsp)
lea    0x4(%rdx),%ecx
mov    %rcx,0x60(%rsp)
mov    %r8,0x90(%rsp)
lea    0x0(,%r8,8),%rcx
mov    %rcx,0x98(%rsp)
lea    0x0(,%rdx,8),%r14d
and    $0x10,%r14d
xor    %edi,%edi
mov    0x30(%rsp),%r8
xor    %ebp,%ebp
mov    %r12d,0x50(%rsp)
jmp    152b <kFCT+0x3eb>
nopl   0x0(%rax)
add    0x98(%rsp),%r8
add    $0x10,%rax
mov    0x4(%rsp),%ebp
add    %r12d,%ebp
mov    0x38(%rsp),%rdi
add    $0x1,%rdi
mov    0x54(%rsp),%ecx
mov    %ecx,%esi
cmp    %r13d,%ebp
jae    13e0 <kFCT+0x2a0>
test   %edx,%edx
mov    %rax,0x40(%rsp)
mov    %rdi,0x38(%rsp)
mov    %ebp,0x4(%rsp)
je     1570 <kFCT+0x430>
cmp    $0x4,%edx
setb   %cl
or     0x3(%rsp),%cl
je     1580 <kFCT+0x440>
xor    %ebp,%ebp
mov    %rbp,%r10
not    %r10
add    %r15,%r10
test   $0x2,%r15b
jne    16d0 <kFCT+0x590>
cmp    $0x3,%r10
jae    1723 <kFCT+0x5e3>
jmp    17bc <kFCT+0x67c>
nopl   (%rax)
mov    %r11,%rbx
jmp    17bc <kFCT+0x67c>
nopl   0x0(%rax,%rax,1)
mov    %rdi,%rcx
imul   0x90(%rsp),%rcx
mov    0x88(%rsp),%rax
lea    (%rax,%rcx,1),%rdi
add    %r15,%rcx
mov    0x30(%rsp),%rax
lea    (%rax,%rcx,8),%rbp
lea    (%rax,%rdi,8),%rcx
lea    (%r11,%r15,8),%rdi
cmp    %rbp,%r11
setb   %r10b
cmp    %rdi,%r8
setb   %bl
cmp    %rcx,%r11
setb   %cl
cmp    %rdi,%rbp
setb   %dil
test   %bl,%r10b
jne    1549 <kFCT+0x409>
and    %dil,%cl
jne    1549 <kFCT+0x409>
cmpq   $0x0,0x78(%rsp)
je     18aa <kFCT+0x76a>
mov    0x68(%rsp),%rcx
xor    %r10d,%r10d
mov    0x60(%rsp),%rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movupd (%r8,%r10,8),%xmm0
movupd 0x10(%r8,%r10,8),%xmm1
lea    (%r15,%r10,1),%edi
movupd (%r8,%rdi,8),%xmm2
addpd  %xmm0,%xmm2
movupd 0x10(%r8,%rdi,8),%xmm0
addpd  %xmm1,%xmm0
movupd %xmm2,(%r11,%r10,8)
movupd %xmm0,0x10(%r11,%r10,8)
movupd 0x20(%r8,%r10,8),%xmm0
movupd 0x30(%r8,%r10,8),%xmm1
lea    (%rax,%r10,1),%edi
movupd (%r8,%rdi,8),%xmm2
addpd  %xmm0,%xmm2
movupd 0x10(%r8,%rdi,8),%xmm0
addpd  %xmm1,%xmm0
movupd %xmm2,0x20(%r11,%r10,8)
movupd %xmm0,0x30(%r11,%r10,8)
add    $0x8,%r10
add    $0xfffffffffffffffe,%rcx
jne    1600 <kFCT+0x4c0>
testb  $0x1,0x70(%rsp)
je     16ac <kFCT+0x56c>
movupd (%r8,%r10,8),%xmm0
movupd 0x10(%r8,%r10,8),%xmm1
lea    (%rdx,%r10,1),%ecx
movupd (%r8,%rcx,8),%xmm2
addpd  %xmm0,%xmm2
movupd 0x10(%r8,%rcx,8),%xmm0
addpd  %xmm1,%xmm0
movupd %xmm2,(%r11,%r10,8)
movupd %xmm0,0x10(%r11,%r10,8)
mov    0x80(%rsp),%rax
lea    (%r11,%rax,8),%r11
mov    %rax,%rbp
mov    %r11,%rbx
cmp    %r15,%rax
jne    154b <kFCT+0x40b>
jmp    17bc <kFCT+0x67c>
nopl   0x0(%rax)
mov    %rbp,%rdi
neg    %rdi
lea    (%rdx,%rbp,1),%ecx
lea    (%r8,%rcx,8),%rbx
lea    (%r8,%rbp,8),%rcx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  (%rcx,%rbp,1),%xmm0
addsd  (%rbx,%rbp,1),%xmm0
movsd  %xmm0,(%r11,%rbp,1)
add    $0xffffffffffffffff,%rdi
add    $0x8,%rbp
cmp    %rbp,%r14
jne    16f0 <kFCT+0x5b0>
neg    %rdi
add    %rbp,%r11
mov    %r11,%rbx
mov    %rdi,%rbp
cmp    $0x3,%r10
jb     17bc <kFCT+0x67c>
mov    %r15,%rcx
sub    %rbp,%rcx
lea    (%rdx,%rbp,1),%r10d
lea    (%r8,%rbp,8),%rdi
xor    %ebp,%ebp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%rdi,%rbx,8),%xmm0
lea    (%r10,%rbx,1),%r12
mov    %r12d,%r13d
addsd  (%r8,%r13,8),%xmm0
movsd  %xmm0,(%r11,%rbx,8)
movsd  0x8(%rdi,%rbx,8),%xmm0
lea    0x1(%r12),%eax
addsd  (%r8,%rax,8),%xmm0
movsd  %xmm0,0x8(%r11,%rbx,8)
movsd  0x10(%rdi,%rbx,8),%xmm0
lea    0x2(%r12),%eax
addsd  (%r8,%rax,8),%xmm0
movsd  %xmm0,0x10(%r11,%rbx,8)
movsd  0x18(%rdi,%rbx,8),%xmm0
add    $0x3,%r12d
addsd  (%r8,%r12,8),%xmm0
movsd  %xmm0,0x18(%r11,%rbx,8)
add    $0x4,%rbx
add    $0xffffffffffffffe0,%rbp
cmp    %rbx,%rcx
jne    1740 <kFCT+0x600>
sub    %rbp,%r11
mov    %r11,%rbx
mov    0x8(%rsp),%r13
mov    0x50(%rsp),%r12d
lea    (%rsi,%rdx,1),%ecx
lea    0x10(%rbx),%r11
mov    0x40(%rsp),%rax
movsd  (%rax),%xmm0
movsd  (%r8,%r15,8),%xmm1
subsd  (%r8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx)
addsd  %xmm0,%xmm0
mov    0xa0(%rsp),%rdi
movsd  (%r8,%rdi,8),%xmm1
subsd  0x8(%r8),%xmm1
movsd  (%r8,%rcx,8),%xmm2
movslq %esi,%rcx
addsd  (%r8,%rcx,8),%xmm2
mulsd  %xmm0,%xmm1
subsd  %xmm2,%xmm1
movsd  %xmm1,0x8(%rbx)
test   %r9d,%r9d
je     1500 <kFCT+0x3c0>
mov    %rdx,%r10
lea    -0x1(%rsi),%ecx
movslq %ecx,%rcx
add    %r9d,%esi
lea    (%r8,%rcx,8),%rbx
xor    %ebp,%ebp
xor    %ecx,%ecx
lea    (%r15,%rcx,1),%edi
add    $0x2,%edi
movsd  (%r8,%rdi,8),%xmm1
subsd  0x10(%r8,%rcx,8),%xmm1
lea    0x3(%r15,%rcx,1),%edi
movsd  (%r8,%rdi,8),%xmm2
subsd  0x18(%r8,%rcx,8),%xmm2
lea    0x1(%rsi),%edx
mov    %esi,%edi
movsd  -0x8(%rbx,%rbp,1),%xmm3
movsd  (%rbx,%rbp,1),%xmm4
addsd  (%r8,%rdi,8),%xmm3
addsd  (%r8,%rdx,8),%xmm4
mulsd  %xmm0,%xmm1
subsd  %xmm4,%xmm1
movsd  %xmm1,(%r11,%rcx,8)
mulsd  %xmm0,%xmm2
subsd  %xmm3,%xmm2
movsd  %xmm2,0x8(%r11,%rcx,8)
add    $0xfffffffe,%esi
add    $0x2,%rcx
add    $0xfffffffffffffff0,%rbp
cmp    %r9d,%ecx
jb     1830 <kFCT+0x6f0>
sub    %rbp,%r11
mov    %r10,%rdx
jmp    1500 <kFCT+0x3c0>
xor    %r10d,%r10d
testb  $0x1,0x70(%rsp)
jne    1679 <kFCT+0x539>
jmp    16ac <kFCT+0x56c>
test   $0x1,%dil
cmovne %rcx,%r15
mov    0x28(%rsp),%rbx
cmp    %r13d,%ebp
jge    18e1 <kFCT+0x7a1>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r13d,%edx
mov    %ebp,%ecx
call   1050 <PartitionAdd@plt>
jmp    18f4 <kFCT+0x7b4>
lea    0x0(,%r13,8),%edx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <memcpy@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %r13d,%xmm1
movsd  (%rbx),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rbx)
cmp    $0x2,%ebp
jb     1a07 <kFCT+0x8c7>
movsd  0x6e7(%rip),%xmm0
divsd  %xmm1,%xmm0
mov    %ebp,%eax
lea    -0x1(%rax),%rdx
mov    $0x1,%ecx
cmp    $0x4,%rdx
jb     19f0 <kFCT+0x8b0>
mov    %rdx,%rcx
and    $0xfffffffffffffffc,%rcx
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
lea    -0x4(%rcx),%rsi
mov    %rsi,%rbp
shr    $0x2,%rbp
add    $0x1,%rbp
test   %rsi,%rsi
je     1a19 <kFCT+0x8d9>
mov    %rbp,%rdi
and    $0xfffffffffffffffe,%rdi
mov    $0x1,%esi
cs nopw 0x0(%rax,%rax,1)
nop
movupd (%rbx,%rsi,8),%xmm2
movupd 0x10(%rbx,%rsi,8),%xmm3
movupd 0x20(%rbx,%rsi,8),%xmm4
movupd 0x30(%rbx,%rsi,8),%xmm5
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,(%rbx,%rsi,8)
movupd %xmm3,0x10(%rbx,%rsi,8)
mulpd  %xmm1,%xmm4
mulpd  %xmm1,%xmm5
movupd %xmm4,0x20(%rbx,%rsi,8)
movupd %xmm5,0x30(%rbx,%rsi,8)
add    $0x8,%rsi
add    $0xfffffffffffffffe,%rdi
jne    1970 <kFCT+0x830>
test   $0x1,%bpl
je     19dc <kFCT+0x89c>
movupd (%rbx,%rsi,8),%xmm2
movupd 0x10(%rbx,%rsi,8),%xmm3
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,(%rbx,%rsi,8)
movupd %xmm3,0x10(%rbx,%rsi,8)
cmp    %rcx,%rdx
je     1a07 <kFCT+0x8c7>
or     $0x1,%rcx
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%rbx,%rcx,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    19f0 <kFCT+0x8b0>
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x1,%esi
test   $0x1,%bpl
jne    19be <kFCT+0x87e>
jmp    19dc <kFCT+0x89c>
mov    %r14,%rdx
jmp    1a38 <kFCT+0x8f8>
mov    0x20(%rsp),%r14
mov    %r14,%rdx
mov    0x18(%rsp),%r15
mov    %r15,%rsi
mov    %r12,%rdi
mov    0x8(%rsp),%r13
jmp    1362 <kFCT+0x222>

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

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