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

; 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.53 = external hidden unnamed_addr constant [17 x i8], align 1
@__PRETTY_FUNCTION__._ZN17HighsSparseMatrix8scaleColEid = external hidden unnamed_addr constant [63 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.93 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.94 = external hidden unnamed_addr constant [9 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 zeroext i1 @_ZNK17HighsSparseMatrix8formatOkEv(ptr noundef nonnull align 8 dereferenceable(112)) #1 align 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) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN17HighsSparseMatrix8scaleColEid(ptr noundef nonnull align 8 dereferenceable(112) %0, i32 noundef %1, double noundef %2) #3 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca double, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store double %2, ptr %6, align 8, !tbaa !11
  %11 = load ptr, ptr %4, align 8
  %12 = call noundef zeroext i1 @_ZNK17HighsSparseMatrix8formatOkEv(ptr noundef nonnull align 8 dereferenceable(112) %11)
  br i1 %12, label %13, label %14

13:                                               ; preds = %3
  br label %16

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

15:                                               ; No predecessors!
  br label %16

16:                                               ; preds = %15, %13
  %17 = load i32, ptr %5, align 4, !tbaa !9
  %18 = icmp sge i32 %17, 0
  br i1 %18, label %19, label %20

19:                                               ; preds = %16
  br label %22

20:                                               ; preds = %16
  call void @__assert_fail(ptr noundef @.str.92, ptr noundef @.str.52, i32 noundef 895, ptr noundef @__PRETTY_FUNCTION__._ZN17HighsSparseMatrix8scaleColEid) #4
  unreachable

21:                                               ; No predecessors!
  br label %22

22:                                               ; preds = %21, %19
  %23 = load i32, ptr %5, align 4, !tbaa !9
  %24 = getelementptr inbounds %class.HighsSparseMatrix, ptr %11, i32 0, i32 1
  %25 = load i32, ptr %24, align 4, !tbaa !13
  %26 = icmp slt i32 %23, %25
  br i1 %26, label %27, label %28

27:                                               ; preds = %22
  br label %30

28:                                               ; preds = %22
  call void @__assert_fail(ptr noundef @.str.93, ptr noundef @.str.52, i32 noundef 896, ptr noundef @__PRETTY_FUNCTION__._ZN17HighsSparseMatrix8scaleColEid) #4
  unreachable

29:                                               ; No predecessors!
  br label %30

30:                                               ; preds = %29, %27
  %31 = load double, ptr %6, align 8, !tbaa !11
  %32 = fcmp une double %31, 0.000000e+00
  br i1 %32, label %33, label %34

33:                                               ; preds = %30
  br label %36

34:                                               ; preds = %30
  call void @__assert_fail(ptr noundef @.str.94, ptr noundef @.str.52, i32 noundef 897, ptr noundef @__PRETTY_FUNCTION__._ZN17HighsSparseMatrix8scaleColEid) #4
  unreachable

35:                                               ; No predecessors!
  br label %36

36:                                               ; preds = %35, %33
  %37 = call noundef zeroext i1 @_ZNK17HighsSparseMatrix9isColwiseEv(ptr noundef nonnull align 8 dereferenceable(112) %11)
  br i1 %37, label %38, label %66

38:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %39 = getelementptr inbounds %class.HighsSparseMatrix, ptr %11, i32 0, i32 3
  %40 = load i32, ptr %5, align 4, !tbaa !9
  %41 = sext i32 %40 to i64
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %39, i64 noundef %41) #5
  %43 = load i32, ptr %42, align 4, !tbaa !9
  store i32 %43, ptr %7, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %62, %38
  %45 = load i32, ptr %7, align 4, !tbaa !9
  %46 = getelementptr inbounds %class.HighsSparseMatrix, ptr %11, i32 0, i32 3
  %47 = load i32, ptr %5, align 4, !tbaa !9
  %48 = add nsw i32 %47, 1
  %49 = sext i32 %48 to i64
  %50 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %46, i64 noundef %49) #5
  %51 = load i32, ptr %50, align 4, !tbaa !9
  %52 = icmp slt i32 %45, %51
  br i1 %52, label %54, label %53

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

54:                                               ; preds = %44
  %55 = load double, ptr %6, align 8, !tbaa !11
  %56 = getelementptr inbounds %class.HighsSparseMatrix, ptr %11, i32 0, i32 6
  %57 = load i32, ptr %7, align 4, !tbaa !9
  %58 = sext i32 %57 to i64
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %56, i64 noundef %58) #5
  %60 = load double, ptr %59, align 8, !tbaa !11
  %61 = fmul double %60, %55
  store double %61, ptr %59, align 8, !tbaa !11
  br label %62

62:                                               ; preds = %54
  %63 = load i32, ptr %7, align 4, !tbaa !9
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %7, align 4, !tbaa !9
  br label %44, !llvm.loop !24

65:                                               ; preds = %53
  br label %114

66:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %67

67:                                               ; preds = %110, %66
  %68 = load i32, ptr %8, align 4, !tbaa !9
  %69 = getelementptr inbounds %class.HighsSparseMatrix, ptr %11, i32 0, i32 2
  %70 = load i32, ptr %69, align 8, !tbaa !26
  %71 = icmp slt i32 %68, %70
  br i1 %71, label %73, label %72

72:                                               ; preds = %67
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %113

73:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %74 = getelementptr inbounds %class.HighsSparseMatrix, ptr %11, i32 0, i32 3
  %75 = load i32, ptr %8, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %74, i64 noundef %76) #5
  %78 = load i32, ptr %77, align 4, !tbaa !9
  store i32 %78, ptr %10, align 4, !tbaa !9
  br label %79

79:                                               ; preds = %106, %73
  %80 = load i32, ptr %10, align 4, !tbaa !9
  %81 = getelementptr inbounds %class.HighsSparseMatrix, ptr %11, i32 0, i32 3
  %82 = load i32, ptr %8, align 4, !tbaa !9
  %83 = add nsw i32 %82, 1
  %84 = sext i32 %83 to i64
  %85 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef %84) #5
  %86 = load i32, ptr %85, align 4, !tbaa !9
  %87 = icmp slt i32 %80, %86
  br i1 %87, label %89, label %88

88:                                               ; preds = %79
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %109

89:                                               ; preds = %79
  %90 = getelementptr inbounds %class.HighsSparseMatrix, ptr %11, i32 0, i32 5
  %91 = load i32, ptr %10, align 4, !tbaa !9
  %92 = sext i32 %91 to i64
  %93 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %90, i64 noundef %92) #5
  %94 = load i32, ptr %93, align 4, !tbaa !9
  %95 = load i32, ptr %5, align 4, !tbaa !9
  %96 = icmp eq i32 %94, %95
  br i1 %96, label %97, label %105

97:                                               ; preds = %89
  %98 = load double, ptr %6, align 8, !tbaa !11
  %99 = getelementptr inbounds %class.HighsSparseMatrix, ptr %11, i32 0, i32 6
  %100 = load i32, ptr %10, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %99, i64 noundef %101) #5
  %103 = load double, ptr %102, align 8, !tbaa !11
  %104 = fmul double %103, %98
  store double %104, ptr %102, align 8, !tbaa !11
  br label %105

105:                                              ; preds = %97, %89
  br label %106

106:                                              ; preds = %105
  %107 = load i32, ptr %10, align 4, !tbaa !9
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %10, align 4, !tbaa !9
  br label %79, !llvm.loop !27

109:                                              ; preds = %88
  br label %110

110:                                              ; preds = %109
  %111 = load i32, ptr %8, align 4, !tbaa !9
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %8, align 4, !tbaa !9
  br label %67, !llvm.loop !28

113:                                              ; preds = %72
  br label %114

114:                                              ; preds = %113, %65
  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 = { 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, !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, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !10, i64 4}
!14 = !{!"_ZTS17HighsSparseMatrix", !15, i64 0, !10, i64 4, !10, i64 8, !16, i64 16, !16, i64 40, !16, i64 64, !20, i64 88}
!15 = !{!"_ZTS12MatrixFormat", !7, i64 0}
!16 = !{!"_ZTSSt6vectorIiSaIiEE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"_ZTSSt6vectorIdSaIdEE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!14, !10, i64 8}
!27 = distinct !{!27, !25}
!28 = distinct !{!28, !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.53 = external hidden unnamed_addr constant [17 x i8], align 1
@__PRETTY_FUNCTION__._ZN17HighsSparseMatrix8scaleColEid = external hidden unnamed_addr constant [63 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.93 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.94 = external hidden unnamed_addr constant [9 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: 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 #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 zeroext i1 @_ZNK17HighsSparseMatrix8formatOkEv(ptr noundef nonnull align 8 dereferenceable(112)) local_unnamed_addr #0 align 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 #0 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN17HighsSparseMatrix8scaleColEid(ptr noundef nonnull align 8 dereferenceable(112) %0, i32 noundef %1, double noundef %2) local_unnamed_addr #0 align 2 {
  %4 = tail call noundef zeroext i1 @_ZNK17HighsSparseMatrix8formatOkEv(ptr noundef nonnull align 8 dereferenceable(112) %0)
  br i1 %4, label %6, label %5

5:                                                ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str.53, ptr noundef nonnull @.str.52, i32 noundef 894, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN17HighsSparseMatrix8scaleColEid) #2
  unreachable

6:                                                ; preds = %3
  %7 = icmp sgt i32 %1, -1
  br i1 %7, label %9, label %8

8:                                                ; preds = %6
  tail call void @__assert_fail(ptr noundef nonnull @.str.92, ptr noundef nonnull @.str.52, i32 noundef 895, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN17HighsSparseMatrix8scaleColEid) #2
  unreachable

9:                                                ; preds = %6
  %10 = getelementptr inbounds i8, ptr %0, i64 4
  %11 = load i32, ptr %10, align 4, !tbaa !5
  %12 = icmp sgt i32 %11, %1
  br i1 %12, label %14, label %13

13:                                               ; preds = %9
  tail call void @__assert_fail(ptr noundef nonnull @.str.93, ptr noundef nonnull @.str.52, i32 noundef 896, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN17HighsSparseMatrix8scaleColEid) #2
  unreachable

14:                                               ; preds = %9
  %15 = fcmp une double %2, 0.000000e+00
  br i1 %15, label %17, label %16

16:                                               ; preds = %14
  tail call void @__assert_fail(ptr noundef nonnull @.str.94, ptr noundef nonnull @.str.52, i32 noundef 897, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN17HighsSparseMatrix8scaleColEid) #2
  unreachable

17:                                               ; preds = %14
  %18 = tail call noundef zeroext i1 @_ZNK17HighsSparseMatrix9isColwiseEv(ptr noundef nonnull align 8 dereferenceable(112) %0)
  br i1 %18, label %25, label %.preheader

.preheader:                                       ; preds = %17
  %19 = getelementptr inbounds i8, ptr %0, i64 8
  %20 = load i32, ptr %19, align 8, !tbaa !20
  %21 = icmp sgt i32 %20, 0
  br i1 %21, label %.lr.ph27, label %.loopexit

.lr.ph27:                                         ; preds = %.preheader
  %22 = getelementptr inbounds i8, ptr %0, i64 16
  %23 = getelementptr inbounds i8, ptr %0, i64 64
  %24 = getelementptr inbounds i8, ptr %0, i64 88
  br label %48

25:                                               ; preds = %17
  %26 = getelementptr inbounds i8, ptr %0, i64 16
  %27 = zext nneg i32 %1 to i64
  %28 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %27) #3
  %29 = load i32, ptr %28, align 4, !tbaa !21
  %30 = add nuw nsw i32 %1, 1
  %31 = zext nneg i32 %30 to i64
  %32 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %31) #3
  %33 = load i32, ptr %32, align 4, !tbaa !21
  %34 = icmp slt i32 %29, %33
  br i1 %34, label %.lr.ph29, label %.loopexit

.lr.ph29:                                         ; preds = %25
  %35 = getelementptr inbounds i8, ptr %0, i64 88
  %36 = sext i32 %29 to i64
  br label %37

37:                                               ; preds = %.lr.ph29, %37
  %indvars.iv35 = phi i64 [ %36, %.lr.ph29 ], [ %indvars.iv.next36, %37 ]
  %38 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %35, i64 noundef %indvars.iv35) #3
  %39 = load double, ptr %38, align 8, !tbaa !22
  %40 = fmul double %39, %2
  store double %40, ptr %38, align 8, !tbaa !22
  %indvars.iv.next36 = add nsw i64 %indvars.iv35, 1
  %41 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %31) #3
  %42 = load i32, ptr %41, align 4, !tbaa !21
  %43 = sext i32 %42 to i64
  %44 = icmp slt i64 %indvars.iv.next36, %43
  br i1 %44, label %37, label %.loopexit, !llvm.loop !24

.loopexit23:                                      ; preds = %62, %48
  %45 = load i32, ptr %19, align 8, !tbaa !20
  %46 = sext i32 %45 to i64
  %47 = icmp slt i64 %indvars.iv.next33, %46
  br i1 %47, label %48, label %.loopexit, !llvm.loop !26

48:                                               ; preds = %.lr.ph27, %.loopexit23
  %indvars.iv32 = phi i64 [ 0, %.lr.ph27 ], [ %indvars.iv.next33, %.loopexit23 ]
  %49 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %indvars.iv32) #3
  %50 = load i32, ptr %49, align 4, !tbaa !21
  %indvars.iv.next33 = add nuw nsw i64 %indvars.iv32, 1
  %51 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %indvars.iv.next33) #3
  %52 = load i32, ptr %51, align 4, !tbaa !21
  %53 = icmp slt i32 %50, %52
  br i1 %53, label %.lr.ph.preheader, label %.loopexit23

.lr.ph.preheader:                                 ; preds = %48
  %54 = sext i32 %50 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %62
  %indvars.iv = phi i64 [ %54, %.lr.ph.preheader ], [ %indvars.iv.next, %62 ]
  %55 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %indvars.iv) #3
  %56 = load i32, ptr %55, align 4, !tbaa !21
  %57 = icmp eq i32 %56, %1
  br i1 %57, label %58, label %62

58:                                               ; preds = %.lr.ph
  %59 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %indvars.iv) #3
  %60 = load double, ptr %59, align 8, !tbaa !22
  %61 = fmul double %60, %2
  store double %61, ptr %59, align 8, !tbaa !22
  br label %62

62:                                               ; preds = %.lr.ph, %58
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %63 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %indvars.iv.next33) #3
  %64 = load i32, ptr %63, align 4, !tbaa !21
  %65 = sext i32 %64 to i64
  %66 = icmp slt i64 %indvars.iv.next, %65
  br i1 %66, label %.lr.ph, label %.loopexit23, !llvm.loop !27

.loopexit:                                        ; preds = %.loopexit23, %37, %.preheader, %25
  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 4}
!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 = !{!6, !10, i64 8}
!21 = !{!10, !10, i64 0}
!22 = !{!23, !23, i64 0}
!23 = !{!"double", !8, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}
!27 = distinct !{!27, !25}


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