; LLVM IR from atlantis13579/Riemann :: Src/Destruction (VoronoiTessellation)

; 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.Riemann::Voronoi3" = type { i64, ptr, %"class.std::vector.0", %"class.Maths::TAABB3", %"class.std::vector.5", %"class.std::vector.10", %"class.std::vector.15", %"class.std::vector.0" }
%"class.Maths::TAABB3" = type { %"class.Maths::TVector3", %"class.Maths::TVector3" }
%"class.Maths::TVector3" = type { float, float, float }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = 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.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = 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.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = 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.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = 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 }
%"class.Riemann::VoronoiMesh" = type <{ %"class.std::vector", i8, [3 x i8], i32, i32, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Riemann::DynamicMesh *, std::allocator<Riemann::DynamicMesh *>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::DynamicMesh *, std::allocator<Riemann::DynamicMesh *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::DynamicMesh *, std::allocator<Riemann::DynamicMesh *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::DynamicMesh *, std::allocator<Riemann::DynamicMesh *>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Riemann11VoronoiMeshC2ERKSt6vectorIN5Maths8TVector3IfEESaIS4_EERKNS2_6TAABB3IfEEf(ptr noundef nonnull align 8 dereferenceable(36) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(24) %2, float noundef %3) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca float, align 4
  %9 = alloca %"class.Riemann::Voronoi3", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca i8, align 1
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store float %3, ptr %8, align 4, !tbaa !9
  %15 = load ptr, ptr %5, align 8
  %16 = getelementptr inbounds %"class.Riemann::VoronoiMesh", ptr %15, i32 0, i32 0
  call void @_ZNSt6vectorIPN7Riemann11DynamicMeshESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #7
  %17 = getelementptr inbounds %"class.Riemann::VoronoiMesh", ptr %15, i32 0, i32 1
  store i8 1, ptr %17, align 8, !tbaa !11
  %18 = getelementptr inbounds %"class.Riemann::VoronoiMesh", ptr %15, i32 0, i32 3
  store i32 -1, ptr %18, align 4, !tbaa !19
  %19 = getelementptr inbounds %"class.Riemann::VoronoiMesh", ptr %15, i32 0, i32 4
  store i32 1, ptr %19, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 160, ptr %9) #7
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  %22 = load float, ptr %8, align 4, !tbaa !9
  invoke void @_ZN7Riemann8Voronoi3C1ERKSt6vectorIN5Maths8TVector3IfEESaIS4_EERKNS2_6TAABB3IfEEf(ptr noundef nonnull align 8 dereferenceable(160) %9, ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 4 dereferenceable(24) %21, float noundef %22)
          to label %23 unwind label %37

23:                                               ; preds = %4
  invoke void @_ZN7Riemann8Voronoi35BuildEv(ptr noundef nonnull align 8 dereferenceable(160) %9)
          to label %24 unwind label %41

24:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %25 = invoke noundef i32 @_ZNK7Riemann8Voronoi312GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(160) %9)
          to label %26 unwind label %45

26:                                               ; preds = %24
  store i32 %25, ptr %12, align 4, !tbaa !21
  %27 = getelementptr inbounds %"class.Riemann::VoronoiMesh", ptr %15, i32 0, i32 0
  %28 = load i32, ptr %12, align 4, !tbaa !21
  %29 = sext i32 %28 to i64
  invoke void @_ZNSt6vectorIPN7Riemann11DynamicMeshESaIS2_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef %29)
          to label %30 unwind label %45

30:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  store i64 0, ptr %13, align 8, !tbaa !22
  br label %31

31:                                               ; preds = %56, %30
  %32 = load i64, ptr %13, align 8, !tbaa !22
  %33 = load i32, ptr %12, align 4, !tbaa !21
  %34 = sext i32 %33 to i64
  %35 = icmp ult i64 %32, %34
  br i1 %35, label %49, label %36

36:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %68

37:                                               ; preds = %4
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %10, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %11, align 4
  br label %82

41:                                               ; preds = %23
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %10, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %11, align 4
  br label %81

45:                                               ; preds = %71, %68, %26, %24
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %10, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %11, align 4
  br label %80

49:                                               ; preds = %31
  %50 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 456) #8
          to label %51 unwind label %59

51:                                               ; preds = %49
  invoke void @_ZN7Riemann11DynamicMeshC1Ev(ptr noundef nonnull align 8 dereferenceable(452) %50)
          to label %52 unwind label %63

52:                                               ; preds = %51
  %53 = getelementptr inbounds %"class.Riemann::VoronoiMesh", ptr %15, i32 0, i32 0
  %54 = load i64, ptr %13, align 8, !tbaa !22
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN7Riemann11DynamicMeshESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef %54) #7
  store ptr %50, ptr %55, align 8, !tbaa !5
  br label %56

56:                                               ; preds = %52
  %57 = load i64, ptr %13, align 8, !tbaa !22
  %58 = add i64 %57, 1
  store i64 %58, ptr %13, align 8, !tbaa !22
  br label %31, !llvm.loop !24

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

63:                                               ; preds = %51
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %10, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %11, align 4
  call void @_ZdlPvm(ptr noundef %50, i64 noundef 456) #9
  br label %67

67:                                               ; preds = %63, %59
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %80

68:                                               ; preds = %36
  %69 = invoke noundef zeroext i1 @_ZNK7Riemann8Voronoi315IsInfinitePlaneEv(ptr noundef nonnull align 8 dereferenceable(160) %9)
          to label %70 unwind label %45

70:                                               ; preds = %68
  br i1 %69, label %71, label %73

71:                                               ; preds = %70
  invoke void @_ZN7Riemann11VoronoiMesh21BuildMesh_SinglePlaneERKNS_8Voronoi3E(ptr noundef nonnull align 8 dereferenceable(36) %15, ptr noundef nonnull align 8 dereferenceable(160) %9)
          to label %72 unwind label %45

72:                                               ; preds = %71
  br label %79

73:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #7
  store i8 1, ptr %14, align 1, !tbaa !26
  invoke void @_ZN7Riemann11VoronoiMesh19BuildMesh_WithNoiseERKNS_8Voronoi3E(ptr noundef nonnull align 8 dereferenceable(36) %15, ptr noundef nonnull align 8 dereferenceable(160) %9)
          to label %74 unwind label %75

74:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #7
  br label %79

75:                                               ; preds = %73
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %10, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #7
  br label %80

79:                                               ; preds = %74, %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @_ZN7Riemann8Voronoi3D1Ev(ptr noundef nonnull align 8 dereferenceable(160) %9) #7
  call void @llvm.lifetime.end.p0(i64 160, ptr %9) #7
  ret void

80:                                               ; preds = %75, %67, %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %81

81:                                               ; preds = %80, %41
  call void @_ZN7Riemann8Voronoi3D1Ev(ptr noundef nonnull align 8 dereferenceable(160) %9) #7
  br label %82

82:                                               ; preds = %81, %37
  call void @llvm.lifetime.end.p0(i64 160, ptr %9) #7
  call void @_ZNSt6vectorIPN7Riemann11DynamicMeshESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #7
  br label %83

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

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

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

declare void @_ZN7Riemann8Voronoi3C1ERKSt6vectorIN5Maths8TVector3IfEESaIS4_EERKNS2_6TAABB3IfEEf(ptr noundef nonnull align 8 dereferenceable(160), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(24), float noundef) unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

declare void @_ZN7Riemann8Voronoi35BuildEv(ptr noundef nonnull align 8 dereferenceable(160)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7Riemann8Voronoi312GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(160)) #1 align 2

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #4

declare void @_ZN7Riemann11DynamicMeshC1Ev(ptr noundef nonnull align 8 dereferenceable(452)) unnamed_addr #3

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #5

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK7Riemann8Voronoi315IsInfinitePlaneEv(ptr noundef nonnull align 8 dereferenceable(160)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7Riemann11VoronoiMesh21BuildMesh_SinglePlaneERKNS_8Voronoi3E(ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(160)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7Riemann11VoronoiMesh19BuildMesh_WithNoiseERKNS_8Voronoi3E(ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(160)) #1 align 2

; Function Attrs: nounwind
declare void @_ZN7Riemann8Voronoi3D1Ev(ptr noundef nonnull align 8 dereferenceable(160)) unnamed_addr #6

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !17, i64 24}
!12 = !{!"_ZTSN7Riemann11VoronoiMeshE", !13, i64 0, !17, i64 24, !18, i64 28, !18, i64 32}
!13 = !{!"_ZTSSt6vectorIPN7Riemann11DynamicMeshESaIS2_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIPN7Riemann11DynamicMeshESaIS2_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIPN7Riemann11DynamicMeshESaIS2_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIPN7Riemann11DynamicMeshESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"int", !7, i64 0}
!19 = !{!12, !18, i64 28}
!20 = !{!12, !18, i64 32}
!21 = !{!18, !18, i64 0}
!22 = !{!23, !23, i64 0}
!23 = !{!"long", !7, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!17, !17, i64 0}


; 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.Riemann::Voronoi3" = type { i64, ptr, %"class.std::vector.0", %"class.Maths::TAABB3", %"class.std::vector.5", %"class.std::vector.10", %"class.std::vector.15", %"class.std::vector.0" }
%"class.Maths::TAABB3" = type { %"class.Maths::TVector3", %"class.Maths::TVector3" }
%"class.Maths::TVector3" = type { float, float, float }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = 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.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = 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.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = 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.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = 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: mustprogress uwtable
define dso_local void @_ZN7Riemann11VoronoiMeshC2ERKSt6vectorIN5Maths8TVector3IfEESaIS4_EERKNS2_6TAABB3IfEEf(ptr noundef nonnull align 8 dereferenceable(36) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(24) %2, float noundef %3) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.Riemann::Voronoi3", align 8
  tail call void @_ZNSt6vectorIPN7Riemann11DynamicMeshESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  %6 = getelementptr inbounds i8, ptr %0, i64 24
  store i8 1, ptr %6, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 28
  store i32 -1, ptr %7, align 4, !tbaa !16
  %8 = getelementptr inbounds i8, ptr %0, i64 32
  store i32 1, ptr %8, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 160, ptr nonnull %5) #7
  invoke void @_ZN7Riemann8Voronoi3C1ERKSt6vectorIN5Maths8TVector3IfEESaIS4_EERKNS2_6TAABB3IfEEf(ptr noundef nonnull align 8 dereferenceable(160) %5, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(24) %2, float noundef %3)
          to label %9 unwind label %14

9:                                                ; preds = %4
  invoke void @_ZN7Riemann8Voronoi35BuildEv(ptr noundef nonnull align 8 dereferenceable(160) %5)
          to label %10 unwind label %16

10:                                               ; preds = %9
  %11 = call noundef i32 @_ZNK7Riemann8Voronoi312GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(160) %5)
  %12 = sext i32 %11 to i64
  invoke void @_ZNSt6vectorIPN7Riemann11DynamicMeshESaIS2_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %12)
          to label %.preheader unwind label %18

.preheader:                                       ; preds = %10
  %.not = icmp eq i32 %11, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %22, %.preheader
  %13 = call noundef zeroext i1 @_ZNK7Riemann8Voronoi315IsInfinitePlaneEv(ptr noundef nonnull align 8 dereferenceable(160) %5)
  br i1 %13, label %29, label %30

14:                                               ; preds = %4
  %15 = landingpad { ptr, i32 }
          cleanup
  br label %33

16:                                               ; preds = %9
  %17 = landingpad { ptr, i32 }
          cleanup
  br label %32

18:                                               ; preds = %10
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %32

.lr.ph:                                           ; preds = %.preheader, %22
  %.01019 = phi i64 [ %24, %22 ], [ 0, %.preheader ]
  %20 = invoke noalias noundef nonnull dereferenceable(456) ptr @_Znwm(i64 noundef 456) #8
          to label %21 unwind label %25

21:                                               ; preds = %.lr.ph
  invoke void @_ZN7Riemann11DynamicMeshC1Ev(ptr noundef nonnull align 8 dereferenceable(452) %20)
          to label %22 unwind label %27

22:                                               ; preds = %21
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN7Riemann11DynamicMeshESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %.01019) #7
  store ptr %20, ptr %23, align 8, !tbaa !18
  %24 = add nuw i64 %.01019, 1
  %exitcond.not = icmp eq i64 %24, %12
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !19

25:                                               ; preds = %.lr.ph
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %32

27:                                               ; preds = %21
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %20, i64 noundef 456) #9
  br label %32

29:                                               ; preds = %._crit_edge
  call void @_ZN7Riemann11VoronoiMesh21BuildMesh_SinglePlaneERKNS_8Voronoi3E(ptr noundef nonnull align 8 dereferenceable(36) %0, ptr noundef nonnull align 8 dereferenceable(160) %5)
  br label %31

30:                                               ; preds = %._crit_edge
  call void @_ZN7Riemann11VoronoiMesh19BuildMesh_WithNoiseERKNS_8Voronoi3E(ptr noundef nonnull align 8 dereferenceable(36) %0, ptr noundef nonnull align 8 dereferenceable(160) %5)
  br label %31

31:                                               ; preds = %30, %29
  call void @_ZN7Riemann8Voronoi3D1Ev(ptr noundef nonnull align 8 dereferenceable(160) %5) #7
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %5) #7
  ret void

32:                                               ; preds = %18, %27, %25, %16
  %.pn.pn.pn = phi { ptr, i32 } [ %17, %16 ], [ %19, %18 ], [ %28, %27 ], [ %26, %25 ]
  call void @_ZN7Riemann8Voronoi3D1Ev(ptr noundef nonnull align 8 dereferenceable(160) %5) #7
  br label %33

33:                                               ; preds = %32, %14
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %32 ], [ %15, %14 ]
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %5) #7
  call void @_ZNSt6vectorIPN7Riemann11DynamicMeshESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  resume { ptr, i32 } %.pn.pn.pn.pn
}

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

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

declare void @_ZN7Riemann8Voronoi3C1ERKSt6vectorIN5Maths8TVector3IfEESaIS4_EERKNS2_6TAABB3IfEEf(ptr noundef nonnull align 8 dereferenceable(160), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(24), float noundef) unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

declare void @_ZN7Riemann8Voronoi35BuildEv(ptr noundef nonnull align 8 dereferenceable(160)) local_unnamed_addr #3

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #4

declare void @_ZN7Riemann11DynamicMeshC1Ev(ptr noundef nonnull align 8 dereferenceable(452)) unnamed_addr #3

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #5

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK7Riemann8Voronoi315IsInfinitePlaneEv(ptr noundef nonnull align 8 dereferenceable(160)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7Riemann11VoronoiMesh21BuildMesh_SinglePlaneERKNS_8Voronoi3E(ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(160)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7Riemann11VoronoiMesh19BuildMesh_WithNoiseERKNS_8Voronoi3E(ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(160)) local_unnamed_addr #1 align 2

; Function Attrs: nounwind
declare void @_ZN7Riemann8Voronoi3D1Ev(ptr noundef nonnull align 8 dereferenceable(160)) unnamed_addr #6

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "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 = { nobuiltin allocsize(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 = { nobuiltin 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin 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, !14, i64 24}
!6 = !{!"_ZTSN7Riemann11VoronoiMeshE", !7, i64 0, !14, i64 24, !15, i64 28, !15, i64 32}
!7 = !{!"_ZTSSt6vectorIPN7Riemann11DynamicMeshESaIS2_EE", !8, i64 0}
!8 = !{!"_ZTSSt12_Vector_baseIPN7Riemann11DynamicMeshESaIS2_EE", !9, i64 0}
!9 = !{!"_ZTSNSt12_Vector_baseIPN7Riemann11DynamicMeshESaIS2_EE12_Vector_implE", !10, i64 0}
!10 = !{!"_ZTSNSt12_Vector_baseIPN7Riemann11DynamicMeshESaIS2_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"bool", !12, i64 0}
!15 = !{!"int", !12, i64 0}
!16 = !{!6, !15, i64 28}
!17 = !{!6, !15, i64 32}
!18 = !{!11, !11, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}


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