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

; 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 }
%struct.ContactState = type { %union.anon.117 }
%union.anon.117 = type { [4 x i8] }

; 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 @_ZN10SparseCMPC7buildDTEv(ptr noundef nonnull align 16 dereferenceable(964) %0) #1 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i8, align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  %11 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 0, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %12

12:                                               ; preds = %57, %1
  %13 = load i32, ptr %4, align 4, !tbaa !9
  %14 = getelementptr inbounds %class.SparseCMPC, ptr %11, i32 0, i32 29
  %15 = load i32, ptr %14, align 8, !tbaa !11
  %16 = icmp ult i32 %13, %15
  br i1 %16, label %18, label %17

17:                                               ; preds = %12
  store i32 2, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %60

18:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %19 = getelementptr inbounds %class.SparseCMPC, ptr %11, i32 0, i32 15
  %20 = load i32, ptr %4, align 4, !tbaa !9
  %21 = zext i32 %20 to i64
  %22 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt6vectorI12ContactStateSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %21) #4
  %23 = getelementptr inbounds %struct.ContactState, ptr %22, i32 0, i32 0
  store ptr %23, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = getelementptr inbounds [4 x i8], ptr %24, i64 0, i64 0
  store ptr %25, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %26 = load ptr, ptr %7, align 8, !tbaa !5
  %27 = getelementptr inbounds [4 x i8], ptr %26, i64 0, i64 0
  %28 = getelementptr inbounds i8, ptr %27, i64 4
  store ptr %28, ptr %9, align 8, !tbaa !5
  br label %29

29:                                               ; preds = %45, %18
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  %31 = load ptr, ptr %9, align 8, !tbaa !5
  %32 = icmp ne ptr %30, %31
  br i1 %32, label %34, label %33

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

34:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #4
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  %36 = load i8, ptr %35, align 1, !tbaa !66, !range !68, !noundef !69
  %37 = trunc i8 %36 to i1
  %38 = zext i1 %37 to i8
  store i8 %38, ptr %10, align 1, !tbaa !66
  %39 = load i8, ptr %10, align 1, !tbaa !66, !range !68, !noundef !69
  %40 = trunc i8 %39 to i1
  br i1 %40, label %41, label %44

41:                                               ; preds = %34
  %42 = load i32, ptr %6, align 4, !tbaa !9
  %43 = add i32 %42, 1
  store i32 %43, ptr %6, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %41, %34
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #4
  br label %45

45:                                               ; preds = %44
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %46, i32 1
  store ptr %47, ptr %8, align 8, !tbaa !5
  br label %29

48:                                               ; preds = %33
  %49 = getelementptr inbounds %class.SparseCMPC, ptr %11, i32 0, i32 21
  call void @_ZNSt6vectorIjSaIjEE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(24) %49, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %50 = getelementptr inbounds %class.SparseCMPC, ptr %11, i32 0, i32 22
  call void @_ZNSt6vectorIjSaIjEE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(24) %50, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %51 = load i32, ptr %4, align 4, !tbaa !9
  %52 = load i32, ptr %3, align 4, !tbaa !9
  %53 = load i32, ptr %6, align 4, !tbaa !9
  call void @_ZN10SparseCMPC3c2dEjjj(ptr noundef nonnull align 16 dereferenceable(964) %11, i32 noundef %51, i32 noundef %52, i32 noundef %53)
  %54 = load i32, ptr %6, align 4, !tbaa !9
  %55 = load i32, ptr %3, align 4, !tbaa !9
  %56 = add i32 %55, %54
  store i32 %56, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %57

57:                                               ; preds = %48
  %58 = load i32, ptr %4, align 4, !tbaa !9
  %59 = add i32 %58, 1
  store i32 %59, ptr %4, align 4, !tbaa !9
  br label %12, !llvm.loop !70

60:                                               ; preds = %17
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  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 nonnull align 1 dereferenceable(4) ptr @_ZNSt6vectorI12ContactStateSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

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

declare void @_ZN10SparseCMPC3c2dEjjj(ptr noundef nonnull align 16 dereferenceable(964), i32 noundef, i32 noundef, i32 noundef) #3

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 = { "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 = { 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 952}
!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 = !{!67, !67, i64 0}
!67 = !{!"bool", !7, i64 0}
!68 = !{i8 0, i8 2}
!69 = !{}
!70 = distinct !{!70, !71}
!71 = !{!"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 @_ZN10SparseCMPC7buildDTEv(ptr noundef nonnull align 16 dereferenceable(964) %0) local_unnamed_addr #1 align 2 {
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  store i32 0, ptr %2, align 4, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 952
  %5 = load i32, ptr %4, align 8, !tbaa !9
  %.not14 = icmp eq i32 %5, 0
  br i1 %.not14, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %1
  %6 = getelementptr inbounds i8, ptr %0, i64 624
  %7 = getelementptr inbounds i8, ptr %0, i64 768
  %8 = getelementptr inbounds i8, ptr %0, i64 792
  br label %9

._crit_edge:                                      ; preds = %33, %1
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  ret void

9:                                                ; preds = %.lr.ph, %33
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %33 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  store i32 0, ptr %3, align 4, !tbaa !5
  %10 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt6vectorI12ContactStateSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv) #4
  %.promoted = load i32, ptr %3, align 4, !tbaa !5
  %11 = load i8, ptr %10, align 1, !tbaa !65, !range !67, !noundef !68
  %12 = trunc nuw i8 %11 to i1
  br i1 %12, label %13, label %15

13:                                               ; preds = %9
  %14 = add i32 %.promoted, 1
  store i32 %14, ptr %3, align 4, !tbaa !5
  br label %15

15:                                               ; preds = %13, %9
  %16 = phi i32 [ %14, %13 ], [ %.promoted, %9 ]
  %.011.ptr.1 = getelementptr inbounds i8, ptr %10, i64 1
  %17 = load i8, ptr %.011.ptr.1, align 1, !tbaa !65, !range !67, !noundef !68
  %18 = trunc nuw i8 %17 to i1
  br i1 %18, label %19, label %21

19:                                               ; preds = %15
  %20 = add i32 %16, 1
  store i32 %20, ptr %3, align 4, !tbaa !5
  br label %21

21:                                               ; preds = %19, %15
  %22 = phi i32 [ %20, %19 ], [ %16, %15 ]
  %.011.ptr.2 = getelementptr inbounds i8, ptr %10, i64 2
  %23 = load i8, ptr %.011.ptr.2, align 1, !tbaa !65, !range !67, !noundef !68
  %24 = trunc nuw i8 %23 to i1
  br i1 %24, label %25, label %27

25:                                               ; preds = %21
  %26 = add i32 %22, 1
  store i32 %26, ptr %3, align 4, !tbaa !5
  br label %27

27:                                               ; preds = %25, %21
  %28 = phi i32 [ %26, %25 ], [ %22, %21 ]
  %.011.ptr.3 = getelementptr inbounds i8, ptr %10, i64 3
  %29 = load i8, ptr %.011.ptr.3, align 1, !tbaa !65, !range !67, !noundef !68
  %30 = trunc nuw i8 %29 to i1
  br i1 %30, label %31, label %33

31:                                               ; preds = %27
  %32 = add i32 %28, 1
  store i32 %32, ptr %3, align 4, !tbaa !5
  br label %33

33:                                               ; preds = %31, %27
  call void @_ZNSt6vectorIjSaIjEE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @_ZNSt6vectorIjSaIjEE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %34 = load i32, ptr %2, align 4, !tbaa !5
  %35 = load i32, ptr %3, align 4, !tbaa !5
  %36 = trunc nuw i64 %indvars.iv to i32
  call void @_ZN10SparseCMPC3c2dEjjj(ptr noundef nonnull align 16 dereferenceable(964) %0, i32 noundef %36, i32 noundef %34, i32 noundef %35)
  %37 = load i32, ptr %3, align 4, !tbaa !5
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = add i32 %38, %37
  store i32 %39, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %40 = load i32, ptr %4, align 8, !tbaa !9
  %41 = zext i32 %40 to i64
  %42 = icmp ult i64 %indvars.iv.next, %41
  br i1 %42, label %9, label %._crit_edge, !llvm.loop !69
}

; 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 nonnull align 1 dereferenceable(4) ptr @_ZNSt6vectorI12ContactStateSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

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

declare void @_ZN10SparseCMPC3c2dEjjj(ptr noundef nonnull align 16 dereferenceable(964), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

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 = { "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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, 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, !33, i64 648, !37, i64 672, !41, i64 696, !45, i64 720, !49, i64 744, !53, i64 768, !53, i64 792, !57, i64 816, !57, i64 840, !37, i64 864, !37, i64 888, !37, i64 912, !61, i64 936, !6, i64 952, !6, i64 956, !6, 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", !32, i64 0, !32, i64 8, !32, i64 16}
!32 = !{!"any pointer", !7, i64 0}
!33 = !{!"_ZTSSt6vectorIN5Eigen6MatrixIdLi12ELi1ELi0ELi12ELi1EEENS0_17aligned_allocatorIS2_EEE", !34, i64 0}
!34 = !{!"_ZTSSt12_Vector_baseIN5Eigen6MatrixIdLi12ELi1ELi0ELi12ELi1EEENS0_17aligned_allocatorIS2_EEE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseIN5Eigen6MatrixIdLi12ELi1ELi0ELi12ELi1EEENS0_17aligned_allocatorIS2_EEE12_Vector_implE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseIN5Eigen6MatrixIdLi12ELi1ELi0ELi12ELi1EEENS0_17aligned_allocatorIS2_EEE17_Vector_impl_dataE", !32, i64 0, !32, i64 8, !32, i64 16}
!37 = !{!"_ZTSSt6vectorIdSaIdEE", !38, i64 0}
!38 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !32, i64 0, !32, i64 8, !32, i64 16}
!41 = !{!"_ZTSSt6vectorIN5Eigen6MatrixIdLi12ELi12ELi0ELi12ELi12EEENS0_17aligned_allocatorIS2_EEE", !42, i64 0}
!42 = !{!"_ZTSSt12_Vector_baseIN5Eigen6MatrixIdLi12ELi12ELi0ELi12ELi12EEENS0_17aligned_allocatorIS2_EEE", !43, i64 0}
!43 = !{!"_ZTSNSt12_Vector_baseIN5Eigen6MatrixIdLi12ELi12ELi0ELi12ELi12EEENS0_17aligned_allocatorIS2_EEE12_Vector_implE", !44, i64 0}
!44 = !{!"_ZTSNSt12_Vector_baseIN5Eigen6MatrixIdLi12ELi12ELi0ELi12ELi12EEENS0_17aligned_allocatorIS2_EEE17_Vector_impl_dataE", !32, i64 0, !32, i64 8, !32, i64 16}
!45 = !{!"_ZTSSt6vectorI8BblockIDSaIS0_EE", !46, i64 0}
!46 = !{!"_ZTSSt12_Vector_baseI8BblockIDSaIS0_EE", !47, i64 0}
!47 = !{!"_ZTSNSt12_Vector_baseI8BblockIDSaIS0_EE12_Vector_implE", !48, i64 0}
!48 = !{!"_ZTSNSt12_Vector_baseI8BblockIDSaIS0_EE17_Vector_impl_dataE", !32, i64 0, !32, i64 8, !32, i64 16}
!49 = !{!"_ZTSSt6vectorIN5Eigen6MatrixIdLi12ELi3ELi0ELi12ELi3EEENS0_17aligned_allocatorIS2_EEE", !50, i64 0}
!50 = !{!"_ZTSSt12_Vector_baseIN5Eigen6MatrixIdLi12ELi3ELi0ELi12ELi3EEENS0_17aligned_allocatorIS2_EEE", !51, i64 0}
!51 = !{!"_ZTSNSt12_Vector_baseIN5Eigen6MatrixIdLi12ELi3ELi0ELi12ELi3EEENS0_17aligned_allocatorIS2_EEE12_Vector_implE", !52, i64 0}
!52 = !{!"_ZTSNSt12_Vector_baseIN5Eigen6MatrixIdLi12ELi3ELi0ELi12ELi3EEENS0_17aligned_allocatorIS2_EEE17_Vector_impl_dataE", !32, i64 0, !32, i64 8, !32, i64 16}
!53 = !{!"_ZTSSt6vectorIjSaIjEE", !54, i64 0}
!54 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !55, i64 0}
!55 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !56, i64 0}
!56 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !32, i64 0, !32, i64 8, !32, i64 16}
!57 = !{!"_ZTSSt6vectorI12SparseTripleIdESaIS1_EE", !58, i64 0}
!58 = !{!"_ZTSSt12_Vector_baseI12SparseTripleIdESaIS1_EE", !59, i64 0}
!59 = !{!"_ZTSNSt12_Vector_baseI12SparseTripleIdESaIS1_EE12_Vector_implE", !60, i64 0}
!60 = !{!"_ZTSNSt12_Vector_baseI12SparseTripleIdESaIS1_EE17_Vector_impl_dataE", !32, i64 0, !32, i64 8, !32, i64 16}
!61 = !{!"_ZTSN5Eigen6MatrixIfLin1ELi1ELi0ELin1ELi1EEE", !62, i64 0}
!62 = !{!"_ZTSN5Eigen15PlainObjectBaseINS_6MatrixIfLin1ELi1ELi0ELin1ELi1EEEEE", !63, i64 0}
!63 = !{!"_ZTSN5Eigen12DenseStorageIfLin1ELin1ELi1ELi0EEE", !32, i64 0, !64, i64 8}
!64 = !{!"long", !7, i64 0}
!65 = !{!66, !66, i64 0}
!66 = !{!"bool", !7, i64 0}
!67 = !{i8 0, i8 2}
!68 = !{}
!69 = distinct !{!69, !70}
!70 = !{!"llvm.loop.mustprogress"}


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