; LLVM IR from jgaeddert/liquid-dsp :: src/fft/tests (spwaterfall_autotest)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str = external hidden unnamed_addr constant [91 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [12 x i8], align 1
@liquid_autotest_verbose = external global i32, align 4
@.str.17 = external hidden unnamed_addr constant [81 x i8], align 1
@liquid_window_str = external global [10 x [2 x ptr]], align 16
@.str.18 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

declare ptr @spwaterfallcf_create(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

declare void @liquid_autotest_failed_expr(ptr noundef, i32 noundef, ptr noundef, double noundef, ptr noundef, ptr noundef, double noundef) #1

declare void @liquid_autotest_passed(...) #1

declare i32 @spwaterfallcf_destroy(ptr noundef) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @testbench_spwaterfallcf_compare(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @testbench_spwaterfallcf_noise(i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, float noundef %4) #3 {
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca float, align 4
  %11 = alloca i32, align 4
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca { float, float }, align 4
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca float, align 4
  store i32 %0, ptr %6, align 4, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !5
  store i32 %2, ptr %8, align 4, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !5
  store float %4, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  %22 = load i32, ptr %6, align 4, !tbaa !5
  %23 = mul i32 4, %22
  %24 = load i32, ptr %9, align 4, !tbaa !5
  %25 = mul i32 %23, %24
  store i32 %25, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  %26 = load float, ptr %10, align 4, !tbaa !9
  %27 = fdiv float %26, 2.000000e+01
  %28 = call float @powf(float noundef 1.000000e+01, float noundef %27) #8
  store float %28, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store float 4.000000e+00, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 1, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %29 = load i32, ptr %6, align 4, !tbaa !5
  %30 = load i32, ptr %14, align 4, !tbaa !5
  %31 = load i32, ptr %7, align 4, !tbaa !5
  %32 = load i32, ptr %8, align 4, !tbaa !5
  %33 = load i32, ptr %9, align 4, !tbaa !5
  %34 = call ptr @spwaterfallcf_create(i32 noundef %29, i32 noundef %30, i32 noundef %31, i32 noundef %32, i32 noundef %33)
  store ptr %34, ptr %15, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %59, %5
  %36 = load i32, ptr %16, align 4, !tbaa !5
  %37 = load i32, ptr %11, align 4, !tbaa !5
  %38 = icmp ult i32 %36, %37
  br i1 %38, label %39, label %62

39:                                               ; preds = %35
  %40 = load ptr, ptr %15, align 8, !tbaa !11
  %41 = load float, ptr %12, align 4, !tbaa !9
  %42 = call float (...) @randnf()
  %43 = call float (...) @randnf()
  %44 = fmul float 0.000000e+00, %43
  %45 = fmul float 1.000000e+00, %43
  %46 = fadd float %42, %44
  %47 = fmul float %41, %46
  %48 = fmul float %41, %45
  %49 = fpext float %47 to double
  %50 = fpext float %48 to double
  %51 = fmul double %49, 0x3FE6A09E667F3BCD
  %52 = fmul double %50, 0x3FE6A09E667F3BCD
  %53 = fptrunc double %51 to float
  %54 = fptrunc double %52 to float
  %55 = getelementptr inbounds { float, float }, ptr %17, i32 0, i32 0
  %56 = getelementptr inbounds { float, float }, ptr %17, i32 0, i32 1
  store float %53, ptr %55, align 4
  store float %54, ptr %56, align 4
  %57 = load <2 x float>, ptr %17, align 4
  %58 = call i32 @spwaterfallcf_push(ptr noundef %40, <2 x float> noundef %57)
  br label %59

59:                                               ; preds = %39
  %60 = load i32, ptr %16, align 4, !tbaa !5
  %61 = add i32 %60, 1
  store i32 %61, ptr %16, align 4, !tbaa !5
  br label %35, !llvm.loop !13

62:                                               ; preds = %35
  %63 = load ptr, ptr %15, align 8, !tbaa !11
  %64 = call i64 @spwaterfallcf_get_num_samples_total(ptr noundef %63)
  %65 = load i32, ptr %11, align 4, !tbaa !5
  %66 = zext i32 %65 to i64
  %67 = icmp ne i64 %64, %66
  br i1 %67, label %68, label %74

68:                                               ; preds = %62
  %69 = load ptr, ptr %15, align 8, !tbaa !11
  %70 = call i64 @spwaterfallcf_get_num_samples_total(ptr noundef %69)
  %71 = uitofp i64 %70 to double
  %72 = load i32, ptr %11, align 4, !tbaa !5
  %73 = uitofp i32 %72 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 86, ptr noundef @.str.15, double noundef %71, ptr noundef @.str.3, ptr noundef @.str.16, double noundef %73)
  br label %75

74:                                               ; preds = %62
  call void (...) @liquid_autotest_passed()
  br label %75

75:                                               ; preds = %74, %68
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %76 = load ptr, ptr %15, align 8, !tbaa !11
  %77 = call ptr @spwaterfallcf_get_psd(ptr noundef %76)
  store ptr %77, ptr %18, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  %78 = load ptr, ptr %15, align 8, !tbaa !11
  %79 = call i32 @spwaterfallcf_get_num_time(ptr noundef %78)
  store i32 %79, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %80 = load i32, ptr %6, align 4, !tbaa !5
  %81 = load i32, ptr %19, align 4, !tbaa !5
  %82 = mul i32 %80, %81
  %83 = zext i32 %82 to i64
  %84 = mul i64 %83, 4
  %85 = call noalias ptr @malloc(i64 noundef %84) #9
  store ptr %85, ptr %20, align 8, !tbaa !11
  %86 = load ptr, ptr %20, align 8, !tbaa !11
  %87 = load ptr, ptr %18, align 8, !tbaa !11
  %88 = load i32, ptr %6, align 4, !tbaa !5
  %89 = load i32, ptr %19, align 4, !tbaa !5
  %90 = mul i32 %88, %89
  %91 = zext i32 %90 to i64
  %92 = mul i64 %91, 4
  call void @llvm.memmove.p0.p0.i64(ptr align 4 %86, ptr align 4 %87, i64 %92, i1 false)
  %93 = load ptr, ptr %20, align 8, !tbaa !11
  %94 = load i32, ptr %6, align 4, !tbaa !5
  %95 = load i32, ptr %19, align 4, !tbaa !5
  %96 = mul i32 %94, %95
  %97 = zext i32 %96 to i64
  call void @qsort(ptr noundef %93, i64 noundef %97, i64 noundef 4, ptr noundef @testbench_spwaterfallcf_compare)
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  %98 = load ptr, ptr %20, align 8, !tbaa !11
  %99 = load i32, ptr %6, align 4, !tbaa !5
  %100 = load i32, ptr %19, align 4, !tbaa !5
  %101 = mul i32 %99, %100
  %102 = udiv i32 %101, 2
  %103 = zext i32 %102 to i64
  %104 = getelementptr inbounds float, ptr %98, i64 %103
  %105 = load float, ptr %104, align 4, !tbaa !9
  store float %105, ptr %21, align 4, !tbaa !9
  %106 = load i32, ptr @liquid_autotest_verbose, align 4, !tbaa !5
  %107 = icmp ne i32 %106, 0
  br i1 %107, label %108, label %122

108:                                              ; preds = %75
  %109 = load i32, ptr %6, align 4, !tbaa !5
  %110 = load i32, ptr %14, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [10 x [2 x ptr]], ptr @liquid_window_str, i64 0, i64 %111
  %113 = getelementptr inbounds [2 x ptr], ptr %112, i64 0, i64 1
  %114 = load ptr, ptr %113, align 8, !tbaa !11
  %115 = load float, ptr %10, align 4, !tbaa !9
  %116 = fpext float %115 to double
  %117 = load float, ptr %21, align 4, !tbaa !9
  %118 = fpext float %117 to double
  %119 = load float, ptr %13, align 4, !tbaa !9
  %120 = fpext float %119 to double
  %121 = call i32 (ptr, ...) @printf(ptr noundef @.str.17, i32 noundef %109, ptr noundef %114, double noundef %116, double noundef %118, double noundef %120)
  br label %122

122:                                              ; preds = %108, %75
  %123 = load float, ptr %21, align 4, !tbaa !9
  %124 = load float, ptr %10, align 4, !tbaa !9
  %125 = fsub float %123, %124
  %126 = fpext float %125 to double
  %127 = load float, ptr %21, align 4, !tbaa !9
  %128 = load float, ptr %10, align 4, !tbaa !9
  %129 = fsub float %127, %128
  %130 = fpext float %129 to double
  %131 = load float, ptr %21, align 4, !tbaa !9
  %132 = load float, ptr %10, align 4, !tbaa !9
  %133 = fsub float %131, %132
  %134 = fpext float %133 to double
  %135 = load float, ptr %21, align 4, !tbaa !9
  %136 = load float, ptr %10, align 4, !tbaa !9
  %137 = fsub float %135, %136
  %138 = fpext float %137 to double
  %139 = call double @llvm.fmuladd.f64(double %126, double %130, double 0.000000e+00)
  %140 = call double @sqrt(double noundef %139) #8
  %141 = load float, ptr %13, align 4, !tbaa !9
  %142 = fpext float %141 to double
  %143 = fcmp ogt double %140, %142
  br i1 %143, label %156, label %144

144:                                              ; preds = %122
  %145 = load float, ptr %21, align 4, !tbaa !9
  %146 = call i1 @llvm.is.fpclass.f32(float %145, i32 3)
  br i1 %146, label %156, label %147

147:                                              ; preds = %144
  %148 = load float, ptr %21, align 4, !tbaa !9
  %149 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %149, label %156, label %150

150:                                              ; preds = %147
  %151 = load float, ptr %10, align 4, !tbaa !9
  %152 = call i1 @llvm.is.fpclass.f32(float %151, i32 3)
  br i1 %152, label %156, label %153

153:                                              ; preds = %150
  %154 = load float, ptr %10, align 4, !tbaa !9
  %155 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %155, label %156, label %177

156:                                              ; preds = %153, %150, %147, %144, %122
  %157 = load float, ptr %21, align 4, !tbaa !9
  %158 = load float, ptr %10, align 4, !tbaa !9
  %159 = fsub float %157, %158
  %160 = fpext float %159 to double
  %161 = load float, ptr %21, align 4, !tbaa !9
  %162 = load float, ptr %10, align 4, !tbaa !9
  %163 = fsub float %161, %162
  %164 = fpext float %163 to double
  %165 = load float, ptr %21, align 4, !tbaa !9
  %166 = load float, ptr %10, align 4, !tbaa !9
  %167 = fsub float %165, %166
  %168 = fpext float %167 to double
  %169 = load float, ptr %21, align 4, !tbaa !9
  %170 = load float, ptr %10, align 4, !tbaa !9
  %171 = fsub float %169, %170
  %172 = fpext float %171 to double
  %173 = call double @llvm.fmuladd.f64(double %160, double %164, double 0.000000e+00)
  %174 = call double @sqrt(double noundef %173) #8
  %175 = load float, ptr %13, align 4, !tbaa !9
  %176 = fpext float %175 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 109, ptr noundef @.str.18, double noundef %174, ptr noundef @.str.19, ptr noundef @.str.20, double noundef %176)
  br label %178

177:                                              ; preds = %153
  call void (...) @liquid_autotest_passed()
  br label %178

178:                                              ; preds = %177, %156
  %179 = load ptr, ptr %20, align 8, !tbaa !11
  call void @free(ptr noundef %179) #8
  %180 = load ptr, ptr %15, align 8, !tbaa !11
  %181 = call i32 @spwaterfallcf_destroy(ptr noundef %180)
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  ret void
}

; Function Attrs: nounwind
declare float @powf(float noundef, float noundef) #4

declare i32 @spwaterfallcf_push(ptr noundef, <2 x float> noundef) #1

declare float @randnf(...) #1

declare i64 @spwaterfallcf_get_num_samples_total(ptr noundef) #1

declare ptr @spwaterfallcf_get_psd(ptr noundef) #1

declare i32 @spwaterfallcf_get_num_time(ptr noundef) #1

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #5

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memmove.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #6

declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #1

declare i32 @printf(ptr noundef, ...) #1

; Function Attrs: nounwind
declare double @sqrt(double noundef) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #7

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i1 @llvm.is.fpclass.f32(float, i32 immarg) #7

; Function Attrs: nounwind
declare void @free(ptr noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nounwind }
attributes #9 = { nounwind allocsize(0) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str = external hidden unnamed_addr constant [91 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [12 x i8], align 1
@liquid_autotest_verbose = external local_unnamed_addr global i32, align 4
@.str.17 = external hidden unnamed_addr constant [81 x i8], align 1
@liquid_window_str = external local_unnamed_addr global [10 x [2 x ptr]], align 16
@.str.18 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [4 x i8], align 1

declare ptr @spwaterfallcf_create(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

declare void @liquid_autotest_failed_expr(ptr noundef, i32 noundef, ptr noundef, double noundef, ptr noundef, ptr noundef, double noundef) local_unnamed_addr #0

declare void @liquid_autotest_passed(...) local_unnamed_addr #0

declare i32 @spwaterfallcf_destroy(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @testbench_spwaterfallcf_compare(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @testbench_spwaterfallcf_noise(i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, float noundef %4) local_unnamed_addr #2 {
  %6 = shl i32 %0, 2
  %7 = mul i32 %6, %3
  %8 = fdiv float %4, 2.000000e+01
  %9 = tail call float @powf(float noundef 1.000000e+01, float noundef %8) #11
  %10 = tail call ptr @spwaterfallcf_create(i32 noundef %0, i32 noundef 1, i32 noundef %1, i32 noundef %2, i32 noundef %3) #11
  %.not65 = icmp eq i32 %7, 0
  br i1 %.not65, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %5
  %11 = insertelement <2 x float> poison, float %9, i64 0
  %12 = shufflevector <2 x float> %11, <2 x float> poison, <2 x i32> zeroinitializer
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %.064 = phi i32 [ %24, %.lr.ph ], [ 0, %.lr.ph.preheader ]
  %13 = tail call float (...) @randnf() #11
  %14 = tail call float (...) @randnf() #11
  %15 = fmul float %14, 0.000000e+00
  %16 = fadd float %13, %15
  %17 = insertelement <2 x float> poison, float %16, i64 0
  %18 = insertelement <2 x float> %17, float %14, i64 1
  %19 = fmul <2 x float> %12, %18
  %20 = fpext <2 x float> %19 to <2 x double>
  %21 = fmul <2 x double> %20, <double 0x3FE6A09E667F3BCD, double 0x3FE6A09E667F3BCD>
  %22 = fptrunc <2 x double> %21 to <2 x float>
  %23 = tail call i32 @spwaterfallcf_push(ptr noundef %10, <2 x float> noundef %22) #11
  %24 = add nuw i32 %.064, 1
  %exitcond.not = icmp eq i32 %24, %7
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !5

._crit_edge:                                      ; preds = %.lr.ph, %5
  %25 = tail call i64 @spwaterfallcf_get_num_samples_total(ptr noundef %10) #11
  %26 = zext i32 %7 to i64
  %.not = icmp eq i64 %25, %26
  br i1 %.not, label %31, label %27

27:                                               ; preds = %._crit_edge
  %28 = tail call i64 @spwaterfallcf_get_num_samples_total(ptr noundef %10) #11
  %29 = uitofp i64 %28 to double
  %30 = uitofp i32 %7 to double
  tail call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 86, ptr noundef nonnull @.str.15, double noundef %29, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.16, double noundef %30) #11
  br label %32

31:                                               ; preds = %._crit_edge
  tail call void (...) @liquid_autotest_passed() #11
  br label %32

32:                                               ; preds = %31, %27
  %33 = tail call ptr @spwaterfallcf_get_psd(ptr noundef %10) #11
  %34 = tail call i32 @spwaterfallcf_get_num_time(ptr noundef %10) #11
  %35 = mul i32 %34, %0
  %36 = zext i32 %35 to i64
  %37 = shl nuw nsw i64 %36, 2
  %38 = tail call noalias ptr @malloc(i64 noundef %37) #12
  tail call void @llvm.memmove.p0.p0.i64(ptr align 4 %38, ptr align 4 %33, i64 %37, i1 false)
  tail call void @qsort(ptr noundef %38, i64 noundef %36, i64 noundef 4, ptr noundef nonnull @testbench_spwaterfallcf_compare) #11
  %39 = lshr i32 %35, 1
  %40 = zext nneg i32 %39 to i64
  %41 = getelementptr inbounds float, ptr %38, i64 %40
  %42 = load float, ptr %41, align 4, !tbaa !7
  %43 = load i32, ptr @liquid_autotest_verbose, align 4, !tbaa !11
  %.not61 = icmp eq i32 %43, 0
  br i1 %.not61, label %49, label %44

44:                                               ; preds = %32
  %45 = load ptr, ptr getelementptr inbounds (i8, ptr @liquid_window_str, i64 24), align 8, !tbaa !13
  %46 = fpext float %4 to double
  %47 = fpext float %42 to double
  %48 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17, i32 noundef %0, ptr noundef %45, double noundef %46, double noundef %47, double noundef 4.000000e+00)
  br label %49

49:                                               ; preds = %44, %32
  %50 = fsub float %42, %4
  %51 = fpext float %50 to double
  %52 = tail call double @llvm.fmuladd.f64(double %51, double %51, double 0.000000e+00)
  %sqrt = tail call double @llvm.sqrt.f64(double %52)
  %53 = fcmp ogt double %sqrt, 4.000000e+00
  %54 = fcmp uno float %42, 0.000000e+00
  %or.cond = select i1 %53, i1 true, i1 %54
  %55 = fcmp uno float %4, 0.000000e+00
  %or.cond62 = or i1 %55, %or.cond
  br i1 %or.cond62, label %56, label %57

56:                                               ; preds = %49
  tail call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 109, ptr noundef nonnull @.str.18, double noundef %sqrt, ptr noundef nonnull @.str.19, ptr noundef nonnull @.str.20, double noundef 4.000000e+00) #11
  br label %58

57:                                               ; preds = %49
  tail call void (...) @liquid_autotest_passed() #11
  br label %58

58:                                               ; preds = %57, %56
  tail call void @free(ptr noundef nonnull %38) #11
  %59 = tail call i32 @spwaterfallcf_destroy(ptr noundef %10) #11
  ret void
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @powf(float noundef, float noundef) local_unnamed_addr #3

declare i32 @spwaterfallcf_push(ptr noundef, <2 x float> noundef) local_unnamed_addr #0

declare float @randnf(...) local_unnamed_addr #0

declare i64 @spwaterfallcf_get_num_samples_total(ptr noundef) local_unnamed_addr #0

declare ptr @spwaterfallcf_get_psd(ptr noundef) local_unnamed_addr #0

declare i32 @spwaterfallcf_get_num_time(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memmove.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #5

; Function Attrs: nofree
declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #6

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #7

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #8

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #9

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.sqrt.f64(double) #10

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nofree "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #10 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #11 = { nounwind }
attributes #12 = { nounwind allocsize(0) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"float", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !9, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !9, i64 0}


; Effective O3 passes: AggressiveInstCombinePass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass