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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.GridIndex = type { i32, i32, i32 }
%class.AABB = type { %"class.vmath::vec3", double, double, double }
%"class.vmath::vec3" = type { float, float, float }
%class.GridIndexVector = type { i32, i32, i32, %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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.CuboidFluidSource = type { %class.FluidSource, %class.AABB }
%class.FluidSource = type { ptr, %"class.vmath::vec3", %"class.vmath::vec3", i8, i8, i32 }

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nounwind
declare void @_ZN4AABBD1Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN17CuboidFluidSource20_getOverlappingCellsER15GridIndexVectord(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef nonnull align 8 dereferenceable(40) %1, double noundef %2) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca double, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %struct.GridIndex, align 4
  %11 = alloca %struct.GridIndex, align 4
  %12 = alloca %class.AABB, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store double %2, ptr %6, align 8, !tbaa !9
  %19 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = getelementptr inbounds %class.GridIndexVector, ptr %20, i32 0, i32 0
  %22 = load i32, ptr %21, align 8, !tbaa !11
  store i32 %22, ptr %7, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = getelementptr inbounds %class.GridIndexVector, ptr %23, i32 0, i32 1
  %25 = load i32, ptr %24, align 4, !tbaa !19
  store i32 %25, ptr %8, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %class.GridIndexVector, ptr %26, i32 0, i32 2
  %28 = load i32, ptr %27, align 8, !tbaa !20
  store i32 %28, ptr %9, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 12, ptr %10) #6
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %10)
  call void @llvm.lifetime.start.p0(i64 12, ptr %11) #6
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %11)
  %29 = getelementptr inbounds %class.CuboidFluidSource, ptr %19, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %12, ptr align 8 %29, i64 40, i1 false), !tbaa.struct !21
  %30 = load double, ptr %6, align 8, !tbaa !9
  %31 = load i32, ptr %7, align 4, !tbaa !18
  %32 = load i32, ptr %8, align 4, !tbaa !18
  %33 = load i32, ptr %9, align 4, !tbaa !18
  invoke void @_ZN6Grid3d18getGridIndexBoundsE4AABBdiiiP9GridIndexS2_(ptr noundef %12, double noundef %30, i32 noundef %31, i32 noundef %32, i32 noundef %33, ptr noundef %10, ptr noundef %11)
          to label %34 unwind label %43

34:                                               ; preds = %3
  call void @_ZN4AABBD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %12) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %35 = getelementptr inbounds %struct.GridIndex, ptr %10, i32 0, i32 2
  %36 = load i32, ptr %35, align 4, !tbaa !24
  store i32 %36, ptr %15, align 4, !tbaa !18
  br label %37

37:                                               ; preds = %78, %34
  %38 = load i32, ptr %15, align 4, !tbaa !18
  %39 = getelementptr inbounds %struct.GridIndex, ptr %11, i32 0, i32 2
  %40 = load i32, ptr %39, align 4, !tbaa !24
  %41 = icmp sle i32 %38, %40
  br i1 %41, label %47, label %42

42:                                               ; preds = %37
  store i32 2, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %81

43:                                               ; preds = %3
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %13, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %14, align 4
  call void @_ZN4AABBD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %12) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %82

47:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %48 = getelementptr inbounds %struct.GridIndex, ptr %10, i32 0, i32 1
  %49 = load i32, ptr %48, align 4, !tbaa !26
  store i32 %49, ptr %17, align 4, !tbaa !18
  br label %50

50:                                               ; preds = %74, %47
  %51 = load i32, ptr %17, align 4, !tbaa !18
  %52 = getelementptr inbounds %struct.GridIndex, ptr %11, i32 0, i32 1
  %53 = load i32, ptr %52, align 4, !tbaa !26
  %54 = icmp sle i32 %51, %53
  br i1 %54, label %56, label %55

55:                                               ; preds = %50
  store i32 5, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %77

56:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %57 = getelementptr inbounds %struct.GridIndex, ptr %10, i32 0, i32 0
  %58 = load i32, ptr %57, align 4, !tbaa !27
  store i32 %58, ptr %18, align 4, !tbaa !18
  br label %59

59:                                               ; preds = %70, %56
  %60 = load i32, ptr %18, align 4, !tbaa !18
  %61 = getelementptr inbounds %struct.GridIndex, ptr %11, i32 0, i32 0
  %62 = load i32, ptr %61, align 4, !tbaa !27
  %63 = icmp sle i32 %60, %62
  br i1 %63, label %65, label %64

64:                                               ; preds = %59
  store i32 8, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %73

65:                                               ; preds = %59
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = load i32, ptr %18, align 4, !tbaa !18
  %68 = load i32, ptr %17, align 4, !tbaa !18
  %69 = load i32, ptr %15, align 4, !tbaa !18
  call void @_ZN15GridIndexVector9push_backEiii(ptr noundef nonnull align 8 dereferenceable(40) %66, i32 noundef %67, i32 noundef %68, i32 noundef %69)
  br label %70

70:                                               ; preds = %65
  %71 = load i32, ptr %18, align 4, !tbaa !18
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %18, align 4, !tbaa !18
  br label %59, !llvm.loop !28

73:                                               ; preds = %64
  br label %74

74:                                               ; preds = %73
  %75 = load i32, ptr %17, align 4, !tbaa !18
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %17, align 4, !tbaa !18
  br label %50, !llvm.loop !30

77:                                               ; preds = %55
  br label %78

78:                                               ; preds = %77
  %79 = load i32, ptr %15, align 4, !tbaa !18
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %15, align 4, !tbaa !18
  br label %37, !llvm.loop !31

81:                                               ; preds = %42
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  ret void

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6Grid3d18getGridIndexBoundsE4AABBdiiiP9GridIndexS2_(ptr noundef, double noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) #5

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTS15GridIndexVector", !13, i64 0, !13, i64 4, !13, i64 8, !14, i64 16}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTSSt6vectorIiSaIiEE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!13, !13, i64 0}
!19 = !{!12, !13, i64 4}
!20 = !{!12, !13, i64 8}
!21 = !{i64 0, i64 4, !22, i64 4, i64 4, !22, i64 8, i64 4, !22, i64 16, i64 8, !9, i64 24, i64 8, !9, i64 32, i64 8, !9}
!22 = !{!23, !23, i64 0}
!23 = !{!"float", !7, i64 0}
!24 = !{!25, !13, i64 8}
!25 = !{!"_ZTS9GridIndex", !13, i64 0, !13, i64 4, !13, i64 8}
!26 = !{!25, !13, i64 4}
!27 = !{!25, !13, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = distinct !{!30, !29}
!31 = distinct !{!31, !29}


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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nounwind
declare void @_ZN4AABBD1Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN17CuboidFluidSource20_getOverlappingCellsER15GridIndexVectord(ptr nocapture noundef nonnull readonly align 8 dereferenceable(80) %0, ptr noundef nonnull align 8 dereferenceable(40) %1, double noundef %2) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %struct.GridIndex, align 4
  %5 = alloca %struct.GridIndex, align 4
  %6 = alloca %class.AABB, align 8
  %7 = load i32, ptr %1, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %1, i64 4
  %9 = load i32, ptr %8, align 4, !tbaa !15
  %10 = getelementptr inbounds i8, ptr %1, i64 8
  %11 = load i32, ptr %10, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #6
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %4)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #6
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %5)
  %12 = getelementptr inbounds i8, ptr %0, i64 40
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %6, ptr noundef nonnull align 8 dereferenceable(40) %12, i64 40, i1 false), !tbaa.struct !17
  invoke void @_ZN6Grid3d18getGridIndexBoundsE4AABBdiiiP9GridIndexS2_(ptr noundef nonnull %6, double noundef %2, i32 noundef %7, i32 noundef %9, i32 noundef %11, ptr noundef nonnull %4, ptr noundef nonnull %5)
          to label %13 unwind label %23

13:                                               ; preds = %3
  call void @_ZN4AABBD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %6) #6
  %14 = getelementptr inbounds i8, ptr %4, i64 8
  %15 = load i32, ptr %14, align 4, !tbaa !22
  %16 = getelementptr inbounds i8, ptr %5, i64 8
  %17 = load i32, ptr %16, align 4, !tbaa !22
  %.not30 = icmp sgt i32 %15, %17
  br i1 %.not30, label %._crit_edge35, label %.lr.ph34

.lr.ph34:                                         ; preds = %13
  %18 = getelementptr inbounds i8, ptr %4, i64 4
  %19 = getelementptr inbounds i8, ptr %5, i64 4
  %20 = load i32, ptr %18, align 4, !tbaa !24
  %21 = load i32, ptr %19, align 4, !tbaa !24
  %22 = icmp sgt i32 %20, %21
  br i1 %22, label %._crit_edge35, label %.lr.ph34.split

._crit_edge35:                                    ; preds = %._crit_edge29, %.lr.ph34, %13
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #6
  ret void

23:                                               ; preds = %3
  %24 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4AABBD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %6) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #6
  resume { ptr, i32 } %24

.lr.ph34.split:                                   ; preds = %.lr.ph34, %._crit_edge29
  %25 = phi i32 [ %32, %._crit_edge29 ], [ %17, %.lr.ph34 ]
  %26 = phi i32 [ %33, %._crit_edge29 ], [ %21, %.lr.ph34 ]
  %27 = phi i32 [ %34, %._crit_edge29 ], [ %21, %.lr.ph34 ]
  %.02031 = phi i32 [ %35, %._crit_edge29 ], [ %15, %.lr.ph34 ]
  %28 = load i32, ptr %18, align 4, !tbaa !24
  %.not2125 = icmp sgt i32 %28, %27
  br i1 %.not2125, label %._crit_edge29, label %.lr.ph28

.lr.ph28:                                         ; preds = %.lr.ph34.split
  %29 = load i32, ptr %4, align 4, !tbaa !25
  %30 = load i32, ptr %5, align 4, !tbaa !25
  %31 = icmp sgt i32 %29, %30
  br i1 %31, label %._crit_edge29, label %.lr.ph28.split

._crit_edge29.loopexit36:                         ; preds = %._crit_edge
  %.pre38 = load i32, ptr %16, align 4, !tbaa !22
  br label %._crit_edge29

._crit_edge29:                                    ; preds = %.lr.ph28, %._crit_edge29.loopexit36, %.lr.ph34.split
  %32 = phi i32 [ %.pre38, %._crit_edge29.loopexit36 ], [ %25, %.lr.ph34.split ], [ %25, %.lr.ph28 ]
  %33 = phi i32 [ %39, %._crit_edge29.loopexit36 ], [ %26, %.lr.ph34.split ], [ %26, %.lr.ph28 ]
  %34 = phi i32 [ %39, %._crit_edge29.loopexit36 ], [ %27, %.lr.ph34.split ], [ %27, %.lr.ph28 ]
  %35 = add nsw i32 %.02031, 1
  %.not.not = icmp slt i32 %.02031, %32
  br i1 %.not.not, label %.lr.ph34.split, label %._crit_edge35, !llvm.loop !26

.lr.ph28.split:                                   ; preds = %.lr.ph28, %._crit_edge
  %36 = phi i32 [ %39, %._crit_edge ], [ %26, %.lr.ph28 ]
  %37 = phi i32 [ %40, %._crit_edge ], [ %30, %.lr.ph28 ]
  %.01926 = phi i32 [ %41, %._crit_edge ], [ %28, %.lr.ph28 ]
  %38 = load i32, ptr %4, align 4, !tbaa !25
  %.not2223 = icmp sgt i32 %38, %37
  br i1 %.not2223, label %._crit_edge, label %.lr.ph

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %.pre = load i32, ptr %19, align 4, !tbaa !24
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.lr.ph28.split
  %39 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %36, %.lr.ph28.split ]
  %40 = phi i32 [ %43, %._crit_edge.loopexit ], [ %37, %.lr.ph28.split ]
  %41 = add nsw i32 %.01926, 1
  %.not21.not = icmp slt i32 %.01926, %39
  br i1 %.not21.not, label %.lr.ph28.split, label %._crit_edge29.loopexit36, !llvm.loop !29

.lr.ph:                                           ; preds = %.lr.ph28.split, %.lr.ph
  %.024 = phi i32 [ %42, %.lr.ph ], [ %38, %.lr.ph28.split ]
  call void @_ZN15GridIndexVector9push_backEiii(ptr noundef nonnull align 8 dereferenceable(40) %1, i32 noundef %.024, i32 noundef %.01926, i32 noundef %.02031)
  %42 = add nsw i32 %.024, 1
  %43 = load i32, ptr %5, align 4, !tbaa !25
  %.not22.not = icmp slt i32 %.024, %43
  br i1 %.not22.not, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !30
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6Grid3d18getGridIndexBoundsE4AABBdiiiP9GridIndexS2_(ptr noundef, double noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTS15GridIndexVector", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt6vectorIiSaIiEE", !11, i64 0}
!11 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !12, i64 0}
!12 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!6, !7, i64 4}
!16 = !{!6, !7, i64 8}
!17 = !{i64 0, i64 4, !18, i64 4, i64 4, !18, i64 8, i64 4, !18, i64 16, i64 8, !20, i64 24, i64 8, !20, i64 32, i64 8, !20}
!18 = !{!19, !19, i64 0}
!19 = !{!"float", !8, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"double", !8, i64 0}
!22 = !{!23, !7, i64 8}
!23 = !{!"_ZTS9GridIndex", !7, i64 0, !7, i64 4, !7, i64 8}
!24 = !{!23, !7, i64 4}
!25 = !{!23, !7, i64 0}
!26 = distinct !{!26, !27, !28}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!"llvm.loop.unswitch.partial.disable"}
!29 = distinct !{!29, !27, !28}
!30 = distinct !{!30, !27}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass