; LLVM IR from hbatagelo/abcg :: abcg (abcgVulkanBuffer)

; 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.std::pair" = type { %"class.vk::Buffer", %"class.vk::DeviceMemory" }
%"class.vk::Buffer" = type { ptr }
%"class.vk::DeviceMemory" = type { ptr }
%"class.vk::Flags.0" = type { i32 }
%"class.vk::Flags" = type { i32 }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned int, unsigned int, std::_Identity<unsigned int>, std::less<unsigned int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned int, unsigned int, std::_Identity<unsigned int>, std::less<unsigned int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::initializer_list" = type { ptr, i64 }
%"struct.std::less" = type { i8 }
%"class.std::allocator.12" = type { i8 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"struct.vk::BufferCreateInfo" = type { i32, ptr, %"class.vk::Flags.15", i64, %"class.vk::Flags.0", i32, i32, ptr }
%"class.vk::Flags.15" = type { i32 }
%"class.vk::Optional" = type { ptr }
%"struct.vk::MemoryRequirements" = type <{ i64, i64, i32, [4 x i8] }>
%"class.std::optional" = type { %"struct.std::_Optional_base" }
%"struct.std::_Optional_base" = type { %"struct.std::_Optional_payload" }
%"struct.std::_Optional_payload" = type { %"struct.std::_Optional_payload_base.base", [3 x i8] }
%"struct.std::_Optional_payload_base.base" = type <{ %"union.std::_Optional_payload_base<unsigned int>::_Storage", i8 }>
%"union.std::_Optional_payload_base<unsigned int>::_Storage" = type { i32 }
%"class.std::basic_string_view" = type { i64, ptr }
%"struct.std::experimental::fundamentals_v2::source_location" = type { ptr, ptr, i32, i32 }
%"struct.vk::MemoryAllocateInfo" = type <{ i32, [4 x i8], ptr, i64, i32, [4 x i8] }>
%"struct.abcg::VulkanQueuesFamilies" = type { %"class.std::optional", %"class.std::optional", %"class.std::optional", %"class.std::optional" }
%"class.abcg::VulkanBuffer" = type { %"class.vk::Buffer", %"class.vk::DeviceMemory", %"class.vk::Device" }
%"class.vk::Device" = type { ptr }

@.str = external hidden unnamed_addr constant [36 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@_ZTIN4abcg12RuntimeErrorE = external dso_local constant { ptr, ptr, ptr }, align 8

; 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 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
define dso_local { ptr, ptr } @_ZNK4abcg12VulkanBuffer12createBufferERKNS_12VulkanDeviceEmN2vk5FlagsINS4_19BufferUsageFlagBitsEEENS5_INS4_22MemoryPropertyFlagBitsEEE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(136) %1, i64 noundef %2, i32 %3, i32 %4) #2 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca %"class.vk::Flags.0", align 4
  %8 = alloca %"class.vk::Flags", align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"class.std::set", align 8
  %15 = alloca %"class.std::initializer_list", align 8
  %16 = alloca [3 x i32], align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %"struct.std::less", align 1
  %21 = alloca %"class.std::allocator.12", align 1
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca %"class.std::vector", align 8
  %26 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %27 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %28 = alloca %"class.std::allocator.12", align 1
  %29 = alloca i8, align 1
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca %"class.vk::Buffer", align 8
  %33 = alloca %"struct.vk::BufferCreateInfo", align 8
  %34 = alloca %"class.vk::Optional", align 8
  %35 = alloca %"struct.vk::MemoryRequirements", align 8
  %36 = alloca %"class.vk::Buffer", align 8
  %37 = alloca %"class.std::optional", align 4
  %38 = alloca %"class.vk::Flags", align 4
  %39 = alloca %"class.std::basic_string_view", align 8
  %40 = alloca %"struct.std::experimental::fundamentals_v2::source_location", align 8
  %41 = alloca i1, align 1
  %42 = alloca %"class.vk::DeviceMemory", align 8
  %43 = alloca %"struct.vk::MemoryAllocateInfo", align 8
  %44 = alloca %"class.vk::Optional", align 8
  %45 = alloca %"class.vk::Buffer", align 8
  %46 = alloca %"class.vk::DeviceMemory", align 8
  %47 = getelementptr inbounds %"class.vk::Flags.0", ptr %7, i32 0, i32 0
  store i32 %3, ptr %47, align 4
  %48 = getelementptr inbounds %"class.vk::Flags", ptr %8, i32 0, i32 0
  store i32 %4, ptr %48, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store i64 %2, ptr %11, align 8, !tbaa !9
  %49 = load ptr, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  %50 = load ptr, ptr %10, align 8, !tbaa !5
  %51 = call noundef nonnull align 8 dereferenceable(68) ptr @_ZNK4abcg12VulkanDevice17getPhysicalDeviceEv(ptr noundef nonnull align 8 dereferenceable(136) %50) #9
  store ptr %51, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  %52 = load ptr, ptr %12, align 8, !tbaa !5
  %53 = call noundef nonnull align 4 dereferenceable(32) ptr @_ZNK4abcg20VulkanPhysicalDevice17getQueuesFamiliesEv(ptr noundef nonnull align 8 dereferenceable(68) %52) #9
  store ptr %53, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 48, ptr %14) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr %16) #9
  %54 = load ptr, ptr %13, align 8, !tbaa !5
  %55 = getelementptr inbounds %"struct.abcg::VulkanQueuesFamilies", ptr %54, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #9
  store i32 -1, ptr %17, align 4, !tbaa !11
  %56 = call noundef i32 @_ZNKRSt8optionalIjE8value_orIjEEjOT_(ptr noundef nonnull align 4 dereferenceable(8) %55, ptr noundef nonnull align 4 dereferenceable(4) %17)
  store i32 %56, ptr %16, align 4, !tbaa !11
  %57 = getelementptr inbounds i32, ptr %16, i64 1
  %58 = load ptr, ptr %13, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.abcg::VulkanQueuesFamilies", ptr %58, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #9
  store i32 -1, ptr %18, align 4, !tbaa !11
  %60 = call noundef i32 @_ZNKRSt8optionalIjE8value_orIjEEjOT_(ptr noundef nonnull align 4 dereferenceable(8) %59, ptr noundef nonnull align 4 dereferenceable(4) %18)
  store i32 %60, ptr %57, align 4, !tbaa !11
  %61 = getelementptr inbounds i32, ptr %16, i64 2
  %62 = load ptr, ptr %13, align 8, !tbaa !5
  %63 = getelementptr inbounds %"struct.abcg::VulkanQueuesFamilies", ptr %62, i32 0, i32 3
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #9
  store i32 -1, ptr %19, align 4, !tbaa !11
  %64 = call noundef i32 @_ZNKRSt8optionalIjE8value_orIjEEjOT_(ptr noundef nonnull align 4 dereferenceable(8) %63, ptr noundef nonnull align 4 dereferenceable(4) %19)
  store i32 %64, ptr %61, align 4, !tbaa !11
  %65 = getelementptr inbounds %"class.std::initializer_list", ptr %15, i32 0, i32 0
  store ptr %16, ptr %65, align 8, !tbaa !13
  %66 = getelementptr inbounds %"class.std::initializer_list", ptr %15, i32 0, i32 1
  store i64 3, ptr %66, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #9
  call void @_ZNSaIjEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #9
  %67 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 0
  %68 = load ptr, ptr %67, align 8
  %69 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 1
  %70 = load i64, ptr %69, align 8
  invoke void @_ZNSt3setIjSt4lessIjESaIjEEC2ESt16initializer_listIjERKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr %68, i64 %70, ptr noundef nonnull align 1 dereferenceable(1) %20, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %71 unwind label %140

71:                                               ; preds = %5
  call void @_ZNSt15__new_allocatorIjED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #9
  store i32 -1, ptr %24, align 4, !tbaa !11
  %72 = invoke noundef i64 @_ZNSt3setIjSt4lessIjESaIjEE5eraseERKj(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %73 unwind label %144

73:                                               ; preds = %71
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr %25) #9
  %74 = call ptr @_ZNKSt3setIjSt4lessIjESaIjEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %14) #9
  %75 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %26, i32 0, i32 0
  store ptr %74, ptr %75, align 8
  %76 = call ptr @_ZNKSt3setIjSt4lessIjESaIjEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %14) #9
  %77 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %27, i32 0, i32 0
  store ptr %76, ptr %77, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %28) #9
  call void @_ZNSaIjEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #9
  %78 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %26, i32 0, i32 0
  %79 = load ptr, ptr %78, align 8
  %80 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %27, i32 0, i32 0
  %81 = load ptr, ptr %80, align 8
  invoke void @_ZNSt6vectorIjSaIjEEC2ISt23_Rb_tree_const_iteratorIjEvEET_S5_RKS0_(ptr noundef nonnull align 8 dereferenceable(24) %25, ptr %79, ptr %81, ptr noundef nonnull align 1 dereferenceable(1) %28)
          to label %82 unwind label %148

82:                                               ; preds = %73
  call void @_ZNSt15__new_allocatorIjED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %29) #9
  %83 = load ptr, ptr %13, align 8, !tbaa !5
  %84 = getelementptr inbounds %"struct.abcg::VulkanQueuesFamilies", ptr %83, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #9
  store i32 -1, ptr %30, align 4, !tbaa !11
  %85 = invoke noundef i32 @_ZNKRSt8optionalIjE8value_orIjEEjOT_(ptr noundef nonnull align 4 dereferenceable(8) %84, ptr noundef nonnull align 4 dereferenceable(4) %30)
          to label %86 unwind label %152

86:                                               ; preds = %82
  %87 = load ptr, ptr %13, align 8, !tbaa !5
  %88 = getelementptr inbounds %"struct.abcg::VulkanQueuesFamilies", ptr %87, i32 0, i32 3
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #9
  store i32 -1, ptr %31, align 4, !tbaa !11
  %89 = invoke noundef i32 @_ZNKRSt8optionalIjE8value_orIjEEjOT_(ptr noundef nonnull align 4 dereferenceable(8) %88, ptr noundef nonnull align 4 dereferenceable(4) %31)
          to label %90 unwind label %156

90:                                               ; preds = %86
  %91 = icmp ne i32 %85, %89
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #9
  %92 = zext i1 %91 to i8
  store i8 %92, ptr %29, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #9
  %93 = getelementptr inbounds %"class.abcg::VulkanBuffer", ptr %49, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 56, ptr %33) #9
  %94 = getelementptr inbounds %"struct.vk::BufferCreateInfo", ptr %33, i32 0, i32 0
  store i32 12, ptr %94, align 8, !tbaa !18
  %95 = getelementptr inbounds %"struct.vk::BufferCreateInfo", ptr %33, i32 0, i32 1
  store ptr null, ptr %95, align 8, !tbaa !24
  %96 = getelementptr inbounds %"struct.vk::BufferCreateInfo", ptr %33, i32 0, i32 2
  call void @_ZN2vk5FlagsINS_20BufferCreateFlagBitsEEC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %96) #9
  %97 = getelementptr inbounds %"struct.vk::BufferCreateInfo", ptr %33, i32 0, i32 3
  %98 = load i64, ptr %11, align 8, !tbaa !9
  store i64 %98, ptr %97, align 8, !tbaa !25
  %99 = getelementptr inbounds %"struct.vk::BufferCreateInfo", ptr %33, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %99, ptr align 4 %7, i64 4, i1 false), !tbaa.struct !26
  %100 = getelementptr inbounds %"struct.vk::BufferCreateInfo", ptr %33, i32 0, i32 5
  %101 = load i8, ptr %29, align 1, !tbaa !16, !range !27, !noundef !28
  %102 = trunc i8 %101 to i1
  %103 = zext i1 %102 to i64
  %104 = select i1 %102, i32 1, i32 0
  store i32 %104, ptr %100, align 4, !tbaa !29
  %105 = getelementptr inbounds %"struct.vk::BufferCreateInfo", ptr %33, i32 0, i32 6
  %106 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #9
  %107 = invoke noundef i32 @_ZN3gsl6narrowIjmEET_T0_(i64 noundef %106)
          to label %108 unwind label %161

108:                                              ; preds = %90
  store i32 %107, ptr %105, align 8, !tbaa !30
  %109 = getelementptr inbounds %"struct.vk::BufferCreateInfo", ptr %33, i32 0, i32 7
  %110 = call noundef ptr @_ZNKSt6vectorIjSaIjEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #9
  store ptr %110, ptr %109, align 8, !tbaa !31
  call void @_ZN2vk8OptionalIKNS_19AllocationCallbacksEEC2EDn(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr null) #9
  %111 = invoke noundef nonnull align 8 dereferenceable(9) ptr @_ZN2vkL23getDispatchLoaderStaticEv()
          to label %112 unwind label %161

112:                                              ; preds = %108
  %113 = getelementptr inbounds %"class.vk::Optional", ptr %34, i32 0, i32 0
  %114 = load ptr, ptr %113, align 8
  %115 = invoke ptr @_ZNK2vk6Device12createBufferINS_20DispatchLoaderStaticEEENS_6BufferERKNS_16BufferCreateInfoENS_8OptionalIKNS_19AllocationCallbacksEEERKT_(ptr noundef nonnull align 8 dereferenceable(8) %93, ptr noundef nonnull align 8 dereferenceable(56) %33, ptr %114, ptr noundef nonnull align 8 dereferenceable(9) %111)
          to label %116 unwind label %161

116:                                              ; preds = %112
  %117 = getelementptr inbounds %"class.vk::Buffer", ptr %32, i32 0, i32 0
  store ptr %115, ptr %117, align 8
  call void @llvm.lifetime.end.p0(i64 56, ptr %33) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr %35) #9
  %118 = getelementptr inbounds %"class.abcg::VulkanBuffer", ptr %49, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %36, ptr align 8 %32, i64 8, i1 false), !tbaa.struct !32
  %119 = invoke noundef nonnull align 8 dereferenceable(9) ptr @_ZN2vkL23getDispatchLoaderStaticEv()
          to label %120 unwind label %165

120:                                              ; preds = %116
  %121 = getelementptr inbounds %"class.vk::Buffer", ptr %36, i32 0, i32 0
  %122 = load ptr, ptr %121, align 8
  call void @_ZNK2vk6Device27getBufferMemoryRequirementsINS_20DispatchLoaderStaticEEENS_18MemoryRequirementsENS_6BufferERKT_(ptr dead_on_unwind writable sret(%"struct.vk::MemoryRequirements") align 8 %35, ptr noundef nonnull align 8 dereferenceable(8) %118, ptr %122, ptr noundef nonnull align 8 dereferenceable(9) %119) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #9
  %123 = load ptr, ptr %12, align 8, !tbaa !5
  %124 = getelementptr inbounds %"struct.vk::MemoryRequirements", ptr %35, i32 0, i32 2
  %125 = load i32, ptr %124, align 8, !tbaa !33
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %38, ptr align 4 %8, i64 4, i1 false), !tbaa.struct !26
  %126 = getelementptr inbounds %"class.vk::Flags", ptr %38, i32 0, i32 0
  %127 = load i32, ptr %126, align 4
  %128 = invoke i64 @_ZNK4abcg20VulkanPhysicalDevice14findMemoryTypeEjN2vk5FlagsINS1_22MemoryPropertyFlagBitsEEE(ptr noundef nonnull align 8 dereferenceable(68) %123, i32 noundef %125, i32 %127)
          to label %129 unwind label %169

129:                                              ; preds = %120
  %130 = getelementptr inbounds %"class.std::optional", ptr %37, i32 0, i32 0
  %131 = getelementptr inbounds %"struct.std::_Optional_base", ptr %130, i32 0, i32 0
  store i64 %128, ptr %131, align 4
  %132 = call noundef zeroext i1 @_ZNKSt8optionalIjE9has_valueEv(ptr noundef nonnull align 4 dereferenceable(8) %37) #9
  br i1 %132, label %180, label %133

133:                                              ; preds = %129
  store i1 true, ptr %41, align 1
  %134 = call ptr @__cxa_allocate_exception(i64 40) #9
  call void @_ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %39, ptr noundef @.str) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr %40) #9
  call void @_ZNSt12experimental15fundamentals_v215source_location7currentEPKcS3_ii(ptr dead_on_unwind writable sret(%"struct.std::experimental::fundamentals_v2::source_location") align 8 %40, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 121, i32 noundef 0) #9
  %135 = getelementptr inbounds { i64, ptr }, ptr %39, i32 0, i32 0
  %136 = load i64, ptr %135, align 8
  %137 = getelementptr inbounds { i64, ptr }, ptr %39, i32 0, i32 1
  %138 = load ptr, ptr %137, align 8
  invoke void @_ZN4abcg12RuntimeErrorC1ESt17basic_string_viewIcSt11char_traitsIcEERKNSt12experimental15fundamentals_v215source_locationE(ptr noundef nonnull align 8 dereferenceable(40) %134, i64 %136, ptr %138, ptr noundef nonnull align 8 dereferenceable(24) %40)
          to label %139 unwind label %173

139:                                              ; preds = %133
  store i1 false, ptr %41, align 1
  invoke void @__cxa_throw(ptr %134, ptr @_ZTIN4abcg12RuntimeErrorE, ptr @_ZN4abcg9ExceptionD2Ev) #10
          to label %229 unwind label %173

140:                                              ; preds = %5
  %141 = landingpad { ptr, i32 }
          cleanup
  %142 = extractvalue { ptr, i32 } %141, 0
  store ptr %142, ptr %22, align 8
  %143 = extractvalue { ptr, i32 } %141, 1
  store i32 %143, ptr %23, align 4
  call void @_ZNSt15__new_allocatorIjED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #9
  br label %223

144:                                              ; preds = %71
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %22, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  br label %222

148:                                              ; preds = %73
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %22, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %23, align 4
  call void @_ZNSt15__new_allocatorIjED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #9
  br label %221

152:                                              ; preds = %82
  %153 = landingpad { ptr, i32 }
          cleanup
  %154 = extractvalue { ptr, i32 } %153, 0
  store ptr %154, ptr %22, align 8
  %155 = extractvalue { ptr, i32 } %153, 1
  store i32 %155, ptr %23, align 4
  br label %160

156:                                              ; preds = %86
  %157 = landingpad { ptr, i32 }
          cleanup
  %158 = extractvalue { ptr, i32 } %157, 0
  store ptr %158, ptr %22, align 8
  %159 = extractvalue { ptr, i32 } %157, 1
  store i32 %159, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #9
  br label %160

160:                                              ; preds = %156, %152
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #9
  br label %220

161:                                              ; preds = %112, %108, %90
  %162 = landingpad { ptr, i32 }
          cleanup
  %163 = extractvalue { ptr, i32 } %162, 0
  store ptr %163, ptr %22, align 8
  %164 = extractvalue { ptr, i32 } %162, 1
  store i32 %164, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 56, ptr %33) #9
  br label %219

165:                                              ; preds = %116
  %166 = landingpad { ptr, i32 }
          cleanup
  %167 = extractvalue { ptr, i32 } %166, 0
  store ptr %167, ptr %22, align 8
  %168 = extractvalue { ptr, i32 } %166, 1
  store i32 %168, ptr %23, align 4
  br label %218

169:                                              ; preds = %120
  %170 = landingpad { ptr, i32 }
          cleanup
  %171 = extractvalue { ptr, i32 } %170, 0
  store ptr %171, ptr %22, align 8
  %172 = extractvalue { ptr, i32 } %170, 1
  store i32 %172, ptr %23, align 4
  br label %217

173:                                              ; preds = %139, %133
  %174 = landingpad { ptr, i32 }
          cleanup
  %175 = extractvalue { ptr, i32 } %174, 0
  store ptr %175, ptr %22, align 8
  %176 = extractvalue { ptr, i32 } %174, 1
  store i32 %176, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %40) #9
  %177 = load i1, ptr %41, align 1
  br i1 %177, label %178, label %179

178:                                              ; preds = %173
  call void @__cxa_free_exception(ptr %134) #9
  br label %179

179:                                              ; preds = %178, %173
  br label %217

180:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #9
  %181 = getelementptr inbounds %"class.abcg::VulkanBuffer", ptr %49, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 32, ptr %43) #9
  %182 = getelementptr inbounds %"struct.vk::MemoryAllocateInfo", ptr %43, i32 0, i32 0
  store i32 5, ptr %182, align 8, !tbaa !35
  %183 = getelementptr inbounds %"struct.vk::MemoryAllocateInfo", ptr %43, i32 0, i32 2
  store ptr null, ptr %183, align 8, !tbaa !37
  %184 = getelementptr inbounds %"struct.vk::MemoryAllocateInfo", ptr %43, i32 0, i32 3
  %185 = getelementptr inbounds %"struct.vk::MemoryRequirements", ptr %35, i32 0, i32 0
  %186 = load i64, ptr %185, align 8, !tbaa !38
  store i64 %186, ptr %184, align 8, !tbaa !39
  %187 = getelementptr inbounds %"struct.vk::MemoryAllocateInfo", ptr %43, i32 0, i32 4
  %188 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNKRSt8optionalIjE5valueEv(ptr noundef nonnull align 4 dereferenceable(8) %37)
          to label %189 unwind label %208

189:                                              ; preds = %180
  %190 = load i32, ptr %188, align 4, !tbaa !11
  store i32 %190, ptr %187, align 8, !tbaa !40
  call void @_ZN2vk8OptionalIKNS_19AllocationCallbacksEEC2EDn(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr null) #9
  %191 = invoke noundef nonnull align 8 dereferenceable(9) ptr @_ZN2vkL23getDispatchLoaderStaticEv()
          to label %192 unwind label %208

192:                                              ; preds = %189
  %193 = getelementptr inbounds %"class.vk::Optional", ptr %44, i32 0, i32 0
  %194 = load ptr, ptr %193, align 8
  %195 = invoke ptr @_ZNK2vk6Device14allocateMemoryINS_20DispatchLoaderStaticEEENS_12DeviceMemoryERKNS_18MemoryAllocateInfoENS_8OptionalIKNS_19AllocationCallbacksEEERKT_(ptr noundef nonnull align 8 dereferenceable(8) %181, ptr noundef nonnull align 8 dereferenceable(28) %43, ptr %194, ptr noundef nonnull align 8 dereferenceable(9) %191)
          to label %196 unwind label %208

196:                                              ; preds = %192
  %197 = getelementptr inbounds %"class.vk::DeviceMemory", ptr %42, i32 0, i32 0
  store ptr %195, ptr %197, align 8
  call void @llvm.lifetime.end.p0(i64 32, ptr %43) #9
  %198 = getelementptr inbounds %"class.abcg::VulkanBuffer", ptr %49, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %45, ptr align 8 %32, i64 8, i1 false), !tbaa.struct !32
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %46, ptr align 8 %42, i64 8, i1 false), !tbaa.struct !32
  %199 = invoke noundef nonnull align 8 dereferenceable(9) ptr @_ZN2vkL23getDispatchLoaderStaticEv()
          to label %200 unwind label %212

200:                                              ; preds = %196
  %201 = getelementptr inbounds %"class.vk::Buffer", ptr %45, i32 0, i32 0
  %202 = load ptr, ptr %201, align 8
  %203 = getelementptr inbounds %"class.vk::DeviceMemory", ptr %46, i32 0, i32 0
  %204 = load ptr, ptr %203, align 8
  invoke void @_ZNK2vk6Device16bindBufferMemoryINS_20DispatchLoaderStaticEEEvNS_6BufferENS_12DeviceMemoryEmRKT_(ptr noundef nonnull align 8 dereferenceable(8) %198, ptr %202, ptr %204, i64 noundef 0, ptr noundef nonnull align 8 dereferenceable(9) %199)
          to label %205 unwind label %212

205:                                              ; preds = %200
  invoke void @_ZNSt4pairIN2vk6BufferENS0_12DeviceMemoryEEC2IRS1_RS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS8_S9_EEEbE4typeELb1EEEOS8_OS9_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull align 8 dereferenceable(8) %42)
          to label %206 unwind label %212

206:                                              ; preds = %205
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %35) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #9
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #9
  call void @_ZNSt3setIjSt4lessIjESaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  %207 = load { ptr, ptr }, ptr %6, align 8
  ret { ptr, ptr } %207

208:                                              ; preds = %192, %189, %180
  %209 = landingpad { ptr, i32 }
          cleanup
  %210 = extractvalue { ptr, i32 } %209, 0
  store ptr %210, ptr %22, align 8
  %211 = extractvalue { ptr, i32 } %209, 1
  store i32 %211, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %43) #9
  br label %216

212:                                              ; preds = %205, %200, %196
  %213 = landingpad { ptr, i32 }
          cleanup
  %214 = extractvalue { ptr, i32 } %213, 0
  store ptr %214, ptr %22, align 8
  %215 = extractvalue { ptr, i32 } %213, 1
  store i32 %215, ptr %23, align 4
  br label %216

216:                                              ; preds = %212, %208
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #9
  br label %217

217:                                              ; preds = %216, %179, %169
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #9
  br label %218

218:                                              ; preds = %217, %165
  call void @llvm.lifetime.end.p0(i64 24, ptr %35) #9
  br label %219

219:                                              ; preds = %218, %161
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #9
  br label %220

220:                                              ; preds = %219, %160
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #9
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #9
  br label %221

221:                                              ; preds = %220, %148
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #9
  br label %222

222:                                              ; preds = %221, %144
  call void @_ZNSt3setIjSt4lessIjESaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #9
  br label %223

223:                                              ; preds = %222, %140
  call void @llvm.lifetime.end.p0(i64 48, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  br label %224

224:                                              ; preds = %223
  %225 = load ptr, ptr %22, align 8
  %226 = load i32, ptr %23, align 4
  %227 = insertvalue { ptr, i32 } poison, ptr %225, 0
  %228 = insertvalue { ptr, i32 } %227, i32 %226, 1
  resume { ptr, i32 } %228

229:                                              ; preds = %139
  unreachable
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef nonnull align 8 dereferenceable(9) ptr @_ZN2vkL23getDispatchLoaderStaticEv() #3

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nounwind
declare noundef nonnull align 8 dereferenceable(68) ptr @_ZNK4abcg12VulkanDevice17getPhysicalDeviceEv(ptr noundef nonnull align 8 dereferenceable(136)) #5

; Function Attrs: nounwind
declare noundef nonnull align 4 dereferenceable(32) ptr @_ZNK4abcg20VulkanPhysicalDevice17getQueuesFamiliesEv(ptr noundef nonnull align 8 dereferenceable(68)) #5

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt3setIjSt4lessIjESaIjEE5eraseERKj(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #2 align 2

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

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local ptr @_ZNK2vk6Device12createBufferINS_20DispatchLoaderStaticEEENS_6BufferERKNS_16BufferCreateInfoENS_8OptionalIKNS_19AllocationCallbacksEEERKT_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(56), ptr, ptr noundef nonnull align 8 dereferenceable(9)) #6 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN3gsl6narrowIjmEET_T0_(i64 noundef) #2

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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZNK2vk6Device27getBufferMemoryRequirementsINS_20DispatchLoaderStaticEEENS_18MemoryRequirementsENS_6BufferERKT_(ptr dead_on_unwind noalias writable sret(%"struct.vk::MemoryRequirements") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr, ptr noundef nonnull align 8 dereferenceable(9)) #7 align 2

declare i64 @_ZNK4abcg20VulkanPhysicalDevice14findMemoryTypeEjN2vk5FlagsINS1_22MemoryPropertyFlagBitsEEE(ptr noundef nonnull align 8 dereferenceable(68), i32 noundef, i32) #8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt8optionalIjE9has_valueEv(ptr noundef nonnull align 4 dereferenceable(8)) #4 align 2

declare ptr @__cxa_allocate_exception(i64)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt12experimental15fundamentals_v215source_location7currentEPKcS3_ii(ptr dead_on_unwind noalias writable sret(%"struct.std::experimental::fundamentals_v2::source_location") align 8, ptr noundef, ptr noundef, i32 noundef, i32 noundef) #4 align 2

declare void @_ZN4abcg12RuntimeErrorC1ESt17basic_string_viewIcSt11char_traitsIcEERKNSt12experimental15fundamentals_v215source_locationE(ptr noundef nonnull align 8 dereferenceable(40), i64, ptr, ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #8

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

declare void @__cxa_throw(ptr, ptr, ptr)

declare void @__cxa_free_exception(ptr)

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local ptr @_ZNK2vk6Device14allocateMemoryINS_20DispatchLoaderStaticEEENS_12DeviceMemoryERKNS_18MemoryAllocateInfoENS_8OptionalIKNS_19AllocationCallbacksEEERKT_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(28), ptr, ptr noundef nonnull align 8 dereferenceable(9)) #6 align 2

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZNK2vk6Device16bindBufferMemoryINS_20DispatchLoaderStaticEEEvNS_6BufferENS_12DeviceMemoryEmRKT_(ptr noundef nonnull align 8 dereferenceable(8), ptr, ptr, i64 noundef, ptr noundef nonnull align 8 dereferenceable(9)) #6 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setIjSt4lessIjESaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIjED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 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 = { 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 #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 = { 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 #6 = { alwaysinline 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 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { nounwind }
attributes #10 = { noreturn }

!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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTSSt16initializer_listIjE", !6, i64 0, !10, i64 8}
!15 = !{!14, !10, i64 8}
!16 = !{!17, !17, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{!19, !20, i64 0}
!19 = !{!"_ZTSN2vk16BufferCreateInfoE", !20, i64 0, !6, i64 8, !21, i64 16, !10, i64 24, !22, i64 32, !23, i64 36, !12, i64 40, !6, i64 48}
!20 = !{!"_ZTSN2vk13StructureTypeE", !7, i64 0}
!21 = !{!"_ZTSN2vk5FlagsINS_20BufferCreateFlagBitsEEE", !12, i64 0}
!22 = !{!"_ZTSN2vk5FlagsINS_19BufferUsageFlagBitsEEE", !12, i64 0}
!23 = !{!"_ZTSN2vk11SharingModeE", !7, i64 0}
!24 = !{!19, !6, i64 8}
!25 = !{!19, !10, i64 24}
!26 = !{i64 0, i64 4, !11}
!27 = !{i8 0, i8 2}
!28 = !{}
!29 = !{!19, !23, i64 36}
!30 = !{!19, !12, i64 40}
!31 = !{!19, !6, i64 48}
!32 = !{i64 0, i64 8, !5}
!33 = !{!34, !12, i64 16}
!34 = !{!"_ZTSN2vk18MemoryRequirementsE", !10, i64 0, !10, i64 8, !12, i64 16}
!35 = !{!36, !20, i64 0}
!36 = !{!"_ZTSN2vk18MemoryAllocateInfoE", !20, i64 0, !6, i64 8, !10, i64 16, !12, i64 24}
!37 = !{!36, !6, i64 8}
!38 = !{!34, !10, i64 0}
!39 = !{!36, !10, i64 16}
!40 = !{!36, !12, i64 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"

%"struct.std::pair" = type { %"class.vk::Buffer", %"class.vk::DeviceMemory" }
%"class.vk::Buffer" = type { ptr }
%"class.vk::DeviceMemory" = type { ptr }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned int, unsigned int, std::_Identity<unsigned int>, std::less<unsigned int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned int, unsigned int, std::_Identity<unsigned int>, std::less<unsigned int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::less" = type { i8 }
%"class.std::allocator.12" = type { i8 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.vk::BufferCreateInfo" = type { i32, ptr, %"class.vk::Flags.15", i64, %"class.vk::Flags.0", i32, i32, ptr }
%"class.vk::Flags.15" = type { i32 }
%"class.vk::Flags.0" = type { i32 }
%"class.vk::Optional" = type { ptr }
%"struct.vk::MemoryRequirements" = type <{ i64, i64, i32, [4 x i8] }>
%"class.std::optional" = type { %"struct.std::_Optional_base" }
%"struct.std::_Optional_base" = type { %"struct.std::_Optional_payload" }
%"struct.std::_Optional_payload" = type { %"struct.std::_Optional_payload_base.base", [3 x i8] }
%"struct.std::_Optional_payload_base.base" = type <{ %"union.std::_Optional_payload_base<unsigned int>::_Storage", i8 }>
%"union.std::_Optional_payload_base<unsigned int>::_Storage" = type { i32 }
%"class.std::basic_string_view" = type { i64, ptr }
%"struct.std::experimental::fundamentals_v2::source_location" = type { ptr, ptr, i32, i32 }
%"struct.vk::MemoryAllocateInfo" = type <{ i32, [4 x i8], ptr, i64, i32, [4 x i8] }>

@.str = external hidden unnamed_addr constant [36 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@_ZTIN4abcg12RuntimeErrorE = external dso_local constant { ptr, ptr, ptr }, align 8

; 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 uwtable
define dso_local { ptr, ptr } @_ZNK4abcg12VulkanBuffer12createBufferERKNS_12VulkanDeviceEmN2vk5FlagsINS4_19BufferUsageFlagBitsEEENS5_INS4_22MemoryPropertyFlagBitsEEE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(136) %1, i64 noundef %2, i32 %3, i32 %4) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca %"class.std::set", align 8
  %8 = alloca [3 x i32], align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::less", align 1
  %13 = alloca %"class.std::allocator.12", align 1
  %14 = alloca i32, align 4
  %15 = alloca %"class.std::vector", align 8
  %16 = alloca %"class.std::allocator.12", align 1
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %"class.vk::Buffer", align 8
  %20 = alloca %"struct.vk::BufferCreateInfo", align 8
  %21 = alloca %"class.vk::Optional", align 8
  %22 = alloca %"struct.vk::MemoryRequirements", align 8
  %23 = alloca %"class.std::optional", align 8
  %24 = alloca %"class.std::basic_string_view", align 8
  %25 = alloca %"struct.std::experimental::fundamentals_v2::source_location", align 8
  %26 = alloca %"class.vk::DeviceMemory", align 8
  %27 = alloca %"struct.vk::MemoryAllocateInfo", align 8
  %28 = alloca %"class.vk::Optional", align 8
  %29 = tail call noundef nonnull align 8 dereferenceable(68) ptr @_ZNK4abcg12VulkanDevice17getPhysicalDeviceEv(ptr noundef nonnull align 8 dereferenceable(136) %1) #8
  %30 = tail call noundef nonnull align 4 dereferenceable(32) ptr @_ZNK4abcg20VulkanPhysicalDevice17getQueuesFamiliesEv(ptr noundef nonnull align 8 dereferenceable(68) %29) #8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #8
  %31 = getelementptr inbounds i8, ptr %30, i64 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #8
  store i32 -1, ptr %9, align 4, !tbaa !5
  %32 = call noundef i32 @_ZNKRSt8optionalIjE8value_orIjEEjOT_(ptr noundef nonnull align 4 dereferenceable(8) %31, ptr noundef nonnull align 4 dereferenceable(4) %9)
  store i32 %32, ptr %8, align 4, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %8, i64 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #8
  store i32 -1, ptr %10, align 4, !tbaa !5
  %34 = call noundef i32 @_ZNKRSt8optionalIjE8value_orIjEEjOT_(ptr noundef nonnull align 4 dereferenceable(8) %30, ptr noundef nonnull align 4 dereferenceable(4) %10)
  store i32 %34, ptr %33, align 4, !tbaa !5
  %35 = getelementptr inbounds i8, ptr %8, i64 8
  %36 = getelementptr inbounds i8, ptr %30, i64 24
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  store i32 -1, ptr %11, align 4, !tbaa !5
  %37 = call noundef i32 @_ZNKRSt8optionalIjE8value_orIjEEjOT_(ptr noundef nonnull align 4 dereferenceable(8) %36, ptr noundef nonnull align 4 dereferenceable(4) %11)
  store i32 %37, ptr %35, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #8
  call void @_ZNSaIjEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #8
  invoke void @_ZNSt3setIjSt4lessIjESaIjEEC2ESt16initializer_listIjERKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr nonnull %8, i64 3, ptr noundef nonnull align 1 dereferenceable(1) %12, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %38 unwind label %75

38:                                               ; preds = %5
  call void @_ZNSt15__new_allocatorIjED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #8
  store i32 -1, ptr %14, align 4, !tbaa !5
  %39 = invoke noundef i64 @_ZNSt3setIjSt4lessIjESaIjEE5eraseERKj(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %40 unwind label %77

40:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #8
  %41 = call ptr @_ZNKSt3setIjSt4lessIjESaIjEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %7) #8
  %42 = call ptr @_ZNKSt3setIjSt4lessIjESaIjEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %7) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %16) #8
  call void @_ZNSaIjEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #8
  invoke void @_ZNSt6vectorIjSaIjEEC2ISt23_Rb_tree_const_iteratorIjEvEET_S5_RKS0_(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr %41, ptr %42, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %43 unwind label %79

43:                                               ; preds = %40
  call void @_ZNSt15__new_allocatorIjED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #8
  store i32 -1, ptr %17, align 4, !tbaa !5
  %44 = call noundef i32 @_ZNKRSt8optionalIjE8value_orIjEEjOT_(ptr noundef nonnull align 4 dereferenceable(8) %31, ptr noundef nonnull align 4 dereferenceable(4) %17)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #8
  store i32 -1, ptr %18, align 4, !tbaa !5
  %45 = call noundef i32 @_ZNKRSt8optionalIjE8value_orIjEEjOT_(ptr noundef nonnull align 4 dereferenceable(8) %36, ptr noundef nonnull align 4 dereferenceable(4) %18)
  %.not = icmp ne i32 %44, %45
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #8
  %46 = getelementptr inbounds i8, ptr %0, i64 16
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %20) #8
  store i32 12, ptr %20, align 8, !tbaa !9
  %47 = getelementptr inbounds i8, ptr %20, i64 8
  store ptr null, ptr %47, align 8, !tbaa !17
  %48 = getelementptr inbounds i8, ptr %20, i64 16
  call void @_ZN2vk5FlagsINS_20BufferCreateFlagBitsEEC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %48) #8
  %49 = getelementptr inbounds i8, ptr %20, i64 24
  store i64 %2, ptr %49, align 8, !tbaa !18
  %50 = getelementptr inbounds i8, ptr %20, i64 32
  store i32 %3, ptr %50, align 8, !tbaa !5
  %51 = getelementptr inbounds i8, ptr %20, i64 36
  %52 = zext i1 %.not to i32
  store i32 %52, ptr %51, align 4, !tbaa !19
  %53 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #8
  %54 = invoke noundef i32 @_ZN3gsl6narrowIjmEET_T0_(i64 noundef %53)
          to label %55 unwind label %81

55:                                               ; preds = %43
  %56 = getelementptr inbounds i8, ptr %20, i64 40
  store i32 %54, ptr %56, align 8, !tbaa !20
  %57 = getelementptr inbounds i8, ptr %20, i64 48
  %58 = call noundef ptr @_ZNKSt6vectorIjSaIjEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #8
  store ptr %58, ptr %57, align 8, !tbaa !21
  call void @_ZN2vk8OptionalIKNS_19AllocationCallbacksEEC2EDn(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr null) #8
  %59 = call noundef nonnull align 8 dereferenceable(9) ptr @_ZN2vkL23getDispatchLoaderStaticEv()
  %60 = load ptr, ptr %21, align 8
  %61 = invoke ptr @_ZNK2vk6Device12createBufferINS_20DispatchLoaderStaticEEENS_6BufferERKNS_16BufferCreateInfoENS_8OptionalIKNS_19AllocationCallbacksEEERKT_(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef nonnull align 8 dereferenceable(56) %20, ptr %60, ptr noundef nonnull align 8 dereferenceable(9) %59)
          to label %62 unwind label %81

62:                                               ; preds = %55
  store ptr %61, ptr %19, align 8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %20) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %22) #8
  %63 = call noundef nonnull align 8 dereferenceable(9) ptr @_ZN2vkL23getDispatchLoaderStaticEv()
  call void @_ZNK2vk6Device27getBufferMemoryRequirementsINS_20DispatchLoaderStaticEEENS_18MemoryRequirementsENS_6BufferERKT_(ptr dead_on_unwind nonnull writable sret(%"struct.vk::MemoryRequirements") align 8 %22, ptr noundef nonnull align 8 dereferenceable(8) %46, ptr %61, ptr noundef nonnull align 8 dereferenceable(9) %63) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #8
  %64 = getelementptr inbounds i8, ptr %22, i64 16
  %65 = load i32, ptr %64, align 8, !tbaa !22
  %66 = invoke i64 @_ZNK4abcg20VulkanPhysicalDevice14findMemoryTypeEjN2vk5FlagsINS1_22MemoryPropertyFlagBitsEEE(ptr noundef nonnull align 8 dereferenceable(68) %29, i32 noundef %65, i32 %4)
          to label %67 unwind label %83

67:                                               ; preds = %62
  store i64 %66, ptr %23, align 8
  %68 = call noundef zeroext i1 @_ZNKSt8optionalIjE9has_valueEv(ptr noundef nonnull align 4 dereferenceable(8) %23) #8
  br i1 %68, label %89, label %69

69:                                               ; preds = %67
  %70 = call ptr @__cxa_allocate_exception(i64 40) #8
  call void @_ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef @.str) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %25) #8
  call void @_ZNSt12experimental15fundamentals_v215source_location7currentEPKcS3_ii(ptr dead_on_unwind nonnull writable sret(%"struct.std::experimental::fundamentals_v2::source_location") align 8 %25, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 121, i32 noundef 0) #8
  %71 = load i64, ptr %24, align 8
  %72 = getelementptr inbounds i8, ptr %24, i64 8
  %73 = load ptr, ptr %72, align 8
  invoke void @_ZN4abcg12RuntimeErrorC1ESt17basic_string_viewIcSt11char_traitsIcEERKNSt12experimental15fundamentals_v215source_locationE(ptr noundef nonnull align 8 dereferenceable(40) %70, i64 %71, ptr %73, ptr noundef nonnull align 8 dereferenceable(24) %25)
          to label %74 unwind label %87

74:                                               ; preds = %69
  invoke void @__cxa_throw(ptr nonnull %70, ptr nonnull @_ZTIN4abcg12RuntimeErrorE, ptr nonnull @_ZN4abcg9ExceptionD2Ev) #9
          to label %113 unwind label %85

75:                                               ; preds = %5
  %76 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIjED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #8
  br label %112

77:                                               ; preds = %38
  %78 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #8
  br label %111

79:                                               ; preds = %40
  %80 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIjED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #8
  br label %110

81:                                               ; preds = %55, %43
  %82 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %20) #8
  br label %109

83:                                               ; preds = %62
  %84 = landingpad { ptr, i32 }
          cleanup
  br label %108

85:                                               ; preds = %74
  %86 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %25) #8
  br label %108

87:                                               ; preds = %69
  %88 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %25) #8
  call void @__cxa_free_exception(ptr %70) #8
  br label %108

89:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %26) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %27) #8
  store i32 5, ptr %27, align 8, !tbaa !24
  %90 = getelementptr inbounds i8, ptr %27, i64 8
  store ptr null, ptr %90, align 8, !tbaa !26
  %91 = getelementptr inbounds i8, ptr %27, i64 16
  %92 = load i64, ptr %22, align 8, !tbaa !27
  store i64 %92, ptr %91, align 8, !tbaa !28
  %93 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNKRSt8optionalIjE5valueEv(ptr noundef nonnull align 4 dereferenceable(8) %23)
          to label %94 unwind label %103

94:                                               ; preds = %89
  %95 = getelementptr inbounds i8, ptr %27, i64 24
  %96 = load i32, ptr %93, align 4, !tbaa !5
  store i32 %96, ptr %95, align 8, !tbaa !29
  call void @_ZN2vk8OptionalIKNS_19AllocationCallbacksEEC2EDn(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr null) #8
  %97 = call noundef nonnull align 8 dereferenceable(9) ptr @_ZN2vkL23getDispatchLoaderStaticEv()
  %98 = load ptr, ptr %28, align 8
  %99 = invoke ptr @_ZNK2vk6Device14allocateMemoryINS_20DispatchLoaderStaticEEENS_12DeviceMemoryERKNS_18MemoryAllocateInfoENS_8OptionalIKNS_19AllocationCallbacksEEERKT_(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef nonnull align 8 dereferenceable(28) %27, ptr %98, ptr noundef nonnull align 8 dereferenceable(9) %97)
          to label %100 unwind label %103

100:                                              ; preds = %94
  store ptr %99, ptr %26, align 8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %27) #8
  %101 = call noundef nonnull align 8 dereferenceable(9) ptr @_ZN2vkL23getDispatchLoaderStaticEv()
  invoke void @_ZNK2vk6Device16bindBufferMemoryINS_20DispatchLoaderStaticEEEvNS_6BufferENS_12DeviceMemoryEmRKT_(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr %61, ptr %99, i64 noundef 0, ptr noundef nonnull align 8 dereferenceable(9) %101)
          to label %102 unwind label %105

102:                                              ; preds = %100
  call void @_ZNSt4pairIN2vk6BufferENS0_12DeviceMemoryEEC2IRS1_RS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS8_S9_EEEbE4typeELb1EEEOS8_OS9_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %26)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #8
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #8
  call void @_ZNSt3setIjSt4lessIjESaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) #8
  %.fca.0.load = load ptr, ptr %6, align 8
  %.fca.0.insert = insertvalue { ptr, ptr } poison, ptr %.fca.0.load, 0
  %.fca.1.gep = getelementptr inbounds i8, ptr %6, i64 8
  %.fca.1.load = load ptr, ptr %.fca.1.gep, align 8
  %.fca.1.insert = insertvalue { ptr, ptr } %.fca.0.insert, ptr %.fca.1.load, 1
  ret { ptr, ptr } %.fca.1.insert

103:                                              ; preds = %94, %89
  %104 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %27) #8
  br label %107

105:                                              ; preds = %100
  %106 = landingpad { ptr, i32 }
          cleanup
  br label %107

107:                                              ; preds = %105, %103
  %.pn = phi { ptr, i32 } [ %106, %105 ], [ %104, %103 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #8
  br label %108

108:                                              ; preds = %85, %87, %107, %83
  %.pn.pn = phi { ptr, i32 } [ %.pn, %107 ], [ %88, %87 ], [ %86, %85 ], [ %84, %83 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %22) #8
  br label %109

109:                                              ; preds = %108, %81
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %108 ], [ %82, %81 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #8
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #8
  br label %110

110:                                              ; preds = %109, %79
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %109 ], [ %80, %79 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #8
  br label %111

111:                                              ; preds = %110, %77
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %110 ], [ %78, %77 ]
  call void @_ZNSt3setIjSt4lessIjESaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #8
  br label %112

112:                                              ; preds = %111, %75
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %111 ], [ %76, %75 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) #8
  resume { ptr, i32 } %.pn.pn.pn.pn.pn.pn

113:                                              ; preds = %74
  unreachable
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef nonnull align 8 dereferenceable(9) ptr @_ZN2vkL23getDispatchLoaderStaticEv() local_unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nounwind
declare noundef nonnull align 8 dereferenceable(68) ptr @_ZNK4abcg12VulkanDevice17getPhysicalDeviceEv(ptr noundef nonnull align 8 dereferenceable(136)) local_unnamed_addr #4

; Function Attrs: nounwind
declare noundef nonnull align 4 dereferenceable(32) ptr @_ZNK4abcg20VulkanPhysicalDevice17getQueuesFamiliesEv(ptr noundef nonnull align 8 dereferenceable(68)) local_unnamed_addr #4

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt3setIjSt4lessIjESaIjEE5eraseERKj(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

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

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local ptr @_ZNK2vk6Device12createBufferINS_20DispatchLoaderStaticEEENS_6BufferERKNS_16BufferCreateInfoENS_8OptionalIKNS_19AllocationCallbacksEEERKT_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(56), ptr, ptr noundef nonnull align 8 dereferenceable(9)) local_unnamed_addr #5 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN3gsl6narrowIjmEET_T0_(i64 noundef) local_unnamed_addr #1

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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZNK2vk6Device27getBufferMemoryRequirementsINS_20DispatchLoaderStaticEEENS_18MemoryRequirementsENS_6BufferERKT_(ptr dead_on_unwind noalias writable sret(%"struct.vk::MemoryRequirements") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr, ptr noundef nonnull align 8 dereferenceable(9)) local_unnamed_addr #6 align 2

declare i64 @_ZNK4abcg20VulkanPhysicalDevice14findMemoryTypeEjN2vk5FlagsINS1_22MemoryPropertyFlagBitsEEE(ptr noundef nonnull align 8 dereferenceable(68), i32 noundef, i32) local_unnamed_addr #7

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt12experimental15fundamentals_v215source_location7currentEPKcS3_ii(ptr dead_on_unwind noalias writable sret(%"struct.std::experimental::fundamentals_v2::source_location") align 8, ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #3 align 2

declare void @_ZN4abcg12RuntimeErrorC1ESt17basic_string_viewIcSt11char_traitsIcEERKNSt12experimental15fundamentals_v215source_locationE(ptr noundef nonnull align 8 dereferenceable(40), i64, ptr, ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #7

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

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local ptr @_ZNK2vk6Device14allocateMemoryINS_20DispatchLoaderStaticEEENS_12DeviceMemoryERKNS_18MemoryAllocateInfoENS_8OptionalIKNS_19AllocationCallbacksEEERKT_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(28), ptr, ptr noundef nonnull align 8 dereferenceable(9)) local_unnamed_addr #5 align 2

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZNK2vk6Device16bindBufferMemoryINS_20DispatchLoaderStaticEEEvNS_6BufferENS_12DeviceMemoryEmRKT_(ptr noundef nonnull align 8 dereferenceable(8), ptr, ptr, i64 noundef, ptr noundef nonnull align 8 dereferenceable(9)) local_unnamed_addr #5 align 2

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

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

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

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

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

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTSN2vk16BufferCreateInfoE", !11, i64 0, !12, i64 8, !13, i64 16, !14, i64 24, !15, i64 32, !16, i64 36, !6, i64 40, !12, i64 48}
!11 = !{!"_ZTSN2vk13StructureTypeE", !7, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"_ZTSN2vk5FlagsINS_20BufferCreateFlagBitsEEE", !6, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_ZTSN2vk5FlagsINS_19BufferUsageFlagBitsEEE", !6, i64 0}
!16 = !{!"_ZTSN2vk11SharingModeE", !7, i64 0}
!17 = !{!10, !12, i64 8}
!18 = !{!10, !14, i64 24}
!19 = !{!10, !16, i64 36}
!20 = !{!10, !6, i64 40}
!21 = !{!10, !12, i64 48}
!22 = !{!23, !6, i64 16}
!23 = !{!"_ZTSN2vk18MemoryRequirementsE", !14, i64 0, !14, i64 8, !6, i64 16}
!24 = !{!25, !11, i64 0}
!25 = !{!"_ZTSN2vk18MemoryAllocateInfoE", !11, i64 0, !12, i64 8, !14, i64 16, !6, i64 24}
!26 = !{!25, !12, i64 8}
!27 = !{!23, !14, i64 0}
!28 = !{!25, !14, i64 16}
!29 = !{!25, !6, i64 24}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass,TailCallElimPass