; LLVM IR from simbody/simbody :: SimTKmath/Optimizers/src/IpOpt (IpFilter)

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

%"struct.std::_List_iterator" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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 }
%"struct.std::_List_const_iterator" = type { ptr }
%"class.SimTKIpopt::Filter" = type { i32, %"class.std::__cxx11::list" }
%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<SimTKIpopt::FilterEntry *, std::allocator<SimTKIpopt::FilterEntry *>>::_List_impl" }
%"struct.std::__cxx11::_List_base<SimTKIpopt::FilterEntry *, std::allocator<SimTKIpopt::FilterEntry *>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }

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

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

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10SimTKIpopt6Filter8AddEntryESt6vectorIdSaIdEEi(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %1, i32 noundef %2) #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::_List_iterator", align 8
  %8 = alloca %"struct.std::_List_iterator", align 8
  %9 = alloca %"struct.std::_List_iterator", align 8
  %10 = alloca %"class.std::vector", align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"struct.std::_List_iterator", align 8
  %14 = alloca ptr, align 8
  %15 = alloca %"struct.std::_List_const_iterator", align 8
  %16 = alloca %"struct.std::_List_iterator", align 8
  %17 = alloca ptr, align 8
  %18 = alloca %"class.std::vector", align 8
  %19 = alloca i1, align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  %20 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  call void @_ZNSt14_List_iteratorIPN10SimTKIpopt11FilterEntryEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %21 = getelementptr inbounds %"class.SimTKIpopt::Filter", ptr %20, i32 0, i32 1
  %22 = call ptr @_ZNSt7__cxx114listIPN10SimTKIpopt11FilterEntryESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #6
  %23 = getelementptr inbounds %"struct.std::_List_iterator", ptr %8, i32 0, i32 0
  store ptr %22, ptr %23, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %7, ptr align 8 %8, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %24

24:                                               ; preds = %53, %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %25 = getelementptr inbounds %"class.SimTKIpopt::Filter", ptr %20, i32 0, i32 1
  %26 = call ptr @_ZNSt7__cxx114listIPN10SimTKIpopt11FilterEntryESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #6
  %27 = getelementptr inbounds %"struct.std::_List_iterator", ptr %9, i32 0, i32 0
  store ptr %26, ptr %27, align 8
  %28 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorIPN10SimTKIpopt11FilterEntryEES5_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br i1 %28, label %29, label %54

29:                                               ; preds = %24
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14_List_iteratorIPN10SimTKIpopt11FilterEntryEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  %31 = load ptr, ptr %30, align 8, !tbaa !5
  call void @_ZNSt6vectorIdSaIdEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %1)
  %32 = invoke noundef zeroext i1 @_ZNK10SimTKIpopt11FilterEntry9DominatedESt6vectorIdSaIdEE(ptr noundef nonnull align 8 dereferenceable(28) %31, ptr noundef %10)
          to label %33 unwind label %47

33:                                               ; preds = %29
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  br i1 %32, label %34, label %51

34:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %13, ptr align 8 %7, i64 8, i1 false), !tbaa.struct !11
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorIPN10SimTKIpopt11FilterEntryEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14_List_iteratorIPN10SimTKIpopt11FilterEntryEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  %37 = load ptr, ptr %36, align 8, !tbaa !5
  store ptr %37, ptr %14, align 8, !tbaa !5
  %38 = getelementptr inbounds %"class.SimTKIpopt::Filter", ptr %20, i32 0, i32 1
  call void @_ZNSt20_List_const_iteratorIPN10SimTKIpopt11FilterEntryEEC2ERKSt14_List_iteratorIS2_E(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  %39 = getelementptr inbounds %"struct.std::_List_const_iterator", ptr %15, i32 0, i32 0
  %40 = load ptr, ptr %39, align 8
  %41 = call ptr @_ZNSt7__cxx114listIPN10SimTKIpopt11FilterEntryESaIS3_EE5eraseESt20_List_const_iteratorIS3_E(ptr noundef nonnull align 8 dereferenceable(24) %38, ptr %40) #6
  %42 = getelementptr inbounds %"struct.std::_List_iterator", ptr %16, i32 0, i32 0
  store ptr %41, ptr %42, align 8
  %43 = load ptr, ptr %14, align 8, !tbaa !5
  %44 = icmp eq ptr %43, null
  br i1 %44, label %46, label %45

45:                                               ; preds = %34
  call void @_ZN10SimTKIpopt11FilterEntryD1Ev(ptr noundef nonnull align 8 dereferenceable(28) %43) #6
  call void @_ZdlPvm(ptr noundef %43, i64 noundef 32) #7
  br label %46

46:                                               ; preds = %45, %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %53

47:                                               ; preds = %29
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %11, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %12, align 4
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  br label %72

51:                                               ; preds = %33
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorIPN10SimTKIpopt11FilterEntryEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  br label %53

53:                                               ; preds = %51, %46
  br label %24, !llvm.loop !12

54:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %55 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 32) #8
  store i1 true, ptr %19, align 1
  invoke void @_ZNSt6vectorIdSaIdEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 8 dereferenceable(24) %1)
          to label %56 unwind label %60

56:                                               ; preds = %54
  %57 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @_ZN10SimTKIpopt11FilterEntryC1ESt6vectorIdSaIdEEi(ptr noundef nonnull align 8 dereferenceable(28) %55, ptr noundef %18, i32 noundef %57)
          to label %58 unwind label %64

58:                                               ; preds = %56
  store i1 false, ptr %19, align 1
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #6
  store ptr %55, ptr %17, align 8, !tbaa !5
  %59 = getelementptr inbounds %"class.SimTKIpopt::Filter", ptr %20, i32 0, i32 1
  call void @_ZNSt7__cxx114listIPN10SimTKIpopt11FilterEntryESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %59, ptr noundef nonnull align 8 dereferenceable(8) %17)
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  ret void

60:                                               ; preds = %54
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %11, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %12, align 4
  br label %68

64:                                               ; preds = %56
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %11, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %12, align 4
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #6
  br label %68

68:                                               ; preds = %64, %60
  %69 = load i1, ptr %19, align 1
  br i1 %69, label %70, label %71

70:                                               ; preds = %68
  call void @_ZdlPvm(ptr noundef %55, i64 noundef 32) #7
  br label %71

71:                                               ; preds = %70, %68
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %72

72:                                               ; preds = %71, %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %73

73:                                               ; preds = %72
  %74 = load ptr, ptr %11, align 8
  %75 = load i32, ptr %12, align 4
  %76 = insertvalue { ptr, i32 } poison, ptr %74, 0
  %77 = insertvalue { ptr, i32 } %76, i32 %75, 1
  resume { ptr, i32 } %77
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK10SimTKIpopt11FilterEntry9DominatedESt6vectorIdSaIdEE(ptr noundef nonnull align 8 dereferenceable(28), ptr noundef) #1 align 2

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

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #4

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #5

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

declare void @_ZN10SimTKIpopt11FilterEntryC1ESt6vectorIdSaIdEEi(ptr, ptr, i32)

declare void @_ZN10SimTKIpopt11FilterEntryD1Ev(ptr)

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

!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 = !{i64 0, i64 8, !5}
!12 = distinct !{!12, !13}
!13 = !{!"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"

%"struct.std::_List_iterator" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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 }
%"struct.std::_List_const_iterator" = type { ptr }

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

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

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

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10SimTKIpopt6Filter8AddEntryESt6vectorIdSaIdEEi(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %1, i32 noundef %2) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"struct.std::_List_iterator", align 8
  %5 = alloca %"struct.std::_List_iterator", align 8
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca %"struct.std::_List_iterator", align 8
  %8 = alloca %"struct.std::_List_const_iterator", align 8
  %9 = alloca ptr, align 8
  %10 = alloca %"class.std::vector", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  call void @_ZNSt14_List_iteratorIPN10SimTKIpopt11FilterEntryEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %11 = getelementptr inbounds i8, ptr %0, i64 8
  %12 = call ptr @_ZNSt7__cxx114listIPN10SimTKIpopt11FilterEntryESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  store ptr %12, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %13 = call ptr @_ZNSt7__cxx114listIPN10SimTKIpopt11FilterEntryESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  store ptr %13, ptr %5, align 8
  %14 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorIPN10SimTKIpopt11FilterEntryEES5_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br i1 %14, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %3, %30
  %15 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14_List_iteratorIPN10SimTKIpopt11FilterEntryEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %16 = load ptr, ptr %15, align 8, !tbaa !5
  call void @_ZNSt6vectorIdSaIdEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %1)
  %17 = call noundef zeroext i1 @_ZNK10SimTKIpopt11FilterEntry9DominatedESt6vectorIdSaIdEE(ptr noundef nonnull align 8 dereferenceable(28) %16, ptr noundef nonnull %6)
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  br i1 %17, label %18, label %28

18:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %19 = load i64, ptr %4, align 8, !tbaa !5
  store i64 %19, ptr %7, align 8, !tbaa !5
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorIPN10SimTKIpopt11FilterEntryEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14_List_iteratorIPN10SimTKIpopt11FilterEntryEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  %22 = load ptr, ptr %21, align 8, !tbaa !5
  call void @_ZNSt20_List_const_iteratorIPN10SimTKIpopt11FilterEntryEEC2ERKSt14_List_iteratorIS2_E(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  %23 = load ptr, ptr %8, align 8
  %24 = call ptr @_ZNSt7__cxx114listIPN10SimTKIpopt11FilterEntryESaIS3_EE5eraseESt20_List_const_iteratorIS3_E(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr %23) #5
  %25 = icmp eq ptr %22, null
  br i1 %25, label %27, label %26

26:                                               ; preds = %18
  call void @_ZN10SimTKIpopt11FilterEntryD1Ev(ptr noundef nonnull align 8 dereferenceable(28) %22) #5
  call void @_ZdlPvm(ptr noundef nonnull %22, i64 noundef 32) #6
  br label %27

27:                                               ; preds = %26, %18
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  br label %30

28:                                               ; preds = %.lr.ph
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorIPN10SimTKIpopt11FilterEntryEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  br label %30

30:                                               ; preds = %28, %27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %31 = call ptr @_ZNSt7__cxx114listIPN10SimTKIpopt11FilterEntryESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  store ptr %31, ptr %5, align 8
  %32 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorIPN10SimTKIpopt11FilterEntryEES5_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br i1 %32, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge:                                      ; preds = %30, %3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  %33 = call noalias noundef nonnull dereferenceable(32) ptr @_Znwm(i64 noundef 32) #7
  invoke void @_ZNSt6vectorIdSaIdEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %1)
          to label %34 unwind label %36

34:                                               ; preds = %._crit_edge
  invoke void @_ZN10SimTKIpopt11FilterEntryC1ESt6vectorIdSaIdEEi(ptr noundef nonnull align 8 dereferenceable(28) %33, ptr noundef nonnull %10, i32 noundef %2)
          to label %35 unwind label %38

35:                                               ; preds = %34
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  store ptr %33, ptr %9, align 8, !tbaa !5
  call void @_ZNSt7__cxx114listIPN10SimTKIpopt11FilterEntryESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(8) %9)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  ret void

36:                                               ; preds = %._crit_edge
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %40

38:                                               ; preds = %34
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  br label %40

40:                                               ; preds = %36, %38
  %.pn = phi { ptr, i32 } [ %39, %38 ], [ %37, %36 ]
  call void @_ZdlPvm(ptr noundef nonnull %33, i64 noundef 32) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK10SimTKIpopt11FilterEntry9DominatedESt6vectorIdSaIdEE(ptr noundef nonnull align 8 dereferenceable(28), ptr noundef) local_unnamed_addr #1 align 2

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

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #4

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

declare void @_ZN10SimTKIpopt11FilterEntryC1ESt6vectorIdSaIdEEi(ptr, ptr, i32) local_unnamed_addr

declare void @_ZN10SimTKIpopt11FilterEntryD1Ev(ptr) local_unnamed_addr

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

!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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


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