#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*/ FFT(int, int /*<<< orphan*/, float *, float *, float *,
                       float *);
scalar_t__ calloc(int, int);
int /*<<< orphan*/ free(float *);
scalar_t__ sin(float);
void PowerSpectrum(int NumSamples, float *In, float *Out) {
  int Half, i, i3;
  float theta, wtemp, wpr, wpi, wr, wi;
  float h1r, h1i, h2r, h2i, rt, it;
  float *tmpReal;
  float *tmpImag;
  float *RealOut;
  float *ImagOut;
  Half = NumSamples / 2;
  theta = 3.14159265358979323846 / Half;
  tmpReal = (float *)calloc(Half, sizeof(float));
  tmpImag = (float *)calloc(Half, sizeof(float));
  RealOut = (float *)calloc(Half, sizeof(float));
  ImagOut = (float *)calloc(Half, sizeof(float));
  for (i = 0; i < Half; i++) {
    tmpReal[i] = In[2 * i];
    tmpImag[i] = In[2 * i + 1];
  }
  FFT(Half, 0, tmpReal, tmpImag, RealOut, ImagOut);
  wtemp = (float)sin(0.5 * theta);
  wpr = -2.0 * wtemp * wtemp;
  wpi = (float)sin(theta);
  wr = 1.0 + wpr;
  wi = wpi;
  for (i = 1; i < Half / 2; i++) {
    i3 = Half - i;
    h1r = 0.5 * (RealOut[i] + RealOut[i3]);
    h1i = 0.5 * (ImagOut[i] - ImagOut[i3]);
    h2r = 0.5 * (ImagOut[i] + ImagOut[i3]);
    h2i = -0.5 * (RealOut[i] - RealOut[i3]);
    rt = h1r + wr * h2r - wi * h2i;
    it = h1i + wr * h2i + wi * h2r;
    Out[i] = rt * rt + it * it;
    rt = h1r - wr * h2r + wi * h2i;
    it = -h1i + wr * h2i + wi * h2r;
    Out[i3] = rt * rt + it * it;
    wr = (wtemp = wr) * wpr - wi * wpi + wr;
    wi = wi * wpr + wtemp * wpi + wi;
  }
  rt = (h1r = RealOut[0]) + ImagOut[0];
  it = h1r - ImagOut[0];
  Out[0] = rt * rt + it * it;
  rt = RealOut[Half / 2];
  it = ImagOut[Half / 2];
  Out[Half / 2] = rt * rt + it * it;
  free(tmpReal);
  free(tmpImag);
  free(RealOut);
  free(ImagOut);
}


x86 assembly (clang, -O0):
<PowerSpectrum>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x1c(%rbp)
cvtsi2sdl -0x1c(%rbp),%xmm1
movsd  0xe8f(%rip),%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x28(%rbp)
mov    -0x1c(%rbp),%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,-0x60(%rbp)
mov    -0x1c(%rbp),%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,-0x68(%rbp)
mov    -0x1c(%rbp),%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,-0x70(%rbp)
mov    -0x1c(%rbp),%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,-0x78(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1224 <PowerSpectrum+0xe4>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x60(%rbp),%rax
movslq -0x20(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x68(%rbp),%rax
movslq -0x20(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11c9 <PowerSpectrum+0x89>
mov    -0x1c(%rbp),%edi
mov    -0x60(%rbp),%rdx
mov    -0x68(%rbp),%rcx
mov    -0x70(%rbp),%r8
mov    -0x78(%rbp),%r9
xor    %esi,%esi
call   1060 <FFT@plt>
movss  -0x28(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xdc9(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1050 <sin@plt>
cvtsi2ss %rax,%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x2c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xd99(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x2c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x28(%rbp),%xmm0
call   1050 <sin@plt>
cvtsi2ss %rax,%xmm0
movss  %xmm0,-0x34(%rbp)
movss  -0x30(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xd52(%rip),%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x38(%rbp)
movss  -0x34(%rbp),%xmm0
movss  %xmm0,-0x3c(%rbp)
movl   $0x1,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x7c(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x7c(%rbp),%eax
cmp    %ecx,%eax
jge    1564 <PowerSpectrum+0x424>
mov    -0x1c(%rbp),%eax
sub    -0x20(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x70(%rbp),%rax
movslq -0x20(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x70(%rbp),%rax
movslq -0x24(%rbp),%rcx
addss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xcf7(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x40(%rbp)
mov    -0x78(%rbp),%rax
movslq -0x20(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x78(%rbp),%rax
movslq -0x24(%rbp),%rcx
subss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xcc4(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x44(%rbp)
mov    -0x78(%rbp),%rax
movslq -0x20(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x78(%rbp),%rax
movslq -0x24(%rbp),%rcx
addss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xc91(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x48(%rbp)
mov    -0x70(%rbp),%rax
movslq -0x20(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x70(%rbp),%rax
movslq -0x24(%rbp),%rcx
subss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xc66(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4c(%rbp)
movss  -0x40(%rbp),%xmm0
movss  -0x38(%rbp),%xmm1
movss  -0x48(%rbp),%xmm2
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x3c(%rbp),%xmm0
movss  -0x4c(%rbp),%xmm2
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x50(%rbp)
movss  -0x44(%rbp),%xmm0
movss  -0x38(%rbp),%xmm1
movss  -0x4c(%rbp),%xmm2
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x3c(%rbp),%xmm0
movss  -0x48(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x54(%rbp)
movss  -0x50(%rbp),%xmm0
movss  -0x50(%rbp),%xmm2
movss  -0x54(%rbp),%xmm1
mulss  -0x54(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
movss  -0x40(%rbp),%xmm0
movss  -0x38(%rbp),%xmm1
movss  -0x48(%rbp),%xmm2
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x3c(%rbp),%xmm0
movss  -0x4c(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x50(%rbp)
movss  -0x44(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  -0x38(%rbp),%xmm1
movss  -0x4c(%rbp),%xmm2
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x3c(%rbp),%xmm0
movss  -0x48(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x54(%rbp)
movss  -0x50(%rbp),%xmm0
movss  -0x50(%rbp),%xmm2
movss  -0x54(%rbp),%xmm1
mulss  -0x54(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
movss  -0x38(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x30(%rbp),%xmm2
movss  -0x3c(%rbp),%xmm1
mulss  -0x34(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
addss  -0x38(%rbp),%xmm0
movss  %xmm0,-0x38(%rbp)
movss  -0x3c(%rbp),%xmm0
movss  -0x30(%rbp),%xmm2
movss  -0x2c(%rbp),%xmm1
mulss  -0x34(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
addss  -0x3c(%rbp),%xmm0
movss  %xmm0,-0x3c(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    12d4 <PowerSpectrum+0x194>
mov    -0x70(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x40(%rbp)
mov    -0x78(%rbp),%rax
addss  (%rax),%xmm0
movss  %xmm0,-0x50(%rbp)
movss  -0x40(%rbp),%xmm0
mov    -0x78(%rbp),%rax
subss  (%rax),%xmm0
movss  %xmm0,-0x54(%rbp)
movss  -0x50(%rbp),%xmm0
movss  -0x50(%rbp),%xmm2
movss  -0x54(%rbp),%xmm1
mulss  -0x54(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x70(%rbp),%rax
mov    %rax,-0x98(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x98(%rbp),%rax
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x50(%rbp)
mov    -0x78(%rbp),%rax
mov    %rax,-0x90(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x90(%rbp),%rax
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x54(%rbp)
movss  -0x50(%rbp),%xmm0
movss  -0x50(%rbp),%xmm2
movss  -0x54(%rbp),%xmm1
mulss  -0x54(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x88(%rbp),%rax
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x60(%rbp),%rdi
call   1030 <free@plt>
mov    -0x68(%rbp),%rdi
call   1030 <free@plt>
mov    -0x70(%rbp),%rdi
call   1030 <free@plt>
mov    -0x78(%rbp),%rdi
call   1030 <free@plt>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PowerSpectrum>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rdx,0x20(%rsp)
mov    %rsi,%r14
mov    %edi,%ebx
mov    %edi,%ebp
shr    $0x1f,%ebp
add    %edi,%ebp
sar    %ebp
cvtsi2sd %ebp,%xmm0
movsd  0xe93(%rip),%xmm1
divsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
movss  %xmm0,0xc(%rsp)
mov    %ebp,%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,%r15
mov    %ebp,%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,%r12
mov    %ebp,%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,0x18(%rsp)
mov    %ebp,%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,%r13
mov    %rbx,0x10(%rsp)
cmp    $0x2,%ebx
jl     12fe <PowerSpectrum+0x1be>
mov    %ebp,%eax
cmp    $0x8,%ebp
jae    11d8 <PowerSpectrum+0x98>
xor    %ecx,%ecx
jmp    1291 <PowerSpectrum+0x151>
lea    (%r15,%rax,4),%rcx
lea    (%r12,%rax,4),%rdi
lea    (%r14,%rax,8),%rsi
cmp    %rdi,%r15
setb   %r10b
cmp    %rcx,%r12
setb   %r11b
cmp    %rsi,%r15
setb   %dl
cmp    %r14,%rcx
seta   %r9b
cmp    %rsi,%r12
setb   %sil
cmp    %r14,%rdi
seta   %r8b
xor    %ecx,%ecx
test   %r11b,%r10b
jne    1291 <PowerSpectrum+0x151>
and    %r9b,%dl
jne    1291 <PowerSpectrum+0x151>
and    %r8b,%sil
jne    1291 <PowerSpectrum+0x151>
mov    %eax,%ecx
and    $0xfffffff8,%ecx
lea    0x0(,%rax,4),%rdx
and    $0xffffffffffffffe0,%rdx
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movups (%r14,%rsi,2),%xmm0
movups 0x10(%r14,%rsi,2),%xmm1
movups 0x20(%r14,%rsi,2),%xmm2
movups 0x30(%r14,%rsi,2),%xmm3
movaps %xmm0,%xmm4
shufps $0x88,%xmm1,%xmm4
movaps %xmm2,%xmm5
shufps $0x88,%xmm3,%xmm5
shufps $0xdd,%xmm1,%xmm0
shufps $0xdd,%xmm3,%xmm2
movups %xmm4,(%r15,%rsi,1)
movups %xmm5,0x10(%r15,%rsi,1)
movups %xmm0,(%r12,%rsi,1)
movups %xmm2,0x10(%r12,%rsi,1)
add    $0x20,%rsi
cmp    %rsi,%rdx
jne    1240 <PowerSpectrum+0x100>
cmp    %rax,%rcx
je     12fe <PowerSpectrum+0x1be>
mov    %rcx,%rdx
not    %rdx
test   $0x1,%al
je     12b8 <PowerSpectrum+0x178>
movss  (%r14,%rcx,8),%xmm0
movss  %xmm0,(%r15,%rcx,4)
movss  0x4(%r14,%rcx,8),%xmm0
movss  %xmm0,(%r12,%rcx,4)
or     $0x1,%rcx
add    %rax,%rdx
je     12fe <PowerSpectrum+0x1be>
nopl   (%rax)
movss  (%r14,%rcx,8),%xmm0
movss  %xmm0,(%r15,%rcx,4)
movss  0x4(%r14,%rcx,8),%xmm0
movss  %xmm0,(%r12,%rcx,4)
movss  0x8(%r14,%rcx,8),%xmm0
movss  %xmm0,0x4(%r15,%rcx,4)
movss  0xc(%r14,%rcx,8),%xmm0
movss  %xmm0,0x4(%r12,%rcx,4)
add    $0x2,%rcx
cmp    %rcx,%rax
jne    12c0 <PowerSpectrum+0x180>
mov    %ebp,%edi
xor    %esi,%esi
mov    %r15,%rdx
mov    %r12,%rcx
mov    0x18(%rsp),%rbx
mov    %rbx,%r8
mov    %r13,%r9
call   1060 <FFT@plt>
movss  0xcf0(%rip),%xmm0
mulss  0xc(%rsp),%xmm0
call   1050 <sin@plt>
mov    %rax,%r14
movss  0xc(%rsp),%xmm0
call   1050 <sin@plt>
mov    %rbx,%r10
mov    0x10(%rsp),%rcx
lea    0x3(%rcx),%r8d
test   %ecx,%ecx
cmovns %ecx,%r8d
sar    $0x2,%r8d
cmp    $0x8,%ecx
mov    0x20(%rsp),%r9
jl     14d8 <PowerSpectrum+0x398>
xorps  %xmm0,%xmm0
cvtsi2ss %r14,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xc97(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
cvtsd2ss %xmm1,%xmm10
cvtsi2ss %rax,%xmm11
movss  0xc89(%rip),%xmm0
addss  %xmm10,%xmm0
movslq %ebp,%rcx
cmp    $0x3,%r8d
mov    $0x2,%edi
cmovge %r8d,%edi
movaps %xmm11,%xmm14
unpcklps %xmm0,%xmm14
shufps $0x0,%xmm10,%xmm10
shufps $0x0,%xmm11,%xmm11
lea    -0x4(%r10,%rcx,4),%rax
lea    -0x4(%r13,%rcx,4),%rdx
lea    (%r9,%rcx,4),%rsi
add    $0xfffffffffffffffc,%rsi
lea    -0x4(,%rdi,4),%rbx
ff
mov    $0x1,%ebp
xor    %ecx,%ecx
movss  0xc34(%rip),%xmm12
movss  0xc33(%rip),%xmm8
movaps 0xc33(%rip),%xmm9
nopl   (%rax)
movss  (%r10,%rbp,4),%xmm0
movss  (%rax,%rcx,1),%xmm1
movaps %xmm0,%xmm6
addss  %xmm1,%xmm6
mulss  %xmm12,%xmm6
movss  0x0(%r13,%rbp,4),%xmm7
movss  (%rdx,%rcx,1),%xmm2
movaps %xmm7,%xmm5
subss  %xmm2,%xmm5
mulss  %xmm12,%xmm5
addss  %xmm2,%xmm7
mulss  %xmm12,%xmm7
subss  %xmm1,%xmm0
mulss  %xmm8,%xmm0
movaps %xmm14,%xmm1
shufps $0x55,%xmm14,%xmm1
movaps %xmm1,%xmm13
mulss  %xmm7,%xmm13
movaps %xmm13,%xmm3
addss  %xmm6,%xmm3
movaps %xmm14,%xmm2
xorps  %xmm9,%xmm2
movaps %xmm14,%xmm4
mulss  %xmm0,%xmm4
subss  %xmm4,%xmm3
mulss  %xmm0,%xmm1
movaps %xmm1,%xmm0
addss  %xmm5,%xmm0
mulss  %xmm14,%xmm7
addss  %xmm7,%xmm0
mulss  %xmm0,%xmm0
mulss  %xmm3,%xmm3
addss  %xmm0,%xmm3
movss  %xmm3,(%r9,%rbp,4)
subss  %xmm13,%xmm6
addss  %xmm4,%xmm6
subss  %xmm5,%xmm1
addss  %xmm7,%xmm1
mulss  %xmm1,%xmm1
mulss  %xmm6,%xmm6
addss  %xmm1,%xmm6
movss  %xmm6,(%rsi,%rcx,1)
shufps $0xd4,%xmm14,%xmm2
shufps $0x52,%xmm14,%xmm2
mulps  %xmm11,%xmm2
movaps %xmm14,%xmm0
mulps  %xmm10,%xmm0
addps  %xmm2,%xmm0
addps  %xmm0,%xmm14
add    $0x1,%rbp
add    $0xfffffffffffffffc,%rcx
mov    %rbx,%rdi
add    %rcx,%rdi
jne    13f0 <PowerSpectrum+0x2b0>
movss  (%r10),%xmm0
movss  0x0(%r13),%xmm1
movaps %xmm0,%xmm2
addss  %xmm1,%xmm2
subss  %xmm1,%xmm0
mulss  %xmm0,%xmm0
mulss  %xmm2,%xmm2
addss  %xmm0,%xmm2
movss  %xmm2,(%r9)
movslq %r8d,%rax
movss  (%r10,%rax,4),%xmm0
movss  0x0(%r13,%rax,4),%xmm1
mulss  %xmm1,%xmm1
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,(%r9,%rax,4)
mov    %r15,%rdi
mov    %r10,%rbx
call   1030 <free@plt>
mov    %r12,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r13,%rdi
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @PowerSpectrum(i32 %0, float* nocapture %1, float* nocapture writeonly %2) {
%4 = sdiv i32 %0, 2
%5 = sitofp i32 %4 to double
%6 = fdiv double 0x400921FB54442D18, %5
%7 = fptrunc double %6 to float
%8 = tail call i64 @calloc(i32 %4, i32 4)
%9 = inttoptr i64 %8 to float*
%10 = inttoptr i64 %8 to i8*
%11 = tail call i64 @calloc(i32 %4, i32 4)
%12 = inttoptr i64 %11 to float*
%13 = inttoptr i64 %11 to i8*
%14 = tail call i64 @calloc(i32 %4, i32 4)
%15 = inttoptr i64 %14 to float*
%16 = tail call i64 @calloc(i32 %4, i32 4)
%17 = inttoptr i64 %16 to float*
%18 = icmp sgt i32 %0, 1
br i1 %18, label %19, label %110
19: ; preds = %3
%20 = zext i32 %4 to i64
%21 = icmp ult i32 %4, 8
br i1 %21, label %70, label %22
22: ; preds = %19
%23 = getelementptr float, float* %9, i64 %20
%24 = bitcast float* %23 to i8*
%25 = getelementptr float, float* %12, i64 %20
%26 = bitcast float* %25 to i8*
%27 = shl nuw nsw i64 %20, 1
%28 = getelementptr float, float* %1, i64 %27
%29 = bitcast float* %28 to i8*
%30 = icmp ult i8* %10, %26
%31 = icmp ult i8* %13, %24
%32 = and i1 %30, %31
%33 = icmp ult i8* %10, %29
%34 = icmp ugt float* %23, %1
%35 = and i1 %33, %34
%36 = or i1 %32, %35
%37 = icmp ult i8* %13, %29
%38 = icmp ugt float* %25, %1
%39 = and i1 %37, %38
%40 = or i1 %36, %39
br i1 %40, label %70, label %41
41: ; preds = %22
%42 = and i64 %20, 4294967288
br label %43
43: ; preds = %43, %41
%44 = phi i64 [ 0, %41 ], [ %66, %43 ]
%45 = shl nuw nsw i64 %44, 1
%46 = shl i64 %44, 1
%47 = or i64 %46, 8
%48 = getelementptr inbounds float, float* %1, i64 %45
%49 = getelementptr inbounds float, float* %1, i64 %47
%50 = bitcast float* %48 to <8 x float>*
%51 = bitcast float* %49 to <8 x float>*
%52 = load <8 x float>, <8 x float>* %50
%53 = load <8 x float>, <8 x float>* %51
%54 = shufflevector <8 x float> %52, <8 x float> poison, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
%55 = shufflevector <8 x float> %53, <8 x float> poison, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
%56 = shufflevector <8 x float> %52, <8 x float> poison, <4 x i32> <i32 1, i32 3, i32 5, i32 7>
%57 = shufflevector <8 x float> %53, <8 x float> poison, <4 x i32> <i32 1, i32 3, i32 5, i32 7>
%58 = getelementptr inbounds float, float* %9, i64 %44
%59 = bitcast float* %58 to <4 x float>*
store <4 x float> %54, <4 x float>* %59
%60 = getelementptr inbounds float, float* %58, i64 4
%61 = bitcast float* %60 to <4 x float>*
store <4 x float> %55, <4 x float>* %61
%62 = getelementptr inbounds float, float* %12, i64 %44
%63 = bitcast float* %62 to <4 x float>*
store <4 x float> %56, <4 x float>* %63
%64 = getelementptr inbounds float, float* %62, i64 4
%65 = bitcast float* %64 to <4 x float>*
store <4 x float> %57, <4 x float>* %65
%66 = add nuw i64 %44, 8
%67 = icmp eq i64 %66, %42
br i1 %67, label %68, label %43
68: ; preds = %43
%69 = icmp eq i64 %42, %20
br i1 %69, label %110, label %70
70: ; preds = %22, %19, %68
%71 = phi i64 [ 0, %22 ], [ 0, %19 ], [ %42, %68 ]
%72 = xor i64 %71, -1
%73 = and i64 %20, 1
%74 = icmp eq i64 %73, 0
br i1 %74, label %85, label %75
75: ; preds = %70
%76 = shl nuw nsw i64 %71, 1
%77 = getelementptr inbounds float, float* %1, i64 %76
%78 = load float, float* %77
%79 = getelementptr inbounds float, float* %9, i64 %71
store float %78, float* %79
%80 = or i64 %76, 1
%81 = getelementptr inbounds float, float* %1, i64 %80
%82 = load float, float* %81
%83 = getelementptr inbounds float, float* %12, i64 %71
store float %82, float* %83
%84 = or i64 %71, 1
br label %85
85: ; preds = %75, %70
%86 = phi i64 [ %71, %70 ], [ %84, %75 ]
%87 = sub nsw i64 0, %20
%88 = icmp eq i64 %72, %87
br i1 %88, label %110, label %89
89: ; preds = %85, %89
%90 = phi i64 [ %108, %89 ], [ %86, %85 ]
%91 = shl nuw nsw i64 %90, 1
%92 = getelementptr inbounds float, float* %1, i64 %91
%93 = load float, float* %92
%94 = getelementptr inbounds float, float* %9, i64 %90
store float %93, float* %94
%95 = or i64 %91, 1
%96 = getelementptr inbounds float, float* %1, i64 %95
%97 = load float, float* %96
%98 = getelementptr inbounds float, float* %12, i64 %90
store float %97, float* %98
%99 = add nuw nsw i64 %90, 1
%100 = shl nuw nsw i64 %99, 1
%101 = getelementptr inbounds float, float* %1, i64 %100
%102 = load float, float* %101
%103 = getelementptr inbounds float, float* %9, i64 %99
store float %102, float* %103
%104 = or i64 %100, 1
%105 = getelementptr inbounds float, float* %1, i64 %104
%106 = load float, float* %105
%107 = getelementptr inbounds float, float* %12, i64 %99
store float %106, float* %107
%108 = add nuw nsw i64 %90, 2
%109 = icmp eq i64 %108, %20
br i1 %109, label %110, label %89
110: ; preds = %85, %89, %68, %3
%111 = tail call i32 @FFT(i32 %4, i32 0, float* %9, float* %12, float* %15, float* %17)
%112 = fmul float %7, 5.000000e-01
%113 = tail call i64 @sin(float %112)
%114 = sitofp i64 %113 to float
%115 = fpext float %114 to double
%116 = fmul double %115, -2.000000e+00
%117 = fmul double %116, %115
%118 = fptrunc double %117 to float
%119 = tail call i64 @sin(float %7)
%120 = sdiv i32 %0, 4
%121 = icmp sgt i32 %0, 7
br i1 %121, label %122, label %179
122: ; preds = %110
%123 = sitofp i64 %119 to float
%124 = fadd float %118, 1.000000e+00
%125 = sext i32 %4 to i64
%126 = call i32 @llvm.smax.i32(i32 %120, i32 2)
%127 = zext i32 %126 to i64
%128 = insertelement <2 x float> poison, float %123, i64 0
%129 = insertelement <2 x float> %128, float %124, i64 1
%130 = insertelement <2 x float> poison, float %118, i64 0
%131 = shufflevector <2 x float> %130, <2 x float> poison, <2 x i32> zeroinitializer
%132 = shufflevector <2 x float> %128, <2 x float> poison, <2 x i32> zeroinitializer
br label %133
133: ; preds = %122, %133
%134 = phi i64 [ 1, %122 ], [ %177, %133 ]
%135 = phi <2 x float> [ %129, %122 ], [ %176, %133 ]
%136 = sub nsw i64 %125, %134
%137 = getelementptr inbounds float, float* %15, i64 %134
%138 = load float, float* %137
%139 = getelementptr inbounds float, float* %15, i64 %136
%140 = load float, float* %139
%141 = fadd float %138, %140
%142 = fmul float %141, 5.000000e-01
%143 = getelementptr inbounds float, float* %17, i64 %134
%144 = load float, float* %143
%145 = getelementptr inbounds float, float* %17, i64 %136
%146 = load float, float* %145
%147 = fsub float %144, %146
%148 = fmul float %147, 5.000000e-01
%149 = fadd float %144, %146
%150 = fmul float %149, 5.000000e-01
%151 = fsub float %138, %140
%152 = fmul float %151, -5.000000e-01
%153 = extractelement <2 x float> %135, i64 1
%154 = tail call float @llvm.fmuladd.f32(float %153, float %150, float %142)
%155 = extractelement <2 x float> %135, i64 0
%156 = fneg float %155
%157 = tail call float @llvm.fmuladd.f32(float %156, float %152, float %154)
%158 = tail call float @llvm.fmuladd.f32(float %153, float %152, float %148)
%159 = tail call float @llvm.fmuladd.f32(float %155, float %150, float %158)
%160 = fmul float %159, %159
%161 = tail call float @llvm.fmuladd.f32(float %157, float %157, float %160)
%162 = getelementptr inbounds float, float* %2, i64 %134
store float %161, float* %162
%163 = fneg float %153
%164 = tail call float @llvm.fmuladd.f32(float %163, float %150, float %142)
%165 = tail call float @llvm.fmuladd.f32(float %155, float %152, float %164)
%166 = fneg float %148
%167 = tail call float @llvm.fmuladd.f32(float %153, float %152, float %166)
%168 = tail call float @llvm.fmuladd.f32(float %155, float %150, float %167)
%169 = fmul float %168, %168
%170 = tail call float @llvm.fmuladd.f32(float %165, float %165, float %169)
%171 = getelementptr inbounds float, float* %2, i64 %136
store float %170, float* %171
%172 = insertelement <2 x float> poison, float %153, i64 0
%173 = insertelement <2 x float> %172, float %156, i64 1
%174 = fmul <2 x float> %173, %132
%175 = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %135, <2 x float> %131, <2 x float> %174)
%176 = fadd <2 x float> %135, %175
%177 = add nuw nsw i64 %134, 1
%178 = icmp eq i64 %177, %127
br i1 %178, label %179, label %133
179: ; preds = %133, %110
%180 = load float, float* %15
%181 = load float, float* %17
%182 = fadd float %180, %181
%183 = fsub float %180, %181
%184 = fmul float %183, %183
%185 = tail call float @llvm.fmuladd.f32(float %182, float %182, float %184)
store float %185, float* %2
%186 = sext i32 %120 to i64
%187 = getelementptr inbounds float, float* %15, i64 %186
%188 = load float, float* %187
%189 = getelementptr inbounds float, float* %17, i64 %186
%190 = load float, float* %189
%191 = fmul float %190, %190
%192 = tail call float @llvm.fmuladd.f32(float %188, float %188, float %191)
%193 = getelementptr inbounds float, float* %2, i64 %186
store float %192, float* %193
%194 = tail call i32 @free(float* %9)
%195 = tail call i32 @free(float* %12)
%196 = tail call i32 @free(float* %15)
%197 = tail call i32 @free(float* %17)
ret void
}