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

; 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.20" = 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.7" = type { i8 }
%"class.SimTKIpopt::SmartPtr.30" = type { ptr }
%"class.SimTKIpopt::GradientScaling" = type { %"class.SimTKIpopt::StandardScalingBase", %"class.SimTKIpopt::SmartPtr.23", double }
%"class.SimTKIpopt::StandardScalingBase" = type { %"class.SimTKIpopt::NLPScalingObject", double, %"class.SimTKIpopt::SmartPtr.20", %"class.SimTKIpopt::SmartPtr.21", %"class.SimTKIpopt::SmartPtr.21", %"class.SimTKIpopt::SmartPtr.22", double }
%"class.SimTKIpopt::NLPScalingObject" = type { %"class.SimTKIpopt::ReferencedObject.base", %"class.SimTKIpopt::SmartPtr.19" }
%"class.SimTKIpopt::ReferencedObject.base" = type <{ ptr, i32 }>
%"class.SimTKIpopt::SmartPtr.19" = type { ptr }
%"class.SimTKIpopt::SmartPtr.21" = type { ptr }
%"class.SimTKIpopt::SmartPtr.22" = type { ptr }
%"class.SimTKIpopt::SmartPtr.23" = type { ptr }

@.str.3 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [102 x i8], align 1
@_ZTIN10SimTKIpopt21FAILED_INITIALIZATIONE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.5 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [123 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [140 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [144 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 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 void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10SimTKIpopt15GradientScaling30DetermineScalingParametersImplENS_8SmartPtrIKNS_11VectorSpaceEEES4_S4_NS1_IKNS_11MatrixSpaceEEES7_NS1_IKNS_14SymMatrixSpaceEEERdRNS1_INS_6VectorEEESE_SE_(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca %"class.SimTKIpopt::SmartPtr.20", align 8
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca %"class.SimTKIpopt::SmartPtr.20", align 8
  %27 = alloca %"class.SimTKIpopt::SmartPtr.20", align 8
  %28 = alloca %"class.SimTKIpopt::SmartPtr.20", align 8
  %29 = alloca %"class.SimTKIpopt::SmartPtr.20", align 8
  %30 = alloca %"class.SimTKIpopt::SmartPtr.20", align 8
  %31 = alloca %"class.std::__cxx11::basic_string", align 8
  %32 = alloca %"class.std::allocator.7", align 1
  %33 = alloca %"class.std::__cxx11::basic_string", align 8
  %34 = alloca %"class.std::allocator.7", align 1
  %35 = alloca i1, align 1
  %36 = alloca %"class.SimTKIpopt::SmartPtr.20", align 8
  %37 = alloca double, align 8
  %38 = alloca %"class.SimTKIpopt::SmartPtr.30", align 8
  %39 = alloca i32, align 4
  %40 = alloca ptr, align 8
  %41 = alloca ptr, align 8
  %42 = alloca ptr, align 8
  %43 = alloca ptr, align 8
  %44 = alloca i32, align 4
  %45 = alloca i8, align 1
  %46 = alloca i32, align 4
  %47 = alloca i32, align 4
  %48 = alloca double, align 8
  %49 = alloca %"class.SimTKIpopt::SmartPtr.30", align 8
  %50 = alloca i32, align 4
  %51 = alloca ptr, align 8
  %52 = alloca ptr, align 8
  %53 = alloca ptr, align 8
  %54 = alloca ptr, align 8
  %55 = alloca i32, align 4
  %56 = alloca i8, align 1
  %57 = alloca i32, align 4
  %58 = alloca i32, align 4
  %59 = alloca double, align 8
  store ptr %0, ptr %12, align 8, !tbaa !5
  store ptr %1, ptr %13, align 8, !tbaa !5
  store ptr %2, ptr %14, align 8, !tbaa !5
  store ptr %3, ptr %15, align 8, !tbaa !5
  store ptr %4, ptr %16, align 8, !tbaa !5
  store ptr %5, ptr %17, align 8, !tbaa !5
  store ptr %6, ptr %18, align 8, !tbaa !5
  store ptr %7, ptr %19, align 8, !tbaa !5
  store ptr %8, ptr %20, align 8, !tbaa !5
  store ptr %9, ptr %21, align 8, !tbaa !5
  store ptr %10, ptr %22, align 8, !tbaa !5
  %60 = load ptr, ptr %12, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #9
  %61 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
  %62 = load ptr, ptr %61, align 8, !tbaa !9
  %63 = getelementptr inbounds ptr, ptr %62, i64 2
  %64 = load ptr, ptr %63, align 8
  %65 = call noundef ptr %64(ptr noundef nonnull align 8 dereferenceable(16) %61)
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef %65)
  %66 = getelementptr inbounds %"class.SimTKIpopt::GradientScaling", ptr %60, i32 0, i32 1
  %67 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_3NLPEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %66)
          to label %68 unwind label %87

68:                                               ; preds = %11
  %69 = invoke noundef ptr @_ZN10SimTKIpopt9GetRawPtrINS_6VectorEEEPT_RKNS_8SmartPtrIS2_EE(ptr noundef nonnull align 8 dereferenceable(8) %23)
          to label %70 unwind label %87

70:                                               ; preds = %68
  invoke void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef %69)
          to label %71 unwind label %87

71:                                               ; preds = %70
  invoke void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef null)
          to label %72 unwind label %91

72:                                               ; preds = %71
  invoke void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef null)
          to label %73 unwind label %95

73:                                               ; preds = %72
  invoke void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef null)
          to label %74 unwind label %99

74:                                               ; preds = %73
  invoke void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef null)
          to label %75 unwind label %103

75:                                               ; preds = %74
  %76 = load ptr, ptr %67, align 8, !tbaa !9
  %77 = getelementptr inbounds ptr, ptr %76, i64 5
  %78 = load ptr, ptr %77, align 8
  %79 = invoke noundef zeroext i1 %78(ptr noundef nonnull align 8 dereferenceable(12) %67, ptr noundef %26, i1 noundef zeroext true, ptr noundef %27, i1 noundef zeroext false, ptr noundef %28, i1 noundef zeroext false, ptr noundef %29, i1 noundef zeroext false, ptr noundef %30, i1 noundef zeroext false)
          to label %80 unwind label %107

80:                                               ; preds = %75
  %81 = xor i1 %79, true
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %30) #9
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %29) #9
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %28) #9
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %27) #9
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %26) #9
  br i1 %81, label %82, label %132

82:                                               ; preds = %80
  store i1 true, ptr %35, align 1
  %83 = call ptr @__cxa_allocate_exception(i64 112) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %32) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %31, ptr noundef @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %32)
          to label %84 unwind label %115

84:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 1, ptr %34) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %34) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %33, ptr noundef @.str.4, ptr noundef nonnull align 1 dereferenceable(1) %34)
          to label %85 unwind label %119

85:                                               ; preds = %84
  invoke void @_ZN10SimTKIpopt21FAILED_INITIALIZATIONC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_i(ptr noundef nonnull align 8 dereferenceable(112) %83, ptr noundef %31, ptr noundef %33, i32 noundef 68)
          to label %86 unwind label %123

86:                                               ; preds = %85
  store i1 false, ptr %35, align 1
  invoke void @__cxa_throw(ptr %83, ptr @_ZTIN10SimTKIpopt21FAILED_INITIALIZATIONE, ptr @_ZN10SimTKIpopt14IpoptExceptionD2Ev) #10
          to label %788 unwind label %123

87:                                               ; preds = %70, %68, %11
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %24, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %25, align 4
  br label %782

91:                                               ; preds = %71
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %24, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %25, align 4
  br label %114

95:                                               ; preds = %72
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %24, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %25, align 4
  br label %113

99:                                               ; preds = %73
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %24, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %25, align 4
  br label %112

103:                                              ; preds = %74
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %24, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %25, align 4
  br label %111

107:                                              ; preds = %75
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %24, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %25, align 4
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %30) #9
  br label %111

111:                                              ; preds = %107, %103
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %29) #9
  br label %112

112:                                              ; preds = %111, %99
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %28) #9
  br label %113

113:                                              ; preds = %112, %95
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %27) #9
  br label %114

114:                                              ; preds = %113, %91
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %26) #9
  br label %782

115:                                              ; preds = %82
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %24, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %25, align 4
  br label %128

119:                                              ; preds = %84
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %24, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %25, align 4
  br label %127

123:                                              ; preds = %86, %85
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %24, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %25, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %33) #9
  br label %127

127:                                              ; preds = %123, %119
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %34) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %34) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %31) #9
  br label %128

128:                                              ; preds = %127, %115
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #9
  %129 = load i1, ptr %35, align 1
  br i1 %129, label %130, label %131

130:                                              ; preds = %128
  call void @__cxa_free_exception(ptr %83) #9
  br label %131

131:                                              ; preds = %130, %128
  br label %782

132:                                              ; preds = %80
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #9
  %133 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %134 unwind label %169

134:                                              ; preds = %132
  %135 = load ptr, ptr %133, align 8, !tbaa !9
  %136 = getelementptr inbounds ptr, ptr %135, i64 2
  %137 = load ptr, ptr %136, align 8
  %138 = invoke noundef ptr %137(ptr noundef nonnull align 8 dereferenceable(16) %133)
          to label %139 unwind label %169

139:                                              ; preds = %134
  invoke void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef %138)
          to label %140 unwind label %169

140:                                              ; preds = %139
  %141 = getelementptr inbounds %"class.SimTKIpopt::GradientScaling", ptr %60, i32 0, i32 1
  %142 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_3NLPEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %141)
          to label %143 unwind label %173

143:                                              ; preds = %140
  %144 = invoke noundef nonnull align 8 dereferenceable(205) ptr @_ZNK10SimTKIpopt8SmartPtrINS_6VectorEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %23)
          to label %145 unwind label %173

145:                                              ; preds = %143
  %146 = invoke noundef nonnull align 8 dereferenceable(205) ptr @_ZNK10SimTKIpopt8SmartPtrINS_6VectorEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %36)
          to label %147 unwind label %173

147:                                              ; preds = %145
  %148 = load ptr, ptr %142, align 8, !tbaa !9
  %149 = getelementptr inbounds ptr, ptr %148, i64 8
  %150 = load ptr, ptr %149, align 8
  %151 = invoke noundef zeroext i1 %150(ptr noundef nonnull align 8 dereferenceable(12) %142, ptr noundef nonnull align 8 dereferenceable(205) %144, ptr noundef nonnull align 8 dereferenceable(205) %146)
          to label %152 unwind label %173

152:                                              ; preds = %147
  br i1 %151, label %153, label %187

153:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #9
  %154 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_6VectorEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %36)
          to label %155 unwind label %177

155:                                              ; preds = %153
  %156 = invoke noundef double @_ZNK10SimTKIpopt6Vector4AmaxEv(ptr noundef nonnull align 8 dereferenceable(205) %154)
          to label %157 unwind label %177

157:                                              ; preds = %155
  store double %156, ptr %37, align 8, !tbaa !11
  %158 = load ptr, ptr %19, align 8, !tbaa !5
  store double 1.000000e+00, ptr %158, align 8, !tbaa !11
  %159 = load double, ptr %37, align 8, !tbaa !11
  %160 = getelementptr inbounds %"class.SimTKIpopt::GradientScaling", ptr %60, i32 0, i32 2
  %161 = load double, ptr %160, align 8, !tbaa !13
  %162 = fcmp ogt double %159, %161
  br i1 %162, label %163, label %181

163:                                              ; preds = %157
  %164 = getelementptr inbounds %"class.SimTKIpopt::GradientScaling", ptr %60, i32 0, i32 2
  %165 = load double, ptr %164, align 8, !tbaa !13
  %166 = load double, ptr %37, align 8, !tbaa !11
  %167 = fdiv double %165, %166
  %168 = load ptr, ptr %19, align 8, !tbaa !5
  store double %167, ptr %168, align 8, !tbaa !11
  br label %181

169:                                              ; preds = %139, %134, %132
  %170 = landingpad { ptr, i32 }
          cleanup
  %171 = extractvalue { ptr, i32 } %170, 0
  store ptr %171, ptr %24, align 8
  %172 = extractvalue { ptr, i32 } %170, 1
  store i32 %172, ptr %25, align 4
  br label %781

173:                                              ; preds = %192, %189, %187, %147, %145, %143, %140
  %174 = landingpad { ptr, i32 }
          cleanup
  %175 = extractvalue { ptr, i32 } %174, 0
  store ptr %175, ptr %24, align 8
  %176 = extractvalue { ptr, i32 } %174, 1
  store i32 %176, ptr %25, align 4
  br label %780

177:                                              ; preds = %183, %181, %155, %153
  %178 = landingpad { ptr, i32 }
          cleanup
  %179 = extractvalue { ptr, i32 } %178, 0
  store ptr %179, ptr %24, align 8
  %180 = extractvalue { ptr, i32 } %178, 1
  store i32 %180, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #9
  br label %780

181:                                              ; preds = %163, %157
  %182 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZNK10SimTKIpopt16NLPScalingObject5JnlstEv(ptr noundef nonnull align 8 dereferenceable(24) %60)
          to label %183 unwind label %177

183:                                              ; preds = %181
  %184 = load ptr, ptr %19, align 8, !tbaa !5
  %185 = load double, ptr %184, align 8, !tbaa !11
  invoke void (ptr, i32, i32, ptr, ...) @_ZNK10SimTKIpopt10Journalist6PrintfENS_13EJournalLevelENS_16EJournalCategoryEPKcz(ptr noundef nonnull align 8 dereferenceable(40) %182, i32 noundef 5, i32 noundef 3, ptr noundef @.str.5, double noundef %185)
          to label %186 unwind label %177

186:                                              ; preds = %183
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #9
  br label %192

187:                                              ; preds = %152
  %188 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZNK10SimTKIpopt16NLPScalingObject5JnlstEv(ptr noundef nonnull align 8 dereferenceable(24) %60)
          to label %189 unwind label %173

189:                                              ; preds = %187
  invoke void (ptr, i32, i32, ptr, ...) @_ZNK10SimTKIpopt10Journalist6PrintfENS_13EJournalLevelENS_16EJournalCategoryEPKcz(ptr noundef nonnull align 8 dereferenceable(40) %188, i32 noundef 2, i32 noundef 3, ptr noundef @.str.6)
          to label %190 unwind label %173

190:                                              ; preds = %189
  %191 = load ptr, ptr %19, align 8, !tbaa !5
  store double 1.000000e+00, ptr %191, align 8, !tbaa !11
  br label %192

192:                                              ; preds = %190, %186
  %193 = load ptr, ptr %20, align 8, !tbaa !5
  %194 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEaSEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %193, ptr noundef null)
          to label %195 unwind label %173

195:                                              ; preds = %192
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #9
  %196 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_11MatrixSpaceEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %197 unwind label %275

197:                                              ; preds = %195
  %198 = load ptr, ptr %196, align 8, !tbaa !9
  %199 = getelementptr inbounds ptr, ptr %198, i64 2
  %200 = load ptr, ptr %199, align 8
  %201 = invoke noundef ptr %200(ptr noundef nonnull align 8 dereferenceable(20) %196)
          to label %202 unwind label %275

202:                                              ; preds = %197
  invoke void @_ZN10SimTKIpopt8SmartPtrINS_6MatrixEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef %201)
          to label %203 unwind label %275

203:                                              ; preds = %202
  %204 = getelementptr inbounds %"class.SimTKIpopt::GradientScaling", ptr %60, i32 0, i32 1
  %205 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_3NLPEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %204)
          to label %206 unwind label %279

206:                                              ; preds = %203
  %207 = invoke noundef nonnull align 8 dereferenceable(205) ptr @_ZNK10SimTKIpopt8SmartPtrINS_6VectorEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %23)
          to label %208 unwind label %279

208:                                              ; preds = %206
  %209 = invoke noundef nonnull align 8 dereferenceable(69) ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %38)
          to label %210 unwind label %279

210:                                              ; preds = %208
  %211 = load ptr, ptr %205, align 8, !tbaa !9
  %212 = getelementptr inbounds ptr, ptr %211, i64 10
  %213 = load ptr, ptr %212, align 8
  %214 = invoke noundef zeroext i1 %213(ptr noundef nonnull align 8 dereferenceable(12) %205, ptr noundef nonnull align 8 dereferenceable(205) %207, ptr noundef nonnull align 8 dereferenceable(69) %209)
          to label %215 unwind label %279

215:                                              ; preds = %210
  br i1 %214, label %216, label %478

216:                                              ; preds = %215
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #9
  %217 = invoke noundef nonnull align 8 dereferenceable(69) ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %38)
          to label %218 unwind label %283

218:                                              ; preds = %216
  %219 = invoke noundef i32 @_ZN10SimTKIpopt13TripletHelper16GetNumberEntriesERKNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(69) %217)
          to label %220 unwind label %283

220:                                              ; preds = %218
  store i32 %219, ptr %39, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #9
  %221 = load i32, ptr %39, align 4, !tbaa !24
  %222 = sext i32 %221 to i64
  %223 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %222, i64 4)
  %224 = extractvalue { i64, i1 } %223, 1
  %225 = extractvalue { i64, i1 } %223, 0
  %226 = select i1 %224, i64 -1, i64 %225
  %227 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %226) #11
          to label %228 unwind label %287

228:                                              ; preds = %220
  store ptr %227, ptr %40, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #9
  %229 = load i32, ptr %39, align 4, !tbaa !24
  %230 = sext i32 %229 to i64
  %231 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %230, i64 4)
  %232 = extractvalue { i64, i1 } %231, 1
  %233 = extractvalue { i64, i1 } %231, 0
  %234 = select i1 %232, i64 -1, i64 %233
  %235 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %234) #11
          to label %236 unwind label %291

236:                                              ; preds = %228
  store ptr %235, ptr %41, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #9
  %237 = load i32, ptr %39, align 4, !tbaa !24
  %238 = sext i32 %237 to i64
  %239 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %238, i64 8)
  %240 = extractvalue { i64, i1 } %239, 1
  %241 = extractvalue { i64, i1 } %239, 0
  %242 = select i1 %240, i64 -1, i64 %241
  %243 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %242) #11
          to label %244 unwind label %295

244:                                              ; preds = %236
  store ptr %243, ptr %42, align 8, !tbaa !5
  %245 = load i32, ptr %39, align 4, !tbaa !24
  %246 = invoke noundef nonnull align 8 dereferenceable(69) ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %38)
          to label %247 unwind label %295

247:                                              ; preds = %244
  %248 = load ptr, ptr %40, align 8, !tbaa !5
  %249 = load ptr, ptr %41, align 8, !tbaa !5
  invoke void @_ZN10SimTKIpopt13TripletHelper10FillRowColEiRKNS_6MatrixEPiS4_ii(i32 noundef %245, ptr noundef nonnull align 8 dereferenceable(69) %246, ptr noundef %248, ptr noundef %249, i32 noundef 0, i32 noundef 0)
          to label %250 unwind label %295

250:                                              ; preds = %247
  %251 = load i32, ptr %39, align 4, !tbaa !24
  %252 = invoke noundef nonnull align 8 dereferenceable(69) ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %38)
          to label %253 unwind label %295

253:                                              ; preds = %250
  %254 = load ptr, ptr %42, align 8, !tbaa !5
  invoke void @_ZN10SimTKIpopt13TripletHelper10FillValuesEiRKNS_6MatrixEPd(i32 noundef %251, ptr noundef nonnull align 8 dereferenceable(69) %252, ptr noundef %254)
          to label %255 unwind label %295

255:                                              ; preds = %253
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #9
  %256 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %38)
          to label %257 unwind label %299

257:                                              ; preds = %255
  %258 = invoke noundef i32 @_ZNK10SimTKIpopt6Matrix5NRowsEv(ptr noundef nonnull align 8 dereferenceable(69) %256)
          to label %259 unwind label %299

259:                                              ; preds = %257
  %260 = sext i32 %258 to i64
  %261 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %260, i64 8)
  %262 = extractvalue { i64, i1 } %261, 1
  %263 = extractvalue { i64, i1 } %261, 0
  %264 = select i1 %262, i64 -1, i64 %263
  %265 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %264) #11
          to label %266 unwind label %299

266:                                              ; preds = %259
  store ptr %265, ptr %43, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #9
  store i32 0, ptr %44, align 4, !tbaa !24
  br label %267

267:                                              ; preds = %312, %266
  %268 = load i32, ptr %44, align 4, !tbaa !24
  %269 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %38)
          to label %270 unwind label %303

270:                                              ; preds = %267
  %271 = invoke noundef i32 @_ZNK10SimTKIpopt6Matrix5NRowsEv(ptr noundef nonnull align 8 dereferenceable(69) %269)
          to label %272 unwind label %303

272:                                              ; preds = %270
  %273 = icmp slt i32 %268, %271
  br i1 %273, label %307, label %274

274:                                              ; preds = %272
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #9
  br label %315

275:                                              ; preds = %202, %197, %195
  %276 = landingpad { ptr, i32 }
          cleanup
  %277 = extractvalue { ptr, i32 } %276, 0
  store ptr %277, ptr %24, align 8
  %278 = extractvalue { ptr, i32 } %276, 1
  store i32 %278, ptr %25, align 4
  br label %779

279:                                              ; preds = %481, %480, %478, %210, %208, %206, %203
  %280 = landingpad { ptr, i32 }
          cleanup
  %281 = extractvalue { ptr, i32 } %280, 0
  store ptr %281, ptr %24, align 8
  %282 = extractvalue { ptr, i32 } %280, 1
  store i32 %282, ptr %25, align 4
  br label %778

283:                                              ; preds = %218, %216
  %284 = landingpad { ptr, i32 }
          cleanup
  %285 = extractvalue { ptr, i32 } %284, 0
  store ptr %285, ptr %24, align 8
  %286 = extractvalue { ptr, i32 } %284, 1
  store i32 %286, ptr %25, align 4
  br label %477

287:                                              ; preds = %220
  %288 = landingpad { ptr, i32 }
          cleanup
  %289 = extractvalue { ptr, i32 } %288, 0
  store ptr %289, ptr %24, align 8
  %290 = extractvalue { ptr, i32 } %288, 1
  store i32 %290, ptr %25, align 4
  br label %476

291:                                              ; preds = %228
  %292 = landingpad { ptr, i32 }
          cleanup
  %293 = extractvalue { ptr, i32 } %292, 0
  store ptr %293, ptr %24, align 8
  %294 = extractvalue { ptr, i32 } %292, 1
  store i32 %294, ptr %25, align 4
  br label %475

295:                                              ; preds = %253, %250, %247, %244, %236
  %296 = landingpad { ptr, i32 }
          cleanup
  %297 = extractvalue { ptr, i32 } %296, 0
  store ptr %297, ptr %24, align 8
  %298 = extractvalue { ptr, i32 } %296, 1
  store i32 %298, ptr %25, align 4
  br label %474

299:                                              ; preds = %259, %257, %255
  %300 = landingpad { ptr, i32 }
          cleanup
  %301 = extractvalue { ptr, i32 } %300, 0
  store ptr %301, ptr %24, align 8
  %302 = extractvalue { ptr, i32 } %300, 1
  store i32 %302, ptr %25, align 4
  br label %473

303:                                              ; preds = %270, %267
  %304 = landingpad { ptr, i32 }
          cleanup
  %305 = extractvalue { ptr, i32 } %304, 0
  store ptr %305, ptr %24, align 8
  %306 = extractvalue { ptr, i32 } %304, 1
  store i32 %306, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #9
  br label %473

307:                                              ; preds = %272
  %308 = load ptr, ptr %43, align 8, !tbaa !5
  %309 = load i32, ptr %44, align 4, !tbaa !24
  %310 = sext i32 %309 to i64
  %311 = getelementptr inbounds double, ptr %308, i64 %310
  store double 0.000000e+00, ptr %311, align 8, !tbaa !11
  br label %312

312:                                              ; preds = %307
  %313 = load i32, ptr %44, align 4, !tbaa !24
  %314 = add nsw i32 %313, 1
  store i32 %314, ptr %44, align 4, !tbaa !24
  br label %267, !llvm.loop !25

315:                                              ; preds = %274
  call void @llvm.lifetime.start.p0(i64 1, ptr %45) #9
  store i8 0, ptr %45, align 1, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #9
  store i32 0, ptr %46, align 4, !tbaa !24
  br label %316

316:                                              ; preds = %364, %315
  %317 = load i32, ptr %46, align 4, !tbaa !24
  %318 = load i32, ptr %39, align 4, !tbaa !24
  %319 = icmp slt i32 %317, %318
  br i1 %319, label %321, label %320

320:                                              ; preds = %316
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #9
  br label %367

321:                                              ; preds = %316
  %322 = load ptr, ptr %42, align 8, !tbaa !5
  %323 = load i32, ptr %46, align 4, !tbaa !24
  %324 = sext i32 %323 to i64
  %325 = getelementptr inbounds double, ptr %322, i64 %324
  %326 = load double, ptr %325, align 8, !tbaa !11
  %327 = call double @llvm.fabs.f64(double %326)
  %328 = getelementptr inbounds %"class.SimTKIpopt::GradientScaling", ptr %60, i32 0, i32 2
  %329 = load double, ptr %328, align 8, !tbaa !13
  %330 = fcmp ogt double %327, %329
  br i1 %330, label %331, label %363

331:                                              ; preds = %321
  %332 = load ptr, ptr %43, align 8, !tbaa !5
  %333 = load ptr, ptr %40, align 8, !tbaa !5
  %334 = load i32, ptr %46, align 4, !tbaa !24
  %335 = sext i32 %334 to i64
  %336 = getelementptr inbounds i32, ptr %333, i64 %335
  %337 = load i32, ptr %336, align 4, !tbaa !24
  %338 = sub nsw i32 %337, 1
  %339 = sext i32 %338 to i64
  %340 = getelementptr inbounds double, ptr %332, i64 %339
  %341 = load double, ptr %340, align 8, !tbaa !11
  %342 = load ptr, ptr %42, align 8, !tbaa !5
  %343 = load i32, ptr %46, align 4, !tbaa !24
  %344 = sext i32 %343 to i64
  %345 = getelementptr inbounds double, ptr %342, i64 %344
  %346 = load double, ptr %345, align 8, !tbaa !11
  %347 = call double @llvm.fabs.f64(double %346)
  %348 = invoke noundef double @_ZN10SimTKIpopt3MaxEdd(double noundef %341, double noundef %347)
          to label %349 unwind label %359

349:                                              ; preds = %331
  %350 = load ptr, ptr %43, align 8, !tbaa !5
  %351 = load ptr, ptr %40, align 8, !tbaa !5
  %352 = load i32, ptr %46, align 4, !tbaa !24
  %353 = sext i32 %352 to i64
  %354 = getelementptr inbounds i32, ptr %351, i64 %353
  %355 = load i32, ptr %354, align 4, !tbaa !24
  %356 = sub nsw i32 %355, 1
  %357 = sext i32 %356 to i64
  %358 = getelementptr inbounds double, ptr %350, i64 %357
  store double %348, ptr %358, align 8, !tbaa !11
  store i8 1, ptr %45, align 1, !tbaa !27
  br label %363

359:                                              ; preds = %331
  %360 = landingpad { ptr, i32 }
          cleanup
  %361 = extractvalue { ptr, i32 } %360, 0
  store ptr %361, ptr %24, align 8
  %362 = extractvalue { ptr, i32 } %360, 1
  store i32 %362, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #9
  br label %472

363:                                              ; preds = %349, %321
  br label %364

364:                                              ; preds = %363
  %365 = load i32, ptr %46, align 4, !tbaa !24
  %366 = add nsw i32 %365, 1
  store i32 %366, ptr %46, align 4, !tbaa !24
  br label %316, !llvm.loop !29

367:                                              ; preds = %320
  %368 = load i8, ptr %45, align 1, !tbaa !27, !range !30, !noundef !31
  %369 = trunc i8 %368 to i1
  br i1 %369, label %370, label %448

370:                                              ; preds = %367
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #9
  store i32 0, ptr %47, align 4, !tbaa !24
  br label %371

371:                                              ; preds = %407, %370
  %372 = load i32, ptr %47, align 4, !tbaa !24
  %373 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %38)
          to label %374 unwind label %379

374:                                              ; preds = %371
  %375 = invoke noundef i32 @_ZNK10SimTKIpopt6Matrix5NRowsEv(ptr noundef nonnull align 8 dereferenceable(69) %373)
          to label %376 unwind label %379

376:                                              ; preds = %374
  %377 = icmp slt i32 %372, %375
  br i1 %377, label %383, label %378

378:                                              ; preds = %376
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #9
  br label %410

379:                                              ; preds = %374, %371
  %380 = landingpad { ptr, i32 }
          cleanup
  %381 = extractvalue { ptr, i32 } %380, 0
  store ptr %381, ptr %24, align 8
  %382 = extractvalue { ptr, i32 } %380, 1
  store i32 %382, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #9
  br label %472

383:                                              ; preds = %376
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #9
  store double 1.000000e+00, ptr %48, align 8, !tbaa !11
  %384 = load ptr, ptr %43, align 8, !tbaa !5
  %385 = load i32, ptr %47, align 4, !tbaa !24
  %386 = sext i32 %385 to i64
  %387 = getelementptr inbounds double, ptr %384, i64 %386
  %388 = load double, ptr %387, align 8, !tbaa !11
  %389 = getelementptr inbounds %"class.SimTKIpopt::GradientScaling", ptr %60, i32 0, i32 2
  %390 = load double, ptr %389, align 8, !tbaa !13
  %391 = fcmp ogt double %388, %390
  br i1 %391, label %392, label %401

392:                                              ; preds = %383
  %393 = getelementptr inbounds %"class.SimTKIpopt::GradientScaling", ptr %60, i32 0, i32 2
  %394 = load double, ptr %393, align 8, !tbaa !13
  %395 = load ptr, ptr %43, align 8, !tbaa !5
  %396 = load i32, ptr %47, align 4, !tbaa !24
  %397 = sext i32 %396 to i64
  %398 = getelementptr inbounds double, ptr %395, i64 %397
  %399 = load double, ptr %398, align 8, !tbaa !11
  %400 = fdiv double %394, %399
  store double %400, ptr %48, align 8, !tbaa !11
  br label %401

401:                                              ; preds = %392, %383
  %402 = load double, ptr %48, align 8, !tbaa !11
  %403 = load ptr, ptr %43, align 8, !tbaa !5
  %404 = load i32, ptr %47, align 4, !tbaa !24
  %405 = sext i32 %404 to i64
  %406 = getelementptr inbounds double, ptr %403, i64 %405
  store double %402, ptr %406, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #9
  br label %407

407:                                              ; preds = %401
  %408 = load i32, ptr %47, align 4, !tbaa !24
  %409 = add nsw i32 %408, 1
  store i32 %409, ptr %47, align 4, !tbaa !24
  br label %371, !llvm.loop !32

410:                                              ; preds = %378
  %411 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %412 unwind label %443

412:                                              ; preds = %410
  %413 = load ptr, ptr %411, align 8, !tbaa !9
  %414 = getelementptr inbounds ptr, ptr %413, i64 2
  %415 = load ptr, ptr %414, align 8
  %416 = invoke noundef ptr %415(ptr noundef nonnull align 8 dereferenceable(16) %411)
          to label %417 unwind label %443

417:                                              ; preds = %412
  %418 = load ptr, ptr %21, align 8, !tbaa !5
  %419 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEaSEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %418, ptr noundef %416)
          to label %420 unwind label %443

420:                                              ; preds = %417
  %421 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %38)
          to label %422 unwind label %443

422:                                              ; preds = %420
  %423 = invoke noundef i32 @_ZNK10SimTKIpopt6Matrix5NRowsEv(ptr noundef nonnull align 8 dereferenceable(69) %421)
          to label %424 unwind label %443

424:                                              ; preds = %422
  %425 = load ptr, ptr %43, align 8, !tbaa !5
  %426 = load ptr, ptr %21, align 8, !tbaa !5
  %427 = invoke noundef nonnull align 8 dereferenceable(205) ptr @_ZNK10SimTKIpopt8SmartPtrINS_6VectorEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %426)
          to label %428 unwind label %443

428:                                              ; preds = %424
  invoke void @_ZN10SimTKIpopt13TripletHelper17PutValuesInVectorEiPKdRNS_6VectorE(i32 noundef %423, ptr noundef %425, ptr noundef nonnull align 8 dereferenceable(205) %427)
          to label %429 unwind label %443

429:                                              ; preds = %428
  %430 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZNK10SimTKIpopt16NLPScalingObject5JnlstEv(ptr noundef nonnull align 8 dereferenceable(24) %60)
          to label %431 unwind label %443

431:                                              ; preds = %429
  %432 = invoke noundef zeroext i1 @_ZNK10SimTKIpopt10Journalist13ProduceOutputENS_13EJournalLevelENS_16EJournalCategoryE(ptr noundef nonnull align 8 dereferenceable(40) %430, i32 noundef 5, i32 noundef 3)
          to label %433 unwind label %443

433:                                              ; preds = %431
  br i1 %432, label %434, label %447

434:                                              ; preds = %433
  %435 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZNK10SimTKIpopt16NLPScalingObject5JnlstEv(ptr noundef nonnull align 8 dereferenceable(24) %60)
          to label %436 unwind label %443

436:                                              ; preds = %434
  %437 = load ptr, ptr %21, align 8, !tbaa !5
  %438 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_6VectorEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %437)
          to label %439 unwind label %443

439:                                              ; preds = %436
  %440 = invoke noundef double @_ZNK10SimTKIpopt6Vector3MinEv(ptr noundef nonnull align 8 dereferenceable(205) %438)
          to label %441 unwind label %443

441:                                              ; preds = %439
  invoke void (ptr, i32, i32, ptr, ...) @_ZNK10SimTKIpopt10Journalist6PrintfENS_13EJournalLevelENS_16EJournalCategoryEPKcz(ptr noundef nonnull align 8 dereferenceable(40) %435, i32 noundef 5, i32 noundef 3, ptr noundef @.str.7, double noundef %440)
          to label %442 unwind label %443

442:                                              ; preds = %441
  br label %447

443:                                              ; preds = %451, %450, %448, %441, %439, %436, %434, %431, %429, %428, %424, %422, %420, %417, %412, %410
  %444 = landingpad { ptr, i32 }
          cleanup
  %445 = extractvalue { ptr, i32 } %444, 0
  store ptr %445, ptr %24, align 8
  %446 = extractvalue { ptr, i32 } %444, 1
  store i32 %446, ptr %25, align 4
  br label %472

447:                                              ; preds = %442, %433
  br label %455

448:                                              ; preds = %367
  %449 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZNK10SimTKIpopt16NLPScalingObject5JnlstEv(ptr noundef nonnull align 8 dereferenceable(24) %60)
          to label %450 unwind label %443

450:                                              ; preds = %448
  invoke void (ptr, i32, i32, ptr, ...) @_ZNK10SimTKIpopt10Journalist6PrintfENS_13EJournalLevelENS_16EJournalCategoryEPKcz(ptr noundef nonnull align 8 dereferenceable(40) %449, i32 noundef 5, i32 noundef 3, ptr noundef @.str.8)
          to label %451 unwind label %443

451:                                              ; preds = %450
  %452 = load ptr, ptr %21, align 8, !tbaa !5
  %453 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEaSEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %452, ptr noundef null)
          to label %454 unwind label %443

454:                                              ; preds = %451
  br label %455

455:                                              ; preds = %454, %447
  %456 = load ptr, ptr %40, align 8, !tbaa !5
  %457 = icmp eq ptr %456, null
  br i1 %457, label %459, label %458

458:                                              ; preds = %455
  call void @_ZdaPv(ptr noundef %456) #12
  br label %459

459:                                              ; preds = %458, %455
  store ptr null, ptr %40, align 8, !tbaa !5
  %460 = load ptr, ptr %41, align 8, !tbaa !5
  %461 = icmp eq ptr %460, null
  br i1 %461, label %463, label %462

462:                                              ; preds = %459
  call void @_ZdaPv(ptr noundef %460) #12
  br label %463

463:                                              ; preds = %462, %459
  store ptr null, ptr %41, align 8, !tbaa !5
  %464 = load ptr, ptr %42, align 8, !tbaa !5
  %465 = icmp eq ptr %464, null
  br i1 %465, label %467, label %466

466:                                              ; preds = %463
  call void @_ZdaPv(ptr noundef %464) #12
  br label %467

467:                                              ; preds = %466, %463
  store ptr null, ptr %42, align 8, !tbaa !5
  %468 = load ptr, ptr %43, align 8, !tbaa !5
  %469 = icmp eq ptr %468, null
  br i1 %469, label %471, label %470

470:                                              ; preds = %467
  call void @_ZdaPv(ptr noundef %468) #12
  br label %471

471:                                              ; preds = %470, %467
  store ptr null, ptr %43, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 1, ptr %45) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #9
  br label %485

472:                                              ; preds = %443, %379, %359
  call void @llvm.lifetime.end.p0(i64 1, ptr %45) #9
  br label %473

473:                                              ; preds = %472, %303, %299
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #9
  br label %474

474:                                              ; preds = %473, %295
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #9
  br label %475

475:                                              ; preds = %474, %291
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #9
  br label %476

476:                                              ; preds = %475, %287
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #9
  br label %477

477:                                              ; preds = %476, %283
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #9
  br label %778

478:                                              ; preds = %215
  %479 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZNK10SimTKIpopt16NLPScalingObject5JnlstEv(ptr noundef nonnull align 8 dereferenceable(24) %60)
          to label %480 unwind label %279

480:                                              ; preds = %478
  invoke void (ptr, i32, i32, ptr, ...) @_ZNK10SimTKIpopt10Journalist6PrintfENS_13EJournalLevelENS_16EJournalCategoryEPKcz(ptr noundef nonnull align 8 dereferenceable(40) %479, i32 noundef 2, i32 noundef 3, ptr noundef @.str.9)
          to label %481 unwind label %279

481:                                              ; preds = %480
  %482 = load ptr, ptr %21, align 8, !tbaa !5
  %483 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEaSEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %482, ptr noundef null)
          to label %484 unwind label %279

484:                                              ; preds = %481
  br label %485

485:                                              ; preds = %484, %471
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #9
  %486 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_11MatrixSpaceEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %487 unwind label %565

487:                                              ; preds = %485
  %488 = load ptr, ptr %486, align 8, !tbaa !9
  %489 = getelementptr inbounds ptr, ptr %488, i64 2
  %490 = load ptr, ptr %489, align 8
  %491 = invoke noundef ptr %490(ptr noundef nonnull align 8 dereferenceable(20) %486)
          to label %492 unwind label %565

492:                                              ; preds = %487
  invoke void @_ZN10SimTKIpopt8SmartPtrINS_6MatrixEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef %491)
          to label %493 unwind label %565

493:                                              ; preds = %492
  %494 = getelementptr inbounds %"class.SimTKIpopt::GradientScaling", ptr %60, i32 0, i32 1
  %495 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_3NLPEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %494)
          to label %496 unwind label %569

496:                                              ; preds = %493
  %497 = invoke noundef nonnull align 8 dereferenceable(205) ptr @_ZNK10SimTKIpopt8SmartPtrINS_6VectorEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %23)
          to label %498 unwind label %569

498:                                              ; preds = %496
  %499 = invoke noundef nonnull align 8 dereferenceable(69) ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %49)
          to label %500 unwind label %569

500:                                              ; preds = %498
  %501 = load ptr, ptr %495, align 8, !tbaa !9
  %502 = getelementptr inbounds ptr, ptr %501, i64 12
  %503 = load ptr, ptr %502, align 8
  %504 = invoke noundef zeroext i1 %503(ptr noundef nonnull align 8 dereferenceable(12) %495, ptr noundef nonnull align 8 dereferenceable(205) %497, ptr noundef nonnull align 8 dereferenceable(69) %499)
          to label %505 unwind label %569

505:                                              ; preds = %500
  br i1 %504, label %506, label %768

506:                                              ; preds = %505
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #9
  %507 = invoke noundef nonnull align 8 dereferenceable(69) ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %49)
          to label %508 unwind label %573

508:                                              ; preds = %506
  %509 = invoke noundef i32 @_ZN10SimTKIpopt13TripletHelper16GetNumberEntriesERKNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(69) %507)
          to label %510 unwind label %573

510:                                              ; preds = %508
  store i32 %509, ptr %50, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %51) #9
  %511 = load i32, ptr %50, align 4, !tbaa !24
  %512 = sext i32 %511 to i64
  %513 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %512, i64 4)
  %514 = extractvalue { i64, i1 } %513, 1
  %515 = extractvalue { i64, i1 } %513, 0
  %516 = select i1 %514, i64 -1, i64 %515
  %517 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %516) #11
          to label %518 unwind label %577

518:                                              ; preds = %510
  store ptr %517, ptr %51, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %52) #9
  %519 = load i32, ptr %50, align 4, !tbaa !24
  %520 = sext i32 %519 to i64
  %521 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %520, i64 4)
  %522 = extractvalue { i64, i1 } %521, 1
  %523 = extractvalue { i64, i1 } %521, 0
  %524 = select i1 %522, i64 -1, i64 %523
  %525 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %524) #11
          to label %526 unwind label %581

526:                                              ; preds = %518
  store ptr %525, ptr %52, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #9
  %527 = load i32, ptr %50, align 4, !tbaa !24
  %528 = sext i32 %527 to i64
  %529 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %528, i64 8)
  %530 = extractvalue { i64, i1 } %529, 1
  %531 = extractvalue { i64, i1 } %529, 0
  %532 = select i1 %530, i64 -1, i64 %531
  %533 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %532) #11
          to label %534 unwind label %585

534:                                              ; preds = %526
  store ptr %533, ptr %53, align 8, !tbaa !5
  %535 = load i32, ptr %50, align 4, !tbaa !24
  %536 = invoke noundef nonnull align 8 dereferenceable(69) ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %49)
          to label %537 unwind label %585

537:                                              ; preds = %534
  %538 = load ptr, ptr %51, align 8, !tbaa !5
  %539 = load ptr, ptr %52, align 8, !tbaa !5
  invoke void @_ZN10SimTKIpopt13TripletHelper10FillRowColEiRKNS_6MatrixEPiS4_ii(i32 noundef %535, ptr noundef nonnull align 8 dereferenceable(69) %536, ptr noundef %538, ptr noundef %539, i32 noundef 0, i32 noundef 0)
          to label %540 unwind label %585

540:                                              ; preds = %537
  %541 = load i32, ptr %50, align 4, !tbaa !24
  %542 = invoke noundef nonnull align 8 dereferenceable(69) ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %49)
          to label %543 unwind label %585

543:                                              ; preds = %540
  %544 = load ptr, ptr %53, align 8, !tbaa !5
  invoke void @_ZN10SimTKIpopt13TripletHelper10FillValuesEiRKNS_6MatrixEPd(i32 noundef %541, ptr noundef nonnull align 8 dereferenceable(69) %542, ptr noundef %544)
          to label %545 unwind label %585

545:                                              ; preds = %543
  call void @llvm.lifetime.start.p0(i64 8, ptr %54) #9
  %546 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %49)
          to label %547 unwind label %589

547:                                              ; preds = %545
  %548 = invoke noundef i32 @_ZNK10SimTKIpopt6Matrix5NRowsEv(ptr noundef nonnull align 8 dereferenceable(69) %546)
          to label %549 unwind label %589

549:                                              ; preds = %547
  %550 = sext i32 %548 to i64
  %551 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %550, i64 8)
  %552 = extractvalue { i64, i1 } %551, 1
  %553 = extractvalue { i64, i1 } %551, 0
  %554 = select i1 %552, i64 -1, i64 %553
  %555 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %554) #11
          to label %556 unwind label %589

556:                                              ; preds = %549
  store ptr %555, ptr %54, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %55) #9
  store i32 0, ptr %55, align 4, !tbaa !24
  br label %557

557:                                              ; preds = %602, %556
  %558 = load i32, ptr %55, align 4, !tbaa !24
  %559 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %49)
          to label %560 unwind label %593

560:                                              ; preds = %557
  %561 = invoke noundef i32 @_ZNK10SimTKIpopt6Matrix5NRowsEv(ptr noundef nonnull align 8 dereferenceable(69) %559)
          to label %562 unwind label %593

562:                                              ; preds = %560
  %563 = icmp slt i32 %558, %561
  br i1 %563, label %597, label %564

564:                                              ; preds = %562
  call void @llvm.lifetime.end.p0(i64 4, ptr %55) #9
  br label %605

565:                                              ; preds = %492, %487, %485
  %566 = landingpad { ptr, i32 }
          cleanup
  %567 = extractvalue { ptr, i32 } %566, 0
  store ptr %567, ptr %24, align 8
  %568 = extractvalue { ptr, i32 } %566, 1
  store i32 %568, ptr %25, align 4
  br label %777

569:                                              ; preds = %771, %770, %768, %500, %498, %496, %493
  %570 = landingpad { ptr, i32 }
          cleanup
  %571 = extractvalue { ptr, i32 } %570, 0
  store ptr %571, ptr %24, align 8
  %572 = extractvalue { ptr, i32 } %570, 1
  store i32 %572, ptr %25, align 4
  br label %776

573:                                              ; preds = %508, %506
  %574 = landingpad { ptr, i32 }
          cleanup
  %575 = extractvalue { ptr, i32 } %574, 0
  store ptr %575, ptr %24, align 8
  %576 = extractvalue { ptr, i32 } %574, 1
  store i32 %576, ptr %25, align 4
  br label %767

577:                                              ; preds = %510
  %578 = landingpad { ptr, i32 }
          cleanup
  %579 = extractvalue { ptr, i32 } %578, 0
  store ptr %579, ptr %24, align 8
  %580 = extractvalue { ptr, i32 } %578, 1
  store i32 %580, ptr %25, align 4
  br label %766

581:                                              ; preds = %518
  %582 = landingpad { ptr, i32 }
          cleanup
  %583 = extractvalue { ptr, i32 } %582, 0
  store ptr %583, ptr %24, align 8
  %584 = extractvalue { ptr, i32 } %582, 1
  store i32 %584, ptr %25, align 4
  br label %765

585:                                              ; preds = %543, %540, %537, %534, %526
  %586 = landingpad { ptr, i32 }
          cleanup
  %587 = extractvalue { ptr, i32 } %586, 0
  store ptr %587, ptr %24, align 8
  %588 = extractvalue { ptr, i32 } %586, 1
  store i32 %588, ptr %25, align 4
  br label %764

589:                                              ; preds = %549, %547, %545
  %590 = landingpad { ptr, i32 }
          cleanup
  %591 = extractvalue { ptr, i32 } %590, 0
  store ptr %591, ptr %24, align 8
  %592 = extractvalue { ptr, i32 } %590, 1
  store i32 %592, ptr %25, align 4
  br label %763

593:                                              ; preds = %560, %557
  %594 = landingpad { ptr, i32 }
          cleanup
  %595 = extractvalue { ptr, i32 } %594, 0
  store ptr %595, ptr %24, align 8
  %596 = extractvalue { ptr, i32 } %594, 1
  store i32 %596, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %55) #9
  br label %763

597:                                              ; preds = %562
  %598 = load ptr, ptr %54, align 8, !tbaa !5
  %599 = load i32, ptr %55, align 4, !tbaa !24
  %600 = sext i32 %599 to i64
  %601 = getelementptr inbounds double, ptr %598, i64 %600
  store double 0.000000e+00, ptr %601, align 8, !tbaa !11
  br label %602

602:                                              ; preds = %597
  %603 = load i32, ptr %55, align 4, !tbaa !24
  %604 = add nsw i32 %603, 1
  store i32 %604, ptr %55, align 4, !tbaa !24
  br label %557, !llvm.loop !33

605:                                              ; preds = %564
  call void @llvm.lifetime.start.p0(i64 1, ptr %56) #9
  store i8 0, ptr %56, align 1, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr %57) #9
  store i32 0, ptr %57, align 4, !tbaa !24
  br label %606

606:                                              ; preds = %654, %605
  %607 = load i32, ptr %57, align 4, !tbaa !24
  %608 = load i32, ptr %50, align 4, !tbaa !24
  %609 = icmp slt i32 %607, %608
  br i1 %609, label %611, label %610

610:                                              ; preds = %606
  call void @llvm.lifetime.end.p0(i64 4, ptr %57) #9
  br label %657

611:                                              ; preds = %606
  %612 = load ptr, ptr %53, align 8, !tbaa !5
  %613 = load i32, ptr %57, align 4, !tbaa !24
  %614 = sext i32 %613 to i64
  %615 = getelementptr inbounds double, ptr %612, i64 %614
  %616 = load double, ptr %615, align 8, !tbaa !11
  %617 = call double @llvm.fabs.f64(double %616)
  %618 = getelementptr inbounds %"class.SimTKIpopt::GradientScaling", ptr %60, i32 0, i32 2
  %619 = load double, ptr %618, align 8, !tbaa !13
  %620 = fcmp ogt double %617, %619
  br i1 %620, label %621, label %653

621:                                              ; preds = %611
  %622 = load ptr, ptr %54, align 8, !tbaa !5
  %623 = load ptr, ptr %51, align 8, !tbaa !5
  %624 = load i32, ptr %57, align 4, !tbaa !24
  %625 = sext i32 %624 to i64
  %626 = getelementptr inbounds i32, ptr %623, i64 %625
  %627 = load i32, ptr %626, align 4, !tbaa !24
  %628 = sub nsw i32 %627, 1
  %629 = sext i32 %628 to i64
  %630 = getelementptr inbounds double, ptr %622, i64 %629
  %631 = load double, ptr %630, align 8, !tbaa !11
  %632 = load ptr, ptr %53, align 8, !tbaa !5
  %633 = load i32, ptr %57, align 4, !tbaa !24
  %634 = sext i32 %633 to i64
  %635 = getelementptr inbounds double, ptr %632, i64 %634
  %636 = load double, ptr %635, align 8, !tbaa !11
  %637 = call double @llvm.fabs.f64(double %636)
  %638 = invoke noundef double @_ZN10SimTKIpopt3MaxEdd(double noundef %631, double noundef %637)
          to label %639 unwind label %649

639:                                              ; preds = %621
  %640 = load ptr, ptr %54, align 8, !tbaa !5
  %641 = load ptr, ptr %51, align 8, !tbaa !5
  %642 = load i32, ptr %57, align 4, !tbaa !24
  %643 = sext i32 %642 to i64
  %644 = getelementptr inbounds i32, ptr %641, i64 %643
  %645 = load i32, ptr %644, align 4, !tbaa !24
  %646 = sub nsw i32 %645, 1
  %647 = sext i32 %646 to i64
  %648 = getelementptr inbounds double, ptr %640, i64 %647
  store double %638, ptr %648, align 8, !tbaa !11
  store i8 1, ptr %56, align 1, !tbaa !27
  br label %653

649:                                              ; preds = %621
  %650 = landingpad { ptr, i32 }
          cleanup
  %651 = extractvalue { ptr, i32 } %650, 0
  store ptr %651, ptr %24, align 8
  %652 = extractvalue { ptr, i32 } %650, 1
  store i32 %652, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %57) #9
  br label %762

653:                                              ; preds = %639, %611
  br label %654

654:                                              ; preds = %653
  %655 = load i32, ptr %57, align 4, !tbaa !24
  %656 = add nsw i32 %655, 1
  store i32 %656, ptr %57, align 4, !tbaa !24
  br label %606, !llvm.loop !34

657:                                              ; preds = %610
  %658 = load i8, ptr %56, align 1, !tbaa !27, !range !30, !noundef !31
  %659 = trunc i8 %658 to i1
  br i1 %659, label %660, label %738

660:                                              ; preds = %657
  call void @llvm.lifetime.start.p0(i64 4, ptr %58) #9
  store i32 0, ptr %58, align 4, !tbaa !24
  br label %661

661:                                              ; preds = %697, %660
  %662 = load i32, ptr %58, align 4, !tbaa !24
  %663 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %49)
          to label %664 unwind label %669

664:                                              ; preds = %661
  %665 = invoke noundef i32 @_ZNK10SimTKIpopt6Matrix5NRowsEv(ptr noundef nonnull align 8 dereferenceable(69) %663)
          to label %666 unwind label %669

666:                                              ; preds = %664
  %667 = icmp slt i32 %662, %665
  br i1 %667, label %673, label %668

668:                                              ; preds = %666
  call void @llvm.lifetime.end.p0(i64 4, ptr %58) #9
  br label %700

669:                                              ; preds = %664, %661
  %670 = landingpad { ptr, i32 }
          cleanup
  %671 = extractvalue { ptr, i32 } %670, 0
  store ptr %671, ptr %24, align 8
  %672 = extractvalue { ptr, i32 } %670, 1
  store i32 %672, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %58) #9
  br label %762

673:                                              ; preds = %666
  call void @llvm.lifetime.start.p0(i64 8, ptr %59) #9
  store double 1.000000e+00, ptr %59, align 8, !tbaa !11
  %674 = load ptr, ptr %54, align 8, !tbaa !5
  %675 = load i32, ptr %58, align 4, !tbaa !24
  %676 = sext i32 %675 to i64
  %677 = getelementptr inbounds double, ptr %674, i64 %676
  %678 = load double, ptr %677, align 8, !tbaa !11
  %679 = getelementptr inbounds %"class.SimTKIpopt::GradientScaling", ptr %60, i32 0, i32 2
  %680 = load double, ptr %679, align 8, !tbaa !13
  %681 = fcmp ogt double %678, %680
  br i1 %681, label %682, label %691

682:                                              ; preds = %673
  %683 = getelementptr inbounds %"class.SimTKIpopt::GradientScaling", ptr %60, i32 0, i32 2
  %684 = load double, ptr %683, align 8, !tbaa !13
  %685 = load ptr, ptr %54, align 8, !tbaa !5
  %686 = load i32, ptr %58, align 4, !tbaa !24
  %687 = sext i32 %686 to i64
  %688 = getelementptr inbounds double, ptr %685, i64 %687
  %689 = load double, ptr %688, align 8, !tbaa !11
  %690 = fdiv double %684, %689
  store double %690, ptr %59, align 8, !tbaa !11
  br label %691

691:                                              ; preds = %682, %673
  %692 = load double, ptr %59, align 8, !tbaa !11
  %693 = load ptr, ptr %54, align 8, !tbaa !5
  %694 = load i32, ptr %58, align 4, !tbaa !24
  %695 = sext i32 %694 to i64
  %696 = getelementptr inbounds double, ptr %693, i64 %695
  store double %692, ptr %696, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %59) #9
  br label %697

697:                                              ; preds = %691
  %698 = load i32, ptr %58, align 4, !tbaa !24
  %699 = add nsw i32 %698, 1
  store i32 %699, ptr %58, align 4, !tbaa !24
  br label %661, !llvm.loop !35

700:                                              ; preds = %668
  %701 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %702 unwind label %733

702:                                              ; preds = %700
  %703 = load ptr, ptr %701, align 8, !tbaa !9
  %704 = getelementptr inbounds ptr, ptr %703, i64 2
  %705 = load ptr, ptr %704, align 8
  %706 = invoke noundef ptr %705(ptr noundef nonnull align 8 dereferenceable(16) %701)
          to label %707 unwind label %733

707:                                              ; preds = %702
  %708 = load ptr, ptr %22, align 8, !tbaa !5
  %709 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEaSEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %708, ptr noundef %706)
          to label %710 unwind label %733

710:                                              ; preds = %707
  %711 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %49)
          to label %712 unwind label %733

712:                                              ; preds = %710
  %713 = invoke noundef i32 @_ZNK10SimTKIpopt6Matrix5NRowsEv(ptr noundef nonnull align 8 dereferenceable(69) %711)
          to label %714 unwind label %733

714:                                              ; preds = %712
  %715 = load ptr, ptr %54, align 8, !tbaa !5
  %716 = load ptr, ptr %22, align 8, !tbaa !5
  %717 = invoke noundef nonnull align 8 dereferenceable(205) ptr @_ZNK10SimTKIpopt8SmartPtrINS_6VectorEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %716)
          to label %718 unwind label %733

718:                                              ; preds = %714
  invoke void @_ZN10SimTKIpopt13TripletHelper17PutValuesInVectorEiPKdRNS_6VectorE(i32 noundef %713, ptr noundef %715, ptr noundef nonnull align 8 dereferenceable(205) %717)
          to label %719 unwind label %733

719:                                              ; preds = %718
  %720 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZNK10SimTKIpopt16NLPScalingObject5JnlstEv(ptr noundef nonnull align 8 dereferenceable(24) %60)
          to label %721 unwind label %733

721:                                              ; preds = %719
  %722 = invoke noundef zeroext i1 @_ZNK10SimTKIpopt10Journalist13ProduceOutputENS_13EJournalLevelENS_16EJournalCategoryE(ptr noundef nonnull align 8 dereferenceable(40) %720, i32 noundef 5, i32 noundef 3)
          to label %723 unwind label %733

723:                                              ; preds = %721
  br i1 %722, label %724, label %737

724:                                              ; preds = %723
  %725 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZNK10SimTKIpopt16NLPScalingObject5JnlstEv(ptr noundef nonnull align 8 dereferenceable(24) %60)
          to label %726 unwind label %733

726:                                              ; preds = %724
  %727 = load ptr, ptr %22, align 8, !tbaa !5
  %728 = invoke noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_6VectorEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %727)
          to label %729 unwind label %733

729:                                              ; preds = %726
  %730 = invoke noundef double @_ZNK10SimTKIpopt6Vector3MinEv(ptr noundef nonnull align 8 dereferenceable(205) %728)
          to label %731 unwind label %733

731:                                              ; preds = %729
  invoke void (ptr, i32, i32, ptr, ...) @_ZNK10SimTKIpopt10Journalist6PrintfENS_13EJournalLevelENS_16EJournalCategoryEPKcz(ptr noundef nonnull align 8 dereferenceable(40) %725, i32 noundef 5, i32 noundef 3, ptr noundef @.str.10, double noundef %730)
          to label %732 unwind label %733

732:                                              ; preds = %731
  br label %737

733:                                              ; preds = %743, %741, %738, %731, %729, %726, %724, %721, %719, %718, %714, %712, %710, %707, %702, %700
  %734 = landingpad { ptr, i32 }
          cleanup
  %735 = extractvalue { ptr, i32 } %734, 0
  store ptr %735, ptr %24, align 8
  %736 = extractvalue { ptr, i32 } %734, 1
  store i32 %736, ptr %25, align 4
  br label %762

737:                                              ; preds = %732, %723
  br label %745

738:                                              ; preds = %657
  %739 = load ptr, ptr %22, align 8, !tbaa !5
  %740 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEaSEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %739, ptr noundef null)
          to label %741 unwind label %733

741:                                              ; preds = %738
  %742 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZNK10SimTKIpopt16NLPScalingObject5JnlstEv(ptr noundef nonnull align 8 dereferenceable(24) %60)
          to label %743 unwind label %733

743:                                              ; preds = %741
  invoke void (ptr, i32, i32, ptr, ...) @_ZNK10SimTKIpopt10Journalist6PrintfENS_13EJournalLevelENS_16EJournalCategoryEPKcz(ptr noundef nonnull align 8 dereferenceable(40) %742, i32 noundef 5, i32 noundef 3, ptr noundef @.str.11)
          to label %744 unwind label %733

744:                                              ; preds = %743
  br label %745

745:                                              ; preds = %744, %737
  %746 = load ptr, ptr %51, align 8, !tbaa !5
  %747 = icmp eq ptr %746, null
  br i1 %747, label %749, label %748

748:                                              ; preds = %745
  call void @_ZdaPv(ptr noundef %746) #12
  br label %749

749:                                              ; preds = %748, %745
  store ptr null, ptr %51, align 8, !tbaa !5
  %750 = load ptr, ptr %52, align 8, !tbaa !5
  %751 = icmp eq ptr %750, null
  br i1 %751, label %753, label %752

752:                                              ; preds = %749
  call void @_ZdaPv(ptr noundef %750) #12
  br label %753

753:                                              ; preds = %752, %749
  store ptr null, ptr %52, align 8, !tbaa !5
  %754 = load ptr, ptr %53, align 8, !tbaa !5
  %755 = icmp eq ptr %754, null
  br i1 %755, label %757, label %756

756:                                              ; preds = %753
  call void @_ZdaPv(ptr noundef %754) #12
  br label %757

757:                                              ; preds = %756, %753
  store ptr null, ptr %53, align 8, !tbaa !5
  %758 = load ptr, ptr %54, align 8, !tbaa !5
  %759 = icmp eq ptr %758, null
  br i1 %759, label %761, label %760

760:                                              ; preds = %757
  call void @_ZdaPv(ptr noundef %758) #12
  br label %761

761:                                              ; preds = %760, %757
  store ptr null, ptr %54, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 1, ptr %56) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #9
  br label %775

762:                                              ; preds = %733, %669, %649
  call void @llvm.lifetime.end.p0(i64 1, ptr %56) #9
  br label %763

763:                                              ; preds = %762, %593, %589
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #9
  br label %764

764:                                              ; preds = %763, %585
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #9
  br label %765

765:                                              ; preds = %764, %581
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #9
  br label %766

766:                                              ; preds = %765, %577
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #9
  br label %767

767:                                              ; preds = %766, %573
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #9
  br label %776

768:                                              ; preds = %505
  %769 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZNK10SimTKIpopt16NLPScalingObject5JnlstEv(ptr noundef nonnull align 8 dereferenceable(24) %60)
          to label %770 unwind label %569

770:                                              ; preds = %768
  invoke void (ptr, i32, i32, ptr, ...) @_ZNK10SimTKIpopt10Journalist6PrintfENS_13EJournalLevelENS_16EJournalCategoryEPKcz(ptr noundef nonnull align 8 dereferenceable(40) %769, i32 noundef 2, i32 noundef 3, ptr noundef @.str.12)
          to label %771 unwind label %569

771:                                              ; preds = %770
  %772 = load ptr, ptr %22, align 8, !tbaa !5
  %773 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEaSEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %772, ptr noundef null)
          to label %774 unwind label %569

774:                                              ; preds = %771
  br label %775

775:                                              ; preds = %774, %761
  call void @_ZN10SimTKIpopt8SmartPtrINS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %49) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #9
  call void @_ZN10SimTKIpopt8SmartPtrINS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %38) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #9
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %36) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #9
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %23) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #9
  ret void

776:                                              ; preds = %767, %569
  call void @_ZN10SimTKIpopt8SmartPtrINS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %49) #9
  br label %777

777:                                              ; preds = %776, %565
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #9
  br label %778

778:                                              ; preds = %777, %477, %279
  call void @_ZN10SimTKIpopt8SmartPtrINS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %38) #9
  br label %779

779:                                              ; preds = %778, %275
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #9
  br label %780

780:                                              ; preds = %779, %177, %173
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %36) #9
  br label %781

781:                                              ; preds = %780, %169
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #9
  br label %782

782:                                              ; preds = %781, %131, %114, %87
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %23) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #9
  br label %783

783:                                              ; preds = %782
  %784 = load ptr, ptr %24, align 8
  %785 = load i32, ptr %25, align 4
  %786 = insertvalue { ptr, i32 } poison, ptr %784, 0
  %787 = insertvalue { ptr, i32 } %786, i32 %785, 1
  resume { ptr, i32 } %787

788:                                              ; preds = %86
  unreachable
}

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

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

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

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

declare ptr @__cxa_allocate_exception(i64)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10SimTKIpopt21FAILED_INITIALIZATIONC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_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

declare void @__cxa_throw(ptr, ptr, ptr)

declare void @__cxa_free_exception(ptr)

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

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

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

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

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

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

; Function Attrs: mustprogress 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

declare noundef i32 @_ZN10SimTKIpopt13TripletHelper16GetNumberEntriesERKNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(69)) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #5

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

declare void @_ZN10SimTKIpopt13TripletHelper10FillRowColEiRKNS_6MatrixEPiS4_ii(i32 noundef, ptr noundef nonnull align 8 dereferenceable(69), ptr noundef, ptr noundef, i32 noundef, i32 noundef) #4

declare void @_ZN10SimTKIpopt13TripletHelper10FillValuesEiRKNS_6MatrixEPd(i32 noundef, ptr noundef nonnull align 8 dereferenceable(69), ptr noundef) #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK10SimTKIpopt6Matrix5NRowsEv(ptr noundef nonnull align 8 dereferenceable(69)) #3 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZN10SimTKIpopt3MaxEdd(double noundef, double noundef) #7

declare void @_ZN10SimTKIpopt13TripletHelper17PutValuesInVectorEiPKdRNS_6VectorE(i32 noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(205)) #4

declare noundef zeroext i1 @_ZNK10SimTKIpopt10Journalist13ProduceOutputENS_13EJournalLevelENS_16EJournalCategoryE(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, i32 noundef) #4

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #8

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

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

!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, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !12, i64 80}
!14 = !{!"_ZTSN10SimTKIpopt15GradientScalingE", !15, i64 0, !23, i64 72, !12, i64 80}
!15 = !{!"_ZTSN10SimTKIpopt19StandardScalingBaseE", !16, i64 0, !12, i64 24, !20, i64 32, !21, i64 40, !21, i64 48, !22, i64 56, !12, i64 64}
!16 = !{!"_ZTSN10SimTKIpopt16NLPScalingObjectE", !17, i64 0, !19, i64 16}
!17 = !{!"_ZTSN10SimTKIpopt16ReferencedObjectE", !18, i64 8}
!18 = !{!"int", !7, i64 0}
!19 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_10JournalistEEE", !6, i64 0}
!20 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_6VectorEEE", !6, i64 0}
!21 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_17ScaledMatrixSpaceEEE", !6, i64 0}
!22 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_20SymScaledMatrixSpaceEEE", !6, i64 0}
!23 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_3NLPEEE", !6, i64 0}
!24 = !{!18, !18, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!28, !28, i64 0}
!28 = !{!"bool", !7, i64 0}
!29 = distinct !{!29, !26}
!30 = !{i8 0, i8 2}
!31 = !{}
!32 = distinct !{!32, !26}
!33 = distinct !{!33, !26}
!34 = distinct !{!34, !26}
!35 = distinct !{!35, !26}


; 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.20" = 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.7" = type { i8 }
%"class.SimTKIpopt::SmartPtr.30" = type { ptr }

@.str.3 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [102 x i8], align 1
@_ZTIN10SimTKIpopt21FAILED_INITIALIZATIONE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.5 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [123 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [140 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [144 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 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 void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10SimTKIpopt15GradientScaling30DetermineScalingParametersImplENS_8SmartPtrIKNS_11VectorSpaceEEES4_S4_NS1_IKNS_11MatrixSpaceEEES7_NS1_IKNS_14SymMatrixSpaceEEERdRNS1_INS_6VectorEEESE_SE_(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr nocapture noundef readnone %6, ptr nocapture noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %12 = alloca %"class.SimTKIpopt::SmartPtr.20", align 8
  %13 = alloca %"class.SimTKIpopt::SmartPtr.20", align 8
  %14 = alloca %"class.SimTKIpopt::SmartPtr.20", align 8
  %15 = alloca %"class.SimTKIpopt::SmartPtr.20", align 8
  %16 = alloca %"class.SimTKIpopt::SmartPtr.20", align 8
  %17 = alloca %"class.SimTKIpopt::SmartPtr.20", align 8
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.std::allocator.7", align 1
  %20 = alloca %"class.std::__cxx11::basic_string", align 8
  %21 = alloca %"class.std::allocator.7", align 1
  %22 = alloca %"class.SimTKIpopt::SmartPtr.20", align 8
  %23 = alloca %"class.SimTKIpopt::SmartPtr.30", align 8
  %24 = alloca %"class.SimTKIpopt::SmartPtr.30", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #9
  %25 = tail call noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
  %26 = load ptr, ptr %25, align 8, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %26, i64 16
  %28 = load ptr, ptr %27, align 8
  %29 = tail call noundef ptr %28(ptr noundef nonnull align 8 dereferenceable(16) %25)
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef %29)
  %30 = getelementptr inbounds i8, ptr %0, i64 72
  %31 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_3NLPEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %30)
  %32 = call noundef ptr @_ZN10SimTKIpopt9GetRawPtrINS_6VectorEEEPT_RKNS_8SmartPtrIS2_EE(ptr noundef nonnull align 8 dereferenceable(8) %12)
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef %32)
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef null)
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef null)
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef null)
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef null)
  %33 = load ptr, ptr %31, align 8, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %33, i64 40
  %35 = load ptr, ptr %34, align 8
  %36 = invoke noundef zeroext i1 %35(ptr noundef nonnull align 8 dereferenceable(12) %31, ptr noundef nonnull %13, i1 noundef zeroext true, ptr noundef nonnull %14, i1 noundef zeroext false, ptr noundef nonnull %15, i1 noundef zeroext false, ptr noundef nonnull %16, i1 noundef zeroext false, ptr noundef nonnull %17, i1 noundef zeroext false)
          to label %37 unwind label %43

37:                                               ; preds = %11
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #9
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #9
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #9
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #9
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #9
  br i1 %36, label %52, label %38

38:                                               ; preds = %37
  %39 = call ptr @__cxa_allocate_exception(i64 112) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %19) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %40 unwind label %.thread

40:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %21) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull @.str.4, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %41 unwind label %46

41:                                               ; preds = %40
  invoke void @_ZN10SimTKIpopt21FAILED_INITIALIZATIONC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_i(ptr noundef nonnull align 8 dereferenceable(112) %39, ptr noundef nonnull %18, ptr noundef nonnull %20, i32 noundef 68)
          to label %42 unwind label %48

42:                                               ; preds = %41
  invoke void @__cxa_throw(ptr nonnull %39, ptr nonnull @_ZTIN10SimTKIpopt21FAILED_INITIALIZATIONE, ptr nonnull @_ZN10SimTKIpopt14IpoptExceptionD2Ev) #10
          to label %364 unwind label %48

43:                                               ; preds = %11
  %44 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #9
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #9
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #9
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #9
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #9
  br label %363

.thread:                                          ; preds = %38
  %45 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %19) #9
  br label %51

46:                                               ; preds = %40
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %50

48:                                               ; preds = %42, %41
  %.0133 = phi i1 [ false, %42 ], [ true, %41 ]
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #9
  br label %50

50:                                               ; preds = %46, %48
  %.1134 = phi i1 [ %.0133, %48 ], [ true, %46 ]
  %.pn163 = phi { ptr, i32 } [ %49, %48 ], [ %47, %46 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %21) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %19) #9
  br i1 %.1134, label %51, label %363

51:                                               ; preds = %.thread, %50
  %.pn163.pn169 = phi { ptr, i32 } [ %45, %.thread ], [ %.pn163, %50 ]
  call void @__cxa_free_exception(ptr %39) #9
  br label %363

52:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #9
  %53 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
  %54 = load ptr, ptr %53, align 8, !tbaa !5
  %55 = getelementptr inbounds i8, ptr %54, i64 16
  %56 = load ptr, ptr %55, align 8
  %57 = invoke noundef ptr %56(ptr noundef nonnull align 8 dereferenceable(16) %53)
          to label %58 unwind label %76

58:                                               ; preds = %52
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef %57)
  %59 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_3NLPEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %30)
  %60 = call noundef nonnull align 8 dereferenceable(205) ptr @_ZNK10SimTKIpopt8SmartPtrINS_6VectorEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12)
  %61 = call noundef nonnull align 8 dereferenceable(205) ptr @_ZNK10SimTKIpopt8SmartPtrINS_6VectorEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %22)
  %62 = load ptr, ptr %59, align 8, !tbaa !5
  %63 = getelementptr inbounds i8, ptr %62, i64 64
  %64 = load ptr, ptr %63, align 8
  %65 = invoke noundef zeroext i1 %64(ptr noundef nonnull align 8 dereferenceable(12) %59, ptr noundef nonnull align 8 dereferenceable(205) %60, ptr noundef nonnull align 8 dereferenceable(205) %61)
          to label %66 unwind label %78

66:                                               ; preds = %58
  br i1 %65, label %67, label %86

67:                                               ; preds = %66
  %68 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_6VectorEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %22)
  %69 = invoke noundef double @_ZNK10SimTKIpopt6Vector4AmaxEv(ptr noundef nonnull align 8 dereferenceable(205) %68)
          to label %70 unwind label %80

70:                                               ; preds = %67
  store double 1.000000e+00, ptr %7, align 8, !tbaa !8
  %71 = getelementptr inbounds i8, ptr %0, i64 80
  %72 = load double, ptr %71, align 8, !tbaa !11
  %73 = fcmp ogt double %69, %72
  br i1 %73, label %74, label %82

74:                                               ; preds = %70
  %75 = fdiv double %72, %69
  store double %75, ptr %7, align 8, !tbaa !8
  br label %82

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

78:                                               ; preds = %90, %88, %86, %58
  %79 = landingpad { ptr, i32 }
          cleanup
  br label %361

80:                                               ; preds = %84, %82, %67
  %81 = landingpad { ptr, i32 }
          cleanup
  br label %361

82:                                               ; preds = %74, %70
  %83 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZNK10SimTKIpopt16NLPScalingObject5JnlstEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
          to label %84 unwind label %80

84:                                               ; preds = %82
  %85 = load double, ptr %7, align 8, !tbaa !8
  invoke void (ptr, i32, i32, ptr, ...) @_ZNK10SimTKIpopt10Journalist6PrintfENS_13EJournalLevelENS_16EJournalCategoryEPKcz(ptr noundef nonnull align 8 dereferenceable(40) %83, i32 noundef 5, i32 noundef 3, ptr noundef nonnull @.str.5, double noundef %85)
          to label %90 unwind label %80

86:                                               ; preds = %66
  %87 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZNK10SimTKIpopt16NLPScalingObject5JnlstEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
          to label %88 unwind label %78

88:                                               ; preds = %86
  invoke void (ptr, i32, i32, ptr, ...) @_ZNK10SimTKIpopt10Journalist6PrintfENS_13EJournalLevelENS_16EJournalCategoryEPKcz(ptr noundef nonnull align 8 dereferenceable(40) %87, i32 noundef 2, i32 noundef 3, ptr noundef nonnull @.str.6)
          to label %89 unwind label %78

89:                                               ; preds = %88
  store double 1.000000e+00, ptr %7, align 8, !tbaa !8
  br label %90

90:                                               ; preds = %84, %89
  %91 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEaSEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef null)
          to label %92 unwind label %78

92:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #9
  %93 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_11MatrixSpaceEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %94 = load ptr, ptr %93, align 8, !tbaa !5
  %95 = getelementptr inbounds i8, ptr %94, i64 16
  %96 = load ptr, ptr %95, align 8
  %97 = invoke noundef ptr %96(ptr noundef nonnull align 8 dereferenceable(20) %93)
          to label %98 unwind label %144

98:                                               ; preds = %92
  invoke void @_ZN10SimTKIpopt8SmartPtrINS_6MatrixEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef %97)
          to label %99 unwind label %144

99:                                               ; preds = %98
  %100 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_3NLPEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %30)
  %101 = call noundef nonnull align 8 dereferenceable(205) ptr @_ZNK10SimTKIpopt8SmartPtrINS_6VectorEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12)
  %102 = call noundef nonnull align 8 dereferenceable(69) ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %23)
  %103 = load ptr, ptr %100, align 8, !tbaa !5
  %104 = getelementptr inbounds i8, ptr %103, i64 80
  %105 = load ptr, ptr %104, align 8
  %106 = invoke noundef zeroext i1 %105(ptr noundef nonnull align 8 dereferenceable(12) %100, ptr noundef nonnull align 8 dereferenceable(205) %101, ptr noundef nonnull align 8 dereferenceable(69) %102)
          to label %107 unwind label %146

107:                                              ; preds = %99
  br i1 %106, label %108, label %219

108:                                              ; preds = %107
  %109 = call noundef nonnull align 8 dereferenceable(69) ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %23)
  %110 = invoke noundef i32 @_ZN10SimTKIpopt13TripletHelper16GetNumberEntriesERKNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(69) %109)
          to label %111 unwind label %148

111:                                              ; preds = %108
  %112 = sext i32 %110 to i64
  %113 = icmp slt i32 %110, 0
  %114 = shl nsw i64 %112, 2
  %115 = select i1 %113, i64 -1, i64 %114
  %116 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %115) #11
          to label %117 unwind label %150

117:                                              ; preds = %111
  %118 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %115) #11
          to label %119 unwind label %152

119:                                              ; preds = %117
  %120 = shl nsw i64 %112, 3
  %121 = select i1 %113, i64 -1, i64 %120
  %122 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %121) #11
          to label %123 unwind label %154

123:                                              ; preds = %119
  %124 = call noundef nonnull align 8 dereferenceable(69) ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %23)
  invoke void @_ZN10SimTKIpopt13TripletHelper10FillRowColEiRKNS_6MatrixEPiS4_ii(i32 noundef %110, ptr noundef nonnull align 8 dereferenceable(69) %124, ptr noundef nonnull %116, ptr noundef nonnull %118, i32 noundef 0, i32 noundef 0)
          to label %125 unwind label %154

125:                                              ; preds = %123
  %126 = call noundef nonnull align 8 dereferenceable(69) ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %23)
  invoke void @_ZN10SimTKIpopt13TripletHelper10FillValuesEiRKNS_6MatrixEPd(i32 noundef %110, ptr noundef nonnull align 8 dereferenceable(69) %126, ptr noundef nonnull %122)
          to label %127 unwind label %154

127:                                              ; preds = %125
  %128 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %23)
  %129 = invoke noundef i32 @_ZNK10SimTKIpopt6Matrix5NRowsEv(ptr noundef nonnull align 8 dereferenceable(69) %128)
          to label %130 unwind label %156

130:                                              ; preds = %127
  %131 = zext nneg i32 %129 to i64
  %132 = icmp slt i32 %129, 0
  %133 = shl nuw nsw i64 %131, 3
  %134 = select i1 %132, i64 -1, i64 %133
  %135 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %134) #11
          to label %.preheader174 unwind label %156

.preheader174:                                    ; preds = %130, %160
  %indvars.iv = phi i64 [ %indvars.iv.next, %160 ], [ 0, %130 ]
  %136 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %23)
  %137 = invoke noundef i32 @_ZNK10SimTKIpopt6Matrix5NRowsEv(ptr noundef nonnull align 8 dereferenceable(69) %136)
          to label %138 unwind label %158

138:                                              ; preds = %.preheader174
  %139 = sext i32 %137 to i64
  %140 = icmp slt i64 %indvars.iv, %139
  br i1 %140, label %160, label %.preheader173

.preheader173:                                    ; preds = %138
  %invariant.gep = getelementptr i8, ptr %135, i64 -8
  %141 = icmp sgt i32 %110, 0
  br i1 %141, label %.lr.ph, label %.critedge

.lr.ph:                                           ; preds = %.preheader173
  %142 = getelementptr inbounds i8, ptr %0, i64 80
  %wide.trip.count = zext nneg i32 %110 to i64
  br label %.outer217

.outer217:                                        ; preds = %.thread205, %.lr.ph
  %indvars.iv190.ph = phi i64 [ %indvars.iv.next191207, %.thread205 ], [ 0, %.lr.ph ]
  %.0109177.ph = phi i1 [ true, %.thread205 ], [ false, %.lr.ph ]
  %143 = load double, ptr %142, align 8, !tbaa !11
  br label %162

144:                                              ; preds = %98, %92
  %145 = landingpad { ptr, i32 }
          cleanup
  br label %360

146:                                              ; preds = %222, %221, %219, %99
  %147 = landingpad { ptr, i32 }
          cleanup
  br label %359

148:                                              ; preds = %108
  %149 = landingpad { ptr, i32 }
          cleanup
  br label %359

150:                                              ; preds = %111
  %151 = landingpad { ptr, i32 }
          cleanup
  br label %359

152:                                              ; preds = %117
  %153 = landingpad { ptr, i32 }
          cleanup
  br label %359

154:                                              ; preds = %125, %123, %119
  %155 = landingpad { ptr, i32 }
          cleanup
  br label %359

156:                                              ; preds = %130, %127
  %157 = landingpad { ptr, i32 }
          cleanup
  br label %359

158:                                              ; preds = %.preheader174
  %159 = landingpad { ptr, i32 }
          cleanup
  br label %359

160:                                              ; preds = %138
  %161 = getelementptr inbounds double, ptr %135, i64 %indvars.iv
  store double 0.000000e+00, ptr %161, align 8, !tbaa !8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  br label %.preheader174, !llvm.loop !23

._crit_edge:                                      ; preds = %167
  br i1 %.0109177.ph, label %.preheader172.preheader, label %.critedge

162:                                              ; preds = %.outer217, %167
  %indvars.iv190 = phi i64 [ %indvars.iv.next191, %167 ], [ %indvars.iv190.ph, %.outer217 ]
  %163 = getelementptr inbounds double, ptr %122, i64 %indvars.iv190
  %164 = load double, ptr %163, align 8, !tbaa !8
  %165 = call double @llvm.fabs.f64(double %164)
  %166 = fcmp ogt double %165, %143
  br i1 %166, label %.thread205, label %167

167:                                              ; preds = %162
  %indvars.iv.next191 = add nuw nsw i64 %indvars.iv190, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next191, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %162, !llvm.loop !25

.thread205:                                       ; preds = %162
  %168 = getelementptr inbounds i32, ptr %116, i64 %indvars.iv190
  %169 = load i32, ptr %168, align 4, !tbaa !26
  %170 = sext i32 %169 to i64
  %gep = getelementptr double, ptr %invariant.gep, i64 %170
  %171 = load double, ptr %gep, align 8, !tbaa !8
  %172 = call noundef double @_ZN10SimTKIpopt3MaxEdd(double noundef %171, double noundef %165)
  %173 = load i32, ptr %168, align 4, !tbaa !26
  %174 = sext i32 %173 to i64
  %gep176 = getelementptr double, ptr %invariant.gep, i64 %174
  store double %172, ptr %gep176, align 8, !tbaa !8
  %indvars.iv.next191207 = add nuw nsw i64 %indvars.iv190, 1
  %exitcond.not208 = icmp eq i64 %indvars.iv.next191207, %wide.trip.count
  br i1 %exitcond.not208, label %.preheader172.preheader, label %.outer217, !llvm.loop !25

.preheader172.preheader:                          ; preds = %.thread205, %._crit_edge
  br label %.preheader172

.preheader172:                                    ; preds = %.preheader172.preheader, %188
  %indvars.iv192 = phi i64 [ %indvars.iv.next193, %188 ], [ 0, %.preheader172.preheader ]
  %175 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %23)
  %176 = invoke noundef i32 @_ZNK10SimTKIpopt6Matrix5NRowsEv(ptr noundef nonnull align 8 dereferenceable(69) %175)
          to label %177 unwind label %186

177:                                              ; preds = %.preheader172
  %178 = sext i32 %176 to i64
  %179 = icmp slt i64 %indvars.iv192, %178
  br i1 %179, label %188, label %180

180:                                              ; preds = %177
  %181 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
  %182 = load ptr, ptr %181, align 8, !tbaa !5
  %183 = getelementptr inbounds i8, ptr %182, i64 16
  %184 = load ptr, ptr %183, align 8
  %185 = invoke noundef ptr %184(ptr noundef nonnull align 8 dereferenceable(16) %181)
          to label %194 unwind label %212

186:                                              ; preds = %.preheader172
  %187 = landingpad { ptr, i32 }
          cleanup
  br label %359

188:                                              ; preds = %177
  %189 = getelementptr inbounds double, ptr %135, i64 %indvars.iv192
  %190 = load double, ptr %189, align 8, !tbaa !8
  %191 = load double, ptr %142, align 8, !tbaa !11
  %192 = fcmp ogt double %190, %191
  %193 = fdiv double %191, %190
  %.0106 = select i1 %192, double %193, double 1.000000e+00
  store double %.0106, ptr %189, align 8, !tbaa !8
  %indvars.iv.next193 = add nuw nsw i64 %indvars.iv192, 1
  br label %.preheader172, !llvm.loop !27

194:                                              ; preds = %180
  %195 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEaSEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef %185)
          to label %196 unwind label %212

196:                                              ; preds = %194
  %197 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %23)
  %198 = invoke noundef i32 @_ZNK10SimTKIpopt6Matrix5NRowsEv(ptr noundef nonnull align 8 dereferenceable(69) %197)
          to label %199 unwind label %212

199:                                              ; preds = %196
  %200 = call noundef nonnull align 8 dereferenceable(205) ptr @_ZNK10SimTKIpopt8SmartPtrINS_6VectorEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
  invoke void @_ZN10SimTKIpopt13TripletHelper17PutValuesInVectorEiPKdRNS_6VectorE(i32 noundef %198, ptr noundef nonnull %135, ptr noundef nonnull align 8 dereferenceable(205) %200)
          to label %201 unwind label %212

201:                                              ; preds = %199
  %202 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZNK10SimTKIpopt16NLPScalingObject5JnlstEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
          to label %203 unwind label %212

203:                                              ; preds = %201
  %204 = invoke noundef zeroext i1 @_ZNK10SimTKIpopt10Journalist13ProduceOutputENS_13EJournalLevelENS_16EJournalCategoryE(ptr noundef nonnull align 8 dereferenceable(40) %202, i32 noundef 5, i32 noundef 3)
          to label %205 unwind label %212

205:                                              ; preds = %203
  br i1 %204, label %206, label %218

206:                                              ; preds = %205
  %207 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZNK10SimTKIpopt16NLPScalingObject5JnlstEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
          to label %208 unwind label %212

208:                                              ; preds = %206
  %209 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_6VectorEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
  %210 = invoke noundef double @_ZNK10SimTKIpopt6Vector3MinEv(ptr noundef nonnull align 8 dereferenceable(205) %209)
          to label %211 unwind label %212

211:                                              ; preds = %208
  invoke void (ptr, i32, i32, ptr, ...) @_ZNK10SimTKIpopt10Journalist6PrintfENS_13EJournalLevelENS_16EJournalCategoryEPKcz(ptr noundef nonnull align 8 dereferenceable(40) %207, i32 noundef 5, i32 noundef 3, ptr noundef nonnull @.str.7, double noundef %210)
          to label %218 unwind label %212

212:                                              ; preds = %216, %215, %.critedge, %211, %208, %206, %203, %201, %199, %196, %194, %180
  %213 = landingpad { ptr, i32 }
          cleanup
  br label %359

.critedge:                                        ; preds = %.preheader173, %._crit_edge
  %214 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZNK10SimTKIpopt16NLPScalingObject5JnlstEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
          to label %215 unwind label %212

215:                                              ; preds = %.critedge
  invoke void (ptr, i32, i32, ptr, ...) @_ZNK10SimTKIpopt10Journalist6PrintfENS_13EJournalLevelENS_16EJournalCategoryEPKcz(ptr noundef nonnull align 8 dereferenceable(40) %214, i32 noundef 5, i32 noundef 3, ptr noundef nonnull @.str.8)
          to label %216 unwind label %212

216:                                              ; preds = %215
  %217 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEaSEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef null)
          to label %218 unwind label %212

218:                                              ; preds = %211, %205, %216
  call void @_ZdaPv(ptr noundef nonnull %116) #12
  call void @_ZdaPv(ptr noundef nonnull %118) #12
  call void @_ZdaPv(ptr noundef nonnull %122) #12
  call void @_ZdaPv(ptr noundef nonnull %135) #12
  br label %224

219:                                              ; preds = %107
  %220 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZNK10SimTKIpopt16NLPScalingObject5JnlstEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
          to label %221 unwind label %146

221:                                              ; preds = %219
  invoke void (ptr, i32, i32, ptr, ...) @_ZNK10SimTKIpopt10Journalist6PrintfENS_13EJournalLevelENS_16EJournalCategoryEPKcz(ptr noundef nonnull align 8 dereferenceable(40) %220, i32 noundef 2, i32 noundef 3, ptr noundef nonnull @.str.9)
          to label %222 unwind label %146

222:                                              ; preds = %221
  %223 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEaSEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef null)
          to label %224 unwind label %146

224:                                              ; preds = %222, %218
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %24) #9
  %225 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_11MatrixSpaceEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %226 = load ptr, ptr %225, align 8, !tbaa !5
  %227 = getelementptr inbounds i8, ptr %226, i64 16
  %228 = load ptr, ptr %227, align 8
  %229 = invoke noundef ptr %228(ptr noundef nonnull align 8 dereferenceable(20) %225)
          to label %230 unwind label %276

230:                                              ; preds = %224
  invoke void @_ZN10SimTKIpopt8SmartPtrINS_6MatrixEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef %229)
          to label %231 unwind label %276

231:                                              ; preds = %230
  %232 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_3NLPEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %30)
  %233 = call noundef nonnull align 8 dereferenceable(205) ptr @_ZNK10SimTKIpopt8SmartPtrINS_6VectorEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12)
  %234 = call noundef nonnull align 8 dereferenceable(69) ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %24)
  %235 = load ptr, ptr %232, align 8, !tbaa !5
  %236 = getelementptr inbounds i8, ptr %235, i64 96
  %237 = load ptr, ptr %236, align 8
  %238 = invoke noundef zeroext i1 %237(ptr noundef nonnull align 8 dereferenceable(12) %232, ptr noundef nonnull align 8 dereferenceable(205) %233, ptr noundef nonnull align 8 dereferenceable(69) %234)
          to label %239 unwind label %278

239:                                              ; preds = %231
  br i1 %238, label %240, label %351

240:                                              ; preds = %239
  %241 = call noundef nonnull align 8 dereferenceable(69) ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %24)
  %242 = invoke noundef i32 @_ZN10SimTKIpopt13TripletHelper16GetNumberEntriesERKNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(69) %241)
          to label %243 unwind label %280

243:                                              ; preds = %240
  %244 = sext i32 %242 to i64
  %245 = icmp slt i32 %242, 0
  %246 = shl nsw i64 %244, 2
  %247 = select i1 %245, i64 -1, i64 %246
  %248 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %247) #11
          to label %249 unwind label %282

249:                                              ; preds = %243
  %250 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %247) #11
          to label %251 unwind label %284

251:                                              ; preds = %249
  %252 = shl nsw i64 %244, 3
  %253 = select i1 %245, i64 -1, i64 %252
  %254 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %253) #11
          to label %255 unwind label %286

255:                                              ; preds = %251
  %256 = call noundef nonnull align 8 dereferenceable(69) ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %24)
  invoke void @_ZN10SimTKIpopt13TripletHelper10FillRowColEiRKNS_6MatrixEPiS4_ii(i32 noundef %242, ptr noundef nonnull align 8 dereferenceable(69) %256, ptr noundef nonnull %248, ptr noundef nonnull %250, i32 noundef 0, i32 noundef 0)
          to label %257 unwind label %286

257:                                              ; preds = %255
  %258 = call noundef nonnull align 8 dereferenceable(69) ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %24)
  invoke void @_ZN10SimTKIpopt13TripletHelper10FillValuesEiRKNS_6MatrixEPd(i32 noundef %242, ptr noundef nonnull align 8 dereferenceable(69) %258, ptr noundef nonnull %254)
          to label %259 unwind label %286

259:                                              ; preds = %257
  %260 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24)
  %261 = invoke noundef i32 @_ZNK10SimTKIpopt6Matrix5NRowsEv(ptr noundef nonnull align 8 dereferenceable(69) %260)
          to label %262 unwind label %288

262:                                              ; preds = %259
  %263 = zext nneg i32 %261 to i64
  %264 = icmp slt i32 %261, 0
  %265 = shl nuw nsw i64 %263, 3
  %266 = select i1 %264, i64 -1, i64 %265
  %267 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %266) #11
          to label %.preheader171 unwind label %288

.preheader171:                                    ; preds = %262, %292
  %indvars.iv195 = phi i64 [ %indvars.iv.next196, %292 ], [ 0, %262 ]
  %268 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24)
  %269 = invoke noundef i32 @_ZNK10SimTKIpopt6Matrix5NRowsEv(ptr noundef nonnull align 8 dereferenceable(69) %268)
          to label %270 unwind label %290

270:                                              ; preds = %.preheader171
  %271 = sext i32 %269 to i64
  %272 = icmp slt i64 %indvars.iv195, %271
  br i1 %272, label %292, label %.preheader170

.preheader170:                                    ; preds = %270
  %invariant.gep179 = getelementptr i8, ptr %267, i64 -8
  %273 = icmp sgt i32 %242, 0
  br i1 %273, label %.lr.ph185, label %.critedge188

.lr.ph185:                                        ; preds = %.preheader170
  %274 = getelementptr inbounds i8, ptr %0, i64 80
  %wide.trip.count200 = zext nneg i32 %242 to i64
  br label %.outer

.outer:                                           ; preds = %.thread211, %.lr.ph185
  %indvars.iv198.ph = phi i64 [ %indvars.iv.next199213, %.thread211 ], [ 0, %.lr.ph185 ]
  %.0102183.ph = phi i1 [ true, %.thread211 ], [ false, %.lr.ph185 ]
  %275 = load double, ptr %274, align 8, !tbaa !11
  br label %294

276:                                              ; preds = %230, %224
  %277 = landingpad { ptr, i32 }
          cleanup
  br label %358

278:                                              ; preds = %354, %353, %351, %231
  %279 = landingpad { ptr, i32 }
          cleanup
  br label %357

280:                                              ; preds = %240
  %281 = landingpad { ptr, i32 }
          cleanup
  br label %357

282:                                              ; preds = %243
  %283 = landingpad { ptr, i32 }
          cleanup
  br label %357

284:                                              ; preds = %249
  %285 = landingpad { ptr, i32 }
          cleanup
  br label %357

286:                                              ; preds = %257, %255, %251
  %287 = landingpad { ptr, i32 }
          cleanup
  br label %357

288:                                              ; preds = %262, %259
  %289 = landingpad { ptr, i32 }
          cleanup
  br label %357

290:                                              ; preds = %.preheader171
  %291 = landingpad { ptr, i32 }
          cleanup
  br label %357

292:                                              ; preds = %270
  %293 = getelementptr inbounds double, ptr %267, i64 %indvars.iv195
  store double 0.000000e+00, ptr %293, align 8, !tbaa !8
  %indvars.iv.next196 = add nuw nsw i64 %indvars.iv195, 1
  br label %.preheader171, !llvm.loop !28

._crit_edge186:                                   ; preds = %299
  br i1 %.0102183.ph, label %.preheader.preheader, label %.critedge188

294:                                              ; preds = %.outer, %299
  %indvars.iv198 = phi i64 [ %indvars.iv.next199, %299 ], [ %indvars.iv198.ph, %.outer ]
  %295 = getelementptr inbounds double, ptr %254, i64 %indvars.iv198
  %296 = load double, ptr %295, align 8, !tbaa !8
  %297 = call double @llvm.fabs.f64(double %296)
  %298 = fcmp ogt double %297, %275
  br i1 %298, label %.thread211, label %299

299:                                              ; preds = %294
  %indvars.iv.next199 = add nuw nsw i64 %indvars.iv198, 1
  %exitcond201.not = icmp eq i64 %indvars.iv.next199, %wide.trip.count200
  br i1 %exitcond201.not, label %._crit_edge186, label %294, !llvm.loop !29

.thread211:                                       ; preds = %294
  %300 = getelementptr inbounds i32, ptr %248, i64 %indvars.iv198
  %301 = load i32, ptr %300, align 4, !tbaa !26
  %302 = sext i32 %301 to i64
  %gep180 = getelementptr double, ptr %invariant.gep179, i64 %302
  %303 = load double, ptr %gep180, align 8, !tbaa !8
  %304 = call noundef double @_ZN10SimTKIpopt3MaxEdd(double noundef %303, double noundef %297)
  %305 = load i32, ptr %300, align 4, !tbaa !26
  %306 = sext i32 %305 to i64
  %gep182 = getelementptr double, ptr %invariant.gep179, i64 %306
  store double %304, ptr %gep182, align 8, !tbaa !8
  %indvars.iv.next199213 = add nuw nsw i64 %indvars.iv198, 1
  %exitcond201.not214 = icmp eq i64 %indvars.iv.next199213, %wide.trip.count200
  br i1 %exitcond201.not214, label %.preheader.preheader, label %.outer, !llvm.loop !29

.preheader.preheader:                             ; preds = %.thread211, %._crit_edge186
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %320
  %indvars.iv202 = phi i64 [ %indvars.iv.next203, %320 ], [ 0, %.preheader.preheader ]
  %307 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24)
  %308 = invoke noundef i32 @_ZNK10SimTKIpopt6Matrix5NRowsEv(ptr noundef nonnull align 8 dereferenceable(69) %307)
          to label %309 unwind label %318

309:                                              ; preds = %.preheader
  %310 = sext i32 %308 to i64
  %311 = icmp slt i64 %indvars.iv202, %310
  br i1 %311, label %320, label %312

312:                                              ; preds = %309
  %313 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrIKNS_11VectorSpaceEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %314 = load ptr, ptr %313, align 8, !tbaa !5
  %315 = getelementptr inbounds i8, ptr %314, i64 16
  %316 = load ptr, ptr %315, align 8
  %317 = invoke noundef ptr %316(ptr noundef nonnull align 8 dereferenceable(16) %313)
          to label %326 unwind label %344

318:                                              ; preds = %.preheader
  %319 = landingpad { ptr, i32 }
          cleanup
  br label %357

320:                                              ; preds = %309
  %321 = getelementptr inbounds double, ptr %267, i64 %indvars.iv202
  %322 = load double, ptr %321, align 8, !tbaa !8
  %323 = load double, ptr %274, align 8, !tbaa !11
  %324 = fcmp ogt double %322, %323
  %325 = fdiv double %323, %322
  %.0 = select i1 %324, double %325, double 1.000000e+00
  store double %.0, ptr %321, align 8, !tbaa !8
  %indvars.iv.next203 = add nuw nsw i64 %indvars.iv202, 1
  br label %.preheader, !llvm.loop !30

326:                                              ; preds = %312
  %327 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEaSEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef %317)
          to label %328 unwind label %344

328:                                              ; preds = %326
  %329 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_6MatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24)
  %330 = invoke noundef i32 @_ZNK10SimTKIpopt6Matrix5NRowsEv(ptr noundef nonnull align 8 dereferenceable(69) %329)
          to label %331 unwind label %344

331:                                              ; preds = %328
  %332 = call noundef nonnull align 8 dereferenceable(205) ptr @_ZNK10SimTKIpopt8SmartPtrINS_6VectorEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10)
  invoke void @_ZN10SimTKIpopt13TripletHelper17PutValuesInVectorEiPKdRNS_6VectorE(i32 noundef %330, ptr noundef nonnull %267, ptr noundef nonnull align 8 dereferenceable(205) %332)
          to label %333 unwind label %344

333:                                              ; preds = %331
  %334 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZNK10SimTKIpopt16NLPScalingObject5JnlstEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
          to label %335 unwind label %344

335:                                              ; preds = %333
  %336 = invoke noundef zeroext i1 @_ZNK10SimTKIpopt10Journalist13ProduceOutputENS_13EJournalLevelENS_16EJournalCategoryE(ptr noundef nonnull align 8 dereferenceable(40) %334, i32 noundef 5, i32 noundef 3)
          to label %337 unwind label %344

337:                                              ; preds = %335
  br i1 %336, label %338, label %350

338:                                              ; preds = %337
  %339 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZNK10SimTKIpopt16NLPScalingObject5JnlstEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
          to label %340 unwind label %344

340:                                              ; preds = %338
  %341 = call noundef ptr @_ZNK10SimTKIpopt8SmartPtrINS_6VectorEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %10)
  %342 = invoke noundef double @_ZNK10SimTKIpopt6Vector3MinEv(ptr noundef nonnull align 8 dereferenceable(205) %341)
          to label %343 unwind label %344

343:                                              ; preds = %340
  invoke void (ptr, i32, i32, ptr, ...) @_ZNK10SimTKIpopt10Journalist6PrintfENS_13EJournalLevelENS_16EJournalCategoryEPKcz(ptr noundef nonnull align 8 dereferenceable(40) %339, i32 noundef 5, i32 noundef 3, ptr noundef nonnull @.str.10, double noundef %342)
          to label %350 unwind label %344

344:                                              ; preds = %349, %347, %.critedge188, %343, %340, %338, %335, %333, %331, %328, %326, %312
  %345 = landingpad { ptr, i32 }
          cleanup
  br label %357

.critedge188:                                     ; preds = %.preheader170, %._crit_edge186
  %346 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEaSEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef null)
          to label %347 unwind label %344

347:                                              ; preds = %.critedge188
  %348 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZNK10SimTKIpopt16NLPScalingObject5JnlstEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
          to label %349 unwind label %344

349:                                              ; preds = %347
  invoke void (ptr, i32, i32, ptr, ...) @_ZNK10SimTKIpopt10Journalist6PrintfENS_13EJournalLevelENS_16EJournalCategoryEPKcz(ptr noundef nonnull align 8 dereferenceable(40) %348, i32 noundef 5, i32 noundef 3, ptr noundef nonnull @.str.11)
          to label %350 unwind label %344

350:                                              ; preds = %343, %337, %349
  call void @_ZdaPv(ptr noundef nonnull %248) #12
  call void @_ZdaPv(ptr noundef nonnull %250) #12
  call void @_ZdaPv(ptr noundef nonnull %254) #12
  call void @_ZdaPv(ptr noundef nonnull %267) #12
  br label %356

351:                                              ; preds = %239
  %352 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZNK10SimTKIpopt16NLPScalingObject5JnlstEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
          to label %353 unwind label %278

353:                                              ; preds = %351
  invoke void (ptr, i32, i32, ptr, ...) @_ZNK10SimTKIpopt10Journalist6PrintfENS_13EJournalLevelENS_16EJournalCategoryEPKcz(ptr noundef nonnull align 8 dereferenceable(40) %352, i32 noundef 2, i32 noundef 3, ptr noundef nonnull @.str.12)
          to label %354 unwind label %278

354:                                              ; preds = %353
  %355 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN10SimTKIpopt8SmartPtrINS_6VectorEEaSEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef null)
          to label %356 unwind label %278

356:                                              ; preds = %354, %350
  call void @_ZN10SimTKIpopt8SmartPtrINS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %24) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #9
  call void @_ZN10SimTKIpopt8SmartPtrINS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %23) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #9
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %22) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #9
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #9
  ret void

357:                                              ; preds = %280, %284, %288, %290, %344, %318, %286, %282, %278
  %.pn150.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %279, %278 ], [ %281, %280 ], [ %283, %282 ], [ %285, %284 ], [ %287, %286 ], [ %291, %290 ], [ %289, %288 ], [ %345, %344 ], [ %319, %318 ]
  call void @_ZN10SimTKIpopt8SmartPtrINS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %24) #9
  br label %358

358:                                              ; preds = %357, %276
  %.pn150.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn150.pn.pn.pn.pn.pn.pn, %357 ], [ %277, %276 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #9
  br label %359

359:                                              ; preds = %148, %152, %156, %158, %212, %186, %154, %150, %358, %146
  %.pn150.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn150.pn.pn.pn.pn.pn.pn.pn, %358 ], [ %147, %146 ], [ %149, %148 ], [ %151, %150 ], [ %153, %152 ], [ %155, %154 ], [ %159, %158 ], [ %157, %156 ], [ %213, %212 ], [ %187, %186 ]
  call void @_ZN10SimTKIpopt8SmartPtrINS_6MatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %23) #9
  br label %360

360:                                              ; preds = %359, %144
  %.pn150.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn150.pn.pn.pn.pn.pn.pn.pn.pn, %359 ], [ %145, %144 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #9
  br label %361

361:                                              ; preds = %360, %80, %78
  %.pn150.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn150.pn.pn.pn.pn.pn.pn.pn.pn.pn, %360 ], [ %79, %78 ], [ %81, %80 ]
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %22) #9
  br label %362

362:                                              ; preds = %361, %76
  %.pn150.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn150.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %361 ], [ %77, %76 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #9
  br label %363

363:                                              ; preds = %50, %51, %362, %43
  %.pn163.pn.pn = phi { ptr, i32 } [ %.pn163.pn169, %51 ], [ %.pn163, %50 ], [ %.pn150.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %362 ], [ %44, %43 ]
  call void @_ZN10SimTKIpopt8SmartPtrINS_6VectorEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #9
  resume { ptr, i32 } %.pn163.pn.pn

364:                                              ; preds = %42
  unreachable
}

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

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

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10SimTKIpopt21FAILED_INITIALIZATIONC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_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

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

declare void @__cxa_free_exception(ptr) local_unnamed_addr

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

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

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

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

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

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

; Function Attrs: mustprogress 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

declare noundef i32 @_ZN10SimTKIpopt13TripletHelper16GetNumberEntriesERKNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(69)) local_unnamed_addr #4

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

declare void @_ZN10SimTKIpopt13TripletHelper10FillRowColEiRKNS_6MatrixEPiS4_ii(i32 noundef, ptr noundef nonnull align 8 dereferenceable(69), ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #4

declare void @_ZN10SimTKIpopt13TripletHelper10FillValuesEiRKNS_6MatrixEPd(i32 noundef, ptr noundef nonnull align 8 dereferenceable(69), ptr noundef) local_unnamed_addr #4

; 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: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK10SimTKIpopt6Matrix5NRowsEv(ptr noundef nonnull align 8 dereferenceable(69)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZN10SimTKIpopt3MaxEdd(double noundef, double noundef) local_unnamed_addr #7

declare void @_ZN10SimTKIpopt13TripletHelper17PutValuesInVectorEiPKdRNS_6VectorE(i32 noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(205)) local_unnamed_addr #4

declare noundef zeroext i1 @_ZNK10SimTKIpopt10Journalist13ProduceOutputENS_13EJournalLevelENS_16EJournalCategoryE(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, i32 noundef) local_unnamed_addr #4

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #8

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

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

!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, !9, i64 0}
!9 = !{!"double", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !9, i64 80}
!12 = !{!"_ZTSN10SimTKIpopt15GradientScalingE", !13, i64 0, !22, i64 72, !9, i64 80}
!13 = !{!"_ZTSN10SimTKIpopt19StandardScalingBaseE", !14, i64 0, !9, i64 24, !19, i64 32, !20, i64 40, !20, i64 48, !21, i64 56, !9, i64 64}
!14 = !{!"_ZTSN10SimTKIpopt16NLPScalingObjectE", !15, i64 0, !17, i64 16}
!15 = !{!"_ZTSN10SimTKIpopt16ReferencedObjectE", !16, i64 8}
!16 = !{!"int", !10, i64 0}
!17 = !{!"_ZTSN10SimTKIpopt8SmartPtrIKNS_10JournalistEEE", !18, i64 0}
!18 = !{!"any pointer", !10, i64 0}
!19 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_6VectorEEE", !18, i64 0}
!20 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_17ScaledMatrixSpaceEEE", !18, i64 0}
!21 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_20SymScaledMatrixSpaceEEE", !18, i64 0}
!22 = !{!"_ZTSN10SimTKIpopt8SmartPtrINS_3NLPEEE", !18, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = distinct !{!25, !24}
!26 = !{!16, !16, i64 0}
!27 = distinct !{!27, !24}
!28 = distinct !{!28, !24}
!29 = distinct !{!29, !24}
!30 = distinct !{!30, !24}


; Effective O3 passes: AggressiveInstCombinePass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass