; LLVM IR from ERGO-Code/HiGHS :: src/util (HighsSparseMatrix)

; 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.HVectorBase = type { i32, i32, %"class.std::vector", %"class.std::vector.3", double, %"class.std::vector.13", %"class.std::vector", ptr, i8, i32, %"class.std::vector", %"class.std::vector.3" }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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.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.HighsSparseMatrix = type { i32, i32, i32, %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector.3" }

@.str.52 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.109 = external hidden unnamed_addr constant [18 x i8], align 1
@__PRETTY_FUNCTION__._ZNK17HighsSparseMatrix21priceByRowDenseResultERSt6vectorIdSaIdEERK11HVectorBaseIdEii = external hidden unnamed_addr constant [124 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 zeroext i1 @_ZNK17HighsSparseMatrix9isRowwiseEv(ptr noundef nonnull align 8 dereferenceable(112)) #2 align 2

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

; 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 nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(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.fmuladd.f64(double, double, double) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK17HighsSparseMatrix19debugReportRowPriceEidiRKSt6vectorIdSaIdEE(ptr noundef nonnull align 8 dereferenceable(112), i32 noundef, double noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK17HighsSparseMatrix21priceByRowDenseResultERSt6vectorIdSaIdEERK11HVectorBaseIdEii(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(176) %2, i32 noundef %3, i32 noundef %4) #4 align 2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca double, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !9
  store i32 %4, ptr %10, align 4, !tbaa !9
  %20 = load ptr, ptr %6, align 8
  %21 = call noundef zeroext i1 @_ZNK17HighsSparseMatrix9isRowwiseEv(ptr noundef nonnull align 8 dereferenceable(112) %20)
  br i1 %21, label %22, label %23

22:                                               ; preds = %5
  br label %25

23:                                               ; preds = %5
  call void @__assert_fail(ptr noundef @.str.109, ptr noundef @.str.52, i32 noundef 1631, ptr noundef @__PRETTY_FUNCTION__._ZNK17HighsSparseMatrix21priceByRowDenseResultERSt6vectorIdSaIdEERK11HVectorBaseIdEii) #5
  unreachable

24:                                               ; No predecessors!
  br label %25

25:                                               ; preds = %24, %22
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %26 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %26, ptr %11, align 4, !tbaa !9
  br label %27

27:                                               ; preds = %121, %25
  %28 = load i32, ptr %11, align 4, !tbaa !9
  %29 = load ptr, ptr %8, align 8, !tbaa !5
  %30 = getelementptr inbounds %class.HVectorBase, ptr %29, i32 0, i32 1
  %31 = load i32, ptr %30, align 4, !tbaa !11
  %32 = icmp slt i32 %28, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %27
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %124

34:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  %36 = getelementptr inbounds %class.HVectorBase, ptr %35, i32 0, i32 2
  %37 = load i32, ptr %11, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %36, i64 noundef %38) #6
  %40 = load i32, ptr %39, align 4, !tbaa !9
  store i32 %40, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  %42 = getelementptr inbounds %class.HVectorBase, ptr %41, i32 0, i32 3
  %43 = load i32, ptr %13, align 4, !tbaa !9
  %44 = sext i32 %43 to i64
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %42, i64 noundef %44) #6
  %46 = load double, ptr %45, align 8, !tbaa !27
  store double %46, ptr %14, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %47 = getelementptr inbounds %class.HighsSparseMatrix, ptr %20, i32 0, i32 0
  %48 = load i32, ptr %47, align 8, !tbaa !28
  %49 = icmp eq i32 %48, 3
  br i1 %49, label %50, label %56

50:                                               ; preds = %34
  %51 = getelementptr inbounds %class.HighsSparseMatrix, ptr %20, i32 0, i32 4
  %52 = load i32, ptr %13, align 4, !tbaa !9
  %53 = sext i32 %52 to i64
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %51, i64 noundef %53) #6
  %55 = load i32, ptr %54, align 4, !tbaa !9
  store i32 %55, ptr %15, align 4, !tbaa !9
  br label %63

56:                                               ; preds = %34
  %57 = getelementptr inbounds %class.HighsSparseMatrix, ptr %20, i32 0, i32 3
  %58 = load i32, ptr %13, align 4, !tbaa !9
  %59 = add nsw i32 %58, 1
  %60 = sext i32 %59 to i64
  %61 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %57, i64 noundef %60) #6
  %62 = load i32, ptr %61, align 4, !tbaa !9
  store i32 %62, ptr %15, align 4, !tbaa !9
  br label %63

63:                                               ; preds = %56, %50
  %64 = load i32, ptr %10, align 4, !tbaa !9
  %65 = icmp eq i32 %64, -1
  br i1 %65, label %70, label %66

66:                                               ; preds = %63
  %67 = load i32, ptr %10, align 4, !tbaa !9
  %68 = load i32, ptr %13, align 4, !tbaa !9
  %69 = icmp eq i32 %67, %68
  br i1 %69, label %70, label %75

70:                                               ; preds = %66, %63
  %71 = load i32, ptr %13, align 4, !tbaa !9
  %72 = load double, ptr %14, align 8, !tbaa !27
  %73 = load i32, ptr %15, align 4, !tbaa !9
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZNK17HighsSparseMatrix19debugReportRowPriceEidiRKSt6vectorIdSaIdEE(ptr noundef nonnull align 8 dereferenceable(112) %20, i32 noundef %71, double noundef %72, i32 noundef %73, ptr noundef nonnull align 8 dereferenceable(24) %74)
  br label %75

75:                                               ; preds = %70, %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %76 = getelementptr inbounds %class.HighsSparseMatrix, ptr %20, i32 0, i32 3
  %77 = load i32, ptr %13, align 4, !tbaa !9
  %78 = sext i32 %77 to i64
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %76, i64 noundef %78) #6
  %80 = load i32, ptr %79, align 4, !tbaa !9
  store i32 %80, ptr %16, align 4, !tbaa !9
  br label %81

81:                                               ; preds = %117, %75
  %82 = load i32, ptr %16, align 4, !tbaa !9
  %83 = load i32, ptr %15, align 4, !tbaa !9
  %84 = icmp slt i32 %82, %83
  br i1 %84, label %86, label %85

85:                                               ; preds = %81
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %120

86:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %87 = getelementptr inbounds %class.HighsSparseMatrix, ptr %20, i32 0, i32 5
  %88 = load i32, ptr %16, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %87, i64 noundef %89) #6
  %91 = load i32, ptr %90, align 4, !tbaa !9
  store i32 %91, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %92 = load ptr, ptr %7, align 8, !tbaa !5
  %93 = load i32, ptr %17, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %92, i64 noundef %94) #6
  %96 = load double, ptr %95, align 8, !tbaa !27
  store double %96, ptr %18, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %97 = load double, ptr %18, align 8, !tbaa !27
  %98 = load double, ptr %14, align 8, !tbaa !27
  %99 = getelementptr inbounds %class.HighsSparseMatrix, ptr %20, i32 0, i32 6
  %100 = load i32, ptr %16, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %99, i64 noundef %101) #6
  %103 = load double, ptr %102, align 8, !tbaa !27
  %104 = call double @llvm.fmuladd.f64(double %98, double %103, double %97)
  store double %104, ptr %19, align 8, !tbaa !27
  %105 = load double, ptr %19, align 8, !tbaa !27
  %106 = call double @llvm.fabs.f64(double %105)
  %107 = fcmp olt double %106, 0x3D06849B86A12B9B
  br i1 %107, label %108, label %109

108:                                              ; preds = %86
  br label %111

109:                                              ; preds = %86
  %110 = load double, ptr %19, align 8, !tbaa !27
  br label %111

111:                                              ; preds = %109, %108
  %112 = phi double [ 1.000000e-50, %108 ], [ %110, %109 ]
  %113 = load ptr, ptr %7, align 8, !tbaa !5
  %114 = load i32, ptr %17, align 4, !tbaa !9
  %115 = sext i32 %114 to i64
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %113, i64 noundef %115) #6
  store double %112, ptr %116, align 8, !tbaa !27
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %117

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

120:                                              ; preds = %85
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %121

121:                                              ; preds = %120
  %122 = load i32, ptr %11, align 4, !tbaa !9
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %11, align 4, !tbaa !9
  br label %27, !llvm.loop !33

124:                                              ; preds = %33
  ret void
}

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 = { 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, !10, i64 4}
!12 = !{!"_ZTS11HVectorBaseIdE", !10, i64 0, !10, i64 4, !13, i64 8, !17, i64 32, !21, i64 56, !22, i64 64, !13, i64 88, !6, i64 112, !26, i64 120, !10, i64 124, !13, i64 128, !17, i64 152}
!13 = !{!"_ZTSSt6vectorIiSaIiEE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!"_ZTSSt6vectorIdSaIdEE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!"double", !7, i64 0}
!22 = !{!"_ZTSSt6vectorIcSaIcEE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIcSaIcEE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!"bool", !7, i64 0}
!27 = !{!21, !21, i64 0}
!28 = !{!29, !30, i64 0}
!29 = !{!"_ZTS17HighsSparseMatrix", !30, i64 0, !10, i64 4, !10, i64 8, !13, i64 16, !13, i64 40, !13, i64 64, !17, i64 88}
!30 = !{!"_ZTS12MatrixFormat", !7, i64 0}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = distinct !{!33, !32}


; 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 [80 x i8], align 1
@.str.109 = external hidden unnamed_addr constant [18 x i8], align 1
@__PRETTY_FUNCTION__._ZNK17HighsSparseMatrix21priceByRowDenseResultERSt6vectorIdSaIdEERK11HVectorBaseIdEii = external hidden unnamed_addr constant [124 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 zeroext i1 @_ZNK17HighsSparseMatrix9isRowwiseEv(ptr noundef nonnull align 8 dereferenceable(112)) local_unnamed_addr #1 align 2

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

; 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 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 #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK17HighsSparseMatrix21priceByRowDenseResultERSt6vectorIdSaIdEERK11HVectorBaseIdEii(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(176) %2, i32 noundef %3, i32 noundef %4) local_unnamed_addr #3 align 2 {
  %6 = tail call noundef zeroext i1 @_ZNK17HighsSparseMatrix9isRowwiseEv(ptr noundef nonnull align 8 dereferenceable(112) %0)
  br i1 %6, label %.preheader, label %18

.preheader:                                       ; preds = %5
  %7 = getelementptr inbounds i8, ptr %2, i64 4
  %8 = load i32, ptr %7, align 4, !tbaa !5
  %9 = icmp sgt i32 %8, %3
  br i1 %9, label %.lr.ph36, label %._crit_edge37

.lr.ph36:                                         ; preds = %.preheader
  %10 = getelementptr inbounds i8, ptr %2, i64 8
  %11 = getelementptr inbounds i8, ptr %2, i64 32
  %12 = getelementptr inbounds i8, ptr %0, i64 16
  %13 = getelementptr inbounds i8, ptr %0, i64 40
  %14 = icmp eq i32 %4, -1
  %15 = getelementptr inbounds i8, ptr %0, i64 64
  %16 = getelementptr inbounds i8, ptr %0, i64 88
  %17 = sext i32 %3 to i64
  br label %19

18:                                               ; preds = %5
  tail call void @__assert_fail(ptr noundef nonnull @.str.109, ptr noundef nonnull @.str.52, i32 noundef 1631, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK17HighsSparseMatrix21priceByRowDenseResultERSt6vectorIdSaIdEERK11HVectorBaseIdEii) #4
  unreachable

._crit_edge37:                                    ; preds = %._crit_edge, %.preheader
  ret void

19:                                               ; preds = %.lr.ph36, %._crit_edge
  %indvars.iv39 = phi i64 [ %17, %.lr.ph36 ], [ %indvars.iv.next40, %._crit_edge ]
  %20 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %indvars.iv39) #5
  %21 = load i32, ptr %20, align 4, !tbaa !25
  %22 = sext i32 %21 to i64
  %23 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %22) #5
  %24 = load double, ptr %23, align 8, !tbaa !26
  %25 = load i32, ptr %0, align 8, !tbaa !27
  %26 = icmp eq i32 %25, 3
  br i1 %26, label %27, label %29

27:                                               ; preds = %19
  %28 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %22) #5
  br label %33

29:                                               ; preds = %19
  %30 = add nsw i32 %21, 1
  %31 = sext i32 %30 to i64
  %32 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %31) #5
  br label %33

33:                                               ; preds = %29, %27
  %.031.in = phi ptr [ %28, %27 ], [ %32, %29 ]
  %.031 = load i32, ptr %.031.in, align 4, !tbaa !25
  %34 = icmp eq i32 %21, %4
  %or.cond = or i1 %14, %34
  br i1 %or.cond, label %35, label %36

35:                                               ; preds = %33
  tail call void @_ZNK17HighsSparseMatrix19debugReportRowPriceEidiRKSt6vectorIdSaIdEE(ptr noundef nonnull align 8 dereferenceable(112) %0, i32 noundef %21, double noundef %24, i32 noundef %.031, ptr noundef nonnull align 8 dereferenceable(24) %1)
  br label %36

36:                                               ; preds = %33, %35
  %37 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %22) #5
  %38 = load i32, ptr %37, align 4, !tbaa !25
  %39 = icmp slt i32 %38, %.031
  br i1 %39, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %36
  %40 = sext i32 %38 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %36
  %indvars.iv.next40 = add nsw i64 %indvars.iv39, 1
  %41 = load i32, ptr %7, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = icmp slt i64 %indvars.iv.next40, %42
  br i1 %43, label %19, label %._crit_edge37, !llvm.loop !30

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ %40, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %44 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %indvars.iv) #5
  %45 = load i32, ptr %44, align 4, !tbaa !25
  %46 = sext i32 %45 to i64
  %47 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %46) #5
  %48 = load double, ptr %47, align 8, !tbaa !26
  %49 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %indvars.iv) #5
  %50 = load double, ptr %49, align 8, !tbaa !26
  %51 = tail call double @llvm.fmuladd.f64(double %24, double %50, double %48)
  %52 = tail call double @llvm.fabs.f64(double %51)
  %53 = fcmp olt double %52, 0x3D06849B86A12B9B
  %54 = select i1 %53, double 1.000000e-50, double %51
  %55 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %46) #5
  store double %54, ptr %55, align 8, !tbaa !26
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next to i32
  %exitcond.not = icmp eq i32 %.031, %lftr.wideiv
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !32
}

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 = { 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 4}
!6 = !{!"_ZTS11HVectorBaseIdE", !7, i64 0, !7, i64 4, !10, i64 8, !15, i64 32, !19, i64 56, !20, i64 64, !10, i64 88, !14, i64 112, !24, i64 120, !7, i64 124, !10, i64 128, !15, i64 152}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt6vectorIiSaIiEE", !11, i64 0}
!11 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !12, i64 0}
!12 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"_ZTSSt6vectorIdSaIdEE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!19 = !{!"double", !8, i64 0}
!20 = !{!"_ZTSSt6vectorIcSaIcEE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIcSaIcEE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!24 = !{!"bool", !8, i64 0}
!25 = !{!7, !7, i64 0}
!26 = !{!19, !19, i64 0}
!27 = !{!28, !29, i64 0}
!28 = !{!"_ZTS17HighsSparseMatrix", !29, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !10, i64 40, !10, i64 64, !15, i64 88}
!29 = !{!"_ZTS12MatrixFormat", !8, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = distinct !{!32, !31}


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