; LLVM IR from jgaeddert/liquid-dsp :: src/math/tests (polynomial_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"

@__const.autotest_polyf_fit_q3n3.x = external hidden unnamed_addr constant [3 x float], align 4
@__const.autotest_polyf_fit_q3n3.y = external hidden unnamed_addr constant [3 x float], align 4
@__const.autotest_polyf_fit_q3n3.p_test = external hidden unnamed_addr constant [3 x float], align 4
@liquid_autotest_verbose = external global i32, align 4
@.str = external hidden unnamed_addr constant [23 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [24 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @autotest_polyf_fit_q3n3() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca [3 x float], align 4
  %4 = alloca [3 x float], align 4
  %5 = alloca [3 x float], align 4
  %6 = alloca [3 x float], align 4
  %7 = alloca float, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #6
  store i32 2, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 3, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %3) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %3, ptr align 4 @__const.autotest_polyf_fit_q3n3.x, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %4) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %4, ptr align 4 @__const.autotest_polyf_fit_q3n3.y, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %6) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %6, ptr align 4 @__const.autotest_polyf_fit_q3n3.p_test, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store float 0x3F50624DE0000000, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %10 = load i32, ptr %1, align 4, !tbaa !5
  %11 = add i32 %10, 1
  store i32 %11, ptr %8, align 4, !tbaa !5
  %12 = getelementptr inbounds [3 x float], ptr %3, i64 0, i64 0
  %13 = getelementptr inbounds [3 x float], ptr %4, i64 0, i64 0
  %14 = load i32, ptr %2, align 4, !tbaa !5
  %15 = getelementptr inbounds [3 x float], ptr %5, i64 0, i64 0
  %16 = load i32, ptr %8, align 4, !tbaa !5
  %17 = call i32 @polyf_fit(ptr noundef %12, ptr noundef %13, i32 noundef %14, ptr noundef %15, i32 noundef %16)
  %18 = load i32, ptr @liquid_autotest_verbose, align 4, !tbaa !5
  %19 = icmp ne i32 %18, 0
  br i1 %19, label %20, label %56

20:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %21

21:                                               ; preds = %37, %20
  %22 = load i32, ptr %9, align 4, !tbaa !5
  %23 = icmp ult i32 %22, 3
  br i1 %23, label %24, label %40

24:                                               ; preds = %21
  %25 = load i32, ptr %9, align 4, !tbaa !5
  %26 = load i32, ptr %9, align 4, !tbaa !5
  %27 = zext i32 %26 to i64
  %28 = getelementptr inbounds [3 x float], ptr %3, i64 0, i64 %27
  %29 = load float, ptr %28, align 4, !tbaa !9
  %30 = fpext float %29 to double
  %31 = load i32, ptr %9, align 4, !tbaa !5
  %32 = zext i32 %31 to i64
  %33 = getelementptr inbounds [3 x float], ptr %4, i64 0, i64 %32
  %34 = load float, ptr %33, align 4, !tbaa !9
  %35 = fpext float %34 to double
  %36 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %25, double noundef %30, double noundef %35)
  br label %37

37:                                               ; preds = %24
  %38 = load i32, ptr %9, align 4, !tbaa !5
  %39 = add i32 %38, 1
  store i32 %39, ptr %9, align 4, !tbaa !5
  br label %21, !llvm.loop !11

40:                                               ; preds = %21
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %52, %40
  %42 = load i32, ptr %9, align 4, !tbaa !5
  %43 = icmp ult i32 %42, 3
  br i1 %43, label %44, label %55

44:                                               ; preds = %41
  %45 = load i32, ptr %9, align 4, !tbaa !5
  %46 = load i32, ptr %9, align 4, !tbaa !5
  %47 = zext i32 %46 to i64
  %48 = getelementptr inbounds [3 x float], ptr %5, i64 0, i64 %47
  %49 = load float, ptr %48, align 4, !tbaa !9
  %50 = fpext float %49 to double
  %51 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %45, double noundef %50)
  br label %52

52:                                               ; preds = %44
  %53 = load i32, ptr %9, align 4, !tbaa !5
  %54 = add i32 %53, 1
  store i32 %54, ptr %9, align 4, !tbaa !5
  br label %41, !llvm.loop !13

55:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %56

56:                                               ; preds = %55, %0
  %57 = getelementptr inbounds [3 x float], ptr %5, i64 0, i64 0
  %58 = load float, ptr %57, align 4, !tbaa !9
  %59 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 0
  %60 = load float, ptr %59, align 4, !tbaa !9
  %61 = fsub float %58, %60
  %62 = fpext float %61 to double
  %63 = getelementptr inbounds [3 x float], ptr %5, i64 0, i64 0
  %64 = load float, ptr %63, align 4, !tbaa !9
  %65 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 0
  %66 = load float, ptr %65, align 4, !tbaa !9
  %67 = fsub float %64, %66
  %68 = fpext float %67 to double
  %69 = getelementptr inbounds [3 x float], ptr %5, i64 0, i64 0
  %70 = load float, ptr %69, align 4, !tbaa !9
  %71 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 0
  %72 = load float, ptr %71, align 4, !tbaa !9
  %73 = fsub float %70, %72
  %74 = fpext float %73 to double
  %75 = getelementptr inbounds [3 x float], ptr %5, i64 0, i64 0
  %76 = load float, ptr %75, align 4, !tbaa !9
  %77 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 0
  %78 = load float, ptr %77, align 4, !tbaa !9
  %79 = fsub float %76, %78
  %80 = fpext float %79 to double
  %81 = call double @llvm.fmuladd.f64(double %62, double %68, double 0.000000e+00)
  %82 = call double @sqrt(double noundef %81) #6
  %83 = load float, ptr %7, align 4, !tbaa !9
  %84 = fpext float %83 to double
  %85 = fcmp ogt double %82, %84
  br i1 %85, label %102, label %86

86:                                               ; preds = %56
  %87 = getelementptr inbounds [3 x float], ptr %5, i64 0, i64 0
  %88 = load float, ptr %87, align 4, !tbaa !9
  %89 = call i1 @llvm.is.fpclass.f32(float %88, i32 3)
  br i1 %89, label %102, label %90

90:                                               ; preds = %86
  %91 = getelementptr inbounds [3 x float], ptr %5, i64 0, i64 0
  %92 = load float, ptr %91, align 4, !tbaa !9
  %93 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %93, label %102, label %94

94:                                               ; preds = %90
  %95 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 0
  %96 = load float, ptr %95, align 4, !tbaa !9
  %97 = call i1 @llvm.is.fpclass.f32(float %96, i32 3)
  br i1 %97, label %102, label %98

98:                                               ; preds = %94
  %99 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 0
  %100 = load float, ptr %99, align 4, !tbaa !9
  %101 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %101, label %102, label %131

102:                                              ; preds = %98, %94, %90, %86, %56
  %103 = getelementptr inbounds [3 x float], ptr %5, i64 0, i64 0
  %104 = load float, ptr %103, align 4, !tbaa !9
  %105 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 0
  %106 = load float, ptr %105, align 4, !tbaa !9
  %107 = fsub float %104, %106
  %108 = fpext float %107 to double
  %109 = getelementptr inbounds [3 x float], ptr %5, i64 0, i64 0
  %110 = load float, ptr %109, align 4, !tbaa !9
  %111 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 0
  %112 = load float, ptr %111, align 4, !tbaa !9
  %113 = fsub float %110, %112
  %114 = fpext float %113 to double
  %115 = getelementptr inbounds [3 x float], ptr %5, i64 0, i64 0
  %116 = load float, ptr %115, align 4, !tbaa !9
  %117 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 0
  %118 = load float, ptr %117, align 4, !tbaa !9
  %119 = fsub float %116, %118
  %120 = fpext float %119 to double
  %121 = getelementptr inbounds [3 x float], ptr %5, i64 0, i64 0
  %122 = load float, ptr %121, align 4, !tbaa !9
  %123 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 0
  %124 = load float, ptr %123, align 4, !tbaa !9
  %125 = fsub float %122, %124
  %126 = fpext float %125 to double
  %127 = call double @llvm.fmuladd.f64(double %108, double %114, double 0.000000e+00)
  %128 = call double @sqrt(double noundef %127) #6
  %129 = load float, ptr %7, align 4, !tbaa !9
  %130 = fpext float %129 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str.2, i32 noundef 53, ptr noundef @.str.3, double noundef %128, ptr noundef @.str.4, ptr noundef @.str.5, double noundef %130)
  br label %132

131:                                              ; preds = %98
  call void (...) @liquid_autotest_passed()
  br label %132

132:                                              ; preds = %131, %102
  %133 = getelementptr inbounds [3 x float], ptr %5, i64 0, i64 1
  %134 = load float, ptr %133, align 4, !tbaa !9
  %135 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 1
  %136 = load float, ptr %135, align 4, !tbaa !9
  %137 = fsub float %134, %136
  %138 = fpext float %137 to double
  %139 = getelementptr inbounds [3 x float], ptr %5, i64 0, i64 1
  %140 = load float, ptr %139, align 4, !tbaa !9
  %141 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 1
  %142 = load float, ptr %141, align 4, !tbaa !9
  %143 = fsub float %140, %142
  %144 = fpext float %143 to double
  %145 = getelementptr inbounds [3 x float], ptr %5, i64 0, i64 1
  %146 = load float, ptr %145, align 4, !tbaa !9
  %147 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 1
  %148 = load float, ptr %147, align 4, !tbaa !9
  %149 = fsub float %146, %148
  %150 = fpext float %149 to double
  %151 = getelementptr inbounds [3 x float], ptr %5, i64 0, i64 1
  %152 = load float, ptr %151, align 4, !tbaa !9
  %153 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 1
  %154 = load float, ptr %153, align 4, !tbaa !9
  %155 = fsub float %152, %154
  %156 = fpext float %155 to double
  %157 = call double @llvm.fmuladd.f64(double %138, double %144, double 0.000000e+00)
  %158 = call double @sqrt(double noundef %157) #6
  %159 = load float, ptr %7, align 4, !tbaa !9
  %160 = fpext float %159 to double
  %161 = fcmp ogt double %158, %160
  br i1 %161, label %178, label %162

162:                                              ; preds = %132
  %163 = getelementptr inbounds [3 x float], ptr %5, i64 0, i64 1
  %164 = load float, ptr %163, align 4, !tbaa !9
  %165 = call i1 @llvm.is.fpclass.f32(float %164, i32 3)
  br i1 %165, label %178, label %166

166:                                              ; preds = %162
  %167 = getelementptr inbounds [3 x float], ptr %5, i64 0, i64 1
  %168 = load float, ptr %167, align 4, !tbaa !9
  %169 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %169, label %178, label %170

170:                                              ; preds = %166
  %171 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 1
  %172 = load float, ptr %171, align 4, !tbaa !9
  %173 = call i1 @llvm.is.fpclass.f32(float %172, i32 3)
  br i1 %173, label %178, label %174

174:                                              ; preds = %170
  %175 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 1
  %176 = load float, ptr %175, align 4, !tbaa !9
  %177 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %177, label %178, label %207

178:                                              ; preds = %174, %170, %166, %162, %132
  %179 = getelementptr inbounds [3 x float], ptr %5, i64 0, i64 1
  %180 = load float, ptr %179, align 4, !tbaa !9
  %181 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 1
  %182 = load float, ptr %181, align 4, !tbaa !9
  %183 = fsub float %180, %182
  %184 = fpext float %183 to double
  %185 = getelementptr inbounds [3 x float], ptr %5, i64 0, i64 1
  %186 = load float, ptr %185, align 4, !tbaa !9
  %187 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 1
  %188 = load float, ptr %187, align 4, !tbaa !9
  %189 = fsub float %186, %188
  %190 = fpext float %189 to double
  %191 = getelementptr inbounds [3 x float], ptr %5, i64 0, i64 1
  %192 = load float, ptr %191, align 4, !tbaa !9
  %193 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 1
  %194 = load float, ptr %193, align 4, !tbaa !9
  %195 = fsub float %192, %194
  %196 = fpext float %195 to double
  %197 = getelementptr inbounds [3 x float], ptr %5, i64 0, i64 1
  %198 = load float, ptr %197, align 4, !tbaa !9
  %199 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 1
  %200 = load float, ptr %199, align 4, !tbaa !9
  %201 = fsub float %198, %200
  %202 = fpext float %201 to double
  %203 = call double @llvm.fmuladd.f64(double %184, double %190, double 0.000000e+00)
  %204 = call double @sqrt(double noundef %203) #6
  %205 = load float, ptr %7, align 4, !tbaa !9
  %206 = fpext float %205 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str.2, i32 noundef 54, ptr noundef @.str.6, double noundef %204, ptr noundef @.str.4, ptr noundef @.str.5, double noundef %206)
  br label %208

207:                                              ; preds = %174
  call void (...) @liquid_autotest_passed()
  br label %208

208:                                              ; preds = %207, %178
  %209 = getelementptr inbounds [3 x float], ptr %5, i64 0, i64 2
  %210 = load float, ptr %209, align 4, !tbaa !9
  %211 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 2
  %212 = load float, ptr %211, align 4, !tbaa !9
  %213 = fsub float %210, %212
  %214 = fpext float %213 to double
  %215 = getelementptr inbounds [3 x float], ptr %5, i64 0, i64 2
  %216 = load float, ptr %215, align 4, !tbaa !9
  %217 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 2
  %218 = load float, ptr %217, align 4, !tbaa !9
  %219 = fsub float %216, %218
  %220 = fpext float %219 to double
  %221 = getelementptr inbounds [3 x float], ptr %5, i64 0, i64 2
  %222 = load float, ptr %221, align 4, !tbaa !9
  %223 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 2
  %224 = load float, ptr %223, align 4, !tbaa !9
  %225 = fsub float %222, %224
  %226 = fpext float %225 to double
  %227 = getelementptr inbounds [3 x float], ptr %5, i64 0, i64 2
  %228 = load float, ptr %227, align 4, !tbaa !9
  %229 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 2
  %230 = load float, ptr %229, align 4, !tbaa !9
  %231 = fsub float %228, %230
  %232 = fpext float %231 to double
  %233 = call double @llvm.fmuladd.f64(double %214, double %220, double 0.000000e+00)
  %234 = call double @sqrt(double noundef %233) #6
  %235 = load float, ptr %7, align 4, !tbaa !9
  %236 = fpext float %235 to double
  %237 = fcmp ogt double %234, %236
  br i1 %237, label %254, label %238

238:                                              ; preds = %208
  %239 = getelementptr inbounds [3 x float], ptr %5, i64 0, i64 2
  %240 = load float, ptr %239, align 4, !tbaa !9
  %241 = call i1 @llvm.is.fpclass.f32(float %240, i32 3)
  br i1 %241, label %254, label %242

242:                                              ; preds = %238
  %243 = getelementptr inbounds [3 x float], ptr %5, i64 0, i64 2
  %244 = load float, ptr %243, align 4, !tbaa !9
  %245 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %245, label %254, label %246

246:                                              ; preds = %242
  %247 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 2
  %248 = load float, ptr %247, align 4, !tbaa !9
  %249 = call i1 @llvm.is.fpclass.f32(float %248, i32 3)
  br i1 %249, label %254, label %250

250:                                              ; preds = %246
  %251 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 2
  %252 = load float, ptr %251, align 4, !tbaa !9
  %253 = call i1 @llvm.is.fpclass.f32(float 0.000000e+00, i32 3)
  br i1 %253, label %254, label %283

254:                                              ; preds = %250, %246, %242, %238, %208
  %255 = getelementptr inbounds [3 x float], ptr %5, i64 0, i64 2
  %256 = load float, ptr %255, align 4, !tbaa !9
  %257 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 2
  %258 = load float, ptr %257, align 4, !tbaa !9
  %259 = fsub float %256, %258
  %260 = fpext float %259 to double
  %261 = getelementptr inbounds [3 x float], ptr %5, i64 0, i64 2
  %262 = load float, ptr %261, align 4, !tbaa !9
  %263 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 2
  %264 = load float, ptr %263, align 4, !tbaa !9
  %265 = fsub float %262, %264
  %266 = fpext float %265 to double
  %267 = getelementptr inbounds [3 x float], ptr %5, i64 0, i64 2
  %268 = load float, ptr %267, align 4, !tbaa !9
  %269 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 2
  %270 = load float, ptr %269, align 4, !tbaa !9
  %271 = fsub float %268, %270
  %272 = fpext float %271 to double
  %273 = getelementptr inbounds [3 x float], ptr %5, i64 0, i64 2
  %274 = load float, ptr %273, align 4, !tbaa !9
  %275 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 2
  %276 = load float, ptr %275, align 4, !tbaa !9
  %277 = fsub float %274, %276
  %278 = fpext float %277 to double
  %279 = call double @llvm.fmuladd.f64(double %260, double %266, double 0.000000e+00)
  %280 = call double @sqrt(double noundef %279) #6
  %281 = load float, ptr %7, align 4, !tbaa !9
  %282 = fpext float %281 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str.2, i32 noundef 55, ptr noundef @.str.7, double noundef %280, ptr noundef @.str.4, ptr noundef @.str.5, double noundef %282)
  br label %284

283:                                              ; preds = %250
  call void (...) @liquid_autotest_passed()
  br label %284

284:                                              ; preds = %283, %254
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  ret void
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

declare i32 @polyf_fit(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) #3

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

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

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

declare void @liquid_autotest_passed(...) #3

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "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 = { 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 = !{!"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}


; 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"

@__const.autotest_polyf_fit_q3n3.x = external hidden unnamed_addr constant [3 x float], align 4
@__const.autotest_polyf_fit_q3n3.y = external hidden unnamed_addr constant [3 x float], align 4
@__const.autotest_polyf_fit_q3n3.p_test = external hidden unnamed_addr constant [3 x float], align 4
@liquid_autotest_verbose = external local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [23 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [24 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @autotest_polyf_fit_q3n3() local_unnamed_addr #0 {
  %1 = alloca [3 x float], align 4
  %2 = alloca [3 x float], align 4
  %3 = alloca [3 x float], align 4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %1) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) @__const.autotest_polyf_fit_q3n3.x, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %2) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(12) @__const.autotest_polyf_fit_q3n3.y, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %3) #7
  %.sroa.0.0.copyload = load float, ptr @__const.autotest_polyf_fit_q3n3.p_test, align 4
  %.sroa.13.0.copyload = load float, ptr getelementptr inbounds (i8, ptr @__const.autotest_polyf_fit_q3n3.p_test, i64 4), align 4
  %.sroa.23.0.copyload = load float, ptr getelementptr inbounds (i8, ptr @__const.autotest_polyf_fit_q3n3.p_test, i64 8), align 4
  %4 = call i32 @polyf_fit(ptr noundef nonnull %1, ptr noundef nonnull %2, i32 noundef 3, ptr noundef nonnull %3, i32 noundef 3) #7
  %5 = load i32, ptr @liquid_autotest_verbose, align 4, !tbaa !5
  %.not = icmp eq i32 %5, 0
  br i1 %.not, label %.loopexit, label %.preheader57.preheader

.preheader57.preheader:                           ; preds = %0
  %6 = load float, ptr %1, align 4, !tbaa !9
  %7 = fpext float %6 to double
  %8 = load float, ptr %2, align 4, !tbaa !9
  %9 = fpext float %8 to double
  %10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef 0, double noundef %7, double noundef %9)
  %11 = getelementptr inbounds i8, ptr %1, i64 4
  %12 = load float, ptr %11, align 4, !tbaa !9
  %13 = fpext float %12 to double
  %14 = getelementptr inbounds i8, ptr %2, i64 4
  %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, i32 noundef 1, double noundef %13, double noundef %16)
  %18 = getelementptr inbounds i8, ptr %1, i64 8
  %19 = load float, ptr %18, align 4, !tbaa !9
  %20 = fpext float %19 to double
  %21 = getelementptr inbounds i8, ptr %2, i64 8
  %22 = load float, ptr %21, align 4, !tbaa !9
  %23 = fpext float %22 to double
  %24 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef 2, double noundef %20, double noundef %23)
  %25 = load float, ptr %3, align 4, !tbaa !9
  %26 = fpext float %25 to double
  %27 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 0, double noundef %26)
  %28 = getelementptr inbounds i8, ptr %3, i64 4
  %29 = load float, ptr %28, align 4, !tbaa !9
  %30 = fpext float %29 to double
  %31 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 1, double noundef %30)
  %32 = getelementptr inbounds i8, ptr %3, i64 8
  %33 = load float, ptr %32, align 4, !tbaa !9
  %34 = fpext float %33 to double
  %35 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 2, double noundef %34)
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader57.preheader, %0
  %36 = load float, ptr %3, align 4
  %37 = fsub float %36, %.sroa.0.0.copyload
  %38 = fpext float %37 to double
  %39 = call double @llvm.fmuladd.f64(double %38, double %38, double 0.000000e+00)
  %sqrt = call double @llvm.sqrt.f64(double %39)
  %40 = fcmp ogt double %sqrt, 0x3F50624DE0000000
  %41 = fcmp uno float %36, 0.000000e+00
  %or.cond = select i1 %40, i1 true, i1 %41
  %42 = fcmp uno float %.sroa.0.0.copyload, 0.000000e+00
  %or.cond45 = select i1 %or.cond, i1 true, i1 %42
  br i1 %or.cond45, label %43, label %44

43:                                               ; preds = %.loopexit
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str.2, i32 noundef 53, ptr noundef nonnull @.str.3, double noundef %sqrt, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.5, double noundef 0x3F50624DE0000000) #7
  br label %45

44:                                               ; preds = %.loopexit
  call void (...) @liquid_autotest_passed() #7
  br label %45

45:                                               ; preds = %44, %43
  %46 = getelementptr inbounds i8, ptr %3, i64 4
  %47 = load float, ptr %46, align 4
  %48 = fsub float %47, %.sroa.13.0.copyload
  %49 = fpext float %48 to double
  %50 = call double @llvm.fmuladd.f64(double %49, double %49, double 0.000000e+00)
  %sqrt53 = call double @llvm.sqrt.f64(double %50)
  %51 = fcmp ogt double %sqrt53, 0x3F50624DE0000000
  %52 = fcmp uno float %47, 0.000000e+00
  %or.cond47 = select i1 %51, i1 true, i1 %52
  %53 = fcmp uno float %.sroa.13.0.copyload, 0.000000e+00
  %or.cond48 = select i1 %or.cond47, i1 true, i1 %53
  br i1 %or.cond48, label %54, label %55

54:                                               ; preds = %45
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str.2, i32 noundef 54, ptr noundef nonnull @.str.6, double noundef %sqrt53, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.5, double noundef 0x3F50624DE0000000) #7
  br label %56

55:                                               ; preds = %45
  call void (...) @liquid_autotest_passed() #7
  br label %56

56:                                               ; preds = %55, %54
  %57 = getelementptr inbounds i8, ptr %3, i64 8
  %58 = load float, ptr %57, align 4
  %59 = fsub float %58, %.sroa.23.0.copyload
  %60 = fpext float %59 to double
  %61 = call double @llvm.fmuladd.f64(double %60, double %60, double 0.000000e+00)
  %sqrt55 = call double @llvm.sqrt.f64(double %61)
  %62 = fcmp ogt double %sqrt55, 0x3F50624DE0000000
  %63 = fcmp uno float %58, 0.000000e+00
  %or.cond50 = select i1 %62, i1 true, i1 %63
  %64 = fcmp uno float %.sroa.23.0.copyload, 0.000000e+00
  %or.cond51 = select i1 %or.cond50, i1 true, i1 %64
  br i1 %or.cond51, label %65, label %66

65:                                               ; preds = %56
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str.2, i32 noundef 55, ptr noundef nonnull @.str.7, double noundef %sqrt55, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.5, double noundef 0x3F50624DE0000000) #7
  br label %67

66:                                               ; preds = %56
  call void (...) @liquid_autotest_passed() #7
  br label %67

67:                                               ; preds = %66, %65
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %1) #7
  ret void
}

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

declare i32 @polyf_fit(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

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

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

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

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

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

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


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