; LLVM IR from atlantis13579/Riemann :: Src/Geometry (Voronoi3)

; 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::voro_compute" = 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::c_loop_all" = type { %"class.voro::c_loop_base.base", [4 x i8] }
%"class.voro::c_loop_base.base" = type <{ i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, i32, i32, i32, i32, i32 }>
%"class.voro::voronoicell_neighbor" = type { %"class.voro::voronoicell_base", ptr, ptr, ptr, ptr }
%"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 }
%"class.Riemann::Voronoi3" = type { i64, ptr, %"class.std::vector", %"class.Maths::TAABB3", %"class.std::vector.0", %"class.std::vector.5", %"class.std::vector.10", %"class.std::vector" }
%"class.Maths::TAABB3" = type { %"class.Maths::TVector3", %"class.Maths::TVector3" }
%"class.Maths::TVector3" = type { float, float, float }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<Riemann::Voronoi3::Plane, std::allocator<Riemann::Voronoi3::Plane>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::Voronoi3::Plane, std::allocator<Riemann::Voronoi3::Plane>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::Voronoi3::Plane, std::allocator<Riemann::Voronoi3::Plane>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::Voronoi3::Plane, std::allocator<Riemann::Voronoi3::Plane>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Maths::TVector3<float>, std::allocator<Maths::TVector3<float>>>::_Vector_impl" }
%"struct.std::_Vector_base<Maths::TVector3<float>, std::allocator<Maths::TVector3<float>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Maths::TVector3<float>, std::allocator<Maths::TVector3<float>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Maths::TVector3<float>, std::allocator<Maths::TVector3<float>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4voro9container12make_computeEv(ptr dead_on_unwind noalias writable sret(%"class.voro::voro_compute") align 8, ptr noundef nonnull align 8 dereferenceable(204)) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4voro10c_loop_allC2INS_9containerEEERT_(ptr noundef nonnull align 8 dereferenceable(68), ptr noundef nonnull align 8 dereferenceable(204)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4voro20voronoicell_neighborC2Ev(ptr noundef nonnull align 8 dereferenceable(192)) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4voro10c_loop_all5startEv(ptr noundef nonnull align 8 dereferenceable(68)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK4voro9container12compute_cellINS_20voronoicell_neighborENS_10c_loop_allEEEbRT_RT0_RNS_12voro_computeIS0_EE(ptr noundef nonnull align 8 dereferenceable(204), ptr noundef nonnull align 8 dereferenceable(192), ptr noundef nonnull align 8 dereferenceable(68), ptr noundef nonnull align 8 dereferenceable(160)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4voro11c_loop_base3pidEv(ptr noundef nonnull align 8 dereferenceable(68)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN4voro10c_loop_all3incEv(ptr noundef nonnull align 8 dereferenceable(68)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4voro20voronoicell_neighborD2Ev(ptr noundef nonnull align 8 dereferenceable(192)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Riemann8Voronoi319ComputeAllNeighborsERSt6vectorIS1_IiSaIiEESaIS3_EEbb(ptr noundef nonnull align 8 dereferenceable(160) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i1 noundef zeroext %2, i1 noundef zeroext %3) #1 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i8, align 1
  %8 = alloca i8, align 1
  %9 = alloca %"class.voro::voro_compute", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.voro::c_loop_all", align 8
  %13 = alloca %"class.voro::voronoicell_neighbor", align 8
  %14 = alloca i8, align 1
  %15 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  %16 = zext i1 %2 to i8
  store i8 %16, ptr %7, align 1, !tbaa !9
  %17 = zext i1 %3 to i8
  store i8 %17, ptr %8, align 1, !tbaa !9
  %18 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 160, ptr %9) #5
  %19 = getelementptr inbounds %"class.Riemann::Voronoi3", ptr %18, i32 0, i32 1
  %20 = load ptr, ptr %19, align 8, !tbaa !11
  call void @_ZNK4voro9container12make_computeEv(ptr dead_on_unwind writable sret(%"class.voro::voro_compute") align 8 %9, ptr noundef nonnull align 8 dereferenceable(204) %20)
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = getelementptr inbounds %"class.Riemann::Voronoi3", ptr %18, i32 0, i32 0
  %23 = load i64, ptr %22, align 8, !tbaa !33
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %23)
          to label %24 unwind label %50

24:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 72, ptr %12) #5
  %25 = getelementptr inbounds %"class.Riemann::Voronoi3", ptr %18, i32 0, i32 1
  %26 = load ptr, ptr %25, align 8, !tbaa !11
  invoke void @_ZN4voro10c_loop_allC2INS_9containerEEERT_(ptr noundef nonnull align 8 dereferenceable(68) %12, ptr noundef nonnull align 8 dereferenceable(204) %26)
          to label %27 unwind label %54

27:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 192, ptr %13) #5
  invoke void @_ZN4voro20voronoicell_neighborC2Ev(ptr noundef nonnull align 8 dereferenceable(192) %13)
          to label %28 unwind label %58

28:                                               ; preds = %27
  %29 = invoke noundef zeroext i1 @_ZN4voro10c_loop_all5startEv(ptr noundef nonnull align 8 dereferenceable(68) %12)
          to label %30 unwind label %62

30:                                               ; preds = %28
  br i1 %29, label %31, label %80

31:                                               ; preds = %30
  br label %32

32:                                               ; preds = %77, %31
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #5
  %33 = getelementptr inbounds %"class.Riemann::Voronoi3", ptr %18, i32 0, i32 1
  %34 = load ptr, ptr %33, align 8, !tbaa !11
  %35 = invoke noundef zeroext i1 @_ZNK4voro9container12compute_cellINS_20voronoicell_neighborENS_10c_loop_allEEEbRT_RT0_RNS_12voro_computeIS0_EE(ptr noundef nonnull align 8 dereferenceable(204) %34, ptr noundef nonnull align 8 dereferenceable(192) %13, ptr noundef nonnull align 8 dereferenceable(68) %12, ptr noundef nonnull align 8 dereferenceable(160) %9)
          to label %36 unwind label %66

36:                                               ; preds = %32
  %37 = zext i1 %35 to i8
  store i8 %37, ptr %14, align 1, !tbaa !9
  %38 = load i8, ptr %14, align 1, !tbaa !9, !range !34, !noundef !35
  %39 = trunc i8 %38 to i1
  br i1 %39, label %40, label %74

40:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %41 = invoke noundef i32 @_ZN4voro11c_loop_base3pidEv(ptr noundef nonnull align 8 dereferenceable(68) %12)
          to label %42 unwind label %70

42:                                               ; preds = %40
  store i32 %41, ptr %15, align 4, !tbaa !36
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  %44 = load i32, ptr %15, align 4, !tbaa !36
  %45 = sext i32 %44 to i64
  %46 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef %45) #5
  %47 = load i8, ptr %7, align 1, !tbaa !9, !range !34, !noundef !35
  %48 = trunc i8 %47 to i1
  invoke void @_ZN4voro20voronoicell_neighbor15neighborsTArrayERSt6vectorIiSaIiEEb(ptr noundef nonnull align 8 dereferenceable(192) %13, ptr noundef nonnull align 8 dereferenceable(24) %46, i1 noundef zeroext %48)
          to label %49 unwind label %70

49:                                               ; preds = %42
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %74

50:                                               ; preds = %4
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %10, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %11, align 4
  br label %84

54:                                               ; preds = %24
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %10, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %11, align 4
  br label %83

58:                                               ; preds = %27
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %10, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %11, align 4
  br label %82

62:                                               ; preds = %75, %28
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %10, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %11, align 4
  br label %81

66:                                               ; preds = %32
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %10, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %11, align 4
  br label %79

70:                                               ; preds = %42, %40
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %10, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %79

74:                                               ; preds = %49, %36
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  br label %75

75:                                               ; preds = %74
  %76 = invoke noundef zeroext i1 @_ZN4voro10c_loop_all3incEv(ptr noundef nonnull align 8 dereferenceable(68) %12)
          to label %77 unwind label %62

77:                                               ; preds = %75
  br i1 %76, label %32, label %78, !llvm.loop !38

78:                                               ; preds = %77
  br label %80

79:                                               ; preds = %70, %66
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  br label %81

80:                                               ; preds = %78, %30
  call void @_ZN4voro20voronoicell_neighborD2Ev(ptr noundef nonnull align 8 dereferenceable(192) %13) #5
  call void @llvm.lifetime.end.p0(i64 192, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr %12) #5
  call void @_ZN4voro12voro_computeINS_9containerEED2Ev(ptr noundef nonnull align 8 dereferenceable(160) %9) #5
  call void @llvm.lifetime.end.p0(i64 160, ptr %9) #5
  ret void

81:                                               ; preds = %79, %62
  call void @_ZN4voro20voronoicell_neighborD2Ev(ptr noundef nonnull align 8 dereferenceable(192) %13) #5
  br label %82

82:                                               ; preds = %81, %58
  call void @llvm.lifetime.end.p0(i64 192, ptr %13) #5
  br label %83

83:                                               ; preds = %82, %54
  call void @llvm.lifetime.end.p0(i64 72, ptr %12) #5
  br label %84

84:                                               ; preds = %83, %50
  call void @_ZN4voro12voro_computeINS_9containerEED2Ev(ptr noundef nonnull align 8 dereferenceable(160) %9) #5
  call void @llvm.lifetime.end.p0(i64 160, ptr %9) #5
  br label %85

85:                                               ; preds = %84
  %86 = load ptr, ptr %10, align 8
  %87 = load i32, ptr %11, align 4
  %88 = insertvalue { ptr, i32 } poison, ptr %86, 0
  %89 = insertvalue { ptr, i32 } %88, i32 %87, 1
  resume { ptr, i32 } %89
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4voro20voronoicell_neighbor15neighborsTArrayERSt6vectorIiSaIiEEb(ptr noundef nonnull align 8 dereferenceable(192), ptr noundef nonnull align 8 dereferenceable(24), i1 noundef zeroext) #1 align 2

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !6, i64 8}
!12 = !{!"_ZTSN7Riemann8Voronoi3E", !13, i64 0, !6, i64 8, !14, i64 16, !18, i64 40, !21, i64 64, !25, i64 88, !29, i64 112, !14, i64 136}
!13 = !{!"long", !7, i64 0}
!14 = !{!"_ZTSSt6vectorIN5Maths8TVector3IfEESaIS2_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIN5Maths8TVector3IfEESaIS2_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIN5Maths8TVector3IfEESaIS2_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIN5Maths8TVector3IfEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!"_ZTSN5Maths6TAABB3IfEE", !19, i64 0, !19, i64 12}
!19 = !{!"_ZTSN5Maths8TVector3IfEE", !20, i64 0, !20, i64 4, !20, i64 8}
!20 = !{!"float", !7, i64 0}
!21 = !{!"_ZTSSt6vectorIN7Riemann8Voronoi35PlaneESaIS2_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIN7Riemann8Voronoi35PlaneESaIS2_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIN7Riemann8Voronoi35PlaneESaIS2_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIN7Riemann8Voronoi35PlaneESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{!"_ZTSSt6vectorISt4pairIiiESaIS1_EE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseISt4pairIiiESaIS1_EE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseISt4pairIiiESaIS1_EE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseISt4pairIiiESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!29 = !{!"_ZTSSt6vectorIS_IiSaIiEESaIS1_EE", !30, i64 0}
!30 = !{!"_ZTSSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE12_Vector_implE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!33 = !{!12, !13, i64 0}
!34 = !{i8 0, i8 2}
!35 = !{}
!36 = !{!37, !37, i64 0}
!37 = !{!"int", !7, i64 0}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.mustprogress"}


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

%"class.voro::voro_compute" = 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::c_loop_all" = type { %"class.voro::c_loop_base.base", [4 x i8] }
%"class.voro::c_loop_base.base" = type <{ i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, i32, i32, i32, i32, i32 }>
%"class.voro::voronoicell_neighbor" = type { %"class.voro::voronoicell_base", ptr, ptr, ptr, ptr }
%"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: 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4voro9container12make_computeEv(ptr dead_on_unwind noalias writable sret(%"class.voro::voro_compute") align 8, ptr noundef nonnull align 8 dereferenceable(204)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4voro10c_loop_allC2INS_9containerEEERT_(ptr noundef nonnull align 8 dereferenceable(68), ptr noundef nonnull align 8 dereferenceable(204)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4voro20voronoicell_neighborC2Ev(ptr noundef nonnull align 8 dereferenceable(192)) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4voro10c_loop_all5startEv(ptr noundef nonnull align 8 dereferenceable(68)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK4voro9container12compute_cellINS_20voronoicell_neighborENS_10c_loop_allEEEbRT_RT0_RNS_12voro_computeIS0_EE(ptr noundef nonnull align 8 dereferenceable(204), ptr noundef nonnull align 8 dereferenceable(192), ptr noundef nonnull align 8 dereferenceable(68), ptr noundef nonnull align 8 dereferenceable(160)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4voro11c_loop_base3pidEv(ptr noundef nonnull align 8 dereferenceable(68)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN4voro10c_loop_all3incEv(ptr noundef nonnull align 8 dereferenceable(68)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4voro20voronoicell_neighborD2Ev(ptr noundef nonnull align 8 dereferenceable(192)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Riemann8Voronoi319ComputeAllNeighborsERSt6vectorIS1_IiSaIiEESaIS3_EEbb(ptr nocapture noundef nonnull readonly align 8 dereferenceable(160) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i1 noundef zeroext %2, i1 noundef zeroext %3) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.voro::voro_compute", align 8
  %6 = alloca %"class.voro::c_loop_all", align 8
  %7 = alloca %"class.voro::voronoicell_neighbor", align 8
  call void @llvm.lifetime.start.p0(i64 160, ptr nonnull %5) #5
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZNK4voro9container12make_computeEv(ptr dead_on_unwind nonnull writable sret(%"class.voro::voro_compute") align 8 %5, ptr noundef nonnull align 8 dereferenceable(204) %9)
  %10 = load i64, ptr %0, align 8, !tbaa !30
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %10)
          to label %11 unwind label %24

11:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %6) #5
  %12 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZN4voro10c_loop_allC2INS_9containerEEERT_(ptr noundef nonnull align 8 dereferenceable(68) %6, ptr noundef nonnull align 8 dereferenceable(204) %12)
          to label %13 unwind label %26

13:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 192, ptr nonnull %7) #5
  invoke void @_ZN4voro20voronoicell_neighborC2Ev(ptr noundef nonnull align 8 dereferenceable(192) %7)
          to label %14 unwind label %28

14:                                               ; preds = %13
  %15 = invoke noundef zeroext i1 @_ZN4voro10c_loop_all5startEv(ptr noundef nonnull align 8 dereferenceable(68) %6)
          to label %16 unwind label %30

16:                                               ; preds = %14
  br i1 %15, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %16, %36
  %17 = load ptr, ptr %8, align 8, !tbaa !5
  %18 = invoke noundef zeroext i1 @_ZNK4voro9container12compute_cellINS_20voronoicell_neighborENS_10c_loop_allEEEbRT_RT0_RNS_12voro_computeIS0_EE(ptr noundef nonnull align 8 dereferenceable(204) %17, ptr noundef nonnull align 8 dereferenceable(192) %7, ptr noundef nonnull align 8 dereferenceable(68) %6, ptr noundef nonnull align 8 dereferenceable(160) %5)
          to label %19 unwind label %32

19:                                               ; preds = %.preheader
  br i1 %18, label %20, label %36

20:                                               ; preds = %19
  %21 = call noundef i32 @_ZN4voro11c_loop_base3pidEv(ptr noundef nonnull align 8 dereferenceable(68) %6)
  %22 = sext i32 %21 to i64
  %23 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %22) #5
  invoke void @_ZN4voro20voronoicell_neighbor15neighborsTArrayERSt6vectorIiSaIiEEb(ptr noundef nonnull align 8 dereferenceable(192) %7, ptr noundef nonnull align 8 dereferenceable(24) %23, i1 noundef zeroext %2)
          to label %36 unwind label %34

24:                                               ; preds = %4
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %41

26:                                               ; preds = %11
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %40

28:                                               ; preds = %13
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %39

30:                                               ; preds = %14
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %38

32:                                               ; preds = %.preheader
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %38

34:                                               ; preds = %20
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %38

36:                                               ; preds = %20, %19
  %37 = call noundef zeroext i1 @_ZN4voro10c_loop_all3incEv(ptr noundef nonnull align 8 dereferenceable(68) %6)
  br i1 %37, label %.preheader, label %.loopexit, !llvm.loop !31

.loopexit:                                        ; preds = %36, %16
  call void @_ZN4voro20voronoicell_neighborD2Ev(ptr noundef nonnull align 8 dereferenceable(192) %7) #5
  call void @llvm.lifetime.end.p0(i64 192, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %6) #5
  call void @_ZN4voro12voro_computeINS_9containerEED2Ev(ptr noundef nonnull align 8 dereferenceable(160) %5) #5
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %5) #5
  ret void

38:                                               ; preds = %32, %34, %30
  %.pn.pn = phi { ptr, i32 } [ %31, %30 ], [ %35, %34 ], [ %33, %32 ]
  call void @_ZN4voro20voronoicell_neighborD2Ev(ptr noundef nonnull align 8 dereferenceable(192) %7) #5
  br label %39

39:                                               ; preds = %38, %28
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %38 ], [ %29, %28 ]
  call void @llvm.lifetime.end.p0(i64 192, ptr nonnull %7) #5
  br label %40

40:                                               ; preds = %39, %26
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %39 ], [ %27, %26 ]
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %6) #5
  br label %41

41:                                               ; preds = %40, %24
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %40 ], [ %25, %24 ]
  call void @_ZN4voro12voro_computeINS_9containerEED2Ev(ptr noundef nonnull align 8 dereferenceable(160) %5) #5
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %5) #5
  resume { ptr, i32 } %.pn.pn.pn.pn.pn
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4voro20voronoicell_neighbor15neighborsTArrayERSt6vectorIiSaIiEEb(ptr noundef nonnull align 8 dereferenceable(192), ptr noundef nonnull align 8 dereferenceable(24), i1 noundef zeroext) local_unnamed_addr #1 align 2

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 8}
!6 = !{!"_ZTSN7Riemann8Voronoi3E", !7, i64 0, !10, i64 8, !11, i64 16, !15, i64 40, !18, i64 64, !22, i64 88, !26, i64 112, !11, i64 136}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_ZTSSt6vectorIN5Maths8TVector3IfEESaIS2_EE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseIN5Maths8TVector3IfEESaIS2_EE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIN5Maths8TVector3IfEESaIS2_EE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIN5Maths8TVector3IfEESaIS2_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!15 = !{!"_ZTSN5Maths6TAABB3IfEE", !16, i64 0, !16, i64 12}
!16 = !{!"_ZTSN5Maths8TVector3IfEE", !17, i64 0, !17, i64 4, !17, i64 8}
!17 = !{!"float", !8, i64 0}
!18 = !{!"_ZTSSt6vectorIN7Riemann8Voronoi35PlaneESaIS2_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIN7Riemann8Voronoi35PlaneESaIS2_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIN7Riemann8Voronoi35PlaneESaIS2_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIN7Riemann8Voronoi35PlaneESaIS2_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!22 = !{!"_ZTSSt6vectorISt4pairIiiESaIS1_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseISt4pairIiiESaIS1_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseISt4pairIiiESaIS1_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseISt4pairIiiESaIS1_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!26 = !{!"_ZTSSt6vectorIS_IiSaIiEESaIS1_EE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!30 = !{!6, !7, i64 0}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass