; LLVM IR from ERGO-Code/HiGHS :: src/lp_data/HighsSolution.ll (Z11refineBasisRK7HighsLpRK13HighsSolutionR10HighsBasis)

; 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"

%struct.HighsBasis = type { i8, i8, i8, i8, i32, i32, %"class.std::__cxx11::basic_string", %"class.std::vector.28", %"class.std::vector.28" }
%"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.std::vector.28" = type { %"struct.std::_Vector_base.29" }
%"struct.std::_Vector_base.29" = type { %"struct.std::_Vector_base<HighsBasisStatus, std::allocator<HighsBasisStatus>>::_Vector_impl" }
%"struct.std::_Vector_base<HighsBasisStatus, std::allocator<HighsBasisStatus>>::_Vector_impl" = type { %"struct.std::_Vector_base<HighsBasisStatus, std::allocator<HighsBasisStatus>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HighsBasisStatus, std::allocator<HighsBasisStatus>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.HighsSolution = type { i8, i8, %"class.std::vector.3", %"class.std::vector.3", %"class.std::vector.3", %"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.HighsLp = type { i32, i32, %"class.std::vector.3", %"class.std::vector.3", %"class.std::vector.3", %"class.std::vector.3", %"class.std::vector.3", %class.HighsSparseMatrix, i32, double, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i32, i32, %"class.std::vector.13", %"class.std::vector.13", %"class.std::vector.18", %struct.HighsNameHash, %struct.HighsNameHash, i32, i32, %struct.HighsScale, i8, i8, i32, i8, %struct.HighsLpMods }
%class.HighsSparseMatrix = type { i32, i32, i32, %"class.std::vector.8", %"class.std::vector.8", %"class.std::vector.8", %"class.std::vector.3" }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = 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::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.18" = type { %"struct.std::_Vector_base.19" }
%"struct.std::_Vector_base.19" = type { %"struct.std::_Vector_base<HighsVarType, std::allocator<HighsVarType>>::_Vector_impl" }
%"struct.std::_Vector_base<HighsVarType, std::allocator<HighsVarType>>::_Vector_impl" = type { %"struct.std::_Vector_base<HighsVarType, std::allocator<HighsVarType>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HighsVarType, std::allocator<HighsVarType>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.HighsNameHash = type { %"class.std::unordered_map" }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%struct.HighsScale = type { i32, i8, i32, i32, double, %"class.std::vector.3", %"class.std::vector.3" }
%struct.HighsLpMods = type { %"class.std::vector.8", %"class.std::vector.8", %"class.std::vector.3", %"class.std::vector.3", %"class.std::vector.18", %"class.std::vector.8", %"class.std::vector.3", %"class.std::vector.8", %"class.std::vector.3", %"class.std::vector.8", %"class.std::vector.3", %"class.std::vector.3", %"class.std::vector.3" }

@.str.52 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.74 = external hidden unnamed_addr constant [13 x i8], align 1
@__PRETTY_FUNCTION__._Z11refineBasisRK7HighsLpRK13HighsSolutionR10HighsBasis = external hidden unnamed_addr constant [71 x i8], align 1
@.str.75 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.76 = external hidden unnamed_addr constant [38 x i8], align 1

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z11refineBasisRK7HighsLpRK13HighsSolutionR10HighsBasis(ptr noundef nonnull align 8 dereferenceable(920) %0, ptr noundef nonnull align 8 dereferenceable(104) %1, ptr noundef nonnull align 8 dereferenceable(96) %2) #4 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i8, align 1
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca i8, align 1
  %14 = alloca i32, align 4
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca i8, align 1
  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
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.HighsBasis, ptr %18, i32 0, i32 2
  %20 = load i8, ptr %19, align 2, !tbaa !9, !range !20, !noundef !21
  %21 = trunc i8 %20 to i1
  br i1 %21, label %22, label %23

22:                                               ; preds = %3
  br label %25

23:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str.74, ptr noundef @.str.52, i32 noundef 685, ptr noundef @__PRETTY_FUNCTION__._Z11refineBasisRK7HighsLpRK13HighsSolutionR10HighsBasis) #6
  unreachable

24:                                               ; No predecessors!
  br label %25

25:                                               ; preds = %24, %22
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = call noundef zeroext i1 @_Z16isBasisRightSizeRK7HighsLpRK10HighsBasis(ptr noundef nonnull align 8 dereferenceable(920) %26, ptr noundef nonnull align 8 dereferenceable(96) %27)
  br i1 %28, label %29, label %30

29:                                               ; preds = %25
  br label %32

30:                                               ; preds = %25
  call void @__assert_fail(ptr noundef @.str.75, ptr noundef @.str.52, i32 noundef 686, ptr noundef @__PRETTY_FUNCTION__._Z11refineBasisRK7HighsLpRK13HighsSolutionR10HighsBasis) #6
  unreachable

31:                                               ; No predecessors!
  br label %32

32:                                               ; preds = %31, %29
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #7
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.HighsSolution, ptr %33, i32 0, i32 0
  %35 = load i8, ptr %34, align 8, !tbaa !22, !range !20, !noundef !21
  %36 = trunc i8 %35 to i1
  %37 = zext i1 %36 to i8
  store i8 %37, ptr %7, align 1, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %class.HighsLp, ptr %38, i32 0, i32 0
  %40 = load i32, ptr %39, align 8, !tbaa !29
  store i32 %40, ptr %8, align 4, !tbaa !55
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = getelementptr inbounds %class.HighsLp, ptr %41, i32 0, i32 1
  %43 = load i32, ptr %42, align 4, !tbaa !56
  store i32 %43, ptr %9, align 4, !tbaa !55
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !55
  br label %44

44:                                               ; preds = %132, %32
  %45 = load i32, ptr %10, align 4, !tbaa !55
  %46 = load i32, ptr %8, align 4, !tbaa !55
  %47 = icmp slt i32 %45, %46
  br i1 %47, label %49, label %48

48:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %135

49:                                               ; preds = %44
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.HighsBasis, ptr %50, i32 0, i32 7
  %52 = load i32, ptr %10, align 4, !tbaa !55
  %53 = sext i32 %52 to i64
  %54 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorI16HighsBasisStatusSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %51, i64 noundef %53) #7
  %55 = load i8, ptr %54, align 1, !tbaa !57
  %56 = icmp ne i8 %55, 4
  br i1 %56, label %57, label %58

57:                                               ; preds = %49
  br label %132

58:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds %class.HighsLp, ptr %59, i32 0, i32 3
  %61 = load i32, ptr %10, align 4, !tbaa !55
  %62 = sext i32 %61 to i64
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %60, i64 noundef %62) #7
  %64 = load double, ptr %63, align 8, !tbaa !59
  store double %64, ptr %11, align 8, !tbaa !59
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = getelementptr inbounds %class.HighsLp, ptr %65, i32 0, i32 4
  %67 = load i32, ptr %10, align 4, !tbaa !55
  %68 = sext i32 %67 to i64
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %66, i64 noundef %68) #7
  %70 = load double, ptr %69, align 8, !tbaa !59
  store double %70, ptr %12, align 8, !tbaa !59
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #7
  store i8 4, ptr %13, align 1, !tbaa !57
  %71 = load double, ptr %11, align 8, !tbaa !59
  %72 = load double, ptr %12, align 8, !tbaa !59
  %73 = fcmp oeq double %71, %72
  br i1 %73, label %74, label %75

74:                                               ; preds = %58
  store i8 0, ptr %13, align 1, !tbaa !57
  br label %119

75:                                               ; preds = %58
  %76 = load double, ptr %11, align 8, !tbaa !59
  %77 = fneg double %76
  %78 = call noundef zeroext i1 @_Z16highs_isInfinityd(double noundef %77)
  br i1 %78, label %112, label %79

79:                                               ; preds = %75
  %80 = load double, ptr %12, align 8, !tbaa !59
  %81 = call noundef zeroext i1 @_Z16highs_isInfinityd(double noundef %80)
  br i1 %81, label %110, label %82

82:                                               ; preds = %79
  %83 = load i8, ptr %7, align 1, !tbaa !28, !range !20, !noundef !21
  %84 = trunc i8 %83 to i1
  br i1 %84, label %85, label %100

85:                                               ; preds = %82
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.HighsSolution, ptr %86, i32 0, i32 2
  %88 = load i32, ptr %10, align 4, !tbaa !55
  %89 = sext i32 %88 to i64
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %87, i64 noundef %89) #7
  %91 = load double, ptr %90, align 8, !tbaa !59
  %92 = load double, ptr %11, align 8, !tbaa !59
  %93 = load double, ptr %12, align 8, !tbaa !59
  %94 = fadd double %92, %93
  %95 = fmul double 5.000000e-01, %94
  %96 = fcmp olt double %91, %95
  br i1 %96, label %97, label %98

97:                                               ; preds = %85
  store i8 0, ptr %13, align 1, !tbaa !57
  br label %99

98:                                               ; preds = %85
  store i8 2, ptr %13, align 1, !tbaa !57
  br label %99

99:                                               ; preds = %98, %97
  br label %109

100:                                              ; preds = %82
  %101 = load double, ptr %11, align 8, !tbaa !59
  %102 = call double @llvm.fabs.f64(double %101)
  %103 = load double, ptr %12, align 8, !tbaa !59
  %104 = call double @llvm.fabs.f64(double %103)
  %105 = fcmp olt double %102, %104
  br i1 %105, label %106, label %107

106:                                              ; preds = %100
  store i8 0, ptr %13, align 1, !tbaa !57
  br label %108

107:                                              ; preds = %100
  store i8 2, ptr %13, align 1, !tbaa !57
  br label %108

108:                                              ; preds = %107, %106
  br label %109

109:                                              ; preds = %108, %99
  br label %111

110:                                              ; preds = %79
  store i8 0, ptr %13, align 1, !tbaa !57
  br label %111

111:                                              ; preds = %110, %109
  br label %118

112:                                              ; preds = %75
  %113 = load double, ptr %12, align 8, !tbaa !59
  %114 = call noundef zeroext i1 @_Z16highs_isInfinityd(double noundef %113)
  br i1 %114, label %116, label %115

115:                                              ; preds = %112
  store i8 2, ptr %13, align 1, !tbaa !57
  br label %117

116:                                              ; preds = %112
  store i8 3, ptr %13, align 1, !tbaa !57
  br label %117

117:                                              ; preds = %116, %115
  br label %118

118:                                              ; preds = %117, %111
  br label %119

119:                                              ; preds = %118, %74
  %120 = load i8, ptr %13, align 1, !tbaa !57
  %121 = icmp ne i8 %120, 4
  br i1 %121, label %122, label %123

122:                                              ; preds = %119
  br label %125

123:                                              ; preds = %119
  call void @__assert_fail(ptr noundef @.str.76, ptr noundef @.str.52, i32 noundef 721, ptr noundef @__PRETTY_FUNCTION__._Z11refineBasisRK7HighsLpRK13HighsSolutionR10HighsBasis) #6
  unreachable

124:                                              ; No predecessors!
  br label %125

125:                                              ; preds = %124, %122
  %126 = load i8, ptr %13, align 1, !tbaa !57
  %127 = load ptr, ptr %6, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.HighsBasis, ptr %127, i32 0, i32 7
  %129 = load i32, ptr %10, align 4, !tbaa !55
  %130 = sext i32 %129 to i64
  %131 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorI16HighsBasisStatusSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %128, i64 noundef %130) #7
  store i8 %126, ptr %131, align 1, !tbaa !57
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %132

132:                                              ; preds = %125, %57
  %133 = load i32, ptr %10, align 4, !tbaa !55
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %10, align 4, !tbaa !55
  br label %44, !llvm.loop !60

135:                                              ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !55
  br label %136

136:                                              ; preds = %224, %135
  %137 = load i32, ptr %14, align 4, !tbaa !55
  %138 = load i32, ptr %9, align 4, !tbaa !55
  %139 = icmp slt i32 %137, %138
  br i1 %139, label %141, label %140

140:                                              ; preds = %136
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %227

141:                                              ; preds = %136
  %142 = load ptr, ptr %6, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.HighsBasis, ptr %142, i32 0, i32 8
  %144 = load i32, ptr %14, align 4, !tbaa !55
  %145 = sext i32 %144 to i64
  %146 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorI16HighsBasisStatusSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %143, i64 noundef %145) #7
  %147 = load i8, ptr %146, align 1, !tbaa !57
  %148 = icmp ne i8 %147, 4
  br i1 %148, label %149, label %150

149:                                              ; preds = %141
  br label %224

150:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %151 = load ptr, ptr %4, align 8, !tbaa !5
  %152 = getelementptr inbounds %class.HighsLp, ptr %151, i32 0, i32 5
  %153 = load i32, ptr %14, align 4, !tbaa !55
  %154 = sext i32 %153 to i64
  %155 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %152, i64 noundef %154) #7
  %156 = load double, ptr %155, align 8, !tbaa !59
  store double %156, ptr %15, align 8, !tbaa !59
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = getelementptr inbounds %class.HighsLp, ptr %157, i32 0, i32 6
  %159 = load i32, ptr %14, align 4, !tbaa !55
  %160 = sext i32 %159 to i64
  %161 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %158, i64 noundef %160) #7
  %162 = load double, ptr %161, align 8, !tbaa !59
  store double %162, ptr %16, align 8, !tbaa !59
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #7
  store i8 4, ptr %17, align 1, !tbaa !57
  %163 = load double, ptr %15, align 8, !tbaa !59
  %164 = load double, ptr %16, align 8, !tbaa !59
  %165 = fcmp oeq double %163, %164
  br i1 %165, label %166, label %167

166:                                              ; preds = %150
  store i8 0, ptr %17, align 1, !tbaa !57
  br label %211

167:                                              ; preds = %150
  %168 = load double, ptr %15, align 8, !tbaa !59
  %169 = fneg double %168
  %170 = call noundef zeroext i1 @_Z16highs_isInfinityd(double noundef %169)
  br i1 %170, label %204, label %171

171:                                              ; preds = %167
  %172 = load double, ptr %16, align 8, !tbaa !59
  %173 = call noundef zeroext i1 @_Z16highs_isInfinityd(double noundef %172)
  br i1 %173, label %202, label %174

174:                                              ; preds = %171
  %175 = load i8, ptr %7, align 1, !tbaa !28, !range !20, !noundef !21
  %176 = trunc i8 %175 to i1
  br i1 %176, label %177, label %192

177:                                              ; preds = %174
  %178 = load ptr, ptr %5, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.HighsSolution, ptr %178, i32 0, i32 4
  %180 = load i32, ptr %14, align 4, !tbaa !55
  %181 = sext i32 %180 to i64
  %182 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %179, i64 noundef %181) #7
  %183 = load double, ptr %182, align 8, !tbaa !59
  %184 = load double, ptr %15, align 8, !tbaa !59
  %185 = load double, ptr %16, align 8, !tbaa !59
  %186 = fadd double %184, %185
  %187 = fmul double 5.000000e-01, %186
  %188 = fcmp olt double %183, %187
  br i1 %188, label %189, label %190

189:                                              ; preds = %177
  store i8 0, ptr %17, align 1, !tbaa !57
  br label %191

190:                                              ; preds = %177
  store i8 2, ptr %17, align 1, !tbaa !57
  br label %191

191:                                              ; preds = %190, %189
  br label %201

192:                                              ; preds = %174
  %193 = load double, ptr %15, align 8, !tbaa !59
  %194 = call double @llvm.fabs.f64(double %193)
  %195 = load double, ptr %16, align 8, !tbaa !59
  %196 = call double @llvm.fabs.f64(double %195)
  %197 = fcmp olt double %194, %196
  br i1 %197, label %198, label %199

198:                                              ; preds = %192
  store i8 0, ptr %17, align 1, !tbaa !57
  br label %200

199:                                              ; preds = %192
  store i8 2, ptr %17, align 1, !tbaa !57
  br label %200

200:                                              ; preds = %199, %198
  br label %201

201:                                              ; preds = %200, %191
  br label %203

202:                                              ; preds = %171
  store i8 0, ptr %17, align 1, !tbaa !57
  br label %203

203:                                              ; preds = %202, %201
  br label %210

204:                                              ; preds = %167
  %205 = load double, ptr %16, align 8, !tbaa !59
  %206 = call noundef zeroext i1 @_Z16highs_isInfinityd(double noundef %205)
  br i1 %206, label %208, label %207

207:                                              ; preds = %204
  store i8 2, ptr %17, align 1, !tbaa !57
  br label %209

208:                                              ; preds = %204
  store i8 3, ptr %17, align 1, !tbaa !57
  br label %209

209:                                              ; preds = %208, %207
  br label %210

210:                                              ; preds = %209, %203
  br label %211

211:                                              ; preds = %210, %166
  %212 = load i8, ptr %17, align 1, !tbaa !57
  %213 = icmp ne i8 %212, 4
  br i1 %213, label %214, label %215

214:                                              ; preds = %211
  br label %217

215:                                              ; preds = %211
  call void @__assert_fail(ptr noundef @.str.76, ptr noundef @.str.52, i32 noundef 755, ptr noundef @__PRETTY_FUNCTION__._Z11refineBasisRK7HighsLpRK13HighsSolutionR10HighsBasis) #6
  unreachable

216:                                              ; No predecessors!
  br label %217

217:                                              ; preds = %216, %214
  %218 = load i8, ptr %17, align 1, !tbaa !57
  %219 = load ptr, ptr %6, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.HighsBasis, ptr %219, i32 0, i32 8
  %221 = load i32, ptr %14, align 4, !tbaa !55
  %222 = sext i32 %221 to i64
  %223 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorI16HighsBasisStatusSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %220, i64 noundef %222) #7
  store i8 %218, ptr %223, align 1, !tbaa !57
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %224

224:                                              ; preds = %217, %149
  %225 = load i32, ptr %14, align 4, !tbaa !55
  %226 = add nsw i32 %225, 1
  store i32 %226, ptr %14, align 4, !tbaa !55
  br label %136, !llvm.loop !62

227:                                              ; preds = %140
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #7
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z16isBasisRightSizeRK7HighsLpRK10HighsBasis(ptr noundef nonnull align 8 dereferenceable(920), ptr noundef nonnull align 8 dereferenceable(96)) #2

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

declare noundef zeroext i1 @_Z16highs_isInfinityd(double noundef) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "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 = { noreturn nounwind }
attributes #7 = { 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, !11, i64 2}
!10 = !{!"_ZTS10HighsBasis", !11, i64 0, !11, i64 1, !11, i64 2, !11, i64 3, !12, i64 4, !12, i64 8, !13, i64 16, !16, i64 48, !16, i64 72}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !14, i64 0, !15, i64 8, !7, i64 16}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!"_ZTSSt6vectorI16HighsBasisStatusSaIS0_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseI16HighsBasisStatusSaIS0_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseI16HighsBasisStatusSaIS0_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseI16HighsBasisStatusSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = !{!23, !11, i64 0}
!23 = !{!"_ZTS13HighsSolution", !11, i64 0, !11, i64 1, !24, i64 8, !24, i64 32, !24, i64 56, !24, i64 80}
!24 = !{!"_ZTSSt6vectorIdSaIdEE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!28 = !{!11, !11, i64 0}
!29 = !{!30, !12, i64 0}
!30 = !{!"_ZTS7HighsLp", !12, i64 0, !12, i64 4, !24, i64 8, !24, i64 32, !24, i64 56, !24, i64 80, !24, i64 104, !31, i64 128, !37, i64 240, !38, i64 248, !13, i64 256, !13, i64 288, !12, i64 320, !12, i64 324, !39, i64 328, !39, i64 352, !43, i64 376, !47, i64 400, !47, i64 456, !12, i64 512, !12, i64 516, !53, i64 520, !11, i64 592, !11, i64 593, !12, i64 596, !11, i64 600, !54, i64 608}
!31 = !{!"_ZTS17HighsSparseMatrix", !32, i64 0, !12, i64 4, !12, i64 8, !33, i64 16, !33, i64 40, !33, i64 64, !24, i64 88}
!32 = !{!"_ZTS12MatrixFormat", !7, i64 0}
!33 = !{!"_ZTSSt6vectorIiSaIiEE", !34, i64 0}
!34 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!37 = !{!"_ZTS8ObjSense", !7, i64 0}
!38 = !{!"double", !7, i64 0}
!39 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !40, i64 0}
!40 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !41, i64 0}
!41 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !42, i64 0}
!42 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!43 = !{!"_ZTSSt6vectorI12HighsVarTypeSaIS0_EE", !44, i64 0}
!44 = !{!"_ZTSSt12_Vector_baseI12HighsVarTypeSaIS0_EE", !45, i64 0}
!45 = !{!"_ZTSNSt12_Vector_baseI12HighsVarTypeSaIS0_EE12_Vector_implE", !46, i64 0}
!46 = !{!"_ZTSNSt12_Vector_baseI12HighsVarTypeSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!47 = !{!"_ZTS13HighsNameHash", !48, i64 0}
!48 = !{!"_ZTSSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEE", !49, i64 0}
!49 = !{!"_ZTSSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_iESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEE", !6, i64 0, !15, i64 8, !50, i64 16, !15, i64 24, !51, i64 32, !6, i64 48}
!50 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!51 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !52, i64 0, !15, i64 8}
!52 = !{!"float", !7, i64 0}
!53 = !{!"_ZTS10HighsScale", !12, i64 0, !11, i64 4, !12, i64 8, !12, i64 12, !38, i64 16, !24, i64 24, !24, i64 48}
!54 = !{!"_ZTS11HighsLpMods", !33, i64 0, !33, i64 24, !24, i64 48, !24, i64 72, !43, i64 96, !33, i64 120, !24, i64 144, !33, i64 168, !24, i64 192, !33, i64 216, !24, i64 240, !24, i64 264, !24, i64 288}
!55 = !{!12, !12, i64 0}
!56 = !{!30, !12, i64 4}
!57 = !{!58, !58, i64 0}
!58 = !{!"_ZTS16HighsBasisStatus", !7, i64 0}
!59 = !{!38, !38, i64 0}
!60 = distinct !{!60, !61}
!61 = !{!"llvm.loop.mustprogress"}
!62 = distinct !{!62, !61}


; 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"

@.str.52 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.74 = external hidden unnamed_addr constant [13 x i8], align 1
@__PRETTY_FUNCTION__._Z11refineBasisRK7HighsLpRK13HighsSolutionR10HighsBasis = external hidden unnamed_addr constant [71 x i8], align 1
@.str.75 = external hidden unnamed_addr constant [28 x i8], align 1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z11refineBasisRK7HighsLpRK13HighsSolutionR10HighsBasis(ptr noundef nonnull align 8 dereferenceable(920) %0, ptr noundef nonnull align 8 dereferenceable(104) %1, ptr noundef nonnull align 8 dereferenceable(96) %2) local_unnamed_addr #3 {
  %4 = getelementptr inbounds i8, ptr %2, i64 2
  %5 = load i8, ptr %4, align 2, !tbaa !5, !range !19, !noundef !20
  %6 = trunc nuw i8 %5 to i1
  br i1 %6, label %8, label %7

7:                                                ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str.74, ptr noundef nonnull @.str.52, i32 noundef 685, ptr noundef nonnull @__PRETTY_FUNCTION__._Z11refineBasisRK7HighsLpRK13HighsSolutionR10HighsBasis) #5
  unreachable

8:                                                ; preds = %3
  %9 = tail call noundef zeroext i1 @_Z16isBasisRightSizeRK7HighsLpRK10HighsBasis(ptr noundef nonnull align 8 dereferenceable(920) %0, ptr noundef nonnull align 8 dereferenceable(96) %2)
  br i1 %9, label %11, label %10

10:                                               ; preds = %8
  tail call void @__assert_fail(ptr noundef nonnull @.str.75, ptr noundef nonnull @.str.52, i32 noundef 686, ptr noundef nonnull @__PRETTY_FUNCTION__._Z11refineBasisRK7HighsLpRK13HighsSolutionR10HighsBasis) #5
  unreachable

11:                                               ; preds = %8
  %12 = load i8, ptr %1, align 8, !tbaa !21, !range !19, !noundef !20
  %13 = trunc nuw i8 %12 to i1
  %14 = load i32, ptr %0, align 8, !tbaa !27
  %15 = getelementptr inbounds i8, ptr %0, i64 4
  %16 = load i32, ptr %15, align 4, !tbaa !53
  %17 = icmp sgt i32 %14, 0
  br i1 %17, label %.lr.ph, label %.preheader

.lr.ph:                                           ; preds = %11
  %18 = getelementptr inbounds i8, ptr %2, i64 48
  %19 = getelementptr inbounds i8, ptr %0, i64 32
  %20 = getelementptr inbounds i8, ptr %0, i64 56
  %21 = getelementptr inbounds i8, ptr %1, i64 8
  %wide.trip.count78 = zext nneg i32 %14 to i64
  br i1 %13, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %44
  %indvars.iv75 = phi i64 [ %indvars.iv.next76, %44 ], [ 0, %.lr.ph ]
  %22 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorI16HighsBasisStatusSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %indvars.iv75) #6
  %23 = load i8, ptr %22, align 1, !tbaa !54
  %.not62.us = icmp eq i8 %23, 4
  br i1 %.not62.us, label %24, label %44

24:                                               ; preds = %.lr.ph.split.us
  %25 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %indvars.iv75) #6
  %26 = load double, ptr %25, align 8, !tbaa !56
  %27 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %indvars.iv75) #6
  %28 = load double, ptr %27, align 8, !tbaa !56
  %29 = fcmp oeq double %26, %28
  br i1 %29, label %42, label %30

30:                                               ; preds = %24
  %31 = fneg double %26
  %32 = tail call noundef zeroext i1 @_Z16highs_isInfinityd(double noundef %31)
  %33 = tail call noundef zeroext i1 @_Z16highs_isInfinityd(double noundef %28)
  br i1 %32, label %41, label %34

34:                                               ; preds = %30
  br i1 %33, label %42, label %35

35:                                               ; preds = %34
  %36 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %indvars.iv75) #6
  %37 = load double, ptr %36, align 8, !tbaa !56
  %38 = fadd double %26, %28
  %39 = fmul double %38, 5.000000e-01
  %40 = fcmp olt double %37, %39
  %..us = select i1 %40, i8 0, i8 2
  br label %42

41:                                               ; preds = %30
  %.64.us = select i1 %33, i8 3, i8 2
  br label %42

42:                                               ; preds = %41, %35, %34, %24
  %.056.us = phi i8 [ 0, %24 ], [ %..us, %35 ], [ 0, %34 ], [ %.64.us, %41 ]
  %43 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorI16HighsBasisStatusSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %indvars.iv75) #6
  store i8 %.056.us, ptr %43, align 1, !tbaa !54
  br label %44

44:                                               ; preds = %42, %.lr.ph.split.us
  %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1
  %exitcond79.not = icmp eq i64 %indvars.iv.next76, %wide.trip.count78
  br i1 %exitcond79.not, label %.preheader, label %.lr.ph.split.us, !llvm.loop !57

.preheader:                                       ; preds = %93, %44, %11
  %45 = icmp sgt i32 %16, 0
  br i1 %45, label %.lr.ph70, label %._crit_edge

.lr.ph70:                                         ; preds = %.preheader
  %46 = getelementptr inbounds i8, ptr %2, i64 72
  %47 = getelementptr inbounds i8, ptr %0, i64 80
  %48 = getelementptr inbounds i8, ptr %0, i64 104
  %49 = getelementptr inbounds i8, ptr %1, i64 56
  %wide.trip.count88 = zext nneg i32 %16 to i64
  br i1 %13, label %.lr.ph70.split.us, label %.lr.ph70.split

.lr.ph70.split.us:                                ; preds = %.lr.ph70, %72
  %indvars.iv85 = phi i64 [ %indvars.iv.next86, %72 ], [ 0, %.lr.ph70 ]
  %50 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorI16HighsBasisStatusSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %46, i64 noundef %indvars.iv85) #6
  %51 = load i8, ptr %50, align 1, !tbaa !54
  %.not.us = icmp eq i8 %51, 4
  br i1 %.not.us, label %52, label %72

52:                                               ; preds = %.lr.ph70.split.us
  %53 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef %indvars.iv85) #6
  %54 = load double, ptr %53, align 8, !tbaa !56
  %55 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef %indvars.iv85) #6
  %56 = load double, ptr %55, align 8, !tbaa !56
  %57 = fcmp oeq double %54, %56
  br i1 %57, label %70, label %58

58:                                               ; preds = %52
  %59 = fneg double %54
  %60 = tail call noundef zeroext i1 @_Z16highs_isInfinityd(double noundef %59)
  %61 = tail call noundef zeroext i1 @_Z16highs_isInfinityd(double noundef %56)
  br i1 %60, label %69, label %62

62:                                               ; preds = %58
  br i1 %61, label %70, label %63

63:                                               ; preds = %62
  %64 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef %indvars.iv85) #6
  %65 = load double, ptr %64, align 8, !tbaa !56
  %66 = fadd double %54, %56
  %67 = fmul double %66, 5.000000e-01
  %68 = fcmp olt double %65, %67
  %.65.us = select i1 %68, i8 0, i8 2
  br label %70

69:                                               ; preds = %58
  %.67.us = select i1 %61, i8 3, i8 2
  br label %70

70:                                               ; preds = %69, %63, %62, %52
  %.0.us = phi i8 [ 0, %52 ], [ %.65.us, %63 ], [ 0, %62 ], [ %.67.us, %69 ]
  %71 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorI16HighsBasisStatusSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %46, i64 noundef %indvars.iv85) #6
  store i8 %.0.us, ptr %71, align 1, !tbaa !54
  br label %72

72:                                               ; preds = %70, %.lr.ph70.split.us
  %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1
  %exitcond89.not = icmp eq i64 %indvars.iv.next86, %wide.trip.count88
  br i1 %exitcond89.not, label %._crit_edge, label %.lr.ph70.split.us, !llvm.loop !59

.lr.ph.split:                                     ; preds = %.lr.ph, %93
  %indvars.iv = phi i64 [ %indvars.iv.next, %93 ], [ 0, %.lr.ph ]
  %73 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorI16HighsBasisStatusSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %indvars.iv) #6
  %74 = load i8, ptr %73, align 1, !tbaa !54
  %.not62 = icmp eq i8 %74, 4
  br i1 %.not62, label %75, label %93

75:                                               ; preds = %.lr.ph.split
  %76 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %indvars.iv) #6
  %77 = load double, ptr %76, align 8, !tbaa !56
  %78 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %indvars.iv) #6
  %79 = load double, ptr %78, align 8, !tbaa !56
  %80 = fcmp oeq double %77, %79
  br i1 %80, label %91, label %81

81:                                               ; preds = %75
  %82 = fneg double %77
  %83 = tail call noundef zeroext i1 @_Z16highs_isInfinityd(double noundef %82)
  %84 = tail call noundef zeroext i1 @_Z16highs_isInfinityd(double noundef %79)
  br i1 %83, label %90, label %85

85:                                               ; preds = %81
  br i1 %84, label %91, label %86

86:                                               ; preds = %85
  %87 = tail call double @llvm.fabs.f64(double %77)
  %88 = tail call double @llvm.fabs.f64(double %79)
  %89 = fcmp olt double %87, %88
  %.63 = select i1 %89, i8 0, i8 2
  br label %91

90:                                               ; preds = %81
  %.64 = select i1 %84, i8 3, i8 2
  br label %91

91:                                               ; preds = %75, %86, %85, %90
  %.056 = phi i8 [ 0, %75 ], [ %.63, %86 ], [ 0, %85 ], [ %.64, %90 ]
  %92 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorI16HighsBasisStatusSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %indvars.iv) #6
  store i8 %.056, ptr %92, align 1, !tbaa !54
  br label %93

93:                                               ; preds = %.lr.ph.split, %91
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count78
  br i1 %exitcond.not, label %.preheader, label %.lr.ph.split, !llvm.loop !57

._crit_edge:                                      ; preds = %114, %72, %.preheader
  ret void

.lr.ph70.split:                                   ; preds = %.lr.ph70, %114
  %indvars.iv80 = phi i64 [ %indvars.iv.next81, %114 ], [ 0, %.lr.ph70 ]
  %94 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorI16HighsBasisStatusSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %46, i64 noundef %indvars.iv80) #6
  %95 = load i8, ptr %94, align 1, !tbaa !54
  %.not = icmp eq i8 %95, 4
  br i1 %.not, label %96, label %114

96:                                               ; preds = %.lr.ph70.split
  %97 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef %indvars.iv80) #6
  %98 = load double, ptr %97, align 8, !tbaa !56
  %99 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef %indvars.iv80) #6
  %100 = load double, ptr %99, align 8, !tbaa !56
  %101 = fcmp oeq double %98, %100
  br i1 %101, label %112, label %102

102:                                              ; preds = %96
  %103 = fneg double %98
  %104 = tail call noundef zeroext i1 @_Z16highs_isInfinityd(double noundef %103)
  %105 = tail call noundef zeroext i1 @_Z16highs_isInfinityd(double noundef %100)
  br i1 %104, label %111, label %106

106:                                              ; preds = %102
  br i1 %105, label %112, label %107

107:                                              ; preds = %106
  %108 = tail call double @llvm.fabs.f64(double %98)
  %109 = tail call double @llvm.fabs.f64(double %100)
  %110 = fcmp olt double %108, %109
  %.66 = select i1 %110, i8 0, i8 2
  br label %112

111:                                              ; preds = %102
  %.67 = select i1 %105, i8 3, i8 2
  br label %112

112:                                              ; preds = %96, %107, %106, %111
  %.0 = phi i8 [ 0, %96 ], [ %.66, %107 ], [ 0, %106 ], [ %.67, %111 ]
  %113 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorI16HighsBasisStatusSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %46, i64 noundef %indvars.iv80) #6
  store i8 %.0, ptr %113, align 1, !tbaa !54
  br label %114

114:                                              ; preds = %.lr.ph70.split, %112
  %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1
  %exitcond84.not = icmp eq i64 %indvars.iv.next81, %wide.trip.count88
  br i1 %exitcond84.not, label %._crit_edge, label %.lr.ph70.split, !llvm.loop !59
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z16isBasisRightSizeRK7HighsLpRK10HighsBasis(ptr noundef nonnull align 8 dereferenceable(920), ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #1

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

declare noundef zeroext i1 @_Z16highs_isInfinityd(double noundef) local_unnamed_addr #4

attributes #0 = { 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 #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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { noreturn nounwind }
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, !7, i64 2}
!6 = !{!"_ZTS10HighsBasis", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !10, i64 4, !10, i64 8, !11, i64 16, !15, i64 48, !15, i64 72}
!7 = !{!"bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !12, i64 0, !14, i64 8, !8, i64 16}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !13, i64 0}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!"long", !8, i64 0}
!15 = !{!"_ZTSSt6vectorI16HighsBasisStatusSaIS0_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseI16HighsBasisStatusSaIS0_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseI16HighsBasisStatusSaIS0_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseI16HighsBasisStatusSaIS0_EE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!22, !7, i64 0}
!22 = !{!"_ZTS13HighsSolution", !7, i64 0, !7, i64 1, !23, i64 8, !23, i64 32, !23, i64 56, !23, i64 80}
!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", !13, i64 0, !13, i64 8, !13, i64 16}
!27 = !{!28, !10, i64 0}
!28 = !{!"_ZTS7HighsLp", !10, i64 0, !10, i64 4, !23, i64 8, !23, i64 32, !23, i64 56, !23, i64 80, !23, i64 104, !29, i64 128, !35, i64 240, !36, i64 248, !11, i64 256, !11, i64 288, !10, i64 320, !10, i64 324, !37, i64 328, !37, i64 352, !41, i64 376, !45, i64 400, !45, i64 456, !10, i64 512, !10, i64 516, !51, i64 520, !7, i64 592, !7, i64 593, !10, i64 596, !7, i64 600, !52, i64 608}
!29 = !{!"_ZTS17HighsSparseMatrix", !30, i64 0, !10, i64 4, !10, i64 8, !31, i64 16, !31, i64 40, !31, i64 64, !23, i64 88}
!30 = !{!"_ZTS12MatrixFormat", !8, i64 0}
!31 = !{!"_ZTSSt6vectorIiSaIiEE", !32, i64 0}
!32 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!35 = !{!"_ZTS8ObjSense", !8, i64 0}
!36 = !{!"double", !8, i64 0}
!37 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !38, i64 0}
!38 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!41 = !{!"_ZTSSt6vectorI12HighsVarTypeSaIS0_EE", !42, i64 0}
!42 = !{!"_ZTSSt12_Vector_baseI12HighsVarTypeSaIS0_EE", !43, i64 0}
!43 = !{!"_ZTSNSt12_Vector_baseI12HighsVarTypeSaIS0_EE12_Vector_implE", !44, i64 0}
!44 = !{!"_ZTSNSt12_Vector_baseI12HighsVarTypeSaIS0_EE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!45 = !{!"_ZTS13HighsNameHash", !46, i64 0}
!46 = !{!"_ZTSSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEE", !47, i64 0}
!47 = !{!"_ZTSSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_iESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEE", !13, i64 0, !14, i64 8, !48, i64 16, !14, i64 24, !49, i64 32, !13, i64 48}
!48 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !13, i64 0}
!49 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !50, i64 0, !14, i64 8}
!50 = !{!"float", !8, i64 0}
!51 = !{!"_ZTS10HighsScale", !10, i64 0, !7, i64 4, !10, i64 8, !10, i64 12, !36, i64 16, !23, i64 24, !23, i64 48}
!52 = !{!"_ZTS11HighsLpMods", !31, i64 0, !31, i64 24, !23, i64 48, !23, i64 72, !41, i64 96, !31, i64 120, !23, i64 144, !31, i64 168, !23, i64 192, !31, i64 216, !23, i64 240, !23, i64 264, !23, i64 288}
!53 = !{!28, !10, i64 4}
!54 = !{!55, !55, i64 0}
!55 = !{!"_ZTS16HighsBasisStatus", !8, i64 0}
!56 = !{!36, !36, i64 0}
!57 = distinct !{!57, !58}
!58 = !{!"llvm.loop.mustprogress"}
!59 = distinct !{!59, !58}


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