; LLVM IR from ERGO-Code/HiGHS :: src/ipm/ipx (kkt_solver_diag)

; 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::valarray" = type { i64, ptr }
%"class.std::_Expr" = type { %"struct.std::__detail::_UnClos" }
%"struct.std::__detail::_UnClos" = type { %"class.std::__detail::_UnBase" }
%"class.std::__detail::_UnBase" = type { ptr }
%"class.ipx::ConjugateResiduals" = type { ptr, i32, i32, double }
%"class.ipx::KKTSolverDiag" = type <{ %"class.ipx::KKTSolver", ptr, ptr, %"class.ipx::NormalMatrix", %"class.ipx::DiagonalPrecond", %"class.std::valarray", %"class.std::valarray", i8, [3 x i8], i32, i32, [4 x i8] }>
%"class.ipx::KKTSolver" = type { ptr }
%"class.ipx::NormalMatrix" = type { %"class.ipx::LinearOperator", ptr, ptr, i8, %"class.std::valarray", double }
%"class.ipx::LinearOperator" = type { ptr }
%"class.ipx::DiagonalPrecond" = type { %"class.ipx::LinearOperator", ptr, i8, %"class.std::valarray", double }
%struct.ipx_info = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, double, double, double, double, double, double, double, double, double, double, double, double, double, double, i32, i32, i32, i32, i32, i32, i32, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, i32, i32, i32, i32, double, double, double, double }

@.str.12 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [12 x i8], align 1
@__PRETTY_FUNCTION__._ZN3ipx13KKTSolverDiag6_SolveERKSt8valarrayIdES4_dRS2_S5_PNS_4InfoE = external hidden unnamed_addr constant [108 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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx5Model4rowsEv(ptr noundef nonnull align 8 dereferenceable(704)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx5Model4colsEv(ptr noundef nonnull align 8 dereferenceable(704)) #1 align 2

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3ipx13KKTSolverDiag6_SolveERKSt8valarrayIdES4_dRS2_S5_PNS_4InfoE(ptr noundef nonnull align 8 dereferenceable(172) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(16) %2, double noundef %3, ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef %6) unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca double, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca %"class.std::valarray", align 8
  %19 = alloca %"class.std::_Expr", align 8
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca double, align 8
  %24 = alloca %"class.ipx::ConjugateResiduals", align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca double, align 8
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store double %3, ptr %11, align 8, !tbaa !9
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  store ptr %6, ptr %14, align 8, !tbaa !5
  %31 = load ptr, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  %32 = getelementptr inbounds %"class.ipx::KKTSolverDiag", ptr %31, i32 0, i32 2
  %33 = load ptr, ptr %32, align 8, !tbaa !11
  %34 = call noundef i32 @_ZNK3ipx5Model4rowsEv(ptr noundef nonnull align 8 dereferenceable(704) %33)
  store i32 %34, ptr %15, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  %35 = getelementptr inbounds %"class.ipx::KKTSolverDiag", ptr %31, i32 0, i32 2
  %36 = load ptr, ptr %35, align 8, !tbaa !11
  %37 = call noundef i32 @_ZNK3ipx5Model4colsEv(ptr noundef nonnull align 8 dereferenceable(704) %36)
  store i32 %37, ptr %16, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %38 = getelementptr inbounds %"class.ipx::KKTSolverDiag", ptr %31, i32 0, i32 2
  %39 = load ptr, ptr %38, align 8, !tbaa !11
  %40 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZNK3ipx5Model2AIEv(ptr noundef nonnull align 8 dereferenceable(704) %39)
  store ptr %40, ptr %17, align 8, !tbaa !5
  %41 = getelementptr inbounds %"class.ipx::KKTSolverDiag", ptr %31, i32 0, i32 7
  %42 = load i8, ptr %41, align 8, !tbaa !22, !range !23, !noundef !24
  %43 = trunc i8 %42 to i1
  br i1 %43, label %44, label %45

44:                                               ; preds = %7
  br label %47

45:                                               ; preds = %7
  call void @__assert_fail(ptr noundef @.str.17, ptr noundef @.str.12, i32 noundef 87, ptr noundef @__PRETTY_FUNCTION__._ZN3ipx13KKTSolverDiag6_SolveERKSt8valarrayIdES4_dRS2_S5_PNS_4InfoE) #9
  unreachable

46:                                               ; No predecessors!
  br label %47

47:                                               ; preds = %46, %44
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %48 = load ptr, ptr %10, align 8, !tbaa !5
  %49 = call ptr @_ZNKSt8valarrayIdEngEv(ptr noundef nonnull align 8 dereferenceable(16) %48)
  %50 = getelementptr inbounds %"class.std::_Expr", ptr %19, i32 0, i32 0
  %51 = getelementptr inbounds %"struct.std::__detail::_UnClos", ptr %50, i32 0, i32 0
  %52 = getelementptr inbounds %"class.std::__detail::_UnBase", ptr %51, i32 0, i32 0
  store ptr %49, ptr %52, align 8
  call void @_ZNSt8valarrayIdEC2INSt8__detail7_UnClosISt8__negateSt9_ValArraydEEEERKSt5_ExprIT_dE(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(8) %19)
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  store i32 0, ptr %20, align 4, !tbaa !21
  br label %53

53:                                               ; preds = %75, %47
  %54 = load i32, ptr %20, align 4, !tbaa !21
  %55 = load i32, ptr %16, align 4, !tbaa !21
  %56 = load i32, ptr %15, align 4, !tbaa !21
  %57 = add nsw i32 %55, %56
  %58 = icmp slt i32 %54, %57
  br i1 %58, label %60, label %59

59:                                               ; preds = %53
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %82

60:                                               ; preds = %53
  %61 = load ptr, ptr %17, align 8, !tbaa !5
  %62 = load i32, ptr %20, align 4, !tbaa !21
  %63 = getelementptr inbounds %"class.ipx::KKTSolverDiag", ptr %31, i32 0, i32 5
  %64 = load i32, ptr %20, align 4, !tbaa !21
  %65 = sext i32 %64 to i64
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %63, i64 noundef %65) #8
  %67 = load double, ptr %66, align 8, !tbaa !9
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  %69 = load i32, ptr %20, align 4, !tbaa !21
  %70 = sext i32 %69 to i64
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %68, i64 noundef %70) #8
  %72 = load double, ptr %71, align 8, !tbaa !9
  %73 = fmul double %67, %72
  invoke void @_ZN3ipx13ScatterColumnERKNS_12SparseMatrixEidRSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(128) %61, i32 noundef %62, double noundef %73, ptr noundef nonnull align 8 dereferenceable(16) %18)
          to label %74 unwind label %78

74:                                               ; preds = %60
  br label %75

75:                                               ; preds = %74
  %76 = load i32, ptr %20, align 4, !tbaa !21
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %20, align 4, !tbaa !21
  br label %53, !llvm.loop !25

78:                                               ; preds = %60
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %21, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %256

82:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  store double 0.000000e+00, ptr %23, align 8, !tbaa !9
  %83 = load ptr, ptr %13, align 8, !tbaa !5
  %84 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEaSERKd(ptr noundef nonnull align 8 dereferenceable(16) %83, ptr noundef nonnull align 8 dereferenceable(8) %23)
          to label %85 unwind label %142

85:                                               ; preds = %82
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  %86 = getelementptr inbounds %"class.ipx::KKTSolverDiag", ptr %31, i32 0, i32 3
  invoke void @_ZN3ipx12NormalMatrix10reset_timeEv(ptr noundef nonnull align 8 dereferenceable(56) %86)
          to label %87 unwind label %146

87:                                               ; preds = %85
  %88 = getelementptr inbounds %"class.ipx::KKTSolverDiag", ptr %31, i32 0, i32 4
  invoke void @_ZN3ipx15DiagonalPrecond10reset_timeEv(ptr noundef nonnull align 8 dereferenceable(48) %88)
          to label %89 unwind label %146

89:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 24, ptr %24) #8
  %90 = getelementptr inbounds %"class.ipx::KKTSolverDiag", ptr %31, i32 0, i32 1
  %91 = load ptr, ptr %90, align 8, !tbaa !27
  invoke void @_ZN3ipx18ConjugateResidualsC1ERKNS_7ControlE(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(1496) %91)
          to label %92 unwind label %150

92:                                               ; preds = %89
  %93 = getelementptr inbounds %"class.ipx::KKTSolverDiag", ptr %31, i32 0, i32 3
  %94 = getelementptr inbounds %"class.ipx::KKTSolverDiag", ptr %31, i32 0, i32 4
  %95 = load double, ptr %11, align 8, !tbaa !9
  %96 = getelementptr inbounds %"class.ipx::KKTSolverDiag", ptr %31, i32 0, i32 6
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %96, i64 noundef 0) #8
  %98 = getelementptr inbounds %"class.ipx::KKTSolverDiag", ptr %31, i32 0, i32 9
  %99 = load i32, ptr %98, align 4, !tbaa !28
  %100 = load ptr, ptr %13, align 8, !tbaa !5
  invoke void @_ZN3ipx18ConjugateResiduals5SolveERNS_14LinearOperatorES2_RKSt8valarrayIdEdPKdiRS4_(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(8) %93, ptr noundef nonnull align 8 dereferenceable(8) %94, ptr noundef nonnull align 8 dereferenceable(16) %18, double noundef %95, ptr noundef %97, i32 noundef %99, ptr noundef nonnull align 8 dereferenceable(16) %100)
          to label %101 unwind label %150

101:                                              ; preds = %92
  %102 = invoke noundef i32 @_ZNK3ipx18ConjugateResiduals7errflagEv(ptr noundef nonnull align 8 dereferenceable(24) %24)
          to label %103 unwind label %150

103:                                              ; preds = %101
  %104 = load ptr, ptr %14, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.ipx_info, ptr %104, i32 0, i32 3
  store i32 %102, ptr %105, align 4, !tbaa !29
  %106 = invoke noundef i32 @_ZNK3ipx18ConjugateResiduals4iterEv(ptr noundef nonnull align 8 dereferenceable(24) %24)
          to label %107 unwind label %150

107:                                              ; preds = %103
  %108 = load ptr, ptr %14, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.ipx_info, ptr %108, i32 0, i32 35
  %110 = load i32, ptr %109, align 4, !tbaa !31
  %111 = add nsw i32 %110, %106
  store i32 %111, ptr %109, align 4, !tbaa !31
  %112 = invoke noundef double @_ZNK3ipx18ConjugateResiduals4timeEv(ptr noundef nonnull align 8 dereferenceable(24) %24)
          to label %113 unwind label %150

113:                                              ; preds = %107
  %114 = load ptr, ptr %14, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.ipx_info, ptr %114, i32 0, i32 49
  %116 = load double, ptr %115, align 8, !tbaa !32
  %117 = fadd double %116, %112
  store double %117, ptr %115, align 8, !tbaa !32
  %118 = getelementptr inbounds %"class.ipx::KKTSolverDiag", ptr %31, i32 0, i32 3
  %119 = invoke noundef double @_ZNK3ipx12NormalMatrix4timeEv(ptr noundef nonnull align 8 dereferenceable(56) %118)
          to label %120 unwind label %150

120:                                              ; preds = %113
  %121 = load ptr, ptr %14, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.ipx_info, ptr %121, i32 0, i32 50
  %123 = load double, ptr %122, align 8, !tbaa !33
  %124 = fadd double %123, %119
  store double %124, ptr %122, align 8, !tbaa !33
  %125 = getelementptr inbounds %"class.ipx::KKTSolverDiag", ptr %31, i32 0, i32 4
  %126 = invoke noundef double @_ZNK3ipx15DiagonalPrecond4timeEv(ptr noundef nonnull align 8 dereferenceable(48) %125)
          to label %127 unwind label %150

127:                                              ; preds = %120
  %128 = load ptr, ptr %14, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.ipx_info, ptr %128, i32 0, i32 51
  %130 = load double, ptr %129, align 8, !tbaa !34
  %131 = fadd double %130, %126
  store double %131, ptr %129, align 8, !tbaa !34
  %132 = invoke noundef i32 @_ZNK3ipx18ConjugateResiduals4iterEv(ptr noundef nonnull align 8 dereferenceable(24) %24)
          to label %133 unwind label %150

133:                                              ; preds = %127
  %134 = getelementptr inbounds %"class.ipx::KKTSolverDiag", ptr %31, i32 0, i32 10
  %135 = load i32, ptr %134, align 8, !tbaa !35
  %136 = add nsw i32 %135, %132
  store i32 %136, ptr %134, align 8, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  store i32 0, ptr %25, align 4, !tbaa !21
  br label %137

137:                                              ; preds = %166, %133
  %138 = load i32, ptr %25, align 4, !tbaa !21
  %139 = load i32, ptr %15, align 4, !tbaa !21
  %140 = icmp slt i32 %138, %139
  br i1 %140, label %154, label %141

141:                                              ; preds = %137
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  br label %169

142:                                              ; preds = %82
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %21, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  br label %256

146:                                              ; preds = %87, %85
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %21, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %22, align 4
  br label %256

150:                                              ; preds = %127, %120, %113, %107, %103, %101, %92, %89
  %151 = landingpad { ptr, i32 }
          cleanup
  %152 = extractvalue { ptr, i32 } %151, 0
  store ptr %152, ptr %21, align 8
  %153 = extractvalue { ptr, i32 } %151, 1
  store i32 %153, ptr %22, align 4
  br label %255

154:                                              ; preds = %137
  %155 = load ptr, ptr %10, align 8, !tbaa !5
  %156 = load i32, ptr %25, align 4, !tbaa !21
  %157 = sext i32 %156 to i64
  %158 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %155, i64 noundef %157) #8
  %159 = load double, ptr %158, align 8, !tbaa !9
  %160 = load ptr, ptr %12, align 8, !tbaa !5
  %161 = load i32, ptr %16, align 4, !tbaa !21
  %162 = load i32, ptr %25, align 4, !tbaa !21
  %163 = add nsw i32 %161, %162
  %164 = sext i32 %163 to i64
  %165 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %160, i64 noundef %164) #8
  store double %159, ptr %165, align 8, !tbaa !9
  br label %166

166:                                              ; preds = %154
  %167 = load i32, ptr %25, align 4, !tbaa !21
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %25, align 4, !tbaa !21
  br label %137, !llvm.loop !36

169:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  store i32 0, ptr %26, align 4, !tbaa !21
  br label %170

170:                                              ; preds = %250, %169
  %171 = load i32, ptr %26, align 4, !tbaa !21
  %172 = load i32, ptr %16, align 4, !tbaa !21
  %173 = icmp slt i32 %171, %172
  br i1 %173, label %175, label %174

174:                                              ; preds = %170
  store i32 8, ptr %27, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  br label %254

175:                                              ; preds = %170
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  %176 = load ptr, ptr %17, align 8, !tbaa !5
  %177 = load i32, ptr %26, align 4, !tbaa !21
  %178 = load ptr, ptr %13, align 8, !tbaa !5
  %179 = invoke noundef double @_ZN3ipx9DotColumnERKNS_12SparseMatrixEiRKSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(128) %176, i32 noundef %177, ptr noundef nonnull align 8 dereferenceable(16) %178)
          to label %180 unwind label %210

180:                                              ; preds = %175
  store double %179, ptr %28, align 8, !tbaa !9
  %181 = getelementptr inbounds %"class.ipx::KKTSolverDiag", ptr %31, i32 0, i32 5
  %182 = load i32, ptr %26, align 4, !tbaa !21
  %183 = sext i32 %182 to i64
  %184 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %181, i64 noundef %183) #8
  %185 = load double, ptr %184, align 8, !tbaa !9
  %186 = load ptr, ptr %9, align 8, !tbaa !5
  %187 = load i32, ptr %26, align 4, !tbaa !21
  %188 = sext i32 %187 to i64
  %189 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %186, i64 noundef %188) #8
  %190 = load double, ptr %189, align 8, !tbaa !9
  %191 = load double, ptr %28, align 8, !tbaa !9
  %192 = fsub double %190, %191
  %193 = fmul double %185, %192
  %194 = load ptr, ptr %12, align 8, !tbaa !5
  %195 = load i32, ptr %26, align 4, !tbaa !21
  %196 = sext i32 %195 to i64
  %197 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %194, i64 noundef %196) #8
  store double %193, ptr %197, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  %198 = load ptr, ptr %17, align 8, !tbaa !5
  %199 = load i32, ptr %26, align 4, !tbaa !21
  %200 = invoke noundef i32 @_ZNK3ipx12SparseMatrix5beginEi(ptr noundef nonnull align 8 dereferenceable(128) %198, i32 noundef %199)
          to label %201 unwind label %214

201:                                              ; preds = %180
  store i32 %200, ptr %29, align 4, !tbaa !21
  br label %202

202:                                              ; preds = %241, %201
  %203 = load i32, ptr %29, align 4, !tbaa !21
  %204 = load ptr, ptr %17, align 8, !tbaa !5
  %205 = load i32, ptr %26, align 4, !tbaa !21
  %206 = invoke noundef i32 @_ZNK3ipx12SparseMatrix3endEi(ptr noundef nonnull align 8 dereferenceable(128) %204, i32 noundef %205)
          to label %207 unwind label %214

207:                                              ; preds = %202
  %208 = icmp slt i32 %203, %206
  br i1 %208, label %218, label %209

209:                                              ; preds = %207
  store i32 11, ptr %27, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  br label %249

210:                                              ; preds = %175
  %211 = landingpad { ptr, i32 }
          cleanup
  %212 = extractvalue { ptr, i32 } %211, 0
  store ptr %212, ptr %21, align 8
  %213 = extractvalue { ptr, i32 } %211, 1
  store i32 %213, ptr %22, align 4
  br label %253

214:                                              ; preds = %202, %180
  %215 = landingpad { ptr, i32 }
          cleanup
  %216 = extractvalue { ptr, i32 } %215, 0
  store ptr %216, ptr %21, align 8
  %217 = extractvalue { ptr, i32 } %215, 1
  store i32 %217, ptr %22, align 4
  br label %248

218:                                              ; preds = %207
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #8
  %219 = load ptr, ptr %17, align 8, !tbaa !5
  %220 = load i32, ptr %29, align 4, !tbaa !21
  %221 = invoke noundef i32 @_ZNK3ipx12SparseMatrix5indexEi(ptr noundef nonnull align 8 dereferenceable(128) %219, i32 noundef %220)
          to label %222 unwind label %244

222:                                              ; preds = %218
  store i32 %221, ptr %30, align 4, !tbaa !21
  %223 = load ptr, ptr %12, align 8, !tbaa !5
  %224 = load i32, ptr %26, align 4, !tbaa !21
  %225 = sext i32 %224 to i64
  %226 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %223, i64 noundef %225) #8
  %227 = load double, ptr %226, align 8, !tbaa !9
  %228 = load ptr, ptr %17, align 8, !tbaa !5
  %229 = load i32, ptr %29, align 4, !tbaa !21
  %230 = invoke noundef double @_ZNK3ipx12SparseMatrix5valueEi(ptr noundef nonnull align 8 dereferenceable(128) %228, i32 noundef %229)
          to label %231 unwind label %244

231:                                              ; preds = %222
  %232 = load ptr, ptr %12, align 8, !tbaa !5
  %233 = load i32, ptr %16, align 4, !tbaa !21
  %234 = load i32, ptr %30, align 4, !tbaa !21
  %235 = add nsw i32 %233, %234
  %236 = sext i32 %235 to i64
  %237 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %232, i64 noundef %236) #8
  %238 = load double, ptr %237, align 8, !tbaa !9
  %239 = fneg double %227
  %240 = call double @llvm.fmuladd.f64(double %239, double %230, double %238)
  store double %240, ptr %237, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  br label %241

241:                                              ; preds = %231
  %242 = load i32, ptr %29, align 4, !tbaa !21
  %243 = add nsw i32 %242, 1
  store i32 %243, ptr %29, align 4, !tbaa !21
  br label %202, !llvm.loop !37

244:                                              ; preds = %222, %218
  %245 = landingpad { ptr, i32 }
          cleanup
  %246 = extractvalue { ptr, i32 } %245, 0
  store ptr %246, ptr %21, align 8
  %247 = extractvalue { ptr, i32 } %245, 1
  store i32 %247, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  br label %248

248:                                              ; preds = %244, %214
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  br label %253

249:                                              ; preds = %209
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  br label %250

250:                                              ; preds = %249
  %251 = load i32, ptr %26, align 4, !tbaa !21
  %252 = add nsw i32 %251, 1
  store i32 %252, ptr %26, align 4, !tbaa !21
  br label %170, !llvm.loop !38

253:                                              ; preds = %248, %210
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  br label %255

254:                                              ; preds = %174
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #8
  call void @_ZNSt8valarrayIdED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  ret void

255:                                              ; preds = %253, %150
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #8
  br label %256

256:                                              ; preds = %255, %146, %142, %78
  call void @_ZNSt8valarrayIdED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %257

257:                                              ; preds = %256
  %258 = load ptr, ptr %21, align 8
  %259 = load i32, ptr %22, align 4
  %260 = insertvalue { ptr, i32 } poison, ptr %258, 0
  %261 = insertvalue { ptr, i32 } %260, i32 %259, 1
  resume { ptr, i32 } %261
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(128) ptr @_ZNK3ipx5Model2AIEv(ptr noundef nonnull align 8 dereferenceable(704)) #1 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3ipx13ScatterColumnERKNS_12SparseMatrixEidRSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, double noundef, ptr noundef nonnull align 8 dereferenceable(16)) #4

declare void @_ZN3ipx12NormalMatrix10reset_timeEv(ptr noundef nonnull align 8 dereferenceable(56)) #6

declare void @_ZN3ipx15DiagonalPrecond10reset_timeEv(ptr noundef nonnull align 8 dereferenceable(48)) #6

declare void @_ZN3ipx18ConjugateResidualsC1ERKNS_7ControlE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(1496)) unnamed_addr #6

declare void @_ZN3ipx18ConjugateResiduals5SolveERNS_14LinearOperatorES2_RKSt8valarrayIdEdPKdiRS4_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(16), double noundef, ptr noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(16)) #6

declare noundef i32 @_ZNK3ipx18ConjugateResiduals7errflagEv(ptr noundef nonnull align 8 dereferenceable(24)) #6

declare noundef i32 @_ZNK3ipx18ConjugateResiduals4iterEv(ptr noundef nonnull align 8 dereferenceable(24)) #6

declare noundef double @_ZNK3ipx18ConjugateResiduals4timeEv(ptr noundef nonnull align 8 dereferenceable(24)) #6

declare noundef double @_ZNK3ipx12NormalMatrix4timeEv(ptr noundef nonnull align 8 dereferenceable(56)) #6

declare noundef double @_ZNK3ipx15DiagonalPrecond4timeEv(ptr noundef nonnull align 8 dereferenceable(48)) #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZN3ipx9DotColumnERKNS_12SparseMatrixEiRKSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, ptr noundef nonnull align 8 dereferenceable(16)) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx12SparseMatrix5beginEi(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx12SparseMatrix3endEi(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx12SparseMatrix5indexEi(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK3ipx12SparseMatrix5valueEi(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) #1 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint mustprogress 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 = { 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 #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nounwind }
attributes #9 = { noreturn 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 = !{!"double", !7, i64 0}
!11 = !{!12, !6, i64 16}
!12 = !{!"_ZTSN3ipx13KKTSolverDiagE", !13, i64 0, !6, i64 8, !6, i64 16, !14, i64 24, !19, i64 80, !17, i64 128, !17, i64 144, !16, i64 160, !20, i64 164, !20, i64 168}
!13 = !{!"_ZTSN3ipx9KKTSolverE"}
!14 = !{!"_ZTSN3ipx12NormalMatrixE", !15, i64 0, !6, i64 8, !6, i64 16, !16, i64 24, !17, i64 32, !10, i64 48}
!15 = !{!"_ZTSN3ipx14LinearOperatorE"}
!16 = !{!"bool", !7, i64 0}
!17 = !{!"_ZTSSt8valarrayIdE", !18, i64 0, !6, i64 8}
!18 = !{!"long", !7, i64 0}
!19 = !{!"_ZTSN3ipx15DiagonalPrecondE", !15, i64 0, !6, i64 8, !16, i64 16, !17, i64 24, !10, i64 40}
!20 = !{!"int", !7, i64 0}
!21 = !{!20, !20, i64 0}
!22 = !{!12, !16, i64 160}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!12, !6, i64 8}
!28 = !{!12, !20, i64 164}
!29 = !{!30, !20, i64 12}
!30 = !{!"_ZTS8ipx_info", !20, i64 0, !20, i64 4, !20, i64 8, !20, i64 12, !20, i64 16, !20, i64 20, !20, i64 24, !20, i64 28, !20, i64 32, !20, i64 36, !20, i64 40, !20, i64 44, !20, i64 48, !20, i64 52, !20, i64 56, !20, i64 60, !20, i64 64, !20, i64 68, !20, i64 72, !20, i64 76, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !20, i64 192, !20, i64 196, !20, i64 200, !20, i64 204, !20, i64 208, !20, i64 212, !20, i64 216, !10, i64 224, !10, i64 232, !10, i64 240, !10, i64 248, !10, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !10, i64 312, !10, i64 320, !10, i64 328, !10, i64 336, !10, i64 344, !10, i64 352, !10, i64 360, !10, i64 368, !10, i64 376, !10, i64 384, !10, i64 392, !10, i64 400, !10, i64 408, !20, i64 416, !20, i64 420, !20, i64 424, !20, i64 428, !10, i64 432, !10, i64 440, !10, i64 448, !10, i64 456}
!31 = !{!30, !20, i64 196}
!32 = !{!30, !10, i64 288}
!33 = !{!30, !10, i64 296}
!34 = !{!30, !10, i64 304}
!35 = !{!12, !20, i64 168}
!36 = distinct !{!36, !26}
!37 = distinct !{!37, !26}
!38 = distinct !{!38, !26}


; 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::valarray" = type { i64, ptr }
%"class.std::_Expr" = type { %"struct.std::__detail::_UnClos" }
%"struct.std::__detail::_UnClos" = type { %"class.std::__detail::_UnBase" }
%"class.std::__detail::_UnBase" = type { ptr }
%"class.ipx::ConjugateResiduals" = type { ptr, i32, i32, double }

@.str.12 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [12 x i8], align 1
@__PRETTY_FUNCTION__._ZN3ipx13KKTSolverDiag6_SolveERKSt8valarrayIdES4_dRS2_S5_PNS_4InfoE = external hidden unnamed_addr constant [108 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx5Model4rowsEv(ptr noundef nonnull align 8 dereferenceable(704)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx5Model4colsEv(ptr noundef nonnull align 8 dereferenceable(704)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3ipx13KKTSolverDiag6_SolveERKSt8valarrayIdES4_dRS2_S5_PNS_4InfoE(ptr noundef nonnull align 8 dereferenceable(172) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(16) %2, double noundef %3, ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %5, ptr nocapture noundef %6) unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %8 = alloca %"class.std::valarray", align 8
  %9 = alloca %"class.std::_Expr", align 8
  %10 = alloca double, align 8
  %11 = alloca %"class.ipx::ConjugateResiduals", align 8
  %12 = getelementptr inbounds i8, ptr %0, i64 16
  %13 = load ptr, ptr %12, align 8, !tbaa !5
  %14 = tail call noundef i32 @_ZNK3ipx5Model4rowsEv(ptr noundef nonnull align 8 dereferenceable(704) %13)
  %15 = load ptr, ptr %12, align 8, !tbaa !5
  %16 = tail call noundef i32 @_ZNK3ipx5Model4colsEv(ptr noundef nonnull align 8 dereferenceable(704) %15)
  %17 = load ptr, ptr %12, align 8, !tbaa !5
  %18 = tail call noundef nonnull align 8 dereferenceable(128) ptr @_ZNK3ipx5Model2AIEv(ptr noundef nonnull align 8 dereferenceable(704) %17)
  %19 = getelementptr inbounds i8, ptr %0, i64 160
  %20 = load i8, ptr %19, align 8, !tbaa !19, !range !20, !noundef !21
  %21 = trunc nuw i8 %20 to i1
  br i1 %21, label %23, label %22

22:                                               ; preds = %7
  tail call void @__assert_fail(ptr noundef nonnull @.str.17, ptr noundef nonnull @.str.12, i32 noundef 87, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3ipx13KKTSolverDiag6_SolveERKSt8valarrayIdES4_dRS2_S5_PNS_4InfoE) #8
  unreachable

23:                                               ; preds = %7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #9
  %24 = tail call ptr @_ZNKSt8valarrayIdEngEv(ptr noundef nonnull align 8 dereferenceable(16) %2)
  store ptr %24, ptr %9, align 8
  call void @_ZNSt8valarrayIdEC2INSt8__detail7_UnClosISt8__negateSt9_ValArraydEEEERKSt5_ExprIT_dE(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(8) %9)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #9
  %25 = add nsw i32 %16, %14
  %26 = icmp sgt i32 %25, 0
  br i1 %26, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %23
  %27 = getelementptr inbounds i8, ptr %0, i64 128
  %wide.trip.count = zext nneg i32 %25 to i64
  br label %29

._crit_edge:                                      ; preds = %36, %23
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #9
  store double 0.000000e+00, ptr %10, align 8, !tbaa !22
  %28 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEaSERKd(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %39 unwind label %84

29:                                               ; preds = %.lr.ph, %36
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %36 ]
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %27, i64 noundef %indvars.iv) #9
  %31 = load double, ptr %30, align 8, !tbaa !22
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %1, i64 noundef %indvars.iv) #9
  %33 = load double, ptr %32, align 8, !tbaa !22
  %34 = fmul double %31, %33
  %35 = trunc nuw nsw i64 %indvars.iv to i32
  invoke void @_ZN3ipx13ScatterColumnERKNS_12SparseMatrixEidRSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(128) %18, i32 noundef %35, double noundef %34, ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %36 unwind label %37

36:                                               ; preds = %29
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %29, !llvm.loop !23

37:                                               ; preds = %29
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %124

39:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #9
  %40 = getelementptr inbounds i8, ptr %0, i64 24
  invoke void @_ZN3ipx12NormalMatrix10reset_timeEv(ptr noundef nonnull align 8 dereferenceable(56) %40)
          to label %41 unwind label %86

41:                                               ; preds = %39
  %42 = getelementptr inbounds i8, ptr %0, i64 80
  invoke void @_ZN3ipx15DiagonalPrecond10reset_timeEv(ptr noundef nonnull align 8 dereferenceable(48) %42)
          to label %43 unwind label %86

43:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #9
  %44 = getelementptr inbounds i8, ptr %0, i64 8
  %45 = load ptr, ptr %44, align 8, !tbaa !25
  invoke void @_ZN3ipx18ConjugateResidualsC1ERKNS_7ControlE(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(1496) %45)
          to label %46 unwind label %88

46:                                               ; preds = %43
  %47 = getelementptr inbounds i8, ptr %0, i64 144
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %47, i64 noundef 0) #9
  %49 = getelementptr inbounds i8, ptr %0, i64 164
  %50 = load i32, ptr %49, align 4, !tbaa !26
  invoke void @_ZN3ipx18ConjugateResiduals5SolveERNS_14LinearOperatorES2_RKSt8valarrayIdEdPKdiRS4_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(8) %40, ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef nonnull align 8 dereferenceable(16) %8, double noundef %3, ptr noundef nonnull %48, i32 noundef %50, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %51 unwind label %88

51:                                               ; preds = %46
  %52 = invoke noundef i32 @_ZNK3ipx18ConjugateResiduals7errflagEv(ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %53 unwind label %88

53:                                               ; preds = %51
  %54 = getelementptr inbounds i8, ptr %6, i64 12
  store i32 %52, ptr %54, align 4, !tbaa !27
  %55 = invoke noundef i32 @_ZNK3ipx18ConjugateResiduals4iterEv(ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %56 unwind label %88

56:                                               ; preds = %53
  %57 = getelementptr inbounds i8, ptr %6, i64 196
  %58 = load i32, ptr %57, align 4, !tbaa !29
  %59 = add nsw i32 %58, %55
  store i32 %59, ptr %57, align 4, !tbaa !29
  %60 = invoke noundef double @_ZNK3ipx18ConjugateResiduals4timeEv(ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %61 unwind label %88

61:                                               ; preds = %56
  %62 = getelementptr inbounds i8, ptr %6, i64 288
  %63 = load double, ptr %62, align 8, !tbaa !30
  %64 = fadd double %60, %63
  store double %64, ptr %62, align 8, !tbaa !30
  %65 = invoke noundef double @_ZNK3ipx12NormalMatrix4timeEv(ptr noundef nonnull align 8 dereferenceable(56) %40)
          to label %66 unwind label %88

66:                                               ; preds = %61
  %67 = getelementptr inbounds i8, ptr %6, i64 296
  %68 = load double, ptr %67, align 8, !tbaa !31
  %69 = fadd double %65, %68
  store double %69, ptr %67, align 8, !tbaa !31
  %70 = invoke noundef double @_ZNK3ipx15DiagonalPrecond4timeEv(ptr noundef nonnull align 8 dereferenceable(48) %42)
          to label %71 unwind label %88

71:                                               ; preds = %66
  %72 = getelementptr inbounds i8, ptr %6, i64 304
  %73 = load double, ptr %72, align 8, !tbaa !32
  %74 = fadd double %70, %73
  store double %74, ptr %72, align 8, !tbaa !32
  %75 = invoke noundef i32 @_ZNK3ipx18ConjugateResiduals4iterEv(ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %76 unwind label %88

76:                                               ; preds = %71
  %77 = getelementptr inbounds i8, ptr %0, i64 168
  %78 = load i32, ptr %77, align 8, !tbaa !33
  %79 = add nsw i32 %78, %75
  store i32 %79, ptr %77, align 8, !tbaa !33
  %80 = icmp sgt i32 %14, 0
  br i1 %80, label %.lr.ph68.preheader, label %.preheader

.lr.ph68.preheader:                               ; preds = %76
  %81 = sext i32 %16 to i64
  %wide.trip.count80 = zext nneg i32 %14 to i64
  br label %.lr.ph68

.preheader:                                       ; preds = %.lr.ph68, %76
  %82 = icmp sgt i32 %16, 0
  br i1 %82, label %.lr.ph74, label %._crit_edge75

.lr.ph74:                                         ; preds = %.preheader
  %83 = getelementptr inbounds i8, ptr %0, i64 128
  %wide.trip.count85 = zext nneg i32 %16 to i64
  br label %94

84:                                               ; preds = %._crit_edge
  %85 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #9
  br label %124

86:                                               ; preds = %41, %39
  %87 = landingpad { ptr, i32 }
          cleanup
  br label %124

88:                                               ; preds = %71, %66, %61, %56, %53, %51, %46, %43
  %89 = landingpad { ptr, i32 }
          cleanup
  br label %123

.lr.ph68:                                         ; preds = %.lr.ph68.preheader, %.lr.ph68
  %indvars.iv77 = phi i64 [ 0, %.lr.ph68.preheader ], [ %indvars.iv.next78, %.lr.ph68 ]
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %2, i64 noundef %indvars.iv77) #9
  %91 = load double, ptr %90, align 8, !tbaa !22
  %92 = add nsw i64 %indvars.iv77, %81
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %4, i64 noundef %92) #9
  store double %91, ptr %93, align 8, !tbaa !22
  %indvars.iv.next78 = add nuw nsw i64 %indvars.iv77, 1
  %exitcond81.not = icmp eq i64 %indvars.iv.next78, %wide.trip.count80
  br i1 %exitcond81.not, label %.preheader, label %.lr.ph68, !llvm.loop !34

._crit_edge75:                                    ; preds = %._crit_edge72, %.preheader
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #9
  call void @_ZNSt8valarrayIdED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #9
  ret void

94:                                               ; preds = %.lr.ph74, %._crit_edge72
  %indvars.iv82 = phi i64 [ 0, %.lr.ph74 ], [ %indvars.iv.next83, %._crit_edge72 ]
  %95 = trunc nuw nsw i64 %indvars.iv82 to i32
  %96 = invoke noundef double @_ZN3ipx9DotColumnERKNS_12SparseMatrixEiRKSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(128) %18, i32 noundef %95, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %97 unwind label %108

97:                                               ; preds = %94
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %83, i64 noundef %indvars.iv82) #9
  %99 = load double, ptr %98, align 8, !tbaa !22
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %1, i64 noundef %indvars.iv82) #9
  %101 = load double, ptr %100, align 8, !tbaa !22
  %102 = fsub double %101, %96
  %103 = fmul double %99, %102
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %4, i64 noundef %indvars.iv82) #9
  store double %103, ptr %104, align 8, !tbaa !22
  %105 = call noundef i32 @_ZNK3ipx12SparseMatrix5beginEi(ptr noundef nonnull align 8 dereferenceable(128) %18, i32 noundef %95)
  %106 = call noundef i32 @_ZNK3ipx12SparseMatrix3endEi(ptr noundef nonnull align 8 dereferenceable(128) %18, i32 noundef %95)
  %107 = icmp slt i32 %105, %106
  br i1 %107, label %.lr.ph71, label %._crit_edge72

._crit_edge72:                                    ; preds = %.lr.ph71, %97
  %indvars.iv.next83 = add nuw nsw i64 %indvars.iv82, 1
  %exitcond86.not = icmp eq i64 %indvars.iv.next83, %wide.trip.count85
  br i1 %exitcond86.not, label %._crit_edge75, label %94, !llvm.loop !35

108:                                              ; preds = %94
  %109 = landingpad { ptr, i32 }
          cleanup
  br label %123

.lr.ph71:                                         ; preds = %97, %.lr.ph71
  %.05569 = phi i32 [ %120, %.lr.ph71 ], [ %105, %97 ]
  %110 = call noundef i32 @_ZNK3ipx12SparseMatrix5indexEi(ptr noundef nonnull align 8 dereferenceable(128) %18, i32 noundef %.05569)
  %111 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %4, i64 noundef %indvars.iv82) #9
  %112 = load double, ptr %111, align 8, !tbaa !22
  %113 = call noundef double @_ZNK3ipx12SparseMatrix5valueEi(ptr noundef nonnull align 8 dereferenceable(128) %18, i32 noundef %.05569)
  %114 = add nsw i32 %110, %16
  %115 = sext i32 %114 to i64
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %4, i64 noundef %115) #9
  %117 = load double, ptr %116, align 8, !tbaa !22
  %118 = fneg double %112
  %119 = call double @llvm.fmuladd.f64(double %118, double %113, double %117)
  store double %119, ptr %116, align 8, !tbaa !22
  %120 = add nsw i32 %.05569, 1
  %121 = call noundef i32 @_ZNK3ipx12SparseMatrix3endEi(ptr noundef nonnull align 8 dereferenceable(128) %18, i32 noundef %95)
  %122 = icmp slt i32 %120, %121
  br i1 %122, label %.lr.ph71, label %._crit_edge72, !llvm.loop !36

123:                                              ; preds = %108, %88
  %.pn = phi { ptr, i32 } [ %109, %108 ], [ %89, %88 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #9
  br label %124

124:                                              ; preds = %123, %86, %84, %37
  %.pn63 = phi { ptr, i32 } [ %38, %37 ], [ %.pn, %123 ], [ %87, %86 ], [ %85, %84 ]
  call void @_ZNSt8valarrayIdED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #9
  resume { ptr, i32 } %.pn63
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(128) ptr @_ZNK3ipx5Model2AIEv(ptr noundef nonnull align 8 dereferenceable(704)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3ipx13ScatterColumnERKNS_12SparseMatrixEidRSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, double noundef, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4

declare void @_ZN3ipx12NormalMatrix10reset_timeEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #6

declare void @_ZN3ipx15DiagonalPrecond10reset_timeEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #6

declare void @_ZN3ipx18ConjugateResidualsC1ERKNS_7ControlE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(1496)) unnamed_addr #6

declare void @_ZN3ipx18ConjugateResiduals5SolveERNS_14LinearOperatorES2_RKSt8valarrayIdEdPKdiRS4_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(16), double noundef, ptr noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #6

declare noundef i32 @_ZNK3ipx18ConjugateResiduals7errflagEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #6

declare noundef i32 @_ZNK3ipx18ConjugateResiduals4iterEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #6

declare noundef double @_ZNK3ipx18ConjugateResiduals4timeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #6

declare noundef double @_ZNK3ipx12NormalMatrix4timeEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #6

declare noundef double @_ZNK3ipx15DiagonalPrecond4timeEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZN3ipx9DotColumnERKNS_12SparseMatrixEiRKSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK3ipx12SparseMatrix5valueEi(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) local_unnamed_addr #1 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint mustprogress 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 = { 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 #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { noreturn nounwind }
attributes #9 = { 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, !8, i64 16}
!6 = !{!"_ZTSN3ipx13KKTSolverDiagE", !7, i64 0, !8, i64 8, !8, i64 16, !11, i64 24, !17, i64 80, !14, i64 128, !14, i64 144, !13, i64 160, !18, i64 164, !18, i64 168}
!7 = !{!"_ZTSN3ipx9KKTSolverE"}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTSN3ipx12NormalMatrixE", !12, i64 0, !8, i64 8, !8, i64 16, !13, i64 24, !14, i64 32, !16, i64 48}
!12 = !{!"_ZTSN3ipx14LinearOperatorE"}
!13 = !{!"bool", !9, i64 0}
!14 = !{!"_ZTSSt8valarrayIdE", !15, i64 0, !8, i64 8}
!15 = !{!"long", !9, i64 0}
!16 = !{!"double", !9, i64 0}
!17 = !{!"_ZTSN3ipx15DiagonalPrecondE", !12, i64 0, !8, i64 8, !13, i64 16, !14, i64 24, !16, i64 40}
!18 = !{!"int", !9, i64 0}
!19 = !{!6, !13, i64 160}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = !{!16, !16, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!6, !8, i64 8}
!26 = !{!6, !18, i64 164}
!27 = !{!28, !18, i64 12}
!28 = !{!"_ZTS8ipx_info", !18, i64 0, !18, i64 4, !18, i64 8, !18, i64 12, !18, i64 16, !18, i64 20, !18, i64 24, !18, i64 28, !18, i64 32, !18, i64 36, !18, i64 40, !18, i64 44, !18, i64 48, !18, i64 52, !18, i64 56, !18, i64 60, !18, i64 64, !18, i64 68, !18, i64 72, !18, i64 76, !16, i64 80, !16, i64 88, !16, i64 96, !16, i64 104, !16, i64 112, !16, i64 120, !16, i64 128, !16, i64 136, !16, i64 144, !16, i64 152, !16, i64 160, !16, i64 168, !16, i64 176, !16, i64 184, !18, i64 192, !18, i64 196, !18, i64 200, !18, i64 204, !18, i64 208, !18, i64 212, !18, i64 216, !16, i64 224, !16, i64 232, !16, i64 240, !16, i64 248, !16, i64 256, !16, i64 264, !16, i64 272, !16, i64 280, !16, i64 288, !16, i64 296, !16, i64 304, !16, i64 312, !16, i64 320, !16, i64 328, !16, i64 336, !16, i64 344, !16, i64 352, !16, i64 360, !16, i64 368, !16, i64 376, !16, i64 384, !16, i64 392, !16, i64 400, !16, i64 408, !18, i64 416, !18, i64 420, !18, i64 424, !18, i64 428, !16, i64 432, !16, i64 440, !16, i64 448, !16, i64 456}
!29 = !{!28, !18, i64 196}
!30 = !{!28, !16, i64 288}
!31 = !{!28, !16, i64 296}
!32 = !{!28, !16, i64 304}
!33 = !{!6, !18, i64 168}
!34 = distinct !{!34, !24}
!35 = distinct !{!35, !24}
!36 = distinct !{!36, !24}


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