; LLVM IR from bbenligiray/stag :: src/Ellipse.ll (Z9CircleFitRKSt6vectorIdSaIdEES3_RdS4_S4_)

; 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

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

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_Z9CircleFitRKSt6vectorIdSaIdEES3_RdS4_S4_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #3 {
  %6 = alloca i1, align 1
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, 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 i32, align 4
  %25 = alloca double, align 8
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  %28 = alloca double, align 8
  %29 = alloca double, align 8
  %30 = alloca double, align 8
  %31 = alloca double, align 8
  %32 = alloca double, align 8
  %33 = alloca i32, align 4
  %34 = alloca double, align 8
  %35 = alloca double, align 8
  %36 = alloca double, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  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
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #4
  %39 = trunc i64 %38 to i32
  store i32 %39, ptr %12, align 4, !tbaa !9
  %40 = load i32, ptr %12, align 4, !tbaa !9
  %41 = icmp slt i32 %40, 3
  br i1 %41, label %42, label %43

42:                                               ; preds = %5
  store i1 false, ptr %6, align 1
  store i32 1, ptr %13, align 4
  br label %246

43:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  store double 0.000000e+00, ptr %14, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  store double 0.000000e+00, ptr %15, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %64, %43
  %45 = load i32, ptr %16, align 4, !tbaa !9
  %46 = load i32, ptr %12, align 4, !tbaa !9
  %47 = icmp slt i32 %45, %46
  br i1 %47, label %49, label %48

48:                                               ; preds = %44
  store i32 2, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %67

49:                                               ; preds = %44
  %50 = load ptr, ptr %7, align 8, !tbaa !5
  %51 = load i32, ptr %16, align 4, !tbaa !9
  %52 = sext i32 %51 to i64
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %50, i64 noundef %52) #4
  %54 = load double, ptr %53, align 8, !tbaa !11
  %55 = load double, ptr %14, align 8, !tbaa !11
  %56 = fadd double %55, %54
  store double %56, ptr %14, align 8, !tbaa !11
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = load i32, ptr %16, align 4, !tbaa !9
  %59 = sext i32 %58 to i64
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %57, i64 noundef %59) #4
  %61 = load double, ptr %60, align 8, !tbaa !11
  %62 = load double, ptr %15, align 8, !tbaa !11
  %63 = fadd double %62, %61
  store double %63, ptr %15, align 8, !tbaa !11
  br label %64

64:                                               ; preds = %49
  %65 = load i32, ptr %16, align 4, !tbaa !9
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %16, align 4, !tbaa !9
  br label %44, !llvm.loop !13

67:                                               ; preds = %48
  %68 = load i32, ptr %12, align 4, !tbaa !9
  %69 = sitofp i32 %68 to double
  %70 = load double, ptr %14, align 8, !tbaa !11
  %71 = fdiv double %70, %69
  store double %71, ptr %14, align 8, !tbaa !11
  %72 = load i32, ptr %12, align 4, !tbaa !9
  %73 = sitofp i32 %72 to double
  %74 = load double, ptr %15, align 8, !tbaa !11
  %75 = fdiv double %74, %73
  store double %75, ptr %15, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  store double 0.000000e+00, ptr %17, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  store double 0.000000e+00, ptr %18, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  store double 0.000000e+00, ptr %19, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  store double 0.000000e+00, ptr %20, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  store double 0.000000e+00, ptr %21, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  store double 0.000000e+00, ptr %22, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  store double 0.000000e+00, ptr %23, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #4
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %76

76:                                               ; preds = %132, %67
  %77 = load i32, ptr %24, align 4, !tbaa !9
  %78 = load i32, ptr %12, align 4, !tbaa !9
  %79 = icmp slt i32 %77, %78
  br i1 %79, label %81, label %80

80:                                               ; preds = %76
  store i32 5, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  br label %135

81:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = load i32, ptr %24, align 4, !tbaa !9
  %84 = sext i32 %83 to i64
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %82, i64 noundef %84) #4
  %86 = load double, ptr %85, align 8, !tbaa !11
  %87 = load double, ptr %14, align 8, !tbaa !11
  %88 = fsub double %86, %87
  store double %88, ptr %25, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #4
  %89 = load ptr, ptr %8, align 8, !tbaa !5
  %90 = load i32, ptr %24, align 4, !tbaa !9
  %91 = sext i32 %90 to i64
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %89, i64 noundef %91) #4
  %93 = load double, ptr %92, align 8, !tbaa !11
  %94 = load double, ptr %15, align 8, !tbaa !11
  %95 = fsub double %93, %94
  store double %95, ptr %26, align 8, !tbaa !11
  %96 = load double, ptr %25, align 8, !tbaa !11
  %97 = load double, ptr %25, align 8, !tbaa !11
  %98 = load double, ptr %17, align 8, !tbaa !11
  %99 = call double @llvm.fmuladd.f64(double %96, double %97, double %98)
  store double %99, ptr %17, align 8, !tbaa !11
  %100 = load double, ptr %25, align 8, !tbaa !11
  %101 = load double, ptr %26, align 8, !tbaa !11
  %102 = load double, ptr %18, align 8, !tbaa !11
  %103 = call double @llvm.fmuladd.f64(double %100, double %101, double %102)
  store double %103, ptr %18, align 8, !tbaa !11
  %104 = load double, ptr %26, align 8, !tbaa !11
  %105 = load double, ptr %26, align 8, !tbaa !11
  %106 = load double, ptr %19, align 8, !tbaa !11
  %107 = call double @llvm.fmuladd.f64(double %104, double %105, double %106)
  store double %107, ptr %19, align 8, !tbaa !11
  %108 = load double, ptr %25, align 8, !tbaa !11
  %109 = load double, ptr %25, align 8, !tbaa !11
  %110 = fmul double %108, %109
  %111 = load double, ptr %25, align 8, !tbaa !11
  %112 = load double, ptr %20, align 8, !tbaa !11
  %113 = call double @llvm.fmuladd.f64(double %110, double %111, double %112)
  store double %113, ptr %20, align 8, !tbaa !11
  %114 = load double, ptr %25, align 8, !tbaa !11
  %115 = load double, ptr %26, align 8, !tbaa !11
  %116 = fmul double %114, %115
  %117 = load double, ptr %26, align 8, !tbaa !11
  %118 = load double, ptr %21, align 8, !tbaa !11
  %119 = call double @llvm.fmuladd.f64(double %116, double %117, double %118)
  store double %119, ptr %21, align 8, !tbaa !11
  %120 = load double, ptr %26, align 8, !tbaa !11
  %121 = load double, ptr %26, align 8, !tbaa !11
  %122 = fmul double %120, %121
  %123 = load double, ptr %26, align 8, !tbaa !11
  %124 = load double, ptr %22, align 8, !tbaa !11
  %125 = call double @llvm.fmuladd.f64(double %122, double %123, double %124)
  store double %125, ptr %22, align 8, !tbaa !11
  %126 = load double, ptr %26, align 8, !tbaa !11
  %127 = load double, ptr %25, align 8, !tbaa !11
  %128 = fmul double %126, %127
  %129 = load double, ptr %25, align 8, !tbaa !11
  %130 = load double, ptr %23, align 8, !tbaa !11
  %131 = call double @llvm.fmuladd.f64(double %128, double %129, double %130)
  store double %131, ptr %23, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  br label %132

132:                                              ; preds = %81
  %133 = load i32, ptr %24, align 4, !tbaa !9
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %24, align 4, !tbaa !9
  br label %76, !llvm.loop !15

135:                                              ; preds = %80
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #4
  %136 = load double, ptr %17, align 8, !tbaa !11
  %137 = load double, ptr %19, align 8, !tbaa !11
  %138 = load double, ptr %18, align 8, !tbaa !11
  %139 = load double, ptr %18, align 8, !tbaa !11
  %140 = fmul double %138, %139
  %141 = fneg double %140
  %142 = call double @llvm.fmuladd.f64(double %136, double %137, double %141)
  store double %142, ptr %27, align 8, !tbaa !11
  %143 = load double, ptr %27, align 8, !tbaa !11
  %144 = fcmp oeq double %143, 0.000000e+00
  br i1 %144, label %145, label %146

145:                                              ; preds = %135
  store i1 false, ptr %6, align 1
  store i32 1, ptr %13, align 4
  br label %245

146:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #4
  %147 = load double, ptr %20, align 8, !tbaa !11
  %148 = load double, ptr %21, align 8, !tbaa !11
  %149 = fadd double %147, %148
  %150 = fmul double 5.000000e-01, %149
  store double %150, ptr %28, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #4
  %151 = load double, ptr %22, align 8, !tbaa !11
  %152 = load double, ptr %23, align 8, !tbaa !11
  %153 = fadd double %151, %152
  %154 = fmul double 5.000000e-01, %153
  store double %154, ptr %29, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #4
  %155 = load double, ptr %19, align 8, !tbaa !11
  %156 = load double, ptr %28, align 8, !tbaa !11
  %157 = load double, ptr %18, align 8, !tbaa !11
  %158 = load double, ptr %29, align 8, !tbaa !11
  %159 = fmul double %157, %158
  %160 = fneg double %159
  %161 = call double @llvm.fmuladd.f64(double %155, double %156, double %160)
  %162 = load double, ptr %27, align 8, !tbaa !11
  %163 = fdiv double %161, %162
  store double %163, ptr %30, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #4
  %164 = load double, ptr %17, align 8, !tbaa !11
  %165 = load double, ptr %29, align 8, !tbaa !11
  %166 = load double, ptr %18, align 8, !tbaa !11
  %167 = load double, ptr %28, align 8, !tbaa !11
  %168 = fmul double %166, %167
  %169 = fneg double %168
  %170 = call double @llvm.fmuladd.f64(double %164, double %165, double %169)
  %171 = load double, ptr %27, align 8, !tbaa !11
  %172 = fdiv double %170, %171
  store double %172, ptr %31, align 8, !tbaa !11
  %173 = load double, ptr %30, align 8, !tbaa !11
  %174 = load double, ptr %30, align 8, !tbaa !11
  %175 = load double, ptr %31, align 8, !tbaa !11
  %176 = load double, ptr %31, align 8, !tbaa !11
  %177 = fmul double %175, %176
  %178 = call double @llvm.fmuladd.f64(double %173, double %174, double %177)
  %179 = load double, ptr %17, align 8, !tbaa !11
  %180 = load double, ptr %19, align 8, !tbaa !11
  %181 = fadd double %179, %180
  %182 = load i32, ptr %12, align 4, !tbaa !9
  %183 = sitofp i32 %182 to double
  %184 = fdiv double %181, %183
  %185 = fadd double %178, %184
  %186 = call double @sqrt(double noundef %185) #4
  %187 = load ptr, ptr %11, align 8, !tbaa !5
  store double %186, ptr %187, align 8, !tbaa !11
  %188 = load double, ptr %30, align 8, !tbaa !11
  %189 = load double, ptr %14, align 8, !tbaa !11
  %190 = fadd double %188, %189
  %191 = load ptr, ptr %9, align 8, !tbaa !5
  store double %190, ptr %191, align 8, !tbaa !11
  %192 = load double, ptr %31, align 8, !tbaa !11
  %193 = load double, ptr %15, align 8, !tbaa !11
  %194 = fadd double %192, %193
  %195 = load ptr, ptr %10, align 8, !tbaa !5
  store double %194, ptr %195, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #4
  store double 0.000000e+00, ptr %32, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #4
  store i32 0, ptr %33, align 4, !tbaa !9
  br label %196

196:                                              ; preds = %232, %146
  %197 = load i32, ptr %33, align 4, !tbaa !9
  %198 = load i32, ptr %12, align 4, !tbaa !9
  %199 = icmp slt i32 %197, %198
  br i1 %199, label %201, label %200

200:                                              ; preds = %196
  store i32 8, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #4
  br label %235

201:                                              ; preds = %196
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #4
  %202 = load ptr, ptr %7, align 8, !tbaa !5
  %203 = load i32, ptr %33, align 4, !tbaa !9
  %204 = sext i32 %203 to i64
  %205 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %202, i64 noundef %204) #4
  %206 = load double, ptr %205, align 8, !tbaa !11
  %207 = load ptr, ptr %9, align 8, !tbaa !5
  %208 = load double, ptr %207, align 8, !tbaa !11
  %209 = fsub double %206, %208
  store double %209, ptr %34, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #4
  %210 = load ptr, ptr %8, align 8, !tbaa !5
  %211 = load i32, ptr %33, align 4, !tbaa !9
  %212 = sext i32 %211 to i64
  %213 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %210, i64 noundef %212) #4
  %214 = load double, ptr %213, align 8, !tbaa !11
  %215 = load ptr, ptr %10, align 8, !tbaa !5
  %216 = load double, ptr %215, align 8, !tbaa !11
  %217 = fsub double %214, %216
  store double %217, ptr %35, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #4
  %218 = load double, ptr %34, align 8, !tbaa !11
  %219 = load double, ptr %34, align 8, !tbaa !11
  %220 = load double, ptr %35, align 8, !tbaa !11
  %221 = load double, ptr %35, align 8, !tbaa !11
  %222 = fmul double %220, %221
  %223 = call double @llvm.fmuladd.f64(double %218, double %219, double %222)
  %224 = call double @sqrt(double noundef %223) #4
  %225 = load ptr, ptr %11, align 8, !tbaa !5
  %226 = load double, ptr %225, align 8, !tbaa !11
  %227 = fsub double %224, %226
  store double %227, ptr %36, align 8, !tbaa !11
  %228 = load double, ptr %36, align 8, !tbaa !11
  %229 = load double, ptr %36, align 8, !tbaa !11
  %230 = load double, ptr %32, align 8, !tbaa !11
  %231 = call double @llvm.fmuladd.f64(double %228, double %229, double %230)
  store double %231, ptr %32, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #4
  br label %232

232:                                              ; preds = %201
  %233 = load i32, ptr %33, align 4, !tbaa !9
  %234 = add nsw i32 %233, 1
  store i32 %234, ptr %33, align 4, !tbaa !9
  br label %196, !llvm.loop !16

235:                                              ; preds = %200
  %236 = load i32, ptr %12, align 4, !tbaa !9
  %237 = sitofp i32 %236 to double
  %238 = load double, ptr %32, align 8, !tbaa !11
  %239 = fdiv double %238, %237
  store double %239, ptr %32, align 8, !tbaa !11
  %240 = load double, ptr %32, align 8, !tbaa !11
  %241 = fcmp ogt double %240, 2.000000e-04
  br i1 %241, label %242, label %243

242:                                              ; preds = %235
  store i1 false, ptr %6, align 1
  store i32 1, ptr %13, align 4
  br label %244

243:                                              ; preds = %235
  store i1 true, ptr %6, align 1
  store i32 1, ptr %13, align 4
  br label %244

244:                                              ; preds = %243, %242
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  br label %245

245:                                              ; preds = %244, %145
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %246

246:                                              ; preds = %245, %42
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  %247 = load i1, ptr %6, align 1
  ret i1 %247
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

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


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

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_Z9CircleFitRKSt6vectorIdSaIdEES3_RdS4_S4_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr nocapture noundef nonnull align 8 dereferenceable(8) %2, ptr nocapture noundef nonnull align 8 dereferenceable(8) %3, ptr nocapture noundef nonnull align 8 dereferenceable(8) %4) local_unnamed_addr #2 {
  %6 = tail call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  %7 = trunc i64 %6 to i32
  %8 = icmp slt i32 %7, 3
  br i1 %8, label %84, label %.preheader.preheader

.preheader.preheader:                             ; preds = %5
  %wide.trip.count = and i64 %6, 2147483647
  br label %.preheader

.lr.ph.preheader:                                 ; preds = %.preheader
  %9 = uitofp nneg i32 %7 to double
  %10 = insertelement <2 x double> poison, double %9, i64 0
  %11 = shufflevector <2 x double> %10, <2 x double> poison, <2 x i32> zeroinitializer
  %12 = fdiv <2 x double> %20, %11
  br label %.lr.ph

.preheader:                                       ; preds = %.preheader.preheader, %.preheader
  %indvars.iv = phi i64 [ 0, %.preheader.preheader ], [ %indvars.iv.next, %.preheader ]
  %13 = phi <2 x double> [ zeroinitializer, %.preheader.preheader ], [ %20, %.preheader ]
  %14 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv) #4
  %15 = load double, ptr %14, align 8, !tbaa !5
  %16 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv) #4
  %17 = load double, ptr %16, align 8, !tbaa !5
  %18 = insertelement <2 x double> poison, double %15, i64 0
  %19 = insertelement <2 x double> %18, double %17, i64 1
  %20 = fadd <2 x double> %13, %19
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.lr.ph.preheader, label %.preheader, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph
  %21 = extractelement <4 x double> %41, i64 1
  %22 = fneg double %21
  %23 = fmul double %21, %22
  %24 = extractelement <4 x double> %41, i64 0
  %25 = extractelement <4 x double> %41, i64 3
  %26 = tail call double @llvm.fmuladd.f64(double %24, double %25, double %23)
  %27 = fcmp oeq double %26, 0.000000e+00
  br i1 %27, label %84, label %.lr.ph137.preheader

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv150 = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next151, %.lr.ph ]
  %.0111123 = phi double [ 0.000000e+00, %.lr.ph.preheader ], [ %44, %.lr.ph ]
  %.0113121 = phi double [ 0.000000e+00, %.lr.ph.preheader ], [ %47, %.lr.ph ]
  %.0114120 = phi double [ 0.000000e+00, %.lr.ph.preheader ], [ %46, %.lr.ph ]
  %28 = phi <4 x double> [ zeroinitializer, %.lr.ph.preheader ], [ %41, %.lr.ph ]
  %29 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv150) #4
  %30 = load double, ptr %29, align 8, !tbaa !5
  %31 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv150) #4
  %32 = load double, ptr %31, align 8, !tbaa !5
  %33 = insertelement <2 x double> poison, double %30, i64 0
  %34 = insertelement <2 x double> %33, double %32, i64 1
  %35 = fsub <2 x double> %34, %12
  %36 = shufflevector <2 x double> %35, <2 x double> poison, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
  %37 = extractelement <2 x double> %35, i64 0
  %38 = fmul double %37, %37
  %39 = shufflevector <2 x double> %35, <2 x double> poison, <4 x i32> <i32 0, i32 0, i32 poison, i32 1>
  %40 = insertelement <4 x double> %39, double %38, i64 2
  %41 = tail call <4 x double> @llvm.fmuladd.v4f64(<4 x double> %40, <4 x double> %36, <4 x double> %28)
  %42 = extractelement <2 x double> %35, i64 1
  %43 = fmul double %37, %42
  %44 = tail call double @llvm.fmuladd.f64(double %43, double %42, double %.0111123)
  %45 = fmul double %42, %42
  %46 = tail call double @llvm.fmuladd.f64(double %45, double %42, double %.0114120)
  %47 = tail call double @llvm.fmuladd.f64(double %43, double %37, double %.0113121)
  %indvars.iv.next151 = add nuw nsw i64 %indvars.iv150, 1
  %exitcond154.not = icmp eq i64 %indvars.iv.next151, %wide.trip.count
  br i1 %exitcond154.not, label %._crit_edge, label %.lr.ph, !llvm.loop !11

.lr.ph137.preheader:                              ; preds = %._crit_edge
  %48 = extractelement <4 x double> %41, i64 2
  %49 = fadd double %44, %48
  %50 = fmul double %49, 5.000000e-01
  %51 = fadd double %46, %47
  %52 = fmul double %51, 5.000000e-01
  %53 = fmul double %52, %22
  %54 = tail call double @llvm.fmuladd.f64(double %25, double %50, double %53)
  %55 = fdiv double %54, %26
  %56 = fmul double %50, %22
  %57 = tail call double @llvm.fmuladd.f64(double %24, double %52, double %56)
  %58 = fdiv double %57, %26
  %59 = fmul double %58, %58
  %60 = tail call double @llvm.fmuladd.f64(double %55, double %55, double %59)
  %61 = fadd double %25, %24
  %62 = fdiv double %61, %9
  %63 = fadd double %62, %60
  %64 = tail call double @sqrt(double noundef %63) #4
  store double %64, ptr %4, align 8, !tbaa !5
  %65 = extractelement <2 x double> %12, i64 0
  %66 = fadd double %65, %55
  store double %66, ptr %2, align 8, !tbaa !5
  %67 = extractelement <2 x double> %12, i64 1
  %68 = fadd double %67, %58
  store double %68, ptr %3, align 8, !tbaa !5
  %smax = tail call i32 @llvm.smax.i32(i32 %7, i32 1)
  %wide.trip.count158 = zext nneg i32 %smax to i64
  br label %.lr.ph137

._crit_edge138:                                   ; preds = %.lr.ph137
  %69 = fdiv double %83, %9
  %70 = fcmp ule double %69, 2.000000e-04
  br label %84

.lr.ph137:                                        ; preds = %.lr.ph137.preheader, %.lr.ph137
  %indvars.iv155 = phi i64 [ 0, %.lr.ph137.preheader ], [ %indvars.iv.next156, %.lr.ph137 ]
  %.0104134 = phi double [ 0.000000e+00, %.lr.ph137.preheader ], [ %83, %.lr.ph137 ]
  %71 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv155) #4
  %72 = load double, ptr %71, align 8, !tbaa !5
  %73 = load double, ptr %2, align 8, !tbaa !5
  %74 = fsub double %72, %73
  %75 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv155) #4
  %76 = load double, ptr %75, align 8, !tbaa !5
  %77 = load double, ptr %3, align 8, !tbaa !5
  %78 = fsub double %76, %77
  %79 = fmul double %78, %78
  %80 = tail call double @llvm.fmuladd.f64(double %74, double %74, double %79)
  %sqrt = tail call double @llvm.sqrt.f64(double %80)
  %81 = load double, ptr %4, align 8, !tbaa !5
  %82 = fsub double %sqrt, %81
  %83 = tail call double @llvm.fmuladd.f64(double %82, double %82, double %.0104134)
  %indvars.iv.next156 = add nuw nsw i64 %indvars.iv155, 1
  %exitcond159.not = icmp eq i64 %indvars.iv.next156, %wide.trip.count158
  br i1 %exitcond159.not, label %._crit_edge138, label %.lr.ph137, !llvm.loop !12

84:                                               ; preds = %._crit_edge138, %._crit_edge, %5
  %.2 = phi i1 [ false, %5 ], [ %70, %._crit_edge138 ], [ false, %._crit_edge ]
  ret i1 %.2
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { 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 #2 = { 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}


; Effective O3 passes: AggressiveInstCombinePass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass