; LLVM IR from ERGO-Code/HiGHS :: src/ipm/ipx/forrest_tomlin.ll (ZN3ipx13ForrestTomlin10_FactorizeEPKiS2_S2_PKdb)

; 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.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.ipx::ForrestTomlin" = type { %"class.ipx::LuUpdate.base", ptr, i32, %"class.std::unique_ptr", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.ipx::SparseMatrix", %"class.ipx::SparseMatrix", %"class.ipx::SparseMatrix", %"class.std::vector", i32, i8, i8, double, double, %"class.std::valarray" }
%"class.ipx::LuUpdate.base" = type <{ ptr, i32 }>
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.1" }
%"struct.std::_Head_base.1" = type { ptr }
%"class.ipx::SparseMatrix" = type { i32, %"class.std::vector", %"class.std::vector", %"class.std::vector.5", %"class.std::vector", %"class.std::vector.5" }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = 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.std::valarray" = type { i64, ptr }

@.str.11 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [14 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 void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) 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: mustprogress uwtable
define dso_local noundef i32 @_ZN3ipx13ForrestTomlin10_FactorizeEPKiS2_S2_PKdb(ptr noundef nonnull align 8 dereferenceable(608) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i1 noundef zeroext %5) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i8, align 1
  %13 = alloca %"class.std::vector", align 8
  %14 = alloca %"class.std::vector", align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca %"class.std::__cxx11::basic_string", align 8
  %23 = alloca %"class.std::__cxx11::basic_string", align 8
  %24 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  %25 = zext i1 %5 to i8
  store i8 %25, ptr %12, align 1, !tbaa !9
  %26 = load ptr, ptr %7, align 8
  %27 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %26, i32 0, i32 11
  %28 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %26, i32 0, i32 2
  %29 = load i32, ptr %28, align 8, !tbaa !11
  call void @_ZN3ipx12SparseMatrix6resizeEiii(ptr noundef nonnull align 8 dereferenceable(128) %27, i32 noundef %29, i32 noundef 0, i32 noundef 0)
  %30 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %26, i32 0, i32 12
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #5
  %31 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %26, i32 0, i32 13
  store i32 -1, ptr %31, align 8, !tbaa !33
  %32 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %26, i32 0, i32 14
  store i8 0, ptr %32, align 4, !tbaa !34
  %33 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %26, i32 0, i32 15
  store i8 0, ptr %33, align 1, !tbaa !35
  %34 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %26, i32 0, i32 3
  %35 = call noundef ptr @_ZNKSt10unique_ptrIN3ipx15LuFactorizationESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #5
  %36 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %26, i32 0, i32 2
  %37 = load i32, ptr %36, align 8, !tbaa !11
  %38 = load ptr, ptr %8, align 8, !tbaa !5
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  %40 = load ptr, ptr %10, align 8, !tbaa !5
  %41 = load ptr, ptr %11, align 8, !tbaa !5
  %42 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %26, i32 0, i32 17
  %43 = load double, ptr %42, align 8, !tbaa !36
  %44 = load i8, ptr %12, align 1, !tbaa !9, !range !37, !noundef !38
  %45 = trunc i8 %44 to i1
  %46 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %26, i32 0, i32 9
  %47 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %26, i32 0, i32 10
  %48 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %26, i32 0, i32 4
  %49 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %26, i32 0, i32 5
  %50 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %26, i32 0, i32 8
  call void @_ZN3ipx15LuFactorization9FactorizeEiPKiS2_S2_PKddbPNS_12SparseMatrixES6_PSt6vectorIiSaIiEESA_SA_(ptr noundef nonnull align 8 dereferenceable(16) %35, i32 noundef %37, ptr noundef %38, ptr noundef %39, ptr noundef %40, ptr noundef %41, double noundef %43, i1 noundef zeroext %45, ptr noundef %46, ptr noundef %47, ptr noundef %48, ptr noundef %49, ptr noundef %50)
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #5
  %51 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %26, i32 0, i32 4
  call void @_ZN3ipx11InversePermERKSt6vectorIiSaIiEE(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %13, ptr noundef nonnull align 8 dereferenceable(24) %51)
  %52 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %26, i32 0, i32 6
  %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) %13) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #5
  %54 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %26, i32 0, i32 5
  call void @_ZN3ipx11InversePermERKSt6vectorIiSaIiEE(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %14, ptr noundef nonnull align 8 dereferenceable(24) %54)
  %55 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %26, i32 0, i32 7
  %56 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %55, ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !39
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !39
  br label %57

57:                                               ; preds = %77, %6
  %58 = load i32, ptr %16, align 4, !tbaa !39
  %59 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %26, i32 0, i32 2
  %60 = load i32, ptr %59, align 8, !tbaa !11
  %61 = icmp slt i32 %58, %60
  br i1 %61, label %63, label %62

62:                                               ; preds = %57
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %80

63:                                               ; preds = %57
  %64 = load ptr, ptr %9, align 8, !tbaa !5
  %65 = load i32, ptr %16, align 4, !tbaa !39
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds i32, ptr %64, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !39
  %69 = load ptr, ptr %8, align 8, !tbaa !5
  %70 = load i32, ptr %16, align 4, !tbaa !39
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds i32, ptr %69, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !39
  %74 = sub nsw i32 %68, %73
  %75 = load i32, ptr %15, align 4, !tbaa !39
  %76 = add nsw i32 %75, %74
  store i32 %76, ptr %15, align 4, !tbaa !39
  br label %77

77:                                               ; preds = %63
  %78 = load i32, ptr %16, align 4, !tbaa !39
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %16, align 4, !tbaa !39
  br label %57, !llvm.loop !40

80:                                               ; preds = %62
  %81 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %26, i32 0, i32 9
  %82 = call noundef i32 @_ZNK3ipx12SparseMatrix7entriesEv(ptr noundef nonnull align 8 dereferenceable(128) %81)
  %83 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %26, i32 0, i32 10
  %84 = call noundef i32 @_ZNK3ipx12SparseMatrix7entriesEv(ptr noundef nonnull align 8 dereferenceable(128) %83)
  %85 = add nsw i32 %82, %84
  %86 = sitofp i32 %85 to double
  %87 = fmul double 1.000000e+00, %86
  %88 = load i32, ptr %15, align 4, !tbaa !39
  %89 = sitofp i32 %88 to double
  %90 = fdiv double %87, %89
  %91 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %26, i32 0, i32 16
  store double %90, ptr %91, align 8, !tbaa !42
  %92 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %26, i32 0, i32 1
  %93 = load ptr, ptr %92, align 8, !tbaa !43
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3ipx7Control5DebugEi(ptr noundef nonnull align 8 dereferenceable(1496) %93, i32 noundef 3)
  %95 = load ptr, ptr %94, align 8, !tbaa !44
  %96 = getelementptr i8, ptr %95, i64 -24
  %97 = load i64, ptr %96, align 8
  %98 = getelementptr inbounds i8, ptr %94, i64 %97
  %99 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %98)
  br i1 %99, label %100, label %157

100:                                              ; preds = %80
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %101 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %26, i32 0, i32 9
  %102 = call noundef double @_ZN3ipx14NormestInverseERKNS_12SparseMatrixEPKci(ptr noundef nonnull align 8 dereferenceable(128) %101, ptr noundef @.str.11, i32 noundef 1)
  store double %102, ptr %17, align 8, !tbaa !46
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %103 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %26, i32 0, i32 10
  %104 = call noundef double @_ZN3ipx14NormestInverseERKNS_12SparseMatrixEPKci(ptr noundef nonnull align 8 dereferenceable(128) %103, ptr noundef @.str.12, i32 noundef 0)
  store double %104, ptr %18, align 8, !tbaa !46
  %105 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %26, i32 0, i32 1
  %106 = load ptr, ptr %105, align 8, !tbaa !43
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3ipx7Control5DebugEi(ptr noundef nonnull align 8 dereferenceable(1496) %106, i32 noundef 3)
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %107, ptr noundef @.str.13)
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #5
  %109 = load double, ptr %17, align 8, !tbaa !46
  call void @_ZN3ipx4sci2B5cxx11Ed(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %19, double noundef %109)
  %110 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %108, ptr noundef nonnull align 8 dereferenceable(32) %19)
          to label %111 unwind label %133

111:                                              ; preds = %100
  %112 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %110, i8 noundef signext 44)
          to label %113 unwind label %133

113:                                              ; preds = %111
  %114 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %112, ptr noundef @.str.14)
          to label %115 unwind label %133

115:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 32, ptr %22) #5
  %116 = load double, ptr %18, align 8, !tbaa !46
  invoke void @_ZN3ipx4sci2B5cxx11Ed(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %22, double noundef %116)
          to label %117 unwind label %137

117:                                              ; preds = %115
  %118 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %114, ptr noundef nonnull align 8 dereferenceable(32) %22)
          to label %119 unwind label %141

119:                                              ; preds = %117
  %120 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %118, i8 noundef signext 44)
          to label %121 unwind label %141

121:                                              ; preds = %119
  %122 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %120, ptr noundef @.str.15)
          to label %123 unwind label %141

123:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 32, ptr %23) #5
  %124 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %26, i32 0, i32 3
  %125 = call noundef ptr @_ZNKSt10unique_ptrIN3ipx15LuFactorizationESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %124) #5
  %126 = invoke noundef double @_ZNK3ipx15LuFactorization9stabilityEv(ptr noundef nonnull align 8 dereferenceable(16) %125)
          to label %127 unwind label %145

127:                                              ; preds = %123
  invoke void @_ZN3ipx4sci2B5cxx11Ed(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %23, double noundef %126)
          to label %128 unwind label %145

128:                                              ; preds = %127
  %129 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %122, ptr noundef nonnull align 8 dereferenceable(32) %23)
          to label %130 unwind label %149

130:                                              ; preds = %128
  %131 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %129, i8 noundef signext 10)
          to label %132 unwind label %149

132:                                              ; preds = %130
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %157

133:                                              ; preds = %113, %111, %100
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %20, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %21, align 4
  br label %156

137:                                              ; preds = %115
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %20, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %21, align 4
  br label %155

141:                                              ; preds = %121, %119, %117
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %20, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %21, align 4
  br label %154

145:                                              ; preds = %127, %123
  %146 = landingpad { ptr, i32 }
          cleanup
  %147 = extractvalue { ptr, i32 } %146, 0
  store ptr %147, ptr %20, align 8
  %148 = extractvalue { ptr, i32 } %146, 1
  store i32 %148, ptr %21, align 4
  br label %153

149:                                              ; preds = %130, %128
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %20, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %21, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #5
  br label %153

153:                                              ; preds = %149, %145
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #5
  br label %154

154:                                              ; preds = %153, %141
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #5
  br label %155

155:                                              ; preds = %154, %137
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #5
  br label %156

156:                                              ; preds = %155, %133
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %173

157:                                              ; preds = %132, %80
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  store i32 0, ptr %24, align 4, !tbaa !39
  %158 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %26, i32 0, i32 3
  %159 = call noundef ptr @_ZNKSt10unique_ptrIN3ipx15LuFactorizationESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %158) #5
  %160 = call noundef double @_ZNK3ipx15LuFactorization9stabilityEv(ptr noundef nonnull align 8 dereferenceable(16) %159)
  %161 = fcmp ogt double %160, 0x3D719799812DEA11
  br i1 %161, label %162, label %165

162:                                              ; preds = %157
  %163 = load i32, ptr %24, align 4, !tbaa !39
  %164 = or i32 %163, 1
  store i32 %164, ptr %24, align 4, !tbaa !39
  br label %165

165:                                              ; preds = %162, %157
  %166 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %26, i32 0, i32 8
  %167 = call noundef zeroext i1 @_ZNKSt6vectorIiSaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %166) #5
  br i1 %167, label %171, label %168

168:                                              ; preds = %165
  %169 = load i32, ptr %24, align 4, !tbaa !39
  %170 = or i32 %169, 2
  store i32 %170, ptr %24, align 4, !tbaa !39
  br label %171

171:                                              ; preds = %168, %165
  %172 = load i32, ptr %24, align 4, !tbaa !39
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  ret i32 %172

173:                                              ; preds = %156
  %174 = load ptr, ptr %20, align 8
  %175 = load i32, ptr %21, align 4
  %176 = insertvalue { ptr, i32 } poison, ptr %174, 0
  %177 = insertvalue { ptr, i32 } %176, i32 %175, 1
  resume { ptr, i32 } %177
}

declare void @_ZN3ipx12SparseMatrix6resizeEiii(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, i32 noundef, i32 noundef) #3

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

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

declare void @_ZN3ipx15LuFactorization9FactorizeEiPKiS2_S2_PKddbPNS_12SparseMatrixES6_PSt6vectorIiSaIiEESA_SA_(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, double noundef, i1 noundef zeroext, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

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

; 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 i32 @_ZNK3ipx12SparseMatrix7entriesEv(ptr noundef nonnull align 8 dereferenceable(128)) #1 align 2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3ipx7Control5DebugEi(ptr noundef nonnull align 8 dereferenceable(1496), i32 noundef) #3

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264)) #2 align 2

declare noundef double @_ZN3ipx14NormestInverseERKNS_12SparseMatrixEPKci(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef, i32 noundef) #3

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #4

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3ipx4sci2B5cxx11Ed(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, double noundef) #4

declare noundef double @_ZNK3ipx15LuFactorization9stabilityEv(ptr noundef nonnull align 8 dereferenceable(16)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorIiSaIiEE5emptyEv(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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !14, i64 24}
!12 = !{!"_ZTSN3ipx13ForrestTomlinE", !13, i64 0, !6, i64 16, !14, i64 24, !15, i64 32, !21, i64 40, !21, i64 64, !21, i64 88, !21, i64 112, !21, i64 136, !25, i64 160, !25, i64 288, !25, i64 416, !21, i64 544, !14, i64 568, !10, i64 572, !10, i64 573, !30, i64 576, !30, i64 584, !31, i64 592}
!13 = !{!"_ZTSN3ipx8LuUpdateE", !14, i64 8}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ZTSSt10unique_ptrIN3ipx15LuFactorizationESt14default_deleteIS1_EE", !16, i64 0}
!16 = !{!"_ZTSSt15__uniq_ptr_dataIN3ipx15LuFactorizationESt14default_deleteIS1_ELb1ELb1EE", !17, i64 0}
!17 = !{!"_ZTSSt15__uniq_ptr_implIN3ipx15LuFactorizationESt14default_deleteIS1_EE", !18, i64 0}
!18 = !{!"_ZTSSt5tupleIJPN3ipx15LuFactorizationESt14default_deleteIS1_EEE", !19, i64 0}
!19 = !{!"_ZTSSt11_Tuple_implILm0EJPN3ipx15LuFactorizationESt14default_deleteIS1_EEE", !20, i64 0}
!20 = !{!"_ZTSSt10_Head_baseILm0EPN3ipx15LuFactorizationELb0EE", !6, i64 0}
!21 = !{!"_ZTSSt6vectorIiSaIiEE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{!"_ZTSN3ipx12SparseMatrixE", !14, i64 0, !21, i64 8, !21, i64 32, !26, i64 56, !21, i64 80, !26, i64 104}
!26 = !{!"_ZTSSt6vectorIdSaIdEE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!30 = !{!"double", !7, i64 0}
!31 = !{!"_ZTSSt8valarrayIdE", !32, i64 0, !6, i64 8}
!32 = !{!"long", !7, i64 0}
!33 = !{!12, !14, i64 568}
!34 = !{!12, !10, i64 572}
!35 = !{!12, !10, i64 573}
!36 = !{!12, !30, i64 584}
!37 = !{i8 0, i8 2}
!38 = !{}
!39 = !{!14, !14, i64 0}
!40 = distinct !{!40, !41}
!41 = !{!"llvm.loop.mustprogress"}
!42 = !{!12, !30, i64 576}
!43 = !{!12, !6, i64 16}
!44 = !{!45, !45, i64 0}
!45 = !{!"vtable pointer", !8, i64 0}
!46 = !{!30, !30, i64 0}


; 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.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@.str.11 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [14 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 void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) 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: mustprogress uwtable
define dso_local noundef range(i32 0, 4) i32 @_ZN3ipx13ForrestTomlin10_FactorizeEPKiS2_S2_PKdb(ptr noundef nonnull align 8 dereferenceable(608) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i1 noundef zeroext %5) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca %"class.std::vector", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = getelementptr inbounds i8, ptr %0, i64 416
  %13 = getelementptr inbounds i8, ptr %0, i64 24
  %14 = load i32, ptr %13, align 8, !tbaa !5
  tail call void @_ZN3ipx12SparseMatrix6resizeEiii(ptr noundef nonnull align 8 dereferenceable(128) %12, i32 noundef %14, i32 noundef 0, i32 noundef 0)
  %15 = getelementptr inbounds i8, ptr %0, i64 544
  tail call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  %16 = getelementptr inbounds i8, ptr %0, i64 568
  store i32 -1, ptr %16, align 8, !tbaa !31
  %17 = getelementptr inbounds i8, ptr %0, i64 572
  store i8 0, ptr %17, align 4, !tbaa !32
  %18 = getelementptr inbounds i8, ptr %0, i64 573
  store i8 0, ptr %18, align 1, !tbaa !33
  %19 = getelementptr inbounds i8, ptr %0, i64 32
  %20 = tail call noundef ptr @_ZNKSt10unique_ptrIN3ipx15LuFactorizationESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #6
  %21 = load i32, ptr %13, align 8, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %0, i64 584
  %23 = load double, ptr %22, align 8, !tbaa !34
  %24 = getelementptr inbounds i8, ptr %0, i64 160
  %25 = getelementptr inbounds i8, ptr %0, i64 288
  %26 = getelementptr inbounds i8, ptr %0, i64 40
  %27 = getelementptr inbounds i8, ptr %0, i64 64
  %28 = getelementptr inbounds i8, ptr %0, i64 136
  tail call void @_ZN3ipx15LuFactorization9FactorizeEiPKiS2_S2_PKddbPNS_12SparseMatrixES6_PSt6vectorIiSaIiEESA_SA_(ptr noundef nonnull align 8 dereferenceable(16) %20, i32 noundef %21, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, double noundef %23, i1 noundef zeroext %5, ptr noundef nonnull %24, ptr noundef nonnull %25, ptr noundef nonnull %26, ptr noundef nonnull %27, ptr noundef nonnull %28)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  call void @_ZN3ipx11InversePermERKSt6vectorIiSaIiEE(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %7, ptr noundef nonnull align 8 dereferenceable(24) %26)
  %29 = getelementptr inbounds i8, ptr %0, i64 88
  %30 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %29, ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #6
  call void @_ZN3ipx11InversePermERKSt6vectorIiSaIiEE(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %8, ptr noundef nonnull align 8 dereferenceable(24) %27)
  %31 = getelementptr inbounds i8, ptr %0, i64 112
  %32 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %31, ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #6
  %33 = load i32, ptr %13, align 8, !tbaa !5
  %34 = icmp sgt i32 %33, 0
  br i1 %34, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %6
  %wide.trip.count = zext nneg i32 %33 to i64
  %min.iters.check = icmp ult i32 %33, 8
  br i1 %min.iters.check, label %.lr.ph.preheader39, label %vector.ph

.lr.ph.preheader39:                               ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  %.02633.ph = phi i32 [ 0, %.lr.ph.preheader ], [ %44, %middle.block ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %wide.trip.count, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %41, %vector.body ]
  %vec.phi35 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %42, %vector.body ]
  %35 = getelementptr inbounds i32, ptr %2, i64 %index
  %36 = getelementptr inbounds i8, ptr %35, i64 16
  %wide.load = load <4 x i32>, ptr %35, align 4, !tbaa !35
  %wide.load36 = load <4 x i32>, ptr %36, align 4, !tbaa !35
  %37 = getelementptr inbounds i32, ptr %1, i64 %index
  %38 = getelementptr inbounds i8, ptr %37, i64 16
  %wide.load37 = load <4 x i32>, ptr %37, align 4, !tbaa !35
  %wide.load38 = load <4 x i32>, ptr %38, align 4, !tbaa !35
  %39 = add <4 x i32> %wide.load, %vec.phi
  %40 = add <4 x i32> %wide.load36, %vec.phi35
  %41 = sub <4 x i32> %39, %wide.load37
  %42 = sub <4 x i32> %40, %wide.load38
  %index.next = add nuw i64 %index, 8
  %43 = icmp eq i64 %index.next, %n.vec
  br i1 %43, label %middle.block, label %vector.body, !llvm.loop !36

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %42, %41
  %44 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge.loopexit, label %.lr.ph.preheader39

._crit_edge.loopexit:                             ; preds = %.lr.ph, %middle.block
  %.lcssa = phi i32 [ %44, %middle.block ], [ %65, %.lr.ph ]
  %45 = sitofp i32 %.lcssa to double
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %6
  %.026.lcssa = phi double [ 0.000000e+00, %6 ], [ %45, %._crit_edge.loopexit ]
  %46 = call noundef i32 @_ZNK3ipx12SparseMatrix7entriesEv(ptr noundef nonnull align 8 dereferenceable(128) %24)
  %47 = call noundef i32 @_ZNK3ipx12SparseMatrix7entriesEv(ptr noundef nonnull align 8 dereferenceable(128) %25)
  %48 = add nsw i32 %47, %46
  %49 = sitofp i32 %48 to double
  %50 = fdiv double %49, %.026.lcssa
  %51 = getelementptr inbounds i8, ptr %0, i64 576
  store double %50, ptr %51, align 8, !tbaa !40
  %52 = getelementptr inbounds i8, ptr %0, i64 16
  %53 = load ptr, ptr %52, align 8, !tbaa !41
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3ipx7Control5DebugEi(ptr noundef nonnull align 8 dereferenceable(1496) %53, i32 noundef 3)
  %55 = load ptr, ptr %54, align 8, !tbaa !42
  %56 = getelementptr i8, ptr %55, i64 -24
  %57 = load i64, ptr %56, align 8
  %58 = getelementptr inbounds i8, ptr %54, i64 %57
  %59 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %58)
  br i1 %59, label %66, label %107

.lr.ph:                                           ; preds = %.lr.ph.preheader39, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader39 ]
  %.02633 = phi i32 [ %65, %.lr.ph ], [ %.02633.ph, %.lr.ph.preheader39 ]
  %60 = getelementptr inbounds i32, ptr %2, i64 %indvars.iv
  %61 = load i32, ptr %60, align 4, !tbaa !35
  %62 = getelementptr inbounds i32, ptr %1, i64 %indvars.iv
  %63 = load i32, ptr %62, align 4, !tbaa !35
  %64 = add i32 %61, %.02633
  %65 = sub i32 %64, %63
  %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.loopexit, label %.lr.ph, !llvm.loop !44

66:                                               ; preds = %._crit_edge
  %67 = call noundef double @_ZN3ipx14NormestInverseERKNS_12SparseMatrixEPKci(ptr noundef nonnull align 8 dereferenceable(128) %24, ptr noundef nonnull @.str.11, i32 noundef 1)
  %68 = call noundef double @_ZN3ipx14NormestInverseERKNS_12SparseMatrixEPKci(ptr noundef nonnull align 8 dereferenceable(128) %25, ptr noundef nonnull @.str.12, i32 noundef 0)
  %69 = load ptr, ptr %52, align 8, !tbaa !41
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3ipx7Control5DebugEi(ptr noundef nonnull align 8 dereferenceable(1496) %69, i32 noundef 3)
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %70, ptr noundef nonnull @.str.13)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #6
  call void @_ZN3ipx4sci2B5cxx11Ed(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %9, double noundef %67)
  %72 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %71, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %73 unwind label %93

73:                                               ; preds = %66
  %74 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %72, i8 noundef signext 44)
          to label %75 unwind label %93

75:                                               ; preds = %73
  %76 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %74, ptr noundef nonnull @.str.14)
          to label %77 unwind label %93

77:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #6
  invoke void @_ZN3ipx4sci2B5cxx11Ed(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %10, double noundef %68)
          to label %78 unwind label %95

78:                                               ; preds = %77
  %79 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %76, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %80 unwind label %97

80:                                               ; preds = %78
  %81 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %79, i8 noundef signext 44)
          to label %82 unwind label %97

82:                                               ; preds = %80
  %83 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %81, ptr noundef nonnull @.str.15)
          to label %84 unwind label %97

84:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #6
  %85 = call noundef ptr @_ZNKSt10unique_ptrIN3ipx15LuFactorizationESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #6
  %86 = invoke noundef double @_ZNK3ipx15LuFactorization9stabilityEv(ptr noundef nonnull align 8 dereferenceable(16) %85)
          to label %87 unwind label %99

87:                                               ; preds = %84
  invoke void @_ZN3ipx4sci2B5cxx11Ed(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %11, double noundef %86)
          to label %88 unwind label %99

88:                                               ; preds = %87
  %89 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %83, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %90 unwind label %101

90:                                               ; preds = %88
  %91 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %89, i8 noundef signext 10)
          to label %92 unwind label %101

92:                                               ; preds = %90
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #6
  br label %107

93:                                               ; preds = %75, %73, %66
  %94 = landingpad { ptr, i32 }
          cleanup
  br label %106

95:                                               ; preds = %77
  %96 = landingpad { ptr, i32 }
          cleanup
  br label %105

97:                                               ; preds = %82, %80, %78
  %98 = landingpad { ptr, i32 }
          cleanup
  br label %104

99:                                               ; preds = %87, %84
  %100 = landingpad { ptr, i32 }
          cleanup
  br label %103

101:                                              ; preds = %90, %88
  %102 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  br label %103

103:                                              ; preds = %101, %99
  %.pn = phi { ptr, i32 } [ %102, %101 ], [ %100, %99 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #6
  br label %104

104:                                              ; preds = %103, %97
  %.pn.pn = phi { ptr, i32 } [ %.pn, %103 ], [ %98, %97 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  br label %105

105:                                              ; preds = %104, %95
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %104 ], [ %96, %95 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  br label %106

106:                                              ; preds = %105, %93
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %105 ], [ %94, %93 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #6
  resume { ptr, i32 } %.pn.pn.pn.pn

107:                                              ; preds = %92, %._crit_edge
  %108 = call noundef ptr @_ZNKSt10unique_ptrIN3ipx15LuFactorizationESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #6
  %109 = call noundef double @_ZNK3ipx15LuFactorization9stabilityEv(ptr noundef nonnull align 8 dereferenceable(16) %108)
  %110 = fcmp ogt double %109, 0x3D719799812DEA11
  %.0 = zext i1 %110 to i32
  %111 = call noundef zeroext i1 @_ZNKSt6vectorIiSaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %28) #6
  %112 = or disjoint i32 %.0, 2
  %.1 = select i1 %111, i32 %.0, i32 %112
  ret i32 %.1
}

declare void @_ZN3ipx12SparseMatrix6resizeEiii(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

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

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

declare void @_ZN3ipx15LuFactorization9FactorizeEiPKiS2_S2_PKddbPNS_12SparseMatrixES6_PSt6vectorIiSaIiEESA_SA_(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, double noundef, i1 noundef zeroext, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

; 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 i32 @_ZNK3ipx12SparseMatrix7entriesEv(ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264)) local_unnamed_addr #2 align 2

declare noundef double @_ZN3ipx14NormestInverseERKNS_12SparseMatrixEPKci(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #4

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3ipx4sci2B5cxx11Ed(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, double noundef) local_unnamed_addr #4

declare noundef double @_ZNK3ipx15LuFactorization9stabilityEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #5

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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !8, i64 24}
!6 = !{!"_ZTSN3ipx13ForrestTomlinE", !7, i64 0, !11, i64 16, !8, i64 24, !12, i64 32, !18, i64 40, !18, i64 64, !18, i64 88, !18, i64 112, !18, i64 136, !22, i64 160, !22, i64 288, !22, i64 416, !18, i64 544, !8, i64 568, !27, i64 572, !27, i64 573, !28, i64 576, !28, i64 584, !29, i64 592}
!7 = !{!"_ZTSN3ipx8LuUpdateE", !8, i64 8}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!"_ZTSSt10unique_ptrIN3ipx15LuFactorizationESt14default_deleteIS1_EE", !13, i64 0}
!13 = !{!"_ZTSSt15__uniq_ptr_dataIN3ipx15LuFactorizationESt14default_deleteIS1_ELb1ELb1EE", !14, i64 0}
!14 = !{!"_ZTSSt15__uniq_ptr_implIN3ipx15LuFactorizationESt14default_deleteIS1_EE", !15, i64 0}
!15 = !{!"_ZTSSt5tupleIJPN3ipx15LuFactorizationESt14default_deleteIS1_EEE", !16, i64 0}
!16 = !{!"_ZTSSt11_Tuple_implILm0EJPN3ipx15LuFactorizationESt14default_deleteIS1_EEE", !17, i64 0}
!17 = !{!"_ZTSSt10_Head_baseILm0EPN3ipx15LuFactorizationELb0EE", !11, i64 0}
!18 = !{!"_ZTSSt6vectorIiSaIiEE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!22 = !{!"_ZTSN3ipx12SparseMatrixE", !8, i64 0, !18, i64 8, !18, i64 32, !23, i64 56, !18, i64 80, !23, i64 104}
!23 = !{!"_ZTSSt6vectorIdSaIdEE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!27 = !{!"bool", !9, i64 0}
!28 = !{!"double", !9, i64 0}
!29 = !{!"_ZTSSt8valarrayIdE", !30, i64 0, !11, i64 8}
!30 = !{!"long", !9, i64 0}
!31 = !{!6, !8, i64 568}
!32 = !{!6, !27, i64 572}
!33 = !{!6, !27, i64 573}
!34 = !{!6, !28, i64 584}
!35 = !{!8, !8, i64 0}
!36 = distinct !{!36, !37, !38, !39}
!37 = !{!"llvm.loop.mustprogress"}
!38 = !{!"llvm.loop.isvectorized", i32 1}
!39 = !{!"llvm.loop.unroll.runtime.disable"}
!40 = !{!6, !28, i64 576}
!41 = !{!6, !11, i64 16}
!42 = !{!43, !43, i64 0}
!43 = !{!"vtable pointer", !10, i64 0}
!44 = distinct !{!44, !37, !39, !38}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass