; 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.57 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [56 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 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 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 nounwind uwtable
declare dso_local void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEaSEPS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2 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
define dso_local void @_ZN10SimTKIpopt12OrigIpoptNLP6grad_fERKNS_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 %"class.SimTKIpopt::SmartPtr.55", align 8
  %8 = alloca i1, align 1
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.SimTKIpopt::SmartPtr.23", align 8
  %12 = alloca %"class.SimTKIpopt::SmartPtr.16", align 8
  %13 = alloca %"class.SimTKIpopt::SmartPtr.23", align 8
  %14 = alloca i8, align 1
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::allocator.26", align 1
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.std::allocator.26", align 1
  %20 = alloca i1, align 1
  %21 = alloca %"class.SimTKIpopt::SmartPtr.23", align 8
  %22 = alloca %"class.SimTKIpopt::SmartPtr.16", align 8
  %23 = 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
  %24 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7)
  store i1 false, ptr %8, align 1
  invoke void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0)
          to label %25 unwind label %89

25:                                               ; preds = %3
  %26 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %24, i32 0, i32 21
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = invoke noundef zeroext i1 @_ZN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6VectorEEEE19GetCachedResult1DepERS4_PKNS_12TaggedObjectE(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %27)
          to label %29 unwind label %93

29:                                               ; preds = %25
  br i1 %28, label %192, label %30

30:                                               ; preds = %29
  %31 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %24, i32 0, i32 43
  %32 = load i32, ptr %31, align 8, !tbaa !9
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr %31, align 8, !tbaa !9
  %34 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %24, i32 0, i32 3
  %35 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %34)
          to label %36 unwind label %93

36:                                               ; preds = %30
  %37 = load ptr, ptr %35, align 8, !tbaa !30
  %38 = getelementptr inbounds ptr, ptr %37, i64 2
  %39 = load ptr, ptr %38, align 8
  %40 = invoke noundef ptr %39(ptr noundef nonnull align 8 dereferenceable(16) %35)
          to label %41 unwind label %93

41:                                               ; preds = %36
  %42 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEaSEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef %40)
          to label %43 unwind label %93

43:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  invoke void @_ZNK10SimTKIpopt8IpoptNLP11NLP_scalingEv(ptr dead_on_unwind writable sret(%"class.SimTKIpopt::SmartPtr.16") align 8 %12, ptr noundef nonnull align 8 dereferenceable(24) %24)
          to label %44 unwind label %97

44:                                               ; preds = %43
  %45 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %46 unwind label %101

46:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEEC2EPS2_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef %47)
          to label %48 unwind label %105

48:                                               ; preds = %46
  %49 = load ptr, ptr %45, align 8, !tbaa !30
  %50 = getelementptr inbounds ptr, ptr %49, i64 7
  %51 = load ptr, ptr %50, align 8
  invoke void %51(ptr dead_on_unwind writable sret(%"class.SimTKIpopt::SmartPtr.23") align 8 %11, ptr noundef nonnull align 8 dereferenceable(24) %45, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %52 unwind label %109

52:                                               ; preds = %48
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  %53 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %24, i32 0, i32 52
  invoke void @_ZN10SimTKIpopt9TimedTask5StartEv(ptr noundef nonnull align 8 dereferenceable(18) %53)
          to label %54 unwind label %116

54:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #5
  %55 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %24, i32 0, i32 2
  %56 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_3NLPEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %55)
          to label %57 unwind label %120

57:                                               ; preds = %54
  %58 = invoke noundef nonnull align 8 dereferenceable(205) ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_6VectorEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %59 unwind label %120

59:                                               ; preds = %57
  %60 = invoke noundef nonnull align 8 dereferenceable(205) ptr @_ZNK10SimTKIpopt8SmartPtrINS_6VectorEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %61 unwind label %120

61:                                               ; preds = %59
  %62 = load ptr, ptr %56, align 8, !tbaa !30
  %63 = getelementptr inbounds ptr, ptr %62, i64 8
  %64 = load ptr, ptr %63, align 8
  %65 = invoke noundef zeroext i1 %64(ptr noundef nonnull align 8 dereferenceable(12) %56, ptr noundef nonnull align 8 dereferenceable(205) %58, ptr noundef nonnull align 8 dereferenceable(205) %60)
          to label %66 unwind label %120

66:                                               ; preds = %61
  %67 = zext i1 %65 to i8
  store i8 %67, ptr %14, align 1, !tbaa !32
  %68 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %24, i32 0, i32 52
  invoke void @_ZN10SimTKIpopt9TimedTask3EndEv(ptr noundef nonnull align 8 dereferenceable(18) %68)
          to label %69 unwind label %120

69:                                               ; preds = %66
  %70 = load i8, ptr %14, align 1, !tbaa !32, !range !33, !noundef !34
  %71 = trunc i8 %70 to i1
  br i1 %71, label %72, label %79

72:                                               ; preds = %69
  %73 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_6VectorEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %74 unwind label %120

74:                                               ; preds = %72
  %75 = invoke noundef double @_ZNK10SimTKIpopt6Vector4Nrm2Ev(ptr noundef nonnull align 8 dereferenceable(205) %73)
          to label %76 unwind label %120

76:                                               ; preds = %74
  %77 = invoke noundef zeroext i1 @_ZN10SimTKIpopt14IsFiniteNumberEd(double noundef %75)
          to label %78 unwind label %120

78:                                               ; preds = %76
  br i1 %77, label %151, label %79

79:                                               ; preds = %78, %69
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef @.str.57, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %80 unwind label %124

80:                                               ; preds = %79
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #5
  %81 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef @.str.33)
          to label %82 unwind label %128

82:                                               ; preds = %80
  %83 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef @.str.58)
          to label %84 unwind label %128

84:                                               ; preds = %82
  store i1 true, ptr %20, align 1
  %85 = call ptr @__cxa_allocate_exception(i64 112) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(32) %15)
          to label %86 unwind label %132

86:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef @.str.35, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %87 unwind label %136

87:                                               ; preds = %86
  invoke void @_ZN10SimTKIpopt8IpoptNLP10Eval_ErrorC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_i(ptr noundef nonnull align 8 dereferenceable(112) %85, ptr noundef %17, ptr noundef %18, i32 noundef 430)
          to label %88 unwind label %140

88:                                               ; preds = %87
  store i1 false, ptr %20, align 1
  invoke void @__cxa_throw(ptr %85, ptr @_ZTIN10SimTKIpopt8IpoptNLP10Eval_ErrorE, ptr @_ZN10SimTKIpopt14IpoptExceptionD2Ev) #6
          to label %203 unwind label %140

89:                                               ; preds = %3
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %9, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %10, align 4
  br label %197

93:                                               ; preds = %41, %36, %30, %25
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %9, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %10, align 4
  br label %196

97:                                               ; preds = %43
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %9, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %10, align 4
  br label %115

101:                                              ; preds = %44
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %9, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %10, align 4
  br label %114

105:                                              ; preds = %46
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %9, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %10, align 4
  br label %113

109:                                              ; preds = %48
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %9, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %10, align 4
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #5
  br label %113

113:                                              ; preds = %109, %105
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %114

114:                                              ; preds = %113, %101
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  br label %115

115:                                              ; preds = %114, %97
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %191

116:                                              ; preds = %52
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %9, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %10, align 4
  br label %190

120:                                              ; preds = %161, %76, %74, %72, %66, %61, %59, %57, %54
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %9, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %10, align 4
  br label %189

124:                                              ; preds = %79
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %9, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %10, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #5
  br label %150

128:                                              ; preds = %82, %80
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %9, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %10, align 4
  br label %149

132:                                              ; preds = %84
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %9, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %10, align 4
  br label %145

136:                                              ; preds = %86
  %137 = landingpad { ptr, i32 }
          cleanup
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %9, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %10, align 4
  br label %144

140:                                              ; preds = %88, %87
  %141 = landingpad { ptr, i32 }
          cleanup
  %142 = extractvalue { ptr, i32 } %141, 0
  store ptr %142, ptr %9, align 8
  %143 = extractvalue { ptr, i32 } %141, 1
  store i32 %143, ptr %10, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #5
  br label %144

144:                                              ; preds = %140, %136
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #5
  br label %145

145:                                              ; preds = %144, %132
  %146 = load i1, ptr %20, align 1
  br i1 %146, label %147, label %148

147:                                              ; preds = %145
  call void @__cxa_free_exception(ptr %85) #5
  br label %148

148:                                              ; preds = %147, %145
  br label %149

149:                                              ; preds = %148, %128
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #5
  br label %150

150:                                              ; preds = %149, %124
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #5
  br label %189

151:                                              ; preds = %78
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  invoke void @_ZNK10SimTKIpopt8IpoptNLP11NLP_scalingEv(ptr dead_on_unwind writable sret(%"class.SimTKIpopt::SmartPtr.16") align 8 %22, ptr noundef nonnull align 8 dereferenceable(24) %24)
          to label %152 unwind label %165

152:                                              ; preds = %151
  %153 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %154 unwind label %169

154:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  invoke void @_ZN10SimTKIpopt8ConstPtrINS_6VectorEEENS_8SmartPtrIKT_EERKNS2_IS3_EE(ptr dead_on_unwind writable sret(%"class.SimTKIpopt::SmartPtr.23") align 8 %23, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %155 unwind label %173

155:                                              ; preds = %154
  %156 = load ptr, ptr %153, align 8, !tbaa !30
  %157 = getelementptr inbounds ptr, ptr %156, i64 20
  %158 = load ptr, ptr %157, align 8
  invoke void %158(ptr dead_on_unwind writable sret(%"class.SimTKIpopt::SmartPtr.23") align 8 %21, ptr noundef nonnull align 8 dereferenceable(24) %153, ptr noundef nonnull align 8 dereferenceable(8) %23)
          to label %159 unwind label %177

159:                                              ; preds = %155
  %160 = 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) %21)
          to label %161 unwind label %181

161:                                              ; preds = %159
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %21) #5
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  %162 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %24, i32 0, i32 21
  %163 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6VectorEEEE19AddCachedResult1DepERKS4_PKNS_12TaggedObjectE(ptr noundef nonnull align 8 dereferenceable(24) %162, ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %163)
          to label %164 unwind label %120

164:                                              ; preds = %161
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %192

165:                                              ; preds = %151
  %166 = landingpad { ptr, i32 }
          cleanup
  %167 = extractvalue { ptr, i32 } %166, 0
  store ptr %167, ptr %9, align 8
  %168 = extractvalue { ptr, i32 } %166, 1
  store i32 %168, ptr %10, align 4
  br label %188

169:                                              ; preds = %152
  %170 = landingpad { ptr, i32 }
          cleanup
  %171 = extractvalue { ptr, i32 } %170, 0
  store ptr %171, ptr %9, align 8
  %172 = extractvalue { ptr, i32 } %170, 1
  store i32 %172, ptr %10, align 4
  br label %187

173:                                              ; preds = %154
  %174 = landingpad { ptr, i32 }
          cleanup
  %175 = extractvalue { ptr, i32 } %174, 0
  store ptr %175, ptr %9, align 8
  %176 = extractvalue { ptr, i32 } %174, 1
  store i32 %176, ptr %10, align 4
  br label %186

177:                                              ; preds = %155
  %178 = landingpad { ptr, i32 }
          cleanup
  %179 = extractvalue { ptr, i32 } %178, 0
  store ptr %179, ptr %9, align 8
  %180 = extractvalue { ptr, i32 } %178, 1
  store i32 %180, ptr %10, align 4
  br label %185

181:                                              ; preds = %159
  %182 = landingpad { ptr, i32 }
          cleanup
  %183 = extractvalue { ptr, i32 } %182, 0
  store ptr %183, ptr %9, align 8
  %184 = extractvalue { ptr, i32 } %182, 1
  store i32 %184, ptr %10, align 4
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %21) #5
  br label %185

185:                                              ; preds = %181, %177
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %23) #5
  br label %186

186:                                              ; preds = %185, %173
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  br label %187

187:                                              ; preds = %186, %169
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %22) #5
  br label %188

188:                                              ; preds = %187, %165
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  br label %189

189:                                              ; preds = %188, %150, %120
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  br label %190

190:                                              ; preds = %189, %116
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  br label %191

191:                                              ; preds = %190, %115
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %196

192:                                              ; preds = %164, %29
  store i1 true, ptr %8, align 1
  %193 = load i1, ptr %8, align 1
  br i1 %193, label %195, label %194

194:                                              ; preds = %192
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #5
  br label %195

195:                                              ; preds = %194, %192
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  ret void

196:                                              ; preds = %191, %93
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #5
  br label %197

197:                                              ; preds = %196, %89
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %198

198:                                              ; preds = %197
  %199 = load ptr, ptr %9, align 8
  %200 = load i32, ptr %10, align 4
  %201 = insertvalue { ptr, i32 } poison, ptr %199, 0
  %202 = insertvalue { ptr, i32 } %201, i32 %200, 1
  resume { ptr, i32 } %202

203:                                              ; preds = %88
  unreachable
}

; 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 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, !13, i64 448}
!10 = !{!"_ZTSN10SimTKIpopt12OrigIpoptNLPE", !11, i64 0, !15, i64 24, !16, i64 32, !17, i64 40, !17, i64 48, !17, i64 56, !17, i64 64, !18, i64 72, !17, i64 80, !18, i64 88, !17, i64 96, !18, i64 104, !17, i64 112, !18, i64 120, !18, i64 128, !18, i64 136, !19, i64 144, !18, i64 152, !18, i64 160, !19, i64 168, !20, i64 176, !21, i64 200, !21, i64 224, !22, i64 248, !21, i64 272, !22, i64 296, !23, i64 320, !24, i64 344, !25, i64 352, !24, i64 360, !25, i64 368, !24, i64 376, !25, i64 384, !24, i64 392, !25, i64 400, !24, i64 408, !24, i64 416, !26, i64 424, !27, i64 432, !27, i64 433, !28, i64 436, !27, i64 440, !13, i64 444, !13, i64 448, !13, i64 452, !13, i64 456, !13, i64 460, !13, i64 464, !13, i64 468, !27, i64 472, !29, i64 480, !29, i64 504, !29, i64 528, !29, i64 552, !29, i64 576, !29, i64 600, !29, i64 624}
!11 = !{!"_ZTSN10SimTKIpopt8IpoptNLPE", !12, i64 0, !14, i64 16}
!12 = !{!"_ZTSN10SimTKIpopt16ReferencedObjectE", !13, i64 8}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEEE", !6, i64 0}
!15 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_10JournalistEEE", !6, i64 0}
!16 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_3NLPEEE", !6, i64 0}
!17 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEEE", !6, i64 0}
!18 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_11MatrixSpaceEEE", !6, i64 0}
!19 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_14SymMatrixSpaceEEE", !6, i64 0}
!20 = !{!"_ZTSN10SimTKIpopt13CachedResultsIdEE", !13, i64 8, !6, i64 16}
!21 = !{!"_ZTSN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6VectorEEEEE", !13, i64 8, !6, i64 16}
!22 = !{!"_ZTSN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6MatrixEEEEE", !13, i64 8, !6, i64 16}
!23 = !{!"_ZTSN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_9SymMatrixEEEEE", !13, i64 8, !6, i64 16}
!24 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_6VectorEEE", !6, i64 0}
!25 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_6MatrixEEE", !6, i64 0}
!26 = !{!"double", !7, i64 0}
!27 = !{!"bool", !7, i64 0}
!28 = !{!"_ZTSN10SimTKIpopt24HessianApproximationTypeE", !7, i64 0}
!29 = !{!"_ZTSN10SimTKIpopt9TimedTaskE", !26, i64 0, !26, i64 8, !27, i64 16, !27, i64 17}
!30 = !{!31, !31, i64 0}
!31 = !{!"vtable pointer", !8, i64 0}
!32 = !{!27, !27, 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.57 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [56 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 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 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 nounwind uwtable
declare dso_local void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEaSEPS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2 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
define dso_local void @_ZN10SimTKIpopt12OrigIpoptNLP6grad_fERKNS_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 %"class.SimTKIpopt::SmartPtr.55", align 8
  %5 = alloca %"class.SimTKIpopt::SmartPtr.23", align 8
  %6 = alloca %"class.SimTKIpopt::SmartPtr.16", align 8
  %7 = alloca %"class.SimTKIpopt::SmartPtr.23", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator.26", align 1
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator.26", align 1
  %13 = alloca %"class.SimTKIpopt::SmartPtr.23", align 8
  %14 = alloca %"class.SimTKIpopt::SmartPtr.16", align 8
  %15 = alloca %"class.SimTKIpopt::SmartPtr.23", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0)
  %16 = getelementptr inbounds i8, ptr %1, i64 200
  %17 = invoke noundef zeroext i1 @_ZN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6VectorEEEE19GetCachedResult1DepERS4_PKNS_12TaggedObjectE(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %2)
          to label %18 unwind label %66

18:                                               ; preds = %3
  br i1 %17, label %117, label %19

19:                                               ; preds = %18
  %20 = getelementptr inbounds i8, ptr %1, i64 448
  %21 = load i32, ptr %20, align 8, !tbaa !5
  %22 = add nsw i32 %21, 1
  store i32 %22, ptr %20, align 8, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %1, i64 40
  %24 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %23)
  %25 = load ptr, ptr %24, align 8, !tbaa !29
  %26 = getelementptr inbounds i8, ptr %25, i64 16
  %27 = load ptr, ptr %26, align 8
  %28 = invoke noundef ptr %27(ptr noundef nonnull align 8 dereferenceable(16) %24)
          to label %29 unwind label %66

29:                                               ; preds = %19
  %30 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEaSEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef %28)
          to label %31 unwind label %66

31:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  invoke void @_ZNK10SimTKIpopt8IpoptNLP11NLP_scalingEv(ptr dead_on_unwind nonnull writable sret(%"class.SimTKIpopt::SmartPtr.16") align 8 %6, ptr noundef nonnull align 8 dereferenceable(24) %1)
          to label %32 unwind label %68

32:                                               ; preds = %31
  %33 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  invoke void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEEC2EPS2_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull %2)
          to label %34 unwind label %70

34:                                               ; preds = %32
  %35 = load ptr, ptr %33, align 8, !tbaa !29
  %36 = getelementptr inbounds i8, ptr %35, i64 56
  %37 = load ptr, ptr %36, align 8
  invoke void %37(ptr dead_on_unwind nonnull writable sret(%"class.SimTKIpopt::SmartPtr.23") align 8 %5, ptr noundef nonnull align 8 dereferenceable(24) %33, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %38 unwind label %72

38:                                               ; preds = %34
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  %39 = getelementptr inbounds i8, ptr %1, i64 504
  invoke void @_ZN10SimTKIpopt9TimedTask5StartEv(ptr noundef nonnull align 8 dereferenceable(18) %39)
          to label %40 unwind label %76

40:                                               ; preds = %38
  %41 = getelementptr inbounds i8, ptr %1, i64 32
  %42 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_3NLPEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %41)
  %43 = call noundef nonnull align 8 dereferenceable(205) ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_6VectorEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %44 = call noundef nonnull align 8 dereferenceable(205) ptr @_ZNK10SimTKIpopt8SmartPtrINS_6VectorEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %45 = load ptr, ptr %42, align 8, !tbaa !29
  %46 = getelementptr inbounds i8, ptr %45, i64 64
  %47 = load ptr, ptr %46, align 8
  %48 = invoke noundef zeroext i1 %47(ptr noundef nonnull align 8 dereferenceable(12) %42, ptr noundef nonnull align 8 dereferenceable(205) %43, ptr noundef nonnull align 8 dereferenceable(205) %44)
          to label %49 unwind label %78

49:                                               ; preds = %40
  call void @_ZN10SimTKIpopt9TimedTask3EndEv(ptr noundef nonnull align 8 dereferenceable(18) %39)
  br i1 %48, label %50, label %56

50:                                               ; preds = %49
  %51 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_6VectorEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %52 = invoke noundef double @_ZNK10SimTKIpopt6Vector4Nrm2Ev(ptr noundef nonnull align 8 dereferenceable(205) %51)
          to label %53 unwind label %78

53:                                               ; preds = %50
  %54 = invoke noundef zeroext i1 @_ZN10SimTKIpopt14IsFiniteNumberEd(double noundef %52)
          to label %55 unwind label %78

55:                                               ; preds = %53
  br i1 %54, label %93, label %56

56:                                               ; preds = %55, %49
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull @.str.57, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %57 unwind label %80

57:                                               ; preds = %56
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  %58 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull @.str.33)
          to label %59 unwind label %82

59:                                               ; preds = %57
  %60 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull @.str.58)
          to label %61 unwind label %82

61:                                               ; preds = %59
  %62 = call ptr @__cxa_allocate_exception(i64 112) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %63 unwind label %.thread

63:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull @.str.35, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %64 unwind label %85

64:                                               ; preds = %63
  invoke void @_ZN10SimTKIpopt8IpoptNLP10Eval_ErrorC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_i(ptr noundef nonnull align 8 dereferenceable(112) %62, ptr noundef nonnull %10, ptr noundef nonnull %11, i32 noundef 430)
          to label %65 unwind label %87

65:                                               ; preds = %64
  invoke void @__cxa_throw(ptr nonnull %62, ptr nonnull @_ZTIN10SimTKIpopt8IpoptNLP10Eval_ErrorE, ptr nonnull @_ZN10SimTKIpopt14IpoptExceptionD2Ev) #6
          to label %119 unwind label %87

66:                                               ; preds = %29, %19, %3
  %67 = landingpad { ptr, i32 }
          cleanup
  br label %118

68:                                               ; preds = %31
  %69 = landingpad { ptr, i32 }
          cleanup
  br label %75

70:                                               ; preds = %32
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %74

72:                                               ; preds = %34
  %73 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  br label %74

74:                                               ; preds = %72, %70
  %.pn = phi { ptr, i32 } [ %73, %72 ], [ %71, %70 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br label %75

75:                                               ; preds = %74, %68
  %.pn.pn = phi { ptr, i32 } [ %.pn, %74 ], [ %69, %68 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br label %116

76:                                               ; preds = %38
  %77 = landingpad { ptr, i32 }
          cleanup
  br label %115

78:                                               ; preds = %102, %53, %50, %40
  %79 = landingpad { ptr, i32 }
          cleanup
  br label %115

80:                                               ; preds = %56
  %81 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  br label %92

82:                                               ; preds = %59, %57
  %83 = landingpad { ptr, i32 }
          cleanup
  br label %91

.thread:                                          ; preds = %61
  %84 = landingpad { ptr, i32 }
          cleanup
  br label %90

85:                                               ; preds = %63
  %86 = landingpad { ptr, i32 }
          cleanup
  br label %89

87:                                               ; preds = %65, %64
  %.0 = phi i1 [ false, %65 ], [ true, %64 ]
  %88 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #5
  br label %89

89:                                               ; preds = %85, %87
  %.pn26 = phi { ptr, i32 } [ %88, %87 ], [ %86, %85 ]
  %.1 = phi i1 [ %.0, %87 ], [ true, %85 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  br i1 %.1, label %90, label %91

90:                                               ; preds = %.thread, %89
  %.pn26.pn42 = phi { ptr, i32 } [ %84, %.thread ], [ %.pn26, %89 ]
  call void @__cxa_free_exception(ptr %62) #5
  br label %91

91:                                               ; preds = %89, %90, %82
  %.pn26.pn.pn = phi { ptr, i32 } [ %.pn26.pn42, %90 ], [ %.pn26, %89 ], [ %83, %82 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  br label %92

92:                                               ; preds = %91, %80
  %.pn26.pn.pn.pn = phi { ptr, i32 } [ %.pn26.pn.pn, %91 ], [ %81, %80 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #5
  br label %115

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

94:                                               ; preds = %93
  %95 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #5
  invoke void @_ZN10SimTKIpopt8ConstPtrINS_6VectorEEENS_8SmartPtrIKT_EERKNS2_IS3_EE(ptr dead_on_unwind nonnull writable sret(%"class.SimTKIpopt::SmartPtr.23") align 8 %15, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %96 unwind label %106

96:                                               ; preds = %94
  %97 = load ptr, ptr %95, align 8, !tbaa !29
  %98 = getelementptr inbounds i8, ptr %97, i64 160
  %99 = load ptr, ptr %98, align 8
  invoke void %99(ptr dead_on_unwind nonnull writable sret(%"class.SimTKIpopt::SmartPtr.23") align 8 %13, ptr noundef nonnull align 8 dereferenceable(24) %95, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %100 unwind label %108

100:                                              ; preds = %96
  %101 = 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) %13)
          to label %102 unwind label %110

102:                                              ; preds = %100
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #5
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #5
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #5
  invoke void @_ZN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6VectorEEEE19AddCachedResult1DepERKS4_PKNS_12TaggedObjectE(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %2)
          to label %103 unwind label %78

103:                                              ; preds = %102
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %117

104:                                              ; preds = %93
  %105 = landingpad { ptr, i32 }
          cleanup
  br label %114

106:                                              ; preds = %94
  %107 = landingpad { ptr, i32 }
          cleanup
  br label %113

108:                                              ; preds = %96
  %109 = landingpad { ptr, i32 }
          cleanup
  br label %112

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

112:                                              ; preds = %110, %108
  %.pn31 = phi { ptr, i32 } [ %111, %110 ], [ %109, %108 ]
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #5
  br label %113

113:                                              ; preds = %112, %106
  %.pn31.pn = phi { ptr, i32 } [ %.pn31, %112 ], [ %107, %106 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #5
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  br label %114

114:                                              ; preds = %113, %104
  %.pn31.pn.pn = phi { ptr, i32 } [ %.pn31.pn, %113 ], [ %105, %104 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #5
  br label %115

115:                                              ; preds = %78, %92, %114, %76
  %.pn35.pn = phi { ptr, i32 } [ %77, %76 ], [ %79, %78 ], [ %.pn31.pn.pn, %114 ], [ %.pn26.pn.pn.pn, %92 ]
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  br label %116

116:                                              ; preds = %115, %75
  %.pn35.pn.pn = phi { ptr, i32 } [ %.pn35.pn, %115 ], [ %.pn.pn, %75 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %118

117:                                              ; preds = %18, %103
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  ret void

118:                                              ; preds = %116, %66
  %.pn35.pn.pn.pn = phi { ptr, i32 } [ %.pn35.pn.pn, %116 ], [ %67, %66 ]
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #5
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  resume { ptr, i32 } %.pn35.pn.pn.pn

119:                                              ; preds = %65
  unreachable
}

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


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