; LLVM IR from jgaeddert/liquid-dsp :: src/fft/tests (spgram_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"

@liquid_autotest_verbose = external global i32, align 4
@.str = external hidden unnamed_addr constant [67 x i8], align 1
@liquid_window_str = external global [10 x [2 x ptr]], align 16
@.str.1 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @testbench_spgramcf_noise(i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, float noundef %4) #0 {
  %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 ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca { float, float }, align 4
  %17 = alloca ptr, align 8
  %18 = alloca i64, align 8
  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) #6
  %19 = load i32, ptr %6, align 4, !tbaa !5
  %20 = mul i32 2000, %19
  store i32 %20, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %21 = load float, ptr %10, align 4, !tbaa !9
  %22 = fdiv float %21, 2.000000e+01
  %23 = call float @powf(float noundef 1.000000e+01, float noundef %22) #6
  store float %23, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store float 5.000000e-01, ptr %13, align 4, !tbaa !9
  %24 = load i32, ptr @liquid_autotest_verbose, align 4, !tbaa !5
  %25 = icmp ne i32 %24, 0
  br i1 %25, label %26, label %36

26:                                               ; preds = %5
  %27 = load i32, ptr %6, align 4, !tbaa !5
  %28 = load i32, ptr %9, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [10 x [2 x ptr]], ptr @liquid_window_str, i64 0, i64 %29
  %31 = getelementptr inbounds [2 x ptr], ptr %30, i64 0, i64 1
  %32 = load ptr, ptr %31, align 8, !tbaa !11
  %33 = load float, ptr %10, align 4, !tbaa !9
  %34 = fpext float %33 to double
  %35 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %27, ptr noundef %32, double noundef %34)
  br label %36

36:                                               ; preds = %26, %5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  store ptr null, ptr %14, align 8, !tbaa !11
  %37 = load i32, ptr %7, align 4, !tbaa !5
  %38 = icmp eq i32 %37, 0
  br i1 %38, label %45, label %39

39:                                               ; preds = %36
  %40 = load i32, ptr %8, align 4, !tbaa !5
  %41 = icmp eq i32 %40, 0
  br i1 %41, label %45, label %42

42:                                               ; preds = %39
  %43 = load i32, ptr %9, align 4, !tbaa !5
  %44 = icmp eq i32 %43, 0
  br i1 %44, label %45, label %48

45:                                               ; preds = %42, %39, %36
  %46 = load i32, ptr %6, align 4, !tbaa !5
  %47 = call ptr @spgramcf_create_default(i32 noundef %46)
  store ptr %47, ptr %14, align 8, !tbaa !11
  br label %54

48:                                               ; preds = %42
  %49 = load i32, ptr %6, align 4, !tbaa !5
  %50 = load i32, ptr %9, align 4, !tbaa !5
  %51 = load i32, ptr %7, align 4, !tbaa !5
  %52 = load i32, ptr %8, align 4, !tbaa !5
  %53 = call ptr @spgramcf_create(i32 noundef %49, i32 noundef %50, i32 noundef %51, i32 noundef %52)
  store ptr %53, ptr %14, align 8, !tbaa !11
  br label %54

54:                                               ; preds = %48, %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %55

55:                                               ; preds = %79, %54
  %56 = load i32, ptr %15, align 4, !tbaa !5
  %57 = load i32, ptr %11, align 4, !tbaa !5
  %58 = icmp ult i32 %56, %57
  br i1 %58, label %59, label %82

59:                                               ; preds = %55
  %60 = load ptr, ptr %14, align 8, !tbaa !11
  %61 = load float, ptr %12, align 4, !tbaa !9
  %62 = call float (...) @randnf()
  %63 = call float (...) @randnf()
  %64 = fmul float 0.000000e+00, %63
  %65 = fmul float 1.000000e+00, %63
  %66 = fadd float %62, %64
  %67 = fmul float %61, %66
  %68 = fmul float %61, %65
  %69 = fpext float %67 to double
  %70 = fpext float %68 to double
  %71 = fmul double %69, 0x3FE6A09E667F3BCD
  %72 = fmul double %70, 0x3FE6A09E667F3BCD
  %73 = fptrunc double %71 to float
  %74 = fptrunc double %72 to float
  %75 = getelementptr inbounds { float, float }, ptr %16, i32 0, i32 0
  %76 = getelementptr inbounds { float, float }, ptr %16, i32 0, i32 1
  store float %73, ptr %75, align 4
  store float %74, ptr %76, align 4
  %77 = load <2 x float>, ptr %16, align 4
  %78 = call i32 @spgramcf_push(ptr noundef %60, <2 x float> noundef %77)
  br label %79

79:                                               ; preds = %59
  %80 = load i32, ptr %15, align 4, !tbaa !5
  %81 = add i32 %80, 1
  store i32 %81, ptr %15, align 4, !tbaa !5
  br label %55, !llvm.loop !13

82:                                               ; preds = %55
  %83 = load ptr, ptr %14, align 8, !tbaa !11
  %84 = call i64 @spgramcf_get_num_samples(ptr noundef %83)
  %85 = load i32, ptr %11, align 4, !tbaa !5
  %86 = zext i32 %85 to i64
  %87 = icmp ne i64 %84, %86
  br i1 %87, label %88, label %94

88:                                               ; preds = %82
  %89 = load ptr, ptr %14, align 8, !tbaa !11
  %90 = call i64 @spgramcf_get_num_samples(ptr noundef %89)
  %91 = uitofp i64 %90 to double
  %92 = load i32, ptr %11, align 4, !tbaa !5
  %93 = uitofp i32 %92 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str.1, i32 noundef 55, ptr noundef @.str.2, double noundef %91, ptr noundef @.str.3, ptr noundef @.str.4, double noundef %93)
  br label %95

94:                                               ; preds = %82
  call void (...) @liquid_autotest_passed()
  br label %95

95:                                               ; preds = %94, %88
  %96 = load ptr, ptr %14, align 8, !tbaa !11
  %97 = call i64 @spgramcf_get_num_samples_total(ptr noundef %96)
  %98 = load i32, ptr %11, align 4, !tbaa !5
  %99 = zext i32 %98 to i64
  %100 = icmp ne i64 %97, %99
  br i1 %100, label %101, label %107

101:                                              ; preds = %95
  %102 = load ptr, ptr %14, align 8, !tbaa !11
  %103 = call i64 @spgramcf_get_num_samples_total(ptr noundef %102)
  %104 = uitofp i64 %103 to double
  %105 = load i32, ptr %11, align 4, !tbaa !5
  %106 = uitofp i32 %105 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str.1, i32 noundef 56, ptr noundef @.str.5, double noundef %104, ptr noundef @.str.3, ptr noundef @.str.4, double noundef %106)
  br label %108

107:                                              ; preds = %95
  call void (...) @liquid_autotest_passed()
  br label %108

108:                                              ; preds = %107, %101
  %109 = load i32, ptr %6, align 4, !tbaa !5
  %110 = zext i32 %109 to i64
  %111 = call ptr @llvm.stacksave.p0()
  store ptr %111, ptr %17, align 8
  %112 = alloca float, i64 %110, align 16
  store i64 %110, ptr %18, align 8
  %113 = load ptr, ptr %14, align 8, !tbaa !11
  %114 = call i32 @spgramcf_get_psd(ptr noundef %113, ptr noundef %112)
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %115

115:                                              ; preds = %206, %108
  %116 = load i32, ptr %15, align 4, !tbaa !5
  %117 = load i32, ptr %6, align 4, !tbaa !5
  %118 = icmp ult i32 %116, %117
  br i1 %118, label %119, label %209

119:                                              ; preds = %115
  %120 = load i32, ptr %15, align 4, !tbaa !5
  %121 = zext i32 %120 to i64
  %122 = getelementptr inbounds float, ptr %112, i64 %121
  %123 = load float, ptr %122, 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 i32, ptr %15, align 4, !tbaa !5
  %128 = zext i32 %127 to i64
  %129 = getelementptr inbounds float, ptr %112, i64 %128
  %130 = load float, ptr %129, align 4, !tbaa !9
  %131 = load float, ptr %10, align 4, !tbaa !9
  %132 = fsub float %130, %131
  %133 = fpext float %132 to double
  %134 = load i32, ptr %15, align 4, !tbaa !5
  %135 = zext i32 %134 to i64
  %136 = getelementptr inbounds float, ptr %112, i64 %135
  %137 = load float, ptr %136, align 4, !tbaa !9
  %138 = load float, ptr %10, align 4, !tbaa !9
  %139 = fsub float %137, %138
  %140 = fpext float %139 to double
  %141 = load i32, ptr %15, align 4, !tbaa !5
  %142 = zext i32 %141 to i64
  %143 = getelementptr inbounds float, ptr %112, i64 %142
  %144 = load float, ptr %143, align 4, !tbaa !9
  %145 = load float, ptr %10, align 4, !tbaa !9
  %146 = fsub float %144, %145
  %147 = fpext float %146 to double
  %148 = call double @llvm.fmuladd.f64(double %126, double %133, double 0.000000e+00)
  %149 = call double @sqrt(double noundef %148) #6
  %150 = load float, ptr %13, align 4, !tbaa !9
  %151 = fpext float %150 to double
  %152 = fcmp ogt double %149, %151
  br i1 %152, label %171, label %153

153:                                              ; preds = %119
  %154 = load i32, ptr %15, align 4, !tbaa !5
  %155 = zext i32 %154 to i64
  %156 = getelementptr inbounds float, ptr %112, i64 %155
  %157 = load float, ptr %156, align 4, !tbaa !9
  %158 = call i1 @llvm.is.fpclass.f32(float %157, i32 3)
  br i1 %158, label %171, label %159

159:                                              ; preds = %153
  %160 = load i32, ptr %15, align 4, !tbaa !5
  %161 = zext i32 %160 to i64
  %162 = getelementptr inbounds float, ptr %112, i64 %161
  %163 = load float, ptr %162, align 4, !tbaa !9
  %164 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %164, label %171, label %165

165:                                              ; preds = %159
  %166 = load float, ptr %10, align 4, !tbaa !9
  %167 = call i1 @llvm.is.fpclass.f32(float %166, i32 3)
  br i1 %167, label %171, label %168

168:                                              ; preds = %165
  %169 = load float, ptr %10, align 4, !tbaa !9
  %170 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %170, label %171, label %204

171:                                              ; preds = %168, %165, %159, %153, %119
  %172 = load i32, ptr %15, align 4, !tbaa !5
  %173 = zext i32 %172 to i64
  %174 = getelementptr inbounds float, ptr %112, i64 %173
  %175 = load float, ptr %174, align 4, !tbaa !9
  %176 = load float, ptr %10, align 4, !tbaa !9
  %177 = fsub float %175, %176
  %178 = fpext float %177 to double
  %179 = load i32, ptr %15, align 4, !tbaa !5
  %180 = zext i32 %179 to i64
  %181 = getelementptr inbounds float, ptr %112, i64 %180
  %182 = load float, ptr %181, align 4, !tbaa !9
  %183 = load float, ptr %10, align 4, !tbaa !9
  %184 = fsub float %182, %183
  %185 = fpext float %184 to double
  %186 = load i32, ptr %15, align 4, !tbaa !5
  %187 = zext i32 %186 to i64
  %188 = getelementptr inbounds float, ptr %112, i64 %187
  %189 = load float, ptr %188, align 4, !tbaa !9
  %190 = load float, ptr %10, align 4, !tbaa !9
  %191 = fsub float %189, %190
  %192 = fpext float %191 to double
  %193 = load i32, ptr %15, align 4, !tbaa !5
  %194 = zext i32 %193 to i64
  %195 = getelementptr inbounds float, ptr %112, i64 %194
  %196 = load float, ptr %195, align 4, !tbaa !9
  %197 = load float, ptr %10, align 4, !tbaa !9
  %198 = fsub float %196, %197
  %199 = fpext float %198 to double
  %200 = call double @llvm.fmuladd.f64(double %178, double %185, double 0.000000e+00)
  %201 = call double @sqrt(double noundef %200) #6
  %202 = load float, ptr %13, align 4, !tbaa !9
  %203 = fpext float %202 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str.1, i32 noundef 64, ptr noundef @.str.6, double noundef %201, ptr noundef @.str.7, ptr noundef @.str.8, double noundef %203)
  br label %205

204:                                              ; preds = %168
  call void (...) @liquid_autotest_passed()
  br label %205

205:                                              ; preds = %204, %171
  br label %206

206:                                              ; preds = %205
  %207 = load i32, ptr %15, align 4, !tbaa !5
  %208 = add i32 %207, 1
  store i32 %208, ptr %15, align 4, !tbaa !5
  br label %115, !llvm.loop !15

209:                                              ; preds = %115
  %210 = load ptr, ptr %14, align 8, !tbaa !11
  %211 = call i32 @spgramcf_destroy(ptr noundef %210)
  %212 = load ptr, ptr %17, align 8
  call void @llvm.stackrestore.p0(ptr %212)
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  ret void
}

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

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

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

declare ptr @spgramcf_create_default(i32 noundef) #3

declare ptr @spgramcf_create(i32 noundef, i32 noundef, i32 noundef, i32 noundef) #3

declare i32 @spgramcf_push(ptr noundef, <2 x float> noundef) #3

declare float @randnf(...) #3

declare i64 @spgramcf_get_num_samples(ptr noundef) #3

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

declare void @liquid_autotest_passed(...) #3

declare i64 @spgramcf_get_num_samples_total(ptr noundef) #3

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

declare i32 @spgramcf_get_psd(ptr noundef, ptr noundef) #3

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

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

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

declare i32 @spgramcf_destroy(ptr noundef) #3

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #4

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { "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 = { nocallback nofree nosync nounwind willreturn }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }

!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"}
!15 = distinct !{!15, !14}


; 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"

@liquid_autotest_verbose = external local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [67 x i8], align 1
@liquid_window_str = external local_unnamed_addr global [10 x [2 x ptr]], align 16
@.str.1 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @testbench_spgramcf_noise(i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, float noundef %4) local_unnamed_addr #0 {
  %6 = mul i32 %0, 2000
  %7 = fdiv float %4, 2.000000e+01
  %8 = tail call float @powf(float noundef 1.000000e+01, float noundef %7) #6
  %9 = load i32, ptr @liquid_autotest_verbose, align 4, !tbaa !5
  %.not = icmp eq i32 %9, 0
  br i1 %.not, label %16, label %10

10:                                               ; preds = %5
  %11 = sext i32 %3 to i64
  %12 = getelementptr inbounds [10 x [2 x ptr]], ptr @liquid_window_str, i64 0, i64 %11, i64 1
  %13 = load ptr, ptr %12, align 8, !tbaa !9
  %14 = fpext float %4 to double
  %15 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %0, ptr noundef %13, double noundef %14)
  br label %16

16:                                               ; preds = %10, %5
  %17 = icmp eq i32 %1, 0
  %18 = icmp eq i32 %2, 0
  %or.cond = or i1 %17, %18
  %19 = icmp eq i32 %3, 0
  %or.cond3 = or i1 %or.cond, %19
  br i1 %or.cond3, label %20, label %22

20:                                               ; preds = %16
  %21 = tail call ptr @spgramcf_create_default(i32 noundef %0) #6
  br label %24

22:                                               ; preds = %16
  %23 = tail call ptr @spgramcf_create(i32 noundef %0, i32 noundef %3, i32 noundef %1, i32 noundef %2) #6
  br label %24

24:                                               ; preds = %22, %20
  %.0 = phi ptr [ %21, %20 ], [ %23, %22 ]
  %.not72 = icmp eq i32 %6, 0
  br i1 %.not72, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %24
  %25 = insertelement <2 x float> poison, float %8, i64 0
  %26 = shufflevector <2 x float> %25, <2 x float> poison, <2 x i32> zeroinitializer
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %.05867 = phi i32 [ %38, %.lr.ph ], [ 0, %.lr.ph.preheader ]
  %27 = tail call float (...) @randnf() #6
  %28 = tail call float (...) @randnf() #6
  %29 = fmul float %28, 0.000000e+00
  %30 = fadd float %27, %29
  %31 = insertelement <2 x float> poison, float %30, i64 0
  %32 = insertelement <2 x float> %31, float %28, i64 1
  %33 = fmul <2 x float> %26, %32
  %34 = fpext <2 x float> %33 to <2 x double>
  %35 = fmul <2 x double> %34, <double 0x3FE6A09E667F3BCD, double 0x3FE6A09E667F3BCD>
  %36 = fptrunc <2 x double> %35 to <2 x float>
  %37 = tail call i32 @spgramcf_push(ptr noundef %.0, <2 x float> noundef %36) #6
  %38 = add nuw i32 %.05867, 1
  %exitcond.not = icmp eq i32 %38, %6
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !11

._crit_edge:                                      ; preds = %.lr.ph, %24
  %39 = tail call i64 @spgramcf_get_num_samples(ptr noundef %.0) #6
  %40 = zext i32 %6 to i64
  %.not63 = icmp eq i64 %39, %40
  br i1 %.not63, label %45, label %41

41:                                               ; preds = %._crit_edge
  %42 = tail call i64 @spgramcf_get_num_samples(ptr noundef %.0) #6
  %43 = uitofp i64 %42 to double
  %44 = uitofp i32 %6 to double
  tail call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str.1, i32 noundef 55, ptr noundef nonnull @.str.2, double noundef %43, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, double noundef %44) #6
  br label %46

45:                                               ; preds = %._crit_edge
  tail call void (...) @liquid_autotest_passed() #6
  br label %46

46:                                               ; preds = %45, %41
  %47 = tail call i64 @spgramcf_get_num_samples_total(ptr noundef %.0) #6
  %.not64 = icmp eq i64 %47, %40
  br i1 %.not64, label %52, label %48

48:                                               ; preds = %46
  %49 = tail call i64 @spgramcf_get_num_samples_total(ptr noundef %.0) #6
  %50 = uitofp i64 %49 to double
  %51 = uitofp i32 %6 to double
  tail call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str.1, i32 noundef 56, ptr noundef nonnull @.str.5, double noundef %50, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, double noundef %51) #6
  br label %53

52:                                               ; preds = %46
  tail call void (...) @liquid_autotest_passed() #6
  br label %53

53:                                               ; preds = %52, %48
  %54 = zext i32 %0 to i64
  %55 = alloca float, i64 %54, align 16
  %56 = call i32 @spgramcf_get_psd(ptr noundef %.0, ptr noundef nonnull %55) #6
  %.not73 = icmp eq i32 %0, 0
  br i1 %.not73, label %._crit_edge71, label %.lr.ph70

.lr.ph70:                                         ; preds = %53, %65
  %indvars.iv = phi i64 [ %indvars.iv.next, %65 ], [ 0, %53 ]
  %57 = getelementptr inbounds float, ptr %55, i64 %indvars.iv
  %58 = load float, ptr %57, align 4, !tbaa !13
  %59 = fsub float %58, %4
  %60 = fpext float %59 to double
  %61 = call double @llvm.fmuladd.f64(double %60, double %60, double 0.000000e+00)
  %sqrt = call double @llvm.sqrt.f64(double %61)
  %62 = fcmp ogt double %sqrt, 5.000000e-01
  %or.cond65 = fcmp uno float %58, %4
  %or.cond76 = select i1 %62, i1 true, i1 %or.cond65
  br i1 %or.cond76, label %63, label %64

63:                                               ; preds = %.lr.ph70
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str.1, i32 noundef 64, ptr noundef nonnull @.str.6, double noundef %sqrt, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.8, double noundef 5.000000e-01) #6
  br label %65

64:                                               ; preds = %.lr.ph70
  call void (...) @liquid_autotest_passed() #6
  br label %65

65:                                               ; preds = %63, %64
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond75.not = icmp eq i64 %indvars.iv.next, %54
  br i1 %exitcond75.not, label %._crit_edge71, label %.lr.ph70, !llvm.loop !15

._crit_edge71:                                    ; preds = %65, %53
  %66 = call i32 @spgramcf_destroy(ptr noundef %.0) #6
  ret void
}

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

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

declare ptr @spgramcf_create_default(i32 noundef) local_unnamed_addr #3

declare ptr @spgramcf_create(i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

declare i32 @spgramcf_push(ptr noundef, <2 x float> noundef) local_unnamed_addr #3

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

declare i64 @spgramcf_get_num_samples(ptr noundef) local_unnamed_addr #3

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

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

declare i64 @spgramcf_get_num_samples_total(ptr noundef) local_unnamed_addr #3

declare i32 @spgramcf_get_psd(ptr noundef, ptr noundef) local_unnamed_addr #3

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

declare i32 @spgramcf_destroy(ptr noundef) local_unnamed_addr #3

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

attributes #0 = { 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 #1 = { 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 #2 = { 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 #3 = { "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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }

!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 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = distinct !{!15, !12}


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