#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 */
scalar_t__ fabs(double);
int /*<<< orphan*/ fftn(int, int *, double *, double *, int, int);
int /*<<< orphan*/ free(double *);
scalar_t__ malloc(int);
int /*<<< orphan*/ plintf(char *, double);
void fftxcorr(float *data1, float *data2, int length, int nlag, float *cr,
              int flag) {
  double *re1, *re2, *im1, *im2, x, y, sum;
  float av1 = 0.0, av2 = 0.0;
  int dim[2], i;
  if (flag) {
    for (i = 0; i < length; i++) {
      av1 += data1[i];
      av2 += data2[i];
    }
    av1 = av1 / (float)length;
    av2 = av2 / (float)length;
  }
  dim[0] = length;
  re1 = (double *)malloc(length * sizeof(double));
  im1 = (double *)malloc(length * sizeof(double));
  re2 = (double *)malloc(length * sizeof(double));
  im2 = (double *)malloc(length * sizeof(double));
  for (i = 0; i < length; i++) {
    im1[i] = 0.0;
    re1[i] = (data1[i] - av1);
    im2[i] = 0.0;
    re2[i] = (data2[i] - av2);
  }
  fftn(1, dim, re1, im1, 1, -1);
  fftn(1, dim, re2, im2, 1, -1);
  for (i = 0; i < length; i++) {
    x = re1[i] * re2[i] + im1[i] * im2[i];
    y = im1[i] * re2[i] - im2[i] * re1[i];
    re1[i] = x;
    im1[i] = -y;
  }
  fftn(1, dim, re1, im1, -1, -1);
  sum = 0.0;
  for (i = 0; i < nlag; i++) {
    sum += fabs(im1[i]);
    cr[nlag + i] = (float)re1[i] * length;
  }
  for (i = 0; i < nlag; i++) {
    sum += fabs(im1[length - nlag + i]);
    cr[i] = (float)re1[length - nlag + i] * length;
  }
  free(re1);
  free(re2);
  free(im1);
  free(im2);
  plintf("residual = %g\n", sum);
}


x86 assembly (clang, -O0):
<fftxcorr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x64(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x68(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     1200 <fftxcorr+0xb0>
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11da <fftxcorr+0x8a>
mov    -0x8(%rbp),%rax
movslq -0x74(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
addss  -0x64(%rbp),%xmm0
movss  %xmm0,-0x64(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x74(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
addss  -0x68(%rbp),%xmm0
movss  %xmm0,-0x68(%rbp)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1192 <fftxcorr+0x42>
movss  -0x64(%rbp),%xmm0
cvtsi2ssl -0x14(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x64(%rbp)
movss  -0x68(%rbp),%xmm0
cvtsi2ssl -0x14(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x68(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x70(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x30(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x40(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x38(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    12d9 <fftxcorr+0x189>
mov    -0x40(%rbp),%rax
movslq -0x74(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
movslq -0x74(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
subss  -0x64(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x30(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x48(%rbp),%rax
movslq -0x74(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x74(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
subss  -0x68(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x38(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1259 <fftxcorr+0x109>
lea    -0x70(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x40(%rbp),%rcx
mov    $0x1,%r8d
mov    $0xffffffff,%r9d
mov    %r8d,%edi
call   1040 <fftn@plt>
lea    -0x70(%rbp),%rsi
mov    -0x38(%rbp),%rdx
mov    -0x48(%rbp),%rcx
mov    $0x1,%r8d
mov    $0xffffffff,%r9d
mov    %r8d,%edi
call   1040 <fftn@plt>
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    140e <fftxcorr+0x2be>
mov    -0x30(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x40(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x48(%rbp),%rax
movslq -0x74(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x40(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x48(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x30(%rbp),%rax
movslq -0x74(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x50(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x58(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x40(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1320 <fftxcorr+0x1d0>
lea    -0x70(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x40(%rbp),%rcx
mov    $0x1,%edi
mov    $0xffffffff,%r9d
mov    %r9d,%r8d
call   1040 <fftn@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    14a3 <fftxcorr+0x353>
mov    -0x40(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1050 <fabs@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
cvtsd2ss %xmm0,%xmm0
cvtsi2ssl -0x14(%rbp),%xmm1
mulss  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%ecx
add    -0x74(%rbp),%ecx
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    143c <fftxcorr+0x2ec>
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    151c <fftxcorr+0x3cc>
mov    -0x40(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    -0x18(%rbp),%ecx
add    -0x74(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1050 <fabs@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x30(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    -0x18(%rbp),%ecx
add    -0x74(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
cvtsd2ss %xmm0,%xmm0
cvtsi2ssl -0x14(%rbp),%xmm1
mulss  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x74(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    14aa <fftxcorr+0x35a>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
movsd  -0x60(%rbp),%xmm0
lea    0xab4(%rip),%rdi
call   1070 <plintf@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fftxcorr>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %r8,0x30(%rsp)
mov    %ecx,0x38(%rsp)
mov    %rsi,%r12
mov    %rdi,%r15
mov    %edx,%esi
test   %r9d,%r9d
mov    %rsi,0x8(%rsp)
je     1193 <fftxcorr+0x43>
test   %edx,%edx
jle    11a0 <fftxcorr+0x50>
lea    -0x1(%rsi),%rcx
mov    %esi,%eax
and    $0x3,%eax
cmp    $0x3,%rcx
jae    11a8 <fftxcorr+0x58>
xorps  %xmm5,%xmm5
xor    %ecx,%ecx
jmp    1207 <fftxcorr+0xb7>
xorps  %xmm0,%xmm0
movaps %xmm0,0x50(%rsp)
jmp    124c <fftxcorr+0xfc>
xorps  %xmm5,%xmm5
jmp    1239 <fftxcorr+0xe9>
and    $0xfffffffc,%esi
xorps  %xmm5,%xmm5
xor    %ecx,%ecx
movss  (%r12,%rcx,4),%xmm0
movss  0x4(%r12,%rcx,4),%xmm1
movss  0x8(%r12,%rcx,4),%xmm2
movss  0xc(%r12,%rcx,4),%xmm3
movss  (%r15,%rcx,4),%xmm4
unpcklps %xmm0,%xmm4
addps  %xmm5,%xmm4
movss  0x4(%r15,%rcx,4),%xmm0
unpcklps %xmm1,%xmm0
addps  %xmm4,%xmm0
movss  0x8(%r15,%rcx,4),%xmm1
unpcklps %xmm2,%xmm1
addps  %xmm0,%xmm1
movss  0xc(%r15,%rcx,4),%xmm5
unpcklps %xmm3,%xmm5
addps  %xmm1,%xmm5
add    $0x4,%rcx
cmp    %rcx,%rsi
jne    11b0 <fftxcorr+0x60>
test   %rax,%rax
je     1239 <fftxcorr+0xe9>
lea    (%r12,%rcx,4),%rdi
lea    (%r15,%rcx,4),%rcx
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
movss  (%rdi,%rsi,4),%xmm0
movss  (%rcx,%rsi,4),%xmm1
unpcklps %xmm0,%xmm1
addps  %xmm1,%xmm5
add    $0x1,%rsi
cmp    %rsi,%rax
jne    1220 <fftxcorr+0xd0>
xorps  %xmm0,%xmm0
cvtsi2ss %edx,%xmm0
shufps $0x0,%xmm0,%xmm0
divps  %xmm0,%xmm5
movaps %xmm5,0x50(%rsp)
mov    %edx,0x48(%rsp)
lea    0x0(,%rdx,8),%ebp
mov    %ebp,%edi
mov    %rdx,(%rsp)
call   1060 <malloc@plt>
mov    %rax,%r14
mov    %ebp,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
mov    %ebp,%edi
call   1060 <malloc@plt>
mov    %ebp,%edi
mov    %rbx,%rbp
mov    %rax,%rbx
call   1060 <malloc@plt>
mov    (%rsp),%rcx
test   %ecx,%ecx
mov    %rbp,0x18(%rsp)
mov    %rax,0x20(%rsp)
mov    %rbx,0x28(%rsp)
jle    13ad <fftxcorr+0x25d>
movaps 0x50(%rsp),%xmm4
movaps %xmm4,%xmm0
shufps $0x55,%xmm4,%xmm0
cmp    $0x1,%ecx
jne    13fc <fftxcorr+0x2ac>
xor    %r8d,%r8d
mov    0x20(%rsp),%r13
mov    0x8(%rsp),%r10
mov    0x28(%rsp),%rax
lea    (%rax,%r8,8),%r9
lea    (%r12,%r8,4),%rdx
lea    0x0(,%r8,8),%rsi
add    %r13,%rsi
lea    (%r14,%r8,8),%rdi
lea    (%r15,%r8,4),%rbp
mov    0x18(%rsp),%rax
lea    (%rax,%r8,8),%rbx
mov    %r10,%rax
sub    %r8,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movq   $0x0,(%rbx,%rcx,8)
movss  0x0(%rbp,%rcx,4),%xmm1
subss  %xmm4,%xmm1
cvtss2sd %xmm1,%xmm1
movsd  %xmm1,(%rdi,%rcx,8)
movq   $0x0,(%rsi,%rcx,8)
movss  (%rdx,%rcx,4),%xmm1
subss  %xmm0,%xmm1
cvtss2sd %xmm1,%xmm1
movsd  %xmm1,(%r9,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1300 <fftxcorr+0x1b0>
lea    0x48(%rsp),%r15
mov    $0x1,%edi
mov    %r15,%rsi
mov    %r14,%rdx
mov    0x18(%rsp),%rbp
mov    %rbp,%rcx
mov    $0x1,%r8d
mov    $0xffffffff,%r9d
call   1040 <fftn@plt>
mov    $0x1,%edi
mov    %r15,%rsi
mov    0x28(%rsp),%rbx
mov    %rbx,%rdx
mov    %r13,%rcx
mov    $0x1,%r8d
mov    $0xffffffff,%r9d
call   1040 <fftn@plt>
mov    0x8(%rsp),%rdi
mov    (%rsp),%rdx
test   %edx,%edx
jle    1771 <fftxcorr+0x621>
cmp    $0x1,%edx
jne    15a6 <fftxcorr+0x456>
xor    %eax,%eax
jmp    1713 <fftxcorr+0x5c3>
mov    %rax,%r13
lea    0x48(%rsp),%r15
mov    $0x1,%edi
mov    %r15,%rsi
mov    %r14,%rdx
mov    %rbp,%rcx
mov    $0x1,%r8d
mov    $0xffffffff,%r9d
call   1040 <fftn@plt>
mov    $0x1,%edi
mov    %r15,%rsi
mov    %rbx,%rdx
mov    %r13,%rcx
mov    $0x1,%r8d
mov    $0xffffffff,%r9d
call   1040 <fftn@plt>
mov    (%rsp),%rdx
jmp    1771 <fftxcorr+0x621>
mov    0x18(%rsp),%rdx
mov    0x8(%rsp),%rax
lea    (%rdx,%rax,8),%rsi
lea    (%r14,%rax,8),%rdi
mov    0x20(%rsp),%r13
lea    0x0(,%rax,8),%rbp
add    %r13,%rbp
mov    0x28(%rsp),%rbx
lea    (%rbx,%rax,8),%rax
cmp    %rdi,%rdx
setb   0x40(%rsp)
cmp    %rsi,%r14
setb   %r10b
cmp    %rbp,%rdx
setb   %cl
cmp    %rsi,%r13
setb   %r11b
cmp    %rax,%rdx
setb   %dl
cmp    %rsi,%rbx
setb   0x17(%rsp)
cmp    %rbp,%r14
setb   %r9b
cmp    %rdi,%r13
setb   0x16(%rsp)
cmp    %rax,%r14
setb   %sil
cmp    %rdi,%rbx
setb   0x15(%rsp)
cmp    %rax,%r13
setb   %dil
cmp    %rbp,%rbx
setb   %bpl
xor    %r8d,%r8d
test   %r10b,0x40(%rsp)
jne    12bb <fftxcorr+0x16b>
and    %r11b,%cl
mov    0x8(%rsp),%r10
jne    12c0 <fftxcorr+0x170>
and    0x17(%rsp),%dl
jne    12c0 <fftxcorr+0x170>
and    0x16(%rsp),%r9b
jne    12c0 <fftxcorr+0x170>
and    0x15(%rsp),%sil
jne    12c0 <fftxcorr+0x170>
and    %bpl,%dil
jne    12c0 <fftxcorr+0x170>
mov    %r10d,%r8d
and    $0xfffffffe,%r8d
movaps %xmm4,%xmm1
shufps $0x0,%xmm4,%xmm1
lea    -0x2(%r8),%rax
mov    %rax,%rdx
shr    %rdx
add    $0x1,%rdx
test   %rax,%rax
je     16cb <fftxcorr+0x57b>
mov    %rdx,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %ecx,%ecx
xorps  %xmm2,%xmm2
mov    0x18(%rsp),%rax
mov    0x28(%rsp),%rdi
nopl   (%rax)
movups %xmm2,(%rax,%rcx,8)
movsd  (%r15,%rcx,4),%xmm3
subps  %xmm1,%xmm3
cvtps2pd %xmm3,%xmm3
movups %xmm3,(%r14,%rcx,8)
movups %xmm2,0x0(%r13,%rcx,8)
movsd  (%r12,%rcx,4),%xmm3
subps  %xmm0,%xmm3
cvtps2pd %xmm3,%xmm3
movups %xmm3,(%rdi,%rcx,8)
movups %xmm2,0x10(%rax,%rcx,8)
movsd  0x8(%r15,%rcx,4),%xmm3
subps  %xmm1,%xmm3
cvtps2pd %xmm3,%xmm3
movups %xmm3,0x10(%r14,%rcx,8)
movups %xmm2,0x10(%r13,%rcx,8)
movsd  0x8(%r12,%rcx,4),%xmm3
subps  %xmm0,%xmm3
cvtps2pd %xmm3,%xmm3
movups %xmm3,0x10(%rdi,%rcx,8)
add    $0x4,%rcx
add    $0xfffffffffffffffe,%rsi
jne    1500 <fftxcorr+0x3b0>
test   $0x1,%dl
je     1598 <fftxcorr+0x448>
xorps  %xmm2,%xmm2
movups %xmm2,(%rax,%rcx,8)
movsd  (%r15,%rcx,4),%xmm3
subps  %xmm1,%xmm3
cvtps2pd %xmm3,%xmm1
movups %xmm1,(%r14,%rcx,8)
movups %xmm2,0x0(%r13,%rcx,8)
movsd  (%r12,%rcx,4),%xmm1
subps  %xmm0,%xmm1
cvtps2pd %xmm1,%xmm1
movups %xmm1,(%rdi,%rcx,8)
cmp    %r10,%r8
jne    12c0 <fftxcorr+0x170>
jmp    133f <fftxcorr+0x1ef>
lea    (%r14,%rdi,8),%rax
lea    0x0(,%rdi,8),%rdx
add    %rbp,%rdx
lea    (%rbx,%rdi,8),%rsi
lea    0x0(,%rdi,8),%rdi
add    %r13,%rdi
cmp    %rdx,%r14
setb   %r15b
cmp    %rax,%rbp
setb   %r12b
cmp    %rsi,%r14
setb   %cl
cmp    %rax,%rbx
setb   %r11b
cmp    %rdi,%r14
setb   %r10b
cmp    %rax,%r13
setb   %r8b
cmp    %rsi,%rbp
mov    %r13,%rax
setb   %r13b
cmp    %rdx,%rbx
setb   %r9b
cmp    %rdi,%rbp
setb   %sil
cmp    %rdx,%rax
setb   %dl
xor    %eax,%eax
test   %r12b,%r15b
jne    16fb <fftxcorr+0x5ab>
and    %r11b,%cl
mov    0x18(%rsp),%rbp
mov    0x28(%rsp),%rbx
jne    16f0 <fftxcorr+0x5a0>
and    %r8b,%r10b
jne    16f0 <fftxcorr+0x5a0>
and    %r9b,%r13b
mov    0x8(%rsp),%rdi
jne    16e5 <fftxcorr+0x595>
and    %dl,%sil
mov    (%rsp),%rdx
mov    0x20(%rsp),%r13
jne    1713 <fftxcorr+0x5c3>
mov    %edi,%eax
and    $0xfffffffe,%eax
xor    %ecx,%ecx
movapd 0x99f(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movupd (%r14,%rcx,8),%xmm1
movupd (%rbx,%rcx,8),%xmm2
movupd 0x0(%rbp,%rcx,8),%xmm3
movupd 0x0(%r13,%rcx,8),%xmm4
movapd %xmm3,%xmm5
mulpd  %xmm4,%xmm5
movapd %xmm1,%xmm6
mulpd  %xmm2,%xmm6
addpd  %xmm5,%xmm6
mulpd  %xmm4,%xmm1
mulpd  %xmm2,%xmm3
subpd  %xmm1,%xmm3
xorpd  %xmm0,%xmm3
movupd %xmm6,(%r14,%rcx,8)
movupd %xmm3,0x0(%rbp,%rcx,8)
add    $0x2,%rcx
cmp    %rcx,%rax
jne    1670 <fftxcorr+0x520>
cmp    %rdi,%rax
jne    1713 <fftxcorr+0x5c3>
jmp    1771 <fftxcorr+0x621>
xor    %ecx,%ecx
mov    0x18(%rsp),%rax
mov    0x28(%rsp),%rdi
test   $0x1,%dl
jne    156a <fftxcorr+0x41a>
jmp    1598 <fftxcorr+0x448>
mov    (%rsp),%rdx
mov    0x20(%rsp),%r13
jmp    1713 <fftxcorr+0x5c3>
mov    (%rsp),%rdx
mov    0x20(%rsp),%r13
jmp    170e <fftxcorr+0x5be>
mov    (%rsp),%rdx
mov    0x18(%rsp),%rbp
mov    0x20(%rsp),%r13
mov    0x28(%rsp),%rbx
mov    0x8(%rsp),%rdi
movapd 0x8e5(%rip),%xmm0
nopl   0x0(%rax,%rax,1)
movsd  (%r14,%rax,8),%xmm1
movsd  (%rbx,%rax,8),%xmm2
movsd  0x0(%rbp,%rax,8),%xmm3
movsd  0x0(%r13,%rax,8),%xmm4
movapd %xmm3,%xmm5
mulsd  %xmm4,%xmm5
movapd %xmm1,%xmm6
mulsd  %xmm2,%xmm6
addsd  %xmm5,%xmm6
mulsd  %xmm4,%xmm1
mulsd  %xmm2,%xmm3
subsd  %xmm1,%xmm3
xorpd  %xmm0,%xmm3
movsd  %xmm6,(%r14,%rax,8)
movlpd %xmm3,0x0(%rbp,%rax,8)
add    $0x1,%rax
cmp    %rax,%rdi
jne    1720 <fftxcorr+0x5d0>
mov    %rdx,%r15
lea    0x48(%rsp),%rsi
mov    $0x1,%edi
mov    %r14,%rdx
mov    %rbp,%rcx
mov    $0xffffffff,%r8d
mov    $0xffffffff,%r9d
call   1040 <fftn@plt>
mov    0x38(%rsp),%eax
test   %eax,%eax
jle    1869 <fftxcorr+0x719>
mov    %r15,%rcx
xorps  %xmm2,%xmm2
cvtsi2ss %ecx,%xmm2
mov    %eax,%ecx
mov    %rcx,%rax
add    $0xffffffffffffffff,%rax
mov    %rax,0x40(%rsp)
movss  %xmm2,0x8(%rsp)
mov    %rcx,0x50(%rsp)
je     1876 <fftxcorr+0x726>
mov    %ecx,%r13d
and    $0xfffffffe,%r13d
mov    0x30(%rsp),%rax
lea    (%rax,%rcx,4),%rbx
add    $0x4,%rbx
xorps  %xmm1,%xmm1
xor    %r12d,%r12d
mov    0x18(%rsp),%rbp
nopl   0x0(%rax)
movsd  %xmm1,(%rsp)
movsd  0x0(%rbp,%r12,8),%xmm0
call   1050 <fabs@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %rax,%xmm1
movsd  (%r14,%r12,8),%xmm0
cvtsd2ss %xmm0,%xmm0
addsd  (%rsp),%xmm1
movsd  %xmm1,(%rsp)
mulss  0x8(%rsp),%xmm0
movss  %xmm0,-0x4(%rbx,%r12,4)
movsd  0x8(%rbp,%r12,8),%xmm0
call   1050 <fabs@plt>
movss  0x8(%rsp),%xmm2
xorps  %xmm1,%xmm1
cvtsi2sd %rax,%xmm1
addsd  (%rsp),%xmm1
movsd  0x8(%r14,%r12,8),%xmm0
cvtsd2ss %xmm0,%xmm0
mulss  %xmm2,%xmm0
movss  %xmm0,(%rbx,%r12,4)
add    $0x2,%r12
cmp    %r12,%r13
jne    17f0 <fftxcorr+0x6a0>
jmp    1881 <fftxcorr+0x731>
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rsp)
jmp    1a06 <fftxcorr+0x8b6>
xor    %r12d,%r12d
xorps  %xmm1,%xmm1
mov    0x18(%rsp),%rbp
movsd  %xmm1,(%rsp)
mov    0x50(%rsp),%rcx
test   $0x1,%cl
mov    0x20(%rsp),%r13
mov    0x28(%rsp),%rbx
je     18e3 <fftxcorr+0x793>
movsd  0x0(%rbp,%r12,8),%xmm0
call   1050 <fabs@plt>
mov    0x50(%rsp),%rcx
movss  0x8(%rsp),%xmm2
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  (%r14,%r12,8),%xmm1
cvtsd2ss %xmm1,%xmm1
movsd  (%rsp),%xmm3
addsd  %xmm0,%xmm3
movsd  %xmm3,(%rsp)
mulss  %xmm2,%xmm1
add    %rcx,%r12
mov    0x30(%rsp),%rax
movss  %xmm1,(%rax,%r12,4)
mov    0x38(%rsp),%eax
test   %eax,%eax
jle    1a06 <fftxcorr+0x8b6>
sub    %eax,%r15d
movslq %r15d,%rax
cmpq   $0x0,0x40(%rsp)
mov    %rax,0x38(%rsp)
je     19a7 <fftxcorr+0x857>
mov    %ecx,%r12d
and    $0xfffffffe,%r12d
lea    (%r14,%rax,8),%rbx
add    $0x8,%rbx
lea    0x8(,%rax,8),%r15
add    %rbp,%r15
xor    %ebp,%ebp
mov    0x30(%rsp),%r13
nopw   0x0(%rax,%rax,1)
movsd  -0x8(%r15,%rbp,8),%xmm0
call   1050 <fabs@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %rax,%xmm1
movsd  -0x8(%rbx,%rbp,8),%xmm0
cvtsd2ss %xmm0,%xmm0
addsd  (%rsp),%xmm1
movsd  %xmm1,(%rsp)
mulss  0x8(%rsp),%xmm0
movss  %xmm0,0x0(%r13,%rbp,4)
movsd  (%r15,%rbp,8),%xmm0
call   1050 <fabs@plt>
movss  0x8(%rsp),%xmm2
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  (%rbx,%rbp,8),%xmm0
cvtsd2ss %xmm0,%xmm0
mulss  %xmm2,%xmm0
movss  %xmm0,0x4(%r13,%rbp,4)
add    $0x2,%rbp
cmp    %rbp,%r12
jne    1930 <fftxcorr+0x7e0>
jmp    19a9 <fftxcorr+0x859>
xor    %ebp,%ebp
testb  $0x1,0x50(%rsp)
mov    0x20(%rsp),%r13
mov    0x28(%rsp),%rbx
je     1a06 <fftxcorr+0x8b6>
mov    0x38(%rsp),%r15
add    %rbp,%r15
mov    0x18(%rsp),%rax
movsd  (%rax,%r15,8),%xmm0
call   1050 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  (%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movsd  (%r14,%r15,8),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  0x8(%rsp),%xmm1
mulss  %xmm0,%xmm1
mov    0x30(%rsp),%rax
movss  %xmm1,(%rax,%rbp,4)
mov    %r14,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    0x18(%rsp),%rdi
call   1030 <free@plt>
mov    %r13,%rdi
call   1030 <free@plt>
lea    0x5e1(%rip),%rdi
movsd  (%rsp),%xmm0
call   1070 <plintf@plt>
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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