; LLVM IR from ERGO-Code/HiGHS :: src/simplex/HSimplex.ll (Z25appendNonbasicColsToBasisR7HighsLpR10HighsBasisi)

; 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.8", %"class.std::vector.8" }
%"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.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = 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 }
%class.HighsLp = type { i32, i32, %"class.std::vector.13", %"class.std::vector.13", %"class.std::vector.13", %"class.std::vector.13", %"class.std::vector.13", %class.HighsSparseMatrix, i32, double, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i32, i32, %"class.std::vector.18", %"class.std::vector.18", %"class.std::vector.23", %struct.HighsNameHash, %struct.HighsNameHash, i32, i32, %struct.HighsScale, i8, i8, i32, i8, %struct.HighsLpMods }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = 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.HighsSparseMatrix = type { i32, i32, i32, %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector.13" }
%"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::vector.18" = type { %"struct.std::_Vector_base.19" }
%"struct.std::_Vector_base.19" = 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.23" = type { %"struct.std::_Vector_base.24" }
%"struct.std::_Vector_base.24" = 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.13", %"class.std::vector.13" }
%struct.HighsLpMods = type { %"class.std::vector", %"class.std::vector", %"class.std::vector.13", %"class.std::vector.13", %"class.std::vector.23", %"class.std::vector", %"class.std::vector.13", %"class.std::vector", %"class.std::vector.13", %"class.std::vector", %"class.std::vector.13", %"class.std::vector.13", %"class.std::vector.13" }

@.str.52 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [74 x i8], align 1
@__PRETTY_FUNCTION__._Z25appendNonbasicColsToBasisR7HighsLpR10HighsBasisi = external hidden unnamed_addr constant [66 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [42 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: mustprogress uwtable
define dso_local void @_Z25appendNonbasicColsToBasisR7HighsLpR10HighsBasisi(ptr noundef nonnull align 8 dereferenceable(920) %0, ptr noundef nonnull align 8 dereferenceable(96) %1, i32 noundef %2) #1 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  %9 = load ptr, ptr %5, align 8, !tbaa !5
  %10 = getelementptr inbounds %struct.HighsBasis, ptr %9, i32 0, i32 0
  %11 = load i8, ptr %10, align 8, !tbaa !11, !range !21, !noundef !22
  %12 = trunc i8 %11 to i1
  br i1 %12, label %13, label %14

13:                                               ; preds = %3
  br label %16

14:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str.52, ptr noundef @.str.53, i32 noundef 48, ptr noundef @__PRETTY_FUNCTION__._Z25appendNonbasicColsToBasisR7HighsLpR10HighsBasisi) #5
  unreachable

15:                                               ; No predecessors!
  br label %16

16:                                               ; preds = %15, %13
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.HighsBasis, ptr %17, i32 0, i32 0
  %19 = load i8, ptr %18, align 8, !tbaa !11, !range !21, !noundef !22
  %20 = trunc i8 %19 to i1
  br i1 %20, label %23, label %21

21:                                               ; preds = %16
  %22 = call i32 (ptr, ...) @printf(ptr noundef @.str.54)
  br label %23

23:                                               ; preds = %21, %16
  %24 = load i32, ptr %6, align 4, !tbaa !9
  %25 = icmp eq i32 %24, 0
  br i1 %25, label %26, label %27

26:                                               ; preds = %23
  br label %86

27:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = getelementptr inbounds %class.HighsLp, ptr %28, i32 0, i32 0
  %30 = load i32, ptr %29, align 8, !tbaa !23
  %31 = load i32, ptr %6, align 4, !tbaa !9
  %32 = add nsw i32 %30, %31
  store i32 %32, ptr %7, align 4, !tbaa !9
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.HighsBasis, ptr %33, i32 0, i32 7
  %35 = load i32, ptr %7, align 4, !tbaa !9
  %36 = sext i32 %35 to i64
  call void @_ZNSt6vectorI16HighsBasisStatusSaIS0_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %34, i64 noundef %36)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = getelementptr inbounds %class.HighsLp, ptr %37, i32 0, i32 0
  %39 = load i32, ptr %38, align 8, !tbaa !23
  store i32 %39, ptr %8, align 4, !tbaa !9
  br label %40

40:                                               ; preds = %82, %27
  %41 = load i32, ptr %8, align 4, !tbaa !9
  %42 = load i32, ptr %7, align 4, !tbaa !9
  %43 = icmp slt i32 %41, %42
  br i1 %43, label %45, label %44

44:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %85

45:                                               ; preds = %40
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = getelementptr inbounds %class.HighsLp, ptr %46, i32 0, i32 3
  %48 = load i32, ptr %8, align 4, !tbaa !9
  %49 = sext i32 %48 to i64
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef %49) #6
  %51 = load double, ptr %50, align 8, !tbaa !53
  %52 = fneg double %51
  %53 = call noundef zeroext i1 @_Z16highs_isInfinityd(double noundef %52)
  br i1 %53, label %60, label %54

54:                                               ; preds = %45
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.HighsBasis, ptr %55, i32 0, i32 7
  %57 = load i32, ptr %8, align 4, !tbaa !9
  %58 = sext i32 %57 to i64
  %59 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorI16HighsBasisStatusSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %56, i64 noundef %58) #6
  store i8 0, ptr %59, align 1, !tbaa !54
  br label %81

60:                                               ; preds = %45
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds %class.HighsLp, ptr %61, i32 0, i32 4
  %63 = load i32, ptr %8, align 4, !tbaa !9
  %64 = sext i32 %63 to i64
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %62, i64 noundef %64) #6
  %66 = load double, ptr %65, align 8, !tbaa !53
  %67 = call noundef zeroext i1 @_Z16highs_isInfinityd(double noundef %66)
  br i1 %67, label %74, label %68

68:                                               ; preds = %60
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.HighsBasis, ptr %69, i32 0, i32 7
  %71 = load i32, ptr %8, align 4, !tbaa !9
  %72 = sext i32 %71 to i64
  %73 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorI16HighsBasisStatusSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %70, i64 noundef %72) #6
  store i8 2, ptr %73, align 1, !tbaa !54
  br label %80

74:                                               ; preds = %60
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.HighsBasis, ptr %75, i32 0, i32 7
  %77 = load i32, ptr %8, align 4, !tbaa !9
  %78 = sext i32 %77 to i64
  %79 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorI16HighsBasisStatusSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %76, i64 noundef %78) #6
  store i8 3, ptr %79, align 1, !tbaa !54
  br label %80

80:                                               ; preds = %74, %68
  br label %81

81:                                               ; preds = %80, %54
  br label %82

82:                                               ; preds = %81
  %83 = load i32, ptr %8, align 4, !tbaa !9
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %8, align 4, !tbaa !9
  br label %40, !llvm.loop !56

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

86:                                               ; preds = %85, %26
  ret void
}

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

declare i32 @printf(ptr noundef, ...) #3

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #4 align 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) #4 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #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 = { 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 #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, !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 = !{!"int", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTS10HighsBasis", !13, i64 0, !13, i64 1, !13, i64 2, !13, i64 3, !10, i64 4, !10, i64 8, !14, i64 16, !17, i64 48, !17, i64 72}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !15, i64 0, !16, i64 8, !7, i64 16}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!"_ZTSSt6vectorI16HighsBasisStatusSaIS0_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseI16HighsBasisStatusSaIS0_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseI16HighsBasisStatusSaIS0_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseI16HighsBasisStatusSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = !{!24, !10, i64 0}
!24 = !{!"_ZTS7HighsLp", !10, i64 0, !10, i64 4, !25, i64 8, !25, i64 32, !25, i64 56, !25, i64 80, !25, i64 104, !29, i64 128, !35, i64 240, !36, i64 248, !14, i64 256, !14, 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, !13, i64 592, !13, i64 593, !10, i64 596, !13, i64 600, !52, i64 608}
!25 = !{!"_ZTSSt6vectorIdSaIdEE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!29 = !{!"_ZTS17HighsSparseMatrix", !30, i64 0, !10, i64 4, !10, i64 8, !31, i64 16, !31, i64 40, !31, i64 64, !25, i64 88}
!30 = !{!"_ZTS12MatrixFormat", !7, 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", !6, i64 0, !6, i64 8, !6, i64 16}
!35 = !{!"_ZTS8ObjSense", !7, i64 0}
!36 = !{!"double", !7, 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", !6, i64 0, !6, i64 8, !6, 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", !6, i64 0, !6, i64 8, !6, 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", !6, i64 0, !16, i64 8, !48, i64 16, !16, i64 24, !49, i64 32, !6, i64 48}
!48 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!49 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !50, i64 0, !16, i64 8}
!50 = !{!"float", !7, i64 0}
!51 = !{!"_ZTS10HighsScale", !10, i64 0, !13, i64 4, !10, i64 8, !10, i64 12, !36, i64 16, !25, i64 24, !25, i64 48}
!52 = !{!"_ZTS11HighsLpMods", !31, i64 0, !31, i64 24, !25, i64 48, !25, i64 72, !41, i64 96, !31, i64 120, !25, i64 144, !31, i64 168, !25, i64 192, !31, i64 216, !25, i64 240, !25, i64 264, !25, i64 288}
!53 = !{!36, !36, i64 0}
!54 = !{!55, !55, i64 0}
!55 = !{!"_ZTS16HighsBasisStatus", !7, i64 0}
!56 = distinct !{!56, !57}
!57 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str.52 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [74 x i8], align 1
@__PRETTY_FUNCTION__._Z25appendNonbasicColsToBasisR7HighsLpR10HighsBasisi = external hidden unnamed_addr constant [66 x i8], align 1

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

6:                                                ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str.52, ptr noundef nonnull @.str.53, i32 noundef 48, ptr noundef nonnull @__PRETTY_FUNCTION__._Z25appendNonbasicColsToBasisR7HighsLpR10HighsBasisi) #4
  unreachable

7:                                                ; preds = %3
  %8 = icmp eq i32 %2, 0
  br i1 %8, label %.loopexit, label %9

9:                                                ; preds = %7
  %10 = load i32, ptr %0, align 8, !tbaa !21
  %11 = add nsw i32 %10, %2
  %12 = getelementptr inbounds i8, ptr %1, i64 48
  %13 = sext i32 %11 to i64
  tail call void @_ZNSt6vectorI16HighsBasisStatusSaIS0_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %13)
  %14 = load i32, ptr %0, align 8, !tbaa !21
  %15 = icmp slt i32 %14, %11
  br i1 %15, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %9
  %16 = getelementptr inbounds i8, ptr %0, i64 32
  %17 = getelementptr inbounds i8, ptr %0, i64 56
  %18 = sext i32 %14 to i64
  br label %19

19:                                               ; preds = %.lr.ph, %33
  %indvars.iv = phi i64 [ %18, %.lr.ph ], [ %indvars.iv.next, %33 ]
  %20 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %indvars.iv) #5
  %21 = load double, ptr %20, align 8, !tbaa !51
  %22 = fneg double %21
  %23 = tail call noundef zeroext i1 @_Z16highs_isInfinityd(double noundef %22)
  br i1 %23, label %26, label %24

24:                                               ; preds = %19
  %25 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorI16HighsBasisStatusSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %indvars.iv) #5
  store i8 0, ptr %25, align 1, !tbaa !52
  br label %33

26:                                               ; preds = %19
  %27 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %indvars.iv) #5
  %28 = load double, ptr %27, align 8, !tbaa !51
  %29 = tail call noundef zeroext i1 @_Z16highs_isInfinityd(double noundef %28)
  %30 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorI16HighsBasisStatusSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %indvars.iv) #5
  br i1 %29, label %32, label %31

31:                                               ; preds = %26
  store i8 2, ptr %30, align 1, !tbaa !52
  br label %33

32:                                               ; preds = %26
  store i8 3, ptr %30, align 1, !tbaa !52
  br label %33

33:                                               ; preds = %24, %32, %31
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next to i32
  %exitcond.not = icmp eq i32 %11, %lftr.wideiv
  br i1 %exitcond.not, label %.loopexit, label %19, !llvm.loop !54

.loopexit:                                        ; preds = %33, %9, %7
  ret void
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI16HighsBasisStatusSaIS0_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 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) local_unnamed_addr #3 align 2

attributes #0 = { 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 #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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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 #4 = { noreturn nounwind }
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, !7, i64 0}
!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, !10, i64 0}
!22 = !{!"_ZTS7HighsLp", !10, i64 0, !10, i64 4, !23, i64 8, !23, i64 32, !23, i64 56, !23, i64 80, !23, i64 104, !27, i64 128, !33, i64 240, !34, i64 248, !11, i64 256, !11, i64 288, !10, i64 320, !10, i64 324, !35, i64 328, !35, i64 352, !39, i64 376, !43, i64 400, !43, i64 456, !10, i64 512, !10, i64 516, !49, i64 520, !7, i64 592, !7, i64 593, !10, i64 596, !7, i64 600, !50, i64 608}
!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 = !{!"_ZTS17HighsSparseMatrix", !28, i64 0, !10, i64 4, !10, i64 8, !29, i64 16, !29, i64 40, !29, i64 64, !23, i64 88}
!28 = !{!"_ZTS12MatrixFormat", !8, i64 0}
!29 = !{!"_ZTSSt6vectorIiSaIiEE", !30, i64 0}
!30 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!33 = !{!"_ZTS8ObjSense", !8, i64 0}
!34 = !{!"double", !8, i64 0}
!35 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !36, i64 0}
!36 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !38, i64 0}
!38 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!39 = !{!"_ZTSSt6vectorI12HighsVarTypeSaIS0_EE", !40, i64 0}
!40 = !{!"_ZTSSt12_Vector_baseI12HighsVarTypeSaIS0_EE", !41, i64 0}
!41 = !{!"_ZTSNSt12_Vector_baseI12HighsVarTypeSaIS0_EE12_Vector_implE", !42, i64 0}
!42 = !{!"_ZTSNSt12_Vector_baseI12HighsVarTypeSaIS0_EE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!43 = !{!"_ZTS13HighsNameHash", !44, i64 0}
!44 = !{!"_ZTSSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEE", !45, i64 0}
!45 = !{!"_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, !46, i64 16, !14, i64 24, !47, i64 32, !13, i64 48}
!46 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !13, i64 0}
!47 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !48, i64 0, !14, i64 8}
!48 = !{!"float", !8, i64 0}
!49 = !{!"_ZTS10HighsScale", !10, i64 0, !7, i64 4, !10, i64 8, !10, i64 12, !34, i64 16, !23, i64 24, !23, i64 48}
!50 = !{!"_ZTS11HighsLpMods", !29, i64 0, !29, i64 24, !23, i64 48, !23, i64 72, !39, i64 96, !29, i64 120, !23, i64 144, !29, i64 168, !23, i64 192, !29, i64 216, !23, i64 240, !23, i64 264, !23, i64 288}
!51 = !{!34, !34, i64 0}
!52 = !{!53, !53, i64 0}
!53 = !{!"_ZTS16HighsBasisStatus", !8, i64 0}
!54 = distinct !{!54, !55}
!55 = !{!"llvm.loop.mustprogress"}


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