; LLVM IR from robotics-upo/Heuristic_path_planners :: include/voro++-0.4.6/src (cell)

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

%"class.voro::voronoicell_base" = type { ptr, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, double, double, double, double }

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4voro16voronoicell_base8cycle_upEii(ptr noundef nonnull align 8 dereferenceable(160), i32 noundef, i32 noundef) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4voro16voronoicell_base11reset_edgesEv(ptr noundef nonnull align 8 dereferenceable(160)) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEE9push_backEOd(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4voro16voronoicell_base15face_perimetersERSt6vectorIdSaIdEE(ptr noundef nonnull align 8 dereferenceable(160) %0, ptr noundef nonnull align 8 dereferenceable(24) %1) #5 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %15 = load ptr, ptr %3, align 8
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZNSt6vectorIdSaIdEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  store i32 1, ptr %5, align 4, !tbaa !9
  br label %17

17:                                               ; preds = %251, %2
  %18 = load i32, ptr %5, align 4, !tbaa !9
  %19 = getelementptr inbounds %"class.voro::voronoicell_base", ptr %15, i32 0, i32 5
  %20 = load i32, ptr %19, align 8, !tbaa !11
  %21 = icmp slt i32 %18, %20
  br i1 %21, label %22, label %254

22:                                               ; preds = %17
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %23

23:                                               ; preds = %247, %22
  %24 = load i32, ptr %6, align 4, !tbaa !9
  %25 = getelementptr inbounds %"class.voro::voronoicell_base", ptr %15, i32 0, i32 8
  %26 = load ptr, ptr %25, align 8, !tbaa !14
  %27 = load i32, ptr %5, align 4, !tbaa !9
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds i32, ptr %26, i64 %28
  %30 = load i32, ptr %29, align 4, !tbaa !9
  %31 = icmp slt i32 %24, %30
  br i1 %31, label %32, label %250

32:                                               ; preds = %23
  %33 = getelementptr inbounds %"class.voro::voronoicell_base", ptr %15, i32 0, i32 7
  %34 = load ptr, ptr %33, align 8, !tbaa !15
  %35 = load i32, ptr %5, align 4, !tbaa !9
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds ptr, ptr %34, i64 %36
  %38 = load ptr, ptr %37, align 8, !tbaa !5
  %39 = load i32, ptr %6, align 4, !tbaa !9
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds i32, ptr %38, i64 %40
  %42 = load i32, ptr %41, align 4, !tbaa !9
  store i32 %42, ptr %7, align 4, !tbaa !9
  %43 = load i32, ptr %7, align 4, !tbaa !9
  %44 = icmp sge i32 %43, 0
  br i1 %44, label %45, label %246

45:                                               ; preds = %32
  %46 = getelementptr inbounds %"class.voro::voronoicell_base", ptr %15, i32 0, i32 9
  %47 = load ptr, ptr %46, align 8, !tbaa !16
  %48 = load i32, ptr %7, align 4, !tbaa !9
  %49 = mul nsw i32 3, %48
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds double, ptr %47, i64 %50
  %52 = load double, ptr %51, align 8, !tbaa !17
  %53 = getelementptr inbounds %"class.voro::voronoicell_base", ptr %15, i32 0, i32 9
  %54 = load ptr, ptr %53, align 8, !tbaa !16
  %55 = load i32, ptr %5, align 4, !tbaa !9
  %56 = mul nsw i32 3, %55
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds double, ptr %54, i64 %57
  %59 = load double, ptr %58, align 8, !tbaa !17
  %60 = fsub double %52, %59
  store double %60, ptr %10, align 8, !tbaa !17
  %61 = getelementptr inbounds %"class.voro::voronoicell_base", ptr %15, i32 0, i32 9
  %62 = load ptr, ptr %61, align 8, !tbaa !16
  %63 = load i32, ptr %7, align 4, !tbaa !9
  %64 = mul nsw i32 3, %63
  %65 = add nsw i32 %64, 1
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds double, ptr %62, i64 %66
  %68 = load double, ptr %67, align 8, !tbaa !17
  %69 = getelementptr inbounds %"class.voro::voronoicell_base", ptr %15, i32 0, i32 9
  %70 = load ptr, ptr %69, align 8, !tbaa !16
  %71 = load i32, ptr %5, align 4, !tbaa !9
  %72 = mul nsw i32 3, %71
  %73 = add nsw i32 %72, 1
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds double, ptr %70, i64 %74
  %76 = load double, ptr %75, align 8, !tbaa !17
  %77 = fsub double %68, %76
  store double %77, ptr %11, align 8, !tbaa !17
  %78 = getelementptr inbounds %"class.voro::voronoicell_base", ptr %15, i32 0, i32 9
  %79 = load ptr, ptr %78, align 8, !tbaa !16
  %80 = load i32, ptr %7, align 4, !tbaa !9
  %81 = mul nsw i32 3, %80
  %82 = add nsw i32 %81, 2
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds double, ptr %79, i64 %83
  %85 = load double, ptr %84, align 8, !tbaa !17
  %86 = getelementptr inbounds %"class.voro::voronoicell_base", ptr %15, i32 0, i32 9
  %87 = load ptr, ptr %86, align 8, !tbaa !16
  %88 = load i32, ptr %5, align 4, !tbaa !9
  %89 = mul nsw i32 3, %88
  %90 = add nsw i32 %89, 2
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds double, ptr %87, i64 %91
  %93 = load double, ptr %92, align 8, !tbaa !17
  %94 = fsub double %85, %93
  store double %94, ptr %12, align 8, !tbaa !17
  %95 = load double, ptr %10, align 8, !tbaa !17
  %96 = load double, ptr %10, align 8, !tbaa !17
  %97 = load double, ptr %11, align 8, !tbaa !17
  %98 = load double, ptr %11, align 8, !tbaa !17
  %99 = fmul double %97, %98
  %100 = call double @llvm.fmuladd.f64(double %95, double %96, double %99)
  %101 = load double, ptr %12, align 8, !tbaa !17
  %102 = load double, ptr %12, align 8, !tbaa !17
  %103 = call double @llvm.fmuladd.f64(double %101, double %102, double %100)
  %104 = call double @sqrt(double noundef %103) #6
  store double %104, ptr %13, align 8, !tbaa !17
  %105 = load i32, ptr %7, align 4, !tbaa !9
  %106 = sub nsw i32 -1, %105
  %107 = getelementptr inbounds %"class.voro::voronoicell_base", ptr %15, i32 0, i32 7
  %108 = load ptr, ptr %107, align 8, !tbaa !15
  %109 = load i32, ptr %5, align 4, !tbaa !9
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds ptr, ptr %108, i64 %110
  %112 = load ptr, ptr %111, align 8, !tbaa !5
  %113 = load i32, ptr %6, align 4, !tbaa !9
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds i32, ptr %112, i64 %114
  store i32 %106, ptr %115, align 4, !tbaa !9
  %116 = getelementptr inbounds %"class.voro::voronoicell_base", ptr %15, i32 0, i32 7
  %117 = load ptr, ptr %116, align 8, !tbaa !15
  %118 = load i32, ptr %5, align 4, !tbaa !9
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds ptr, ptr %117, i64 %119
  %121 = load ptr, ptr %120, align 8, !tbaa !5
  %122 = getelementptr inbounds %"class.voro::voronoicell_base", ptr %15, i32 0, i32 8
  %123 = load ptr, ptr %122, align 8, !tbaa !14
  %124 = load i32, ptr %5, align 4, !tbaa !9
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds i32, ptr %123, i64 %125
  %127 = load i32, ptr %126, align 4, !tbaa !9
  %128 = load i32, ptr %6, align 4, !tbaa !9
  %129 = add nsw i32 %127, %128
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds i32, ptr %121, i64 %130
  %132 = load i32, ptr %131, align 4, !tbaa !9
  %133 = load i32, ptr %7, align 4, !tbaa !9
  %134 = call noundef i32 @_ZN4voro16voronoicell_base8cycle_upEii(ptr noundef nonnull align 8 dereferenceable(160) %15, i32 noundef %132, i32 noundef %133)
  store i32 %134, ptr %8, align 4, !tbaa !9
  br label %135

135:                                              ; preds = %238, %45
  %136 = getelementptr inbounds %"class.voro::voronoicell_base", ptr %15, i32 0, i32 7
  %137 = load ptr, ptr %136, align 8, !tbaa !15
  %138 = load i32, ptr %7, align 4, !tbaa !9
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds ptr, ptr %137, i64 %139
  %141 = load ptr, ptr %140, align 8, !tbaa !5
  %142 = load i32, ptr %8, align 4, !tbaa !9
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds i32, ptr %141, i64 %143
  %145 = load i32, ptr %144, align 4, !tbaa !9
  store i32 %145, ptr %9, align 4, !tbaa !9
  %146 = getelementptr inbounds %"class.voro::voronoicell_base", ptr %15, i32 0, i32 9
  %147 = load ptr, ptr %146, align 8, !tbaa !16
  %148 = load i32, ptr %9, align 4, !tbaa !9
  %149 = mul nsw i32 3, %148
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds double, ptr %147, i64 %150
  %152 = load double, ptr %151, align 8, !tbaa !17
  %153 = getelementptr inbounds %"class.voro::voronoicell_base", ptr %15, i32 0, i32 9
  %154 = load ptr, ptr %153, align 8, !tbaa !16
  %155 = load i32, ptr %7, align 4, !tbaa !9
  %156 = mul nsw i32 3, %155
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds double, ptr %154, i64 %157
  %159 = load double, ptr %158, align 8, !tbaa !17
  %160 = fsub double %152, %159
  store double %160, ptr %10, align 8, !tbaa !17
  %161 = getelementptr inbounds %"class.voro::voronoicell_base", ptr %15, i32 0, i32 9
  %162 = load ptr, ptr %161, align 8, !tbaa !16
  %163 = load i32, ptr %9, align 4, !tbaa !9
  %164 = mul nsw i32 3, %163
  %165 = add nsw i32 %164, 1
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds double, ptr %162, i64 %166
  %168 = load double, ptr %167, align 8, !tbaa !17
  %169 = getelementptr inbounds %"class.voro::voronoicell_base", ptr %15, i32 0, i32 9
  %170 = load ptr, ptr %169, align 8, !tbaa !16
  %171 = load i32, ptr %7, align 4, !tbaa !9
  %172 = mul nsw i32 3, %171
  %173 = add nsw i32 %172, 1
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds double, ptr %170, i64 %174
  %176 = load double, ptr %175, align 8, !tbaa !17
  %177 = fsub double %168, %176
  store double %177, ptr %11, align 8, !tbaa !17
  %178 = getelementptr inbounds %"class.voro::voronoicell_base", ptr %15, i32 0, i32 9
  %179 = load ptr, ptr %178, align 8, !tbaa !16
  %180 = load i32, ptr %9, align 4, !tbaa !9
  %181 = mul nsw i32 3, %180
  %182 = add nsw i32 %181, 2
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds double, ptr %179, i64 %183
  %185 = load double, ptr %184, align 8, !tbaa !17
  %186 = getelementptr inbounds %"class.voro::voronoicell_base", ptr %15, i32 0, i32 9
  %187 = load ptr, ptr %186, align 8, !tbaa !16
  %188 = load i32, ptr %7, align 4, !tbaa !9
  %189 = mul nsw i32 3, %188
  %190 = add nsw i32 %189, 2
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds double, ptr %187, i64 %191
  %193 = load double, ptr %192, align 8, !tbaa !17
  %194 = fsub double %185, %193
  store double %194, ptr %12, align 8, !tbaa !17
  %195 = load double, ptr %10, align 8, !tbaa !17
  %196 = load double, ptr %10, align 8, !tbaa !17
  %197 = load double, ptr %11, align 8, !tbaa !17
  %198 = load double, ptr %11, align 8, !tbaa !17
  %199 = fmul double %197, %198
  %200 = call double @llvm.fmuladd.f64(double %195, double %196, double %199)
  %201 = load double, ptr %12, align 8, !tbaa !17
  %202 = load double, ptr %12, align 8, !tbaa !17
  %203 = call double @llvm.fmuladd.f64(double %201, double %202, double %200)
  %204 = call double @sqrt(double noundef %203) #6
  %205 = load double, ptr %13, align 8, !tbaa !17
  %206 = fadd double %205, %204
  store double %206, ptr %13, align 8, !tbaa !17
  %207 = load i32, ptr %9, align 4, !tbaa !9
  %208 = sub nsw i32 -1, %207
  %209 = getelementptr inbounds %"class.voro::voronoicell_base", ptr %15, i32 0, i32 7
  %210 = load ptr, ptr %209, align 8, !tbaa !15
  %211 = load i32, ptr %7, align 4, !tbaa !9
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds ptr, ptr %210, i64 %212
  %214 = load ptr, ptr %213, align 8, !tbaa !5
  %215 = load i32, ptr %8, align 4, !tbaa !9
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds i32, ptr %214, i64 %216
  store i32 %208, ptr %217, align 4, !tbaa !9
  %218 = getelementptr inbounds %"class.voro::voronoicell_base", ptr %15, i32 0, i32 7
  %219 = load ptr, ptr %218, align 8, !tbaa !15
  %220 = load i32, ptr %7, align 4, !tbaa !9
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds ptr, ptr %219, i64 %221
  %223 = load ptr, ptr %222, align 8, !tbaa !5
  %224 = getelementptr inbounds %"class.voro::voronoicell_base", ptr %15, i32 0, i32 8
  %225 = load ptr, ptr %224, align 8, !tbaa !14
  %226 = load i32, ptr %7, align 4, !tbaa !9
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds i32, ptr %225, i64 %227
  %229 = load i32, ptr %228, align 4, !tbaa !9
  %230 = load i32, ptr %8, align 4, !tbaa !9
  %231 = add nsw i32 %229, %230
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds i32, ptr %223, i64 %232
  %234 = load i32, ptr %233, align 4, !tbaa !9
  %235 = load i32, ptr %9, align 4, !tbaa !9
  %236 = call noundef i32 @_ZN4voro16voronoicell_base8cycle_upEii(ptr noundef nonnull align 8 dereferenceable(160) %15, i32 noundef %234, i32 noundef %235)
  store i32 %236, ptr %8, align 4, !tbaa !9
  %237 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %237, ptr %7, align 4, !tbaa !9
  br label %238

238:                                              ; preds = %135
  %239 = load i32, ptr %7, align 4, !tbaa !9
  %240 = load i32, ptr %5, align 4, !tbaa !9
  %241 = icmp ne i32 %239, %240
  br i1 %241, label %135, label %242, !llvm.loop !18

242:                                              ; preds = %238
  %243 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %244 = load double, ptr %13, align 8, !tbaa !17
  %245 = fmul double 5.000000e-01, %244
  store double %245, ptr %14, align 8, !tbaa !17
  call void @_ZNSt6vectorIdSaIdEE9push_backEOd(ptr noundef nonnull align 8 dereferenceable(24) %243, ptr noundef nonnull align 8 dereferenceable(8) %14)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %246

246:                                              ; preds = %242, %32
  br label %247

247:                                              ; preds = %246
  %248 = load i32, ptr %6, align 4, !tbaa !9
  %249 = add nsw i32 %248, 1
  store i32 %249, ptr %6, align 4, !tbaa !9
  br label %23, !llvm.loop !20

250:                                              ; preds = %23
  br label %251

251:                                              ; preds = %250
  %252 = load i32, ptr %5, align 4, !tbaa !9
  %253 = add nsw i32 %252, 1
  store i32 %253, ptr %5, align 4, !tbaa !9
  br label %17, !llvm.loop !21

254:                                              ; preds = %17
  call void @_ZN4voro16voronoicell_base11reset_edgesEv(ptr noundef nonnull align 8 dereferenceable(160) %15)
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  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
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { 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 #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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress 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 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 24}
!12 = !{!"_ZTSN4voro16voronoicell_baseE", !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !10, i64 112, !10, i64 116, !6, i64 120, !13, i64 128, !13, i64 136, !13, i64 144, !13, i64 152}
!13 = !{!"double", !7, i64 0}
!14 = !{!12, !6, i64 40}
!15 = !{!12, !6, i64 32}
!16 = !{!12, !6, i64 48}
!17 = !{!13, !13, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}


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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4voro16voronoicell_base8cycle_upEii(ptr noundef nonnull align 8 dereferenceable(160), i32 noundef, i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4voro16voronoicell_base11reset_edgesEv(ptr noundef nonnull align 8 dereferenceable(160)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEE9push_backEOd(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4voro16voronoicell_base15face_perimetersERSt6vectorIdSaIdEE(ptr noundef nonnull align 8 dereferenceable(160) %0, ptr noundef nonnull align 8 dereferenceable(24) %1) local_unnamed_addr #4 align 2 {
  %3 = alloca double, align 8
  tail call void @_ZNSt6vectorIdSaIdEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %4 = getelementptr inbounds i8, ptr %0, i64 24
  %5 = load i32, ptr %4, align 8, !tbaa !5
  %6 = icmp sgt i32 %5, 1
  br i1 %6, label %.preheader.lr.ph, label %._crit_edge63

.preheader.lr.ph:                                 ; preds = %2
  %7 = getelementptr inbounds i8, ptr %0, i64 40
  %8 = getelementptr inbounds i8, ptr %0, i64 32
  %9 = getelementptr inbounds i8, ptr %0, i64 48
  %.pre = load ptr, ptr %7, align 8, !tbaa !12
  br label %.preheader

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge
  %10 = phi i32 [ %5, %.preheader.lr.ph ], [ %106, %._crit_edge ]
  %11 = phi ptr [ %.pre, %.preheader.lr.ph ], [ %107, %._crit_edge ]
  %12 = phi ptr [ %.pre, %.preheader.lr.ph ], [ %108, %._crit_edge ]
  %indvars.iv65 = phi i64 [ 1, %.preheader.lr.ph ], [ %indvars.iv.next66, %._crit_edge ]
  %13 = getelementptr inbounds i32, ptr %12, i64 %indvars.iv65
  %14 = load i32, ptr %13, align 4, !tbaa !13
  %15 = icmp sgt i32 %14, 0
  br i1 %15, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader
  %.idx = mul i64 %indvars.iv65, 24
  br label %16

16:                                               ; preds = %.lr.ph, %100
  %17 = phi ptr [ %11, %.lr.ph ], [ %101, %100 ]
  %18 = phi ptr [ %12, %.lr.ph ], [ %101, %100 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %100 ]
  %19 = load ptr, ptr %8, align 8, !tbaa !14
  %20 = getelementptr inbounds ptr, ptr %19, i64 %indvars.iv65
  %21 = load ptr, ptr %20, align 8, !tbaa !15
  %22 = getelementptr inbounds i32, ptr %21, i64 %indvars.iv
  %23 = load i32, ptr %22, align 4, !tbaa !13
  %24 = icmp sgt i32 %23, -1
  br i1 %24, label %25, label %100

25:                                               ; preds = %16
  %26 = load ptr, ptr %9, align 8, !tbaa !16
  %27 = mul nuw nsw i32 %23, 3
  %28 = zext nneg i32 %27 to i64
  %29 = getelementptr inbounds double, ptr %26, i64 %28
  %30 = load double, ptr %29, align 8, !tbaa !17
  %31 = getelementptr inbounds i8, ptr %26, i64 %.idx
  %32 = load double, ptr %31, align 8, !tbaa !17
  %33 = fsub double %30, %32
  %34 = getelementptr inbounds i8, ptr %29, i64 8
  %35 = load double, ptr %34, align 8, !tbaa !17
  %36 = getelementptr inbounds i8, ptr %31, i64 8
  %37 = load double, ptr %36, align 8, !tbaa !17
  %38 = fsub double %35, %37
  %39 = getelementptr inbounds i8, ptr %29, i64 16
  %40 = load double, ptr %39, align 8, !tbaa !17
  %41 = getelementptr inbounds i8, ptr %31, i64 16
  %42 = load double, ptr %41, align 8, !tbaa !17
  %43 = fsub double %40, %42
  %44 = fmul double %38, %38
  %45 = call double @llvm.fmuladd.f64(double %33, double %33, double %44)
  %46 = call double @llvm.fmuladd.f64(double %43, double %43, double %45)
  %sqrt = call double @llvm.sqrt.f64(double %46)
  %47 = xor i32 %23, -1
  store i32 %47, ptr %22, align 4, !tbaa !13
  %48 = getelementptr inbounds i32, ptr %18, i64 %indvars.iv65
  %49 = load i32, ptr %48, align 4, !tbaa !13
  %50 = trunc nuw nsw i64 %indvars.iv to i32
  %51 = add nsw i32 %49, %50
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds i32, ptr %21, i64 %52
  %54 = load i32, ptr %53, align 4, !tbaa !13
  %55 = call noundef i32 @_ZN4voro16voronoicell_base8cycle_upEii(ptr noundef nonnull align 8 dereferenceable(160) %0, i32 noundef %54, i32 noundef %23)
  br label %56

56:                                               ; preds = %56, %25
  %.057 = phi i32 [ %23, %25 ], [ %63, %56 ]
  %.056 = phi i32 [ %55, %25 ], [ %96, %56 ]
  %.0 = phi double [ %sqrt, %25 ], [ %87, %56 ]
  %57 = load ptr, ptr %8, align 8, !tbaa !14
  %58 = sext i32 %.057 to i64
  %59 = getelementptr inbounds ptr, ptr %57, i64 %58
  %60 = load ptr, ptr %59, align 8, !tbaa !15
  %61 = sext i32 %.056 to i64
  %62 = getelementptr inbounds i32, ptr %60, i64 %61
  %63 = load i32, ptr %62, align 4, !tbaa !13
  %64 = load ptr, ptr %9, align 8, !tbaa !16
  %65 = mul nsw i32 %63, 3
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds double, ptr %64, i64 %66
  %68 = load double, ptr %67, align 8, !tbaa !17
  %69 = mul nsw i32 %.057, 3
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds double, ptr %64, i64 %70
  %72 = load double, ptr %71, align 8, !tbaa !17
  %73 = fsub double %68, %72
  %74 = getelementptr i8, ptr %67, i64 8
  %75 = load double, ptr %74, align 8, !tbaa !17
  %76 = getelementptr i8, ptr %71, i64 8
  %77 = load double, ptr %76, align 8, !tbaa !17
  %78 = fsub double %75, %77
  %79 = getelementptr i8, ptr %67, i64 16
  %80 = load double, ptr %79, align 8, !tbaa !17
  %81 = getelementptr i8, ptr %71, i64 16
  %82 = load double, ptr %81, align 8, !tbaa !17
  %83 = fsub double %80, %82
  %84 = fmul double %78, %78
  %85 = call double @llvm.fmuladd.f64(double %73, double %73, double %84)
  %86 = call double @llvm.fmuladd.f64(double %83, double %83, double %85)
  %sqrt60 = call double @llvm.sqrt.f64(double %86)
  %87 = fadd double %.0, %sqrt60
  %88 = xor i32 %63, -1
  store i32 %88, ptr %62, align 4, !tbaa !13
  %89 = load ptr, ptr %7, align 8, !tbaa !12
  %90 = getelementptr inbounds i32, ptr %89, i64 %58
  %91 = load i32, ptr %90, align 4, !tbaa !13
  %92 = add nsw i32 %91, %.056
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds i32, ptr %60, i64 %93
  %95 = load i32, ptr %94, align 4, !tbaa !13
  %96 = call noundef i32 @_ZN4voro16voronoicell_base8cycle_upEii(ptr noundef nonnull align 8 dereferenceable(160) %0, i32 noundef %95, i32 noundef %63)
  %97 = zext i32 %63 to i64
  %.not = icmp eq i64 %indvars.iv65, %97
  br i1 %.not, label %98, label %56, !llvm.loop !18

98:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %99 = fmul double %87, 5.000000e-01
  store double %99, ptr %3, align 8, !tbaa !17
  call void @_ZNSt6vectorIdSaIdEE9push_backEOd(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  %.pre68 = load ptr, ptr %7, align 8, !tbaa !12
  br label %100

100:                                              ; preds = %16, %98
  %101 = phi ptr [ %17, %16 ], [ %.pre68, %98 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %102 = getelementptr inbounds i32, ptr %101, i64 %indvars.iv65
  %103 = load i32, ptr %102, align 4, !tbaa !13
  %104 = sext i32 %103 to i64
  %105 = icmp slt i64 %indvars.iv.next, %104
  br i1 %105, label %16, label %._crit_edge.loopexit, !llvm.loop !20

._crit_edge.loopexit:                             ; preds = %100
  %.pre69 = load i32, ptr %4, align 8, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %106 = phi i32 [ %.pre69, %._crit_edge.loopexit ], [ %10, %.preheader ]
  %107 = phi ptr [ %101, %._crit_edge.loopexit ], [ %11, %.preheader ]
  %108 = phi ptr [ %101, %._crit_edge.loopexit ], [ %12, %.preheader ]
  %indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 1
  %109 = sext i32 %106 to i64
  %110 = icmp slt i64 %indvars.iv.next66, %109
  br i1 %110, label %.preheader, label %._crit_edge63, !llvm.loop !21

._crit_edge63:                                    ; preds = %._crit_edge, %2
  call void @_ZN4voro16voronoicell_base11reset_edgesEv(ptr noundef nonnull align 8 dereferenceable(160) %0)
  ret void
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { 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 #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 = { 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 24}
!6 = !{!"_ZTSN4voro16voronoicell_baseE", !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !7, i64 112, !7, i64 116, !10, i64 120, !11, i64 128, !11, i64 136, !11, i64 144, !11, i64 152}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = !{!6, !10, i64 40}
!13 = !{!7, !7, i64 0}
!14 = !{!6, !10, i64 32}
!15 = !{!10, !10, i64 0}
!16 = !{!6, !10, i64 48}
!17 = !{!11, !11, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}


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