; LLVM IR from cvxpy/cvxpy :: cvxpy/cvxcore/src (Utils)

; 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.std::vector.1" = type { %"struct.std::_Vector_base.2" }
%"struct.std::_Vector_base.2" = type { %"struct.std::_Vector_base<Eigen::SparseMatrix<double>, std::allocator<Eigen::SparseMatrix<double>>>::_Vector_impl" }
%"struct.std::_Vector_base<Eigen::SparseMatrix<double>, std::allocator<Eigen::SparseMatrix<double>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Eigen::SparseMatrix<double>, std::allocator<Eigen::SparseMatrix<double>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Eigen::SparseMatrix<double>, std::allocator<Eigen::SparseMatrix<double>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Eigen::SparseMatrix" = type { %"class.Eigen::SparseCompressedBase", i64, i64, ptr, ptr, %"class.Eigen::internal::CompressedStorage" }
%"class.Eigen::SparseCompressedBase" = type { %"class.Eigen::SparseMatrixBase" }
%"class.Eigen::SparseMatrixBase" = type { i8 }
%"class.Eigen::internal::CompressedStorage" = type { ptr, ptr, i64, i64 }
%"class.Eigen::Product" = type { %"class.Eigen::ProductImpl", ptr, ptr }
%"class.Eigen::ProductImpl" = type { %"class.Eigen::SparseMatrixBase.6" }
%"class.Eigen::SparseMatrixBase.6" = type { i8 }

@.str = external hidden unnamed_addr constant [41 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [73 x i8], align 1
@__PRETTY_FUNCTION__._Z11mat_vec_mulRKSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EES6_ = external hidden unnamed_addr constant [90 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 uwtable
define dso_local void @_Z11mat_vec_mulRKSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EES6_(ptr dead_on_unwind noalias writable sret(%"class.std::vector.1") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) #1 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i1, align 1
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"class.Eigen::SparseMatrix", align 8
  %14 = alloca %"class.Eigen::Product", align 8
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = call noundef i64 @_ZNKSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  %17 = icmp eq i64 %16, 1
  br i1 %17, label %22, label %18

18:                                               ; preds = %3
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = call noundef i64 @_ZNKSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #6
  %21 = icmp eq i64 %20, 1
  br label %22

22:                                               ; preds = %18, %3
  %23 = phi i1 [ true, %3 ], [ %21, %18 ]
  br i1 %23, label %24, label %25

24:                                               ; preds = %22
  br label %27

25:                                               ; preds = %22
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.4, i32 noundef 24, ptr noundef @__PRETTY_FUNCTION__._Z11mat_vec_mulRKSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EES6_) #7
  unreachable

26:                                               ; No predecessors!
  br label %27

27:                                               ; preds = %26, %24
  store i1 false, ptr %7, align 1
  call void @_ZNSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = call noundef i64 @_ZNKSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %28) #6
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = call noundef i64 @_ZNKSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #6
  %32 = mul i64 %29, %31
  invoke void @_ZNSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %32)
          to label %33 unwind label %41

33:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %34

34:                                               ; preds = %78, %33
  %35 = load i32, ptr %10, align 4, !tbaa !9
  %36 = zext i32 %35 to i64
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = call noundef i64 @_ZNKSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #6
  %39 = icmp ult i64 %36, %38
  br i1 %39, label %45, label %40

40:                                               ; preds = %34
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %81

41:                                               ; preds = %27
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %8, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %9, align 4
  br label %85

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

46:                                               ; preds = %65, %45
  %47 = load i32, ptr %12, align 4, !tbaa !9
  %48 = zext i32 %47 to i64
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = call noundef i64 @_ZNKSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %49) #6
  %51 = icmp ult i64 %48, %50
  br i1 %51, label %53, label %52

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

53:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 72, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #6
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = load i32, ptr %10, align 4, !tbaa !9
  %56 = zext i32 %55 to i64
  %57 = call noundef nonnull align 8 dereferenceable(72) ptr @_ZNKSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %54, i64 noundef %56) #6
  %58 = load ptr, ptr %6, align 8, !tbaa !5
  %59 = load i32, ptr %12, align 4, !tbaa !9
  %60 = zext i32 %59 to i64
  %61 = call noundef nonnull align 8 dereferenceable(72) ptr @_ZNKSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %58, i64 noundef %60) #6
  invoke void @_ZNK5Eigen16SparseMatrixBaseINS_12SparseMatrixIdLi0EiEEEmlIS2_EEKNS_7ProductIS2_T_Li2EEERKNS0_IS6_EE(ptr dead_on_unwind writable sret(%"class.Eigen::Product") align 8 %14, ptr noundef nonnull align 1 dereferenceable(1) %57, ptr noundef nonnull align 1 dereferenceable(1) %61)
          to label %62 unwind label %68

62:                                               ; preds = %53
  invoke void @_ZN5Eigen12SparseMatrixIdLi0EiEC2INS_7ProductIS1_S1_Li2EEEEERKNS_16SparseMatrixBaseIT_EE(ptr noundef nonnull align 8 dereferenceable(72) %13, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %63 unwind label %68

63:                                               ; preds = %62
  invoke void @_ZNSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(72) %13)
          to label %64 unwind label %72

64:                                               ; preds = %63
  call void @_ZN5Eigen12SparseMatrixIdLi0EiED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %13) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %13) #6
  br label %65

65:                                               ; preds = %64
  %66 = load i32, ptr %12, align 4, !tbaa !9
  %67 = add i32 %66, 1
  store i32 %67, ptr %12, align 4, !tbaa !9
  br label %46, !llvm.loop !11

68:                                               ; preds = %62, %53
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %8, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %9, align 4
  br label %76

72:                                               ; preds = %63
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %8, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %9, align 4
  call void @_ZN5Eigen12SparseMatrixIdLi0EiED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %13) #6
  br label %76

76:                                               ; preds = %72, %68
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %85

77:                                               ; preds = %52
  br label %78

78:                                               ; preds = %77
  %79 = load i32, ptr %10, align 4, !tbaa !9
  %80 = add i32 %79, 1
  store i32 %80, ptr %10, align 4, !tbaa !9
  br label %34, !llvm.loop !13

81:                                               ; preds = %40
  store i1 true, ptr %7, align 1
  store i32 1, ptr %11, align 4
  %82 = load i1, ptr %7, align 1
  br i1 %82, label %84, label %83

83:                                               ; preds = %81
  call void @_ZNSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  br label %84

84:                                               ; preds = %83, %81
  ret void

85:                                               ; preds = %76, %41
  call void @_ZNSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  br label %86

86:                                               ; preds = %85
  %87 = load ptr, ptr %8, align 8
  %88 = load i32, ptr %9, align 4
  %89 = insertvalue { ptr, i32 } poison, ptr %87, 0
  %90 = insertvalue { ptr, i32 } %89, i32 %88, 1
  resume { ptr, i32 } %90
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(72)) #1 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Eigen16SparseMatrixBaseINS_12SparseMatrixIdLi0EiEEEmlIS2_EEKNS_7ProductIS2_T_Li2EEERKNS0_IS6_EE(ptr dead_on_unwind noalias writable sret(%"class.Eigen::Product") align 8, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5Eigen12SparseMatrixIdLi0EiEC2INS_7ProductIS1_S1_Li2EEEEERKNS_16SparseMatrixBaseIT_EE(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5Eigen12SparseMatrixIdLi0EiED2Ev(ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { inlinehint 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 = { inlinehint 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 #6 = { nounwind }
attributes #7 = { noreturn 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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


; 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.std::vector.1" = type { %"struct.std::_Vector_base.2" }
%"struct.std::_Vector_base.2" = type { %"struct.std::_Vector_base<Eigen::SparseMatrix<double>, std::allocator<Eigen::SparseMatrix<double>>>::_Vector_impl" }
%"struct.std::_Vector_base<Eigen::SparseMatrix<double>, std::allocator<Eigen::SparseMatrix<double>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Eigen::SparseMatrix<double>, std::allocator<Eigen::SparseMatrix<double>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Eigen::SparseMatrix<double>, std::allocator<Eigen::SparseMatrix<double>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Eigen::SparseMatrix" = type { %"class.Eigen::SparseCompressedBase", i64, i64, ptr, ptr, %"class.Eigen::internal::CompressedStorage" }
%"class.Eigen::SparseCompressedBase" = type { %"class.Eigen::SparseMatrixBase" }
%"class.Eigen::SparseMatrixBase" = type { i8 }
%"class.Eigen::internal::CompressedStorage" = type { ptr, ptr, i64, i64 }
%"class.Eigen::Product" = type { %"class.Eigen::ProductImpl", ptr, ptr }
%"class.Eigen::ProductImpl" = type { %"class.Eigen::SparseMatrixBase.6" }
%"class.Eigen::SparseMatrixBase.6" = type { i8 }

@.str = external hidden unnamed_addr constant [41 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [73 x i8], align 1
@__PRETTY_FUNCTION__._Z11mat_vec_mulRKSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EES6_ = external hidden unnamed_addr constant [90 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 uwtable
define dso_local void @_Z11mat_vec_mulRKSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EES6_(ptr dead_on_unwind noalias writable sret(%"class.std::vector.1") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.Eigen::SparseMatrix", align 8
  %5 = alloca %"class.Eigen::Product", align 8
  %6 = tail call noundef i64 @_ZNKSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %7 = icmp eq i64 %6, 1
  br i1 %7, label %.critedge, label %8

8:                                                ; preds = %3
  %9 = tail call noundef i64 @_ZNKSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %10 = icmp eq i64 %9, 1
  br i1 %10, label %.critedge, label %11

11:                                               ; preds = %8
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.4, i32 noundef 24, ptr noundef nonnull @__PRETTY_FUNCTION__._Z11mat_vec_mulRKSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EES6_) #7
  unreachable

.critedge:                                        ; preds = %3, %8
  tail call void @_ZNSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  %12 = tail call noundef i64 @_ZNKSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %13 = tail call noundef i64 @_ZNKSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %14 = mul i64 %13, %12
  invoke void @_ZNSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %14)
          to label %.preheader24 unwind label %18

.preheader24:                                     ; preds = %.critedge
  %15 = tail call noundef i64 @_ZNKSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %.not = icmp eq i64 %15, 0
  br i1 %.not, label %._crit_edge27, label %.preheader

.preheader:                                       ; preds = %.preheader24, %._crit_edge
  %16 = phi i64 [ %21, %._crit_edge ], [ 0, %.preheader24 ]
  %.01626 = phi i32 [ %20, %._crit_edge ], [ 0, %.preheader24 ]
  %17 = call noundef i64 @_ZNKSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %.not28 = icmp eq i64 %17, 0
  br i1 %.not28, label %._crit_edge, label %.lr.ph

18:                                               ; preds = %.critedge
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %39

._crit_edge:                                      ; preds = %29, %.preheader
  %20 = add i32 %.01626, 1
  %21 = zext i32 %20 to i64
  %22 = call noundef i64 @_ZNKSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %23 = icmp ugt i64 %22, %21
  br i1 %23, label %.preheader, label %._crit_edge27, !llvm.loop !5

.lr.ph:                                           ; preds = %.preheader, %29
  %24 = phi i64 [ %31, %29 ], [ 0, %.preheader ]
  %.025 = phi i32 [ %30, %29 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  %25 = call noundef nonnull align 8 dereferenceable(72) ptr @_ZNKSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %16) #6
  %26 = call noundef nonnull align 8 dereferenceable(72) ptr @_ZNKSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %24) #6
  invoke void @_ZNK5Eigen16SparseMatrixBaseINS_12SparseMatrixIdLi0EiEEEmlIS2_EEKNS_7ProductIS2_T_Li2EEERKNS0_IS6_EE(ptr dead_on_unwind nonnull writable sret(%"class.Eigen::Product") align 8 %5, ptr noundef nonnull align 1 dereferenceable(1) %25, ptr noundef nonnull align 1 dereferenceable(1) %26)
          to label %27 unwind label %34

27:                                               ; preds = %.lr.ph
  invoke void @_ZN5Eigen12SparseMatrixIdLi0EiEC2INS_7ProductIS1_S1_Li2EEEEERKNS_16SparseMatrixBaseIT_EE(ptr noundef nonnull align 8 dereferenceable(72) %4, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %28 unwind label %34

28:                                               ; preds = %27
  invoke void @_ZNSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(72) %4)
          to label %29 unwind label %36

29:                                               ; preds = %28
  call void @_ZN5Eigen12SparseMatrixIdLi0EiED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %4) #6
  %30 = add i32 %.025, 1
  %31 = zext i32 %30 to i64
  %32 = call noundef i64 @_ZNKSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %33 = icmp ugt i64 %32, %31
  br i1 %33, label %.lr.ph, label %._crit_edge, !llvm.loop !7

34:                                               ; preds = %27, %.lr.ph
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %38

36:                                               ; preds = %28
  %37 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5Eigen12SparseMatrixIdLi0EiED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %4) #6
  br label %38

38:                                               ; preds = %36, %34
  %.pn = phi { ptr, i32 } [ %37, %36 ], [ %35, %34 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %4) #6
  br label %39

._crit_edge27:                                    ; preds = %._crit_edge, %.preheader24
  ret void

39:                                               ; preds = %38, %18
  %.pn.pn = phi { ptr, i32 } [ %.pn, %38 ], [ %19, %18 ]
  call void @_ZNSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  resume { ptr, i32 } %.pn.pn
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #1 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Eigen16SparseMatrixBaseINS_12SparseMatrixIdLi0EiEEEmlIS2_EEKNS_7ProductIS2_T_Li2EEERKNS0_IS6_EE(ptr dead_on_unwind noalias writable sret(%"class.Eigen::Product") align 8, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5Eigen12SparseMatrixIdLi0EiEC2INS_7ProductIS1_S1_Li2EEEEERKNS_16SparseMatrixBaseIT_EE(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5Eigen12SparseMatrixIdLi0EiED2Ev(ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { inlinehint 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 = { inlinehint 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 #6 = { nounwind }
attributes #7 = { noreturn 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass