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

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

%"struct.voro::particle_record" = type { i32, i32, i32, i32, i32 }
%"class.voro::container_poly" = type { %"class.voro::container_base.base", %"class.voro::radius_poly", %"class.voro::voro_compute.0" }
%"class.voro::container_base.base" = type <{ %"class.voro::voro_base", %"class.voro::wall_list.base", [4 x i8], double, double, double, double, double, double, i8, i8, i8, [5 x i8], ptr, ptr, ptr, ptr, i32 }>
%"class.voro::voro_base" = type { i32, i32, i32, i32, i32, double, double, double, double, double, double, ptr }
%"class.voro::wall_list.base" = type <{ ptr, ptr, ptr, i32 }>
%"class.voro::radius_poly" = type { ptr, double, double, double, double }
%"class.voro::voro_compute.0" = type { ptr, double, double, double, double, double, double, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, double, i32, i32, ptr, ptr, ptr, ptr, ptr }
%"class.voro::container_base" = type <{ %"class.voro::voro_base", %"class.voro::wall_list.base", [4 x i8], double, double, double, double, double, double, i8, i8, i8, [5 x i8], ptr, ptr, ptr, ptr, i32, [4 x i8] }>

; 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: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4voro14container_base5remapERiS1_S1_S1_S1_S1_RdS2_S2_S1_(ptr noundef nonnull align 8 dereferenceable(204), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4voro14container_poly17find_voronoi_cellEdddRdS1_S1_Ri(ptr noundef nonnull align 8 dereferenceable(408) %0, double noundef %1, double noundef %2, double noundef %3, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(4) %7) #4 align 2 {
  %9 = alloca i1, align 1
  %10 = alloca ptr, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca %"struct.voro::particle_record", align 4
  %26 = alloca double, align 8
  %27 = alloca i32, align 4
  store ptr %0, ptr %10, align 8, !tbaa !5
  store double %1, ptr %11, align 8, !tbaa !9
  store double %2, ptr %12, align 8, !tbaa !9
  store double %3, ptr %13, align 8, !tbaa !9
  store ptr %4, ptr %14, align 8, !tbaa !5
  store ptr %5, ptr %15, align 8, !tbaa !5
  store ptr %6, ptr %16, align 8, !tbaa !5
  store ptr %7, ptr %17, align 8, !tbaa !5
  %28 = load ptr, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.start.p0(i64 20, ptr %25) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  %29 = call noundef zeroext i1 @_ZN4voro14container_base5remapERiS1_S1_S1_S1_S1_RdS2_S2_S1_(ptr noundef nonnull align 8 dereferenceable(204) %28, ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %20, ptr noundef nonnull align 4 dereferenceable(4) %21, ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(4) %24)
  br i1 %29, label %31, label %30

30:                                               ; preds = %8
  store i1 false, ptr %9, align 1
  store i32 1, ptr %27, align 4
  br label %198

31:                                               ; preds = %8
  %32 = getelementptr inbounds %"class.voro::container_poly", ptr %28, i32 0, i32 2
  %33 = load double, ptr %11, align 8, !tbaa !9
  %34 = load double, ptr %12, align 8, !tbaa !9
  %35 = load double, ptr %13, align 8, !tbaa !9
  %36 = load i32, ptr %21, align 4, !tbaa !11
  %37 = load i32, ptr %22, align 4, !tbaa !11
  %38 = load i32, ptr %23, align 4, !tbaa !11
  %39 = load i32, ptr %24, align 4, !tbaa !11
  call void @_ZN4voro12voro_computeINS_14container_polyEE17find_voronoi_cellEdddiiiiRNS_15particle_recordERd(ptr noundef nonnull align 8 dereferenceable(160) %32, double noundef %33, double noundef %34, double noundef %35, i32 noundef %36, i32 noundef %37, i32 noundef %38, i32 noundef %39, ptr noundef nonnull align 4 dereferenceable(20) %25, ptr noundef nonnull align 8 dereferenceable(8) %26)
  %40 = getelementptr inbounds %"struct.voro::particle_record", ptr %25, i32 0, i32 0
  %41 = load i32, ptr %40, align 4, !tbaa !13
  %42 = icmp ne i32 %41, -1
  br i1 %42, label %43, label %197

43:                                               ; preds = %31
  %44 = getelementptr inbounds %"class.voro::container_base", ptr %28, i32 0, i32 9
  %45 = load i8, ptr %44, align 8, !tbaa !15, !range !20, !noundef !21
  %46 = trunc i8 %45 to i1
  br i1 %46, label %47, label %67

47:                                               ; preds = %43
  %48 = getelementptr inbounds %"struct.voro::particle_record", ptr %25, i32 0, i32 2
  %49 = load i32, ptr %48, align 4, !tbaa !22
  %50 = load i32, ptr %21, align 4, !tbaa !11
  %51 = add nsw i32 %50, %49
  store i32 %51, ptr %21, align 4, !tbaa !11
  %52 = load i32, ptr %21, align 4, !tbaa !11
  %53 = icmp slt i32 %52, 0
  br i1 %53, label %59, label %54

54:                                               ; preds = %47
  %55 = load i32, ptr %21, align 4, !tbaa !11
  %56 = getelementptr inbounds %"class.voro::voro_base", ptr %28, i32 0, i32 0
  %57 = load i32, ptr %56, align 8, !tbaa !23
  %58 = icmp sge i32 %55, %57
  br i1 %58, label %59, label %66

59:                                               ; preds = %54, %47
  %60 = load i32, ptr %21, align 4, !tbaa !11
  %61 = getelementptr inbounds %"class.voro::voro_base", ptr %28, i32 0, i32 0
  %62 = load i32, ptr %61, align 8, !tbaa !23
  %63 = call noundef i32 @_ZN4voro9voro_base8step_divEii(ptr noundef nonnull align 8 dereferenceable(80) %28, i32 noundef %60, i32 noundef %62)
  %64 = load i32, ptr %18, align 4, !tbaa !11
  %65 = add nsw i32 %64, %63
  store i32 %65, ptr %18, align 4, !tbaa !11
  br label %66

66:                                               ; preds = %59, %54
  br label %67

67:                                               ; preds = %66, %43
  %68 = getelementptr inbounds %"class.voro::container_base", ptr %28, i32 0, i32 10
  %69 = load i8, ptr %68, align 1, !tbaa !24, !range !20, !noundef !21
  %70 = trunc i8 %69 to i1
  br i1 %70, label %71, label %91

71:                                               ; preds = %67
  %72 = getelementptr inbounds %"struct.voro::particle_record", ptr %25, i32 0, i32 3
  %73 = load i32, ptr %72, align 4, !tbaa !25
  %74 = load i32, ptr %22, align 4, !tbaa !11
  %75 = add nsw i32 %74, %73
  store i32 %75, ptr %22, align 4, !tbaa !11
  %76 = load i32, ptr %22, align 4, !tbaa !11
  %77 = icmp slt i32 %76, 0
  br i1 %77, label %83, label %78

78:                                               ; preds = %71
  %79 = load i32, ptr %22, align 4, !tbaa !11
  %80 = getelementptr inbounds %"class.voro::voro_base", ptr %28, i32 0, i32 1
  %81 = load i32, ptr %80, align 4, !tbaa !26
  %82 = icmp sge i32 %79, %81
  br i1 %82, label %83, label %90

83:                                               ; preds = %78, %71
  %84 = load i32, ptr %22, align 4, !tbaa !11
  %85 = getelementptr inbounds %"class.voro::voro_base", ptr %28, i32 0, i32 1
  %86 = load i32, ptr %85, align 4, !tbaa !26
  %87 = call noundef i32 @_ZN4voro9voro_base8step_divEii(ptr noundef nonnull align 8 dereferenceable(80) %28, i32 noundef %84, i32 noundef %86)
  %88 = load i32, ptr %19, align 4, !tbaa !11
  %89 = add nsw i32 %88, %87
  store i32 %89, ptr %19, align 4, !tbaa !11
  br label %90

90:                                               ; preds = %83, %78
  br label %91

91:                                               ; preds = %90, %67
  %92 = getelementptr inbounds %"class.voro::container_base", ptr %28, i32 0, i32 11
  %93 = load i8, ptr %92, align 2, !tbaa !27, !range !20, !noundef !21
  %94 = trunc i8 %93 to i1
  br i1 %94, label %95, label %115

95:                                               ; preds = %91
  %96 = getelementptr inbounds %"struct.voro::particle_record", ptr %25, i32 0, i32 4
  %97 = load i32, ptr %96, align 4, !tbaa !28
  %98 = load i32, ptr %23, align 4, !tbaa !11
  %99 = add nsw i32 %98, %97
  store i32 %99, ptr %23, align 4, !tbaa !11
  %100 = load i32, ptr %23, align 4, !tbaa !11
  %101 = icmp slt i32 %100, 0
  br i1 %101, label %107, label %102

102:                                              ; preds = %95
  %103 = load i32, ptr %23, align 4, !tbaa !11
  %104 = getelementptr inbounds %"class.voro::voro_base", ptr %28, i32 0, i32 2
  %105 = load i32, ptr %104, align 8, !tbaa !29
  %106 = icmp sge i32 %103, %105
  br i1 %106, label %107, label %114

107:                                              ; preds = %102, %95
  %108 = load i32, ptr %23, align 4, !tbaa !11
  %109 = getelementptr inbounds %"class.voro::voro_base", ptr %28, i32 0, i32 2
  %110 = load i32, ptr %109, align 8, !tbaa !29
  %111 = call noundef i32 @_ZN4voro9voro_base8step_divEii(ptr noundef nonnull align 8 dereferenceable(80) %28, i32 noundef %108, i32 noundef %110)
  %112 = load i32, ptr %20, align 4, !tbaa !11
  %113 = add nsw i32 %112, %111
  store i32 %113, ptr %20, align 4, !tbaa !11
  br label %114

114:                                              ; preds = %107, %102
  br label %115

115:                                              ; preds = %114, %91
  %116 = getelementptr inbounds %"class.voro::container_base", ptr %28, i32 0, i32 14
  %117 = load ptr, ptr %116, align 8, !tbaa !30
  %118 = getelementptr inbounds %"struct.voro::particle_record", ptr %25, i32 0, i32 0
  %119 = load i32, ptr %118, align 4, !tbaa !13
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds ptr, ptr %117, i64 %120
  %122 = load ptr, ptr %121, align 8, !tbaa !5
  %123 = getelementptr inbounds %"struct.voro::particle_record", ptr %25, i32 0, i32 1
  %124 = load i32, ptr %123, align 4, !tbaa !31
  %125 = mul nsw i32 4, %124
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds double, ptr %122, i64 %126
  %128 = load double, ptr %127, align 8, !tbaa !9
  %129 = load i32, ptr %18, align 4, !tbaa !11
  %130 = sitofp i32 %129 to double
  %131 = getelementptr inbounds %"class.voro::container_base", ptr %28, i32 0, i32 4
  %132 = load double, ptr %131, align 8, !tbaa !32
  %133 = getelementptr inbounds %"class.voro::container_base", ptr %28, i32 0, i32 3
  %134 = load double, ptr %133, align 8, !tbaa !33
  %135 = fsub double %132, %134
  %136 = call double @llvm.fmuladd.f64(double %130, double %135, double %128)
  %137 = load ptr, ptr %14, align 8, !tbaa !5
  store double %136, ptr %137, align 8, !tbaa !9
  %138 = getelementptr inbounds %"class.voro::container_base", ptr %28, i32 0, i32 14
  %139 = load ptr, ptr %138, align 8, !tbaa !30
  %140 = getelementptr inbounds %"struct.voro::particle_record", ptr %25, i32 0, i32 0
  %141 = load i32, ptr %140, align 4, !tbaa !13
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds ptr, ptr %139, i64 %142
  %144 = load ptr, ptr %143, align 8, !tbaa !5
  %145 = getelementptr inbounds %"struct.voro::particle_record", ptr %25, i32 0, i32 1
  %146 = load i32, ptr %145, align 4, !tbaa !31
  %147 = mul nsw i32 4, %146
  %148 = add nsw i32 %147, 1
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds double, ptr %144, i64 %149
  %151 = load double, ptr %150, align 8, !tbaa !9
  %152 = load i32, ptr %19, align 4, !tbaa !11
  %153 = sitofp i32 %152 to double
  %154 = getelementptr inbounds %"class.voro::container_base", ptr %28, i32 0, i32 6
  %155 = load double, ptr %154, align 8, !tbaa !34
  %156 = getelementptr inbounds %"class.voro::container_base", ptr %28, i32 0, i32 5
  %157 = load double, ptr %156, align 8, !tbaa !35
  %158 = fsub double %155, %157
  %159 = call double @llvm.fmuladd.f64(double %153, double %158, double %151)
  %160 = load ptr, ptr %15, align 8, !tbaa !5
  store double %159, ptr %160, align 8, !tbaa !9
  %161 = getelementptr inbounds %"class.voro::container_base", ptr %28, i32 0, i32 14
  %162 = load ptr, ptr %161, align 8, !tbaa !30
  %163 = getelementptr inbounds %"struct.voro::particle_record", ptr %25, i32 0, i32 0
  %164 = load i32, ptr %163, align 4, !tbaa !13
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds ptr, ptr %162, i64 %165
  %167 = load ptr, ptr %166, align 8, !tbaa !5
  %168 = getelementptr inbounds %"struct.voro::particle_record", ptr %25, i32 0, i32 1
  %169 = load i32, ptr %168, align 4, !tbaa !31
  %170 = mul nsw i32 4, %169
  %171 = add nsw i32 %170, 2
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds double, ptr %167, i64 %172
  %174 = load double, ptr %173, align 8, !tbaa !9
  %175 = load i32, ptr %20, align 4, !tbaa !11
  %176 = sitofp i32 %175 to double
  %177 = getelementptr inbounds %"class.voro::container_base", ptr %28, i32 0, i32 8
  %178 = load double, ptr %177, align 8, !tbaa !36
  %179 = getelementptr inbounds %"class.voro::container_base", ptr %28, i32 0, i32 7
  %180 = load double, ptr %179, align 8, !tbaa !37
  %181 = fsub double %178, %180
  %182 = call double @llvm.fmuladd.f64(double %176, double %181, double %174)
  %183 = load ptr, ptr %16, align 8, !tbaa !5
  store double %182, ptr %183, align 8, !tbaa !9
  %184 = getelementptr inbounds %"class.voro::container_base", ptr %28, i32 0, i32 13
  %185 = load ptr, ptr %184, align 8, !tbaa !38
  %186 = getelementptr inbounds %"struct.voro::particle_record", ptr %25, i32 0, i32 0
  %187 = load i32, ptr %186, align 4, !tbaa !13
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds ptr, ptr %185, i64 %188
  %190 = load ptr, ptr %189, align 8, !tbaa !5
  %191 = getelementptr inbounds %"struct.voro::particle_record", ptr %25, i32 0, i32 1
  %192 = load i32, ptr %191, align 4, !tbaa !31
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds i32, ptr %190, i64 %193
  %195 = load i32, ptr %194, align 4, !tbaa !11
  %196 = load ptr, ptr %17, align 8, !tbaa !5
  store i32 %195, ptr %196, align 4, !tbaa !11
  store i1 true, ptr %9, align 1
  store i32 1, ptr %27, align 4
  br label %198

197:                                              ; preds = %31
  store i1 false, ptr %9, align 1
  store i32 1, ptr %27, align 4
  br label %198

198:                                              ; preds = %197, %115, %30
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 20, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  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
  %199 = load i1, ptr %9, align 1
  ret i1 %199
}

declare void @_ZN4voro12voro_computeINS_14container_polyEE17find_voronoi_cellEdddiiiiRNS_15particle_recordERd(ptr noundef nonnull align 8 dereferenceable(160), double noundef, double noundef, double noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(20), ptr noundef nonnull align 8 dereferenceable(8)) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { "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 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 0}
!14 = !{!"_ZTSN4voro15particle_recordE", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16}
!15 = !{!16, !19, i64 160}
!16 = !{!"_ZTSN4voro14container_baseE", !17, i64 0, !18, i64 80, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !19, i64 160, !19, i64 161, !19, i64 162, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !12, i64 200}
!17 = !{!"_ZTSN4voro9voro_baseE", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !6, i64 72}
!18 = !{!"_ZTSN4voro9wall_listE", !6, i64 0, !6, i64 8, !6, i64 16, !12, i64 24}
!19 = !{!"bool", !7, i64 0}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = !{!14, !12, i64 8}
!23 = !{!17, !12, i64 0}
!24 = !{!16, !19, i64 161}
!25 = !{!14, !12, i64 12}
!26 = !{!17, !12, i64 4}
!27 = !{!16, !19, i64 162}
!28 = !{!14, !12, i64 16}
!29 = !{!17, !12, i64 8}
!30 = !{!16, !6, i64 176}
!31 = !{!14, !12, i64 4}
!32 = !{!16, !10, i64 120}
!33 = !{!16, !10, i64 112}
!34 = !{!16, !10, i64 136}
!35 = !{!16, !10, i64 128}
!36 = !{!16, !10, i64 152}
!37 = !{!16, !10, i64 144}
!38 = !{!16, !6, i64 168}


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

%"struct.voro::particle_record" = type { i32, i32, i32, i32, i32 }

; 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: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4voro14container_base5remapERiS1_S1_S1_S1_S1_RdS2_S2_S1_(ptr noundef nonnull align 8 dereferenceable(204), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4voro14container_poly17find_voronoi_cellEdddRdS1_S1_Ri(ptr noundef nonnull align 8 dereferenceable(408) %0, double noundef %1, double noundef %2, double noundef %3, ptr nocapture noundef nonnull writeonly align 8 dereferenceable(8) %4, ptr nocapture noundef nonnull writeonly align 8 dereferenceable(8) %5, ptr nocapture noundef nonnull writeonly align 8 dereferenceable(8) %6, ptr nocapture noundef nonnull writeonly align 4 dereferenceable(4) %7) local_unnamed_addr #4 align 2 {
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %"struct.voro::particle_record", align 4
  %20 = alloca double, align 8
  store double %1, ptr %9, align 8, !tbaa !5
  store double %2, ptr %10, align 8, !tbaa !5
  store double %3, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #6
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %19) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #6
  %21 = call noundef zeroext i1 @_ZN4voro14container_base5remapERiS1_S1_S1_S1_S1_RdS2_S2_S1_(ptr noundef nonnull align 8 dereferenceable(204) %0, ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(4) %18)
  br i1 %21, label %22, label %131

22:                                               ; preds = %8
  %23 = getelementptr inbounds i8, ptr %0, i64 248
  %24 = load double, ptr %9, align 8, !tbaa !5
  %25 = load double, ptr %10, align 8, !tbaa !5
  %26 = load double, ptr %11, align 8, !tbaa !5
  %27 = load i32, ptr %15, align 4, !tbaa !9
  %28 = load i32, ptr %16, align 4, !tbaa !9
  %29 = load i32, ptr %17, align 4, !tbaa !9
  %30 = load i32, ptr %18, align 4, !tbaa !9
  call void @_ZN4voro12voro_computeINS_14container_polyEE17find_voronoi_cellEdddiiiiRNS_15particle_recordERd(ptr noundef nonnull align 8 dereferenceable(160) %23, double noundef %24, double noundef %25, double noundef %26, i32 noundef %27, i32 noundef %28, i32 noundef %29, i32 noundef %30, ptr noundef nonnull align 4 dereferenceable(20) %19, ptr noundef nonnull align 8 dereferenceable(8) %20)
  %31 = load i32, ptr %19, align 4, !tbaa !11
  %.not = icmp eq i32 %31, -1
  br i1 %.not, label %131, label %32

32:                                               ; preds = %22
  %33 = getelementptr inbounds i8, ptr %0, i64 160
  %34 = load i8, ptr %33, align 8, !tbaa !13, !range !19, !noundef !20
  %35 = trunc nuw i8 %34 to i1
  br i1 %35, label %36, label %47

36:                                               ; preds = %32
  %37 = getelementptr inbounds i8, ptr %19, i64 8
  %38 = load i32, ptr %37, align 4, !tbaa !21
  %39 = load i32, ptr %15, align 4, !tbaa !9
  %40 = add nsw i32 %39, %38
  store i32 %40, ptr %15, align 4, !tbaa !9
  %41 = icmp sgt i32 %40, -1
  %42 = load i32, ptr %0, align 8
  %.not9 = icmp slt i32 %40, %42
  %or.cond = select i1 %41, i1 %.not9, i1 false
  br i1 %or.cond, label %47, label %43

43:                                               ; preds = %36
  %44 = call noundef i32 @_ZN4voro9voro_base8step_divEii(ptr noundef nonnull align 8 dereferenceable(80) %0, i32 noundef %40, i32 noundef %42)
  %45 = load i32, ptr %12, align 4, !tbaa !9
  %46 = add nsw i32 %45, %44
  store i32 %46, ptr %12, align 4, !tbaa !9
  br label %47

47:                                               ; preds = %36, %43, %32
  %48 = getelementptr inbounds i8, ptr %0, i64 161
  %49 = load i8, ptr %48, align 1, !tbaa !22, !range !19, !noundef !20
  %50 = trunc nuw i8 %49 to i1
  br i1 %50, label %51, label %63

51:                                               ; preds = %47
  %52 = getelementptr inbounds i8, ptr %19, i64 12
  %53 = load i32, ptr %52, align 4, !tbaa !23
  %54 = load i32, ptr %16, align 4, !tbaa !9
  %55 = add nsw i32 %54, %53
  store i32 %55, ptr %16, align 4, !tbaa !9
  %56 = icmp sgt i32 %55, -1
  %57 = getelementptr inbounds i8, ptr %0, i64 4
  %58 = load i32, ptr %57, align 4
  %.not10 = icmp slt i32 %55, %58
  %or.cond13 = select i1 %56, i1 %.not10, i1 false
  br i1 %or.cond13, label %63, label %59

59:                                               ; preds = %51
  %60 = call noundef i32 @_ZN4voro9voro_base8step_divEii(ptr noundef nonnull align 8 dereferenceable(80) %0, i32 noundef %55, i32 noundef %58)
  %61 = load i32, ptr %13, align 4, !tbaa !9
  %62 = add nsw i32 %61, %60
  store i32 %62, ptr %13, align 4, !tbaa !9
  br label %63

63:                                               ; preds = %51, %59, %47
  %64 = getelementptr inbounds i8, ptr %0, i64 162
  %65 = load i8, ptr %64, align 2, !tbaa !24, !range !19, !noundef !20
  %66 = trunc nuw i8 %65 to i1
  br i1 %66, label %67, label %79

67:                                               ; preds = %63
  %68 = getelementptr inbounds i8, ptr %19, i64 16
  %69 = load i32, ptr %68, align 4, !tbaa !25
  %70 = load i32, ptr %17, align 4, !tbaa !9
  %71 = add nsw i32 %70, %69
  store i32 %71, ptr %17, align 4, !tbaa !9
  %72 = icmp sgt i32 %71, -1
  %73 = getelementptr inbounds i8, ptr %0, i64 8
  %74 = load i32, ptr %73, align 8
  %.not11 = icmp slt i32 %71, %74
  %or.cond15 = select i1 %72, i1 %.not11, i1 false
  br i1 %or.cond15, label %79, label %75

75:                                               ; preds = %67
  %76 = call noundef i32 @_ZN4voro9voro_base8step_divEii(ptr noundef nonnull align 8 dereferenceable(80) %0, i32 noundef %71, i32 noundef %74)
  %77 = load i32, ptr %14, align 4, !tbaa !9
  %78 = add nsw i32 %77, %76
  store i32 %78, ptr %14, align 4, !tbaa !9
  br label %79

79:                                               ; preds = %67, %75, %63
  %80 = getelementptr inbounds i8, ptr %0, i64 176
  %81 = load ptr, ptr %80, align 8, !tbaa !26
  %82 = load i32, ptr %19, align 4, !tbaa !11
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds ptr, ptr %81, i64 %83
  %85 = load ptr, ptr %84, align 8, !tbaa !27
  %86 = getelementptr inbounds i8, ptr %19, i64 4
  %87 = load i32, ptr %86, align 4, !tbaa !28
  %88 = shl nsw i32 %87, 2
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds double, ptr %85, i64 %89
  %91 = load double, ptr %90, align 8, !tbaa !5
  %92 = load i32, ptr %12, align 4, !tbaa !9
  %93 = sitofp i32 %92 to double
  %94 = getelementptr inbounds i8, ptr %0, i64 120
  %95 = load double, ptr %94, align 8, !tbaa !29
  %96 = getelementptr inbounds i8, ptr %0, i64 112
  %97 = load double, ptr %96, align 8, !tbaa !30
  %98 = fsub double %95, %97
  %99 = call double @llvm.fmuladd.f64(double %93, double %98, double %91)
  store double %99, ptr %4, align 8, !tbaa !5
  %100 = or disjoint i32 %88, 1
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds double, ptr %85, i64 %101
  %103 = load double, ptr %102, align 8, !tbaa !5
  %104 = load i32, ptr %13, align 4, !tbaa !9
  %105 = sitofp i32 %104 to double
  %106 = getelementptr inbounds i8, ptr %0, i64 136
  %107 = load double, ptr %106, align 8, !tbaa !31
  %108 = getelementptr inbounds i8, ptr %0, i64 128
  %109 = load double, ptr %108, align 8, !tbaa !32
  %110 = fsub double %107, %109
  %111 = call double @llvm.fmuladd.f64(double %105, double %110, double %103)
  store double %111, ptr %5, align 8, !tbaa !5
  %112 = or disjoint i32 %88, 2
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds double, ptr %85, i64 %113
  %115 = load double, ptr %114, align 8, !tbaa !5
  %116 = load i32, ptr %14, align 4, !tbaa !9
  %117 = sitofp i32 %116 to double
  %118 = getelementptr inbounds i8, ptr %0, i64 152
  %119 = load double, ptr %118, align 8, !tbaa !33
  %120 = getelementptr inbounds i8, ptr %0, i64 144
  %121 = load double, ptr %120, align 8, !tbaa !34
  %122 = fsub double %119, %121
  %123 = call double @llvm.fmuladd.f64(double %117, double %122, double %115)
  store double %123, ptr %6, align 8, !tbaa !5
  %124 = getelementptr inbounds i8, ptr %0, i64 168
  %125 = load ptr, ptr %124, align 8, !tbaa !35
  %126 = getelementptr inbounds ptr, ptr %125, i64 %83
  %127 = load ptr, ptr %126, align 8, !tbaa !27
  %128 = sext i32 %87 to i64
  %129 = getelementptr inbounds i32, ptr %127, i64 %128
  %130 = load i32, ptr %129, align 4, !tbaa !9
  store i32 %130, ptr %7, align 4, !tbaa !9
  br label %131

131:                                              ; preds = %22, %8, %79
  %.0 = phi i1 [ true, %79 ], [ false, %8 ], [ false, %22 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #6
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #6
  ret i1 %.0
}

declare void @_ZN4voro12voro_computeINS_14container_polyEE17find_voronoi_cellEdddiiiiRNS_15particle_recordERd(ptr noundef nonnull align 8 dereferenceable(160), double noundef, double noundef, double noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(20), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { "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 = !{!"double", !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 0}
!12 = !{!"_ZTSN4voro15particle_recordE", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16}
!13 = !{!14, !18, i64 160}
!14 = !{!"_ZTSN4voro14container_baseE", !15, i64 0, !17, i64 80, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !18, i64 160, !18, i64 161, !18, i64 162, !16, i64 168, !16, i64 176, !16, i64 184, !16, i64 192, !10, i64 200}
!15 = !{!"_ZTSN4voro9voro_baseE", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !16, i64 72}
!16 = !{!"any pointer", !7, i64 0}
!17 = !{!"_ZTSN4voro9wall_listE", !16, i64 0, !16, i64 8, !16, i64 16, !10, i64 24}
!18 = !{!"bool", !7, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!12, !10, i64 8}
!22 = !{!14, !18, i64 161}
!23 = !{!12, !10, i64 12}
!24 = !{!14, !18, i64 162}
!25 = !{!12, !10, i64 16}
!26 = !{!14, !16, i64 176}
!27 = !{!16, !16, i64 0}
!28 = !{!12, !10, i64 4}
!29 = !{!14, !6, i64 120}
!30 = !{!14, !6, i64 112}
!31 = !{!14, !6, i64 136}
!32 = !{!14, !6, i64 128}
!33 = !{!14, !6, i64 152}
!34 = !{!14, !6, i64 144}
!35 = !{!14, !16, i64 168}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass