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

; 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.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.38" = type { i8 }

@_ZTIN10SimTKIpopt6MatrixE = external dso_local constant { ptr, ptr, ptr }, align 8
@_ZTIN10SimTKIpopt10GenTMatrixE = external constant ptr
@_ZTIN10SimTKIpopt10SymTMatrixE = external constant ptr
@_ZTIN10SimTKIpopt12ScaledMatrixE = external constant ptr
@_ZTIN10SimTKIpopt15SymScaledMatrixE = external constant ptr
@_ZTIN10SimTKIpopt10DiagMatrixE = external constant ptr
@_ZTIN10SimTKIpopt14IdentityMatrixE = external constant ptr
@_ZTIN10SimTKIpopt15ExpansionMatrixE = external constant ptr
@_ZTIN10SimTKIpopt9SumMatrixE = external constant ptr
@_ZTIN10SimTKIpopt12SumSymMatrixE = external constant ptr
@_ZTIN10SimTKIpopt10ZeroMatrixE = external constant ptr
@_ZTIN10SimTKIpopt14CompoundMatrixE = external constant ptr
@_ZTIN10SimTKIpopt17CompoundSymMatrixE = external constant ptr
@.str.1 = external hidden unnamed_addr constant [100 x i8], align 1
@_ZTIN10SimTKIpopt13TripletHelper19UNKNOWN_MATRIX_TYPEE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.2 = external hidden unnamed_addr constant [56 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nounwind willreturn memory(read)
declare ptr @__dynamic_cast(ptr, ptr, ptr, i64) #1

declare ptr @__cxa_allocate_exception(i64)

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

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

declare void @__cxa_throw(ptr, ptr, ptr)

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

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

declare void @__cxa_free_exception(ptr)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10SimTKIpopt13TripletHelper10FillRowColEiRKNS_6MatrixEPiS4_ii(i32 noundef %0, ptr noundef nonnull align 8 dereferenceable(69) %1, ptr noundef %2, ptr noundef %3, i32 noundef %4, i32 noundef %5) #3 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %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 ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca %"class.std::__cxx11::basic_string", align 8
  %28 = alloca %"class.std::allocator.38", align 1
  %29 = alloca ptr, align 8
  %30 = alloca i32, align 4
  %31 = alloca %"class.std::__cxx11::basic_string", align 8
  %32 = alloca %"class.std::allocator.38", align 1
  %33 = alloca i1, align 1
  store i32 %0, ptr %7, align 4, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !9
  store ptr %2, ptr %9, align 8, !tbaa !9
  store ptr %3, ptr %10, align 8, !tbaa !9
  store i32 %4, ptr %11, align 4, !tbaa !5
  store i32 %5, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %34 = load ptr, ptr %8, align 8, !tbaa !9
  store ptr %34, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %35 = load ptr, ptr %13, align 8, !tbaa !9
  %36 = icmp eq ptr %35, null
  br i1 %36, label %39, label %37

37:                                               ; preds = %6
  %38 = call ptr @__dynamic_cast(ptr %35, ptr @_ZTIN10SimTKIpopt6MatrixE, ptr @_ZTIN10SimTKIpopt10GenTMatrixE, i64 0) #4
  br label %40

39:                                               ; preds = %6
  br label %40

40:                                               ; preds = %39, %37
  %41 = phi ptr [ %38, %37 ], [ null, %39 ]
  store ptr %41, ptr %14, align 8, !tbaa !9
  %42 = load ptr, ptr %14, align 8, !tbaa !9
  %43 = icmp ne ptr %42, null
  br i1 %43, label %44, label %51

44:                                               ; preds = %40
  %45 = load i32, ptr %7, align 4, !tbaa !5
  %46 = load ptr, ptr %14, align 8, !tbaa !9
  %47 = load i32, ptr %11, align 4, !tbaa !5
  %48 = load i32, ptr %12, align 4, !tbaa !5
  %49 = load ptr, ptr %9, align 8, !tbaa !9
  %50 = load ptr, ptr %10, align 8, !tbaa !9
  call void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_10GenTMatrixEiiPiS4_(i32 noundef %45, ptr noundef nonnull align 8 dereferenceable(89) %46, i32 noundef %47, i32 noundef %48, ptr noundef %49, ptr noundef %50)
  store i32 1, ptr %15, align 4
  br label %264

51:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %52 = load ptr, ptr %13, align 8, !tbaa !9
  %53 = icmp eq ptr %52, null
  br i1 %53, label %56, label %54

54:                                               ; preds = %51
  %55 = call ptr @__dynamic_cast(ptr %52, ptr @_ZTIN10SimTKIpopt6MatrixE, ptr @_ZTIN10SimTKIpopt10SymTMatrixE, i64 0) #4
  br label %57

56:                                               ; preds = %51
  br label %57

57:                                               ; preds = %56, %54
  %58 = phi ptr [ %55, %54 ], [ null, %56 ]
  store ptr %58, ptr %16, align 8, !tbaa !9
  %59 = load ptr, ptr %16, align 8, !tbaa !9
  %60 = icmp ne ptr %59, null
  br i1 %60, label %61, label %68

61:                                               ; preds = %57
  %62 = load i32, ptr %7, align 4, !tbaa !5
  %63 = load ptr, ptr %16, align 8, !tbaa !9
  %64 = load i32, ptr %11, align 4, !tbaa !5
  %65 = load i32, ptr %12, align 4, !tbaa !5
  %66 = load ptr, ptr %9, align 8, !tbaa !9
  %67 = load ptr, ptr %10, align 8, !tbaa !9
  call void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_10SymTMatrixEiiPiS4_(i32 noundef %62, ptr noundef nonnull align 8 dereferenceable(97) %63, i32 noundef %64, i32 noundef %65, ptr noundef %66, ptr noundef %67)
  store i32 1, ptr %15, align 4
  br label %263

68:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %69 = load ptr, ptr %13, align 8, !tbaa !9
  %70 = icmp eq ptr %69, null
  br i1 %70, label %73, label %71

71:                                               ; preds = %68
  %72 = call ptr @__dynamic_cast(ptr %69, ptr @_ZTIN10SimTKIpopt6MatrixE, ptr @_ZTIN10SimTKIpopt12ScaledMatrixE, i64 0) #4
  br label %74

73:                                               ; preds = %68
  br label %74

74:                                               ; preds = %73, %71
  %75 = phi ptr [ %72, %71 ], [ null, %73 ]
  store ptr %75, ptr %17, align 8, !tbaa !9
  %76 = load ptr, ptr %17, align 8, !tbaa !9
  %77 = icmp ne ptr %76, null
  br i1 %77, label %78, label %85

78:                                               ; preds = %74
  %79 = load i32, ptr %7, align 4, !tbaa !5
  %80 = load ptr, ptr %17, align 8, !tbaa !9
  %81 = load i32, ptr %11, align 4, !tbaa !5
  %82 = load i32, ptr %12, align 4, !tbaa !5
  %83 = load ptr, ptr %9, align 8, !tbaa !9
  %84 = load ptr, ptr %10, align 8, !tbaa !9
  call void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_12ScaledMatrixEiiPiS4_(i32 noundef %79, ptr noundef nonnull align 8 dereferenceable(96) %80, i32 noundef %81, i32 noundef %82, ptr noundef %83, ptr noundef %84)
  store i32 1, ptr %15, align 4
  br label %262

85:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %86 = load ptr, ptr %13, align 8, !tbaa !9
  %87 = icmp eq ptr %86, null
  br i1 %87, label %90, label %88

88:                                               ; preds = %85
  %89 = call ptr @__dynamic_cast(ptr %86, ptr @_ZTIN10SimTKIpopt6MatrixE, ptr @_ZTIN10SimTKIpopt15SymScaledMatrixE, i64 0) #4
  br label %91

90:                                               ; preds = %85
  br label %91

91:                                               ; preds = %90, %88
  %92 = phi ptr [ %89, %88 ], [ null, %90 ]
  store ptr %92, ptr %18, align 8, !tbaa !9
  %93 = load ptr, ptr %18, align 8, !tbaa !9
  %94 = icmp ne ptr %93, null
  br i1 %94, label %95, label %102

95:                                               ; preds = %91
  %96 = load i32, ptr %7, align 4, !tbaa !5
  %97 = load ptr, ptr %18, align 8, !tbaa !9
  %98 = load i32, ptr %11, align 4, !tbaa !5
  %99 = load i32, ptr %12, align 4, !tbaa !5
  %100 = load ptr, ptr %9, align 8, !tbaa !9
  %101 = load ptr, ptr %10, align 8, !tbaa !9
  call void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_15SymScaledMatrixEiiPiS4_(i32 noundef %96, ptr noundef nonnull align 8 dereferenceable(104) %97, i32 noundef %98, i32 noundef %99, ptr noundef %100, ptr noundef %101)
  store i32 1, ptr %15, align 4
  br label %261

102:                                              ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %103 = load ptr, ptr %13, align 8, !tbaa !9
  %104 = icmp eq ptr %103, null
  br i1 %104, label %107, label %105

105:                                              ; preds = %102
  %106 = call ptr @__dynamic_cast(ptr %103, ptr @_ZTIN10SimTKIpopt6MatrixE, ptr @_ZTIN10SimTKIpopt10DiagMatrixE, i64 0) #4
  br label %108

107:                                              ; preds = %102
  br label %108

108:                                              ; preds = %107, %105
  %109 = phi ptr [ %106, %105 ], [ null, %107 ]
  store ptr %109, ptr %19, align 8, !tbaa !9
  %110 = load ptr, ptr %19, align 8, !tbaa !9
  %111 = icmp ne ptr %110, null
  br i1 %111, label %112, label %119

112:                                              ; preds = %108
  %113 = load i32, ptr %7, align 4, !tbaa !5
  %114 = load ptr, ptr %19, align 8, !tbaa !9
  %115 = load i32, ptr %11, align 4, !tbaa !5
  %116 = load i32, ptr %12, align 4, !tbaa !5
  %117 = load ptr, ptr %9, align 8, !tbaa !9
  %118 = load ptr, ptr %10, align 8, !tbaa !9
  call void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_10DiagMatrixEiiPiS4_(i32 noundef %113, ptr noundef nonnull align 8 dereferenceable(88) %114, i32 noundef %115, i32 noundef %116, ptr noundef %117, ptr noundef %118)
  store i32 1, ptr %15, align 4
  br label %260

119:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  %120 = load ptr, ptr %13, align 8, !tbaa !9
  %121 = icmp eq ptr %120, null
  br i1 %121, label %124, label %122

122:                                              ; preds = %119
  %123 = call ptr @__dynamic_cast(ptr %120, ptr @_ZTIN10SimTKIpopt6MatrixE, ptr @_ZTIN10SimTKIpopt14IdentityMatrixE, i64 0) #4
  br label %125

124:                                              ; preds = %119
  br label %125

125:                                              ; preds = %124, %122
  %126 = phi ptr [ %123, %122 ], [ null, %124 ]
  store ptr %126, ptr %20, align 8, !tbaa !9
  %127 = load ptr, ptr %20, align 8, !tbaa !9
  %128 = icmp ne ptr %127, null
  br i1 %128, label %129, label %136

129:                                              ; preds = %125
  %130 = load i32, ptr %7, align 4, !tbaa !5
  %131 = load ptr, ptr %20, align 8, !tbaa !9
  %132 = load i32, ptr %11, align 4, !tbaa !5
  %133 = load i32, ptr %12, align 4, !tbaa !5
  %134 = load ptr, ptr %9, align 8, !tbaa !9
  %135 = load ptr, ptr %10, align 8, !tbaa !9
  call void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_14IdentityMatrixEiiPiS4_(i32 noundef %130, ptr noundef nonnull align 8 dereferenceable(88) %131, i32 noundef %132, i32 noundef %133, ptr noundef %134, ptr noundef %135)
  store i32 1, ptr %15, align 4
  br label %259

136:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  %137 = load ptr, ptr %13, align 8, !tbaa !9
  %138 = icmp eq ptr %137, null
  br i1 %138, label %141, label %139

139:                                              ; preds = %136
  %140 = call ptr @__dynamic_cast(ptr %137, ptr @_ZTIN10SimTKIpopt6MatrixE, ptr @_ZTIN10SimTKIpopt15ExpansionMatrixE, i64 0) #4
  br label %142

141:                                              ; preds = %136
  br label %142

142:                                              ; preds = %141, %139
  %143 = phi ptr [ %140, %139 ], [ null, %141 ]
  store ptr %143, ptr %21, align 8, !tbaa !9
  %144 = load ptr, ptr %21, align 8, !tbaa !9
  %145 = icmp ne ptr %144, null
  br i1 %145, label %146, label %153

146:                                              ; preds = %142
  %147 = load i32, ptr %7, align 4, !tbaa !5
  %148 = load ptr, ptr %21, align 8, !tbaa !9
  %149 = load i32, ptr %11, align 4, !tbaa !5
  %150 = load i32, ptr %12, align 4, !tbaa !5
  %151 = load ptr, ptr %9, align 8, !tbaa !9
  %152 = load ptr, ptr %10, align 8, !tbaa !9
  call void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_15ExpansionMatrixEiiPiS4_(i32 noundef %147, ptr noundef nonnull align 8 dereferenceable(80) %148, i32 noundef %149, i32 noundef %150, ptr noundef %151, ptr noundef %152)
  store i32 1, ptr %15, align 4
  br label %258

153:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  %154 = load ptr, ptr %13, align 8, !tbaa !9
  %155 = icmp eq ptr %154, null
  br i1 %155, label %158, label %156

156:                                              ; preds = %153
  %157 = call ptr @__dynamic_cast(ptr %154, ptr @_ZTIN10SimTKIpopt6MatrixE, ptr @_ZTIN10SimTKIpopt9SumMatrixE, i64 0) #4
  br label %159

158:                                              ; preds = %153
  br label %159

159:                                              ; preds = %158, %156
  %160 = phi ptr [ %157, %156 ], [ null, %158 ]
  store ptr %160, ptr %22, align 8, !tbaa !9
  %161 = load ptr, ptr %22, align 8, !tbaa !9
  %162 = icmp ne ptr %161, null
  br i1 %162, label %163, label %170

163:                                              ; preds = %159
  %164 = load i32, ptr %7, align 4, !tbaa !5
  %165 = load ptr, ptr %22, align 8, !tbaa !9
  %166 = load i32, ptr %11, align 4, !tbaa !5
  %167 = load i32, ptr %12, align 4, !tbaa !5
  %168 = load ptr, ptr %9, align 8, !tbaa !9
  %169 = load ptr, ptr %10, align 8, !tbaa !9
  call void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_9SumMatrixEiiPiS4_(i32 noundef %164, ptr noundef nonnull align 8 dereferenceable(128) %165, i32 noundef %166, i32 noundef %167, ptr noundef %168, ptr noundef %169)
  store i32 1, ptr %15, align 4
  br label %257

170:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  %171 = load ptr, ptr %13, align 8, !tbaa !9
  %172 = icmp eq ptr %171, null
  br i1 %172, label %175, label %173

173:                                              ; preds = %170
  %174 = call ptr @__dynamic_cast(ptr %171, ptr @_ZTIN10SimTKIpopt6MatrixE, ptr @_ZTIN10SimTKIpopt12SumSymMatrixE, i64 0) #4
  br label %176

175:                                              ; preds = %170
  br label %176

176:                                              ; preds = %175, %173
  %177 = phi ptr [ %174, %173 ], [ null, %175 ]
  store ptr %177, ptr %23, align 8, !tbaa !9
  %178 = load ptr, ptr %23, align 8, !tbaa !9
  %179 = icmp ne ptr %178, null
  br i1 %179, label %180, label %187

180:                                              ; preds = %176
  %181 = load i32, ptr %7, align 4, !tbaa !5
  %182 = load ptr, ptr %23, align 8, !tbaa !9
  %183 = load i32, ptr %11, align 4, !tbaa !5
  %184 = load i32, ptr %12, align 4, !tbaa !5
  %185 = load ptr, ptr %9, align 8, !tbaa !9
  %186 = load ptr, ptr %10, align 8, !tbaa !9
  call void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_12SumSymMatrixEiiPiS4_(i32 noundef %181, ptr noundef nonnull align 8 dereferenceable(136) %182, i32 noundef %183, i32 noundef %184, ptr noundef %185, ptr noundef %186)
  store i32 1, ptr %15, align 4
  br label %256

187:                                              ; preds = %176
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  %188 = load ptr, ptr %13, align 8, !tbaa !9
  %189 = icmp eq ptr %188, null
  br i1 %189, label %192, label %190

190:                                              ; preds = %187
  %191 = call ptr @__dynamic_cast(ptr %188, ptr @_ZTIN10SimTKIpopt6MatrixE, ptr @_ZTIN10SimTKIpopt10ZeroMatrixE, i64 0) #4
  br label %193

192:                                              ; preds = %187
  br label %193

193:                                              ; preds = %192, %190
  %194 = phi ptr [ %191, %190 ], [ null, %192 ]
  store ptr %194, ptr %24, align 8, !tbaa !9
  %195 = load ptr, ptr %24, align 8, !tbaa !9
  %196 = icmp ne ptr %195, null
  br i1 %196, label %197, label %198

197:                                              ; preds = %193
  store i32 1, ptr %15, align 4
  br label %255

198:                                              ; preds = %193
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  %199 = load ptr, ptr %13, align 8, !tbaa !9
  %200 = icmp eq ptr %199, null
  br i1 %200, label %203, label %201

201:                                              ; preds = %198
  %202 = call ptr @__dynamic_cast(ptr %199, ptr @_ZTIN10SimTKIpopt6MatrixE, ptr @_ZTIN10SimTKIpopt14CompoundMatrixE, i64 0) #4
  br label %204

203:                                              ; preds = %198
  br label %204

204:                                              ; preds = %203, %201
  %205 = phi ptr [ %202, %201 ], [ null, %203 ]
  store ptr %205, ptr %25, align 8, !tbaa !9
  %206 = load ptr, ptr %25, align 8, !tbaa !9
  %207 = icmp ne ptr %206, null
  br i1 %207, label %208, label %215

208:                                              ; preds = %204
  %209 = load i32, ptr %7, align 4, !tbaa !5
  %210 = load ptr, ptr %25, align 8, !tbaa !9
  %211 = load i32, ptr %11, align 4, !tbaa !5
  %212 = load i32, ptr %12, align 4, !tbaa !5
  %213 = load ptr, ptr %9, align 8, !tbaa !9
  %214 = load ptr, ptr %10, align 8, !tbaa !9
  call void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_14CompoundMatrixEiiPiS4_(i32 noundef %209, ptr noundef nonnull align 8 dereferenceable(129) %210, i32 noundef %211, i32 noundef %212, ptr noundef %213, ptr noundef %214)
  store i32 1, ptr %15, align 4
  br label %254

215:                                              ; preds = %204
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #4
  %216 = load ptr, ptr %13, align 8, !tbaa !9
  %217 = icmp eq ptr %216, null
  br i1 %217, label %220, label %218

218:                                              ; preds = %215
  %219 = call ptr @__dynamic_cast(ptr %216, ptr @_ZTIN10SimTKIpopt6MatrixE, ptr @_ZTIN10SimTKIpopt17CompoundSymMatrixE, i64 0) #4
  br label %221

220:                                              ; preds = %215
  br label %221

221:                                              ; preds = %220, %218
  %222 = phi ptr [ %219, %218 ], [ null, %220 ]
  store ptr %222, ptr %26, align 8, !tbaa !9
  %223 = load ptr, ptr %26, align 8, !tbaa !9
  %224 = icmp ne ptr %223, null
  br i1 %224, label %225, label %232

225:                                              ; preds = %221
  %226 = load i32, ptr %7, align 4, !tbaa !5
  %227 = load ptr, ptr %26, align 8, !tbaa !9
  %228 = load i32, ptr %11, align 4, !tbaa !5
  %229 = load i32, ptr %12, align 4, !tbaa !5
  %230 = load ptr, ptr %9, align 8, !tbaa !9
  %231 = load ptr, ptr %10, align 8, !tbaa !9
  call void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_17CompoundSymMatrixEiiPiS4_(i32 noundef %226, ptr noundef nonnull align 8 dereferenceable(137) %227, i32 noundef %228, i32 noundef %229, ptr noundef %230, ptr noundef %231)
  store i32 1, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  br label %254

232:                                              ; preds = %221
  store i1 true, ptr %33, align 1
  %233 = call ptr @__cxa_allocate_exception(i64 112) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %28) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %28)
          to label %234 unwind label %237

234:                                              ; preds = %232
  call void @llvm.lifetime.start.p0(i64 1, ptr %32) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %31, ptr noundef @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %32)
          to label %235 unwind label %241

235:                                              ; preds = %234
  invoke void @_ZN10SimTKIpopt13TripletHelper19UNKNOWN_MATRIX_TYPEC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_i(ptr noundef nonnull align 8 dereferenceable(112) %233, ptr noundef %27, ptr noundef %31, i32 noundef 173)
          to label %236 unwind label %245

236:                                              ; preds = %235
  store i1 false, ptr %33, align 1
  invoke void @__cxa_throw(ptr %233, ptr @_ZTIN10SimTKIpopt13TripletHelper19UNKNOWN_MATRIX_TYPEE, ptr @_ZN10SimTKIpopt14IpoptExceptionD2Ev) #5
          to label %270 unwind label %245

237:                                              ; preds = %232
  %238 = landingpad { ptr, i32 }
          cleanup
  %239 = extractvalue { ptr, i32 } %238, 0
  store ptr %239, ptr %29, align 8
  %240 = extractvalue { ptr, i32 } %238, 1
  store i32 %240, ptr %30, align 4
  br label %250

241:                                              ; preds = %234
  %242 = landingpad { ptr, i32 }
          cleanup
  %243 = extractvalue { ptr, i32 } %242, 0
  store ptr %243, ptr %29, align 8
  %244 = extractvalue { ptr, i32 } %242, 1
  store i32 %244, ptr %30, align 4
  br label %249

245:                                              ; preds = %236, %235
  %246 = landingpad { ptr, i32 }
          cleanup
  %247 = extractvalue { ptr, i32 } %246, 0
  store ptr %247, ptr %29, align 8
  %248 = extractvalue { ptr, i32 } %246, 1
  store i32 %248, ptr %30, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %31) #4
  br label %249

249:                                              ; preds = %245, %241
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #4
  br label %250

250:                                              ; preds = %249, %237
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #4
  %251 = load i1, ptr %33, align 1
  br i1 %251, label %252, label %253

252:                                              ; preds = %250
  call void @__cxa_free_exception(ptr %233) #4
  br label %253

253:                                              ; preds = %252, %250
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %265

254:                                              ; preds = %225, %208
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  br label %255

255:                                              ; preds = %254, %197
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  br label %256

256:                                              ; preds = %255, %180
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  br label %257

257:                                              ; preds = %256, %163
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  br label %258

258:                                              ; preds = %257, %146
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  br label %259

259:                                              ; preds = %258, %129
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  br label %260

260:                                              ; preds = %259, %112
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  br label %261

261:                                              ; preds = %260, %95
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  br label %262

262:                                              ; preds = %261, %78
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  br label %263

263:                                              ; preds = %262, %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  br label %264

264:                                              ; preds = %263, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  ret void

265:                                              ; preds = %253
  %266 = load ptr, ptr %29, align 8
  %267 = load i32, ptr %30, align 4
  %268 = insertvalue { ptr, i32 } poison, ptr %266, 0
  %269 = insertvalue { ptr, i32 } %268, i32 %267, 1
  resume { ptr, i32 } %269

270:                                              ; preds = %236
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_10GenTMatrixEiiPiS4_(i32 noundef, ptr noundef nonnull align 8 dereferenceable(89), i32 noundef, i32 noundef, ptr noundef, ptr noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_10SymTMatrixEiiPiS4_(i32 noundef, ptr noundef nonnull align 8 dereferenceable(97), i32 noundef, i32 noundef, ptr noundef, ptr noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_12ScaledMatrixEiiPiS4_(i32 noundef, ptr noundef nonnull align 8 dereferenceable(96), i32 noundef, i32 noundef, ptr noundef, ptr noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_15SymScaledMatrixEiiPiS4_(i32 noundef, ptr noundef nonnull align 8 dereferenceable(104), i32 noundef, i32 noundef, ptr noundef, ptr noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_10DiagMatrixEiiPiS4_(i32 noundef, ptr noundef nonnull align 8 dereferenceable(88), i32 noundef, i32 noundef, ptr noundef, ptr noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_14IdentityMatrixEiiPiS4_(i32 noundef, ptr noundef nonnull align 8 dereferenceable(88), i32 noundef, i32 noundef, ptr noundef, ptr noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_15ExpansionMatrixEiiPiS4_(i32 noundef, ptr noundef nonnull align 8 dereferenceable(80), i32 noundef, i32 noundef, ptr noundef, ptr noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_9SumMatrixEiiPiS4_(i32 noundef, ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, i32 noundef, ptr noundef, ptr noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_12SumSymMatrixEiiPiS4_(i32 noundef, ptr noundef nonnull align 8 dereferenceable(136), i32 noundef, i32 noundef, ptr noundef, ptr noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_14CompoundMatrixEiiPiS4_(i32 noundef, ptr noundef nonnull align 8 dereferenceable(129), i32 noundef, i32 noundef, ptr noundef, ptr noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_17CompoundSymMatrixEiiPiS4_(i32 noundef, ptr noundef nonnull align 8 dereferenceable(137), i32 noundef, i32 noundef, ptr noundef, ptr noundef) #3 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind willreturn memory(read) }
attributes #2 = { 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 #3 = { 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 = { nounwind }
attributes #5 = { noreturn }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}


; 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.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.38" = type { i8 }

@_ZTIN10SimTKIpopt6MatrixE = external dso_local constant { ptr, ptr, ptr }, align 8
@_ZTIN10SimTKIpopt10GenTMatrixE = external constant ptr
@_ZTIN10SimTKIpopt10SymTMatrixE = external constant ptr
@_ZTIN10SimTKIpopt12ScaledMatrixE = external constant ptr
@_ZTIN10SimTKIpopt15SymScaledMatrixE = external constant ptr
@_ZTIN10SimTKIpopt10DiagMatrixE = external constant ptr
@_ZTIN10SimTKIpopt14IdentityMatrixE = external constant ptr
@_ZTIN10SimTKIpopt15ExpansionMatrixE = external constant ptr
@_ZTIN10SimTKIpopt9SumMatrixE = external constant ptr
@_ZTIN10SimTKIpopt12SumSymMatrixE = external constant ptr
@_ZTIN10SimTKIpopt10ZeroMatrixE = external constant ptr
@_ZTIN10SimTKIpopt14CompoundMatrixE = external constant ptr
@_ZTIN10SimTKIpopt17CompoundSymMatrixE = external constant ptr
@.str.1 = external hidden unnamed_addr constant [100 x i8], align 1
@_ZTIN10SimTKIpopt13TripletHelper19UNKNOWN_MATRIX_TYPEE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.2 = external hidden unnamed_addr constant [56 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(read)
declare ptr @__dynamic_cast(ptr, ptr, ptr, i64) local_unnamed_addr #1

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

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

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

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

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

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10SimTKIpopt13TripletHelper10FillRowColEiRKNS_6MatrixEPiS4_ii(i32 noundef %0, ptr noundef nonnull align 8 dereferenceable(69) %1, ptr noundef %2, ptr noundef %3, i32 noundef %4, i32 noundef %5) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator.38", align 1
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator.38", align 1
  %11 = tail call ptr @__dynamic_cast(ptr nonnull %1, ptr nonnull @_ZTIN10SimTKIpopt6MatrixE, ptr nonnull @_ZTIN10SimTKIpopt10GenTMatrixE, i64 0) #4
  %.not = icmp eq ptr %11, null
  br i1 %.not, label %13, label %12

12:                                               ; preds = %6
  tail call void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_10GenTMatrixEiiPiS4_(i32 noundef %0, ptr noundef nonnull align 8 dereferenceable(89) %11, i32 noundef %4, i32 noundef %5, ptr noundef %2, ptr noundef %3)
  br label %58

13:                                               ; preds = %6
  %14 = tail call ptr @__dynamic_cast(ptr nonnull %1, ptr nonnull @_ZTIN10SimTKIpopt6MatrixE, ptr nonnull @_ZTIN10SimTKIpopt10SymTMatrixE, i64 0) #4
  %.not108 = icmp eq ptr %14, null
  br i1 %.not108, label %16, label %15

15:                                               ; preds = %13
  tail call void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_10SymTMatrixEiiPiS4_(i32 noundef %0, ptr noundef nonnull align 8 dereferenceable(97) %14, i32 noundef %4, i32 noundef %5, ptr noundef %2, ptr noundef %3)
  br label %58

16:                                               ; preds = %13
  %17 = tail call ptr @__dynamic_cast(ptr nonnull %1, ptr nonnull @_ZTIN10SimTKIpopt6MatrixE, ptr nonnull @_ZTIN10SimTKIpopt12ScaledMatrixE, i64 0) #4
  %.not109 = icmp eq ptr %17, null
  br i1 %.not109, label %19, label %18

18:                                               ; preds = %16
  tail call void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_12ScaledMatrixEiiPiS4_(i32 noundef %0, ptr noundef nonnull align 8 dereferenceable(96) %17, i32 noundef %4, i32 noundef %5, ptr noundef %2, ptr noundef %3)
  br label %58

19:                                               ; preds = %16
  %20 = tail call ptr @__dynamic_cast(ptr nonnull %1, ptr nonnull @_ZTIN10SimTKIpopt6MatrixE, ptr nonnull @_ZTIN10SimTKIpopt15SymScaledMatrixE, i64 0) #4
  %.not110 = icmp eq ptr %20, null
  br i1 %.not110, label %22, label %21

21:                                               ; preds = %19
  tail call void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_15SymScaledMatrixEiiPiS4_(i32 noundef %0, ptr noundef nonnull align 8 dereferenceable(104) %20, i32 noundef %4, i32 noundef %5, ptr noundef %2, ptr noundef %3)
  br label %58

22:                                               ; preds = %19
  %23 = tail call ptr @__dynamic_cast(ptr nonnull %1, ptr nonnull @_ZTIN10SimTKIpopt6MatrixE, ptr nonnull @_ZTIN10SimTKIpopt10DiagMatrixE, i64 0) #4
  %.not111 = icmp eq ptr %23, null
  br i1 %.not111, label %25, label %24

24:                                               ; preds = %22
  tail call void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_10DiagMatrixEiiPiS4_(i32 noundef %0, ptr noundef nonnull align 8 dereferenceable(88) %23, i32 noundef %4, i32 noundef %5, ptr noundef %2, ptr noundef %3)
  br label %58

25:                                               ; preds = %22
  %26 = tail call ptr @__dynamic_cast(ptr nonnull %1, ptr nonnull @_ZTIN10SimTKIpopt6MatrixE, ptr nonnull @_ZTIN10SimTKIpopt14IdentityMatrixE, i64 0) #4
  %.not112 = icmp eq ptr %26, null
  br i1 %.not112, label %28, label %27

27:                                               ; preds = %25
  tail call void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_14IdentityMatrixEiiPiS4_(i32 noundef %0, ptr noundef nonnull align 8 dereferenceable(88) %26, i32 noundef %4, i32 noundef %5, ptr noundef %2, ptr noundef %3)
  br label %58

28:                                               ; preds = %25
  %29 = tail call ptr @__dynamic_cast(ptr nonnull %1, ptr nonnull @_ZTIN10SimTKIpopt6MatrixE, ptr nonnull @_ZTIN10SimTKIpopt15ExpansionMatrixE, i64 0) #4
  %.not113 = icmp eq ptr %29, null
  br i1 %.not113, label %31, label %30

30:                                               ; preds = %28
  tail call void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_15ExpansionMatrixEiiPiS4_(i32 noundef %0, ptr noundef nonnull align 8 dereferenceable(80) %29, i32 noundef %4, i32 noundef %5, ptr noundef %2, ptr noundef %3)
  br label %58

31:                                               ; preds = %28
  %32 = tail call ptr @__dynamic_cast(ptr nonnull %1, ptr nonnull @_ZTIN10SimTKIpopt6MatrixE, ptr nonnull @_ZTIN10SimTKIpopt9SumMatrixE, i64 0) #4
  %.not114 = icmp eq ptr %32, null
  br i1 %.not114, label %34, label %33

33:                                               ; preds = %31
  tail call void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_9SumMatrixEiiPiS4_(i32 noundef %0, ptr noundef nonnull align 8 dereferenceable(128) %32, i32 noundef %4, i32 noundef %5, ptr noundef %2, ptr noundef %3)
  br label %58

34:                                               ; preds = %31
  %35 = tail call ptr @__dynamic_cast(ptr nonnull %1, ptr nonnull @_ZTIN10SimTKIpopt6MatrixE, ptr nonnull @_ZTIN10SimTKIpopt12SumSymMatrixE, i64 0) #4
  %.not115 = icmp eq ptr %35, null
  br i1 %.not115, label %37, label %36

36:                                               ; preds = %34
  tail call void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_12SumSymMatrixEiiPiS4_(i32 noundef %0, ptr noundef nonnull align 8 dereferenceable(136) %35, i32 noundef %4, i32 noundef %5, ptr noundef %2, ptr noundef %3)
  br label %58

37:                                               ; preds = %34
  %38 = tail call ptr @__dynamic_cast(ptr nonnull %1, ptr nonnull @_ZTIN10SimTKIpopt6MatrixE, ptr nonnull @_ZTIN10SimTKIpopt10ZeroMatrixE, i64 0) #4
  %.not116 = icmp eq ptr %38, null
  br i1 %.not116, label %39, label %58

39:                                               ; preds = %37
  %40 = tail call ptr @__dynamic_cast(ptr nonnull %1, ptr nonnull @_ZTIN10SimTKIpopt6MatrixE, ptr nonnull @_ZTIN10SimTKIpopt14CompoundMatrixE, i64 0) #4
  %.not117 = icmp eq ptr %40, null
  br i1 %.not117, label %42, label %41

41:                                               ; preds = %39
  tail call void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_14CompoundMatrixEiiPiS4_(i32 noundef %0, ptr noundef nonnull align 8 dereferenceable(129) %40, i32 noundef %4, i32 noundef %5, ptr noundef %2, ptr noundef %3)
  br label %58

42:                                               ; preds = %39
  %43 = tail call ptr @__dynamic_cast(ptr nonnull %1, ptr nonnull @_ZTIN10SimTKIpopt6MatrixE, ptr nonnull @_ZTIN10SimTKIpopt17CompoundSymMatrixE, i64 0) #4
  %.not118 = icmp eq ptr %43, null
  br i1 %.not118, label %45, label %44

44:                                               ; preds = %42
  tail call void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_17CompoundSymMatrixEiiPiS4_(i32 noundef %0, ptr noundef nonnull align 8 dereferenceable(137) %43, i32 noundef %4, i32 noundef %5, ptr noundef %2, ptr noundef %3)
  br label %58

45:                                               ; preds = %42
  %46 = tail call ptr @__cxa_allocate_exception(i64 112) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %47 unwind label %.thread

47:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %48 unwind label %51

48:                                               ; preds = %47
  invoke void @_ZN10SimTKIpopt13TripletHelper19UNKNOWN_MATRIX_TYPEC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_i(ptr noundef nonnull align 8 dereferenceable(112) %46, ptr noundef nonnull %7, ptr noundef nonnull %9, i32 noundef 173)
          to label %49 unwind label %53

49:                                               ; preds = %48
  invoke void @__cxa_throw(ptr nonnull %46, ptr nonnull @_ZTIN10SimTKIpopt13TripletHelper19UNKNOWN_MATRIX_TYPEE, ptr nonnull @_ZN10SimTKIpopt14IpoptExceptionD2Ev) #5
          to label %59 unwind label %53

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

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

53:                                               ; preds = %49, %48
  %.0 = phi i1 [ false, %49 ], [ true, %48 ]
  %54 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #4
  br label %55

55:                                               ; preds = %51, %53
  %.pn = phi { ptr, i32 } [ %54, %53 ], [ %52, %51 ]
  %.1 = phi i1 [ %.0, %53 ], [ true, %51 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #4
  br i1 %.1, label %56, label %57

56:                                               ; preds = %.thread, %55
  %.pn.pn124 = phi { ptr, i32 } [ %50, %.thread ], [ %.pn, %55 ]
  call void @__cxa_free_exception(ptr %46) #4
  br label %57

57:                                               ; preds = %56, %55
  %.pn.pn123 = phi { ptr, i32 } [ %.pn.pn124, %56 ], [ %.pn, %55 ]
  resume { ptr, i32 } %.pn.pn123

58:                                               ; preds = %15, %21, %27, %33, %37, %44, %41, %36, %30, %24, %18, %12
  ret void

59:                                               ; preds = %49
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_10GenTMatrixEiiPiS4_(i32 noundef, ptr noundef nonnull align 8 dereferenceable(89), i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_10SymTMatrixEiiPiS4_(i32 noundef, ptr noundef nonnull align 8 dereferenceable(97), i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_12ScaledMatrixEiiPiS4_(i32 noundef, ptr noundef nonnull align 8 dereferenceable(96), i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_15SymScaledMatrixEiiPiS4_(i32 noundef, ptr noundef nonnull align 8 dereferenceable(104), i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_10DiagMatrixEiiPiS4_(i32 noundef, ptr noundef nonnull align 8 dereferenceable(88), i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_14IdentityMatrixEiiPiS4_(i32 noundef, ptr noundef nonnull align 8 dereferenceable(88), i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_15ExpansionMatrixEiiPiS4_(i32 noundef, ptr noundef nonnull align 8 dereferenceable(80), i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_9SumMatrixEiiPiS4_(i32 noundef, ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_12SumSymMatrixEiiPiS4_(i32 noundef, ptr noundef nonnull align 8 dereferenceable(136), i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_14CompoundMatrixEiiPiS4_(i32 noundef, ptr noundef nonnull align 8 dereferenceable(129), i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10SimTKIpopt13TripletHelper11FillRowCol_EiRKNS_17CompoundSymMatrixEiiPiS4_(i32 noundef, ptr noundef nonnull align 8 dereferenceable(137), i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nofree nounwind willreturn memory(read) }
attributes #2 = { 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 #3 = { 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 = { nounwind }
attributes #5 = { noreturn }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}


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