; LLVM IR from jgaeddert/liquid-dsp :: src/math/tests (polynomial_findroots_autotest)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@liquid_autotest_verbose = external global i32, align 4
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [101 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @polyf_findroots_testbench(ptr noundef %0, ptr noundef %1, i32 noundef %2, float noundef %3) #0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca float, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca float, align 4
  %13 = alloca { float, float }, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  store float %3, ptr %8, align 4, !tbaa !11
  %14 = load i32, ptr %7, align 4, !tbaa !9
  %15 = zext i32 %14 to i64
  %16 = call ptr @llvm.stacksave.p0()
  store ptr %16, ptr %9, align 8
  %17 = alloca { float, float }, i64 %15, align 16
  store i64 %15, ptr %10, align 8
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = load i32, ptr %7, align 4, !tbaa !9
  %20 = add i32 %19, 1
  %21 = call i32 @polyf_findroots(ptr noundef %18, i32 noundef %20, ptr noundef %17)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %22 = load i32, ptr @liquid_autotest_verbose, align 4, !tbaa !9
  %23 = icmp ne i32 %22, 0
  br i1 %23, label %24, label %117

24:                                               ; preds = %4
  %25 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %26

26:                                               ; preds = %39, %24
  %27 = load i32, ptr %11, align 4, !tbaa !9
  %28 = load i32, ptr %7, align 4, !tbaa !9
  %29 = icmp ule i32 %27, %28
  br i1 %29, label %30, label %42

30:                                               ; preds = %26
  %31 = load i32, ptr %11, align 4, !tbaa !9
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = load i32, ptr %11, align 4, !tbaa !9
  %34 = zext i32 %33 to i64
  %35 = getelementptr inbounds float, ptr %32, i64 %34
  %36 = load float, ptr %35, align 4, !tbaa !11
  %37 = fpext float %36 to double
  %38 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %31, double noundef %37)
  br label %39

39:                                               ; preds = %30
  %40 = load i32, ptr %11, align 4, !tbaa !9
  %41 = add i32 %40, 1
  store i32 %41, ptr %11, align 4, !tbaa !9
  br label %26, !llvm.loop !13

42:                                               ; preds = %26
  %43 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %113, %42
  %45 = load i32, ptr %11, align 4, !tbaa !9
  %46 = load i32, ptr %7, align 4, !tbaa !9
  %47 = icmp ult i32 %45, %46
  br i1 %47, label %48, label %116

48:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %49 = load i32, ptr %11, align 4, !tbaa !9
  %50 = zext i32 %49 to i64
  %51 = getelementptr inbounds { float, float }, ptr %17, i64 %50
  %52 = getelementptr inbounds { float, float }, ptr %51, i32 0, i32 0
  %53 = load float, ptr %52, align 8
  %54 = getelementptr inbounds { float, float }, ptr %51, i32 0, i32 1
  %55 = load float, ptr %54, align 4
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = load i32, ptr %11, align 4, !tbaa !9
  %58 = zext i32 %57 to i64
  %59 = getelementptr inbounds { float, float }, ptr %56, i64 %58
  %60 = getelementptr inbounds { float, float }, ptr %59, i32 0, i32 0
  %61 = load float, ptr %60, align 4
  %62 = getelementptr inbounds { float, float }, ptr %59, i32 0, i32 1
  %63 = load float, ptr %62, align 4
  %64 = fsub float %53, %61
  %65 = fsub float %55, %63
  %66 = getelementptr inbounds { float, float }, ptr %13, i32 0, i32 0
  %67 = getelementptr inbounds { float, float }, ptr %13, i32 0, i32 1
  store float %64, ptr %66, align 4
  store float %65, ptr %67, align 4
  %68 = load <2 x float>, ptr %13, align 4
  %69 = call float @cabsf(<2 x float> noundef %68) #6
  store float %69, ptr %12, align 4, !tbaa !11
  %70 = load i32, ptr %11, align 4, !tbaa !9
  %71 = load i32, ptr %11, align 4, !tbaa !9
  %72 = zext i32 %71 to i64
  %73 = getelementptr inbounds { float, float }, ptr %17, i64 %72
  %74 = getelementptr inbounds { float, float }, ptr %73, i32 0, i32 0
  %75 = load float, ptr %74, align 8
  %76 = getelementptr inbounds { float, float }, ptr %73, i32 0, i32 1
  %77 = load float, ptr %76, align 4
  %78 = fpext float %75 to double
  %79 = load i32, ptr %11, align 4, !tbaa !9
  %80 = zext i32 %79 to i64
  %81 = getelementptr inbounds { float, float }, ptr %17, i64 %80
  %82 = getelementptr inbounds { float, float }, ptr %81, i32 0, i32 0
  %83 = load float, ptr %82, align 8
  %84 = getelementptr inbounds { float, float }, ptr %81, i32 0, i32 1
  %85 = load float, ptr %84, align 4
  %86 = fpext float %85 to double
  %87 = load ptr, ptr %6, align 8, !tbaa !5
  %88 = load i32, ptr %11, align 4, !tbaa !9
  %89 = zext i32 %88 to i64
  %90 = getelementptr inbounds { float, float }, ptr %87, i64 %89
  %91 = getelementptr inbounds { float, float }, ptr %90, i32 0, i32 0
  %92 = load float, ptr %91, align 4
  %93 = getelementptr inbounds { float, float }, ptr %90, i32 0, i32 1
  %94 = load float, ptr %93, align 4
  %95 = fpext float %92 to double
  %96 = load ptr, ptr %6, align 8, !tbaa !5
  %97 = load i32, ptr %11, align 4, !tbaa !9
  %98 = zext i32 %97 to i64
  %99 = getelementptr inbounds { float, float }, ptr %96, i64 %98
  %100 = getelementptr inbounds { float, float }, ptr %99, i32 0, i32 0
  %101 = load float, ptr %100, align 4
  %102 = getelementptr inbounds { float, float }, ptr %99, i32 0, i32 1
  %103 = load float, ptr %102, align 4
  %104 = fpext float %103 to double
  %105 = load float, ptr %12, align 4, !tbaa !11
  %106 = fpext float %105 to double
  %107 = load float, ptr %12, align 4, !tbaa !11
  %108 = load float, ptr %8, align 4, !tbaa !11
  %109 = fcmp olt float %107, %108
  %110 = zext i1 %109 to i64
  %111 = select i1 %109, ptr @.str.4, ptr @.str.5
  %112 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %70, double noundef %78, double noundef %86, double noundef %95, double noundef %104, double noundef %106, ptr noundef %111)
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %113

113:                                              ; preds = %48
  %114 = load i32, ptr %11, align 4, !tbaa !9
  %115 = add i32 %114, 1
  store i32 %115, ptr %11, align 4, !tbaa !9
  br label %44, !llvm.loop !15

116:                                              ; preds = %44
  br label %117

117:                                              ; preds = %116, %4
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %118

118:                                              ; preds = %327, %117
  %119 = load i32, ptr %11, align 4, !tbaa !9
  %120 = load i32, ptr %7, align 4, !tbaa !9
  %121 = icmp ult i32 %119, %120
  br i1 %121, label %122, label %330

122:                                              ; preds = %118
  %123 = load i32, ptr %11, align 4, !tbaa !9
  %124 = zext i32 %123 to i64
  %125 = getelementptr inbounds { float, float }, ptr %17, i64 %124
  %126 = getelementptr inbounds { float, float }, ptr %125, i32 0, i32 0
  %127 = load float, ptr %126, align 8
  %128 = getelementptr inbounds { float, float }, ptr %125, i32 0, i32 1
  %129 = load float, ptr %128, align 4
  %130 = load ptr, ptr %6, align 8, !tbaa !5
  %131 = load i32, ptr %11, align 4, !tbaa !9
  %132 = zext i32 %131 to i64
  %133 = getelementptr inbounds { float, float }, ptr %130, i64 %132
  %134 = getelementptr inbounds { float, float }, ptr %133, i32 0, i32 0
  %135 = load float, ptr %134, align 4
  %136 = getelementptr inbounds { float, float }, ptr %133, i32 0, i32 1
  %137 = load float, ptr %136, align 4
  %138 = fsub float %127, %135
  %139 = fsub float %129, %137
  %140 = fpext float %138 to double
  %141 = fpext float %139 to double
  %142 = load i32, ptr %11, align 4, !tbaa !9
  %143 = zext i32 %142 to i64
  %144 = getelementptr inbounds { float, float }, ptr %17, i64 %143
  %145 = getelementptr inbounds { float, float }, ptr %144, i32 0, i32 0
  %146 = load float, ptr %145, align 8
  %147 = getelementptr inbounds { float, float }, ptr %144, i32 0, i32 1
  %148 = load float, ptr %147, align 4
  %149 = load ptr, ptr %6, align 8, !tbaa !5
  %150 = load i32, ptr %11, align 4, !tbaa !9
  %151 = zext i32 %150 to i64
  %152 = getelementptr inbounds { float, float }, ptr %149, i64 %151
  %153 = getelementptr inbounds { float, float }, ptr %152, i32 0, i32 0
  %154 = load float, ptr %153, align 4
  %155 = getelementptr inbounds { float, float }, ptr %152, i32 0, i32 1
  %156 = load float, ptr %155, align 4
  %157 = fsub float %146, %154
  %158 = fsub float %148, %156
  %159 = fpext float %157 to double
  %160 = fpext float %158 to double
  %161 = load i32, ptr %11, align 4, !tbaa !9
  %162 = zext i32 %161 to i64
  %163 = getelementptr inbounds { float, float }, ptr %17, i64 %162
  %164 = getelementptr inbounds { float, float }, ptr %163, i32 0, i32 0
  %165 = load float, ptr %164, align 8
  %166 = getelementptr inbounds { float, float }, ptr %163, i32 0, i32 1
  %167 = load float, ptr %166, align 4
  %168 = load ptr, ptr %6, align 8, !tbaa !5
  %169 = load i32, ptr %11, align 4, !tbaa !9
  %170 = zext i32 %169 to i64
  %171 = getelementptr inbounds { float, float }, ptr %168, i64 %170
  %172 = getelementptr inbounds { float, float }, ptr %171, i32 0, i32 0
  %173 = load float, ptr %172, align 4
  %174 = getelementptr inbounds { float, float }, ptr %171, i32 0, i32 1
  %175 = load float, ptr %174, align 4
  %176 = fsub float %165, %173
  %177 = fsub float %167, %175
  %178 = fpext float %176 to double
  %179 = fpext float %177 to double
  %180 = load i32, ptr %11, align 4, !tbaa !9
  %181 = zext i32 %180 to i64
  %182 = getelementptr inbounds { float, float }, ptr %17, i64 %181
  %183 = getelementptr inbounds { float, float }, ptr %182, i32 0, i32 0
  %184 = load float, ptr %183, align 8
  %185 = getelementptr inbounds { float, float }, ptr %182, i32 0, i32 1
  %186 = load float, ptr %185, align 4
  %187 = load ptr, ptr %6, align 8, !tbaa !5
  %188 = load i32, ptr %11, align 4, !tbaa !9
  %189 = zext i32 %188 to i64
  %190 = getelementptr inbounds { float, float }, ptr %187, i64 %189
  %191 = getelementptr inbounds { float, float }, ptr %190, i32 0, i32 0
  %192 = load float, ptr %191, align 4
  %193 = getelementptr inbounds { float, float }, ptr %190, i32 0, i32 1
  %194 = load float, ptr %193, align 4
  %195 = fsub float %184, %192
  %196 = fsub float %186, %194
  %197 = fpext float %195 to double
  %198 = fpext float %196 to double
  %199 = fmul double %179, %198
  %200 = call double @llvm.fmuladd.f64(double %140, double %159, double %199)
  %201 = call double @sqrt(double noundef %200) #6
  %202 = load float, ptr %8, align 4, !tbaa !11
  %203 = fpext float %202 to double
  %204 = fcmp ogt double %201, %203
  br i1 %204, label %243, label %205

205:                                              ; preds = %122
  %206 = load i32, ptr %11, align 4, !tbaa !9
  %207 = zext i32 %206 to i64
  %208 = getelementptr inbounds { float, float }, ptr %17, i64 %207
  %209 = getelementptr inbounds { float, float }, ptr %208, i32 0, i32 0
  %210 = load float, ptr %209, align 8
  %211 = getelementptr inbounds { float, float }, ptr %208, i32 0, i32 1
  %212 = load float, ptr %211, align 4
  %213 = call i1 @llvm.is.fpclass.f32(float %210, i32 3)
  br i1 %213, label %243, label %214

214:                                              ; preds = %205
  %215 = load i32, ptr %11, align 4, !tbaa !9
  %216 = zext i32 %215 to i64
  %217 = getelementptr inbounds { float, float }, ptr %17, i64 %216
  %218 = getelementptr inbounds { float, float }, ptr %217, i32 0, i32 0
  %219 = load float, ptr %218, align 8
  %220 = getelementptr inbounds { float, float }, ptr %217, i32 0, i32 1
  %221 = load float, ptr %220, align 4
  %222 = call i1 @llvm.is.fpclass.f32(float %221, i32 3)
  br i1 %222, label %243, label %223

223:                                              ; preds = %214
  %224 = load ptr, ptr %6, align 8, !tbaa !5
  %225 = load i32, ptr %11, align 4, !tbaa !9
  %226 = zext i32 %225 to i64
  %227 = getelementptr inbounds { float, float }, ptr %224, i64 %226
  %228 = getelementptr inbounds { float, float }, ptr %227, i32 0, i32 0
  %229 = load float, ptr %228, align 4
  %230 = getelementptr inbounds { float, float }, ptr %227, i32 0, i32 1
  %231 = load float, ptr %230, align 4
  %232 = call i1 @llvm.is.fpclass.f32(float %229, i32 3)
  br i1 %232, label %243, label %233

233:                                              ; preds = %223
  %234 = load ptr, ptr %6, align 8, !tbaa !5
  %235 = load i32, ptr %11, align 4, !tbaa !9
  %236 = zext i32 %235 to i64
  %237 = getelementptr inbounds { float, float }, ptr %234, i64 %236
  %238 = getelementptr inbounds { float, float }, ptr %237, i32 0, i32 0
  %239 = load float, ptr %238, align 4
  %240 = getelementptr inbounds { float, float }, ptr %237, i32 0, i32 1
  %241 = load float, ptr %240, align 4
  %242 = call i1 @llvm.is.fpclass.f32(float %241, i32 3)
  br i1 %242, label %243, label %325

243:                                              ; preds = %233, %223, %214, %205, %122
  %244 = load i32, ptr %11, align 4, !tbaa !9
  %245 = zext i32 %244 to i64
  %246 = getelementptr inbounds { float, float }, ptr %17, i64 %245
  %247 = getelementptr inbounds { float, float }, ptr %246, i32 0, i32 0
  %248 = load float, ptr %247, align 8
  %249 = getelementptr inbounds { float, float }, ptr %246, i32 0, i32 1
  %250 = load float, ptr %249, align 4
  %251 = load ptr, ptr %6, align 8, !tbaa !5
  %252 = load i32, ptr %11, align 4, !tbaa !9
  %253 = zext i32 %252 to i64
  %254 = getelementptr inbounds { float, float }, ptr %251, i64 %253
  %255 = getelementptr inbounds { float, float }, ptr %254, i32 0, i32 0
  %256 = load float, ptr %255, align 4
  %257 = getelementptr inbounds { float, float }, ptr %254, i32 0, i32 1
  %258 = load float, ptr %257, align 4
  %259 = fsub float %248, %256
  %260 = fsub float %250, %258
  %261 = fpext float %259 to double
  %262 = fpext float %260 to double
  %263 = load i32, ptr %11, align 4, !tbaa !9
  %264 = zext i32 %263 to i64
  %265 = getelementptr inbounds { float, float }, ptr %17, i64 %264
  %266 = getelementptr inbounds { float, float }, ptr %265, i32 0, i32 0
  %267 = load float, ptr %266, align 8
  %268 = getelementptr inbounds { float, float }, ptr %265, i32 0, i32 1
  %269 = load float, ptr %268, align 4
  %270 = load ptr, ptr %6, align 8, !tbaa !5
  %271 = load i32, ptr %11, align 4, !tbaa !9
  %272 = zext i32 %271 to i64
  %273 = getelementptr inbounds { float, float }, ptr %270, i64 %272
  %274 = getelementptr inbounds { float, float }, ptr %273, i32 0, i32 0
  %275 = load float, ptr %274, align 4
  %276 = getelementptr inbounds { float, float }, ptr %273, i32 0, i32 1
  %277 = load float, ptr %276, align 4
  %278 = fsub float %267, %275
  %279 = fsub float %269, %277
  %280 = fpext float %278 to double
  %281 = fpext float %279 to double
  %282 = load i32, ptr %11, align 4, !tbaa !9
  %283 = zext i32 %282 to i64
  %284 = getelementptr inbounds { float, float }, ptr %17, i64 %283
  %285 = getelementptr inbounds { float, float }, ptr %284, i32 0, i32 0
  %286 = load float, ptr %285, align 8
  %287 = getelementptr inbounds { float, float }, ptr %284, i32 0, i32 1
  %288 = load float, ptr %287, align 4
  %289 = load ptr, ptr %6, align 8, !tbaa !5
  %290 = load i32, ptr %11, align 4, !tbaa !9
  %291 = zext i32 %290 to i64
  %292 = getelementptr inbounds { float, float }, ptr %289, i64 %291
  %293 = getelementptr inbounds { float, float }, ptr %292, i32 0, i32 0
  %294 = load float, ptr %293, align 4
  %295 = getelementptr inbounds { float, float }, ptr %292, i32 0, i32 1
  %296 = load float, ptr %295, align 4
  %297 = fsub float %286, %294
  %298 = fsub float %288, %296
  %299 = fpext float %297 to double
  %300 = fpext float %298 to double
  %301 = load i32, ptr %11, align 4, !tbaa !9
  %302 = zext i32 %301 to i64
  %303 = getelementptr inbounds { float, float }, ptr %17, i64 %302
  %304 = getelementptr inbounds { float, float }, ptr %303, i32 0, i32 0
  %305 = load float, ptr %304, align 8
  %306 = getelementptr inbounds { float, float }, ptr %303, i32 0, i32 1
  %307 = load float, ptr %306, align 4
  %308 = load ptr, ptr %6, align 8, !tbaa !5
  %309 = load i32, ptr %11, align 4, !tbaa !9
  %310 = zext i32 %309 to i64
  %311 = getelementptr inbounds { float, float }, ptr %308, i64 %310
  %312 = getelementptr inbounds { float, float }, ptr %311, i32 0, i32 0
  %313 = load float, ptr %312, align 4
  %314 = getelementptr inbounds { float, float }, ptr %311, i32 0, i32 1
  %315 = load float, ptr %314, align 4
  %316 = fsub float %305, %313
  %317 = fsub float %307, %315
  %318 = fpext float %316 to double
  %319 = fpext float %317 to double
  %320 = fmul double %300, %319
  %321 = call double @llvm.fmuladd.f64(double %261, double %280, double %320)
  %322 = call double @sqrt(double noundef %321) #6
  %323 = load float, ptr %8, align 4, !tbaa !11
  %324 = fpext float %323 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str.6, i32 noundef 62, ptr noundef @.str.7, double noundef %322, ptr noundef @.str.8, ptr noundef @.str.9, double noundef %324)
  br label %326

325:                                              ; preds = %233
  call void (...) @liquid_autotest_passed()
  br label %326

326:                                              ; preds = %325, %243
  br label %327

327:                                              ; preds = %326
  %328 = load i32, ptr %11, align 4, !tbaa !9
  %329 = add i32 %328, 1
  store i32 %329, ptr %11, align 4, !tbaa !9
  br label %118, !llvm.loop !16

330:                                              ; preds = %118
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  %331 = load ptr, ptr %9, align 8
  call void @llvm.stackrestore.p0(ptr %331)
  ret void
}

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

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

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

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

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

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

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

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

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

declare 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

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

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

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


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

@liquid_autotest_verbose = external local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [101 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @polyf_findroots_testbench(ptr noundef %0, ptr nocapture noundef readonly %1, i32 noundef %2, float noundef %3) local_unnamed_addr #0 {
  %5 = zext i32 %2 to i64
  %6 = alloca { float, float }, i64 %5, align 16
  %7 = add i32 %2, 1
  %8 = call i32 @polyf_findroots(ptr noundef %0, i32 noundef %7, ptr noundef nonnull %6) #6
  %9 = load i32, ptr @liquid_autotest_verbose, align 4, !tbaa !5
  %.not = icmp eq i32 %9, 0
  br i1 %.not, label %.loopexit, label %10

10:                                               ; preds = %4
  %11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  br label %12

12:                                               ; preds = %10, %12
  %.064 = phi i32 [ 0, %10 ], [ %18, %12 ]
  %13 = zext i32 %.064 to i64
  %14 = getelementptr inbounds float, ptr %0, i64 %13
  %15 = load float, ptr %14, align 4, !tbaa !9
  %16 = fpext float %15 to double
  %17 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %.064, double noundef %16)
  %18 = add i32 %.064, 1
  %.not62 = icmp ugt i32 %18, %2
  br i1 %.not62, label %19, label %12, !llvm.loop !11

19:                                               ; preds = %12
  %20 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %.not68 = icmp eq i32 %2, 0
  br i1 %.not68, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %19, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %19 ]
  %21 = getelementptr inbounds { float, float }, ptr %6, i64 %indvars.iv
  %22 = getelementptr inbounds i8, ptr %21, i64 4
  %23 = getelementptr inbounds { float, float }, ptr %1, i64 %indvars.iv
  %24 = getelementptr inbounds i8, ptr %23, i64 4
  %25 = load <2 x float>, ptr %21, align 8
  %26 = load <2 x float>, ptr %23, align 4
  %27 = fsub <2 x float> %25, %26
  %28 = call float @cabsf(<2 x float> noundef %27) #6
  %29 = load float, ptr %21, align 8
  %30 = fpext float %29 to double
  %31 = load float, ptr %22, align 4
  %32 = fpext float %31 to double
  %33 = load float, ptr %23, align 4
  %34 = fpext float %33 to double
  %35 = load float, ptr %24, align 4
  %36 = fpext float %35 to double
  %37 = fpext float %28 to double
  %38 = fcmp olt float %28, %3
  %39 = select i1 %38, ptr @.str.4, ptr @.str.5
  %40 = trunc nuw i64 %indvars.iv to i32
  %41 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %40, double noundef %30, double noundef %32, double noundef %34, double noundef %36, double noundef %37, ptr noundef nonnull %39)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %5
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph, !llvm.loop !13

.loopexit:                                        ; preds = %.lr.ph, %4
  %.not69 = icmp eq i32 %2, 0
  br i1 %.not69, label %._crit_edge, label %.lr.ph67

.lr.ph67:                                         ; preds = %.loopexit
  %42 = fpext float %3 to double
  br label %43

43:                                               ; preds = %.lr.ph67, %63
  %indvars.iv71 = phi i64 [ 0, %.lr.ph67 ], [ %indvars.iv.next72, %63 ]
  %44 = getelementptr inbounds { float, float }, ptr %6, i64 %indvars.iv71
  %45 = load <2 x float>, ptr %44, align 8
  %46 = getelementptr inbounds { float, float }, ptr %1, i64 %indvars.iv71
  %47 = load <2 x float>, ptr %46, align 4
  %48 = fsub <2 x float> %45, %47
  %49 = extractelement <2 x float> %48, i64 0
  %50 = fsub <2 x float> %45, %47
  %51 = extractelement <2 x float> %50, i64 1
  %52 = fpext float %49 to double
  %53 = fpext float %51 to double
  %54 = fmul double %53, %53
  %55 = call double @llvm.fmuladd.f64(double %52, double %52, double %54)
  %sqrt = call double @llvm.sqrt.f64(double %55)
  %56 = fcmp ogt double %sqrt, %42
  %57 = shufflevector <2 x float> %45, <2 x float> %47, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
  %.fr = freeze <4 x float> %57
  %58 = fcmp uno <4 x float> %.fr, zeroinitializer
  %59 = bitcast <4 x i1> %58 to i4
  %60 = icmp ne i4 %59, 0
  %op.rdx = or i1 %56, %60
  br i1 %op.rdx, label %61, label %62

61:                                               ; preds = %43
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str.6, i32 noundef 62, ptr noundef nonnull @.str.7, double noundef %sqrt, ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.9, double noundef %42) #6
  br label %63

62:                                               ; preds = %43
  call void (...) @liquid_autotest_passed() #6
  br label %63

63:                                               ; preds = %61, %62
  %indvars.iv.next72 = add nuw nsw i64 %indvars.iv71, 1
  %exitcond75.not = icmp eq i64 %indvars.iv.next72, %5
  br i1 %exitcond75.not, label %._crit_edge, label %43, !llvm.loop !14

._crit_edge:                                      ; preds = %63, %19, %.loopexit
  ret void
}

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

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

; Function Attrs: nounwind
declare float @cabsf(<2 x float> 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 #1

declare void @liquid_autotest_passed(...) local_unnamed_addr #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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }

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

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


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