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

%"class.std::vector.60" = type { %"struct.std::_Vector_base.61" }
%"struct.std::_Vector_base.61" = type { %"struct.std::_Vector_base<std::vector<GridPointReference>, std::allocator<std::vector<GridPointReference>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<GridPointReference>, std::allocator<std::vector<GridPointReference>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<GridPointReference>, std::allocator<std::vector<GridPointReference>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<GridPointReference>, std::allocator<std::vector<GridPointReference>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%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.vmath::vec3" = type { float, float, float }
%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] }>
%struct.GridPointReference = type { i32 }
%"struct.AnisotropicParticleMesher::SurfaceParticle" = type { %"class.vmath::vec3", %struct.GridPointReference, i32 }

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: mustprogress uwtable
define dso_local void @_ZN25AnisotropicParticleMesher34_updateSurfaceParticleComponentIDsEv(ptr noundef nonnull align 8 dereferenceable(784) %0) #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca double, align 8
  %4 = alloca %"class.std::vector.60", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %12 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  %13 = getelementptr inbounds %class.AnisotropicParticleMesher, ptr %12, i32 0, i32 0
  %14 = load double, ptr %13, align 8, !tbaa !9
  %15 = getelementptr inbounds %class.AnisotropicParticleMesher, ptr %12, i32 0, i32 7
  %16 = load double, ptr %15, align 8, !tbaa !46
  %17 = fmul double %14, %16
  store double %17, ptr %3, align 8, !tbaa !47
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #4
  call void @_ZNSt6vectorIS_I18GridPointReferenceSaIS0_EESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  %18 = getelementptr inbounds %class.AnisotropicParticleMesher, ptr %12, i32 0, i32 18
  %19 = load double, ptr %3, align 8, !tbaa !47
  invoke void @_ZN16SpatialPointGrid36getConnectedPointReferenceComponentsEdRSt6vectorIS0_I18GridPointReferenceSaIS1_EESaIS3_EE(ptr noundef nonnull align 8 dereferenceable(152) %18, double noundef %19, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %20 unwind label %27

20:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !48
  br label %21

21:                                               ; preds = %75, %20
  %22 = load i32, ptr %7, align 4, !tbaa !48
  %23 = zext i32 %22 to i64
  %24 = call noundef i64 @_ZNKSt6vectorIS_I18GridPointReferenceSaIS0_EESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  %25 = icmp ult i64 %23, %24
  br i1 %25, label %31, label %26

26:                                               ; preds = %21
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %78

27:                                               ; preds = %1
  %28 = landingpad { ptr, i32 }
          cleanup
  %29 = extractvalue { ptr, i32 } %28, 0
  store ptr %29, ptr %5, align 8
  %30 = extractvalue { ptr, i32 } %28, 1
  store i32 %30, ptr %6, align 4
  br label %79

31:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %32 = load i32, ptr %7, align 4, !tbaa !48
  store i32 %32, ptr %9, align 4, !tbaa !48
  %33 = load i32, ptr %7, align 4, !tbaa !48
  %34 = zext i32 %33 to i64
  %35 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_I18GridPointReferenceSaIS0_EESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %34) #4
  %36 = call noundef i64 @_ZNKSt6vectorI18GridPointReferenceSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %35) #4
  %37 = trunc i64 %36 to i32
  %38 = getelementptr inbounds %class.AnisotropicParticleMesher, ptr %12, i32 0, i32 8
  %39 = load i32, ptr %38, align 8, !tbaa !49
  %40 = icmp slt i32 %37, %39
  br i1 %40, label %41, label %42

41:                                               ; preds = %31
  store i32 -1, ptr %9, align 4, !tbaa !48
  br label %42

42:                                               ; preds = %41, %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !48
  br label %43

43:                                               ; preds = %67, %42
  %44 = load i32, ptr %10, align 4, !tbaa !48
  %45 = zext i32 %44 to i64
  %46 = load i32, ptr %7, align 4, !tbaa !48
  %47 = zext i32 %46 to i64
  %48 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_I18GridPointReferenceSaIS0_EESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %47) #4
  %49 = call noundef i64 @_ZNKSt6vectorI18GridPointReferenceSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %48) #4
  %50 = icmp ult i64 %45, %49
  br i1 %50, label %52, label %51

51:                                               ; preds = %43
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %74

52:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %53 = load i32, ptr %7, align 4, !tbaa !48
  %54 = zext i32 %53 to i64
  %55 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_I18GridPointReferenceSaIS0_EESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %54) #4
  %56 = load i32, ptr %10, align 4, !tbaa !48
  %57 = zext i32 %56 to i64
  %58 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI18GridPointReferenceSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %55, i64 noundef %57) #4
  %59 = getelementptr inbounds %struct.GridPointReference, ptr %58, i32 0, i32 0
  %60 = load i32, ptr %59, align 4, !tbaa !50
  store i32 %60, ptr %11, align 4, !tbaa !48
  %61 = load i32, ptr %9, align 4, !tbaa !48
  %62 = getelementptr inbounds %class.AnisotropicParticleMesher, ptr %12, i32 0, i32 19
  %63 = load i32, ptr %11, align 4, !tbaa !48
  %64 = invoke noundef nonnull align 4 dereferenceable(20) ptr @_ZN16FragmentedVectorIN25AnisotropicParticleMesher15SurfaceParticleEEixEi(ptr noundef nonnull align 8 dereferenceable(48) %62, i32 noundef %63)
          to label %65 unwind label %70

65:                                               ; preds = %52
  %66 = getelementptr inbounds %"struct.AnisotropicParticleMesher::SurfaceParticle", ptr %64, i32 0, i32 2
  store i32 %61, ptr %66, align 4, !tbaa !52
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %67

67:                                               ; preds = %65
  %68 = load i32, ptr %10, align 4, !tbaa !48
  %69 = add i32 %68, 1
  store i32 %69, ptr %10, align 4, !tbaa !48
  br label %43, !llvm.loop !54

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

74:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %75

75:                                               ; preds = %74
  %76 = load i32, ptr %7, align 4, !tbaa !48
  %77 = add i32 %76, 1
  store i32 %77, ptr %7, align 4, !tbaa !48
  br label %21, !llvm.loop !56

78:                                               ; preds = %26
  call void @_ZNSt6vectorIS_I18GridPointReferenceSaIS0_EESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  ret void

79:                                               ; preds = %70, %27
  call void @_ZNSt6vectorIS_I18GridPointReferenceSaIS0_EESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  br label %80

80:                                               ; preds = %79
  %81 = load ptr, ptr %5, align 8
  %82 = load i32, ptr %6, align 4
  %83 = insertvalue { ptr, i32 } poison, ptr %81, 0
  %84 = insertvalue { ptr, i32 } %83, i32 %82, 1
  resume { ptr, i32 } %84
}

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

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

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

declare void @_ZN16SpatialPointGrid36getConnectedPointReferenceComponentsEdRSt6vectorIS0_I18GridPointReferenceSaIS1_EESaIS3_EE(ptr noundef nonnull align 8 dereferenceable(152), double noundef, ptr noundef nonnull align 8 dereferenceable(24)) #3

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIS_I18GridPointReferenceSaIS0_EESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!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, !11, i64 0}
!10 = !{!"_ZTS25AnisotropicParticleMesher", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !12, i64 64, !11, i64 72, !12, i64 80, !11, i64 88, !12, i64 96, !12, i64 100, !12, i64 104, !11, i64 112, !12, i64 120, !11, i64 128, !13, i64 136, !28, i64 288, !33, i64 336, !33, i64 384, !38, i64 432, !43, i64 480, !12, i64 728, !12, i64 732, !12, i64 736, !44, i64 744}
!11 = !{!"double", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTS16SpatialPointGrid", !12, i64 0, !12, i64 4, !12, i64 8, !11, i64 16, !14, i64 24, !18, i64 48, !22, i64 72, !25, i64 112}
!14 = !{!"_ZTSSt6vectorI9GridPointSaIS0_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseI9GridPointSaIS0_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseI9GridPointSaIS0_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseI9GridPointSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!"_ZTSSt6vectorIiSaIiEE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!"_ZTS7Array3dIN16SpatialPointGrid8CellNodeEE", !12, i64 0, !12, i64 4, !12, i64 8, !6, i64 16, !23, i64 24, !24, i64 28, !12, i64 36}
!23 = !{!"bool", !7, i64 0}
!24 = !{!"_ZTSN16SpatialPointGrid8CellNodeE", !12, i64 0, !12, i64 4}
!25 = !{!"_ZTS4AABB", !26, i64 0, !11, i64 16, !11, i64 24, !11, i64 32}
!26 = !{!"_ZTSN5vmath4vec3E", !27, i64 0, !27, i64 4, !27, i64 8}
!27 = !{!"float", !7, i64 0}
!28 = !{!"_ZTS16FragmentedVectorIN25AnisotropicParticleMesher15SurfaceParticleEE", !29, i64 0, !12, i64 24, !12, i64 28, !11, i64 32, !12, i64 40, !12, i64 44}
!29 = !{!"_ZTSSt6vectorIN16FragmentedVectorIN25AnisotropicParticleMesher15SurfaceParticleEE10VectorNodeESaIS4_EE", !30, i64 0}
!30 = !{!"_ZTSSt12_Vector_baseIN16FragmentedVectorIN25AnisotropicParticleMesher15SurfaceParticleEE10VectorNodeESaIS4_EE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIN16FragmentedVectorIN25AnisotropicParticleMesher15SurfaceParticleEE10VectorNodeESaIS4_EE12_Vector_implE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIN16FragmentedVectorIN25AnisotropicParticleMesher15SurfaceParticleEE10VectorNodeESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!33 = !{!"_ZTS16FragmentedVectorI18GridPointReferenceE", !34, i64 0, !12, i64 24, !12, i64 28, !11, i64 32, !12, i64 40, !12, i64 44}
!34 = !{!"_ZTSSt6vectorIN16FragmentedVectorI18GridPointReferenceE10VectorNodeESaIS3_EE", !35, i64 0}
!35 = !{!"_ZTSSt12_Vector_baseIN16FragmentedVectorI18GridPointReferenceE10VectorNodeESaIS3_EE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseIN16FragmentedVectorI18GridPointReferenceE10VectorNodeESaIS3_EE12_Vector_implE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseIN16FragmentedVectorI18GridPointReferenceE10VectorNodeESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!38 = !{!"_ZTS16FragmentedVectorIN5vmath4vec3EE", !39, i64 0, !12, i64 24, !12, i64 28, !11, i64 32, !12, i64 40, !12, i64 44}
!39 = !{!"_ZTSSt6vectorIN16FragmentedVectorIN5vmath4vec3EE10VectorNodeESaIS4_EE", !40, i64 0}
!40 = !{!"_ZTSSt12_Vector_baseIN16FragmentedVectorIN5vmath4vec3EE10VectorNodeESaIS4_EE", !41, i64 0}
!41 = !{!"_ZTSNSt12_Vector_baseIN16FragmentedVectorIN5vmath4vec3EE10VectorNodeESaIS4_EE12_Vector_implE", !42, i64 0}
!42 = !{!"_ZTSNSt12_Vector_baseIN16FragmentedVectorIN5vmath4vec3EE10VectorNodeESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!43 = !{!"_ZTS11ScalarField", !12, i64 0, !12, i64 4, !12, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !23, i64 80, !44, i64 88, !45, i64 128, !44, i64 160, !45, i64 200, !23, i64 232, !26, i64 236}
!44 = !{!"_ZTS7Array3dIfE", !12, i64 0, !12, i64 4, !12, i64 8, !6, i64 16, !23, i64 24, !27, i64 28, !12, i64 32}
!45 = !{!"_ZTS7Array3dIbE", !12, i64 0, !12, i64 4, !12, i64 8, !6, i64 16, !23, i64 24, !23, i64 25, !12, i64 28}
!46 = !{!10, !11, i64 56}
!47 = !{!11, !11, i64 0}
!48 = !{!12, !12, i64 0}
!49 = !{!10, !12, i64 64}
!50 = !{!51, !12, i64 0}
!51 = !{!"_ZTS18GridPointReference", !12, i64 0}
!52 = !{!53, !12, i64 16}
!53 = !{!"_ZTSN25AnisotropicParticleMesher15SurfaceParticleE", !26, i64 0, !51, i64 12, !12, i64 16}
!54 = distinct !{!54, !55}
!55 = !{!"llvm.loop.mustprogress"}
!56 = distinct !{!56, !55}


; 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.std::vector.60" = type { %"struct.std::_Vector_base.61" }
%"struct.std::_Vector_base.61" = type { %"struct.std::_Vector_base<std::vector<GridPointReference>, std::allocator<std::vector<GridPointReference>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<GridPointReference>, std::allocator<std::vector<GridPointReference>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<GridPointReference>, std::allocator<std::vector<GridPointReference>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<GridPointReference>, std::allocator<std::vector<GridPointReference>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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 uwtable
define dso_local void @_ZN25AnisotropicParticleMesher34_updateSurfaceParticleComponentIDsEv(ptr noundef nonnull align 8 dereferenceable(784) %0) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::vector.60", align 8
  %3 = load double, ptr %0, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 56
  %5 = load double, ptr %4, align 8, !tbaa !45
  %6 = fmul double %3, %5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #4
  call void @_ZNSt6vectorIS_I18GridPointReferenceSaIS0_EESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  %7 = getelementptr inbounds i8, ptr %0, i64 136
  invoke void @_ZN16SpatialPointGrid36getConnectedPointReferenceComponentsEdRSt6vectorIS0_I18GridPointReferenceSaIS1_EESaIS3_EE(ptr noundef nonnull align 8 dereferenceable(152) %7, double noundef %6, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %.preheader unwind label %11

.preheader:                                       ; preds = %1
  %8 = call noundef i64 @_ZNKSt6vectorIS_I18GridPointReferenceSaIS0_EESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  %.not = icmp eq i64 %8, 0
  br i1 %.not, label %._crit_edge24, label %.lr.ph23

.lr.ph23:                                         ; preds = %.preheader
  %9 = getelementptr inbounds i8, ptr %0, i64 64
  %10 = getelementptr inbounds i8, ptr %0, i64 288
  br label %13

._crit_edge24:                                    ; preds = %._crit_edge, %.preheader
  call void @_ZNSt6vectorIS_I18GridPointReferenceSaIS0_EESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #4
  ret void

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

13:                                               ; preds = %.lr.ph23, %._crit_edge
  %14 = phi i64 [ 0, %.lr.ph23 ], [ %23, %._crit_edge ]
  %.01622 = phi i32 [ 0, %.lr.ph23 ], [ %22, %._crit_edge ]
  %15 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_I18GridPointReferenceSaIS0_EESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %14) #4
  %16 = call noundef i64 @_ZNKSt6vectorI18GridPointReferenceSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  %17 = trunc i64 %16 to i32
  %18 = load i32, ptr %9, align 8, !tbaa !46
  %19 = icmp sgt i32 %18, %17
  %spec.select = select i1 %19, i32 -1, i32 %.01622
  %20 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_I18GridPointReferenceSaIS0_EESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %14) #4
  %21 = call noundef i64 @_ZNKSt6vectorI18GridPointReferenceSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #4
  %.not25 = icmp eq i64 %21, 0
  br i1 %.not25, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %31, %13
  %22 = add i32 %.01622, 1
  %23 = zext i32 %22 to i64
  %24 = call noundef i64 @_ZNKSt6vectorIS_I18GridPointReferenceSaIS0_EESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  %25 = icmp ugt i64 %24, %23
  br i1 %25, label %13, label %._crit_edge24, !llvm.loop !47

.lr.ph:                                           ; preds = %13, %31
  %26 = phi i64 [ %34, %31 ], [ 0, %13 ]
  %.01421 = phi i32 [ %33, %31 ], [ 0, %13 ]
  %27 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_I18GridPointReferenceSaIS0_EESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %14) #4
  %28 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI18GridPointReferenceSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef %26) #4
  %29 = load i32, ptr %28, align 4, !tbaa !49
  %30 = invoke noundef nonnull align 4 dereferenceable(20) ptr @_ZN16FragmentedVectorIN25AnisotropicParticleMesher15SurfaceParticleEEixEi(ptr noundef nonnull align 8 dereferenceable(48) %10, i32 noundef %29)
          to label %31 unwind label %38

31:                                               ; preds = %.lr.ph
  %32 = getelementptr inbounds i8, ptr %30, i64 16
  store i32 %spec.select, ptr %32, align 4, !tbaa !51
  %33 = add i32 %.01421, 1
  %34 = zext i32 %33 to i64
  %35 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_I18GridPointReferenceSaIS0_EESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %14) #4
  %36 = call noundef i64 @_ZNKSt6vectorI18GridPointReferenceSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %35) #4
  %37 = icmp ugt i64 %36, %34
  br i1 %37, label %.lr.ph, label %._crit_edge, !llvm.loop !53

38:                                               ; preds = %.lr.ph
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %40

40:                                               ; preds = %38, %11
  %.pn = phi { ptr, i32 } [ %39, %38 ], [ %12, %11 ]
  call void @_ZNSt6vectorIS_I18GridPointReferenceSaIS0_EESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #4
  resume { ptr, i32 } %.pn
}

; 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 #1 align 2

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

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

declare void @_ZN16SpatialPointGrid36getConnectedPointReferenceComponentsEdRSt6vectorIS0_I18GridPointReferenceSaIS1_EESaIS3_EE(ptr noundef nonnull align 8 dereferenceable(152), double noundef, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIS_I18GridPointReferenceSaIS0_EESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTS25AnisotropicParticleMesher", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !10, i64 64, !7, i64 72, !10, i64 80, !7, i64 88, !10, i64 96, !10, i64 100, !10, i64 104, !7, i64 112, !10, i64 120, !7, i64 128, !11, i64 136, !27, i64 288, !32, i64 336, !32, i64 384, !37, i64 432, !42, i64 480, !10, i64 728, !10, i64 732, !10, i64 736, !43, i64 744}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_ZTS16SpatialPointGrid", !10, i64 0, !10, i64 4, !10, i64 8, !7, i64 16, !12, i64 24, !17, i64 48, !21, i64 72, !24, i64 112}
!12 = !{!"_ZTSSt6vectorI9GridPointSaIS0_EE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseI9GridPointSaIS0_EE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseI9GridPointSaIS0_EE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseI9GridPointSaIS0_EE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!16 = !{!"any pointer", !8, i64 0}
!17 = !{!"_ZTSSt6vectorIiSaIiEE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!21 = !{!"_ZTS7Array3dIN16SpatialPointGrid8CellNodeEE", !10, i64 0, !10, i64 4, !10, i64 8, !16, i64 16, !22, i64 24, !23, i64 28, !10, i64 36}
!22 = !{!"bool", !8, i64 0}
!23 = !{!"_ZTSN16SpatialPointGrid8CellNodeE", !10, i64 0, !10, i64 4}
!24 = !{!"_ZTS4AABB", !25, i64 0, !7, i64 16, !7, i64 24, !7, i64 32}
!25 = !{!"_ZTSN5vmath4vec3E", !26, i64 0, !26, i64 4, !26, i64 8}
!26 = !{!"float", !8, i64 0}
!27 = !{!"_ZTS16FragmentedVectorIN25AnisotropicParticleMesher15SurfaceParticleEE", !28, i64 0, !10, i64 24, !10, i64 28, !7, i64 32, !10, i64 40, !10, i64 44}
!28 = !{!"_ZTSSt6vectorIN16FragmentedVectorIN25AnisotropicParticleMesher15SurfaceParticleEE10VectorNodeESaIS4_EE", !29, i64 0}
!29 = !{!"_ZTSSt12_Vector_baseIN16FragmentedVectorIN25AnisotropicParticleMesher15SurfaceParticleEE10VectorNodeESaIS4_EE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIN16FragmentedVectorIN25AnisotropicParticleMesher15SurfaceParticleEE10VectorNodeESaIS4_EE12_Vector_implE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIN16FragmentedVectorIN25AnisotropicParticleMesher15SurfaceParticleEE10VectorNodeESaIS4_EE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!32 = !{!"_ZTS16FragmentedVectorI18GridPointReferenceE", !33, i64 0, !10, i64 24, !10, i64 28, !7, i64 32, !10, i64 40, !10, i64 44}
!33 = !{!"_ZTSSt6vectorIN16FragmentedVectorI18GridPointReferenceE10VectorNodeESaIS3_EE", !34, i64 0}
!34 = !{!"_ZTSSt12_Vector_baseIN16FragmentedVectorI18GridPointReferenceE10VectorNodeESaIS3_EE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseIN16FragmentedVectorI18GridPointReferenceE10VectorNodeESaIS3_EE12_Vector_implE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseIN16FragmentedVectorI18GridPointReferenceE10VectorNodeESaIS3_EE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!37 = !{!"_ZTS16FragmentedVectorIN5vmath4vec3EE", !38, i64 0, !10, i64 24, !10, i64 28, !7, i64 32, !10, i64 40, !10, i64 44}
!38 = !{!"_ZTSSt6vectorIN16FragmentedVectorIN5vmath4vec3EE10VectorNodeESaIS4_EE", !39, i64 0}
!39 = !{!"_ZTSSt12_Vector_baseIN16FragmentedVectorIN5vmath4vec3EE10VectorNodeESaIS4_EE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseIN16FragmentedVectorIN5vmath4vec3EE10VectorNodeESaIS4_EE12_Vector_implE", !41, i64 0}
!41 = !{!"_ZTSNSt12_Vector_baseIN16FragmentedVectorIN5vmath4vec3EE10VectorNodeESaIS4_EE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!42 = !{!"_ZTS11ScalarField", !10, i64 0, !10, i64 4, !10, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !22, i64 80, !43, i64 88, !44, i64 128, !43, i64 160, !44, i64 200, !22, i64 232, !25, i64 236}
!43 = !{!"_ZTS7Array3dIfE", !10, i64 0, !10, i64 4, !10, i64 8, !16, i64 16, !22, i64 24, !26, i64 28, !10, i64 32}
!44 = !{!"_ZTS7Array3dIbE", !10, i64 0, !10, i64 4, !10, i64 8, !16, i64 16, !22, i64 24, !22, i64 25, !10, i64 28}
!45 = !{!6, !7, i64 56}
!46 = !{!6, !10, i64 64}
!47 = distinct !{!47, !48}
!48 = !{!"llvm.loop.mustprogress"}
!49 = !{!50, !10, i64 0}
!50 = !{!"_ZTS18GridPointReference", !10, i64 0}
!51 = !{!52, !10, i64 16}
!52 = !{!"_ZTSN25AnisotropicParticleMesher15SurfaceParticleE", !25, i64 0, !50, i64 12, !10, i64 16}
!53 = distinct !{!53, !48}


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