; LLVM IR from Xingyu-Lin/softgym :: PyFlex/extensions (flexExtCloth)

; 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.ClothMesh = type <{ %"class.std::vector.0", %"class.std::vector.5", %"class.std::vector.5", %"class.std::vector.10", %"class.std::vector.15", i32, float, float, i8, [3 x i8] }>
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<ClothMesh::Edge, std::allocator<ClothMesh::Edge>>::_Vector_impl" }
%"struct.std::_Vector_base<ClothMesh::Edge, std::allocator<ClothMesh::Edge>>::_Vector_impl" = type { %"struct.std::_Vector_base<ClothMesh::Edge, std::allocator<ClothMesh::Edge>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ClothMesh::Edge, std::allocator<ClothMesh::Edge>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = type { %"struct.std::_Vector_base<ClothMesh::Triangle, std::allocator<ClothMesh::Triangle>>::_Vector_impl" }
%"struct.std::_Vector_base<ClothMesh::Triangle, std::allocator<ClothMesh::Triangle>>::_Vector_impl" = type { %"struct.std::_Vector_base<ClothMesh::Triangle, std::allocator<ClothMesh::Triangle>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ClothMesh::Triangle, std::allocator<ClothMesh::Triangle>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.XVector3 = type { float, float, float }
%struct.NvFlexExtAsset = type { ptr, i32, i32, ptr, ptr, ptr, i32, ptr, i32, ptr, ptr, ptr, i32, ptr, ptr, ptr, i32, i8, float, float, float }
%class.XVector4 = type { float, float, float, float }

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #0

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

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) #1

; 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) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZNK8XVector3IfEmiERKS0_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local ptr @NvFlexExtCreateClothFromMesh(ptr noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %3, float noundef %4, float noundef %5, float noundef %6, float noundef %7, float noundef %8) #4 personality ptr @__gxx_personality_v0 {
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca float, align 4
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca float, align 4
  %20 = alloca ptr, align 8
  %21 = alloca %class.ClothMesh, align 8
  %22 = alloca %"class.std::vector.0", align 8
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca ptr, align 8
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca ptr, align 8
  %30 = alloca float, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca ptr, align 8
  %34 = alloca float, align 4
  %35 = alloca %class.XVector3, align 4
  %36 = alloca %class.XVector3, align 4
  %37 = alloca %class.XVector3, align 4
  %38 = alloca { <2 x float>, float }, align 8
  %39 = alloca { <2 x float>, float }, align 4
  %40 = alloca float, align 4
  %41 = alloca float, align 4
  %42 = alloca i32, align 4
  %43 = alloca i32, align 4
  store ptr %0, ptr %11, align 8, !tbaa !5
  store i32 %1, ptr %12, align 4, !tbaa !9
  store ptr %2, ptr %13, align 8, !tbaa !5
  store i32 %3, ptr %14, align 4, !tbaa !9
  store float %4, ptr %15, align 4, !tbaa !11
  store float %5, ptr %16, align 4, !tbaa !11
  store float %6, ptr %17, align 4, !tbaa !11
  store float %7, ptr %18, align 4, !tbaa !11
  store float %8, ptr %19, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #13
  %44 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 144) #14
  call void @llvm.memset.p0.i64(ptr align 16 %44, i8 0, i64 144, i1 false)
  store ptr %44, ptr %20, align 8, !tbaa !5
  %45 = load ptr, ptr %20, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 8 %45, i8 0, i64 144, i1 false)
  %46 = load i32, ptr %12, align 4, !tbaa !9
  %47 = mul nsw i32 %46, 4
  %48 = sext i32 %47 to i64
  %49 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %48, i64 4)
  %50 = extractvalue { i64, i1 } %49, 1
  %51 = extractvalue { i64, i1 } %49, 0
  %52 = select i1 %50, i64 -1, i64 %51
  %53 = call noalias noundef nonnull ptr @_Znam(i64 noundef %52) #14
  %54 = load ptr, ptr %20, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.NvFlexExtAsset, ptr %54, i32 0, i32 0
  store ptr %53, ptr %55, align 8, !tbaa !13
  %56 = load ptr, ptr %20, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.NvFlexExtAsset, ptr %56, i32 0, i32 0
  %58 = load ptr, ptr %57, align 8, !tbaa !13
  %59 = load ptr, ptr %11, align 8, !tbaa !5
  %60 = load i32, ptr %12, align 4, !tbaa !9
  %61 = sext i32 %60 to i64
  %62 = mul i64 %61, 4
  %63 = mul i64 %62, 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %58, ptr align 4 %59, i64 %63, i1 false)
  %64 = load i32, ptr %14, align 4, !tbaa !9
  %65 = mul nsw i32 %64, 3
  %66 = sext i32 %65 to i64
  %67 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %66, i64 4)
  %68 = extractvalue { i64, i1 } %67, 1
  %69 = extractvalue { i64, i1 } %67, 0
  %70 = select i1 %68, i64 -1, i64 %69
  %71 = call noalias noundef nonnull ptr @_Znam(i64 noundef %70) #14
  %72 = load ptr, ptr %20, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.NvFlexExtAsset, ptr %72, i32 0, i32 15
  store ptr %71, ptr %73, align 8, !tbaa !16
  %74 = load ptr, ptr %20, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.NvFlexExtAsset, ptr %74, i32 0, i32 15
  %76 = load ptr, ptr %75, align 8, !tbaa !16
  %77 = load ptr, ptr %13, align 8, !tbaa !5
  %78 = load i32, ptr %14, align 4, !tbaa !9
  %79 = mul nsw i32 %78, 3
  %80 = sext i32 %79 to i64
  %81 = mul i64 %80, 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %76, ptr align 4 %77, i64 %81, i1 false)
  %82 = load i32, ptr %12, align 4, !tbaa !9
  %83 = load ptr, ptr %20, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.NvFlexExtAsset, ptr %83, i32 0, i32 1
  store i32 %82, ptr %84, align 8, !tbaa !17
  %85 = load i32, ptr %12, align 4, !tbaa !9
  %86 = load ptr, ptr %20, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.NvFlexExtAsset, ptr %86, i32 0, i32 2
  store i32 %85, ptr %87, align 4, !tbaa !18
  %88 = load i32, ptr %14, align 4, !tbaa !9
  %89 = load ptr, ptr %20, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.NvFlexExtAsset, ptr %89, i32 0, i32 16
  store i32 %88, ptr %90, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 136, ptr %21) #13
  %91 = load ptr, ptr %11, align 8, !tbaa !5
  %92 = load i32, ptr %12, align 4, !tbaa !9
  %93 = load ptr, ptr %13, align 8, !tbaa !5
  %94 = load i32, ptr %14, align 4, !tbaa !9
  %95 = mul nsw i32 %94, 3
  %96 = load float, ptr %15, align 4, !tbaa !11
  %97 = load float, ptr %16, align 4, !tbaa !11
  call void @_ZN9ClothMeshC2EPK8XVector4IfEiPKiiffb(ptr noundef nonnull align 8 dereferenceable(133) %21, ptr noundef %91, i32 noundef %92, ptr noundef %93, i32 noundef %95, float noundef %96, float noundef %97, i1 noundef zeroext true)
  %98 = getelementptr inbounds %class.ClothMesh, ptr %21, i32 0, i32 8
  %99 = load i8, ptr %98, align 4, !tbaa !20, !range !38, !noundef !39
  %100 = trunc i8 %99 to i1
  br i1 %100, label %101, label %371

101:                                              ; preds = %9
  %102 = load float, ptr %17, align 4, !tbaa !11
  %103 = fcmp ogt float %102, 0.000000e+00
  br i1 %103, label %104, label %250

104:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #13
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #13
  %105 = load i32, ptr %12, align 4, !tbaa !9
  %106 = sext i32 %105 to i64
  invoke void @_ZNSt6vectorIiSaIiEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %106)
          to label %107 unwind label %113

107:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #13
  store i32 0, ptr %25, align 4, !tbaa !9
  br label %108

108:                                              ; preds = %133, %107
  %109 = load i32, ptr %25, align 4, !tbaa !9
  %110 = load i32, ptr %12, align 4, !tbaa !9
  %111 = icmp slt i32 %109, %110
  br i1 %111, label %117, label %112

112:                                              ; preds = %108
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #13
  br label %136

113:                                              ; preds = %104
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %23, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %24, align 4
  br label %249

117:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #13
  %118 = load ptr, ptr %11, align 8, !tbaa !5
  %119 = load i32, ptr %25, align 4, !tbaa !9
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds %class.XVector4, ptr %118, i64 %120
  store ptr %121, ptr %26, align 8, !tbaa !5
  %122 = load ptr, ptr %26, align 8, !tbaa !5
  %123 = getelementptr inbounds %class.XVector4, ptr %122, i32 0, i32 3
  %124 = load float, ptr %123, align 4, !tbaa !40
  %125 = fcmp oeq float %124, 0.000000e+00
  br i1 %125, label %126, label %132

126:                                              ; preds = %117
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef nonnull align 4 dereferenceable(4) %25)
          to label %127 unwind label %128

127:                                              ; preds = %126
  br label %132

128:                                              ; preds = %126
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %23, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #13
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #13
  br label %249

132:                                              ; preds = %127, %117
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #13
  br label %133

133:                                              ; preds = %132
  %134 = load i32, ptr %25, align 4, !tbaa !9
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %25, align 4, !tbaa !9
  br label %108, !llvm.loop !42

136:                                              ; preds = %112
  %137 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %22) #13
  %138 = icmp ne i64 %137, 0
  br i1 %138, label %139, label %248

139:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #13
  store i32 0, ptr %27, align 4, !tbaa !9
  br label %140

140:                                              ; preds = %243, %139
  %141 = load i32, ptr %27, align 4, !tbaa !9
  %142 = load i32, ptr %12, align 4, !tbaa !9
  %143 = icmp slt i32 %141, %142
  br i1 %143, label %145, label %144

144:                                              ; preds = %140
  store i32 5, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #13
  br label %247

145:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #13
  %146 = load ptr, ptr %11, align 8, !tbaa !5
  %147 = load i32, ptr %27, align 4, !tbaa !9
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds %class.XVector4, ptr %146, i64 %148
  store ptr %149, ptr %29, align 8, !tbaa !5
  %150 = load ptr, ptr %29, align 8, !tbaa !5
  %151 = getelementptr inbounds %class.XVector4, ptr %150, i32 0, i32 3
  %152 = load float, ptr %151, align 4, !tbaa !40
  %153 = fcmp oeq float %152, 0.000000e+00
  br i1 %153, label %154, label %155

154:                                              ; preds = %145
  store i32 7, ptr %28, align 4
  br label %240

155:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #13
  store float 0x47EFFFFFE0000000, ptr %30, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #13
  store i32 -1, ptr %31, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #13
  store i32 0, ptr %32, align 4, !tbaa !9
  br label %156

156:                                              ; preds = %205, %155
  %157 = load i32, ptr %32, align 4, !tbaa !9
  %158 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %22) #13
  %159 = trunc i64 %158 to i32
  %160 = icmp slt i32 %157, %159
  br i1 %160, label %162, label %161

161:                                              ; preds = %156
  store i32 8, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #13
  br label %208

162:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #13
  %163 = load ptr, ptr %11, align 8, !tbaa !5
  %164 = load i32, ptr %32, align 4, !tbaa !9
  %165 = sext i32 %164 to i64
  %166 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %165) #13
  %167 = load i32, ptr %166, align 4, !tbaa !9
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds %class.XVector4, ptr %163, i64 %168
  store ptr %169, ptr %33, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #13
  call void @llvm.lifetime.start.p0(i64 12, ptr %36) #13
  %170 = load ptr, ptr %29, align 8, !tbaa !5
  %171 = invoke noundef ptr @_ZN8XVector4IfEcvPfEv(ptr noundef nonnull align 4 dereferenceable(16) %170)
          to label %172 unwind label %195

172:                                              ; preds = %162
  invoke void @_ZN8XVector3IfEC2EPKf(ptr noundef nonnull align 4 dereferenceable(12) %36, ptr noundef %171)
          to label %173 unwind label %195

173:                                              ; preds = %172
  call void @llvm.lifetime.start.p0(i64 12, ptr %37) #13
  %174 = load ptr, ptr %33, align 8, !tbaa !5
  %175 = invoke noundef ptr @_ZN8XVector4IfEcvPfEv(ptr noundef nonnull align 4 dereferenceable(16) %174)
          to label %176 unwind label %199

176:                                              ; preds = %173
  invoke void @_ZN8XVector3IfEC2EPKf(ptr noundef nonnull align 4 dereferenceable(12) %37, ptr noundef %175)
          to label %177 unwind label %199

177:                                              ; preds = %176
  %178 = invoke { <2 x float>, float } @_ZNK8XVector3IfEmiERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %36, ptr noundef nonnull align 4 dereferenceable(12) %37)
          to label %179 unwind label %199

179:                                              ; preds = %177
  store { <2 x float>, float } %178, ptr %38, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %35, ptr align 8 %38, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %39, ptr align 4 %35, i64 12, i1 false)
  %180 = getelementptr inbounds { <2 x float>, float }, ptr %39, i32 0, i32 0
  %181 = load <2 x float>, ptr %180, align 4
  %182 = getelementptr inbounds { <2 x float>, float }, ptr %39, i32 0, i32 1
  %183 = load float, ptr %182, align 4
  %184 = invoke noundef float @_Z8LengthSqI8XVector3IfEENT_10value_typeES2_(<2 x float> %181, float %183)
          to label %185 unwind label %199

185:                                              ; preds = %179
  call void @llvm.lifetime.end.p0(i64 12, ptr %37) #13
  call void @llvm.lifetime.end.p0(i64 12, ptr %36) #13
  store float %184, ptr %34, align 4, !tbaa !11
  %186 = load float, ptr %34, align 4, !tbaa !11
  %187 = load float, ptr %30, align 4, !tbaa !11
  %188 = fcmp olt float %186, %187
  br i1 %188, label %189, label %204

189:                                              ; preds = %185
  %190 = load float, ptr %34, align 4, !tbaa !11
  store float %190, ptr %30, align 4, !tbaa !11
  %191 = load i32, ptr %32, align 4, !tbaa !9
  %192 = sext i32 %191 to i64
  %193 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %192) #13
  %194 = load i32, ptr %193, align 4, !tbaa !9
  store i32 %194, ptr %31, align 4, !tbaa !9
  br label %204

195:                                              ; preds = %172, %162
  %196 = landingpad { ptr, i32 }
          cleanup
  %197 = extractvalue { ptr, i32 } %196, 0
  store ptr %197, ptr %23, align 8
  %198 = extractvalue { ptr, i32 } %196, 1
  store i32 %198, ptr %24, align 4
  br label %203

199:                                              ; preds = %179, %177, %176, %173
  %200 = landingpad { ptr, i32 }
          cleanup
  %201 = extractvalue { ptr, i32 } %200, 0
  store ptr %201, ptr %23, align 8
  %202 = extractvalue { ptr, i32 } %200, 1
  store i32 %202, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %37) #13
  br label %203

203:                                              ; preds = %199, %195
  call void @llvm.lifetime.end.p0(i64 12, ptr %36) #13
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #13
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #13
  br label %246

204:                                              ; preds = %189, %185
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #13
  br label %205

205:                                              ; preds = %204
  %206 = load i32, ptr %32, align 4, !tbaa !9
  %207 = add nsw i32 %206, 1
  store i32 %207, ptr %32, align 4, !tbaa !9
  br label %156, !llvm.loop !44

208:                                              ; preds = %161
  %209 = load i32, ptr %31, align 4, !tbaa !9
  %210 = icmp ne i32 %209, -1
  br i1 %210, label %211, label %239

211:                                              ; preds = %208
  %212 = getelementptr inbounds %class.ClothMesh, ptr %21, i32 0, i32 0
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %212, ptr noundef nonnull align 4 dereferenceable(4) %27)
          to label %213 unwind label %227

213:                                              ; preds = %211
  %214 = getelementptr inbounds %class.ClothMesh, ptr %21, i32 0, i32 0
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %214, ptr noundef nonnull align 4 dereferenceable(4) %31)
          to label %215 unwind label %227

215:                                              ; preds = %213
  %216 = getelementptr inbounds %class.ClothMesh, ptr %21, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #13
  %217 = load float, ptr %30, align 4, !tbaa !11
  %218 = call float @sqrtf(float noundef %217) #13
  %219 = load float, ptr %18, align 4, !tbaa !11
  %220 = fadd float 1.000000e+00, %219
  %221 = fmul float %218, %220
  store float %221, ptr %40, align 4, !tbaa !11
  invoke void @_ZNSt6vectorIfSaIfEE9push_backEOf(ptr noundef nonnull align 8 dereferenceable(24) %216, ptr noundef nonnull align 4 dereferenceable(4) %40)
          to label %222 unwind label %231

222:                                              ; preds = %215
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #13
  %223 = getelementptr inbounds %class.ClothMesh, ptr %21, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #13
  %224 = load float, ptr %17, align 4, !tbaa !11
  %225 = fneg float %224
  store float %225, ptr %41, align 4, !tbaa !11
  invoke void @_ZNSt6vectorIfSaIfEE9push_backEOf(ptr noundef nonnull align 8 dereferenceable(24) %223, ptr noundef nonnull align 4 dereferenceable(4) %41)
          to label %226 unwind label %235

226:                                              ; preds = %222
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #13
  br label %239

227:                                              ; preds = %213, %211
  %228 = landingpad { ptr, i32 }
          cleanup
  %229 = extractvalue { ptr, i32 } %228, 0
  store ptr %229, ptr %23, align 8
  %230 = extractvalue { ptr, i32 } %228, 1
  store i32 %230, ptr %24, align 4
  br label %246

231:                                              ; preds = %215
  %232 = landingpad { ptr, i32 }
          cleanup
  %233 = extractvalue { ptr, i32 } %232, 0
  store ptr %233, ptr %23, align 8
  %234 = extractvalue { ptr, i32 } %232, 1
  store i32 %234, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #13
  br label %246

235:                                              ; preds = %222
  %236 = landingpad { ptr, i32 }
          cleanup
  %237 = extractvalue { ptr, i32 } %236, 0
  store ptr %237, ptr %23, align 8
  %238 = extractvalue { ptr, i32 } %236, 1
  store i32 %238, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #13
  br label %246

239:                                              ; preds = %226, %208
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #13
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #13
  store i32 0, ptr %28, align 4
  br label %240

240:                                              ; preds = %239, %154
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #13
  %241 = load i32, ptr %28, align 4
  switch i32 %241, label %388 [
    i32 0, label %242
    i32 7, label %243
  ]

242:                                              ; preds = %240
  br label %243

243:                                              ; preds = %242, %240
  %244 = load i32, ptr %27, align 4, !tbaa !9
  %245 = add nsw i32 %244, 1
  store i32 %245, ptr %27, align 4, !tbaa !9
  br label %140, !llvm.loop !45

246:                                              ; preds = %235, %231, %227, %203
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #13
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #13
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #13
  br label %249

247:                                              ; preds = %144
  br label %248

248:                                              ; preds = %247, %136
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #13
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #13
  br label %250

249:                                              ; preds = %246, %128, %113
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #13
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #13
  br label %382

250:                                              ; preds = %248, %101
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #13
  %251 = getelementptr inbounds %class.ClothMesh, ptr %21, i32 0, i32 1
  %252 = call noundef i64 @_ZNKSt6vectorIfSaIfEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %251) #13
  %253 = trunc i64 %252 to i32
  store i32 %253, ptr %42, align 4, !tbaa !9
  %254 = load i32, ptr %42, align 4, !tbaa !9
  %255 = mul nsw i32 %254, 2
  %256 = sext i32 %255 to i64
  %257 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %256, i64 4)
  %258 = extractvalue { i64, i1 } %257, 1
  %259 = extractvalue { i64, i1 } %257, 0
  %260 = select i1 %258, i64 -1, i64 %259
  %261 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %260) #14
          to label %262 unwind label %293

262:                                              ; preds = %250
  %263 = load ptr, ptr %20, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.NvFlexExtAsset, ptr %263, i32 0, i32 3
  store ptr %261, ptr %264, align 8, !tbaa !46
  %265 = load i32, ptr %42, align 4, !tbaa !9
  %266 = sext i32 %265 to i64
  %267 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %266, i64 4)
  %268 = extractvalue { i64, i1 } %267, 1
  %269 = extractvalue { i64, i1 } %267, 0
  %270 = select i1 %268, i64 -1, i64 %269
  %271 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %270) #14
          to label %272 unwind label %293

272:                                              ; preds = %262
  %273 = load ptr, ptr %20, align 8, !tbaa !5
  %274 = getelementptr inbounds %struct.NvFlexExtAsset, ptr %273, i32 0, i32 4
  store ptr %271, ptr %274, align 8, !tbaa !47
  %275 = load i32, ptr %42, align 4, !tbaa !9
  %276 = sext i32 %275 to i64
  %277 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %276, i64 4)
  %278 = extractvalue { i64, i1 } %277, 1
  %279 = extractvalue { i64, i1 } %277, 0
  %280 = select i1 %278, i64 -1, i64 %279
  %281 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %280) #14
          to label %282 unwind label %293

282:                                              ; preds = %272
  %283 = load ptr, ptr %20, align 8, !tbaa !5
  %284 = getelementptr inbounds %struct.NvFlexExtAsset, ptr %283, i32 0, i32 5
  store ptr %281, ptr %284, align 8, !tbaa !48
  %285 = load i32, ptr %42, align 4, !tbaa !9
  %286 = load ptr, ptr %20, align 8, !tbaa !5
  %287 = getelementptr inbounds %struct.NvFlexExtAsset, ptr %286, i32 0, i32 6
  store i32 %285, ptr %287, align 8, !tbaa !49
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #13
  store i32 0, ptr %43, align 4, !tbaa !9
  br label %288

288:                                              ; preds = %350, %282
  %289 = load i32, ptr %43, align 4, !tbaa !9
  %290 = load i32, ptr %42, align 4, !tbaa !9
  %291 = icmp slt i32 %289, %290
  br i1 %291, label %297, label %292

292:                                              ; preds = %288
  store i32 11, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #13
  br label %353

293:                                              ; preds = %272, %262, %250
  %294 = landingpad { ptr, i32 }
          cleanup
  %295 = extractvalue { ptr, i32 } %294, 0
  store ptr %295, ptr %23, align 8
  %296 = extractvalue { ptr, i32 } %294, 1
  store i32 %296, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #13
  br label %382

297:                                              ; preds = %288
  %298 = getelementptr inbounds %class.ClothMesh, ptr %21, i32 0, i32 0
  %299 = load i32, ptr %43, align 4, !tbaa !9
  %300 = mul nsw i32 %299, 2
  %301 = add nsw i32 %300, 0
  %302 = sext i32 %301 to i64
  %303 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %298, i64 noundef %302) #13
  %304 = load i32, ptr %303, align 4, !tbaa !9
  %305 = load ptr, ptr %20, align 8, !tbaa !5
  %306 = getelementptr inbounds %struct.NvFlexExtAsset, ptr %305, i32 0, i32 3
  %307 = load ptr, ptr %306, align 8, !tbaa !46
  %308 = load i32, ptr %43, align 4, !tbaa !9
  %309 = mul nsw i32 %308, 2
  %310 = add nsw i32 %309, 0
  %311 = sext i32 %310 to i64
  %312 = getelementptr inbounds i32, ptr %307, i64 %311
  store i32 %304, ptr %312, align 4, !tbaa !9
  %313 = getelementptr inbounds %class.ClothMesh, ptr %21, i32 0, i32 0
  %314 = load i32, ptr %43, align 4, !tbaa !9
  %315 = mul nsw i32 %314, 2
  %316 = add nsw i32 %315, 1
  %317 = sext i32 %316 to i64
  %318 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %313, i64 noundef %317) #13
  %319 = load i32, ptr %318, align 4, !tbaa !9
  %320 = load ptr, ptr %20, align 8, !tbaa !5
  %321 = getelementptr inbounds %struct.NvFlexExtAsset, ptr %320, i32 0, i32 3
  %322 = load ptr, ptr %321, align 8, !tbaa !46
  %323 = load i32, ptr %43, align 4, !tbaa !9
  %324 = mul nsw i32 %323, 2
  %325 = add nsw i32 %324, 1
  %326 = sext i32 %325 to i64
  %327 = getelementptr inbounds i32, ptr %322, i64 %326
  store i32 %319, ptr %327, align 4, !tbaa !9
  %328 = getelementptr inbounds %class.ClothMesh, ptr %21, i32 0, i32 2
  %329 = load i32, ptr %43, align 4, !tbaa !9
  %330 = sext i32 %329 to i64
  %331 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %328, i64 noundef %330) #13
  %332 = load float, ptr %331, align 4, !tbaa !11
  %333 = load ptr, ptr %20, align 8, !tbaa !5
  %334 = getelementptr inbounds %struct.NvFlexExtAsset, ptr %333, i32 0, i32 5
  %335 = load ptr, ptr %334, align 8, !tbaa !48
  %336 = load i32, ptr %43, align 4, !tbaa !9
  %337 = sext i32 %336 to i64
  %338 = getelementptr inbounds float, ptr %335, i64 %337
  store float %332, ptr %338, align 4, !tbaa !11
  %339 = getelementptr inbounds %class.ClothMesh, ptr %21, i32 0, i32 1
  %340 = load i32, ptr %43, align 4, !tbaa !9
  %341 = sext i32 %340 to i64
  %342 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %339, i64 noundef %341) #13
  %343 = load float, ptr %342, align 4, !tbaa !11
  %344 = load ptr, ptr %20, align 8, !tbaa !5
  %345 = getelementptr inbounds %struct.NvFlexExtAsset, ptr %344, i32 0, i32 4
  %346 = load ptr, ptr %345, align 8, !tbaa !47
  %347 = load i32, ptr %43, align 4, !tbaa !9
  %348 = sext i32 %347 to i64
  %349 = getelementptr inbounds float, ptr %346, i64 %348
  store float %343, ptr %349, align 4, !tbaa !11
  br label %350

350:                                              ; preds = %297
  %351 = load i32, ptr %43, align 4, !tbaa !9
  %352 = add nsw i32 %351, 1
  store i32 %352, ptr %43, align 4, !tbaa !9
  br label %288, !llvm.loop !50

353:                                              ; preds = %292
  %354 = load float, ptr %19, align 4, !tbaa !11
  %355 = fcmp ogt float %354, 0.000000e+00
  br i1 %355, label %356, label %370

356:                                              ; preds = %353
  %357 = load ptr, ptr %20, align 8, !tbaa !5
  %358 = getelementptr inbounds %struct.NvFlexExtAsset, ptr %357, i32 0, i32 17
  store i8 1, ptr %358, align 4, !tbaa !51
  %359 = getelementptr inbounds %class.ClothMesh, ptr %21, i32 0, i32 6
  %360 = load float, ptr %359, align 4, !tbaa !52
  %361 = load ptr, ptr %20, align 8, !tbaa !5
  %362 = getelementptr inbounds %struct.NvFlexExtAsset, ptr %361, i32 0, i32 18
  store float %360, ptr %362, align 8, !tbaa !53
  %363 = getelementptr inbounds %class.ClothMesh, ptr %21, i32 0, i32 7
  %364 = load float, ptr %363, align 8, !tbaa !54
  %365 = load ptr, ptr %20, align 8, !tbaa !5
  %366 = getelementptr inbounds %struct.NvFlexExtAsset, ptr %365, i32 0, i32 20
  store float %364, ptr %366, align 8, !tbaa !55
  %367 = load float, ptr %19, align 4, !tbaa !11
  %368 = load ptr, ptr %20, align 8, !tbaa !5
  %369 = getelementptr inbounds %struct.NvFlexExtAsset, ptr %368, i32 0, i32 19
  store float %367, ptr %369, align 4, !tbaa !56
  br label %370

370:                                              ; preds = %356, %353
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #13
  br label %378

371:                                              ; preds = %9
  %372 = load ptr, ptr %20, align 8, !tbaa !5
  invoke void @NvFlexExtDestroyAsset(ptr noundef %372)
          to label %373 unwind label %374

373:                                              ; preds = %371
  store ptr null, ptr %10, align 8
  store i32 1, ptr %28, align 4
  br label %380

374:                                              ; preds = %371
  %375 = landingpad { ptr, i32 }
          cleanup
  %376 = extractvalue { ptr, i32 } %375, 0
  store ptr %376, ptr %23, align 8
  %377 = extractvalue { ptr, i32 } %375, 1
  store i32 %377, ptr %24, align 4
  br label %382

378:                                              ; preds = %370
  %379 = load ptr, ptr %20, align 8, !tbaa !5
  store ptr %379, ptr %10, align 8
  store i32 1, ptr %28, align 4
  br label %380

380:                                              ; preds = %378, %373
  call void @_ZN9ClothMeshD2Ev(ptr noundef nonnull align 8 dereferenceable(133) %21) #13
  call void @llvm.lifetime.end.p0(i64 136, ptr %21) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #13
  %381 = load ptr, ptr %10, align 8
  ret ptr %381

382:                                              ; preds = %374, %293, %249
  call void @_ZN9ClothMeshD2Ev(ptr noundef nonnull align 8 dereferenceable(133) %21) #13
  call void @llvm.lifetime.end.p0(i64 136, ptr %21) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #13
  br label %383

383:                                              ; preds = %382
  %384 = load ptr, ptr %23, align 8
  %385 = load i32, ptr %24, align 4
  %386 = insertvalue { ptr, i32 } poison, ptr %384, 0
  %387 = insertvalue { ptr, i32 } %386, i32 %385, 1
  resume { ptr, i32 } %387

388:                                              ; preds = %240
  unreachable
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9ClothMeshC2EPK8XVector4IfEiPKiiffb(ptr noundef nonnull align 8 dereferenceable(133), ptr noundef, i32 noundef, ptr noundef, i32 noundef, float noundef, float noundef, i1 noundef zeroext) unnamed_addr #4 align 2

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_Z8LengthSqI8XVector3IfEENT_10value_typeES2_(<2 x float>, float) #9

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN8XVector4IfEcvPfEv(ptr noundef nonnull align 4 dereferenceable(16)) #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN8XVector3IfEC2EPKf(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef) unnamed_addr #10 align 2

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

; Function Attrs: nounwind
declare float @sqrtf(float noundef) #11

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #7 align 2

declare void @NvFlexExtDestroyAsset(ptr noundef) #12

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN9ClothMeshD2Ev(ptr noundef nonnull align 8 dereferenceable(133)) unnamed_addr #10 align 2

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { 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 #9 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="64" "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 #10 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #11 = { 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 #12 = { "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 #13 = { nounwind }
attributes #14 = { 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, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTS14NvFlexExtAsset", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16, !6, i64 24, !6, i64 32, !10, i64 40, !6, i64 48, !10, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !10, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !10, i64 120, !15, i64 124, !12, i64 128, !12, i64 132, !12, i64 136}
!15 = !{!"bool", !7, i64 0}
!16 = !{!14, !6, i64 112}
!17 = !{!14, !10, i64 8}
!18 = !{!14, !10, i64 12}
!19 = !{!14, !10, i64 120}
!20 = !{!21, !15, i64 132}
!21 = !{!"_ZTS9ClothMesh", !22, i64 0, !26, i64 24, !26, i64 48, !30, i64 72, !34, i64 96, !10, i64 120, !12, i64 124, !12, i64 128, !15, i64 132}
!22 = !{!"_ZTSSt6vectorIiSaIiEE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!"_ZTSSt6vectorIfSaIfEE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!30 = !{!"_ZTSSt6vectorIN9ClothMesh4EdgeESaIS1_EE", !31, i64 0}
!31 = !{!"_ZTSSt12_Vector_baseIN9ClothMesh4EdgeESaIS1_EE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIN9ClothMesh4EdgeESaIS1_EE12_Vector_implE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIN9ClothMesh4EdgeESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!34 = !{!"_ZTSSt6vectorIN9ClothMesh8TriangleESaIS1_EE", !35, i64 0}
!35 = !{!"_ZTSSt12_Vector_baseIN9ClothMesh8TriangleESaIS1_EE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseIN9ClothMesh8TriangleESaIS1_EE12_Vector_implE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseIN9ClothMesh8TriangleESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!38 = !{i8 0, i8 2}
!39 = !{}
!40 = !{!41, !12, i64 12}
!41 = !{!"_ZTS8XVector4IfE", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12}
!42 = distinct !{!42, !43}
!43 = !{!"llvm.loop.mustprogress"}
!44 = distinct !{!44, !43}
!45 = distinct !{!45, !43}
!46 = !{!14, !6, i64 16}
!47 = !{!14, !6, i64 24}
!48 = !{!14, !6, i64 32}
!49 = !{!14, !10, i64 40}
!50 = distinct !{!50, !43}
!51 = !{!14, !15, i64 124}
!52 = !{!21, !12, i64 124}
!53 = !{!14, !12, i64 128}
!54 = !{!21, !12, i64 128}
!55 = !{!14, !12, i64 136}
!56 = !{!14, !12, i64 132}


; 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.ClothMesh = type <{ %"class.std::vector.0", %"class.std::vector.5", %"class.std::vector.5", %"class.std::vector.10", %"class.std::vector.15", i32, float, float, i8, [3 x i8] }>
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<ClothMesh::Edge, std::allocator<ClothMesh::Edge>>::_Vector_impl" }
%"struct.std::_Vector_base<ClothMesh::Edge, std::allocator<ClothMesh::Edge>>::_Vector_impl" = type { %"struct.std::_Vector_base<ClothMesh::Edge, std::allocator<ClothMesh::Edge>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ClothMesh::Edge, std::allocator<ClothMesh::Edge>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = type { %"struct.std::_Vector_base<ClothMesh::Triangle, std::allocator<ClothMesh::Triangle>>::_Vector_impl" }
%"struct.std::_Vector_base<ClothMesh::Triangle, std::allocator<ClothMesh::Triangle>>::_Vector_impl" = type { %"struct.std::_Vector_base<ClothMesh::Triangle, std::allocator<ClothMesh::Triangle>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ClothMesh::Triangle, std::allocator<ClothMesh::Triangle>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.XVector3 = type { float, float, float }
%class.XVector4 = type { float, float, float, float }

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #0

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

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) #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZNK8XVector3IfEmiERKS0_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @NvFlexExtCreateClothFromMesh(ptr noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %3, float noundef %4, float noundef %5, float noundef %6, float noundef %7, float noundef %8) local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %10 = alloca %class.ClothMesh, align 8
  %11 = alloca %"class.std::vector.0", align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %class.XVector3, align 4
  %16 = alloca %class.XVector3, align 4
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = tail call noalias noundef nonnull dereferenceable(144) ptr @_Znwm(i64 noundef 144) #12
  %20 = shl nsw i32 %1, 2
  %21 = sext i32 %20 to i64
  %22 = icmp slt i32 %1, 0
  %23 = shl nsw i64 %21, 2
  %24 = select i1 %22, i64 -1, i64 %23
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(144) %19, i8 0, i64 144, i1 false)
  %25 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %24) #12
  store ptr %25, ptr %19, align 8, !tbaa !5
  %26 = sext i32 %1 to i64
  %27 = shl nsw i64 %26, 4
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %25, ptr align 4 %0, i64 %27, i1 false)
  %28 = mul nsw i32 %3, 3
  %29 = sext i32 %28 to i64
  %30 = icmp slt i32 %3, 0
  %31 = shl nsw i64 %29, 2
  %32 = select i1 %30, i64 -1, i64 %31
  %33 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %32) #12
  %34 = getelementptr inbounds i8, ptr %19, i64 112
  store ptr %33, ptr %34, align 8, !tbaa !13
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %33, ptr align 4 %2, i64 %31, i1 false)
  %35 = getelementptr inbounds i8, ptr %19, i64 8
  store i32 %1, ptr %35, align 8, !tbaa !14
  %36 = getelementptr inbounds i8, ptr %19, i64 12
  store i32 %1, ptr %36, align 4, !tbaa !15
  %37 = getelementptr inbounds i8, ptr %19, i64 120
  store i32 %3, ptr %37, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 136, ptr nonnull %10) #13
  call void @_ZN9ClothMeshC2EPK8XVector4IfEiPKiiffb(ptr noundef nonnull align 8 dereferenceable(133) %10, ptr noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %28, float noundef %4, float noundef %5, i1 noundef zeroext true)
  %38 = getelementptr inbounds i8, ptr %10, i64 132
  %39 = load i8, ptr %38, align 4, !tbaa !17, !range !35, !noundef !36
  %40 = trunc nuw i8 %39 to i1
  br i1 %40, label %41, label %167

41:                                               ; preds = %9
  %42 = fcmp ogt float %6, 0.000000e+00
  br i1 %42, label %43, label %117

43:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #13
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #13
  invoke void @_ZNSt6vectorIiSaIiEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %26)
          to label %44 unwind label %48

44:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #13
  store i32 0, ptr %12, align 4, !tbaa !37
  %45 = icmp sgt i32 %1, 0
  br i1 %45, label %.lr.ph, label %._crit_edge.thread

._crit_edge:                                      ; preds = %57
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #13
  %46 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #13
  %.not = icmp eq i64 %46, 0
  br i1 %.not, label %115, label %61

._crit_edge.thread:                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #13
  %47 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #13
  %.not123 = icmp eq i64 %47, 0
  br i1 %.not123, label %115, label %.thread

.thread:                                          ; preds = %._crit_edge.thread
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #13
  br label %._crit_edge111

48:                                               ; preds = %43
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %116

.lr.ph:                                           ; preds = %44, %57
  %storemerge102 = phi i32 [ %59, %57 ], [ 0, %44 ]
  %50 = sext i32 %storemerge102 to i64
  %51 = getelementptr inbounds %class.XVector4, ptr %0, i64 %50, i32 3
  %52 = load float, ptr %51, align 4, !tbaa !38
  %53 = fcmp oeq float %52, 0.000000e+00
  br i1 %53, label %54, label %57

54:                                               ; preds = %.lr.ph
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %._crit_edge120 unwind label %55

._crit_edge120:                                   ; preds = %54
  %.pre = load i32, ptr %12, align 4, !tbaa !37
  br label %57

55:                                               ; preds = %54
  %56 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #13
  br label %116

57:                                               ; preds = %._crit_edge120, %.lr.ph
  %58 = phi i32 [ %.pre, %._crit_edge120 ], [ %storemerge102, %.lr.ph ]
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %12, align 4, !tbaa !37
  %60 = icmp slt i32 %59, %1
  br i1 %60, label %.lr.ph, label %._crit_edge, !llvm.loop !40

61:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #13
  store i32 0, ptr %13, align 4, !tbaa !37
  br i1 %45, label %.lr.ph110, label %._crit_edge111

.lr.ph110:                                        ; preds = %61
  %62 = getelementptr inbounds i8, ptr %10, i64 48
  %63 = fadd float %7, 1.000000e+00
  %64 = getelementptr inbounds i8, ptr %10, i64 24
  %65 = fneg float %6
  br label %66

._crit_edge111:                                   ; preds = %110, %.thread, %61
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #13
  br label %115

66:                                               ; preds = %.lr.ph110, %110
  %storemerge95108 = phi i32 [ 0, %.lr.ph110 ], [ %112, %110 ]
  %67 = sext i32 %storemerge95108 to i64
  %68 = getelementptr inbounds %class.XVector4, ptr %0, i64 %67
  %69 = getelementptr inbounds i8, ptr %68, i64 12
  %70 = load float, ptr %69, align 4, !tbaa !38
  %71 = fcmp oeq float %70, 0.000000e+00
  br i1 %71, label %110, label %72

72:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #13
  store i32 -1, ptr %14, align 4, !tbaa !37
  %73 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #13
  %74 = trunc i64 %73 to i32
  %75 = icmp sgt i32 %74, 0
  br i1 %75, label %.lr.ph106, label %._crit_edge107

._crit_edge107:                                   ; preds = %92, %72
  %.086.lcssa = phi float [ 0x47EFFFFFE0000000, %72 ], [ %.187, %92 ]
  %76 = load i32, ptr %14, align 4, !tbaa !37
  %.not96 = icmp eq i32 %76, -1
  br i1 %.not96, label %109, label %96

.lr.ph106:                                        ; preds = %72, %92
  %indvars.iv = phi i64 [ %indvars.iv.next, %92 ], [ 0, %72 ]
  %.086104 = phi float [ %.187, %92 ], [ 0x47EFFFFFE0000000, %72 ]
  %77 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %indvars.iv) #13
  %78 = load i32, ptr %77, align 4, !tbaa !37
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds %class.XVector4, ptr %0, i64 %79
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %15) #13
  %81 = call noundef ptr @_ZN8XVector4IfEcvPfEv(ptr noundef nonnull align 4 dereferenceable(16) %68)
  call void @_ZN8XVector3IfEC2EPKf(ptr noundef nonnull align 4 dereferenceable(12) %15, ptr noundef %81)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %16) #13
  %82 = call noundef ptr @_ZN8XVector4IfEcvPfEv(ptr noundef nonnull align 4 dereferenceable(16) %80)
  call void @_ZN8XVector3IfEC2EPKf(ptr noundef nonnull align 4 dereferenceable(12) %16, ptr noundef %82)
  %83 = invoke { <2 x float>, float } @_ZNK8XVector3IfEmiERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %15, ptr noundef nonnull align 4 dereferenceable(12) %16)
          to label %84 unwind label %90

84:                                               ; preds = %.lr.ph106
  %.fca.0.extract = extractvalue { <2 x float>, float } %83, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %83, 1
  %85 = call noundef float @_Z8LengthSqI8XVector3IfEENT_10value_typeES2_(<2 x float> %.fca.0.extract, float %.fca.1.extract)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %16) #13
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %15) #13
  %86 = fcmp olt float %85, %.086104
  br i1 %86, label %87, label %92

87:                                               ; preds = %84
  %88 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %indvars.iv) #13
  %89 = load i32, ptr %88, align 4, !tbaa !37
  store i32 %89, ptr %14, align 4, !tbaa !37
  br label %92

90:                                               ; preds = %.lr.ph106
  %91 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %16) #13
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %15) #13
  br label %114

92:                                               ; preds = %87, %84
  %.187 = phi float [ %85, %87 ], [ %.086104, %84 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %93 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #13
  %sext122 = shl i64 %93, 32
  %94 = ashr exact i64 %sext122, 32
  %95 = icmp slt i64 %indvars.iv.next, %94
  br i1 %95, label %.lr.ph106, label %._crit_edge107, !llvm.loop !42

96:                                               ; preds = %._crit_edge107
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %97 unwind label %103

97:                                               ; preds = %96
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %98 unwind label %103

98:                                               ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #13
  %99 = call float @sqrtf(float noundef %.086.lcssa) #13
  %100 = fmul float %63, %99
  store float %100, ptr %17, align 4, !tbaa !43
  invoke void @_ZNSt6vectorIfSaIfEE9push_backEOf(ptr noundef nonnull align 8 dereferenceable(24) %62, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %101 unwind label %105

101:                                              ; preds = %98
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #13
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #13
  store float %65, ptr %18, align 4, !tbaa !43
  invoke void @_ZNSt6vectorIfSaIfEE9push_backEOf(ptr noundef nonnull align 8 dereferenceable(24) %64, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %102 unwind label %107

102:                                              ; preds = %101
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #13
  br label %109

103:                                              ; preds = %97, %96
  %104 = landingpad { ptr, i32 }
          cleanup
  br label %114

105:                                              ; preds = %98
  %106 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #13
  br label %114

107:                                              ; preds = %101
  %108 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #13
  br label %114

109:                                              ; preds = %102, %._crit_edge107
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #13
  %.pre121 = load i32, ptr %13, align 4, !tbaa !37
  br label %110

110:                                              ; preds = %66, %109
  %111 = phi i32 [ %storemerge95108, %66 ], [ %.pre121, %109 ]
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %13, align 4, !tbaa !37
  %113 = icmp slt i32 %112, %1
  br i1 %113, label %66, label %._crit_edge111, !llvm.loop !44

114:                                              ; preds = %107, %105, %103, %90
  %.pn = phi { ptr, i32 } [ %91, %90 ], [ %108, %107 ], [ %106, %105 ], [ %104, %103 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #13
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #13
  br label %116

115:                                              ; preds = %._crit_edge.thread, %._crit_edge111, %._crit_edge
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #13
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #13
  br label %117

116:                                              ; preds = %114, %55, %48
  %.pn98 = phi { ptr, i32 } [ %56, %55 ], [ %.pn, %114 ], [ %49, %48 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #13
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #13
  br label %171

117:                                              ; preds = %115, %41
  %118 = getelementptr inbounds i8, ptr %10, i64 24
  %119 = call noundef i64 @_ZNKSt6vectorIfSaIfEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %118) #13
  %120 = trunc i64 %119 to i32
  %121 = shl nsw i32 %120, 1
  %122 = sext i32 %121 to i64
  %123 = icmp slt i32 %120, 0
  %124 = shl nsw i64 %122, 2
  %125 = select i1 %123, i64 -1, i64 %124
  %126 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %125) #12
          to label %127 unwind label %141

127:                                              ; preds = %117
  %128 = getelementptr inbounds i8, ptr %19, i64 16
  store ptr %126, ptr %128, align 8, !tbaa !45
  %sext = shl i64 %119, 32
  %129 = lshr exact i64 %sext, 30
  %.inv = icmp sgt i64 %sext, -1
  %130 = select i1 %.inv, i64 %129, i64 -1
  %131 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %130) #12
          to label %132 unwind label %141

132:                                              ; preds = %127
  %133 = getelementptr inbounds i8, ptr %19, i64 24
  store ptr %131, ptr %133, align 8, !tbaa !46
  %134 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %130) #12
          to label %135 unwind label %141

135:                                              ; preds = %132
  %136 = getelementptr inbounds i8, ptr %19, i64 32
  store ptr %134, ptr %136, align 8, !tbaa !47
  %137 = getelementptr inbounds i8, ptr %19, i64 40
  store i32 %120, ptr %137, align 8, !tbaa !48
  %138 = icmp sgt i32 %120, 0
  br i1 %138, label %.lr.ph114, label %._crit_edge115

.lr.ph114:                                        ; preds = %135
  %139 = getelementptr inbounds i8, ptr %10, i64 48
  %wide.trip.count = and i64 %119, 2147483647
  br label %143

._crit_edge115:                                   ; preds = %143, %135
  %140 = fcmp ogt float %8, 0.000000e+00
  br i1 %140, label %158, label %170

141:                                              ; preds = %132, %127, %117
  %142 = landingpad { ptr, i32 }
          cleanup
  br label %171

143:                                              ; preds = %.lr.ph114, %143
  %indvars.iv117 = phi i64 [ 0, %.lr.ph114 ], [ %indvars.iv.next118, %143 ]
  %144 = shl nuw nsw i64 %indvars.iv117, 1
  %145 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %144) #13
  %146 = load i32, ptr %145, align 4, !tbaa !37
  %147 = getelementptr inbounds i32, ptr %126, i64 %144
  store i32 %146, ptr %147, align 4, !tbaa !37
  %148 = or disjoint i64 %144, 1
  %149 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %148) #13
  %150 = load i32, ptr %149, align 4, !tbaa !37
  %151 = getelementptr inbounds i32, ptr %126, i64 %148
  store i32 %150, ptr %151, align 4, !tbaa !37
  %152 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %139, i64 noundef %indvars.iv117) #13
  %153 = load float, ptr %152, align 4, !tbaa !43
  %154 = getelementptr inbounds float, ptr %134, i64 %indvars.iv117
  store float %153, ptr %154, align 4, !tbaa !43
  %155 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %118, i64 noundef %indvars.iv117) #13
  %156 = load float, ptr %155, align 4, !tbaa !43
  %157 = getelementptr inbounds float, ptr %131, i64 %indvars.iv117
  store float %156, ptr %157, align 4, !tbaa !43
  %indvars.iv.next118 = add nuw nsw i64 %indvars.iv117, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next118, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge115, label %143, !llvm.loop !49

158:                                              ; preds = %._crit_edge115
  %159 = getelementptr inbounds i8, ptr %19, i64 124
  store i8 1, ptr %159, align 4, !tbaa !50
  %160 = getelementptr inbounds i8, ptr %10, i64 124
  %161 = load float, ptr %160, align 4, !tbaa !51
  %162 = getelementptr inbounds i8, ptr %19, i64 128
  store float %161, ptr %162, align 8, !tbaa !52
  %163 = getelementptr inbounds i8, ptr %10, i64 128
  %164 = load float, ptr %163, align 8, !tbaa !53
  %165 = getelementptr inbounds i8, ptr %19, i64 136
  store float %164, ptr %165, align 8, !tbaa !54
  %166 = getelementptr inbounds i8, ptr %19, i64 132
  store float %8, ptr %166, align 4, !tbaa !55
  br label %170

167:                                              ; preds = %9
  invoke void @NvFlexExtDestroyAsset(ptr noundef nonnull %19)
          to label %170 unwind label %168

168:                                              ; preds = %167
  %169 = landingpad { ptr, i32 }
          cleanup
  br label %171

170:                                              ; preds = %167, %._crit_edge115, %158
  %.081 = phi ptr [ %19, %158 ], [ %19, %._crit_edge115 ], [ null, %167 ]
  call void @_ZN9ClothMeshD2Ev(ptr noundef nonnull align 8 dereferenceable(133) %10) #13
  call void @llvm.lifetime.end.p0(i64 136, ptr nonnull %10) #13
  ret ptr %.081

171:                                              ; preds = %168, %141, %116
  %.pn98.pn = phi { ptr, i32 } [ %.pn98, %116 ], [ %142, %141 ], [ %169, %168 ]
  call void @_ZN9ClothMeshD2Ev(ptr noundef nonnull align 8 dereferenceable(133) %10) #13
  call void @llvm.lifetime.end.p0(i64 136, ptr nonnull %10) #13
  resume { ptr, i32 } %.pn98.pn
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9ClothMeshC2EPK8XVector4IfEiPKiiffb(ptr noundef nonnull align 8 dereferenceable(133), ptr noundef, i32 noundef, ptr noundef, i32 noundef, float noundef, float noundef, i1 noundef zeroext) unnamed_addr #4 align 2

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_Z8LengthSqI8XVector3IfEENT_10value_typeES2_(<2 x float>, float) local_unnamed_addr #8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN8XVector4IfEcvPfEv(ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN8XVector3IfEC2EPKf(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef) unnamed_addr #9 align 2

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @sqrtf(float noundef) local_unnamed_addr #10

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #6 align 2

declare void @NvFlexExtDestroyAsset(ptr noundef) local_unnamed_addr #11

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN9ClothMeshD2Ev(ptr noundef nonnull align 8 dereferenceable(133)) unnamed_addr #9 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTS14NvFlexExtAsset", !7, i64 0, !10, i64 8, !10, i64 12, !7, i64 16, !7, i64 24, !7, i64 32, !10, i64 40, !7, i64 48, !10, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !10, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !10, i64 120, !11, i64 124, !12, i64 128, !12, i64 132, !12, i64 136}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"bool", !8, i64 0}
!12 = !{!"float", !8, i64 0}
!13 = !{!6, !7, i64 112}
!14 = !{!6, !10, i64 8}
!15 = !{!6, !10, i64 12}
!16 = !{!6, !10, i64 120}
!17 = !{!18, !11, i64 132}
!18 = !{!"_ZTS9ClothMesh", !19, i64 0, !23, i64 24, !23, i64 48, !27, i64 72, !31, i64 96, !10, i64 120, !12, i64 124, !12, i64 128, !11, i64 132}
!19 = !{!"_ZTSSt6vectorIiSaIiEE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!23 = !{!"_ZTSSt6vectorIfSaIfEE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!27 = !{!"_ZTSSt6vectorIN9ClothMesh4EdgeESaIS1_EE", !28, i64 0}
!28 = !{!"_ZTSSt12_Vector_baseIN9ClothMesh4EdgeESaIS1_EE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIN9ClothMesh4EdgeESaIS1_EE12_Vector_implE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIN9ClothMesh4EdgeESaIS1_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!31 = !{!"_ZTSSt6vectorIN9ClothMesh8TriangleESaIS1_EE", !32, i64 0}
!32 = !{!"_ZTSSt12_Vector_baseIN9ClothMesh8TriangleESaIS1_EE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIN9ClothMesh8TriangleESaIS1_EE12_Vector_implE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIN9ClothMesh8TriangleESaIS1_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!35 = !{i8 0, i8 2}
!36 = !{}
!37 = !{!10, !10, i64 0}
!38 = !{!39, !12, i64 12}
!39 = !{!"_ZTS8XVector4IfE", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12}
!40 = distinct !{!40, !41}
!41 = !{!"llvm.loop.mustprogress"}
!42 = distinct !{!42, !41}
!43 = !{!12, !12, i64 0}
!44 = distinct !{!44, !41}
!45 = !{!6, !7, i64 16}
!46 = !{!6, !7, i64 24}
!47 = !{!6, !7, i64 32}
!48 = !{!6, !10, i64 40}
!49 = distinct !{!49, !41}
!50 = !{!6, !11, i64 124}
!51 = !{!18, !12, i64 124}
!52 = !{!6, !12, i64 128}
!53 = !{!18, !12, i64 128}
!54 = !{!6, !12, i64 136}
!55 = !{!6, !12, i64 132}


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