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

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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%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 }
%struct.MatrixCell = type { i8, i8, i8, i8 }

@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [19 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [111 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [26 x i8], align 1
@__FUNCTION__._ZN14PressureSolver30_calculatePreconditionerVectorER18MatrixCoefficientsR8VectorXd = external hidden unnamed_addr constant [31 x i8], align 1

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #4

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: noreturn nounwind
declare void @abort() #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #6

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #6

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 1 dereferenceable(4) ptr @_ZN18MatrixCoefficientsixEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14PressureSolver30_calculatePreconditionerVectorER18MatrixCoefficientsR8VectorXd(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) #2 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %struct.GridIndex, align 4
  %14 = alloca { i64, i32 }, align 8
  %15 = alloca i32, align 4
  %16 = alloca %struct.GridIndex, align 4
  %17 = alloca { i64, i32 }, align 8
  %18 = alloca i32, align 4
  %19 = alloca %struct.GridIndex, align 4
  %20 = alloca { i64, i32 }, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca double, align 8
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  %28 = alloca double, align 8
  %29 = alloca double, align 8
  %30 = alloca double, align 8
  %31 = alloca double, align 8
  %32 = alloca double, align 8
  %33 = alloca double, align 8
  %34 = alloca double, align 8
  %35 = alloca double, align 8
  %36 = alloca double, align 8
  %37 = alloca double, align 8
  %38 = alloca double, align 8
  %39 = alloca double, align 8
  %40 = alloca double, align 8
  %41 = alloca double, align 8
  %42 = alloca double, align 8
  %43 = alloca double, align 8
  %44 = alloca double, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %45 = load ptr, ptr %4, align 8
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = call noundef i64 @_ZN18MatrixCoefficients4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %46)
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = call noundef i64 @_ZN8VectorXd4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %48)
  %50 = icmp eq i64 %47, %49
  br i1 %50, label %61, label %51

51:                                               ; preds = %3
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str)
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %52, ptr noundef @.str.9)
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef @.str.2)
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %54, ptr noundef @.str.3)
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef @.str.4)
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %56, ptr noundef @__FUNCTION__._ZN14PressureSolver30_calculatePreconditionerVectorER18MatrixCoefficientsR8VectorXd)
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %57, ptr noundef @.str.5)
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %58, i32 noundef 247)
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %59, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @abort() #9
  unreachable

61:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #10
  %62 = getelementptr inbounds %class.PressureSolver, ptr %45, i32 0, i32 5
  %63 = load double, ptr %62, align 8, !tbaa !9
  %64 = getelementptr inbounds %class.PressureSolver, ptr %45, i32 0, i32 4
  %65 = load double, ptr %64, align 8, !tbaa !18
  %66 = getelementptr inbounds %class.PressureSolver, ptr %45, i32 0, i32 3
  %67 = load double, ptr %66, align 8, !tbaa !19
  %68 = fmul double %65, %67
  %69 = getelementptr inbounds %class.PressureSolver, ptr %45, i32 0, i32 3
  %70 = load double, ptr %69, align 8, !tbaa !19
  %71 = fmul double %68, %70
  %72 = fdiv double %63, %71
  store double %72, ptr %7, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #10
  %73 = load double, ptr %7, align 8, !tbaa !20
  %74 = fneg double %73
  store double %74, ptr %8, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #10
  store double 0x3FEF0A3D70A3D70A, ptr %9, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #10
  store double 2.500000e-01, ptr %10, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #10
  store i32 0, ptr %11, align 4, !tbaa !21
  br label %75

75:                                               ; preds = %362, %61
  %76 = load i32, ptr %11, align 4, !tbaa !21
  %77 = zext i32 %76 to i64
  %78 = getelementptr inbounds %class.PressureSolver, ptr %45, i32 0, i32 9
  %79 = load ptr, ptr %78, align 8, !tbaa !22
  %80 = call noundef i64 @_ZN15GridIndexVector4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %79)
  %81 = icmp ult i64 %77, %80
  br i1 %81, label %83, label %82

82:                                               ; preds = %75
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #10
  br label %365

83:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #10
  call void @llvm.lifetime.start.p0(i64 12, ptr %13) #10
  %84 = getelementptr inbounds %class.PressureSolver, ptr %45, i32 0, i32 9
  %85 = load ptr, ptr %84, align 8, !tbaa !22
  %86 = load i32, ptr %11, align 4, !tbaa !21
  %87 = call { i64, i32 } @_ZN15GridIndexVector2atEi(ptr noundef nonnull align 8 dereferenceable(40) %85, i32 noundef %86)
  store { i64, i32 } %87, ptr %14, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 8 %14, i64 12, i1 false)
  %88 = getelementptr inbounds %struct.GridIndex, ptr %13, i32 0, i32 0
  %89 = load i32, ptr %88, align 4, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #10
  store i32 %89, ptr %12, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #10
  call void @llvm.lifetime.start.p0(i64 12, ptr %16) #10
  %90 = getelementptr inbounds %class.PressureSolver, ptr %45, i32 0, i32 9
  %91 = load ptr, ptr %90, align 8, !tbaa !22
  %92 = load i32, ptr %11, align 4, !tbaa !21
  %93 = call { i64, i32 } @_ZN15GridIndexVector2atEi(ptr noundef nonnull align 8 dereferenceable(40) %91, i32 noundef %92)
  store { i64, i32 } %93, ptr %17, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 8 %17, i64 12, i1 false)
  %94 = getelementptr inbounds %struct.GridIndex, ptr %16, i32 0, i32 1
  %95 = load i32, ptr %94, align 4, !tbaa !25
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #10
  store i32 %95, ptr %15, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #10
  call void @llvm.lifetime.start.p0(i64 12, ptr %19) #10
  %96 = getelementptr inbounds %class.PressureSolver, ptr %45, i32 0, i32 9
  %97 = load ptr, ptr %96, align 8, !tbaa !22
  %98 = load i32, ptr %11, align 4, !tbaa !21
  %99 = call { i64, i32 } @_ZN15GridIndexVector2atEi(ptr noundef nonnull align 8 dereferenceable(40) %97, i32 noundef %98)
  store { i64, i32 } %99, ptr %20, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 8 %20, i64 12, i1 false)
  %100 = getelementptr inbounds %struct.GridIndex, ptr %19, i32 0, i32 2
  %101 = load i32, ptr %100, align 4, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #10
  store i32 %101, ptr %18, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #10
  %102 = load i32, ptr %12, align 4, !tbaa !21
  %103 = load i32, ptr %15, align 4, !tbaa !21
  %104 = load i32, ptr %18, align 4, !tbaa !21
  %105 = call noundef i32 @_ZN14PressureSolver18_GridToVectorIndexEiii(ptr noundef nonnull align 8 dereferenceable(144) %45, i32 noundef %102, i32 noundef %103, i32 noundef %104)
  store i32 %105, ptr %21, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #10
  %106 = getelementptr inbounds %class.PressureSolver, ptr %45, i32 0, i32 13
  %107 = load i32, ptr %12, align 4, !tbaa !21
  %108 = sub nsw i32 %107, 1
  %109 = load i32, ptr %15, align 4, !tbaa !21
  %110 = load i32, ptr %18, align 4, !tbaa !21
  %111 = call noundef i32 @_ZN15GridIndexKeyMap4findEiii(ptr noundef nonnull align 8 dereferenceable(44) %106, i32 noundef %108, i32 noundef %109, i32 noundef %110)
  store i32 %111, ptr %22, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #10
  %112 = getelementptr inbounds %class.PressureSolver, ptr %45, i32 0, i32 13
  %113 = load i32, ptr %12, align 4, !tbaa !21
  %114 = load i32, ptr %15, align 4, !tbaa !21
  %115 = sub nsw i32 %114, 1
  %116 = load i32, ptr %18, align 4, !tbaa !21
  %117 = call noundef i32 @_ZN15GridIndexKeyMap4findEiii(ptr noundef nonnull align 8 dereferenceable(44) %112, i32 noundef %113, i32 noundef %115, i32 noundef %116)
  store i32 %117, ptr %23, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #10
  %118 = getelementptr inbounds %class.PressureSolver, ptr %45, i32 0, i32 13
  %119 = load i32, ptr %12, align 4, !tbaa !21
  %120 = load i32, ptr %15, align 4, !tbaa !21
  %121 = load i32, ptr %18, align 4, !tbaa !21
  %122 = sub nsw i32 %121, 1
  %123 = call noundef i32 @_ZN15GridIndexKeyMap4findEiii(ptr noundef nonnull align 8 dereferenceable(44) %118, i32 noundef %119, i32 noundef %120, i32 noundef %122)
  store i32 %123, ptr %24, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #10
  %124 = load ptr, ptr %5, align 8, !tbaa !5
  %125 = load i32, ptr %21, align 4, !tbaa !21
  %126 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN18MatrixCoefficientsixEi(ptr noundef nonnull align 8 dereferenceable(24) %124, i32 noundef %125)
  %127 = getelementptr inbounds %struct.MatrixCell, ptr %126, i32 0, i32 0
  %128 = load i8, ptr %127, align 1, !tbaa !27
  %129 = sitofp i8 %128 to double
  %130 = load double, ptr %7, align 8, !tbaa !20
  %131 = fmul double %129, %130
  store double %131, ptr %25, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #10
  %132 = load i32, ptr %22, align 4, !tbaa !21
  %133 = icmp ne i32 %132, -1
  br i1 %133, label %134, label %143

134:                                              ; preds = %83
  %135 = load ptr, ptr %5, align 8, !tbaa !5
  %136 = load i32, ptr %22, align 4, !tbaa !21
  %137 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN18MatrixCoefficientsixEi(ptr noundef nonnull align 8 dereferenceable(24) %135, i32 noundef %136)
  %138 = getelementptr inbounds %struct.MatrixCell, ptr %137, i32 0, i32 1
  %139 = load i8, ptr %138, align 1, !tbaa !29
  %140 = sitofp i8 %139 to double
  %141 = load double, ptr %8, align 8, !tbaa !20
  %142 = fmul double %140, %141
  br label %144

143:                                              ; preds = %83
  br label %144

144:                                              ; preds = %143, %134
  %145 = phi double [ %142, %134 ], [ 0.000000e+00, %143 ]
  store double %145, ptr %26, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #10
  %146 = load i32, ptr %23, align 4, !tbaa !21
  %147 = icmp ne i32 %146, -1
  br i1 %147, label %148, label %157

148:                                              ; preds = %144
  %149 = load ptr, ptr %5, align 8, !tbaa !5
  %150 = load i32, ptr %23, align 4, !tbaa !21
  %151 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN18MatrixCoefficientsixEi(ptr noundef nonnull align 8 dereferenceable(24) %149, i32 noundef %150)
  %152 = getelementptr inbounds %struct.MatrixCell, ptr %151, i32 0, i32 1
  %153 = load i8, ptr %152, align 1, !tbaa !29
  %154 = sitofp i8 %153 to double
  %155 = load double, ptr %8, align 8, !tbaa !20
  %156 = fmul double %154, %155
  br label %158

157:                                              ; preds = %144
  br label %158

158:                                              ; preds = %157, %148
  %159 = phi double [ %156, %148 ], [ 0.000000e+00, %157 ]
  store double %159, ptr %27, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #10
  %160 = load i32, ptr %24, align 4, !tbaa !21
  %161 = icmp ne i32 %160, -1
  br i1 %161, label %162, label %171

162:                                              ; preds = %158
  %163 = load ptr, ptr %5, align 8, !tbaa !5
  %164 = load i32, ptr %24, align 4, !tbaa !21
  %165 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN18MatrixCoefficientsixEi(ptr noundef nonnull align 8 dereferenceable(24) %163, i32 noundef %164)
  %166 = getelementptr inbounds %struct.MatrixCell, ptr %165, i32 0, i32 1
  %167 = load i8, ptr %166, align 1, !tbaa !29
  %168 = sitofp i8 %167 to double
  %169 = load double, ptr %8, align 8, !tbaa !20
  %170 = fmul double %168, %169
  br label %172

171:                                              ; preds = %158
  br label %172

172:                                              ; preds = %171, %162
  %173 = phi double [ %170, %162 ], [ 0.000000e+00, %171 ]
  store double %173, ptr %28, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #10
  %174 = load i32, ptr %22, align 4, !tbaa !21
  %175 = icmp ne i32 %174, -1
  br i1 %175, label %176, label %185

176:                                              ; preds = %172
  %177 = load ptr, ptr %5, align 8, !tbaa !5
  %178 = load i32, ptr %22, align 4, !tbaa !21
  %179 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN18MatrixCoefficientsixEi(ptr noundef nonnull align 8 dereferenceable(24) %177, i32 noundef %178)
  %180 = getelementptr inbounds %struct.MatrixCell, ptr %179, i32 0, i32 2
  %181 = load i8, ptr %180, align 1, !tbaa !30
  %182 = sitofp i8 %181 to double
  %183 = load double, ptr %8, align 8, !tbaa !20
  %184 = fmul double %182, %183
  br label %186

185:                                              ; preds = %172
  br label %186

186:                                              ; preds = %185, %176
  %187 = phi double [ %184, %176 ], [ 0.000000e+00, %185 ]
  store double %187, ptr %29, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #10
  %188 = load i32, ptr %23, align 4, !tbaa !21
  %189 = icmp ne i32 %188, -1
  br i1 %189, label %190, label %199

190:                                              ; preds = %186
  %191 = load ptr, ptr %5, align 8, !tbaa !5
  %192 = load i32, ptr %23, align 4, !tbaa !21
  %193 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN18MatrixCoefficientsixEi(ptr noundef nonnull align 8 dereferenceable(24) %191, i32 noundef %192)
  %194 = getelementptr inbounds %struct.MatrixCell, ptr %193, i32 0, i32 2
  %195 = load i8, ptr %194, align 1, !tbaa !30
  %196 = sitofp i8 %195 to double
  %197 = load double, ptr %8, align 8, !tbaa !20
  %198 = fmul double %196, %197
  br label %200

199:                                              ; preds = %186
  br label %200

200:                                              ; preds = %199, %190
  %201 = phi double [ %198, %190 ], [ 0.000000e+00, %199 ]
  store double %201, ptr %30, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #10
  %202 = load i32, ptr %24, align 4, !tbaa !21
  %203 = icmp ne i32 %202, -1
  br i1 %203, label %204, label %213

204:                                              ; preds = %200
  %205 = load ptr, ptr %5, align 8, !tbaa !5
  %206 = load i32, ptr %24, align 4, !tbaa !21
  %207 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN18MatrixCoefficientsixEi(ptr noundef nonnull align 8 dereferenceable(24) %205, i32 noundef %206)
  %208 = getelementptr inbounds %struct.MatrixCell, ptr %207, i32 0, i32 2
  %209 = load i8, ptr %208, align 1, !tbaa !30
  %210 = sitofp i8 %209 to double
  %211 = load double, ptr %8, align 8, !tbaa !20
  %212 = fmul double %210, %211
  br label %214

213:                                              ; preds = %200
  br label %214

214:                                              ; preds = %213, %204
  %215 = phi double [ %212, %204 ], [ 0.000000e+00, %213 ]
  store double %215, ptr %31, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #10
  %216 = load i32, ptr %22, align 4, !tbaa !21
  %217 = icmp ne i32 %216, -1
  br i1 %217, label %218, label %227

218:                                              ; preds = %214
  %219 = load ptr, ptr %5, align 8, !tbaa !5
  %220 = load i32, ptr %22, align 4, !tbaa !21
  %221 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN18MatrixCoefficientsixEi(ptr noundef nonnull align 8 dereferenceable(24) %219, i32 noundef %220)
  %222 = getelementptr inbounds %struct.MatrixCell, ptr %221, i32 0, i32 3
  %223 = load i8, ptr %222, align 1, !tbaa !31
  %224 = sitofp i8 %223 to double
  %225 = load double, ptr %8, align 8, !tbaa !20
  %226 = fmul double %224, %225
  br label %228

227:                                              ; preds = %214
  br label %228

228:                                              ; preds = %227, %218
  %229 = phi double [ %226, %218 ], [ 0.000000e+00, %227 ]
  store double %229, ptr %32, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #10
  %230 = load i32, ptr %23, align 4, !tbaa !21
  %231 = icmp ne i32 %230, -1
  br i1 %231, label %232, label %241

232:                                              ; preds = %228
  %233 = load ptr, ptr %5, align 8, !tbaa !5
  %234 = load i32, ptr %23, align 4, !tbaa !21
  %235 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN18MatrixCoefficientsixEi(ptr noundef nonnull align 8 dereferenceable(24) %233, i32 noundef %234)
  %236 = getelementptr inbounds %struct.MatrixCell, ptr %235, i32 0, i32 3
  %237 = load i8, ptr %236, align 1, !tbaa !31
  %238 = sitofp i8 %237 to double
  %239 = load double, ptr %8, align 8, !tbaa !20
  %240 = fmul double %238, %239
  br label %242

241:                                              ; preds = %228
  br label %242

242:                                              ; preds = %241, %232
  %243 = phi double [ %240, %232 ], [ 0.000000e+00, %241 ]
  store double %243, ptr %33, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #10
  %244 = load i32, ptr %24, align 4, !tbaa !21
  %245 = icmp ne i32 %244, -1
  br i1 %245, label %246, label %255

246:                                              ; preds = %242
  %247 = load ptr, ptr %5, align 8, !tbaa !5
  %248 = load i32, ptr %24, align 4, !tbaa !21
  %249 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN18MatrixCoefficientsixEi(ptr noundef nonnull align 8 dereferenceable(24) %247, i32 noundef %248)
  %250 = getelementptr inbounds %struct.MatrixCell, ptr %249, i32 0, i32 3
  %251 = load i8, ptr %250, align 1, !tbaa !31
  %252 = sitofp i8 %251 to double
  %253 = load double, ptr %8, align 8, !tbaa !20
  %254 = fmul double %252, %253
  br label %256

255:                                              ; preds = %242
  br label %256

256:                                              ; preds = %255, %246
  %257 = phi double [ %254, %246 ], [ 0.000000e+00, %255 ]
  store double %257, ptr %34, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #10
  %258 = load i32, ptr %22, align 4, !tbaa !21
  %259 = icmp ne i32 %258, -1
  br i1 %259, label %260, label %265

260:                                              ; preds = %256
  %261 = load ptr, ptr %6, align 8, !tbaa !5
  %262 = load i32, ptr %22, align 4, !tbaa !21
  %263 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8VectorXdixEi(ptr noundef nonnull align 8 dereferenceable(24) %261, i32 noundef %262)
  %264 = load double, ptr %263, align 8, !tbaa !20
  br label %266

265:                                              ; preds = %256
  br label %266

266:                                              ; preds = %265, %260
  %267 = phi double [ %264, %260 ], [ 0.000000e+00, %265 ]
  store double %267, ptr %35, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #10
  %268 = load i32, ptr %23, align 4, !tbaa !21
  %269 = icmp ne i32 %268, -1
  br i1 %269, label %270, label %275

270:                                              ; preds = %266
  %271 = load ptr, ptr %6, align 8, !tbaa !5
  %272 = load i32, ptr %23, align 4, !tbaa !21
  %273 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8VectorXdixEi(ptr noundef nonnull align 8 dereferenceable(24) %271, i32 noundef %272)
  %274 = load double, ptr %273, align 8, !tbaa !20
  br label %276

275:                                              ; preds = %266
  br label %276

276:                                              ; preds = %275, %270
  %277 = phi double [ %274, %270 ], [ 0.000000e+00, %275 ]
  store double %277, ptr %36, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #10
  %278 = load i32, ptr %24, align 4, !tbaa !21
  %279 = icmp ne i32 %278, -1
  br i1 %279, label %280, label %285

280:                                              ; preds = %276
  %281 = load ptr, ptr %6, align 8, !tbaa !5
  %282 = load i32, ptr %24, align 4, !tbaa !21
  %283 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8VectorXdixEi(ptr noundef nonnull align 8 dereferenceable(24) %281, i32 noundef %282)
  %284 = load double, ptr %283, align 8, !tbaa !20
  br label %286

285:                                              ; preds = %276
  br label %286

286:                                              ; preds = %285, %280
  %287 = phi double [ %284, %280 ], [ 0.000000e+00, %285 ]
  store double %287, ptr %37, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #10
  %288 = load double, ptr %26, align 8, !tbaa !20
  %289 = load double, ptr %35, align 8, !tbaa !20
  %290 = fmul double %288, %289
  store double %290, ptr %38, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #10
  %291 = load double, ptr %30, align 8, !tbaa !20
  %292 = load double, ptr %36, align 8, !tbaa !20
  %293 = fmul double %291, %292
  store double %293, ptr %39, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #10
  %294 = load double, ptr %34, align 8, !tbaa !20
  %295 = load double, ptr %37, align 8, !tbaa !20
  %296 = fmul double %294, %295
  store double %296, ptr %40, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #10
  %297 = load double, ptr %35, align 8, !tbaa !20
  %298 = load double, ptr %35, align 8, !tbaa !20
  %299 = fmul double %297, %298
  store double %299, ptr %41, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #10
  %300 = load double, ptr %36, align 8, !tbaa !20
  %301 = load double, ptr %36, align 8, !tbaa !20
  %302 = fmul double %300, %301
  store double %302, ptr %42, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #10
  %303 = load double, ptr %37, align 8, !tbaa !20
  %304 = load double, ptr %37, align 8, !tbaa !20
  %305 = fmul double %303, %304
  store double %305, ptr %43, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #10
  %306 = load double, ptr %25, align 8, !tbaa !20
  %307 = load double, ptr %38, align 8, !tbaa !20
  %308 = load double, ptr %38, align 8, !tbaa !20
  %309 = fneg double %307
  %310 = call double @llvm.fmuladd.f64(double %309, double %308, double %306)
  %311 = load double, ptr %39, align 8, !tbaa !20
  %312 = load double, ptr %39, align 8, !tbaa !20
  %313 = fneg double %311
  %314 = call double @llvm.fmuladd.f64(double %313, double %312, double %310)
  %315 = load double, ptr %40, align 8, !tbaa !20
  %316 = load double, ptr %40, align 8, !tbaa !20
  %317 = fneg double %315
  %318 = call double @llvm.fmuladd.f64(double %317, double %316, double %314)
  %319 = load double, ptr %9, align 8, !tbaa !20
  %320 = load double, ptr %26, align 8, !tbaa !20
  %321 = load double, ptr %29, align 8, !tbaa !20
  %322 = load double, ptr %32, align 8, !tbaa !20
  %323 = fadd double %321, %322
  %324 = fmul double %320, %323
  %325 = load double, ptr %41, align 8, !tbaa !20
  %326 = load double, ptr %30, align 8, !tbaa !20
  %327 = load double, ptr %27, align 8, !tbaa !20
  %328 = load double, ptr %33, align 8, !tbaa !20
  %329 = fadd double %327, %328
  %330 = fmul double %326, %329
  %331 = load double, ptr %42, align 8, !tbaa !20
  %332 = fmul double %330, %331
  %333 = call double @llvm.fmuladd.f64(double %324, double %325, double %332)
  %334 = load double, ptr %34, align 8, !tbaa !20
  %335 = load double, ptr %28, align 8, !tbaa !20
  %336 = load double, ptr %31, align 8, !tbaa !20
  %337 = fadd double %335, %336
  %338 = fmul double %334, %337
  %339 = load double, ptr %43, align 8, !tbaa !20
  %340 = call double @llvm.fmuladd.f64(double %338, double %339, double %333)
  %341 = fneg double %319
  %342 = call double @llvm.fmuladd.f64(double %341, double %340, double %318)
  store double %342, ptr %44, align 8, !tbaa !20
  %343 = load double, ptr %44, align 8, !tbaa !20
  %344 = load double, ptr %10, align 8, !tbaa !20
  %345 = load double, ptr %25, align 8, !tbaa !20
  %346 = fmul double %344, %345
  %347 = fcmp olt double %343, %346
  br i1 %347, label %348, label %350

348:                                              ; preds = %286
  %349 = load double, ptr %25, align 8, !tbaa !20
  store double %349, ptr %44, align 8, !tbaa !20
  br label %350

350:                                              ; preds = %348, %286
  %351 = load double, ptr %44, align 8, !tbaa !20
  %352 = call double @llvm.fabs.f64(double %351)
  %353 = fcmp ogt double %352, 1.000000e-08
  br i1 %353, label %354, label %361

354:                                              ; preds = %350
  %355 = load double, ptr %44, align 8, !tbaa !20
  %356 = call double @sqrt(double noundef %355) #10
  %357 = fdiv double 1.000000e+00, %356
  %358 = load ptr, ptr %6, align 8, !tbaa !5
  %359 = load i32, ptr %21, align 4, !tbaa !21
  %360 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8VectorXdixEi(ptr noundef nonnull align 8 dereferenceable(24) %358, i32 noundef %359)
  store double %357, ptr %360, align 8, !tbaa !20
  br label %361

361:                                              ; preds = %354, %350
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #10
  br label %362

362:                                              ; preds = %361
  %363 = load i32, ptr %11, align 4, !tbaa !21
  %364 = add i32 %363, 1
  store i32 %364, ptr %11, align 4, !tbaa !21
  br label %75, !llvm.loop !32

365:                                              ; preds = %82
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #10
  ret void
}

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

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

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

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

declare noundef i32 @_ZN15GridIndexKeyMap4findEiii(ptr noundef nonnull align 8 dereferenceable(44), i32 noundef, i32 noundef, i32 noundef) #4

; Function Attrs: nounwind
declare double @sqrt(double noundef) #8

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { noreturn nounwind }
attributes #10 = { 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 32}
!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 = !{!10, !12, i64 24}
!19 = !{!10, !12, i64 16}
!20 = !{!12, !12, i64 0}
!21 = !{!11, !11, i64 0}
!22 = !{!10, !6, i64 64}
!23 = !{!24, !11, i64 0}
!24 = !{!"_ZTS9GridIndex", !11, i64 0, !11, i64 4, !11, i64 8}
!25 = !{!24, !11, i64 4}
!26 = !{!24, !11, i64 8}
!27 = !{!28, !7, i64 0}
!28 = !{!"_ZTS10MatrixCell", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3}
!29 = !{!28, !7, i64 1}
!30 = !{!28, !7, i64 2}
!31 = !{!28, !7, i64 3}
!32 = distinct !{!32, !33}
!33 = !{!"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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [19 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [111 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [26 x i8], align 1
@__FUNCTION__._ZN14PressureSolver30_calculatePreconditionerVectorER18MatrixCoefficientsR8VectorXd = external hidden unnamed_addr constant [31 x i8], align 1

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

; Function Attrs: noreturn nounwind
declare void @abort() local_unnamed_addr #4

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #5

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #5

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14PressureSolver30_calculatePreconditionerVectorER18MatrixCoefficientsR8VectorXd(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) local_unnamed_addr #1 align 2 {
  %4 = tail call noundef i64 @_ZN18MatrixCoefficients4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %5 = tail call noundef i64 @_ZN8VectorXd4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %6 = icmp eq i64 %4, %5
  br i1 %6, label %17, label %7

7:                                                ; preds = %3
  %8 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str)
  %9 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull @.str.9)
  %10 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull @.str.2)
  %11 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull @.str.3)
  %12 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull @.str.4)
  %13 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull @__FUNCTION__._ZN14PressureSolver30_calculatePreconditionerVectorER18MatrixCoefficientsR8VectorXd)
  %14 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull @.str.5)
  %15 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %14, i32 noundef 247)
  %16 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  tail call void @abort() #7
  unreachable

17:                                               ; preds = %3
  %18 = getelementptr inbounds i8, ptr %0, i64 32
  %19 = load double, ptr %18, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %0, i64 24
  %21 = load double, ptr %20, align 8, !tbaa !17
  %22 = getelementptr inbounds i8, ptr %0, i64 16
  %23 = load double, ptr %22, align 8, !tbaa !18
  %24 = fmul double %21, %23
  %25 = fmul double %23, %24
  %26 = fdiv double %19, %25
  %27 = fneg double %26
  %28 = getelementptr inbounds i8, ptr %0, i64 64
  %29 = load ptr, ptr %28, align 8, !tbaa !19
  %30 = tail call noundef i64 @_ZN15GridIndexVector4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %29)
  %.not134 = icmp eq i64 %30, 0
  br i1 %.not134, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %17
  %31 = getelementptr inbounds i8, ptr %0, i64 96
  br label %32

._crit_edge:                                      ; preds = %167, %17
  ret void

32:                                               ; preds = %.lr.ph, %167
  %.0120133 = phi i32 [ 0, %.lr.ph ], [ %168, %167 ]
  %33 = load ptr, ptr %28, align 8, !tbaa !19
  %34 = tail call { i64, i32 } @_ZN15GridIndexVector2atEi(ptr noundef nonnull align 8 dereferenceable(40) %33, i32 noundef %.0120133)
  %.fca.0.extract75 = extractvalue { i64, i32 } %34, 0
  %.sroa.079.0.extract.trunc = trunc i64 %.fca.0.extract75 to i32
  %35 = load ptr, ptr %28, align 8, !tbaa !19
  %36 = tail call { i64, i32 } @_ZN15GridIndexVector2atEi(ptr noundef nonnull align 8 dereferenceable(40) %35, i32 noundef %.0120133)
  %.fca.0.extract66 = extractvalue { i64, i32 } %36, 0
  %.sroa.070.4.extract.shift = lshr i64 %.fca.0.extract66, 32
  %.sroa.070.4.extract.trunc = trunc nuw i64 %.sroa.070.4.extract.shift to i32
  %37 = load ptr, ptr %28, align 8, !tbaa !19
  %38 = tail call { i64, i32 } @_ZN15GridIndexVector2atEi(ptr noundef nonnull align 8 dereferenceable(40) %37, i32 noundef %.0120133)
  %.fca.1.extract = extractvalue { i64, i32 } %38, 1
  %39 = tail call noundef i32 @_ZN14PressureSolver18_GridToVectorIndexEiii(ptr noundef nonnull align 8 dereferenceable(144) %0, i32 noundef %.sroa.079.0.extract.trunc, i32 noundef %.sroa.070.4.extract.trunc, i32 noundef %.fca.1.extract)
  %40 = add nsw i32 %.sroa.079.0.extract.trunc, -1
  %41 = tail call noundef i32 @_ZN15GridIndexKeyMap4findEiii(ptr noundef nonnull align 8 dereferenceable(44) %31, i32 noundef %40, i32 noundef %.sroa.070.4.extract.trunc, i32 noundef %.fca.1.extract)
  %42 = add nsw i32 %.sroa.070.4.extract.trunc, -1
  %43 = tail call noundef i32 @_ZN15GridIndexKeyMap4findEiii(ptr noundef nonnull align 8 dereferenceable(44) %31, i32 noundef %.sroa.079.0.extract.trunc, i32 noundef %42, i32 noundef %.fca.1.extract)
  %44 = add nsw i32 %.fca.1.extract, -1
  %45 = tail call noundef i32 @_ZN15GridIndexKeyMap4findEiii(ptr noundef nonnull align 8 dereferenceable(44) %31, i32 noundef %.sroa.079.0.extract.trunc, i32 noundef %.sroa.070.4.extract.trunc, i32 noundef %44)
  %46 = tail call noundef nonnull align 1 dereferenceable(4) ptr @_ZN18MatrixCoefficientsixEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %39)
  %47 = load i8, ptr %46, align 1, !tbaa !20
  %48 = sitofp i8 %47 to double
  %49 = fmul double %26, %48
  %.not = icmp eq i32 %41, -1
  br i1 %.not, label %56, label %50

50:                                               ; preds = %32
  %51 = tail call noundef nonnull align 1 dereferenceable(4) ptr @_ZN18MatrixCoefficientsixEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %41)
  %52 = getelementptr inbounds i8, ptr %51, i64 1
  %53 = load i8, ptr %52, align 1, !tbaa !22
  %54 = sitofp i8 %53 to double
  %55 = fmul double %27, %54
  br label %56

56:                                               ; preds = %32, %50
  %57 = phi double [ %55, %50 ], [ 0.000000e+00, %32 ]
  %.not131 = icmp eq i32 %43, -1
  br i1 %.not131, label %64, label %58

58:                                               ; preds = %56
  %59 = tail call noundef nonnull align 1 dereferenceable(4) ptr @_ZN18MatrixCoefficientsixEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %43)
  %60 = getelementptr inbounds i8, ptr %59, i64 1
  %61 = load i8, ptr %60, align 1, !tbaa !22
  %62 = sitofp i8 %61 to double
  %63 = fmul double %27, %62
  br label %64

64:                                               ; preds = %56, %58
  %65 = phi double [ %63, %58 ], [ 0.000000e+00, %56 ]
  %.not132 = icmp eq i32 %45, -1
  br i1 %.not132, label %72, label %66

66:                                               ; preds = %64
  %67 = tail call noundef nonnull align 1 dereferenceable(4) ptr @_ZN18MatrixCoefficientsixEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %45)
  %68 = getelementptr inbounds i8, ptr %67, i64 1
  %69 = load i8, ptr %68, align 1, !tbaa !22
  %70 = sitofp i8 %69 to double
  %71 = fmul double %27, %70
  br label %72

72:                                               ; preds = %64, %66
  %73 = phi double [ %71, %66 ], [ 0.000000e+00, %64 ]
  br i1 %.not, label %80, label %74

74:                                               ; preds = %72
  %75 = tail call noundef nonnull align 1 dereferenceable(4) ptr @_ZN18MatrixCoefficientsixEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %41)
  %76 = getelementptr inbounds i8, ptr %75, i64 2
  %77 = load i8, ptr %76, align 1, !tbaa !23
  %78 = sitofp i8 %77 to double
  %79 = fmul double %27, %78
  br label %80

80:                                               ; preds = %72, %74
  %81 = phi double [ %79, %74 ], [ 0.000000e+00, %72 ]
  br i1 %.not131, label %88, label %82

82:                                               ; preds = %80
  %83 = tail call noundef nonnull align 1 dereferenceable(4) ptr @_ZN18MatrixCoefficientsixEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %43)
  %84 = getelementptr inbounds i8, ptr %83, i64 2
  %85 = load i8, ptr %84, align 1, !tbaa !23
  %86 = sitofp i8 %85 to double
  %87 = fmul double %27, %86
  br label %88

88:                                               ; preds = %80, %82
  %89 = phi double [ %87, %82 ], [ 0.000000e+00, %80 ]
  br i1 %.not132, label %96, label %90

90:                                               ; preds = %88
  %91 = tail call noundef nonnull align 1 dereferenceable(4) ptr @_ZN18MatrixCoefficientsixEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %45)
  %92 = getelementptr inbounds i8, ptr %91, i64 2
  %93 = load i8, ptr %92, align 1, !tbaa !23
  %94 = sitofp i8 %93 to double
  %95 = fmul double %27, %94
  br label %96

96:                                               ; preds = %88, %90
  %97 = phi double [ %95, %90 ], [ 0.000000e+00, %88 ]
  br i1 %.not, label %104, label %98

98:                                               ; preds = %96
  %99 = tail call noundef nonnull align 1 dereferenceable(4) ptr @_ZN18MatrixCoefficientsixEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %41)
  %100 = getelementptr inbounds i8, ptr %99, i64 3
  %101 = load i8, ptr %100, align 1, !tbaa !24
  %102 = sitofp i8 %101 to double
  %103 = fmul double %27, %102
  br label %104

104:                                              ; preds = %96, %98
  %105 = phi double [ %103, %98 ], [ 0.000000e+00, %96 ]
  br i1 %.not131, label %112, label %106

106:                                              ; preds = %104
  %107 = tail call noundef nonnull align 1 dereferenceable(4) ptr @_ZN18MatrixCoefficientsixEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %43)
  %108 = getelementptr inbounds i8, ptr %107, i64 3
  %109 = load i8, ptr %108, align 1, !tbaa !24
  %110 = sitofp i8 %109 to double
  %111 = fmul double %27, %110
  br label %112

112:                                              ; preds = %104, %106
  %113 = phi double [ %111, %106 ], [ 0.000000e+00, %104 ]
  br i1 %.not132, label %120, label %114

114:                                              ; preds = %112
  %115 = tail call noundef nonnull align 1 dereferenceable(4) ptr @_ZN18MatrixCoefficientsixEi(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %45)
  %116 = getelementptr inbounds i8, ptr %115, i64 3
  %117 = load i8, ptr %116, align 1, !tbaa !24
  %118 = sitofp i8 %117 to double
  %119 = fmul double %27, %118
  br label %120

120:                                              ; preds = %112, %114
  %121 = phi double [ %119, %114 ], [ 0.000000e+00, %112 ]
  br i1 %.not, label %125, label %122

122:                                              ; preds = %120
  %123 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8VectorXdixEi(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %41)
  %124 = load double, ptr %123, align 8, !tbaa !25
  br label %125

125:                                              ; preds = %120, %122
  %126 = phi double [ %124, %122 ], [ 0.000000e+00, %120 ]
  br i1 %.not131, label %130, label %127

127:                                              ; preds = %125
  %128 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8VectorXdixEi(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %43)
  %129 = load double, ptr %128, align 8, !tbaa !25
  br label %130

130:                                              ; preds = %125, %127
  %131 = phi double [ %129, %127 ], [ 0.000000e+00, %125 ]
  br i1 %.not132, label %135, label %132

132:                                              ; preds = %130
  %133 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8VectorXdixEi(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %45)
  %134 = load double, ptr %133, align 8, !tbaa !25
  br label %135

135:                                              ; preds = %130, %132
  %136 = phi double [ %134, %132 ], [ 0.000000e+00, %130 ]
  %137 = fmul double %57, %126
  %138 = fmul double %89, %131
  %139 = fmul double %121, %136
  %140 = fmul double %126, %126
  %141 = fmul double %131, %131
  %142 = fmul double %136, %136
  %143 = fneg double %137
  %144 = tail call double @llvm.fmuladd.f64(double %143, double %137, double %49)
  %145 = fneg double %138
  %146 = tail call double @llvm.fmuladd.f64(double %145, double %138, double %144)
  %147 = fneg double %139
  %148 = tail call double @llvm.fmuladd.f64(double %147, double %139, double %146)
  %149 = fadd double %81, %105
  %150 = fmul double %57, %149
  %151 = fadd double %65, %113
  %152 = fmul double %89, %151
  %153 = fmul double %152, %141
  %154 = tail call double @llvm.fmuladd.f64(double %150, double %140, double %153)
  %155 = fadd double %73, %97
  %156 = fmul double %155, %121
  %157 = tail call double @llvm.fmuladd.f64(double %156, double %142, double %154)
  %158 = tail call double @llvm.fmuladd.f64(double %157, double 0xBFEF0A3D70A3D70A, double %148)
  %159 = fmul double %49, 2.500000e-01
  %160 = fcmp olt double %158, %159
  %.0 = select i1 %160, double %49, double %158
  %161 = tail call double @llvm.fabs.f64(double %.0)
  %162 = fcmp ogt double %161, 1.000000e-08
  br i1 %162, label %163, label %167

163:                                              ; preds = %135
  %164 = tail call double @sqrt(double noundef %.0) #8
  %165 = fdiv double 1.000000e+00, %164
  %166 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8VectorXdixEi(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %39)
  store double %165, ptr %166, align 8, !tbaa !25
  br label %167

167:                                              ; preds = %163, %135
  %168 = add i32 %.0120133, 1
  %169 = zext i32 %168 to i64
  %170 = load ptr, ptr %28, align 8, !tbaa !19
  %171 = tail call noundef i64 @_ZN15GridIndexVector4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %170)
  %172 = icmp ugt i64 %171, %169
  br i1 %172, label %32, label %._crit_edge, !llvm.loop !26
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN15GridIndexVector4sizeEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #0 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

; 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

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

declare noundef i32 @_ZN15GridIndexKeyMap4findEiii(ptr noundef nonnull align 8 dereferenceable(44), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #6

attributes #0 = { 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 #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { noreturn nounwind }
attributes #8 = { 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, !10, i64 32}
!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, !10, i64 24}
!18 = !{!6, !10, i64 16}
!19 = !{!6, !11, i64 64}
!20 = !{!21, !8, i64 0}
!21 = !{!"_ZTS10MatrixCell", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3}
!22 = !{!21, !8, i64 1}
!23 = !{!21, !8, i64 2}
!24 = !{!21, !8, i64 3}
!25 = !{!10, !10, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}


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