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

; 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 }

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14PressureSolver34_calculateNegativeDivergenceVectorER8VectorXd(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef nonnull align 8 dereferenceable(24) %1) #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca double, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %struct.GridIndex, align 4
  %9 = alloca { i64, i32 }, align 8
  %10 = alloca i32, align 4
  %11 = alloca %struct.GridIndex, align 4
  %12 = alloca { i64, i32 }, align 8
  %13 = alloca i32, align 4
  %14 = alloca %struct.GridIndex, align 4
  %15 = alloca { i64, i32 }, align 8
  %16 = alloca double, align 8
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca float, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca %struct.GridIndex, align 4
  %23 = alloca { i64, i32 }, align 8
  %24 = alloca i32, align 4
  %25 = alloca %struct.GridIndex, align 4
  %26 = alloca { i64, i32 }, align 8
  %27 = alloca i32, align 4
  %28 = alloca %struct.GridIndex, align 4
  %29 = alloca { i64, i32 }, align 8
  %30 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %31 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %32 = getelementptr inbounds %class.PressureSolver, ptr %31, i32 0, i32 3
  %33 = load double, ptr %32, align 8, !tbaa !9
  %34 = fptrunc double %33 to float
  %35 = fdiv float 1.000000e+00, %34
  %36 = fpext float %35 to double
  store double %36, ptr %5, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !19
  br label %37

37:                                               ; preds = %119, %2
  %38 = load i32, ptr %6, align 4, !tbaa !19
  %39 = zext i32 %38 to i64
  %40 = getelementptr inbounds %class.PressureSolver, ptr %31, i32 0, i32 9
  %41 = load ptr, ptr %40, align 8, !tbaa !20
  %42 = call noundef i64 @_ZN15GridIndexVector4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %41)
  %43 = icmp ult i64 %39, %42
  br i1 %43, label %45, label %44

44:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %122

45:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %8) #6
  %46 = getelementptr inbounds %class.PressureSolver, ptr %31, i32 0, i32 9
  %47 = load ptr, ptr %46, align 8, !tbaa !20
  %48 = load i32, ptr %6, align 4, !tbaa !19
  %49 = call { i64, i32 } @_ZN15GridIndexVector2atEi(ptr noundef nonnull align 8 dereferenceable(40) %47, i32 noundef %48)
  store { i64, i32 } %49, ptr %9, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 8 %9, i64 12, i1 false)
  %50 = getelementptr inbounds %struct.GridIndex, ptr %8, i32 0, i32 0
  %51 = load i32, ptr %50, align 4, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 12, ptr %8) #6
  store i32 %51, ptr %7, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %11) #6
  %52 = getelementptr inbounds %class.PressureSolver, ptr %31, i32 0, i32 9
  %53 = load ptr, ptr %52, align 8, !tbaa !20
  %54 = load i32, ptr %6, align 4, !tbaa !19
  %55 = call { i64, i32 } @_ZN15GridIndexVector2atEi(ptr noundef nonnull align 8 dereferenceable(40) %53, i32 noundef %54)
  store { i64, i32 } %55, ptr %12, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 8 %12, i64 12, i1 false)
  %56 = getelementptr inbounds %struct.GridIndex, ptr %11, i32 0, i32 1
  %57 = load i32, ptr %56, align 4, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #6
  store i32 %57, ptr %10, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %14) #6
  %58 = getelementptr inbounds %class.PressureSolver, ptr %31, i32 0, i32 9
  %59 = load ptr, ptr %58, align 8, !tbaa !20
  %60 = load i32, ptr %6, align 4, !tbaa !19
  %61 = call { i64, i32 } @_ZN15GridIndexVector2atEi(ptr noundef nonnull align 8 dereferenceable(40) %59, i32 noundef %60)
  store { i64, i32 } %61, ptr %15, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 8 %15, i64 12, i1 false)
  %62 = getelementptr inbounds %struct.GridIndex, ptr %14, i32 0, i32 2
  %63 = load i32, ptr %62, align 4, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 12, ptr %14) #6
  store i32 %63, ptr %13, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %64 = load double, ptr %5, align 8, !tbaa !18
  %65 = fneg double %64
  %66 = getelementptr inbounds %class.PressureSolver, ptr %31, i32 0, i32 11
  %67 = load ptr, ptr %66, align 8, !tbaa !25
  %68 = load i32, ptr %7, align 4, !tbaa !19
  %69 = add nsw i32 %68, 1
  %70 = load i32, ptr %10, align 4, !tbaa !19
  %71 = load i32, ptr %13, align 4, !tbaa !19
  %72 = call noundef float @_ZN16MACVelocityField1UEiii(ptr noundef nonnull align 8 dereferenceable(148) %67, i32 noundef %69, i32 noundef %70, i32 noundef %71)
  %73 = getelementptr inbounds %class.PressureSolver, ptr %31, i32 0, i32 11
  %74 = load ptr, ptr %73, align 8, !tbaa !25
  %75 = load i32, ptr %7, align 4, !tbaa !19
  %76 = load i32, ptr %10, align 4, !tbaa !19
  %77 = load i32, ptr %13, align 4, !tbaa !19
  %78 = call noundef float @_ZN16MACVelocityField1UEiii(ptr noundef nonnull align 8 dereferenceable(148) %74, i32 noundef %75, i32 noundef %76, i32 noundef %77)
  %79 = fsub float %72, %78
  %80 = getelementptr inbounds %class.PressureSolver, ptr %31, i32 0, i32 11
  %81 = load ptr, ptr %80, align 8, !tbaa !25
  %82 = load i32, ptr %7, align 4, !tbaa !19
  %83 = load i32, ptr %10, align 4, !tbaa !19
  %84 = add nsw i32 %83, 1
  %85 = load i32, ptr %13, align 4, !tbaa !19
  %86 = call noundef float @_ZN16MACVelocityField1VEiii(ptr noundef nonnull align 8 dereferenceable(148) %81, i32 noundef %82, i32 noundef %84, i32 noundef %85)
  %87 = fadd float %79, %86
  %88 = getelementptr inbounds %class.PressureSolver, ptr %31, i32 0, i32 11
  %89 = load ptr, ptr %88, align 8, !tbaa !25
  %90 = load i32, ptr %7, align 4, !tbaa !19
  %91 = load i32, ptr %10, align 4, !tbaa !19
  %92 = load i32, ptr %13, align 4, !tbaa !19
  %93 = call noundef float @_ZN16MACVelocityField1VEiii(ptr noundef nonnull align 8 dereferenceable(148) %89, i32 noundef %90, i32 noundef %91, i32 noundef %92)
  %94 = fsub float %87, %93
  %95 = getelementptr inbounds %class.PressureSolver, ptr %31, i32 0, i32 11
  %96 = load ptr, ptr %95, align 8, !tbaa !25
  %97 = load i32, ptr %7, align 4, !tbaa !19
  %98 = load i32, ptr %10, align 4, !tbaa !19
  %99 = load i32, ptr %13, align 4, !tbaa !19
  %100 = add nsw i32 %99, 1
  %101 = call noundef float @_ZN16MACVelocityField1WEiii(ptr noundef nonnull align 8 dereferenceable(148) %96, i32 noundef %97, i32 noundef %98, i32 noundef %100)
  %102 = fadd float %94, %101
  %103 = getelementptr inbounds %class.PressureSolver, ptr %31, i32 0, i32 11
  %104 = load ptr, ptr %103, align 8, !tbaa !25
  %105 = load i32, ptr %7, align 4, !tbaa !19
  %106 = load i32, ptr %10, align 4, !tbaa !19
  %107 = load i32, ptr %13, align 4, !tbaa !19
  %108 = call noundef float @_ZN16MACVelocityField1WEiii(ptr noundef nonnull align 8 dereferenceable(148) %104, i32 noundef %105, i32 noundef %106, i32 noundef %107)
  %109 = fsub float %102, %108
  %110 = fpext float %109 to double
  %111 = fmul double %65, %110
  store double %111, ptr %16, align 8, !tbaa !18
  %112 = load double, ptr %16, align 8, !tbaa !18
  %113 = load ptr, ptr %4, align 8, !tbaa !5
  %114 = load i32, ptr %7, align 4, !tbaa !19
  %115 = load i32, ptr %10, align 4, !tbaa !19
  %116 = load i32, ptr %13, align 4, !tbaa !19
  %117 = call noundef i32 @_ZN14PressureSolver18_GridToVectorIndexEiii(ptr noundef nonnull align 8 dereferenceable(144) %31, i32 noundef %114, i32 noundef %115, i32 noundef %116)
  %118 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8VectorXdixEi(ptr noundef nonnull align 8 dereferenceable(24) %113, i32 noundef %117)
  store double %112, ptr %118, align 8, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %119

119:                                              ; preds = %45
  %120 = load i32, ptr %6, align 4, !tbaa !19
  %121 = add i32 %120, 1
  store i32 %121, ptr %6, align 4, !tbaa !19
  br label %37, !llvm.loop !26

122:                                              ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store float 0.000000e+00, ptr %17, align 4, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store float 0.000000e+00, ptr %18, align 4, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store float 0.000000e+00, ptr %19, align 4, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 0, ptr %20, align 4, !tbaa !19
  br label %123

123:                                              ; preds = %313, %122
  %124 = load i32, ptr %20, align 4, !tbaa !19
  %125 = zext i32 %124 to i64
  %126 = getelementptr inbounds %class.PressureSolver, ptr %31, i32 0, i32 9
  %127 = load ptr, ptr %126, align 8, !tbaa !20
  %128 = call noundef i64 @_ZN15GridIndexVector4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %127)
  %129 = icmp ult i64 %125, %128
  br i1 %129, label %131, label %130

130:                                              ; preds = %123
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %316

131:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %22) #6
  %132 = getelementptr inbounds %class.PressureSolver, ptr %31, i32 0, i32 9
  %133 = load ptr, ptr %132, align 8, !tbaa !20
  %134 = load i32, ptr %20, align 4, !tbaa !19
  %135 = call { i64, i32 } @_ZN15GridIndexVector2atEi(ptr noundef nonnull align 8 dereferenceable(40) %133, i32 noundef %134)
  store { i64, i32 } %135, ptr %23, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 8 %23, i64 12, i1 false)
  %136 = getelementptr inbounds %struct.GridIndex, ptr %22, i32 0, i32 0
  %137 = load i32, ptr %136, align 4, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 12, ptr %22) #6
  store i32 %137, ptr %21, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %25) #6
  %138 = getelementptr inbounds %class.PressureSolver, ptr %31, i32 0, i32 9
  %139 = load ptr, ptr %138, align 8, !tbaa !20
  %140 = load i32, ptr %20, align 4, !tbaa !19
  %141 = call { i64, i32 } @_ZN15GridIndexVector2atEi(ptr noundef nonnull align 8 dereferenceable(40) %139, i32 noundef %140)
  store { i64, i32 } %141, ptr %26, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %25, ptr align 8 %26, i64 12, i1 false)
  %142 = getelementptr inbounds %struct.GridIndex, ptr %25, i32 0, i32 1
  %143 = load i32, ptr %142, align 4, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 12, ptr %25) #6
  store i32 %143, ptr %24, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %28) #6
  %144 = getelementptr inbounds %class.PressureSolver, ptr %31, i32 0, i32 9
  %145 = load ptr, ptr %144, align 8, !tbaa !20
  %146 = load i32, ptr %20, align 4, !tbaa !19
  %147 = call { i64, i32 } @_ZN15GridIndexVector2atEi(ptr noundef nonnull align 8 dereferenceable(40) %145, i32 noundef %146)
  store { i64, i32 } %147, ptr %29, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %28, ptr align 8 %29, i64 12, i1 false)
  %148 = getelementptr inbounds %struct.GridIndex, ptr %28, i32 0, i32 2
  %149 = load i32, ptr %148, align 4, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 12, ptr %28) #6
  store i32 %149, ptr %27, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  %150 = load i32, ptr %21, align 4, !tbaa !19
  %151 = load i32, ptr %24, align 4, !tbaa !19
  %152 = load i32, ptr %27, align 4, !tbaa !19
  %153 = call noundef i32 @_ZN14PressureSolver18_GridToVectorIndexEiii(ptr noundef nonnull align 8 dereferenceable(144) %31, i32 noundef %150, i32 noundef %151, i32 noundef %152)
  store i32 %153, ptr %30, align 4, !tbaa !19
  %154 = getelementptr inbounds %class.PressureSolver, ptr %31, i32 0, i32 10
  %155 = load ptr, ptr %154, align 8, !tbaa !30
  %156 = load i32, ptr %21, align 4, !tbaa !19
  %157 = sub nsw i32 %156, 1
  %158 = load i32, ptr %24, align 4, !tbaa !19
  %159 = load i32, ptr %27, align 4, !tbaa !19
  %160 = call noundef zeroext i1 @_ZN17FluidMaterialGrid11isCellSolidEiii(ptr noundef nonnull align 8 dereferenceable(88) %155, i32 noundef %157, i32 noundef %158, i32 noundef %159)
  br i1 %160, label %161, label %179

161:                                              ; preds = %131
  %162 = load double, ptr %5, align 8, !tbaa !18
  %163 = fptrunc double %162 to float
  %164 = getelementptr inbounds %class.PressureSolver, ptr %31, i32 0, i32 11
  %165 = load ptr, ptr %164, align 8, !tbaa !25
  %166 = load i32, ptr %21, align 4, !tbaa !19
  %167 = load i32, ptr %24, align 4, !tbaa !19
  %168 = load i32, ptr %27, align 4, !tbaa !19
  %169 = call noundef float @_ZN16MACVelocityField1UEiii(ptr noundef nonnull align 8 dereferenceable(148) %165, i32 noundef %166, i32 noundef %167, i32 noundef %168)
  %170 = load float, ptr %17, align 4, !tbaa !28
  %171 = fsub float %169, %170
  %172 = fmul float %163, %171
  %173 = fpext float %172 to double
  %174 = load ptr, ptr %4, align 8, !tbaa !5
  %175 = load i32, ptr %30, align 4, !tbaa !19
  %176 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8VectorXdixEi(ptr noundef nonnull align 8 dereferenceable(24) %174, i32 noundef %175)
  %177 = load double, ptr %176, align 8, !tbaa !18
  %178 = fsub double %177, %173
  store double %178, ptr %176, align 8, !tbaa !18
  br label %179

179:                                              ; preds = %161, %131
  %180 = getelementptr inbounds %class.PressureSolver, ptr %31, i32 0, i32 10
  %181 = load ptr, ptr %180, align 8, !tbaa !30
  %182 = load i32, ptr %21, align 4, !tbaa !19
  %183 = add nsw i32 %182, 1
  %184 = load i32, ptr %24, align 4, !tbaa !19
  %185 = load i32, ptr %27, align 4, !tbaa !19
  %186 = call noundef zeroext i1 @_ZN17FluidMaterialGrid11isCellSolidEiii(ptr noundef nonnull align 8 dereferenceable(88) %181, i32 noundef %183, i32 noundef %184, i32 noundef %185)
  br i1 %186, label %187, label %206

187:                                              ; preds = %179
  %188 = load double, ptr %5, align 8, !tbaa !18
  %189 = fptrunc double %188 to float
  %190 = getelementptr inbounds %class.PressureSolver, ptr %31, i32 0, i32 11
  %191 = load ptr, ptr %190, align 8, !tbaa !25
  %192 = load i32, ptr %21, align 4, !tbaa !19
  %193 = add nsw i32 %192, 1
  %194 = load i32, ptr %24, align 4, !tbaa !19
  %195 = load i32, ptr %27, align 4, !tbaa !19
  %196 = call noundef float @_ZN16MACVelocityField1UEiii(ptr noundef nonnull align 8 dereferenceable(148) %191, i32 noundef %193, i32 noundef %194, i32 noundef %195)
  %197 = load float, ptr %17, align 4, !tbaa !28
  %198 = fsub float %196, %197
  %199 = fmul float %189, %198
  %200 = fpext float %199 to double
  %201 = load ptr, ptr %4, align 8, !tbaa !5
  %202 = load i32, ptr %30, align 4, !tbaa !19
  %203 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8VectorXdixEi(ptr noundef nonnull align 8 dereferenceable(24) %201, i32 noundef %202)
  %204 = load double, ptr %203, align 8, !tbaa !18
  %205 = fadd double %204, %200
  store double %205, ptr %203, align 8, !tbaa !18
  br label %206

206:                                              ; preds = %187, %179
  %207 = getelementptr inbounds %class.PressureSolver, ptr %31, i32 0, i32 10
  %208 = load ptr, ptr %207, align 8, !tbaa !30
  %209 = load i32, ptr %21, align 4, !tbaa !19
  %210 = load i32, ptr %24, align 4, !tbaa !19
  %211 = sub nsw i32 %210, 1
  %212 = load i32, ptr %27, align 4, !tbaa !19
  %213 = call noundef zeroext i1 @_ZN17FluidMaterialGrid11isCellSolidEiii(ptr noundef nonnull align 8 dereferenceable(88) %208, i32 noundef %209, i32 noundef %211, i32 noundef %212)
  br i1 %213, label %214, label %232

214:                                              ; preds = %206
  %215 = load double, ptr %5, align 8, !tbaa !18
  %216 = fptrunc double %215 to float
  %217 = getelementptr inbounds %class.PressureSolver, ptr %31, i32 0, i32 11
  %218 = load ptr, ptr %217, align 8, !tbaa !25
  %219 = load i32, ptr %21, align 4, !tbaa !19
  %220 = load i32, ptr %24, align 4, !tbaa !19
  %221 = load i32, ptr %27, align 4, !tbaa !19
  %222 = call noundef float @_ZN16MACVelocityField1VEiii(ptr noundef nonnull align 8 dereferenceable(148) %218, i32 noundef %219, i32 noundef %220, i32 noundef %221)
  %223 = load float, ptr %18, align 4, !tbaa !28
  %224 = fsub float %222, %223
  %225 = fmul float %216, %224
  %226 = fpext float %225 to double
  %227 = load ptr, ptr %4, align 8, !tbaa !5
  %228 = load i32, ptr %30, align 4, !tbaa !19
  %229 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8VectorXdixEi(ptr noundef nonnull align 8 dereferenceable(24) %227, i32 noundef %228)
  %230 = load double, ptr %229, align 8, !tbaa !18
  %231 = fsub double %230, %226
  store double %231, ptr %229, align 8, !tbaa !18
  br label %232

232:                                              ; preds = %214, %206
  %233 = getelementptr inbounds %class.PressureSolver, ptr %31, i32 0, i32 10
  %234 = load ptr, ptr %233, align 8, !tbaa !30
  %235 = load i32, ptr %21, align 4, !tbaa !19
  %236 = load i32, ptr %24, align 4, !tbaa !19
  %237 = add nsw i32 %236, 1
  %238 = load i32, ptr %27, align 4, !tbaa !19
  %239 = call noundef zeroext i1 @_ZN17FluidMaterialGrid11isCellSolidEiii(ptr noundef nonnull align 8 dereferenceable(88) %234, i32 noundef %235, i32 noundef %237, i32 noundef %238)
  br i1 %239, label %240, label %259

240:                                              ; preds = %232
  %241 = load double, ptr %5, align 8, !tbaa !18
  %242 = fptrunc double %241 to float
  %243 = getelementptr inbounds %class.PressureSolver, ptr %31, i32 0, i32 11
  %244 = load ptr, ptr %243, align 8, !tbaa !25
  %245 = load i32, ptr %21, align 4, !tbaa !19
  %246 = load i32, ptr %24, align 4, !tbaa !19
  %247 = add nsw i32 %246, 1
  %248 = load i32, ptr %27, align 4, !tbaa !19
  %249 = call noundef float @_ZN16MACVelocityField1VEiii(ptr noundef nonnull align 8 dereferenceable(148) %244, i32 noundef %245, i32 noundef %247, i32 noundef %248)
  %250 = load float, ptr %18, align 4, !tbaa !28
  %251 = fsub float %249, %250
  %252 = fmul float %242, %251
  %253 = fpext float %252 to double
  %254 = load ptr, ptr %4, align 8, !tbaa !5
  %255 = load i32, ptr %30, align 4, !tbaa !19
  %256 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8VectorXdixEi(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %255)
  %257 = load double, ptr %256, align 8, !tbaa !18
  %258 = fadd double %257, %253
  store double %258, ptr %256, align 8, !tbaa !18
  br label %259

259:                                              ; preds = %240, %232
  %260 = getelementptr inbounds %class.PressureSolver, ptr %31, i32 0, i32 10
  %261 = load ptr, ptr %260, align 8, !tbaa !30
  %262 = load i32, ptr %21, align 4, !tbaa !19
  %263 = load i32, ptr %24, align 4, !tbaa !19
  %264 = load i32, ptr %27, align 4, !tbaa !19
  %265 = sub nsw i32 %264, 1
  %266 = call noundef zeroext i1 @_ZN17FluidMaterialGrid11isCellSolidEiii(ptr noundef nonnull align 8 dereferenceable(88) %261, i32 noundef %262, i32 noundef %263, i32 noundef %265)
  br i1 %266, label %267, label %285

267:                                              ; preds = %259
  %268 = load double, ptr %5, align 8, !tbaa !18
  %269 = fptrunc double %268 to float
  %270 = getelementptr inbounds %class.PressureSolver, ptr %31, i32 0, i32 11
  %271 = load ptr, ptr %270, align 8, !tbaa !25
  %272 = load i32, ptr %21, align 4, !tbaa !19
  %273 = load i32, ptr %24, align 4, !tbaa !19
  %274 = load i32, ptr %27, align 4, !tbaa !19
  %275 = call noundef float @_ZN16MACVelocityField1WEiii(ptr noundef nonnull align 8 dereferenceable(148) %271, i32 noundef %272, i32 noundef %273, i32 noundef %274)
  %276 = load float, ptr %19, align 4, !tbaa !28
  %277 = fsub float %275, %276
  %278 = fmul float %269, %277
  %279 = fpext float %278 to double
  %280 = load ptr, ptr %4, align 8, !tbaa !5
  %281 = load i32, ptr %30, align 4, !tbaa !19
  %282 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8VectorXdixEi(ptr noundef nonnull align 8 dereferenceable(24) %280, i32 noundef %281)
  %283 = load double, ptr %282, align 8, !tbaa !18
  %284 = fsub double %283, %279
  store double %284, ptr %282, align 8, !tbaa !18
  br label %285

285:                                              ; preds = %267, %259
  %286 = getelementptr inbounds %class.PressureSolver, ptr %31, i32 0, i32 10
  %287 = load ptr, ptr %286, align 8, !tbaa !30
  %288 = load i32, ptr %21, align 4, !tbaa !19
  %289 = load i32, ptr %24, align 4, !tbaa !19
  %290 = load i32, ptr %27, align 4, !tbaa !19
  %291 = add nsw i32 %290, 1
  %292 = call noundef zeroext i1 @_ZN17FluidMaterialGrid11isCellSolidEiii(ptr noundef nonnull align 8 dereferenceable(88) %287, i32 noundef %288, i32 noundef %289, i32 noundef %291)
  br i1 %292, label %293, label %312

293:                                              ; preds = %285
  %294 = load double, ptr %5, align 8, !tbaa !18
  %295 = fptrunc double %294 to float
  %296 = getelementptr inbounds %class.PressureSolver, ptr %31, i32 0, i32 11
  %297 = load ptr, ptr %296, align 8, !tbaa !25
  %298 = load i32, ptr %21, align 4, !tbaa !19
  %299 = load i32, ptr %24, align 4, !tbaa !19
  %300 = load i32, ptr %27, align 4, !tbaa !19
  %301 = add nsw i32 %300, 1
  %302 = call noundef float @_ZN16MACVelocityField1WEiii(ptr noundef nonnull align 8 dereferenceable(148) %297, i32 noundef %298, i32 noundef %299, i32 noundef %301)
  %303 = load float, ptr %19, align 4, !tbaa !28
  %304 = fsub float %302, %303
  %305 = fmul float %295, %304
  %306 = fpext float %305 to double
  %307 = load ptr, ptr %4, align 8, !tbaa !5
  %308 = load i32, ptr %30, align 4, !tbaa !19
  %309 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8VectorXdixEi(ptr noundef nonnull align 8 dereferenceable(24) %307, i32 noundef %308)
  %310 = load double, ptr %309, align 8, !tbaa !18
  %311 = fadd double %310, %306
  store double %311, ptr %309, align 8, !tbaa !18
  br label %312

312:                                              ; preds = %293, %285
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %313

313:                                              ; preds = %312
  %314 = load i32, ptr %20, align 4, !tbaa !19
  %315 = add i32 %314, 1
  store i32 %315, ptr %20, align 4, !tbaa !19
  br label %123, !llvm.loop !31

316:                                              ; preds = %130
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  ret void
}

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

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

declare noundef float @_ZN16MACVelocityField1UEiii(ptr noundef nonnull align 8 dereferenceable(148), i32 noundef, i32 noundef, i32 noundef) #5

declare noundef float @_ZN16MACVelocityField1VEiii(ptr noundef nonnull align 8 dereferenceable(148), i32 noundef, i32 noundef, i32 noundef) #5

declare noundef float @_ZN16MACVelocityField1WEiii(ptr noundef nonnull align 8 dereferenceable(148), i32 noundef, i32 noundef, i32 noundef) #5

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #5 = { "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, !12, i64 16}
!10 = !{!"_ZTS14PressureSolver", !11, i64 0, !11, i64 4, !11, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !11, i64 40, !12, i64 48, !11, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !13, i64 96}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!"_ZTS15GridIndexKeyMap", !11, i64 0, !11, i64 4, !11, i64 8, !14, i64 16, !11, i64 40}
!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 = !{!12, !12, i64 0}
!19 = !{!11, !11, i64 0}
!20 = !{!10, !6, i64 64}
!21 = !{!22, !11, i64 0}
!22 = !{!"_ZTS9GridIndex", !11, i64 0, !11, i64 4, !11, i64 8}
!23 = !{!22, !11, i64 4}
!24 = !{!22, !11, i64 8}
!25 = !{!10, !6, i64 80}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!29, !29, i64 0}
!29 = !{!"float", !7, i64 0}
!30 = !{!10, !6, i64 72}
!31 = distinct !{!31, !27}


; 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 uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN8VectorXdixEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14PressureSolver34_calculateNegativeDivergenceVectorER8VectorXd(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef nonnull align 8 dereferenceable(24) %1) local_unnamed_addr #0 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 16
  %4 = load double, ptr %3, align 8, !tbaa !5
  %5 = fptrunc double %4 to float
  %6 = fdiv float 1.000000e+00, %5
  %7 = getelementptr inbounds i8, ptr %0, i64 64
  %8 = load ptr, ptr %7, align 8, !tbaa !17
  %9 = tail call noundef i64 @_ZN15GridIndexVector4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %8)
  %.not = icmp eq i64 %9, 0
  br i1 %.not, label %.preheader, label %.lr.ph

.lr.ph:                                           ; preds = %2
  %10 = fpext float %6 to double
  %11 = fneg double %10
  %12 = getelementptr inbounds i8, ptr %0, i64 80
  br label %17

.preheader:                                       ; preds = %17, %2
  %13 = load ptr, ptr %7, align 8, !tbaa !17
  %14 = tail call noundef i64 @_ZN15GridIndexVector4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %13)
  %.not131 = icmp eq i64 %14, 0
  br i1 %.not131, label %._crit_edge, label %.lr.ph130

.lr.ph130:                                        ; preds = %.preheader
  %15 = getelementptr inbounds i8, ptr %0, i64 72
  %16 = getelementptr inbounds i8, ptr %0, i64 80
  br label %53

17:                                               ; preds = %.lr.ph, %17
  %.0128 = phi i32 [ 0, %.lr.ph ], [ %48, %17 ]
  %18 = load ptr, ptr %7, align 8, !tbaa !17
  %19 = tail call { i64, i32 } @_ZN15GridIndexVector2atEi(ptr noundef nonnull align 8 dereferenceable(40) %18, i32 noundef %.0128)
  %.fca.0.extract94 = extractvalue { i64, i32 } %19, 0
  %.sroa.098.0.extract.trunc = trunc i64 %.fca.0.extract94 to i32
  %20 = load ptr, ptr %7, align 8, !tbaa !17
  %21 = tail call { i64, i32 } @_ZN15GridIndexVector2atEi(ptr noundef nonnull align 8 dereferenceable(40) %20, i32 noundef %.0128)
  %.fca.0.extract81 = extractvalue { i64, i32 } %21, 0
  %.sroa.085.4.extract.shift = lshr i64 %.fca.0.extract81, 32
  %.sroa.085.4.extract.trunc = trunc nuw i64 %.sroa.085.4.extract.shift to i32
  %22 = load ptr, ptr %7, align 8, !tbaa !17
  %23 = tail call { i64, i32 } @_ZN15GridIndexVector2atEi(ptr noundef nonnull align 8 dereferenceable(40) %22, i32 noundef %.0128)
  %.fca.1.extract69 = extractvalue { i64, i32 } %23, 1
  %24 = load ptr, ptr %12, align 8, !tbaa !18
  %25 = add nsw i32 %.sroa.098.0.extract.trunc, 1
  %26 = tail call noundef float @_ZN16MACVelocityField1UEiii(ptr noundef nonnull align 8 dereferenceable(148) %24, i32 noundef %25, i32 noundef %.sroa.085.4.extract.trunc, i32 noundef %.fca.1.extract69)
  %27 = load ptr, ptr %12, align 8, !tbaa !18
  %28 = tail call noundef float @_ZN16MACVelocityField1UEiii(ptr noundef nonnull align 8 dereferenceable(148) %27, i32 noundef %.sroa.098.0.extract.trunc, i32 noundef %.sroa.085.4.extract.trunc, i32 noundef %.fca.1.extract69)
  %29 = fsub float %26, %28
  %30 = load ptr, ptr %12, align 8, !tbaa !18
  %31 = add nsw i32 %.sroa.085.4.extract.trunc, 1
  %32 = tail call noundef float @_ZN16MACVelocityField1VEiii(ptr noundef nonnull align 8 dereferenceable(148) %30, i32 noundef %.sroa.098.0.extract.trunc, i32 noundef %31, i32 noundef %.fca.1.extract69)
  %33 = fadd float %29, %32
  %34 = load ptr, ptr %12, align 8, !tbaa !18
  %35 = tail call noundef float @_ZN16MACVelocityField1VEiii(ptr noundef nonnull align 8 dereferenceable(148) %34, i32 noundef %.sroa.098.0.extract.trunc, i32 noundef %.sroa.085.4.extract.trunc, i32 noundef %.fca.1.extract69)
  %36 = fsub float %33, %35
  %37 = load ptr, ptr %12, align 8, !tbaa !18
  %38 = add nsw i32 %.fca.1.extract69, 1
  %39 = tail call noundef float @_ZN16MACVelocityField1WEiii(ptr noundef nonnull align 8 dereferenceable(148) %37, i32 noundef %.sroa.098.0.extract.trunc, i32 noundef %.sroa.085.4.extract.trunc, i32 noundef %38)
  %40 = fadd float %36, %39
  %41 = load ptr, ptr %12, align 8, !tbaa !18
  %42 = tail call noundef float @_ZN16MACVelocityField1WEiii(ptr noundef nonnull align 8 dereferenceable(148) %41, i32 noundef %.sroa.098.0.extract.trunc, i32 noundef %.sroa.085.4.extract.trunc, i32 noundef %.fca.1.extract69)
  %43 = fsub float %40, %42
  %44 = fpext float %43 to double
  %45 = fmul double %11, %44
  %46 = tail call noundef i32 @_ZN14PressureSolver18_GridToVectorIndexEiii(ptr noundef nonnull align 8 dereferenceable(144) %0, i32 noundef %.sroa.098.0.extract.trunc, i32 noundef %.sroa.085.4.extract.trunc, i32 noundef %.fca.1.extract69)
  %47 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8VectorXdixEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %46)
  store double %45, ptr %47, align 8, !tbaa !19
  %48 = add i32 %.0128, 1
  %49 = zext i32 %48 to i64
  %50 = load ptr, ptr %7, align 8, !tbaa !17
  %51 = tail call noundef i64 @_ZN15GridIndexVector4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %50)
  %52 = icmp ugt i64 %51, %49
  br i1 %52, label %17, label %.preheader, !llvm.loop !20

._crit_edge:                                      ; preds = %132, %.preheader
  ret void

53:                                               ; preds = %.lr.ph130, %132
  %.0127129 = phi i32 [ 0, %.lr.ph130 ], [ %133, %132 ]
  %54 = load ptr, ptr %7, align 8, !tbaa !17
  %55 = tail call { i64, i32 } @_ZN15GridIndexVector2atEi(ptr noundef nonnull align 8 dereferenceable(40) %54, i32 noundef %.0127129)
  %.fca.0.extract38 = extractvalue { i64, i32 } %55, 0
  %.sroa.042.0.extract.trunc = trunc i64 %.fca.0.extract38 to i32
  %56 = load ptr, ptr %7, align 8, !tbaa !17
  %57 = tail call { i64, i32 } @_ZN15GridIndexVector2atEi(ptr noundef nonnull align 8 dereferenceable(40) %56, i32 noundef %.0127129)
  %.fca.0.extract20 = extractvalue { i64, i32 } %57, 0
  %.sroa.024.4.extract.shift = lshr i64 %.fca.0.extract20, 32
  %.sroa.024.4.extract.trunc = trunc nuw i64 %.sroa.024.4.extract.shift to i32
  %58 = load ptr, ptr %7, align 8, !tbaa !17
  %59 = tail call { i64, i32 } @_ZN15GridIndexVector2atEi(ptr noundef nonnull align 8 dereferenceable(40) %58, i32 noundef %.0127129)
  %.fca.1.extract = extractvalue { i64, i32 } %59, 1
  %60 = tail call noundef i32 @_ZN14PressureSolver18_GridToVectorIndexEiii(ptr noundef nonnull align 8 dereferenceable(144) %0, i32 noundef %.sroa.042.0.extract.trunc, i32 noundef %.sroa.024.4.extract.trunc, i32 noundef %.fca.1.extract)
  %61 = load ptr, ptr %15, align 8, !tbaa !22
  %62 = add nsw i32 %.sroa.042.0.extract.trunc, -1
  %63 = tail call noundef zeroext i1 @_ZN17FluidMaterialGrid11isCellSolidEiii(ptr noundef nonnull align 8 dereferenceable(88) %61, i32 noundef %62, i32 noundef %.sroa.024.4.extract.trunc, i32 noundef %.fca.1.extract)
  br i1 %63, label %64, label %72

64:                                               ; preds = %53
  %65 = load ptr, ptr %16, align 8, !tbaa !18
  %66 = tail call noundef float @_ZN16MACVelocityField1UEiii(ptr noundef nonnull align 8 dereferenceable(148) %65, i32 noundef %.sroa.042.0.extract.trunc, i32 noundef %.sroa.024.4.extract.trunc, i32 noundef %.fca.1.extract)
  %67 = fmul float %6, %66
  %68 = fpext float %67 to double
  %69 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8VectorXdixEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %60)
  %70 = load double, ptr %69, align 8, !tbaa !19
  %71 = fsub double %70, %68
  store double %71, ptr %69, align 8, !tbaa !19
  br label %72

72:                                               ; preds = %64, %53
  %73 = load ptr, ptr %15, align 8, !tbaa !22
  %74 = add nsw i32 %.sroa.042.0.extract.trunc, 1
  %75 = tail call noundef zeroext i1 @_ZN17FluidMaterialGrid11isCellSolidEiii(ptr noundef nonnull align 8 dereferenceable(88) %73, i32 noundef %74, i32 noundef %.sroa.024.4.extract.trunc, i32 noundef %.fca.1.extract)
  br i1 %75, label %76, label %84

76:                                               ; preds = %72
  %77 = load ptr, ptr %16, align 8, !tbaa !18
  %78 = tail call noundef float @_ZN16MACVelocityField1UEiii(ptr noundef nonnull align 8 dereferenceable(148) %77, i32 noundef %74, i32 noundef %.sroa.024.4.extract.trunc, i32 noundef %.fca.1.extract)
  %79 = fmul float %6, %78
  %80 = fpext float %79 to double
  %81 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8VectorXdixEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %60)
  %82 = load double, ptr %81, align 8, !tbaa !19
  %83 = fadd double %82, %80
  store double %83, ptr %81, align 8, !tbaa !19
  br label %84

84:                                               ; preds = %76, %72
  %85 = load ptr, ptr %15, align 8, !tbaa !22
  %86 = add nsw i32 %.sroa.024.4.extract.trunc, -1
  %87 = tail call noundef zeroext i1 @_ZN17FluidMaterialGrid11isCellSolidEiii(ptr noundef nonnull align 8 dereferenceable(88) %85, i32 noundef %.sroa.042.0.extract.trunc, i32 noundef %86, i32 noundef %.fca.1.extract)
  br i1 %87, label %88, label %96

88:                                               ; preds = %84
  %89 = load ptr, ptr %16, align 8, !tbaa !18
  %90 = tail call noundef float @_ZN16MACVelocityField1VEiii(ptr noundef nonnull align 8 dereferenceable(148) %89, i32 noundef %.sroa.042.0.extract.trunc, i32 noundef %.sroa.024.4.extract.trunc, i32 noundef %.fca.1.extract)
  %91 = fmul float %6, %90
  %92 = fpext float %91 to double
  %93 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8VectorXdixEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %60)
  %94 = load double, ptr %93, align 8, !tbaa !19
  %95 = fsub double %94, %92
  store double %95, ptr %93, align 8, !tbaa !19
  br label %96

96:                                               ; preds = %88, %84
  %97 = load ptr, ptr %15, align 8, !tbaa !22
  %98 = add nsw i32 %.sroa.024.4.extract.trunc, 1
  %99 = tail call noundef zeroext i1 @_ZN17FluidMaterialGrid11isCellSolidEiii(ptr noundef nonnull align 8 dereferenceable(88) %97, i32 noundef %.sroa.042.0.extract.trunc, i32 noundef %98, i32 noundef %.fca.1.extract)
  br i1 %99, label %100, label %108

100:                                              ; preds = %96
  %101 = load ptr, ptr %16, align 8, !tbaa !18
  %102 = tail call noundef float @_ZN16MACVelocityField1VEiii(ptr noundef nonnull align 8 dereferenceable(148) %101, i32 noundef %.sroa.042.0.extract.trunc, i32 noundef %98, i32 noundef %.fca.1.extract)
  %103 = fmul float %6, %102
  %104 = fpext float %103 to double
  %105 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8VectorXdixEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %60)
  %106 = load double, ptr %105, align 8, !tbaa !19
  %107 = fadd double %106, %104
  store double %107, ptr %105, align 8, !tbaa !19
  br label %108

108:                                              ; preds = %100, %96
  %109 = load ptr, ptr %15, align 8, !tbaa !22
  %110 = add nsw i32 %.fca.1.extract, -1
  %111 = tail call noundef zeroext i1 @_ZN17FluidMaterialGrid11isCellSolidEiii(ptr noundef nonnull align 8 dereferenceable(88) %109, i32 noundef %.sroa.042.0.extract.trunc, i32 noundef %.sroa.024.4.extract.trunc, i32 noundef %110)
  br i1 %111, label %112, label %120

112:                                              ; preds = %108
  %113 = load ptr, ptr %16, align 8, !tbaa !18
  %114 = tail call noundef float @_ZN16MACVelocityField1WEiii(ptr noundef nonnull align 8 dereferenceable(148) %113, i32 noundef %.sroa.042.0.extract.trunc, i32 noundef %.sroa.024.4.extract.trunc, i32 noundef %.fca.1.extract)
  %115 = fmul float %6, %114
  %116 = fpext float %115 to double
  %117 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8VectorXdixEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %60)
  %118 = load double, ptr %117, align 8, !tbaa !19
  %119 = fsub double %118, %116
  store double %119, ptr %117, align 8, !tbaa !19
  br label %120

120:                                              ; preds = %112, %108
  %121 = load ptr, ptr %15, align 8, !tbaa !22
  %122 = add nsw i32 %.fca.1.extract, 1
  %123 = tail call noundef zeroext i1 @_ZN17FluidMaterialGrid11isCellSolidEiii(ptr noundef nonnull align 8 dereferenceable(88) %121, i32 noundef %.sroa.042.0.extract.trunc, i32 noundef %.sroa.024.4.extract.trunc, i32 noundef %122)
  br i1 %123, label %124, label %132

124:                                              ; preds = %120
  %125 = load ptr, ptr %16, align 8, !tbaa !18
  %126 = tail call noundef float @_ZN16MACVelocityField1WEiii(ptr noundef nonnull align 8 dereferenceable(148) %125, i32 noundef %.sroa.042.0.extract.trunc, i32 noundef %.sroa.024.4.extract.trunc, i32 noundef %122)
  %127 = fmul float %6, %126
  %128 = fpext float %127 to double
  %129 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8VectorXdixEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %60)
  %130 = load double, ptr %129, align 8, !tbaa !19
  %131 = fadd double %130, %128
  store double %131, ptr %129, align 8, !tbaa !19
  br label %132

132:                                              ; preds = %124, %120
  %133 = add i32 %.0127129, 1
  %134 = zext i32 %133 to i64
  %135 = load ptr, ptr %7, align 8, !tbaa !17
  %136 = tail call noundef i64 @_ZN15GridIndexVector4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %135)
  %137 = icmp ugt i64 %136, %134
  br i1 %137, label %53, 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 #1 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 #2 align 2

declare noundef float @_ZN16MACVelocityField1UEiii(ptr noundef nonnull align 8 dereferenceable(148), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

declare noundef float @_ZN16MACVelocityField1VEiii(ptr noundef nonnull align 8 dereferenceable(148), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

declare noundef float @_ZN16MACVelocityField1WEiii(ptr noundef nonnull align 8 dereferenceable(148), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

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

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

attributes #0 = { 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 #1 = { 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 #2 = { 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 #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" }

!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, !10, i64 16}
!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 = !{!6, !11, i64 64}
!18 = !{!6, !11, i64 80}
!19 = !{!10, !10, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!6, !11, i64 72}
!23 = distinct !{!23, !21}


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