; 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.vmath::vec3" = type { float, float, float }
%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

declare void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #1

; 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) #2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN25AnisotropicParticleMesher35_addIsotropicParticlesToScalarFieldER16FragmentedVectorIN5vmath4vec3EER8LevelSet(ptr noundef nonnull align 8 dereferenceable(784) %0, ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(448) %2) #5 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca double, align 8
  %8 = alloca %"class.vmath::vec3", align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.vmath::vec3", align 4
  %13 = alloca %"class.vmath::vec3", align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %14 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %15 = getelementptr inbounds %class.AnisotropicParticleMesher, ptr %14, i32 0, i32 0
  %16 = load double, ptr %15, align 8, !tbaa !9
  %17 = getelementptr inbounds %class.AnisotropicParticleMesher, ptr %14, i32 0, i32 3
  %18 = load double, ptr %17, align 8, !tbaa !46
  %19 = fmul double %16, %18
  store double %19, ptr %7, align 8, !tbaa !47
  %20 = getelementptr inbounds %class.AnisotropicParticleMesher, ptr %14, i32 0, i32 23
  %21 = load double, ptr %7, align 8, !tbaa !47
  call void @_ZN11ScalarField14setPointRadiusEd(ptr noundef nonnull align 8 dereferenceable(248) %20, double noundef %21)
  call void @llvm.lifetime.start.p0(i64 12, ptr %8) #7
  call void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12) %8)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !48
  br label %22

22:                                               ; preds = %53, %3
  %23 = load i32, ptr %9, align 4, !tbaa !48
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = invoke noundef i32 @_ZN16FragmentedVectorIN5vmath4vec3EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %24)
          to label %26 unwind label %29

26:                                               ; preds = %22
  %27 = icmp ult i32 %23, %25
  br i1 %27, label %33, label %28

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

29:                                               ; preds = %33, %22
  %30 = landingpad { ptr, i32 }
          cleanup
  %31 = extractvalue { ptr, i32 } %30, 0
  store ptr %31, ptr %10, align 8
  %32 = extractvalue { ptr, i32 } %30, 1
  store i32 %32, ptr %11, align 4
  br label %56

33:                                               ; preds = %26
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = load i32, ptr %9, align 4, !tbaa !48
  %36 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN16FragmentedVectorIN5vmath4vec3EEixEi(ptr noundef nonnull align 8 dereferenceable(48) %34, i32 noundef %35)
          to label %37 unwind label %29

37:                                               ; preds = %33
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 4 %36, i64 12, i1 false), !tbaa.struct !49
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 4 %8, i64 12, i1 false), !tbaa.struct !49
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = invoke noundef zeroext i1 @_ZN25AnisotropicParticleMesher17_isInsideParticleEN5vmath4vec3ER8LevelSet(ptr noundef nonnull align 8 dereferenceable(784) %14, ptr noundef %12, ptr noundef nonnull align 8 dereferenceable(448) %38)
          to label %40 unwind label %44

40:                                               ; preds = %37
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %12) #7
  br i1 %39, label %41, label %52

41:                                               ; preds = %40
  %42 = getelementptr inbounds %class.AnisotropicParticleMesher, ptr %14, i32 0, i32 23
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %8, i64 12, i1 false), !tbaa.struct !49
  invoke void @_ZN11ScalarField8addPointEN5vmath4vec3E(ptr noundef nonnull align 8 dereferenceable(248) %42, ptr noundef %13)
          to label %43 unwind label %48

43:                                               ; preds = %41
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %13) #7
  br label %52

44:                                               ; preds = %37
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %10, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %11, align 4
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %12) #7
  br label %56

48:                                               ; preds = %41
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %10, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %11, align 4
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %13) #7
  br label %56

52:                                               ; preds = %43, %40
  br label %53

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

56:                                               ; preds = %48, %44, %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %8) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %58

57:                                               ; preds = %28
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %8) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  ret void

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

declare void @_ZN11ScalarField14setPointRadiusEd(ptr noundef nonnull align 8 dereferenceable(248), double noundef) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN25AnisotropicParticleMesher17_isInsideParticleEN5vmath4vec3ER8LevelSet(ptr noundef nonnull align 8 dereferenceable(784), ptr noundef, ptr noundef nonnull align 8 dereferenceable(448)) #6 align 2

declare void @_ZN11ScalarField8addPointEN5vmath4vec3E(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = { 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 = { 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 #7 = { 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 24}
!47 = !{!11, !11, i64 0}
!48 = !{!12, !12, i64 0}
!49 = !{i64 0, i64 4, !50, i64 4, i64 4, !50, i64 8, i64 4, !50}
!50 = !{!27, !27, i64 0}
!51 = distinct !{!51, !52}
!52 = !{!"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.vmath::vec3" = type { float, float, float }

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

declare void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #1

; 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) #2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN25AnisotropicParticleMesher35_addIsotropicParticlesToScalarFieldER16FragmentedVectorIN5vmath4vec3EER8LevelSet(ptr noundef nonnull align 8 dereferenceable(784) %0, ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(448) %2) local_unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.vmath::vec3", align 4
  %5 = alloca %"class.vmath::vec3", align 4
  %6 = alloca %"class.vmath::vec3", align 4
  %7 = load double, ptr %0, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %0, i64 24
  %9 = load double, ptr %8, align 8, !tbaa !45
  %10 = fmul double %7, %9
  %11 = getelementptr inbounds i8, ptr %0, i64 480
  tail call void @_ZN11ScalarField14setPointRadiusEd(ptr noundef nonnull align 8 dereferenceable(248) %11, double noundef %10)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #8
  call void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12) %4)
  %12 = call noundef i32 @_ZN16FragmentedVectorIN5vmath4vec3EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %1)
  %.not = icmp eq i32 %12, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %25, %3
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %4) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #8
  ret void

13:                                               ; preds = %.lr.ph
  %14 = landingpad { ptr, i32 }
          cleanup
  br label %29

.lr.ph:                                           ; preds = %3, %25
  %.01012 = phi i32 [ %26, %25 ], [ 0, %3 ]
  %15 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN16FragmentedVectorIN5vmath4vec3EEixEi(ptr noundef nonnull align 8 dereferenceable(48) %1, i32 noundef %.01012)
          to label %16 unwind label %13

16:                                               ; preds = %.lr.ph
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %4, ptr noundef nonnull align 4 dereferenceable(12) %15, i64 12, i1 false), !tbaa.struct !46
  call void @llvm.memmove.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %15, i64 12, i1 false)
  %17 = invoke noundef zeroext i1 @_ZN25AnisotropicParticleMesher17_isInsideParticleEN5vmath4vec3ER8LevelSet(ptr noundef nonnull align 8 dereferenceable(784) %0, ptr noundef nonnull %5, ptr noundef nonnull align 8 dereferenceable(448) %2)
          to label %18 unwind label %21

18:                                               ; preds = %16
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %5) #8
  br i1 %17, label %19, label %25

19:                                               ; preds = %18
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %6, ptr noundef nonnull align 4 dereferenceable(12) %4, i64 12, i1 false), !tbaa.struct !46
  invoke void @_ZN11ScalarField8addPointEN5vmath4vec3E(ptr noundef nonnull align 8 dereferenceable(248) %11, ptr noundef nonnull %6)
          to label %20 unwind label %23

20:                                               ; preds = %19
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %6) #8
  br label %25

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

23:                                               ; preds = %19
  %24 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %6) #8
  br label %29

25:                                               ; preds = %18, %20
  %26 = add nuw i32 %.01012, 1
  %27 = call noundef i32 @_ZN16FragmentedVectorIN5vmath4vec3EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %1)
  %28 = icmp ult i32 %26, %27
  br i1 %28, label %.lr.ph, label %._crit_edge, !llvm.loop !48

29:                                               ; preds = %23, %21, %13
  %.pn = phi { ptr, i32 } [ %24, %23 ], [ %22, %21 ], [ %14, %13 ]
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %4) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #8
  resume { ptr, i32 } %.pn
}

declare void @_ZN11ScalarField14setPointRadiusEd(ptr noundef nonnull align 8 dereferenceable(248), double noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN25AnisotropicParticleMesher17_isInsideParticleEN5vmath4vec3ER8LevelSet(ptr noundef nonnull align 8 dereferenceable(784), ptr noundef, ptr noundef nonnull align 8 dereferenceable(448)) local_unnamed_addr #6 align 2

declare void @_ZN11ScalarField8addPointEN5vmath4vec3E(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef) local_unnamed_addr #1

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = { 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 = { 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 #7 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { 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 24}
!46 = !{i64 0, i64 4, !47, i64 4, i64 4, !47, i64 8, i64 4, !47}
!47 = !{!26, !26, i64 0}
!48 = distinct !{!48, !49}
!49 = !{!"llvm.loop.mustprogress"}


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