; LLVM IR from floppyhammer/scanline-algorithm-demo :: src/simple_math.ll (Z11cubic_rootsPKfPf)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z11cubic_rootsPKfPf(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca float, align 4
  %6 = alloca float, align 4
  %7 = alloca float, align 4
  %8 = alloca float, align 4
  %9 = alloca i32, align 4
  %10 = alloca float, align 4
  %11 = alloca i32, align 4
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca float, align 4
  %15 = alloca float, align 4
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca float, align 4
  %20 = alloca float, align 4
  %21 = alloca float, align 4
  %22 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %23 = load ptr, ptr %3, align 8, !tbaa !5
  %24 = getelementptr inbounds float, ptr %23, i64 0
  %25 = load float, ptr %24, align 4, !tbaa !9
  store float %25, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = getelementptr inbounds float, ptr %26, i64 1
  %28 = load float, ptr %27, align 4, !tbaa !9
  store float %28, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  %30 = getelementptr inbounds float, ptr %29, i64 2
  %31 = load float, ptr %30, align 4, !tbaa !9
  store float %31, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = getelementptr inbounds float, ptr %32, i64 3
  %34 = load float, ptr %33, align 4, !tbaa !9
  store float %34, ptr %8, align 4, !tbaa !9
  %35 = load float, ptr %5, align 4, !tbaa !9
  %36 = fcmp oeq float %35, 0.000000e+00
  br i1 %36, label %37, label %132

37:                                               ; preds = %2
  %38 = load float, ptr %6, align 4, !tbaa !9
  %39 = fcmp oeq float %38, 0.000000e+00
  br i1 %39, label %40, label %70

40:                                               ; preds = %37
  %41 = load float, ptr %7, align 4, !tbaa !9
  %42 = fcmp oeq float %41, 0.000000e+00
  br i1 %42, label %43, label %50

43:                                               ; preds = %40
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds float, ptr %44, i64 0
  store float -1.000000e+00, ptr %45, align 4, !tbaa !9
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = getelementptr inbounds float, ptr %46, i64 1
  store float -1.000000e+00, ptr %47, align 4, !tbaa !9
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = getelementptr inbounds float, ptr %48, i64 2
  store float -1.000000e+00, ptr %49, align 4, !tbaa !9
  store i32 1, ptr %9, align 4
  br label %355

50:                                               ; preds = %40
  %51 = load float, ptr %8, align 4, !tbaa !9
  %52 = load float, ptr %7, align 4, !tbaa !9
  %53 = fdiv float %51, %52
  %54 = fmul float -1.000000e+00, %53
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = getelementptr inbounds float, ptr %55, i64 0
  store float %54, ptr %56, align 4, !tbaa !9
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = getelementptr inbounds float, ptr %57, i64 1
  store float -1.000000e+00, ptr %58, align 4, !tbaa !9
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds float, ptr %59, i64 2
  store float -1.000000e+00, ptr %60, align 4, !tbaa !9
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds float, ptr %61, i64 0
  %63 = load float, ptr %62, align 4, !tbaa !9
  %64 = fcmp oeq float %63, 1.000000e+00
  br i1 %64, label %65, label %68

65:                                               ; preds = %50
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = getelementptr inbounds float, ptr %66, i64 0
  store float -1.000000e+00, ptr %67, align 4, !tbaa !9
  br label %68

68:                                               ; preds = %65, %50
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_Z4sortIfEvPT_i(ptr noundef %69, i32 noundef 3)
  store i32 1, ptr %9, align 4
  br label %355

70:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %71 = load float, ptr %7, align 4, !tbaa !9
  %72 = fpext float %71 to double
  %73 = call double @pow(double noundef %72, double noundef 2.000000e+00) #6
  %74 = load float, ptr %6, align 4, !tbaa !9
  %75 = fpext float %74 to double
  %76 = fmul double 4.000000e+00, %75
  %77 = load float, ptr %8, align 4, !tbaa !9
  %78 = fpext float %77 to double
  %79 = fneg double %76
  %80 = call double @llvm.fmuladd.f64(double %79, double %78, double %73)
  %81 = fptrunc double %80 to float
  store float %81, ptr %10, align 4, !tbaa !9
  %82 = load float, ptr %10, align 4, !tbaa !9
  %83 = fcmp oge float %82, 0.000000e+00
  br i1 %83, label %84, label %130

84:                                               ; preds = %70
  %85 = load float, ptr %10, align 4, !tbaa !9
  %86 = fpext float %85 to double
  %87 = call double @sqrt(double noundef %86) #6
  %88 = fptrunc double %87 to float
  store float %88, ptr %10, align 4, !tbaa !9
  %89 = load float, ptr %10, align 4, !tbaa !9
  %90 = load float, ptr %7, align 4, !tbaa !9
  %91 = fadd float %89, %90
  %92 = load float, ptr %6, align 4, !tbaa !9
  %93 = fmul float 2.000000e+00, %92
  %94 = fdiv float %91, %93
  %95 = fmul float -1.000000e+00, %94
  %96 = load ptr, ptr %4, align 8, !tbaa !5
  %97 = getelementptr inbounds float, ptr %96, i64 0
  store float %95, ptr %97, align 4, !tbaa !9
  %98 = load float, ptr %10, align 4, !tbaa !9
  %99 = load float, ptr %7, align 4, !tbaa !9
  %100 = fsub float %98, %99
  %101 = load float, ptr %6, align 4, !tbaa !9
  %102 = fmul float 2.000000e+00, %101
  %103 = fdiv float %100, %102
  %104 = load ptr, ptr %4, align 8, !tbaa !5
  %105 = getelementptr inbounds float, ptr %104, i64 1
  store float %103, ptr %105, align 4, !tbaa !9
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  %107 = getelementptr inbounds float, ptr %106, i64 2
  store float -1.000000e+00, ptr %107, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !11
  br label %108

108:                                              ; preds = %126, %84
  %109 = load i32, ptr %11, align 4, !tbaa !11
  %110 = icmp slt i32 %109, 2
  br i1 %110, label %112, label %111

111:                                              ; preds = %108
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %129

112:                                              ; preds = %108
  %113 = load ptr, ptr %4, align 8, !tbaa !5
  %114 = load i32, ptr %11, align 4, !tbaa !11
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds float, ptr %113, i64 %115
  %117 = load float, ptr %116, align 4, !tbaa !9
  %118 = fpext float %117 to double
  %119 = fcmp oeq double %118, 1.000000e+00
  br i1 %119, label %120, label %125

120:                                              ; preds = %112
  %121 = load ptr, ptr %4, align 8, !tbaa !5
  %122 = load i32, ptr %11, align 4, !tbaa !11
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds float, ptr %121, i64 %123
  store float -1.000000e+00, ptr %124, align 4, !tbaa !9
  br label %125

125:                                              ; preds = %120, %112
  br label %126

126:                                              ; preds = %125
  %127 = load i32, ptr %11, align 4, !tbaa !11
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %11, align 4, !tbaa !11
  br label %108, !llvm.loop !13

129:                                              ; preds = %111
  br label %130

130:                                              ; preds = %129, %70
  %131 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_Z4sortIfEvPT_i(ptr noundef %131, i32 noundef 3)
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %355

132:                                              ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %133 = load float, ptr %6, align 4, !tbaa !9
  %134 = load float, ptr %5, align 4, !tbaa !9
  %135 = fdiv float %133, %134
  store float %135, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %136 = load float, ptr %7, align 4, !tbaa !9
  %137 = load float, ptr %5, align 4, !tbaa !9
  %138 = fdiv float %136, %137
  store float %138, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %139 = load float, ptr %8, align 4, !tbaa !9
  %140 = load float, ptr %5, align 4, !tbaa !9
  %141 = fdiv float %139, %140
  store float %141, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %142 = load float, ptr %13, align 4, !tbaa !9
  %143 = fmul float 3.000000e+00, %142
  %144 = fpext float %143 to double
  %145 = load float, ptr %12, align 4, !tbaa !9
  %146 = fpext float %145 to double
  %147 = call double @pow(double noundef %146, double noundef 2.000000e+00) #6
  %148 = fsub double %144, %147
  %149 = fdiv double %148, 9.000000e+00
  %150 = fptrunc double %149 to float
  store float %150, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %151 = load float, ptr %12, align 4, !tbaa !9
  %152 = fmul float 9.000000e+00, %151
  %153 = load float, ptr %13, align 4, !tbaa !9
  %154 = load float, ptr %14, align 4, !tbaa !9
  %155 = fmul float 2.700000e+01, %154
  %156 = fneg float %155
  %157 = call float @llvm.fmuladd.f32(float %152, float %153, float %156)
  %158 = fpext float %157 to double
  %159 = load float, ptr %12, align 4, !tbaa !9
  %160 = fpext float %159 to double
  %161 = call double @pow(double noundef %160, double noundef 3.000000e+00) #6
  %162 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %161, double %158)
  %163 = fdiv double %162, 5.400000e+01
  %164 = fptrunc double %163 to float
  store float %164, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %165 = load float, ptr %15, align 4, !tbaa !9
  %166 = fpext float %165 to double
  %167 = call double @pow(double noundef %166, double noundef 3.000000e+00) #6
  %168 = load float, ptr %16, align 4, !tbaa !9
  %169 = fpext float %168 to double
  %170 = call double @pow(double noundef %169, double noundef 2.000000e+00) #6
  %171 = fadd double %167, %170
  %172 = fptrunc double %171 to float
  store float %172, ptr %17, align 4, !tbaa !9
  %173 = load float, ptr %17, align 4, !tbaa !9
  %174 = fcmp oge float %173, 0.000000e+00
  br i1 %174, label %175, label %261

175:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %176 = load float, ptr %16, align 4, !tbaa !9
  %177 = fpext float %176 to double
  %178 = load float, ptr %17, align 4, !tbaa !9
  %179 = fpext float %178 to double
  %180 = call double @sqrt(double noundef %179) #6
  %181 = fadd double %177, %180
  %182 = call noundef double @_Z4signIdET_S0_(double noundef %181)
  %183 = load float, ptr %16, align 4, !tbaa !9
  %184 = fpext float %183 to double
  %185 = load float, ptr %17, align 4, !tbaa !9
  %186 = fpext float %185 to double
  %187 = call double @sqrt(double noundef %186) #6
  %188 = fadd double %184, %187
  %189 = fptosi double %188 to i32
  %190 = call i32 @llvm.abs.i32(i32 %189, i1 true)
  %191 = sitofp i32 %190 to double
  %192 = call double @pow(double noundef %191, double noundef 0x3FD5555560000000) #6
  %193 = fmul double %182, %192
  %194 = fptrunc double %193 to float
  store float %194, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %195 = load float, ptr %16, align 4, !tbaa !9
  %196 = fpext float %195 to double
  %197 = load float, ptr %17, align 4, !tbaa !9
  %198 = fpext float %197 to double
  %199 = call double @sqrt(double noundef %198) #6
  %200 = fsub double %196, %199
  %201 = call noundef double @_Z4signIdET_S0_(double noundef %200)
  %202 = load float, ptr %16, align 4, !tbaa !9
  %203 = fpext float %202 to double
  %204 = load float, ptr %17, align 4, !tbaa !9
  %205 = fpext float %204 to double
  %206 = call double @sqrt(double noundef %205) #6
  %207 = fsub double %203, %206
  %208 = fptosi double %207 to i32
  %209 = call i32 @llvm.abs.i32(i32 %208, i1 true)
  %210 = sitofp i32 %209 to double
  %211 = call double @pow(double noundef %210, double noundef 0x3FD5555560000000) #6
  %212 = fmul double %201, %211
  %213 = fptrunc double %212 to float
  store float %213, ptr %19, align 4, !tbaa !9
  %214 = load float, ptr %12, align 4, !tbaa !9
  %215 = fneg float %214
  %216 = fdiv float %215, 3.000000e+00
  %217 = load float, ptr %18, align 4, !tbaa !9
  %218 = load float, ptr %19, align 4, !tbaa !9
  %219 = fadd float %217, %218
  %220 = fadd float %216, %219
  %221 = load ptr, ptr %4, align 8, !tbaa !5
  %222 = getelementptr inbounds float, ptr %221, i64 0
  store float %220, ptr %222, align 4, !tbaa !9
  %223 = load float, ptr %12, align 4, !tbaa !9
  %224 = fneg float %223
  %225 = fdiv float %224, 3.000000e+00
  %226 = load float, ptr %18, align 4, !tbaa !9
  %227 = load float, ptr %19, align 4, !tbaa !9
  %228 = fadd float %226, %227
  %229 = fdiv float %228, 2.000000e+00
  %230 = fsub float %225, %229
  %231 = load ptr, ptr %4, align 8, !tbaa !5
  %232 = getelementptr inbounds float, ptr %231, i64 1
  store float %230, ptr %232, align 4, !tbaa !9
  %233 = load float, ptr %12, align 4, !tbaa !9
  %234 = fneg float %233
  %235 = fdiv float %234, 3.000000e+00
  %236 = load float, ptr %18, align 4, !tbaa !9
  %237 = load float, ptr %19, align 4, !tbaa !9
  %238 = fadd float %236, %237
  %239 = fdiv float %238, 2.000000e+00
  %240 = fsub float %235, %239
  %241 = load ptr, ptr %4, align 8, !tbaa !5
  %242 = getelementptr inbounds float, ptr %241, i64 2
  store float %240, ptr %242, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  %243 = call double @sqrt(double noundef 3.000000e+00) #6
  %244 = load float, ptr %18, align 4, !tbaa !9
  %245 = load float, ptr %19, align 4, !tbaa !9
  %246 = fsub float %244, %245
  %247 = fpext float %246 to double
  %248 = fmul double %243, %247
  %249 = fdiv double %248, 2.000000e+00
  %250 = fptosi double %249 to i32
  %251 = call i32 @llvm.abs.i32(i32 %250, i1 true)
  %252 = sitofp i32 %251 to float
  store float %252, ptr %20, align 4, !tbaa !9
  %253 = load float, ptr %20, align 4, !tbaa !9
  %254 = fcmp une float %253, 0.000000e+00
  br i1 %254, label %255, label %260

255:                                              ; preds = %175
  %256 = load ptr, ptr %4, align 8, !tbaa !5
  %257 = getelementptr inbounds float, ptr %256, i64 1
  store float -1.000000e+00, ptr %257, align 4, !tbaa !9
  %258 = load ptr, ptr %4, align 8, !tbaa !5
  %259 = getelementptr inbounds float, ptr %258, i64 2
  store float -1.000000e+00, ptr %259, align 4, !tbaa !9
  br label %260

260:                                              ; preds = %255, %175
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %325

261:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %262 = load float, ptr %16, align 4, !tbaa !9
  %263 = fpext float %262 to double
  %264 = load float, ptr %15, align 4, !tbaa !9
  %265 = fpext float %264 to double
  %266 = call double @pow(double noundef %265, double noundef 3.000000e+00) #6
  %267 = fneg double %266
  %268 = call double @sqrt(double noundef %267) #6
  %269 = fdiv double %263, %268
  %270 = call double @acos(double noundef %269) #6
  %271 = fptrunc double %270 to float
  store float %271, ptr %21, align 4, !tbaa !9
  %272 = load float, ptr %15, align 4, !tbaa !9
  %273 = fneg float %272
  %274 = fpext float %273 to double
  %275 = call double @sqrt(double noundef %274) #6
  %276 = fmul double 2.000000e+00, %275
  %277 = load float, ptr %21, align 4, !tbaa !9
  %278 = fdiv float %277, 3.000000e+00
  %279 = fpext float %278 to double
  %280 = call double @cos(double noundef %279) #6
  %281 = load float, ptr %12, align 4, !tbaa !9
  %282 = fdiv float %281, 3.000000e+00
  %283 = fpext float %282 to double
  %284 = fneg double %283
  %285 = call double @llvm.fmuladd.f64(double %276, double %280, double %284)
  %286 = fptrunc double %285 to float
  %287 = load ptr, ptr %4, align 8, !tbaa !5
  %288 = getelementptr inbounds float, ptr %287, i64 0
  store float %286, ptr %288, align 4, !tbaa !9
  %289 = load float, ptr %15, align 4, !tbaa !9
  %290 = fneg float %289
  %291 = fpext float %290 to double
  %292 = call double @sqrt(double noundef %291) #6
  %293 = fmul double 2.000000e+00, %292
  %294 = load float, ptr %21, align 4, !tbaa !9
  %295 = fadd float %294, 0x401921FB60000000
  %296 = fdiv float %295, 3.000000e+00
  %297 = fpext float %296 to double
  %298 = call double @cos(double noundef %297) #6
  %299 = load float, ptr %12, align 4, !tbaa !9
  %300 = fdiv float %299, 3.000000e+00
  %301 = fpext float %300 to double
  %302 = fneg double %301
  %303 = call double @llvm.fmuladd.f64(double %293, double %298, double %302)
  %304 = fptrunc double %303 to float
  %305 = load ptr, ptr %4, align 8, !tbaa !5
  %306 = getelementptr inbounds float, ptr %305, i64 1
  store float %304, ptr %306, align 4, !tbaa !9
  %307 = load float, ptr %15, align 4, !tbaa !9
  %308 = fneg float %307
  %309 = fpext float %308 to double
  %310 = call double @sqrt(double noundef %309) #6
  %311 = fmul double 2.000000e+00, %310
  %312 = load float, ptr %21, align 4, !tbaa !9
  %313 = fadd float %312, 0x402921FB60000000
  %314 = fdiv float %313, 3.000000e+00
  %315 = fpext float %314 to double
  %316 = call double @cos(double noundef %315) #6
  %317 = load float, ptr %12, align 4, !tbaa !9
  %318 = fdiv float %317, 3.000000e+00
  %319 = fpext float %318 to double
  %320 = fneg double %319
  %321 = call double @llvm.fmuladd.f64(double %311, double %316, double %320)
  %322 = fptrunc double %321 to float
  %323 = load ptr, ptr %4, align 8, !tbaa !5
  %324 = getelementptr inbounds float, ptr %323, i64 2
  store float %322, ptr %324, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %325

325:                                              ; preds = %261, %260
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  store i32 0, ptr %22, align 4, !tbaa !11
  br label %326

326:                                              ; preds = %350, %325
  %327 = load i32, ptr %22, align 4, !tbaa !11
  %328 = icmp slt i32 %327, 3
  br i1 %328, label %330, label %329

329:                                              ; preds = %326
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %353

330:                                              ; preds = %326
  %331 = load ptr, ptr %4, align 8, !tbaa !5
  %332 = load i32, ptr %22, align 4, !tbaa !11
  %333 = sext i32 %332 to i64
  %334 = getelementptr inbounds float, ptr %331, i64 %333
  %335 = load float, ptr %334, align 4, !tbaa !9
  %336 = fcmp olt float %335, 0.000000e+00
  br i1 %336, label %344, label %337

337:                                              ; preds = %330
  %338 = load ptr, ptr %4, align 8, !tbaa !5
  %339 = load i32, ptr %22, align 4, !tbaa !11
  %340 = sext i32 %339 to i64
  %341 = getelementptr inbounds float, ptr %338, i64 %340
  %342 = load float, ptr %341, align 4, !tbaa !9
  %343 = fcmp ogt float %342, 1.000000e+00
  br i1 %343, label %344, label %349

344:                                              ; preds = %337, %330
  %345 = load ptr, ptr %4, align 8, !tbaa !5
  %346 = load i32, ptr %22, align 4, !tbaa !11
  %347 = sext i32 %346 to i64
  %348 = getelementptr inbounds float, ptr %345, i64 %347
  store float -1.000000e+00, ptr %348, align 4, !tbaa !9
  br label %349

349:                                              ; preds = %344, %337
  br label %350

350:                                              ; preds = %349
  %351 = load i32, ptr %22, align 4, !tbaa !11
  %352 = add nsw i32 %351, 1
  store i32 %352, ptr %22, align 4, !tbaa !11
  br label %326, !llvm.loop !15

353:                                              ; preds = %329
  %354 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_Z4sortIfEvPT_i(ptr noundef %354, i32 noundef 3)
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  store i32 0, ptr %9, align 4
  br label %355

355:                                              ; preds = %353, %130, %68, %43
  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 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  %356 = load i32, ptr %9, align 4
  switch i32 %356, label %358 [
    i32 0, label %357
    i32 1, label %357
  ]

357:                                              ; preds = %355, %355
  ret void

358:                                              ; preds = %355
  unreachable
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z4sortIfEvPT_i(ptr noundef, i32 noundef) #2

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

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

; Function Attrs: nounwind
declare double @sqrt(double 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_Z4signIdET_S0_(double noundef) #5

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

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

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

attributes #0 = { mustprogress 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 = { inlinehint mustprogress 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 #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { inlinehint mustprogress 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 #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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z11cubic_rootsPKfPf(ptr nocapture noundef readonly %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = load float, ptr %0, align 4, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 4
  %5 = load float, ptr %4, align 4, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  %7 = load float, ptr %6, align 4, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %0, i64 12
  %9 = load float, ptr %8, align 4, !tbaa !5
  %10 = fcmp oeq float %3, 0.000000e+00
  br i1 %10, label %11, label %51

11:                                               ; preds = %2
  %12 = fcmp oeq float %5, 0.000000e+00
  br i1 %12, label %13, label %24

13:                                               ; preds = %11
  %14 = fcmp oeq float %7, 0.000000e+00
  br i1 %14, label %15, label %17

15:                                               ; preds = %13
  store <2 x float> <float -1.000000e+00, float -1.000000e+00>, ptr %1, align 4, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %1, i64 8
  store float -1.000000e+00, ptr %16, align 4, !tbaa !5
  br label %167

17:                                               ; preds = %13
  %18 = fneg float %9
  %19 = fdiv float %18, %7
  store float %19, ptr %1, align 4, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %1, i64 4
  store <2 x float> <float -1.000000e+00, float -1.000000e+00>, ptr %20, align 4, !tbaa !5
  %21 = fcmp oeq float %19, 1.000000e+00
  br i1 %21, label %22, label %23

22:                                               ; preds = %17
  store float -1.000000e+00, ptr %1, align 4, !tbaa !5
  br label %23

23:                                               ; preds = %22, %17
  tail call void @_Z4sortIfEvPT_i(ptr noundef nonnull %1, i32 noundef 3)
  br label %167

24:                                               ; preds = %11
  %25 = fpext float %7 to double
  %square109 = fmul double %25, %25
  %26 = fpext float %5 to double
  %27 = fpext float %9 to double
  %28 = fmul double %26, -4.000000e+00
  %29 = tail call double @llvm.fmuladd.f64(double %28, double %27, double %square109)
  %30 = fptrunc double %29 to float
  %31 = fcmp ult float %30, 0.000000e+00
  br i1 %31, label %.loopexit, label %32

32:                                               ; preds = %24
  %sqrtf = tail call float @sqrtf(float noundef %30) #2
  %33 = fadd float %7, %sqrtf
  %34 = fmul float %5, 2.000000e+00
  %35 = fneg float %33
  %36 = fsub float %sqrtf, %7
  %37 = getelementptr inbounds i8, ptr %1, i64 4
  %38 = insertelement <2 x float> poison, float %35, i64 0
  %39 = insertelement <2 x float> %38, float %36, i64 1
  %40 = insertelement <2 x float> poison, float %34, i64 0
  %41 = shufflevector <2 x float> %40, <2 x float> poison, <2 x i32> zeroinitializer
  %42 = fdiv <2 x float> %39, %41
  store <2 x float> %42, ptr %1, align 4, !tbaa !5
  %43 = getelementptr inbounds i8, ptr %1, i64 8
  store float -1.000000e+00, ptr %43, align 4, !tbaa !5
  %44 = extractelement <2 x float> %42, i64 0
  %45 = fcmp oeq float %44, 1.000000e+00
  br i1 %45, label %46, label %47

46:                                               ; preds = %32
  store float -1.000000e+00, ptr %1, align 4, !tbaa !5
  br label %47

47:                                               ; preds = %32, %46
  %48 = extractelement <2 x float> %42, i64 1
  %49 = fcmp oeq float %48, 1.000000e+00
  br i1 %49, label %50, label %.loopexit

50:                                               ; preds = %47
  store float -1.000000e+00, ptr %37, align 4, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %47, %50, %24
  tail call void @_Z4sortIfEvPT_i(ptr noundef %1, i32 noundef 3)
  br label %167

51:                                               ; preds = %2
  %52 = fdiv float %5, %3
  %53 = fdiv float %7, %3
  %54 = fdiv float %9, %3
  %55 = fmul float %53, 3.000000e+00
  %56 = fpext float %55 to double
  %57 = fpext float %52 to double
  %square = fmul double %57, %57
  %58 = fsub double %56, %square
  %59 = fdiv double %58, 9.000000e+00
  %60 = fptrunc double %59 to float
  %61 = fmul float %52, 9.000000e+00
  %62 = fmul float %54, -2.700000e+01
  %63 = tail call float @llvm.fmuladd.f32(float %61, float %53, float %62)
  %64 = fpext float %63 to double
  %65 = tail call double @pow(double noundef %57, double noundef 3.000000e+00) #5
  %66 = tail call double @llvm.fmuladd.f64(double %65, double -2.000000e+00, double %64)
  %67 = fdiv double %66, 5.400000e+01
  %68 = fptrunc double %67 to float
  %69 = fpext float %60 to double
  %70 = tail call double @pow(double noundef %69, double noundef 3.000000e+00) #5
  %71 = fpext float %68 to double
  %square108 = fmul double %71, %71
  %72 = fadd double %70, %square108
  %73 = fptrunc double %72 to float
  %74 = fcmp ult float %73, 0.000000e+00
  br i1 %74, label %112, label %75

75:                                               ; preds = %51
  %76 = fpext float %73 to double
  %77 = tail call double @sqrt(double noundef %76) #5
  %78 = fadd double %77, %71
  %79 = tail call noundef double @_Z4signIdET_S0_(double noundef %78)
  %80 = tail call double @sqrt(double noundef %76) #5
  %81 = fadd double %80, %71
  %82 = fptosi double %81 to i32
  %83 = tail call i32 @llvm.abs.i32(i32 %82, i1 true)
  %84 = uitofp nneg i32 %83 to double
  %85 = tail call double @pow(double noundef %84, double noundef 0x3FD5555560000000) #5
  %86 = fmul double %79, %85
  %87 = fptrunc double %86 to float
  %88 = tail call double @sqrt(double noundef %76) #5
  %89 = fsub double %71, %88
  %90 = tail call noundef double @_Z4signIdET_S0_(double noundef %89)
  %91 = tail call double @sqrt(double noundef %76) #5
  %92 = fsub double %71, %91
  %93 = fptosi double %92 to i32
  %94 = tail call i32 @llvm.abs.i32(i32 %93, i1 true)
  %95 = uitofp nneg i32 %94 to double
  %96 = tail call double @pow(double noundef %95, double noundef 0x3FD5555560000000) #5
  %97 = fmul double %90, %96
  %98 = fptrunc double %97 to float
  %99 = fdiv float %52, -3.000000e+00
  %100 = fadd float %87, %98
  %101 = fadd float %99, %100
  store float %101, ptr %1, align 4, !tbaa !5
  %102 = fmul float %100, 5.000000e-01
  %103 = fsub float %99, %102
  %104 = getelementptr inbounds i8, ptr %1, i64 4
  store float %103, ptr %104, align 4, !tbaa !5
  %105 = getelementptr inbounds i8, ptr %1, i64 8
  store float %103, ptr %105, align 4, !tbaa !5
  %106 = fsub float %87, %98
  %107 = fpext float %106 to double
  %108 = fmul double %107, 0x3FFBB67AE8584CAA
  %109 = fmul double %108, 5.000000e-01
  %110 = fptosi double %109 to i32
  %.not = icmp eq i32 %110, 0
  br i1 %.not, label %149, label %111

111:                                              ; preds = %75
  store <2 x float> <float -1.000000e+00, float -1.000000e+00>, ptr %104, align 4, !tbaa !5
  br label %149

112:                                              ; preds = %51
  %113 = tail call double @pow(double noundef %69, double noundef 3.000000e+00) #5
  %114 = fneg double %113
  %115 = tail call double @sqrt(double noundef %114) #5
  %116 = fdiv double %71, %115
  %117 = tail call double @acos(double noundef %116) #5
  %118 = fptrunc double %117 to float
  %119 = fneg float %60
  %120 = fpext float %119 to double
  %121 = tail call double @sqrt(double noundef %120) #5
  %122 = fmul double %121, 2.000000e+00
  %123 = fdiv float %118, 3.000000e+00
  %124 = fpext float %123 to double
  %125 = tail call double @cos(double noundef %124) #5
  %126 = fdiv float %52, 3.000000e+00
  %127 = fpext float %126 to double
  %128 = fneg double %127
  %129 = tail call double @llvm.fmuladd.f64(double %122, double %125, double %128)
  %130 = fptrunc double %129 to float
  store float %130, ptr %1, align 4, !tbaa !5
  %131 = tail call double @sqrt(double noundef %120) #5
  %132 = fmul double %131, 2.000000e+00
  %133 = fadd float %118, 0x401921FB60000000
  %134 = fdiv float %133, 3.000000e+00
  %135 = fpext float %134 to double
  %136 = tail call double @cos(double noundef %135) #5
  %137 = tail call double @llvm.fmuladd.f64(double %132, double %136, double %128)
  %138 = fptrunc double %137 to float
  %139 = getelementptr inbounds i8, ptr %1, i64 4
  store float %138, ptr %139, align 4, !tbaa !5
  %140 = tail call double @sqrt(double noundef %120) #5
  %141 = fmul double %140, 2.000000e+00
  %142 = fadd float %118, 0x402921FB60000000
  %143 = fdiv float %142, 3.000000e+00
  %144 = fpext float %143 to double
  %145 = tail call double @cos(double noundef %144) #5
  %146 = tail call double @llvm.fmuladd.f64(double %141, double %145, double %128)
  %147 = fptrunc double %146 to float
  %148 = getelementptr inbounds i8, ptr %1, i64 8
  store float %147, ptr %148, align 4, !tbaa !5
  %.pre = load float, ptr %1, align 4, !tbaa !5
  br label %149

149:                                              ; preds = %75, %111, %112
  %150 = phi float [ %103, %75 ], [ -1.000000e+00, %111 ], [ %147, %112 ]
  %151 = phi float [ %101, %75 ], [ %101, %111 ], [ %.pre, %112 ]
  %152 = fcmp olt float %151, 0.000000e+00
  %153 = fcmp ogt float %151, 1.000000e+00
  %or.cond = or i1 %152, %153
  br i1 %or.cond, label %154, label %155

154:                                              ; preds = %149
  store float -1.000000e+00, ptr %1, align 4, !tbaa !5
  br label %155

155:                                              ; preds = %149, %154
  %156 = getelementptr inbounds i8, ptr %1, i64 4
  %157 = load float, ptr %156, align 4, !tbaa !5
  %158 = fcmp olt float %157, 0.000000e+00
  %159 = fcmp ogt float %157, 1.000000e+00
  %or.cond.1 = or i1 %158, %159
  br i1 %or.cond.1, label %160, label %161

160:                                              ; preds = %155
  store float -1.000000e+00, ptr %156, align 4, !tbaa !5
  br label %161

161:                                              ; preds = %160, %155
  %162 = fcmp olt float %150, 0.000000e+00
  %163 = fcmp ogt float %150, 1.000000e+00
  %or.cond.2 = or i1 %162, %163
  br i1 %or.cond.2, label %164, label %166

164:                                              ; preds = %161
  %165 = getelementptr inbounds i8, ptr %1, i64 8
  store float -1.000000e+00, ptr %165, align 4, !tbaa !5
  br label %166

166:                                              ; preds = %164, %161
  tail call void @_Z4sortIfEvPT_i(ptr noundef nonnull %1, i32 noundef 3)
  br label %167

167:                                              ; preds = %166, %.loopexit, %23, %15
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z4sortIfEvPT_i(ptr noundef, i32 noundef) local_unnamed_addr #1

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_Z4signIdET_S0_(double noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #3

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

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

declare float @sqrtf(float) local_unnamed_addr

attributes #0 = { mustprogress 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 = { inlinehint mustprogress 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 #2 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { inlinehint mustprogress 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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass