; LLVM IR from khushmmehta/Scorch-V :: src/ScorchVkEngine/Abstractions/Rendering (BufferManager)

; 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.VkDescriptorSetLayoutBinding = type { i32, i32, i32, i32, ptr }
%struct.VkDescriptorSetLayoutCreateInfo = type { i32, ptr, i32, i32, ptr }
%class.BufferManager = type { ptr, %"class.std::vector.0", %class.VulkanMemoryAllocator, ptr, ptr, ptr, ptr, ptr, %"class.std::vector.5", %"class.std::vector.10", ptr, ptr, ptr, ptr, %"class.std::vector.15", ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<VkDescriptorSet_T *, std::allocator<VkDescriptorSet_T *>>::_Vector_impl" }
%"struct.std::_Vector_base<VkDescriptorSet_T *, std::allocator<VkDescriptorSet_T *>>::_Vector_impl" = type { %"struct.std::_Vector_base<VkDescriptorSet_T *, std::allocator<VkDescriptorSet_T *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<VkDescriptorSet_T *, std::allocator<VkDescriptorSet_T *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.VulkanMemoryAllocator = type { ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<VkBuffer_T *, std::allocator<VkBuffer_T *>>::_Vector_impl" }
%"struct.std::_Vector_base<VkBuffer_T *, std::allocator<VkBuffer_T *>>::_Vector_impl" = type { %"struct.std::_Vector_base<VkBuffer_T *, std::allocator<VkBuffer_T *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<VkBuffer_T *, std::allocator<VkBuffer_T *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<void *, std::allocator<void *>>::_Vector_impl" }
%"struct.std::_Vector_base<void *, std::allocator<void *>>::_Vector_impl" = type { %"struct.std::_Vector_base<void *, std::allocator<void *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<void *, std::allocator<void *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = type { %"struct.std::_Vector_base<VmaAllocation_T *, std::allocator<VmaAllocation_T *>>::_Vector_impl" }
%"struct.std::_Vector_base<VmaAllocation_T *, std::allocator<VmaAllocation_T *>>::_Vector_impl" = type { %"struct.std::_Vector_base<VmaAllocation_T *, std::allocator<VmaAllocation_T *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<VmaAllocation_T *, std::allocator<VmaAllocation_T *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.PresentationManager = type { ptr, ptr, ptr, ptr, %struct.QueueFamilyIndices, ptr, i32, %struct.VkExtent2D, %"class.std::vector.20", i8, %"class.std::vector.25", %"class.std::vector.30", %struct.SwapChainSupportDetails }
%struct.QueueFamilyIndices = type { %"class.std::optional", %"class.std::optional" }
%"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 }
%struct.VkExtent2D = type { i32, i32 }
%"class.std::vector.20" = type { %"struct.std::_Vector_base.21" }
%"struct.std::_Vector_base.21" = type { %"struct.std::_Vector_base<VkFramebuffer_T *, std::allocator<VkFramebuffer_T *>>::_Vector_impl" }
%"struct.std::_Vector_base<VkFramebuffer_T *, std::allocator<VkFramebuffer_T *>>::_Vector_impl" = type { %"struct.std::_Vector_base<VkFramebuffer_T *, std::allocator<VkFramebuffer_T *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<VkFramebuffer_T *, std::allocator<VkFramebuffer_T *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.25" = type { %"struct.std::_Vector_base.26" }
%"struct.std::_Vector_base.26" = type { %"struct.std::_Vector_base<VkImage_T *, std::allocator<VkImage_T *>>::_Vector_impl" }
%"struct.std::_Vector_base<VkImage_T *, std::allocator<VkImage_T *>>::_Vector_impl" = type { %"struct.std::_Vector_base<VkImage_T *, std::allocator<VkImage_T *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<VkImage_T *, std::allocator<VkImage_T *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.30" = type { %"struct.std::_Vector_base.31" }
%"struct.std::_Vector_base.31" = type { %"struct.std::_Vector_base<VkImageView_T *, std::allocator<VkImageView_T *>>::_Vector_impl" }
%"struct.std::_Vector_base<VkImageView_T *, std::allocator<VkImageView_T *>>::_Vector_impl" = type { %"struct.std::_Vector_base<VkImageView_T *, std::allocator<VkImageView_T *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<VkImageView_T *, std::allocator<VkImageView_T *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.SwapChainSupportDetails = type { %struct.VkSurfaceCapabilitiesKHR, %"class.std::vector.35", %"class.std::vector.40" }
%struct.VkSurfaceCapabilitiesKHR = type { i32, i32, %struct.VkExtent2D, %struct.VkExtent2D, %struct.VkExtent2D, i32, i32, i32, i32, i32 }
%"class.std::vector.35" = type { %"struct.std::_Vector_base.36" }
%"struct.std::_Vector_base.36" = type { %"struct.std::_Vector_base<VkSurfaceFormatKHR, std::allocator<VkSurfaceFormatKHR>>::_Vector_impl" }
%"struct.std::_Vector_base<VkSurfaceFormatKHR, std::allocator<VkSurfaceFormatKHR>>::_Vector_impl" = type { %"struct.std::_Vector_base<VkSurfaceFormatKHR, std::allocator<VkSurfaceFormatKHR>>::_Vector_impl_data" }
%"struct.std::_Vector_base<VkSurfaceFormatKHR, std::allocator<VkSurfaceFormatKHR>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.40" = type { %"struct.std::_Vector_base.41" }
%"struct.std::_Vector_base.41" = type { %"struct.std::_Vector_base<VkPresentModeKHR, std::allocator<VkPresentModeKHR>>::_Vector_impl" }
%"struct.std::_Vector_base<VkPresentModeKHR, std::allocator<VkPresentModeKHR>>::_Vector_impl" = type { %"struct.std::_Vector_base<VkPresentModeKHR, std::allocator<VkPresentModeKHR>>::_Vector_impl_data" }
%"struct.std::_Vector_base<VkPresentModeKHR, std::allocator<VkPresentModeKHR>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.2 = external hidden unnamed_addr constant [42 x i8], align 1
@_ZTISt13runtime_error = external constant ptr

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN13BufferManager25createDescriptorSetLayoutEv(ptr noundef nonnull align 8 dereferenceable(216) %0) #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %struct.VkDescriptorSetLayoutBinding, align 8
  %4 = alloca %struct.VkDescriptorSetLayoutCreateInfo, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %7 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #5
  call void @llvm.memset.p0.i64(ptr align 8 %3, i8 0, i64 24, i1 false)
  %8 = getelementptr inbounds %struct.VkDescriptorSetLayoutBinding, ptr %3, i32 0, i32 0
  store i32 0, ptr %8, align 8, !tbaa !9
  %9 = getelementptr inbounds %struct.VkDescriptorSetLayoutBinding, ptr %3, i32 0, i32 1
  store i32 6, ptr %9, align 4, !tbaa !13
  %10 = getelementptr inbounds %struct.VkDescriptorSetLayoutBinding, ptr %3, i32 0, i32 2
  store i32 1, ptr %10, align 8, !tbaa !14
  %11 = getelementptr inbounds %struct.VkDescriptorSetLayoutBinding, ptr %3, i32 0, i32 3
  store i32 1, ptr %11, align 4, !tbaa !15
  %12 = getelementptr inbounds %struct.VkDescriptorSetLayoutBinding, ptr %3, i32 0, i32 4
  store ptr null, ptr %12, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #5
  call void @llvm.memset.p0.i64(ptr align 8 %4, i8 0, i64 32, i1 false)
  %13 = getelementptr inbounds %struct.VkDescriptorSetLayoutCreateInfo, ptr %4, i32 0, i32 0
  store i32 32, ptr %13, align 8, !tbaa !17
  %14 = getelementptr inbounds %struct.VkDescriptorSetLayoutCreateInfo, ptr %4, i32 0, i32 3
  store i32 1, ptr %14, align 4, !tbaa !20
  %15 = getelementptr inbounds %struct.VkDescriptorSetLayoutCreateInfo, ptr %4, i32 0, i32 4
  store ptr %3, ptr %15, align 8, !tbaa !21
  %16 = getelementptr inbounds %class.BufferManager, ptr %7, i32 0, i32 10
  %17 = load ptr, ptr %16, align 8, !tbaa !22
  %18 = getelementptr inbounds %class.PresentationManager, ptr %17, i32 0, i32 3
  %19 = load ptr, ptr %18, align 8, !tbaa !41
  %20 = getelementptr inbounds %class.BufferManager, ptr %7, i32 0, i32 0
  %21 = call i32 @vkCreateDescriptorSetLayout(ptr noundef %19, ptr noundef %4, ptr noundef null, ptr noundef %20)
  %22 = icmp ne i32 %21, 0
  br i1 %22, label %23, label %30

23:                                               ; preds = %1
  %24 = call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef @.str.2)
          to label %25 unwind label %26

25:                                               ; preds = %23
  call void @__cxa_throw(ptr %24, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #6
  unreachable

26:                                               ; preds = %23
  %27 = landingpad { ptr, i32 }
          cleanup
  %28 = extractvalue { ptr, i32 } %27, 0
  store ptr %28, ptr %5, align 8
  %29 = extractvalue { ptr, i32 } %27, 1
  store i32 %29, ptr %6, align 4
  call void @__cxa_free_exception(ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #5
  br label %31

30:                                               ; preds = %1
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #5
  ret void

31:                                               ; preds = %26
  %32 = load ptr, ptr %5, align 8
  %33 = load i32, ptr %6, align 4
  %34 = insertvalue { ptr, i32 } poison, ptr %32, 0
  %35 = insertvalue { ptr, i32 } %34, i32 %33, 1
  resume { ptr, i32 } %35
}

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

declare i32 @vkCreateDescriptorSetLayout(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare ptr @__cxa_allocate_exception(i64)

declare void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #3

declare void @__cxa_free_exception(ptr)

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4

declare void @__cxa_throw(ptr, ptr, ptr)

attributes #0 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { "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 = { nounwind }
attributes #6 = { 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, !11, i64 0}
!10 = !{!"_ZTS28VkDescriptorSetLayoutBinding", !11, i64 0, !12, i64 4, !11, i64 8, !11, i64 12, !6, i64 16}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTS16VkDescriptorType", !7, i64 0}
!13 = !{!10, !12, i64 4}
!14 = !{!10, !11, i64 8}
!15 = !{!10, !11, i64 12}
!16 = !{!10, !6, i64 16}
!17 = !{!18, !19, i64 0}
!18 = !{!"_ZTS31VkDescriptorSetLayoutCreateInfo", !19, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !6, i64 24}
!19 = !{!"_ZTS15VkStructureType", !7, i64 0}
!20 = !{!18, !11, i64 20}
!21 = !{!18, !6, i64 24}
!22 = !{!23, !6, i64 136}
!23 = !{!"_ZTS13BufferManager", !6, i64 0, !24, i64 8, !28, i64 32, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !29, i64 88, !33, i64 112, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !37, i64 168, !6, i64 192, !6, i64 200, !6, i64 208}
!24 = !{!"_ZTSSt6vectorIP17VkDescriptorSet_TSaIS1_EE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseIP17VkDescriptorSet_TSaIS1_EE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIP17VkDescriptorSet_TSaIS1_EE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIP17VkDescriptorSet_TSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!28 = !{!"_ZTS21VulkanMemoryAllocator", !6, i64 0, !6, i64 8}
!29 = !{!"_ZTSSt6vectorIP10VkBuffer_TSaIS1_EE", !30, i64 0}
!30 = !{!"_ZTSSt12_Vector_baseIP10VkBuffer_TSaIS1_EE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIP10VkBuffer_TSaIS1_EE12_Vector_implE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIP10VkBuffer_TSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!33 = !{!"_ZTSSt6vectorIPvSaIS0_EE", !34, i64 0}
!34 = !{!"_ZTSSt12_Vector_baseIPvSaIS0_EE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseIPvSaIS0_EE12_Vector_implE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseIPvSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!37 = !{!"_ZTSSt6vectorIP15VmaAllocation_TSaIS1_EE", !38, i64 0}
!38 = !{!"_ZTSSt12_Vector_baseIP15VmaAllocation_TSaIS1_EE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseIP15VmaAllocation_TSaIS1_EE12_Vector_implE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseIP15VmaAllocation_TSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!41 = !{!42, !6, i64 24}
!42 = !{!"_ZTS19PresentationManager", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !43, i64 32, !6, i64 48, !49, i64 56, !50, i64 60, !51, i64 72, !48, i64 96, !55, i64 104, !59, i64 128, !63, i64 152}
!43 = !{!"_ZTS18QueueFamilyIndices", !44, i64 0, !44, i64 8}
!44 = !{!"_ZTSSt8optionalIjE", !45, i64 0}
!45 = !{!"_ZTSSt14_Optional_baseIjLb1ELb1EE", !46, i64 0}
!46 = !{!"_ZTSSt17_Optional_payloadIjLb1ELb1ELb1EE", !47, i64 0}
!47 = !{!"_ZTSSt22_Optional_payload_baseIjE", !7, i64 0, !48, i64 4}
!48 = !{!"bool", !7, i64 0}
!49 = !{!"_ZTS8VkFormat", !7, i64 0}
!50 = !{!"_ZTS10VkExtent2D", !11, i64 0, !11, i64 4}
!51 = !{!"_ZTSSt6vectorIP15VkFramebuffer_TSaIS1_EE", !52, i64 0}
!52 = !{!"_ZTSSt12_Vector_baseIP15VkFramebuffer_TSaIS1_EE", !53, i64 0}
!53 = !{!"_ZTSNSt12_Vector_baseIP15VkFramebuffer_TSaIS1_EE12_Vector_implE", !54, i64 0}
!54 = !{!"_ZTSNSt12_Vector_baseIP15VkFramebuffer_TSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!55 = !{!"_ZTSSt6vectorIP9VkImage_TSaIS1_EE", !56, i64 0}
!56 = !{!"_ZTSSt12_Vector_baseIP9VkImage_TSaIS1_EE", !57, i64 0}
!57 = !{!"_ZTSNSt12_Vector_baseIP9VkImage_TSaIS1_EE12_Vector_implE", !58, i64 0}
!58 = !{!"_ZTSNSt12_Vector_baseIP9VkImage_TSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!59 = !{!"_ZTSSt6vectorIP13VkImageView_TSaIS1_EE", !60, i64 0}
!60 = !{!"_ZTSSt12_Vector_baseIP13VkImageView_TSaIS1_EE", !61, i64 0}
!61 = !{!"_ZTSNSt12_Vector_baseIP13VkImageView_TSaIS1_EE12_Vector_implE", !62, i64 0}
!62 = !{!"_ZTSNSt12_Vector_baseIP13VkImageView_TSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!63 = !{!"_ZTS23SwapChainSupportDetails", !64, i64 0, !66, i64 56, !70, i64 80}
!64 = !{!"_ZTS24VkSurfaceCapabilitiesKHR", !11, i64 0, !11, i64 4, !50, i64 8, !50, i64 16, !50, i64 24, !11, i64 32, !11, i64 36, !65, i64 40, !11, i64 44, !11, i64 48}
!65 = !{!"_ZTS29VkSurfaceTransformFlagBitsKHR", !7, i64 0}
!66 = !{!"_ZTSSt6vectorI18VkSurfaceFormatKHRSaIS0_EE", !67, i64 0}
!67 = !{!"_ZTSSt12_Vector_baseI18VkSurfaceFormatKHRSaIS0_EE", !68, i64 0}
!68 = !{!"_ZTSNSt12_Vector_baseI18VkSurfaceFormatKHRSaIS0_EE12_Vector_implE", !69, i64 0}
!69 = !{!"_ZTSNSt12_Vector_baseI18VkSurfaceFormatKHRSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!70 = !{!"_ZTSSt6vectorI16VkPresentModeKHRSaIS0_EE", !71, i64 0}
!71 = !{!"_ZTSSt12_Vector_baseI16VkPresentModeKHRSaIS0_EE", !72, i64 0}
!72 = !{!"_ZTSNSt12_Vector_baseI16VkPresentModeKHRSaIS0_EE12_Vector_implE", !73, i64 0}
!73 = !{!"_ZTSNSt12_Vector_baseI16VkPresentModeKHRSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}


; 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.VkDescriptorSetLayoutBinding = type { i32, i32, i32, i32, ptr }
%struct.VkDescriptorSetLayoutCreateInfo = type { i32, ptr, i32, i32, ptr }

@.str.2 = external hidden unnamed_addr constant [42 x i8], align 1
@_ZTISt13runtime_error = external constant ptr

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN13BufferManager25createDescriptorSetLayoutEv(ptr noundef nonnull align 8 dereferenceable(216) %0) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %struct.VkDescriptorSetLayoutBinding, align 8
  %3 = alloca %struct.VkDescriptorSetLayoutCreateInfo, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #5
  %4 = getelementptr inbounds i8, ptr %2, i64 4
  store i64 0, ptr %2, align 8
  store i32 6, ptr %4, align 4, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %2, i64 8
  store i32 1, ptr %5, align 8, !tbaa !12
  %6 = getelementptr inbounds i8, ptr %2, i64 12
  store i32 1, ptr %6, align 4, !tbaa !13
  %7 = getelementptr inbounds i8, ptr %2, i64 16
  store ptr null, ptr %7, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %3, i8 0, i64 24, i1 false)
  store i32 32, ptr %3, align 8, !tbaa !15
  %8 = getelementptr inbounds i8, ptr %3, i64 20
  store i32 1, ptr %8, align 4, !tbaa !18
  %9 = getelementptr inbounds i8, ptr %3, i64 24
  store ptr %2, ptr %9, align 8, !tbaa !19
  %10 = getelementptr inbounds i8, ptr %0, i64 136
  %11 = load ptr, ptr %10, align 8, !tbaa !20
  %12 = getelementptr inbounds i8, ptr %11, i64 24
  %13 = load ptr, ptr %12, align 8, !tbaa !39
  %14 = call i32 @vkCreateDescriptorSetLayout(ptr noundef %13, ptr noundef nonnull %3, ptr noundef null, ptr noundef nonnull %0)
  %.not = icmp eq i32 %14, 0
  br i1 %.not, label %20, label %15

15:                                               ; preds = %1
  %16 = call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull @.str.2)
          to label %17 unwind label %18

17:                                               ; preds = %15
  call void @__cxa_throw(ptr nonnull %16, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #6
  unreachable

18:                                               ; preds = %15
  %19 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #5
  resume { ptr, i32 } %19

20:                                               ; preds = %1
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #5
  ret void
}

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

declare i32 @vkCreateDescriptorSetLayout(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #3

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4

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

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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { "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 = { nounwind }
attributes #6 = { 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, !10, i64 4}
!6 = !{!"_ZTS28VkDescriptorSetLayoutBinding", !7, i64 0, !10, i64 4, !7, i64 8, !7, i64 12, !11, i64 16}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS16VkDescriptorType", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!6, !7, i64 8}
!13 = !{!6, !7, i64 12}
!14 = !{!6, !11, i64 16}
!15 = !{!16, !17, i64 0}
!16 = !{!"_ZTS31VkDescriptorSetLayoutCreateInfo", !17, i64 0, !11, i64 8, !7, i64 16, !7, i64 20, !11, i64 24}
!17 = !{!"_ZTS15VkStructureType", !8, i64 0}
!18 = !{!16, !7, i64 20}
!19 = !{!16, !11, i64 24}
!20 = !{!21, !11, i64 136}
!21 = !{!"_ZTS13BufferManager", !11, i64 0, !22, i64 8, !26, i64 32, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !27, i64 88, !31, i64 112, !11, i64 136, !11, i64 144, !11, i64 152, !11, i64 160, !35, i64 168, !11, i64 192, !11, i64 200, !11, i64 208}
!22 = !{!"_ZTSSt6vectorIP17VkDescriptorSet_TSaIS1_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIP17VkDescriptorSet_TSaIS1_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIP17VkDescriptorSet_TSaIS1_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIP17VkDescriptorSet_TSaIS1_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!26 = !{!"_ZTS21VulkanMemoryAllocator", !11, i64 0, !11, i64 8}
!27 = !{!"_ZTSSt6vectorIP10VkBuffer_TSaIS1_EE", !28, i64 0}
!28 = !{!"_ZTSSt12_Vector_baseIP10VkBuffer_TSaIS1_EE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIP10VkBuffer_TSaIS1_EE12_Vector_implE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIP10VkBuffer_TSaIS1_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!31 = !{!"_ZTSSt6vectorIPvSaIS0_EE", !32, i64 0}
!32 = !{!"_ZTSSt12_Vector_baseIPvSaIS0_EE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIPvSaIS0_EE12_Vector_implE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIPvSaIS0_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!35 = !{!"_ZTSSt6vectorIP15VmaAllocation_TSaIS1_EE", !36, i64 0}
!36 = !{!"_ZTSSt12_Vector_baseIP15VmaAllocation_TSaIS1_EE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseIP15VmaAllocation_TSaIS1_EE12_Vector_implE", !38, i64 0}
!38 = !{!"_ZTSNSt12_Vector_baseIP15VmaAllocation_TSaIS1_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!39 = !{!40, !11, i64 24}
!40 = !{!"_ZTS19PresentationManager", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !41, i64 32, !11, i64 48, !47, i64 56, !48, i64 60, !49, i64 72, !46, i64 96, !53, i64 104, !57, i64 128, !61, i64 152}
!41 = !{!"_ZTS18QueueFamilyIndices", !42, i64 0, !42, i64 8}
!42 = !{!"_ZTSSt8optionalIjE", !43, i64 0}
!43 = !{!"_ZTSSt14_Optional_baseIjLb1ELb1EE", !44, i64 0}
!44 = !{!"_ZTSSt17_Optional_payloadIjLb1ELb1ELb1EE", !45, i64 0}
!45 = !{!"_ZTSSt22_Optional_payload_baseIjE", !8, i64 0, !46, i64 4}
!46 = !{!"bool", !8, i64 0}
!47 = !{!"_ZTS8VkFormat", !8, i64 0}
!48 = !{!"_ZTS10VkExtent2D", !7, i64 0, !7, i64 4}
!49 = !{!"_ZTSSt6vectorIP15VkFramebuffer_TSaIS1_EE", !50, i64 0}
!50 = !{!"_ZTSSt12_Vector_baseIP15VkFramebuffer_TSaIS1_EE", !51, i64 0}
!51 = !{!"_ZTSNSt12_Vector_baseIP15VkFramebuffer_TSaIS1_EE12_Vector_implE", !52, i64 0}
!52 = !{!"_ZTSNSt12_Vector_baseIP15VkFramebuffer_TSaIS1_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!53 = !{!"_ZTSSt6vectorIP9VkImage_TSaIS1_EE", !54, i64 0}
!54 = !{!"_ZTSSt12_Vector_baseIP9VkImage_TSaIS1_EE", !55, i64 0}
!55 = !{!"_ZTSNSt12_Vector_baseIP9VkImage_TSaIS1_EE12_Vector_implE", !56, i64 0}
!56 = !{!"_ZTSNSt12_Vector_baseIP9VkImage_TSaIS1_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!57 = !{!"_ZTSSt6vectorIP13VkImageView_TSaIS1_EE", !58, i64 0}
!58 = !{!"_ZTSSt12_Vector_baseIP13VkImageView_TSaIS1_EE", !59, i64 0}
!59 = !{!"_ZTSNSt12_Vector_baseIP13VkImageView_TSaIS1_EE12_Vector_implE", !60, i64 0}
!60 = !{!"_ZTSNSt12_Vector_baseIP13VkImageView_TSaIS1_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!61 = !{!"_ZTS23SwapChainSupportDetails", !62, i64 0, !64, i64 56, !68, i64 80}
!62 = !{!"_ZTS24VkSurfaceCapabilitiesKHR", !7, i64 0, !7, i64 4, !48, i64 8, !48, i64 16, !48, i64 24, !7, i64 32, !7, i64 36, !63, i64 40, !7, i64 44, !7, i64 48}
!63 = !{!"_ZTS29VkSurfaceTransformFlagBitsKHR", !8, i64 0}
!64 = !{!"_ZTSSt6vectorI18VkSurfaceFormatKHRSaIS0_EE", !65, i64 0}
!65 = !{!"_ZTSSt12_Vector_baseI18VkSurfaceFormatKHRSaIS0_EE", !66, i64 0}
!66 = !{!"_ZTSNSt12_Vector_baseI18VkSurfaceFormatKHRSaIS0_EE12_Vector_implE", !67, i64 0}
!67 = !{!"_ZTSNSt12_Vector_baseI18VkSurfaceFormatKHRSaIS0_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!68 = !{!"_ZTSSt6vectorI16VkPresentModeKHRSaIS0_EE", !69, i64 0}
!69 = !{!"_ZTSSt12_Vector_baseI16VkPresentModeKHRSaIS0_EE", !70, i64 0}
!70 = !{!"_ZTSNSt12_Vector_baseI16VkPresentModeKHRSaIS0_EE12_Vector_implE", !71, i64 0}
!71 = !{!"_ZTSNSt12_Vector_baseI16VkPresentModeKHRSaIS0_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,SROAPass,SimplifyCFGPass