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

; 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.AABB = type { %"class.vmath::vec3", double, double, double }
%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.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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN25AnisotropicParticleMesher28_getSubdividedGridDimensionsEPiS0_S0_Pd(ptr noundef nonnull align 8 dereferenceable(784), ptr noundef, ptr noundef, ptr noundef, ptr noundef) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN25AnisotropicParticleMesher27_getSliceGridPositionOffsetEii(ptr dead_on_unwind noalias writable sret(%"class.vmath::vec3") align 4, ptr noundef nonnull align 8 dereferenceable(784), i32 noundef, i32 noundef) #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN25AnisotropicParticleMesher13_getSliceAABBEii(ptr dead_on_unwind noalias writable sret(%class.AABB) align 8 %0, ptr noundef nonnull align 8 dereferenceable(784) %1, i32 noundef %2, i32 noundef %3) #5 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %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
  %12 = alloca double, align 8
  %13 = alloca i8, align 1
  %14 = alloca i8, align 1
  %15 = alloca i8, align 1
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca %"class.vmath::vec3", align 4
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca i1, align 1
  %24 = alloca %"class.vmath::vec3", align 4
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  store ptr %0, ptr %5, align 8
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !9
  %27 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  call void @_ZN25AnisotropicParticleMesher28_getSubdividedGridDimensionsEPiS0_S0_Pd(ptr noundef nonnull align 8 dereferenceable(784) %27, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12)
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #7
  %28 = load i32, ptr %7, align 4, !tbaa !9
  %29 = icmp eq i32 %28, 0
  %30 = zext i1 %29 to i8
  store i8 %30, ptr %13, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #7
  %31 = load i32, ptr %8, align 4, !tbaa !9
  %32 = load i32, ptr %9, align 4, !tbaa !9
  %33 = sub nsw i32 %32, 1
  %34 = icmp eq i32 %31, %33
  %35 = zext i1 %34 to i8
  store i8 %35, ptr %14, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #7
  %36 = load i8, ptr %13, align 1, !tbaa !11, !range !13, !noundef !14
  %37 = trunc i8 %36 to i1
  br i1 %37, label %42, label %38

38:                                               ; preds = %4
  %39 = load i8, ptr %14, align 1, !tbaa !11, !range !13, !noundef !14
  %40 = trunc i8 %39 to i1
  %41 = xor i1 %40, true
  br label %42

42:                                               ; preds = %38, %4
  %43 = phi i1 [ false, %4 ], [ %41, %38 ]
  %44 = zext i1 %43 to i8
  store i8 %44, ptr %15, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %45 = load i32, ptr %8, align 4, !tbaa !9
  %46 = load i32, ptr %7, align 4, !tbaa !9
  %47 = sub nsw i32 %45, %46
  %48 = add nsw i32 %47, 1
  %49 = sitofp i32 %48 to double
  %50 = load double, ptr %12, align 8, !tbaa !15
  %51 = fmul double %49, %50
  store double %51, ptr %16, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %52 = load i32, ptr %10, align 4, !tbaa !9
  %53 = sitofp i32 %52 to double
  %54 = load double, ptr %12, align 8, !tbaa !15
  %55 = fmul double %53, %54
  store double %55, ptr %17, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %56 = load i32, ptr %11, align 4, !tbaa !9
  %57 = sitofp i32 %56 to double
  %58 = load double, ptr %12, align 8, !tbaa !15
  %59 = fmul double %57, %58
  store double %59, ptr %18, align 8, !tbaa !15
  %60 = load i8, ptr %13, align 1, !tbaa !11, !range !13, !noundef !14
  %61 = trunc i8 %60 to i1
  br i1 %61, label %65, label %62

62:                                               ; preds = %42
  %63 = load i8, ptr %14, align 1, !tbaa !11, !range !13, !noundef !14
  %64 = trunc i8 %63 to i1
  br i1 %64, label %65, label %69

65:                                               ; preds = %62, %42
  %66 = load double, ptr %12, align 8, !tbaa !15
  %67 = load double, ptr %16, align 8, !tbaa !15
  %68 = fadd double %67, %66
  store double %68, ptr %16, align 8, !tbaa !15
  br label %77

69:                                               ; preds = %62
  %70 = load i8, ptr %15, align 1, !tbaa !11, !range !13, !noundef !14
  %71 = trunc i8 %70 to i1
  br i1 %71, label %72, label %76

72:                                               ; preds = %69
  %73 = load double, ptr %12, align 8, !tbaa !15
  %74 = load double, ptr %16, align 8, !tbaa !15
  %75 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %73, double %74)
  store double %75, ptr %16, align 8, !tbaa !15
  br label %76

76:                                               ; preds = %72, %69
  br label %77

77:                                               ; preds = %76, %65
  call void @llvm.lifetime.start.p0(i64 12, ptr %19) #7
  %78 = load i32, ptr %7, align 4, !tbaa !9
  %79 = load i32, ptr %8, align 4, !tbaa !9
  call void @_ZN25AnisotropicParticleMesher27_getSliceGridPositionOffsetEii(ptr dead_on_unwind writable sret(%"class.vmath::vec3") align 4 %19, ptr noundef nonnull align 8 dereferenceable(784) %27, i32 noundef %78, i32 noundef %79)
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %80 = getelementptr inbounds %class.AnisotropicParticleMesher, ptr %27, i32 0, i32 0
  %81 = load double, ptr %80, align 8, !tbaa !17
  %82 = getelementptr inbounds %class.AnisotropicParticleMesher, ptr %27, i32 0, i32 3
  %83 = load double, ptr %82, align 8, !tbaa !51
  %84 = fmul double %81, %83
  store double %84, ptr %20, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %85 = getelementptr inbounds %class.AnisotropicParticleMesher, ptr %27, i32 0, i32 0
  %86 = load double, ptr %85, align 8, !tbaa !17
  %87 = getelementptr inbounds %class.AnisotropicParticleMesher, ptr %27, i32 0, i32 1
  %88 = load double, ptr %87, align 8, !tbaa !52
  %89 = fmul double %86, %88
  %90 = getelementptr inbounds %class.AnisotropicParticleMesher, ptr %27, i32 0, i32 11
  %91 = load double, ptr %90, align 8, !tbaa !53
  %92 = fmul double %89, %91
  store double %92, ptr %21, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %93 = load double, ptr %20, align 8, !tbaa !15
  %94 = load double, ptr %21, align 8, !tbaa !15
  %95 = call double @llvm.maxnum.f64(double %93, double %94)
  store double %95, ptr %22, align 8, !tbaa !15
  store i1 false, ptr %23, align 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %24, ptr align 4 %19, i64 12, i1 false), !tbaa.struct !54
  %96 = load double, ptr %16, align 8, !tbaa !15
  %97 = load double, ptr %17, align 8, !tbaa !15
  %98 = load double, ptr %18, align 8, !tbaa !15
  invoke void @_ZN4AABBC1EN5vmath4vec3Eddd(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef %24, double noundef %96, double noundef %97, double noundef %98)
          to label %99 unwind label %104

99:                                               ; preds = %77
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %24) #7
  %100 = load double, ptr %22, align 8, !tbaa !15
  %101 = fmul double 2.000000e+00, %100
  invoke void @_ZN4AABB6expandEd(ptr noundef nonnull align 8 dereferenceable(40) %0, double noundef %101)
          to label %102 unwind label %108

102:                                              ; preds = %99
  store i1 true, ptr %23, align 1
  %103 = load i1, ptr %23, align 1
  br i1 %103, label %113, label %112

104:                                              ; preds = %77
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %25, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %26, align 4
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %24) #7
  br label %114

108:                                              ; preds = %99
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %25, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %26, align 4
  call void @_ZN4AABBD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %0) #7
  br label %114

112:                                              ; preds = %102
  call void @_ZN4AABBD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %0) #7
  br label %113

113:                                              ; preds = %112, %102
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %19) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  ret void

114:                                              ; preds = %108, %104
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %19) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %115

115:                                              ; preds = %114
  %116 = load ptr, ptr %25, align 8
  %117 = load i32, ptr %26, align 4
  %118 = insertvalue { ptr, i32 } poison, ptr %116, 0
  %119 = insertvalue { ptr, i32 } %118, i32 %117, 1
  resume { ptr, i32 } %119
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.maxnum.f64(double, double) #3

declare void @_ZN4AABBC1EN5vmath4vec3Eddd(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, double noundef, double noundef, double noundef) unnamed_addr #6

declare void @_ZN4AABB6expandEd(ptr noundef nonnull align 8 dereferenceable(40), double noundef) #6

; Function Attrs: nounwind
declare void @_ZN4AABBD1Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 = { "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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = !{!18, !16, i64 0}
!18 = !{!"_ZTS25AnisotropicParticleMesher", !16, i64 0, !16, i64 8, !16, i64 16, !16, i64 24, !16, i64 32, !16, i64 40, !16, i64 48, !16, i64 56, !10, i64 64, !16, i64 72, !10, i64 80, !16, i64 88, !10, i64 96, !10, i64 100, !10, i64 104, !16, i64 112, !10, i64 120, !16, i64 128, !19, i64 136, !33, i64 288, !38, i64 336, !38, i64 384, !43, i64 432, !48, i64 480, !10, i64 728, !10, i64 732, !10, i64 736, !49, i64 744}
!19 = !{!"_ZTS16SpatialPointGrid", !10, i64 0, !10, i64 4, !10, i64 8, !16, i64 16, !20, i64 24, !24, i64 48, !28, i64 72, !30, i64 112}
!20 = !{!"_ZTSSt6vectorI9GridPointSaIS0_EE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseI9GridPointSaIS0_EE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseI9GridPointSaIS0_EE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseI9GridPointSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = !{!"_ZTSSt6vectorIiSaIiEE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!28 = !{!"_ZTS7Array3dIN16SpatialPointGrid8CellNodeEE", !10, i64 0, !10, i64 4, !10, i64 8, !6, i64 16, !12, i64 24, !29, i64 28, !10, i64 36}
!29 = !{!"_ZTSN16SpatialPointGrid8CellNodeE", !10, i64 0, !10, i64 4}
!30 = !{!"_ZTS4AABB", !31, i64 0, !16, i64 16, !16, i64 24, !16, i64 32}
!31 = !{!"_ZTSN5vmath4vec3E", !32, i64 0, !32, i64 4, !32, i64 8}
!32 = !{!"float", !7, i64 0}
!33 = !{!"_ZTS16FragmentedVectorIN25AnisotropicParticleMesher15SurfaceParticleEE", !34, i64 0, !10, i64 24, !10, i64 28, !16, i64 32, !10, i64 40, !10, i64 44}
!34 = !{!"_ZTSSt6vectorIN16FragmentedVectorIN25AnisotropicParticleMesher15SurfaceParticleEE10VectorNodeESaIS4_EE", !35, i64 0}
!35 = !{!"_ZTSSt12_Vector_baseIN16FragmentedVectorIN25AnisotropicParticleMesher15SurfaceParticleEE10VectorNodeESaIS4_EE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseIN16FragmentedVectorIN25AnisotropicParticleMesher15SurfaceParticleEE10VectorNodeESaIS4_EE12_Vector_implE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseIN16FragmentedVectorIN25AnisotropicParticleMesher15SurfaceParticleEE10VectorNodeESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!38 = !{!"_ZTS16FragmentedVectorI18GridPointReferenceE", !39, i64 0, !10, i64 24, !10, i64 28, !16, i64 32, !10, i64 40, !10, i64 44}
!39 = !{!"_ZTSSt6vectorIN16FragmentedVectorI18GridPointReferenceE10VectorNodeESaIS3_EE", !40, i64 0}
!40 = !{!"_ZTSSt12_Vector_baseIN16FragmentedVectorI18GridPointReferenceE10VectorNodeESaIS3_EE", !41, i64 0}
!41 = !{!"_ZTSNSt12_Vector_baseIN16FragmentedVectorI18GridPointReferenceE10VectorNodeESaIS3_EE12_Vector_implE", !42, i64 0}
!42 = !{!"_ZTSNSt12_Vector_baseIN16FragmentedVectorI18GridPointReferenceE10VectorNodeESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!43 = !{!"_ZTS16FragmentedVectorIN5vmath4vec3EE", !44, i64 0, !10, i64 24, !10, i64 28, !16, i64 32, !10, i64 40, !10, i64 44}
!44 = !{!"_ZTSSt6vectorIN16FragmentedVectorIN5vmath4vec3EE10VectorNodeESaIS4_EE", !45, i64 0}
!45 = !{!"_ZTSSt12_Vector_baseIN16FragmentedVectorIN5vmath4vec3EE10VectorNodeESaIS4_EE", !46, i64 0}
!46 = !{!"_ZTSNSt12_Vector_baseIN16FragmentedVectorIN5vmath4vec3EE10VectorNodeESaIS4_EE12_Vector_implE", !47, i64 0}
!47 = !{!"_ZTSNSt12_Vector_baseIN16FragmentedVectorIN5vmath4vec3EE10VectorNodeESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!48 = !{!"_ZTS11ScalarField", !10, i64 0, !10, i64 4, !10, i64 8, !16, i64 16, !16, i64 24, !16, i64 32, !16, i64 40, !16, i64 48, !16, i64 56, !16, i64 64, !16, i64 72, !12, i64 80, !49, i64 88, !50, i64 128, !49, i64 160, !50, i64 200, !12, i64 232, !31, i64 236}
!49 = !{!"_ZTS7Array3dIfE", !10, i64 0, !10, i64 4, !10, i64 8, !6, i64 16, !12, i64 24, !32, i64 28, !10, i64 32}
!50 = !{!"_ZTS7Array3dIbE", !10, i64 0, !10, i64 4, !10, i64 8, !6, i64 16, !12, i64 24, !12, i64 25, !10, i64 28}
!51 = !{!18, !16, i64 24}
!52 = !{!18, !16, i64 8}
!53 = !{!18, !16, i64 88}
!54 = !{i64 0, i64 4, !55, i64 4, i64 4, !55, i64 8, i64 4, !55}
!55 = !{!32, !32, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.vmath::vec3" = type { float, float, float }
%class.AABB = type { %"class.vmath::vec3", double, double, double }

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: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN25AnisotropicParticleMesher28_getSubdividedGridDimensionsEPiS0_S0_Pd(ptr noundef nonnull align 8 dereferenceable(784), ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN25AnisotropicParticleMesher27_getSliceGridPositionOffsetEii(ptr dead_on_unwind noalias writable sret(%"class.vmath::vec3") align 4, ptr noundef nonnull align 8 dereferenceable(784), i32 noundef, i32 noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN25AnisotropicParticleMesher13_getSliceAABBEii(ptr dead_on_unwind noalias writable sret(%class.AABB) align 8 %0, ptr noundef nonnull align 8 dereferenceable(784) %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca double, align 8
  %9 = alloca %"class.vmath::vec3", align 4
  %10 = alloca %"class.vmath::vec3", align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  call void @_ZN25AnisotropicParticleMesher28_getSubdividedGridDimensionsEPiS0_S0_Pd(ptr noundef nonnull align 8 dereferenceable(784) %1, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8)
  %.not26 = icmp eq i32 %2, 0
  %11 = load i32, ptr %5, align 4, !tbaa !5
  %12 = add nsw i32 %11, -1
  %.not27 = icmp eq i32 %12, %3
  %reass.sub = sub i32 %3, %2
  %13 = add i32 %reass.sub, 1
  %14 = sitofp i32 %13 to double
  %15 = load double, ptr %8, align 8, !tbaa !9
  %16 = fmul double %15, %14
  %17 = load i32, ptr %6, align 4, !tbaa !5
  %18 = sitofp i32 %17 to double
  %19 = fmul double %15, %18
  %20 = load i32, ptr %7, align 4, !tbaa !5
  %21 = sitofp i32 %20 to double
  %22 = fmul double %15, %21
  %brmerge = select i1 %.not26, i1 true, i1 %.not27
  %23 = fadd double %15, %16
  %24 = call double @llvm.fmuladd.f64(double %15, double 2.000000e+00, double %16)
  %.023 = select i1 %brmerge, double %23, double %24
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #7
  call void @_ZN25AnisotropicParticleMesher27_getSliceGridPositionOffsetEii(ptr dead_on_unwind nonnull writable sret(%"class.vmath::vec3") align 4 %9, ptr noundef nonnull align 8 dereferenceable(784) %1, i32 noundef %2, i32 noundef %3)
  %25 = load double, ptr %1, align 8, !tbaa !11
  %26 = getelementptr inbounds i8, ptr %1, i64 24
  %27 = load double, ptr %26, align 8, !tbaa !47
  %28 = getelementptr inbounds i8, ptr %1, i64 8
  %29 = load double, ptr %28, align 8, !tbaa !48
  %30 = getelementptr inbounds i8, ptr %1, i64 88
  %31 = load double, ptr %30, align 8, !tbaa !49
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %9, i64 12, i1 false), !tbaa.struct !50
  invoke void @_ZN4AABBC1EN5vmath4vec3Eddd(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull %10, double noundef %.023, double noundef %19, double noundef %22)
          to label %32 unwind label %38

32:                                               ; preds = %4
  %33 = fmul double %25, %27
  %34 = fmul double %25, %29
  %35 = fmul double %34, %31
  %36 = call double @llvm.maxnum.f64(double %33, double %35)
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %10) #7
  %37 = fmul double %36, 2.000000e+00
  invoke void @_ZN4AABB6expandEd(ptr noundef nonnull align 8 dereferenceable(40) %0, double noundef %37)
          to label %42 unwind label %40

38:                                               ; preds = %4
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %10) #7
  br label %43

40:                                               ; preds = %32
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4AABBD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %0) #7
  br label %43

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

43:                                               ; preds = %40, %38
  %.pn = phi { ptr, i32 } [ %41, %40 ], [ %39, %38 ]
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %9) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.maxnum.f64(double, double) #3

declare void @_ZN4AABBC1EN5vmath4vec3Eddd(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, double noundef, double noundef, double noundef) unnamed_addr #6

declare void @_ZN4AABB6expandEd(ptr noundef nonnull align 8 dereferenceable(40), double noundef) local_unnamed_addr #6

; Function Attrs: nounwind
declare void @_ZN4AABBD1Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 = { "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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTS25AnisotropicParticleMesher", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !6, i64 64, !10, i64 72, !6, i64 80, !10, i64 88, !6, i64 96, !6, i64 100, !6, i64 104, !10, i64 112, !6, i64 120, !10, i64 128, !13, i64 136, !29, i64 288, !34, i64 336, !34, i64 384, !39, i64 432, !44, i64 480, !6, i64 728, !6, i64 732, !6, i64 736, !45, i64 744}
!13 = !{!"_ZTS16SpatialPointGrid", !6, i64 0, !6, i64 4, !6, i64 8, !10, i64 16, !14, i64 24, !19, i64 48, !23, i64 72, !26, 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", !18, i64 0, !18, i64 8, !18, i64 16}
!18 = !{!"any pointer", !7, i64 0}
!19 = !{!"_ZTSSt6vectorIiSaIiEE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !18, i64 0, !18, i64 8, !18, i64 16}
!23 = !{!"_ZTS7Array3dIN16SpatialPointGrid8CellNodeEE", !6, i64 0, !6, i64 4, !6, i64 8, !18, i64 16, !24, i64 24, !25, i64 28, !6, i64 36}
!24 = !{!"bool", !7, i64 0}
!25 = !{!"_ZTSN16SpatialPointGrid8CellNodeE", !6, i64 0, !6, i64 4}
!26 = !{!"_ZTS4AABB", !27, i64 0, !10, i64 16, !10, i64 24, !10, i64 32}
!27 = !{!"_ZTSN5vmath4vec3E", !28, i64 0, !28, i64 4, !28, i64 8}
!28 = !{!"float", !7, i64 0}
!29 = !{!"_ZTS16FragmentedVectorIN25AnisotropicParticleMesher15SurfaceParticleEE", !30, i64 0, !6, i64 24, !6, i64 28, !10, i64 32, !6, i64 40, !6, i64 44}
!30 = !{!"_ZTSSt6vectorIN16FragmentedVectorIN25AnisotropicParticleMesher15SurfaceParticleEE10VectorNodeESaIS4_EE", !31, i64 0}
!31 = !{!"_ZTSSt12_Vector_baseIN16FragmentedVectorIN25AnisotropicParticleMesher15SurfaceParticleEE10VectorNodeESaIS4_EE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIN16FragmentedVectorIN25AnisotropicParticleMesher15SurfaceParticleEE10VectorNodeESaIS4_EE12_Vector_implE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIN16FragmentedVectorIN25AnisotropicParticleMesher15SurfaceParticleEE10VectorNodeESaIS4_EE17_Vector_impl_dataE", !18, i64 0, !18, i64 8, !18, i64 16}
!34 = !{!"_ZTS16FragmentedVectorI18GridPointReferenceE", !35, i64 0, !6, i64 24, !6, i64 28, !10, i64 32, !6, i64 40, !6, i64 44}
!35 = !{!"_ZTSSt6vectorIN16FragmentedVectorI18GridPointReferenceE10VectorNodeESaIS3_EE", !36, i64 0}
!36 = !{!"_ZTSSt12_Vector_baseIN16FragmentedVectorI18GridPointReferenceE10VectorNodeESaIS3_EE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseIN16FragmentedVectorI18GridPointReferenceE10VectorNodeESaIS3_EE12_Vector_implE", !38, i64 0}
!38 = !{!"_ZTSNSt12_Vector_baseIN16FragmentedVectorI18GridPointReferenceE10VectorNodeESaIS3_EE17_Vector_impl_dataE", !18, i64 0, !18, i64 8, !18, i64 16}
!39 = !{!"_ZTS16FragmentedVectorIN5vmath4vec3EE", !40, i64 0, !6, i64 24, !6, i64 28, !10, i64 32, !6, i64 40, !6, i64 44}
!40 = !{!"_ZTSSt6vectorIN16FragmentedVectorIN5vmath4vec3EE10VectorNodeESaIS4_EE", !41, i64 0}
!41 = !{!"_ZTSSt12_Vector_baseIN16FragmentedVectorIN5vmath4vec3EE10VectorNodeESaIS4_EE", !42, i64 0}
!42 = !{!"_ZTSNSt12_Vector_baseIN16FragmentedVectorIN5vmath4vec3EE10VectorNodeESaIS4_EE12_Vector_implE", !43, i64 0}
!43 = !{!"_ZTSNSt12_Vector_baseIN16FragmentedVectorIN5vmath4vec3EE10VectorNodeESaIS4_EE17_Vector_impl_dataE", !18, i64 0, !18, i64 8, !18, i64 16}
!44 = !{!"_ZTS11ScalarField", !6, i64 0, !6, i64 4, !6, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !24, i64 80, !45, i64 88, !46, i64 128, !45, i64 160, !46, i64 200, !24, i64 232, !27, i64 236}
!45 = !{!"_ZTS7Array3dIfE", !6, i64 0, !6, i64 4, !6, i64 8, !18, i64 16, !24, i64 24, !28, i64 28, !6, i64 32}
!46 = !{!"_ZTS7Array3dIbE", !6, i64 0, !6, i64 4, !6, i64 8, !18, i64 16, !24, i64 24, !24, i64 25, !6, i64 28}
!47 = !{!12, !10, i64 24}
!48 = !{!12, !10, i64 8}
!49 = !{!12, !10, i64 88}
!50 = !{i64 0, i64 4, !51, i64 4, i64 4, !51, i64 8, i64 4, !51}
!51 = !{!28, !28, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass