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

; 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.__gnu_cxx::__normal_iterator" = type { ptr }
%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: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLi12ELi1ELi0ELi12ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1), i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10SparseCMPC18addLinearStateCostEv(ptr noundef nonnull align 16 dereferenceable(964) %0) #2 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca ptr, 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 %2, align 8, !tbaa !5
  %11 = load ptr, ptr %2, align 8
  %12 = getelementptr inbounds %class.SparseCMPC, ptr %11, i32 0, i32 27
  %13 = getelementptr inbounds %class.SparseCMPC, ptr %11, i32 0, i32 29
  %14 = load i32, ptr %13, align 8, !tbaa !9
  %15 = mul i32 12, %14
  %16 = getelementptr inbounds %class.SparseCMPC, ptr %11, i32 0, i32 30
  %17 = load i32, ptr %16, align 4, !tbaa !65
  %18 = mul i32 3, %17
  %19 = add i32 %15, %18
  %20 = zext i32 %19 to i64
  call void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %20)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %21 = getelementptr inbounds %class.SparseCMPC, ptr %11, i32 0, i32 27
  store ptr %21, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %22) #5
  %24 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %4, i32 0, i32 0
  store ptr %23, ptr %24, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = call ptr @_ZNSt6vectorIdSaIdEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #5
  %27 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %5, i32 0, i32 0
  store ptr %26, ptr %27, align 8
  br label %28

28:                                               ; preds = %34, %1
  %29 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPdSt6vectorIdSaIdEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  br i1 %29, label %31, label %30

30:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  br label %36

31:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  store ptr %32, ptr %6, align 8, !tbaa !5
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  store double 0.000000e+00, ptr %33, align 8, !tbaa !66
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %34

34:                                               ; preds = %31
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  br label %28

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

37:                                               ; preds = %76, %36
  %38 = load i32, ptr %7, align 4, !tbaa !67
  %39 = getelementptr inbounds %class.SparseCMPC, ptr %11, i32 0, i32 29
  %40 = load i32, ptr %39, align 8, !tbaa !9
  %41 = icmp ult i32 %38, %40
  br i1 %41, label %43, label %42

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

43:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %44 = load i32, ptr %7, align 4, !tbaa !67
  %45 = call noundef i32 @_ZN10SparseCMPC13getStateIndexEj(ptr noundef nonnull align 16 dereferenceable(964) %11, i32 noundef %44)
  store i32 %45, ptr %9, align 4, !tbaa !67
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !67
  br label %46

46:                                               ; preds = %72, %43
  %47 = load i32, ptr %10, align 4, !tbaa !67
  %48 = icmp ult i32 %47, 12
  br i1 %48, label %50, label %49

49:                                               ; preds = %46
  store i32 7, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %75

50:                                               ; preds = %46
  %51 = getelementptr inbounds %class.SparseCMPC, ptr %11, i32 0, i32 16
  %52 = load i32, ptr %7, align 4, !tbaa !67
  %53 = zext i32 %52 to i64
  %54 = call noundef nonnull align 16 dereferenceable(96) ptr @_ZNSt6vectorIN5Eigen6MatrixIdLi12ELi1ELi0ELi12ELi1EEENS0_17aligned_allocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %51, i64 noundef %53) #5
  %55 = load i32, ptr %10, align 4, !tbaa !67
  %56 = zext i32 %55 to i64
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLi12ELi1ELi0ELi12ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %54, i64 noundef %56)
  %58 = load double, ptr %57, align 8, !tbaa !66
  %59 = fmul double -1.000000e+00, %58
  %60 = getelementptr inbounds %class.SparseCMPC, ptr %11, i32 0, i32 2
  %61 = load i32, ptr %10, align 4, !tbaa !67
  %62 = zext i32 %61 to i64
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLi12ELi1ELi0ELi12ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %60, i64 noundef %62)
  %64 = load double, ptr %63, align 8, !tbaa !66
  %65 = fmul double %59, %64
  %66 = getelementptr inbounds %class.SparseCMPC, ptr %11, i32 0, i32 27
  %67 = load i32, ptr %9, align 4, !tbaa !67
  %68 = load i32, ptr %10, align 4, !tbaa !67
  %69 = add i32 %67, %68
  %70 = zext i32 %69 to i64
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %66, i64 noundef %70)
  store double %65, ptr %71, align 8, !tbaa !66
  br label %72

72:                                               ; preds = %50
  %73 = load i32, ptr %10, align 4, !tbaa !67
  %74 = add i32 %73, 1
  store i32 %74, ptr %10, align 4, !tbaa !67
  br label %46, !llvm.loop !68

75:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %76

76:                                               ; preds = %75
  %77 = load i32, ptr %7, align 4, !tbaa !67
  %78 = add i32 %77, 1
  store i32 %78, ptr %7, align 4, !tbaa !67
  br label %37, !llvm.loop !70

79:                                               ; preds = %42
  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 @_ZN10SparseCMPC13getStateIndexEj(ptr noundef nonnull align 16 dereferenceable(964), i32 noundef) #3 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPdSt6vectorIdSaIdEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(96) ptr @_ZNSt6vectorIN5Eigen6MatrixIdLi12ELi1ELi0ELi12ELi1EEENS0_17aligned_allocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

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

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


; 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.__gnu_cxx::__normal_iterator" = type { ptr }

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10SparseCMPC18addLinearStateCostEv(ptr noundef nonnull align 16 dereferenceable(964) %0) local_unnamed_addr #2 align 2 {
  %2 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = getelementptr inbounds i8, ptr %0, i64 912
  %5 = getelementptr inbounds i8, ptr %0, i64 952
  %6 = load i32, ptr %5, align 8, !tbaa !5
  %7 = mul i32 %6, 12
  %8 = getelementptr inbounds i8, ptr %0, i64 956
  %9 = load i32, ptr %8, align 4, !tbaa !64
  %10 = mul i32 %9, 3
  %11 = add i32 %10, %7
  %12 = zext i32 %11 to i64
  tail call void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %12)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  %13 = tail call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  store ptr %13, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %14 = tail call ptr @_ZNSt6vectorIdSaIdEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  store ptr %14, ptr %3, align 8
  %15 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPdSt6vectorIdSaIdEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  br i1 %15, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  %16 = load i32, ptr %5, align 8, !tbaa !5
  %.not = icmp eq i32 %16, 0
  br i1 %.not, label %._crit_edge18, label %.lr.ph17

.lr.ph17:                                         ; preds = %._crit_edge
  %17 = getelementptr inbounds i8, ptr %0, i64 648
  %18 = getelementptr inbounds i8, ptr %0, i64 80
  br label %22

.lr.ph:                                           ; preds = %1, %.lr.ph
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  store double 0.000000e+00, ptr %19, align 8, !tbaa !65
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  %21 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPdSt6vectorIdSaIdEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  br i1 %21, label %.lr.ph, label %._crit_edge

._crit_edge18:                                    ; preds = %22, %._crit_edge
  ret void

22:                                               ; preds = %.lr.ph17, %22
  %indvars.iv = phi i64 [ 0, %.lr.ph17 ], [ %indvars.iv.next, %22 ]
  %23 = trunc nuw i64 %indvars.iv to i32
  %24 = call noundef i32 @_ZN10SparseCMPC13getStateIndexEj(ptr noundef nonnull align 16 dereferenceable(964) %0, i32 noundef %23)
  %25 = call noundef nonnull align 16 dereferenceable(96) ptr @_ZNSt6vectorIN5Eigen6MatrixIdLi12ELi1ELi0ELi12ELi1EEENS0_17aligned_allocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %indvars.iv) #5
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLi12ELi1ELi0ELi12ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %25, i64 noundef 0)
  %27 = load double, ptr %26, align 8, !tbaa !65
  %28 = fneg double %27
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLi12ELi1ELi0ELi12ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %18, i64 noundef 0)
  %30 = load double, ptr %29, align 8, !tbaa !65
  %31 = fmul double %30, %28
  %32 = zext i32 %24 to i64
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %32)
  store double %31, ptr %33, align 8, !tbaa !65
  %34 = call noundef nonnull align 16 dereferenceable(96) ptr @_ZNSt6vectorIN5Eigen6MatrixIdLi12ELi1ELi0ELi12ELi1EEENS0_17aligned_allocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %indvars.iv) #5
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLi12ELi1ELi0ELi12ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %34, i64 noundef 1)
  %36 = load double, ptr %35, align 8, !tbaa !65
  %37 = fneg double %36
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLi12ELi1ELi0ELi12ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %18, i64 noundef 1)
  %39 = load double, ptr %38, align 8, !tbaa !65
  %40 = fmul double %39, %37
  %41 = add i32 %24, 1
  %42 = zext i32 %41 to i64
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %42)
  store double %40, ptr %43, align 8, !tbaa !65
  %44 = call noundef nonnull align 16 dereferenceable(96) ptr @_ZNSt6vectorIN5Eigen6MatrixIdLi12ELi1ELi0ELi12ELi1EEENS0_17aligned_allocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %indvars.iv) #5
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLi12ELi1ELi0ELi12ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %44, i64 noundef 2)
  %46 = load double, ptr %45, align 8, !tbaa !65
  %47 = fneg double %46
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLi12ELi1ELi0ELi12ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %18, i64 noundef 2)
  %49 = load double, ptr %48, align 8, !tbaa !65
  %50 = fmul double %49, %47
  %51 = add i32 %24, 2
  %52 = zext i32 %51 to i64
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %52)
  store double %50, ptr %53, align 8, !tbaa !65
  %54 = call noundef nonnull align 16 dereferenceable(96) ptr @_ZNSt6vectorIN5Eigen6MatrixIdLi12ELi1ELi0ELi12ELi1EEENS0_17aligned_allocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %indvars.iv) #5
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLi12ELi1ELi0ELi12ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %54, i64 noundef 3)
  %56 = load double, ptr %55, align 8, !tbaa !65
  %57 = fneg double %56
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLi12ELi1ELi0ELi12ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %18, i64 noundef 3)
  %59 = load double, ptr %58, align 8, !tbaa !65
  %60 = fmul double %59, %57
  %61 = add i32 %24, 3
  %62 = zext i32 %61 to i64
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %62)
  store double %60, ptr %63, align 8, !tbaa !65
  %64 = call noundef nonnull align 16 dereferenceable(96) ptr @_ZNSt6vectorIN5Eigen6MatrixIdLi12ELi1ELi0ELi12ELi1EEENS0_17aligned_allocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %indvars.iv) #5
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLi12ELi1ELi0ELi12ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %64, i64 noundef 4)
  %66 = load double, ptr %65, align 8, !tbaa !65
  %67 = fneg double %66
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLi12ELi1ELi0ELi12ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %18, i64 noundef 4)
  %69 = load double, ptr %68, align 8, !tbaa !65
  %70 = fmul double %69, %67
  %71 = add i32 %24, 4
  %72 = zext i32 %71 to i64
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %72)
  store double %70, ptr %73, align 8, !tbaa !65
  %74 = call noundef nonnull align 16 dereferenceable(96) ptr @_ZNSt6vectorIN5Eigen6MatrixIdLi12ELi1ELi0ELi12ELi1EEENS0_17aligned_allocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %indvars.iv) #5
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLi12ELi1ELi0ELi12ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %74, i64 noundef 5)
  %76 = load double, ptr %75, align 8, !tbaa !65
  %77 = fneg double %76
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLi12ELi1ELi0ELi12ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %18, i64 noundef 5)
  %79 = load double, ptr %78, align 8, !tbaa !65
  %80 = fmul double %79, %77
  %81 = add i32 %24, 5
  %82 = zext i32 %81 to i64
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %82)
  store double %80, ptr %83, align 8, !tbaa !65
  %84 = call noundef nonnull align 16 dereferenceable(96) ptr @_ZNSt6vectorIN5Eigen6MatrixIdLi12ELi1ELi0ELi12ELi1EEENS0_17aligned_allocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %indvars.iv) #5
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLi12ELi1ELi0ELi12ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %84, i64 noundef 6)
  %86 = load double, ptr %85, align 8, !tbaa !65
  %87 = fneg double %86
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLi12ELi1ELi0ELi12ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %18, i64 noundef 6)
  %89 = load double, ptr %88, align 8, !tbaa !65
  %90 = fmul double %89, %87
  %91 = add i32 %24, 6
  %92 = zext i32 %91 to i64
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %92)
  store double %90, ptr %93, align 8, !tbaa !65
  %94 = call noundef nonnull align 16 dereferenceable(96) ptr @_ZNSt6vectorIN5Eigen6MatrixIdLi12ELi1ELi0ELi12ELi1EEENS0_17aligned_allocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %indvars.iv) #5
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLi12ELi1ELi0ELi12ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %94, i64 noundef 7)
  %96 = load double, ptr %95, align 8, !tbaa !65
  %97 = fneg double %96
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLi12ELi1ELi0ELi12ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %18, i64 noundef 7)
  %99 = load double, ptr %98, align 8, !tbaa !65
  %100 = fmul double %99, %97
  %101 = add i32 %24, 7
  %102 = zext i32 %101 to i64
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %102)
  store double %100, ptr %103, align 8, !tbaa !65
  %104 = call noundef nonnull align 16 dereferenceable(96) ptr @_ZNSt6vectorIN5Eigen6MatrixIdLi12ELi1ELi0ELi12ELi1EEENS0_17aligned_allocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %indvars.iv) #5
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLi12ELi1ELi0ELi12ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %104, i64 noundef 8)
  %106 = load double, ptr %105, align 8, !tbaa !65
  %107 = fneg double %106
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLi12ELi1ELi0ELi12ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %18, i64 noundef 8)
  %109 = load double, ptr %108, align 8, !tbaa !65
  %110 = fmul double %109, %107
  %111 = add i32 %24, 8
  %112 = zext i32 %111 to i64
  %113 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %112)
  store double %110, ptr %113, align 8, !tbaa !65
  %114 = call noundef nonnull align 16 dereferenceable(96) ptr @_ZNSt6vectorIN5Eigen6MatrixIdLi12ELi1ELi0ELi12ELi1EEENS0_17aligned_allocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %indvars.iv) #5
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLi12ELi1ELi0ELi12ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %114, i64 noundef 9)
  %116 = load double, ptr %115, align 8, !tbaa !65
  %117 = fneg double %116
  %118 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLi12ELi1ELi0ELi12ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %18, i64 noundef 9)
  %119 = load double, ptr %118, align 8, !tbaa !65
  %120 = fmul double %119, %117
  %121 = add i32 %24, 9
  %122 = zext i32 %121 to i64
  %123 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %122)
  store double %120, ptr %123, align 8, !tbaa !65
  %124 = call noundef nonnull align 16 dereferenceable(96) ptr @_ZNSt6vectorIN5Eigen6MatrixIdLi12ELi1ELi0ELi12ELi1EEENS0_17aligned_allocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %indvars.iv) #5
  %125 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLi12ELi1ELi0ELi12ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %124, i64 noundef 10)
  %126 = load double, ptr %125, align 8, !tbaa !65
  %127 = fneg double %126
  %128 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLi12ELi1ELi0ELi12ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %18, i64 noundef 10)
  %129 = load double, ptr %128, align 8, !tbaa !65
  %130 = fmul double %129, %127
  %131 = add i32 %24, 10
  %132 = zext i32 %131 to i64
  %133 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %132)
  store double %130, ptr %133, align 8, !tbaa !65
  %134 = call noundef nonnull align 16 dereferenceable(96) ptr @_ZNSt6vectorIN5Eigen6MatrixIdLi12ELi1ELi0ELi12ELi1EEENS0_17aligned_allocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %indvars.iv) #5
  %135 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLi12ELi1ELi0ELi12ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %134, i64 noundef 11)
  %136 = load double, ptr %135, align 8, !tbaa !65
  %137 = fneg double %136
  %138 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLi12ELi1ELi0ELi12ELi1EEELi1EEixEl(ptr noundef nonnull align 1 dereferenceable(1) %18, i64 noundef 11)
  %139 = load double, ptr %138, align 8, !tbaa !65
  %140 = fmul double %139, %137
  %141 = add i32 %24, 11
  %142 = zext i32 %141 to i64
  %143 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %142)
  store double %140, ptr %143, align 8, !tbaa !65
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %144 = load i32, ptr %5, align 8, !tbaa !5
  %145 = zext i32 %144 to i64
  %146 = icmp ult i64 %indvars.iv.next, %145
  br i1 %146, label %22, label %._crit_edge18, !llvm.loop !66
}

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPdSt6vectorIdSaIdEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 #4 = { 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 #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, !63, i64 952}
!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 = !{!6, !63, i64 956}
!65 = !{!17, !17, i64 0}
!66 = distinct !{!66, !67}
!67 = !{!"llvm.loop.mustprogress"}


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