; 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.Array3d.22 = type <{ i32, i32, i32, [4 x i8], ptr, i8, [3 x i8], float, i32, [4 x i8] }>
%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 }

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN25AnisotropicParticleMesher29_saveScalarFieldSliceSeamDataEv(ptr noundef nonnull align 8 dereferenceable(784) %0) #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %class.Array3d.22, align 8
  %7 = alloca %class.Array3d.22, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %14 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %15 = getelementptr inbounds %class.AnisotropicParticleMesher, ptr %14, i32 0, i32 23
  call void @_ZN11ScalarField17getGridDimensionsEPiS0_S0_(ptr noundef nonnull align 8 dereferenceable(248) %15, ptr noundef %3, ptr noundef %4, ptr noundef %5)
  call void @llvm.lifetime.start.p0(i64 40, ptr %7) #4
  %16 = load i32, ptr %4, align 4, !tbaa !9
  %17 = load i32, ptr %5, align 4, !tbaa !9
  call void @_ZN7Array3dIfEC2Eiii(ptr noundef nonnull align 8 dereferenceable(36) %7, i32 noundef 3, i32 noundef %16, i32 noundef %17)
  %18 = getelementptr inbounds %class.AnisotropicParticleMesher, ptr %14, i32 0, i32 28
  invoke void @_ZN7Array3dIfEaSERKS0_(ptr dead_on_unwind writable sret(%class.Array3d.22) align 8 %6, ptr noundef nonnull align 8 dereferenceable(36) %18, ptr noundef nonnull align 8 dereferenceable(36) %7)
          to label %19 unwind label %25

19:                                               ; preds = %1
  call void @_ZN7Array3dIfED2Ev(ptr noundef nonnull align 8 dereferenceable(36) %6) #4
  call void @_ZN7Array3dIfED2Ev(ptr noundef nonnull align 8 dereferenceable(36) %7) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %20

20:                                               ; preds = %62, %19
  %21 = load i32, ptr %10, align 4, !tbaa !9
  %22 = load i32, ptr %5, align 4, !tbaa !9
  %23 = icmp slt i32 %21, %22
  br i1 %23, label %29, label %24

24:                                               ; preds = %20
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %65

25:                                               ; preds = %1
  %26 = landingpad { ptr, i32 }
          cleanup
  %27 = extractvalue { ptr, i32 } %26, 0
  store ptr %27, ptr %8, align 8
  %28 = extractvalue { ptr, i32 } %26, 1
  store i32 %28, ptr %9, align 4
  call void @_ZN7Array3dIfED2Ev(ptr noundef nonnull align 8 dereferenceable(36) %7) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %66

29:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %30

30:                                               ; preds = %58, %29
  %31 = load i32, ptr %12, align 4, !tbaa !9
  %32 = load i32, ptr %4, align 4, !tbaa !9
  %33 = icmp slt i32 %31, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %30
  store i32 5, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %61

35:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %36

36:                                               ; preds = %54, %35
  %37 = load i32, ptr %13, align 4, !tbaa !9
  %38 = icmp sle i32 %37, 2
  br i1 %38, label %40, label %39

39:                                               ; preds = %36
  store i32 8, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %57

40:                                               ; preds = %36
  %41 = getelementptr inbounds %class.AnisotropicParticleMesher, ptr %14, i32 0, i32 28
  %42 = load i32, ptr %13, align 4, !tbaa !9
  %43 = load i32, ptr %12, align 4, !tbaa !9
  %44 = load i32, ptr %10, align 4, !tbaa !9
  %45 = getelementptr inbounds %class.AnisotropicParticleMesher, ptr %14, i32 0, i32 23
  %46 = load i32, ptr %13, align 4, !tbaa !9
  %47 = load i32, ptr %3, align 4, !tbaa !9
  %48 = add nsw i32 %46, %47
  %49 = sub nsw i32 %48, 3
  %50 = load i32, ptr %12, align 4, !tbaa !9
  %51 = load i32, ptr %10, align 4, !tbaa !9
  %52 = call noundef double @_ZN11ScalarField22getRawScalarFieldValueEiii(ptr noundef nonnull align 8 dereferenceable(248) %45, i32 noundef %49, i32 noundef %50, i32 noundef %51)
  %53 = fptrunc double %52 to float
  call void @_ZN7Array3dIfE3setEiiif(ptr noundef nonnull align 8 dereferenceable(36) %41, i32 noundef %42, i32 noundef %43, i32 noundef %44, float noundef %53)
  br label %54

54:                                               ; preds = %40
  %55 = load i32, ptr %13, align 4, !tbaa !9
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %13, align 4, !tbaa !9
  br label %36, !llvm.loop !11

57:                                               ; preds = %39
  br label %58

58:                                               ; preds = %57
  %59 = load i32, ptr %12, align 4, !tbaa !9
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %12, align 4, !tbaa !9
  br label %30, !llvm.loop !13

61:                                               ; preds = %34
  br label %62

62:                                               ; preds = %61
  %63 = load i32, ptr %10, align 4, !tbaa !9
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %10, align 4, !tbaa !9
  br label %20, !llvm.loop !14

65:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  ret void

66:                                               ; preds = %25
  %67 = load ptr, ptr %8, align 8
  %68 = load i32, ptr %9, align 4
  %69 = insertvalue { ptr, i32 } poison, ptr %67, 0
  %70 = insertvalue { ptr, i32 } %69, i32 %68, 1
  resume { ptr, i32 } %70
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11ScalarField17getGridDimensionsEPiS0_S0_(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, ptr noundef, ptr noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Array3dIfEC2Eiii(ptr noundef nonnull align 8 dereferenceable(36), i32 noundef, i32 noundef, i32 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Array3dIfEaSERKS0_(ptr dead_on_unwind noalias writable sret(%class.Array3d.22) align 8, ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(36)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Array3dIfE3setEiiif(ptr noundef nonnull align 8 dereferenceable(36), i32 noundef, i32 noundef, i32 noundef, float noundef) #2 align 2

declare noundef double @_ZN11ScalarField22getRawScalarFieldValueEiii(ptr noundef nonnull align 8 dereferenceable(248), i32 noundef, i32 noundef, i32 noundef) #3

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}


; 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.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: mustprogress nounwind uwtable
declare dso_local void @_ZN7Array3dIfED2Ev(ptr noundef nonnull align 8 dereferenceable(36)) unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN25AnisotropicParticleMesher29_saveScalarFieldSliceSeamDataEv(ptr noundef nonnull align 8 dereferenceable(784) %0) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %class.Array3d.22, align 8
  %6 = alloca %class.Array3d.22, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  %7 = getelementptr inbounds i8, ptr %0, i64 480
  call void @_ZN11ScalarField17getGridDimensionsEPiS0_S0_(ptr noundef nonnull align 8 dereferenceable(248) %7, ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %4)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %6) #4
  %8 = load i32, ptr %3, align 4, !tbaa !5
  %9 = load i32, ptr %4, align 4, !tbaa !5
  call void @_ZN7Array3dIfEC2Eiii(ptr noundef nonnull align 8 dereferenceable(36) %6, i32 noundef 3, i32 noundef %8, i32 noundef %9)
  %10 = getelementptr inbounds i8, ptr %0, i64 744
  invoke void @_ZN7Array3dIfEaSERKS0_(ptr dead_on_unwind nonnull writable sret(%class.Array3d.22) align 8 %5, ptr noundef nonnull align 8 dereferenceable(36) %10, ptr noundef nonnull align 8 dereferenceable(36) %6)
          to label %11 unwind label %19

11:                                               ; preds = %1
  call void @_ZN7Array3dIfED2Ev(ptr noundef nonnull align 8 dereferenceable(36) %5) #4
  call void @_ZN7Array3dIfED2Ev(ptr noundef nonnull align 8 dereferenceable(36) %6) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #4
  %12 = load i32, ptr %4, align 4, !tbaa !5
  %13 = icmp sgt i32 %12, 0
  %14 = load i32, ptr %3, align 4
  %15 = icmp sgt i32 %14, 0
  %or.cond = select i1 %13, i1 %15, i1 false
  br i1 %or.cond, label %.preheader16, label %._crit_edge20

.preheader16:                                     ; preds = %11, %._crit_edge
  %16 = phi i32 [ %36, %._crit_edge ], [ %12, %11 ]
  %17 = phi i32 [ %37, %._crit_edge ], [ %14, %11 ]
  %.01519 = phi i32 [ %38, %._crit_edge ], [ 0, %11 ]
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %.preheader, label %._crit_edge

._crit_edge20:                                    ; preds = %._crit_edge, %11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  ret void

19:                                               ; preds = %1
  %20 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7Array3dIfED2Ev(ptr noundef nonnull align 8 dereferenceable(36) %6) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  resume { ptr, i32 } %20

.preheader:                                       ; preds = %.preheader16, %.preheader
  %.01418 = phi i32 [ %33, %.preheader ], [ 0, %.preheader16 ]
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = add i32 %21, -3
  %23 = call noundef double @_ZN11ScalarField22getRawScalarFieldValueEiii(ptr noundef nonnull align 8 dereferenceable(248) %7, i32 noundef %22, i32 noundef %.01418, i32 noundef %.01519)
  %24 = fptrunc double %23 to float
  call void @_ZN7Array3dIfE3setEiiif(ptr noundef nonnull align 8 dereferenceable(36) %10, i32 noundef 0, i32 noundef %.01418, i32 noundef %.01519, float noundef %24)
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = add i32 %25, -2
  %27 = call noundef double @_ZN11ScalarField22getRawScalarFieldValueEiii(ptr noundef nonnull align 8 dereferenceable(248) %7, i32 noundef %26, i32 noundef %.01418, i32 noundef %.01519)
  %28 = fptrunc double %27 to float
  call void @_ZN7Array3dIfE3setEiiif(ptr noundef nonnull align 8 dereferenceable(36) %10, i32 noundef 1, i32 noundef %.01418, i32 noundef %.01519, float noundef %28)
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = add i32 %29, -1
  %31 = call noundef double @_ZN11ScalarField22getRawScalarFieldValueEiii(ptr noundef nonnull align 8 dereferenceable(248) %7, i32 noundef %30, i32 noundef %.01418, i32 noundef %.01519)
  %32 = fptrunc double %31 to float
  call void @_ZN7Array3dIfE3setEiiif(ptr noundef nonnull align 8 dereferenceable(36) %10, i32 noundef 2, i32 noundef %.01418, i32 noundef %.01519, float noundef %32)
  %33 = add nuw nsw i32 %.01418, 1
  %34 = load i32, ptr %3, align 4, !tbaa !5
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %.preheader, label %._crit_edge.loopexit, !llvm.loop !9

._crit_edge.loopexit:                             ; preds = %.preheader
  %.pre = load i32, ptr %4, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader16
  %36 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %16, %.preheader16 ]
  %37 = phi i32 [ %34, %._crit_edge.loopexit ], [ %17, %.preheader16 ]
  %38 = add nuw nsw i32 %.01519, 1
  %39 = icmp slt i32 %38, %36
  br i1 %39, label %.preheader16, label %._crit_edge20, !llvm.loop !11
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11ScalarField17getGridDimensionsEPiS0_S0_(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Array3dIfEC2Eiii(ptr noundef nonnull align 8 dereferenceable(36), i32 noundef, i32 noundef, i32 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Array3dIfEaSERKS0_(ptr dead_on_unwind noalias writable sret(%class.Array3d.22) align 8, ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(36)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Array3dIfE3setEiiif(ptr noundef nonnull align 8 dereferenceable(36), i32 noundef, i32 noundef, i32 noundef, float noundef) local_unnamed_addr #2 align 2

declare noundef double @_ZN11ScalarField22getRawScalarFieldValueEiii(ptr noundef nonnull align 8 dereferenceable(248), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10, !12}
!12 = !{!"llvm.loop.unswitch.partial.disable"}


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