; LLVM IR from SourangshuGhosh/Fluid-Simulation-for-Computer-Graphics :: src (anisotropicparticlemesher)

; 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.AnisotropicParticleMesher::SurfaceParticle" = type { %"class.vmath::vec3", %struct.GridPointReference, i32 }
%"class.vmath::vec3" = type { float, float, float }
%struct.GridPointReference = type { i32 }
%class.AnisotropicParticleMesher = type { double, double, double, double, double, double, double, double, i32, double, i32, double, i32, i32, i32, double, i32, double, %class.SpatialPointGrid, %class.FragmentedVector, %class.FragmentedVector.10, %class.FragmentedVector.10, %class.FragmentedVector.16, %class.ScalarField, i32, i32, i32, [4 x i8], %class.Array3d.22 }
%class.SpatialPointGrid = type { i32, i32, i32, double, %"class.std::vector", %"class.std::vector.0", %class.Array3d, %class.AABB }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<GridPoint, std::allocator<GridPoint>>::_Vector_impl" }
%"struct.std::_Vector_base<GridPoint, std::allocator<GridPoint>>::_Vector_impl" = type { %"struct.std::_Vector_base<GridPoint, std::allocator<GridPoint>>::_Vector_impl_data" }
%"struct.std::_Vector_base<GridPoint, std::allocator<GridPoint>>::_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<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.Array3d = type { i32, i32, i32, ptr, i8, %"struct.SpatialPointGrid::CellNode", i32 }
%"struct.SpatialPointGrid::CellNode" = type { i32, i32 }
%class.AABB = type { %"class.vmath::vec3", double, double, double }
%class.FragmentedVector = type { %"class.std::vector.5", i32, i32, double, i32, i32 }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<FragmentedVector<AnisotropicParticleMesher::SurfaceParticle>::VectorNode, std::allocator<FragmentedVector<AnisotropicParticleMesher::SurfaceParticle>::VectorNode>>::_Vector_impl" }
%"struct.std::_Vector_base<FragmentedVector<AnisotropicParticleMesher::SurfaceParticle>::VectorNode, std::allocator<FragmentedVector<AnisotropicParticleMesher::SurfaceParticle>::VectorNode>>::_Vector_impl" = type { %"struct.std::_Vector_base<FragmentedVector<AnisotropicParticleMesher::SurfaceParticle>::VectorNode, std::allocator<FragmentedVector<AnisotropicParticleMesher::SurfaceParticle>::VectorNode>>::_Vector_impl_data" }
%"struct.std::_Vector_base<FragmentedVector<AnisotropicParticleMesher::SurfaceParticle>::VectorNode, std::allocator<FragmentedVector<AnisotropicParticleMesher::SurfaceParticle>::VectorNode>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.FragmentedVector.10 = type { %"class.std::vector.11", i32, i32, double, i32, i32 }
%"class.std::vector.11" = type { %"struct.std::_Vector_base.12" }
%"struct.std::_Vector_base.12" = type { %"struct.std::_Vector_base<FragmentedVector<GridPointReference>::VectorNode, std::allocator<FragmentedVector<GridPointReference>::VectorNode>>::_Vector_impl" }
%"struct.std::_Vector_base<FragmentedVector<GridPointReference>::VectorNode, std::allocator<FragmentedVector<GridPointReference>::VectorNode>>::_Vector_impl" = type { %"struct.std::_Vector_base<FragmentedVector<GridPointReference>::VectorNode, std::allocator<FragmentedVector<GridPointReference>::VectorNode>>::_Vector_impl_data" }
%"struct.std::_Vector_base<FragmentedVector<GridPointReference>::VectorNode, std::allocator<FragmentedVector<GridPointReference>::VectorNode>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.FragmentedVector.16 = type { %"class.std::vector.17", i32, i32, double, i32, i32 }
%"class.std::vector.17" = type { %"struct.std::_Vector_base.18" }
%"struct.std::_Vector_base.18" = type { %"struct.std::_Vector_base<FragmentedVector<vmath::vec3>::VectorNode, std::allocator<FragmentedVector<vmath::vec3>::VectorNode>>::_Vector_impl" }
%"struct.std::_Vector_base<FragmentedVector<vmath::vec3>::VectorNode, std::allocator<FragmentedVector<vmath::vec3>::VectorNode>>::_Vector_impl" = type { %"struct.std::_Vector_base<FragmentedVector<vmath::vec3>::VectorNode, std::allocator<FragmentedVector<vmath::vec3>::VectorNode>>::_Vector_impl_data" }
%"struct.std::_Vector_base<FragmentedVector<vmath::vec3>::VectorNode, std::allocator<FragmentedVector<vmath::vec3>::VectorNode>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.ScalarField = type { i32, i32, i32, double, double, double, double, double, double, double, double, i8, [7 x i8], %class.Array3d.22, %class.Array3d.23, %class.Array3d.22, %class.Array3d.23, i8, %"class.vmath::vec3" }
%class.Array3d.23 = type { i32, i32, i32, ptr, i8, i8, i32 }
%class.Array3d.22 = type <{ i32, i32, i32, [4 x i8], ptr, i8, [3 x i8], float, i32, [4 x i8] }>

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: nounwind
declare void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN25AnisotropicParticleMesher15SurfaceParticleD2Ev(ptr noundef nonnull align 4 dereferenceable(20)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN25AnisotropicParticleMesher39_updateNearFarSurfaceParticleReferencesER8LevelSet(ptr noundef nonnull align 8 dereferenceable(784) %0, ptr noundef nonnull align 8 dereferenceable(448) %1) #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"struct.AnisotropicParticleMesher::SurfaceParticle", align 4
  %6 = alloca i8, align 1
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.vmath::vec3", align 4
  %11 = alloca %struct.GridPointReference, align 4
  %12 = alloca %struct.GridPointReference, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %13 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 20, ptr %5) #6
  call void @_ZN25AnisotropicParticleMesher15SurfaceParticleC2Ev(ptr noundef nonnull align 4 dereferenceable(20) %5)
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %14

14:                                               ; preds = %53, %2
  %15 = load i32, ptr %7, align 4, !tbaa !9
  %16 = getelementptr inbounds %class.AnisotropicParticleMesher, ptr %13, i32 0, i32 19
  %17 = invoke noundef i32 @_ZN16FragmentedVectorIN25AnisotropicParticleMesher15SurfaceParticleEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %16)
          to label %18 unwind label %21

18:                                               ; preds = %14
  %19 = icmp ult i32 %15, %17
  br i1 %19, label %25, label %20

20:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %57

21:                                               ; preds = %46, %36, %25, %14
  %22 = landingpad { ptr, i32 }
          cleanup
  %23 = extractvalue { ptr, i32 } %22, 0
  store ptr %23, ptr %8, align 8
  %24 = extractvalue { ptr, i32 } %22, 1
  store i32 %24, ptr %9, align 4
  br label %56

25:                                               ; preds = %18
  %26 = getelementptr inbounds %class.AnisotropicParticleMesher, ptr %13, i32 0, i32 19
  %27 = load i32, ptr %7, align 4, !tbaa !9
  %28 = invoke noundef nonnull align 4 dereferenceable(20) ptr @_ZN16FragmentedVectorIN25AnisotropicParticleMesher15SurfaceParticleEEixEi(ptr noundef nonnull align 8 dereferenceable(48) %26, i32 noundef %27)
          to label %29 unwind label %21

29:                                               ; preds = %25
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %5, ptr align 4 %28, i64 20, i1 false), !tbaa.struct !11
  %30 = getelementptr inbounds %"struct.AnisotropicParticleMesher::SurfaceParticle", ptr %5, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %10, ptr align 4 %30, i64 12, i1 false), !tbaa.struct !14
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = invoke noundef signext i8 @_ZN25AnisotropicParticleMesher24_getParticleLocationTypeEN5vmath4vec3ER8LevelSet(ptr noundef nonnull align 8 dereferenceable(784) %13, ptr noundef %10, ptr noundef nonnull align 8 dereferenceable(448) %31)
          to label %33 unwind label %42

33:                                               ; preds = %29
  store i8 %32, ptr %6, align 1, !tbaa !15
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %10) #6
  %34 = load i8, ptr %6, align 1, !tbaa !15
  %35 = icmp eq i8 %34, 1
  br i1 %35, label %36, label %46

36:                                               ; preds = %33
  %37 = getelementptr inbounds %class.AnisotropicParticleMesher, ptr %13, i32 0, i32 20
  %38 = getelementptr inbounds %"struct.AnisotropicParticleMesher::SurfaceParticle", ptr %5, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 4 %38, i64 4, i1 false), !tbaa.struct !17
  %39 = getelementptr inbounds %struct.GridPointReference, ptr %11, i32 0, i32 0
  %40 = load i32, ptr %39, align 4
  invoke void @_ZN16FragmentedVectorI18GridPointReferenceE9push_backES0_(ptr noundef nonnull align 8 dereferenceable(48) %37, i32 %40)
          to label %41 unwind label %21

41:                                               ; preds = %36
  br label %52

42:                                               ; preds = %29
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %8, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %9, align 4
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %10) #6
  br label %56

46:                                               ; preds = %33
  %47 = getelementptr inbounds %class.AnisotropicParticleMesher, ptr %13, i32 0, i32 21
  %48 = getelementptr inbounds %"struct.AnisotropicParticleMesher::SurfaceParticle", ptr %5, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 4 %48, i64 4, i1 false), !tbaa.struct !17
  %49 = getelementptr inbounds %struct.GridPointReference, ptr %12, i32 0, i32 0
  %50 = load i32, ptr %49, align 4
  invoke void @_ZN16FragmentedVectorI18GridPointReferenceE9push_backES0_(ptr noundef nonnull align 8 dereferenceable(48) %47, i32 %50)
          to label %51 unwind label %21

51:                                               ; preds = %46
  br label %52

52:                                               ; preds = %51, %41
  br label %53

53:                                               ; preds = %52
  %54 = load i32, ptr %7, align 4, !tbaa !9
  %55 = add i32 %54, 1
  store i32 %55, ptr %7, align 4, !tbaa !9
  br label %14, !llvm.loop !18

56:                                               ; preds = %42, %21
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #6
  call void @_ZN25AnisotropicParticleMesher15SurfaceParticleD2Ev(ptr noundef nonnull align 4 dereferenceable(20) %5) #6
  call void @llvm.lifetime.end.p0(i64 20, ptr %5) #6
  br label %58

57:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #6
  call void @_ZN25AnisotropicParticleMesher15SurfaceParticleD2Ev(ptr noundef nonnull align 4 dereferenceable(20) %5) #6
  call void @llvm.lifetime.end.p0(i64 20, ptr %5) #6
  ret void

58:                                               ; preds = %56
  %59 = load ptr, ptr %8, align 8
  %60 = load i32, ptr %9, align 4
  %61 = insertvalue { ptr, i32 } poison, ptr %59, 0
  %62 = insertvalue { ptr, i32 } %61, i32 %60, 1
  resume { ptr, i32 } %62
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN16FragmentedVectorIN25AnisotropicParticleMesher15SurfaceParticleEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(20) ptr @_ZN16FragmentedVectorIN25AnisotropicParticleMesher15SurfaceParticleEEixEi(ptr noundef nonnull align 8 dereferenceable(48), i32 noundef) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef signext i8 @_ZN25AnisotropicParticleMesher24_getParticleLocationTypeEN5vmath4vec3ER8LevelSet(ptr noundef nonnull align 8 dereferenceable(784), ptr noundef, ptr noundef nonnull align 8 dereferenceable(448)) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN25AnisotropicParticleMesher15SurfaceParticleC2Ev(ptr noundef nonnull align 4 dereferenceable(20)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN16FragmentedVectorI18GridPointReferenceE9push_backES0_(ptr noundef nonnull align 8 dereferenceable(48), i32) #5 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{i64 0, i64 4, !12, i64 4, i64 4, !12, i64 8, i64 4, !12, i64 12, i64 4, !9, i64 16, i64 4, !9}
!12 = !{!13, !13, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = !{i64 0, i64 4, !12, i64 4, i64 4, !12, i64 8, i64 4, !12}
!15 = !{!16, !16, i64 0}
!16 = !{!"_ZTSN25AnisotropicParticleMesher16ParticleLocationE", !7, i64 0}
!17 = !{i64 0, i64 4, !9}
!18 = distinct !{!18, !19}
!19 = !{!"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"

%"struct.AnisotropicParticleMesher::SurfaceParticle" = type { %"class.vmath::vec3", %struct.GridPointReference, i32 }
%"class.vmath::vec3" = type { float, float, float }
%struct.GridPointReference = type { i32 }

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: nounwind
declare void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN25AnisotropicParticleMesher15SurfaceParticleD2Ev(ptr noundef nonnull align 4 dereferenceable(20)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN25AnisotropicParticleMesher39_updateNearFarSurfaceParticleReferencesER8LevelSet(ptr noundef nonnull align 8 dereferenceable(784) %0, ptr noundef nonnull align 8 dereferenceable(448) %1) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"struct.AnisotropicParticleMesher::SurfaceParticle", align 4
  %4 = alloca %"class.vmath::vec3", align 4
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %3) #6
  call void @_ZN25AnisotropicParticleMesher15SurfaceParticleC2Ev(ptr noundef nonnull align 4 dereferenceable(20) %3)
  %5 = getelementptr inbounds i8, ptr %0, i64 288
  %6 = call noundef i32 @_ZN16FragmentedVectorIN25AnisotropicParticleMesher15SurfaceParticleEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %5)
  %.not = icmp eq i32 %6, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %2
  %7 = getelementptr inbounds i8, ptr %3, i64 12
  br label %10

._crit_edge:                                      ; preds = %17, %2
  call void @_ZN25AnisotropicParticleMesher15SurfaceParticleD2Ev(ptr noundef nonnull align 4 dereferenceable(20) %3) #6
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %3) #6
  ret void

8:                                                ; preds = %.invoke, %10
  %9 = landingpad { ptr, i32 }
          cleanup
  br label %21

10:                                               ; preds = %.lr.ph, %17
  %.011 = phi i32 [ 0, %.lr.ph ], [ %18, %17 ]
  %11 = invoke noundef nonnull align 4 dereferenceable(20) ptr @_ZN16FragmentedVectorIN25AnisotropicParticleMesher15SurfaceParticleEEixEi(ptr noundef nonnull align 8 dereferenceable(48) %5, i32 noundef %.011)
          to label %12 unwind label %8

12:                                               ; preds = %10
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(20) %3, ptr noundef nonnull align 4 dereferenceable(20) %11, i64 20, i1 false), !tbaa.struct !5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %4, ptr noundef nonnull align 4 dereferenceable(12) %11, i64 12, i1 false)
  %13 = invoke noundef signext i8 @_ZN25AnisotropicParticleMesher24_getParticleLocationTypeEN5vmath4vec3ER8LevelSet(ptr noundef nonnull align 8 dereferenceable(784) %0, ptr noundef nonnull %4, ptr noundef nonnull align 8 dereferenceable(448) %1)
          to label %.invoke unwind label %15

.invoke:                                          ; preds = %12
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %4) #6
  %14 = icmp eq i8 %13, 1
  %.sroa.01.0.copyload = load i32, ptr %7, align 4, !tbaa !10
  %..v = select i1 %14, i64 336, i64 384
  %. = getelementptr inbounds i8, ptr %0, i64 %..v
  invoke void @_ZN16FragmentedVectorI18GridPointReferenceE9push_backES0_(ptr noundef nonnull align 8 dereferenceable(48) %., i32 %.sroa.01.0.copyload)
          to label %17 unwind label %8

15:                                               ; preds = %12
  %16 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %4) #6
  br label %21

17:                                               ; preds = %.invoke
  %18 = add nuw i32 %.011, 1
  %19 = call noundef i32 @_ZN16FragmentedVectorIN25AnisotropicParticleMesher15SurfaceParticleEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %5)
  %20 = icmp ult i32 %18, %19
  br i1 %20, label %10, label %._crit_edge, !llvm.loop !12

21:                                               ; preds = %15, %8
  %.pn = phi { ptr, i32 } [ %9, %8 ], [ %16, %15 ]
  call void @_ZN25AnisotropicParticleMesher15SurfaceParticleD2Ev(ptr noundef nonnull align 4 dereferenceable(20) %3) #6
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN16FragmentedVectorIN25AnisotropicParticleMesher15SurfaceParticleEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(20) ptr @_ZN16FragmentedVectorIN25AnisotropicParticleMesher15SurfaceParticleEEixEi(ptr noundef nonnull align 8 dereferenceable(48), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef signext i8 @_ZN25AnisotropicParticleMesher24_getParticleLocationTypeEN5vmath4vec3ER8LevelSet(ptr noundef nonnull align 8 dereferenceable(784), ptr noundef, ptr noundef nonnull align 8 dereferenceable(448)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN25AnisotropicParticleMesher15SurfaceParticleC2Ev(ptr noundef nonnull align 4 dereferenceable(20)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN16FragmentedVectorI18GridPointReferenceE9push_backES0_(ptr noundef nonnull align 8 dereferenceable(48), i32) local_unnamed_addr #5 align 2

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,SROAPass,SimplifyCFGPass