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

; 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.HighsSparseMatrix = type { i32, i32, i32, %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector.3" }
%"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 }

@.str.52 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.83 = external hidden unnamed_addr constant [35 x i8], align 1
@__PRETTY_FUNCTION__._ZNK17HighsSparseMatrix6getColEiRiPiPd = external hidden unnamed_addr constant [87 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: 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: mustprogress nounwind uwtable
define dso_local void @_ZNK17HighsSparseMatrix6getColEiRiPiPd(ptr noundef nonnull align 8 dereferenceable(112) %0, i32 noundef %1, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef %3, ptr noundef %4) #1 align 2 {
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  %15 = load ptr, ptr %6, align 8
  %16 = load i32, ptr %7, align 4, !tbaa !9
  %17 = icmp sge i32 %16, 0
  br i1 %17, label %18, label %23

18:                                               ; preds = %5
  %19 = load i32, ptr %7, align 4, !tbaa !9
  %20 = getelementptr inbounds %class.HighsSparseMatrix, ptr %15, i32 0, i32 2
  %21 = load i32, ptr %20, align 8, !tbaa !11
  %22 = icmp slt i32 %19, %21
  br label %23

23:                                               ; preds = %18, %5
  %24 = phi i1 [ false, %5 ], [ %22, %18 ]
  br i1 %24, label %25, label %26

25:                                               ; preds = %23
  br label %28

26:                                               ; preds = %23
  call void @__assert_fail(ptr noundef @.str.83, ptr noundef @.str.52, i32 noundef 530, ptr noundef @__PRETTY_FUNCTION__._ZNK17HighsSparseMatrix6getColEiRiPiPd) #3
  unreachable

27:                                               ; No predecessors!
  br label %28

28:                                               ; preds = %27, %25
  %29 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 0, ptr %29, align 4, !tbaa !9
  %30 = call noundef zeroext i1 @_ZNK17HighsSparseMatrix9isColwiseEv(ptr noundef nonnull align 8 dereferenceable(112) %15)
  br i1 %30, label %31, label %75

31:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %32 = getelementptr inbounds %class.HighsSparseMatrix, ptr %15, i32 0, i32 3
  %33 = load i32, ptr %7, align 4, !tbaa !9
  %34 = sext i32 %33 to i64
  %35 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef %34) #4
  %36 = load i32, ptr %35, align 4, !tbaa !9
  store i32 %36, ptr %11, align 4, !tbaa !9
  br label %37

37:                                               ; preds = %71, %31
  %38 = load i32, ptr %11, align 4, !tbaa !9
  %39 = getelementptr inbounds %class.HighsSparseMatrix, ptr %15, i32 0, i32 3
  %40 = load i32, ptr %7, align 4, !tbaa !9
  %41 = add nsw i32 %40, 1
  %42 = sext i32 %41 to i64
  %43 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %39, i64 noundef %42) #4
  %44 = load i32, ptr %43, align 4, !tbaa !9
  %45 = icmp slt i32 %38, %44
  br i1 %45, label %47, label %46

46:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %74

47:                                               ; preds = %37
  %48 = getelementptr inbounds %class.HighsSparseMatrix, ptr %15, i32 0, i32 5
  %49 = load i32, ptr %11, align 4, !tbaa !9
  %50 = sext i32 %49 to i64
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef %50) #4
  %52 = load i32, ptr %51, align 4, !tbaa !9
  %53 = load ptr, ptr %9, align 8, !tbaa !5
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  %55 = load i32, ptr %54, align 4, !tbaa !9
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds i32, ptr %53, i64 %56
  store i32 %52, ptr %57, align 4, !tbaa !9
  %58 = getelementptr inbounds %class.HighsSparseMatrix, ptr %15, i32 0, i32 6
  %59 = load i32, ptr %11, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %58, i64 noundef %60) #4
  %62 = load double, ptr %61, align 8, !tbaa !22
  %63 = load ptr, ptr %10, align 8, !tbaa !5
  %64 = load ptr, ptr %8, align 8, !tbaa !5
  %65 = load i32, ptr %64, align 4, !tbaa !9
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds double, ptr %63, i64 %66
  store double %62, ptr %67, align 8, !tbaa !22
  %68 = load ptr, ptr %8, align 8, !tbaa !5
  %69 = load i32, ptr %68, align 4, !tbaa !9
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %68, align 4, !tbaa !9
  br label %71

71:                                               ; preds = %47
  %72 = load i32, ptr %11, align 4, !tbaa !9
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %11, align 4, !tbaa !9
  br label %37, !llvm.loop !24

74:                                               ; preds = %46
  br label %136

75:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %76

76:                                               ; preds = %132, %75
  %77 = load i32, ptr %12, align 4, !tbaa !9
  %78 = getelementptr inbounds %class.HighsSparseMatrix, ptr %15, i32 0, i32 2
  %79 = load i32, ptr %78, align 8, !tbaa !11
  %80 = icmp slt i32 %77, %79
  br i1 %80, label %82, label %81

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

82:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %83 = getelementptr inbounds %class.HighsSparseMatrix, ptr %15, i32 0, i32 3
  %84 = load i32, ptr %12, align 4, !tbaa !9
  %85 = sext i32 %84 to i64
  %86 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %83, i64 noundef %85) #4
  %87 = load i32, ptr %86, align 4, !tbaa !9
  store i32 %87, ptr %14, align 4, !tbaa !9
  br label %88

88:                                               ; preds = %127, %82
  %89 = load i32, ptr %14, align 4, !tbaa !9
  %90 = getelementptr inbounds %class.HighsSparseMatrix, ptr %15, i32 0, i32 3
  %91 = load i32, ptr %12, align 4, !tbaa !9
  %92 = add nsw i32 %91, 1
  %93 = sext i32 %92 to i64
  %94 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %90, i64 noundef %93) #4
  %95 = load i32, ptr %94, align 4, !tbaa !9
  %96 = icmp slt i32 %89, %95
  br i1 %96, label %98, label %97

97:                                               ; preds = %88
  store i32 8, ptr %13, align 4
  br label %130

98:                                               ; preds = %88
  %99 = getelementptr inbounds %class.HighsSparseMatrix, ptr %15, i32 0, i32 5
  %100 = load i32, ptr %14, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %99, i64 noundef %101) #4
  %103 = load i32, ptr %102, align 4, !tbaa !9
  %104 = load i32, ptr %7, align 4, !tbaa !9
  %105 = icmp eq i32 %103, %104
  br i1 %105, label %106, label %126

106:                                              ; preds = %98
  %107 = load i32, ptr %12, align 4, !tbaa !9
  %108 = load ptr, ptr %9, align 8, !tbaa !5
  %109 = load ptr, ptr %8, align 8, !tbaa !5
  %110 = load i32, ptr %109, align 4, !tbaa !9
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds i32, ptr %108, i64 %111
  store i32 %107, ptr %112, align 4, !tbaa !9
  %113 = getelementptr inbounds %class.HighsSparseMatrix, ptr %15, i32 0, i32 6
  %114 = load i32, ptr %14, align 4, !tbaa !9
  %115 = sext i32 %114 to i64
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %113, i64 noundef %115) #4
  %117 = load double, ptr %116, align 8, !tbaa !22
  %118 = load ptr, ptr %10, align 8, !tbaa !5
  %119 = load ptr, ptr %8, align 8, !tbaa !5
  %120 = load i32, ptr %119, align 4, !tbaa !9
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds double, ptr %118, i64 %121
  store double %117, ptr %122, align 8, !tbaa !22
  %123 = load ptr, ptr %8, align 8, !tbaa !5
  %124 = load i32, ptr %123, align 4, !tbaa !9
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %123, align 4, !tbaa !9
  store i32 8, ptr %13, align 4
  br label %130

126:                                              ; preds = %98
  br label %127

127:                                              ; preds = %126
  %128 = load i32, ptr %14, align 4, !tbaa !9
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr %14, align 4, !tbaa !9
  br label %88, !llvm.loop !26

130:                                              ; preds = %106, %97
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %131

131:                                              ; preds = %130
  br label %132

132:                                              ; preds = %131
  %133 = load i32, ptr %12, align 4, !tbaa !9
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %12, align 4, !tbaa !9
  br label %76, !llvm.loop !27

135:                                              ; preds = %81
  br label %136

136:                                              ; preds = %135, %74
  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 = { noreturn nounwind }
attributes #4 = { 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 8}
!12 = !{!"_ZTS17HighsSparseMatrix", !13, i64 0, !10, i64 4, !10, i64 8, !14, i64 16, !14, i64 40, !14, i64 64, !18, i64 88}
!13 = !{!"_ZTS12MatrixFormat", !7, i64 0}
!14 = !{!"_ZTSSt6vectorIiSaIiEE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!"_ZTSSt6vectorIdSaIdEE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!23, !23, i64 0}
!23 = !{!"double", !7, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}
!27 = distinct !{!27, !25}


; 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.83 = external hidden unnamed_addr constant [35 x i8], align 1
@__PRETTY_FUNCTION__._ZNK17HighsSparseMatrix6getColEiRiPiPd = external hidden unnamed_addr constant [87 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK17HighsSparseMatrix9isColwiseEv(ptr noundef nonnull align 8 dereferenceable(112)) local_unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZNK17HighsSparseMatrix6getColEiRiPiPd(ptr noundef nonnull align 8 dereferenceable(112) %0, i32 noundef %1, ptr nocapture noundef nonnull align 4 dereferenceable(4) %2, ptr nocapture noundef writeonly %3, ptr nocapture noundef writeonly %4) local_unnamed_addr #0 align 2 {
  %6 = icmp sgt i32 %1, -1
  br i1 %6, label %7, label %.critedge

7:                                                ; preds = %5
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  %9 = load i32, ptr %8, align 8, !tbaa !5
  %10 = icmp sgt i32 %9, %1
  br i1 %10, label %11, label %.critedge

.critedge:                                        ; preds = %5, %7
  tail call void @__assert_fail(ptr noundef nonnull @.str.83, ptr noundef nonnull @.str.52, i32 noundef 530, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK17HighsSparseMatrix6getColEiRiPiPd) #2
  unreachable

11:                                               ; preds = %7
  store i32 0, ptr %2, align 4, !tbaa !20
  %12 = tail call noundef zeroext i1 @_ZNK17HighsSparseMatrix9isColwiseEv(ptr noundef nonnull align 8 dereferenceable(112) %0)
  br i1 %12, label %18, label %.preheader

.preheader:                                       ; preds = %11
  %13 = load i32, ptr %8, align 8, !tbaa !5
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph38, label %.loopexit

.lr.ph38:                                         ; preds = %.preheader
  %15 = getelementptr inbounds i8, ptr %0, i64 16
  %16 = getelementptr inbounds i8, ptr %0, i64 64
  %17 = getelementptr inbounds i8, ptr %0, i64 88
  br label %47

18:                                               ; preds = %11
  %19 = getelementptr inbounds i8, ptr %0, i64 16
  %20 = zext nneg i32 %1 to i64
  %21 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %20) #3
  %22 = load i32, ptr %21, align 4, !tbaa !20
  %23 = add nuw nsw i32 %1, 1
  %24 = zext nneg i32 %23 to i64
  %25 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %24) #3
  %26 = load i32, ptr %25, align 4, !tbaa !20
  %27 = icmp slt i32 %22, %26
  br i1 %27, label %.lr.ph40, label %.loopexit

.lr.ph40:                                         ; preds = %18
  %28 = getelementptr inbounds i8, ptr %0, i64 64
  %29 = getelementptr inbounds i8, ptr %0, i64 88
  %30 = sext i32 %22 to i64
  br label %31

31:                                               ; preds = %.lr.ph40, %31
  %indvars.iv47 = phi i64 [ %30, %.lr.ph40 ], [ %indvars.iv.next48, %31 ]
  %32 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %indvars.iv47) #3
  %33 = load i32, ptr %32, align 4, !tbaa !20
  %34 = load i32, ptr %2, align 4, !tbaa !20
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds i32, ptr %3, i64 %35
  store i32 %33, ptr %36, align 4, !tbaa !20
  %37 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %indvars.iv47) #3
  %38 = load double, ptr %37, align 8, !tbaa !21
  %39 = load i32, ptr %2, align 4, !tbaa !20
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds double, ptr %4, i64 %40
  store double %38, ptr %41, align 8, !tbaa !21
  %42 = add nsw i32 %39, 1
  store i32 %42, ptr %2, align 4, !tbaa !20
  %indvars.iv.next48 = add nsw i64 %indvars.iv47, 1
  %43 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %24) #3
  %44 = load i32, ptr %43, align 4, !tbaa !20
  %45 = sext i32 %44 to i64
  %46 = icmp slt i64 %indvars.iv.next48, %45
  br i1 %46, label %31, label %.loopexit, !llvm.loop !23

47:                                               ; preds = %.lr.ph38, %.loopexit32
  %indvars.iv44 = phi i64 [ 0, %.lr.ph38 ], [ %indvars.iv.next45, %.loopexit32 ]
  %48 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %indvars.iv44) #3
  %49 = load i32, ptr %48, align 4, !tbaa !20
  %indvars.iv.next45 = add nuw nsw i64 %indvars.iv44, 1
  %50 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %indvars.iv.next45) #3
  %51 = load i32, ptr %50, align 4, !tbaa !20
  %52 = icmp slt i32 %49, %51
  br i1 %52, label %.lr.ph.preheader, label %.loopexit32

.lr.ph.preheader:                                 ; preds = %47
  %53 = sext i32 %49 to i64
  br label %.lr.ph

54:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %55 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %indvars.iv.next45) #3
  %56 = load i32, ptr %55, align 4, !tbaa !20
  %57 = sext i32 %56 to i64
  %58 = icmp slt i64 %indvars.iv.next, %57
  br i1 %58, label %.lr.ph, label %.loopexit32, !llvm.loop !25

.lr.ph:                                           ; preds = %.lr.ph.preheader, %54
  %indvars.iv = phi i64 [ %53, %.lr.ph.preheader ], [ %indvars.iv.next, %54 ]
  %59 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %indvars.iv) #3
  %60 = load i32, ptr %59, align 4, !tbaa !20
  %61 = icmp eq i32 %60, %1
  br i1 %61, label %62, label %54

62:                                               ; preds = %.lr.ph
  %63 = load i32, ptr %2, align 4, !tbaa !20
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds i32, ptr %3, i64 %64
  %66 = trunc nuw nsw i64 %indvars.iv44 to i32
  store i32 %66, ptr %65, align 4, !tbaa !20
  %67 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %indvars.iv) #3
  %68 = load double, ptr %67, align 8, !tbaa !21
  %69 = load i32, ptr %2, align 4, !tbaa !20
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds double, ptr %4, i64 %70
  store double %68, ptr %71, align 8, !tbaa !21
  %72 = add nsw i32 %69, 1
  store i32 %72, ptr %2, align 4, !tbaa !20
  br label %.loopexit32

.loopexit32:                                      ; preds = %54, %47, %62
  %73 = load i32, ptr %8, align 8, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = icmp slt i64 %indvars.iv.next45, %74
  br i1 %75, label %47, label %.loopexit, !llvm.loop !26

.loopexit:                                        ; preds = %.loopexit32, %31, %.preheader, %18
  ret void
}

attributes #0 = { 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 #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 = { noreturn nounwind }
attributes #3 = { 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, !10, i64 8}
!6 = !{!"_ZTS17HighsSparseMatrix", !7, i64 0, !10, i64 4, !10, i64 8, !11, i64 16, !11, i64 40, !11, i64 64, !16, i64 88}
!7 = !{!"_ZTS12MatrixFormat", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_ZTSSt6vectorIiSaIiEE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!15 = !{!"any pointer", !8, i64 0}
!16 = !{!"_ZTSSt6vectorIdSaIdEE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!20 = !{!10, !10, i64 0}
!21 = !{!22, !22, i64 0}
!22 = !{!"double", !8, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = distinct !{!25, !24}
!26 = distinct !{!26, !24}


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