; 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.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [47 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

; 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) #3

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

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

declare float @agc_crcf_get_rssi(ptr noundef) #1

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

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

; Function Attrs: nounwind uwtable
define dso_local void @autotest_agc_crcf_lock() #4 {
  %1 = alloca float, align 4
  %2 = alloca float, align 4
  %3 = alloca ptr, align 8
  %4 = alloca [4 x { float, float }], align 16
  %5 = alloca [4 x { float, float }], align 16
  %6 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #5
  store float 0x3FB99999A0000000, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store float 0x3F847AE140000000, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %7 = call ptr @agc_crcf_create()
  store ptr %7, ptr %3, align 8, !tbaa !9
  %8 = load ptr, ptr %3, align 8, !tbaa !9
  %9 = call i32 @agc_crcf_set_bandwidth(ptr noundef %8, float noundef 0x3FB99999A0000000)
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #5
  %10 = load float, ptr %1, align 4, !tbaa !5
  %11 = getelementptr inbounds { float, float }, ptr %4, i32 0, i32 0
  %12 = getelementptr inbounds { float, float }, ptr %4, i32 0, i32 1
  store float %10, ptr %11, align 8
  store float 0.000000e+00, ptr %12, align 4
  %13 = getelementptr inbounds { float, float }, ptr %4, i64 1
  %14 = load float, ptr %1, align 4, !tbaa !5
  %15 = getelementptr inbounds { float, float }, ptr %13, i32 0, i32 0
  %16 = getelementptr inbounds { float, float }, ptr %13, i32 0, i32 1
  store float %14, ptr %15, align 8
  store float 0.000000e+00, ptr %16, align 4
  %17 = getelementptr inbounds { float, float }, ptr %4, i64 2
  %18 = load float, ptr %1, align 4, !tbaa !5
  %19 = getelementptr inbounds { float, float }, ptr %17, i32 0, i32 0
  %20 = getelementptr inbounds { float, float }, ptr %17, i32 0, i32 1
  store float %18, ptr %19, align 8
  store float 0.000000e+00, ptr %20, align 4
  %21 = getelementptr inbounds { float, float }, ptr %4, i64 3
  %22 = load float, ptr %1, align 4, !tbaa !5
  %23 = getelementptr inbounds { float, float }, ptr %21, i32 0, i32 0
  %24 = getelementptr inbounds { float, float }, ptr %21, i32 0, i32 1
  store float %22, ptr %23, align 8
  store float 0.000000e+00, ptr %24, align 4
  call void @llvm.lifetime.start.p0(i64 32, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %25 = load ptr, ptr %3, align 8, !tbaa !9
  %26 = call float @agc_crcf_get_bandwidth(ptr noundef %25)
  %27 = fcmp une float %26, 0x3FB99999A0000000
  br i1 %27, label %28, label %32

28:                                               ; preds = %0
  %29 = load ptr, ptr %3, align 8, !tbaa !9
  %30 = call float @agc_crcf_get_bandwidth(ptr noundef %29)
  %31 = fpext float %30 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 263, ptr noundef @.str.23, double noundef %31, ptr noundef @.str.7, ptr noundef @.str.24, double noundef 0x3FB99999A0000000)
  br label %33

32:                                               ; preds = %0
  call void (...) @liquid_autotest_passed()
  br label %33

33:                                               ; preds = %32, %28
  %34 = load ptr, ptr %3, align 8, !tbaa !9
  %35 = call i32 @agc_crcf_print(ptr noundef %34)
  %36 = icmp ne i32 %35, 0
  br i1 %36, label %37, label %41

37:                                               ; preds = %33
  %38 = load ptr, ptr %3, align 8, !tbaa !9
  %39 = call i32 @agc_crcf_print(ptr noundef %38)
  %40 = sitofp i32 %39 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 264, ptr noundef @.str.25, double noundef %40, ptr noundef @.str.7, ptr noundef @.str.26, double noundef 0.000000e+00)
  br label %42

41:                                               ; preds = %33
  call void (...) @liquid_autotest_passed()
  br label %42

42:                                               ; preds = %41, %37
  %43 = load ptr, ptr %3, align 8, !tbaa !9
  %44 = call i32 @agc_crcf_set_rssi(ptr noundef %43, float noundef 0.000000e+00)
  %45 = load ptr, ptr %3, align 8, !tbaa !9
  %46 = call float @agc_crcf_get_rssi(ptr noundef %45)
  %47 = fsub float %46, 0.000000e+00
  %48 = fpext float %47 to double
  %49 = load ptr, ptr %3, align 8, !tbaa !9
  %50 = call float @agc_crcf_get_rssi(ptr noundef %49)
  %51 = fsub float %50, 0.000000e+00
  %52 = fpext float %51 to double
  %53 = load ptr, ptr %3, align 8, !tbaa !9
  %54 = call float @agc_crcf_get_rssi(ptr noundef %53)
  %55 = fsub float %54, 0.000000e+00
  %56 = fpext float %55 to double
  %57 = load ptr, ptr %3, align 8, !tbaa !9
  %58 = call float @agc_crcf_get_rssi(ptr noundef %57)
  %59 = fsub float %58, 0.000000e+00
  %60 = fpext float %59 to double
  %61 = call double @llvm.fmuladd.f64(double %48, double %52, double 0.000000e+00)
  %62 = call double @sqrt(double noundef %61) #5
  %63 = load float, ptr %2, align 4, !tbaa !5
  %64 = fpext float %63 to double
  %65 = fcmp ogt double %62, %64
  br i1 %65, label %78, label %66

66:                                               ; preds = %42
  %67 = load ptr, ptr %3, align 8, !tbaa !9
  %68 = call float @agc_crcf_get_rssi(ptr noundef %67)
  %69 = call i1 @llvm.is.fpclass.f32(float %68, i32 3)
  br i1 %69, label %78, label %70

70:                                               ; preds = %66
  %71 = load ptr, ptr %3, align 8, !tbaa !9
  %72 = call float @agc_crcf_get_rssi(ptr noundef %71)
  %73 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %73, label %78, label %74

74:                                               ; preds = %70
  %75 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %75, label %78, label %76

76:                                               ; preds = %74
  %77 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %77, label %78, label %99

78:                                               ; preds = %76, %74, %70, %66, %42
  %79 = load ptr, ptr %3, align 8, !tbaa !9
  %80 = call float @agc_crcf_get_rssi(ptr noundef %79)
  %81 = fsub float %80, 0.000000e+00
  %82 = fpext float %81 to double
  %83 = load ptr, ptr %3, align 8, !tbaa !9
  %84 = call float @agc_crcf_get_rssi(ptr noundef %83)
  %85 = fsub float %84, 0.000000e+00
  %86 = fpext float %85 to double
  %87 = load ptr, ptr %3, align 8, !tbaa !9
  %88 = call float @agc_crcf_get_rssi(ptr noundef %87)
  %89 = fsub float %88, 0.000000e+00
  %90 = fpext float %89 to double
  %91 = load ptr, ptr %3, align 8, !tbaa !9
  %92 = call float @agc_crcf_get_rssi(ptr noundef %91)
  %93 = fsub float %92, 0.000000e+00
  %94 = fpext float %93 to double
  %95 = call double @llvm.fmuladd.f64(double %82, double %86, double 0.000000e+00)
  %96 = call double @sqrt(double noundef %95) #5
  %97 = load float, ptr %2, align 4, !tbaa !5
  %98 = fpext float %97 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 268, ptr noundef @.str.27, double noundef %96, ptr noundef @.str.2, ptr noundef @.str.3, double noundef %98)
  br label %100

99:                                               ; preds = %76
  call void (...) @liquid_autotest_passed()
  br label %100

100:                                              ; preds = %99, %78
  %101 = load ptr, ptr %3, align 8, !tbaa !9
  %102 = call i32 @agc_crcf_is_locked(ptr noundef %101)
  %103 = icmp ne i32 %102, 0
  br i1 %103, label %104, label %108

104:                                              ; preds = %100
  %105 = load ptr, ptr %3, align 8, !tbaa !9
  %106 = call i32 @agc_crcf_is_locked(ptr noundef %105)
  %107 = sitofp i32 %106 to double
  call void @liquid_autotest_failed_bool(ptr noundef @.str, i32 noundef 269, ptr noundef @.str.28, double noundef %107, i32 noundef 0)
  br label %109

108:                                              ; preds = %100
  call void (...) @liquid_autotest_passed()
  br label %109

109:                                              ; preds = %108, %104
  %110 = load ptr, ptr %3, align 8, !tbaa !9
  %111 = call i32 @agc_crcf_lock(ptr noundef %110)
  %112 = load ptr, ptr %3, align 8, !tbaa !9
  %113 = call i32 @agc_crcf_is_locked(ptr noundef %112)
  %114 = icmp ne i32 %113, 0
  br i1 %114, label %119, label %115

115:                                              ; preds = %109
  %116 = load ptr, ptr %3, align 8, !tbaa !9
  %117 = call i32 @agc_crcf_is_locked(ptr noundef %116)
  %118 = sitofp i32 %117 to double
  call void @liquid_autotest_failed_bool(ptr noundef @.str, i32 noundef 271, ptr noundef @.str.28, double noundef %118, i32 noundef 1)
  br label %120

119:                                              ; preds = %109
  call void (...) @liquid_autotest_passed()
  br label %120

120:                                              ; preds = %119, %115
  store i32 0, ptr %6, align 4, !tbaa !11
  br label %121

121:                                              ; preds = %129, %120
  %122 = load i32, ptr %6, align 4, !tbaa !11
  %123 = icmp ult i32 %122, 256
  br i1 %123, label %124, label %132

124:                                              ; preds = %121
  %125 = load ptr, ptr %3, align 8, !tbaa !9
  %126 = getelementptr inbounds [4 x { float, float }], ptr %4, i64 0, i64 0
  %127 = getelementptr inbounds [4 x { float, float }], ptr %5, i64 0, i64 0
  %128 = call i32 @agc_crcf_execute_block(ptr noundef %125, ptr noundef %126, i32 noundef 4, ptr noundef %127)
  br label %129

129:                                              ; preds = %124
  %130 = load i32, ptr %6, align 4, !tbaa !11
  %131 = add i32 %130, 1
  store i32 %131, ptr %6, align 4, !tbaa !11
  br label %121, !llvm.loop !13

132:                                              ; preds = %121
  %133 = load ptr, ptr %3, align 8, !tbaa !9
  %134 = call float @agc_crcf_get_rssi(ptr noundef %133)
  %135 = fsub float %134, 0.000000e+00
  %136 = fpext float %135 to double
  %137 = load ptr, ptr %3, align 8, !tbaa !9
  %138 = call float @agc_crcf_get_rssi(ptr noundef %137)
  %139 = fsub float %138, 0.000000e+00
  %140 = fpext float %139 to double
  %141 = load ptr, ptr %3, align 8, !tbaa !9
  %142 = call float @agc_crcf_get_rssi(ptr noundef %141)
  %143 = fsub float %142, 0.000000e+00
  %144 = fpext float %143 to double
  %145 = load ptr, ptr %3, align 8, !tbaa !9
  %146 = call float @agc_crcf_get_rssi(ptr noundef %145)
  %147 = fsub float %146, 0.000000e+00
  %148 = fpext float %147 to double
  %149 = call double @llvm.fmuladd.f64(double %136, double %140, double 0.000000e+00)
  %150 = call double @sqrt(double noundef %149) #5
  %151 = load float, ptr %2, align 4, !tbaa !5
  %152 = fpext float %151 to double
  %153 = fcmp ogt double %150, %152
  br i1 %153, label %166, label %154

154:                                              ; preds = %132
  %155 = load ptr, ptr %3, align 8, !tbaa !9
  %156 = call float @agc_crcf_get_rssi(ptr noundef %155)
  %157 = call i1 @llvm.is.fpclass.f32(float %156, i32 3)
  br i1 %157, label %166, label %158

158:                                              ; preds = %154
  %159 = load ptr, ptr %3, align 8, !tbaa !9
  %160 = call float @agc_crcf_get_rssi(ptr noundef %159)
  %161 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %161, label %166, label %162

162:                                              ; preds = %158
  %163 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %163, label %166, label %164

164:                                              ; preds = %162
  %165 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %165, label %166, label %187

166:                                              ; preds = %164, %162, %158, %154, %132
  %167 = load ptr, ptr %3, align 8, !tbaa !9
  %168 = call float @agc_crcf_get_rssi(ptr noundef %167)
  %169 = fsub float %168, 0.000000e+00
  %170 = fpext float %169 to double
  %171 = load ptr, ptr %3, align 8, !tbaa !9
  %172 = call float @agc_crcf_get_rssi(ptr noundef %171)
  %173 = fsub float %172, 0.000000e+00
  %174 = fpext float %173 to double
  %175 = load ptr, ptr %3, align 8, !tbaa !9
  %176 = call float @agc_crcf_get_rssi(ptr noundef %175)
  %177 = fsub float %176, 0.000000e+00
  %178 = fpext float %177 to double
  %179 = load ptr, ptr %3, align 8, !tbaa !9
  %180 = call float @agc_crcf_get_rssi(ptr noundef %179)
  %181 = fsub float %180, 0.000000e+00
  %182 = fpext float %181 to double
  %183 = call double @llvm.fmuladd.f64(double %170, double %174, double 0.000000e+00)
  %184 = call double @sqrt(double noundef %183) #5
  %185 = load float, ptr %2, align 4, !tbaa !5
  %186 = fpext float %185 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 274, ptr noundef @.str.27, double noundef %184, ptr noundef @.str.2, ptr noundef @.str.3, double noundef %186)
  br label %188

187:                                              ; preds = %164
  call void (...) @liquid_autotest_passed()
  br label %188

188:                                              ; preds = %187, %166
  %189 = load ptr, ptr %3, align 8, !tbaa !9
  %190 = call i32 @agc_crcf_unlock(ptr noundef %189)
  %191 = load ptr, ptr %3, align 8, !tbaa !9
  %192 = call i32 @agc_crcf_is_locked(ptr noundef %191)
  %193 = icmp ne i32 %192, 0
  br i1 %193, label %194, label %198

194:                                              ; preds = %188
  %195 = load ptr, ptr %3, align 8, !tbaa !9
  %196 = call i32 @agc_crcf_is_locked(ptr noundef %195)
  %197 = sitofp i32 %196 to double
  call void @liquid_autotest_failed_bool(ptr noundef @.str, i32 noundef 278, ptr noundef @.str.28, double noundef %197, i32 noundef 0)
  br label %199

198:                                              ; preds = %188
  call void (...) @liquid_autotest_passed()
  br label %199

199:                                              ; preds = %198, %194
  %200 = load ptr, ptr %3, align 8, !tbaa !9
  %201 = getelementptr inbounds [4 x { float, float }], ptr %4, i64 0, i64 0
  %202 = call i32 @agc_crcf_init(ptr noundef %200, ptr noundef %201, i32 noundef 4)
  %203 = load ptr, ptr %3, align 8, !tbaa !9
  %204 = call float @agc_crcf_get_rssi(ptr noundef %203)
  %205 = load float, ptr %1, align 4, !tbaa !5
  %206 = call float @log10f(float noundef %205) #5
  %207 = call float @llvm.fmuladd.f32(float -2.000000e+01, float %206, float %204)
  %208 = fpext float %207 to double
  %209 = load ptr, ptr %3, align 8, !tbaa !9
  %210 = call float @agc_crcf_get_rssi(ptr noundef %209)
  %211 = load float, ptr %1, align 4, !tbaa !5
  %212 = call float @log10f(float noundef %211) #5
  %213 = call float @llvm.fmuladd.f32(float -2.000000e+01, float %212, float %210)
  %214 = fpext float %213 to double
  %215 = load ptr, ptr %3, align 8, !tbaa !9
  %216 = call float @agc_crcf_get_rssi(ptr noundef %215)
  %217 = load float, ptr %1, align 4, !tbaa !5
  %218 = call float @log10f(float noundef %217) #5
  %219 = call float @llvm.fmuladd.f32(float -2.000000e+01, float %218, float %216)
  %220 = fpext float %219 to double
  %221 = load ptr, ptr %3, align 8, !tbaa !9
  %222 = call float @agc_crcf_get_rssi(ptr noundef %221)
  %223 = load float, ptr %1, align 4, !tbaa !5
  %224 = call float @log10f(float noundef %223) #5
  %225 = call float @llvm.fmuladd.f32(float -2.000000e+01, float %224, float %222)
  %226 = fpext float %225 to double
  %227 = call double @llvm.fmuladd.f64(double %208, double %214, double 0.000000e+00)
  %228 = call double @sqrt(double noundef %227) #5
  %229 = load float, ptr %2, align 4, !tbaa !5
  %230 = fpext float %229 to double
  %231 = fcmp ogt double %228, %230
  br i1 %231, label %250, label %232

232:                                              ; preds = %199
  %233 = load ptr, ptr %3, align 8, !tbaa !9
  %234 = call float @agc_crcf_get_rssi(ptr noundef %233)
  %235 = call i1 @llvm.is.fpclass.f32(float %234, i32 3)
  br i1 %235, label %250, label %236

236:                                              ; preds = %232
  %237 = load ptr, ptr %3, align 8, !tbaa !9
  %238 = call float @agc_crcf_get_rssi(ptr noundef %237)
  %239 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %239, label %250, label %240

240:                                              ; preds = %236
  %241 = load float, ptr %1, align 4, !tbaa !5
  %242 = call float @log10f(float noundef %241) #5
  %243 = fmul float 2.000000e+01, %242
  %244 = call i1 @llvm.is.fpclass.f32(float %243, i32 3)
  br i1 %244, label %250, label %245

245:                                              ; preds = %240
  %246 = load float, ptr %1, align 4, !tbaa !5
  %247 = call float @log10f(float noundef %246) #5
  %248 = fmul float 2.000000e+01, %247
  %249 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %249, label %250, label %279

250:                                              ; preds = %245, %240, %236, %232, %199
  %251 = load ptr, ptr %3, align 8, !tbaa !9
  %252 = call float @agc_crcf_get_rssi(ptr noundef %251)
  %253 = load float, ptr %1, align 4, !tbaa !5
  %254 = call float @log10f(float noundef %253) #5
  %255 = call float @llvm.fmuladd.f32(float -2.000000e+01, float %254, float %252)
  %256 = fpext float %255 to double
  %257 = load ptr, ptr %3, align 8, !tbaa !9
  %258 = call float @agc_crcf_get_rssi(ptr noundef %257)
  %259 = load float, ptr %1, align 4, !tbaa !5
  %260 = call float @log10f(float noundef %259) #5
  %261 = call float @llvm.fmuladd.f32(float -2.000000e+01, float %260, float %258)
  %262 = fpext float %261 to double
  %263 = load ptr, ptr %3, align 8, !tbaa !9
  %264 = call float @agc_crcf_get_rssi(ptr noundef %263)
  %265 = load float, ptr %1, align 4, !tbaa !5
  %266 = call float @log10f(float noundef %265) #5
  %267 = call float @llvm.fmuladd.f32(float -2.000000e+01, float %266, float %264)
  %268 = fpext float %267 to double
  %269 = load ptr, ptr %3, align 8, !tbaa !9
  %270 = call float @agc_crcf_get_rssi(ptr noundef %269)
  %271 = load float, ptr %1, align 4, !tbaa !5
  %272 = call float @log10f(float noundef %271) #5
  %273 = call float @llvm.fmuladd.f32(float -2.000000e+01, float %272, float %270)
  %274 = fpext float %273 to double
  %275 = call double @llvm.fmuladd.f64(double %256, double %262, double 0.000000e+00)
  %276 = call double @sqrt(double noundef %275) #5
  %277 = load float, ptr %2, align 4, !tbaa !5
  %278 = fpext float %277 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 281, ptr noundef @.str.29, double noundef %276, ptr noundef @.str.2, ptr noundef @.str.3, double noundef %278)
  br label %280

279:                                              ; preds = %245
  call void (...) @liquid_autotest_passed()
  br label %280

280:                                              ; preds = %279, %250
  %281 = load ptr, ptr %3, align 8, !tbaa !9
  %282 = call i32 @agc_crcf_destroy(ptr noundef %281)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #5
  ret void
}

declare float @agc_crcf_get_bandwidth(ptr noundef) #1

declare i32 @agc_crcf_print(ptr noundef) #1

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

declare i32 @agc_crcf_is_locked(ptr noundef) #1

declare i32 @agc_crcf_lock(ptr noundef) #1

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

declare i32 @agc_crcf_unlock(ptr noundef) #1

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

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

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 #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 = !{!"float", !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 = !{!12, !12, i64 0}
!12 = !{!"int", !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.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [47 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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #2

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

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

declare float @agc_crcf_get_rssi(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

; Function Attrs: nounwind uwtable
define dso_local void @autotest_agc_crcf_lock() local_unnamed_addr #4 {
  %1 = alloca [4 x { float, float }], align 16
  %2 = alloca [4 x { float, float }], align 16
  %3 = tail call ptr @agc_crcf_create() #5
  %4 = tail call i32 @agc_crcf_set_bandwidth(ptr noundef %3, float noundef 0x3FB99999A0000000) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #5
  store <4 x float> <float 0x3FB99999A0000000, float 0.000000e+00, float 0x3FB99999A0000000, float 0.000000e+00>, ptr %1, align 16
  %5 = getelementptr inbounds i8, ptr %1, i64 16
  store <4 x float> <float 0x3FB99999A0000000, float 0.000000e+00, float 0x3FB99999A0000000, float 0.000000e+00>, ptr %5, align 16
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #5
  %6 = tail call float @agc_crcf_get_bandwidth(ptr noundef %3) #5
  %7 = fcmp une float %6, 0x3FB99999A0000000
  br i1 %7, label %8, label %11

8:                                                ; preds = %0
  %9 = tail call float @agc_crcf_get_bandwidth(ptr noundef %3) #5
  %10 = fpext float %9 to double
  tail call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 263, ptr noundef nonnull @.str.23, double noundef %10, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.24, double noundef 0x3FB99999A0000000) #5
  br label %12

11:                                               ; preds = %0
  tail call void (...) @liquid_autotest_passed() #5
  br label %12

12:                                               ; preds = %11, %8
  %13 = tail call i32 @agc_crcf_print(ptr noundef %3) #5
  %.not = icmp eq i32 %13, 0
  br i1 %.not, label %17, label %14

14:                                               ; preds = %12
  %15 = tail call i32 @agc_crcf_print(ptr noundef %3) #5
  %16 = sitofp i32 %15 to double
  tail call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 264, ptr noundef nonnull @.str.25, double noundef %16, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.26, double noundef 0.000000e+00) #5
  br label %18

17:                                               ; preds = %12
  tail call void (...) @liquid_autotest_passed() #5
  br label %18

18:                                               ; preds = %17, %14
  %19 = tail call i32 @agc_crcf_set_rssi(ptr noundef %3, float noundef 0.000000e+00) #5
  %20 = tail call float @agc_crcf_get_rssi(ptr noundef %3) #5
  %21 = fpext float %20 to double
  %22 = tail call float @agc_crcf_get_rssi(ptr noundef %3) #5
  %23 = fpext float %22 to double
  %24 = tail call float @agc_crcf_get_rssi(ptr noundef %3) #5
  %25 = tail call float @agc_crcf_get_rssi(ptr noundef %3) #5
  %26 = tail call double @llvm.fmuladd.f64(double %21, double %23, double 0.000000e+00)
  %27 = tail call double @sqrt(double noundef %26) #5
  %28 = fcmp ogt double %27, 0x3F847AE140000000
  br i1 %28, label %34, label %29

29:                                               ; preds = %18
  %30 = tail call float @agc_crcf_get_rssi(ptr noundef %3) #5
  %31 = fcmp uno float %30, 0.000000e+00
  br i1 %31, label %34, label %32

32:                                               ; preds = %29
  %33 = tail call float @agc_crcf_get_rssi(ptr noundef %3) #5
  tail call void (...) @liquid_autotest_passed() #5
  br label %43

34:                                               ; preds = %29, %18
  %35 = tail call float @agc_crcf_get_rssi(ptr noundef %3) #5
  %36 = fpext float %35 to double
  %37 = tail call float @agc_crcf_get_rssi(ptr noundef %3) #5
  %38 = fpext float %37 to double
  %39 = tail call float @agc_crcf_get_rssi(ptr noundef %3) #5
  %40 = tail call float @agc_crcf_get_rssi(ptr noundef %3) #5
  %41 = tail call double @llvm.fmuladd.f64(double %36, double %38, double 0.000000e+00)
  %42 = tail call double @sqrt(double noundef %41) #5
  tail call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 268, ptr noundef nonnull @.str.27, double noundef %42, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, double noundef 0x3F847AE140000000) #5
  br label %43

43:                                               ; preds = %32, %34
  %44 = tail call i32 @agc_crcf_is_locked(ptr noundef %3) #5
  %.not68 = icmp eq i32 %44, 0
  br i1 %.not68, label %48, label %45

45:                                               ; preds = %43
  %46 = tail call i32 @agc_crcf_is_locked(ptr noundef %3) #5
  %47 = sitofp i32 %46 to double
  tail call void @liquid_autotest_failed_bool(ptr noundef nonnull @.str, i32 noundef 269, ptr noundef nonnull @.str.28, double noundef %47, i32 noundef 0) #5
  br label %49

48:                                               ; preds = %43
  tail call void (...) @liquid_autotest_passed() #5
  br label %49

49:                                               ; preds = %48, %45
  %50 = tail call i32 @agc_crcf_lock(ptr noundef %3) #5
  %51 = tail call i32 @agc_crcf_is_locked(ptr noundef %3) #5
  %.not69 = icmp eq i32 %51, 0
  br i1 %.not69, label %52, label %55

52:                                               ; preds = %49
  %53 = tail call i32 @agc_crcf_is_locked(ptr noundef %3) #5
  %54 = sitofp i32 %53 to double
  tail call void @liquid_autotest_failed_bool(ptr noundef nonnull @.str, i32 noundef 271, ptr noundef nonnull @.str.28, double noundef %54, i32 noundef 1) #5
  br label %.preheader

55:                                               ; preds = %49
  tail call void (...) @liquid_autotest_passed() #5
  br label %.preheader

.preheader:                                       ; preds = %55, %52
  br label %56

56:                                               ; preds = %.preheader, %56
  %.071 = phi i32 [ %58, %56 ], [ 0, %.preheader ]
  %57 = call i32 @agc_crcf_execute_block(ptr noundef %3, ptr noundef nonnull %1, i32 noundef 4, ptr noundef nonnull %2) #5
  %58 = add nuw nsw i32 %.071, 1
  %exitcond.not = icmp eq i32 %58, 256
  br i1 %exitcond.not, label %59, label %56, !llvm.loop !5

59:                                               ; preds = %56
  %60 = call float @agc_crcf_get_rssi(ptr noundef %3) #5
  %61 = fpext float %60 to double
  %62 = call float @agc_crcf_get_rssi(ptr noundef %3) #5
  %63 = fpext float %62 to double
  %64 = call float @agc_crcf_get_rssi(ptr noundef %3) #5
  %65 = call float @agc_crcf_get_rssi(ptr noundef %3) #5
  %66 = call double @llvm.fmuladd.f64(double %61, double %63, double 0.000000e+00)
  %67 = call double @sqrt(double noundef %66) #5
  %68 = fcmp ogt double %67, 0x3F847AE140000000
  br i1 %68, label %74, label %69

69:                                               ; preds = %59
  %70 = call float @agc_crcf_get_rssi(ptr noundef %3) #5
  %71 = fcmp uno float %70, 0.000000e+00
  br i1 %71, label %74, label %72

72:                                               ; preds = %69
  %73 = call float @agc_crcf_get_rssi(ptr noundef %3) #5
  call void (...) @liquid_autotest_passed() #5
  br label %83

74:                                               ; preds = %69, %59
  %75 = call float @agc_crcf_get_rssi(ptr noundef %3) #5
  %76 = fpext float %75 to double
  %77 = call float @agc_crcf_get_rssi(ptr noundef %3) #5
  %78 = fpext float %77 to double
  %79 = call float @agc_crcf_get_rssi(ptr noundef %3) #5
  %80 = call float @agc_crcf_get_rssi(ptr noundef %3) #5
  %81 = call double @llvm.fmuladd.f64(double %76, double %78, double 0.000000e+00)
  %82 = call double @sqrt(double noundef %81) #5
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 274, ptr noundef nonnull @.str.27, double noundef %82, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, double noundef 0x3F847AE140000000) #5
  br label %83

83:                                               ; preds = %72, %74
  %84 = call i32 @agc_crcf_unlock(ptr noundef %3) #5
  %85 = call i32 @agc_crcf_is_locked(ptr noundef %3) #5
  %.not70 = icmp eq i32 %85, 0
  br i1 %.not70, label %89, label %86

86:                                               ; preds = %83
  %87 = call i32 @agc_crcf_is_locked(ptr noundef %3) #5
  %88 = sitofp i32 %87 to double
  call void @liquid_autotest_failed_bool(ptr noundef nonnull @.str, i32 noundef 278, ptr noundef nonnull @.str.28, double noundef %88, i32 noundef 0) #5
  br label %90

89:                                               ; preds = %83
  call void (...) @liquid_autotest_passed() #5
  br label %90

90:                                               ; preds = %89, %86
  %91 = call i32 @agc_crcf_init(ptr noundef %3, ptr noundef nonnull %1, i32 noundef 4) #5
  %92 = call float @agc_crcf_get_rssi(ptr noundef %3) #5
  %93 = fadd float %92, 2.000000e+01
  %94 = fpext float %93 to double
  %95 = call float @agc_crcf_get_rssi(ptr noundef %3) #5
  %96 = fadd float %95, 2.000000e+01
  %97 = fpext float %96 to double
  %98 = call float @agc_crcf_get_rssi(ptr noundef %3) #5
  %99 = call float @agc_crcf_get_rssi(ptr noundef %3) #5
  %100 = call double @llvm.fmuladd.f64(double %94, double %97, double 0.000000e+00)
  %101 = call double @sqrt(double noundef %100) #5
  %102 = fcmp ogt double %101, 0x3F847AE140000000
  br i1 %102, label %108, label %103

103:                                              ; preds = %90
  %104 = call float @agc_crcf_get_rssi(ptr noundef %3) #5
  %105 = fcmp uno float %104, 0.000000e+00
  br i1 %105, label %108, label %106

106:                                              ; preds = %103
  %107 = call float @agc_crcf_get_rssi(ptr noundef %3) #5
  call void (...) @liquid_autotest_passed() #5
  br label %119

108:                                              ; preds = %103, %90
  %109 = call float @agc_crcf_get_rssi(ptr noundef %3) #5
  %110 = fadd float %109, 2.000000e+01
  %111 = fpext float %110 to double
  %112 = call float @agc_crcf_get_rssi(ptr noundef %3) #5
  %113 = fadd float %112, 2.000000e+01
  %114 = fpext float %113 to double
  %115 = call float @agc_crcf_get_rssi(ptr noundef %3) #5
  %116 = call float @agc_crcf_get_rssi(ptr noundef %3) #5
  %117 = call double @llvm.fmuladd.f64(double %111, double %114, double 0.000000e+00)
  %118 = call double @sqrt(double noundef %117) #5
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 281, ptr noundef nonnull @.str.29, double noundef %118, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, double noundef 0x3F847AE140000000) #5
  br label %119

119:                                              ; preds = %106, %108
  %120 = call i32 @agc_crcf_destroy(ptr noundef %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #5
  ret void
}

declare float @agc_crcf_get_bandwidth(ptr noundef) local_unnamed_addr #1

declare i32 @agc_crcf_print(ptr noundef) local_unnamed_addr #1

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

declare i32 @agc_crcf_is_locked(ptr noundef) local_unnamed_addr #1

declare i32 @agc_crcf_lock(ptr noundef) local_unnamed_addr #1

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

declare i32 @agc_crcf_unlock(ptr noundef) local_unnamed_addr #1

declare i32 @agc_crcf_init(ptr noundef, ptr noundef, i32 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 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 #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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}


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