; 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.1 = external hidden unnamed_addr constant [24 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.4 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @autotest_agc_crcf_dc_gain_control() #0 {
  %1 = alloca float, align 4
  %2 = alloca float, align 4
  %3 = alloca float, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca { float, float }, align 4
  %7 = alloca { float, float }, align 4
  %8 = alloca { float, float }, 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 0x3FB99999A0000000, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store float 0x3F50624DE0000000, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %9 = call ptr @agc_crcf_create()
  store ptr %9, ptr %4, align 8, !tbaa !9
  %10 = load ptr, ptr %4, align 8, !tbaa !9
  %11 = load float, ptr %2, align 4, !tbaa !5
  %12 = call i32 @agc_crcf_set_bandwidth(ptr noundef %10, float noundef %11)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %13 = load float, ptr %1, align 4, !tbaa !5
  %14 = getelementptr inbounds { float, float }, ptr %6, i32 0, i32 0
  %15 = getelementptr inbounds { float, float }, ptr %6, i32 0, i32 1
  store float %13, ptr %14, align 4
  store float 0.000000e+00, ptr %15, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store i32 0, ptr %5, align 4, !tbaa !11
  br label %16

16:                                               ; preds = %29, %0
  %17 = load i32, ptr %5, align 4, !tbaa !11
  %18 = icmp ult i32 %17, 256
  br i1 %18, label %19, label %32

19:                                               ; preds = %16
  %20 = load ptr, ptr %4, align 8, !tbaa !9
  %21 = getelementptr inbounds { float, float }, ptr %6, i32 0, i32 0
  %22 = load float, ptr %21, align 4
  %23 = getelementptr inbounds { float, float }, ptr %6, i32 0, i32 1
  %24 = load float, ptr %23, align 4
  %25 = getelementptr inbounds { float, float }, ptr %8, i32 0, i32 0
  %26 = getelementptr inbounds { float, float }, ptr %8, i32 0, i32 1
  store float %22, ptr %25, align 4
  store float %24, ptr %26, align 4
  %27 = load <2 x float>, ptr %8, align 4
  %28 = call i32 @agc_crcf_execute(ptr noundef %20, <2 x float> noundef %27, ptr noundef %7)
  br label %29

29:                                               ; preds = %19
  %30 = load i32, ptr %5, align 4, !tbaa !11
  %31 = add i32 %30, 1
  store i32 %31, ptr %5, align 4, !tbaa !11
  br label %16, !llvm.loop !13

32:                                               ; preds = %16
  %33 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 0
  %34 = load float, ptr %33, align 4
  %35 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 1
  %36 = load float, ptr %35, align 4
  %37 = fsub float %34, 1.000000e+00
  %38 = fpext float %37 to double
  %39 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 0
  %40 = load float, ptr %39, align 4
  %41 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 1
  %42 = load float, ptr %41, align 4
  %43 = fsub float %40, 1.000000e+00
  %44 = fpext float %43 to double
  %45 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 0
  %46 = load float, ptr %45, align 4
  %47 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 1
  %48 = load float, ptr %47, align 4
  %49 = fsub float %46, 1.000000e+00
  %50 = fpext float %49 to double
  %51 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 0
  %52 = load float, ptr %51, align 4
  %53 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 1
  %54 = load float, ptr %53, align 4
  %55 = fsub float %52, 1.000000e+00
  %56 = fpext float %55 to double
  %57 = call double @llvm.fmuladd.f64(double %38, double %44, double 0.000000e+00)
  %58 = call double @sqrt(double noundef %57) #5
  %59 = load float, ptr %3, align 4, !tbaa !5
  %60 = fpext float %59 to double
  %61 = fcmp ogt double %58, %60
  br i1 %61, label %78, label %62

62:                                               ; preds = %32
  %63 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 0
  %64 = load float, ptr %63, align 4
  %65 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 1
  %66 = load float, ptr %65, align 4
  %67 = call i1 @llvm.is.fpclass.f32(float %64, i32 3)
  br i1 %67, label %78, label %68

68:                                               ; preds = %62
  %69 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 0
  %70 = load float, ptr %69, align 4
  %71 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 1
  %72 = load float, ptr %71, align 4
  %73 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %73, label %78, label %74

74:                                               ; preds = %68
  %75 = call i1 @llvm.is.fpclass.f32(float 1.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 %107

78:                                               ; preds = %76, %74, %68, %62, %32
  %79 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 0
  %80 = load float, ptr %79, align 4
  %81 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 1
  %82 = load float, ptr %81, align 4
  %83 = fsub float %80, 1.000000e+00
  %84 = fpext float %83 to double
  %85 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 0
  %86 = load float, ptr %85, align 4
  %87 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 1
  %88 = load float, ptr %87, align 4
  %89 = fsub float %86, 1.000000e+00
  %90 = fpext float %89 to double
  %91 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 0
  %92 = load float, ptr %91, align 4
  %93 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 1
  %94 = load float, ptr %93, align 4
  %95 = fsub float %92, 1.000000e+00
  %96 = fpext float %95 to double
  %97 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 0
  %98 = load float, ptr %97, align 4
  %99 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 1
  %100 = load float, ptr %99, align 4
  %101 = fsub float %98, 1.000000e+00
  %102 = fpext float %101 to double
  %103 = call double @llvm.fmuladd.f64(double %84, double %90, double 0.000000e+00)
  %104 = call double @sqrt(double noundef %103) #5
  %105 = load float, ptr %3, align 4, !tbaa !5
  %106 = fpext float %105 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 45, ptr noundef @.str.1, double noundef %104, ptr noundef @.str.2, ptr noundef @.str.3, double noundef %106)
  br label %108

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

108:                                              ; preds = %107, %78
  %109 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 0
  %110 = load float, ptr %109, align 4
  %111 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 1
  %112 = load float, ptr %111, align 4
  %113 = fsub float %112, 0.000000e+00
  %114 = fpext float %113 to double
  %115 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 0
  %116 = load float, ptr %115, align 4
  %117 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 1
  %118 = load float, ptr %117, align 4
  %119 = fsub float %118, 0.000000e+00
  %120 = fpext float %119 to double
  %121 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 0
  %122 = load float, ptr %121, align 4
  %123 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 1
  %124 = load float, ptr %123, align 4
  %125 = fsub float %124, 0.000000e+00
  %126 = fpext float %125 to double
  %127 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 0
  %128 = load float, ptr %127, align 4
  %129 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 1
  %130 = load float, ptr %129, align 4
  %131 = fsub float %130, 0.000000e+00
  %132 = fpext float %131 to double
  %133 = call double @llvm.fmuladd.f64(double %114, double %120, double 0.000000e+00)
  %134 = call double @sqrt(double noundef %133) #5
  %135 = load float, ptr %3, align 4, !tbaa !5
  %136 = fpext float %135 to double
  %137 = fcmp ogt double %134, %136
  br i1 %137, label %154, label %138

138:                                              ; preds = %108
  %139 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 0
  %140 = load float, ptr %139, align 4
  %141 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 1
  %142 = load float, ptr %141, align 4
  %143 = call i1 @llvm.is.fpclass.f32(float %142, i32 3)
  br i1 %143, label %154, label %144

144:                                              ; preds = %138
  %145 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 0
  %146 = load float, ptr %145, align 4
  %147 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 1
  %148 = load float, ptr %147, align 4
  %149 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %149, label %154, label %150

150:                                              ; preds = %144
  %151 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %151, label %154, label %152

152:                                              ; preds = %150
  %153 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %153, label %154, label %183

154:                                              ; preds = %152, %150, %144, %138, %108
  %155 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 0
  %156 = load float, ptr %155, align 4
  %157 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 1
  %158 = load float, ptr %157, align 4
  %159 = fsub float %158, 0.000000e+00
  %160 = fpext float %159 to double
  %161 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 0
  %162 = load float, ptr %161, align 4
  %163 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 1
  %164 = load float, ptr %163, align 4
  %165 = fsub float %164, 0.000000e+00
  %166 = fpext float %165 to double
  %167 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 0
  %168 = load float, ptr %167, align 4
  %169 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 1
  %170 = load float, ptr %169, align 4
  %171 = fsub float %170, 0.000000e+00
  %172 = fpext float %171 to double
  %173 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 0
  %174 = load float, ptr %173, align 4
  %175 = getelementptr inbounds { float, float }, ptr %7, i32 0, i32 1
  %176 = load float, ptr %175, align 4
  %177 = fsub float %176, 0.000000e+00
  %178 = fpext float %177 to double
  %179 = call double @llvm.fmuladd.f64(double %160, double %166, double 0.000000e+00)
  %180 = call double @sqrt(double noundef %179) #5
  %181 = load float, ptr %3, align 4, !tbaa !5
  %182 = fpext float %181 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 46, ptr noundef @.str.4, double noundef %180, ptr noundef @.str.2, ptr noundef @.str.3, double noundef %182)
  br label %184

183:                                              ; preds = %152
  call void (...) @liquid_autotest_passed()
  br label %184

184:                                              ; preds = %183, %154
  %185 = load ptr, ptr %4, align 8, !tbaa !9
  %186 = call float @agc_crcf_get_gain(ptr noundef %185)
  %187 = load float, ptr %1, align 4, !tbaa !5
  %188 = fdiv float 1.000000e+00, %187
  %189 = fsub float %186, %188
  %190 = fpext float %189 to double
  %191 = load ptr, ptr %4, align 8, !tbaa !9
  %192 = call float @agc_crcf_get_gain(ptr noundef %191)
  %193 = load float, ptr %1, align 4, !tbaa !5
  %194 = fdiv float 1.000000e+00, %193
  %195 = fsub float %192, %194
  %196 = fpext float %195 to double
  %197 = load ptr, ptr %4, align 8, !tbaa !9
  %198 = call float @agc_crcf_get_gain(ptr noundef %197)
  %199 = load float, ptr %1, align 4, !tbaa !5
  %200 = fdiv float 1.000000e+00, %199
  %201 = fsub float %198, %200
  %202 = fpext float %201 to double
  %203 = load ptr, ptr %4, align 8, !tbaa !9
  %204 = call float @agc_crcf_get_gain(ptr noundef %203)
  %205 = load float, ptr %1, align 4, !tbaa !5
  %206 = fdiv float 1.000000e+00, %205
  %207 = fsub float %204, %206
  %208 = fpext float %207 to double
  %209 = call double @llvm.fmuladd.f64(double %190, double %196, double 0.000000e+00)
  %210 = call double @sqrt(double noundef %209) #5
  %211 = load float, ptr %3, align 4, !tbaa !5
  %212 = fpext float %211 to double
  %213 = fcmp ogt double %210, %212
  br i1 %213, label %230, label %214

214:                                              ; preds = %184
  %215 = load ptr, ptr %4, align 8, !tbaa !9
  %216 = call float @agc_crcf_get_gain(ptr noundef %215)
  %217 = call i1 @llvm.is.fpclass.f32(float %216, i32 3)
  br i1 %217, label %230, label %218

218:                                              ; preds = %214
  %219 = load ptr, ptr %4, align 8, !tbaa !9
  %220 = call float @agc_crcf_get_gain(ptr noundef %219)
  %221 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %221, label %230, label %222

222:                                              ; preds = %218
  %223 = load float, ptr %1, align 4, !tbaa !5
  %224 = fdiv float 1.000000e+00, %223
  %225 = call i1 @llvm.is.fpclass.f32(float %224, i32 3)
  br i1 %225, label %230, label %226

226:                                              ; preds = %222
  %227 = load float, ptr %1, align 4, !tbaa !5
  %228 = fdiv float 1.000000e+00, %227
  %229 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %229, label %230, label %259

230:                                              ; preds = %226, %222, %218, %214, %184
  %231 = load ptr, ptr %4, align 8, !tbaa !9
  %232 = call float @agc_crcf_get_gain(ptr noundef %231)
  %233 = load float, ptr %1, align 4, !tbaa !5
  %234 = fdiv float 1.000000e+00, %233
  %235 = fsub float %232, %234
  %236 = fpext float %235 to double
  %237 = load ptr, ptr %4, align 8, !tbaa !9
  %238 = call float @agc_crcf_get_gain(ptr noundef %237)
  %239 = load float, ptr %1, align 4, !tbaa !5
  %240 = fdiv float 1.000000e+00, %239
  %241 = fsub float %238, %240
  %242 = fpext float %241 to double
  %243 = load ptr, ptr %4, align 8, !tbaa !9
  %244 = call float @agc_crcf_get_gain(ptr noundef %243)
  %245 = load float, ptr %1, align 4, !tbaa !5
  %246 = fdiv float 1.000000e+00, %245
  %247 = fsub float %244, %246
  %248 = fpext float %247 to double
  %249 = load ptr, ptr %4, align 8, !tbaa !9
  %250 = call float @agc_crcf_get_gain(ptr noundef %249)
  %251 = load float, ptr %1, align 4, !tbaa !5
  %252 = fdiv float 1.000000e+00, %251
  %253 = fsub float %250, %252
  %254 = fpext float %253 to double
  %255 = call double @llvm.fmuladd.f64(double %236, double %242, double 0.000000e+00)
  %256 = call double @sqrt(double noundef %255) #5
  %257 = load float, ptr %3, align 4, !tbaa !5
  %258 = fpext float %257 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 47, ptr noundef @.str.5, double noundef %256, ptr noundef @.str.2, ptr noundef @.str.3, double noundef %258)
  br label %260

259:                                              ; preds = %226
  call void (...) @liquid_autotest_passed()
  br label %260

260:                                              ; preds = %259, %230
  %261 = load ptr, ptr %4, align 8, !tbaa !9
  %262 = call i32 @agc_crcf_set_gain(ptr noundef %261, float noundef 1.000000e+00)
  %263 = load ptr, ptr %4, align 8, !tbaa !9
  %264 = call float @agc_crcf_get_gain(ptr noundef %263)
  %265 = fcmp une float %264, 1.000000e+00
  br i1 %265, label %266, label %270

266:                                              ; preds = %260
  %267 = load ptr, ptr %4, align 8, !tbaa !9
  %268 = call float @agc_crcf_get_gain(ptr noundef %267)
  %269 = fpext float %268 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 51, ptr noundef @.str.6, double noundef %269, ptr noundef @.str.7, ptr noundef @.str.8, double noundef 1.000000e+00)
  br label %271

270:                                              ; preds = %260
  call void (...) @liquid_autotest_passed()
  br label %271

271:                                              ; preds = %270, %266
  %272 = load ptr, ptr %4, align 8, !tbaa !9
  %273 = call i32 @agc_crcf_destroy(ptr noundef %272)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  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 4, ptr %1) #5
  ret void
}

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

declare ptr @agc_crcf_create() #2

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

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

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

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

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

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

declare void @liquid_autotest_passed(...) #2

declare float @agc_crcf_get_gain(ptr noundef) #2

declare i32 @agc_crcf_set_gain(ptr noundef, float noundef) #2

declare i32 @agc_crcf_destroy(ptr noundef) #2

; 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 = { "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 "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 = !{!"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.1 = external hidden unnamed_addr constant [24 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.4 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @autotest_agc_crcf_dc_gain_control() local_unnamed_addr #0 {
  %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 0x3FB99999A0000000) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  br label %4

4:                                                ; preds = %0, %4
  %.043 = phi i32 [ 0, %0 ], [ %6, %4 ]
  %5 = call i32 @agc_crcf_execute(ptr noundef %2, <2 x float> noundef <float 0x3FB99999A0000000, float 0.000000e+00>, ptr noundef nonnull %1) #6
  %6 = add nuw nsw i32 %.043, 1
  %exitcond.not = icmp eq i32 %6, 256
  br i1 %exitcond.not, label %7, label %4, !llvm.loop !5

7:                                                ; preds = %4
  %8 = load float, ptr %1, align 4
  %9 = getelementptr inbounds i8, ptr %1, i64 4
  %10 = fadd float %8, -1.000000e+00
  %11 = fpext float %10 to double
  %12 = call double @llvm.fmuladd.f64(double %11, double %11, double 0.000000e+00)
  %sqrt = call double @llvm.sqrt.f64(double %12)
  %13 = fcmp ogt double %sqrt, 0x3F50624DE0000000
  %14 = fcmp uno float %8, 0.000000e+00
  %or.cond = select i1 %13, i1 true, i1 %14
  br i1 %or.cond, label %15, label %16

15:                                               ; preds = %7
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 45, ptr noundef nonnull @.str.1, double noundef %sqrt, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, double noundef 0x3F50624DE0000000) #6
  br label %17

16:                                               ; preds = %7
  call void (...) @liquid_autotest_passed() #6
  br label %17

17:                                               ; preds = %16, %15
  %18 = load float, ptr %9, align 4
  %19 = fpext float %18 to double
  %20 = call double @llvm.fmuladd.f64(double %19, double %19, double 0.000000e+00)
  %sqrt41 = call double @llvm.sqrt.f64(double %20)
  %21 = fcmp ogt double %sqrt41, 0x3F50624DE0000000
  %22 = fcmp uno float %18, 0.000000e+00
  %or.cond39 = select i1 %21, i1 true, i1 %22
  br i1 %or.cond39, label %23, label %24

23:                                               ; preds = %17
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 46, ptr noundef nonnull @.str.4, double noundef %sqrt41, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, double noundef 0x3F50624DE0000000) #6
  br label %25

24:                                               ; preds = %17
  call void (...) @liquid_autotest_passed() #6
  br label %25

25:                                               ; preds = %24, %23
  %26 = call float @agc_crcf_get_gain(ptr noundef %2) #6
  %27 = fadd float %26, -1.000000e+01
  %28 = fpext float %27 to double
  %29 = call float @agc_crcf_get_gain(ptr noundef %2) #6
  %30 = fadd float %29, -1.000000e+01
  %31 = fpext float %30 to double
  %32 = call float @agc_crcf_get_gain(ptr noundef %2) #6
  %33 = call float @agc_crcf_get_gain(ptr noundef %2) #6
  %34 = call double @llvm.fmuladd.f64(double %28, double %31, double 0.000000e+00)
  %35 = call double @sqrt(double noundef %34) #6
  %36 = fcmp ogt double %35, 0x3F50624DE0000000
  br i1 %36, label %42, label %37

37:                                               ; preds = %25
  %38 = call float @agc_crcf_get_gain(ptr noundef %2) #6
  %39 = fcmp uno float %38, 0.000000e+00
  br i1 %39, label %42, label %40

40:                                               ; preds = %37
  %41 = call float @agc_crcf_get_gain(ptr noundef %2) #6
  call void (...) @liquid_autotest_passed() #6
  br label %53

42:                                               ; preds = %37, %25
  %43 = call float @agc_crcf_get_gain(ptr noundef %2) #6
  %44 = fadd float %43, -1.000000e+01
  %45 = fpext float %44 to double
  %46 = call float @agc_crcf_get_gain(ptr noundef %2) #6
  %47 = fadd float %46, -1.000000e+01
  %48 = fpext float %47 to double
  %49 = call float @agc_crcf_get_gain(ptr noundef %2) #6
  %50 = call float @agc_crcf_get_gain(ptr noundef %2) #6
  %51 = call double @llvm.fmuladd.f64(double %45, double %48, double 0.000000e+00)
  %52 = call double @sqrt(double noundef %51) #6
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 47, ptr noundef nonnull @.str.5, double noundef %52, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, double noundef 0x3F50624DE0000000) #6
  br label %53

53:                                               ; preds = %40, %42
  %54 = call i32 @agc_crcf_set_gain(ptr noundef %2, float noundef 1.000000e+00) #6
  %55 = call float @agc_crcf_get_gain(ptr noundef %2) #6
  %56 = fcmp une float %55, 1.000000e+00
  br i1 %56, label %57, label %60

57:                                               ; preds = %53
  %58 = call float @agc_crcf_get_gain(ptr noundef %2) #6
  %59 = fpext float %58 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 51, ptr noundef nonnull @.str.6, double noundef %59, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.8, double noundef 1.000000e+00) #6
  br label %61

60:                                               ; preds = %53
  call void (...) @liquid_autotest_passed() #6
  br label %61

61:                                               ; preds = %60, %57
  %62 = call i32 @agc_crcf_destroy(ptr noundef %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  ret void
}

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

declare ptr @agc_crcf_create() local_unnamed_addr #2

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double 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 void @liquid_autotest_failed_expr(ptr noundef, i32 noundef, ptr noundef, double noundef, ptr noundef, ptr noundef, double noundef) local_unnamed_addr #2

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

declare float @agc_crcf_get_gain(ptr noundef) local_unnamed_addr #2

declare i32 @agc_crcf_set_gain(ptr noundef, float noundef) local_unnamed_addr #2

declare i32 @agc_crcf_destroy(ptr noundef) local_unnamed_addr #2

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

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}


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