; LLVM IR from jgaeddert/liquid-dsp :: src/math/src/poly.findroots (liquid_poly_findroots_bairstow_recursion)

; 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 [84 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [64 x i8], align 1

declare i32 @liquid_error_fl(i32 noundef, ptr noundef, i32 noundef, ptr noundef, ...) #0

; 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 nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #2

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

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

; Function Attrs: nocallback nofree nosync nounwind 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) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @liquid_poly_findroots_bairstow_recursion(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #4 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca float, align 4
  %13 = alloca i32, align 4
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca i32, align 4
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca ptr, align 8
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca double, align 8
  %33 = alloca i32, align 4
  %34 = alloca double, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i32 %1, ptr %8, align 4, !tbaa !9
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  %35 = load i32, ptr %8, align 4, !tbaa !9
  %36 = icmp ult i32 %35, 3
  br i1 %36, label %37, label %40

37:                                               ; preds = %5
  %38 = load i32, ptr %8, align 4, !tbaa !9
  %39 = call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 3, ptr noundef @.str, i32 noundef 215, ptr noundef @.str.4, i32 noundef %38)
  store i32 %39, ptr %6, align 4
  br label %293

40:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store float 0x3D71979980000000, ptr %12, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 20, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  %42 = load double, ptr %41, align 8, !tbaa !13
  store double %42, ptr %14, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %43 = load ptr, ptr %11, align 8, !tbaa !5
  %44 = load double, ptr %43, align 8, !tbaa !13
  store double %44, ptr %15, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %45 = load i32, ptr %8, align 4, !tbaa !9
  %46 = sub i32 %45, 1
  store i32 %46, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  %47 = load i32, ptr %8, align 4, !tbaa !9
  %48 = zext i32 %47 to i64
  %49 = call ptr @llvm.stacksave.p0()
  store ptr %49, ptr %26, align 8
  %50 = alloca double, i64 %48, align 16
  store i64 %48, ptr %27, align 8
  %51 = load i32, ptr %8, align 4, !tbaa !9
  %52 = zext i32 %51 to i64
  %53 = alloca double, i64 %52, align 16
  store i64 %52, ptr %28, align 8
  %54 = load i32, ptr %16, align 4, !tbaa !9
  %55 = sub i32 %54, 1
  %56 = zext i32 %55 to i64
  %57 = getelementptr inbounds double, ptr %50, i64 %56
  store double 0.000000e+00, ptr %57, align 8, !tbaa !13
  %58 = load i32, ptr %16, align 4, !tbaa !9
  %59 = zext i32 %58 to i64
  %60 = getelementptr inbounds double, ptr %50, i64 %59
  store double 0.000000e+00, ptr %60, align 8, !tbaa !13
  %61 = load i32, ptr %16, align 4, !tbaa !9
  %62 = sub i32 %61, 1
  %63 = zext i32 %62 to i64
  %64 = getelementptr inbounds double, ptr %53, i64 %63
  store double 0.000000e+00, ptr %64, align 8, !tbaa !13
  %65 = load i32, ptr %16, align 4, !tbaa !9
  %66 = zext i32 %65 to i64
  %67 = getelementptr inbounds double, ptr %53, i64 %66
  store double 0.000000e+00, ptr %67, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #5
  store i32 0, ptr %30, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #5
  store i32 0, ptr %31, align 4, !tbaa !9
  br label %68

68:                                               ; preds = %262, %260, %40
  br label %69

69:                                               ; preds = %68
  %70 = load i32, ptr %30, align 4, !tbaa !9
  %71 = load i32, ptr %13, align 4, !tbaa !9
  %72 = icmp eq i32 %70, %71
  br i1 %72, label %73, label %74

73:                                               ; preds = %69
  store i32 1, ptr %31, align 4, !tbaa !9
  br label %263

74:                                               ; preds = %69
  %75 = load i32, ptr %30, align 4, !tbaa !9
  %76 = add i32 %75, 1
  store i32 %76, ptr %30, align 4, !tbaa !9
  %77 = load i32, ptr %16, align 4, !tbaa !9
  %78 = sub i32 %77, 2
  store i32 %78, ptr %29, align 4, !tbaa !9
  br label %79

79:                                               ; preds = %132, %74
  %80 = load i32, ptr %29, align 4, !tbaa !9
  %81 = icmp sge i32 %80, 0
  br i1 %81, label %82, label %135

82:                                               ; preds = %79
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  %84 = load i32, ptr %29, align 4, !tbaa !9
  %85 = add nsw i32 %84, 2
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds double, ptr %83, i64 %86
  %88 = load double, ptr %87, align 8, !tbaa !13
  %89 = load double, ptr %14, align 8, !tbaa !13
  %90 = load i32, ptr %29, align 4, !tbaa !9
  %91 = add nsw i32 %90, 1
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds double, ptr %50, i64 %92
  %94 = load double, ptr %93, align 8, !tbaa !13
  %95 = fneg double %89
  %96 = call double @llvm.fmuladd.f64(double %95, double %94, double %88)
  %97 = load double, ptr %15, align 8, !tbaa !13
  %98 = load i32, ptr %29, align 4, !tbaa !9
  %99 = add nsw i32 %98, 2
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds double, ptr %50, i64 %100
  %102 = load double, ptr %101, align 8, !tbaa !13
  %103 = fneg double %97
  %104 = call double @llvm.fmuladd.f64(double %103, double %102, double %96)
  %105 = load i32, ptr %29, align 4, !tbaa !9
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds double, ptr %50, i64 %106
  store double %104, ptr %107, align 8, !tbaa !13
  %108 = load i32, ptr %29, align 4, !tbaa !9
  %109 = add nsw i32 %108, 2
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds double, ptr %50, i64 %110
  %112 = load double, ptr %111, align 8, !tbaa !13
  %113 = load double, ptr %14, align 8, !tbaa !13
  %114 = load i32, ptr %29, align 4, !tbaa !9
  %115 = add nsw i32 %114, 1
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds double, ptr %53, i64 %116
  %118 = load double, ptr %117, align 8, !tbaa !13
  %119 = fneg double %113
  %120 = call double @llvm.fmuladd.f64(double %119, double %118, double %112)
  %121 = load double, ptr %15, align 8, !tbaa !13
  %122 = load i32, ptr %29, align 4, !tbaa !9
  %123 = add nsw i32 %122, 2
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds double, ptr %53, i64 %124
  %126 = load double, ptr %125, align 8, !tbaa !13
  %127 = fneg double %121
  %128 = call double @llvm.fmuladd.f64(double %127, double %126, double %120)
  %129 = load i32, ptr %29, align 4, !tbaa !9
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds double, ptr %53, i64 %130
  store double %128, ptr %131, align 8, !tbaa !13
  br label %132

132:                                              ; preds = %82
  %133 = load i32, ptr %29, align 4, !tbaa !9
  %134 = add nsw i32 %133, -1
  store i32 %134, ptr %29, align 4, !tbaa !9
  br label %79, !llvm.loop !15

135:                                              ; preds = %79
  %136 = load ptr, ptr %7, align 8, !tbaa !5
  %137 = getelementptr inbounds double, ptr %136, i64 1
  %138 = load double, ptr %137, align 8, !tbaa !13
  %139 = load double, ptr %14, align 8, !tbaa !13
  %140 = getelementptr inbounds double, ptr %50, i64 0
  %141 = load double, ptr %140, align 16, !tbaa !13
  %142 = fneg double %139
  %143 = call double @llvm.fmuladd.f64(double %142, double %141, double %138)
  %144 = load double, ptr %15, align 8, !tbaa !13
  %145 = getelementptr inbounds double, ptr %50, i64 1
  %146 = load double, ptr %145, align 8, !tbaa !13
  %147 = fneg double %144
  %148 = call double @llvm.fmuladd.f64(double %147, double %146, double %143)
  store double %148, ptr %17, align 8, !tbaa !13
  %149 = getelementptr inbounds double, ptr %50, i64 1
  %150 = load double, ptr %149, align 8, !tbaa !13
  %151 = load double, ptr %14, align 8, !tbaa !13
  %152 = getelementptr inbounds double, ptr %53, i64 0
  %153 = load double, ptr %152, align 16, !tbaa !13
  %154 = fneg double %151
  %155 = call double @llvm.fmuladd.f64(double %154, double %153, double %150)
  %156 = load double, ptr %15, align 8, !tbaa !13
  %157 = getelementptr inbounds double, ptr %53, i64 1
  %158 = load double, ptr %157, align 8, !tbaa !13
  %159 = fneg double %156
  %160 = call double @llvm.fmuladd.f64(double %159, double %158, double %155)
  store double %160, ptr %19, align 8, !tbaa !13
  %161 = load ptr, ptr %7, align 8, !tbaa !5
  %162 = getelementptr inbounds double, ptr %161, i64 0
  %163 = load double, ptr %162, align 8, !tbaa !13
  %164 = load double, ptr %15, align 8, !tbaa !13
  %165 = getelementptr inbounds double, ptr %50, i64 0
  %166 = load double, ptr %165, align 16, !tbaa !13
  %167 = fneg double %164
  %168 = call double @llvm.fmuladd.f64(double %167, double %166, double %163)
  store double %168, ptr %18, align 8, !tbaa !13
  %169 = getelementptr inbounds double, ptr %50, i64 0
  %170 = load double, ptr %169, align 16, !tbaa !13
  %171 = load double, ptr %15, align 8, !tbaa !13
  %172 = getelementptr inbounds double, ptr %53, i64 0
  %173 = load double, ptr %172, align 16, !tbaa !13
  %174 = fneg double %171
  %175 = call double @llvm.fmuladd.f64(double %174, double %173, double %170)
  store double %175, ptr %20, align 8, !tbaa !13
  %176 = load double, ptr %15, align 8, !tbaa !13
  %177 = load double, ptr %19, align 8, !tbaa !13
  %178 = fmul double %176, %177
  %179 = load double, ptr %19, align 8, !tbaa !13
  %180 = fmul double %178, %179
  store double %180, ptr %21, align 8, !tbaa !13
  %181 = load double, ptr %20, align 8, !tbaa !13
  %182 = load double, ptr %20, align 8, !tbaa !13
  %183 = load double, ptr %14, align 8, !tbaa !13
  %184 = load double, ptr %19, align 8, !tbaa !13
  %185 = fneg double %183
  %186 = call double @llvm.fmuladd.f64(double %185, double %184, double %182)
  %187 = fmul double %181, %186
  store double %187, ptr %22, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #5
  %188 = load double, ptr %21, align 8, !tbaa !13
  %189 = load double, ptr %22, align 8, !tbaa !13
  %190 = fadd double %188, %189
  %191 = call double @llvm.fabs.f64(double %190)
  store double %191, ptr %32, align 8, !tbaa !13
  %192 = load double, ptr %32, align 8, !tbaa !13
  %193 = load float, ptr %12, align 4, !tbaa !11
  %194 = fpext float %193 to double
  %195 = fcmp olt double %192, %194
  br i1 %195, label %196, label %201

196:                                              ; preds = %135
  store double 0.000000e+00, ptr %23, align 8, !tbaa !13
  %197 = load double, ptr %14, align 8, !tbaa !13
  %198 = fmul double %197, 5.000000e-01
  store double %198, ptr %14, align 8, !tbaa !13
  %199 = load double, ptr %15, align 8, !tbaa !13
  %200 = fmul double %199, 5.000000e-01
  store double %200, ptr %15, align 8, !tbaa !13
  store i32 2, ptr %33, align 4
  br label %260

201:                                              ; preds = %135
  %202 = load double, ptr %15, align 8, !tbaa !13
  %203 = load double, ptr %19, align 8, !tbaa !13
  %204 = fmul double %202, %203
  %205 = load double, ptr %19, align 8, !tbaa !13
  %206 = load double, ptr %20, align 8, !tbaa !13
  %207 = load double, ptr %20, align 8, !tbaa !13
  %208 = load double, ptr %14, align 8, !tbaa !13
  %209 = load double, ptr %19, align 8, !tbaa !13
  %210 = fneg double %208
  %211 = call double @llvm.fmuladd.f64(double %210, double %209, double %207)
  %212 = fmul double %206, %211
  %213 = call double @llvm.fmuladd.f64(double %204, double %205, double %212)
  %214 = fdiv double 1.000000e+00, %213
  store double %214, ptr %23, align 8, !tbaa !13
  br label %215

215:                                              ; preds = %201
  %216 = load double, ptr %23, align 8, !tbaa !13
  %217 = fneg double %216
  %218 = load double, ptr %20, align 8, !tbaa !13
  %219 = fneg double %218
  %220 = load double, ptr %17, align 8, !tbaa !13
  %221 = load double, ptr %19, align 8, !tbaa !13
  %222 = load double, ptr %18, align 8, !tbaa !13
  %223 = fmul double %221, %222
  %224 = call double @llvm.fmuladd.f64(double %219, double %220, double %223)
  %225 = fmul double %217, %224
  store double %225, ptr %24, align 8, !tbaa !13
  %226 = load double, ptr %23, align 8, !tbaa !13
  %227 = fneg double %226
  %228 = load double, ptr %19, align 8, !tbaa !13
  %229 = fneg double %228
  %230 = load double, ptr %15, align 8, !tbaa !13
  %231 = fmul double %229, %230
  %232 = load double, ptr %17, align 8, !tbaa !13
  %233 = load double, ptr %19, align 8, !tbaa !13
  %234 = load double, ptr %14, align 8, !tbaa !13
  %235 = load double, ptr %20, align 8, !tbaa !13
  %236 = fneg double %235
  %237 = call double @llvm.fmuladd.f64(double %233, double %234, double %236)
  %238 = load double, ptr %18, align 8, !tbaa !13
  %239 = fmul double %237, %238
  %240 = call double @llvm.fmuladd.f64(double %231, double %232, double %239)
  %241 = fmul double %227, %240
  store double %241, ptr %25, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #5
  %242 = load double, ptr %24, align 8, !tbaa !13
  %243 = call double @llvm.fabs.f64(double %242)
  %244 = load double, ptr %25, align 8, !tbaa !13
  %245 = call double @llvm.fabs.f64(double %244)
  %246 = fadd double %243, %245
  store double %246, ptr %34, align 8, !tbaa !13
  %247 = load double, ptr %24, align 8, !tbaa !13
  %248 = load double, ptr %14, align 8, !tbaa !13
  %249 = fadd double %248, %247
  store double %249, ptr %14, align 8, !tbaa !13
  %250 = load double, ptr %25, align 8, !tbaa !13
  %251 = load double, ptr %15, align 8, !tbaa !13
  %252 = fadd double %251, %250
  store double %252, ptr %15, align 8, !tbaa !13
  %253 = load double, ptr %34, align 8, !tbaa !13
  %254 = load float, ptr %12, align 4, !tbaa !11
  %255 = fpext float %254 to double
  %256 = fcmp olt double %253, %255
  br i1 %256, label %257, label %258

257:                                              ; preds = %215
  store i32 3, ptr %33, align 4
  br label %259

258:                                              ; preds = %215
  store i32 0, ptr %33, align 4
  br label %259

259:                                              ; preds = %258, %257
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #5
  br label %260

260:                                              ; preds = %259, %196
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #5
  %261 = load i32, ptr %33, align 4
  switch i32 %261, label %295 [
    i32 0, label %262
    i32 2, label %68
    i32 3, label %263
  ]

262:                                              ; preds = %260
  br label %68

263:                                              ; preds = %260, %73
  store i32 0, ptr %29, align 4, !tbaa !9
  br label %264

264:                                              ; preds = %278, %263
  %265 = load i32, ptr %29, align 4, !tbaa !9
  %266 = load i32, ptr %8, align 4, !tbaa !9
  %267 = sub i32 %266, 2
  %268 = icmp ult i32 %265, %267
  br i1 %268, label %269, label %281

269:                                              ; preds = %264
  %270 = load i32, ptr %29, align 4, !tbaa !9
  %271 = sext i32 %270 to i64
  %272 = getelementptr inbounds double, ptr %50, i64 %271
  %273 = load double, ptr %272, align 8, !tbaa !13
  %274 = load ptr, ptr %9, align 8, !tbaa !5
  %275 = load i32, ptr %29, align 4, !tbaa !9
  %276 = sext i32 %275 to i64
  %277 = getelementptr inbounds double, ptr %274, i64 %276
  store double %273, ptr %277, align 8, !tbaa !13
  br label %278

278:                                              ; preds = %269
  %279 = load i32, ptr %29, align 4, !tbaa !9
  %280 = add nsw i32 %279, 1
  store i32 %280, ptr %29, align 4, !tbaa !9
  br label %264, !llvm.loop !17

281:                                              ; preds = %264
  %282 = load double, ptr %14, align 8, !tbaa !13
  %283 = load ptr, ptr %10, align 8, !tbaa !5
  store double %282, ptr %283, align 8, !tbaa !13
  %284 = load double, ptr %15, align 8, !tbaa !13
  %285 = load ptr, ptr %11, align 8, !tbaa !5
  store double %284, ptr %285, align 8, !tbaa !13
  %286 = load i32, ptr %31, align 4, !tbaa !9
  %287 = icmp ne i32 %286, 0
  br i1 %287, label %288, label %290

288:                                              ; preds = %281
  %289 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  store i32 1, ptr %6, align 4
  store i32 1, ptr %33, align 4
  br label %291

290:                                              ; preds = %281
  store i32 0, ptr %6, align 4
  store i32 1, ptr %33, align 4
  br label %291

291:                                              ; preds = %290, %288
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  %292 = load ptr, ptr %26, align 8
  call void @llvm.stackrestore.p0(ptr %292)
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %293

293:                                              ; preds = %291, %37
  %294 = load i32, ptr %6, align 4
  ret i32 %294

295:                                              ; preds = %260
  unreachable
}

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


; 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 [84 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [64 x i8], align 1

declare i32 @liquid_error_fl(i32 noundef, ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #0

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @liquid_poly_findroots_bairstow_recursion(ptr nocapture noundef readonly %0, i32 noundef %1, ptr nocapture noundef writeonly %2, ptr nocapture noundef %3, ptr nocapture noundef %4) local_unnamed_addr #3 {
  %6 = icmp ult i32 %1, 3
  br i1 %6, label %7, label %9

7:                                                ; preds = %5
  %8 = tail call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 3, ptr noundef nonnull @.str, i32 noundef 215, ptr noundef nonnull @.str.4, i32 noundef %1) #7
  br label %121

9:                                                ; preds = %5
  %10 = load double, ptr %3, align 8, !tbaa !5
  %11 = load double, ptr %4, align 8, !tbaa !5
  %12 = add i32 %1, -1
  %13 = zext i32 %1 to i64
  %14 = tail call ptr @llvm.stacksave.p0()
  %15 = alloca double, i64 %13, align 16
  %16 = alloca double, i64 %13, align 16
  %17 = add i32 %1, -2
  %18 = zext i32 %17 to i64
  %19 = getelementptr inbounds double, ptr %15, i64 %18
  store double 0.000000e+00, ptr %19, align 8, !tbaa !5
  %20 = zext i32 %12 to i64
  %21 = getelementptr inbounds double, ptr %15, i64 %20
  store double 0.000000e+00, ptr %21, align 8, !tbaa !5
  %22 = getelementptr inbounds double, ptr %16, i64 %18
  store double 0.000000e+00, ptr %22, align 8, !tbaa !5
  %23 = getelementptr inbounds double, ptr %16, i64 %20
  store double 0.000000e+00, ptr %23, align 8, !tbaa !5
  %24 = add i32 %1, -3
  %25 = icmp sgt i32 %24, -1
  %26 = getelementptr inbounds i8, ptr %15, i64 8
  %27 = getelementptr inbounds i8, ptr %16, i64 8
  %28 = getelementptr inbounds i8, ptr %0, i64 8
  %29 = zext i32 %24 to i64
  %30 = shl nuw nsw i64 %29, 3
  %31 = add nuw nsw i64 %30, 8
  %scevgep = getelementptr i8, ptr %16, i64 %31
  %scevgep121 = getelementptr i8, ptr %15, i64 %31
  %32 = insertelement <2 x double> poison, double %10, i64 0
  %33 = insertelement <2 x double> %32, double %11, i64 1
  br label %34

34:                                               ; preds = %9, %.backedge
  %.not120 = phi i1 [ false, %9 ], [ %.not, %.backedge ]
  %.097118 = phi i32 [ 0, %9 ], [ %36, %.backedge ]
  %35 = phi <2 x double> [ %33, %9 ], [ %112, %.backedge ]
  %36 = add nuw nsw i32 %.097118, 1
  %37 = extractelement <2 x double> %35, i64 0
  %38 = fneg double %37
  %39 = extractelement <2 x double> %35, i64 1
  %40 = fneg double %39
  br i1 %25, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %34
  %load_initial = load double, ptr %scevgep, align 8
  %load_initial122 = load double, ptr %scevgep121, align 8
  %41 = insertelement <2 x double> poison, double %load_initial122, i64 0
  %42 = insertelement <2 x double> %41, double %load_initial, i64 1
  %43 = insertelement <2 x double> poison, double %40, i64 0
  %44 = shufflevector <2 x double> %43, <2 x double> poison, <2 x i32> zeroinitializer
  %45 = insertelement <2 x double> poison, double %38, i64 0
  %46 = shufflevector <2 x double> %45, <2 x double> poison, <2 x i32> zeroinitializer
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ %29, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %47 = phi <2 x double> [ %42, %.lr.ph.preheader ], [ %61, %.lr.ph ]
  %48 = add nuw nsw i64 %indvars.iv, 2
  %49 = getelementptr inbounds double, ptr %0, i64 %48
  %50 = load double, ptr %49, align 8, !tbaa !5
  %51 = getelementptr inbounds double, ptr %15, i64 %48
  %52 = load double, ptr %51, align 8, !tbaa !5
  %53 = getelementptr inbounds double, ptr %15, i64 %indvars.iv
  %54 = getelementptr inbounds double, ptr %16, i64 %48
  %55 = load double, ptr %54, align 8, !tbaa !5
  %56 = insertelement <2 x double> poison, double %50, i64 0
  %57 = insertelement <2 x double> %56, double %52, i64 1
  %58 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %46, <2 x double> %47, <2 x double> %57)
  %59 = insertelement <2 x double> poison, double %52, i64 0
  %60 = insertelement <2 x double> %59, double %55, i64 1
  %61 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %44, <2 x double> %60, <2 x double> %58)
  %62 = extractelement <2 x double> %61, i64 0
  store double %62, ptr %53, align 8, !tbaa !5
  %63 = getelementptr inbounds double, ptr %16, i64 %indvars.iv
  %64 = extractelement <2 x double> %61, i64 1
  store double %64, ptr %63, align 8, !tbaa !5
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %65 = icmp sgt i64 %indvars.iv, 0
  br i1 %65, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph, %34
  %66 = load double, ptr %15, align 16, !tbaa !5
  %67 = load double, ptr %26, align 8, !tbaa !5
  %68 = load double, ptr %16, align 16, !tbaa !5
  %69 = tail call double @llvm.fmuladd.f64(double %38, double %68, double %67)
  %70 = load double, ptr %27, align 8, !tbaa !5
  %71 = tail call double @llvm.fmuladd.f64(double %40, double %70, double %69)
  %72 = tail call double @llvm.fmuladd.f64(double %40, double %68, double %66)
  %73 = fmul double %39, %71
  %74 = fmul double %71, %73
  %75 = tail call double @llvm.fmuladd.f64(double %38, double %71, double %72)
  %76 = fmul double %72, %75
  %77 = fadd double %74, %76
  %78 = tail call double @llvm.fabs.f64(double %77)
  %79 = fcmp olt double %78, 0x3D71979980000000
  br i1 %79, label %80, label %82

80:                                               ; preds = %._crit_edge
  %81 = fmul <2 x double> %35, <double 5.000000e-01, double 5.000000e-01>
  br label %.backedge

82:                                               ; preds = %._crit_edge
  %83 = load double, ptr %0, align 8, !tbaa !5
  %84 = tail call double @llvm.fmuladd.f64(double %40, double %66, double %83)
  %85 = load double, ptr %28, align 8, !tbaa !5
  %86 = tail call double @llvm.fmuladd.f64(double %38, double %66, double %85)
  %87 = tail call double @llvm.fmuladd.f64(double %40, double %67, double %86)
  %88 = tail call double @llvm.fmuladd.f64(double %73, double %71, double %76)
  %89 = fdiv double -1.000000e+00, %88
  %90 = fneg double %72
  %91 = fneg double %71
  %92 = fmul double %39, %91
  %93 = tail call double @llvm.fmuladd.f64(double %71, double %37, double %90)
  %94 = insertelement <2 x double> poison, double %71, i64 0
  %95 = insertelement <2 x double> %94, double %93, i64 1
  %96 = insertelement <2 x double> poison, double %84, i64 0
  %97 = shufflevector <2 x double> %96, <2 x double> poison, <2 x i32> zeroinitializer
  %98 = fmul <2 x double> %95, %97
  %99 = insertelement <2 x double> poison, double %90, i64 0
  %100 = insertelement <2 x double> %99, double %92, i64 1
  %101 = insertelement <2 x double> poison, double %87, i64 0
  %102 = shufflevector <2 x double> %101, <2 x double> poison, <2 x i32> zeroinitializer
  %103 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %100, <2 x double> %102, <2 x double> %98)
  %104 = insertelement <2 x double> poison, double %89, i64 0
  %105 = shufflevector <2 x double> %104, <2 x double> poison, <2 x i32> zeroinitializer
  %106 = fmul <2 x double> %105, %103
  %107 = tail call <2 x double> @llvm.fabs.v2f64(<2 x double> %106)
  %shift = shufflevector <2 x double> %107, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %108 = fadd <2 x double> %107, %shift
  %109 = extractelement <2 x double> %108, i64 0
  %110 = fadd <2 x double> %35, %106
  %111 = fcmp olt double %109, 0x3D71979980000000
  br i1 %111, label %113, label %.backedge

.backedge:                                        ; preds = %82, %80
  %112 = phi <2 x double> [ %110, %82 ], [ %81, %80 ]
  %.not = icmp eq i32 %36, 20
  br i1 %.not, label %113, label %34

113:                                              ; preds = %82, %.backedge
  %.not.lcssa = phi i1 [ %.not120, %82 ], [ %.not, %.backedge ]
  %114 = phi <2 x double> [ %110, %82 ], [ %112, %.backedge ]
  %.not110 = icmp eq i32 %17, 0
  br i1 %.not110, label %._crit_edge109, label %.lr.ph108.preheader

.lr.ph108.preheader:                              ; preds = %113
  %115 = shl nuw nsw i64 %18, 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %2, ptr nonnull align 16 %15, i64 %115, i1 false), !tbaa !5
  br label %._crit_edge109

._crit_edge109:                                   ; preds = %.lr.ph108.preheader, %113
  %116 = extractelement <2 x double> %114, i64 0
  store double %116, ptr %3, align 8, !tbaa !5
  %117 = extractelement <2 x double> %114, i64 1
  store double %117, ptr %4, align 8, !tbaa !5
  br i1 %.not.lcssa, label %118, label %120

118:                                              ; preds = %._crit_edge109
  %119 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  br label %120

120:                                              ; preds = %._crit_edge109, %118
  %.0 = phi i32 [ 1, %118 ], [ 0, %._crit_edge109 ]
  tail call void @llvm.stackrestore.p0(ptr %14)
  br label %121

121:                                              ; preds = %120, %7
  %.1 = phi i32 [ %8, %7 ], [ %.0, %120 ]
  ret i32 %.1
}

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #6

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fabs.v2f64(<2 x double>) #6

attributes #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 }
attributes #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass,VectorCombinePass