; LLVM IR from SourangshuGhosh/Fluid-Simulation-for-Computer-Graphics :: src (pressuresolver)

; 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.PressureSolver = type { i32, i32, i32, double, double, double, i32, double, i32, ptr, ptr, ptr, ptr, %class.GridIndexKeyMap }
%class.GridIndexKeyMap = type <{ i32, i32, i32, [4 x i8], %"class.std::vector.5", i32, [4 x i8] }>
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = 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.MatrixCoefficients = type { %"class.std::vector.0" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<MatrixCell, std::allocator<MatrixCell>>::_Vector_impl" }
%"struct.std::_Vector_base<MatrixCell, std::allocator<MatrixCell>>::_Vector_impl" = type { %"struct.std::_Vector_base<MatrixCell, std::allocator<MatrixCell>>::_Vector_impl_data" }
%"struct.std::_Vector_base<MatrixCell, std::allocator<MatrixCell>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.MatrixCell = type { i8, i8, i8, i8 }

; 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: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt6vectorI10MatrixCellSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14PressureSolver28_calculateMatrixCoefficientsER18MatrixCoefficients(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef nonnull align 8 dereferenceable(24) %1) #3 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %struct.GridIndex, align 4
  %8 = alloca { i64, i32 }, align 8
  %9 = alloca i32, align 4
  %10 = alloca %struct.GridIndex, align 4
  %11 = alloca { i64, i32 }, align 8
  %12 = alloca i32, align 4
  %13 = alloca %struct.GridIndex, align 4
  %14 = alloca { i64, i32 }, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %17 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %18

18:                                               ; preds = %106, %2
  %19 = load i32, ptr %5, align 4, !tbaa !9
  %20 = zext i32 %19 to i64
  %21 = getelementptr inbounds %class.PressureSolver, ptr %17, i32 0, i32 9
  %22 = load ptr, ptr %21, align 8, !tbaa !11
  %23 = call noundef i64 @_ZN15GridIndexVector4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %22)
  %24 = icmp ult i64 %20, %23
  br i1 %24, label %26, label %25

25:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %109

26:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %7) #7
  %27 = getelementptr inbounds %class.PressureSolver, ptr %17, i32 0, i32 9
  %28 = load ptr, ptr %27, align 8, !tbaa !11
  %29 = load i32, ptr %5, align 4, !tbaa !9
  %30 = call { i64, i32 } @_ZN15GridIndexVector2atEi(ptr noundef nonnull align 8 dereferenceable(40) %28, i32 noundef %29)
  store { i64, i32 } %30, ptr %8, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %7, ptr align 8 %8, i64 12, i1 false)
  %31 = getelementptr inbounds %struct.GridIndex, ptr %7, i32 0, i32 0
  %32 = load i32, ptr %31, align 4, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 12, ptr %7) #7
  store i32 %32, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %10) #7
  %33 = getelementptr inbounds %class.PressureSolver, ptr %17, i32 0, i32 9
  %34 = load ptr, ptr %33, align 8, !tbaa !11
  %35 = load i32, ptr %5, align 4, !tbaa !9
  %36 = call { i64, i32 } @_ZN15GridIndexVector2atEi(ptr noundef nonnull align 8 dereferenceable(40) %34, i32 noundef %35)
  store { i64, i32 } %36, ptr %11, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %10, ptr align 8 %11, i64 12, i1 false)
  %37 = getelementptr inbounds %struct.GridIndex, ptr %10, i32 0, i32 1
  %38 = load i32, ptr %37, align 4, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #7
  store i32 %38, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %13) #7
  %39 = getelementptr inbounds %class.PressureSolver, ptr %17, i32 0, i32 9
  %40 = load ptr, ptr %39, align 8, !tbaa !11
  %41 = load i32, ptr %5, align 4, !tbaa !9
  %42 = call { i64, i32 } @_ZN15GridIndexVector2atEi(ptr noundef nonnull align 8 dereferenceable(40) %40, i32 noundef %41)
  store { i64, i32 } %42, ptr %14, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 8 %14, i64 12, i1 false)
  %43 = getelementptr inbounds %struct.GridIndex, ptr %13, i32 0, i32 2
  %44 = load i32, ptr %43, align 4, !tbaa !22
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #7
  store i32 %44, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %45 = load i32, ptr %6, align 4, !tbaa !9
  %46 = load i32, ptr %9, align 4, !tbaa !9
  %47 = load i32, ptr %12, align 4, !tbaa !9
  %48 = call noundef i32 @_ZN14PressureSolver18_GridToVectorIndexEiii(ptr noundef nonnull align 8 dereferenceable(144) %17, i32 noundef %45, i32 noundef %46, i32 noundef %47)
  store i32 %48, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %49 = load i32, ptr %6, align 4, !tbaa !9
  %50 = load i32, ptr %9, align 4, !tbaa !9
  %51 = load i32, ptr %12, align 4, !tbaa !9
  %52 = call noundef i32 @_ZN14PressureSolver31_getNumFluidOrAirCellNeighboursEiii(ptr noundef nonnull align 8 dereferenceable(144) %17, i32 noundef %49, i32 noundef %50, i32 noundef %51)
  store i32 %52, ptr %16, align 4, !tbaa !9
  %53 = load i32, ptr %16, align 4, !tbaa !9
  %54 = trunc i32 %53 to i8
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = getelementptr inbounds %class.MatrixCoefficients, ptr %55, i32 0, i32 0
  %57 = load i32, ptr %15, align 4, !tbaa !9
  %58 = sext i32 %57 to i64
  %59 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt6vectorI10MatrixCellSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %56, i64 noundef %58) #7
  %60 = getelementptr inbounds %struct.MatrixCell, ptr %59, i32 0, i32 0
  store i8 %54, ptr %60, align 1, !tbaa !23
  %61 = getelementptr inbounds %class.PressureSolver, ptr %17, i32 0, i32 10
  %62 = load ptr, ptr %61, align 8, !tbaa !25
  %63 = load i32, ptr %6, align 4, !tbaa !9
  %64 = add nsw i32 %63, 1
  %65 = load i32, ptr %9, align 4, !tbaa !9
  %66 = load i32, ptr %12, align 4, !tbaa !9
  %67 = call noundef zeroext i1 @_ZN17FluidMaterialGrid11isCellFluidEiii(ptr noundef nonnull align 8 dereferenceable(88) %62, i32 noundef %64, i32 noundef %65, i32 noundef %66)
  br i1 %67, label %68, label %75

68:                                               ; preds = %26
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = getelementptr inbounds %class.MatrixCoefficients, ptr %69, i32 0, i32 0
  %71 = load i32, ptr %15, align 4, !tbaa !9
  %72 = sext i32 %71 to i64
  %73 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt6vectorI10MatrixCellSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %70, i64 noundef %72) #7
  %74 = getelementptr inbounds %struct.MatrixCell, ptr %73, i32 0, i32 1
  store i8 1, ptr %74, align 1, !tbaa !26
  br label %75

75:                                               ; preds = %68, %26
  %76 = getelementptr inbounds %class.PressureSolver, ptr %17, i32 0, i32 10
  %77 = load ptr, ptr %76, align 8, !tbaa !25
  %78 = load i32, ptr %6, align 4, !tbaa !9
  %79 = load i32, ptr %9, align 4, !tbaa !9
  %80 = add nsw i32 %79, 1
  %81 = load i32, ptr %12, align 4, !tbaa !9
  %82 = call noundef zeroext i1 @_ZN17FluidMaterialGrid11isCellFluidEiii(ptr noundef nonnull align 8 dereferenceable(88) %77, i32 noundef %78, i32 noundef %80, i32 noundef %81)
  br i1 %82, label %83, label %90

83:                                               ; preds = %75
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = getelementptr inbounds %class.MatrixCoefficients, ptr %84, i32 0, i32 0
  %86 = load i32, ptr %15, align 4, !tbaa !9
  %87 = sext i32 %86 to i64
  %88 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt6vectorI10MatrixCellSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %85, i64 noundef %87) #7
  %89 = getelementptr inbounds %struct.MatrixCell, ptr %88, i32 0, i32 2
  store i8 1, ptr %89, align 1, !tbaa !27
  br label %90

90:                                               ; preds = %83, %75
  %91 = getelementptr inbounds %class.PressureSolver, ptr %17, i32 0, i32 10
  %92 = load ptr, ptr %91, align 8, !tbaa !25
  %93 = load i32, ptr %6, align 4, !tbaa !9
  %94 = load i32, ptr %9, align 4, !tbaa !9
  %95 = load i32, ptr %12, align 4, !tbaa !9
  %96 = add nsw i32 %95, 1
  %97 = call noundef zeroext i1 @_ZN17FluidMaterialGrid11isCellFluidEiii(ptr noundef nonnull align 8 dereferenceable(88) %92, i32 noundef %93, i32 noundef %94, i32 noundef %96)
  br i1 %97, label %98, label %105

98:                                               ; preds = %90
  %99 = load ptr, ptr %4, align 8, !tbaa !5
  %100 = getelementptr inbounds %class.MatrixCoefficients, ptr %99, i32 0, i32 0
  %101 = load i32, ptr %15, align 4, !tbaa !9
  %102 = sext i32 %101 to i64
  %103 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt6vectorI10MatrixCellSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %100, i64 noundef %102) #7
  %104 = getelementptr inbounds %struct.MatrixCell, ptr %103, i32 0, i32 3
  store i8 1, ptr %104, align 1, !tbaa !28
  br label %105

105:                                              ; preds = %98, %90
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %106

106:                                              ; preds = %105
  %107 = load i32, ptr %5, align 4, !tbaa !9
  %108 = add i32 %107, 1
  store i32 %108, ptr %5, align 4, !tbaa !9
  br label %18, !llvm.loop !29

109:                                              ; preds = %25
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN15GridIndexVector4sizeEv(ptr noundef nonnull align 8 dereferenceable(40)) #4 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN14PressureSolver31_getNumFluidOrAirCellNeighboursEiii(ptr noundef nonnull align 8 dereferenceable(144), i32 noundef, i32 noundef, i32 noundef) #3 align 2

declare noundef zeroext i1 @_ZN17FluidMaterialGrid11isCellFluidEiii(ptr noundef nonnull align 8 dereferenceable(88), i32 noundef, i32 noundef, i32 noundef) #6

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { 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 = { 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 = { "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, !6, i64 64}
!12 = !{!"_ZTS14PressureSolver", !10, i64 0, !10, i64 4, !10, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !10, i64 40, !13, i64 48, !10, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !14, i64 96}
!13 = !{!"double", !7, i64 0}
!14 = !{!"_ZTS15GridIndexKeyMap", !10, i64 0, !10, i64 4, !10, i64 8, !15, i64 16, !10, i64 40}
!15 = !{!"_ZTSSt6vectorIiSaIiEE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!20, !10, i64 0}
!20 = !{!"_ZTS9GridIndex", !10, i64 0, !10, i64 4, !10, i64 8}
!21 = !{!20, !10, i64 4}
!22 = !{!20, !10, i64 8}
!23 = !{!24, !7, i64 0}
!24 = !{!"_ZTS10MatrixCell", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3}
!25 = !{!12, !6, i64 72}
!26 = !{!24, !7, i64 1}
!27 = !{!24, !7, i64 2}
!28 = !{!24, !7, i64 3}
!29 = distinct !{!29, !30}
!30 = !{!"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"

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14PressureSolver28_calculateMatrixCoefficientsER18MatrixCoefficients(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef nonnull align 8 dereferenceable(24) %1) local_unnamed_addr #1 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 64
  %4 = load ptr, ptr %3, align 8, !tbaa !5
  %5 = tail call noundef i64 @_ZN15GridIndexVector4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %4)
  %.not = icmp eq i64 %5, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %2
  %6 = getelementptr inbounds i8, ptr %0, i64 72
  br label %7

._crit_edge:                                      ; preds = %39, %2
  ret void

7:                                                ; preds = %.lr.ph, %39
  %.041 = phi i32 [ 0, %.lr.ph ], [ %40, %39 ]
  %8 = load ptr, ptr %3, align 8, !tbaa !5
  %9 = tail call { i64, i32 } @_ZN15GridIndexVector2atEi(ptr noundef nonnull align 8 dereferenceable(40) %8, i32 noundef %.041)
  %.fca.0.extract21 = extractvalue { i64, i32 } %9, 0
  %.sroa.025.0.extract.trunc = trunc i64 %.fca.0.extract21 to i32
  %10 = load ptr, ptr %3, align 8, !tbaa !5
  %11 = tail call { i64, i32 } @_ZN15GridIndexVector2atEi(ptr noundef nonnull align 8 dereferenceable(40) %10, i32 noundef %.041)
  %.fca.0.extract11 = extractvalue { i64, i32 } %11, 0
  %.sroa.015.4.extract.shift = lshr i64 %.fca.0.extract11, 32
  %.sroa.015.4.extract.trunc = trunc nuw i64 %.sroa.015.4.extract.shift to i32
  %12 = load ptr, ptr %3, align 8, !tbaa !5
  %13 = tail call { i64, i32 } @_ZN15GridIndexVector2atEi(ptr noundef nonnull align 8 dereferenceable(40) %12, i32 noundef %.041)
  %.fca.1.extract = extractvalue { i64, i32 } %13, 1
  %14 = tail call noundef i32 @_ZN14PressureSolver18_GridToVectorIndexEiii(ptr noundef nonnull align 8 dereferenceable(144) %0, i32 noundef %.sroa.025.0.extract.trunc, i32 noundef %.sroa.015.4.extract.trunc, i32 noundef %.fca.1.extract)
  %15 = tail call noundef i32 @_ZN14PressureSolver31_getNumFluidOrAirCellNeighboursEiii(ptr noundef nonnull align 8 dereferenceable(144) %0, i32 noundef %.sroa.025.0.extract.trunc, i32 noundef %.sroa.015.4.extract.trunc, i32 noundef %.fca.1.extract)
  %16 = trunc i32 %15 to i8
  %17 = sext i32 %14 to i64
  %18 = tail call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt6vectorI10MatrixCellSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %17) #5
  store i8 %16, ptr %18, align 1, !tbaa !17
  %19 = load ptr, ptr %6, align 8, !tbaa !19
  %20 = add nsw i32 %.sroa.025.0.extract.trunc, 1
  %21 = tail call noundef zeroext i1 @_ZN17FluidMaterialGrid11isCellFluidEiii(ptr noundef nonnull align 8 dereferenceable(88) %19, i32 noundef %20, i32 noundef %.sroa.015.4.extract.trunc, i32 noundef %.fca.1.extract)
  br i1 %21, label %22, label %25

22:                                               ; preds = %7
  %23 = tail call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt6vectorI10MatrixCellSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %17) #5
  %24 = getelementptr inbounds i8, ptr %23, i64 1
  store i8 1, ptr %24, align 1, !tbaa !20
  br label %25

25:                                               ; preds = %22, %7
  %26 = load ptr, ptr %6, align 8, !tbaa !19
  %27 = add nsw i32 %.sroa.015.4.extract.trunc, 1
  %28 = tail call noundef zeroext i1 @_ZN17FluidMaterialGrid11isCellFluidEiii(ptr noundef nonnull align 8 dereferenceable(88) %26, i32 noundef %.sroa.025.0.extract.trunc, i32 noundef %27, i32 noundef %.fca.1.extract)
  br i1 %28, label %29, label %32

29:                                               ; preds = %25
  %30 = tail call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt6vectorI10MatrixCellSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %17) #5
  %31 = getelementptr inbounds i8, ptr %30, i64 2
  store i8 1, ptr %31, align 1, !tbaa !21
  br label %32

32:                                               ; preds = %29, %25
  %33 = load ptr, ptr %6, align 8, !tbaa !19
  %34 = add nsw i32 %.fca.1.extract, 1
  %35 = tail call noundef zeroext i1 @_ZN17FluidMaterialGrid11isCellFluidEiii(ptr noundef nonnull align 8 dereferenceable(88) %33, i32 noundef %.sroa.025.0.extract.trunc, i32 noundef %.sroa.015.4.extract.trunc, i32 noundef %34)
  br i1 %35, label %36, label %39

36:                                               ; preds = %32
  %37 = tail call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt6vectorI10MatrixCellSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %17) #5
  %38 = getelementptr inbounds i8, ptr %37, i64 3
  store i8 1, ptr %38, align 1, !tbaa !22
  br label %39

39:                                               ; preds = %36, %32
  %40 = add i32 %.041, 1
  %41 = zext i32 %40 to i64
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = tail call noundef i64 @_ZN15GridIndexVector4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %42)
  %44 = icmp ugt i64 %43, %41
  br i1 %44, label %7, label %._crit_edge, !llvm.loop !23
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { i64, i32 } @_ZN15GridIndexVector2atEi(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN14PressureSolver18_GridToVectorIndexEiii(ptr noundef nonnull align 8 dereferenceable(144), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN14PressureSolver31_getNumFluidOrAirCellNeighboursEiii(ptr noundef nonnull align 8 dereferenceable(144), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1 align 2

declare noundef zeroext i1 @_ZN17FluidMaterialGrid11isCellFluidEiii(ptr noundef nonnull align 8 dereferenceable(88), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #4

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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { 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 #4 = { "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 = { 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, !11, i64 64}
!6 = !{!"_ZTS14PressureSolver", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !7, i64 40, !10, i64 48, !7, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !12, i64 96}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"_ZTS15GridIndexKeyMap", !7, i64 0, !7, i64 4, !7, i64 8, !13, i64 16, !7, i64 40}
!13 = !{!"_ZTSSt6vectorIiSaIiEE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!17 = !{!18, !8, i64 0}
!18 = !{!"_ZTS10MatrixCell", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3}
!19 = !{!6, !11, i64 72}
!20 = !{!18, !8, i64 1}
!21 = !{!18, !8, i64 2}
!22 = !{!18, !8, i64 3}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}


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