#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 */
typedef double clock_t;

/* Variables and functions */
double CLOCKS_PER_SEC;
double clock();
int /*<<< orphan*/ dumb_fht(double *, int);
double fabs(double);
int /*<<< orphan*/ fht_double(double *, int);
int /*<<< orphan*/ free(double *);
void *malloc(int);
int /*<<< orphan*/ printf(char *, double);
int rand();
int /*<<< orphan*/ srand(int);
int main(void) {
  srand(4057218);
  for (int log_n = 1; log_n <= 30; ++log_n) {
    printf("%d ", log_n);
    int n = 1 << log_n;
    void *buf = malloc(sizeof(double) * n + 32);
    char *start = buf;
    while ((size_t)start % 32 != 0)
      start = start + 1;
    double *a = (double *)start;
    double *aux = (double *)malloc(sizeof(double) * n);
    for (int i = 0; i < n; ++i) {
      a[i] = 1.0 - 2.0 * (rand() & 1);
      aux[i] = a[i];
    }
    fht_double(a, log_n);
    dumb_fht(aux, log_n);
    double max_error = 0.0;
    for (int i = 0; i < n; ++i) {
      double error = fabs(a[i] - aux[i]);
      if (error > max_error) {
        max_error = error;
      }
    }
    if (max_error > 1e-5) {
      printf("ERROR: %.10lf\n", max_error);
      return 1;
    }
    for (int num_it = 10;; num_it *= 2) {
      clock_t tt1 = clock();
      for (int it = 0; it < num_it; ++it) {
        fht_double(a, log_n);
      }
      clock_t tt2 = clock();
      double sec = (tt2 - tt1) / (CLOCKS_PER_SEC + 0.0);
      if (sec >= 1.0) {
        printf("%.10e\n", sec / (num_it + 0.0));
        break;
      }
    }
    free(buf);
    free(aux);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x3de882,%edi
call   1060 <srand@plt>
movl   $0x1,-0x8(%rbp)
cmpl   $0x1e,-0x8(%rbp)
jg     1429 <main+0x2a9>
cvtsi2sdl -0x8(%rbp),%xmm0
lea    0xe67(%rip),%rdi
call   1050 <printf@plt>
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
add    $0x20,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
and    $0x1f,%rax
cmp    $0x0,%rax
je     120d <main+0x8d>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    11ea <main+0x6a>
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    128e <main+0x10e>
mov    $0x0,%al
call   10a0 <rand@plt>
and    $0x1,%eax
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm1
movsd  0xdb3(%rip),%xmm0
subsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    122f <main+0xaf>
mov    -0x28(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1090 <fht_double@plt>
mov    -0x30(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1070 <dumb_fht@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1318 <main+0x198>
mov    -0x28(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x44(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movaps 0xd2e(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
ucomisd -0x40(%rbp),%xmm0
jbe    1305 <main+0x185>
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
jmp    130a <main+0x18a>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    12b5 <main+0x135>
movsd  -0x40(%rbp),%xmm0
movsd  0xcdb(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    134c <main+0x1cc>
movsd  -0x40(%rbp),%xmm0
lea    0xce9(%rip),%rdi
call   1050 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1430 <main+0x2b0>
movl   $0xa,-0x54(%rbp)
mov    $0x0,%al
call   1040 <clock@plt>
movsd  %xmm0,-0x60(%rbp)
movl   $0x0,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x54(%rbp),%eax
jge    138c <main+0x20c>
mov    -0x28(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1090 <fht_double@plt>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1366 <main+0x1e6>
mov    $0x0,%al
call   1040 <clock@plt>
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
subsd  -0x60(%rbp),%xmm0
xorps  %xmm1,%xmm1
mov    0x2c3c(%rip),%rax
addsd  (%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
movsd  0xc42(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     13f6 <main+0x276>
movsd  -0x78(%rbp),%xmm0
cvtsi2sdl -0x54(%rbp),%xmm1
xorps  %xmm2,%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
lea    0xc47(%rip),%rdi
call   1050 <printf@plt>
jmp    1409 <main+0x289>
jmp    13fb <main+0x27b>
mov    -0x54(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1353 <main+0x1d3>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11a3 <main+0x23>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    $0x3de882,%edi
call   1060 <srand@plt>
mov    $0x1,%r12d
xchg   %ax,%ax
xorps  %xmm0,%xmm0
cvtsi2sd %r12d,%xmm0
lea    0xe81(%rip),%rdi
call   1050 <printf@plt>
mov    $0x1,%ebx
mov    %r12d,%ecx
shl    %cl,%ebx
lea    0x0(,%rbx,8),%r13d
lea    0x20(,%rbx,8),%edi
call   1080 <malloc@plt>
mov    %eax,%ecx
neg    %ecx
and    $0x1f,%ecx
mov    %rax,0x10(%rsp)
mov    %rcx,0x8(%rsp)
lea    (%rax,%rcx,1),%rbp
mov    %r13d,%edi
call   1080 <malloc@plt>
mov    %rax,%r13
cmp    $0x2,%ebx
mov    $0x1,%r14d
cmovge %ebx,%r14d
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   10a0 <rand@plt>
and    $0x1,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  %xmm0,%xmm0
movsd  0xdd3(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x0(%rbp,%r15,8)
movsd  %xmm1,0x0(%r13,%r15,8)
add    $0x1,%r15
cmp    %r15,%r14
jne    1210 <main+0x90>
mov    %rbp,%rdi
mov    %r12d,%esi
call   1090 <fht_double@plt>
mov    %r13,%rdi
mov    %r12d,%esi
call   1070 <dumb_fht@plt>
cmp    $0x2,%ebx
jge    1280 <main+0x100>
xorpd  %xmm0,%xmm0
xor    %eax,%eax
mov    0x2d78(%rip),%r15
jmp    12e6 <main+0x166>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14d,%ecx
and    $0x7ffffffe,%ecx
mov    0x10(%rsp),%rax
mov    0x8(%rsp),%rdx
add    %rax,%rdx
add    $0x8,%rdx
xorpd  %xmm1,%xmm1
xor    %eax,%eax
mov    0x2d41(%rip),%r15
movapd 0xd71(%rip),%xmm3
nop
movsd  -0x8(%rdx,%rax,8),%xmm2
movsd  (%rdx,%rax,8),%xmm0
subsd  0x0(%r13,%rax,8),%xmm2
andpd  %xmm3,%xmm2
maxsd  %xmm1,%xmm2
subsd  0x8(%r13,%rax,8),%xmm0
andpd  %xmm3,%xmm0
maxsd  %xmm2,%xmm0
add    $0x2,%rax
movapd %xmm0,%xmm1
cmp    %rax,%rcx
jne    12b0 <main+0x130>
test   $0x1,%r14b
je     1309 <main+0x189>
movsd  0x0(%rbp,%rax,8),%xmm1
subsd  0x0(%r13,%rax,8),%xmm1
andpd  0xd1f(%rip),%xmm1
maxsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ucomisd 0xcf7(%rip),%xmm0
ja     13b8 <main+0x238>
mov    $0xa,%eax
nopl   0x0(%rax)
mov    %eax,%r14d
xor    %eax,%eax
call   1040 <clock@plt>
movsd  %xmm0,0x8(%rsp)
cmp    $0x2,%r14d
mov    $0x1,%ebx
cmovae %r14d,%ebx
nopl   (%rax)
mov    %rbp,%rdi
mov    %r12d,%esi
call   1090 <fht_double@plt>
add    $0xffffffff,%ebx
jne    1340 <main+0x1c0>
xor    %eax,%eax
call   1040 <clock@plt>
subsd  0x8(%rsp),%xmm0
movsd  (%r15),%xmm1
addsd  0xca6(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    (%r14,%r14,1),%eax
ucomisd 0xc86(%rip),%xmm0
jb     1320 <main+0x1a0>
xorps  %xmm1,%xmm1
cvtsi2sd %r14d,%xmm1
divsd  %xmm1,%xmm0
lea    0xcb4(%rip),%rdi
call   1050 <printf@plt>
mov    0x10(%rsp),%rdi
call   1030 <free@plt>
mov    %r13,%rdi
call   1030 <free@plt>
add    $0x1,%r12d
cmp    $0x1f,%r12d
jne    11a0 <main+0x20>
xor    %eax,%eax
jmp    13c9 <main+0x249>
lea    0xc75(%rip),%rdi
call   1050 <printf@plt>
mov    $0x1,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
@.str.1 = [15 x i8] c"ERROR: %.10lf\0A\00"
@CLOCKS_PER_SEC = global double 0.000000e+00
@.str.2 = [7 x i8] c"%.10e\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca double*
%7 = alloca double*
%8 = alloca i32
%9 = alloca double
%10 = alloca i32
%11 = alloca double
%12 = alloca i32
%13 = alloca double
%14 = alloca i32
%15 = alloca double
%16 = alloca double
store i32 0, i32* %1
%17 = call i32 @srand(i32 4057218)
store i32 1, i32* %2
br label %18
18: ; preds = %156, %0
%19 = load i32, i32* %2
%20 = icmp sle i32 %19, 30
br i1 %20, label %21, label %159
21: ; preds = %18
%22 = load i32, i32* %2
%23 = sitofp i32 %22 to double
%24 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %23)
%25 = load i32, i32* %2
%26 = shl i32 1, %25
store i32 %26, i32* %3
%27 = load i32, i32* %3
%28 = sext i32 %27 to i64
%29 = mul i64 8, %28
%30 = add i64 %29, 32
%31 = trunc i64 %30 to i32
%32 = call i8* @malloc(i32 %31)
store i8* %32, i8** %4
%33 = load i8*, i8** %4
store i8* %33, i8** %5
br label %34
34: ; preds = %39, %21
%35 = load i8*, i8** %5
%36 = ptrtoint i8* %35 to i64
%37 = urem i64 %36, 32
%38 = icmp ne i64 %37, 0
br i1 %38, label %39, label %42
39: ; preds = %34
%40 = load i8*, i8** %5
%41 = getelementptr inbounds i8, i8* %40, i64 1
store i8* %41, i8** %5
br label %34
42: ; preds = %34
%43 = load i8*, i8** %5
%44 = bitcast i8* %43 to double*
store double* %44, double** %6
%45 = load i32, i32* %3
%46 = sext i32 %45 to i64
%47 = mul i64 8, %46
%48 = trunc i64 %47 to i32
%49 = call i8* @malloc(i32 %48)
%50 = bitcast i8* %49 to double*
store double* %50, double** %7
store i32 0, i32* %8
br label %51
51: ; preds = %73, %42
%52 = load i32, i32* %8
%53 = load i32, i32* %3
%54 = icmp slt i32 %52, %53
br i1 %54, label %55, label %76
55: ; preds = %51
%56 = call i32 (...) @rand()
%57 = and i32 %56, 1
%58 = sitofp i32 %57 to double
%59 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %58, double 1.000000e+00)
%60 = load double*, double** %6
%61 = load i32, i32* %8
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds double, double* %60, i64 %62
store double %59, double* %63
%64 = load double*, double** %6
%65 = load i32, i32* %8
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds double, double* %64, i64 %66
%68 = load double, double* %67
%69 = load double*, double** %7
%70 = load i32, i32* %8
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds double, double* %69, i64 %71
store double %68, double* %72
br label %73
73: ; preds = %55
%74 = load i32, i32* %8
%75 = add nsw i32 %74, 1
store i32 %75, i32* %8
br label %51
76: ; preds = %51
%77 = load double*, double** %6
%78 = load i32, i32* %2
%79 = call i32 @fht_double(double* %77, i32 %78)
%80 = load double*, double** %7
%81 = load i32, i32* %2
%82 = call i32 @dumb_fht(double* %80, i32 %81)
store double 0.000000e+00, double* %9
store i32 0, i32* %10
br label %83
83: ; preds = %106, %76
%84 = load i32, i32* %10
%85 = load i32, i32* %3
%86 = icmp slt i32 %84, %85
br i1 %86, label %87, label %109
87: ; preds = %83
%88 = load double*, double** %6
%89 = load i32, i32* %10
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds double, double* %88, i64 %90
%92 = load double, double* %91
%93 = load double*, double** %7
%94 = load i32, i32* %10
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds double, double* %93, i64 %95
%97 = load double, double* %96
%98 = fsub double %92, %97
%99 = call double @llvm.fabs.f64(double %98)
store double %99, double* %11
%100 = load double, double* %11
%101 = load double, double* %9
%102 = fcmp ogt double %100, %101
br i1 %102, label %103, label %105
103: ; preds = %87
%104 = load double, double* %11
store double %104, double* %9
br label %105
105: ; preds = %103, %87
br label %106
106: ; preds = %105
%107 = load i32, i32* %10
%108 = add nsw i32 %107, 1
store i32 %108, i32* %10
br label %83
109: ; preds = %83
%110 = load double, double* %9
%111 = fcmp ogt double %110, 1.000000e-05
br i1 %111, label %112, label %115
112: ; preds = %109
%113 = load double, double* %9
%114 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), double %113)
store i32 1, i32* %1
br label %160
115: ; preds = %109
store i32 10, i32* %12
br label %116
116: ; preds = %147, %115
%117 = call double (...) @clock()
store double %117, double* %13
store i32 0, i32* %14
br label %118
118: ; preds = %126, %116
%119 = load i32, i32* %14
%120 = load i32, i32* %12
%121 = icmp slt i32 %119, %120
br i1 %121, label %122, label %129
122: ; preds = %118
%123 = load double*, double** %6
%124 = load i32, i32* %2
%125 = call i32 @fht_double(double* %123, i32 %124)
br label %126
126: ; preds = %122
%127 = load i32, i32* %14
%128 = add nsw i32 %127, 1
store i32 %128, i32* %14
br label %118
129: ; preds = %118
%130 = call double (...) @clock()
store double %130, double* %15
%131 = load double, double* %15
%132 = load double, double* %13
%133 = fsub double %131, %132
%134 = load double, double* @CLOCKS_PER_SEC
%135 = fadd double %134, 0.000000e+00
%136 = fdiv double %133, %135
store double %136, double* %16
%137 = load double, double* %16
%138 = fcmp oge double %137, 1.000000e+00
br i1 %138, label %139, label %146
139: ; preds = %129
%140 = load double, double* %16
%141 = load i32, i32* %12
%142 = sitofp i32 %141 to double
%143 = fadd double %142, 0.000000e+00
%144 = fdiv double %140, %143
%145 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %144)
br label %150
146: ; preds = %129
br label %147
147: ; preds = %146
%148 = load i32, i32* %12
%149 = mul nsw i32 %148, 2
store i32 %149, i32* %12
br label %116
150: ; preds = %139
%151 = load i8*, i8** %4
%152 = bitcast i8* %151 to double*
%153 = call i32 @free(double* %152)
%154 = load double*, double** %7
%155 = call i32 @free(double* %154)
br label %156
156: ; preds = %150
%157 = load i32, i32* %2
%158 = add nsw i32 %157, 1
store i32 %158, i32* %2
br label %18
159: ; preds = %18
store i32 0, i32* %1
br label %160
160: ; preds = %159, %112
%161 = load i32, i32* %1
ret i32 %161
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
@.str.1 = [15 x i8] c"ERROR: %.10lf\0A\00"
@CLOCKS_PER_SEC = global double 0.000000e+00
@.str.2 = [7 x i8] c"%.10e\0A\00"
define i32 @main() {
%1 = tail call i32 @srand(i32 4057218)
br label %11
2: ; preds = %92
%3 = sitofp i32 %89 to double
%4 = fdiv double %97, %3
%5 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %4)
%6 = bitcast i8* %18 to double*
%7 = tail call i32 @free(double* %6)
%8 = tail call i32 @free(double* %25)
%9 = add nuw nsw i32 %12, 1
%10 = icmp eq i32 %9, 31
br i1 %10, label %105, label %11
11: ; preds = %2, %0
%12 = phi i32 [ 1, %0 ], [ %9, %2 ]
%13 = sitofp i32 %12 to double
%14 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %13)
%15 = shl nuw nsw i32 1, %12
%16 = shl i32 %15, 3
%17 = add i32 %16, 32
%18 = tail call i8* @malloc(i32 %17)
%19 = ptrtoint i8* %18 to i64
%20 = sub i64 0, %19
%21 = and i64 %20, 31
%22 = getelementptr i8, i8* %18, i64 %21
%23 = bitcast i8* %22 to double*
%24 = tail call i8* @malloc(i32 %16)
%25 = bitcast i8* %24 to double*
%26 = call i32 @llvm.smax.i32(i32 %15, i32 1)
%27 = zext i32 %26 to i64
br label %35
28: ; preds = %35
%29 = tail call i32 @fht_double(double* %23, i32 %12)
%30 = tail call i32 @dumb_fht(double* %25, i32 %12)
%31 = and i64 %27, 1
%32 = icmp slt i32 %15, 2
br i1 %32, label %45, label %33
33: ; preds = %28
%34 = and i64 %27, 2147483646
br label %62
35: ; preds = %11, %35
%36 = phi i64 [ 0, %11 ], [ %43, %35 ]
%37 = tail call i32 (...) @rand()
%38 = and i32 %37, 1
%39 = sitofp i32 %38 to double
%40 = tail call double @llvm.fmuladd.f64(double %39, double -2.000000e+00, double 1.000000e+00)
%41 = getelementptr inbounds double, double* %23, i64 %36
store double %40, double* %41
%42 = getelementptr inbounds double, double* %25, i64 %36
store double %40, double* %42
%43 = add nuw nsw i64 %36, 1
%44 = icmp eq i64 %43, %27
br i1 %44, label %28, label %35
45: ; preds = %62, %28
%46 = phi double [ undef, %28 ], [ %82, %62 ]
%47 = phi i64 [ 0, %28 ], [ %83, %62 ]
%48 = phi double [ 0.000000e+00, %28 ], [ %82, %62 ]
%49 = icmp eq i64 %31, 0
br i1 %49, label %59, label %50
50: ; preds = %45
%51 = getelementptr inbounds double, double* %23, i64 %47
%52 = load double, double* %51
%53 = getelementptr inbounds double, double* %25, i64 %47
%54 = load double, double* %53
%55 = fsub double %52, %54
%56 = tail call double @llvm.fabs.f64(double %55)
%57 = fcmp ogt double %56, %48
%58 = select i1 %57, double %56, double %48
br label %59
59: ; preds = %45, %50
%60 = phi double [ %46, %45 ], [ %58, %50 ]
%61 = fcmp ogt double %60, 1.000000e-05
br i1 %61, label %86, label %88
62: ; preds = %62, %33
%63 = phi i64 [ 0, %33 ], [ %83, %62 ]
%64 = phi double [ 0.000000e+00, %33 ], [ %82, %62 ]
%65 = phi i64 [ 0, %33 ], [ %84, %62 ]
%66 = getelementptr inbounds double, double* %23, i64 %63
%67 = load double, double* %66
%68 = getelementptr inbounds double, double* %25, i64 %63
%69 = load double, double* %68
%70 = fsub double %67, %69
%71 = tail call double @llvm.fabs.f64(double %70)
%72 = fcmp ogt double %71, %64
%73 = select i1 %72, double %71, double %64
%74 = or i64 %63, 1
%75 = getelementptr inbounds double, double* %23, i64 %74
%76 = load double, double* %75
%77 = getelementptr inbounds double, double* %25, i64 %74
%78 = load double, double* %77
%79 = fsub double %76, %78
%80 = tail call double @llvm.fabs.f64(double %79)
%81 = fcmp ogt double %80, %73
%82 = select i1 %81, double %80, double %73
%83 = add nuw nsw i64 %63, 2
%84 = add i64 %65, 2
%85 = icmp eq i64 %84, %34
br i1 %85, label %45, label %62
86: ; preds = %59
%87 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), double %60)
br label %105
88: ; preds = %59, %92
%89 = phi i32 [ %99, %92 ], [ 10, %59 ]
%90 = tail call double (...) @clock()
%91 = call i32 @llvm.umax.i32(i32 %89, i32 1)
br label %100
92: ; preds = %100
%93 = tail call double (...) @clock()
%94 = fsub double %93, %90
%95 = load double, double* @CLOCKS_PER_SEC
%96 = fadd double %95, 0.000000e+00
%97 = fdiv double %94, %96
%98 = fcmp ult double %97, 1.000000e+00
%99 = shl nsw i32 %89, 1
br i1 %98, label %88, label %2
100: ; preds = %88, %100
%101 = phi i32 [ 0, %88 ], [ %103, %100 ]
%102 = tail call i32 @fht_double(double* %23, i32 %12)
%103 = add nuw i32 %101, 1
%104 = icmp eq i32 %103, %91
br i1 %104, label %92, label %100
105: ; preds = %2, %86
%106 = phi i32 [ 1, %86 ], [ 0, %2 ]
ret i32 %106
}