; LLVM IR from jgaeddert/liquid-dsp :: src/agc/tests (agc_crcf_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 [88 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [28 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 @agc_crcf_create() #1

declare i32 @agc_crcf_set_bandwidth(ptr noundef, float noundef) #1

declare i32 @agc_crcf_execute(ptr noundef, <2 x float> noundef, ptr 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 @agc_crcf_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
declare <2 x float> @cexpf(<2 x float> noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @autotest_agc_crcf_squelch() #3 {
  %1 = alloca ptr, align 8
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca float, align 4
  %5 = alloca { float, float }, align 4
  %6 = alloca { float, float }, align 4
  %7 = alloca { float, float }, align 4
  %8 = alloca { float, float }, align 4
  %9 = alloca { float, float }, align 4
  %10 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #5
  %11 = call ptr @agc_crcf_create()
  store ptr %11, ptr %1, align 8, !tbaa !5
  %12 = load ptr, ptr %1, align 8, !tbaa !5
  %13 = call i32 @agc_crcf_set_bandwidth(ptr noundef %12, float noundef 2.500000e-01)
  %14 = load ptr, ptr %1, align 8, !tbaa !5
  %15 = call i32 @agc_crcf_set_signal_level(ptr noundef %14, float noundef 0x3F50624DE0000000)
  %16 = load ptr, ptr %1, align 8, !tbaa !5
  %17 = call i32 @agc_crcf_squelch_is_enabled(ptr noundef %16)
  %18 = icmp ne i32 %17, 0
  br i1 %18, label %19, label %23

19:                                               ; preds = %0
  %20 = load ptr, ptr %1, align 8, !tbaa !5
  %21 = call i32 @agc_crcf_squelch_is_enabled(ptr noundef %20)
  %22 = sitofp i32 %21 to double
  call void @liquid_autotest_failed_bool(ptr noundef @.str, i32 noundef 200, ptr noundef @.str.14, double noundef %22, i32 noundef 0)
  br label %24

23:                                               ; preds = %0
  call void (...) @liquid_autotest_passed()
  br label %24

24:                                               ; preds = %23, %19
  %25 = load ptr, ptr %1, align 8, !tbaa !5
  %26 = call i32 @agc_crcf_squelch_enable(ptr noundef %25)
  %27 = load ptr, ptr %1, align 8, !tbaa !5
  %28 = call i32 @agc_crcf_squelch_set_threshold(ptr noundef %27, float noundef -5.000000e+01)
  %29 = load ptr, ptr %1, align 8, !tbaa !5
  %30 = call i32 @agc_crcf_squelch_set_timeout(ptr noundef %29, i32 noundef 100)
  %31 = load ptr, ptr %1, align 8, !tbaa !5
  %32 = call i32 @agc_crcf_squelch_is_enabled(ptr noundef %31)
  %33 = icmp ne i32 %32, 0
  br i1 %33, label %38, label %34

34:                                               ; preds = %24
  %35 = load ptr, ptr %1, align 8, !tbaa !5
  %36 = call i32 @agc_crcf_squelch_is_enabled(ptr noundef %35)
  %37 = sitofp i32 %36 to double
  call void @liquid_autotest_failed_bool(ptr noundef @.str, i32 noundef 204, ptr noundef @.str.14, double noundef %37, i32 noundef 1)
  br label %39

38:                                               ; preds = %24
  call void (...) @liquid_autotest_passed()
  br label %39

39:                                               ; preds = %38, %34
  %40 = load ptr, ptr %1, align 8, !tbaa !5
  %41 = call float @agc_crcf_squelch_get_threshold(ptr noundef %40)
  %42 = fcmp une float %41, -5.000000e+01
  br i1 %42, label %43, label %47

43:                                               ; preds = %39
  %44 = load ptr, ptr %1, align 8, !tbaa !5
  %45 = call float @agc_crcf_squelch_get_threshold(ptr noundef %44)
  %46 = fpext float %45 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 205, ptr noundef @.str.15, double noundef %46, ptr noundef @.str.7, ptr noundef @.str.16, double noundef -5.000000e+01)
  br label %48

47:                                               ; preds = %39
  call void (...) @liquid_autotest_passed()
  br label %48

48:                                               ; preds = %47, %43
  %49 = load ptr, ptr %1, align 8, !tbaa !5
  %50 = call i32 @agc_crcf_squelch_get_timeout(ptr noundef %49)
  %51 = icmp ne i32 %50, 100
  br i1 %51, label %52, label %56

52:                                               ; preds = %48
  %53 = load ptr, ptr %1, align 8, !tbaa !5
  %54 = call i32 @agc_crcf_squelch_get_timeout(ptr noundef %53)
  %55 = uitofp i32 %54 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 206, ptr noundef @.str.17, double noundef %55, ptr noundef @.str.7, ptr noundef @.str.18, double noundef 1.000000e+02)
  br label %57

56:                                               ; preds = %48
  call void (...) @liquid_autotest_passed()
  br label %57

57:                                               ; preds = %56, %52
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 2000, ptr %2, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %58

58:                                               ; preds = %192, %57
  %59 = load i32, ptr %3, align 4, !tbaa !9
  %60 = load i32, ptr %2, align 4, !tbaa !9
  %61 = icmp ult i32 %59, %60
  br i1 %61, label %62, label %195

62:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store float 0.000000e+00, ptr %4, align 4, !tbaa !11
  %63 = load i32, ptr %3, align 4, !tbaa !9
  %64 = icmp ult i32 %63, 500
  br i1 %64, label %65, label %66

65:                                               ; preds = %62
  store float 0x3F50624DE0000000, ptr %4, align 4, !tbaa !11
  br label %102

66:                                               ; preds = %62
  %67 = load i32, ptr %3, align 4, !tbaa !9
  %68 = icmp ult i32 %67, 550
  br i1 %68, label %69, label %80

69:                                               ; preds = %66
  %70 = load i32, ptr %3, align 4, !tbaa !9
  %71 = sub i32 %70, 500
  %72 = uitofp i32 %71 to float
  %73 = fpext float %72 to double
  %74 = fmul double 0x400921FB54442D18, %73
  %75 = fdiv double %74, 5.000000e+01
  %76 = fptrunc double %75 to float
  %77 = call float @cosf(float noundef %76) #5
  %78 = call float @llvm.fmuladd.f32(float -5.000000e-01, float %77, float 5.000000e-01)
  %79 = call float @llvm.fmuladd.f32(float 0x3F826E9780000000, float %78, float 0x3F50624DE0000000)
  store float %79, ptr %4, align 4, !tbaa !11
  br label %101

80:                                               ; preds = %66
  %81 = load i32, ptr %3, align 4, !tbaa !9
  %82 = icmp ult i32 %81, 1450
  br i1 %82, label %83, label %84

83:                                               ; preds = %80
  store float 0x3F847AE140000000, ptr %4, align 4, !tbaa !11
  br label %100

84:                                               ; preds = %80
  %85 = load i32, ptr %3, align 4, !tbaa !9
  %86 = icmp ult i32 %85, 1500
  br i1 %86, label %87, label %98

87:                                               ; preds = %84
  %88 = load i32, ptr %3, align 4, !tbaa !9
  %89 = sub i32 %88, 1450
  %90 = uitofp i32 %89 to float
  %91 = fpext float %90 to double
  %92 = fmul double 0x400921FB54442D18, %91
  %93 = fdiv double %92, 5.000000e+01
  %94 = fptrunc double %93 to float
  %95 = call float @cosf(float noundef %94) #5
  %96 = call float @llvm.fmuladd.f32(float 5.000000e-01, float %95, float 5.000000e-01)
  %97 = call float @llvm.fmuladd.f32(float 0x3F826E9780000000, float %96, float 0x3F50624DE0000000)
  store float %97, ptr %4, align 4, !tbaa !11
  br label %99

98:                                               ; preds = %84
  store float 0x3F50624DE0000000, ptr %4, align 4, !tbaa !11
  br label %99

99:                                               ; preds = %98, %87
  br label %100

100:                                              ; preds = %99, %83
  br label %101

101:                                              ; preds = %100, %69
  br label %102

102:                                              ; preds = %101, %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %103 = load float, ptr %4, align 4, !tbaa !11
  %104 = load i32, ptr %3, align 4, !tbaa !9
  %105 = uitofp i32 %104 to double
  %106 = fmul double 0.000000e+00, %105
  %107 = fmul double 0x3FBF0B412B6B99F8, %105
  %108 = fptrunc double %106 to float
  %109 = fptrunc double %107 to float
  %110 = getelementptr inbounds { float, float }, ptr %6, i32 0, i32 0
  %111 = getelementptr inbounds { float, float }, ptr %6, i32 0, i32 1
  store float %108, ptr %110, align 4
  store float %109, ptr %111, align 4
  %112 = load <2 x float>, ptr %6, align 4
  %113 = call <2 x float> @cexpf(<2 x float> noundef %112) #5
  store <2 x float> %113, ptr %7, align 4
  %114 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 0
  %115 = load float, ptr %114, align 4
  %116 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 1
  %117 = load float, ptr %116, align 4
  %118 = fmul float %103, %115
  %119 = fmul float %103, %117
  %120 = getelementptr inbounds { float, float }, ptr %5, i32 0, i32 0
  %121 = getelementptr inbounds { float, float }, ptr %5, i32 0, i32 1
  store float %118, ptr %120, align 4
  store float %119, ptr %121, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %122 = load ptr, ptr %1, align 8, !tbaa !5
  %123 = getelementptr inbounds { float, float }, ptr %5, i32 0, i32 0
  %124 = load float, ptr %123, align 4
  %125 = getelementptr inbounds { float, float }, ptr %5, i32 0, i32 1
  %126 = load float, ptr %125, align 4
  %127 = getelementptr inbounds { float, float }, ptr %9, i32 0, i32 0
  %128 = getelementptr inbounds { float, float }, ptr %9, i32 0, i32 1
  store float %124, ptr %127, align 4
  store float %126, ptr %128, align 4
  %129 = load <2 x float>, ptr %9, align 4
  %130 = call i32 @agc_crcf_execute(ptr noundef %122, <2 x float> noundef %129, ptr noundef %8)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %131 = load ptr, ptr %1, align 8, !tbaa !5
  %132 = call i32 @agc_crcf_squelch_get_status(ptr noundef %131)
  store i32 %132, ptr %10, align 4, !tbaa !9
  %133 = load i32, ptr %3, align 4, !tbaa !9
  switch i32 %133, label %190 [
    i32 0, label %134
    i32 500, label %142
    i32 600, label %150
    i32 1400, label %158
    i32 1500, label %166
    i32 1600, label %174
    i32 1900, label %182
  ]

134:                                              ; preds = %102
  %135 = load i32, ptr %10, align 4, !tbaa !9
  %136 = icmp ne i32 %135, 1
  br i1 %136, label %137, label %140

137:                                              ; preds = %134
  %138 = load i32, ptr %10, align 4, !tbaa !9
  %139 = sitofp i32 %138 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 233, ptr noundef @.str.19, double noundef %139, ptr noundef @.str.7, ptr noundef @.str.20, double noundef 1.000000e+00)
  br label %141

140:                                              ; preds = %134
  call void (...) @liquid_autotest_passed()
  br label %141

141:                                              ; preds = %140, %137
  br label %191

142:                                              ; preds = %102
  %143 = load i32, ptr %10, align 4, !tbaa !9
  %144 = icmp ne i32 %143, 1
  br i1 %144, label %145, label %148

145:                                              ; preds = %142
  %146 = load i32, ptr %10, align 4, !tbaa !9
  %147 = sitofp i32 %146 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 234, ptr noundef @.str.19, double noundef %147, ptr noundef @.str.7, ptr noundef @.str.20, double noundef 1.000000e+00)
  br label %149

148:                                              ; preds = %142
  call void (...) @liquid_autotest_passed()
  br label %149

149:                                              ; preds = %148, %145
  br label %191

150:                                              ; preds = %102
  %151 = load i32, ptr %10, align 4, !tbaa !9
  %152 = icmp ne i32 %151, 3
  br i1 %152, label %153, label %156

153:                                              ; preds = %150
  %154 = load i32, ptr %10, align 4, !tbaa !9
  %155 = sitofp i32 %154 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 235, ptr noundef @.str.19, double noundef %155, ptr noundef @.str.7, ptr noundef @.str.21, double noundef 3.000000e+00)
  br label %157

156:                                              ; preds = %150
  call void (...) @liquid_autotest_passed()
  br label %157

157:                                              ; preds = %156, %153
  br label %191

158:                                              ; preds = %102
  %159 = load i32, ptr %10, align 4, !tbaa !9
  %160 = icmp ne i32 %159, 3
  br i1 %160, label %161, label %164

161:                                              ; preds = %158
  %162 = load i32, ptr %10, align 4, !tbaa !9
  %163 = sitofp i32 %162 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 236, ptr noundef @.str.19, double noundef %163, ptr noundef @.str.7, ptr noundef @.str.21, double noundef 3.000000e+00)
  br label %165

164:                                              ; preds = %158
  call void (...) @liquid_autotest_passed()
  br label %165

165:                                              ; preds = %164, %161
  br label %191

166:                                              ; preds = %102
  %167 = load i32, ptr %10, align 4, !tbaa !9
  %168 = icmp ne i32 %167, 5
  br i1 %168, label %169, label %172

169:                                              ; preds = %166
  %170 = load i32, ptr %10, align 4, !tbaa !9
  %171 = sitofp i32 %170 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 237, ptr noundef @.str.19, double noundef %171, ptr noundef @.str.7, ptr noundef @.str.22, double noundef 5.000000e+00)
  br label %173

172:                                              ; preds = %166
  call void (...) @liquid_autotest_passed()
  br label %173

173:                                              ; preds = %172, %169
  br label %191

174:                                              ; preds = %102
  %175 = load i32, ptr %10, align 4, !tbaa !9
  %176 = icmp ne i32 %175, 1
  br i1 %176, label %177, label %180

177:                                              ; preds = %174
  %178 = load i32, ptr %10, align 4, !tbaa !9
  %179 = sitofp i32 %178 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 238, ptr noundef @.str.19, double noundef %179, ptr noundef @.str.7, ptr noundef @.str.20, double noundef 1.000000e+00)
  br label %181

180:                                              ; preds = %174
  call void (...) @liquid_autotest_passed()
  br label %181

181:                                              ; preds = %180, %177
  br label %191

182:                                              ; preds = %102
  %183 = load i32, ptr %10, align 4, !tbaa !9
  %184 = icmp ne i32 %183, 1
  br i1 %184, label %185, label %188

185:                                              ; preds = %182
  %186 = load i32, ptr %10, align 4, !tbaa !9
  %187 = sitofp i32 %186 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 239, ptr noundef @.str.19, double noundef %187, ptr noundef @.str.7, ptr noundef @.str.20, double noundef 1.000000e+00)
  br label %189

188:                                              ; preds = %182
  call void (...) @liquid_autotest_passed()
  br label %189

189:                                              ; preds = %188, %185
  br label %191

190:                                              ; preds = %102
  br label %191

191:                                              ; preds = %190, %189, %181, %173, %165, %157, %149, %141
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %192

192:                                              ; preds = %191
  %193 = load i32, ptr %3, align 4, !tbaa !9
  %194 = add i32 %193, 1
  store i32 %194, ptr %3, align 4, !tbaa !9
  br label %58, !llvm.loop !13

195:                                              ; preds = %58
  %196 = load ptr, ptr %1, align 8, !tbaa !5
  %197 = call i32 @agc_crcf_destroy(ptr noundef %196)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #5
  ret void
}

declare i32 @agc_crcf_set_signal_level(ptr noundef, float noundef) #1

declare i32 @agc_crcf_squelch_is_enabled(ptr noundef) #1

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

declare i32 @agc_crcf_squelch_enable(ptr noundef) #1

declare i32 @agc_crcf_squelch_set_threshold(ptr noundef, float noundef) #1

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

declare float @agc_crcf_squelch_get_threshold(ptr noundef) #1

declare i32 @agc_crcf_squelch_get_timeout(ptr noundef) #1

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

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

declare i32 @agc_crcf_squelch_get_status(ptr noundef) #1

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 "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !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 [88 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [28 x i8], align 1

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

declare ptr @agc_crcf_create() local_unnamed_addr #1

declare i32 @agc_crcf_set_bandwidth(ptr noundef, float noundef) local_unnamed_addr #1

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

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

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

declare i32 @agc_crcf_destroy(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind
declare <2 x float> @cexpf(<2 x float> noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @autotest_agc_crcf_squelch() local_unnamed_addr #3 {
  %1 = alloca { float, float }, align 4
  %2 = tail call ptr @agc_crcf_create() #6
  %3 = tail call i32 @agc_crcf_set_bandwidth(ptr noundef %2, float noundef 2.500000e-01) #6
  %4 = tail call i32 @agc_crcf_set_signal_level(ptr noundef %2, float noundef 0x3F50624DE0000000) #6
  %5 = tail call i32 @agc_crcf_squelch_is_enabled(ptr noundef %2) #6
  %.not = icmp eq i32 %5, 0
  br i1 %.not, label %9, label %6

6:                                                ; preds = %0
  %7 = tail call i32 @agc_crcf_squelch_is_enabled(ptr noundef %2) #6
  %8 = sitofp i32 %7 to double
  tail call void @liquid_autotest_failed_bool(ptr noundef nonnull @.str, i32 noundef 200, ptr noundef nonnull @.str.14, double noundef %8, i32 noundef 0) #6
  br label %10

9:                                                ; preds = %0
  tail call void (...) @liquid_autotest_passed() #6
  br label %10

10:                                               ; preds = %9, %6
  %11 = tail call i32 @agc_crcf_squelch_enable(ptr noundef %2) #6
  %12 = tail call i32 @agc_crcf_squelch_set_threshold(ptr noundef %2, float noundef -5.000000e+01) #6
  %13 = tail call i32 @agc_crcf_squelch_set_timeout(ptr noundef %2, i32 noundef 100) #6
  %14 = tail call i32 @agc_crcf_squelch_is_enabled(ptr noundef %2) #6
  %.not48 = icmp eq i32 %14, 0
  br i1 %.not48, label %15, label %18

15:                                               ; preds = %10
  %16 = tail call i32 @agc_crcf_squelch_is_enabled(ptr noundef %2) #6
  %17 = sitofp i32 %16 to double
  tail call void @liquid_autotest_failed_bool(ptr noundef nonnull @.str, i32 noundef 204, ptr noundef nonnull @.str.14, double noundef %17, i32 noundef 1) #6
  br label %19

18:                                               ; preds = %10
  tail call void (...) @liquid_autotest_passed() #6
  br label %19

19:                                               ; preds = %18, %15
  %20 = tail call float @agc_crcf_squelch_get_threshold(ptr noundef %2) #6
  %21 = fcmp une float %20, -5.000000e+01
  br i1 %21, label %22, label %25

22:                                               ; preds = %19
  %23 = tail call float @agc_crcf_squelch_get_threshold(ptr noundef %2) #6
  %24 = fpext float %23 to double
  tail call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 205, ptr noundef nonnull @.str.15, double noundef %24, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.16, double noundef -5.000000e+01) #6
  br label %26

25:                                               ; preds = %19
  tail call void (...) @liquid_autotest_passed() #6
  br label %26

26:                                               ; preds = %25, %22
  %27 = tail call i32 @agc_crcf_squelch_get_timeout(ptr noundef %2) #6
  %.not49 = icmp eq i32 %27, 100
  br i1 %.not49, label %31, label %28

28:                                               ; preds = %26
  %29 = tail call i32 @agc_crcf_squelch_get_timeout(ptr noundef %2) #6
  %30 = uitofp i32 %29 to double
  tail call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 206, ptr noundef nonnull @.str.17, double noundef %30, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.18, double noundef 1.000000e+02) #6
  br label %.preheader

31:                                               ; preds = %26
  tail call void (...) @liquid_autotest_passed() #6
  br label %.preheader

.preheader:                                       ; preds = %31, %28
  br label %32

32:                                               ; preds = %.preheader, %98
  %.057 = phi i32 [ %99, %98 ], [ 0, %.preheader ]
  %33 = icmp ult i32 %.057, 500
  br i1 %33, label %60, label %34

34:                                               ; preds = %32
  %35 = icmp ult i32 %.057, 550
  br i1 %35, label %36, label %46

36:                                               ; preds = %34
  %37 = add nsw i32 %.057, -500
  %38 = uitofp nneg i32 %37 to float
  %39 = fpext float %38 to double
  %40 = fmul double %39, 0x400921FB54442D18
  %41 = fdiv double %40, 5.000000e+01
  %42 = fptrunc double %41 to float
  %43 = call float @cosf(float noundef %42) #6
  %44 = call float @llvm.fmuladd.f32(float %43, float -5.000000e-01, float 5.000000e-01)
  %45 = call float @llvm.fmuladd.f32(float %44, float 0x3F826E9780000000, float 0x3F50624DE0000000)
  br label %60

46:                                               ; preds = %34
  %47 = icmp ult i32 %.057, 1450
  br i1 %47, label %60, label %48

48:                                               ; preds = %46
  %49 = icmp ult i32 %.057, 1500
  br i1 %49, label %50, label %60

50:                                               ; preds = %48
  %51 = add nsw i32 %.057, -1450
  %52 = uitofp nneg i32 %51 to float
  %53 = fpext float %52 to double
  %54 = fmul double %53, 0x400921FB54442D18
  %55 = fdiv double %54, 5.000000e+01
  %56 = fptrunc double %55 to float
  %57 = call float @cosf(float noundef %56) #6
  %58 = call float @llvm.fmuladd.f32(float %57, float 5.000000e-01, float 5.000000e-01)
  %59 = call float @llvm.fmuladd.f32(float %58, float 0x3F826E9780000000, float 0x3F50624DE0000000)
  br label %60

60:                                               ; preds = %48, %46, %32, %36, %50
  %.046 = phi float [ %45, %36 ], [ %59, %50 ], [ 0x3F50624DE0000000, %32 ], [ 0x3F847AE140000000, %46 ], [ 0x3F50624DE0000000, %48 ]
  %61 = uitofp nneg i32 %.057 to double
  %62 = fmul double %61, 0x3FBF0B412B6B99F8
  %63 = fptrunc double %62 to float
  %.sroa.016.4.vec.insert = insertelement <2 x float> <float 0.000000e+00, float poison>, float %63, i64 1
  %64 = call <2 x float> @cexpf(<2 x float> noundef %.sroa.016.4.vec.insert) #6
  %65 = insertelement <2 x float> poison, float %.046, i64 0
  %66 = shufflevector <2 x float> %65, <2 x float> poison, <2 x i32> zeroinitializer
  %67 = fmul <2 x float> %66, %64
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  %68 = call i32 @agc_crcf_execute(ptr noundef %2, <2 x float> noundef %67, ptr noundef nonnull %1) #6
  %69 = call i32 @agc_crcf_squelch_get_status(ptr noundef %2) #6
  switch i32 %.057, label %98 [
    i32 0, label %70
    i32 500, label %74
    i32 600, label %78
    i32 1400, label %82
    i32 1500, label %86
    i32 1600, label %90
    i32 1900, label %94
  ]

70:                                               ; preds = %60
  %.not56 = icmp eq i32 %69, 1
  br i1 %.not56, label %73, label %71

71:                                               ; preds = %70
  %72 = sitofp i32 %69 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 233, ptr noundef nonnull @.str.19, double noundef %72, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.20, double noundef 1.000000e+00) #6
  br label %98

73:                                               ; preds = %70
  call void (...) @liquid_autotest_passed() #6
  br label %98

74:                                               ; preds = %60
  %.not55 = icmp eq i32 %69, 1
  br i1 %.not55, label %77, label %75

75:                                               ; preds = %74
  %76 = sitofp i32 %69 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 234, ptr noundef nonnull @.str.19, double noundef %76, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.20, double noundef 1.000000e+00) #6
  br label %98

77:                                               ; preds = %74
  call void (...) @liquid_autotest_passed() #6
  br label %98

78:                                               ; preds = %60
  %.not54 = icmp eq i32 %69, 3
  br i1 %.not54, label %81, label %79

79:                                               ; preds = %78
  %80 = sitofp i32 %69 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 235, ptr noundef nonnull @.str.19, double noundef %80, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.21, double noundef 3.000000e+00) #6
  br label %98

81:                                               ; preds = %78
  call void (...) @liquid_autotest_passed() #6
  br label %98

82:                                               ; preds = %60
  %.not53 = icmp eq i32 %69, 3
  br i1 %.not53, label %85, label %83

83:                                               ; preds = %82
  %84 = sitofp i32 %69 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 236, ptr noundef nonnull @.str.19, double noundef %84, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.21, double noundef 3.000000e+00) #6
  br label %98

85:                                               ; preds = %82
  call void (...) @liquid_autotest_passed() #6
  br label %98

86:                                               ; preds = %60
  %.not52 = icmp eq i32 %69, 5
  br i1 %.not52, label %89, label %87

87:                                               ; preds = %86
  %88 = sitofp i32 %69 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 237, ptr noundef nonnull @.str.19, double noundef %88, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.22, double noundef 5.000000e+00) #6
  br label %98

89:                                               ; preds = %86
  call void (...) @liquid_autotest_passed() #6
  br label %98

90:                                               ; preds = %60
  %.not51 = icmp eq i32 %69, 1
  br i1 %.not51, label %93, label %91

91:                                               ; preds = %90
  %92 = sitofp i32 %69 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 238, ptr noundef nonnull @.str.19, double noundef %92, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.20, double noundef 1.000000e+00) #6
  br label %98

93:                                               ; preds = %90
  call void (...) @liquid_autotest_passed() #6
  br label %98

94:                                               ; preds = %60
  %.not50 = icmp eq i32 %69, 1
  br i1 %.not50, label %97, label %95

95:                                               ; preds = %94
  %96 = sitofp i32 %69 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 239, ptr noundef nonnull @.str.19, double noundef %96, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.20, double noundef 1.000000e+00) #6
  br label %98

97:                                               ; preds = %94
  call void (...) @liquid_autotest_passed() #6
  br label %98

98:                                               ; preds = %60, %95, %97, %91, %93, %87, %89, %83, %85, %79, %81, %75, %77, %71, %73
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  %99 = add nuw nsw i32 %.057, 1
  %exitcond.not = icmp eq i32 %99, 2000
  br i1 %exitcond.not, label %100, label %32, !llvm.loop !5

100:                                              ; preds = %98
  %101 = call i32 @agc_crcf_destroy(ptr noundef %2) #6
  ret void
}

declare i32 @agc_crcf_set_signal_level(ptr noundef, float noundef) local_unnamed_addr #1

declare i32 @agc_crcf_squelch_is_enabled(ptr noundef) local_unnamed_addr #1

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

declare i32 @agc_crcf_squelch_enable(ptr noundef) local_unnamed_addr #1

declare i32 @agc_crcf_squelch_set_threshold(ptr noundef, float noundef) local_unnamed_addr #1

declare i32 @agc_crcf_squelch_set_timeout(ptr noundef, i32 noundef) local_unnamed_addr #1

declare float @agc_crcf_squelch_get_threshold(ptr noundef) local_unnamed_addr #1

declare i32 @agc_crcf_squelch_get_timeout(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @cosf(float noundef) local_unnamed_addr #4

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

declare i32 @agc_crcf_squelch_get_status(ptr noundef) local_unnamed_addr #1

attributes #0 = { mustprogress 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 "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 = { 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 #5 = { mustprogress 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,LoopUnrollPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass