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

; 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::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<SimTKIpopt::TripletToCSRConverter::TripletEntry, std::allocator<SimTKIpopt::TripletToCSRConverter::TripletEntry>>::_List_impl" }
%"struct.std::__cxx11::_List_base<SimTKIpopt::TripletToCSRConverter::TripletEntry, std::allocator<SimTKIpopt::TripletToCSRConverter::TripletEntry>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%"class.std::allocator.0" = type { i8 }
%"struct.std::_List_iterator" = type { ptr }
%"class.SimTKIpopt::TripletToCSRConverter" = type { %"class.SimTKIpopt::ReferencedObject.base", i32, ptr, ptr, i32, i32, i32, i8, ptr, ptr, ptr }
%"class.SimTKIpopt::ReferencedObject.base" = type <{ ptr, i32 }>

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN10SimTKIpopt21TripletToCSRConverter19InitializeConverterEiiPKiS2_(ptr noundef nonnull align 8 dereferenceable(72) %0, i32 noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef %4) #1 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"class.std::__cxx11::list", align 8
  %12 = alloca %"class.std::allocator.0", align 1
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca %"struct.std::_List_iterator", align 8
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca %"struct.std::_List_iterator", align 8
  %23 = alloca i32, align 4
  %24 = alloca %"struct.std::_List_iterator", align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  %32 = load ptr, ptr %6, align 8
  %33 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 2
  %34 = load ptr, ptr %33, align 8, !tbaa !11
  %35 = icmp eq ptr %34, null
  br i1 %35, label %37, label %36

36:                                               ; preds = %5
  call void @_ZdaPv(ptr noundef %34) #7
  br label %37

37:                                               ; preds = %36, %5
  %38 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 3
  %39 = load ptr, ptr %38, align 8, !tbaa !15
  %40 = icmp eq ptr %39, null
  br i1 %40, label %42, label %41

41:                                               ; preds = %37
  call void @_ZdaPv(ptr noundef %39) #7
  br label %42

42:                                               ; preds = %41, %37
  %43 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 8
  %44 = load ptr, ptr %43, align 8, !tbaa !16
  %45 = icmp eq ptr %44, null
  br i1 %45, label %47, label %46

46:                                               ; preds = %42
  call void @_ZdaPv(ptr noundef %44) #7
  br label %47

47:                                               ; preds = %46, %42
  %48 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 9
  %49 = load ptr, ptr %48, align 8, !tbaa !17
  %50 = icmp eq ptr %49, null
  br i1 %50, label %52, label %51

51:                                               ; preds = %47
  call void @_ZdaPv(ptr noundef %49) #7
  br label %52

52:                                               ; preds = %51, %47
  %53 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 10
  %54 = load ptr, ptr %53, align 8, !tbaa !18
  %55 = icmp eq ptr %54, null
  br i1 %55, label %57, label %56

56:                                               ; preds = %52
  call void @_ZdaPv(ptr noundef %54) #7
  br label %57

57:                                               ; preds = %56, %52
  %58 = load i32, ptr %7, align 4, !tbaa !9
  %59 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 4
  store i32 %58, ptr %59, align 8, !tbaa !19
  %60 = load i32, ptr %8, align 4, !tbaa !9
  %61 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 5
  store i32 %60, ptr %61, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #8
  %62 = load i32, ptr %8, align 4, !tbaa !9
  %63 = sext i32 %62 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #8
  call void @_ZNSaIN10SimTKIpopt21TripletToCSRConverter12TripletEntryEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #8
  invoke void @_ZNSt7__cxx114listIN10SimTKIpopt21TripletToCSRConverter12TripletEntryESaIS3_EEC2EmRKS4_(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %63, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %64 unwind label %72

64:                                               ; preds = %57
  call void @_ZNSt15__new_allocatorIN10SimTKIpopt21TripletToCSRConverter12TripletEntryEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %65 = call ptr @_ZNSt7__cxx114listIN10SimTKIpopt21TripletToCSRConverter12TripletEntryESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #8
  %66 = getelementptr inbounds %"struct.std::_List_iterator", ptr %15, i32 0, i32 0
  store ptr %65, ptr %66, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %67

67:                                               ; preds = %91, %64
  %68 = load i32, ptr %16, align 4, !tbaa !9
  %69 = load i32, ptr %8, align 4, !tbaa !9
  %70 = icmp slt i32 %68, %69
  br i1 %70, label %76, label %71

71:                                               ; preds = %67
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %98

72:                                               ; preds = %57
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %13, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %14, align 4
  call void @_ZNSt15__new_allocatorIN10SimTKIpopt21TripletToCSRConverter12TripletEntryEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #8
  br label %466

76:                                               ; preds = %67
  %77 = call noundef ptr @_ZNKSt14_List_iteratorIN10SimTKIpopt21TripletToCSRConverter12TripletEntryEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  %78 = load ptr, ptr %9, align 8, !tbaa !5
  %79 = load i32, ptr %16, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds i32, ptr %78, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !9
  %83 = load ptr, ptr %10, align 8, !tbaa !5
  %84 = load i32, ptr %16, align 4, !tbaa !9
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds i32, ptr %83, i64 %85
  %87 = load i32, ptr %86, align 4, !tbaa !9
  %88 = load i32, ptr %16, align 4, !tbaa !9
  invoke void @_ZN10SimTKIpopt21TripletToCSRConverter12TripletEntry3SetEiii(ptr noundef nonnull align 4 dereferenceable(12) %77, i32 noundef %82, i32 noundef %87, i32 noundef %88)
          to label %89 unwind label %94

89:                                               ; preds = %76
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorIN10SimTKIpopt21TripletToCSRConverter12TripletEntryEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  br label %91

91:                                               ; preds = %89
  %92 = load i32, ptr %16, align 4, !tbaa !9
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %16, align 4, !tbaa !9
  br label %67, !llvm.loop !21

94:                                               ; preds = %76
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %13, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %465

98:                                               ; preds = %71
  invoke void @_ZNSt7__cxx114listIN10SimTKIpopt21TripletToCSRConverter12TripletEntryESaIS3_EE4sortEv(ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %99 unwind label %196

99:                                               ; preds = %98
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %100 = load i32, ptr %8, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %101, i64 4)
  %103 = extractvalue { i64, i1 } %102, 1
  %104 = extractvalue { i64, i1 } %102, 0
  %105 = select i1 %103, i64 -1, i64 %104
  %106 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %105) #9
          to label %107 unwind label %200

107:                                              ; preds = %99
  store ptr %106, ptr %17, align 8, !tbaa !5
  %108 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 4
  %109 = load i32, ptr %108, align 8, !tbaa !19
  %110 = add nsw i32 %109, 1
  %111 = sext i32 %110 to i64
  %112 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %111, i64 4)
  %113 = extractvalue { i64, i1 } %112, 1
  %114 = extractvalue { i64, i1 } %112, 0
  %115 = select i1 %113, i64 -1, i64 %114
  %116 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %115) #9
          to label %117 unwind label %200

117:                                              ; preds = %107
  %118 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 2
  store ptr %116, ptr %118, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %119 = load i32, ptr %8, align 4, !tbaa !9
  %120 = sext i32 %119 to i64
  %121 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %120, i64 4)
  %122 = extractvalue { i64, i1 } %121, 1
  %123 = extractvalue { i64, i1 } %121, 0
  %124 = select i1 %122, i64 -1, i64 %123
  %125 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %124) #9
          to label %126 unwind label %204

126:                                              ; preds = %117
  store ptr %125, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %127 = load i32, ptr %8, align 4, !tbaa !9
  %128 = sext i32 %127 to i64
  %129 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %128, i64 4)
  %130 = extractvalue { i64, i1 } %129, 1
  %131 = extractvalue { i64, i1 } %129, 0
  %132 = select i1 %130, i64 -1, i64 %131
  %133 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %132) #9
          to label %134 unwind label %208

134:                                              ; preds = %126
  store ptr %133, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %135 = load i32, ptr %8, align 4, !tbaa !9
  %136 = sext i32 %135 to i64
  %137 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %136, i64 4)
  %138 = extractvalue { i64, i1 } %137, 1
  %139 = extractvalue { i64, i1 } %137, 0
  %140 = select i1 %138, i64 -1, i64 %139
  %141 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %140) #9
          to label %142 unwind label %212

142:                                              ; preds = %134
  store ptr %141, ptr %20, align 8, !tbaa !5
  %143 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 6
  store i32 0, ptr %143, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  store i32 1, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %144 = call ptr @_ZNSt7__cxx114listIN10SimTKIpopt21TripletToCSRConverter12TripletEntryESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #8
  %145 = getelementptr inbounds %"struct.std::_List_iterator", ptr %22, i32 0, i32 0
  store ptr %144, ptr %145, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %15, ptr align 8 %22, i64 8, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  %146 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 2
  %147 = load ptr, ptr %146, align 8, !tbaa !11
  %148 = getelementptr inbounds i32, ptr %147, i64 0
  store i32 0, ptr %148, align 4, !tbaa !9
  %149 = load ptr, ptr %17, align 8, !tbaa !5
  %150 = getelementptr inbounds i32, ptr %149, i64 0
  store i32 1, ptr %150, align 4, !tbaa !9
  %151 = call noundef ptr @_ZNKSt14_List_iteratorIN10SimTKIpopt21TripletToCSRConverter12TripletEntryEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  %152 = invoke noundef i32 @_ZNK10SimTKIpopt21TripletToCSRConverter12TripletEntry10PosTripletEv(ptr noundef nonnull align 4 dereferenceable(12) %151)
          to label %153 unwind label %216

153:                                              ; preds = %142
  %154 = load ptr, ptr %18, align 8, !tbaa !5
  %155 = getelementptr inbounds i32, ptr %154, i64 0
  store i32 %152, ptr %155, align 4, !tbaa !9
  %156 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorIN10SimTKIpopt21TripletToCSRConverter12TripletEntryEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  store i32 0, ptr %23, align 4, !tbaa !9
  br label %157

157:                                              ; preds = %260, %153
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  %158 = call ptr @_ZNSt7__cxx114listIN10SimTKIpopt21TripletToCSRConverter12TripletEntryESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #8
  %159 = getelementptr inbounds %"struct.std::_List_iterator", ptr %24, i32 0, i32 0
  store ptr %158, ptr %159, align 8
  %160 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorIN10SimTKIpopt21TripletToCSRConverter12TripletEntryEES5_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  br i1 %160, label %161, label %263

161:                                              ; preds = %157
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  %162 = call noundef ptr @_ZNKSt14_List_iteratorIN10SimTKIpopt21TripletToCSRConverter12TripletEntryEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  %163 = invoke noundef i32 @_ZNK10SimTKIpopt21TripletToCSRConverter12TripletEntry4IRowEv(ptr noundef nonnull align 4 dereferenceable(12) %162)
          to label %164 unwind label %220

164:                                              ; preds = %161
  store i32 %163, ptr %25, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  %165 = call noundef ptr @_ZNKSt14_List_iteratorIN10SimTKIpopt21TripletToCSRConverter12TripletEntryEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  %166 = invoke noundef i32 @_ZNK10SimTKIpopt21TripletToCSRConverter12TripletEntry4JColEv(ptr noundef nonnull align 4 dereferenceable(12) %165)
          to label %167 unwind label %224

167:                                              ; preds = %164
  store i32 %166, ptr %26, align 4, !tbaa !9
  %168 = load i32, ptr %21, align 4, !tbaa !9
  %169 = load i32, ptr %25, align 4, !tbaa !9
  %170 = icmp eq i32 %168, %169
  br i1 %170, label %171, label %228

171:                                              ; preds = %167
  %172 = load ptr, ptr %17, align 8, !tbaa !5
  %173 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 6
  %174 = load i32, ptr %173, align 8, !tbaa !23
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds i32, ptr %172, i64 %175
  %177 = load i32, ptr %176, align 4, !tbaa !9
  %178 = load i32, ptr %26, align 4, !tbaa !9
  %179 = icmp eq i32 %177, %178
  br i1 %179, label %180, label %228

180:                                              ; preds = %171
  %181 = call noundef ptr @_ZNKSt14_List_iteratorIN10SimTKIpopt21TripletToCSRConverter12TripletEntryEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  %182 = invoke noundef i32 @_ZNK10SimTKIpopt21TripletToCSRConverter12TripletEntry10PosTripletEv(ptr noundef nonnull align 4 dereferenceable(12) %181)
          to label %183 unwind label %224

183:                                              ; preds = %180
  %184 = load ptr, ptr %19, align 8, !tbaa !5
  %185 = load i32, ptr %23, align 4, !tbaa !9
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds i32, ptr %184, i64 %186
  store i32 %182, ptr %187, align 4, !tbaa !9
  %188 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 6
  %189 = load i32, ptr %188, align 8, !tbaa !23
  %190 = load ptr, ptr %20, align 8, !tbaa !5
  %191 = load i32, ptr %23, align 4, !tbaa !9
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds i32, ptr %190, i64 %192
  store i32 %189, ptr %193, align 4, !tbaa !9
  %194 = load i32, ptr %23, align 4, !tbaa !9
  %195 = add nsw i32 %194, 1
  store i32 %195, ptr %23, align 4, !tbaa !9
  br label %260

196:                                              ; preds = %98
  %197 = landingpad { ptr, i32 }
          cleanup
  %198 = extractvalue { ptr, i32 } %197, 0
  store ptr %198, ptr %13, align 8
  %199 = extractvalue { ptr, i32 } %197, 1
  store i32 %199, ptr %14, align 4
  br label %465

200:                                              ; preds = %107, %99
  %201 = landingpad { ptr, i32 }
          cleanup
  %202 = extractvalue { ptr, i32 } %201, 0
  store ptr %202, ptr %13, align 8
  %203 = extractvalue { ptr, i32 } %201, 1
  store i32 %203, ptr %14, align 4
  br label %464

204:                                              ; preds = %117
  %205 = landingpad { ptr, i32 }
          cleanup
  %206 = extractvalue { ptr, i32 } %205, 0
  store ptr %206, ptr %13, align 8
  %207 = extractvalue { ptr, i32 } %205, 1
  store i32 %207, ptr %14, align 4
  br label %463

208:                                              ; preds = %126
  %209 = landingpad { ptr, i32 }
          cleanup
  %210 = extractvalue { ptr, i32 } %209, 0
  store ptr %210, ptr %13, align 8
  %211 = extractvalue { ptr, i32 } %209, 1
  store i32 %211, ptr %14, align 4
  br label %462

212:                                              ; preds = %134
  %213 = landingpad { ptr, i32 }
          cleanup
  %214 = extractvalue { ptr, i32 } %213, 0
  store ptr %214, ptr %13, align 8
  %215 = extractvalue { ptr, i32 } %213, 1
  store i32 %215, ptr %14, align 4
  br label %461

216:                                              ; preds = %142
  %217 = landingpad { ptr, i32 }
          cleanup
  %218 = extractvalue { ptr, i32 } %217, 0
  store ptr %218, ptr %13, align 8
  %219 = extractvalue { ptr, i32 } %217, 1
  store i32 %219, ptr %14, align 4
  br label %460

220:                                              ; preds = %161
  %221 = landingpad { ptr, i32 }
          cleanup
  %222 = extractvalue { ptr, i32 } %221, 0
  store ptr %222, ptr %13, align 8
  %223 = extractvalue { ptr, i32 } %221, 1
  store i32 %223, ptr %14, align 4
  br label %262

224:                                              ; preds = %228, %180, %164
  %225 = landingpad { ptr, i32 }
          cleanup
  %226 = extractvalue { ptr, i32 } %225, 0
  store ptr %226, ptr %13, align 8
  %227 = extractvalue { ptr, i32 } %225, 1
  store i32 %227, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  br label %262

228:                                              ; preds = %171, %167
  %229 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 6
  %230 = load i32, ptr %229, align 8, !tbaa !23
  %231 = add nsw i32 %230, 1
  store i32 %231, ptr %229, align 8, !tbaa !23
  %232 = load i32, ptr %26, align 4, !tbaa !9
  %233 = load ptr, ptr %17, align 8, !tbaa !5
  %234 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 6
  %235 = load i32, ptr %234, align 8, !tbaa !23
  %236 = sext i32 %235 to i64
  %237 = getelementptr inbounds i32, ptr %233, i64 %236
  store i32 %232, ptr %237, align 4, !tbaa !9
  %238 = call noundef ptr @_ZNKSt14_List_iteratorIN10SimTKIpopt21TripletToCSRConverter12TripletEntryEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  %239 = invoke noundef i32 @_ZNK10SimTKIpopt21TripletToCSRConverter12TripletEntry10PosTripletEv(ptr noundef nonnull align 4 dereferenceable(12) %238)
          to label %240 unwind label %224

240:                                              ; preds = %228
  %241 = load ptr, ptr %18, align 8, !tbaa !5
  %242 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 6
  %243 = load i32, ptr %242, align 8, !tbaa !23
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds i32, ptr %241, i64 %244
  store i32 %239, ptr %245, align 4, !tbaa !9
  %246 = load i32, ptr %21, align 4, !tbaa !9
  %247 = load i32, ptr %25, align 4, !tbaa !9
  %248 = icmp ne i32 %246, %247
  br i1 %248, label %249, label %259

249:                                              ; preds = %240
  %250 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 6
  %251 = load i32, ptr %250, align 8, !tbaa !23
  %252 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 2
  %253 = load ptr, ptr %252, align 8, !tbaa !11
  %254 = load i32, ptr %21, align 4, !tbaa !9
  %255 = sext i32 %254 to i64
  %256 = getelementptr inbounds i32, ptr %253, i64 %255
  store i32 %251, ptr %256, align 4, !tbaa !9
  %257 = load i32, ptr %21, align 4, !tbaa !9
  %258 = add nsw i32 %257, 1
  store i32 %258, ptr %21, align 4, !tbaa !9
  br label %259

259:                                              ; preds = %249, %240
  br label %260

260:                                              ; preds = %259, %183
  %261 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorIN10SimTKIpopt21TripletToCSRConverter12TripletEntryEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  br label %157, !llvm.loop !25

262:                                              ; preds = %224, %220
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  br label %459

263:                                              ; preds = %157
  %264 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 6
  %265 = load i32, ptr %264, align 8, !tbaa !23
  %266 = add nsw i32 %265, 1
  store i32 %266, ptr %264, align 8, !tbaa !23
  %267 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 6
  %268 = load i32, ptr %267, align 8, !tbaa !23
  %269 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 2
  %270 = load ptr, ptr %269, align 8, !tbaa !11
  %271 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 4
  %272 = load i32, ptr %271, align 8, !tbaa !19
  %273 = sext i32 %272 to i64
  %274 = getelementptr inbounds i32, ptr %270, i64 %273
  store i32 %268, ptr %274, align 4, !tbaa !9
  %275 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 6
  %276 = load i32, ptr %275, align 8, !tbaa !23
  %277 = sext i32 %276 to i64
  %278 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %277, i64 4)
  %279 = extractvalue { i64, i1 } %278, 1
  %280 = extractvalue { i64, i1 } %278, 0
  %281 = select i1 %279, i64 -1, i64 %280
  %282 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %281) #9
          to label %283 unwind label %295

283:                                              ; preds = %263
  %284 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 3
  store ptr %282, ptr %284, align 8, !tbaa !15
  %285 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 1
  %286 = load i32, ptr %285, align 4, !tbaa !26
  %287 = icmp eq i32 %286, 0
  br i1 %287, label %288, label %315

288:                                              ; preds = %283
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #8
  store i32 0, ptr %27, align 4, !tbaa !9
  br label %289

289:                                              ; preds = %311, %288
  %290 = load i32, ptr %27, align 4, !tbaa !9
  %291 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 6
  %292 = load i32, ptr %291, align 8, !tbaa !23
  %293 = icmp slt i32 %290, %292
  br i1 %293, label %299, label %294

294:                                              ; preds = %289
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  br label %314

295:                                              ; preds = %407, %399, %364, %263
  %296 = landingpad { ptr, i32 }
          cleanup
  %297 = extractvalue { ptr, i32 } %296, 0
  store ptr %297, ptr %13, align 8
  %298 = extractvalue { ptr, i32 } %296, 1
  store i32 %298, ptr %14, align 4
  br label %459

299:                                              ; preds = %289
  %300 = load ptr, ptr %17, align 8, !tbaa !5
  %301 = load i32, ptr %27, align 4, !tbaa !9
  %302 = sext i32 %301 to i64
  %303 = getelementptr inbounds i32, ptr %300, i64 %302
  %304 = load i32, ptr %303, align 4, !tbaa !9
  %305 = sub nsw i32 %304, 1
  %306 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 3
  %307 = load ptr, ptr %306, align 8, !tbaa !15
  %308 = load i32, ptr %27, align 4, !tbaa !9
  %309 = sext i32 %308 to i64
  %310 = getelementptr inbounds i32, ptr %307, i64 %309
  store i32 %305, ptr %310, align 4, !tbaa !9
  br label %311

311:                                              ; preds = %299
  %312 = load i32, ptr %27, align 4, !tbaa !9
  %313 = add nsw i32 %312, 1
  store i32 %313, ptr %27, align 4, !tbaa !9
  br label %289, !llvm.loop !27

314:                                              ; preds = %294
  br label %360

315:                                              ; preds = %283
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #8
  store i32 0, ptr %28, align 4, !tbaa !9
  br label %316

316:                                              ; preds = %333, %315
  %317 = load i32, ptr %28, align 4, !tbaa !9
  %318 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 6
  %319 = load i32, ptr %318, align 8, !tbaa !23
  %320 = icmp slt i32 %317, %319
  br i1 %320, label %322, label %321

321:                                              ; preds = %316
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  br label %336

322:                                              ; preds = %316
  %323 = load ptr, ptr %17, align 8, !tbaa !5
  %324 = load i32, ptr %28, align 4, !tbaa !9
  %325 = sext i32 %324 to i64
  %326 = getelementptr inbounds i32, ptr %323, i64 %325
  %327 = load i32, ptr %326, align 4, !tbaa !9
  %328 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 3
  %329 = load ptr, ptr %328, align 8, !tbaa !15
  %330 = load i32, ptr %28, align 4, !tbaa !9
  %331 = sext i32 %330 to i64
  %332 = getelementptr inbounds i32, ptr %329, i64 %331
  store i32 %327, ptr %332, align 4, !tbaa !9
  br label %333

333:                                              ; preds = %322
  %334 = load i32, ptr %28, align 4, !tbaa !9
  %335 = add nsw i32 %334, 1
  store i32 %335, ptr %28, align 4, !tbaa !9
  br label %316, !llvm.loop !28

336:                                              ; preds = %321
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  store i32 0, ptr %29, align 4, !tbaa !9
  br label %337

337:                                              ; preds = %356, %336
  %338 = load i32, ptr %29, align 4, !tbaa !9
  %339 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 4
  %340 = load i32, ptr %339, align 8, !tbaa !19
  %341 = icmp sle i32 %338, %340
  br i1 %341, label %343, label %342

342:                                              ; preds = %337
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  br label %359

343:                                              ; preds = %337
  %344 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 2
  %345 = load ptr, ptr %344, align 8, !tbaa !11
  %346 = load i32, ptr %29, align 4, !tbaa !9
  %347 = sext i32 %346 to i64
  %348 = getelementptr inbounds i32, ptr %345, i64 %347
  %349 = load i32, ptr %348, align 4, !tbaa !9
  %350 = add nsw i32 %349, 1
  %351 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 2
  %352 = load ptr, ptr %351, align 8, !tbaa !11
  %353 = load i32, ptr %29, align 4, !tbaa !9
  %354 = sext i32 %353 to i64
  %355 = getelementptr inbounds i32, ptr %352, i64 %354
  store i32 %350, ptr %355, align 4, !tbaa !9
  br label %356

356:                                              ; preds = %343
  %357 = load i32, ptr %29, align 4, !tbaa !9
  %358 = add nsw i32 %357, 1
  store i32 %358, ptr %29, align 4, !tbaa !9
  br label %337, !llvm.loop !29

359:                                              ; preds = %342
  br label %360

360:                                              ; preds = %359, %314
  %361 = load ptr, ptr %17, align 8, !tbaa !5
  %362 = icmp eq ptr %361, null
  br i1 %362, label %364, label %363

363:                                              ; preds = %360
  call void @_ZdaPv(ptr noundef %361) #7
  br label %364

364:                                              ; preds = %363, %360
  %365 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 6
  %366 = load i32, ptr %365, align 8, !tbaa !23
  %367 = sext i32 %366 to i64
  %368 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %367, i64 4)
  %369 = extractvalue { i64, i1 } %368, 1
  %370 = extractvalue { i64, i1 } %368, 0
  %371 = select i1 %369, i64 -1, i64 %370
  %372 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %371) #9
          to label %373 unwind label %295

373:                                              ; preds = %364
  %374 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 8
  store ptr %372, ptr %374, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #8
  store i32 0, ptr %30, align 4, !tbaa !9
  br label %375

375:                                              ; preds = %392, %373
  %376 = load i32, ptr %30, align 4, !tbaa !9
  %377 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 6
  %378 = load i32, ptr %377, align 8, !tbaa !23
  %379 = icmp slt i32 %376, %378
  br i1 %379, label %381, label %380

380:                                              ; preds = %375
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  br label %395

381:                                              ; preds = %375
  %382 = load ptr, ptr %18, align 8, !tbaa !5
  %383 = load i32, ptr %30, align 4, !tbaa !9
  %384 = sext i32 %383 to i64
  %385 = getelementptr inbounds i32, ptr %382, i64 %384
  %386 = load i32, ptr %385, align 4, !tbaa !9
  %387 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 8
  %388 = load ptr, ptr %387, align 8, !tbaa !16
  %389 = load i32, ptr %30, align 4, !tbaa !9
  %390 = sext i32 %389 to i64
  %391 = getelementptr inbounds i32, ptr %388, i64 %390
  store i32 %386, ptr %391, align 4, !tbaa !9
  br label %392

392:                                              ; preds = %381
  %393 = load i32, ptr %30, align 4, !tbaa !9
  %394 = add nsw i32 %393, 1
  store i32 %394, ptr %30, align 4, !tbaa !9
  br label %375, !llvm.loop !30

395:                                              ; preds = %380
  %396 = load ptr, ptr %18, align 8, !tbaa !5
  %397 = icmp eq ptr %396, null
  br i1 %397, label %399, label %398

398:                                              ; preds = %395
  call void @_ZdaPv(ptr noundef %396) #7
  br label %399

399:                                              ; preds = %398, %395
  %400 = load i32, ptr %23, align 4, !tbaa !9
  %401 = sext i32 %400 to i64
  %402 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %401, i64 4)
  %403 = extractvalue { i64, i1 } %402, 1
  %404 = extractvalue { i64, i1 } %402, 0
  %405 = select i1 %403, i64 -1, i64 %404
  %406 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %405) #9
          to label %407 unwind label %295

407:                                              ; preds = %399
  %408 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 9
  store ptr %406, ptr %408, align 8, !tbaa !17
  %409 = load i32, ptr %23, align 4, !tbaa !9
  %410 = sext i32 %409 to i64
  %411 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %410, i64 4)
  %412 = extractvalue { i64, i1 } %411, 1
  %413 = extractvalue { i64, i1 } %411, 0
  %414 = select i1 %412, i64 -1, i64 %413
  %415 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %414) #9
          to label %416 unwind label %295

416:                                              ; preds = %407
  %417 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 10
  store ptr %415, ptr %417, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #8
  store i32 0, ptr %31, align 4, !tbaa !9
  br label %418

418:                                              ; preds = %444, %416
  %419 = load i32, ptr %31, align 4, !tbaa !9
  %420 = load i32, ptr %23, align 4, !tbaa !9
  %421 = icmp slt i32 %419, %420
  br i1 %421, label %423, label %422

422:                                              ; preds = %418
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  br label %447

423:                                              ; preds = %418
  %424 = load ptr, ptr %19, align 8, !tbaa !5
  %425 = load i32, ptr %31, align 4, !tbaa !9
  %426 = sext i32 %425 to i64
  %427 = getelementptr inbounds i32, ptr %424, i64 %426
  %428 = load i32, ptr %427, align 4, !tbaa !9
  %429 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 9
  %430 = load ptr, ptr %429, align 8, !tbaa !17
  %431 = load i32, ptr %31, align 4, !tbaa !9
  %432 = sext i32 %431 to i64
  %433 = getelementptr inbounds i32, ptr %430, i64 %432
  store i32 %428, ptr %433, align 4, !tbaa !9
  %434 = load ptr, ptr %20, align 8, !tbaa !5
  %435 = load i32, ptr %31, align 4, !tbaa !9
  %436 = sext i32 %435 to i64
  %437 = getelementptr inbounds i32, ptr %434, i64 %436
  %438 = load i32, ptr %437, align 4, !tbaa !9
  %439 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 10
  %440 = load ptr, ptr %439, align 8, !tbaa !18
  %441 = load i32, ptr %31, align 4, !tbaa !9
  %442 = sext i32 %441 to i64
  %443 = getelementptr inbounds i32, ptr %440, i64 %442
  store i32 %438, ptr %443, align 4, !tbaa !9
  br label %444

444:                                              ; preds = %423
  %445 = load i32, ptr %31, align 4, !tbaa !9
  %446 = add nsw i32 %445, 1
  store i32 %446, ptr %31, align 4, !tbaa !9
  br label %418, !llvm.loop !31

447:                                              ; preds = %422
  %448 = load ptr, ptr %19, align 8, !tbaa !5
  %449 = icmp eq ptr %448, null
  br i1 %449, label %451, label %450

450:                                              ; preds = %447
  call void @_ZdaPv(ptr noundef %448) #7
  br label %451

451:                                              ; preds = %450, %447
  %452 = load ptr, ptr %20, align 8, !tbaa !5
  %453 = icmp eq ptr %452, null
  br i1 %453, label %455, label %454

454:                                              ; preds = %451
  call void @_ZdaPv(ptr noundef %452) #7
  br label %455

455:                                              ; preds = %454, %451
  %456 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 7
  store i8 1, ptr %456, align 4, !tbaa !32
  %457 = getelementptr inbounds %"class.SimTKIpopt::TripletToCSRConverter", ptr %32, i32 0, i32 6
  %458 = load i32, ptr %457, align 8, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @_ZNSt7__cxx1110_List_baseIN10SimTKIpopt21TripletToCSRConverter12TripletEntryESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #8
  ret i32 %458

459:                                              ; preds = %295, %262
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %460

460:                                              ; preds = %459, %216
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %461

461:                                              ; preds = %460, %212
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  br label %462

462:                                              ; preds = %461, %208
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  br label %463

463:                                              ; preds = %462, %204
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  br label %464

464:                                              ; preds = %463, %200
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %465

465:                                              ; preds = %464, %196, %94
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @_ZNSt7__cxx1110_List_baseIN10SimTKIpopt21TripletToCSRConverter12TripletEntryESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #8
  br label %466

466:                                              ; preds = %465, %72
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #8
  br label %467

467:                                              ; preds = %466
  %468 = load ptr, ptr %13, align 8
  %469 = load i32, ptr %14, align 4
  %470 = insertvalue { ptr, i32 } poison, ptr %468, 0
  %471 = insertvalue { ptr, i32 } %470, i32 %469, 1
  resume { ptr, i32 } %471
}

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10SimTKIpopt21TripletToCSRConverter12TripletEntry3SetEiii(ptr noundef nonnull align 4 dereferenceable(12), i32 noundef, i32 noundef, i32 noundef) #3 align 2

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

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK10SimTKIpopt21TripletToCSRConverter12TripletEntry10PosTripletEv(ptr noundef nonnull align 4 dereferenceable(12)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt14_List_iteratorIN10SimTKIpopt21TripletToCSRConverter12TripletEntryEES5_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK10SimTKIpopt21TripletToCSRConverter12TripletEntry4IRowEv(ptr noundef nonnull align 4 dereferenceable(12)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK10SimTKIpopt21TripletToCSRConverter12TripletEntry4JColEv(ptr noundef nonnull align 4 dereferenceable(12)) #3 align 2

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

attributes #0 = { 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 #1 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { builtin nounwind }
attributes #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }

!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 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 16}
!12 = !{!"_ZTSN10SimTKIpopt21TripletToCSRConverterE", !13, i64 0, !10, i64 12, !6, i64 16, !6, i64 24, !10, i64 32, !10, i64 36, !10, i64 40, !14, i64 44, !6, i64 48, !6, i64 56, !6, i64 64}
!13 = !{!"_ZTSN10SimTKIpopt16ReferencedObjectE", !10, i64 8}
!14 = !{!"bool", !7, i64 0}
!15 = !{!12, !6, i64 24}
!16 = !{!12, !6, i64 48}
!17 = !{!12, !6, i64 56}
!18 = !{!12, !6, i64 64}
!19 = !{!12, !10, i64 32}
!20 = !{!12, !10, i64 36}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!12, !10, i64 40}
!24 = !{i64 0, i64 8, !5}
!25 = distinct !{!25, !22}
!26 = !{!12, !10, i64 12}
!27 = distinct !{!27, !22}
!28 = distinct !{!28, !22}
!29 = distinct !{!29, !22}
!30 = distinct !{!30, !22}
!31 = distinct !{!31, !22}
!32 = !{!12, !14, i64 44}


; 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::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<SimTKIpopt::TripletToCSRConverter::TripletEntry, std::allocator<SimTKIpopt::TripletToCSRConverter::TripletEntry>>::_List_impl" }
%"struct.std::__cxx11::_List_base<SimTKIpopt::TripletToCSRConverter::TripletEntry, std::allocator<SimTKIpopt::TripletToCSRConverter::TripletEntry>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%"class.std::allocator.0" = type { i8 }
%"struct.std::_List_iterator" = type { ptr }

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN10SimTKIpopt21TripletToCSRConverter19InitializeConverterEiiPKiS2_(ptr nocapture noundef nonnull align 8 dereferenceable(72) %0, i32 noundef %1, i32 noundef %2, ptr nocapture noundef readonly %3, ptr nocapture noundef readonly %4) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"class.std::__cxx11::list", align 8
  %7 = alloca %"class.std::allocator.0", align 1
  %8 = alloca %"struct.std::_List_iterator", align 8
  %9 = alloca %"struct.std::_List_iterator", align 8
  %10 = getelementptr inbounds i8, ptr %0, i64 16
  %11 = load ptr, ptr %10, align 8, !tbaa !5
  %12 = icmp eq ptr %11, null
  br i1 %12, label %14, label %13

13:                                               ; preds = %5
  tail call void @_ZdaPv(ptr noundef nonnull %11) #6
  br label %14

14:                                               ; preds = %13, %5
  %15 = getelementptr inbounds i8, ptr %0, i64 24
  %16 = load ptr, ptr %15, align 8, !tbaa !13
  %17 = icmp eq ptr %16, null
  br i1 %17, label %19, label %18

18:                                               ; preds = %14
  tail call void @_ZdaPv(ptr noundef nonnull %16) #6
  br label %19

19:                                               ; preds = %18, %14
  %20 = getelementptr inbounds i8, ptr %0, i64 48
  %21 = load ptr, ptr %20, align 8, !tbaa !14
  %22 = icmp eq ptr %21, null
  br i1 %22, label %24, label %23

23:                                               ; preds = %19
  tail call void @_ZdaPv(ptr noundef nonnull %21) #6
  br label %24

24:                                               ; preds = %23, %19
  %25 = getelementptr inbounds i8, ptr %0, i64 56
  %26 = load ptr, ptr %25, align 8, !tbaa !15
  %27 = icmp eq ptr %26, null
  br i1 %27, label %29, label %28

28:                                               ; preds = %24
  tail call void @_ZdaPv(ptr noundef nonnull %26) #6
  br label %29

29:                                               ; preds = %28, %24
  %30 = getelementptr inbounds i8, ptr %0, i64 64
  %31 = load ptr, ptr %30, align 8, !tbaa !16
  %32 = icmp eq ptr %31, null
  br i1 %32, label %34, label %33

33:                                               ; preds = %29
  tail call void @_ZdaPv(ptr noundef nonnull %31) #6
  br label %34

34:                                               ; preds = %33, %29
  %35 = getelementptr inbounds i8, ptr %0, i64 32
  store i32 %1, ptr %35, align 8, !tbaa !17
  %36 = getelementptr inbounds i8, ptr %0, i64 36
  store i32 %2, ptr %36, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #7
  %37 = sext i32 %2 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #7
  call void @_ZNSaIN10SimTKIpopt21TripletToCSRConverter12TripletEntryEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  invoke void @_ZNSt7__cxx114listIN10SimTKIpopt21TripletToCSRConverter12TripletEntryESaIS3_EEC2EmRKS4_(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %37, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %38 unwind label %41

38:                                               ; preds = %34
  call void @_ZNSt15__new_allocatorIN10SimTKIpopt21TripletToCSRConverter12TripletEntryEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %39 = call ptr @_ZNSt7__cxx114listIN10SimTKIpopt21TripletToCSRConverter12TripletEntryESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  store ptr %39, ptr %8, align 8
  %40 = icmp sgt i32 %2, 0
  br i1 %40, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %38
  %wide.trip.count = zext nneg i32 %2 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %38
  invoke void @_ZNSt7__cxx114listIN10SimTKIpopt21TripletToCSRConverter12TripletEntryESaIS3_EE4sortEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %50 unwind label %96

41:                                               ; preds = %34
  %42 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIN10SimTKIpopt21TripletToCSRConverter12TripletEntryEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #7
  br label %186

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %43 = call noundef ptr @_ZNKSt14_List_iteratorIN10SimTKIpopt21TripletToCSRConverter12TripletEntryEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  %44 = getelementptr inbounds i32, ptr %3, i64 %indvars.iv
  %45 = load i32, ptr %44, align 4, !tbaa !19
  %46 = getelementptr inbounds i32, ptr %4, i64 %indvars.iv
  %47 = load i32, ptr %46, align 4, !tbaa !19
  %48 = trunc nuw nsw i64 %indvars.iv to i32
  call void @_ZN10SimTKIpopt21TripletToCSRConverter12TripletEntry3SetEiii(ptr noundef nonnull align 4 dereferenceable(12) %43, i32 noundef %45, i32 noundef %47, i32 noundef %48)
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorIN10SimTKIpopt21TripletToCSRConverter12TripletEntryEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !20

50:                                               ; preds = %._crit_edge
  %51 = icmp slt i32 %2, 0
  %52 = shl nsw i64 %37, 2
  %53 = select i1 %51, i64 -1, i64 %52
  %54 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %53) #8
          to label %55 unwind label %98

55:                                               ; preds = %50
  %56 = load i32, ptr %35, align 8, !tbaa !17
  %57 = add nsw i32 %56, 1
  %58 = sext i32 %57 to i64
  %59 = icmp slt i32 %56, -1
  %60 = shl nsw i64 %58, 2
  %61 = select i1 %59, i64 -1, i64 %60
  %62 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %61) #8
          to label %63 unwind label %98

63:                                               ; preds = %55
  store ptr %62, ptr %10, align 8, !tbaa !5
  %64 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %53) #8
          to label %65 unwind label %100

65:                                               ; preds = %63
  %66 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %53) #8
          to label %67 unwind label %102

67:                                               ; preds = %65
  %68 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %53) #8
          to label %69 unwind label %104

69:                                               ; preds = %67
  %70 = getelementptr inbounds i8, ptr %0, i64 40
  store i32 0, ptr %70, align 8, !tbaa !22
  %71 = call ptr @_ZNSt7__cxx114listIN10SimTKIpopt21TripletToCSRConverter12TripletEntryESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  store ptr %71, ptr %8, align 8, !tbaa !23
  %72 = load ptr, ptr %10, align 8, !tbaa !5
  store i32 0, ptr %72, align 4, !tbaa !19
  store i32 1, ptr %54, align 4, !tbaa !19
  %73 = call noundef ptr @_ZNKSt14_List_iteratorIN10SimTKIpopt21TripletToCSRConverter12TripletEntryEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  %74 = call noundef i32 @_ZNK10SimTKIpopt21TripletToCSRConverter12TripletEntry10PosTripletEv(ptr noundef nonnull align 4 dereferenceable(12) %73)
  store i32 %74, ptr %64, align 4, !tbaa !19
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorIN10SimTKIpopt21TripletToCSRConverter12TripletEntryEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %76 = call ptr @_ZNSt7__cxx114listIN10SimTKIpopt21TripletToCSRConverter12TripletEntryESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  store ptr %76, ptr %9, align 8
  %77 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorIN10SimTKIpopt21TripletToCSRConverter12TripletEntryEES5_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  br i1 %77, label %.lr.ph104, label %._crit_edge105

.lr.ph104:                                        ; preds = %69, %120
  %.080102 = phi i32 [ %.181, %120 ], [ 0, %69 ]
  %.083101 = phi i32 [ %.184, %120 ], [ 1, %69 ]
  %78 = call noundef ptr @_ZNKSt14_List_iteratorIN10SimTKIpopt21TripletToCSRConverter12TripletEntryEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  %79 = call noundef i32 @_ZNK10SimTKIpopt21TripletToCSRConverter12TripletEntry4IRowEv(ptr noundef nonnull align 4 dereferenceable(12) %78)
  %80 = call noundef ptr @_ZNKSt14_List_iteratorIN10SimTKIpopt21TripletToCSRConverter12TripletEntryEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  %81 = call noundef i32 @_ZNK10SimTKIpopt21TripletToCSRConverter12TripletEntry4JColEv(ptr noundef nonnull align 4 dereferenceable(12) %80)
  %82 = icmp eq i32 %.083101, %79
  %.pre = load i32, ptr %70, align 8, !tbaa !22
  br i1 %82, label %83, label %106

83:                                               ; preds = %.lr.ph104
  %84 = sext i32 %.pre to i64
  %85 = getelementptr inbounds i32, ptr %54, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !19
  %87 = icmp eq i32 %86, %81
  br i1 %87, label %88, label %106

88:                                               ; preds = %83
  %89 = call noundef ptr @_ZNKSt14_List_iteratorIN10SimTKIpopt21TripletToCSRConverter12TripletEntryEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  %90 = call noundef i32 @_ZNK10SimTKIpopt21TripletToCSRConverter12TripletEntry10PosTripletEv(ptr noundef nonnull align 4 dereferenceable(12) %89)
  %91 = sext i32 %.080102 to i64
  %92 = getelementptr inbounds i32, ptr %66, i64 %91
  store i32 %90, ptr %92, align 4, !tbaa !19
  %93 = load i32, ptr %70, align 8, !tbaa !22
  %94 = getelementptr inbounds i32, ptr %68, i64 %91
  store i32 %93, ptr %94, align 4, !tbaa !19
  %95 = add nsw i32 %.080102, 1
  br label %120

96:                                               ; preds = %._crit_edge
  %97 = landingpad { ptr, i32 }
          cleanup
  br label %185

98:                                               ; preds = %55, %50
  %99 = landingpad { ptr, i32 }
          cleanup
  br label %185

100:                                              ; preds = %63
  %101 = landingpad { ptr, i32 }
          cleanup
  br label %185

102:                                              ; preds = %65
  %103 = landingpad { ptr, i32 }
          cleanup
  br label %185

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

106:                                              ; preds = %83, %.lr.ph104
  %107 = add nsw i32 %.pre, 1
  store i32 %107, ptr %70, align 8, !tbaa !22
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds i32, ptr %54, i64 %108
  store i32 %81, ptr %109, align 4, !tbaa !19
  %110 = call noundef ptr @_ZNKSt14_List_iteratorIN10SimTKIpopt21TripletToCSRConverter12TripletEntryEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  %111 = call noundef i32 @_ZNK10SimTKIpopt21TripletToCSRConverter12TripletEntry10PosTripletEv(ptr noundef nonnull align 4 dereferenceable(12) %110)
  %112 = load i32, ptr %70, align 8, !tbaa !22
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds i32, ptr %64, i64 %113
  store i32 %111, ptr %114, align 4, !tbaa !19
  br i1 %82, label %120, label %115

115:                                              ; preds = %106
  %116 = load ptr, ptr %10, align 8, !tbaa !5
  %117 = sext i32 %.083101 to i64
  %118 = getelementptr inbounds i32, ptr %116, i64 %117
  store i32 %112, ptr %118, align 4, !tbaa !19
  %119 = add nsw i32 %.083101, 1
  br label %120

120:                                              ; preds = %106, %115, %88
  %.184 = phi i32 [ %.083101, %88 ], [ %119, %115 ], [ %.083101, %106 ]
  %.181 = phi i32 [ %95, %88 ], [ %.080102, %115 ], [ %.080102, %106 ]
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorIN10SimTKIpopt21TripletToCSRConverter12TripletEntryEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %122 = call ptr @_ZNSt7__cxx114listIN10SimTKIpopt21TripletToCSRConverter12TripletEntryESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  store ptr %122, ptr %9, align 8
  %123 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorIN10SimTKIpopt21TripletToCSRConverter12TripletEntryEES5_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  br i1 %123, label %.lr.ph104, label %._crit_edge105, !llvm.loop !24

._crit_edge105:                                   ; preds = %120, %69
  %.080.lcssa = phi i32 [ 0, %69 ], [ %.181, %120 ]
  %124 = load i32, ptr %70, align 8, !tbaa !22
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %70, align 8, !tbaa !22
  %126 = load ptr, ptr %10, align 8, !tbaa !5
  %127 = load i32, ptr %35, align 8, !tbaa !17
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds i32, ptr %126, i64 %128
  store i32 %125, ptr %129, align 4, !tbaa !19
  %130 = load i32, ptr %70, align 8, !tbaa !22
  %131 = sext i32 %130 to i64
  %132 = icmp slt i32 %130, 0
  %133 = shl nsw i64 %131, 2
  %134 = select i1 %132, i64 -1, i64 %133
  %135 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %134) #8
          to label %136 unwind label %150

136:                                              ; preds = %._crit_edge105
  store ptr %135, ptr %15, align 8, !tbaa !13
  %137 = getelementptr inbounds i8, ptr %0, i64 12
  %138 = load i32, ptr %137, align 4, !tbaa !25
  %139 = icmp eq i32 %138, 0
  %140 = icmp sgt i32 %130, 0
  br i1 %139, label %.preheader, label %.preheader99

.preheader99:                                     ; preds = %136
  br i1 %140, label %.lr.ph107.preheader, label %.preheader97

.lr.ph107.preheader:                              ; preds = %.preheader99
  %141 = zext nneg i32 %130 to i64
  %142 = shl nuw nsw i64 %141, 2
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %135, ptr nonnull align 4 %54, i64 %142, i1 false), !tbaa !19
  br label %.preheader97

.preheader:                                       ; preds = %136
  br i1 %140, label %.lr.ph112.preheader, label %.loopexit

.lr.ph112.preheader:                              ; preds = %.preheader
  %wide.trip.count132 = zext nneg i32 %130 to i64
  %min.iters.check = icmp ult i32 %130, 8
  br i1 %min.iters.check, label %.lr.ph112.preheader143, label %vector.ph

.lr.ph112.preheader143:                           ; preds = %middle.block, %.lr.ph112.preheader
  %indvars.iv129.ph = phi i64 [ 0, %.lr.ph112.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph112

vector.ph:                                        ; preds = %.lr.ph112.preheader
  %n.vec = and i64 %wide.trip.count132, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %143 = getelementptr inbounds i32, ptr %54, i64 %index
  %144 = getelementptr inbounds i8, ptr %143, i64 16
  %wide.load = load <4 x i32>, ptr %143, align 4, !tbaa !19
  %wide.load142 = load <4 x i32>, ptr %144, align 4, !tbaa !19
  %145 = add nsw <4 x i32> %wide.load, <i32 -1, i32 -1, i32 -1, i32 -1>
  %146 = add nsw <4 x i32> %wide.load142, <i32 -1, i32 -1, i32 -1, i32 -1>
  %147 = getelementptr inbounds i32, ptr %135, i64 %index
  %148 = getelementptr inbounds i8, ptr %147, i64 16
  store <4 x i32> %145, ptr %147, align 4, !tbaa !19
  store <4 x i32> %146, ptr %148, align 4, !tbaa !19
  %index.next = add nuw i64 %index, 8
  %149 = icmp eq i64 %index.next, %n.vec
  br i1 %149, label %middle.block, label %vector.body, !llvm.loop !26

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count132
  br i1 %cmp.n, label %.loopexit, label %.lr.ph112.preheader143

150:                                              ; preds = %177, %._crit_edge116, %.loopexit, %._crit_edge105
  %151 = landingpad { ptr, i32 }
          cleanup
  br label %185

.lr.ph112:                                        ; preds = %.lr.ph112.preheader143, %.lr.ph112
  %indvars.iv129 = phi i64 [ %indvars.iv.next130, %.lr.ph112 ], [ %indvars.iv129.ph, %.lr.ph112.preheader143 ]
  %152 = getelementptr inbounds i32, ptr %54, i64 %indvars.iv129
  %153 = load i32, ptr %152, align 4, !tbaa !19
  %154 = add nsw i32 %153, -1
  %155 = getelementptr inbounds i32, ptr %135, i64 %indvars.iv129
  store i32 %154, ptr %155, align 4, !tbaa !19
  %indvars.iv.next130 = add nuw nsw i64 %indvars.iv129, 1
  %exitcond133.not = icmp eq i64 %indvars.iv.next130, %wide.trip.count132
  br i1 %exitcond133.not, label %.loopexit, label %.lr.ph112, !llvm.loop !29

.preheader97:                                     ; preds = %.lr.ph107.preheader, %.preheader99
  %156 = load i32, ptr %35, align 8, !tbaa !17
  %.not108 = icmp slt i32 %156, 0
  br i1 %.not108, label %.loopexit, label %.lr.ph110

.lr.ph110:                                        ; preds = %.preheader97, %.lr.ph110
  %indvars.iv126 = phi i64 [ %indvars.iv.next127, %.lr.ph110 ], [ 0, %.preheader97 ]
  %157 = getelementptr inbounds i32, ptr %126, i64 %indvars.iv126
  %158 = load i32, ptr %157, align 4, !tbaa !19
  %159 = add nsw i32 %158, 1
  store i32 %159, ptr %157, align 4, !tbaa !19
  %indvars.iv.next127 = add nuw nsw i64 %indvars.iv126, 1
  %160 = load i32, ptr %35, align 8, !tbaa !17
  %161 = sext i32 %160 to i64
  %.not.not = icmp slt i64 %indvars.iv126, %161
  br i1 %.not.not, label %.lr.ph110, label %.loopexit, !llvm.loop !30

.loopexit:                                        ; preds = %.lr.ph110, %.lr.ph112, %middle.block, %.preheader97, %.preheader
  call void @_ZdaPv(ptr noundef nonnull %54) #6
  %162 = load i32, ptr %70, align 8, !tbaa !22
  %163 = sext i32 %162 to i64
  %164 = icmp slt i32 %162, 0
  %165 = shl nsw i64 %163, 2
  %166 = select i1 %164, i64 -1, i64 %165
  %167 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %166) #8
          to label %168 unwind label %150

168:                                              ; preds = %.loopexit
  store ptr %167, ptr %20, align 8, !tbaa !14
  %169 = icmp sgt i32 %162, 0
  br i1 %169, label %.lr.ph115.preheader, label %._crit_edge116

.lr.ph115.preheader:                              ; preds = %168
  %170 = zext nneg i32 %162 to i64
  %171 = shl nuw nsw i64 %170, 2
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %167, ptr nonnull align 4 %64, i64 %171, i1 false), !tbaa !19
  br label %._crit_edge116

._crit_edge116:                                   ; preds = %.lr.ph115.preheader, %168
  call void @_ZdaPv(ptr noundef nonnull %64) #6
  %172 = sext i32 %.080.lcssa to i64
  %173 = icmp slt i32 %.080.lcssa, 0
  %174 = shl nsw i64 %172, 2
  %175 = select i1 %173, i64 -1, i64 %174
  %176 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %175) #8
          to label %177 unwind label %150

177:                                              ; preds = %._crit_edge116
  store ptr %176, ptr %25, align 8, !tbaa !15
  %178 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %175) #8
          to label %179 unwind label %150

179:                                              ; preds = %177
  store ptr %178, ptr %30, align 8, !tbaa !16
  %180 = icmp sgt i32 %.080.lcssa, 0
  br i1 %180, label %.lr.ph119.preheader, label %._crit_edge120

.lr.ph119.preheader:                              ; preds = %179
  %181 = zext nneg i32 %.080.lcssa to i64
  %182 = shl nuw nsw i64 %181, 2
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %176, ptr nonnull align 4 %66, i64 %182, i1 false), !tbaa !19
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %178, ptr nonnull align 4 %68, i64 %182, i1 false), !tbaa !19
  br label %._crit_edge120

._crit_edge120:                                   ; preds = %.lr.ph119.preheader, %179
  call void @_ZdaPv(ptr noundef nonnull %66) #6
  call void @_ZdaPv(ptr noundef nonnull %68) #6
  %183 = getelementptr inbounds i8, ptr %0, i64 44
  store i8 1, ptr %183, align 4, !tbaa !31
  %184 = load i32, ptr %70, align 8, !tbaa !22
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @_ZNSt7__cxx1110_List_baseIN10SimTKIpopt21TripletToCSRConverter12TripletEntryESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  ret i32 %184

185:                                              ; preds = %98, %102, %150, %104, %100, %96
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %97, %96 ], [ %99, %98 ], [ %101, %100 ], [ %103, %102 ], [ %151, %150 ], [ %105, %104 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @_ZNSt7__cxx1110_List_baseIN10SimTKIpopt21TripletToCSRConverter12TripletEntryESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  br label %186

186:                                              ; preds = %185, %41
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %185 ], [ %42, %41 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  resume { ptr, i32 } %.pn.pn.pn.pn.pn.pn
}

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10SimTKIpopt21TripletToCSRConverter12TripletEntry3SetEiii(ptr noundef nonnull align 4 dereferenceable(12), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK10SimTKIpopt21TripletToCSRConverter12TripletEntry10PosTripletEv(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt14_List_iteratorIN10SimTKIpopt21TripletToCSRConverter12TripletEntryEES5_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK10SimTKIpopt21TripletToCSRConverter12TripletEntry4IRowEv(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK10SimTKIpopt21TripletToCSRConverter12TripletEntry4JColEv(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #3 align 2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

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

!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, !11, i64 16}
!6 = !{!"_ZTSN10SimTKIpopt21TripletToCSRConverterE", !7, i64 0, !8, i64 12, !11, i64 16, !11, i64 24, !8, i64 32, !8, i64 36, !8, i64 40, !12, i64 44, !11, i64 48, !11, i64 56, !11, i64 64}
!7 = !{!"_ZTSN10SimTKIpopt16ReferencedObjectE", !8, i64 8}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!"bool", !9, i64 0}
!13 = !{!6, !11, i64 24}
!14 = !{!6, !11, i64 48}
!15 = !{!6, !11, i64 56}
!16 = !{!6, !11, i64 64}
!17 = !{!6, !8, i64 32}
!18 = !{!6, !8, i64 36}
!19 = !{!8, !8, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!6, !8, i64 40}
!23 = !{!11, !11, i64 0}
!24 = distinct !{!24, !21}
!25 = !{!6, !8, i64 12}
!26 = distinct !{!26, !21, !27, !28}
!27 = !{!"llvm.loop.isvectorized", i32 1}
!28 = !{!"llvm.loop.unroll.runtime.disable"}
!29 = distinct !{!29, !21, !28, !27}
!30 = distinct !{!30, !21}
!31 = !{!6, !12, i64 44}


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