; 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.HighsCDouble = type { double, double }
%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.81 = external hidden unnamed_addr constant [18 x i8], align 1
@__PRETTY_FUNCTION__._ZNK17HighsSparseMatrix13priceByColumnEbR11HVectorBaseIdERKS1_i = external hidden unnamed_addr constant [100 x i8], align 1
@.str.108 = external hidden unnamed_addr constant [36 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 nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK17HighsSparseMatrix9isColwiseEv(ptr noundef nonnull align 8 dereferenceable(112)) #1 align 2

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #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) #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) #1 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) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN12HighsCDoubleC2Ed(ptr noundef nonnull align 8 dereferenceable(16), double noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN12HighsCDoublepLEd(ptr noundef nonnull align 8 dereferenceable(16), double noundef) #4 align 2

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

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

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

20:                                               ; preds = %5
  br label %23

21:                                               ; preds = %5
  call void @__assert_fail(ptr noundef @.str.81, ptr noundef @.str.52, i32 noundef 1402, ptr noundef @__PRETTY_FUNCTION__._ZNK17HighsSparseMatrix13priceByColumnEbR11HVectorBaseIdERKS1_i) #6
  unreachable

22:                                               ; No predecessors!
  br label %23

23:                                               ; preds = %22, %20
  %24 = load i32, ptr %10, align 4, !tbaa !11
  %25 = icmp sge i32 %24, -1
  br i1 %25, label %26, label %28

26:                                               ; preds = %23
  %27 = call i32 (ptr, ...) @printf(ptr noundef @.str.108)
  br label %28

28:                                               ; preds = %26, %23
  %29 = load ptr, ptr %8, align 8, !tbaa !5
  %30 = getelementptr inbounds %class.HVectorBase, ptr %29, i32 0, i32 1
  store i32 0, ptr %30, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !11
  br label %31

31:                                               ; preds = %138, %28
  %32 = load i32, ptr %11, align 4, !tbaa !11
  %33 = getelementptr inbounds %class.HighsSparseMatrix, ptr %18, i32 0, i32 1
  %34 = load i32, ptr %33, align 4, !tbaa !28
  %35 = icmp slt i32 %32, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %31
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %141

37:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  store double 0.000000e+00, ptr %13, align 8, !tbaa !31
  %38 = load i8, ptr %7, align 1, !tbaa !9, !range !32, !noundef !33
  %39 = trunc i8 %38 to i1
  br i1 %39, label %40, label %79

40:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #7
  call void @_ZN12HighsCDoubleC2Ed(ptr noundef nonnull align 8 dereferenceable(16) %14, double noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %41 = getelementptr inbounds %class.HighsSparseMatrix, ptr %18, i32 0, i32 3
  %42 = load i32, ptr %11, align 4, !tbaa !11
  %43 = sext i32 %42 to i64
  %44 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %41, i64 noundef %43) #7
  %45 = load i32, ptr %44, align 4, !tbaa !11
  store i32 %45, ptr %15, align 4, !tbaa !11
  br label %46

46:                                               ; preds = %74, %40
  %47 = load i32, ptr %15, align 4, !tbaa !11
  %48 = getelementptr inbounds %class.HighsSparseMatrix, ptr %18, i32 0, i32 3
  %49 = load i32, ptr %11, align 4, !tbaa !11
  %50 = add nsw i32 %49, 1
  %51 = sext i32 %50 to i64
  %52 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef %51) #7
  %53 = load i32, ptr %52, align 4, !tbaa !11
  %54 = icmp slt i32 %47, %53
  br i1 %54, label %56, label %55

55:                                               ; preds = %46
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %77

56:                                               ; preds = %46
  %57 = load ptr, ptr %9, align 8, !tbaa !5
  %58 = getelementptr inbounds %class.HVectorBase, ptr %57, i32 0, i32 3
  %59 = getelementptr inbounds %class.HighsSparseMatrix, ptr %18, i32 0, i32 5
  %60 = load i32, ptr %15, align 4, !tbaa !11
  %61 = sext i32 %60 to i64
  %62 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %59, i64 noundef %61) #7
  %63 = load i32, ptr %62, align 4, !tbaa !11
  %64 = sext i32 %63 to i64
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %58, i64 noundef %64) #7
  %66 = load double, ptr %65, align 8, !tbaa !31
  %67 = getelementptr inbounds %class.HighsSparseMatrix, ptr %18, i32 0, i32 6
  %68 = load i32, ptr %15, align 4, !tbaa !11
  %69 = sext i32 %68 to i64
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %67, i64 noundef %69) #7
  %71 = load double, ptr %70, align 8, !tbaa !31
  %72 = fmul double %66, %71
  %73 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12HighsCDoublepLEd(ptr noundef nonnull align 8 dereferenceable(16) %14, double noundef %72)
  br label %74

74:                                               ; preds = %56
  %75 = load i32, ptr %15, align 4, !tbaa !11
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %15, align 4, !tbaa !11
  br label %46, !llvm.loop !34

77:                                               ; preds = %55
  %78 = call noundef double @_ZNK12HighsCDoublecvdEv(ptr noundef nonnull align 8 dereferenceable(16) %14)
  store double %78, ptr %13, align 8, !tbaa !31
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #7
  br label %117

79:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %80 = getelementptr inbounds %class.HighsSparseMatrix, ptr %18, i32 0, i32 3
  %81 = load i32, ptr %11, align 4, !tbaa !11
  %82 = sext i32 %81 to i64
  %83 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %80, i64 noundef %82) #7
  %84 = load i32, ptr %83, align 4, !tbaa !11
  store i32 %84, ptr %16, align 4, !tbaa !11
  br label %85

85:                                               ; preds = %113, %79
  %86 = load i32, ptr %16, align 4, !tbaa !11
  %87 = getelementptr inbounds %class.HighsSparseMatrix, ptr %18, i32 0, i32 3
  %88 = load i32, ptr %11, align 4, !tbaa !11
  %89 = add nsw i32 %88, 1
  %90 = sext i32 %89 to i64
  %91 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %87, i64 noundef %90) #7
  %92 = load i32, ptr %91, align 4, !tbaa !11
  %93 = icmp slt i32 %86, %92
  br i1 %93, label %95, label %94

94:                                               ; preds = %85
  store i32 8, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %116

95:                                               ; preds = %85
  %96 = load ptr, ptr %9, align 8, !tbaa !5
  %97 = getelementptr inbounds %class.HVectorBase, ptr %96, i32 0, i32 3
  %98 = getelementptr inbounds %class.HighsSparseMatrix, ptr %18, i32 0, i32 5
  %99 = load i32, ptr %16, align 4, !tbaa !11
  %100 = sext i32 %99 to i64
  %101 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %98, i64 noundef %100) #7
  %102 = load i32, ptr %101, align 4, !tbaa !11
  %103 = sext i32 %102 to i64
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %97, i64 noundef %103) #7
  %105 = load double, ptr %104, align 8, !tbaa !31
  %106 = getelementptr inbounds %class.HighsSparseMatrix, ptr %18, i32 0, i32 6
  %107 = load i32, ptr %16, align 4, !tbaa !11
  %108 = sext i32 %107 to i64
  %109 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %106, i64 noundef %108) #7
  %110 = load double, ptr %109, align 8, !tbaa !31
  %111 = load double, ptr %13, align 8, !tbaa !31
  %112 = call double @llvm.fmuladd.f64(double %105, double %110, double %111)
  store double %112, ptr %13, align 8, !tbaa !31
  br label %113

113:                                              ; preds = %95
  %114 = load i32, ptr %16, align 4, !tbaa !11
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %16, align 4, !tbaa !11
  br label %85, !llvm.loop !36

116:                                              ; preds = %94
  br label %117

117:                                              ; preds = %116, %77
  %118 = load double, ptr %13, align 8, !tbaa !31
  %119 = call double @llvm.fabs.f64(double %118)
  %120 = fcmp ogt double %119, 0x3D06849B86A12B9B
  br i1 %120, label %121, label %137

121:                                              ; preds = %117
  %122 = load double, ptr %13, align 8, !tbaa !31
  %123 = load ptr, ptr %8, align 8, !tbaa !5
  %124 = getelementptr inbounds %class.HVectorBase, ptr %123, i32 0, i32 3
  %125 = load i32, ptr %11, align 4, !tbaa !11
  %126 = sext i32 %125 to i64
  %127 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %124, i64 noundef %126) #7
  store double %122, ptr %127, align 8, !tbaa !31
  %128 = load i32, ptr %11, align 4, !tbaa !11
  %129 = load ptr, ptr %8, align 8, !tbaa !5
  %130 = getelementptr inbounds %class.HVectorBase, ptr %129, i32 0, i32 2
  %131 = load ptr, ptr %8, align 8, !tbaa !5
  %132 = getelementptr inbounds %class.HVectorBase, ptr %131, i32 0, i32 1
  %133 = load i32, ptr %132, align 4, !tbaa !13
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %132, align 4, !tbaa !13
  %135 = sext i32 %133 to i64
  %136 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %130, i64 noundef %135) #7
  store i32 %128, ptr %136, align 4, !tbaa !11
  br label %137

137:                                              ; preds = %121, %117
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %138

138:                                              ; preds = %137
  %139 = load i32, ptr %11, align 4, !tbaa !11
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %11, align 4, !tbaa !11
  br label %31, !llvm.loop !37

141:                                              ; preds = %36
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { 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, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 4}
!14 = !{!"_ZTS11HVectorBaseIdE", !12, i64 0, !12, i64 4, !15, i64 8, !19, i64 32, !23, i64 56, !24, i64 64, !15, i64 88, !6, i64 112, !10, i64 120, !12, i64 124, !15, i64 128, !19, i64 152}
!15 = !{!"_ZTSSt6vectorIiSaIiEE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!"_ZTSSt6vectorIdSaIdEE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!"double", !7, i64 0}
!24 = !{!"_ZTSSt6vectorIcSaIcEE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseIcSaIcEE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!28 = !{!29, !12, i64 4}
!29 = !{!"_ZTS17HighsSparseMatrix", !30, i64 0, !12, i64 4, !12, i64 8, !15, i64 16, !15, i64 40, !15, i64 64, !19, i64 88}
!30 = !{!"_ZTS12MatrixFormat", !7, i64 0}
!31 = !{!23, !23, i64 0}
!32 = !{i8 0, i8 2}
!33 = !{}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = distinct !{!36, !35}
!37 = distinct !{!37, !35}


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

%class.HighsCDouble = type { double, double }

@.str.52 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.81 = external hidden unnamed_addr constant [18 x i8], align 1
@__PRETTY_FUNCTION__._ZNK17HighsSparseMatrix13priceByColumnEbR11HVectorBaseIdERKS1_i = external hidden unnamed_addr constant [100 x i8], align 1
@.str.108 = external hidden unnamed_addr constant [36 x i8], align 1

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN12HighsCDoubleC2Ed(ptr noundef nonnull align 8 dereferenceable(16), double noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN12HighsCDoublepLEd(ptr noundef nonnull align 8 dereferenceable(16), double noundef) local_unnamed_addr #4 align 2

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK17HighsSparseMatrix13priceByColumnEbR11HVectorBaseIdERKS1_i(ptr noundef nonnull align 8 dereferenceable(112) %0, i1 noundef zeroext %1, ptr noundef nonnull align 8 dereferenceable(176) %2, ptr noundef nonnull align 8 dereferenceable(176) %3, i32 noundef %4) local_unnamed_addr #4 align 2 {
  %6 = alloca %class.HighsCDouble, align 8
  %7 = tail call noundef zeroext i1 @_ZNK17HighsSparseMatrix9isColwiseEv(ptr noundef nonnull align 8 dereferenceable(112) %0)
  br i1 %7, label %9, label %8

8:                                                ; preds = %5
  tail call void @__assert_fail(ptr noundef nonnull @.str.81, ptr noundef nonnull @.str.52, i32 noundef 1402, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK17HighsSparseMatrix13priceByColumnEbR11HVectorBaseIdERKS1_i) #6
  unreachable

9:                                                ; preds = %5
  %10 = icmp sgt i32 %4, -2
  br i1 %10, label %11, label %13

11:                                               ; preds = %9
  %12 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.108)
  br label %13

13:                                               ; preds = %11, %9
  %14 = getelementptr inbounds i8, ptr %2, i64 4
  store i32 0, ptr %14, align 4, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %0, i64 4
  %16 = load i32, ptr %15, align 4, !tbaa !25
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph36, label %._crit_edge37

.lr.ph36:                                         ; preds = %13
  %18 = getelementptr inbounds i8, ptr %0, i64 16
  %19 = getelementptr inbounds i8, ptr %3, i64 32
  %20 = getelementptr inbounds i8, ptr %0, i64 64
  %21 = getelementptr inbounds i8, ptr %0, i64 88
  %22 = getelementptr inbounds i8, ptr %2, i64 32
  %23 = getelementptr inbounds i8, ptr %2, i64 8
  br i1 %1, label %.lr.ph36.split.us, label %.lr.ph36.split

.lr.ph36.split.us:                                ; preds = %.lr.ph36, %40
  %indvars.iv46 = phi i64 [ %indvars.iv.next47, %40 ], [ 0, %.lr.ph36 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  call void @_ZN12HighsCDoubleC2Ed(ptr noundef nonnull align 8 dereferenceable(16) %6, double noundef 0.000000e+00)
  %24 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %indvars.iv46) #7
  %25 = load i32, ptr %24, align 4, !tbaa !28
  %indvars.iv.next47 = add nuw nsw i64 %indvars.iv46, 1
  %26 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %indvars.iv.next47) #7
  %27 = load i32, ptr %26, align 4, !tbaa !28
  %28 = icmp slt i32 %25, %27
  br i1 %28, label %.lr.ph33.us.preheader, label %._crit_edge.us

.lr.ph33.us.preheader:                            ; preds = %.lr.ph36.split.us
  %29 = sext i32 %25 to i64
  br label %.lr.ph33.us

._crit_edge.us:                                   ; preds = %.lr.ph33.us, %.lr.ph36.split.us
  %30 = call noundef double @_ZNK12HighsCDoublecvdEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  %31 = call double @llvm.fabs.f64(double %30)
  %32 = fcmp ogt double %31, 0x3D06849B86A12B9B
  br i1 %32, label %33, label %40

33:                                               ; preds = %._crit_edge.us
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %indvars.iv46) #7
  store double %30, ptr %34, align 8, !tbaa !29
  %35 = load i32, ptr %14, align 4, !tbaa !5
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %14, align 4, !tbaa !5
  %37 = sext i32 %35 to i64
  %38 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %37) #7
  %39 = trunc nuw nsw i64 %indvars.iv46 to i32
  store i32 %39, ptr %38, align 4, !tbaa !28
  br label %40

40:                                               ; preds = %33, %._crit_edge.us
  %41 = load i32, ptr %15, align 4, !tbaa !25
  %42 = sext i32 %41 to i64
  %43 = icmp slt i64 %indvars.iv.next47, %42
  br i1 %43, label %.lr.ph36.split.us, label %._crit_edge37, !llvm.loop !30

.lr.ph33.us:                                      ; preds = %.lr.ph33.us.preheader, %.lr.ph33.us
  %indvars.iv43 = phi i64 [ %29, %.lr.ph33.us.preheader ], [ %indvars.iv.next44, %.lr.ph33.us ]
  %44 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %indvars.iv43) #7
  %45 = load i32, ptr %44, align 4, !tbaa !28
  %46 = sext i32 %45 to i64
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %46) #7
  %48 = load double, ptr %47, align 8, !tbaa !29
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %indvars.iv43) #7
  %50 = load double, ptr %49, align 8, !tbaa !29
  %51 = fmul double %48, %50
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12HighsCDoublepLEd(ptr noundef nonnull align 8 dereferenceable(16) %6, double noundef %51)
  %indvars.iv.next44 = add nsw i64 %indvars.iv43, 1
  %53 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %indvars.iv.next47) #7
  %54 = load i32, ptr %53, align 4, !tbaa !28
  %55 = sext i32 %54 to i64
  %56 = icmp slt i64 %indvars.iv.next44, %55
  br i1 %56, label %.lr.ph33.us, label %._crit_edge.us, !llvm.loop !32

._crit_edge37:                                    ; preds = %84, %40, %13
  ret void

.lr.ph36.split:                                   ; preds = %.lr.ph36, %84
  %indvars.iv40 = phi i64 [ %indvars.iv.next41, %84 ], [ 0, %.lr.ph36 ]
  %57 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %indvars.iv40) #7
  %58 = load i32, ptr %57, align 4, !tbaa !28
  %indvars.iv.next41 = add nuw nsw i64 %indvars.iv40, 1
  %59 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %indvars.iv.next41) #7
  %60 = load i32, ptr %59, align 4, !tbaa !28
  %61 = icmp slt i32 %58, %60
  br i1 %61, label %.lr.ph.preheader, label %.loopexit

.lr.ph.preheader:                                 ; preds = %.lr.ph36.split
  %62 = sext i32 %58 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ %62, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %.02830 = phi double [ 0.000000e+00, %.lr.ph.preheader ], [ %70, %.lr.ph ]
  %63 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %indvars.iv) #7
  %64 = load i32, ptr %63, align 4, !tbaa !28
  %65 = sext i32 %64 to i64
  %66 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %65) #7
  %67 = load double, ptr %66, align 8, !tbaa !29
  %68 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %indvars.iv) #7
  %69 = load double, ptr %68, align 8, !tbaa !29
  %70 = tail call double @llvm.fmuladd.f64(double %67, double %69, double %.02830)
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %71 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %indvars.iv.next41) #7
  %72 = load i32, ptr %71, align 4, !tbaa !28
  %73 = sext i32 %72 to i64
  %74 = icmp slt i64 %indvars.iv.next, %73
  br i1 %74, label %.lr.ph, label %.loopexit, !llvm.loop !33

.loopexit:                                        ; preds = %.lr.ph, %.lr.ph36.split
  %.028.lcssa = phi double [ 0.000000e+00, %.lr.ph36.split ], [ %70, %.lr.ph ]
  %75 = tail call double @llvm.fabs.f64(double %.028.lcssa)
  %76 = fcmp ogt double %75, 0x3D06849B86A12B9B
  br i1 %76, label %77, label %84

77:                                               ; preds = %.loopexit
  %78 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %indvars.iv40) #7
  store double %.028.lcssa, ptr %78, align 8, !tbaa !29
  %79 = load i32, ptr %14, align 4, !tbaa !5
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %14, align 4, !tbaa !5
  %81 = sext i32 %79 to i64
  %82 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %81) #7
  %83 = trunc nuw nsw i64 %indvars.iv40 to i32
  store i32 %83, ptr %82, align 4, !tbaa !28
  br label %84

84:                                               ; preds = %77, %.loopexit
  %85 = load i32, ptr %15, align 4, !tbaa !25
  %86 = sext i32 %85 to i64
  %87 = icmp slt i64 %indvars.iv.next41, %86
  br i1 %87, label %.lr.ph36.split, label %._crit_edge37, !llvm.loop !30
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { mustprogress 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 = { nofree 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 #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, !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 = !{!26, !7, i64 4}
!26 = !{!"_ZTS17HighsSparseMatrix", !27, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !10, i64 40, !10, i64 64, !15, i64 88}
!27 = !{!"_ZTS12MatrixFormat", !8, i64 0}
!28 = !{!7, !7, i64 0}
!29 = !{!19, !19, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = distinct !{!32, !31}
!33 = distinct !{!33, !31}


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