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

; 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__._ZNK17HighsSparseMatrix7productERSt6vectorIdSaIdEERKS2_ = external hidden unnamed_addr constant [80 x i8], align 1
@.str.103 = external hidden unnamed_addr constant [34 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 zeroext i1 @_ZNK17HighsSparseMatrix8formatOkEv(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 @_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
declare dso_local noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #3

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

15:                                               ; preds = %3
  br label %18

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

17:                                               ; No predecessors!
  br label %18

18:                                               ; preds = %17, %15
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #6
  %21 = trunc i64 %20 to i32
  %22 = getelementptr inbounds %class.HighsSparseMatrix, ptr %13, i32 0, i32 1
  %23 = load i32, ptr %22, align 4, !tbaa !9
  %24 = icmp sge i32 %21, %23
  br i1 %24, label %25, label %26

25:                                               ; preds = %18
  br label %28

26:                                               ; preds = %18
  call void @__assert_fail(ptr noundef @.str.103, ptr noundef @.str.52, i32 noundef 1170, ptr noundef @__PRETTY_FUNCTION__._ZNK17HighsSparseMatrix7productERSt6vectorIdSaIdEERKS2_) #5
  unreachable

27:                                               ; No predecessors!
  br label %28

28:                                               ; preds = %27, %25
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = getelementptr inbounds %class.HighsSparseMatrix, ptr %13, i32 0, i32 2
  %31 = load i32, ptr %30, align 8, !tbaa !21
  %32 = sext i32 %31 to i64
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store double 0.000000e+00, ptr %7, align 8, !tbaa !22
  call void @_ZNSt6vectorIdSaIdEE6assignEmRKd(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %32, ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  %33 = call noundef zeroext i1 @_ZNK17HighsSparseMatrix9isColwiseEv(ptr noundef nonnull align 8 dereferenceable(112) %13)
  br i1 %33, label %34, label %86

34:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !24
  br label %35

35:                                               ; preds = %82, %34
  %36 = load i32, ptr %8, align 4, !tbaa !24
  %37 = getelementptr inbounds %class.HighsSparseMatrix, ptr %13, i32 0, i32 1
  %38 = load i32, ptr %37, align 4, !tbaa !9
  %39 = icmp slt i32 %36, %38
  br i1 %39, label %41, label %40

40:                                               ; preds = %35
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %85

41:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %42 = getelementptr inbounds %class.HighsSparseMatrix, ptr %13, i32 0, i32 3
  %43 = load i32, ptr %8, align 4, !tbaa !24
  %44 = sext i32 %43 to i64
  %45 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %42, i64 noundef %44) #6
  %46 = load i32, ptr %45, align 4, !tbaa !24
  store i32 %46, ptr %10, align 4, !tbaa !24
  br label %47

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

56:                                               ; preds = %47
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %81

57:                                               ; preds = %47
  %58 = load ptr, ptr %6, align 8, !tbaa !5
  %59 = load i32, ptr %8, align 4, !tbaa !24
  %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) #6
  %62 = load double, ptr %61, align 8, !tbaa !22
  %63 = getelementptr inbounds %class.HighsSparseMatrix, ptr %13, i32 0, i32 6
  %64 = load i32, ptr %10, align 4, !tbaa !24
  %65 = sext i32 %64 to i64
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %63, i64 noundef %65) #6
  %67 = load double, ptr %66, align 8, !tbaa !22
  %68 = load ptr, ptr %5, align 8, !tbaa !5
  %69 = getelementptr inbounds %class.HighsSparseMatrix, ptr %13, i32 0, i32 5
  %70 = load i32, ptr %10, align 4, !tbaa !24
  %71 = sext i32 %70 to i64
  %72 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %69, i64 noundef %71) #6
  %73 = load i32, ptr %72, align 4, !tbaa !24
  %74 = sext i32 %73 to i64
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %68, i64 noundef %74) #6
  %76 = load double, ptr %75, align 8, !tbaa !22
  %77 = call double @llvm.fmuladd.f64(double %62, double %67, double %76)
  store double %77, ptr %75, align 8, !tbaa !22
  br label %78

78:                                               ; preds = %57
  %79 = load i32, ptr %10, align 4, !tbaa !24
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %10, align 4, !tbaa !24
  br label %47, !llvm.loop !25

81:                                               ; preds = %56
  br label %82

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

85:                                               ; preds = %40
  br label %138

86:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !24
  br label %87

87:                                               ; preds = %134, %86
  %88 = load i32, ptr %11, align 4, !tbaa !24
  %89 = getelementptr inbounds %class.HighsSparseMatrix, ptr %13, i32 0, i32 2
  %90 = load i32, ptr %89, align 8, !tbaa !21
  %91 = icmp slt i32 %88, %90
  br i1 %91, label %93, label %92

92:                                               ; preds = %87
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %137

93:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %94 = getelementptr inbounds %class.HighsSparseMatrix, ptr %13, i32 0, i32 3
  %95 = load i32, ptr %11, align 4, !tbaa !24
  %96 = sext i32 %95 to i64
  %97 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %94, i64 noundef %96) #6
  %98 = load i32, ptr %97, align 4, !tbaa !24
  store i32 %98, ptr %12, align 4, !tbaa !24
  br label %99

99:                                               ; preds = %130, %93
  %100 = load i32, ptr %12, align 4, !tbaa !24
  %101 = getelementptr inbounds %class.HighsSparseMatrix, ptr %13, i32 0, i32 3
  %102 = load i32, ptr %11, align 4, !tbaa !24
  %103 = add nsw i32 %102, 1
  %104 = sext i32 %103 to i64
  %105 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %101, i64 noundef %104) #6
  %106 = load i32, ptr %105, align 4, !tbaa !24
  %107 = icmp slt i32 %100, %106
  br i1 %107, label %109, label %108

108:                                              ; preds = %99
  store i32 11, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %133

109:                                              ; preds = %99
  %110 = load ptr, ptr %6, align 8, !tbaa !5
  %111 = getelementptr inbounds %class.HighsSparseMatrix, ptr %13, i32 0, i32 5
  %112 = load i32, ptr %12, align 4, !tbaa !24
  %113 = sext i32 %112 to i64
  %114 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %111, i64 noundef %113) #6
  %115 = load i32, ptr %114, align 4, !tbaa !24
  %116 = sext i32 %115 to i64
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %110, i64 noundef %116) #6
  %118 = load double, ptr %117, align 8, !tbaa !22
  %119 = getelementptr inbounds %class.HighsSparseMatrix, ptr %13, i32 0, i32 6
  %120 = load i32, ptr %12, align 4, !tbaa !24
  %121 = sext i32 %120 to i64
  %122 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %119, i64 noundef %121) #6
  %123 = load double, ptr %122, align 8, !tbaa !22
  %124 = load ptr, ptr %5, align 8, !tbaa !5
  %125 = load i32, ptr %11, align 4, !tbaa !24
  %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) #6
  %128 = load double, ptr %127, align 8, !tbaa !22
  %129 = call double @llvm.fmuladd.f64(double %118, double %123, double %128)
  store double %129, ptr %127, align 8, !tbaa !22
  br label %130

130:                                              ; preds = %109
  %131 = load i32, ptr %12, align 4, !tbaa !24
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %12, align 4, !tbaa !24
  br label %99, !llvm.loop !28

133:                                              ; preds = %108
  br label %134

134:                                              ; preds = %133
  %135 = load i32, ptr %11, align 4, !tbaa !24
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %11, align 4, !tbaa !24
  br label %87, !llvm.loop !29

137:                                              ; preds = %92
  br label %138

138:                                              ; preds = %137, %85
  ret void
}

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

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 = { 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, !12, i64 4}
!10 = !{!"_ZTS17HighsSparseMatrix", !11, i64 0, !12, i64 4, !12, i64 8, !13, i64 16, !13, i64 40, !13, i64 64, !17, i64 88}
!11 = !{!"_ZTS12MatrixFormat", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!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 = !{!10, !12, i64 8}
!22 = !{!23, !23, i64 0}
!23 = !{!"double", !7, i64 0}
!24 = !{!12, !12, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = distinct !{!27, !26}
!28 = distinct !{!28, !26}
!29 = distinct !{!29, !26}


; 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__._ZNK17HighsSparseMatrix7productERSt6vectorIdSaIdEERKS2_ = external hidden unnamed_addr constant [80 x i8], align 1
@.str.103 = external hidden unnamed_addr constant [34 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: 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 zeroext i1 @_ZNK17HighsSparseMatrix8formatOkEv(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 nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #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) 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 uwtable
define dso_local void @_ZNK17HighsSparseMatrix7productERSt6vectorIdSaIdEERKS2_(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) local_unnamed_addr #4 align 2 {
  %4 = alloca double, align 8
  %5 = tail call noundef zeroext i1 @_ZNK17HighsSparseMatrix8formatOkEv(ptr noundef nonnull align 8 dereferenceable(112) %0)
  br i1 %5, label %7, label %6

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

7:                                                ; preds = %3
  %8 = tail call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %9 = trunc i64 %8 to i32
  %10 = getelementptr inbounds i8, ptr %0, i64 4
  %11 = load i32, ptr %10, align 4, !tbaa !5
  %.not = icmp sgt i32 %11, %9
  br i1 %.not, label %12, label %13

12:                                               ; preds = %7
  tail call void @__assert_fail(ptr noundef nonnull @.str.103, ptr noundef nonnull @.str.52, i32 noundef 1170, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK17HighsSparseMatrix7productERSt6vectorIdSaIdEERKS2_) #5
  unreachable

13:                                               ; preds = %7
  %14 = getelementptr inbounds i8, ptr %0, i64 8
  %15 = load i32, ptr %14, align 8, !tbaa !20
  %16 = sext i32 %15 to i64
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  store double 0.000000e+00, ptr %4, align 8, !tbaa !21
  call void @_ZNSt6vectorIdSaIdEE6assignEmRKd(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %16, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  %17 = call noundef zeroext i1 @_ZNK17HighsSparseMatrix9isColwiseEv(ptr noundef nonnull align 8 dereferenceable(112) %0)
  br i1 %17, label %.preheader, label %.preheader29

.preheader29:                                     ; preds = %13
  %18 = load i32, ptr %14, align 8, !tbaa !20
  %19 = icmp sgt i32 %18, 0
  br i1 %19, label %.lr.ph34, label %.loopexit27

.lr.ph34:                                         ; preds = %.preheader29
  %20 = getelementptr inbounds i8, ptr %0, i64 16
  %21 = getelementptr inbounds i8, ptr %0, i64 64
  %22 = getelementptr inbounds i8, ptr %0, i64 88
  br label %55

.preheader:                                       ; preds = %13
  %23 = load i32, ptr %10, align 4, !tbaa !5
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %.lr.ph38, label %.loopexit27

.lr.ph38:                                         ; preds = %.preheader
  %25 = getelementptr inbounds i8, ptr %0, i64 16
  %26 = getelementptr inbounds i8, ptr %0, i64 88
  %27 = getelementptr inbounds i8, ptr %0, i64 64
  br label %31

.loopexit:                                        ; preds = %.lr.ph36, %31
  %28 = load i32, ptr %10, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = icmp slt i64 %indvars.iv.next48, %29
  br i1 %30, label %31, label %.loopexit27, !llvm.loop !23

31:                                               ; preds = %.lr.ph38, %.loopexit
  %indvars.iv47 = phi i64 [ 0, %.lr.ph38 ], [ %indvars.iv.next48, %.loopexit ]
  %32 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %indvars.iv47) #6
  %33 = load i32, ptr %32, align 4, !tbaa !25
  %indvars.iv.next48 = add nuw nsw i64 %indvars.iv47, 1
  %34 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %indvars.iv.next48) #6
  %35 = load i32, ptr %34, align 4, !tbaa !25
  %36 = icmp slt i32 %33, %35
  br i1 %36, label %.lr.ph36.preheader, label %.loopexit

.lr.ph36.preheader:                               ; preds = %31
  %37 = sext i32 %33 to i64
  br label %.lr.ph36

.lr.ph36:                                         ; preds = %.lr.ph36.preheader, %.lr.ph36
  %indvars.iv44 = phi i64 [ %37, %.lr.ph36.preheader ], [ %indvars.iv.next45, %.lr.ph36 ]
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv47) #6
  %39 = load double, ptr %38, align 8, !tbaa !21
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %indvars.iv44) #6
  %41 = load double, ptr %40, align 8, !tbaa !21
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef %indvars.iv44) #6
  %43 = load i32, ptr %42, align 4, !tbaa !25
  %44 = sext i32 %43 to i64
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %44) #6
  %46 = load double, ptr %45, align 8, !tbaa !21
  %47 = call double @llvm.fmuladd.f64(double %39, double %41, double %46)
  store double %47, ptr %45, align 8, !tbaa !21
  %indvars.iv.next45 = add nsw i64 %indvars.iv44, 1
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %indvars.iv.next48) #6
  %49 = load i32, ptr %48, align 4, !tbaa !25
  %50 = sext i32 %49 to i64
  %51 = icmp slt i64 %indvars.iv.next45, %50
  br i1 %51, label %.lr.ph36, label %.loopexit, !llvm.loop !26

.loopexit28:                                      ; preds = %.lr.ph, %55
  %52 = load i32, ptr %14, align 8, !tbaa !20
  %53 = sext i32 %52 to i64
  %54 = icmp slt i64 %indvars.iv.next42, %53
  br i1 %54, label %55, label %.loopexit27, !llvm.loop !27

55:                                               ; preds = %.lr.ph34, %.loopexit28
  %indvars.iv41 = phi i64 [ 0, %.lr.ph34 ], [ %indvars.iv.next42, %.loopexit28 ]
  %56 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %indvars.iv41) #6
  %57 = load i32, ptr %56, align 4, !tbaa !25
  %indvars.iv.next42 = add nuw nsw i64 %indvars.iv41, 1
  %58 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %indvars.iv.next42) #6
  %59 = load i32, ptr %58, align 4, !tbaa !25
  %60 = icmp slt i32 %57, %59
  br i1 %60, label %.lr.ph.preheader, label %.loopexit28

.lr.ph.preheader:                                 ; preds = %55
  %61 = sext i32 %57 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ %61, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %62 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %indvars.iv) #6
  %63 = load i32, ptr %62, align 4, !tbaa !25
  %64 = sext i32 %63 to i64
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %64) #6
  %66 = load double, ptr %65, align 8, !tbaa !21
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %indvars.iv) #6
  %68 = load double, ptr %67, align 8, !tbaa !21
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv41) #6
  %70 = load double, ptr %69, align 8, !tbaa !21
  %71 = call double @llvm.fmuladd.f64(double %66, double %68, double %70)
  store double %71, ptr %69, align 8, !tbaa !21
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %72 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %indvars.iv.next42) #6
  %73 = load i32, ptr %72, align 4, !tbaa !25
  %74 = sext i32 %73 to i64
  %75 = icmp slt i64 %indvars.iv.next, %74
  br i1 %75, label %.lr.ph, label %.loopexit28, !llvm.loop !28

.loopexit27:                                      ; preds = %.loopexit28, %.loopexit, %.preheader29, %.preheader
  ret void
}

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

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 = { 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, !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 = !{!22, !22, i64 0}
!22 = !{!"double", !8, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!10, !10, i64 0}
!26 = distinct !{!26, !24}
!27 = distinct !{!27, !24}
!28 = distinct !{!28, !24}


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