; 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.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
@.str.54 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [40 x i8], align 1
@_ZTIN10SimTKIpopt8IpoptNLP10Eval_ErrorE = external dso_local constant { ptr, ptr, ptr }, align 8

; 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_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 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 uwtable
define dso_local noundef double @_ZN10SimTKIpopt12OrigIpoptNLP1fERKNS_6VectorE(ptr noundef nonnull align 8 dereferenceable(648) %0, ptr noundef nonnull align 8 dereferenceable(205) %1) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca double, align 8
  %6 = alloca %"class.SimTKIpopt::SmartPtr.23", align 8
  %7 = alloca %"class.SimTKIpopt::SmartPtr.16", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.SimTKIpopt::SmartPtr.23", align 8
  %11 = alloca i8, align 1
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::allocator.26", align 1
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::allocator.26", align 1
  %17 = alloca i1, align 1
  %18 = alloca %"class.SimTKIpopt::SmartPtr.16", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %19 = load ptr, ptr %3, align 8
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = call noundef double @_ZNK10SimTKIpopt6Vector3DotERKS0_(ptr noundef nonnull align 8 dereferenceable(205) %20, ptr noundef nonnull align 8 dereferenceable(205) %21)
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = call noundef double @_ZNK10SimTKIpopt6Vector3DotERKS0_(ptr noundef nonnull align 8 dereferenceable(205) %23, ptr noundef nonnull align 8 dereferenceable(205) %24)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  store double 0.000000e+00, ptr %5, align 8, !tbaa !9
  %26 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %19, i32 0, i32 20
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = call noundef zeroext i1 @_ZN10SimTKIpopt13CachedResultsIdE19GetCachedResult1DepERdPKNS_12TaggedObjectE(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef %27)
  br i1 %28, label %145, label %29

29:                                               ; preds = %2
  %30 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %19, i32 0, i32 42
  %31 = load i32, ptr %30, align 4, !tbaa !11
  %32 = add nsw i32 %31, 1
  store i32 %32, ptr %30, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @_ZNK10SimTKIpopt8IpoptNLP11NLP_scalingEv(ptr dead_on_unwind writable sret(%"class.SimTKIpopt::SmartPtr.16") align 8 %7, ptr noundef nonnull align 8 dereferenceable(24) %19)
  %33 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %34 unwind label %72

34:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEEC2EPS2_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef %35)
          to label %36 unwind label %76

36:                                               ; preds = %34
  %37 = load ptr, ptr %33, align 8, !tbaa !31
  %38 = getelementptr inbounds ptr, ptr %37, i64 7
  %39 = load ptr, ptr %38, align 8
  invoke void %39(ptr dead_on_unwind writable sret(%"class.SimTKIpopt::SmartPtr.23") align 8 %6, ptr noundef nonnull align 8 dereferenceable(24) %33, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %40 unwind label %80

40:                                               ; preds = %36
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  %41 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %19, i32 0, i32 51
  invoke void @_ZN10SimTKIpopt9TimedTask5StartEv(ptr noundef nonnull align 8 dereferenceable(18) %41)
          to label %42 unwind label %86

42:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #5
  %43 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %19, i32 0, i32 2
  %44 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_3NLPEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %43)
          to label %45 unwind label %90

45:                                               ; preds = %42
  %46 = invoke noundef nonnull align 8 dereferenceable(205) ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_6VectorEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %47 unwind label %90

47:                                               ; preds = %45
  %48 = load ptr, ptr %44, align 8, !tbaa !31
  %49 = getelementptr inbounds ptr, ptr %48, i64 7
  %50 = load ptr, ptr %49, align 8
  %51 = invoke noundef zeroext i1 %50(ptr noundef nonnull align 8 dereferenceable(12) %44, ptr noundef nonnull align 8 dereferenceable(205) %46, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %52 unwind label %90

52:                                               ; preds = %47
  %53 = zext i1 %51 to i8
  store i8 %53, ptr %11, align 1, !tbaa !33
  %54 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %19, i32 0, i32 51
  invoke void @_ZN10SimTKIpopt9TimedTask3EndEv(ptr noundef nonnull align 8 dereferenceable(18) %54)
          to label %55 unwind label %90

55:                                               ; preds = %52
  %56 = load i8, ptr %11, align 1, !tbaa !33, !range !34, !noundef !35
  %57 = trunc i8 %56 to i1
  br i1 %57, label %58, label %62

58:                                               ; preds = %55
  %59 = load double, ptr %5, align 8, !tbaa !9
  %60 = invoke noundef zeroext i1 @_ZN10SimTKIpopt14IsFiniteNumberEd(double noundef %59)
          to label %61 unwind label %90

61:                                               ; preds = %58
  br i1 %60, label %121, label %62

62:                                               ; preds = %61, %55
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %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 @.str.54, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %63 unwind label %94

63:                                               ; preds = %62
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #5
  %64 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef @.str.33)
          to label %65 unwind label %98

65:                                               ; preds = %63
  %66 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef @.str.55)
          to label %67 unwind label %98

67:                                               ; preds = %65
  store i1 true, ptr %17, align 1
  %68 = call ptr @__cxa_allocate_exception(i64 112) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %69 unwind label %102

69:                                               ; preds = %67
  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.35, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %70 unwind label %106

70:                                               ; preds = %69
  invoke void @_ZN10SimTKIpopt8IpoptNLP10Eval_ErrorC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_i(ptr noundef nonnull align 8 dereferenceable(112) %68, ptr noundef %14, ptr noundef %15, i32 noundef 403)
          to label %71 unwind label %110

71:                                               ; preds = %70
  store i1 false, ptr %17, align 1
  invoke void @__cxa_throw(ptr %68, ptr @_ZTIN10SimTKIpopt8IpoptNLP10Eval_ErrorE, ptr @_ZN10SimTKIpopt14IpoptExceptionD2Ev) #6
          to label %152 unwind label %110

72:                                               ; preds = %29
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %8, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %9, align 4
  br label %85

76:                                               ; preds = %34
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %8, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %9, align 4
  br label %84

80:                                               ; preds = %36
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %8, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %9, align 4
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  br label %84

84:                                               ; preds = %80, %76
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %85

85:                                               ; preds = %84, %72
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %144

86:                                               ; preds = %40
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %8, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %9, align 4
  br label %143

90:                                               ; preds = %129, %58, %52, %47, %45, %42
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %8, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %9, align 4
  br label %142

94:                                               ; preds = %62
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %8, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %9, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #5
  br label %120

98:                                               ; preds = %65, %63
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %8, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %9, align 4
  br label %119

102:                                              ; preds = %67
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %8, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %9, align 4
  br label %115

106:                                              ; preds = %69
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %8, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %9, align 4
  br label %114

110:                                              ; preds = %71, %70
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %8, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #5
  br label %114

114:                                              ; preds = %110, %106
  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
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  br label %115

115:                                              ; preds = %114, %102
  %116 = load i1, ptr %17, align 1
  br i1 %116, label %117, label %118

117:                                              ; preds = %115
  call void @__cxa_free_exception(ptr %68) #5
  br label %118

118:                                              ; preds = %117, %115
  br label %119

119:                                              ; preds = %118, %98
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  br label %120

120:                                              ; preds = %119, %94
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #5
  br label %142

121:                                              ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  invoke void @_ZNK10SimTKIpopt8IpoptNLP11NLP_scalingEv(ptr dead_on_unwind writable sret(%"class.SimTKIpopt::SmartPtr.16") align 8 %18, ptr noundef nonnull align 8 dereferenceable(24) %19)
          to label %122 unwind label %133

122:                                              ; preds = %121
  %123 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %124 unwind label %137

124:                                              ; preds = %122
  %125 = load ptr, ptr %123, align 8, !tbaa !31
  %126 = getelementptr inbounds ptr, ptr %125, i64 2
  %127 = load ptr, ptr %126, align 8
  %128 = invoke noundef double %127(ptr noundef nonnull align 8 dereferenceable(24) %123, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %129 unwind label %137

129:                                              ; preds = %124
  store double %128, ptr %5, align 8, !tbaa !9
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  %130 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %19, i32 0, i32 20
  %131 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZN10SimTKIpopt13CachedResultsIdE19AddCachedResult1DepERKdPKNS_12TaggedObjectE(ptr noundef nonnull align 8 dereferenceable(24) %130, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef %131)
          to label %132 unwind label %90

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

133:                                              ; preds = %121
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %8, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %9, align 4
  br label %141

137:                                              ; preds = %124, %122
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %8, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %9, align 4
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %18) #5
  br label %141

141:                                              ; preds = %137, %133
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  br label %142

142:                                              ; preds = %141, %120, %90
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #5
  br label %143

143:                                              ; preds = %142, %86
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br label %144

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

145:                                              ; preds = %132, %2
  %146 = load double, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  ret double %146

147:                                              ; preds = %144
  %148 = load ptr, ptr %8, align 8
  %149 = load i32, ptr %9, align 4
  %150 = insertvalue { ptr, i32 } poison, ptr %148, 0
  %151 = insertvalue { ptr, i32 } %150, i32 %149, 1
  resume { ptr, i32 } %151

152:                                              ; preds = %71
  unreachable
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN10SimTKIpopt13CachedResultsIdE19GetCachedResult1DepERdPKNS_12TaggedObjectE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2 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) #4

; 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 void @_ZN10SimTKIpopt13CachedResultsIdE19AddCachedResult1DepERKdPKNS_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 = { 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 #4 = { "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 = !{!"double", !7, i64 0}
!11 = !{!12, !15, i64 444}
!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, !10, i64 424, !28, i64 432, !28, i64 433, !29, i64 436, !28, i64 440, !15, i64 444, !15, i64 448, !15, i64 452, !15, i64 456, !15, i64 460, !15, i64 464, !15, 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}
!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 = !{!"bool", !7, i64 0}
!29 = !{!"_ZTSN10SimTKIpopt24HessianApproximationTypeE", !7, i64 0}
!30 = !{!"_ZTSN10SimTKIpopt9TimedTaskE", !10, i64 0, !10, i64 8, !28, i64 16, !28, i64 17}
!31 = !{!32, !32, i64 0}
!32 = !{!"vtable pointer", !8, i64 0}
!33 = !{!28, !28, i64 0}
!34 = !{i8 0, i8 2}
!35 = !{}


; 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.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
@.str.54 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [40 x i8], align 1
@_ZTIN10SimTKIpopt8IpoptNLP10Eval_ErrorE = external dso_local constant { ptr, ptr, ptr }, align 8

; 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_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 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 uwtable
define dso_local noundef double @_ZN10SimTKIpopt12OrigIpoptNLP1fERKNS_6VectorE(ptr noundef nonnull align 8 dereferenceable(648) %0, ptr noundef nonnull align 8 dereferenceable(205) %1) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca double, align 8
  %4 = alloca %"class.SimTKIpopt::SmartPtr.23", align 8
  %5 = alloca %"class.SimTKIpopt::SmartPtr.16", align 8
  %6 = alloca %"class.SimTKIpopt::SmartPtr.23", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator.26", align 1
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator.26", align 1
  %12 = alloca %"class.SimTKIpopt::SmartPtr.16", align 8
  %13 = tail call noundef double @_ZNK10SimTKIpopt6Vector3DotERKS0_(ptr noundef nonnull align 8 dereferenceable(205) %1, ptr noundef nonnull align 8 dereferenceable(205) %1)
  %14 = tail call noundef double @_ZNK10SimTKIpopt6Vector3DotERKS0_(ptr noundef nonnull align 8 dereferenceable(205) %1, ptr noundef nonnull align 8 dereferenceable(205) %1)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  store double 0.000000e+00, ptr %3, align 8, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %0, i64 176
  %16 = call noundef zeroext i1 @_ZN10SimTKIpopt13CachedResultsIdE19GetCachedResult1DepERdPKNS_12TaggedObjectE(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull %1)
  br i1 %16, label %89, label %17

17:                                               ; preds = %2
  %18 = getelementptr inbounds i8, ptr %0, i64 444
  %19 = load i32, ptr %18, align 4, !tbaa !9
  %20 = add nsw i32 %19, 1
  store i32 %20, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  call void @_ZNK10SimTKIpopt8IpoptNLP11NLP_scalingEv(ptr dead_on_unwind nonnull writable sret(%"class.SimTKIpopt::SmartPtr.16") align 8 %5, ptr noundef nonnull align 8 dereferenceable(24) %0)
  %21 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  invoke void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEEC2EPS2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull %1)
          to label %22 unwind label %51

22:                                               ; preds = %17
  %23 = load ptr, ptr %21, align 8, !tbaa !30
  %24 = getelementptr inbounds i8, ptr %23, i64 56
  %25 = load ptr, ptr %24, align 8
  invoke void %25(ptr dead_on_unwind nonnull writable sret(%"class.SimTKIpopt::SmartPtr.23") align 8 %4, ptr noundef nonnull align 8 dereferenceable(24) %21, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %26 unwind label %53

26:                                               ; preds = %22
  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_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  %27 = getelementptr inbounds i8, ptr %0, i64 480
  invoke void @_ZN10SimTKIpopt9TimedTask5StartEv(ptr noundef nonnull align 8 dereferenceable(18) %27)
          to label %28 unwind label %56

28:                                               ; preds = %26
  %29 = getelementptr inbounds i8, ptr %0, i64 32
  %30 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_3NLPEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %29)
  %31 = call noundef nonnull align 8 dereferenceable(205) ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_6VectorEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %32 = load ptr, ptr %30, align 8, !tbaa !30
  %33 = getelementptr inbounds i8, ptr %32, i64 56
  %34 = load ptr, ptr %33, align 8
  %35 = invoke noundef zeroext i1 %34(ptr noundef nonnull align 8 dereferenceable(12) %30, ptr noundef nonnull align 8 dereferenceable(205) %31, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %36 unwind label %58

36:                                               ; preds = %28
  call void @_ZN10SimTKIpopt9TimedTask3EndEv(ptr noundef nonnull align 8 dereferenceable(18) %27)
  br i1 %35, label %37, label %41

37:                                               ; preds = %36
  %38 = load double, ptr %3, align 8, !tbaa !5
  %39 = invoke noundef zeroext i1 @_ZN10SimTKIpopt14IsFiniteNumberEd(double noundef %38)
          to label %40 unwind label %58

40:                                               ; preds = %37
  br i1 %39, label %73, label %41

41:                                               ; preds = %40, %36
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str.54, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %42 unwind label %60

42:                                               ; preds = %41
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #5
  %43 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str.33)
          to label %44 unwind label %62

44:                                               ; preds = %42
  %45 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str.55)
          to label %46 unwind label %62

46:                                               ; preds = %44
  %47 = call ptr @__cxa_allocate_exception(i64 112) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %48 unwind label %.thread

48:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull @.str.35, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %49 unwind label %65

49:                                               ; preds = %48
  invoke void @_ZN10SimTKIpopt8IpoptNLP10Eval_ErrorC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_i(ptr noundef nonnull align 8 dereferenceable(112) %47, ptr noundef nonnull %9, ptr noundef nonnull %10, i32 noundef 403)
          to label %50 unwind label %67

50:                                               ; preds = %49
  invoke void @__cxa_throw(ptr nonnull %47, ptr nonnull @_ZTIN10SimTKIpopt8IpoptNLP10Eval_ErrorE, ptr nonnull @_ZN10SimTKIpopt14IpoptExceptionD2Ev) #6
          to label %91 unwind label %67

51:                                               ; preds = %17
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %55

53:                                               ; preds = %22
  %54 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br label %55

55:                                               ; preds = %53, %51
  %.pn = phi { ptr, i32 } [ %54, %53 ], [ %52, %51 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %88

56:                                               ; preds = %26
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %87

58:                                               ; preds = %80, %37, %28
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %87

60:                                               ; preds = %41
  %61 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #5
  br label %72

62:                                               ; preds = %44, %42
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %71

.thread:                                          ; preds = %46
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %70

65:                                               ; preds = %48
  %66 = landingpad { ptr, i32 }
          cleanup
  br label %69

67:                                               ; preds = %50, %49
  %.0 = phi i1 [ false, %50 ], [ true, %49 ]
  %68 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  br label %69

69:                                               ; preds = %65, %67
  %.pn24 = phi { ptr, i32 } [ %68, %67 ], [ %66, %65 ]
  %.1 = phi i1 [ %.0, %67 ], [ true, %65 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  br i1 %.1, label %70, label %71

70:                                               ; preds = %.thread, %69
  %.pn24.pn37 = phi { ptr, i32 } [ %64, %.thread ], [ %.pn24, %69 ]
  call void @__cxa_free_exception(ptr %47) #5
  br label %71

71:                                               ; preds = %69, %70, %62
  %.pn24.pn.pn = phi { ptr, i32 } [ %.pn24.pn37, %70 ], [ %.pn24, %69 ], [ %63, %62 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  br label %72

72:                                               ; preds = %71, %60
  %.pn24.pn.pn.pn = phi { ptr, i32 } [ %.pn24.pn.pn, %71 ], [ %61, %60 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  br label %87

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

74:                                               ; preds = %73
  %75 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %12)
  %76 = load ptr, ptr %75, align 8, !tbaa !30
  %77 = getelementptr inbounds i8, ptr %76, i64 16
  %78 = load ptr, ptr %77, align 8
  %79 = invoke noundef double %78(ptr noundef nonnull align 8 dereferenceable(24) %75, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %80 unwind label %84

80:                                               ; preds = %74
  store double %79, ptr %3, align 8, !tbaa !5
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  invoke void @_ZN10SimTKIpopt13CachedResultsIdE19AddCachedResult1DepERKdPKNS_12TaggedObjectE(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull %1)
          to label %81 unwind label %58

81:                                               ; preds = %80
  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 %89

82:                                               ; preds = %73
  %83 = landingpad { ptr, i32 }
          cleanup
  br label %86

84:                                               ; preds = %74
  %85 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  br label %86

86:                                               ; preds = %84, %82
  %.pn29 = phi { ptr, i32 } [ %85, %84 ], [ %83, %82 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  br label %87

87:                                               ; preds = %58, %72, %86, %56
  %.pn31.pn = phi { ptr, i32 } [ %57, %56 ], [ %59, %58 ], [ %.pn29, %86 ], [ %.pn24.pn.pn.pn, %72 ]
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  br label %88

88:                                               ; preds = %87, %55
  %.pn31.pn.pn = phi { ptr, i32 } [ %.pn31.pn, %87 ], [ %.pn, %55 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn31.pn.pn

89:                                               ; preds = %81, %2
  %90 = load double, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  ret double %90

91:                                               ; preds = %50
  unreachable
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN10SimTKIpopt13CachedResultsIdE19GetCachedResult1DepERdPKNS_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 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 #4

; 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 void @_ZN10SimTKIpopt13CachedResultsIdE19AddCachedResult1DepERKdPKNS_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 = { 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 #4 = { "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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !13, i64 444}
!10 = !{!"_ZTSN10SimTKIpopt12OrigIpoptNLPE", !11, 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, !6, 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", !15, i64 0}
!15 = !{!"any pointer", !7, 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", !13, i64 8, !15, i64 16}
!22 = !{!"_ZTSN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6VectorEEEEE", !13, i64 8, !15, i64 16}
!23 = !{!"_ZTSN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6MatrixEEEEE", !13, i64 8, !15, i64 16}
!24 = !{!"_ZTSN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_9SymMatrixEEEEE", !13, i64 8, !15, i64 16}
!25 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_6VectorEEE", !15, i64 0}
!26 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_6MatrixEEE", !15, i64 0}
!27 = !{!"bool", !7, i64 0}
!28 = !{!"_ZTSN10SimTKIpopt24HessianApproximationTypeE", !7, i64 0}
!29 = !{!"_ZTSN10SimTKIpopt9TimedTaskE", !6, i64 0, !6, i64 8, !27, i64 16, !27, i64 17}
!30 = !{!31, !31, i64 0}
!31 = !{!"vtable pointer", !8, i64 0}


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