#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 */
unsigned int atoi(char *);
int /*<<< orphan*/ check_FP(float, float);
float cos(float);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fft_float(unsigned int, int, float *, float *, float *,
                             float *);
int /*<<< orphan*/ fft_float_StrictFP(unsigned int, int, float *, float *,
                                      float *, float *);
int /*<<< orphan*/ free(float *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int rand();
float sin(float);
int /*<<< orphan*/ srand(int);
int /*<<< orphan*/ strncmp(char *, char *, int);
int main(int argc, char *argv[]) {
  unsigned MAXSIZE;
  unsigned MAXWAVES;
  unsigned i, j;
  float *RealIn;
  float *ImagIn;
  float *RealOut;
  float *ImagOut;
  float *RealOut_StrictFP;
  float *ImagOut_StrictFP;
  float *coeff;
  float *amp;
  int invfft = 0;
  if (argc < 3) {
    printf("Usage: fft <waves> <length> -i\n");
    printf("-i performs an inverse fft\n");
    printf("make <waves> random sinusoids");
    printf("<length> is the number of samples\n");
    exit(-1);
  } else if (argc == 4)
    invfft = !strncmp(argv[3], "-i", 2);
  MAXSIZE = atoi(argv[2]);
  MAXWAVES = atoi(argv[1]);
  srand(1);
  RealIn = (float *)malloc(sizeof(float) * MAXSIZE);
  ImagIn = (float *)malloc(sizeof(float) * MAXSIZE);
  RealOut = (float *)malloc(sizeof(float) * MAXSIZE);
  ImagOut = (float *)malloc(sizeof(float) * MAXSIZE);
  RealOut_StrictFP = (float *)malloc(sizeof(float) * MAXSIZE);
  ImagOut_StrictFP = (float *)malloc(sizeof(float) * MAXSIZE);
  coeff = (float *)malloc(sizeof(float) * MAXWAVES);
  amp = (float *)malloc(sizeof(float) * MAXWAVES);
  for (i = 0; i < MAXWAVES; i++) {
    coeff[i] = i % 1000;
    amp[i] = i % 1000;
  }
  for (i = 0; i < MAXSIZE; i++) {
    RealIn[i] = 0;
    for (j = 0; j < MAXWAVES; j++) {
      if (rand() % 2) {
        RealIn[i] += coeff[j] * cos(amp[j] * i);
      } else {
        RealIn[i] += coeff[j] * sin(amp[j] * i);
      }
      ImagIn[i] = 0;
    }
  }
  fft_float(MAXSIZE, invfft, RealIn, ImagIn, RealOut, ImagOut);
  fft_float_StrictFP(MAXSIZE, invfft, RealIn, ImagIn, RealOut_StrictFP,
                     ImagOut_StrictFP);
  printf("RealOut:\n");
  for (i = 0; i < MAXSIZE; i++) {
    if (!check_FP(RealOut[i], RealOut_StrictFP[i]))
      return 1;
    printf("%f \t", RealOut_StrictFP[i]);
  }
  printf("\n");
  printf("ImagOut:\n");
  for (i = 0; i < MAXSIZE; i++) {
    if (!check_FP(ImagOut[i], ImagOut_StrictFP[i]))
      return 1;
    printf("%f \t", ImagOut_StrictFP[i]);
  }
  printf("\n");
  free(RealIn);
  free(ImagIn);
  free(RealOut);
  free(ImagOut);
  free(RealOut_StrictFP);
  free(ImagOut_StrictFP);
  free(coeff);
  free(amp);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x64(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    1239 <main+0x69>
lea    0xe02(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe14(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe22(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe32(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0xffffffff,%edi
call   10d0 <exit@plt>
cmpl   $0x4,-0x8(%rbp)
jne    126c <main+0x9c>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
lea    0xe2b(%rip),%rsi
mov    $0x2,%edx
call   1050 <strncmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x64(%rbp)
jmp    1271 <main+0xa1>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   10c0 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10c0 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    $0x1,%edi
call   1070 <srand@plt>
mov    -0x14(%rbp),%eax
shl    $0x2,%rax
mov    %eax,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x14(%rbp),%eax
shl    $0x2,%rax
mov    %eax,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x30(%rbp)
mov    -0x14(%rbp),%eax
shl    $0x2,%rax
mov    %eax,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x38(%rbp)
mov    -0x14(%rbp),%eax
shl    $0x2,%rax
mov    %eax,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x40(%rbp)
mov    -0x14(%rbp),%eax
shl    $0x2,%rax
mov    %eax,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x48(%rbp)
mov    -0x14(%rbp),%eax
shl    $0x2,%rax
mov    %eax,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x50(%rbp)
mov    -0x18(%rbp),%eax
shl    $0x2,%rax
mov    %eax,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x58(%rbp)
mov    -0x18(%rbp),%eax
shl    $0x2,%rax
mov    %eax,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x60(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jae    139d <main+0x1cd>
mov    -0x1c(%rbp),%eax
mov    %eax,%ecx
mov    %ecx,%eax
imul   $0x10624dd3,%rcx,%rdx
shr    $0x26,%rdx
imul   $0x3e8,%edx,%edx
sub    %edx,%eax
cvtsi2ss %eax,%xmm0
mov    -0x58(%rbp),%rax
movss  %xmm0,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
mov    %eax,%ecx
mov    %ecx,%eax
imul   $0x10624dd3,%rcx,%rcx
shr    $0x26,%rcx
imul   $0x3e8,%ecx,%ecx
sub    %ecx,%eax
cvtsi2ss %eax,%xmm0
mov    -0x60(%rbp),%rax
mov    -0x1c(%rbp),%ecx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1332 <main+0x162>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jae    14b7 <main+0x2e7>
mov    -0x28(%rbp),%rax
mov    -0x1c(%rbp),%ecx
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x18(%rbp),%eax
jae    14a4 <main+0x2d4>
mov    $0x0,%al
call   10f0 <rand@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     143b <main+0x26b>
mov    -0x58(%rbp),%rax
mov    -0x20(%rbp),%ecx
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x68(%rbp)
mov    -0x60(%rbp),%rax
movss  (%rax,%rcx,4),%xmm0
mov    -0x1c(%rbp),%eax
cvtsi2ss %rax,%xmm1
mulss  %xmm1,%xmm0
call   10b0 <cos@plt>
movaps %xmm0,%xmm2
movss  -0x68(%rbp),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x1c(%rbp),%ecx
movss  (%rax,%rcx,4),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,(%rax,%rcx,4)
jmp    1487 <main+0x2b7>
mov    -0x58(%rbp),%rax
mov    -0x20(%rbp),%ecx
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x6c(%rbp)
mov    -0x60(%rbp),%rax
movss  (%rax,%rcx,4),%xmm0
mov    -0x1c(%rbp),%eax
cvtsi2ss %rax,%xmm1
mulss  %xmm1,%xmm0
call   1080 <sin@plt>
movaps %xmm0,%xmm2
movss  -0x6c(%rbp),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x1c(%rbp),%ecx
movss  (%rax,%rcx,4),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x30(%rbp),%rax
mov    -0x1c(%rbp),%ecx
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    13c6 <main+0x1f6>
jmp    14a9 <main+0x2d9>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    13a4 <main+0x1d4>
mov    -0x14(%rbp),%edi
mov    -0x64(%rbp),%esi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    -0x38(%rbp),%r8
mov    -0x40(%rbp),%r9
call   1090 <fft_float@plt>
mov    -0x14(%rbp),%edi
mov    -0x64(%rbp),%esi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    -0x48(%rbp),%r8
mov    -0x50(%rbp),%r9
call   10e0 <fft_float_StrictFP@plt>
lea    0xb8c(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jae    156c <main+0x39c>
mov    -0x38(%rbp),%rax
mov    -0x1c(%rbp),%ecx
movss  (%rax,%rcx,4),%xmm0
mov    -0x48(%rbp),%rax
mov    -0x1c(%rbp),%ecx
movss  (%rax,%rcx,4),%xmm1
call   1040 <check_FP@plt>
cmp    $0x0,%eax
jne    1540 <main+0x370>
movl   $0x1,-0x4(%rbp)
jmp    1656 <main+0x486>
mov    -0x48(%rbp),%rax
mov    -0x1c(%rbp),%ecx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xb33(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1502 <main+0x332>
lea    0xb24(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xb0e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jae    15f9 <main+0x429>
mov    -0x40(%rbp),%rax
mov    -0x1c(%rbp),%ecx
movss  (%rax,%rcx,4),%xmm0
mov    -0x50(%rbp),%rax
mov    -0x1c(%rbp),%ecx
movss  (%rax,%rcx,4),%xmm1
call   1040 <check_FP@plt>
cmp    $0x0,%eax
jne    15cd <main+0x3fd>
movl   $0x1,-0x4(%rbp)
jmp    1656 <main+0x486>
mov    -0x50(%rbp),%rax
mov    -0x1c(%rbp),%ecx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xaa6(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    158f <main+0x3bf>
lea    0xa97(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
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>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
mov    -0x60(%rbp),%rdi
call   1030 <free@plt>
xor    %edi,%edi
call   10d0 <exit@plt>
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
cmp    $0x2,%edi
jle    1765 <main+0x575>
mov    %rsi,%rbx
xor    %r14d,%r14d
cmp    $0x4,%edi
jne    1230 <main+0x40>
mov    0x18(%rbx),%rdi
lea    0xe84(%rip),%rsi
mov    $0x2,%edx
call   1060 <strncmp@plt>
xor    %r14d,%r14d
test   %eax,%eax
sete   %r14b
mov    0x10(%rbx),%rdi
call   10e0 <atoi@plt>
mov    %eax,%ebp
mov    0x8(%rbx),%rdi
call   10e0 <atoi@plt>
mov    %eax,%r12d
mov    $0x1,%edi
call   1090 <srand@plt>
mov    %rbp,0x38(%rsp)
lea    0x0(,%rbp,4),%ebp
mov    %ebp,%edi
call   10c0 <malloc@plt>
mov    %rax,%rbx
mov    %ebp,%edi
call   10c0 <malloc@plt>
mov    %rax,0x30(%rsp)
mov    %ebp,%edi
call   10c0 <malloc@plt>
mov    %rax,0x20(%rsp)
mov    %ebp,%edi
call   10c0 <malloc@plt>
mov    %rax,0x28(%rsp)
mov    %ebp,%edi
call   10c0 <malloc@plt>
mov    %rax,0x8(%rsp)
mov    %ebp,%edi
call   10c0 <malloc@plt>
mov    %rax,0x18(%rsp)
lea    0x0(,%r12,4),%ebp
mov    %ebp,%edi
call   10c0 <malloc@plt>
mov    %rax,%r15
mov    %ebp,%edi
call   10c0 <malloc@plt>
mov    %rax,%r13
mov    %r12d,%ebp
mov    %r12,0x50(%rsp)
test   %r12d,%r12d
je     14ca <main+0x2da>
mov    %ebp,%eax
cmpl   $0x8,0x50(%rsp)
jb     12fa <main+0x10a>
lea    0x0(,%rax,4),%rcx
add    %r13,%rcx
cmp    %rcx,%r15
jae    13c1 <main+0x1d1>
lea    (%r15,%rax,4),%rcx
cmp    %rcx,%r13
jae    13c1 <main+0x1d1>
xor    %ecx,%ecx
mov    %rcx,%rdx
not    %rdx
test   $0x1,%al
je     1333 <main+0x143>
imul   $0x10624dd3,%rcx,%rsi
shr    $0x26,%rsi
imul   $0x3e8,%esi,%esi
mov    %ecx,%edi
sub    %esi,%edi
xorps  %xmm0,%xmm0
cvtsi2ss %edi,%xmm0
movss  %xmm0,(%r15,%rcx,4)
movss  %xmm0,0x0(%r13,%rcx,4)
or     $0x1,%rcx
neg    %rax
cmp    %rax,%rdx
je     14ca <main+0x2da>
lea    0x1(%rcx),%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ecx,%esi
imul   $0x10624dd3,%rsi,%rsi
shr    $0x26,%rsi
imul   $0x3e8,%esi,%esi
mov    %ecx,%edi
sub    %esi,%edi
mov    %edx,%esi
imul   $0x10624dd3,%rsi,%rsi
shr    $0x26,%rsi
imul   $0xfffffc18,%esi,%esi
xorps  %xmm0,%xmm0
cvtsi2ss %rdi,%xmm0
add    %edx,%esi
xorps  %xmm1,%xmm1
cvtsi2ss %rsi,%xmm1
movss  %xmm0,-0x4(%r15,%rdx,4)
movss  %xmm0,-0x4(%r13,%rdx,4)
movss  %xmm1,(%r15,%rdx,4)
movss  %xmm1,0x0(%r13,%rdx,4)
lea    (%rax,%rdx,1),%rsi
add    $0x2,%rsi
add    $0x2,%rdx
add    $0x2,%ecx
cmp    $0x1,%rsi
jne    1350 <main+0x160>
jmp    14ca <main+0x2da>
mov    %eax,%ecx
and    $0xfffffff8,%ecx
lea    0x0(,%rax,4),%rdx
and    $0xffffffffffffffe0,%rdx
movdqa 0xc26(%rip),%xmm0
xor    %esi,%esi
movdqa 0xc2b(%rip),%xmm8
movdqa 0xc33(%rip),%xmm2
movdqa 0xc3b(%rip),%xmm3
movdqa 0xc43(%rip),%xmm4
nopl   (%rax)
movdqa %xmm0,%xmm5
paddd  %xmm8,%xmm5
movdqa %xmm0,%xmm6
pmuludq %xmm2,%xmm6
pshufd $0xed,%xmm6,%xmm6
pshufd $0xf5,%xmm0,%xmm7
pmuludq %xmm2,%xmm7
pshufd $0xed,%xmm7,%xmm7
punpckldq %xmm7,%xmm6
psrld  $0x6,%xmm6
pshufd $0xf5,%xmm6,%xmm7
pmuludq %xmm3,%xmm6
pshufd $0xe8,%xmm6,%xmm6
pmuludq %xmm3,%xmm7
pshufd $0xe8,%xmm7,%xmm7
punpckldq %xmm7,%xmm6
movdqa %xmm0,%xmm7
psubd  %xmm6,%xmm7
movdqa %xmm5,%xmm6
pmuludq %xmm2,%xmm6
pshufd $0xed,%xmm6,%xmm6
pshufd $0xf5,%xmm5,%xmm1
pmuludq %xmm2,%xmm1
pshufd $0xed,%xmm1,%xmm1
punpckldq %xmm1,%xmm6
psrld  $0x6,%xmm6
pshufd $0xf5,%xmm6,%xmm1
pmuludq %xmm3,%xmm6
pshufd $0xe8,%xmm6,%xmm6
pmuludq %xmm3,%xmm1
pshufd $0xe8,%xmm1,%xmm1
punpckldq %xmm1,%xmm6
psubd  %xmm6,%xmm5
cvtdq2ps %xmm7,%xmm1
cvtdq2ps %xmm5,%xmm5
movups %xmm1,(%r15,%rsi,1)
movups %xmm5,0x10(%r15,%rsi,1)
movups %xmm1,0x0(%r13,%rsi,1)
movups %xmm5,0x10(%r13,%rsi,1)
paddd  %xmm4,%xmm0
add    $0x20,%rsi
cmp    %rsi,%rdx
jne    1400 <main+0x210>
cmp    %rax,%rcx
jne    12fc <main+0x10c>
mov    %r14d,0x14(%rsp)
mov    0x38(%rsp),%r14
mov    %r14d,%eax
mov    %rax,0x40(%rsp)
test   %r14d,%r14d
je     1643 <main+0x453>
xor    %r12d,%r12d
jmp    14ff <main+0x30f>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r12
cmp    0x40(%rsp),%r12
je     158c <main+0x39c>
movl   $0x0,(%rbx,%r12,4)
cmpl   $0x0,0x50(%rsp)
je     14f0 <main+0x300>
mov    %r12d,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
movss  %xmm0,0x48(%rsp)
xor    %r14d,%r14d
jmp    1561 <main+0x371>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
call   10a0 <sin@plt>
movss  0x4c(%rsp),%xmm1
mulss  %xmm0,%xmm1
addss  (%rbx,%r12,4),%xmm1
movss  %xmm1,(%rbx,%r12,4)
mov    0x30(%rsp),%rax
movl   $0x0,(%rax,%r12,4)
add    $0x1,%r14
cmp    %r14,%rbp
je     14f0 <main+0x300>
xor    %eax,%eax
call   1110 <rand@plt>
movss  (%r15,%r14,4),%xmm0
movss  %xmm0,0x4c(%rsp)
movss  0x0(%r13,%r14,4),%xmm0
mulss  0x48(%rsp),%xmm0
test   $0x1,%al
je     1530 <main+0x340>
call   10d0 <cos@plt>
jmp    1535 <main+0x345>
mov    0x38(%rsp),%r14
mov    %r14d,%edi
mov    0x14(%rsp),%r12d
mov    %r12d,%esi
mov    %rbx,%rdx
mov    0x30(%rsp),%rbp
mov    %rbp,%rcx
mov    0x20(%rsp),%r8
mov    0x28(%rsp),%r9
call   10b0 <fft_float@plt>
mov    %r14d,%edi
mov    %r12d,%esi
mov    %rbx,%rdx
mov    %rbp,%rcx
mov    0x8(%rsp),%r8
mov    0x18(%rsp),%r9
call   1100 <fft_float_StrictFP@plt>
lea    0xa9b(%rip),%rdi
call   1070 <puts@plt>
test   %r14d,%r14d
je     17a1 <main+0x5b1>
xor    %ebp,%ebp
lea    0xa7f(%rip),%r14
mov    0x8(%rsp),%r12
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x20(%rsp),%rax
movss  (%rax,%rbp,4),%xmm0
movss  (%r12,%rbp,4),%xmm1
call   1050 <check_FP@plt>
test   %eax,%eax
je     1751 <main+0x561>
mov    0x8(%rsp),%r12
movss  (%r12,%rbp,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1080 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,0x40(%rsp)
jne    1600 <main+0x410>
jmp    168f <main+0x49f>
mov    %r14d,%edi
mov    0x14(%rsp),%r12d
mov    %r12d,%esi
mov    %rbx,%rdx
mov    0x30(%rsp),%rbp
mov    %rbp,%rcx
mov    0x20(%rsp),%r8
mov    0x28(%rsp),%r9
call   10b0 <fft_float@plt>
mov    %r14d,%edi
mov    %r12d,%esi
mov    %rbx,%rdx
mov    %rbp,%rcx
mov    0x8(%rsp),%r8
mov    0x18(%rsp),%r9
call   1100 <fft_float_StrictFP@plt>
lea    0x9e9(%rip),%rdi
call   1070 <puts@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
lea    0x9dc(%rip),%rdi
call   1070 <puts@plt>
cmpl   $0x0,0x38(%rsp)
mov    0x18(%rsp),%r12
je     16f8 <main+0x508>
xor    %ebp,%ebp
lea    0x9b4(%rip),%r14
nopw   0x0(%rax,%rax,1)
mov    0x28(%rsp),%rax
movss  (%rax,%rbp,4),%xmm0
movss  (%r12,%rbp,4),%xmm1
call   1050 <check_FP@plt>
test   %eax,%eax
je     1751 <main+0x561>
movss  (%r12,%rbp,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1080 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,0x40(%rsp)
jne    16c0 <main+0x4d0>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    0x30(%rsp),%rdi
call   1030 <free@plt>
mov    0x20(%rsp),%rdi
call   1030 <free@plt>
mov    0x28(%rsp),%rdi
call   1030 <free@plt>
mov    0x8(%rsp),%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    %r13,%rdi
call   1030 <free@plt>
xor    %edi,%edi
call   10f0 <exit@plt>
mov    $0x1,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x919(%rip),%rdi
call   1070 <puts@plt>
lea    0x92c(%rip),%rdi
call   1070 <puts@plt>
lea    0x8cc(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
lea    0x92d(%rip),%rdi
call   1070 <puts@plt>
mov    $0xffffffff,%edi
call   10f0 <exit@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
lea    0x8ca(%rip),%rdi
call   1070 <puts@plt>
mov    0x18(%rsp),%r12
jmp    16f8 <main+0x508>

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

LLVM IR (-O2):
@.str.2 = [30 x i8] c"make <waves> random sinusoids\00"
@.str.4 = [3 x i8] c"-i\00"
@.str.6 = [5 x i8] c"%f \09\00"
@str = [9 x i8] c"RealOut:\00"
@str.9 = [9 x i8] c"ImagOut:\00"
@str.10 = [31 x i8] c"Usage: fft <waves> <length> -i\00"
@str.11 = [27 x i8] c"-i performs an inverse fft\00"
@str.12 = [34 x i8] c"<length> is the number of samples\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 3
br i1 %3, label %4, label %10
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.10, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.11, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.12, i64 0, i64 0))
%9 = tail call i32 @exit(i32 -1)
unreachable
10: ; preds = %2
%11 = icmp eq i32 %0, 4
br i1 %11, label %12, label %18
12: ; preds = %10
%13 = getelementptr inbounds i8*, i8** %1, i64 3
%14 = load i8*, i8** %13
%15 = tail call i32 @strncmp(i8* %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 2)
%16 = icmp eq i32 %15, 0
%17 = zext i1 %16 to i32
br label %18
18: ; preds = %10, %12
%19 = phi i32 [ %17, %12 ], [ 0, %10 ]
%20 = getelementptr inbounds i8*, i8** %1, i64 2
%21 = load i8*, i8** %20
%22 = tail call i32 @atoi(i8* %21)
%23 = getelementptr inbounds i8*, i8** %1, i64 1
%24 = load i8*, i8** %23
%25 = tail call i32 @atoi(i8* %24)
%26 = tail call i32 @srand(i32 1)
%27 = shl i32 %22, 2
%28 = tail call i64 @malloc(i32 %27)
%29 = inttoptr i64 %28 to float*
%30 = tail call i64 @malloc(i32 %27)
%31 = inttoptr i64 %30 to float*
%32 = tail call i64 @malloc(i32 %27)
%33 = inttoptr i64 %32 to float*
%34 = tail call i64 @malloc(i32 %27)
%35 = inttoptr i64 %34 to float*
%36 = tail call i64 @malloc(i32 %27)
%37 = inttoptr i64 %36 to float*
%38 = tail call i64 @malloc(i32 %27)
%39 = inttoptr i64 %38 to float*
%40 = shl i32 %25, 2
%41 = tail call i64 @malloc(i32 %40)
%42 = inttoptr i64 %41 to float*
%43 = inttoptr i64 %41 to i8*
%44 = tail call i64 @malloc(i32 %40)
%45 = inttoptr i64 %44 to float*
%46 = inttoptr i64 %44 to i8*
%47 = icmp eq i32 %25, 0
br i1 %47, label %98, label %48
48: ; preds = %18
%49 = zext i32 %25 to i64
%50 = icmp ult i32 %25, 8
br i1 %50, label %82, label %51
51: ; preds = %48
%52 = getelementptr float, float* %42, i64 %49
%53 = bitcast float* %52 to i8*
%54 = getelementptr float, float* %45, i64 %49
%55 = bitcast float* %54 to i8*
%56 = icmp ult i8* %43, %55
%57 = icmp ult i8* %46, %53
%58 = and i1 %56, %57
br i1 %58, label %82, label %59
59: ; preds = %51
%60 = and i64 %49, 4294967288
br label %61
61: ; preds = %61, %59
%62 = phi i64 [ 0, %59 ], [ %77, %61 ]
%63 = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %59 ], [ %78, %61 ]
%64 = add <4 x i32> %63, <i32 4, i32 4, i32 4, i32 4>
%65 = urem <4 x i32> %63, <i32 1000, i32 1000, i32 1000, i32 1000>
%66 = urem <4 x i32> %64, <i32 1000, i32 1000, i32 1000, i32 1000>
%67 = uitofp <4 x i32> %65 to <4 x float>
%68 = uitofp <4 x i32> %66 to <4 x float>
%69 = getelementptr inbounds float, float* %42, i64 %62
%70 = bitcast float* %69 to <4 x float>*
store <4 x float> %67, <4 x float>* %70
%71 = getelementptr inbounds float, float* %69, i64 4
%72 = bitcast float* %71 to <4 x float>*
store <4 x float> %68, <4 x float>* %72
%73 = getelementptr inbounds float, float* %45, i64 %62
%74 = bitcast float* %73 to <4 x float>*
store <4 x float> %67, <4 x float>* %74
%75 = getelementptr inbounds float, float* %73, i64 4
%76 = bitcast float* %75 to <4 x float>*
store <4 x float> %68, <4 x float>* %76
%77 = add nuw i64 %62, 8
%78 = add <4 x i32> %63, <i32 8, i32 8, i32 8, i32 8>
%79 = icmp eq i64 %77, %60
br i1 %79, label %80, label %61
80: ; preds = %61
%81 = icmp eq i64 %60, %49
br i1 %81, label %98, label %82
82: ; preds = %51, %48, %80
%83 = phi i64 [ 0, %51 ], [ 0, %48 ], [ %60, %80 ]
%84 = xor i64 %83, -1
%85 = and i64 %49, 1
%86 = icmp eq i64 %85, 0
br i1 %86, label %94, label %87
87: ; preds = %82
%88 = trunc i64 %83 to i32
%89 = urem i32 %88, 1000
%90 = uitofp i32 %89 to float
%91 = getelementptr inbounds float, float* %42, i64 %83
store float %90, float* %91
%92 = getelementptr inbounds float, float* %45, i64 %83
store float %90, float* %92
%93 = or i64 %83, 1
br label %94
94: ; preds = %87, %82
%95 = phi i64 [ %83, %82 ], [ %93, %87 ]
%96 = sub nsw i64 0, %49
%97 = icmp eq i64 %84, %96
br i1 %97, label %98, label %103
98: ; preds = %94, %103, %80, %18
%99 = icmp eq i32 %22, 0
br i1 %99, label %168, label %100
100: ; preds = %98
%101 = zext i32 %22 to i64
%102 = zext i32 %25 to i64
br label %118
103: ; preds = %94, %103
%104 = phi i64 [ %116, %103 ], [ %95, %94 ]
%105 = trunc i64 %104 to i32
%106 = urem i32 %105, 1000
%107 = uitofp i32 %106 to float
%108 = getelementptr inbounds float, float* %42, i64 %104
store float %107, float* %108
%109 = getelementptr inbounds float, float* %45, i64 %104
store float %107, float* %109
%110 = add nuw nsw i64 %104, 1
%111 = trunc i64 %110 to i32
%112 = urem i32 %111, 1000
%113 = uitofp i32 %112 to float
%114 = getelementptr inbounds float, float* %42, i64 %110
store float %113, float* %114
%115 = getelementptr inbounds float, float* %45, i64 %110
store float %113, float* %115
%116 = add nuw nsw i64 %104, 2
%117 = icmp eq i64 %116, %49
br i1 %117, label %98, label %103
118: ; preds = %100, %145
%119 = phi i64 [ 0, %100 ], [ %146, %145 ]
%120 = getelementptr inbounds float, float* %29, i64 %119
store float 0.000000e+00, float* %120
br i1 %47, label %145, label %121
121: ; preds = %118
%122 = trunc i64 %119 to i32
%123 = uitofp i32 %122 to float
%124 = getelementptr inbounds float, float* %31, i64 %119
br label %125
125: ; preds = %121, %139
%126 = phi i64 [ 0, %121 ], [ %143, %139 ]
%127 = tail call i32 (...) @rand()
%128 = and i32 %127, 1
%129 = icmp eq i32 %128, 0
%130 = getelementptr inbounds float, float* %42, i64 %126
%131 = load float, float* %130
%132 = getelementptr inbounds float, float* %45, i64 %126
%133 = load float, float* %132
%134 = fmul float %133, %123
br i1 %129, label %137, label %135
135: ; preds = %125
%136 = tail call float @cos(float %134)
br label %139
137: ; preds = %125
%138 = tail call float @sin(float %134)
br label %139
139: ; preds = %137, %135
%140 = phi float [ %138, %137 ], [ %136, %135 ]
%141 = load float, float* %120
%142 = tail call float @llvm.fmuladd.f32(float %131, float %140, float %141)
store float %142, float* %120
store float 0.000000e+00, float* %124
%143 = add nuw nsw i64 %126, 1
%144 = icmp eq i64 %143, %102
br i1 %144, label %145, label %125
145: ; preds = %139, %118
%146 = add nuw nsw i64 %119, 1
%147 = icmp eq i64 %146, %101
br i1 %147, label %148, label %118
148: ; preds = %145
%149 = tail call i32 @fft_float(i32 %22, i32 %19, float* %29, float* %31, float* %33, float* %35)
%150 = tail call i32 @fft_float_StrictFP(i32 %22, i32 %19, float* %29, float* %31, float* %37, float* %39)
%151 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
br i1 %99, label %191, label %152
152: ; preds = %148
%153 = zext i32 %22 to i64
br label %154
154: ; preds = %152, %162
%155 = phi i64 [ 0, %152 ], [ %166, %162 ]
%156 = getelementptr inbounds float, float* %33, i64 %155
%157 = load float, float* %156
%158 = getelementptr inbounds float, float* %37, i64 %155
%159 = load float, float* %158
%160 = tail call i32 @check_FP(float %157, float %159)
%161 = icmp eq i32 %160, 0
br i1 %161, label %205, label %162
162: ; preds = %154
%163 = load float, float* %158
%164 = fpext float %163 to double
%165 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), double %164)
%166 = add nuw nsw i64 %155, 1
%167 = icmp eq i64 %166, %153
br i1 %167, label %172, label %154
168: ; preds = %98
%169 = tail call i32 @fft_float(i32 %22, i32 %19, float* %29, float* %31, float* %33, float* %35)
%170 = tail call i32 @fft_float_StrictFP(i32 %22, i32 %19, float* %29, float* %31, float* %37, float* %39)
%171 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
br label %172
172: ; preds = %162, %168
%173 = tail call i32 @putchar(i32 10)
%174 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.9, i64 0, i64 0))
br i1 %99, label %194, label %175
175: ; preds = %172
%176 = zext i32 %22 to i64
br label %177
177: ; preds = %175, %185
%178 = phi i64 [ 0, %175 ], [ %189, %185 ]
%179 = getelementptr inbounds float, float* %35, i64 %178
%180 = load float, float* %179
%181 = getelementptr inbounds float, float* %39, i64 %178
%182 = load float, float* %181
%183 = tail call i32 @check_FP(float %180, float %182)
%184 = icmp eq i32 %183, 0
br i1 %184, label %205, label %185
185: ; preds = %177
%186 = load float, float* %181
%187 = fpext float %186 to double
%188 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), double %187)
%189 = add nuw nsw i64 %178, 1
%190 = icmp eq i64 %189, %176
br i1 %190, label %194, label %177
191: ; preds = %148
%192 = tail call i32 @putchar(i32 10)
%193 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.9, i64 0, i64 0))
br label %194
194: ; preds = %185, %191, %172
%195 = tail call i32 @putchar(i32 10)
%196 = tail call i32 @free(float* %29)
%197 = tail call i32 @free(float* %31)
%198 = tail call i32 @free(float* %33)
%199 = tail call i32 @free(float* %35)
%200 = tail call i32 @free(float* %37)
%201 = tail call i32 @free(float* %39)
%202 = tail call i32 @free(float* %42)
%203 = tail call i32 @free(float* %45)
%204 = tail call i32 @exit(i32 0)
unreachable
205: ; preds = %154, %177
ret i32 1
}