; 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"

%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] }>

; Function Attrs: mustprogress uwtable
define dso_local ptr @NvFlexExtCreateContainer(ptr noundef %0, ptr noundef %1, i32 noundef %2) #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %11 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 1144) #7
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZN18NvFlexExtContainerC2EP13NvFlexLibrary(ptr noundef nonnull align 8 dereferenceable(1138) %11, ptr noundef %12)
          to label %13 unwind label %32

13:                                               ; preds = %3
  store ptr %11, ptr %7, align 8, !tbaa !5
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = load ptr, ptr %7, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.NvFlexExtContainer, ptr %15, i32 0, i32 2
  store ptr %14, ptr %16, align 8, !tbaa !11
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = load ptr, ptr %7, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.NvFlexExtContainer, ptr %18, i32 0, i32 3
  store ptr %17, ptr %19, align 8, !tbaa !32
  %20 = load i32, ptr %6, align 4, !tbaa !9
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.NvFlexExtContainer, ptr %21, i32 0, i32 0
  store i32 %20, ptr %22, align 8, !tbaa !33
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.NvFlexExtContainer, ptr %23, i32 0, i32 5
  %25 = load i32, ptr %6, align 4, !tbaa !9
  %26 = sext i32 %25 to i64
  call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %26)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %27

27:                                               ; preds = %43, %13
  %28 = load i32, ptr %10, align 4, !tbaa !9
  %29 = load i32, ptr %6, align 4, !tbaa !9
  %30 = icmp slt i32 %28, %29
  br i1 %30, label %36, label %31

31:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %46

32:                                               ; preds = %3
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %8, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %9, align 4
  call void @_ZdlPvm(ptr noundef %11, i64 noundef 1144) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %74

36:                                               ; preds = %27
  %37 = load i32, ptr %10, align 4, !tbaa !9
  %38 = load ptr, ptr %7, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.NvFlexExtContainer, ptr %38, i32 0, i32 5
  %40 = load i32, ptr %10, align 4, !tbaa !9
  %41 = sext i32 %40 to i64
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %39, i64 noundef %41) #6
  store i32 %37, ptr %42, align 4, !tbaa !9
  br label %43

43:                                               ; preds = %36
  %44 = load i32, ptr %10, align 4, !tbaa !9
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %10, align 4, !tbaa !9
  br label %27, !llvm.loop !34

46:                                               ; preds = %31
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.NvFlexExtContainer, ptr %47, i32 0, i32 4
  %49 = load i32, ptr %6, align 4, !tbaa !9
  call void @_ZN12NvFlexVectorIiE4initEi(ptr noundef nonnull align 8 dereferenceable(36) %48, i32 noundef %49)
  %50 = load ptr, ptr %7, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.NvFlexExtContainer, ptr %50, i32 0, i32 8
  %52 = load i32, ptr %6, align 4, !tbaa !9
  call void @_ZN12NvFlexVectorI8XVector4IfEE4initEi(ptr noundef nonnull align 8 dereferenceable(36) %51, i32 noundef %52)
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.NvFlexExtContainer, ptr %53, i32 0, i32 9
  %55 = load i32, ptr %6, align 4, !tbaa !9
  call void @_ZN12NvFlexVectorI8XVector4IfEE4initEi(ptr noundef nonnull align 8 dereferenceable(36) %54, i32 noundef %55)
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.NvFlexExtContainer, ptr %56, i32 0, i32 10
  %58 = load i32, ptr %6, align 4, !tbaa !9
  call void @_ZN12NvFlexVectorI8XVector3IfEE4initEi(ptr noundef nonnull align 8 dereferenceable(36) %57, i32 noundef %58)
  %59 = load ptr, ptr %7, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.NvFlexExtContainer, ptr %59, i32 0, i32 11
  %61 = load i32, ptr %6, align 4, !tbaa !9
  call void @_ZN12NvFlexVectorIiE4initEi(ptr noundef nonnull align 8 dereferenceable(36) %60, i32 noundef %61)
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.NvFlexExtContainer, ptr %62, i32 0, i32 12
  %64 = load i32, ptr %6, align 4, !tbaa !9
  call void @_ZN12NvFlexVectorI8XVector4IfEE4initEi(ptr noundef nonnull align 8 dereferenceable(36) %63, i32 noundef %64)
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  call void @NvFlexAcquireContext(ptr noundef %65)
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.NvFlexExtContainer, ptr %66, i32 0, i32 31
  call void @_ZN12NvFlexVectorI8XVector3IfEE4initEi(ptr noundef nonnull align 8 dereferenceable(36) %67, i32 noundef 1)
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.NvFlexExtContainer, ptr %68, i32 0, i32 32
  call void @_ZN12NvFlexVectorI8XVector3IfEE4initEi(ptr noundef nonnull align 8 dereferenceable(36) %69, i32 noundef 1)
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  call void @NvFlexRestoreContext(ptr noundef %70)
  %71 = load ptr, ptr %7, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.NvFlexExtContainer, ptr %71, i32 0, i32 33
  store i8 0, ptr %72, align 8, !tbaa !36
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  ret ptr %73

74:                                               ; preds = %32
  %75 = load ptr, ptr %8, align 8
  %76 = load i32, ptr %9, align 4
  %77 = insertvalue { ptr, i32 } poison, ptr %75, 0
  %78 = insertvalue { ptr, i32 } %77, i32 %76, 1
  resume { ptr, i32 } %78
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN18NvFlexExtContainerC2EP13NvFlexLibrary(ptr noundef nonnull align 8 dereferenceable(1138), ptr noundef) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 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) #4 align 2

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

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

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

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

declare void @NvFlexAcquireContext(ptr noundef) #5

declare void @NvFlexRestoreContext(ptr noundef) #5

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 8}
!12 = !{!"_ZTS18NvFlexExtContainer", !10, i64 0, !6, i64 8, !6, i64 16, !13, i64 24, !15, i64 64, !19, i64 88, !23, i64 112, !27, i64 136, !27, i64 176, !28, i64 216, !13, i64 256, !27, i64 296, !13, i64 336, !13, i64 376, !29, i64 416, !29, i64 456, !29, i64 496, !30, i64 536, !28, i64 576, !28, i64 616, !13, i64 656, !29, i64 696, !29, i64 736, !13, i64 776, !28, i64 816, !13, i64 856, !13, i64 896, !29, i64 936, !29, i64 976, !29, i64 1016, !28, i64 1056, !28, i64 1096, !31, i64 1136, !31, i64 1137}
!13 = !{!"_ZTS12NvFlexVectorIiE", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 28, !14, i64 32}
!14 = !{!"_ZTS16NvFlexBufferType", !7, i64 0}
!15 = !{!"_ZTSSt6vectorIiSaIiEE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!"_ZTSSt6vectorIP17NvFlexExtInstanceSaIS1_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIP17NvFlexExtInstanceSaIS1_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIP17NvFlexExtInstanceSaIS1_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIP17NvFlexExtInstanceSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!"_ZTSSt6vectorIP18NvFlexExtSoftJointSaIS1_EE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseIP18NvFlexExtSoftJointSaIS1_EE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIP18NvFlexExtSoftJointSaIS1_EE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIP18NvFlexExtSoftJointSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!27 = !{!"_ZTS12NvFlexVectorI8XVector4IfEE", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 28, !14, i64 32}
!28 = !{!"_ZTS12NvFlexVectorI8XVector3IfEE", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 28, !14, i64 32}
!29 = !{!"_ZTS12NvFlexVectorIfE", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 28, !14, i64 32}
!30 = !{!"_ZTS12NvFlexVectorI5XQuatIfEE", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 28, !14, i64 32}
!31 = !{!"bool", !7, i64 0}
!32 = !{!12, !6, i64 16}
!33 = !{!12, !10, i64 0}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = !{!12, !31, i64 1136}


; 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"

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull ptr @NvFlexExtCreateContainer(ptr noundef %0, ptr noundef %1, i32 noundef %2) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %4 = tail call noalias noundef nonnull dereferenceable(1144) ptr @_Znwm(i64 noundef 1144) #5
  invoke void @_ZN18NvFlexExtContainerC2EP13NvFlexLibrary(ptr noundef nonnull align 8 dereferenceable(1138) %4, ptr noundef %0)
          to label %5 unwind label %20

5:                                                ; preds = %3
  %6 = getelementptr inbounds i8, ptr %4, i64 8
  store ptr %1, ptr %6, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %4, i64 16
  store ptr %0, ptr %7, align 8, !tbaa !30
  store i32 %2, ptr %4, align 8, !tbaa !31
  %8 = getelementptr inbounds i8, ptr %4, i64 64
  %9 = sext i32 %2 to i64
  tail call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %9)
  %10 = icmp sgt i32 %2, 0
  br i1 %10, label %.lr.ph.preheader, label %._crit_edge

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

._crit_edge:                                      ; preds = %.lr.ph, %5
  %11 = getelementptr inbounds i8, ptr %4, i64 24
  tail call void @_ZN12NvFlexVectorIiE4initEi(ptr noundef nonnull align 8 dereferenceable(36) %11, i32 noundef %2)
  %12 = getelementptr inbounds i8, ptr %4, i64 136
  tail call void @_ZN12NvFlexVectorI8XVector4IfEE4initEi(ptr noundef nonnull align 8 dereferenceable(36) %12, i32 noundef %2)
  %13 = getelementptr inbounds i8, ptr %4, i64 176
  tail call void @_ZN12NvFlexVectorI8XVector4IfEE4initEi(ptr noundef nonnull align 8 dereferenceable(36) %13, i32 noundef %2)
  %14 = getelementptr inbounds i8, ptr %4, i64 216
  tail call void @_ZN12NvFlexVectorI8XVector3IfEE4initEi(ptr noundef nonnull align 8 dereferenceable(36) %14, i32 noundef %2)
  %15 = getelementptr inbounds i8, ptr %4, i64 256
  tail call void @_ZN12NvFlexVectorIiE4initEi(ptr noundef nonnull align 8 dereferenceable(36) %15, i32 noundef %2)
  %16 = getelementptr inbounds i8, ptr %4, i64 296
  tail call void @_ZN12NvFlexVectorI8XVector4IfEE4initEi(ptr noundef nonnull align 8 dereferenceable(36) %16, i32 noundef %2)
  tail call void @NvFlexAcquireContext(ptr noundef %0)
  %17 = getelementptr inbounds i8, ptr %4, i64 1056
  tail call void @_ZN12NvFlexVectorI8XVector3IfEE4initEi(ptr noundef nonnull align 8 dereferenceable(36) %17, i32 noundef 1)
  %18 = getelementptr inbounds i8, ptr %4, i64 1096
  tail call void @_ZN12NvFlexVectorI8XVector3IfEE4initEi(ptr noundef nonnull align 8 dereferenceable(36) %18, i32 noundef 1)
  tail call void @NvFlexRestoreContext(ptr noundef %0)
  %19 = getelementptr inbounds i8, ptr %4, i64 1136
  store i8 0, ptr %19, align 8, !tbaa !32
  ret ptr %4

20:                                               ; preds = %3
  %21 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %4, i64 noundef 1144) #6
  resume { ptr, i32 } %21

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %22 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %indvars.iv) #7
  %23 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %23, ptr %22, align 4, !tbaa !33
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !34
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN18NvFlexExtContainerC2EP13NvFlexLibrary(ptr noundef nonnull align 8 dereferenceable(1138), ptr noundef) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 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 #3 align 2

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

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

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

declare void @NvFlexAcquireContext(ptr noundef) local_unnamed_addr #4

declare void @NvFlexRestoreContext(ptr noundef) local_unnamed_addr #4

attributes #0 = { 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 #1 = { 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 #2 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { "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 = { builtin allocsize(0) }
attributes #6 = { builtin nounwind }
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, !10, i64 8}
!6 = !{!"_ZTS18NvFlexExtContainer", !7, i64 0, !10, i64 8, !10, i64 16, !11, i64 24, !13, i64 64, !17, i64 88, !21, i64 112, !25, i64 136, !25, i64 176, !26, i64 216, !11, i64 256, !25, i64 296, !11, i64 336, !11, i64 376, !27, i64 416, !27, i64 456, !27, i64 496, !28, i64 536, !26, i64 576, !26, i64 616, !11, i64 656, !27, i64 696, !27, i64 736, !11, i64 776, !26, i64 816, !11, i64 856, !11, i64 896, !27, i64 936, !27, i64 976, !27, i64 1016, !26, i64 1056, !26, i64 1096, !29, i64 1136, !29, i64 1137}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_ZTS12NvFlexVectorIiE", !10, i64 0, !10, i64 8, !10, i64 16, !7, i64 24, !7, i64 28, !12, i64 32}
!12 = !{!"_ZTS16NvFlexBufferType", !8, i64 0}
!13 = !{!"_ZTSSt6vectorIiSaIiEE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!17 = !{!"_ZTSSt6vectorIP17NvFlexExtInstanceSaIS1_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIP17NvFlexExtInstanceSaIS1_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIP17NvFlexExtInstanceSaIS1_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIP17NvFlexExtInstanceSaIS1_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!21 = !{!"_ZTSSt6vectorIP18NvFlexExtSoftJointSaIS1_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIP18NvFlexExtSoftJointSaIS1_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIP18NvFlexExtSoftJointSaIS1_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIP18NvFlexExtSoftJointSaIS1_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!25 = !{!"_ZTS12NvFlexVectorI8XVector4IfEE", !10, i64 0, !10, i64 8, !10, i64 16, !7, i64 24, !7, i64 28, !12, i64 32}
!26 = !{!"_ZTS12NvFlexVectorI8XVector3IfEE", !10, i64 0, !10, i64 8, !10, i64 16, !7, i64 24, !7, i64 28, !12, i64 32}
!27 = !{!"_ZTS12NvFlexVectorIfE", !10, i64 0, !10, i64 8, !10, i64 16, !7, i64 24, !7, i64 28, !12, i64 32}
!28 = !{!"_ZTS12NvFlexVectorI5XQuatIfEE", !10, i64 0, !10, i64 8, !10, i64 16, !7, i64 24, !7, i64 28, !12, i64 32}
!29 = !{!"bool", !8, i64 0}
!30 = !{!6, !10, i64 16}
!31 = !{!6, !7, i64 0}
!32 = !{!6, !29, i64 1136}
!33 = !{!7, !7, i64 0}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass