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

; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.ipx::SparseMatrix" = type { i32, %"class.std::vector", %"class.std::vector", %"class.std::vector.3", %"class.std::vector", %"class.std::vector.3" }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.ipx::SplittedNormalMatrix" = type { %"class.ipx::LinearOperator", ptr, %"class.ipx::SparseMatrix", %"class.ipx::SparseMatrix", %"class.ipx::SparseMatrix", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::valarray", i8, double, double, double }
%"class.ipx::LinearOperator" = type { ptr }
%"class.std::valarray" = type { i64, ptr }

@.str.11 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [87 x i8], align 1
@__PRETTY_FUNCTION__._ZN3ipx20SplittedNormalMatrix7PrepareERKNS_5BasisEPKd = external hidden unnamed_addr constant [71 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [17 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 void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; 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 void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3ipx20SplittedNormalMatrix7PrepareERKNS_5BasisEPKd(ptr noundef nonnull align 8 dereferenceable(520) %0, ptr noundef nonnull align 8 dereferenceable(176) %1, ptr noundef %2) #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca %"class.std::vector", align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca double, align 8
  %15 = alloca %"class.std::vector", align 8
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca %"class.ipx::SparseMatrix", align 8
  %20 = alloca i64, align 8
  %21 = alloca i32, align 4
  %22 = alloca double, align 8
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  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
  %26 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %27 = getelementptr inbounds %"class.ipx::SplittedNormalMatrix", ptr %26, i32 0, i32 1
  %28 = load ptr, ptr %27, align 8, !tbaa !9
  %29 = call noundef i32 @_ZNK3ipx5Model4rowsEv(ptr noundef nonnull align 8 dereferenceable(704) %28)
  store i32 %29, ptr %7, align 4, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %30 = getelementptr inbounds %"class.ipx::SplittedNormalMatrix", ptr %26, i32 0, i32 1
  %31 = load ptr, ptr %30, align 8, !tbaa !9
  %32 = call noundef i32 @_ZNK3ipx5Model4colsEv(ptr noundef nonnull align 8 dereferenceable(704) %31)
  store i32 %32, ptr %8, align 4, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %33 = getelementptr inbounds %"class.ipx::SplittedNormalMatrix", ptr %26, i32 0, i32 1
  %34 = load ptr, ptr %33, align 8, !tbaa !9
  %35 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZNK3ipx5Model2AIEv(ptr noundef nonnull align 8 dereferenceable(704) %34)
  store ptr %35, ptr %9, align 8, !tbaa !5
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = icmp ne ptr %36, null
  br i1 %37, label %38, label %39

38:                                               ; preds = %3
  br label %41

39:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str.11, ptr noundef @.str.12, i32 noundef 20, ptr noundef @__PRETTY_FUNCTION__._ZN3ipx20SplittedNormalMatrix7PrepareERKNS_5BasisEPKd) #8
  unreachable

40:                                               ; No predecessors!
  br label %41

41:                                               ; preds = %40, %38
  %42 = getelementptr inbounds %"class.ipx::SplittedNormalMatrix", ptr %26, i32 0, i32 9
  store i8 0, ptr %42, align 8, !tbaa !27
  %43 = getelementptr inbounds %"class.ipx::SplittedNormalMatrix", ptr %26, i32 0, i32 4
  call void @_ZN3ipx12SparseMatrix5clearEv(ptr noundef nonnull align 8 dereferenceable(128) %43)
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds %"class.ipx::SplittedNormalMatrix", ptr %26, i32 0, i32 2
  %46 = getelementptr inbounds %"class.ipx::SplittedNormalMatrix", ptr %26, i32 0, i32 3
  %47 = getelementptr inbounds %"class.ipx::SplittedNormalMatrix", ptr %26, i32 0, i32 7
  %48 = call noundef ptr @_ZNSt6vectorIiSaIiEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %47) #7
  %49 = getelementptr inbounds %"class.ipx::SplittedNormalMatrix", ptr %26, i32 0, i32 6
  %50 = call noundef ptr @_ZNSt6vectorIiSaIiEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %49) #7
  call void @_ZNK3ipx5Basis12GetLuFactorsEPNS_12SparseMatrixES2_PiS3_(ptr noundef nonnull align 8 dereferenceable(176) %44, ptr noundef %45, ptr noundef %46, ptr noundef %48, ptr noundef %50)
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #7
  %51 = getelementptr inbounds %"class.ipx::SplittedNormalMatrix", ptr %26, i32 0, i32 7
  call void @_ZN3ipx11InversePermERKSt6vectorIiSaIiEE(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %10, ptr noundef nonnull align 8 dereferenceable(24) %51)
  %52 = getelementptr inbounds %"class.ipx::SplittedNormalMatrix", ptr %26, i32 0, i32 7
  %53 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %52, ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !26
  br label %54

54:                                               ; preds = %93, %41
  %55 = load i32, ptr %11, align 4, !tbaa !26
  %56 = load i32, ptr %7, align 4, !tbaa !26
  %57 = icmp slt i32 %55, %56
  br i1 %57, label %59, label %58

58:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %96

59:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %60 = getelementptr inbounds %"class.ipx::SplittedNormalMatrix", ptr %26, i32 0, i32 6
  %61 = load i32, ptr %11, align 4, !tbaa !26
  %62 = sext i32 %61 to i64
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %60, i64 noundef %62) #7
  %64 = load i32, ptr %63, align 4, !tbaa !26
  store i32 %64, ptr %12, align 4, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = load i32, ptr %12, align 4, !tbaa !26
  %67 = call noundef i32 @_ZNK3ipx5BasisixEi(ptr noundef nonnull align 8 dereferenceable(176) %65, i32 noundef %66)
  store i32 %67, ptr %13, align 4, !tbaa !26
  %68 = load ptr, ptr %5, align 8, !tbaa !5
  %69 = load i32, ptr %13, align 4, !tbaa !26
  %70 = call noundef i32 @_ZNK3ipx5Basis8StatusOfEi(ptr noundef nonnull align 8 dereferenceable(176) %68, i32 noundef %69)
  %71 = icmp eq i32 %70, 0
  br i1 %71, label %72, label %92

72:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = load i32, ptr %13, align 4, !tbaa !26
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds double, ptr %73, i64 %75
  %77 = load double, ptr %76, align 8, !tbaa !28
  store double %77, ptr %14, align 8, !tbaa !28
  %78 = load double, ptr %14, align 8, !tbaa !28
  %79 = call noundef zeroext i1 @_ZSt8isfinited(double noundef %78)
  br i1 %79, label %80, label %83

80:                                               ; preds = %72
  %81 = load double, ptr %14, align 8, !tbaa !28
  %82 = fcmp ogt double %81, 0.000000e+00
  br label %83

83:                                               ; preds = %80, %72
  %84 = phi i1 [ false, %72 ], [ %82, %80 ]
  br i1 %84, label %85, label %86

85:                                               ; preds = %83
  br label %88

86:                                               ; preds = %83
  call void @__assert_fail(ptr noundef @.str.13, ptr noundef @.str.12, i32 noundef 34, ptr noundef @__PRETTY_FUNCTION__._ZN3ipx20SplittedNormalMatrix7PrepareERKNS_5BasisEPKd) #8
  unreachable

87:                                               ; No predecessors!
  br label %88

88:                                               ; preds = %87, %85
  %89 = getelementptr inbounds %"class.ipx::SplittedNormalMatrix", ptr %26, i32 0, i32 3
  %90 = load i32, ptr %11, align 4, !tbaa !26
  %91 = load double, ptr %14, align 8, !tbaa !28
  call void @_ZN3ipx11ScaleColumnERNS_12SparseMatrixEid(ptr noundef nonnull align 8 dereferenceable(128) %89, i32 noundef %90, double noundef %91)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %92

92:                                               ; preds = %88, %59
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %93

93:                                               ; preds = %92
  %94 = load i32, ptr %11, align 4, !tbaa !26
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %11, align 4, !tbaa !26
  br label %54, !llvm.loop !29

96:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #7
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !26
  br label %97

97:                                               ; preds = %117, %96
  %98 = load i32, ptr %16, align 4, !tbaa !26
  %99 = load i32, ptr %8, align 4, !tbaa !26
  %100 = load i32, ptr %7, align 4, !tbaa !26
  %101 = add nsw i32 %99, %100
  %102 = icmp slt i32 %98, %101
  br i1 %102, label %104, label %103

103:                                              ; preds = %97
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %120

104:                                              ; preds = %97
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = load i32, ptr %16, align 4, !tbaa !26
  %107 = invoke noundef i32 @_ZNK3ipx5Basis8StatusOfEi(ptr noundef nonnull align 8 dereferenceable(176) %105, i32 noundef %106)
          to label %108 unwind label %112

108:                                              ; preds = %104
  %109 = icmp eq i32 %107, -1
  br i1 %109, label %110, label %116

110:                                              ; preds = %108
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %111 unwind label %112

111:                                              ; preds = %110
  br label %116

112:                                              ; preds = %110, %104
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %17, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %204

116:                                              ; preds = %111, %108
  br label %117

117:                                              ; preds = %116
  %118 = load i32, ptr %16, align 4, !tbaa !26
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %16, align 4, !tbaa !26
  br label %97, !llvm.loop !31

120:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 128, ptr %19) #7
  %121 = load ptr, ptr %9, align 8, !tbaa !5
  invoke void @_ZN3ipx11CopyColumnsERKNS_12SparseMatrixERKSt6vectorIiSaIiEE(ptr dead_on_unwind writable sret(%"class.ipx::SparseMatrix") align 8 %19, ptr noundef nonnull align 8 dereferenceable(128) %121, ptr noundef nonnull align 8 dereferenceable(24) %15)
          to label %122 unwind label %133

122:                                              ; preds = %120
  %123 = getelementptr inbounds %"class.ipx::SplittedNormalMatrix", ptr %26, i32 0, i32 4
  %124 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3ipx12SparseMatrixaSEOS0_(ptr noundef nonnull align 8 dereferenceable(128) %123, ptr noundef nonnull align 8 dereferenceable(128) %19) #7
  call void @_ZN3ipx12SparseMatrixD2Ev(ptr noundef nonnull align 8 dereferenceable(128) %19) #7
  call void @llvm.lifetime.end.p0(i64 128, ptr %19) #7
  %125 = getelementptr inbounds %"class.ipx::SplittedNormalMatrix", ptr %26, i32 0, i32 4
  %126 = getelementptr inbounds %"class.ipx::SplittedNormalMatrix", ptr %26, i32 0, i32 7
  invoke void @_ZN3ipx11PermuteRowsERNS_12SparseMatrixERKSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(128) %125, ptr noundef nonnull align 8 dereferenceable(24) %126)
          to label %127 unwind label %137

127:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  store i64 0, ptr %20, align 8, !tbaa !32
  br label %128

128:                                              ; preds = %166, %127
  %129 = load i64, ptr %20, align 8, !tbaa !32
  %130 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #7
  %131 = icmp ult i64 %129, %130
  br i1 %131, label %141, label %132

132:                                              ; preds = %128
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %169

133:                                              ; preds = %120
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %17, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 128, ptr %19) #7
  br label %204

137:                                              ; preds = %122
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %17, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %18, align 4
  br label %204

141:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %142 = load i64, ptr %20, align 8, !tbaa !32
  %143 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %142) #7
  %144 = load i32, ptr %143, align 4, !tbaa !26
  store i32 %144, ptr %21, align 4, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %145 = load ptr, ptr %6, align 8, !tbaa !5
  %146 = load i32, ptr %21, align 4, !tbaa !26
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds double, ptr %145, i64 %147
  %149 = load double, ptr %148, align 8, !tbaa !28
  store double %149, ptr %22, align 8, !tbaa !28
  %150 = load double, ptr %22, align 8, !tbaa !28
  %151 = invoke noundef zeroext i1 @_ZSt8isfinited(double noundef %150)
          to label %152 unwind label %155

152:                                              ; preds = %141
  br i1 %151, label %153, label %154

153:                                              ; preds = %152
  br label %160

154:                                              ; preds = %152
  call void @__assert_fail(ptr noundef @.str.14, ptr noundef @.str.12, i32 noundef 51, ptr noundef @__PRETTY_FUNCTION__._ZN3ipx20SplittedNormalMatrix7PrepareERKNS_5BasisEPKd) #8
  unreachable

155:                                              ; preds = %160, %141
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %17, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %204

159:                                              ; No predecessors!
  br label %160

160:                                              ; preds = %159, %153
  %161 = getelementptr inbounds %"class.ipx::SplittedNormalMatrix", ptr %26, i32 0, i32 4
  %162 = load i64, ptr %20, align 8, !tbaa !32
  %163 = trunc i64 %162 to i32
  %164 = load double, ptr %22, align 8, !tbaa !28
  invoke void @_ZN3ipx11ScaleColumnERNS_12SparseMatrixEid(ptr noundef nonnull align 8 dereferenceable(128) %161, i32 noundef %163, double noundef %164)
          to label %165 unwind label %155

165:                                              ; preds = %160
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %166

166:                                              ; preds = %165
  %167 = load i64, ptr %20, align 8, !tbaa !32
  %168 = add i64 %167, 1
  store i64 %168, ptr %20, align 8, !tbaa !32
  br label %128, !llvm.loop !33

169:                                              ; preds = %132
  %170 = getelementptr inbounds %"class.ipx::SplittedNormalMatrix", ptr %26, i32 0, i32 5
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %170) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  store i32 0, ptr %23, align 4, !tbaa !26
  br label %171

171:                                              ; preds = %199, %169
  %172 = load i32, ptr %23, align 4, !tbaa !26
  %173 = load i32, ptr %7, align 4, !tbaa !26
  %174 = icmp slt i32 %172, %173
  br i1 %174, label %176, label %175

175:                                              ; preds = %171
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %202

176:                                              ; preds = %171
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  %177 = getelementptr inbounds %"class.ipx::SplittedNormalMatrix", ptr %26, i32 0, i32 6
  %178 = load i32, ptr %23, align 4, !tbaa !26
  %179 = sext i32 %178 to i64
  %180 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %177, i64 noundef %179) #7
  %181 = load i32, ptr %180, align 4, !tbaa !26
  store i32 %181, ptr %24, align 4, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  %182 = load ptr, ptr %5, align 8, !tbaa !5
  %183 = load i32, ptr %24, align 4, !tbaa !26
  %184 = invoke noundef i32 @_ZNK3ipx5BasisixEi(ptr noundef nonnull align 8 dereferenceable(176) %182, i32 noundef %183)
          to label %185 unwind label %194

185:                                              ; preds = %176
  store i32 %184, ptr %25, align 4, !tbaa !26
  %186 = load ptr, ptr %5, align 8, !tbaa !5
  %187 = load i32, ptr %25, align 4, !tbaa !26
  %188 = invoke noundef i32 @_ZNK3ipx5Basis8StatusOfEi(ptr noundef nonnull align 8 dereferenceable(176) %186, i32 noundef %187)
          to label %189 unwind label %194

189:                                              ; preds = %185
  %190 = icmp eq i32 %188, 1
  br i1 %190, label %191, label %198

191:                                              ; preds = %189
  %192 = getelementptr inbounds %"class.ipx::SplittedNormalMatrix", ptr %26, i32 0, i32 5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %192, ptr noundef nonnull align 4 dereferenceable(4) %23)
          to label %193 unwind label %194

193:                                              ; preds = %191
  br label %198

194:                                              ; preds = %191, %185, %176
  %195 = landingpad { ptr, i32 }
          cleanup
  %196 = extractvalue { ptr, i32 } %195, 0
  store ptr %196, ptr %17, align 8
  %197 = extractvalue { ptr, i32 } %195, 1
  store i32 %197, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %204

198:                                              ; preds = %193, %189
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %199

199:                                              ; preds = %198
  %200 = load i32, ptr %23, align 4, !tbaa !26
  %201 = add nsw i32 %200, 1
  store i32 %201, ptr %23, align 4, !tbaa !26
  br label %171, !llvm.loop !34

202:                                              ; preds = %175
  %203 = getelementptr inbounds %"class.ipx::SplittedNormalMatrix", ptr %26, i32 0, i32 9
  store i8 1, ptr %203, align 8, !tbaa !27
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  ret void

204:                                              ; preds = %194, %155, %137, %133, %112
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %205

205:                                              ; preds = %204
  %206 = load ptr, ptr %17, align 8
  %207 = load i32, ptr %18, align 4
  %208 = insertvalue { ptr, i32 } poison, ptr %206, 0
  %209 = insertvalue { ptr, i32 } %208, i32 %207, 1
  resume { ptr, i32 } %209
}

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

; 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

declare void @_ZN3ipx12SparseMatrix5clearEv(ptr noundef nonnull align 8 dereferenceable(128)) #5

declare void @_ZNK3ipx5Basis12GetLuFactorsEPNS_12SparseMatrixES2_PiS3_(ptr noundef nonnull align 8 dereferenceable(176), ptr noundef, ptr noundef, ptr noundef, ptr noundef) #5

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

declare void @_ZN3ipx11InversePermERKSt6vectorIiSaIiEE(ptr dead_on_unwind writable sret(%"class.std::vector") align 8, ptr noundef nonnull align 8 dereferenceable(24)) #5

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx5BasisixEi(ptr noundef nonnull align 8 dereferenceable(176), i32 noundef) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx5Basis8StatusOfEi(ptr noundef nonnull align 8 dereferenceable(176), i32 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSt8isfinited(double noundef) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

declare void @_ZN3ipx11CopyColumnsERKNS_12SparseMatrixERKSt6vectorIiSaIiEE(ptr dead_on_unwind writable sret(%"class.ipx::SparseMatrix") align 8, ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(24)) #5

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

declare void @_ZN3ipx11PermuteRowsERNS_12SparseMatrixERKSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(24)) #5

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

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

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 = { 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 = { 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 = { "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 = { 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 #7 = { nounwind }
attributes #8 = { 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, !6, i64 8}
!10 = !{!"_ZTSN3ipx20SplittedNormalMatrixE", !11, i64 0, !6, i64 8, !12, i64 16, !12, i64 144, !12, i64 272, !14, i64 400, !14, i64 424, !14, i64 448, !22, i64 472, !24, i64 488, !25, i64 496, !25, i64 504, !25, i64 512}
!11 = !{!"_ZTSN3ipx14LinearOperatorE"}
!12 = !{!"_ZTSN3ipx12SparseMatrixE", !13, i64 0, !14, i64 8, !14, i64 32, !18, i64 56, !14, i64 80, !18, i64 104}
!13 = !{!"int", !7, i64 0}
!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 = !{!"_ZTSSt6vectorIdSaIdEE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!"_ZTSSt8valarrayIdE", !23, i64 0, !6, i64 8}
!23 = !{!"long", !7, i64 0}
!24 = !{!"bool", !7, i64 0}
!25 = !{!"double", !7, i64 0}
!26 = !{!13, !13, i64 0}
!27 = !{!10, !24, i64 488}
!28 = !{!25, !25, i64 0}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = distinct !{!31, !30}
!32 = !{!23, !23, i64 0}
!33 = distinct !{!33, !30}
!34 = distinct !{!34, !30}


; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.ipx::SparseMatrix" = type { i32, %"class.std::vector", %"class.std::vector", %"class.std::vector.3", %"class.std::vector", %"class.std::vector.3" }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.11 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [87 x i8], align 1
@__PRETTY_FUNCTION__._ZN3ipx20SplittedNormalMatrix7PrepareERKNS_5BasisEPKd = external hidden unnamed_addr constant [71 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [17 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 void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; 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 void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3ipx20SplittedNormalMatrix7PrepareERKNS_5BasisEPKd(ptr noundef nonnull align 8 dereferenceable(520) %0, ptr noundef nonnull align 8 dereferenceable(176) %1, ptr noundef readonly %2) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.ipx::SparseMatrix", align 8
  %8 = alloca i32, align 4
  %9 = getelementptr inbounds i8, ptr %0, i64 8
  %10 = load ptr, ptr %9, align 8, !tbaa !5
  %11 = tail call noundef i32 @_ZNK3ipx5Model4rowsEv(ptr noundef nonnull align 8 dereferenceable(704) %10)
  %12 = load ptr, ptr %9, align 8, !tbaa !5
  %13 = tail call noundef i32 @_ZNK3ipx5Model4colsEv(ptr noundef nonnull align 8 dereferenceable(704) %12)
  %14 = load ptr, ptr %9, align 8, !tbaa !5
  %15 = tail call noundef nonnull align 8 dereferenceable(128) ptr @_ZNK3ipx5Model2AIEv(ptr noundef nonnull align 8 dereferenceable(704) %14)
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %16, label %17

16:                                               ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.12, i32 noundef 20, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3ipx20SplittedNormalMatrix7PrepareERKNS_5BasisEPKd) #7
  unreachable

17:                                               ; preds = %3
  %18 = getelementptr inbounds i8, ptr %0, i64 488
  store i8 0, ptr %18, align 8, !tbaa !25
  %19 = getelementptr inbounds i8, ptr %0, i64 272
  tail call void @_ZN3ipx12SparseMatrix5clearEv(ptr noundef nonnull align 8 dereferenceable(128) %19)
  %20 = getelementptr inbounds i8, ptr %0, i64 16
  %21 = getelementptr inbounds i8, ptr %0, i64 144
  %22 = getelementptr inbounds i8, ptr %0, i64 448
  %23 = tail call noundef ptr @_ZNSt6vectorIiSaIiEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %22) #8
  %24 = getelementptr inbounds i8, ptr %0, i64 424
  %25 = tail call noundef ptr @_ZNSt6vectorIiSaIiEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #8
  tail call void @_ZNK3ipx5Basis12GetLuFactorsEPNS_12SparseMatrixES2_PiS3_(ptr noundef nonnull align 8 dereferenceable(176) %1, ptr noundef nonnull %20, ptr noundef nonnull %21, ptr noundef %23, ptr noundef %25)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #8
  call void @_ZN3ipx11InversePermERKSt6vectorIiSaIiEE(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %4, ptr noundef nonnull align 8 dereferenceable(24) %22)
  %26 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #8
  %27 = icmp sgt i32 %11, 0
  br i1 %27, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %17
  %wide.trip.count = zext nneg i32 %11 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %45, %17
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #8
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #8
  %28 = add nsw i32 %13, %11
  store i32 0, ptr %6, align 4, !tbaa !26
  %29 = icmp sgt i32 %28, 0
  br i1 %29, label %.lr.ph48, label %._crit_edge49

.lr.ph:                                           ; preds = %.lr.ph.preheader, %45
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %45 ]
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %indvars.iv) #8
  %31 = load i32, ptr %30, align 4, !tbaa !26
  %32 = call noundef i32 @_ZNK3ipx5BasisixEi(ptr noundef nonnull align 8 dereferenceable(176) %1, i32 noundef %31)
  %33 = call noundef i32 @_ZNK3ipx5Basis8StatusOfEi(ptr noundef nonnull align 8 dereferenceable(176) %1, i32 noundef %32)
  %34 = icmp eq i32 %33, 0
  br i1 %34, label %35, label %45

35:                                               ; preds = %.lr.ph
  %36 = sext i32 %32 to i64
  %37 = getelementptr inbounds double, ptr %2, i64 %36
  %38 = load double, ptr %37, align 8, !tbaa !27
  %39 = call noundef zeroext i1 @_ZSt8isfinited(double noundef %38)
  %40 = fcmp ogt double %38, 0.000000e+00
  %41 = and i1 %39, %40
  br i1 %41, label %43, label %42

42:                                               ; preds = %35
  call void @__assert_fail(ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.12, i32 noundef 34, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3ipx20SplittedNormalMatrix7PrepareERKNS_5BasisEPKd) #7
  unreachable

43:                                               ; preds = %35
  %44 = trunc nuw nsw i64 %indvars.iv to i32
  call void @_ZN3ipx11ScaleColumnERNS_12SparseMatrixEid(ptr noundef nonnull align 8 dereferenceable(128) %21, i32 noundef %44, double noundef %38)
  br label %45

45:                                               ; preds = %43, %.lr.ph
  %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 %.lr.ph, !llvm.loop !28

._crit_edge49:                                    ; preds = %51, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %7) #8
  invoke void @_ZN3ipx11CopyColumnsERKNS_12SparseMatrixERKSt6vectorIiSaIiEE(ptr dead_on_unwind nonnull writable sret(%"class.ipx::SparseMatrix") align 8 %7, ptr noundef nonnull align 8 dereferenceable(128) %15, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %55 unwind label %59

.lr.ph48:                                         ; preds = %._crit_edge, %51
  %storemerge46 = phi i32 [ %53, %51 ], [ 0, %._crit_edge ]
  %46 = call noundef i32 @_ZNK3ipx5Basis8StatusOfEi(ptr noundef nonnull align 8 dereferenceable(176) %1, i32 noundef %storemerge46)
  %47 = icmp eq i32 %46, -1
  br i1 %47, label %48, label %51

48:                                               ; preds = %.lr.ph48
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %51 unwind label %49

49:                                               ; preds = %48
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  br label %91

51:                                               ; preds = %.lr.ph48, %48
  %52 = load i32, ptr %6, align 4, !tbaa !26
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %6, align 4, !tbaa !26
  %54 = icmp slt i32 %53, %28
  br i1 %54, label %.lr.ph48, label %._crit_edge49, !llvm.loop !30

55:                                               ; preds = %._crit_edge49
  %56 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3ipx12SparseMatrixaSEOS0_(ptr noundef nonnull align 8 dereferenceable(128) %19, ptr noundef nonnull align 8 dereferenceable(128) %7) #8
  call void @_ZN3ipx12SparseMatrixD2Ev(ptr noundef nonnull align 8 dereferenceable(128) %7) #8
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %7) #8
  invoke void @_ZN3ipx11PermuteRowsERNS_12SparseMatrixERKSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(128) %19, ptr noundef nonnull align 8 dereferenceable(24) %22)
          to label %.preheader unwind label %61

.preheader:                                       ; preds = %55
  %57 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  %.not57 = icmp eq i64 %57, 0
  br i1 %.not57, label %._crit_edge52, label %.lr.ph51

._crit_edge52:                                    ; preds = %74, %.preheader
  %58 = getelementptr inbounds i8, ptr %0, i64 400
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %58) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #8
  store i32 0, ptr %8, align 4, !tbaa !26
  br i1 %27, label %.lr.ph55, label %._crit_edge56

59:                                               ; preds = %._crit_edge49
  %60 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %7) #8
  br label %91

61:                                               ; preds = %55
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %91

.lr.ph51:                                         ; preds = %.preheader, %74
  %.03750 = phi i64 [ %75, %74 ], [ 0, %.preheader ]
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.03750) #8
  %64 = load i32, ptr %63, align 4, !tbaa !26
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds double, ptr %2, i64 %65
  %67 = load double, ptr %66, align 8, !tbaa !27
  %68 = call noundef zeroext i1 @_ZSt8isfinited(double noundef %67)
  br i1 %68, label %72, label %69

69:                                               ; preds = %.lr.ph51
  call void @__assert_fail(ptr noundef nonnull @.str.14, ptr noundef nonnull @.str.12, i32 noundef 51, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3ipx20SplittedNormalMatrix7PrepareERKNS_5BasisEPKd) #7
  unreachable

70:                                               ; preds = %72
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %91

72:                                               ; preds = %.lr.ph51
  %73 = trunc i64 %.03750 to i32
  invoke void @_ZN3ipx11ScaleColumnERNS_12SparseMatrixEid(ptr noundef nonnull align 8 dereferenceable(128) %19, i32 noundef %73, double noundef %67)
          to label %74 unwind label %70

74:                                               ; preds = %72
  %75 = add nuw i64 %.03750, 1
  %76 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  %77 = icmp ult i64 %75, %76
  br i1 %77, label %.lr.ph51, label %._crit_edge52, !llvm.loop !31

._crit_edge56:                                    ; preds = %87, %._crit_edge52
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  store i8 1, ptr %18, align 8, !tbaa !25
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  ret void

.lr.ph55:                                         ; preds = %._crit_edge52, %87
  %storemerge4353 = phi i32 [ %89, %87 ], [ 0, %._crit_edge52 ]
  %78 = sext i32 %storemerge4353 to i64
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %78) #8
  %80 = load i32, ptr %79, align 4, !tbaa !26
  %81 = call noundef i32 @_ZNK3ipx5BasisixEi(ptr noundef nonnull align 8 dereferenceable(176) %1, i32 noundef %80)
  %82 = call noundef i32 @_ZNK3ipx5Basis8StatusOfEi(ptr noundef nonnull align 8 dereferenceable(176) %1, i32 noundef %81)
  %83 = icmp eq i32 %82, 1
  br i1 %83, label %84, label %87

84:                                               ; preds = %.lr.ph55
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %58, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %87 unwind label %85

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

87:                                               ; preds = %84, %.lr.ph55
  %88 = load i32, ptr %8, align 4, !tbaa !26
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %8, align 4, !tbaa !26
  %90 = icmp slt i32 %89, %11
  br i1 %90, label %.lr.ph55, label %._crit_edge56, !llvm.loop !32

91:                                               ; preds = %85, %70, %61, %59, %49
  %.pn = phi { ptr, i32 } [ %50, %49 ], [ %71, %70 ], [ %86, %85 ], [ %62, %61 ], [ %60, %59 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  resume { ptr, i32 } %.pn
}

; 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: 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

declare void @_ZN3ipx12SparseMatrix5clearEv(ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #5

declare void @_ZNK3ipx5Basis12GetLuFactorsEPNS_12SparseMatrixES2_PiS3_(ptr noundef nonnull align 8 dereferenceable(176), ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

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

declare void @_ZN3ipx11InversePermERKSt6vectorIiSaIiEE(ptr dead_on_unwind writable sret(%"class.std::vector") align 8, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #5

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx5BasisixEi(ptr noundef nonnull align 8 dereferenceable(176), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx5Basis8StatusOfEi(ptr noundef nonnull align 8 dereferenceable(176), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSt8isfinited(double noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 2

declare void @_ZN3ipx11CopyColumnsERKNS_12SparseMatrixERKSt6vectorIiSaIiEE(ptr dead_on_unwind writable sret(%"class.ipx::SparseMatrix") align 8, ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #5

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

declare void @_ZN3ipx11PermuteRowsERNS_12SparseMatrixERKSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #5

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

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 = { 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 = { 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 = { "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 = { 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 #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, !8, i64 8}
!6 = !{!"_ZTSN3ipx20SplittedNormalMatrixE", !7, i64 0, !8, i64 8, !11, i64 16, !11, i64 144, !11, i64 272, !13, i64 400, !13, i64 424, !13, i64 448, !21, i64 472, !23, i64 488, !24, i64 496, !24, i64 504, !24, i64 512}
!7 = !{!"_ZTSN3ipx14LinearOperatorE"}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTSN3ipx12SparseMatrixE", !12, i64 0, !13, i64 8, !13, i64 32, !17, i64 56, !13, i64 80, !17, i64 104}
!12 = !{!"int", !9, i64 0}
!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", !8, i64 0, !8, i64 8, !8, i64 16}
!17 = !{!"_ZTSSt6vectorIdSaIdEE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !8, i64 0, !8, i64 8, !8, i64 16}
!21 = !{!"_ZTSSt8valarrayIdE", !22, i64 0, !8, i64 8}
!22 = !{!"long", !9, i64 0}
!23 = !{!"bool", !9, i64 0}
!24 = !{!"double", !9, i64 0}
!25 = !{!6, !23, i64 488}
!26 = !{!12, !12, i64 0}
!27 = !{!24, !24, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = distinct !{!30, !29}
!31 = distinct !{!31, !29}
!32 = distinct !{!32, !29}


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