; 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.24" = type { ptr }
%"class.SimTKIpopt::SmartPtr.16" = type { ptr }
%"class.SimTKIpopt::SmartPtr.23" = type { ptr }
%"class.SimTKIpopt::SmartPtr.54" = 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::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.64 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.66 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.67 = external hidden unnamed_addr constant [69 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_6MatrixEEC2Ev(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 dso_local void @_ZN10SimTKIpopt8SmartPtrIKNS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

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

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

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

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

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

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

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

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

declare void @_ZNK10SimTKIpopt10Journalist6PrintfENS_13EJournalLevelENS_16EJournalCategoryEPKcz(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, i32 noundef, ptr noundef, ...) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10SimTKIpopt8SmartPtrINS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) 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)) #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 ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_11MatrixSpaceEEptEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN10SimTKIpopt8SmartPtrIKNS_6MatrixEEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #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

; 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 nounwind uwtable
declare dso_local void @_ZN10SimTKIpopt14IpoptExceptionD2Ev(ptr noundef nonnull align 8 dereferenceable(112)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10SimTKIpopt12OrigIpoptNLP5jac_cERKNS_6VectorE(ptr dead_on_unwind noalias writable sret(%"class.SimTKIpopt::SmartPtr.24") align 8 %0, ptr noundef nonnull align 8 dereferenceable(648) %1, ptr noundef nonnull align 8 dereferenceable(205) %2) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i1, align 1
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.SimTKIpopt::SmartPtr.23", align 8
  %11 = alloca %"class.SimTKIpopt::SmartPtr.54", align 8
  %12 = alloca %"class.SimTKIpopt::SmartPtr.24", align 8
  %13 = alloca %"class.SimTKIpopt::SmartPtr.16", align 8
  %14 = alloca %"class.SimTKIpopt::SmartPtr.24", align 8
  %15 = alloca %"class.SimTKIpopt::SmartPtr.54", align 8
  %16 = alloca %"class.SimTKIpopt::SmartPtr.23", align 8
  %17 = alloca %"class.SimTKIpopt::SmartPtr.16", align 8
  %18 = alloca %"class.SimTKIpopt::SmartPtr.23", align 8
  %19 = alloca i8, align 1
  %20 = alloca %"class.std::__cxx11::basic_string", align 8
  %21 = alloca %"class.std::allocator.26", align 1
  %22 = alloca %"class.std::__cxx11::basic_string", align 8
  %23 = alloca %"class.std::__cxx11::basic_string", align 8
  %24 = alloca %"class.std::allocator.26", align 1
  %25 = alloca i1, align 1
  %26 = alloca %"class.std::__cxx11::basic_string", align 8
  %27 = alloca %"class.std::allocator.26", align 1
  %28 = alloca %"class.std::__cxx11::basic_string", align 8
  %29 = alloca %"class.std::allocator.26", align 1
  %30 = alloca i1, align 1
  %31 = alloca %"class.SimTKIpopt::SmartPtr.24", align 8
  %32 = alloca %"class.SimTKIpopt::SmartPtr.16", align 8
  %33 = alloca %"class.SimTKIpopt::SmartPtr.24", 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
  %34 = load ptr, ptr %5, align 8
  store i1 false, ptr %7, align 1
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6MatrixEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0)
  %35 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %34, i32 0, i32 4
  %36 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %35)
          to label %37 unwind label %72

37:                                               ; preds = %3
  %38 = invoke noundef i32 @_ZNK10SimTKIpopt11VectorSpace3DimEv(ptr noundef nonnull align 8 dereferenceable(16) %36)
          to label %39 unwind label %72

39:                                               ; preds = %37
  %40 = icmp eq i32 %38, 0
  br i1 %40, label %41, label %116

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

42:                                               ; preds = %41
  %43 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %34, i32 0, i32 23
  %44 = invoke noundef ptr @_ZN10SimTKIpopt9GetRawPtrIKNS_6VectorEEEPT_RKNS_8SmartPtrIS3_EE(ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %45 unwind label %80

45:                                               ; preds = %42
  %46 = invoke noundef zeroext i1 @_ZN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6MatrixEEEE19GetCachedResult1DepERS4_PKNS_12TaggedObjectE(ptr noundef nonnull align 8 dereferenceable(24) %43, ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %44)
          to label %47 unwind label %80

47:                                               ; preds = %45
  br i1 %46, label %113, label %48

48:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %49 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %34, i32 0, i32 14
  %50 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_11MatrixSpaceEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %49)
          to label %51 unwind label %84

51:                                               ; preds = %48
  %52 = load ptr, ptr %50, align 8, !tbaa !9
  %53 = getelementptr inbounds ptr, ptr %52, i64 2
  %54 = load ptr, ptr %53, align 8
  %55 = invoke noundef ptr %54(ptr noundef nonnull align 8 dereferenceable(20) %50)
          to label %56 unwind label %84

56:                                               ; preds = %51
  invoke void @_ZN10SimTKIpopt8SmartPtrINS_6MatrixEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef %55)
          to label %57 unwind label %84

57:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  invoke void @_ZNK10SimTKIpopt8IpoptNLP11NLP_scalingEv(ptr dead_on_unwind writable sret(%"class.SimTKIpopt::SmartPtr.16") align 8 %13, ptr noundef nonnull align 8 dereferenceable(24) %34)
          to label %58 unwind label %88

58:                                               ; preds = %57
  %59 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %60 unwind label %92

60:                                               ; preds = %58
  invoke void @_ZN10SimTKIpopt8ConstPtrINS_6MatrixEEENS_8SmartPtrIKT_EERKNS2_IS3_EE(ptr dead_on_unwind writable sret(%"class.SimTKIpopt::SmartPtr.24") align 8 %14, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %61 unwind label %92

61:                                               ; preds = %60
  %62 = load ptr, ptr %59, align 8, !tbaa !9
  %63 = getelementptr inbounds ptr, ptr %62, i64 16
  %64 = load ptr, ptr %63, align 8
  invoke void %64(ptr dead_on_unwind writable sret(%"class.SimTKIpopt::SmartPtr.24") align 8 %12, ptr noundef nonnull align 8 dereferenceable(24) %59, ptr noundef %14)
          to label %65 unwind label %96

65:                                               ; preds = %61
  %66 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN10SimTKIpopt8SmartPtrIKNS_6MatrixEEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %67 unwind label %100

67:                                               ; preds = %65
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #4
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  %68 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %34, i32 0, i32 23
  %69 = invoke noundef ptr @_ZN10SimTKIpopt9GetRawPtrIKNS_6VectorEEEPT_RKNS_8SmartPtrIS3_EE(ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %70 unwind label %107

70:                                               ; preds = %67
  invoke void @_ZN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6MatrixEEEE19AddCachedResult1DepERKS4_PKNS_12TaggedObjectE(ptr noundef nonnull align 8 dereferenceable(24) %68, ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %69)
          to label %71 unwind label %107

71:                                               ; preds = %70
  call void @_ZN10SimTKIpopt8SmartPtrINS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %113

72:                                               ; preds = %116, %37, %3
  %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 %308

76:                                               ; preds = %41
  %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 %115

80:                                               ; preds = %45, %42
  %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
  br label %114

84:                                               ; preds = %56, %51, %48
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %8, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %9, align 4
  br label %112

88:                                               ; preds = %57
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %8, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %9, align 4
  br label %106

92:                                               ; preds = %60, %58
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %8, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %9, align 4
  br label %105

96:                                               ; preds = %61
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %8, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %9, align 4
  br label %104

100:                                              ; preds = %65
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %8, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %9, align 4
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  br label %104

104:                                              ; preds = %100, %96
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #4
  br label %105

105:                                              ; preds = %104, %92
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #4
  br label %106

106:                                              ; preds = %105, %88
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %111

107:                                              ; preds = %70, %67
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %8, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %9, align 4
  br label %111

111:                                              ; preds = %107, %106
  call void @_ZN10SimTKIpopt8SmartPtrINS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #4
  br label %112

112:                                              ; preds = %111, %84
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %114

113:                                              ; preds = %71, %47
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %304

114:                                              ; preds = %112, %80
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #4
  br label %115

115:                                              ; preds = %114, %76
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %308

116:                                              ; preds = %39
  %117 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %34, i32 0, i32 23
  %118 = load ptr, ptr %6, align 8, !tbaa !5
  %119 = invoke noundef zeroext i1 @_ZN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6MatrixEEEE19GetCachedResult1DepERS4_RKNS_12TaggedObjectE(ptr noundef nonnull align 8 dereferenceable(24) %117, ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(56) %118)
          to label %120 unwind label %72

120:                                              ; preds = %116
  br i1 %119, label %303, label %121

121:                                              ; preds = %120
  %122 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %34, i32 0, i32 45
  %123 = load i32, ptr %122, align 8, !tbaa !11
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %122, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %125 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %34, i32 0, i32 14
  %126 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_11MatrixSpaceEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %125)
          to label %127 unwind label %172

127:                                              ; preds = %121
  %128 = load ptr, ptr %126, align 8, !tbaa !9
  %129 = getelementptr inbounds ptr, ptr %128, i64 2
  %130 = load ptr, ptr %129, align 8
  %131 = invoke noundef ptr %130(ptr noundef nonnull align 8 dereferenceable(20) %126)
          to label %132 unwind label %172

132:                                              ; preds = %127
  invoke void @_ZN10SimTKIpopt8SmartPtrINS_6MatrixEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef %131)
          to label %133 unwind label %172

133:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  invoke void @_ZNK10SimTKIpopt8IpoptNLP11NLP_scalingEv(ptr dead_on_unwind writable sret(%"class.SimTKIpopt::SmartPtr.16") align 8 %17, ptr noundef nonnull align 8 dereferenceable(24) %34)
          to label %134 unwind label %176

134:                                              ; preds = %133
  %135 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %136 unwind label %180

136:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %137 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEEC2EPS2_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef %137)
          to label %138 unwind label %184

138:                                              ; preds = %136
  %139 = load ptr, ptr %135, align 8, !tbaa !9
  %140 = getelementptr inbounds ptr, ptr %139, i64 7
  %141 = load ptr, ptr %140, align 8
  invoke void %141(ptr dead_on_unwind writable sret(%"class.SimTKIpopt::SmartPtr.23") align 8 %16, ptr noundef nonnull align 8 dereferenceable(24) %135, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %142 unwind label %188

142:                                              ; preds = %138
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  %143 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %34, i32 0, i32 54
  invoke void @_ZN10SimTKIpopt9TimedTask5StartEv(ptr noundef nonnull align 8 dereferenceable(18) %143)
          to label %144 unwind label %195

144:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #4
  %145 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %34, i32 0, i32 2
  %146 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_3NLPEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %145)
          to label %147 unwind label %199

147:                                              ; preds = %144
  %148 = invoke noundef nonnull align 8 dereferenceable(205) ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_6VectorEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %149 unwind label %199

149:                                              ; preds = %147
  %150 = invoke noundef nonnull align 8 dereferenceable(69) ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %151 unwind label %199

151:                                              ; preds = %149
  %152 = load ptr, ptr %146, align 8, !tbaa !9
  %153 = getelementptr inbounds ptr, ptr %152, i64 10
  %154 = load ptr, ptr %153, align 8
  %155 = invoke noundef zeroext i1 %154(ptr noundef nonnull align 8 dereferenceable(12) %146, ptr noundef nonnull align 8 dereferenceable(205) %148, ptr noundef nonnull align 8 dereferenceable(69) %150)
          to label %156 unwind label %199

156:                                              ; preds = %151
  %157 = zext i1 %155 to i8
  store i8 %157, ptr %19, align 1, !tbaa !32
  %158 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %34, i32 0, i32 54
  invoke void @_ZN10SimTKIpopt9TimedTask3EndEv(ptr noundef nonnull align 8 dereferenceable(18) %158)
          to label %159 unwind label %199

159:                                              ; preds = %156
  %160 = load i8, ptr %19, align 1, !tbaa !32, !range !33, !noundef !34
  %161 = trunc i8 %160 to i1
  br i1 %161, label %230, label %162

162:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef @.str.64, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %163 unwind label %203

163:                                              ; preds = %162
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #4
  %164 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef @.str.33)
          to label %165 unwind label %207

165:                                              ; preds = %163
  %166 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef @.str.65)
          to label %167 unwind label %207

167:                                              ; preds = %165
  store i1 true, ptr %25, align 1
  %168 = call ptr @__cxa_allocate_exception(i64 112) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef nonnull align 8 dereferenceable(32) %20)
          to label %169 unwind label %211

169:                                              ; preds = %167
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef @.str.35, ptr noundef nonnull align 1 dereferenceable(1) %24)
          to label %170 unwind label %215

170:                                              ; preds = %169
  invoke void @_ZN10SimTKIpopt8IpoptNLP10Eval_ErrorC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_i(ptr noundef nonnull align 8 dereferenceable(112) %168, ptr noundef %22, ptr noundef %23, i32 noundef 534)
          to label %171 unwind label %219

171:                                              ; preds = %170
  store i1 false, ptr %25, align 1
  invoke void @__cxa_throw(ptr %168, ptr @_ZTIN10SimTKIpopt8IpoptNLP10Eval_ErrorE, ptr @_ZN10SimTKIpopt14IpoptExceptionD2Ev) #5
          to label %314 unwind label %219

172:                                              ; preds = %132, %127, %121
  %173 = landingpad { ptr, i32 }
          cleanup
  %174 = extractvalue { ptr, i32 } %173, 0
  store ptr %174, ptr %8, align 8
  %175 = extractvalue { ptr, i32 } %173, 1
  store i32 %175, ptr %9, align 4
  br label %302

176:                                              ; preds = %133
  %177 = landingpad { ptr, i32 }
          cleanup
  %178 = extractvalue { ptr, i32 } %177, 0
  store ptr %178, ptr %8, align 8
  %179 = extractvalue { ptr, i32 } %177, 1
  store i32 %179, ptr %9, align 4
  br label %194

180:                                              ; preds = %134
  %181 = landingpad { ptr, i32 }
          cleanup
  %182 = extractvalue { ptr, i32 } %181, 0
  store ptr %182, ptr %8, align 8
  %183 = extractvalue { ptr, i32 } %181, 1
  store i32 %183, ptr %9, align 4
  br label %193

184:                                              ; preds = %136
  %185 = landingpad { ptr, i32 }
          cleanup
  %186 = extractvalue { ptr, i32 } %185, 0
  store ptr %186, ptr %8, align 8
  %187 = extractvalue { ptr, i32 } %185, 1
  store i32 %187, ptr %9, align 4
  br label %192

188:                                              ; preds = %138
  %189 = landingpad { ptr, i32 }
          cleanup
  %190 = extractvalue { ptr, i32 } %189, 0
  store ptr %190, ptr %8, align 8
  %191 = extractvalue { ptr, i32 } %189, 1
  store i32 %191, ptr %9, align 4
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %18) #4
  br label %192

192:                                              ; preds = %188, %184
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  br label %193

193:                                              ; preds = %192, %180
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #4
  br label %194

194:                                              ; preds = %193, %176
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  br label %301

195:                                              ; preds = %142
  %196 = landingpad { ptr, i32 }
          cleanup
  %197 = extractvalue { ptr, i32 } %196, 0
  store ptr %197, ptr %8, align 8
  %198 = extractvalue { ptr, i32 } %196, 1
  store i32 %198, ptr %9, align 4
  br label %300

199:                                              ; preds = %276, %242, %239, %236, %234, %156, %151, %149, %147, %144
  %200 = landingpad { ptr, i32 }
          cleanup
  %201 = extractvalue { ptr, i32 } %200, 0
  store ptr %201, ptr %8, align 8
  %202 = extractvalue { ptr, i32 } %200, 1
  store i32 %202, ptr %9, align 4
  br label %299

203:                                              ; preds = %162
  %204 = landingpad { ptr, i32 }
          cleanup
  %205 = extractvalue { ptr, i32 } %204, 0
  store ptr %205, ptr %8, align 8
  %206 = extractvalue { ptr, i32 } %204, 1
  store i32 %206, ptr %9, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #4
  br label %229

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

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

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

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

223:                                              ; preds = %219, %215
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #4
  br label %224

224:                                              ; preds = %223, %211
  %225 = load i1, ptr %25, align 1
  br i1 %225, label %226, label %227

226:                                              ; preds = %224
  call void @__cxa_free_exception(ptr %168) #4
  br label %227

227:                                              ; preds = %226, %224
  br label %228

228:                                              ; preds = %227, %207
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #4
  br label %229

229:                                              ; preds = %228, %203
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #4
  br label %299

230:                                              ; preds = %159
  %231 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %34, i32 0, i32 41
  %232 = load i8, ptr %231, align 8, !tbaa !35, !range !33, !noundef !34
  %233 = trunc i8 %232 to i1
  br i1 %233, label %234, label %266

234:                                              ; preds = %230
  %235 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %236 unwind label %199

236:                                              ; preds = %234
  %237 = invoke noundef zeroext i1 @_ZNK10SimTKIpopt6Matrix15HasValidNumbersEv(ptr noundef nonnull align 8 dereferenceable(69) %235)
          to label %238 unwind label %199

238:                                              ; preds = %236
  br i1 %237, label %265, label %239

239:                                              ; preds = %238
  %240 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %34, i32 0, i32 1
  %241 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_10JournalistEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %240)
          to label %242 unwind label %199

242:                                              ; preds = %239
  invoke void (ptr, i32, i32, ptr, ...) @_ZNK10SimTKIpopt10Journalist6PrintfENS_13EJournalLevelENS_16EJournalCategoryEPKcz(ptr noundef nonnull align 8 dereferenceable(40) %241, i32 noundef 2, i32 noundef 12, ptr noundef @.str.66)
          to label %243 unwind label %199

243:                                              ; preds = %242
  store i1 true, ptr %30, align 1
  %244 = call ptr @__cxa_allocate_exception(i64 112) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %26, ptr noundef @.str.67, ptr noundef nonnull align 1 dereferenceable(1) %27)
          to label %245 unwind label %248

245:                                              ; preds = %243
  call void @llvm.lifetime.start.p0(i64 1, ptr %29) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %28, ptr noundef @.str.35, ptr noundef nonnull align 1 dereferenceable(1) %29)
          to label %246 unwind label %252

246:                                              ; preds = %245
  invoke void @_ZN10SimTKIpopt8IpoptNLP10Eval_ErrorC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_i(ptr noundef nonnull align 8 dereferenceable(112) %244, ptr noundef %26, ptr noundef %28, i32 noundef 539)
          to label %247 unwind label %256

247:                                              ; preds = %246
  store i1 false, ptr %30, align 1
  invoke void @__cxa_throw(ptr %244, ptr @_ZTIN10SimTKIpopt8IpoptNLP10Eval_ErrorE, ptr @_ZN10SimTKIpopt14IpoptExceptionD2Ev) #5
          to label %314 unwind label %256

248:                                              ; preds = %243
  %249 = landingpad { ptr, i32 }
          cleanup
  %250 = extractvalue { ptr, i32 } %249, 0
  store ptr %250, ptr %8, align 8
  %251 = extractvalue { ptr, i32 } %249, 1
  store i32 %251, ptr %9, align 4
  br label %261

252:                                              ; preds = %245
  %253 = landingpad { ptr, i32 }
          cleanup
  %254 = extractvalue { ptr, i32 } %253, 0
  store ptr %254, ptr %8, align 8
  %255 = extractvalue { ptr, i32 } %253, 1
  store i32 %255, ptr %9, align 4
  br label %260

256:                                              ; preds = %247, %246
  %257 = landingpad { ptr, i32 }
          cleanup
  %258 = extractvalue { ptr, i32 } %257, 0
  store ptr %258, ptr %8, align 8
  %259 = extractvalue { ptr, i32 } %257, 1
  store i32 %259, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #4
  br label %260

260:                                              ; preds = %256, %252
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #4
  br label %261

261:                                              ; preds = %260, %248
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #4
  %262 = load i1, ptr %30, align 1
  br i1 %262, label %263, label %264

263:                                              ; preds = %261
  call void @__cxa_free_exception(ptr %244) #4
  br label %264

264:                                              ; preds = %263, %261
  br label %299

265:                                              ; preds = %238
  br label %266

266:                                              ; preds = %265, %230
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #4
  invoke void @_ZNK10SimTKIpopt8IpoptNLP11NLP_scalingEv(ptr dead_on_unwind writable sret(%"class.SimTKIpopt::SmartPtr.16") align 8 %32, ptr noundef nonnull align 8 dereferenceable(24) %34)
          to label %267 unwind label %280

267:                                              ; preds = %266
  %268 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %32)
          to label %269 unwind label %284

269:                                              ; preds = %267
  invoke void @_ZN10SimTKIpopt8ConstPtrINS_6MatrixEEENS_8SmartPtrIKT_EERKNS2_IS3_EE(ptr dead_on_unwind writable sret(%"class.SimTKIpopt::SmartPtr.24") align 8 %33, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %270 unwind label %284

270:                                              ; preds = %269
  %271 = load ptr, ptr %268, align 8, !tbaa !9
  %272 = getelementptr inbounds ptr, ptr %271, i64 16
  %273 = load ptr, ptr %272, align 8
  invoke void %273(ptr dead_on_unwind writable sret(%"class.SimTKIpopt::SmartPtr.24") align 8 %31, ptr noundef nonnull align 8 dereferenceable(24) %268, ptr noundef %33)
          to label %274 unwind label %288

274:                                              ; preds = %270
  %275 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN10SimTKIpopt8SmartPtrIKNS_6MatrixEEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %31)
          to label %276 unwind label %292

276:                                              ; preds = %274
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %31) #4
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %33) #4
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %32) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #4
  %277 = getelementptr inbounds %"class.SimTKIpopt::OrigIpoptNLP", ptr %34, i32 0, i32 23
  %278 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6MatrixEEEE19AddCachedResult1DepERKS4_RKNS_12TaggedObjectE(ptr noundef nonnull align 8 dereferenceable(24) %277, ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(56) %278)
          to label %279 unwind label %199

279:                                              ; preds = %276
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #4
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @_ZN10SimTKIpopt8SmartPtrINS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  br label %303

280:                                              ; preds = %266
  %281 = landingpad { ptr, i32 }
          cleanup
  %282 = extractvalue { ptr, i32 } %281, 0
  store ptr %282, ptr %8, align 8
  %283 = extractvalue { ptr, i32 } %281, 1
  store i32 %283, ptr %9, align 4
  br label %298

284:                                              ; preds = %269, %267
  %285 = landingpad { ptr, i32 }
          cleanup
  %286 = extractvalue { ptr, i32 } %285, 0
  store ptr %286, ptr %8, align 8
  %287 = extractvalue { ptr, i32 } %285, 1
  store i32 %287, ptr %9, align 4
  br label %297

288:                                              ; preds = %270
  %289 = landingpad { ptr, i32 }
          cleanup
  %290 = extractvalue { ptr, i32 } %289, 0
  store ptr %290, ptr %8, align 8
  %291 = extractvalue { ptr, i32 } %289, 1
  store i32 %291, ptr %9, align 4
  br label %296

292:                                              ; preds = %274
  %293 = landingpad { ptr, i32 }
          cleanup
  %294 = extractvalue { ptr, i32 } %293, 0
  store ptr %294, ptr %8, align 8
  %295 = extractvalue { ptr, i32 } %293, 1
  store i32 %295, ptr %9, align 4
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %31) #4
  br label %296

296:                                              ; preds = %292, %288
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %33) #4
  br label %297

297:                                              ; preds = %296, %284
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %32) #4
  br label %298

298:                                              ; preds = %297, %280
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #4
  br label %299

299:                                              ; preds = %298, %264, %229, %199
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #4
  br label %300

300:                                              ; preds = %299, %195
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #4
  br label %301

301:                                              ; preds = %300, %194
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @_ZN10SimTKIpopt8SmartPtrINS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #4
  br label %302

302:                                              ; preds = %301, %172
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  br label %308

303:                                              ; preds = %279, %120
  br label %304

304:                                              ; preds = %303, %113
  store i1 true, ptr %7, align 1
  %305 = load i1, ptr %7, align 1
  br i1 %305, label %307, label %306

306:                                              ; preds = %304
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #4
  br label %307

307:                                              ; preds = %306, %304
  ret void

308:                                              ; preds = %302, %115, %72
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #4
  br label %309

309:                                              ; preds = %308
  %310 = load ptr, ptr %8, align 8
  %311 = load i32, ptr %9, align 4
  %312 = insertvalue { ptr, i32 } poison, ptr %310, 0
  %313 = insertvalue { ptr, i32 } %312, i32 %311, 1
  resume { ptr, i32 } %313

314:                                              ; preds = %247, %171
  unreachable
}

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

declare noundef zeroext i1 @_ZNK10SimTKIpopt6Matrix15HasValidNumbersEv(ptr noundef nonnull align 8 dereferenceable(69)) #3

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

; Function Attrs: mustprogress 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 = { nounwind }
attributes #5 = { noreturn }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !15, i64 456}
!12 = !{!"_ZTSN10SimTKIpopt12OrigIpoptNLPE", !13, i64 0, !17, i64 24, !18, i64 32, !19, i64 40, !19, i64 48, !19, i64 56, !19, i64 64, !20, i64 72, !19, i64 80, !20, i64 88, !19, i64 96, !20, i64 104, !19, i64 112, !20, i64 120, !20, i64 128, !20, i64 136, !21, i64 144, !20, i64 152, !20, i64 160, !21, i64 168, !22, i64 176, !23, i64 200, !23, i64 224, !24, i64 248, !23, i64 272, !24, i64 296, !25, i64 320, !26, i64 344, !27, i64 352, !26, i64 360, !27, i64 368, !26, i64 376, !27, i64 384, !26, i64 392, !27, i64 400, !26, i64 408, !26, i64 416, !28, i64 424, !29, i64 432, !29, i64 433, !30, i64 436, !29, i64 440, !15, i64 444, !15, i64 448, !15, i64 452, !15, i64 456, !15, i64 460, !15, i64 464, !15, i64 468, !29, i64 472, !31, i64 480, !31, i64 504, !31, i64 528, !31, i64 552, !31, i64 576, !31, i64 600, !31, i64 624}
!13 = !{!"_ZTSN10SimTKIpopt8IpoptNLPE", !14, i64 0, !16, i64 16}
!14 = !{!"_ZTSN10SimTKIpopt16ReferencedObjectE", !15, i64 8}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEEE", !6, i64 0}
!17 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_10JournalistEEE", !6, i64 0}
!18 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_3NLPEEE", !6, i64 0}
!19 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEEE", !6, i64 0}
!20 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_11MatrixSpaceEEE", !6, i64 0}
!21 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_14SymMatrixSpaceEEE", !6, i64 0}
!22 = !{!"_ZTSN10SimTKIpopt13CachedResultsIdEE", !15, i64 8, !6, i64 16}
!23 = !{!"_ZTSN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6VectorEEEEE", !15, i64 8, !6, i64 16}
!24 = !{!"_ZTSN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6MatrixEEEEE", !15, i64 8, !6, i64 16}
!25 = !{!"_ZTSN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_9SymMatrixEEEEE", !15, i64 8, !6, i64 16}
!26 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_6VectorEEE", !6, i64 0}
!27 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_6MatrixEEE", !6, i64 0}
!28 = !{!"double", !7, i64 0}
!29 = !{!"bool", !7, i64 0}
!30 = !{!"_ZTSN10SimTKIpopt24HessianApproximationTypeE", !7, i64 0}
!31 = !{!"_ZTSN10SimTKIpopt9TimedTaskE", !28, i64 0, !28, i64 8, !29, i64 16, !29, i64 17}
!32 = !{!29, !29, i64 0}
!33 = !{i8 0, i8 2}
!34 = !{}
!35 = !{!12, !29, i64 440}


; 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.24" = type { ptr }
%"class.SimTKIpopt::SmartPtr.16" = type { ptr }
%"class.SimTKIpopt::SmartPtr.23" = type { ptr }
%"class.SimTKIpopt::SmartPtr.54" = 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.64 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.66 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.67 = external hidden unnamed_addr constant [69 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_6MatrixEEC2Ev(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 dso_local void @_ZN10SimTKIpopt8SmartPtrIKNS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

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

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

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

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

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

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

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

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

declare void @_ZNK10SimTKIpopt10Journalist6PrintfENS_13EJournalLevelENS_16EJournalCategoryEPKcz(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10SimTKIpopt8SmartPtrINS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) 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 ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_11MatrixSpaceEEptEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN10SimTKIpopt8SmartPtrIKNS_6MatrixEEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) 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

; 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 nounwind uwtable
declare dso_local void @_ZN10SimTKIpopt14IpoptExceptionD2Ev(ptr noundef nonnull align 8 dereferenceable(112)) unnamed_addr #1 align 2

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

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

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

30:                                               ; preds = %29
  %31 = getelementptr inbounds i8, ptr %1, i64 248
  %32 = call noundef ptr @_ZN10SimTKIpopt9GetRawPtrIKNS_6VectorEEEPT_RKNS_8SmartPtrIS3_EE(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %33 = invoke noundef zeroext i1 @_ZN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6MatrixEEEE19GetCachedResult1DepERS4_PKNS_12TaggedObjectE(ptr noundef nonnull align 8 dereferenceable(24) %31, ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %32)
          to label %34 unwind label %59

34:                                               ; preds = %30
  br i1 %33, label %78, label %35

35:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %36 = getelementptr inbounds i8, ptr %1, i64 128
  %37 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_11MatrixSpaceEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %36)
  %38 = load ptr, ptr %37, align 8, !tbaa !5
  %39 = getelementptr inbounds i8, ptr %38, i64 16
  %40 = load ptr, ptr %39, align 8
  %41 = invoke noundef ptr %40(ptr noundef nonnull align 8 dereferenceable(20) %37)
          to label %42 unwind label %61

42:                                               ; preds = %35
  invoke void @_ZN10SimTKIpopt8SmartPtrINS_6MatrixEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef %41)
          to label %43 unwind label %61

43:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  invoke void @_ZNK10SimTKIpopt8IpoptNLP11NLP_scalingEv(ptr dead_on_unwind nonnull writable sret(%"class.SimTKIpopt::SmartPtr.16") align 8 %7, ptr noundef nonnull align 8 dereferenceable(24) %1)
          to label %44 unwind label %63

44:                                               ; preds = %43
  %45 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  invoke void @_ZN10SimTKIpopt8ConstPtrINS_6MatrixEEENS_8SmartPtrIKT_EERKNS2_IS3_EE(ptr dead_on_unwind nonnull writable sret(%"class.SimTKIpopt::SmartPtr.24") align 8 %8, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %46 unwind label %65

46:                                               ; preds = %44
  %47 = load ptr, ptr %45, align 8, !tbaa !5
  %48 = getelementptr inbounds i8, ptr %47, i64 128
  %49 = load ptr, ptr %48, align 8
  invoke void %49(ptr dead_on_unwind nonnull writable sret(%"class.SimTKIpopt::SmartPtr.24") align 8 %6, ptr noundef nonnull align 8 dereferenceable(24) %45, ptr noundef nonnull %8)
          to label %50 unwind label %67

50:                                               ; preds = %46
  %51 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN10SimTKIpopt8SmartPtrIKNS_6MatrixEEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %52 unwind label %69

52:                                               ; preds = %50
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  %53 = call noundef ptr @_ZN10SimTKIpopt9GetRawPtrIKNS_6VectorEEEPT_RKNS_8SmartPtrIS3_EE(ptr noundef nonnull align 8 dereferenceable(8) %4)
  invoke void @_ZN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6MatrixEEEE19AddCachedResult1DepERKS4_PKNS_12TaggedObjectE(ptr noundef nonnull align 8 dereferenceable(24) %31, ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %53)
          to label %54 unwind label %74

54:                                               ; preds = %52
  call void @_ZN10SimTKIpopt8SmartPtrINS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  br label %78

55:                                               ; preds = %81
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %201

57:                                               ; preds = %29
  %58 = landingpad { ptr, i32 }
          cleanup
  br label %80

59:                                               ; preds = %30
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %79

61:                                               ; preds = %42, %35
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %77

63:                                               ; preds = %43
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %73

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

67:                                               ; preds = %46
  %68 = landingpad { ptr, i32 }
          cleanup
  br label %71

69:                                               ; preds = %50
  %70 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  br label %71

71:                                               ; preds = %69, %67
  %.pn57 = phi { ptr, i32 } [ %70, %69 ], [ %68, %67 ]
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  br label %72

72:                                               ; preds = %71, %65
  %.pn57.pn = phi { ptr, i32 } [ %.pn57, %71 ], [ %66, %65 ]
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  br label %73

73:                                               ; preds = %72, %63
  %.pn57.pn.pn = phi { ptr, i32 } [ %.pn57.pn, %72 ], [ %64, %63 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  br label %76

74:                                               ; preds = %52
  %75 = landingpad { ptr, i32 }
          cleanup
  br label %76

76:                                               ; preds = %74, %73
  %.pn61 = phi { ptr, i32 } [ %75, %74 ], [ %.pn57.pn.pn, %73 ]
  call void @_ZN10SimTKIpopt8SmartPtrINS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  br label %77

77:                                               ; preds = %76, %61
  %.pn61.pn = phi { ptr, i32 } [ %.pn61, %76 ], [ %62, %61 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  br label %79

78:                                               ; preds = %54, %34
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  br label %200

79:                                               ; preds = %77, %59
  %.pn61.pn.pn = phi { ptr, i32 } [ %.pn61.pn, %77 ], [ %60, %59 ]
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  br label %80

80:                                               ; preds = %79, %57
  %.pn61.pn.pn.pn = phi { ptr, i32 } [ %.pn61.pn.pn, %79 ], [ %58, %57 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  br label %201

81:                                               ; preds = %3
  %82 = getelementptr inbounds i8, ptr %1, i64 248
  %83 = invoke noundef zeroext i1 @_ZN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6MatrixEEEE19GetCachedResult1DepERS4_RKNS_12TaggedObjectE(ptr noundef nonnull align 8 dereferenceable(24) %82, ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(56) %2)
          to label %84 unwind label %55

84:                                               ; preds = %81
  br i1 %83, label %200, label %85

85:                                               ; preds = %84
  %86 = getelementptr inbounds i8, ptr %1, i64 456
  %87 = load i32, ptr %86, align 8, !tbaa !8
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %86, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  %89 = getelementptr inbounds i8, ptr %1, i64 128
  %90 = tail call noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_11MatrixSpaceEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %89)
  %91 = load ptr, ptr %90, align 8, !tbaa !5
  %92 = getelementptr inbounds i8, ptr %91, i64 16
  %93 = load ptr, ptr %92, align 8
  %94 = invoke noundef ptr %93(ptr noundef nonnull align 8 dereferenceable(20) %90)
          to label %95 unwind label %125

95:                                               ; preds = %85
  invoke void @_ZN10SimTKIpopt8SmartPtrINS_6MatrixEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef %94)
          to label %96 unwind label %125

96:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #4
  invoke void @_ZNK10SimTKIpopt8IpoptNLP11NLP_scalingEv(ptr dead_on_unwind nonnull writable sret(%"class.SimTKIpopt::SmartPtr.16") align 8 %11, ptr noundef nonnull align 8 dereferenceable(24) %1)
          to label %97 unwind label %127

97:                                               ; preds = %96
  %98 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  invoke void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEEC2EPS2_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull %2)
          to label %99 unwind label %129

99:                                               ; preds = %97
  %100 = load ptr, ptr %98, align 8, !tbaa !5
  %101 = getelementptr inbounds i8, ptr %100, i64 56
  %102 = load ptr, ptr %101, align 8
  invoke void %102(ptr dead_on_unwind nonnull writable sret(%"class.SimTKIpopt::SmartPtr.23") align 8 %10, ptr noundef nonnull align 8 dereferenceable(24) %98, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %103 unwind label %131

103:                                              ; preds = %99
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  %104 = getelementptr inbounds i8, ptr %1, i64 552
  invoke void @_ZN10SimTKIpopt9TimedTask5StartEv(ptr noundef nonnull align 8 dereferenceable(18) %104)
          to label %105 unwind label %135

105:                                              ; preds = %103
  %106 = getelementptr inbounds i8, ptr %1, i64 32
  %107 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_3NLPEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %106)
  %108 = call noundef nonnull align 8 dereferenceable(205) ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_6VectorEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10)
  %109 = call noundef nonnull align 8 dereferenceable(69) ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
  %110 = load ptr, ptr %107, align 8, !tbaa !5
  %111 = getelementptr inbounds i8, ptr %110, i64 80
  %112 = load ptr, ptr %111, align 8
  %113 = invoke noundef zeroext i1 %112(ptr noundef nonnull align 8 dereferenceable(12) %107, ptr noundef nonnull align 8 dereferenceable(205) %108, ptr noundef nonnull align 8 dereferenceable(69) %109)
          to label %114 unwind label %137

114:                                              ; preds = %105
  call void @_ZN10SimTKIpopt9TimedTask3EndEv(ptr noundef nonnull align 8 dereferenceable(18) %104)
  br i1 %113, label %152, label %115

115:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull @.str.64, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %116 unwind label %139

116:                                              ; preds = %115
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #4
  %117 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull @.str.33)
          to label %118 unwind label %141

118:                                              ; preds = %116
  %119 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull @.str.65)
          to label %120 unwind label %141

120:                                              ; preds = %118
  %121 = call ptr @__cxa_allocate_exception(i64 112) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %122 unwind label %.thread

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

123:                                              ; preds = %122
  invoke void @_ZN10SimTKIpopt8IpoptNLP10Eval_ErrorC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_i(ptr noundef nonnull align 8 dereferenceable(112) %121, ptr noundef nonnull %15, ptr noundef nonnull %16, i32 noundef 534)
          to label %124 unwind label %146

124:                                              ; preds = %123
  invoke void @__cxa_throw(ptr nonnull %121, ptr nonnull @_ZTIN10SimTKIpopt8IpoptNLP10Eval_ErrorE, ptr nonnull @_ZN10SimTKIpopt14IpoptExceptionD2Ev) #5
          to label %202 unwind label %146

125:                                              ; preds = %95, %85
  %126 = landingpad { ptr, i32 }
          cleanup
  br label %199

127:                                              ; preds = %96
  %128 = landingpad { ptr, i32 }
          cleanup
  br label %134

129:                                              ; preds = %97
  %130 = landingpad { ptr, i32 }
          cleanup
  br label %133

131:                                              ; preds = %99
  %132 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  br label %133

133:                                              ; preds = %131, %129
  %.pn = phi { ptr, i32 } [ %132, %131 ], [ %130, %129 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #4
  br label %134

134:                                              ; preds = %133, %127
  %.pn.pn = phi { ptr, i32 } [ %.pn, %133 ], [ %128, %127 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  br label %198

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

137:                                              ; preds = %184, %160, %156, %105
  %138 = landingpad { ptr, i32 }
          cleanup
  br label %197

139:                                              ; preds = %115
  %140 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #4
  br label %151

141:                                              ; preds = %118, %116
  %142 = landingpad { ptr, i32 }
          cleanup
  br label %150

.thread:                                          ; preds = %120
  %143 = landingpad { ptr, i32 }
          cleanup
  br label %149

144:                                              ; preds = %122
  %145 = landingpad { ptr, i32 }
          cleanup
  br label %148

146:                                              ; preds = %124, %123
  %.09 = phi i1 [ false, %124 ], [ true, %123 ]
  %147 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #4
  br label %148

148:                                              ; preds = %144, %146
  %.pn40 = phi { ptr, i32 } [ %147, %146 ], [ %145, %144 ]
  %.110 = phi i1 [ %.09, %146 ], [ true, %144 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #4
  br i1 %.110, label %149, label %150

149:                                              ; preds = %.thread, %148
  %.pn40.pn69 = phi { ptr, i32 } [ %143, %.thread ], [ %.pn40, %148 ]
  call void @__cxa_free_exception(ptr %121) #4
  br label %150

150:                                              ; preds = %148, %149, %141
  %.pn40.pn.pn = phi { ptr, i32 } [ %.pn40.pn69, %149 ], [ %.pn40, %148 ], [ %142, %141 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #4
  br label %151

151:                                              ; preds = %150, %139
  %.pn40.pn.pn.pn = phi { ptr, i32 } [ %.pn40.pn.pn, %150 ], [ %140, %139 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #4
  br label %197

152:                                              ; preds = %114
  %153 = getelementptr inbounds i8, ptr %1, i64 440
  %154 = load i8, ptr %153, align 8, !tbaa !31, !range !32, !noundef !33
  %155 = trunc nuw i8 %154 to i1
  br i1 %155, label %156, label %175

156:                                              ; preds = %152
  %157 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
  %158 = invoke noundef zeroext i1 @_ZNK10SimTKIpopt6Matrix15HasValidNumbersEv(ptr noundef nonnull align 8 dereferenceable(69) %157)
          to label %159 unwind label %137

159:                                              ; preds = %156
  br i1 %158, label %175, label %160

160:                                              ; preds = %159
  %161 = getelementptr inbounds i8, ptr %1, i64 24
  %162 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_10JournalistEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %161)
  invoke void (ptr, i32, i32, ptr, ...) @_ZNK10SimTKIpopt10Journalist6PrintfENS_13EJournalLevelENS_16EJournalCategoryEPKcz(ptr noundef nonnull align 8 dereferenceable(40) %162, i32 noundef 2, i32 noundef 12, ptr noundef nonnull @.str.66)
          to label %163 unwind label %137

163:                                              ; preds = %160
  %164 = call ptr @__cxa_allocate_exception(i64 112) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %19) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull @.str.67, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %165 unwind label %.thread70

165:                                              ; preds = %163
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %21) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull @.str.35, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %166 unwind label %169

166:                                              ; preds = %165
  invoke void @_ZN10SimTKIpopt8IpoptNLP10Eval_ErrorC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_i(ptr noundef nonnull align 8 dereferenceable(112) %164, ptr noundef nonnull %18, ptr noundef nonnull %20, i32 noundef 539)
          to label %167 unwind label %171

167:                                              ; preds = %166
  invoke void @__cxa_throw(ptr nonnull %164, ptr nonnull @_ZTIN10SimTKIpopt8IpoptNLP10Eval_ErrorE, ptr nonnull @_ZN10SimTKIpopt14IpoptExceptionD2Ev) #5
          to label %202 unwind label %171

.thread70:                                        ; preds = %163
  %168 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %19) #4
  br label %174

169:                                              ; preds = %165
  %170 = landingpad { ptr, i32 }
          cleanup
  br label %173

171:                                              ; preds = %167, %166
  %.0 = phi i1 [ false, %167 ], [ true, %166 ]
  %172 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #4
  br label %173

173:                                              ; preds = %169, %171
  %.pn45 = phi { ptr, i32 } [ %172, %171 ], [ %170, %169 ]
  %.1 = phi i1 [ %.0, %171 ], [ true, %169 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %21) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %19) #4
  br i1 %.1, label %174, label %197

174:                                              ; preds = %.thread70, %173
  %.pn45.pn73 = phi { ptr, i32 } [ %168, %.thread70 ], [ %.pn45, %173 ]
  call void @__cxa_free_exception(ptr %164) #4
  br label %197

175:                                              ; preds = %159, %152
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #4
  invoke void @_ZNK10SimTKIpopt8IpoptNLP11NLP_scalingEv(ptr dead_on_unwind nonnull writable sret(%"class.SimTKIpopt::SmartPtr.16") align 8 %23, ptr noundef nonnull align 8 dereferenceable(24) %1)
          to label %176 unwind label %186

176:                                              ; preds = %175
  %177 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %23)
  invoke void @_ZN10SimTKIpopt8ConstPtrINS_6MatrixEEENS_8SmartPtrIKT_EERKNS2_IS3_EE(ptr dead_on_unwind nonnull writable sret(%"class.SimTKIpopt::SmartPtr.24") align 8 %24, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %178 unwind label %188

178:                                              ; preds = %176
  %179 = load ptr, ptr %177, align 8, !tbaa !5
  %180 = getelementptr inbounds i8, ptr %179, i64 128
  %181 = load ptr, ptr %180, align 8
  invoke void %181(ptr dead_on_unwind nonnull writable sret(%"class.SimTKIpopt::SmartPtr.24") align 8 %22, ptr noundef nonnull align 8 dereferenceable(24) %177, ptr noundef nonnull %24)
          to label %182 unwind label %190

182:                                              ; preds = %178
  %183 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN10SimTKIpopt8SmartPtrIKNS_6MatrixEEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %184 unwind label %192

184:                                              ; preds = %182
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %22) #4
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %24) #4
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #4
  invoke void @_ZN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6MatrixEEEE19AddCachedResult1DepERKS4_RKNS_12TaggedObjectE(ptr noundef nonnull align 8 dereferenceable(24) %82, ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(56) %2)
          to label %185 unwind label %137

185:                                              ; preds = %184
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  call void @_ZN10SimTKIpopt8SmartPtrINS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  br label %200

186:                                              ; preds = %175
  %187 = landingpad { ptr, i32 }
          cleanup
  br label %196

188:                                              ; preds = %176
  %189 = landingpad { ptr, i32 }
          cleanup
  br label %195

190:                                              ; preds = %178
  %191 = landingpad { ptr, i32 }
          cleanup
  br label %194

192:                                              ; preds = %182
  %193 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %22) #4
  br label %194

194:                                              ; preds = %192, %190
  %.pn48 = phi { ptr, i32 } [ %193, %192 ], [ %191, %190 ]
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %24) #4
  br label %195

195:                                              ; preds = %194, %188
  %.pn48.pn = phi { ptr, i32 } [ %.pn48, %194 ], [ %189, %188 ]
  call void @_ZN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %23) #4
  br label %196

196:                                              ; preds = %195, %186
  %.pn48.pn.pn = phi { ptr, i32 } [ %.pn48.pn, %195 ], [ %187, %186 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #4
  br label %197

197:                                              ; preds = %137, %151, %196, %174, %173, %135
  %.pn52.pn = phi { ptr, i32 } [ %136, %135 ], [ %138, %137 ], [ %.pn48.pn.pn, %196 ], [ %.pn45.pn73, %174 ], [ %.pn45, %173 ], [ %.pn40.pn.pn.pn, %151 ]
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #4
  br label %198

198:                                              ; preds = %197, %134
  %.pn52.pn.pn = phi { ptr, i32 } [ %.pn52.pn, %197 ], [ %.pn.pn, %134 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  call void @_ZN10SimTKIpopt8SmartPtrINS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  br label %199

199:                                              ; preds = %198, %125
  %.pn52.pn.pn.pn = phi { ptr, i32 } [ %.pn52.pn.pn, %198 ], [ %126, %125 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  br label %201

200:                                              ; preds = %78, %185, %84
  ret void

201:                                              ; preds = %199, %80, %55
  %.pn61.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn61.pn.pn.pn, %80 ], [ %.pn52.pn.pn.pn, %199 ], [ %56, %55 ]
  call void @_ZN10SimTKIpopt8SmartPtrIKNS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #4
  resume { ptr, i32 } %.pn61.pn.pn.pn.pn

202:                                              ; preds = %167, %124
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6MatrixEEEE19GetCachedResult1DepERS4_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 uwtable
declare dso_local void @_ZN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6MatrixEEEE19AddCachedResult1DepERKS4_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 uwtable
declare dso_local noundef zeroext i1 @_ZN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6MatrixEEEE19GetCachedResult1DepERS4_RKNS_12TaggedObjectE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #2 align 2

declare noundef zeroext i1 @_ZNK10SimTKIpopt6Matrix15HasValidNumbersEv(ptr noundef nonnull align 8 dereferenceable(69)) local_unnamed_addr #3

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

; Function Attrs: mustprogress 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 = { nounwind }
attributes #5 = { noreturn }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !12, i64 456}
!9 = !{!"_ZTSN10SimTKIpopt12OrigIpoptNLPE", !10, i64 0, !16, i64 24, !17, i64 32, !18, i64 40, !18, i64 48, !18, i64 56, !18, i64 64, !19, i64 72, !18, i64 80, !19, i64 88, !18, i64 96, !19, i64 104, !18, i64 112, !19, i64 120, !19, i64 128, !19, i64 136, !20, i64 144, !19, i64 152, !19, i64 160, !20, i64 168, !21, i64 176, !22, i64 200, !22, i64 224, !23, i64 248, !22, i64 272, !23, i64 296, !24, i64 320, !25, i64 344, !26, i64 352, !25, i64 360, !26, i64 368, !25, i64 376, !26, i64 384, !25, i64 392, !26, i64 400, !25, i64 408, !25, i64 416, !27, i64 424, !28, i64 432, !28, i64 433, !29, i64 436, !28, i64 440, !12, i64 444, !12, i64 448, !12, i64 452, !12, i64 456, !12, i64 460, !12, i64 464, !12, i64 468, !28, i64 472, !30, i64 480, !30, i64 504, !30, i64 528, !30, i64 552, !30, i64 576, !30, i64 600, !30, i64 624}
!10 = !{!"_ZTSN10SimTKIpopt8IpoptNLPE", !11, i64 0, !14, i64 16}
!11 = !{!"_ZTSN10SimTKIpopt16ReferencedObjectE", !12, i64 8}
!12 = !{!"int", !13, i64 0}
!13 = !{!"omnipotent char", !7, i64 0}
!14 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_16NLPScalingObjectEEE", !15, i64 0}
!15 = !{!"any pointer", !13, i64 0}
!16 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_10JournalistEEE", !15, i64 0}
!17 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_3NLPEEE", !15, i64 0}
!18 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEEE", !15, i64 0}
!19 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_11MatrixSpaceEEE", !15, i64 0}
!20 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_14SymMatrixSpaceEEE", !15, i64 0}
!21 = !{!"_ZTSN10SimTKIpopt13CachedResultsIdEE", !12, i64 8, !15, i64 16}
!22 = !{!"_ZTSN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6VectorEEEEE", !12, i64 8, !15, i64 16}
!23 = !{!"_ZTSN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_6MatrixEEEEE", !12, i64 8, !15, i64 16}
!24 = !{!"_ZTSN10SimTKIpopt13CachedResultsINS_8SmartPtrIKNS_9SymMatrixEEEEE", !12, i64 8, !15, i64 16}
!25 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_6VectorEEE", !15, i64 0}
!26 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_6MatrixEEE", !15, i64 0}
!27 = !{!"double", !13, i64 0}
!28 = !{!"bool", !13, i64 0}
!29 = !{!"_ZTSN10SimTKIpopt24HessianApproximationTypeE", !13, i64 0}
!30 = !{!"_ZTSN10SimTKIpopt9TimedTaskE", !27, i64 0, !27, i64 8, !28, i64 16, !28, i64 17}
!31 = !{!9, !28, i64 440}
!32 = !{i8 0, i8 2}
!33 = !{}


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