; LLVM IR from BabitMF/bmf :: bmf_lite/src/media/video_buffer (video_buffer_pool)

; 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.bmf_lite::HardwareDataInfo" = type { i32, i32, i32, i32, i32 }
%"class.std::shared_ptr.8" = type { %"class.std::__shared_ptr.9" }
%"class.std::__shared_ptr.9" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.11" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.15" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.14" = type { ptr }
%"class.std::shared_ptr.0" = type { %"class.std::__shared_ptr.1" }
%"class.std::__shared_ptr.1" = type { ptr, %"class.std::__shared_count" }
%class.anon.16 = type { i8 }
%"class.bmf_lite::VideoBufferMultiPool" = type { %"class.bmf_lite::Pool", i32, %"class.std::vector", %"class.std::vector.3", %"class.std::shared_ptr.0", %"class.std::shared_ptr" }
%"class.bmf_lite::Pool" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<bmf_lite::VideoBuffer *, std::allocator<bmf_lite::VideoBuffer *>>::_Vector_impl" }
%"struct.std::_Vector_base<bmf_lite::VideoBuffer *, std::allocator<bmf_lite::VideoBuffer *>>::_Vector_impl" = type { %"struct.std::_Vector_base<bmf_lite::VideoBuffer *, std::allocator<bmf_lite::VideoBuffer *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<bmf_lite::VideoBuffer *, std::allocator<bmf_lite::VideoBuffer *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<std::shared_ptr<bmf_lite::VideoBuffer>, std::allocator<std::shared_ptr<bmf_lite::VideoBuffer>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<bmf_lite::VideoBuffer>, std::allocator<std::shared_ptr<bmf_lite::VideoBuffer>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<bmf_lite::VideoBuffer>, std::allocator<std::shared_ptr<bmf_lite::VideoBuffer>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<bmf_lite::VideoBuffer>, std::allocator<std::shared_ptr<bmf_lite::VideoBuffer>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8bmf_lite11VideoBuffer7setPoolEPNS_4PoolE(ptr noundef nonnull align 8 dereferenceable(76), ptr noundef) #1 align 2

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN8bmf_lite20VideoBufferMultiPool9checkSameESt10shared_ptrINS_11VideoBufferEEiiNS_16HardwareDataInfoE(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef, i32 noundef, i32 noundef, ptr noundef byval(%"class.bmf_lite::HardwareDataInfo") align 8) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8bmf_lite20VideoBufferMultiPool13acquireObjectEiiNS_16HardwareDataInfoE(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.8") align 8 %0, ptr noundef nonnull align 8 dereferenceable(96) %1, i32 noundef %2, i32 noundef %3, ptr noundef byval(%"class.bmf_lite::HardwareDataInfo") align 8 %4) #3 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::shared_ptr.8", align 8
  %13 = alloca %"class.bmf_lite::HardwareDataInfo", align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i1, align 1
  %17 = alloca %"class.__gnu_cxx::__normal_iterator.11", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %21 = alloca %"class.std::shared_ptr.8", align 8
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca %"class.__gnu_cxx::__normal_iterator.15", align 8
  %25 = alloca %"class.__gnu_cxx::__normal_iterator.14", align 8
  %26 = alloca %"class.__gnu_cxx::__normal_iterator.14", align 8
  %27 = alloca %"class.__gnu_cxx::__normal_iterator.14", align 8
  %28 = alloca %"class.__gnu_cxx::__normal_iterator.11", align 8
  %29 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %30 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %31 = alloca ptr, align 8
  %32 = alloca %"class.std::shared_ptr.0", align 8
  %33 = alloca i1, align 1
  %34 = alloca %class.anon.16, align 1
  store ptr %0, ptr %6, align 8
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i32 %2, ptr %8, align 4, !tbaa !9
  store i32 %3, ptr %9, align 4, !tbaa !9
  %35 = load ptr, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %36

36:                                               ; preds = %82, %5
  %37 = load i32, ptr %10, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds %"class.bmf_lite::VideoBufferMultiPool", ptr %35, i32 0, i32 3
  %40 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN8bmf_lite11VideoBufferEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %39) #4
  %41 = icmp ult i64 %38, %40
  br i1 %41, label %43, label %42

42:                                               ; preds = %36
  store i32 2, ptr %11, align 4
  br label %85

43:                                               ; preds = %36
  %44 = getelementptr inbounds %"class.bmf_lite::VideoBufferMultiPool", ptr %35, i32 0, i32 3
  %45 = load i32, ptr %10, align 4, !tbaa !9
  %46 = sext i32 %45 to i64
  %47 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN8bmf_lite11VideoBufferEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %44, i64 noundef %46) #4
  call void @_ZNSt10shared_ptrIN8bmf_lite11VideoBufferEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %47) #4
  %48 = load i32, ptr %8, align 4, !tbaa !9
  %49 = load i32, ptr %9, align 4, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 8 %4, i64 20, i1 false), !tbaa.struct !11
  %50 = invoke noundef zeroext i1 @_ZN8bmf_lite20VideoBufferMultiPool9checkSameESt10shared_ptrINS_11VideoBufferEEiiNS_16HardwareDataInfoE(ptr noundef nonnull align 8 dereferenceable(96) %35, ptr noundef %12, i32 noundef %48, i32 noundef %49, ptr noundef byval(%"class.bmf_lite::HardwareDataInfo") align 8 %13)
          to label %51 unwind label %71

51:                                               ; preds = %43
  call void @_ZNSt12__shared_ptrIN8bmf_lite11VideoBufferELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #4
  br i1 %50, label %52, label %81

52:                                               ; preds = %51
  store i1 false, ptr %16, align 1
  %53 = getelementptr inbounds %"class.bmf_lite::VideoBufferMultiPool", ptr %35, i32 0, i32 3
  %54 = load i32, ptr %10, align 4, !tbaa !9
  %55 = sext i32 %54 to i64
  %56 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN8bmf_lite11VideoBufferEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef %55) #4
  call void @_ZNSt10shared_ptrIN8bmf_lite11VideoBufferEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(16) %56) #4
  %57 = getelementptr inbounds %"class.bmf_lite::VideoBufferMultiPool", ptr %35, i32 0, i32 3
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %58 = getelementptr inbounds %"class.bmf_lite::VideoBufferMultiPool", ptr %35, i32 0, i32 3
  %59 = call ptr @_ZNSt6vectorISt10shared_ptrIN8bmf_lite11VideoBufferEESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %58) #4
  %60 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %19, i32 0, i32 0
  store ptr %59, ptr %60, align 8
  %61 = load i32, ptr %10, align 4, !tbaa !9
  %62 = sext i32 %61 to i64
  %63 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN8bmf_lite11VideoBufferEESt6vectorIS4_SaIS4_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %19, i64 noundef %62) #4
  %64 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  store ptr %63, ptr %64, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKSt10shared_ptrIN8bmf_lite11VideoBufferEESt6vectorIS4_SaIS4_EEEC2IPS4_vEERKNS0_IT_S9_EE(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #4
  %65 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.11", ptr %17, i32 0, i32 0
  %66 = load ptr, ptr %65, align 8
  %67 = invoke ptr @_ZNSt6vectorISt10shared_ptrIN8bmf_lite11VideoBufferEESaIS3_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS3_S5_EE(ptr noundef nonnull align 8 dereferenceable(24) %57, ptr %66)
          to label %68 unwind label %75

68:                                               ; preds = %52
  %69 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  store ptr %67, ptr %69, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  store i1 true, ptr %16, align 1
  store i32 1, ptr %11, align 4
  %70 = load i1, ptr %16, align 1
  br i1 %70, label %80, label %79

71:                                               ; preds = %43
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %14, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %15, align 4
  call void @_ZNSt12__shared_ptrIN8bmf_lite11VideoBufferELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #4
  br label %87

75:                                               ; preds = %52
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %14, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @_ZNSt12__shared_ptrIN8bmf_lite11VideoBufferELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %0) #4
  br label %87

79:                                               ; preds = %68
  call void @_ZNSt12__shared_ptrIN8bmf_lite11VideoBufferELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %0) #4
  br label %80

80:                                               ; preds = %79, %68
  br label %85

81:                                               ; preds = %51
  br label %82

82:                                               ; preds = %81
  %83 = load i32, ptr %10, align 4, !tbaa !9
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %10, align 4, !tbaa !9
  br label %36, !llvm.loop !14

85:                                               ; preds = %80, %42
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  %86 = load i32, ptr %11, align 4
  switch i32 %86, label %216 [
    i32 2, label %88
    i32 1, label %210
  ]

87:                                               ; preds = %75, %71
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %211

88:                                               ; preds = %85
  %89 = getelementptr inbounds %"class.bmf_lite::VideoBufferMultiPool", ptr %35, i32 0, i32 2
  %90 = call noundef i64 @_ZNKSt6vectorIPN8bmf_lite11VideoBufferESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %89) #4
  %91 = getelementptr inbounds %"class.bmf_lite::VideoBufferMultiPool", ptr %35, i32 0, i32 1
  %92 = load i32, ptr %91, align 8, !tbaa !16
  %93 = sext i32 %92 to i64
  %94 = icmp uge i64 %90, %93
  br i1 %94, label %95, label %167

95:                                               ; preds = %88
  %96 = getelementptr inbounds %"class.bmf_lite::VideoBufferMultiPool", ptr %35, i32 0, i32 3
  %97 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN8bmf_lite11VideoBufferEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %96) #4
  %98 = icmp ugt i64 %97, 0
  br i1 %98, label %99, label %167

99:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #4
  %100 = getelementptr inbounds %"class.bmf_lite::VideoBufferMultiPool", ptr %35, i32 0, i32 3
  %101 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN8bmf_lite11VideoBufferEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %100, i64 noundef 0) #4
  call void @_ZNSt10shared_ptrIN8bmf_lite11VideoBufferEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %101) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  %102 = call noundef ptr @_ZNKSt12__shared_ptrIN8bmf_lite11VideoBufferELN9__gnu_cxx12_Lock_policyE2EE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %21) #4
  store ptr %102, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #4
  store i32 0, ptr %23, align 4, !tbaa !9
  br label %103

103:                                              ; preds = %147, %99
  %104 = load i32, ptr %23, align 4, !tbaa !9
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds %"class.bmf_lite::VideoBufferMultiPool", ptr %35, i32 0, i32 2
  %107 = call noundef i64 @_ZNKSt6vectorIPN8bmf_lite11VideoBufferESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %106) #4
  %108 = icmp ult i64 %105, %107
  br i1 %108, label %110, label %109

109:                                              ; preds = %103
  store i32 5, ptr %11, align 4
  br label %150

110:                                              ; preds = %103
  %111 = getelementptr inbounds %"class.bmf_lite::VideoBufferMultiPool", ptr %35, i32 0, i32 2
  %112 = load i32, ptr %23, align 4, !tbaa !9
  %113 = sext i32 %112 to i64
  %114 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN8bmf_lite11VideoBufferESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %111, i64 noundef %113) #4
  %115 = load ptr, ptr %114, align 8, !tbaa !5
  %116 = load ptr, ptr %22, align 8, !tbaa !5
  %117 = icmp eq ptr %115, %116
  br i1 %117, label %118, label %146

118:                                              ; preds = %110
  %119 = getelementptr inbounds %"class.bmf_lite::VideoBufferMultiPool", ptr %35, i32 0, i32 2
  %120 = load i32, ptr %23, align 4, !tbaa !9
  %121 = sext i32 %120 to i64
  %122 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN8bmf_lite11VideoBufferESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %119, i64 noundef %121) #4
  %123 = load ptr, ptr %122, align 8, !tbaa !5
  invoke void @_ZN8bmf_lite11VideoBuffer7setPoolEPNS_4PoolE(ptr noundef nonnull align 8 dereferenceable(76) %123, ptr noundef null)
          to label %124 unwind label %138

124:                                              ; preds = %118
  %125 = getelementptr inbounds %"class.bmf_lite::VideoBufferMultiPool", ptr %35, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #4
  %126 = getelementptr inbounds %"class.bmf_lite::VideoBufferMultiPool", ptr %35, i32 0, i32 2
  %127 = call ptr @_ZNSt6vectorIPN8bmf_lite11VideoBufferESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %126) #4
  %128 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.14", ptr %26, i32 0, i32 0
  store ptr %127, ptr %128, align 8
  %129 = load i32, ptr %23, align 4, !tbaa !9
  %130 = sext i32 %129 to i64
  %131 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN8bmf_lite11VideoBufferESt6vectorIS3_SaIS3_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %26, i64 noundef %130) #4
  %132 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.14", ptr %25, i32 0, i32 0
  store ptr %131, ptr %132, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKPN8bmf_lite11VideoBufferESt6vectorIS3_SaIS3_EEEC2IPS3_vEERKNS0_IT_S8_EE(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %25) #4
  %133 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.15", ptr %24, i32 0, i32 0
  %134 = load ptr, ptr %133, align 8
  %135 = invoke ptr @_ZNSt6vectorIPN8bmf_lite11VideoBufferESaIS2_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS2_S4_EE(ptr noundef nonnull align 8 dereferenceable(24) %125, ptr %134)
          to label %136 unwind label %142

136:                                              ; preds = %124
  %137 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.14", ptr %27, i32 0, i32 0
  store ptr %135, ptr %137, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  store i32 5, ptr %11, align 4
  br label %150

138:                                              ; preds = %118
  %139 = landingpad { ptr, i32 }
          cleanup
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %14, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %15, align 4
  br label %151

142:                                              ; preds = %124
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %14, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  br label %151

146:                                              ; preds = %110
  br label %147

147:                                              ; preds = %146
  %148 = load i32, ptr %23, align 4, !tbaa !9
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %23, align 4, !tbaa !9
  br label %103, !llvm.loop !32

150:                                              ; preds = %136, %109
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  br label %152

151:                                              ; preds = %142, %138
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  br label %166

152:                                              ; preds = %150
  %153 = getelementptr inbounds %"class.bmf_lite::VideoBufferMultiPool", ptr %35, i32 0, i32 3
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #4
  %154 = getelementptr inbounds %"class.bmf_lite::VideoBufferMultiPool", ptr %35, i32 0, i32 3
  %155 = call ptr @_ZNSt6vectorISt10shared_ptrIN8bmf_lite11VideoBufferEESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %154) #4
  %156 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %29, i32 0, i32 0
  store ptr %155, ptr %156, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKSt10shared_ptrIN8bmf_lite11VideoBufferEESt6vectorIS4_SaIS4_EEEC2IPS4_vEERKNS0_IT_S9_EE(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(8) %29) #4
  %157 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.11", ptr %28, i32 0, i32 0
  %158 = load ptr, ptr %157, align 8
  %159 = invoke ptr @_ZNSt6vectorISt10shared_ptrIN8bmf_lite11VideoBufferEESaIS3_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS3_S5_EE(ptr noundef nonnull align 8 dereferenceable(24) %153, ptr %158)
          to label %160 unwind label %162

160:                                              ; preds = %152
  %161 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %30, i32 0, i32 0
  store ptr %159, ptr %161, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @_ZNSt12__shared_ptrIN8bmf_lite11VideoBufferELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %21) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #4
  br label %167

162:                                              ; preds = %152
  %163 = landingpad { ptr, i32 }
          cleanup
  %164 = extractvalue { ptr, i32 } %163, 0
  store ptr %164, ptr %14, align 8
  %165 = extractvalue { ptr, i32 } %163, 1
  store i32 %165, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #4
  br label %166

166:                                              ; preds = %162, %151
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @_ZNSt12__shared_ptrIN8bmf_lite11VideoBufferELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %21) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #4
  br label %211

167:                                              ; preds = %160, %95, %88
  %168 = getelementptr inbounds %"class.bmf_lite::VideoBufferMultiPool", ptr %35, i32 0, i32 2
  %169 = call noundef i64 @_ZNKSt6vectorIPN8bmf_lite11VideoBufferESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %168) #4
  %170 = getelementptr inbounds %"class.bmf_lite::VideoBufferMultiPool", ptr %35, i32 0, i32 1
  %171 = load i32, ptr %170, align 8, !tbaa !16
  %172 = sext i32 %171 to i64
  %173 = icmp uge i64 %169, %172
  br i1 %173, label %174, label %175

174:                                              ; preds = %167
  call void @_ZNSt10shared_ptrIN8bmf_lite11VideoBufferEEC2EDn(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr null) #4
  br label %210

175:                                              ; preds = %167
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #4
  store ptr null, ptr %31, align 8, !tbaa !5
  %176 = getelementptr inbounds %"class.bmf_lite::VideoBufferMultiPool", ptr %35, i32 0, i32 5
  %177 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN8bmf_lite20VideoBufferAllocatorELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %176) #4
  %178 = load i32, ptr %8, align 4, !tbaa !9
  %179 = load i32, ptr %9, align 4, !tbaa !9
  %180 = getelementptr inbounds %"class.bmf_lite::VideoBufferMultiPool", ptr %35, i32 0, i32 4
  call void @_ZNSt10shared_ptrIN8bmf_lite15HWDeviceContextEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %32, ptr noundef nonnull align 8 dereferenceable(16) %180) #4
  %181 = load ptr, ptr %177, align 8, !tbaa !33
  %182 = getelementptr inbounds ptr, ptr %181, i64 2
  %183 = load ptr, ptr %182, align 8
  %184 = invoke noundef i32 %183(ptr noundef nonnull align 8 dereferenceable(8) %177, i32 noundef %178, i32 noundef %179, ptr noundef %4, ptr noundef %32, ptr noundef nonnull align 8 dereferenceable(8) %31)
          to label %185 unwind label %194

185:                                              ; preds = %175
  %186 = icmp eq i32 %184, 0
  call void @_ZNSt12__shared_ptrIN8bmf_lite15HWDeviceContextELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %32) #4
  br i1 %186, label %187, label %204

187:                                              ; preds = %185
  store i1 false, ptr %33, align 1
  %188 = load ptr, ptr %31, align 8, !tbaa !5
  call void @"_ZNSt10shared_ptrIN8bmf_lite11VideoBufferEEC2IS1_ZNS0_20VideoBufferMultiPool13acquireObjectEiiNS0_16HardwareDataInfoEE3$_0vEEPT_T0_"(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef %188)
  %189 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN8bmf_lite11VideoBufferELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #4
  invoke void @_ZN8bmf_lite11VideoBuffer7setPoolEPNS_4PoolE(ptr noundef nonnull align 8 dereferenceable(76) %189, ptr noundef %35)
          to label %190 unwind label %198

190:                                              ; preds = %187
  %191 = getelementptr inbounds %"class.bmf_lite::VideoBufferMultiPool", ptr %35, i32 0, i32 2
  invoke void @_ZNSt6vectorIPN8bmf_lite11VideoBufferESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %191, ptr noundef nonnull align 8 dereferenceable(8) %31)
          to label %192 unwind label %198

192:                                              ; preds = %190
  store i1 true, ptr %33, align 1
  store i32 1, ptr %11, align 4
  %193 = load i1, ptr %33, align 1
  br i1 %193, label %203, label %202

194:                                              ; preds = %175
  %195 = landingpad { ptr, i32 }
          cleanup
  %196 = extractvalue { ptr, i32 } %195, 0
  store ptr %196, ptr %14, align 8
  %197 = extractvalue { ptr, i32 } %195, 1
  store i32 %197, ptr %15, align 4
  call void @_ZNSt12__shared_ptrIN8bmf_lite15HWDeviceContextELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %32) #4
  br label %208

198:                                              ; preds = %190, %187
  %199 = landingpad { ptr, i32 }
          cleanup
  %200 = extractvalue { ptr, i32 } %199, 0
  store ptr %200, ptr %14, align 8
  %201 = extractvalue { ptr, i32 } %199, 1
  store i32 %201, ptr %15, align 4
  call void @_ZNSt12__shared_ptrIN8bmf_lite11VideoBufferELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %0) #4
  br label %208

202:                                              ; preds = %192
  call void @_ZNSt12__shared_ptrIN8bmf_lite11VideoBufferELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %0) #4
  br label %203

203:                                              ; preds = %202, %192
  br label %205

204:                                              ; preds = %185
  store i32 0, ptr %11, align 4
  br label %205

205:                                              ; preds = %204, %203
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #4
  %206 = load i32, ptr %11, align 4
  switch i32 %206, label %216 [
    i32 0, label %207
    i32 1, label %210
  ]

207:                                              ; preds = %205
  br label %209

208:                                              ; preds = %198, %194
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #4
  br label %211

209:                                              ; preds = %207
  call void @_ZNSt10shared_ptrIN8bmf_lite11VideoBufferEEC2EDn(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr null) #4
  br label %210

210:                                              ; preds = %209, %205, %174, %85
  ret void

211:                                              ; preds = %208, %166, %87
  %212 = load ptr, ptr %14, align 8
  %213 = load i32, ptr %15, align 4
  %214 = insertvalue { ptr, i32 } poison, ptr %212, 0
  %215 = insertvalue { ptr, i32 } %214, i32 %213, 1
  resume { ptr, i32 } %215

216:                                              ; preds = %205, %85
  unreachable
}

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZNSt10shared_ptrIN8bmf_lite11VideoBufferEEC2IS1_ZNS0_20VideoBufferMultiPool13acquireObjectEiiNS0_16HardwareDataInfoEE3$_0vEEPT_T0_"(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #3 align 2

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

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

!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 = !{i64 0, i64 4, !12, i64 4, i64 4, !9, i64 8, i64 4, !9, i64 12, i64 4, !9, i64 16, i64 4, !9}
!12 = !{!13, !13, i64 0}
!13 = !{!"_ZTSN8bmf_lite10MemoryTypeE", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!17, !10, i64 8}
!17 = !{!"_ZTSN8bmf_lite20VideoBufferMultiPoolE", !18, i64 0, !10, i64 8, !19, i64 16, !23, i64 40, !27, i64 64, !30, i64 80}
!18 = !{!"_ZTSN8bmf_lite4PoolE"}
!19 = !{!"_ZTSSt6vectorIPN8bmf_lite11VideoBufferESaIS2_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIPN8bmf_lite11VideoBufferESaIS2_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIPN8bmf_lite11VideoBufferESaIS2_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIPN8bmf_lite11VideoBufferESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!"_ZTSSt6vectorISt10shared_ptrIN8bmf_lite11VideoBufferEESaIS3_EE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseISt10shared_ptrIN8bmf_lite11VideoBufferEESaIS3_EE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN8bmf_lite11VideoBufferEESaIS3_EE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN8bmf_lite11VideoBufferEESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!27 = !{!"_ZTSSt10shared_ptrIN8bmf_lite15HWDeviceContextEE", !28, i64 0}
!28 = !{!"_ZTSSt12__shared_ptrIN8bmf_lite15HWDeviceContextELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !29, i64 8}
!29 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!30 = !{!"_ZTSSt10shared_ptrIN8bmf_lite20VideoBufferAllocatorEE", !31, i64 0}
!31 = !{!"_ZTSSt12__shared_ptrIN8bmf_lite20VideoBufferAllocatorELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !29, i64 8}
!32 = distinct !{!32, !15}
!33 = !{!34, !34, i64 0}
!34 = !{!"vtable pointer", !8, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.bmf_lite::HardwareDataInfo" = type { i32, i32, i32, i32, i32 }
%"class.std::shared_ptr.8" = type { %"class.std::__shared_ptr.9" }
%"class.std::__shared_ptr.9" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.11" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.15" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.14" = type { ptr }
%"class.std::shared_ptr.0" = type { %"class.std::__shared_ptr.1" }
%"class.std::__shared_ptr.1" = type { ptr, %"class.std::__shared_count" }

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8bmf_lite11VideoBuffer7setPoolEPNS_4PoolE(ptr noundef nonnull align 8 dereferenceable(76), ptr noundef) local_unnamed_addr #0 align 2

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 nounwind uwtable
declare dso_local void @_ZNSt12__shared_ptrIN8bmf_lite15HWDeviceContextELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #0 align 2

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessIN8bmf_lite20VideoBufferAllocatorELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessIN8bmf_lite11VideoBufferELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN8bmf_lite20VideoBufferMultiPool9checkSameESt10shared_ptrINS_11VideoBufferEEiiNS_16HardwareDataInfoE(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef, i32 noundef, i32 noundef, ptr noundef byval(%"class.bmf_lite::HardwareDataInfo") align 8) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8bmf_lite20VideoBufferMultiPool13acquireObjectEiiNS_16HardwareDataInfoE(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.8") align 8 %0, ptr noundef nonnull align 8 dereferenceable(96) %1, i32 noundef %2, i32 noundef %3, ptr noundef byval(%"class.bmf_lite::HardwareDataInfo") align 8 %4) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"class.std::shared_ptr.8", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.11", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.std::shared_ptr.8", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator.15", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator.14", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator.14", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator.11", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca ptr, align 8
  %17 = alloca %"class.std::shared_ptr.0", align 8
  %18 = getelementptr inbounds i8, ptr %1, i64 40
  %19 = tail call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN8bmf_lite11VideoBufferEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #3
  %.not58 = icmp eq i64 %19, 0
  br i1 %.not58, label %._crit_edge, label %.lr.ph

20:                                               ; preds = %25
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %21 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN8bmf_lite11VideoBufferEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #3
  %22 = icmp ugt i64 %21, %indvars.iv.next
  br i1 %22, label %.lr.ph, label %._crit_edge, !llvm.loop !5

.lr.ph:                                           ; preds = %5, %20
  %indvars.iv = phi i64 [ %indvars.iv.next, %20 ], [ 0, %5 ]
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN8bmf_lite11VideoBufferEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %indvars.iv) #3
  call void @_ZNSt10shared_ptrIN8bmf_lite11VideoBufferEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %23) #3
  %24 = invoke noundef zeroext i1 @_ZN8bmf_lite20VideoBufferMultiPool9checkSameESt10shared_ptrINS_11VideoBufferEEiiNS_16HardwareDataInfoE(ptr noundef nonnull align 8 dereferenceable(96) %1, ptr noundef nonnull %6, i32 noundef %2, i32 noundef %3, ptr noundef nonnull byval(%"class.bmf_lite::HardwareDataInfo") align 8 %4)
          to label %25 unwind label %32

25:                                               ; preds = %.lr.ph
  call void @_ZNSt12__shared_ptrIN8bmf_lite11VideoBufferELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #3
  br i1 %24, label %26, label %20

26:                                               ; preds = %25
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN8bmf_lite11VideoBufferEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %indvars.iv) #3
  call void @_ZNSt10shared_ptrIN8bmf_lite11VideoBufferEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(16) %27) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #3
  %28 = call ptr @_ZNSt6vectorISt10shared_ptrIN8bmf_lite11VideoBufferEESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #3
  store ptr %28, ptr %9, align 8
  %29 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN8bmf_lite11VideoBufferEESt6vectorIS4_SaIS4_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %9, i64 noundef %indvars.iv) #3
  store ptr %29, ptr %8, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKSt10shared_ptrIN8bmf_lite11VideoBufferEESt6vectorIS4_SaIS4_EEEC2IPS4_vEERKNS0_IT_S9_EE(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #3
  %30 = load ptr, ptr %7, align 8
  %31 = invoke ptr @_ZNSt6vectorISt10shared_ptrIN8bmf_lite11VideoBufferEESaIS3_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS3_S5_EE(ptr noundef nonnull align 8 dereferenceable(24) %18, ptr %30)
          to label %36 unwind label %34

32:                                               ; preds = %.lr.ph
  %33 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN8bmf_lite11VideoBufferELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #3
  br label %97

34:                                               ; preds = %26
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #3
  call void @_ZNSt12__shared_ptrIN8bmf_lite11VideoBufferELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %0) #3
  br label %97

36:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #3
  br label %96

._crit_edge:                                      ; preds = %20, %5
  %37 = getelementptr inbounds i8, ptr %1, i64 16
  %38 = call noundef i64 @_ZNKSt6vectorIPN8bmf_lite11VideoBufferESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #3
  %39 = getelementptr inbounds i8, ptr %1, i64 8
  %40 = load i32, ptr %39, align 8, !tbaa !7
  %41 = sext i32 %40 to i64
  %.not = icmp ult i64 %38, %41
  br i1 %.not, label %71, label %42

42:                                               ; preds = %._crit_edge
  %43 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN8bmf_lite11VideoBufferEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #3
  %.not34 = icmp eq i64 %43, 0
  br i1 %.not34, label %71, label %44

44:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #3
  %45 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN8bmf_lite11VideoBufferEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef 0) #3
  call void @_ZNSt10shared_ptrIN8bmf_lite11VideoBufferEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %45) #3
  %46 = call noundef ptr @_ZNKSt12__shared_ptrIN8bmf_lite11VideoBufferELN9__gnu_cxx12_Lock_policyE2EE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %10) #3
  %47 = call noundef i64 @_ZNKSt6vectorIPN8bmf_lite11VideoBufferESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #3
  %.not59 = icmp eq i64 %47, 0
  br i1 %.not59, label %.loopexit, label %.lr.ph57

48:                                               ; preds = %.lr.ph57
  %indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 1
  %49 = call noundef i64 @_ZNKSt6vectorIPN8bmf_lite11VideoBufferESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #3
  %50 = icmp ugt i64 %49, %indvars.iv.next66
  br i1 %50, label %.lr.ph57, label %.loopexit, !llvm.loop !27

.lr.ph57:                                         ; preds = %44, %48
  %indvars.iv65 = phi i64 [ %indvars.iv.next66, %48 ], [ 0, %44 ]
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN8bmf_lite11VideoBufferESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %37, i64 noundef %indvars.iv65) #3
  %52 = load ptr, ptr %51, align 8, !tbaa !28
  %53 = icmp eq ptr %52, %46
  br i1 %53, label %54, label %48

54:                                               ; preds = %.lr.ph57
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN8bmf_lite11VideoBufferESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %37, i64 noundef %indvars.iv65) #3
  %56 = load ptr, ptr %55, align 8, !tbaa !28
  call void @_ZN8bmf_lite11VideoBuffer7setPoolEPNS_4PoolE(ptr noundef nonnull align 8 dereferenceable(76) %56, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #3
  %57 = call ptr @_ZNSt6vectorIPN8bmf_lite11VideoBufferESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #3
  store ptr %57, ptr %13, align 8
  %58 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN8bmf_lite11VideoBufferESt6vectorIS3_SaIS3_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %13, i64 noundef %indvars.iv65) #3
  store ptr %58, ptr %12, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKPN8bmf_lite11VideoBufferESt6vectorIS3_SaIS3_EEEC2IPS3_vEERKNS0_IT_S8_EE(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #3
  %59 = load ptr, ptr %11, align 8
  %60 = invoke ptr @_ZNSt6vectorIPN8bmf_lite11VideoBufferESaIS2_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS2_S4_EE(ptr noundef nonnull align 8 dereferenceable(24) %37, ptr %59)
          to label %61 unwind label %62

61:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #3
  br label %.loopexit

62:                                               ; preds = %54
  %63 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #3
  br label %70

.loopexit:                                        ; preds = %48, %44, %61
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #3
  %64 = call ptr @_ZNSt6vectorISt10shared_ptrIN8bmf_lite11VideoBufferEESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #3
  store ptr %64, ptr %15, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKSt10shared_ptrIN8bmf_lite11VideoBufferEESt6vectorIS4_SaIS4_EEEC2IPS4_vEERKNS0_IT_S9_EE(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #3
  %65 = load ptr, ptr %14, align 8
  %66 = invoke ptr @_ZNSt6vectorISt10shared_ptrIN8bmf_lite11VideoBufferEESaIS3_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS3_S5_EE(ptr noundef nonnull align 8 dereferenceable(24) %18, ptr %65)
          to label %67 unwind label %68

67:                                               ; preds = %.loopexit
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #3
  call void @_ZNSt12__shared_ptrIN8bmf_lite11VideoBufferELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #3
  br label %71

68:                                               ; preds = %.loopexit
  %69 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #3
  br label %70

70:                                               ; preds = %68, %62
  %.pn35 = phi { ptr, i32 } [ %69, %68 ], [ %63, %62 ]
  call void @_ZNSt12__shared_ptrIN8bmf_lite11VideoBufferELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #3
  br label %97

71:                                               ; preds = %67, %42, %._crit_edge
  %72 = call noundef i64 @_ZNKSt6vectorIPN8bmf_lite11VideoBufferESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #3
  %73 = load i32, ptr %39, align 8, !tbaa !7
  %74 = sext i32 %73 to i64
  %.not37 = icmp ult i64 %72, %74
  br i1 %.not37, label %76, label %75

75:                                               ; preds = %71
  call void @_ZNSt10shared_ptrIN8bmf_lite11VideoBufferEEC2EDn(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr null) #3
  br label %96

76:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #3
  store ptr null, ptr %16, align 8, !tbaa !28
  %77 = getelementptr inbounds i8, ptr %1, i64 80
  %78 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN8bmf_lite20VideoBufferAllocatorELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %77) #3
  %79 = getelementptr inbounds i8, ptr %1, i64 64
  call void @_ZNSt10shared_ptrIN8bmf_lite15HWDeviceContextEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(16) %79) #3
  %80 = load ptr, ptr %78, align 8, !tbaa !29
  %81 = getelementptr inbounds i8, ptr %80, i64 16
  %82 = load ptr, ptr %81, align 8
  %83 = invoke noundef i32 %82(ptr noundef nonnull align 8 dereferenceable(8) %78, i32 noundef %2, i32 noundef %3, ptr noundef nonnull %4, ptr noundef nonnull %17, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %84 unwind label %89

84:                                               ; preds = %76
  %85 = icmp eq i32 %83, 0
  call void @_ZNSt12__shared_ptrIN8bmf_lite15HWDeviceContextELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #3
  br i1 %85, label %86, label %95

86:                                               ; preds = %84
  %87 = load ptr, ptr %16, align 8, !tbaa !28
  call void @"_ZNSt10shared_ptrIN8bmf_lite11VideoBufferEEC2IS1_ZNS0_20VideoBufferMultiPool13acquireObjectEiiNS0_16HardwareDataInfoEE3$_0vEEPT_T0_"(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef %87)
  %88 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN8bmf_lite11VideoBufferELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #3
  call void @_ZN8bmf_lite11VideoBuffer7setPoolEPNS_4PoolE(ptr noundef nonnull align 8 dereferenceable(76) %88, ptr noundef nonnull %1)
  invoke void @_ZNSt6vectorIPN8bmf_lite11VideoBufferESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %37, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %93 unwind label %91

89:                                               ; preds = %76
  %90 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN8bmf_lite15HWDeviceContextELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #3
  br label %94

91:                                               ; preds = %86
  %92 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN8bmf_lite11VideoBufferELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %0) #3
  br label %94

93:                                               ; preds = %86
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #3
  br label %96

94:                                               ; preds = %91, %89
  %.pn38 = phi { ptr, i32 } [ %92, %91 ], [ %90, %89 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #3
  br label %97

95:                                               ; preds = %84
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #3
  call void @_ZNSt10shared_ptrIN8bmf_lite11VideoBufferEEC2EDn(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr null) #3
  br label %96

96:                                               ; preds = %93, %36, %95, %75
  ret void

97:                                               ; preds = %32, %34, %94, %70
  %.pn38.pn = phi { ptr, i32 } [ %.pn38, %94 ], [ %.pn35, %70 ], [ %35, %34 ], [ %33, %32 ]
  resume { ptr, i32 } %.pn38.pn
}

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZNSt10shared_ptrIN8bmf_lite11VideoBufferEEC2IS1_ZNS0_20VideoBufferMultiPool13acquireObjectEiiNS0_16HardwareDataInfoEE3$_0vEEPT_T0_"(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #2 align 2

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync 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 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !10, i64 8}
!8 = !{!"_ZTSN8bmf_lite20VideoBufferMultiPoolE", !9, i64 0, !10, i64 8, !13, i64 16, !18, i64 40, !22, i64 64, !25, i64 80}
!9 = !{!"_ZTSN8bmf_lite4PoolE"}
!10 = !{!"int", !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C++ TBAA"}
!13 = !{!"_ZTSSt6vectorIPN8bmf_lite11VideoBufferESaIS2_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIPN8bmf_lite11VideoBufferESaIS2_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIPN8bmf_lite11VideoBufferESaIS2_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIPN8bmf_lite11VideoBufferESaIS2_EE17_Vector_impl_dataE", !17, i64 0, !17, i64 8, !17, i64 16}
!17 = !{!"any pointer", !11, i64 0}
!18 = !{!"_ZTSSt6vectorISt10shared_ptrIN8bmf_lite11VideoBufferEESaIS3_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseISt10shared_ptrIN8bmf_lite11VideoBufferEESaIS3_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN8bmf_lite11VideoBufferEESaIS3_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN8bmf_lite11VideoBufferEESaIS3_EE17_Vector_impl_dataE", !17, i64 0, !17, i64 8, !17, i64 16}
!22 = !{!"_ZTSSt10shared_ptrIN8bmf_lite15HWDeviceContextEE", !23, i64 0}
!23 = !{!"_ZTSSt12__shared_ptrIN8bmf_lite15HWDeviceContextELN9__gnu_cxx12_Lock_policyE2EE", !17, i64 0, !24, i64 8}
!24 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !17, i64 0}
!25 = !{!"_ZTSSt10shared_ptrIN8bmf_lite20VideoBufferAllocatorEE", !26, i64 0}
!26 = !{!"_ZTSSt12__shared_ptrIN8bmf_lite20VideoBufferAllocatorELN9__gnu_cxx12_Lock_policyE2EE", !17, i64 0, !24, i64 8}
!27 = distinct !{!27, !6}
!28 = !{!17, !17, i64 0}
!29 = !{!30, !30, i64 0}
!30 = !{!"vtable pointer", !12, i64 0}


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