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

; 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.SimTKIpopt::SmartPtr.16" = type { ptr }
%"class.SimTKIpopt::SmartPtr.23" = type { ptr }
%"class.SimTKIpopt::SmartPtr.55" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.26" = type { i8 }
%"class.SimTKIpopt::OrigIpoptNLP" = type { %"class.SimTKIpopt::IpoptNLP", %"class.SimTKIpopt::SmartPtr.17", %"class.SimTKIpopt::SmartPtr.18", %"class.SimTKIpopt::SmartPtr", %"class.SimTKIpopt::SmartPtr", %"class.SimTKIpopt::SmartPtr", %"class.SimTKIpopt::SmartPtr", %"class.SimTKIpopt::SmartPtr.5", %"class.SimTKIpopt::SmartPtr", %"class.SimTKIpopt::SmartPtr.5", %"class.SimTKIpopt::SmartPtr", %"class.SimTKIpopt::SmartPtr.5", %"class.SimTKIpopt::SmartPtr", %"class.SimTKIpopt::SmartPtr.5", %"class.SimTKIpopt::SmartPtr.5", %"class.SimTKIpopt::SmartPtr.5", %"class.SimTKIpopt::SmartPtr.19", %"class.SimTKIpopt::SmartPtr.5", %"class.SimTKIpopt::SmartPtr.5", %"class.SimTKIpopt::SmartPtr.19", %"class.SimTKIpopt::CachedResults", %"class.SimTKIpopt::CachedResults.20", %"class.SimTKIpopt::CachedResults.20", %"class.SimTKIpopt::CachedResults.21", %"class.SimTKIpopt::CachedResults.20", %"class.SimTKIpopt::CachedResults.21", %"class.SimTKIpopt::CachedResults.22", %"class.SimTKIpopt::SmartPtr.23", %"class.SimTKIpopt::SmartPtr.24", %"class.SimTKIpopt::SmartPtr.23", %"class.SimTKIpopt::SmartPtr.24", %"class.SimTKIpopt::SmartPtr.23", %"class.SimTKIpopt::SmartPtr.24", %"class.SimTKIpopt::SmartPtr.23", %"class.SimTKIpopt::SmartPtr.24", %"class.SimTKIpopt::SmartPtr.23", %"class.SimTKIpopt::SmartPtr.23", double, i8, i8, i32, i8, i32, i32, i32, i32, i32, i32, i32, i8, [7 x i8], %"class.SimTKIpopt::TimedTask", %"class.SimTKIpopt::TimedTask", %"class.SimTKIpopt::TimedTask", %"class.SimTKIpopt::TimedTask", %"class.SimTKIpopt::TimedTask", %"class.SimTKIpopt::TimedTask", %"class.SimTKIpopt::TimedTask" }
%"class.SimTKIpopt::IpoptNLP" = type { %"class.SimTKIpopt::ReferencedObject.base", %"class.SimTKIpopt::SmartPtr.16" }
%"class.SimTKIpopt::ReferencedObject.base" = type <{ ptr, i32 }>
%"class.SimTKIpopt::SmartPtr.17" = type { ptr }
%"class.SimTKIpopt::SmartPtr.18" = type { ptr }
%"class.SimTKIpopt::SmartPtr" = type { ptr }
%"class.SimTKIpopt::SmartPtr.5" = type { ptr }
%"class.SimTKIpopt::SmartPtr.19" = type { ptr }
%"class.SimTKIpopt::CachedResults" = type { ptr, i32, ptr }
%"class.SimTKIpopt::CachedResults.20" = type { ptr, i32, ptr }
%"class.SimTKIpopt::CachedResults.21" = type { ptr, i32, ptr }
%"class.SimTKIpopt::CachedResults.22" = type { ptr, i32, ptr }
%"class.SimTKIpopt::SmartPtr.24" = type { ptr }
%"class.SimTKIpopt::TimedTask" = type <{ double, double, i8, i8, [6 x i8] }>

@.str.33 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [99 x i8], align 1
@_ZTIN10SimTKIpopt8IpoptNLP10Eval_ErrorE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.62 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [44 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

; 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 void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK10SimTKIpopt8IpoptNLP11NLP_scalingEv(ptr dead_on_unwind noalias writable sret(%"class.SimTKIpopt::SmartPtr.16") align 8, ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #2 align 2

declare ptr @__cxa_allocate_exception(i64)

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

declare void @__cxa_throw(ptr, ptr, ptr)

declare void @__cxa_free_exception(ptr)

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10SimTKIpopt8ConstPtrINS_6VectorEEENS_8SmartPtrIKT_EERKNS2_IS3_EE(ptr dead_on_unwind noalias writable sret(%"class.SimTKIpopt::SmartPtr.23") align 8, ptr noundef nonnull align 8 dereferenceable(8)) #2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10SimTKIpopt9TimedTask5StartEv(ptr noundef nonnull align 8 dereferenceable(18)) #2 align 2

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

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

declare noundef zeroext i1 @_ZN10SimTKIpopt14IsFiniteNumberEd(double noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10SimTKIpopt8IpoptNLP10Eval_ErrorC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_i(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef, ptr noundef, i32 noundef) unnamed_addr #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK10SimTKIpopt6Vector4Nrm2Ev(ptr noundef nonnull align 8 dereferenceable(205)) #4 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6VectorEEEE19GetCachedResult1DepERS4_RKNS_12TaggedObjectE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(56)) #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10SimTKIpopt12OrigIpoptNLP1dERKNS_6VectorE(ptr dead_on_unwind noalias writable sret(%"class.SimTKIpopt::SmartPtr.23") align 8 %0, ptr noundef nonnull align 8 dereferenceable(648) %1, ptr noundef nonnull align 8 dereferenceable(205) %2) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i1, align 1
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.SimTKIpopt::SmartPtr.23", align 8
  %11 = alloca %"class.SimTKIpopt::SmartPtr.55", align 8
  %12 = alloca %"class.SimTKIpopt::SmartPtr.23", align 8
  %13 = alloca %"class.SimTKIpopt::SmartPtr.16", align 8
  %14 = alloca %"class.SimTKIpopt::SmartPtr.23", align 8
  %15 = alloca i8, align 1
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::allocator.26", align 1
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::allocator.26", align 1
  %21 = alloca i1, align 1
  %22 = alloca %"class.SimTKIpopt::SmartPtr.23", align 8
  %23 = alloca %"class.SimTKIpopt::SmartPtr.16", align 8
  %24 = alloca %"class.SimTKIpopt::SmartPtr.23", align 8
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %25 = load ptr, ptr %5, align 8
  store i1 false, ptr %7, align 1
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0)
  %26 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %25, i32 0, i32 5
  %27 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %26)
          to label %28 unwind label %54

28:                                               ; preds = %3
  %29 = invoke noundef i32 @_ZNK10SimTKIpopt11VectorSpace3DimEv(ptr noundef nonnull align 8 dereferenceable(16) %27)
          to label %30 unwind label %54

30:                                               ; preds = %28
  %31 = icmp eq i32 %29, 0
  br i1 %31, label %32, label %68

32:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  invoke void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEEC2EPS2_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef null)
          to label %33 unwind label %58

33:                                               ; preds = %32
  %34 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %25, i32 0, i32 24
  %35 = invoke noundef ptr @_ZN10SimTKIpopt9GetRawPtrIKNS_6VectorEEEPT_RKNS_8SmartPtrIS3_EE(ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %36 unwind label %62

36:                                               ; preds = %33
  %37 = invoke noundef zeroext i1 @_ZN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6VectorEEEE19GetCachedResult1DepERS4_PKNS_12TaggedObjectE(ptr noundef nonnull align 8 dereferenceable(24) %34, ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %35)
          to label %38 unwind label %62

38:                                               ; preds = %36
  br i1 %37, label %66, label %39

39:                                               ; preds = %38
  %40 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %25, i32 0, i32 5
  %41 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %40)
          to label %42 unwind label %62

42:                                               ; preds = %39
  %43 = load ptr, ptr %41, align 8, !tbaa !9
  %44 = getelementptr inbounds ptr, ptr %43, i64 2
  %45 = load ptr, ptr %44, align 8
  %46 = invoke noundef ptr %45(ptr noundef nonnull align 8 dereferenceable(16) %41)
          to label %47 unwind label %62

47:                                               ; preds = %42
  %48 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEEaSEPS2_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %46)
          to label %49 unwind label %62

49:                                               ; preds = %47
  %50 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %25, i32 0, i32 24
  %51 = invoke noundef ptr @_ZN10SimTKIpopt9GetRawPtrIKNS_6VectorEEEPT_RKNS_8SmartPtrIS3_EE(ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %52 unwind label %62

52:                                               ; preds = %49
  invoke void @_ZN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6VectorEEEE19AddCachedResult1DepERKS4_PKNS_12TaggedObjectE(ptr noundef nonnull align 8 dereferenceable(24) %50, ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %51)
          to label %53 unwind label %62

53:                                               ; preds = %52
  br label %66

54:                                               ; preds = %68, %28, %3
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %8, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %9, align 4
  br label %236

58:                                               ; preds = %32
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %8, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %9, align 4
  br label %67

62:                                               ; preds = %52, %49, %47, %42, %39, %36, %33
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %8, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %9, align 4
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  br label %67

66:                                               ; preds = %53, %38
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %232

67:                                               ; preds = %62, %58
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %236

68:                                               ; preds = %30
  %69 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %25, i32 0, i32 24
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = invoke noundef zeroext i1 @_ZN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6VectorEEEE19GetCachedResult1DepERS4_RKNS_12TaggedObjectE(ptr noundef nonnull align 8 dereferenceable(24) %69, ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(56) %70)
          to label %72 unwind label %54

72:                                               ; preds = %68
  br i1 %71, label %231, label %73

73:                                               ; preds = %72
  %74 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %25, i32 0, i32 46
  %75 = load i32, ptr %74, align 4, !tbaa !11
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %74, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %77 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %25, i32 0, i32 5
  %78 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %77)
          to label %79 unwind label %131

79:                                               ; preds = %73
  %80 = load ptr, ptr %78, align 8, !tbaa !9
  %81 = getelementptr inbounds ptr, ptr %80, i64 2
  %82 = load ptr, ptr %81, align 8
  %83 = invoke noundef ptr %82(ptr noundef nonnull align 8 dereferenceable(16) %78)
          to label %84 unwind label %131

84:                                               ; preds = %79
  invoke void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef %83)
          to label %85 unwind label %131

85:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  invoke void @_ZNK10SimTKIpopt8IpoptNLP11NLP_scalingEv(ptr dead_on_unwind writable sret(%"class.SimTKIpopt::SmartPtr.16") align 8 %13, ptr noundef nonnull align 8 dereferenceable(24) %25)
          to label %86 unwind label %135

86:                                               ; preds = %85
  %87 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %88 unwind label %139

88:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEEC2EPS2_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef %89)
          to label %90 unwind label %143

90:                                               ; preds = %88
  %91 = load ptr, ptr %87, align 8, !tbaa !9
  %92 = getelementptr inbounds ptr, ptr %91, i64 7
  %93 = load ptr, ptr %92, align 8
  invoke void %93(ptr dead_on_unwind writable sret(%"class.SimTKIpopt::SmartPtr.23") align 8 %12, ptr noundef nonnull align 8 dereferenceable(24) %87, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %94 unwind label %147

94:                                               ; preds = %90
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  %95 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %25, i32 0, i32 55
  invoke void @_ZN10SimTKIpopt9TimedTask5StartEv(ptr noundef nonnull align 8 dereferenceable(18) %95)
          to label %96 unwind label %154

96:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #5
  %97 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %25, i32 0, i32 2
  %98 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_3NLPEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %97)
          to label %99 unwind label %158

99:                                               ; preds = %96
  %100 = invoke noundef nonnull align 8 dereferenceable(205) ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_6VectorEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %101 unwind label %158

101:                                              ; preds = %99
  %102 = invoke noundef nonnull align 8 dereferenceable(205) ptr @_ZNK10SimTKIpopt8SmartPtrINS_6VectorEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %103 unwind label %158

103:                                              ; preds = %101
  %104 = load ptr, ptr %98, align 8, !tbaa !9
  %105 = getelementptr inbounds ptr, ptr %104, i64 11
  %106 = load ptr, ptr %105, align 8
  %107 = invoke noundef zeroext i1 %106(ptr noundef nonnull align 8 dereferenceable(12) %98, ptr noundef nonnull align 8 dereferenceable(205) %100, ptr noundef nonnull align 8 dereferenceable(205) %102)
          to label %108 unwind label %158

108:                                              ; preds = %103
  %109 = zext i1 %107 to i8
  store i8 %109, ptr %15, align 1, !tbaa !32
  %110 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %25, i32 0, i32 55
  invoke void @_ZN10SimTKIpopt9TimedTask3EndEv(ptr noundef nonnull align 8 dereferenceable(18) %110)
          to label %111 unwind label %158

111:                                              ; preds = %108
  %112 = load i8, ptr %15, align 1, !tbaa !32, !range !33, !noundef !34
  %113 = trunc i8 %112 to i1
  br i1 %113, label %114, label %121

114:                                              ; preds = %111
  %115 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_6VectorEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %116 unwind label %158

116:                                              ; preds = %114
  %117 = invoke noundef double @_ZNK10SimTKIpopt6Vector4Nrm2Ev(ptr noundef nonnull align 8 dereferenceable(205) %115)
          to label %118 unwind label %158

118:                                              ; preds = %116
  %119 = invoke noundef zeroext i1 @_ZN10SimTKIpopt14IsFiniteNumberEd(double noundef %117)
          to label %120 unwind label %158

120:                                              ; preds = %118
  br i1 %119, label %189, label %121

121:                                              ; preds = %120, %111
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef @.str.62, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %122 unwind label %162

122:                                              ; preds = %121
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  %123 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef @.str.33)
          to label %124 unwind label %166

124:                                              ; preds = %122
  %125 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef @.str.63)
          to label %126 unwind label %166

126:                                              ; preds = %124
  store i1 true, ptr %21, align 1
  %127 = call ptr @__cxa_allocate_exception(i64 112) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %128 unwind label %170

128:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef @.str.35, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %129 unwind label %174

129:                                              ; preds = %128
  invoke void @_ZN10SimTKIpopt8IpoptNLP10Eval_ErrorC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_i(ptr noundef nonnull align 8 dereferenceable(112) %127, ptr noundef %18, ptr noundef %19, i32 noundef 503)
          to label %130 unwind label %178

130:                                              ; preds = %129
  store i1 false, ptr %21, align 1
  invoke void @__cxa_throw(ptr %127, ptr @_ZTIN10SimTKIpopt8IpoptNLP10Eval_ErrorE, ptr @_ZN10SimTKIpopt14IpoptExceptionD2Ev) #6
          to label %242 unwind label %178

131:                                              ; preds = %84, %79, %73
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %8, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %9, align 4
  br label %230

135:                                              ; preds = %85
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %8, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %9, align 4
  br label %153

139:                                              ; preds = %86
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %8, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %9, align 4
  br label %152

143:                                              ; preds = %88
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %8, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %9, align 4
  br label %151

147:                                              ; preds = %90
  %148 = landingpad { ptr, i32 }
          cleanup
  %149 = extractvalue { ptr, i32 } %148, 0
  store ptr %149, ptr %8, align 8
  %150 = extractvalue { ptr, i32 } %148, 1
  store i32 %150, ptr %9, align 4
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  br label %151

151:                                              ; preds = %147, %143
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %152

152:                                              ; preds = %151, %139
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #5
  br label %153

153:                                              ; preds = %152, %135
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %229

154:                                              ; preds = %94
  %155 = landingpad { ptr, i32 }
          cleanup
  %156 = extractvalue { ptr, i32 } %155, 0
  store ptr %156, ptr %8, align 8
  %157 = extractvalue { ptr, i32 } %155, 1
  store i32 %157, ptr %9, align 4
  br label %228

158:                                              ; preds = %199, %118, %116, %114, %108, %103, %101, %99, %96
  %159 = landingpad { ptr, i32 }
          cleanup
  %160 = extractvalue { ptr, i32 } %159, 0
  store ptr %160, ptr %8, align 8
  %161 = extractvalue { ptr, i32 } %159, 1
  store i32 %161, ptr %9, align 4
  br label %227

162:                                              ; preds = %121
  %163 = landingpad { ptr, i32 }
          cleanup
  %164 = extractvalue { ptr, i32 } %163, 0
  store ptr %164, ptr %8, align 8
  %165 = extractvalue { ptr, i32 } %163, 1
  store i32 %165, ptr %9, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  br label %188

166:                                              ; preds = %124, %122
  %167 = landingpad { ptr, i32 }
          cleanup
  %168 = extractvalue { ptr, i32 } %167, 0
  store ptr %168, ptr %8, align 8
  %169 = extractvalue { ptr, i32 } %167, 1
  store i32 %169, ptr %9, align 4
  br label %187

170:                                              ; preds = %126
  %171 = landingpad { ptr, i32 }
          cleanup
  %172 = extractvalue { ptr, i32 } %171, 0
  store ptr %172, ptr %8, align 8
  %173 = extractvalue { ptr, i32 } %171, 1
  store i32 %173, ptr %9, align 4
  br label %183

174:                                              ; preds = %128
  %175 = landingpad { ptr, i32 }
          cleanup
  %176 = extractvalue { ptr, i32 } %175, 0
  store ptr %176, ptr %8, align 8
  %177 = extractvalue { ptr, i32 } %175, 1
  store i32 %177, ptr %9, align 4
  br label %182

178:                                              ; preds = %130, %129
  %179 = landingpad { ptr, i32 }
          cleanup
  %180 = extractvalue { ptr, i32 } %179, 0
  store ptr %180, ptr %8, align 8
  %181 = extractvalue { ptr, i32 } %179, 1
  store i32 %181, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #5
  br label %182

182:                                              ; preds = %178, %174
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #5
  br label %183

183:                                              ; preds = %182, %170
  %184 = load i1, ptr %21, align 1
  br i1 %184, label %185, label %186

185:                                              ; preds = %183
  call void @__cxa_free_exception(ptr %127) #5
  br label %186

186:                                              ; preds = %185, %183
  br label %187

187:                                              ; preds = %186, %166
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #5
  br label %188

188:                                              ; preds = %187, %162
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #5
  br label %227

189:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  invoke void @_ZNK10SimTKIpopt8IpoptNLP11NLP_scalingEv(ptr dead_on_unwind writable sret(%"class.SimTKIpopt::SmartPtr.16") align 8 %23, ptr noundef nonnull align 8 dereferenceable(24) %25)
          to label %190 unwind label %203

190:                                              ; preds = %189
  %191 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %23)
          to label %192 unwind label %207

192:                                              ; preds = %190
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  invoke void @_ZN10SimTKIpopt8ConstPtrINS_6VectorEEENS_8SmartPtrIKT_EERKNS2_IS3_EE(ptr dead_on_unwind writable sret(%"class.SimTKIpopt::SmartPtr.23") align 8 %24, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %193 unwind label %211

193:                                              ; preds = %192
  %194 = load ptr, ptr %191, align 8, !tbaa !9
  %195 = getelementptr inbounds ptr, ptr %194, i64 12
  %196 = load ptr, ptr %195, align 8
  invoke void %196(ptr dead_on_unwind writable sret(%"class.SimTKIpopt::SmartPtr.23") align 8 %22, ptr noundef nonnull align 8 dereferenceable(24) %191, ptr noundef nonnull align 8 dereferenceable(8) %24)
          to label %197 unwind label %215

197:                                              ; preds = %193
  %198 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %199 unwind label %219

199:                                              ; preds = %197
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %22) #5
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  %200 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %25, i32 0, i32 24
  %201 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6VectorEEEE19AddCachedResult1DepERKS4_RKNS_12TaggedObjectE(ptr noundef nonnull align 8 dereferenceable(24) %200, ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(56) %201)
          to label %202 unwind label %158

202:                                              ; preds = %199
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #5
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %231

203:                                              ; preds = %189
  %204 = landingpad { ptr, i32 }
          cleanup
  %205 = extractvalue { ptr, i32 } %204, 0
  store ptr %205, ptr %8, align 8
  %206 = extractvalue { ptr, i32 } %204, 1
  store i32 %206, ptr %9, align 4
  br label %226

207:                                              ; preds = %190
  %208 = landingpad { ptr, i32 }
          cleanup
  %209 = extractvalue { ptr, i32 } %208, 0
  store ptr %209, ptr %8, align 8
  %210 = extractvalue { ptr, i32 } %208, 1
  store i32 %210, ptr %9, align 4
  br label %225

211:                                              ; preds = %192
  %212 = landingpad { ptr, i32 }
          cleanup
  %213 = extractvalue { ptr, i32 } %212, 0
  store ptr %213, ptr %8, align 8
  %214 = extractvalue { ptr, i32 } %212, 1
  store i32 %214, ptr %9, align 4
  br label %224

215:                                              ; preds = %193
  %216 = landingpad { ptr, i32 }
          cleanup
  %217 = extractvalue { ptr, i32 } %216, 0
  store ptr %217, ptr %8, align 8
  %218 = extractvalue { ptr, i32 } %216, 1
  store i32 %218, ptr %9, align 4
  br label %223

219:                                              ; preds = %197
  %220 = landingpad { ptr, i32 }
          cleanup
  %221 = extractvalue { ptr, i32 } %220, 0
  store ptr %221, ptr %8, align 8
  %222 = extractvalue { ptr, i32 } %220, 1
  store i32 %222, ptr %9, align 4
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %22) #5
  br label %223

223:                                              ; preds = %219, %215
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %24) #5
  br label %224

224:                                              ; preds = %223, %211
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  br label %225

225:                                              ; preds = %224, %207
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %23) #5
  br label %226

226:                                              ; preds = %225, %203
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  br label %227

227:                                              ; preds = %226, %188, %158
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #5
  br label %228

228:                                              ; preds = %227, %154
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  br label %229

229:                                              ; preds = %228, %153
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  br label %230

230:                                              ; preds = %229, %131
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %236

231:                                              ; preds = %202, %72
  br label %232

232:                                              ; preds = %231, %66
  store i1 true, ptr %7, align 1
  %233 = load i1, ptr %7, align 1
  br i1 %233, label %235, label %234

234:                                              ; preds = %232
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #5
  br label %235

235:                                              ; preds = %234, %232
  ret void

236:                                              ; preds = %230, %67, %54
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #5
  br label %237

237:                                              ; preds = %236
  %238 = load ptr, ptr %8, align 8
  %239 = load i32, ptr %9, align 4
  %240 = insertvalue { ptr, i32 } poison, ptr %238, 0
  %241 = insertvalue { ptr, i32 } %240, i32 %239, 1
  resume { ptr, i32 } %241

242:                                              ; preds = %130
  unreachable
}

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

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

!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 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !15, i64 460}
!12 = !{!"_ZTSN10SimTKIpopt12OrigIpoptNLPE", !13, i64 0, !17, i64 24, !18, i64 32, !19, i64 40, !19, i64 48, !19, i64 56, !19, i64 64, !20, i64 72, !19, i64 80, !20, i64 88, !19, i64 96, !20, i64 104, !19, i64 112, !20, i64 120, !20, i64 128, !20, i64 136, !21, i64 144, !20, i64 152, !20, i64 160, !21, i64 168, !22, i64 176, !23, i64 200, !23, i64 224, !24, i64 248, !23, i64 272, !24, i64 296, !25, i64 320, !26, i64 344, !27, i64 352, !26, i64 360, !27, i64 368, !26, i64 376, !27, i64 384, !26, i64 392, !27, i64 400, !26, i64 408, !26, i64 416, !28, i64 424, !29, i64 432, !29, i64 433, !30, i64 436, !29, i64 440, !15, i64 444, !15, i64 448, !15, i64 452, !15, i64 456, !15, i64 460, !15, i64 464, !15, i64 468, !29, i64 472, !31, i64 480, !31, i64 504, !31, i64 528, !31, i64 552, !31, i64 576, !31, i64 600, !31, i64 624}
!13 = !{!"_ZTSN10SimTKIpopt8IpoptNLPE", !14, i64 0, !16, i64 16}
!14 = !{!"_ZTSN10SimTKIpopt16ReferencedObjectE", !15, i64 8}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEEE", !6, i64 0}
!17 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_10JournalistEEE", !6, i64 0}
!18 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_3NLPEEE", !6, i64 0}
!19 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEEE", !6, i64 0}
!20 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_11MatrixSpaceEEE", !6, i64 0}
!21 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_14SymMatrixSpaceEEE", !6, i64 0}
!22 = !{!"_ZTSN10SimTKIpopt13CachedResultsIdEE", !15, i64 8, !6, i64 16}
!23 = !{!"_ZTSN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6VectorEEEEE", !15, i64 8, !6, i64 16}
!24 = !{!"_ZTSN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6MatrixEEEEE", !15, i64 8, !6, i64 16}
!25 = !{!"_ZTSN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_9SymMatrixEEEEE", !15, i64 8, !6, i64 16}
!26 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_6VectorEEE", !6, i64 0}
!27 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_6MatrixEEE", !6, i64 0}
!28 = !{!"double", !7, i64 0}
!29 = !{!"bool", !7, i64 0}
!30 = !{!"_ZTSN10SimTKIpopt24HessianApproximationTypeE", !7, i64 0}
!31 = !{!"_ZTSN10SimTKIpopt9TimedTaskE", !28, i64 0, !28, i64 8, !29, i64 16, !29, i64 17}
!32 = !{!29, !29, i64 0}
!33 = !{i8 0, i8 2}
!34 = !{}


; 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.SimTKIpopt::SmartPtr.16" = type { ptr }
%"class.SimTKIpopt::SmartPtr.23" = type { ptr }
%"class.SimTKIpopt::SmartPtr.55" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.26" = type { i8 }

@.str.33 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [99 x i8], align 1
@_ZTIN10SimTKIpopt8IpoptNLP10Eval_ErrorE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.62 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [44 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

; 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 void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK10SimTKIpopt8IpoptNLP11NLP_scalingEv(ptr dead_on_unwind noalias writable sret(%"class.SimTKIpopt::SmartPtr.16") align 8, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #2 align 2

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

declare void @__cxa_free_exception(ptr) local_unnamed_addr

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10SimTKIpopt8ConstPtrINS_6VectorEEENS_8SmartPtrIKT_EERKNS2_IS3_EE(ptr dead_on_unwind noalias writable sret(%"class.SimTKIpopt::SmartPtr.23") align 8, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10SimTKIpopt9TimedTask5StartEv(ptr noundef nonnull align 8 dereferenceable(18)) local_unnamed_addr #2 align 2

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

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

declare noundef zeroext i1 @_ZN10SimTKIpopt14IsFiniteNumberEd(double noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10SimTKIpopt8IpoptNLP10Eval_ErrorC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_i(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef, ptr noundef, i32 noundef) unnamed_addr #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK10SimTKIpopt6Vector4Nrm2Ev(ptr noundef nonnull align 8 dereferenceable(205)) local_unnamed_addr #4 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6VectorEEEE19GetCachedResult1DepERS4_RKNS_12TaggedObjectE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10SimTKIpopt12OrigIpoptNLP1dERKNS_6VectorE(ptr dead_on_unwind noalias nonnull writable sret(%"class.SimTKIpopt::SmartPtr.23") align 8 %0, ptr noundef nonnull align 8 dereferenceable(648) %1, ptr noundef nonnull align 8 dereferenceable(205) %2) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.SimTKIpopt::SmartPtr.23", align 8
  %5 = alloca %"class.SimTKIpopt::SmartPtr.55", align 8
  %6 = alloca %"class.SimTKIpopt::SmartPtr.23", align 8
  %7 = alloca %"class.SimTKIpopt::SmartPtr.16", align 8
  %8 = alloca %"class.SimTKIpopt::SmartPtr.23", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator.26", align 1
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::allocator.26", align 1
  %14 = alloca %"class.SimTKIpopt::SmartPtr.23", align 8
  %15 = alloca %"class.SimTKIpopt::SmartPtr.16", align 8
  %16 = alloca %"class.SimTKIpopt::SmartPtr.23", align 8
  tail call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0)
  %17 = getelementptr inbounds i8, ptr %1, i64 56
  %18 = tail call noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %17)
  %19 = tail call noundef i32 @_ZNK10SimTKIpopt11VectorSpace3DimEv(ptr noundef nonnull align 8 dereferenceable(16) %18)
  %20 = icmp eq i32 %19, 0
  br i1 %20, label %21, label %45

21:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  invoke void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEEC2EPS2_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef null)
          to label %22 unwind label %39

22:                                               ; preds = %21
  %23 = getelementptr inbounds i8, ptr %1, i64 272
  %24 = call noundef ptr @_ZN10SimTKIpopt9GetRawPtrIKNS_6VectorEEEPT_RKNS_8SmartPtrIS3_EE(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %25 = invoke noundef zeroext i1 @_ZN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6VectorEEEE19GetCachedResult1DepERS4_PKNS_12TaggedObjectE(ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %24)
          to label %26 unwind label %41

26:                                               ; preds = %22
  br i1 %25, label %43, label %27

27:                                               ; preds = %26
  %28 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %17)
  %29 = load ptr, ptr %28, align 8, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %29, i64 16
  %31 = load ptr, ptr %30, align 8
  %32 = invoke noundef ptr %31(ptr noundef nonnull align 8 dereferenceable(16) %28)
          to label %33 unwind label %41

33:                                               ; preds = %27
  %34 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEEaSEPS2_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %32)
          to label %35 unwind label %41

35:                                               ; preds = %33
  %36 = call noundef ptr @_ZN10SimTKIpopt9GetRawPtrIKNS_6VectorEEEPT_RKNS_8SmartPtrIS3_EE(ptr noundef nonnull align 8 dereferenceable(8) %4)
  invoke void @_ZN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6VectorEEEE19AddCachedResult1DepERKS4_PKNS_12TaggedObjectE(ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %36)
          to label %43 unwind label %41

37:                                               ; preds = %45
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %146

39:                                               ; preds = %21
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %44

41:                                               ; preds = %35, %33, %27, %22
  %42 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  br label %44

43:                                               ; preds = %35, %26
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br label %145

44:                                               ; preds = %41, %39
  %.pn42 = phi { ptr, i32 } [ %42, %41 ], [ %40, %39 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br label %146

45:                                               ; preds = %3
  %46 = getelementptr inbounds i8, ptr %1, i64 272
  %47 = invoke noundef zeroext i1 @_ZN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6VectorEEEE19GetCachedResult1DepERS4_RKNS_12TaggedObjectE(ptr noundef nonnull align 8 dereferenceable(24) %46, ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(56) %2)
          to label %48 unwind label %37

48:                                               ; preds = %45
  br i1 %47, label %145, label %49

49:                                               ; preds = %48
  %50 = getelementptr inbounds i8, ptr %1, i64 460
  %51 = load i32, ptr %50, align 4, !tbaa !8
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %50, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %53 = tail call noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %17)
  %54 = load ptr, ptr %53, align 8, !tbaa !5
  %55 = getelementptr inbounds i8, ptr %54, i64 16
  %56 = load ptr, ptr %55, align 8
  %57 = invoke noundef ptr %56(ptr noundef nonnull align 8 dereferenceable(16) %53)
          to label %58 unwind label %93

58:                                               ; preds = %49
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef %57)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  invoke void @_ZNK10SimTKIpopt8IpoptNLP11NLP_scalingEv(ptr dead_on_unwind nonnull writable sret(%"class.SimTKIpopt::SmartPtr.16") align 8 %7, ptr noundef nonnull align 8 dereferenceable(24) %1)
          to label %59 unwind label %95

59:                                               ; preds = %58
  %60 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  invoke void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEEC2EPS2_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull %2)
          to label %61 unwind label %97

61:                                               ; preds = %59
  %62 = load ptr, ptr %60, align 8, !tbaa !5
  %63 = getelementptr inbounds i8, ptr %62, i64 56
  %64 = load ptr, ptr %63, align 8
  invoke void %64(ptr dead_on_unwind nonnull writable sret(%"class.SimTKIpopt::SmartPtr.23") align 8 %6, ptr noundef nonnull align 8 dereferenceable(24) %60, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %65 unwind label %99

65:                                               ; preds = %61
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  %66 = getelementptr inbounds i8, ptr %1, i64 576
  invoke void @_ZN10SimTKIpopt9TimedTask5StartEv(ptr noundef nonnull align 8 dereferenceable(18) %66)
          to label %67 unwind label %103

67:                                               ; preds = %65
  %68 = getelementptr inbounds i8, ptr %1, i64 32
  %69 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_3NLPEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %68)
  %70 = call noundef nonnull align 8 dereferenceable(205) ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_6VectorEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %71 = call noundef nonnull align 8 dereferenceable(205) ptr @_ZNK10SimTKIpopt8SmartPtrINS_6VectorEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %72 = load ptr, ptr %69, align 8, !tbaa !5
  %73 = getelementptr inbounds i8, ptr %72, i64 88
  %74 = load ptr, ptr %73, align 8
  %75 = invoke noundef zeroext i1 %74(ptr noundef nonnull align 8 dereferenceable(12) %69, ptr noundef nonnull align 8 dereferenceable(205) %70, ptr noundef nonnull align 8 dereferenceable(205) %71)
          to label %76 unwind label %105

76:                                               ; preds = %67
  call void @_ZN10SimTKIpopt9TimedTask3EndEv(ptr noundef nonnull align 8 dereferenceable(18) %66)
  br i1 %75, label %77, label %83

77:                                               ; preds = %76
  %78 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_6VectorEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %79 = invoke noundef double @_ZNK10SimTKIpopt6Vector4Nrm2Ev(ptr noundef nonnull align 8 dereferenceable(205) %78)
          to label %80 unwind label %105

80:                                               ; preds = %77
  %81 = invoke noundef zeroext i1 @_ZN10SimTKIpopt14IsFiniteNumberEd(double noundef %79)
          to label %82 unwind label %105

82:                                               ; preds = %80
  br i1 %81, label %120, label %83

83:                                               ; preds = %82, %76
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @.str.62, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %84 unwind label %107

84:                                               ; preds = %83
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #5
  %85 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @.str.33)
          to label %86 unwind label %109

86:                                               ; preds = %84
  %87 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @.str.63)
          to label %88 unwind label %109

88:                                               ; preds = %86
  %89 = call ptr @__cxa_allocate_exception(i64 112) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %90 unwind label %.thread

90:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull @.str.35, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %91 unwind label %112

91:                                               ; preds = %90
  invoke void @_ZN10SimTKIpopt8IpoptNLP10Eval_ErrorC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_i(ptr noundef nonnull align 8 dereferenceable(112) %89, ptr noundef nonnull %11, ptr noundef nonnull %12, i32 noundef 503)
          to label %92 unwind label %114

92:                                               ; preds = %91
  invoke void @__cxa_throw(ptr nonnull %89, ptr nonnull @_ZTIN10SimTKIpopt8IpoptNLP10Eval_ErrorE, ptr nonnull @_ZN10SimTKIpopt14IpoptExceptionD2Ev) #6
          to label %147 unwind label %114

93:                                               ; preds = %49
  %94 = landingpad { ptr, i32 }
          cleanup
  br label %144

95:                                               ; preds = %58
  %96 = landingpad { ptr, i32 }
          cleanup
  br label %102

97:                                               ; preds = %59
  %98 = landingpad { ptr, i32 }
          cleanup
  br label %101

99:                                               ; preds = %61
  %100 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  br label %101

101:                                              ; preds = %99, %97
  %.pn = phi { ptr, i32 } [ %100, %99 ], [ %98, %97 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  br label %102

102:                                              ; preds = %101, %95
  %.pn.pn = phi { ptr, i32 } [ %.pn, %101 ], [ %96, %95 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  br label %143

103:                                              ; preds = %65
  %104 = landingpad { ptr, i32 }
          cleanup
  br label %142

105:                                              ; preds = %129, %80, %77, %67
  %106 = landingpad { ptr, i32 }
          cleanup
  br label %142

107:                                              ; preds = %83
  %108 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #5
  br label %119

109:                                              ; preds = %86, %84
  %110 = landingpad { ptr, i32 }
          cleanup
  br label %118

.thread:                                          ; preds = %88
  %111 = landingpad { ptr, i32 }
          cleanup
  br label %117

112:                                              ; preds = %90
  %113 = landingpad { ptr, i32 }
          cleanup
  br label %116

114:                                              ; preds = %92, %91
  %.0 = phi i1 [ false, %92 ], [ true, %91 ]
  %115 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  br label %116

116:                                              ; preds = %112, %114
  %.pn28 = phi { ptr, i32 } [ %115, %114 ], [ %113, %112 ]
  %.1 = phi i1 [ %.0, %114 ], [ true, %112 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #5
  br i1 %.1, label %117, label %118

117:                                              ; preds = %.thread, %116
  %.pn28.pn47 = phi { ptr, i32 } [ %111, %.thread ], [ %.pn28, %116 ]
  call void @__cxa_free_exception(ptr %89) #5
  br label %118

118:                                              ; preds = %116, %117, %109
  %.pn28.pn.pn = phi { ptr, i32 } [ %.pn28.pn47, %117 ], [ %.pn28, %116 ], [ %110, %109 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  br label %119

119:                                              ; preds = %118, %107
  %.pn28.pn.pn.pn = phi { ptr, i32 } [ %.pn28.pn.pn, %118 ], [ %108, %107 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #5
  br label %142

120:                                              ; preds = %82
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #5
  invoke void @_ZNK10SimTKIpopt8IpoptNLP11NLP_scalingEv(ptr dead_on_unwind nonnull writable sret(%"class.SimTKIpopt::SmartPtr.16") align 8 %15, ptr noundef nonnull align 8 dereferenceable(24) %1)
          to label %121 unwind label %131

121:                                              ; preds = %120
  %122 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %15)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #5
  invoke void @_ZN10SimTKIpopt8ConstPtrINS_6VectorEEENS_8SmartPtrIKT_EERKNS2_IS3_EE(ptr dead_on_unwind nonnull writable sret(%"class.SimTKIpopt::SmartPtr.23") align 8 %16, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %123 unwind label %133

123:                                              ; preds = %121
  %124 = load ptr, ptr %122, align 8, !tbaa !5
  %125 = getelementptr inbounds i8, ptr %124, i64 96
  %126 = load ptr, ptr %125, align 8
  invoke void %126(ptr dead_on_unwind nonnull writable sret(%"class.SimTKIpopt::SmartPtr.23") align 8 %14, ptr noundef nonnull align 8 dereferenceable(24) %122, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %127 unwind label %135

127:                                              ; preds = %123
  %128 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %129 unwind label %137

129:                                              ; preds = %127
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #5
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #5
  invoke void @_ZN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6VectorEEEE19AddCachedResult1DepERKS4_RKNS_12TaggedObjectE(ptr noundef nonnull align 8 dereferenceable(24) %46, ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(56) %2)
          to label %130 unwind label %105

130:                                              ; preds = %129
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %145

131:                                              ; preds = %120
  %132 = landingpad { ptr, i32 }
          cleanup
  br label %141

133:                                              ; preds = %121
  %134 = landingpad { ptr, i32 }
          cleanup
  br label %140

135:                                              ; preds = %123
  %136 = landingpad { ptr, i32 }
          cleanup
  br label %139

137:                                              ; preds = %127
  %138 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  br label %139

139:                                              ; preds = %137, %135
  %.pn33 = phi { ptr, i32 } [ %138, %137 ], [ %136, %135 ]
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #5
  br label %140

140:                                              ; preds = %139, %133
  %.pn33.pn = phi { ptr, i32 } [ %.pn33, %139 ], [ %134, %133 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #5
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #5
  br label %141

141:                                              ; preds = %140, %131
  %.pn33.pn.pn = phi { ptr, i32 } [ %.pn33.pn, %140 ], [ %132, %131 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #5
  br label %142

142:                                              ; preds = %105, %119, %141, %103
  %.pn37.pn = phi { ptr, i32 } [ %104, %103 ], [ %106, %105 ], [ %.pn33.pn.pn, %141 ], [ %.pn28.pn.pn.pn, %119 ]
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br label %143

143:                                              ; preds = %142, %102
  %.pn37.pn.pn = phi { ptr, i32 } [ %.pn37.pn, %142 ], [ %.pn.pn, %102 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  br label %144

144:                                              ; preds = %143, %93
  %.pn37.pn.pn.pn = phi { ptr, i32 } [ %.pn37.pn.pn, %143 ], [ %94, %93 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %146

145:                                              ; preds = %43, %130, %48
  ret void

146:                                              ; preds = %144, %44, %37
  %.pn42.pn = phi { ptr, i32 } [ %.pn42, %44 ], [ %.pn37.pn.pn.pn, %144 ], [ %38, %37 ]
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #5
  resume { ptr, i32 } %.pn42.pn

147:                                              ; preds = %92
  unreachable
}

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

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

!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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !12, i64 460}
!9 = !{!"_ZTSN10SimTKIpopt12OrigIpoptNLPE", !10, i64 0, !16, i64 24, !17, i64 32, !18, i64 40, !18, i64 48, !18, i64 56, !18, i64 64, !19, i64 72, !18, i64 80, !19, i64 88, !18, i64 96, !19, i64 104, !18, i64 112, !19, i64 120, !19, i64 128, !19, i64 136, !20, i64 144, !19, i64 152, !19, i64 160, !20, i64 168, !21, i64 176, !22, i64 200, !22, i64 224, !23, i64 248, !22, i64 272, !23, i64 296, !24, i64 320, !25, i64 344, !26, i64 352, !25, i64 360, !26, i64 368, !25, i64 376, !26, i64 384, !25, i64 392, !26, i64 400, !25, i64 408, !25, i64 416, !27, i64 424, !28, i64 432, !28, i64 433, !29, i64 436, !28, i64 440, !12, i64 444, !12, i64 448, !12, i64 452, !12, i64 456, !12, i64 460, !12, i64 464, !12, i64 468, !28, i64 472, !30, i64 480, !30, i64 504, !30, i64 528, !30, i64 552, !30, i64 576, !30, i64 600, !30, i64 624}
!10 = !{!"_ZTSN10SimTKIpopt8IpoptNLPE", !11, i64 0, !14, i64 16}
!11 = !{!"_ZTSN10SimTKIpopt16ReferencedObjectE", !12, i64 8}
!12 = !{!"int", !13, i64 0}
!13 = !{!"omnipotent char", !7, i64 0}
!14 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEEE", !15, i64 0}
!15 = !{!"any pointer", !13, i64 0}
!16 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_10JournalistEEE", !15, i64 0}
!17 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_3NLPEEE", !15, i64 0}
!18 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEEE", !15, i64 0}
!19 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_11MatrixSpaceEEE", !15, i64 0}
!20 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_14SymMatrixSpaceEEE", !15, i64 0}
!21 = !{!"_ZTSN10SimTKIpopt13CachedResultsIdEE", !12, i64 8, !15, i64 16}
!22 = !{!"_ZTSN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6VectorEEEEE", !12, i64 8, !15, i64 16}
!23 = !{!"_ZTSN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6MatrixEEEEE", !12, i64 8, !15, i64 16}
!24 = !{!"_ZTSN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_9SymMatrixEEEEE", !12, i64 8, !15, i64 16}
!25 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_6VectorEEE", !15, i64 0}
!26 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_6MatrixEEE", !15, i64 0}
!27 = !{!"double", !13, i64 0}
!28 = !{!"bool", !13, i64 0}
!29 = !{!"_ZTSN10SimTKIpopt24HessianApproximationTypeE", !13, i64 0}
!30 = !{!"_ZTSN10SimTKIpopt9TimedTaskE", !27, i64 0, !27, i64 8, !28, i64 16, !28, i64 17}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass