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

; 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.XVector3 = type { float, float, float }
%class.XVector4 = type { float, float, float, float }
%struct.NvFlexExtContainer = type <{ i32, [4 x i8], ptr, ptr, %struct.NvFlexVector, %"class.std::vector", %"class.std::vector.0", %"class.std::vector.5", %struct.NvFlexVector.10, %struct.NvFlexVector.10, %struct.NvFlexVector.12, %struct.NvFlexVector, %struct.NvFlexVector.10, %struct.NvFlexVector, %struct.NvFlexVector, %struct.NvFlexVector.14, %struct.NvFlexVector.14, %struct.NvFlexVector.14, %struct.NvFlexVector.16, %struct.NvFlexVector.12, %struct.NvFlexVector.12, %struct.NvFlexVector, %struct.NvFlexVector.14, %struct.NvFlexVector.14, %struct.NvFlexVector, %struct.NvFlexVector.12, %struct.NvFlexVector, %struct.NvFlexVector, %struct.NvFlexVector.14, %struct.NvFlexVector.14, %struct.NvFlexVector.14, %struct.NvFlexVector.12, %struct.NvFlexVector.12, i8, i8, [6 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<NvFlexExtInstance *, std::allocator<NvFlexExtInstance *>>::_Vector_impl" }
%"struct.std::_Vector_base<NvFlexExtInstance *, std::allocator<NvFlexExtInstance *>>::_Vector_impl" = type { %"struct.std::_Vector_base<NvFlexExtInstance *, std::allocator<NvFlexExtInstance *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<NvFlexExtInstance *, std::allocator<NvFlexExtInstance *>>::_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<NvFlexExtSoftJoint *, std::allocator<NvFlexExtSoftJoint *>>::_Vector_impl" }
%"struct.std::_Vector_base<NvFlexExtSoftJoint *, std::allocator<NvFlexExtSoftJoint *>>::_Vector_impl" = type { %"struct.std::_Vector_base<NvFlexExtSoftJoint *, std::allocator<NvFlexExtSoftJoint *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<NvFlexExtSoftJoint *, std::allocator<NvFlexExtSoftJoint *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.NvFlexVector.10 = type <{ ptr, ptr, ptr, i32, i32, i32, [4 x i8] }>
%struct.NvFlexVector.16 = type <{ ptr, ptr, ptr, i32, i32, i32, [4 x i8] }>
%struct.NvFlexVector = type <{ ptr, ptr, ptr, i32, i32, i32, [4 x i8] }>
%struct.NvFlexVector.14 = type <{ ptr, ptr, ptr, i32, i32, i32, [4 x i8] }>
%struct.NvFlexVector.12 = type <{ ptr, ptr, ptr, i32, i32, i32, [4 x i8] }>
%struct.NvFlexExtInstance = type { ptr, i32, i32, i32, i32, ptr, ptr, ptr, ptr }
%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.XQuat = type { float, float, float, float }
%struct.NvFlexExtSoftJoint = type { ptr, ptr, i32, i32, [3 x float], [4 x float], float, i8 }

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(16) ptr @_ZN12NvFlexVectorI8XVector4IfEEixEi(ptr noundef nonnull align 8 dereferenceable(36), i32 noundef) #3 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(16) ptr @_ZN12NvFlexVectorI5XQuatIfEEixEi(ptr noundef nonnull align 8 dereferenceable(36), i32 noundef) #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @NvFlexExtUpdateInstances(ptr noundef %0) #5 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %class.XVector3, align 4
  %13 = alloca i32, align 4
  %14 = alloca %class.XVector4, align 4
  %15 = alloca %class.XVector3, align 4
  %16 = alloca %class.XVector3, align 4
  %17 = alloca i32, align 4
  %18 = alloca %class.XVector4, align 4
  %19 = alloca %class.XVector3, align 4
  %20 = alloca %class.XVector3, align 4
  %21 = alloca { <2 x float>, float }, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %22 = load ptr, ptr %2, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.NvFlexExtContainer, ptr %22, i32 0, i32 19
  call void @_ZN12NvFlexVectorI8XVector3IfEE3mapEi(ptr noundef nonnull align 8 dereferenceable(36) %23, i32 noundef 0)
  %24 = load ptr, ptr %2, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.NvFlexExtContainer, ptr %24, i32 0, i32 18
  call void @_ZN12NvFlexVectorI5XQuatIfEE3mapEi(ptr noundef nonnull align 8 dereferenceable(36) %25, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %26

26:                                               ; preds = %90, %1
  %27 = load i32, ptr %3, align 4, !tbaa !9
  %28 = load ptr, ptr %2, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.NvFlexExtContainer, ptr %28, i32 0, i32 6
  %30 = call noundef i64 @_ZNKSt6vectorIP17NvFlexExtInstanceSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %29) #7
  %31 = trunc i64 %30 to i32
  %32 = icmp slt i32 %27, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %26
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %93

34:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %35 = load ptr, ptr %2, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.NvFlexExtContainer, ptr %35, i32 0, i32 6
  %37 = load i32, ptr %3, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP17NvFlexExtInstanceSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %36, i64 noundef %38) #7
  %40 = load ptr, ptr %39, align 8, !tbaa !5
  store ptr %40, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.NvFlexExtInstance, ptr %41, i32 0, i32 7
  %43 = load ptr, ptr %42, align 8, !tbaa !11
  %44 = getelementptr inbounds %struct.NvFlexExtAsset, ptr %43, i32 0, i32 12
  %45 = load i32, ptr %44, align 8, !tbaa !13
  store i32 %45, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.NvFlexExtInstance, ptr %46, i32 0, i32 3
  %48 = load i32, ptr %47, align 8, !tbaa !17
  store i32 %48, ptr %7, align 4, !tbaa !9
  %49 = load i32, ptr %7, align 4, !tbaa !9
  %50 = icmp eq i32 %49, -1
  br i1 %50, label %51, label %52

51:                                               ; preds = %34
  store i32 4, ptr %4, align 4
  br label %87

52:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %53

53:                                               ; preds = %83, %52
  %54 = load i32, ptr %8, align 4, !tbaa !9
  %55 = load i32, ptr %6, align 4, !tbaa !9
  %56 = icmp slt i32 %54, %55
  br i1 %56, label %58, label %57

57:                                               ; preds = %53
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %86

58:                                               ; preds = %53
  %59 = load ptr, ptr %2, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.NvFlexExtContainer, ptr %59, i32 0, i32 19
  %61 = load i32, ptr %7, align 4, !tbaa !9
  %62 = load i32, ptr %8, align 4, !tbaa !9
  %63 = add nsw i32 %61, %62
  %64 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN12NvFlexVectorI8XVector3IfEEixEi(ptr noundef nonnull align 8 dereferenceable(36) %60, i32 noundef %63)
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.NvFlexExtInstance, ptr %65, i32 0, i32 5
  %67 = load ptr, ptr %66, align 8, !tbaa !18
  %68 = load i32, ptr %8, align 4, !tbaa !9
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds %class.XVector3, ptr %67, i64 %69
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %70, ptr align 4 %64, i64 12, i1 false), !tbaa.struct !19
  %71 = load ptr, ptr %2, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.NvFlexExtContainer, ptr %71, i32 0, i32 18
  %73 = load i32, ptr %7, align 4, !tbaa !9
  %74 = load i32, ptr %8, align 4, !tbaa !9
  %75 = add nsw i32 %73, %74
  %76 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN12NvFlexVectorI5XQuatIfEEixEi(ptr noundef nonnull align 8 dereferenceable(36) %72, i32 noundef %75)
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.NvFlexExtInstance, ptr %77, i32 0, i32 6
  %79 = load ptr, ptr %78, align 8, !tbaa !21
  %80 = load i32, ptr %8, align 4, !tbaa !9
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds %class.XQuat, ptr %79, i64 %81
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %82, ptr align 4 %76, i64 16, i1 false), !tbaa.struct !22
  br label %83

83:                                               ; preds = %58
  %84 = load i32, ptr %8, align 4, !tbaa !9
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %8, align 4, !tbaa !9
  br label %53, !llvm.loop !23

86:                                               ; preds = %57
  store i32 0, ptr %4, align 4
  br label %87

87:                                               ; preds = %86, %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  %88 = load i32, ptr %4, align 4
  switch i32 %88, label %267 [
    i32 0, label %89
    i32 4, label %90
  ]

89:                                               ; preds = %87
  br label %90

90:                                               ; preds = %89, %87
  %91 = load i32, ptr %3, align 4, !tbaa !9
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %3, align 4, !tbaa !9
  br label %26, !llvm.loop !25

93:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %94

94:                                               ; preds = %259, %93
  %95 = load i32, ptr %9, align 4, !tbaa !9
  %96 = load ptr, ptr %2, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.NvFlexExtContainer, ptr %96, i32 0, i32 7
  %98 = call noundef i64 @_ZNKSt6vectorIP18NvFlexExtSoftJointSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %97) #7
  %99 = trunc i64 %98 to i32
  %100 = icmp slt i32 %95, %99
  br i1 %100, label %102, label %101

101:                                              ; preds = %94
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %262

102:                                              ; preds = %94
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %103 = load ptr, ptr %2, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.NvFlexExtContainer, ptr %103, i32 0, i32 7
  %105 = load i32, ptr %9, align 4, !tbaa !9
  %106 = sext i32 %105 to i64
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP18NvFlexExtSoftJointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %104, i64 noundef %106) #7
  %108 = load ptr, ptr %107, align 8, !tbaa !5
  store ptr %108, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %109 = load ptr, ptr %10, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.NvFlexExtSoftJoint, ptr %109, i32 0, i32 2
  %111 = load i32, ptr %110, align 8, !tbaa !26
  store i32 %111, ptr %11, align 4, !tbaa !9
  %112 = load ptr, ptr %10, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.NvFlexExtSoftJoint, ptr %112, i32 0, i32 7
  %114 = load i8, ptr %113, align 8, !tbaa !28, !range !29, !noundef !30
  %115 = trunc i8 %114 to i1
  br i1 %115, label %194, label %116

116:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #7
  call void @_ZN8XVector3IfEC2Ef(ptr noundef nonnull align 4 dereferenceable(12) %12, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %117

117:                                              ; preds = %137, %116
  %118 = load i32, ptr %13, align 4, !tbaa !9
  %119 = load ptr, ptr %10, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.NvFlexExtSoftJoint, ptr %119, i32 0, i32 3
  %121 = load i32, ptr %120, align 4, !tbaa !31
  %122 = icmp slt i32 %118, %121
  br i1 %122, label %124, label %123

123:                                              ; preds = %117
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %140

124:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #7
  %125 = load ptr, ptr %2, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.NvFlexExtContainer, ptr %125, i32 0, i32 8
  %127 = load ptr, ptr %10, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.NvFlexExtSoftJoint, ptr %127, i32 0, i32 0
  %129 = load ptr, ptr %128, align 8, !tbaa !32
  %130 = load i32, ptr %13, align 4, !tbaa !9
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds i32, ptr %129, i64 %131
  %133 = load i32, ptr %132, align 4, !tbaa !9
  %134 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN12NvFlexVectorI8XVector4IfEEixEi(ptr noundef nonnull align 8 dereferenceable(36) %126, i32 noundef %133)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 4 %134, i64 16, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.start.p0(i64 12, ptr %15) #7
  %135 = call noundef ptr @_ZNK8XVector4IfEcvPKfEv(ptr noundef nonnull align 4 dereferenceable(16) %14)
  call void @_ZN8XVector3IfEC2EPKf(ptr noundef nonnull align 4 dereferenceable(12) %15, ptr noundef %135)
  %136 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN8XVector3IfEpLERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %12, ptr noundef nonnull align 4 dereferenceable(12) %15)
  call void @llvm.lifetime.end.p0(i64 12, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #7
  br label %137

137:                                              ; preds = %124
  %138 = load i32, ptr %13, align 4, !tbaa !9
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %13, align 4, !tbaa !9
  br label %117, !llvm.loop !33

140:                                              ; preds = %123
  %141 = load ptr, ptr %10, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.NvFlexExtSoftJoint, ptr %141, i32 0, i32 3
  %143 = load i32, ptr %142, align 4, !tbaa !31
  %144 = sitofp i32 %143 to float
  %145 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN8XVector3IfEdVEf(ptr noundef nonnull align 4 dereferenceable(12) %12, float noundef %144)
  call void @llvm.lifetime.start.p0(i64 12, ptr %16) #7
  call void @_ZN8XVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %16)
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %146

146:                                              ; preds = %167, %140
  %147 = load i32, ptr %17, align 4, !tbaa !9
  %148 = load ptr, ptr %10, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.NvFlexExtSoftJoint, ptr %148, i32 0, i32 3
  %150 = load i32, ptr %149, align 4, !tbaa !31
  %151 = icmp slt i32 %147, %150
  br i1 %151, label %153, label %152

152:                                              ; preds = %146
  store i32 14, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %170

153:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #7
  %154 = load ptr, ptr %2, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.NvFlexExtContainer, ptr %154, i32 0, i32 8
  %156 = load ptr, ptr %10, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.NvFlexExtSoftJoint, ptr %156, i32 0, i32 0
  %158 = load ptr, ptr %157, align 8, !tbaa !32
  %159 = load i32, ptr %17, align 4, !tbaa !9
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds i32, ptr %158, i64 %160
  %162 = load i32, ptr %161, align 4, !tbaa !9
  %163 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN12NvFlexVectorI8XVector4IfEEixEi(ptr noundef nonnull align 8 dereferenceable(36) %155, i32 noundef %162)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 4 %163, i64 16, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.start.p0(i64 12, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %20) #7
  %164 = call noundef ptr @_ZNK8XVector4IfEcvPKfEv(ptr noundef nonnull align 4 dereferenceable(16) %18)
  call void @_ZN8XVector3IfEC2EPKf(ptr noundef nonnull align 4 dereferenceable(12) %20, ptr noundef %164)
  %165 = call { <2 x float>, float } @_ZNK8XVector3IfEmiERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %20, ptr noundef nonnull align 4 dereferenceable(12) %12)
  store { <2 x float>, float } %165, ptr %21, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 8 %21, i64 12, i1 false)
  %166 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN8XVector3IfEpLERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %16, ptr noundef nonnull align 4 dereferenceable(12) %19)
  call void @llvm.lifetime.end.p0(i64 12, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #7
  br label %167

167:                                              ; preds = %153
  %168 = load i32, ptr %17, align 4, !tbaa !9
  %169 = add nsw i32 %168, 1
  store i32 %169, ptr %17, align 4, !tbaa !9
  br label %146, !llvm.loop !34

170:                                              ; preds = %152
  %171 = load ptr, ptr %10, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.NvFlexExtSoftJoint, ptr %171, i32 0, i32 3
  %173 = load i32, ptr %172, align 4, !tbaa !31
  %174 = sitofp i32 %173 to float
  %175 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN8XVector3IfEdVEf(ptr noundef nonnull align 4 dereferenceable(12) %16, float noundef %174)
  %176 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN8XVector3IfEpLERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %16, ptr noundef nonnull align 4 dereferenceable(12) %12)
  %177 = getelementptr inbounds %class.XVector3, ptr %16, i32 0, i32 0
  %178 = load float, ptr %177, align 4, !tbaa !35
  %179 = load ptr, ptr %10, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.NvFlexExtSoftJoint, ptr %179, i32 0, i32 4
  %181 = getelementptr inbounds [3 x float], ptr %180, i64 0, i64 0
  store float %178, ptr %181, align 8, !tbaa !20
  %182 = getelementptr inbounds %class.XVector3, ptr %16, i32 0, i32 1
  %183 = load float, ptr %182, align 4, !tbaa !37
  %184 = load ptr, ptr %10, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.NvFlexExtSoftJoint, ptr %184, i32 0, i32 4
  %186 = getelementptr inbounds [3 x float], ptr %185, i64 0, i64 1
  store float %183, ptr %186, align 4, !tbaa !20
  %187 = getelementptr inbounds %class.XVector3, ptr %16, i32 0, i32 2
  %188 = load float, ptr %187, align 4, !tbaa !38
  %189 = load ptr, ptr %10, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.NvFlexExtSoftJoint, ptr %189, i32 0, i32 4
  %191 = getelementptr inbounds [3 x float], ptr %190, i64 0, i64 2
  store float %188, ptr %191, align 8, !tbaa !20
  %192 = load ptr, ptr %10, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.NvFlexExtSoftJoint, ptr %192, i32 0, i32 7
  store i8 1, ptr %193, align 8, !tbaa !28
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #7
  br label %222

194:                                              ; preds = %102
  %195 = load ptr, ptr %2, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.NvFlexExtContainer, ptr %195, i32 0, i32 19
  %197 = load i32, ptr %11, align 4, !tbaa !9
  %198 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN12NvFlexVectorI8XVector3IfEEixEi(ptr noundef nonnull align 8 dereferenceable(36) %196, i32 noundef %197)
  %199 = getelementptr inbounds %class.XVector3, ptr %198, i32 0, i32 0
  %200 = load float, ptr %199, align 4, !tbaa !35
  %201 = load ptr, ptr %10, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.NvFlexExtSoftJoint, ptr %201, i32 0, i32 4
  %203 = getelementptr inbounds [3 x float], ptr %202, i64 0, i64 0
  store float %200, ptr %203, align 8, !tbaa !20
  %204 = load ptr, ptr %2, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.NvFlexExtContainer, ptr %204, i32 0, i32 19
  %206 = load i32, ptr %11, align 4, !tbaa !9
  %207 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN12NvFlexVectorI8XVector3IfEEixEi(ptr noundef nonnull align 8 dereferenceable(36) %205, i32 noundef %206)
  %208 = getelementptr inbounds %class.XVector3, ptr %207, i32 0, i32 1
  %209 = load float, ptr %208, align 4, !tbaa !37
  %210 = load ptr, ptr %10, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.NvFlexExtSoftJoint, ptr %210, i32 0, i32 4
  %212 = getelementptr inbounds [3 x float], ptr %211, i64 0, i64 1
  store float %209, ptr %212, align 4, !tbaa !20
  %213 = load ptr, ptr %2, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.NvFlexExtContainer, ptr %213, i32 0, i32 19
  %215 = load i32, ptr %11, align 4, !tbaa !9
  %216 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN12NvFlexVectorI8XVector3IfEEixEi(ptr noundef nonnull align 8 dereferenceable(36) %214, i32 noundef %215)
  %217 = getelementptr inbounds %class.XVector3, ptr %216, i32 0, i32 2
  %218 = load float, ptr %217, align 4, !tbaa !38
  %219 = load ptr, ptr %10, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.NvFlexExtSoftJoint, ptr %219, i32 0, i32 4
  %221 = getelementptr inbounds [3 x float], ptr %220, i64 0, i64 2
  store float %218, ptr %221, align 8, !tbaa !20
  br label %222

222:                                              ; preds = %194, %170
  %223 = load ptr, ptr %2, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.NvFlexExtContainer, ptr %223, i32 0, i32 18
  %225 = load i32, ptr %11, align 4, !tbaa !9
  %226 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN12NvFlexVectorI5XQuatIfEEixEi(ptr noundef nonnull align 8 dereferenceable(36) %224, i32 noundef %225)
  %227 = getelementptr inbounds %class.XQuat, ptr %226, i32 0, i32 0
  %228 = load float, ptr %227, align 4, !tbaa !39
  %229 = load ptr, ptr %10, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.NvFlexExtSoftJoint, ptr %229, i32 0, i32 5
  %231 = getelementptr inbounds [4 x float], ptr %230, i64 0, i64 0
  store float %228, ptr %231, align 4, !tbaa !20
  %232 = load ptr, ptr %2, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.NvFlexExtContainer, ptr %232, i32 0, i32 18
  %234 = load i32, ptr %11, align 4, !tbaa !9
  %235 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN12NvFlexVectorI5XQuatIfEEixEi(ptr noundef nonnull align 8 dereferenceable(36) %233, i32 noundef %234)
  %236 = getelementptr inbounds %class.XQuat, ptr %235, i32 0, i32 1
  %237 = load float, ptr %236, align 4, !tbaa !41
  %238 = load ptr, ptr %10, align 8, !tbaa !5
  %239 = getelementptr inbounds %struct.NvFlexExtSoftJoint, ptr %238, i32 0, i32 5
  %240 = getelementptr inbounds [4 x float], ptr %239, i64 0, i64 1
  store float %237, ptr %240, align 4, !tbaa !20
  %241 = load ptr, ptr %2, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct.NvFlexExtContainer, ptr %241, i32 0, i32 18
  %243 = load i32, ptr %11, align 4, !tbaa !9
  %244 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN12NvFlexVectorI5XQuatIfEEixEi(ptr noundef nonnull align 8 dereferenceable(36) %242, i32 noundef %243)
  %245 = getelementptr inbounds %class.XQuat, ptr %244, i32 0, i32 2
  %246 = load float, ptr %245, align 4, !tbaa !42
  %247 = load ptr, ptr %10, align 8, !tbaa !5
  %248 = getelementptr inbounds %struct.NvFlexExtSoftJoint, ptr %247, i32 0, i32 5
  %249 = getelementptr inbounds [4 x float], ptr %248, i64 0, i64 2
  store float %246, ptr %249, align 4, !tbaa !20
  %250 = load ptr, ptr %2, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.NvFlexExtContainer, ptr %250, i32 0, i32 18
  %252 = load i32, ptr %11, align 4, !tbaa !9
  %253 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN12NvFlexVectorI5XQuatIfEEixEi(ptr noundef nonnull align 8 dereferenceable(36) %251, i32 noundef %252)
  %254 = getelementptr inbounds %class.XQuat, ptr %253, i32 0, i32 3
  %255 = load float, ptr %254, align 4, !tbaa !43
  %256 = load ptr, ptr %10, align 8, !tbaa !5
  %257 = getelementptr inbounds %struct.NvFlexExtSoftJoint, ptr %256, i32 0, i32 5
  %258 = getelementptr inbounds [4 x float], ptr %257, i64 0, i64 3
  store float %255, ptr %258, align 4, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %259

259:                                              ; preds = %222
  %260 = load i32, ptr %9, align 4, !tbaa !9
  %261 = add nsw i32 %260, 1
  store i32 %261, ptr %9, align 4, !tbaa !9
  br label %94, !llvm.loop !44

262:                                              ; preds = %101
  %263 = load ptr, ptr %2, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.NvFlexExtContainer, ptr %263, i32 0, i32 19
  call void @_ZN12NvFlexVectorI8XVector3IfEE5unmapEv(ptr noundef nonnull align 8 dereferenceable(36) %264)
  %265 = load ptr, ptr %2, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.NvFlexExtContainer, ptr %265, i32 0, i32 18
  call void @_ZN12NvFlexVectorI5XQuatIfEE5unmapEv(ptr noundef nonnull align 8 dereferenceable(36) %266)
  ret void

267:                                              ; preds = %87
  unreachable
}

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN8XVector3IfEdVEf(ptr noundef nonnull align 4 dereferenceable(12), float noundef) #4 align 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)) #6 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 40}
!12 = !{!"_ZTS17NvFlexExtInstance", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!13 = !{!14, !10, i64 88}
!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, !16, i64 128, !16, i64 132, !16, i64 136}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"float", !7, i64 0}
!17 = !{!12, !10, i64 16}
!18 = !{!12, !6, i64 24}
!19 = !{i64 0, i64 4, !20, i64 4, i64 4, !20, i64 8, i64 4, !20}
!20 = !{!16, !16, i64 0}
!21 = !{!12, !6, i64 32}
!22 = !{i64 0, i64 4, !20, i64 4, i64 4, !20, i64 8, i64 4, !20, i64 12, i64 4, !20}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = distinct !{!25, !24}
!26 = !{!27, !10, i64 16}
!27 = !{!"_ZTS18NvFlexExtSoftJoint", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !7, i64 24, !7, i64 36, !16, i64 52, !15, i64 56}
!28 = !{!27, !15, i64 56}
!29 = !{i8 0, i8 2}
!30 = !{}
!31 = !{!27, !10, i64 20}
!32 = !{!27, !6, i64 0}
!33 = distinct !{!33, !24}
!34 = distinct !{!34, !24}
!35 = !{!36, !16, i64 0}
!36 = !{!"_ZTS8XVector3IfE", !16, i64 0, !16, i64 4, !16, i64 8}
!37 = !{!36, !16, i64 4}
!38 = !{!36, !16, i64 8}
!39 = !{!40, !16, i64 0}
!40 = !{!"_ZTS5XQuatIfE", !16, i64 0, !16, i64 4, !16, i64 8, !16, i64 12}
!41 = !{!40, !16, i64 4}
!42 = !{!40, !16, i64 8}
!43 = !{!40, !16, i64 12}
!44 = distinct !{!44, !24}


; 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.XVector3 = type { float, float, float }
%class.XVector4 = type { float, float, float, float }
%class.XQuat = type { float, float, float, float }

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(16) ptr @_ZN12NvFlexVectorI8XVector4IfEEixEi(ptr noundef nonnull align 8 dereferenceable(36), i32 noundef) local_unnamed_addr #3 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(16) ptr @_ZN12NvFlexVectorI5XQuatIfEEixEi(ptr noundef nonnull align 8 dereferenceable(36), i32 noundef) local_unnamed_addr #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @NvFlexExtUpdateInstances(ptr noundef %0) local_unnamed_addr #5 {
  %2 = alloca %class.XVector3, align 4
  %3 = alloca %class.XVector4, align 4
  %4 = alloca %class.XVector3, align 4
  %5 = alloca %class.XVector3, align 8
  %6 = alloca %class.XVector4, align 4
  %7 = alloca %class.XVector3, align 8
  %8 = alloca %class.XVector3, align 4
  %9 = getelementptr inbounds i8, ptr %0, i64 576
  tail call void @_ZN12NvFlexVectorI8XVector3IfEE3mapEi(ptr noundef nonnull align 8 dereferenceable(36) %9, i32 noundef 0)
  %10 = getelementptr inbounds i8, ptr %0, i64 536
  tail call void @_ZN12NvFlexVectorI5XQuatIfEE3mapEi(ptr noundef nonnull align 8 dereferenceable(36) %10, i32 noundef 0)
  %11 = getelementptr inbounds i8, ptr %0, i64 88
  %12 = tail call noundef i64 @_ZNKSt6vectorIP17NvFlexExtInstanceSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  %13 = trunc i64 %12 to i32
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph82, label %.preheader

.preheader:                                       ; preds = %.loopexit, %1
  %15 = getelementptr inbounds i8, ptr %0, i64 112
  %16 = tail call noundef i64 @_ZNKSt6vectorIP18NvFlexExtSoftJointSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #7
  %17 = trunc i64 %16 to i32
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %.lr.ph91, label %._crit_edge92

.lr.ph91:                                         ; preds = %.preheader
  %19 = getelementptr inbounds i8, ptr %0, i64 136
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 8
  %20 = getelementptr inbounds i8, ptr %5, i64 8
  br label %45

.lr.ph82:                                         ; preds = %1, %.loopexit
  %indvars.iv96 = phi i64 [ %indvars.iv.next97, %.loopexit ], [ 0, %1 ]
  %21 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP17NvFlexExtInstanceSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %indvars.iv96) #7
  %22 = load ptr, ptr %21, align 8, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %22, i64 40
  %24 = load ptr, ptr %23, align 8, !tbaa !9
  %25 = getelementptr inbounds i8, ptr %24, i64 88
  %26 = load i32, ptr %25, align 8, !tbaa !12
  %27 = getelementptr inbounds i8, ptr %22, i64 16
  %28 = load i32, ptr %27, align 8, !tbaa !16
  %29 = icmp ne i32 %28, -1
  %30 = icmp sgt i32 %26, 0
  %or.cond = select i1 %29, i1 %30, i1 false
  br i1 %or.cond, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.lr.ph82
  %31 = getelementptr inbounds i8, ptr %22, i64 24
  %32 = getelementptr inbounds i8, ptr %22, i64 32
  %wide.trip.count = zext nneg i32 %26 to i64
  br label %33

33:                                               ; preds = %.lr.ph, %33
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %33 ]
  %34 = trunc i64 %indvars.iv to i32
  %35 = add i32 %28, %34
  %36 = tail call noundef nonnull align 4 dereferenceable(12) ptr @_ZN12NvFlexVectorI8XVector3IfEEixEi(ptr noundef nonnull align 8 dereferenceable(36) %9, i32 noundef %35)
  %37 = load ptr, ptr %31, align 8, !tbaa !17
  %38 = getelementptr inbounds %class.XVector3, ptr %37, i64 %indvars.iv
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %38, ptr noundef nonnull align 4 dereferenceable(12) %36, i64 12, i1 false), !tbaa.struct !18
  %39 = tail call noundef nonnull align 4 dereferenceable(16) ptr @_ZN12NvFlexVectorI5XQuatIfEEixEi(ptr noundef nonnull align 8 dereferenceable(36) %10, i32 noundef %35)
  %40 = load ptr, ptr %32, align 8, !tbaa !20
  %41 = getelementptr inbounds %class.XQuat, ptr %40, i64 %indvars.iv
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %41, ptr noundef nonnull align 4 dereferenceable(16) %39, i64 16, i1 false), !tbaa.struct !21
  %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 %.loopexit, label %33, !llvm.loop !22

.loopexit:                                        ; preds = %33, %.lr.ph82
  %indvars.iv.next97 = add nuw nsw i64 %indvars.iv96, 1
  %42 = tail call noundef i64 @_ZNKSt6vectorIP17NvFlexExtInstanceSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  %sext = shl i64 %42, 32
  %43 = ashr exact i64 %sext, 32
  %44 = icmp slt i64 %indvars.iv.next97, %43
  br i1 %44, label %.lr.ph82, label %.preheader, !llvm.loop !24

._crit_edge92:                                    ; preds = %99, %.preheader
  call void @_ZN12NvFlexVectorI8XVector3IfEE5unmapEv(ptr noundef nonnull align 8 dereferenceable(36) %9)
  call void @_ZN12NvFlexVectorI5XQuatIfEE5unmapEv(ptr noundef nonnull align 8 dereferenceable(36) %10)
  ret void

45:                                               ; preds = %.lr.ph91, %99
  %indvars.iv105 = phi i64 [ 0, %.lr.ph91 ], [ %indvars.iv.next106, %99 ]
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP18NvFlexExtSoftJointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %indvars.iv105) #7
  %47 = load ptr, ptr %46, align 8, !tbaa !5
  %48 = getelementptr inbounds i8, ptr %47, i64 16
  %49 = load i32, ptr %48, align 8, !tbaa !25
  %50 = getelementptr inbounds i8, ptr %47, i64 56
  %51 = load i8, ptr %50, align 8, !tbaa !27, !range !28, !noundef !29
  %52 = trunc nuw i8 %51 to i1
  br i1 %52, label %87, label %53

53:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %2) #7
  call void @_ZN8XVector3IfEC2Ef(ptr noundef nonnull align 4 dereferenceable(12) %2, float noundef 0.000000e+00)
  %54 = getelementptr inbounds i8, ptr %47, i64 20
  %55 = load i32, ptr %54, align 4, !tbaa !30
  %56 = icmp sgt i32 %55, 0
  br i1 %56, label %.lr.ph84, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph84, %53
  %.lcssa = phi i32 [ %55, %53 ], [ %67, %.lr.ph84 ]
  %57 = sitofp i32 %.lcssa to float
  %58 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN8XVector3IfEdVEf(ptr noundef nonnull align 4 dereferenceable(12) %2, float noundef %57)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #7
  call void @_ZN8XVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %5)
  %59 = load i32, ptr %54, align 4, !tbaa !30
  %60 = icmp sgt i32 %59, 0
  br i1 %60, label %.lr.ph87, label %._crit_edge88

.lr.ph84:                                         ; preds = %53, %.lr.ph84
  %indvars.iv99 = phi i64 [ %indvars.iv.next100, %.lr.ph84 ], [ 0, %53 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #7
  %61 = load ptr, ptr %47, align 8, !tbaa !31
  %62 = getelementptr inbounds i32, ptr %61, i64 %indvars.iv99
  %63 = load i32, ptr %62, align 4, !tbaa !32
  %64 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN12NvFlexVectorI8XVector4IfEEixEi(ptr noundef nonnull align 8 dereferenceable(36) %19, i32 noundef %63)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %3, ptr noundef nonnull align 4 dereferenceable(16) %64, i64 16, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #7
  %65 = call noundef ptr @_ZNK8XVector4IfEcvPKfEv(ptr noundef nonnull align 4 dereferenceable(16) %3)
  call void @_ZN8XVector3IfEC2EPKf(ptr noundef nonnull align 4 dereferenceable(12) %4, ptr noundef %65)
  %66 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN8XVector3IfEpLERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(12) %4)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  %indvars.iv.next100 = add nuw nsw i64 %indvars.iv99, 1
  %67 = load i32, ptr %54, align 4, !tbaa !30
  %68 = sext i32 %67 to i64
  %69 = icmp slt i64 %indvars.iv.next100, %68
  br i1 %69, label %.lr.ph84, label %._crit_edge, !llvm.loop !33

._crit_edge88:                                    ; preds = %.lr.ph87, %._crit_edge
  %.lcssa79 = phi i32 [ %59, %._crit_edge ], [ %84, %.lr.ph87 ]
  %70 = sitofp i32 %.lcssa79 to float
  %71 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN8XVector3IfEdVEf(ptr noundef nonnull align 4 dereferenceable(12) %5, float noundef %70)
  %72 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN8XVector3IfEpLERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %2)
  %73 = getelementptr inbounds i8, ptr %47, i64 24
  %74 = load <2 x float>, ptr %5, align 8, !tbaa !19
  store <2 x float> %74, ptr %73, align 8, !tbaa !19
  %75 = load float, ptr %20, align 8, !tbaa !34
  %76 = getelementptr inbounds i8, ptr %47, i64 32
  store float %75, ptr %76, align 8, !tbaa !19
  store i8 1, ptr %50, align 8, !tbaa !27
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %2) #7
  br label %99

.lr.ph87:                                         ; preds = %._crit_edge, %.lr.ph87
  %indvars.iv102 = phi i64 [ %indvars.iv.next103, %.lr.ph87 ], [ 0, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  %77 = load ptr, ptr %47, align 8, !tbaa !31
  %78 = getelementptr inbounds i32, ptr %77, i64 %indvars.iv102
  %79 = load i32, ptr %78, align 4, !tbaa !32
  %80 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN12NvFlexVectorI8XVector4IfEEixEi(ptr noundef nonnull align 8 dereferenceable(36) %19, i32 noundef %79)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %6, ptr noundef nonnull align 4 dereferenceable(16) %80, i64 16, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #7
  %81 = call noundef ptr @_ZNK8XVector4IfEcvPKfEv(ptr noundef nonnull align 4 dereferenceable(16) %6)
  call void @_ZN8XVector3IfEC2EPKf(ptr noundef nonnull align 4 dereferenceable(12) %8, ptr noundef %81)
  %82 = call { <2 x float>, float } @_ZNK8XVector3IfEmiERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %8, ptr noundef nonnull align 4 dereferenceable(12) %2)
  %.fca.0.extract = extractvalue { <2 x float>, float } %82, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %82, 1
  store <2 x float> %.fca.0.extract, ptr %7, align 8
  store float %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 8
  %83 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN8XVector3IfEpLERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %7)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  %indvars.iv.next103 = add nuw nsw i64 %indvars.iv102, 1
  %84 = load i32, ptr %54, align 4, !tbaa !30
  %85 = sext i32 %84 to i64
  %86 = icmp slt i64 %indvars.iv.next103, %85
  br i1 %86, label %.lr.ph87, label %._crit_edge88, !llvm.loop !36

87:                                               ; preds = %45
  %88 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN12NvFlexVectorI8XVector3IfEEixEi(ptr noundef nonnull align 8 dereferenceable(36) %9, i32 noundef %49)
  %89 = load float, ptr %88, align 4, !tbaa !37
  %90 = getelementptr inbounds i8, ptr %47, i64 24
  store float %89, ptr %90, align 8, !tbaa !19
  %91 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN12NvFlexVectorI8XVector3IfEEixEi(ptr noundef nonnull align 8 dereferenceable(36) %9, i32 noundef %49)
  %92 = getelementptr inbounds i8, ptr %91, i64 4
  %93 = load float, ptr %92, align 4, !tbaa !38
  %94 = getelementptr inbounds i8, ptr %47, i64 28
  store float %93, ptr %94, align 4, !tbaa !19
  %95 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN12NvFlexVectorI8XVector3IfEEixEi(ptr noundef nonnull align 8 dereferenceable(36) %9, i32 noundef %49)
  %96 = getelementptr inbounds i8, ptr %95, i64 8
  %97 = load float, ptr %96, align 4, !tbaa !34
  %98 = getelementptr inbounds i8, ptr %47, i64 32
  store float %97, ptr %98, align 8, !tbaa !19
  br label %99

99:                                               ; preds = %87, %._crit_edge88
  %100 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN12NvFlexVectorI5XQuatIfEEixEi(ptr noundef nonnull align 8 dereferenceable(36) %10, i32 noundef %49)
  %101 = load float, ptr %100, align 4, !tbaa !39
  %102 = getelementptr inbounds i8, ptr %47, i64 36
  store float %101, ptr %102, align 4, !tbaa !19
  %103 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN12NvFlexVectorI5XQuatIfEEixEi(ptr noundef nonnull align 8 dereferenceable(36) %10, i32 noundef %49)
  %104 = getelementptr inbounds i8, ptr %103, i64 4
  %105 = load float, ptr %104, align 4, !tbaa !41
  %106 = getelementptr inbounds i8, ptr %47, i64 40
  store float %105, ptr %106, align 4, !tbaa !19
  %107 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN12NvFlexVectorI5XQuatIfEEixEi(ptr noundef nonnull align 8 dereferenceable(36) %10, i32 noundef %49)
  %108 = getelementptr inbounds i8, ptr %107, i64 8
  %109 = load float, ptr %108, align 4, !tbaa !42
  %110 = getelementptr inbounds i8, ptr %47, i64 44
  store float %109, ptr %110, align 4, !tbaa !19
  %111 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN12NvFlexVectorI5XQuatIfEEixEi(ptr noundef nonnull align 8 dereferenceable(36) %10, i32 noundef %49)
  %112 = getelementptr inbounds i8, ptr %111, i64 12
  %113 = load float, ptr %112, align 4, !tbaa !43
  %114 = getelementptr inbounds i8, ptr %47, i64 48
  store float %113, ptr %114, align 4, !tbaa !19
  %indvars.iv.next106 = add nuw nsw i64 %indvars.iv105, 1
  %115 = call noundef i64 @_ZNKSt6vectorIP18NvFlexExtSoftJointSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #7
  %sext108 = shl i64 %115, 32
  %116 = ashr exact i64 %sext108, 32
  %117 = icmp slt i64 %indvars.iv.next106, %116
  br i1 %117, label %45, label %._crit_edge92, !llvm.loop !44
}

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN8XVector3IfEpLERKS0_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN8XVector3IfEdVEf(ptr noundef nonnull align 4 dereferenceable(12), float noundef) local_unnamed_addr #4 align 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 #6 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 40}
!10 = !{!"_ZTS17NvFlexExtInstance", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !11, i64 88}
!13 = !{!"_ZTS14NvFlexExtAsset", !6, i64 0, !11, i64 8, !11, i64 12, !6, i64 16, !6, i64 24, !6, i64 32, !11, i64 40, !6, i64 48, !11, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !11, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !11, i64 120, !14, i64 124, !15, i64 128, !15, i64 132, !15, i64 136}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = !{!10, !11, i64 16}
!17 = !{!10, !6, i64 24}
!18 = !{i64 0, i64 4, !19, i64 4, i64 4, !19, i64 8, i64 4, !19}
!19 = !{!15, !15, i64 0}
!20 = !{!10, !6, i64 32}
!21 = !{i64 0, i64 4, !19, i64 4, i64 4, !19, i64 8, i64 4, !19, i64 12, i64 4, !19}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = !{!26, !11, i64 16}
!26 = !{!"_ZTS18NvFlexExtSoftJoint", !6, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !7, i64 24, !7, i64 36, !15, i64 52, !14, i64 56}
!27 = !{!26, !14, i64 56}
!28 = !{i8 0, i8 2}
!29 = !{}
!30 = !{!26, !11, i64 20}
!31 = !{!26, !6, i64 0}
!32 = !{!11, !11, i64 0}
!33 = distinct !{!33, !23}
!34 = !{!35, !15, i64 8}
!35 = !{!"_ZTS8XVector3IfE", !15, i64 0, !15, i64 4, !15, i64 8}
!36 = distinct !{!36, !23}
!37 = !{!35, !15, i64 0}
!38 = !{!35, !15, i64 4}
!39 = !{!40, !15, i64 0}
!40 = !{!"_ZTS5XQuatIfE", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12}
!41 = !{!40, !15, i64 4}
!42 = !{!40, !15, i64 8}
!43 = !{!40, !15, i64 12}
!44 = distinct !{!44, !23}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass