; LLVM IR from Derek-TH-Wang/quadruped_ctrl :: src/MPC_Ctrl/SparseCMPC.ll (ZN10SparseCMPC19addForceConstraintsEv)

; 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.SparseCMPC = type <{ %"class.Eigen::Matrix", [8 x i8], %"class.Eigen::Matrix.3", double, double, double, double, %"class.Eigen::Matrix.13", %"class.Eigen::Matrix.13", %"class.Eigen::Matrix.13", %"class.Eigen::Matrix.13", %"class.Eigen::Matrix.23", %"class.Eigen::Matrix.3", %"class.Eigen::Matrix.3", %"class.Eigen::Matrix.3", %"class.std::vector", %"class.std::vector.33", %"class.std::vector.38", %"class.std::vector.43", %"class.std::vector.49", %"class.std::vector.54", %"class.std::vector.60", %"class.std::vector.60", %"class.std::vector.65", %"class.std::vector.65", %"class.std::vector.38", %"class.std::vector.38", %"class.std::vector.38", %"class.Eigen::Matrix.70", i32, i32, i32, [12 x i8] }>
%"class.Eigen::Matrix" = type { %"class.Eigen::PlainObjectBase" }
%"class.Eigen::PlainObjectBase" = type { %"class.Eigen::DenseStorage" }
%"class.Eigen::DenseStorage" = type { %"struct.Eigen::internal::plain_array" }
%"struct.Eigen::internal::plain_array" = type { [9 x double] }
%"class.Eigen::Matrix.13" = type { %"class.Eigen::PlainObjectBase.14" }
%"class.Eigen::PlainObjectBase.14" = type { %"class.Eigen::DenseStorage.21" }
%"class.Eigen::DenseStorage.21" = type { %"struct.Eigen::internal::plain_array.22" }
%"struct.Eigen::internal::plain_array.22" = type { [3 x double] }
%"class.Eigen::Matrix.23" = type { %"class.Eigen::PlainObjectBase.24" }
%"class.Eigen::PlainObjectBase.24" = type { %"class.Eigen::DenseStorage.31" }
%"class.Eigen::DenseStorage.31" = type { %"struct.Eigen::internal::plain_array.32" }
%"struct.Eigen::internal::plain_array.32" = type { [4 x double] }
%"class.Eigen::Matrix.3" = type { %"class.Eigen::PlainObjectBase.4" }
%"class.Eigen::PlainObjectBase.4" = type { %"class.Eigen::DenseStorage.11" }
%"class.Eigen::DenseStorage.11" = type { %"struct.Eigen::internal::plain_array.12" }
%"struct.Eigen::internal::plain_array.12" = type { [12 x double] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<ContactState, std::allocator<ContactState>>::_Vector_impl" }
%"struct.std::_Vector_base<ContactState, std::allocator<ContactState>>::_Vector_impl" = type { %"struct.std::_Vector_base<ContactState, std::allocator<ContactState>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ContactState, std::allocator<ContactState>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.33" = type { %"struct.std::_Vector_base.34" }
%"struct.std::_Vector_base.34" = type { %"struct.std::_Vector_base<Eigen::Matrix<double, 12, 1>, Eigen::aligned_allocator<Eigen::Matrix<double, 12, 1>>>::_Vector_impl" }
%"struct.std::_Vector_base<Eigen::Matrix<double, 12, 1>, Eigen::aligned_allocator<Eigen::Matrix<double, 12, 1>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Eigen::Matrix<double, 12, 1>, Eigen::aligned_allocator<Eigen::Matrix<double, 12, 1>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Eigen::Matrix<double, 12, 1>, Eigen::aligned_allocator<Eigen::Matrix<double, 12, 1>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.43" = type { %"struct.std::_Vector_base.44" }
%"struct.std::_Vector_base.44" = type { %"struct.std::_Vector_base<Eigen::Matrix<double, 12, 12>, Eigen::aligned_allocator<Eigen::Matrix<double, 12, 12>>>::_Vector_impl" }
%"struct.std::_Vector_base<Eigen::Matrix<double, 12, 12>, Eigen::aligned_allocator<Eigen::Matrix<double, 12, 12>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Eigen::Matrix<double, 12, 12>, Eigen::aligned_allocator<Eigen::Matrix<double, 12, 12>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Eigen::Matrix<double, 12, 12>, Eigen::aligned_allocator<Eigen::Matrix<double, 12, 12>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.49" = type { %"struct.std::_Vector_base.50" }
%"struct.std::_Vector_base.50" = type { %"struct.std::_Vector_base<BblockID, std::allocator<BblockID>>::_Vector_impl" }
%"struct.std::_Vector_base<BblockID, std::allocator<BblockID>>::_Vector_impl" = type { %"struct.std::_Vector_base<BblockID, std::allocator<BblockID>>::_Vector_impl_data" }
%"struct.std::_Vector_base<BblockID, std::allocator<BblockID>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.54" = type { %"struct.std::_Vector_base.55" }
%"struct.std::_Vector_base.55" = type { %"struct.std::_Vector_base<Eigen::Matrix<double, 12, 3>, Eigen::aligned_allocator<Eigen::Matrix<double, 12, 3>>>::_Vector_impl" }
%"struct.std::_Vector_base<Eigen::Matrix<double, 12, 3>, Eigen::aligned_allocator<Eigen::Matrix<double, 12, 3>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Eigen::Matrix<double, 12, 3>, Eigen::aligned_allocator<Eigen::Matrix<double, 12, 3>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Eigen::Matrix<double, 12, 3>, Eigen::aligned_allocator<Eigen::Matrix<double, 12, 3>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.60" = type { %"struct.std::_Vector_base.61" }
%"struct.std::_Vector_base.61" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.65" = type { %"struct.std::_Vector_base.66" }
%"struct.std::_Vector_base.66" = type { %"struct.std::_Vector_base<SparseTriple<double>, std::allocator<SparseTriple<double>>>::_Vector_impl" }
%"struct.std::_Vector_base<SparseTriple<double>, std::allocator<SparseTriple<double>>>::_Vector_impl" = type { %"struct.std::_Vector_base<SparseTriple<double>, std::allocator<SparseTriple<double>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<SparseTriple<double>, std::allocator<SparseTriple<double>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.38" = type { %"struct.std::_Vector_base.39" }
%"struct.std::_Vector_base.39" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Eigen::Matrix.70" = type { %"class.Eigen::PlainObjectBase.71" }
%"class.Eigen::PlainObjectBase.71" = type { %"class.Eigen::DenseStorage.78" }
%"class.Eigen::DenseStorage.78" = type { ptr, i64 }

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10SparseCMPC19addForceConstraintsEv(ptr noundef nonnull align 16 dereferenceable(964) %0) #1 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca double, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %5 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %6

6:                                                ; preds = %20, %1
  %7 = load i32, ptr %3, align 4, !tbaa !9
  %8 = getelementptr inbounds %class.SparseCMPC, ptr %5, i32 0, i32 30
  %9 = load i32, ptr %8, align 4, !tbaa !11
  %10 = icmp ult i32 %7, %9
  br i1 %10, label %12, label %11

11:                                               ; preds = %6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  br label %23

12:                                               ; preds = %6
  %13 = getelementptr inbounds %class.SparseCMPC, ptr %5, i32 0, i32 26
  %14 = getelementptr inbounds %class.SparseCMPC, ptr %5, i32 0, i32 4
  call void @_ZNSt6vectorIdSaIdEE9push_backERKd(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %15 = getelementptr inbounds %class.SparseCMPC, ptr %5, i32 0, i32 25
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  store double 0.000000e+00, ptr %4, align 8, !tbaa !66
  call void @_ZNSt6vectorIdSaIdEE9push_backEOd(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  %16 = call noundef i32 @_ZN10SparseCMPC13addConstraintEj(ptr noundef nonnull align 16 dereferenceable(964) %5, i32 noundef 1)
  %17 = load i32, ptr %3, align 4, !tbaa !9
  %18 = call noundef i32 @_ZN10SparseCMPC15getControlIndexEj(ptr noundef nonnull align 16 dereferenceable(964) %5, i32 noundef %17)
  %19 = add i32 %18, 2
  call void @_ZN10SparseCMPC19addConstraintTripleEdjj(ptr noundef nonnull align 16 dereferenceable(964) %5, double noundef 1.000000e+00, i32 noundef %16, i32 noundef %19)
  br label %20

20:                                               ; preds = %12
  %21 = load i32, ptr %3, align 4, !tbaa !9
  %22 = add i32 %21, 1
  store i32 %22, ptr %3, align 4, !tbaa !9
  br label %6, !llvm.loop !67

23:                                               ; preds = %11
  ret void
}

; 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 i32 @_ZN10SparseCMPC15getControlIndexEj(ptr noundef nonnull align 16 dereferenceable(964), i32 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN10SparseCMPC13addConstraintEj(ptr noundef nonnull align 16 dereferenceable(964), i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10SparseCMPC19addConstraintTripleEdjj(ptr noundef nonnull align 16 dereferenceable(964), double noundef, i32 noundef, i32 noundef) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEE9push_backEOd(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #1 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 = { 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 956}
!12 = !{!"_ZTS10SparseCMPC", !13, i64 0, !17, i64 80, !21, i64 176, !21, i64 184, !21, i64 192, !21, i64 200, !22, i64 208, !22, i64 232, !22, i64 256, !22, i64 280, !26, i64 304, !17, i64 336, !17, i64 432, !17, i64 528, !30, i64 624, !34, i64 648, !38, i64 672, !42, i64 696, !46, i64 720, !50, i64 744, !54, i64 768, !54, i64 792, !58, i64 816, !58, i64 840, !38, i64 864, !38, i64 888, !38, i64 912, !62, i64 936, !10, i64 952, !10, i64 956, !10, i64 960}
!13 = !{!"_ZTSN5Eigen6MatrixIdLi3ELi3ELi0ELi3ELi3EEE", !14, i64 0}
!14 = !{!"_ZTSN5Eigen15PlainObjectBaseINS_6MatrixIdLi3ELi3ELi0ELi3ELi3EEEEE", !15, i64 0}
!15 = !{!"_ZTSN5Eigen12DenseStorageIdLi9ELi3ELi3ELi0EEE", !16, i64 0}
!16 = !{!"_ZTSN5Eigen8internal11plain_arrayIdLi9ELi0ELi0EEE", !7, i64 0}
!17 = !{!"_ZTSN5Eigen6MatrixIdLi12ELi1ELi0ELi12ELi1EEE", !18, i64 0}
!18 = !{!"_ZTSN5Eigen15PlainObjectBaseINS_6MatrixIdLi12ELi1ELi0ELi12ELi1EEEEE", !19, i64 0}
!19 = !{!"_ZTSN5Eigen12DenseStorageIdLi12ELi12ELi1ELi0EEE", !20, i64 0}
!20 = !{!"_ZTSN5Eigen8internal11plain_arrayIdLi12ELi0ELi16EEE", !7, i64 0}
!21 = !{!"double", !7, i64 0}
!22 = !{!"_ZTSN5Eigen6MatrixIdLi3ELi1ELi0ELi3ELi1EEE", !23, i64 0}
!23 = !{!"_ZTSN5Eigen15PlainObjectBaseINS_6MatrixIdLi3ELi1ELi0ELi3ELi1EEEEE", !24, i64 0}
!24 = !{!"_ZTSN5Eigen12DenseStorageIdLi3ELi3ELi1ELi0EEE", !25, i64 0}
!25 = !{!"_ZTSN5Eigen8internal11plain_arrayIdLi3ELi0ELi0EEE", !7, i64 0}
!26 = !{!"_ZTSN5Eigen6MatrixIdLi4ELi1ELi0ELi4ELi1EEE", !27, i64 0}
!27 = !{!"_ZTSN5Eigen15PlainObjectBaseINS_6MatrixIdLi4ELi1ELi0ELi4ELi1EEEEE", !28, i64 0}
!28 = !{!"_ZTSN5Eigen12DenseStorageIdLi4ELi4ELi1ELi0EEE", !29, i64 0}
!29 = !{!"_ZTSN5Eigen8internal11plain_arrayIdLi4ELi0ELi16EEE", !7, i64 0}
!30 = !{!"_ZTSSt6vectorI12ContactStateSaIS0_EE", !31, i64 0}
!31 = !{!"_ZTSSt12_Vector_baseI12ContactStateSaIS0_EE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseI12ContactStateSaIS0_EE12_Vector_implE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseI12ContactStateSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!34 = !{!"_ZTSSt6vectorIN5Eigen6MatrixIdLi12ELi1ELi0ELi12ELi1EEENS0_17aligned_allocatorIS2_EEE", !35, i64 0}
!35 = !{!"_ZTSSt12_Vector_baseIN5Eigen6MatrixIdLi12ELi1ELi0ELi12ELi1EEENS0_17aligned_allocatorIS2_EEE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseIN5Eigen6MatrixIdLi12ELi1ELi0ELi12ELi1EEENS0_17aligned_allocatorIS2_EEE12_Vector_implE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseIN5Eigen6MatrixIdLi12ELi1ELi0ELi12ELi1EEENS0_17aligned_allocatorIS2_EEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!38 = !{!"_ZTSSt6vectorIdSaIdEE", !39, i64 0}
!39 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !41, i64 0}
!41 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!42 = !{!"_ZTSSt6vectorIN5Eigen6MatrixIdLi12ELi12ELi0ELi12ELi12EEENS0_17aligned_allocatorIS2_EEE", !43, i64 0}
!43 = !{!"_ZTSSt12_Vector_baseIN5Eigen6MatrixIdLi12ELi12ELi0ELi12ELi12EEENS0_17aligned_allocatorIS2_EEE", !44, i64 0}
!44 = !{!"_ZTSNSt12_Vector_baseIN5Eigen6MatrixIdLi12ELi12ELi0ELi12ELi12EEENS0_17aligned_allocatorIS2_EEE12_Vector_implE", !45, i64 0}
!45 = !{!"_ZTSNSt12_Vector_baseIN5Eigen6MatrixIdLi12ELi12ELi0ELi12ELi12EEENS0_17aligned_allocatorIS2_EEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!46 = !{!"_ZTSSt6vectorI8BblockIDSaIS0_EE", !47, i64 0}
!47 = !{!"_ZTSSt12_Vector_baseI8BblockIDSaIS0_EE", !48, i64 0}
!48 = !{!"_ZTSNSt12_Vector_baseI8BblockIDSaIS0_EE12_Vector_implE", !49, i64 0}
!49 = !{!"_ZTSNSt12_Vector_baseI8BblockIDSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!50 = !{!"_ZTSSt6vectorIN5Eigen6MatrixIdLi12ELi3ELi0ELi12ELi3EEENS0_17aligned_allocatorIS2_EEE", !51, i64 0}
!51 = !{!"_ZTSSt12_Vector_baseIN5Eigen6MatrixIdLi12ELi3ELi0ELi12ELi3EEENS0_17aligned_allocatorIS2_EEE", !52, i64 0}
!52 = !{!"_ZTSNSt12_Vector_baseIN5Eigen6MatrixIdLi12ELi3ELi0ELi12ELi3EEENS0_17aligned_allocatorIS2_EEE12_Vector_implE", !53, i64 0}
!53 = !{!"_ZTSNSt12_Vector_baseIN5Eigen6MatrixIdLi12ELi3ELi0ELi12ELi3EEENS0_17aligned_allocatorIS2_EEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!54 = !{!"_ZTSSt6vectorIjSaIjEE", !55, i64 0}
!55 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !56, i64 0}
!56 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !57, i64 0}
!57 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!58 = !{!"_ZTSSt6vectorI12SparseTripleIdESaIS1_EE", !59, i64 0}
!59 = !{!"_ZTSSt12_Vector_baseI12SparseTripleIdESaIS1_EE", !60, i64 0}
!60 = !{!"_ZTSNSt12_Vector_baseI12SparseTripleIdESaIS1_EE12_Vector_implE", !61, i64 0}
!61 = !{!"_ZTSNSt12_Vector_baseI12SparseTripleIdESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!62 = !{!"_ZTSN5Eigen6MatrixIfLin1ELi1ELi0ELin1ELi1EEE", !63, i64 0}
!63 = !{!"_ZTSN5Eigen15PlainObjectBaseINS_6MatrixIfLin1ELi1ELi0ELin1ELi1EEEEE", !64, i64 0}
!64 = !{!"_ZTSN5Eigen12DenseStorageIfLin1ELin1ELi1ELi0EEE", !6, i64 0, !65, i64 8}
!65 = !{!"long", !7, i64 0}
!66 = !{!21, !21, i64 0}
!67 = distinct !{!67, !68}
!68 = !{!"llvm.loop.mustprogress"}


; 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"

; 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 uwtable
define dso_local void @_ZN10SparseCMPC19addForceConstraintsEv(ptr noundef nonnull align 16 dereferenceable(964) %0) local_unnamed_addr #1 align 2 {
  %2 = alloca double, align 8
  %3 = getelementptr inbounds i8, ptr %0, i64 956
  %4 = load i32, ptr %3, align 4, !tbaa !5
  %.not = icmp eq i32 %4, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %1
  %5 = getelementptr inbounds i8, ptr %0, i64 888
  %6 = getelementptr inbounds i8, ptr %0, i64 184
  %7 = getelementptr inbounds i8, ptr %0, i64 864
  br label %8

._crit_edge:                                      ; preds = %8, %1
  ret void

8:                                                ; preds = %.lr.ph, %8
  %.03 = phi i32 [ 0, %.lr.ph ], [ %12, %8 ]
  call void @_ZNSt6vectorIdSaIdEE9push_backERKd(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #3
  store double 0.000000e+00, ptr %2, align 8, !tbaa !64
  call void @_ZNSt6vectorIdSaIdEE9push_backEOd(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #3
  %9 = call noundef i32 @_ZN10SparseCMPC13addConstraintEj(ptr noundef nonnull align 16 dereferenceable(964) %0, i32 noundef 1)
  %10 = call noundef i32 @_ZN10SparseCMPC15getControlIndexEj(ptr noundef nonnull align 16 dereferenceable(964) %0, i32 noundef %.03)
  %11 = add i32 %10, 2
  call void @_ZN10SparseCMPC19addConstraintTripleEdjj(ptr noundef nonnull align 16 dereferenceable(964) %0, double noundef 1.000000e+00, i32 noundef %9, i32 noundef %11)
  %12 = add nuw i32 %.03, 1
  %13 = load i32, ptr %3, align 4, !tbaa !5
  %14 = icmp ult i32 %12, %13
  br i1 %14, label %8, label %._crit_edge, !llvm.loop !65
}

; 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 i32 @_ZN10SparseCMPC15getControlIndexEj(ptr noundef nonnull align 16 dereferenceable(964), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN10SparseCMPC13addConstraintEj(ptr noundef nonnull align 16 dereferenceable(964), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10SparseCMPC19addConstraintTripleEdjj(ptr noundef nonnull align 16 dereferenceable(964), double noundef, i32 noundef, i32 noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEE9push_backEOd(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 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 = { 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, !63, i64 956}
!6 = !{!"_ZTS10SparseCMPC", !7, i64 0, !13, i64 80, !17, i64 176, !17, i64 184, !17, i64 192, !17, i64 200, !18, i64 208, !18, i64 232, !18, i64 256, !18, i64 280, !22, i64 304, !13, i64 336, !13, i64 432, !13, i64 528, !26, i64 624, !31, i64 648, !35, i64 672, !39, i64 696, !43, i64 720, !47, i64 744, !51, i64 768, !51, i64 792, !55, i64 816, !55, i64 840, !35, i64 864, !35, i64 888, !35, i64 912, !59, i64 936, !63, i64 952, !63, i64 956, !63, i64 960}
!7 = !{!"_ZTSN5Eigen6MatrixIdLi3ELi3ELi0ELi3ELi3EEE", !8, i64 0}
!8 = !{!"_ZTSN5Eigen15PlainObjectBaseINS_6MatrixIdLi3ELi3ELi0ELi3ELi3EEEEE", !9, i64 0}
!9 = !{!"_ZTSN5Eigen12DenseStorageIdLi9ELi3ELi3ELi0EEE", !10, i64 0}
!10 = !{!"_ZTSN5Eigen8internal11plain_arrayIdLi9ELi0ELi0EEE", !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C++ TBAA"}
!13 = !{!"_ZTSN5Eigen6MatrixIdLi12ELi1ELi0ELi12ELi1EEE", !14, i64 0}
!14 = !{!"_ZTSN5Eigen15PlainObjectBaseINS_6MatrixIdLi12ELi1ELi0ELi12ELi1EEEEE", !15, i64 0}
!15 = !{!"_ZTSN5Eigen12DenseStorageIdLi12ELi12ELi1ELi0EEE", !16, i64 0}
!16 = !{!"_ZTSN5Eigen8internal11plain_arrayIdLi12ELi0ELi16EEE", !11, i64 0}
!17 = !{!"double", !11, i64 0}
!18 = !{!"_ZTSN5Eigen6MatrixIdLi3ELi1ELi0ELi3ELi1EEE", !19, i64 0}
!19 = !{!"_ZTSN5Eigen15PlainObjectBaseINS_6MatrixIdLi3ELi1ELi0ELi3ELi1EEEEE", !20, i64 0}
!20 = !{!"_ZTSN5Eigen12DenseStorageIdLi3ELi3ELi1ELi0EEE", !21, i64 0}
!21 = !{!"_ZTSN5Eigen8internal11plain_arrayIdLi3ELi0ELi0EEE", !11, i64 0}
!22 = !{!"_ZTSN5Eigen6MatrixIdLi4ELi1ELi0ELi4ELi1EEE", !23, i64 0}
!23 = !{!"_ZTSN5Eigen15PlainObjectBaseINS_6MatrixIdLi4ELi1ELi0ELi4ELi1EEEEE", !24, i64 0}
!24 = !{!"_ZTSN5Eigen12DenseStorageIdLi4ELi4ELi1ELi0EEE", !25, i64 0}
!25 = !{!"_ZTSN5Eigen8internal11plain_arrayIdLi4ELi0ELi16EEE", !11, i64 0}
!26 = !{!"_ZTSSt6vectorI12ContactStateSaIS0_EE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseI12ContactStateSaIS0_EE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseI12ContactStateSaIS0_EE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseI12ContactStateSaIS0_EE17_Vector_impl_dataE", !30, i64 0, !30, i64 8, !30, i64 16}
!30 = !{!"any pointer", !11, i64 0}
!31 = !{!"_ZTSSt6vectorIN5Eigen6MatrixIdLi12ELi1ELi0ELi12ELi1EEENS0_17aligned_allocatorIS2_EEE", !32, i64 0}
!32 = !{!"_ZTSSt12_Vector_baseIN5Eigen6MatrixIdLi12ELi1ELi0ELi12ELi1EEENS0_17aligned_allocatorIS2_EEE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIN5Eigen6MatrixIdLi12ELi1ELi0ELi12ELi1EEENS0_17aligned_allocatorIS2_EEE12_Vector_implE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIN5Eigen6MatrixIdLi12ELi1ELi0ELi12ELi1EEENS0_17aligned_allocatorIS2_EEE17_Vector_impl_dataE", !30, i64 0, !30, i64 8, !30, i64 16}
!35 = !{!"_ZTSSt6vectorIdSaIdEE", !36, i64 0}
!36 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !38, i64 0}
!38 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !30, i64 0, !30, i64 8, !30, i64 16}
!39 = !{!"_ZTSSt6vectorIN5Eigen6MatrixIdLi12ELi12ELi0ELi12ELi12EEENS0_17aligned_allocatorIS2_EEE", !40, i64 0}
!40 = !{!"_ZTSSt12_Vector_baseIN5Eigen6MatrixIdLi12ELi12ELi0ELi12ELi12EEENS0_17aligned_allocatorIS2_EEE", !41, i64 0}
!41 = !{!"_ZTSNSt12_Vector_baseIN5Eigen6MatrixIdLi12ELi12ELi0ELi12ELi12EEENS0_17aligned_allocatorIS2_EEE12_Vector_implE", !42, i64 0}
!42 = !{!"_ZTSNSt12_Vector_baseIN5Eigen6MatrixIdLi12ELi12ELi0ELi12ELi12EEENS0_17aligned_allocatorIS2_EEE17_Vector_impl_dataE", !30, i64 0, !30, i64 8, !30, i64 16}
!43 = !{!"_ZTSSt6vectorI8BblockIDSaIS0_EE", !44, i64 0}
!44 = !{!"_ZTSSt12_Vector_baseI8BblockIDSaIS0_EE", !45, i64 0}
!45 = !{!"_ZTSNSt12_Vector_baseI8BblockIDSaIS0_EE12_Vector_implE", !46, i64 0}
!46 = !{!"_ZTSNSt12_Vector_baseI8BblockIDSaIS0_EE17_Vector_impl_dataE", !30, i64 0, !30, i64 8, !30, i64 16}
!47 = !{!"_ZTSSt6vectorIN5Eigen6MatrixIdLi12ELi3ELi0ELi12ELi3EEENS0_17aligned_allocatorIS2_EEE", !48, i64 0}
!48 = !{!"_ZTSSt12_Vector_baseIN5Eigen6MatrixIdLi12ELi3ELi0ELi12ELi3EEENS0_17aligned_allocatorIS2_EEE", !49, i64 0}
!49 = !{!"_ZTSNSt12_Vector_baseIN5Eigen6MatrixIdLi12ELi3ELi0ELi12ELi3EEENS0_17aligned_allocatorIS2_EEE12_Vector_implE", !50, i64 0}
!50 = !{!"_ZTSNSt12_Vector_baseIN5Eigen6MatrixIdLi12ELi3ELi0ELi12ELi3EEENS0_17aligned_allocatorIS2_EEE17_Vector_impl_dataE", !30, i64 0, !30, i64 8, !30, i64 16}
!51 = !{!"_ZTSSt6vectorIjSaIjEE", !52, i64 0}
!52 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !53, i64 0}
!53 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !54, i64 0}
!54 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !30, i64 0, !30, i64 8, !30, i64 16}
!55 = !{!"_ZTSSt6vectorI12SparseTripleIdESaIS1_EE", !56, i64 0}
!56 = !{!"_ZTSSt12_Vector_baseI12SparseTripleIdESaIS1_EE", !57, i64 0}
!57 = !{!"_ZTSNSt12_Vector_baseI12SparseTripleIdESaIS1_EE12_Vector_implE", !58, i64 0}
!58 = !{!"_ZTSNSt12_Vector_baseI12SparseTripleIdESaIS1_EE17_Vector_impl_dataE", !30, i64 0, !30, i64 8, !30, i64 16}
!59 = !{!"_ZTSN5Eigen6MatrixIfLin1ELi1ELi0ELin1ELi1EEE", !60, i64 0}
!60 = !{!"_ZTSN5Eigen15PlainObjectBaseINS_6MatrixIfLin1ELi1ELi0ELin1ELi1EEEEE", !61, i64 0}
!61 = !{!"_ZTSN5Eigen12DenseStorageIfLin1ELin1ELi1ELi0EEE", !30, i64 0, !62, i64 8}
!62 = !{!"long", !11, i64 0}
!63 = !{!"int", !11, i64 0}
!64 = !{!17, !17, i64 0}
!65 = distinct !{!65, !66}
!66 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass