; LLVM IR from jgaeddert/liquid-dsp :: src/filter/tests (fdelay_rrrf_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 [94 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [6 x i8], align 1
@liquid_autotest_verbose = external global i32, align 4
@.str.11 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @testbench_fdelay_rrrf(i32 noundef %0, i32 noundef %1, i32 noundef %2, float noundef %3) #0 {
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca float, align 4
  %9 = alloca float, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  %16 = alloca float, align 4
  %17 = alloca { float, float }, align 4
  %18 = alloca { float, float }, align 4
  %19 = alloca { float, float }, align 4
  %20 = alloca float, align 4
  %21 = alloca { float, float }, align 4
  store i32 %0, ptr %5, align 4, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !5
  store float %3, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store float 0x3F847AE140000000, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %22 = load i32, ptr %5, align 4, !tbaa !5
  %23 = load i32, ptr %6, align 4, !tbaa !5
  %24 = mul i32 2, %23
  %25 = add i32 %22, %24
  store i32 %25, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %26 = load i32, ptr %5, align 4, !tbaa !5
  %27 = load i32, ptr %6, align 4, !tbaa !5
  %28 = load i32, ptr %7, align 4, !tbaa !5
  %29 = call ptr @fdelay_rrrf_create(i32 noundef %26, i32 noundef %27, i32 noundef %28)
  store ptr %29, ptr %11, align 8, !tbaa !11
  %30 = load ptr, ptr %11, align 8, !tbaa !11
  %31 = load float, ptr %8, align 4, !tbaa !9
  %32 = fmul float %31, 0x3FE6666660000000
  %33 = call i32 @fdelay_rrrf_set_delay(ptr noundef %30, float noundef %32)
  %34 = load ptr, ptr %11, align 8, !tbaa !11
  %35 = load float, ptr %8, align 4, !tbaa !9
  %36 = fmul float %35, 0x3FD3333340000000
  %37 = call i32 @fdelay_rrrf_adjust_delay(ptr noundef %34, float noundef %36)
  %38 = load ptr, ptr %11, align 8, !tbaa !11
  %39 = call i32 @fdelay_rrrf_get_nmax(ptr noundef %38)
  %40 = load i32, ptr %5, align 4, !tbaa !5
  %41 = icmp ne i32 %39, %40
  br i1 %41, label %42, label %48

42:                                               ; preds = %4
  %43 = load ptr, ptr %11, align 8, !tbaa !11
  %44 = call i32 @fdelay_rrrf_get_nmax(ptr noundef %43)
  %45 = uitofp i32 %44 to double
  %46 = load i32, ptr %5, align 4, !tbaa !5
  %47 = uitofp i32 %46 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 42, ptr noundef @.str.1, double noundef %45, ptr noundef @.str.2, ptr noundef @.str.3, double noundef %47)
  br label %49

48:                                               ; preds = %4
  call void (...) @liquid_autotest_passed()
  br label %49

49:                                               ; preds = %48, %42
  %50 = load ptr, ptr %11, align 8, !tbaa !11
  %51 = call i32 @fdelay_rrrf_get_m(ptr noundef %50)
  %52 = load i32, ptr %6, align 4, !tbaa !5
  %53 = icmp ne i32 %51, %52
  br i1 %53, label %54, label %60

54:                                               ; preds = %49
  %55 = load ptr, ptr %11, align 8, !tbaa !11
  %56 = call i32 @fdelay_rrrf_get_m(ptr noundef %55)
  %57 = uitofp i32 %56 to double
  %58 = load i32, ptr %6, align 4, !tbaa !5
  %59 = uitofp i32 %58 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 43, ptr noundef @.str.4, double noundef %57, ptr noundef @.str.2, ptr noundef @.str.5, double noundef %59)
  br label %61

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

61:                                               ; preds = %60, %54
  %62 = load ptr, ptr %11, align 8, !tbaa !11
  %63 = call i32 @fdelay_rrrf_get_npfb(ptr noundef %62)
  %64 = load i32, ptr %7, align 4, !tbaa !5
  %65 = icmp ne i32 %63, %64
  br i1 %65, label %66, label %72

66:                                               ; preds = %61
  %67 = load ptr, ptr %11, align 8, !tbaa !11
  %68 = call i32 @fdelay_rrrf_get_npfb(ptr noundef %67)
  %69 = uitofp i32 %68 to double
  %70 = load i32, ptr %7, align 4, !tbaa !5
  %71 = uitofp i32 %70 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 44, ptr noundef @.str.6, double noundef %69, ptr noundef @.str.2, ptr noundef @.str.7, double noundef %71)
  br label %73

72:                                               ; preds = %61
  call void (...) @liquid_autotest_passed()
  br label %73

73:                                               ; preds = %72, %66
  %74 = load ptr, ptr %11, align 8, !tbaa !11
  %75 = call float @fdelay_rrrf_get_delay(ptr noundef %74)
  %76 = load float, ptr %8, align 4, !tbaa !9
  %77 = fsub float %75, %76
  %78 = fpext float %77 to double
  %79 = load ptr, ptr %11, align 8, !tbaa !11
  %80 = call float @fdelay_rrrf_get_delay(ptr noundef %79)
  %81 = load float, ptr %8, align 4, !tbaa !9
  %82 = fsub float %80, %81
  %83 = fpext float %82 to double
  %84 = load ptr, ptr %11, align 8, !tbaa !11
  %85 = call float @fdelay_rrrf_get_delay(ptr noundef %84)
  %86 = load float, ptr %8, align 4, !tbaa !9
  %87 = fsub float %85, %86
  %88 = fpext float %87 to double
  %89 = load ptr, ptr %11, align 8, !tbaa !11
  %90 = call float @fdelay_rrrf_get_delay(ptr noundef %89)
  %91 = load float, ptr %8, align 4, !tbaa !9
  %92 = fsub float %90, %91
  %93 = fpext float %92 to double
  %94 = call double @llvm.fmuladd.f64(double %78, double %83, double 0.000000e+00)
  %95 = call double @sqrt(double noundef %94) #6
  %96 = fcmp ogt double %95, 0x3EB0C6F7A0000000
  br i1 %96, label %111, label %97

97:                                               ; preds = %73
  %98 = load ptr, ptr %11, align 8, !tbaa !11
  %99 = call float @fdelay_rrrf_get_delay(ptr noundef %98)
  %100 = call i1 @llvm.is.fpclass.f32(float %99, i32 3)
  br i1 %100, label %111, label %101

101:                                              ; preds = %97
  %102 = load ptr, ptr %11, align 8, !tbaa !11
  %103 = call float @fdelay_rrrf_get_delay(ptr noundef %102)
  %104 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %104, label %111, label %105

105:                                              ; preds = %101
  %106 = load float, ptr %8, align 4, !tbaa !9
  %107 = call i1 @llvm.is.fpclass.f32(float %106, i32 3)
  br i1 %107, label %111, label %108

108:                                              ; preds = %105
  %109 = load float, ptr %8, align 4, !tbaa !9
  %110 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %110, label %111, label %134

111:                                              ; preds = %108, %105, %101, %97, %73
  %112 = load ptr, ptr %11, align 8, !tbaa !11
  %113 = call float @fdelay_rrrf_get_delay(ptr noundef %112)
  %114 = load float, ptr %8, align 4, !tbaa !9
  %115 = fsub float %113, %114
  %116 = fpext float %115 to double
  %117 = load ptr, ptr %11, align 8, !tbaa !11
  %118 = call float @fdelay_rrrf_get_delay(ptr noundef %117)
  %119 = load float, ptr %8, align 4, !tbaa !9
  %120 = fsub float %118, %119
  %121 = fpext float %120 to double
  %122 = load ptr, ptr %11, align 8, !tbaa !11
  %123 = call float @fdelay_rrrf_get_delay(ptr noundef %122)
  %124 = load float, ptr %8, align 4, !tbaa !9
  %125 = fsub float %123, %124
  %126 = fpext float %125 to double
  %127 = load ptr, ptr %11, align 8, !tbaa !11
  %128 = call float @fdelay_rrrf_get_delay(ptr noundef %127)
  %129 = load float, ptr %8, align 4, !tbaa !9
  %130 = fsub float %128, %129
  %131 = fpext float %130 to double
  %132 = call double @llvm.fmuladd.f64(double %116, double %121, double 0.000000e+00)
  %133 = call double @sqrt(double noundef %132) #6
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 45, ptr noundef @.str.8, double noundef %133, ptr noundef @.str.9, ptr noundef @.str.10, double noundef 0x3EB0C6F7A0000000)
  br label %135

134:                                              ; preds = %108
  call void (...) @liquid_autotest_passed()
  br label %135

135:                                              ; preds = %134, %111
  %136 = load i32, ptr %10, align 4, !tbaa !5
  %137 = zext i32 %136 to i64
  %138 = call ptr @llvm.stacksave.p0()
  store ptr %138, ptr %12, align 8
  %139 = alloca float, i64 %137, align 16
  store i64 %137, ptr %13, align 8
  %140 = load i32, ptr %10, align 4, !tbaa !5
  %141 = zext i32 %140 to i64
  %142 = alloca float, i64 %141, align 16
  store i64 %141, ptr %14, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %143

143:                                              ; preds = %155, %135
  %144 = load i32, ptr %15, align 4, !tbaa !5
  %145 = load i32, ptr %10, align 4, !tbaa !5
  %146 = icmp ult i32 %144, %145
  br i1 %146, label %147, label %158

147:                                              ; preds = %143
  %148 = load i32, ptr %15, align 4, !tbaa !5
  %149 = icmp eq i32 %148, 0
  %150 = zext i1 %149 to i64
  %151 = select i1 %149, float 1.000000e+00, float 0.000000e+00
  %152 = load i32, ptr %15, align 4, !tbaa !5
  %153 = zext i32 %152 to i64
  %154 = getelementptr inbounds float, ptr %139, i64 %153
  store float %151, ptr %154, align 4, !tbaa !9
  br label %155

155:                                              ; preds = %147
  %156 = load i32, ptr %15, align 4, !tbaa !5
  %157 = add i32 %156, 1
  store i32 %157, ptr %15, align 4, !tbaa !5
  br label %143, !llvm.loop !13

158:                                              ; preds = %143
  %159 = load ptr, ptr %11, align 8, !tbaa !11
  %160 = load i32, ptr %10, align 4, !tbaa !5
  %161 = call i32 @fdelay_rrrf_execute_block(ptr noundef %159, ptr noundef %139, i32 noundef %160, ptr noundef %142)
  %162 = load ptr, ptr %11, align 8, !tbaa !11
  %163 = call i32 @fdelay_rrrf_destroy(ptr noundef %162)
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %164 = load i32, ptr %10, align 4, !tbaa !5
  %165 = uitofp i32 %164 to float
  %166 = fdiv float 0x3FB99999A0000000, %165
  store float %166, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %167 = getelementptr inbounds { float, float }, ptr %17, i32 0, i32 0
  %168 = getelementptr inbounds { float, float }, ptr %17, i32 0, i32 1
  store float 0.000000e+00, ptr %167, align 4
  store float 0.000000e+00, ptr %168, align 4
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %169

169:                                              ; preds = %206, %158
  %170 = load i32, ptr %15, align 4, !tbaa !5
  %171 = load i32, ptr %10, align 4, !tbaa !5
  %172 = icmp ult i32 %170, %171
  br i1 %172, label %173, label %209

173:                                              ; preds = %169
  %174 = load i32, ptr %15, align 4, !tbaa !5
  %175 = zext i32 %174 to i64
  %176 = getelementptr inbounds float, ptr %142, i64 %175
  %177 = load float, ptr %176, align 4, !tbaa !9
  %178 = load float, ptr %16, align 4, !tbaa !9
  %179 = fpext float %178 to double
  %180 = fmul double 0.000000e+00, %179
  %181 = fmul double 0x401921FB54442D18, %179
  %182 = load i32, ptr %15, align 4, !tbaa !5
  %183 = uitofp i32 %182 to double
  %184 = fmul double %180, %183
  %185 = fmul double %181, %183
  %186 = fptrunc double %184 to float
  %187 = fptrunc double %185 to float
  %188 = getelementptr inbounds { float, float }, ptr %18, i32 0, i32 0
  %189 = getelementptr inbounds { float, float }, ptr %18, i32 0, i32 1
  store float %186, ptr %188, align 4
  store float %187, ptr %189, align 4
  %190 = load <2 x float>, ptr %18, align 4
  %191 = call <2 x float> @cexpf(<2 x float> noundef %190) #6
  store <2 x float> %191, ptr %19, align 4
  %192 = getelementptr inbounds { float, float }, ptr %19, i32 0, i32 0
  %193 = load float, ptr %192, align 4
  %194 = getelementptr inbounds { float, float }, ptr %19, i32 0, i32 1
  %195 = load float, ptr %194, align 4
  %196 = fmul float %177, %193
  %197 = fmul float %177, %195
  %198 = getelementptr inbounds { float, float }, ptr %17, i32 0, i32 0
  %199 = load float, ptr %198, align 4
  %200 = getelementptr inbounds { float, float }, ptr %17, i32 0, i32 1
  %201 = load float, ptr %200, align 4
  %202 = fadd float %199, %196
  %203 = fadd float %201, %197
  %204 = getelementptr inbounds { float, float }, ptr %17, i32 0, i32 0
  %205 = getelementptr inbounds { float, float }, ptr %17, i32 0, i32 1
  store float %202, ptr %204, align 4
  store float %203, ptr %205, align 4
  br label %206

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

209:                                              ; preds = %169
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  %210 = getelementptr inbounds { float, float }, ptr %17, i32 0, i32 0
  %211 = load float, ptr %210, align 4
  %212 = getelementptr inbounds { float, float }, ptr %17, i32 0, i32 1
  %213 = load float, ptr %212, align 4
  %214 = getelementptr inbounds { float, float }, ptr %21, i32 0, i32 0
  %215 = getelementptr inbounds { float, float }, ptr %21, i32 0, i32 1
  store float %211, ptr %214, align 4
  store float %213, ptr %215, align 4
  %216 = load <2 x float>, ptr %21, align 4
  %217 = call float @cargf(<2 x float> noundef %216) #6
  %218 = fpext float %217 to double
  %219 = load float, ptr %16, align 4, !tbaa !9
  %220 = fpext float %219 to double
  %221 = fmul double 0x401921FB54442D18, %220
  %222 = fdiv double %218, %221
  %223 = load i32, ptr %6, align 4, !tbaa !5
  %224 = uitofp i32 %223 to float
  %225 = fpext float %224 to double
  %226 = fsub double %222, %225
  %227 = fptrunc double %226 to float
  store float %227, ptr %20, align 4, !tbaa !9
  %228 = load i32, ptr @liquid_autotest_verbose, align 4, !tbaa !5
  %229 = icmp ne i32 %228, 0
  br i1 %229, label %230, label %240

230:                                              ; preds = %209
  %231 = load float, ptr %20, align 4, !tbaa !9
  %232 = fpext float %231 to double
  %233 = load float, ptr %8, align 4, !tbaa !9
  %234 = fpext float %233 to double
  %235 = load float, ptr %20, align 4, !tbaa !9
  %236 = load float, ptr %8, align 4, !tbaa !9
  %237 = fsub float %235, %236
  %238 = fpext float %237 to double
  %239 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, double noundef %232, double noundef %234, double noundef %238)
  br label %240

240:                                              ; preds = %230, %209
  %241 = load float, ptr %20, align 4, !tbaa !9
  %242 = load float, ptr %8, align 4, !tbaa !9
  %243 = fsub float %241, %242
  %244 = fpext float %243 to double
  %245 = load float, ptr %20, align 4, !tbaa !9
  %246 = load float, ptr %8, align 4, !tbaa !9
  %247 = fsub float %245, %246
  %248 = fpext float %247 to double
  %249 = load float, ptr %20, align 4, !tbaa !9
  %250 = load float, ptr %8, align 4, !tbaa !9
  %251 = fsub float %249, %250
  %252 = fpext float %251 to double
  %253 = load float, ptr %20, align 4, !tbaa !9
  %254 = load float, ptr %8, align 4, !tbaa !9
  %255 = fsub float %253, %254
  %256 = fpext float %255 to double
  %257 = call double @llvm.fmuladd.f64(double %244, double %248, double 0.000000e+00)
  %258 = call double @sqrt(double noundef %257) #6
  %259 = load float, ptr %9, align 4, !tbaa !9
  %260 = fpext float %259 to double
  %261 = fcmp ogt double %258, %260
  br i1 %261, label %274, label %262

262:                                              ; preds = %240
  %263 = load float, ptr %20, align 4, !tbaa !9
  %264 = call i1 @llvm.is.fpclass.f32(float %263, i32 3)
  br i1 %264, label %274, label %265

265:                                              ; preds = %262
  %266 = load float, ptr %20, align 4, !tbaa !9
  %267 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %267, label %274, label %268

268:                                              ; preds = %265
  %269 = load float, ptr %8, align 4, !tbaa !9
  %270 = call i1 @llvm.is.fpclass.f32(float %269, i32 3)
  br i1 %270, label %274, label %271

271:                                              ; preds = %268
  %272 = load float, ptr %8, align 4, !tbaa !9
  %273 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %273, label %274, label %295

274:                                              ; preds = %271, %268, %265, %262, %240
  %275 = load float, ptr %20, align 4, !tbaa !9
  %276 = load float, ptr %8, align 4, !tbaa !9
  %277 = fsub float %275, %276
  %278 = fpext float %277 to double
  %279 = load float, ptr %20, align 4, !tbaa !9
  %280 = load float, ptr %8, align 4, !tbaa !9
  %281 = fsub float %279, %280
  %282 = fpext float %281 to double
  %283 = load float, ptr %20, align 4, !tbaa !9
  %284 = load float, ptr %8, align 4, !tbaa !9
  %285 = fsub float %283, %284
  %286 = fpext float %285 to double
  %287 = load float, ptr %20, align 4, !tbaa !9
  %288 = load float, ptr %8, align 4, !tbaa !9
  %289 = fsub float %287, %288
  %290 = fpext float %289 to double
  %291 = call double @llvm.fmuladd.f64(double %278, double %282, double 0.000000e+00)
  %292 = call double @sqrt(double noundef %291) #6
  %293 = load float, ptr %9, align 4, !tbaa !9
  %294 = fpext float %293 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 74, ptr noundef @.str.12, double noundef %292, ptr noundef @.str.9, ptr noundef @.str.13, double noundef %294)
  br label %296

295:                                              ; preds = %271
  call void (...) @liquid_autotest_passed()
  br label %296

296:                                              ; preds = %295, %274
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  %297 = load ptr, ptr %12, align 8
  call void @llvm.stackrestore.p0(ptr %297)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  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 @fdelay_rrrf_create(i32 noundef, i32 noundef, i32 noundef) #2

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

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

declare i32 @fdelay_rrrf_get_nmax(ptr noundef) #2

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 i32 @fdelay_rrrf_get_m(ptr noundef) #2

declare i32 @fdelay_rrrf_get_npfb(ptr noundef) #2

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

declare float @fdelay_rrrf_get_delay(ptr noundef) #2

; 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

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

declare i32 @fdelay_rrrf_execute_block(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

declare i32 @fdelay_rrrf_destroy(ptr noundef) #2

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

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

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

; Function Attrs: 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 willreturn
declare void @llvm.stackrestore.p0(ptr) #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 = { 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 = { nocallback nofree nosync nounwind willreturn }
attributes #6 = { nounwind }

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

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


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

@.str = external hidden unnamed_addr constant [94 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [6 x i8], align 1
@liquid_autotest_verbose = external local_unnamed_addr global i32, align 4
@.str.11 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @testbench_fdelay_rrrf(i32 noundef %0, i32 noundef %1, i32 noundef %2, float noundef %3) local_unnamed_addr #0 {
  %5 = shl i32 %1, 1
  %6 = add i32 %5, %0
  %7 = tail call ptr @fdelay_rrrf_create(i32 noundef %0, i32 noundef %1, i32 noundef %2) #7
  %8 = fmul float %3, 0x3FE6666660000000
  %9 = tail call i32 @fdelay_rrrf_set_delay(ptr noundef %7, float noundef %8) #7
  %10 = fmul float %3, 0x3FD3333340000000
  %11 = tail call i32 @fdelay_rrrf_adjust_delay(ptr noundef %7, float noundef %10) #7
  %12 = tail call i32 @fdelay_rrrf_get_nmax(ptr noundef %7) #7
  %.not = icmp eq i32 %12, %0
  br i1 %.not, label %17, label %13

13:                                               ; preds = %4
  %14 = tail call i32 @fdelay_rrrf_get_nmax(ptr noundef %7) #7
  %15 = uitofp i32 %14 to double
  %16 = uitofp i32 %0 to double
  tail call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 42, ptr noundef nonnull @.str.1, double noundef %15, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, double noundef %16) #7
  br label %18

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

18:                                               ; preds = %17, %13
  %19 = tail call i32 @fdelay_rrrf_get_m(ptr noundef %7) #7
  %.not97 = icmp eq i32 %19, %1
  br i1 %.not97, label %24, label %20

20:                                               ; preds = %18
  %21 = tail call i32 @fdelay_rrrf_get_m(ptr noundef %7) #7
  %22 = uitofp i32 %21 to double
  %23 = uitofp i32 %1 to double
  tail call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 43, ptr noundef nonnull @.str.4, double noundef %22, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.5, double noundef %23) #7
  br label %25

24:                                               ; preds = %18
  tail call void (...) @liquid_autotest_passed() #7
  br label %25

25:                                               ; preds = %24, %20
  %26 = tail call i32 @fdelay_rrrf_get_npfb(ptr noundef %7) #7
  %.not98 = icmp eq i32 %26, %2
  br i1 %.not98, label %31, label %27

27:                                               ; preds = %25
  %28 = tail call i32 @fdelay_rrrf_get_npfb(ptr noundef %7) #7
  %29 = uitofp i32 %28 to double
  %30 = uitofp i32 %2 to double
  tail call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 44, ptr noundef nonnull @.str.6, double noundef %29, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.7, double noundef %30) #7
  br label %32

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

32:                                               ; preds = %31, %27
  %33 = tail call float @fdelay_rrrf_get_delay(ptr noundef %7) #7
  %34 = fsub float %33, %3
  %35 = fpext float %34 to double
  %36 = tail call float @fdelay_rrrf_get_delay(ptr noundef %7) #7
  %37 = fsub float %36, %3
  %38 = fpext float %37 to double
  %39 = tail call float @fdelay_rrrf_get_delay(ptr noundef %7) #7
  %40 = tail call float @fdelay_rrrf_get_delay(ptr noundef %7) #7
  %41 = tail call double @llvm.fmuladd.f64(double %35, double %38, double 0.000000e+00)
  %42 = tail call double @sqrt(double noundef %41) #7
  %43 = fcmp ogt double %42, 0x3EB0C6F7A0000000
  br i1 %43, label %50, label %44

44:                                               ; preds = %32
  %45 = tail call float @fdelay_rrrf_get_delay(ptr noundef %7) #7
  %46 = fcmp uno float %45, 0.000000e+00
  br i1 %46, label %50, label %47

47:                                               ; preds = %44
  %48 = tail call float @fdelay_rrrf_get_delay(ptr noundef %7) #7
  %49 = fcmp uno float %3, 0.000000e+00
  br i1 %49, label %50, label %61

50:                                               ; preds = %47, %44, %32
  %51 = tail call float @fdelay_rrrf_get_delay(ptr noundef %7) #7
  %52 = fsub float %51, %3
  %53 = fpext float %52 to double
  %54 = tail call float @fdelay_rrrf_get_delay(ptr noundef %7) #7
  %55 = fsub float %54, %3
  %56 = fpext float %55 to double
  %57 = tail call float @fdelay_rrrf_get_delay(ptr noundef %7) #7
  %58 = tail call float @fdelay_rrrf_get_delay(ptr noundef %7) #7
  %59 = tail call double @llvm.fmuladd.f64(double %53, double %56, double 0.000000e+00)
  %60 = tail call double @sqrt(double noundef %59) #7
  tail call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 45, ptr noundef nonnull @.str.8, double noundef %60, ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.10, double noundef 0x3EB0C6F7A0000000) #7
  br label %62

61:                                               ; preds = %47
  tail call void (...) @liquid_autotest_passed() #7
  br label %62

62:                                               ; preds = %61, %50
  %63 = zext i32 %6 to i64
  %64 = alloca float, i64 %63, align 16
  %65 = alloca float, i64 %63, align 16
  %.not110 = icmp eq i32 %6, 0
  br i1 %.not110, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %62
  store float 1.000000e+00, ptr %64, align 16, !tbaa !5
  %exitcond.peel.not = icmp eq i32 %6, 1
  br i1 %exitcond.peel.not, label %._crit_edge, label %.lr.ph.preheader127

.lr.ph.preheader127:                              ; preds = %.lr.ph.preheader
  %66 = add nsw i64 %63, -1
  %min.iters.check = icmp ult i32 %6, 9
  br i1 %min.iters.check, label %.lr.ph.preheader129, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph.preheader127
  %n.vec = and i64 %66, -8
  %ind.end = or disjoint i64 %n.vec, 1
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = or disjoint i64 %index, 1
  %67 = getelementptr inbounds float, ptr %64, i64 %offset.idx
  %68 = getelementptr inbounds i8, ptr %67, i64 16
  store <4 x float> zeroinitializer, ptr %67, align 4, !tbaa !5
  store <4 x float> zeroinitializer, ptr %68, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %69 = icmp eq i64 %index.next, %n.vec
  br i1 %69, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %66, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader129

.lr.ph.preheader129:                              ; preds = %middle.block, %.lr.ph.preheader127
  %indvars.iv.ph = phi i64 [ 1, %.lr.ph.preheader127 ], [ %ind.end, %middle.block ]
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader129, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader129 ]
  %70 = getelementptr inbounds float, ptr %64, i64 %indvars.iv
  store float 0.000000e+00, ptr %70, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %63
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !14

._crit_edge:                                      ; preds = %.lr.ph, %middle.block, %.lr.ph.preheader, %62
  %71 = call i32 @fdelay_rrrf_execute_block(ptr noundef %7, ptr noundef nonnull %64, i32 noundef %6, ptr noundef nonnull %65) #7
  %72 = call i32 @fdelay_rrrf_destroy(ptr noundef %7) #7
  %73 = uitofp i32 %6 to float
  %74 = fdiv float 0x3FB99999A0000000, %73
  %.pre = fpext float %74 to double
  br i1 %.not110, label %._crit_edge.._crit_edge108_crit_edge, label %.lr.ph107

._crit_edge.._crit_edge108_crit_edge:             ; preds = %._crit_edge
  %.pre120 = fmul double %.pre, 0x401921FB54442D18
  br label %._crit_edge108

.lr.ph107:                                        ; preds = %._crit_edge
  %75 = insertelement <2 x double> poison, double %.pre, i64 0
  %76 = shufflevector <2 x double> %75, <2 x double> poison, <2 x i32> zeroinitializer
  %77 = fmul <2 x double> %76, <double 0.000000e+00, double 0x401921FB54442D18>
  %78 = extractelement <2 x double> %77, i64 1
  br label %79

79:                                               ; preds = %.lr.ph107, %79
  %indvars.iv115 = phi i64 [ 0, %.lr.ph107 ], [ %indvars.iv.next116, %79 ]
  %80 = phi <2 x float> [ zeroinitializer, %.lr.ph107 ], [ %93, %79 ]
  %81 = getelementptr inbounds float, ptr %65, i64 %indvars.iv115
  %82 = load float, ptr %81, align 4, !tbaa !5
  %83 = trunc nuw i64 %indvars.iv115 to i32
  %84 = uitofp i32 %83 to double
  %85 = insertelement <2 x double> poison, double %84, i64 0
  %86 = shufflevector <2 x double> %85, <2 x double> poison, <2 x i32> zeroinitializer
  %87 = fmul <2 x double> %77, %86
  %88 = fptrunc <2 x double> %87 to <2 x float>
  %89 = call <2 x float> @cexpf(<2 x float> noundef %88) #7
  %90 = insertelement <2 x float> poison, float %82, i64 0
  %91 = shufflevector <2 x float> %90, <2 x float> poison, <2 x i32> zeroinitializer
  %92 = fmul <2 x float> %91, %89
  %93 = fadd <2 x float> %80, %92
  %indvars.iv.next116 = add nuw nsw i64 %indvars.iv115, 1
  %exitcond119.not = icmp eq i64 %indvars.iv.next116, %63
  br i1 %exitcond119.not, label %._crit_edge108, label %79, !llvm.loop !15

._crit_edge108:                                   ; preds = %79, %._crit_edge.._crit_edge108_crit_edge
  %.pre-phi121 = phi double [ %.pre120, %._crit_edge.._crit_edge108_crit_edge ], [ %78, %79 ]
  %94 = phi <2 x float> [ zeroinitializer, %._crit_edge.._crit_edge108_crit_edge ], [ %93, %79 ]
  %95 = call float @cargf(<2 x float> noundef %94) #7
  %96 = fpext float %95 to double
  %97 = fdiv double %96, %.pre-phi121
  %98 = uitofp i32 %1 to float
  %99 = fpext float %98 to double
  %100 = fsub double %97, %99
  %101 = fptrunc double %100 to float
  %102 = load i32, ptr @liquid_autotest_verbose, align 4, !tbaa !16
  %.not99 = icmp eq i32 %102, 0
  br i1 %.not99, label %._crit_edge108._crit_edge, label %103

._crit_edge108._crit_edge:                        ; preds = %._crit_edge108
  %.pre122 = fsub float %101, %3
  %.pre124 = fpext float %.pre122 to double
  br label %109

103:                                              ; preds = %._crit_edge108
  %104 = fpext float %101 to double
  %105 = fpext float %3 to double
  %106 = fsub float %101, %3
  %107 = fpext float %106 to double
  %108 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, double noundef %104, double noundef %105, double noundef %107)
  br label %109

109:                                              ; preds = %._crit_edge108._crit_edge, %103
  %.pre-phi125 = phi double [ %.pre124, %._crit_edge108._crit_edge ], [ %107, %103 ]
  %110 = call double @llvm.fmuladd.f64(double %.pre-phi125, double %.pre-phi125, double 0.000000e+00)
  %sqrt = call double @llvm.sqrt.f64(double %110)
  %111 = fcmp ogt double %sqrt, 0x3F847AE140000000
  %112 = fcmp uno float %101, 0.000000e+00
  %or.cond = select i1 %111, i1 true, i1 %112
  %113 = fcmp uno float %3, 0.000000e+00
  %or.cond100 = or i1 %113, %or.cond
  br i1 %or.cond100, label %114, label %115

114:                                              ; preds = %109
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 74, ptr noundef nonnull @.str.12, double noundef %sqrt, ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.13, double noundef 0x3F847AE140000000) #7
  br label %116

115:                                              ; preds = %109
  call void (...) @liquid_autotest_passed() #7
  br label %116

116:                                              ; preds = %115, %114
  ret void
}

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

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

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

declare i32 @fdelay_rrrf_get_nmax(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 @fdelay_rrrf_get_m(ptr noundef) local_unnamed_addr #1

declare i32 @fdelay_rrrf_get_npfb(ptr noundef) local_unnamed_addr #1

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

declare float @fdelay_rrrf_get_delay(ptr noundef) local_unnamed_addr #1

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

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

declare i32 @fdelay_rrrf_destroy(ptr noundef) local_unnamed_addr #1

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

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

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

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

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 = { "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 "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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 = distinct !{!9, !10, !11, !12, !13}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.peeled.count", i32 1}
!12 = !{!"llvm.loop.isvectorized", i32 1}
!13 = !{!"llvm.loop.unroll.runtime.disable"}
!14 = distinct !{!14, !10, !11, !13, !12}
!15 = distinct !{!15, !10}
!16 = !{!17, !17, i64 0}
!17 = !{!"int", !7, i64 0}


; Effective O3 passes: AggressiveInstCombinePass,BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass