#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 */
float cos(float);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fft_float(unsigned int, int, float *, float *, float *,
                             float *);
int /*<<< orphan*/ free(float *);
int /*<<< orphan*/ initlogger();
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *);
int rand();
int /*<<< orphan*/ resetlogger();
float sin(float);
int /*<<< orphan*/ srand(int);
int /*<<< orphan*/ stoplogger();
int main(int argc, char *argv[]) {
  unsigned MAXSIZE;
  unsigned MAXWAVES;
  unsigned i, j;
  float *RealIn;
  float *ImagIn;
  float *RealOut;
  float *ImagOut;
  float *coeff;
  float *amp;
  int invfft = 0;
  unsigned cycles = 0;
  initlogger();
  resetlogger();
  invfft = 1;
  MAXSIZE = 8192;
  MAXWAVES = 4;
  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);
  coeff = (float *)malloc(sizeof(float) * MAXWAVES);
  amp = (float *)malloc(sizeof(float) * MAXWAVES);
  for (i = 0; i < MAXWAVES; i++) {
    coeff[i] = rand() % 1000;
    amp[i] = rand() % 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);
  stoplogger();
  printf("RealOut:\n");
  printf("ImagOut:\n");
  free(RealIn);
  free(ImagIn);
  free(RealOut);
  free(ImagOut);
  free(coeff);
  free(amp);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x54(%rbp)
movl   $0x0,-0x58(%rbp)
mov    $0x0,%al
call   1060 <initlogger@plt>
mov    $0x0,%al
call   10d0 <resetlogger@plt>
movl   $0x1,-0x54(%rbp)
movl   $0x2000,-0x14(%rbp)
movl   $0x4,-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    -0x18(%rbp),%eax
shl    $0x2,%rax
mov    %eax,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x48(%rbp)
mov    -0x18(%rbp),%eax
shl    $0x2,%rax
mov    %eax,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x50(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jae    12dc <main+0x11c>
mov    $0x0,%al
call   10e0 <rand@plt>
mov    $0x3e8,%ecx
cltd
idiv   %ecx
cvtsi2ss %edx,%xmm0
mov    -0x48(%rbp),%rax
mov    -0x1c(%rbp),%ecx
movss  %xmm0,(%rax,%rcx,4)
mov    $0x0,%al
call   10e0 <rand@plt>
mov    $0x3e8,%ecx
cltd
idiv   %ecx
cvtsi2ss %edx,%xmm0
mov    -0x50(%rbp),%rax
mov    -0x1c(%rbp),%ecx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1284 <main+0xc4>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jae    13f6 <main+0x236>
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    13e3 <main+0x223>
mov    $0x0,%al
call   10e0 <rand@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     137a <main+0x1ba>
mov    -0x48(%rbp),%rax
mov    -0x20(%rbp),%ecx
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x5c(%rbp)
mov    -0x50(%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  -0x5c(%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    13c6 <main+0x206>
mov    -0x48(%rbp),%rax
mov    -0x20(%rbp),%ecx
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x60(%rbp)
mov    -0x50(%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  -0x60(%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    1305 <main+0x145>
jmp    13e8 <main+0x228>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    12e3 <main+0x123>
mov    -0x14(%rbp),%edi
mov    -0x54(%rbp),%esi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    -0x38(%rbp),%r8
mov    -0x40(%rbp),%r9
call   1090 <fft_float@plt>
mov    $0x0,%al
call   1040 <stoplogger@plt>
lea    0xbe1(%rip),%rdi
call   1050 <printf@plt>
lea    0xbdf(%rip),%rdi
call   1050 <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>
xor    %edi,%edi
call   10c0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
xor    %eax,%eax
call   1060 <initlogger@plt>
xor    %eax,%eax
call   10d0 <resetlogger@plt>
mov    $0x1,%edi
call   1070 <srand@plt>
mov    $0x8000,%edi
call   10a0 <malloc@plt>
mov    %rax,%rbx
mov    $0x8000,%edi
call   10a0 <malloc@plt>
mov    %rax,%r14
mov    $0x8000,%edi
call   10a0 <malloc@plt>
mov    %rax,0x10(%rsp)
mov    $0x8000,%edi
call   10a0 <malloc@plt>
mov    %rax,%r12
mov    $0x10,%edi
call   10a0 <malloc@plt>
mov    %rax,%r13
mov    $0x10,%edi
call   10a0 <malloc@plt>
mov    %rax,%rbp
xor    %eax,%eax
call   10e0 <rand@plt>
cltq
imul   $0x10624dd3,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rcx
add    %edx,%ecx
imul   $0x3e8,%ecx,%ecx
sub    %ecx,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,0x0(%r13)
xor    %eax,%eax
call   10e0 <rand@plt>
cltq
imul   $0x10624dd3,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rcx
add    %edx,%ecx
imul   $0x3e8,%ecx,%ecx
sub    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  %xmm0,0x0(%rbp)
xor    %eax,%eax
call   10e0 <rand@plt>
cltq
imul   $0x10624dd3,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rcx
add    %edx,%ecx
imul   $0x3e8,%ecx,%ecx
sub    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  %xmm0,0x4(%r13)
xor    %eax,%eax
call   10e0 <rand@plt>
cltq
imul   $0x10624dd3,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rcx
add    %edx,%ecx
imul   $0x3e8,%ecx,%ecx
sub    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  %xmm0,0x4(%rbp)
xor    %eax,%eax
call   10e0 <rand@plt>
cltq
imul   $0x10624dd3,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rcx
add    %edx,%ecx
imul   $0x3e8,%ecx,%ecx
sub    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  %xmm0,0x8(%r13)
xor    %eax,%eax
call   10e0 <rand@plt>
cltq
imul   $0x10624dd3,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rcx
add    %edx,%ecx
imul   $0x3e8,%ecx,%ecx
sub    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  %xmm0,0x8(%rbp)
xor    %eax,%eax
call   10e0 <rand@plt>
cltq
imul   $0x10624dd3,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rcx
add    %edx,%ecx
imul   $0x3e8,%ecx,%ecx
sub    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  %xmm0,0xc(%r13)
xor    %eax,%eax
call   10e0 <rand@plt>
cltq
imul   $0x10624dd3,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rcx
add    %edx,%ecx
imul   $0x3e8,%ecx,%ecx
sub    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  %xmm0,0xc(%rbp)
xor    %r15d,%r15d
jmp    1404 <main+0x244>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
call   1080 <sin@plt>
movss  0x8(%rsp),%xmm1
mulss  %xmm0,%xmm1
addss  (%rbx,%r15,4),%xmm1
movss  %xmm1,(%rbx,%r15,4)
movl   $0x0,(%r14,%r15,4)
add    $0x1,%r15
cmp    $0x2000,%r15
je     1543 <main+0x383>
movl   $0x0,(%rbx,%r15,4)
mov    %r15d,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
movss  %xmm0,0xc(%rsp)
xor    %eax,%eax
call   10e0 <rand@plt>
movss  0x0(%r13),%xmm1
movss  0x0(%rbp),%xmm0
mulss  0xc(%rsp),%xmm0
test   $0x1,%al
movss  %xmm1,0x8(%rsp)
jne    1450 <main+0x290>
call   1080 <sin@plt>
jmp    1455 <main+0x295>
cs nopw 0x0(%rax,%rax,1)
call   10b0 <cos@plt>
movss  0x8(%rsp),%xmm1
mulss  %xmm0,%xmm1
addss  (%rbx,%r15,4),%xmm1
movss  %xmm1,(%rbx,%r15,4)
movl   $0x0,(%r14,%r15,4)
xor    %eax,%eax
call   10e0 <rand@plt>
movss  0x4(%r13),%xmm1
movss  0x4(%rbp),%xmm0
mulss  0xc(%rsp),%xmm0
test   $0x1,%al
movss  %xmm1,0x8(%rsp)
jne    14a0 <main+0x2e0>
call   1080 <sin@plt>
jmp    14a5 <main+0x2e5>
nopl   0x0(%rax)
call   10b0 <cos@plt>
movss  0x8(%rsp),%xmm1
mulss  %xmm0,%xmm1
addss  (%rbx,%r15,4),%xmm1
movss  %xmm1,(%rbx,%r15,4)
movl   $0x0,(%r14,%r15,4)
xor    %eax,%eax
call   10e0 <rand@plt>
movss  0x8(%r13),%xmm1
movss  0x8(%rbp),%xmm0
mulss  0xc(%rsp),%xmm0
test   $0x1,%al
movss  %xmm1,0x8(%rsp)
jne    14f0 <main+0x330>
call   1080 <sin@plt>
jmp    14f5 <main+0x335>
nopl   0x0(%rax)
call   10b0 <cos@plt>
movss  0x8(%rsp),%xmm1
mulss  %xmm0,%xmm1
addss  (%rbx,%r15,4),%xmm1
movss  %xmm1,(%rbx,%r15,4)
movl   $0x0,(%r14,%r15,4)
xor    %eax,%eax
call   10e0 <rand@plt>
movss  0xc(%r13),%xmm1
movss  0xc(%rsp),%xmm0
mulss  0xc(%rbp),%xmm0
test   $0x1,%al
movss  %xmm1,0x8(%rsp)
je     13d0 <main+0x210>
call   10b0 <cos@plt>
jmp    13d5 <main+0x215>
mov    $0x2000,%edi
mov    $0x1,%esi
mov    %rbx,%rdx
mov    %r14,%rcx
mov    0x10(%rsp),%r15
mov    %r15,%r8
mov    %r12,%r9
call   1090 <fft_float@plt>
xor    %eax,%eax
call   1050 <stoplogger@plt>
lea    0xa8f(%rip),%rdi
call   1040 <puts@plt>
lea    0xa8c(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1030 <free@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
xor    %edi,%edi
call   10c0 <exit@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"RealOut:\0A\00"
@.str.1 = [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 i32
%17 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %16
store i32 0, i32* %17
%18 = call i32 (...) @initlogger()
%19 = call i32 (...) @resetlogger()
store i32 1, i32* %16
store i32 8192, i32* %6
store i32 4, i32* %7
%20 = call i32 @srand(i32 1)
%21 = load i32, i32* %6
%22 = zext i32 %21 to i64
%23 = mul i64 4, %22
%24 = trunc i64 %23 to i32
%25 = call i64 @malloc(i32 %24)
%26 = inttoptr i64 %25 to float*
store float* %26, float** %10
%27 = load i32, i32* %6
%28 = zext i32 %27 to i64
%29 = mul i64 4, %28
%30 = trunc i64 %29 to i32
%31 = call i64 @malloc(i32 %30)
%32 = inttoptr i64 %31 to float*
store float* %32, float** %11
%33 = load i32, i32* %6
%34 = zext i32 %33 to i64
%35 = mul i64 4, %34
%36 = trunc i64 %35 to i32
%37 = call i64 @malloc(i32 %36)
%38 = inttoptr i64 %37 to float*
store float* %38, float** %12
%39 = load i32, i32* %6
%40 = zext i32 %39 to i64
%41 = mul i64 4, %40
%42 = trunc i64 %41 to i32
%43 = call i64 @malloc(i32 %42)
%44 = inttoptr i64 %43 to float*
store float* %44, float** %13
%45 = load i32, i32* %7
%46 = zext i32 %45 to i64
%47 = mul i64 4, %46
%48 = trunc i64 %47 to i32
%49 = call i64 @malloc(i32 %48)
%50 = inttoptr i64 %49 to float*
store float* %50, float** %14
%51 = load i32, i32* %7
%52 = zext i32 %51 to i64
%53 = mul i64 4, %52
%54 = trunc i64 %53 to i32
%55 = call i64 @malloc(i32 %54)
%56 = inttoptr i64 %55 to float*
store float* %56, float** %15
store i32 0, i32* %8
br label %57
57: ; preds = %76, %2
%58 = load i32, i32* %8
%59 = load i32, i32* %7
%60 = icmp ult i32 %58, %59
br i1 %60, label %61, label %79
61: ; preds = %57
%62 = call i32 (...) @rand()
%63 = srem i32 %62, 1000
%64 = sitofp i32 %63 to float
%65 = load float*, float** %14
%66 = load i32, i32* %8
%67 = zext i32 %66 to i64
%68 = getelementptr inbounds float, float* %65, i64 %67
store float %64, float* %68
%69 = call i32 (...) @rand()
%70 = srem i32 %69, 1000
%71 = sitofp i32 %70 to float
%72 = load float*, float** %15
%73 = load i32, i32* %8
%74 = zext i32 %73 to i64
%75 = getelementptr inbounds float, float* %72, i64 %74
store float %71, float* %75
br label %76
76: ; preds = %61
%77 = load i32, i32* %8
%78 = add i32 %77, 1
store i32 %78, i32* %8
br label %57
79: ; preds = %57
store i32 0, i32* %8
br label %80
80: ; preds = %148, %79
%81 = load i32, i32* %8
%82 = load i32, i32* %6
%83 = icmp ult i32 %81, %82
br i1 %83, label %84, label %151
84: ; preds = %80
%85 = load float*, float** %10
%86 = load i32, i32* %8
%87 = zext i32 %86 to i64
%88 = getelementptr inbounds float, float* %85, i64 %87
store float 0.000000e+00, float* %88
store i32 0, i32* %9
br label %89
89: ; preds = %144, %84
%90 = load i32, i32* %9
%91 = load i32, i32* %7
%92 = icmp ult i32 %90, %91
br i1 %92, label %93, label %147
93: ; preds = %89
%94 = call i32 (...) @rand()
%95 = srem i32 %94, 2
%96 = icmp ne i32 %95, 0
br i1 %96, label %97, label %118
97: ; preds = %93
%98 = load float*, float** %14
%99 = load i32, i32* %9
%100 = zext i32 %99 to i64
%101 = getelementptr inbounds float, float* %98, i64 %100
%102 = load float, float* %101
%103 = load float*, float** %15
%104 = load i32, i32* %9
%105 = zext i32 %104 to i64
%106 = getelementptr inbounds float, float* %103, i64 %105
%107 = load float, float* %106
%108 = load i32, i32* %8
%109 = uitofp i32 %108 to float
%110 = fmul float %107, %109
%111 = call float @cos(float %110)
%112 = load float*, float** %10
%113 = load i32, i32* %8
%114 = zext i32 %113 to i64
%115 = getelementptr inbounds float, float* %112, i64 %114
%116 = load float, float* %115
%117 = call float @llvm.fmuladd.f32(float %102, float %111, float %116)
store float %117, float* %115
br label %139
118: ; preds = %93
%119 = load float*, float** %14
%120 = load i32, i32* %9
%121 = zext i32 %120 to i64
%122 = getelementptr inbounds float, float* %119, i64 %121
%123 = load float, float* %122
%124 = load float*, float** %15
%125 = load i32, i32* %9
%126 = zext i32 %125 to i64
%127 = getelementptr inbounds float, float* %124, i64 %126
%128 = load float, float* %127
%129 = load i32, i32* %8
%130 = uitofp i32 %129 to float
%131 = fmul float %128, %130
%132 = call float @sin(float %131)
%133 = load float*, float** %10
%134 = load i32, i32* %8
%135 = zext i32 %134 to i64
%136 = getelementptr inbounds float, float* %133, i64 %135
%137 = load float, float* %136
%138 = call float @llvm.fmuladd.f32(float %123, float %132, float %137)
store float %138, float* %136
br label %139
139: ; preds = %118, %97
%140 = load float*, float** %11
%141 = load i32, i32* %8
%142 = zext i32 %141 to i64
%143 = getelementptr inbounds float, float* %140, i64 %142
store float 0.000000e+00, float* %143
br label %144
144: ; preds = %139
%145 = load i32, i32* %9
%146 = add i32 %145, 1
store i32 %146, i32* %9
br label %89
147: ; preds = %89
br label %148
148: ; preds = %147
%149 = load i32, i32* %8
%150 = add i32 %149, 1
store i32 %150, i32* %8
br label %80
151: ; preds = %80
%152 = load i32, i32* %6
%153 = load i32, i32* %16
%154 = load float*, float** %10
%155 = load float*, float** %11
%156 = load float*, float** %12
%157 = load float*, float** %13
%158 = call i32 @fft_float(i32 %152, i32 %153, float* %154, float* %155, float* %156, float* %157)
%159 = call i32 (...) @stoplogger()
%160 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%161 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%162 = load float*, float** %10
%163 = call i32 @free(float* %162)
%164 = load float*, float** %11
%165 = call i32 @free(float* %164)
%166 = load float*, float** %12
%167 = call i32 @free(float* %166)
%168 = load float*, float** %13
%169 = call i32 @free(float* %168)
%170 = load float*, float** %14
%171 = call i32 @free(float* %170)
%172 = load float*, float** %15
%173 = call i32 @free(float* %172)
%174 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [9 x i8] c"RealOut:\00"
@str.2 = [9 x i8] c"ImagOut:\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @initlogger()
%4 = tail call i32 (...) @resetlogger()
%5 = tail call i32 @srand(i32 1)
%6 = tail call i64 @malloc(i32 32768)
%7 = tail call i64 @malloc(i32 32768)
%8 = tail call i64 @malloc(i32 32768)
%9 = tail call i64 @malloc(i32 32768)
%10 = tail call i64 @malloc(i32 16)
%11 = inttoptr i64 %10 to float*
%12 = tail call i64 @malloc(i32 16)
%13 = inttoptr i64 %12 to float*
%14 = tail call i32 (...) @rand()
%15 = srem i32 %14, 1000
%16 = sitofp i32 %15 to float
store float %16, float* %11
%17 = tail call i32 (...) @rand()
%18 = srem i32 %17, 1000
%19 = sitofp i32 %18 to float
store float %19, float* %13
%20 = tail call i32 (...) @rand()
%21 = srem i32 %20, 1000
%22 = sitofp i32 %21 to float
%23 = getelementptr inbounds float, float* %11, i64 1
store float %22, float* %23
%24 = tail call i32 (...) @rand()
%25 = srem i32 %24, 1000
%26 = sitofp i32 %25 to float
%27 = getelementptr inbounds float, float* %13, i64 1
store float %26, float* %27
%28 = tail call i32 (...) @rand()
%29 = srem i32 %28, 1000
%30 = sitofp i32 %29 to float
%31 = getelementptr inbounds float, float* %11, i64 2
store float %30, float* %31
%32 = tail call i32 (...) @rand()
%33 = srem i32 %32, 1000
%34 = sitofp i32 %33 to float
%35 = getelementptr inbounds float, float* %13, i64 2
store float %34, float* %35
%36 = tail call i32 (...) @rand()
%37 = srem i32 %36, 1000
%38 = sitofp i32 %37 to float
%39 = getelementptr inbounds float, float* %11, i64 3
store float %38, float* %39
%40 = tail call i32 (...) @rand()
%41 = srem i32 %40, 1000
%42 = sitofp i32 %41 to float
%43 = getelementptr inbounds float, float* %13, i64 3
store float %42, float* %43
%44 = inttoptr i64 %6 to float*
%45 = inttoptr i64 %7 to float*
%46 = inttoptr i64 %8 to float*
br label %47
47: ; preds = %2, %105
%48 = phi i64 [ 0, %2 ], [ %109, %105 ]
%49 = getelementptr inbounds float, float* %44, i64 %48
store float 0.000000e+00, float* %49
%50 = trunc i64 %48 to i32
%51 = uitofp i32 %50 to float
%52 = getelementptr inbounds float, float* %45, i64 %48
%53 = tail call i32 (...) @rand()
%54 = and i32 %53, 1
%55 = icmp eq i32 %54, 0
%56 = load float, float* %11
%57 = load float, float* %13
%58 = fmul float %57, %51
br i1 %55, label %61, label %59
59: ; preds = %47
%60 = tail call float @cos(float %58)
br label %63
61: ; preds = %47
%62 = tail call float @sin(float %58)
br label %63
63: ; preds = %61, %59
%64 = phi float [ %62, %61 ], [ %60, %59 ]
%65 = load float, float* %49
%66 = tail call float @llvm.fmuladd.f32(float %56, float %64, float %65)
store float %66, float* %49
store float 0.000000e+00, float* %52
%67 = tail call i32 (...) @rand()
%68 = and i32 %67, 1
%69 = icmp eq i32 %68, 0
%70 = load float, float* %23
%71 = load float, float* %27
%72 = fmul float %71, %51
br i1 %69, label %75, label %73
73: ; preds = %63
%74 = tail call float @cos(float %72)
br label %77
75: ; preds = %63
%76 = tail call float @sin(float %72)
br label %77
77: ; preds = %75, %73
%78 = phi float [ %76, %75 ], [ %74, %73 ]
%79 = load float, float* %49
%80 = tail call float @llvm.fmuladd.f32(float %70, float %78, float %79)
store float %80, float* %49
store float 0.000000e+00, float* %52
%81 = tail call i32 (...) @rand()
%82 = and i32 %81, 1
%83 = icmp eq i32 %82, 0
%84 = load float, float* %31
%85 = load float, float* %35
%86 = fmul float %85, %51
br i1 %83, label %89, label %87
87: ; preds = %77
%88 = tail call float @cos(float %86)
br label %91
89: ; preds = %77
%90 = tail call float @sin(float %86)
br label %91
91: ; preds = %89, %87
%92 = phi float [ %90, %89 ], [ %88, %87 ]
%93 = load float, float* %49
%94 = tail call float @llvm.fmuladd.f32(float %84, float %92, float %93)
store float %94, float* %49
store float 0.000000e+00, float* %52
%95 = tail call i32 (...) @rand()
%96 = and i32 %95, 1
%97 = icmp eq i32 %96, 0
%98 = load float, float* %39
%99 = load float, float* %43
%100 = fmul float %99, %51
br i1 %97, label %103, label %101
101: ; preds = %91
%102 = tail call float @cos(float %100)
br label %105
103: ; preds = %91
%104 = tail call float @sin(float %100)
br label %105
105: ; preds = %103, %101
%106 = phi float [ %104, %103 ], [ %102, %101 ]
%107 = load float, float* %49
%108 = tail call float @llvm.fmuladd.f32(float %98, float %106, float %107)
store float %108, float* %49
store float 0.000000e+00, float* %52
%109 = add nuw nsw i64 %48, 1
%110 = icmp eq i64 %109, 8192
br i1 %110, label %111, label %47
111: ; preds = %105
%112 = inttoptr i64 %9 to float*
%113 = tail call i32 @fft_float(i32 8192, i32 1, float* %44, float* %45, float* %46, float* %112)
%114 = tail call i32 (...) @stoplogger()
%115 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%116 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.2, i64 0, i64 0))
%117 = tail call i32 @free(float* %44)
%118 = tail call i32 @free(float* %45)
%119 = tail call i32 @free(float* %46)
%120 = tail call i32 @free(float* %112)
%121 = tail call i32 @free(float* %11)
%122 = tail call i32 @free(float* %13)
%123 = tail call i32 @exit(i32 0)
unreachable
}