; LLVM IR from doyubkim/fluid-engine-dev :: src/jet (grid_single_phase_pressure_solver2)

; 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.jet::Size2" = type { i64, i64 }
%"class.jet::FaceCenteredGrid2" = type { %"class.jet::VectorGrid2", %"class.jet::Array.0", %"class.jet::Array.0", %"class.jet::Vector", %"class.jet::Vector", %"class.jet::LinearArraySampler", %"class.jet::LinearArraySampler", %"class.std::function.32" }
%"class.jet::VectorGrid2" = type { %"class.jet::VectorField2", %"class.jet::Grid2" }
%"class.jet::VectorField2" = type { %"class.jet::Field2" }
%"class.jet::Field2" = type { ptr }
%"class.jet::Grid2" = type { %"class.jet::Serializable", %"class.jet::Size2", %"class.jet::Vector", %"class.jet::Vector", %"class.jet::BoundingBox" }
%"class.jet::Serializable" = type { ptr }
%"class.jet::BoundingBox" = type { %"class.jet::Vector", %"class.jet::Vector" }
%"class.jet::Array.0" = type { %"class.jet::Size2", %"class.std::vector.1" }
%"class.std::vector.1" = type { %"struct.std::_Vector_base.2" }
%"struct.std::_Vector_base.2" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.jet::Vector" = type { double, double }
%"class.jet::LinearArraySampler" = type { %"class.jet::Vector", %"class.jet::Vector", %"class.jet::Vector", %"class.jet::ConstArrayAccessor" }
%"class.jet::ConstArrayAccessor" = type { %"class.jet::Size2", ptr }
%"class.std::function.32" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"class.jet::GridSinglePhasePressureSolver2" = type { %"class.jet::GridPressureSolver2", %"struct.jet::FdmLinearSystem2", %"struct.jet::FdmCompressedLinearSystem2", %"class.std::shared_ptr", %"struct.jet::FdmMgLinearSystem2", %"class.std::shared_ptr.21", %"class.std::vector.24" }
%"class.jet::GridPressureSolver2" = type { ptr }
%"struct.jet::FdmLinearSystem2" = type { %"class.jet::Array", %"class.jet::Array.0", %"class.jet::Array.0" }
%"class.jet::Array" = type { %"class.jet::Size2", %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<jet::FdmMatrixRow2, std::allocator<jet::FdmMatrixRow2>>::_Vector_impl" }
%"struct.std::_Vector_base<jet::FdmMatrixRow2, std::allocator<jet::FdmMatrixRow2>>::_Vector_impl" = type { %"struct.std::_Vector_base<jet::FdmMatrixRow2, std::allocator<jet::FdmMatrixRow2>>::_Vector_impl_data" }
%"struct.std::_Vector_base<jet::FdmMatrixRow2, std::allocator<jet::FdmMatrixRow2>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.jet::FdmCompressedLinearSystem2" = type { %"class.jet::MatrixCsr", %"class.jet::VectorN", %"class.jet::VectorN" }
%"class.jet::MatrixCsr" = type { %"class.jet::Size2", %"class.std::vector.1", %"class.std::vector.6", %"class.std::vector.6" }
%"class.std::vector.6" = type { %"struct.std::_Vector_base.7" }
%"struct.std::_Vector_base.7" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.jet::VectorN" = type { %"class.std::vector.1" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"struct.jet::FdmMgLinearSystem2" = type { %"struct.jet::MgMatrix", %"struct.jet::MgVector", %"struct.jet::MgVector" }
%"struct.jet::MgMatrix" = type { %"class.std::vector.11" }
%"class.std::vector.11" = type { %"struct.std::_Vector_base.12" }
%"struct.std::_Vector_base.12" = type { %"struct.std::_Vector_base<jet::Array<jet::FdmMatrixRow2, 2>, std::allocator<jet::Array<jet::FdmMatrixRow2, 2>>>::_Vector_impl" }
%"struct.std::_Vector_base<jet::Array<jet::FdmMatrixRow2, 2>, std::allocator<jet::Array<jet::FdmMatrixRow2, 2>>>::_Vector_impl" = type { %"struct.std::_Vector_base<jet::Array<jet::FdmMatrixRow2, 2>, std::allocator<jet::Array<jet::FdmMatrixRow2, 2>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<jet::Array<jet::FdmMatrixRow2, 2>, std::allocator<jet::Array<jet::FdmMatrixRow2, 2>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.jet::MgVector" = type { %"class.std::vector.16" }
%"class.std::vector.16" = type { %"struct.std::_Vector_base.17" }
%"struct.std::_Vector_base.17" = type { %"struct.std::_Vector_base<jet::Array<double, 2>, std::allocator<jet::Array<double, 2>>>::_Vector_impl" }
%"struct.std::_Vector_base<jet::Array<double, 2>, std::allocator<jet::Array<double, 2>>>::_Vector_impl" = type { %"struct.std::_Vector_base<jet::Array<double, 2>, std::allocator<jet::Array<double, 2>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<jet::Array<double, 2>, std::allocator<jet::Array<double, 2>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::shared_ptr.21" = type { %"class.std::__shared_ptr.22" }
%"class.std::__shared_ptr.22" = type { ptr, %"class.std::__shared_count" }
%"class.std::vector.24" = type { %"struct.std::_Vector_base.25" }
%"struct.std::_Vector_base.25" = type { %"struct.std::_Vector_base<jet::Array<char, 2>, std::allocator<jet::Array<char, 2>>>::_Vector_impl" }
%"struct.std::_Vector_base<jet::Array<char, 2>, std::allocator<jet::Array<char, 2>>>::_Vector_impl" = type { %"struct.std::_Vector_base<jet::Array<char, 2>, std::allocator<jet::Array<char, 2>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<jet::Array<char, 2>, std::allocator<jet::Array<char, 2>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.jet::MgParameters" = type { i64, i32, i32, i32, i32, %"class.std::function.34", %"class.std::function.36", %"class.std::function.36", double }
%"class.std::function.34" = type { %"class.std::_Function_base", ptr }
%"class.std::function.36" = type { %"class.std::_Function_base", ptr }

declare i32 @__gxx_personality_v0(...)

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3jet5Grid210resolutionEv(ptr noundef nonnull align 8 dereferenceable(88)) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIN3jet12FdmMgSolver2EEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16), ptr) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessIN3jet12FdmMgSolver2ELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) #3 align 2

declare noundef nonnull align 8 dereferenceable(128) ptr @_ZNK3jet12FdmMgSolver26paramsEv(ptr noundef nonnull align 8 dereferenceable(145)) #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3jet30GridSinglePhasePressureSolver211buildSystemERKNS_17FaceCenteredGrid2Eb(ptr noundef nonnull align 8 dereferenceable(392) %0, ptr noundef nonnull align 8 dereferenceable(384) %1, i1 noundef zeroext %2) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i8, align 1
  %7 = alloca %"class.jet::Size2", align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"class.jet::FaceCenteredGrid2", align 8
  %12 = alloca i64, align 8
  %13 = alloca %"class.jet::Size2", align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca %"class.jet::Vector", align 8
  %17 = alloca %"class.jet::Vector", align 8
  %18 = alloca %"class.jet::Vector", align 8
  %19 = alloca %"class.std::function.32", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %20 = zext i1 %2 to i8
  store i8 %20, ptr %6, align 1, !tbaa !9
  %21 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #5
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %22, i64 8
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3jet5Grid210resolutionEv(ptr noundef nonnull align 8 dereferenceable(88) %23)
  call void @_ZN3jet5Size2C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %24)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store i64 1, ptr %8, align 8, !tbaa !11
  %25 = getelementptr inbounds %"class.jet::GridSinglePhasePressureSolver2", ptr %21, i32 0, i32 5
  %26 = call noundef zeroext i1 @_ZSteqIN3jet12FdmMgSolver2EEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr null) #5
  br i1 %26, label %27, label %33

27:                                               ; preds = %3
  %28 = load i8, ptr %6, align 1, !tbaa !9, !range !13, !noundef !14
  %29 = trunc i8 %28 to i1
  br i1 %29, label %32, label %30

30:                                               ; preds = %27
  %31 = getelementptr inbounds %"class.jet::GridSinglePhasePressureSolver2", ptr %21, i32 0, i32 1
  call void @_ZN3jet16FdmLinearSystem26resizeERKNS_5Size2E(ptr noundef nonnull align 8 dereferenceable(120) %31, ptr noundef nonnull align 8 dereferenceable(16) %7)
  br label %32

32:                                               ; preds = %30, %27
  br label %55

33:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %34 = getelementptr inbounds %"class.jet::GridSinglePhasePressureSolver2", ptr %21, i32 0, i32 5
  %35 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3jet12FdmMgSolver2ELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %34) #5
  %36 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZNK3jet12FdmMgSolver26paramsEv(ptr noundef nonnull align 8 dereferenceable(145) %35)
  %37 = getelementptr inbounds %"struct.jet::MgParameters", ptr %36, i32 0, i32 0
  %38 = load i64, ptr %37, align 8, !tbaa !15
  store i64 %38, ptr %9, align 8, !tbaa !11
  %39 = load i64, ptr %9, align 8, !tbaa !11
  %40 = getelementptr inbounds %"class.jet::GridSinglePhasePressureSolver2", ptr %21, i32 0, i32 4
  %41 = getelementptr inbounds %"struct.jet::FdmMgLinearSystem2", ptr %40, i32 0, i32 0
  %42 = getelementptr inbounds %"struct.jet::MgMatrix", ptr %41, i32 0, i32 0
  call void @_ZN3jet11FdmMgUtils221resizeArrayWithFinestINS_13FdmMatrixRow2EEEvRKNS_5Size2EmPSt6vectorINS_5ArrayIT_Lm2EEESaIS9_EE(ptr noundef nonnull align 8 dereferenceable(16) %7, i64 noundef %39, ptr noundef %42)
  %43 = load i64, ptr %9, align 8, !tbaa !11
  %44 = getelementptr inbounds %"class.jet::GridSinglePhasePressureSolver2", ptr %21, i32 0, i32 4
  %45 = getelementptr inbounds %"struct.jet::FdmMgLinearSystem2", ptr %44, i32 0, i32 1
  %46 = getelementptr inbounds %"struct.jet::MgVector", ptr %45, i32 0, i32 0
  call void @_ZN3jet11FdmMgUtils221resizeArrayWithFinestIdEEvRKNS_5Size2EmPSt6vectorINS_5ArrayIT_Lm2EEESaIS8_EE(ptr noundef nonnull align 8 dereferenceable(16) %7, i64 noundef %43, ptr noundef %46)
  %47 = load i64, ptr %9, align 8, !tbaa !11
  %48 = getelementptr inbounds %"class.jet::GridSinglePhasePressureSolver2", ptr %21, i32 0, i32 4
  %49 = getelementptr inbounds %"struct.jet::FdmMgLinearSystem2", ptr %48, i32 0, i32 2
  %50 = getelementptr inbounds %"struct.jet::MgVector", ptr %49, i32 0, i32 0
  call void @_ZN3jet11FdmMgUtils221resizeArrayWithFinestIdEEvRKNS_5Size2EmPSt6vectorINS_5ArrayIT_Lm2EEESaIS8_EE(ptr noundef nonnull align 8 dereferenceable(16) %7, i64 noundef %47, ptr noundef %50)
  %51 = getelementptr inbounds %"class.jet::GridSinglePhasePressureSolver2", ptr %21, i32 0, i32 4
  %52 = getelementptr inbounds %"struct.jet::FdmMgLinearSystem2", ptr %51, i32 0, i32 0
  %53 = getelementptr inbounds %"struct.jet::MgMatrix", ptr %52, i32 0, i32 0
  %54 = call noundef i64 @_ZNKSt6vectorIN3jet5ArrayINS0_13FdmMatrixRow2ELm2EEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %53) #5
  store i64 %54, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %55

55:                                               ; preds = %33, %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %56, ptr %10, align 8, !tbaa !5
  %57 = getelementptr inbounds %"class.jet::GridSinglePhasePressureSolver2", ptr %21, i32 0, i32 5
  %58 = call noundef zeroext i1 @_ZSteqIN3jet12FdmMgSolver2EEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %57, ptr null) #5
  br i1 %58, label %59, label %81

59:                                               ; preds = %55
  %60 = load i8, ptr %6, align 1, !tbaa !9, !range !13, !noundef !14
  %61 = trunc i8 %60 to i1
  br i1 %61, label %62, label %72

62:                                               ; preds = %59
  %63 = getelementptr inbounds %"class.jet::GridSinglePhasePressureSolver2", ptr %21, i32 0, i32 2
  %64 = getelementptr inbounds %"struct.jet::FdmCompressedLinearSystem2", ptr %63, i32 0, i32 0
  %65 = getelementptr inbounds %"class.jet::GridSinglePhasePressureSolver2", ptr %21, i32 0, i32 2
  %66 = getelementptr inbounds %"struct.jet::FdmCompressedLinearSystem2", ptr %65, i32 0, i32 1
  %67 = getelementptr inbounds %"class.jet::GridSinglePhasePressureSolver2", ptr %21, i32 0, i32 2
  %68 = getelementptr inbounds %"struct.jet::FdmCompressedLinearSystem2", ptr %67, i32 0, i32 2
  %69 = getelementptr inbounds %"class.jet::GridSinglePhasePressureSolver2", ptr %21, i32 0, i32 6
  %70 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN3jet5ArrayIcLm2EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %69, i64 noundef 0) #5
  %71 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN12_GLOBAL__N_117buildSingleSystemEPN3jet9MatrixCsrIdEEPNS0_7VectorNIdEES6_RKNS0_5ArrayIcLm2EEERKNS0_17FaceCenteredGrid2E(ptr noundef %64, ptr noundef %66, ptr noundef %68, ptr noundef nonnull align 8 dereferenceable(40) %70, ptr noundef nonnull align 8 dereferenceable(384) %71)
  br label %80

72:                                               ; preds = %59
  %73 = getelementptr inbounds %"class.jet::GridSinglePhasePressureSolver2", ptr %21, i32 0, i32 1
  %74 = getelementptr inbounds %"struct.jet::FdmLinearSystem2", ptr %73, i32 0, i32 0
  %75 = getelementptr inbounds %"class.jet::GridSinglePhasePressureSolver2", ptr %21, i32 0, i32 1
  %76 = getelementptr inbounds %"struct.jet::FdmLinearSystem2", ptr %75, i32 0, i32 2
  %77 = getelementptr inbounds %"class.jet::GridSinglePhasePressureSolver2", ptr %21, i32 0, i32 6
  %78 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN3jet5ArrayIcLm2EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %77, i64 noundef 0) #5
  %79 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN12_GLOBAL__N_117buildSingleSystemEPN3jet5ArrayINS0_13FdmMatrixRow2ELm2EEEPNS1_IdLm2EEERKNS1_IcLm2EEERKNS0_17FaceCenteredGrid2E(ptr noundef %74, ptr noundef %76, ptr noundef nonnull align 8 dereferenceable(40) %78, ptr noundef nonnull align 8 dereferenceable(384) %79)
  br label %80

80:                                               ; preds = %72, %62
  br label %93

81:                                               ; preds = %55
  %82 = getelementptr inbounds %"class.jet::GridSinglePhasePressureSolver2", ptr %21, i32 0, i32 4
  %83 = getelementptr inbounds %"struct.jet::FdmMgLinearSystem2", ptr %82, i32 0, i32 0
  %84 = getelementptr inbounds %"struct.jet::MgMatrix", ptr %83, i32 0, i32 0
  %85 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN3jet5ArrayINS0_13FdmMatrixRow2ELm2EEESaIS3_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %84) #5
  %86 = getelementptr inbounds %"class.jet::GridSinglePhasePressureSolver2", ptr %21, i32 0, i32 4
  %87 = getelementptr inbounds %"struct.jet::FdmMgLinearSystem2", ptr %86, i32 0, i32 2
  %88 = getelementptr inbounds %"struct.jet::MgVector", ptr %87, i32 0, i32 0
  %89 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN3jet5ArrayIdLm2EEESaIS2_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %88) #5
  %90 = getelementptr inbounds %"class.jet::GridSinglePhasePressureSolver2", ptr %21, i32 0, i32 6
  %91 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN3jet5ArrayIcLm2EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %90, i64 noundef 0) #5
  %92 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN12_GLOBAL__N_117buildSingleSystemEPN3jet5ArrayINS0_13FdmMatrixRow2ELm2EEEPNS1_IdLm2EEERKNS1_IcLm2EEERKNS0_17FaceCenteredGrid2E(ptr noundef %85, ptr noundef %89, ptr noundef nonnull align 8 dereferenceable(40) %91, ptr noundef nonnull align 8 dereferenceable(384) %92)
  br label %93

93:                                               ; preds = %81, %80
  call void @llvm.lifetime.start.p0(i64 384, ptr %11) #5
  call void @_ZN3jet17FaceCenteredGrid2C1Ev(ptr noundef nonnull align 8 dereferenceable(384) %11)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store i64 1, ptr %12, align 8, !tbaa !11
  br label %94

94:                                               ; preds = %144, %93
  %95 = load i64, ptr %12, align 8, !tbaa !11
  %96 = load i64, ptr %8, align 8, !tbaa !11
  %97 = icmp ult i64 %95, %96
  br i1 %97, label %99, label %98

98:                                               ; preds = %94
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %175

99:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #5
  %100 = load ptr, ptr %10, align 8, !tbaa !5
  %101 = getelementptr inbounds i8, ptr %100, i64 8
  %102 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3jet5Grid210resolutionEv(ptr noundef nonnull align 8 dereferenceable(88) %101)
          to label %103 unwind label %147

103:                                              ; preds = %99
  invoke void @_ZN3jet5Size2C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(16) %102)
          to label %104 unwind label %147

104:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #5
  %105 = load ptr, ptr %10, align 8, !tbaa !5
  %106 = getelementptr inbounds i8, ptr %105, i64 8
  %107 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3jet5Grid211gridSpacingEv(ptr noundef nonnull align 8 dereferenceable(88) %106)
          to label %108 unwind label %151

108:                                              ; preds = %104
  invoke void @_ZN3jet6VectorIdLm2EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(16) %107)
          to label %109 unwind label %151

109:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #5
  %110 = load ptr, ptr %10, align 8, !tbaa !5
  %111 = getelementptr inbounds i8, ptr %110, i64 8
  %112 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3jet5Grid26originEv(ptr noundef nonnull align 8 dereferenceable(88) %111)
          to label %113 unwind label %155

113:                                              ; preds = %109
  invoke void @_ZN3jet6VectorIdLm2EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(16) %112)
          to label %114 unwind label %155

114:                                              ; preds = %113
  %115 = getelementptr inbounds %"class.jet::Size2", ptr %13, i32 0, i32 0
  %116 = load i64, ptr %115, align 8, !tbaa !22
  %117 = lshr i64 %116, 1
  %118 = getelementptr inbounds %"class.jet::Size2", ptr %13, i32 0, i32 0
  store i64 %117, ptr %118, align 8, !tbaa !22
  %119 = getelementptr inbounds %"class.jet::Size2", ptr %13, i32 0, i32 1
  %120 = load i64, ptr %119, align 8, !tbaa !24
  %121 = lshr i64 %120, 1
  %122 = getelementptr inbounds %"class.jet::Size2", ptr %13, i32 0, i32 1
  store i64 %121, ptr %122, align 8, !tbaa !24
  %123 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN3jet6VectorIdLm2EEmLEd(ptr noundef nonnull align 8 dereferenceable(16) %16, double noundef 2.000000e+00)
          to label %124 unwind label %155

124:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #5
  invoke void @_ZN3jet6VectorIdLm2EEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18)
          to label %125 unwind label %159

125:                                              ; preds = %124
  invoke void @_ZN3jet11VectorGrid26resizeERKNS_5Size2ERKNS_6VectorIdLm2EEES7_S7_(ptr noundef nonnull align 8 dereferenceable(96) %11, ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(16) %18)
          to label %126 unwind label %159

126:                                              ; preds = %125
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #5
  %127 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZNK3jet17FaceCenteredGrid27samplerEv(ptr dead_on_unwind writable sret(%"class.std::function.32") align 8 %19, ptr noundef nonnull align 8 dereferenceable(384) %127)
          to label %128 unwind label %163

128:                                              ; preds = %126
  invoke void @_ZN3jet17FaceCenteredGrid24fillERKSt8functionIFNS_6VectorIdLm2EEERKS3_EENS_15ExecutionPolicyE(ptr noundef nonnull align 8 dereferenceable(384) %11, ptr noundef nonnull align 8 dereferenceable(32) %19, i32 noundef 1)
          to label %129 unwind label %167

129:                                              ; preds = %128
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #5
  %130 = getelementptr inbounds %"class.jet::GridSinglePhasePressureSolver2", ptr %21, i32 0, i32 4
  %131 = getelementptr inbounds %"struct.jet::FdmMgLinearSystem2", ptr %130, i32 0, i32 0
  %132 = getelementptr inbounds %"struct.jet::MgMatrix", ptr %131, i32 0, i32 0
  %133 = load i64, ptr %12, align 8, !tbaa !11
  %134 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN3jet5ArrayINS0_13FdmMatrixRow2ELm2EEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %132, i64 noundef %133) #5
  %135 = getelementptr inbounds %"class.jet::GridSinglePhasePressureSolver2", ptr %21, i32 0, i32 4
  %136 = getelementptr inbounds %"struct.jet::FdmMgLinearSystem2", ptr %135, i32 0, i32 2
  %137 = getelementptr inbounds %"struct.jet::MgVector", ptr %136, i32 0, i32 0
  %138 = load i64, ptr %12, align 8, !tbaa !11
  %139 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN3jet5ArrayIdLm2EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %137, i64 noundef %138) #5
  %140 = getelementptr inbounds %"class.jet::GridSinglePhasePressureSolver2", ptr %21, i32 0, i32 6
  %141 = load i64, ptr %12, align 8, !tbaa !11
  %142 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN3jet5ArrayIcLm2EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %140, i64 noundef %141) #5
  invoke void @_ZN12_GLOBAL__N_117buildSingleSystemEPN3jet5ArrayINS0_13FdmMatrixRow2ELm2EEEPNS1_IdLm2EEERKNS1_IcLm2EEERKNS0_17FaceCenteredGrid2E(ptr noundef %134, ptr noundef %139, ptr noundef nonnull align 8 dereferenceable(40) %142, ptr noundef nonnull align 8 dereferenceable(384) %11)
          to label %143 unwind label %155

143:                                              ; preds = %129
  store ptr %11, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #5
  br label %144

144:                                              ; preds = %143
  %145 = load i64, ptr %12, align 8, !tbaa !11
  %146 = add i64 %145, 1
  store i64 %146, ptr %12, align 8, !tbaa !11
  br label %94, !llvm.loop !25

147:                                              ; preds = %103, %99
  %148 = landingpad { ptr, i32 }
          cleanup
  %149 = extractvalue { ptr, i32 } %148, 0
  store ptr %149, ptr %14, align 8
  %150 = extractvalue { ptr, i32 } %148, 1
  store i32 %150, ptr %15, align 4
  br label %174

151:                                              ; preds = %108, %104
  %152 = landingpad { ptr, i32 }
          cleanup
  %153 = extractvalue { ptr, i32 } %152, 0
  store ptr %153, ptr %14, align 8
  %154 = extractvalue { ptr, i32 } %152, 1
  store i32 %154, ptr %15, align 4
  br label %173

155:                                              ; preds = %129, %114, %113, %109
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %14, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %15, align 4
  br label %172

159:                                              ; preds = %125, %124
  %160 = landingpad { ptr, i32 }
          cleanup
  %161 = extractvalue { ptr, i32 } %160, 0
  store ptr %161, ptr %14, align 8
  %162 = extractvalue { ptr, i32 } %160, 1
  store i32 %162, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #5
  br label %172

163:                                              ; preds = %126
  %164 = landingpad { ptr, i32 }
          cleanup
  %165 = extractvalue { ptr, i32 } %164, 0
  store ptr %165, ptr %14, align 8
  %166 = extractvalue { ptr, i32 } %164, 1
  store i32 %166, ptr %15, align 4
  br label %171

167:                                              ; preds = %128
  %168 = landingpad { ptr, i32 }
          cleanup
  %169 = extractvalue { ptr, i32 } %168, 0
  store ptr %169, ptr %14, align 8
  %170 = extractvalue { ptr, i32 } %168, 1
  store i32 %170, ptr %15, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #5
  br label %171

171:                                              ; preds = %167, %163
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #5
  br label %172

172:                                              ; preds = %171, %159, %155
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #5
  br label %173

173:                                              ; preds = %172, %151
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #5
  br label %174

174:                                              ; preds = %173, %147
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @_ZN3jet17FaceCenteredGrid2D2Ev(ptr noundef nonnull align 8 dereferenceable(384) %11) #5
  call void @llvm.lifetime.end.p0(i64 384, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #5
  br label %176

175:                                              ; preds = %98
  call void @_ZN3jet17FaceCenteredGrid2D2Ev(ptr noundef nonnull align 8 dereferenceable(384) %11) #5
  call void @llvm.lifetime.end.p0(i64 384, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #5
  ret void

176:                                              ; preds = %174
  %177 = load ptr, ptr %14, align 8
  %178 = load i32, ptr %15, align 4
  %179 = insertvalue { ptr, i32 } poison, ptr %177, 0
  %180 = insertvalue { ptr, i32 } %179, i32 %178, 1
  resume { ptr, i32 } %180
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3jet5Size2C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3 align 2

declare void @_ZN3jet16FdmLinearSystem26resizeERKNS_5Size2E(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(16)) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3jet11FdmMgUtils221resizeArrayWithFinestINS_13FdmMatrixRow2EEEvRKNS_5Size2EmPSt6vectorINS_5ArrayIT_Lm2EEESaIS9_EE(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, ptr noundef) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3jet11FdmMgUtils221resizeArrayWithFinestIdEEvRKNS_5Size2EmPSt6vectorINS_5ArrayIT_Lm2EEESaIS8_EE(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, ptr noundef) #4 align 2

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_117buildSingleSystemEPN3jet9MatrixCsrIdEEPNS0_7VectorNIdEES6_RKNS0_5ArrayIcLm2EEERKNS0_17FaceCenteredGrid2E(ptr noundef, ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(384)) #4

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_117buildSingleSystemEPN3jet5ArrayINS0_13FdmMatrixRow2ELm2EEEPNS1_IdLm2EEERKNS1_IcLm2EEERKNS0_17FaceCenteredGrid2E(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(384)) #4

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

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

declare void @_ZN3jet17FaceCenteredGrid2C1Ev(ptr noundef nonnull align 8 dereferenceable(384)) unnamed_addr #1

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3jet5Grid211gridSpacingEv(ptr noundef nonnull align 8 dereferenceable(88)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3jet6VectorIdLm2EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3jet5Grid26originEv(ptr noundef nonnull align 8 dereferenceable(88)) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN3jet6VectorIdLm2EEmLEd(ptr noundef nonnull align 8 dereferenceable(16), double noundef) #4 align 2

declare void @_ZN3jet11VectorGrid26resizeERKNS_5Size2ERKNS_6VectorIdLm2EEES7_S7_(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3jet6VectorIdLm2EEC2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3 align 2

declare void @_ZN3jet17FaceCenteredGrid24fillERKSt8functionIFNS_6VectorIdLm2EEERKS3_EENS_15ExecutionPolicyE(ptr noundef nonnull align 8 dereferenceable(384), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #1

declare void @_ZNK3jet17FaceCenteredGrid27samplerEv(ptr dead_on_unwind writable sret(%"class.std::function.32") align 8, ptr noundef nonnull align 8 dereferenceable(384)) unnamed_addr #1

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3jet17FaceCenteredGrid2D2Ev(ptr noundef nonnull align 8 dereferenceable(384)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 = { 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 = { 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 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !12, i64 0}
!16 = !{!"_ZTSN3jet12MgParametersINS_8FdmBlas2EEE", !12, i64 0, !17, i64 8, !17, i64 12, !17, i64 16, !17, i64 20, !18, i64 24, !20, i64 56, !20, i64 88, !21, i64 120}
!17 = !{!"int", !7, i64 0}
!18 = !{!"_ZTSSt8functionIFvRKN3jet5ArrayINS0_13FdmMatrixRow2ELm2EEERKNS1_IdLm2EEEjdPS6_S9_EE", !19, i64 0, !6, i64 24}
!19 = !{!"_ZTSSt14_Function_base", !7, i64 0, !6, i64 16}
!20 = !{!"_ZTSSt8functionIFvRKN3jet5ArrayIdLm2EEEPS2_EE", !19, i64 0, !6, i64 24}
!21 = !{!"double", !7, i64 0}
!22 = !{!23, !12, i64 0}
!23 = !{!"_ZTSN3jet5Size2E", !12, i64 0, !12, i64 8}
!24 = !{!23, !12, i64 8}
!25 = distinct !{!25, !26}
!26 = !{!"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"

%"class.jet::Size2" = type { i64, i64 }
%"class.jet::FaceCenteredGrid2" = type { %"class.jet::VectorGrid2", %"class.jet::Array.0", %"class.jet::Array.0", %"class.jet::Vector", %"class.jet::Vector", %"class.jet::LinearArraySampler", %"class.jet::LinearArraySampler", %"class.std::function.32" }
%"class.jet::VectorGrid2" = type { %"class.jet::VectorField2", %"class.jet::Grid2" }
%"class.jet::VectorField2" = type { %"class.jet::Field2" }
%"class.jet::Field2" = type { ptr }
%"class.jet::Grid2" = type { %"class.jet::Serializable", %"class.jet::Size2", %"class.jet::Vector", %"class.jet::Vector", %"class.jet::BoundingBox" }
%"class.jet::Serializable" = type { ptr }
%"class.jet::BoundingBox" = type { %"class.jet::Vector", %"class.jet::Vector" }
%"class.jet::Array.0" = type { %"class.jet::Size2", %"class.std::vector.1" }
%"class.std::vector.1" = type { %"struct.std::_Vector_base.2" }
%"struct.std::_Vector_base.2" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.jet::Vector" = type { double, double }
%"class.jet::LinearArraySampler" = type { %"class.jet::Vector", %"class.jet::Vector", %"class.jet::Vector", %"class.jet::ConstArrayAccessor" }
%"class.jet::ConstArrayAccessor" = type { %"class.jet::Size2", ptr }
%"class.std::function.32" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }

declare i32 @__gxx_personality_v0(...)

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3jet5Grid210resolutionEv(ptr noundef nonnull align 8 dereferenceable(88)) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIN3jet12FdmMgSolver2EEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16), ptr) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessIN3jet12FdmMgSolver2ELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3 align 2

declare noundef nonnull align 8 dereferenceable(128) ptr @_ZNK3jet12FdmMgSolver26paramsEv(ptr noundef nonnull align 8 dereferenceable(145)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN3jet5ArrayIcLm2EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3jet30GridSinglePhasePressureSolver211buildSystemERKNS_17FaceCenteredGrid2Eb(ptr noundef nonnull align 8 dereferenceable(392) %0, ptr noundef nonnull align 8 dereferenceable(384) %1, i1 noundef zeroext %2) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.jet::Size2", align 8
  %5 = alloca %"class.jet::FaceCenteredGrid2", align 8
  %6 = alloca %"class.jet::Size2", align 16
  %7 = alloca %"class.jet::Vector", align 8
  %8 = alloca %"class.jet::Vector", align 8
  %9 = alloca %"class.jet::Vector", align 8
  %10 = alloca %"class.std::function.32", align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #5
  %11 = getelementptr inbounds i8, ptr %1, i64 8
  %12 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3jet5Grid210resolutionEv(ptr noundef nonnull align 8 dereferenceable(88) %11)
  call void @_ZN3jet5Size2C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %12)
  %13 = getelementptr inbounds i8, ptr %0, i64 352
  %14 = call noundef zeroext i1 @_ZSteqIN3jet12FdmMgSolver2EEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr null) #5
  %.027.sroa.gep29 = getelementptr inbounds i8, ptr %5, i64 8
  br i1 %14, label %15, label %16

15:                                               ; preds = %3
  br i1 %2, label %.thread48, label %.thread

16:                                               ; preds = %3
  %17 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3jet12FdmMgSolver2ELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  %18 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZNK3jet12FdmMgSolver26paramsEv(ptr noundef nonnull align 8 dereferenceable(145) %17)
  %19 = load i64, ptr %18, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %0, i64 280
  call void @_ZN3jet11FdmMgUtils221resizeArrayWithFinestINS_13FdmMatrixRow2EEEvRKNS_5Size2EmPSt6vectorINS_5ArrayIT_Lm2EEESaIS9_EE(ptr noundef nonnull align 8 dereferenceable(16) %4, i64 noundef %19, ptr noundef nonnull %20)
  %21 = getelementptr inbounds i8, ptr %0, i64 304
  call void @_ZN3jet11FdmMgUtils221resizeArrayWithFinestIdEEvRKNS_5Size2EmPSt6vectorINS_5ArrayIT_Lm2EEESaIS8_EE(ptr noundef nonnull align 8 dereferenceable(16) %4, i64 noundef %19, ptr noundef nonnull %21)
  %22 = getelementptr inbounds i8, ptr %0, i64 328
  call void @_ZN3jet11FdmMgUtils221resizeArrayWithFinestIdEEvRKNS_5Size2EmPSt6vectorINS_5ArrayIT_Lm2EEESaIS8_EE(ptr noundef nonnull align 8 dereferenceable(16) %4, i64 noundef %19, ptr noundef nonnull %22)
  %23 = call noundef i64 @_ZNKSt6vectorIN3jet5ArrayINS0_13FdmMatrixRow2ELm2EEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #5
  %24 = call noundef zeroext i1 @_ZSteqIN3jet12FdmMgSolver2EEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr null) #5
  br i1 %24, label %28, label %38

.thread48:                                        ; preds = %15
  %25 = call noundef zeroext i1 @_ZSteqIN3jet12FdmMgSolver2EEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr null) #5
  br i1 %25, label %.thread50, label %38

.thread:                                          ; preds = %15
  %26 = getelementptr inbounds i8, ptr %0, i64 8
  call void @_ZN3jet16FdmLinearSystem26resizeERKNS_5Size2E(ptr noundef nonnull align 8 dereferenceable(120) %26, ptr noundef nonnull align 8 dereferenceable(16) %4)
  %27 = call noundef zeroext i1 @_ZSteqIN3jet12FdmMgSolver2EEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr null) #5
  br i1 %27, label %.thread45, label %38

28:                                               ; preds = %16
  br i1 %2, label %.thread50, label %.thread45

.thread50:                                        ; preds = %.thread48, %28
  %.0284452 = phi i64 [ %23, %28 ], [ 1, %.thread48 ]
  %29 = getelementptr inbounds i8, ptr %0, i64 128
  %30 = getelementptr inbounds i8, ptr %0, i64 216
  %31 = getelementptr inbounds i8, ptr %0, i64 240
  %32 = getelementptr inbounds i8, ptr %0, i64 368
  %33 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN3jet5ArrayIcLm2EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef 0) #5
  call void @_ZN12_GLOBAL__N_117buildSingleSystemEPN3jet9MatrixCsrIdEEPNS0_7VectorNIdEES6_RKNS0_5ArrayIcLm2EEERKNS0_17FaceCenteredGrid2E(ptr noundef nonnull %29, ptr noundef nonnull %30, ptr noundef nonnull %31, ptr noundef nonnull align 8 dereferenceable(40) %33, ptr noundef nonnull align 8 dereferenceable(384) %1)
  br label %45

.thread45:                                        ; preds = %.thread, %28
  %.0284447 = phi i64 [ %23, %28 ], [ 1, %.thread ]
  %34 = getelementptr inbounds i8, ptr %0, i64 8
  %35 = getelementptr inbounds i8, ptr %0, i64 88
  %36 = getelementptr inbounds i8, ptr %0, i64 368
  %37 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN3jet5ArrayIcLm2EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %36, i64 noundef 0) #5
  call void @_ZN12_GLOBAL__N_117buildSingleSystemEPN3jet5ArrayINS0_13FdmMatrixRow2ELm2EEEPNS1_IdLm2EEERKNS1_IcLm2EEERKNS0_17FaceCenteredGrid2E(ptr noundef nonnull %34, ptr noundef nonnull %35, ptr noundef nonnull align 8 dereferenceable(40) %37, ptr noundef nonnull align 8 dereferenceable(384) %1)
  br label %45

38:                                               ; preds = %.thread48, %.thread, %16
  %.02843 = phi i64 [ 1, %.thread ], [ %23, %16 ], [ 1, %.thread48 ]
  %39 = getelementptr inbounds i8, ptr %0, i64 280
  %40 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN3jet5ArrayINS0_13FdmMatrixRow2ELm2EEESaIS3_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %39) #5
  %41 = getelementptr inbounds i8, ptr %0, i64 328
  %42 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN3jet5ArrayIdLm2EEESaIS2_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %41) #5
  %43 = getelementptr inbounds i8, ptr %0, i64 368
  %44 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN3jet5ArrayIcLm2EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef 0) #5
  call void @_ZN12_GLOBAL__N_117buildSingleSystemEPN3jet5ArrayINS0_13FdmMatrixRow2ELm2EEEPNS1_IdLm2EEERKNS1_IcLm2EEERKNS0_17FaceCenteredGrid2E(ptr noundef nonnull %40, ptr noundef nonnull %42, ptr noundef nonnull align 8 dereferenceable(40) %44, ptr noundef nonnull align 8 dereferenceable(384) %1)
  br label %45

45:                                               ; preds = %.thread50, %.thread45, %38
  %.02842 = phi i64 [ %.0284452, %.thread50 ], [ %.0284447, %.thread45 ], [ %.02843, %38 ]
  call void @llvm.lifetime.start.p0(i64 384, ptr nonnull %5) #5
  call void @_ZN3jet17FaceCenteredGrid2C1Ev(ptr noundef nonnull align 8 dereferenceable(384) %5)
  %46 = icmp ugt i64 %.02842, 1
  br i1 %46, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %45
  %47 = getelementptr inbounds i8, ptr %0, i64 280
  %48 = getelementptr inbounds i8, ptr %0, i64 328
  %49 = getelementptr inbounds i8, ptr %0, i64 368
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  %50 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3jet5Grid210resolutionEv(ptr noundef nonnull align 8 dereferenceable(88) %11)
          to label %51 unwind label %.loopexit.split-lp

51:                                               ; preds = %.lr.ph
  call void @_ZN3jet5Size2C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %50)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #5
  %52 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3jet5Grid211gridSpacingEv(ptr noundef nonnull align 8 dereferenceable(88) %11)
          to label %53 unwind label %.loopexit.split-lp58

53:                                               ; preds = %51
  call void @_ZN3jet6VectorIdLm2EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %52)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #5
  %54 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3jet5Grid26originEv(ptr noundef nonnull align 8 dereferenceable(88) %11)
          to label %55 unwind label %.loopexit.split-lp63

55:                                               ; preds = %53
  call void @_ZN3jet6VectorIdLm2EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %54)
  %56 = load <2 x i64>, ptr %6, align 16, !tbaa !16
  %57 = lshr <2 x i64> %56, <i64 1, i64 1>
  store <2 x i64> %57, ptr %6, align 16, !tbaa !16
  %58 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN3jet6VectorIdLm2EEmLEd(ptr noundef nonnull align 8 dereferenceable(16) %7, double noundef 2.000000e+00)
          to label %59 unwind label %.loopexit.split-lp63

59:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #5
  call void @_ZN3jet6VectorIdLm2EEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9)
  invoke void @_ZN3jet11VectorGrid26resizeERKNS_5Size2ERKNS_6VectorIdLm2EEES7_S7_(ptr noundef nonnull align 8 dereferenceable(96) %5, ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %60 unwind label %.loopexit.split-lp68

60:                                               ; preds = %59
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #5
  invoke void @_ZNK3jet17FaceCenteredGrid27samplerEv(ptr dead_on_unwind nonnull writable sret(%"class.std::function.32") align 8 %10, ptr noundef nonnull align 8 dereferenceable(384) %1)
          to label %61 unwind label %.loopexit.split-lp73

61:                                               ; preds = %60
  invoke void @_ZN3jet17FaceCenteredGrid24fillERKSt8functionIFNS_6VectorIdLm2EEERKS3_EENS_15ExecutionPolicyE(ptr noundef nonnull align 8 dereferenceable(384) %5, ptr noundef nonnull align 8 dereferenceable(32) %10, i32 noundef 1)
          to label %62 unwind label %.loopexit.split-lp78

62:                                               ; preds = %61
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #5
  %63 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN3jet5ArrayINS0_13FdmMatrixRow2ELm2EEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef 1) #5
  %64 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN3jet5ArrayIdLm2EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef 1) #5
  %65 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN3jet5ArrayIcLm2EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef 1) #5
  invoke void @_ZN12_GLOBAL__N_117buildSingleSystemEPN3jet5ArrayINS0_13FdmMatrixRow2ELm2EEEPNS1_IdLm2EEERKNS1_IcLm2EEERKNS0_17FaceCenteredGrid2E(ptr noundef nonnull %63, ptr noundef nonnull %64, ptr noundef nonnull align 8 dereferenceable(40) %65, ptr noundef nonnull align 8 dereferenceable(384) %5)
          to label %66 unwind label %.loopexit.split-lp63

66:                                               ; preds = %62
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  %exitcond.peel.not = icmp eq i64 %.02842, 2
  br i1 %exitcond.peel.not, label %._crit_edge, label %.peel.next

._crit_edge:                                      ; preds = %83, %66, %45
  call void @_ZN3jet17FaceCenteredGrid2D2Ev(ptr noundef nonnull align 8 dereferenceable(384) %5) #5
  call void @llvm.lifetime.end.p0(i64 384, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  ret void

.peel.next:                                       ; preds = %66, %83
  %.02655 = phi i64 [ %84, %83 ], [ 2, %66 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  %67 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3jet5Grid210resolutionEv(ptr noundef nonnull align 8 dereferenceable(88) %.027.sroa.gep29)
          to label %68 unwind label %.loopexit

68:                                               ; preds = %.peel.next
  call void @_ZN3jet5Size2C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %67)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #5
  %69 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3jet5Grid211gridSpacingEv(ptr noundef nonnull align 8 dereferenceable(88) %.027.sroa.gep29)
          to label %70 unwind label %.loopexit57

70:                                               ; preds = %68
  call void @_ZN3jet6VectorIdLm2EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %69)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #5
  %71 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3jet5Grid26originEv(ptr noundef nonnull align 8 dereferenceable(88) %.027.sroa.gep29)
          to label %72 unwind label %.loopexit62

72:                                               ; preds = %70
  call void @_ZN3jet6VectorIdLm2EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %71)
  %73 = load <2 x i64>, ptr %6, align 16, !tbaa !16
  %74 = lshr <2 x i64> %73, <i64 1, i64 1>
  store <2 x i64> %74, ptr %6, align 16, !tbaa !16
  %75 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN3jet6VectorIdLm2EEmLEd(ptr noundef nonnull align 8 dereferenceable(16) %7, double noundef 2.000000e+00)
          to label %76 unwind label %.loopexit62

76:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #5
  call void @_ZN3jet6VectorIdLm2EEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9)
  invoke void @_ZN3jet11VectorGrid26resizeERKNS_5Size2ERKNS_6VectorIdLm2EEES7_S7_(ptr noundef nonnull align 8 dereferenceable(96) %5, ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %77 unwind label %.loopexit67

77:                                               ; preds = %76
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #5
  invoke void @_ZNK3jet17FaceCenteredGrid27samplerEv(ptr dead_on_unwind nonnull writable sret(%"class.std::function.32") align 8 %10, ptr noundef nonnull align 8 dereferenceable(384) %5)
          to label %78 unwind label %.loopexit72

78:                                               ; preds = %77
  invoke void @_ZN3jet17FaceCenteredGrid24fillERKSt8functionIFNS_6VectorIdLm2EEERKS3_EENS_15ExecutionPolicyE(ptr noundef nonnull align 8 dereferenceable(384) %5, ptr noundef nonnull align 8 dereferenceable(32) %10, i32 noundef 1)
          to label %79 unwind label %.loopexit77

79:                                               ; preds = %78
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #5
  %80 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN3jet5ArrayINS0_13FdmMatrixRow2ELm2EEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef %.02655) #5
  %81 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN3jet5ArrayIdLm2EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef %.02655) #5
  %82 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN3jet5ArrayIcLm2EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef %.02655) #5
  invoke void @_ZN12_GLOBAL__N_117buildSingleSystemEPN3jet5ArrayINS0_13FdmMatrixRow2ELm2EEEPNS1_IdLm2EEERKNS1_IcLm2EEERKNS0_17FaceCenteredGrid2E(ptr noundef nonnull %80, ptr noundef nonnull %81, ptr noundef nonnull align 8 dereferenceable(40) %82, ptr noundef nonnull align 8 dereferenceable(384) %5)
          to label %83 unwind label %.loopexit62

83:                                               ; preds = %79
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  %84 = add nuw i64 %.02655, 1
  %exitcond.not = icmp eq i64 %84, %.02842
  br i1 %exitcond.not, label %._crit_edge, label %.peel.next, !llvm.loop !17

.loopexit:                                        ; preds = %.peel.next
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %90

.loopexit.split-lp:                               ; preds = %.lr.ph
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %90

.loopexit57:                                      ; preds = %68
  %lpad.loopexit59 = landingpad { ptr, i32 }
          cleanup
  br label %89

.loopexit.split-lp58:                             ; preds = %51
  %lpad.loopexit.split-lp60 = landingpad { ptr, i32 }
          cleanup
  br label %89

.loopexit62:                                      ; preds = %70, %72, %79
  %lpad.loopexit64 = landingpad { ptr, i32 }
          cleanup
  br label %88

.loopexit.split-lp63:                             ; preds = %53, %55, %62
  %lpad.loopexit.split-lp65 = landingpad { ptr, i32 }
          cleanup
  br label %88

.loopexit67:                                      ; preds = %76
  %lpad.loopexit69 = landingpad { ptr, i32 }
          cleanup
  br label %85

.loopexit.split-lp68:                             ; preds = %59
  %lpad.loopexit.split-lp70 = landingpad { ptr, i32 }
          cleanup
  br label %85

85:                                               ; preds = %.loopexit.split-lp68, %.loopexit67
  %lpad.phi71 = phi { ptr, i32 } [ %lpad.loopexit69, %.loopexit67 ], [ %lpad.loopexit.split-lp70, %.loopexit.split-lp68 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  br label %88

.loopexit72:                                      ; preds = %77
  %lpad.loopexit74 = landingpad { ptr, i32 }
          cleanup
  br label %87

.loopexit.split-lp73:                             ; preds = %60
  %lpad.loopexit.split-lp75 = landingpad { ptr, i32 }
          cleanup
  br label %87

.loopexit77:                                      ; preds = %78
  %lpad.loopexit79 = landingpad { ptr, i32 }
          cleanup
  br label %86

.loopexit.split-lp78:                             ; preds = %61
  %lpad.loopexit.split-lp80 = landingpad { ptr, i32 }
          cleanup
  br label %86

86:                                               ; preds = %.loopexit.split-lp78, %.loopexit77
  %lpad.phi81 = phi { ptr, i32 } [ %lpad.loopexit79, %.loopexit77 ], [ %lpad.loopexit.split-lp80, %.loopexit.split-lp78 ]
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  br label %87

87:                                               ; preds = %.loopexit72, %.loopexit.split-lp73, %86
  %.pn = phi { ptr, i32 } [ %lpad.phi81, %86 ], [ %lpad.loopexit74, %.loopexit72 ], [ %lpad.loopexit.split-lp75, %.loopexit.split-lp73 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #5
  br label %88

88:                                               ; preds = %.loopexit62, %.loopexit.split-lp63, %87, %85
  %.pn37 = phi { ptr, i32 } [ %.pn, %87 ], [ %lpad.phi71, %85 ], [ %lpad.loopexit64, %.loopexit62 ], [ %lpad.loopexit.split-lp65, %.loopexit.split-lp63 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  br label %89

89:                                               ; preds = %.loopexit57, %.loopexit.split-lp58, %88
  %.pn37.pn = phi { ptr, i32 } [ %.pn37, %88 ], [ %lpad.loopexit59, %.loopexit57 ], [ %lpad.loopexit.split-lp60, %.loopexit.split-lp58 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  br label %90

90:                                               ; preds = %.loopexit, %.loopexit.split-lp, %89
  %.pn37.pn.pn = phi { ptr, i32 } [ %.pn37.pn, %89 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  call void @_ZN3jet17FaceCenteredGrid2D2Ev(ptr noundef nonnull align 8 dereferenceable(384) %5) #5
  call void @llvm.lifetime.end.p0(i64 384, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  resume { ptr, i32 } %.pn37.pn.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3jet5Size2C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3 align 2

declare void @_ZN3jet16FdmLinearSystem26resizeERKNS_5Size2E(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3jet11FdmMgUtils221resizeArrayWithFinestINS_13FdmMatrixRow2EEEvRKNS_5Size2EmPSt6vectorINS_5ArrayIT_Lm2EEESaIS9_EE(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, ptr noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3jet11FdmMgUtils221resizeArrayWithFinestIdEEvRKNS_5Size2EmPSt6vectorINS_5ArrayIT_Lm2EEESaIS8_EE(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, ptr noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN3jet5ArrayINS0_13FdmMatrixRow2ELm2EEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_117buildSingleSystemEPN3jet9MatrixCsrIdEEPNS0_7VectorNIdEES6_RKNS0_5ArrayIcLm2EEERKNS0_17FaceCenteredGrid2E(ptr noundef, ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(384)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_117buildSingleSystemEPN3jet5ArrayINS0_13FdmMatrixRow2ELm2EEEPNS1_IdLm2EEERKNS1_IcLm2EEERKNS0_17FaceCenteredGrid2E(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(384)) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN3jet5ArrayINS0_13FdmMatrixRow2ELm2EEESaIS3_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN3jet5ArrayIdLm2EEESaIS2_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

declare void @_ZN3jet17FaceCenteredGrid2C1Ev(ptr noundef nonnull align 8 dereferenceable(384)) unnamed_addr #1

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3jet5Grid211gridSpacingEv(ptr noundef nonnull align 8 dereferenceable(88)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3jet6VectorIdLm2EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3jet5Grid26originEv(ptr noundef nonnull align 8 dereferenceable(88)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN3jet6VectorIdLm2EEmLEd(ptr noundef nonnull align 8 dereferenceable(16), double noundef) local_unnamed_addr #4 align 2

declare void @_ZN3jet11VectorGrid26resizeERKNS_5Size2ERKNS_6VectorIdLm2EEES7_S7_(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3jet6VectorIdLm2EEC2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3 align 2

declare void @_ZN3jet17FaceCenteredGrid24fillERKSt8functionIFNS_6VectorIdLm2EEERKS3_EENS_15ExecutionPolicyE(ptr noundef nonnull align 8 dereferenceable(384), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #1

declare void @_ZNK3jet17FaceCenteredGrid27samplerEv(ptr dead_on_unwind writable sret(%"class.std::function.32") align 8, ptr noundef nonnull align 8 dereferenceable(384)) unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN3jet5ArrayINS0_13FdmMatrixRow2ELm2EEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN3jet5ArrayIdLm2EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3jet17FaceCenteredGrid2D2Ev(ptr noundef nonnull align 8 dereferenceable(384)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 = { 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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTSN3jet12MgParametersINS_8FdmBlas2EEE", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !11, i64 24, !14, i64 56, !14, i64 88, !15, i64 120}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_ZTSSt8functionIFvRKN3jet5ArrayINS0_13FdmMatrixRow2ELm2EEERKNS1_IdLm2EEEjdPS6_S9_EE", !12, i64 0, !13, i64 24}
!12 = !{!"_ZTSSt14_Function_base", !8, i64 0, !13, i64 16}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!"_ZTSSt8functionIFvRKN3jet5ArrayIdLm2EEEPS2_EE", !12, i64 0, !13, i64 24}
!15 = !{!"double", !8, i64 0}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !18, !19}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!"llvm.loop.peeled.count", i32 1}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass