; LLVM IR from einthomas/GVSPP :: vulkanutil/ZN10VulkanUtil11createImageEP18VkPhysicalDevice_TP10VkDevice_Tjj21VkSa_584809de (56899247)

; 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.VkImageCreateInfo = type { i32, ptr, i32, i32, i32, %struct.VkExtent3D, i32, i32, i32, i32, i32, i32, i32, ptr, i32 }
%struct.VkExtent3D = type { i32, i32, i32 }
%struct.VkMemoryRequirements = type { i64, i64, i32 }
%struct.VkMemoryAllocateInfo = type { i32, ptr, i64, i32 }

@_ZTISt13runtime_error = external constant ptr
@.str.3 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [33 x i8], align 1

; 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: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

declare ptr @__cxa_allocate_exception(i64)

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

declare i32 @__gxx_personality_v0(...)

declare void @__cxa_free_exception(ptr)

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

declare void @__cxa_throw(ptr, ptr, ptr)

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN10VulkanUtil14findMemoryTypeEP18VkPhysicalDevice_Tjj(ptr noundef, i32 noundef, i32 noundef) #4 align 2

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

declare i32 @vkAllocateMemory(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10VulkanUtil11createImageEP18VkPhysicalDevice_TP10VkDevice_Tjj21VkSampleCountFlagBits8VkFormat13VkImageTilingjjRP9VkImage_TRP16VkDeviceMemory_Tj(ptr noundef %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8, ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10, i32 noundef %11) #4 align 2 personality ptr @__gxx_personality_v0 {
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  %25 = alloca %struct.VkImageCreateInfo, align 8
  %26 = alloca ptr, align 8
  %27 = alloca i32, align 4
  %28 = alloca %struct.VkMemoryRequirements, align 8
  %29 = alloca %struct.VkMemoryAllocateInfo, align 8
  store ptr %0, ptr %13, align 8, !tbaa !5
  store ptr %1, ptr %14, align 8, !tbaa !5
  store i32 %2, ptr %15, align 4, !tbaa !9
  store i32 %3, ptr %16, align 4, !tbaa !9
  store i32 %4, ptr %17, align 4, !tbaa !11
  store i32 %5, ptr %18, align 4, !tbaa !13
  store i32 %6, ptr %19, align 4, !tbaa !15
  store i32 %7, ptr %20, align 4, !tbaa !9
  store i32 %8, ptr %21, align 4, !tbaa !9
  store ptr %9, ptr %22, align 8, !tbaa !5
  store ptr %10, ptr %23, align 8, !tbaa !5
  store i32 %11, ptr %24, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 88, ptr %25) #5
  call void @llvm.memset.p0.i64(ptr align 8 %25, i8 0, i64 88, i1 false)
  %30 = getelementptr inbounds %struct.VkImageCreateInfo, ptr %25, i32 0, i32 0
  store i32 14, ptr %30, align 8, !tbaa !17
  %31 = getelementptr inbounds %struct.VkImageCreateInfo, ptr %25, i32 0, i32 3
  store i32 1, ptr %31, align 4, !tbaa !24
  %32 = load i32, ptr %15, align 4, !tbaa !9
  %33 = getelementptr inbounds %struct.VkImageCreateInfo, ptr %25, i32 0, i32 5
  %34 = getelementptr inbounds %struct.VkExtent3D, ptr %33, i32 0, i32 0
  store i32 %32, ptr %34, align 4, !tbaa !25
  %35 = load i32, ptr %16, align 4, !tbaa !9
  %36 = getelementptr inbounds %struct.VkImageCreateInfo, ptr %25, i32 0, i32 5
  %37 = getelementptr inbounds %struct.VkExtent3D, ptr %36, i32 0, i32 1
  store i32 %35, ptr %37, align 4, !tbaa !26
  %38 = getelementptr inbounds %struct.VkImageCreateInfo, ptr %25, i32 0, i32 5
  %39 = getelementptr inbounds %struct.VkExtent3D, ptr %38, i32 0, i32 2
  store i32 1, ptr %39, align 4, !tbaa !27
  %40 = getelementptr inbounds %struct.VkImageCreateInfo, ptr %25, i32 0, i32 6
  store i32 1, ptr %40, align 8, !tbaa !28
  %41 = load i32, ptr %24, align 4, !tbaa !9
  %42 = getelementptr inbounds %struct.VkImageCreateInfo, ptr %25, i32 0, i32 7
  store i32 %41, ptr %42, align 4, !tbaa !29
  %43 = load i32, ptr %18, align 4, !tbaa !13
  %44 = getelementptr inbounds %struct.VkImageCreateInfo, ptr %25, i32 0, i32 4
  store i32 %43, ptr %44, align 8, !tbaa !30
  %45 = load i32, ptr %19, align 4, !tbaa !15
  %46 = getelementptr inbounds %struct.VkImageCreateInfo, ptr %25, i32 0, i32 9
  store i32 %45, ptr %46, align 4, !tbaa !31
  %47 = getelementptr inbounds %struct.VkImageCreateInfo, ptr %25, i32 0, i32 14
  store i32 0, ptr %47, align 8, !tbaa !32
  %48 = load i32, ptr %20, align 4, !tbaa !9
  %49 = getelementptr inbounds %struct.VkImageCreateInfo, ptr %25, i32 0, i32 10
  store i32 %48, ptr %49, align 8, !tbaa !33
  %50 = load i32, ptr %17, align 4, !tbaa !11
  %51 = getelementptr inbounds %struct.VkImageCreateInfo, ptr %25, i32 0, i32 8
  store i32 %50, ptr %51, align 8, !tbaa !34
  %52 = getelementptr inbounds %struct.VkImageCreateInfo, ptr %25, i32 0, i32 11
  store i32 0, ptr %52, align 4, !tbaa !35
  %53 = load ptr, ptr %14, align 8, !tbaa !5
  %54 = load ptr, ptr %22, align 8, !tbaa !5
  %55 = call i32 @vkCreateImage(ptr noundef %53, ptr noundef %25, ptr noundef null, ptr noundef %54)
  %56 = icmp ne i32 %55, 0
  br i1 %56, label %57, label %64

57:                                               ; preds = %12
  %58 = call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %58, ptr noundef @.str.3)
          to label %59 unwind label %60

59:                                               ; preds = %57
  call void @__cxa_throw(ptr %58, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #6
  unreachable

60:                                               ; preds = %57
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %26, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %27, align 4
  call void @__cxa_free_exception(ptr %58) #5
  br label %96

64:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 24, ptr %28) #5
  %65 = load ptr, ptr %14, align 8, !tbaa !5
  %66 = load ptr, ptr %22, align 8, !tbaa !5
  %67 = load ptr, ptr %66, align 8, !tbaa !5
  call void @vkGetImageMemoryRequirements(ptr noundef %65, ptr noundef %67, ptr noundef %28)
  call void @llvm.lifetime.start.p0(i64 32, ptr %29) #5
  call void @llvm.memset.p0.i64(ptr align 8 %29, i8 0, i64 32, i1 false)
  %68 = getelementptr inbounds %struct.VkMemoryAllocateInfo, ptr %29, i32 0, i32 0
  store i32 5, ptr %68, align 8, !tbaa !36
  %69 = getelementptr inbounds %struct.VkMemoryRequirements, ptr %28, i32 0, i32 0
  %70 = load i64, ptr %69, align 8, !tbaa !39
  %71 = getelementptr inbounds %struct.VkMemoryAllocateInfo, ptr %29, i32 0, i32 2
  store i64 %70, ptr %71, align 8, !tbaa !41
  %72 = load ptr, ptr %13, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.VkMemoryRequirements, ptr %28, i32 0, i32 2
  %74 = load i32, ptr %73, align 8, !tbaa !42
  %75 = load i32, ptr %21, align 4, !tbaa !9
  %76 = call noundef i32 @_ZN10VulkanUtil14findMemoryTypeEP18VkPhysicalDevice_Tjj(ptr noundef %72, i32 noundef %74, i32 noundef %75)
  %77 = getelementptr inbounds %struct.VkMemoryAllocateInfo, ptr %29, i32 0, i32 3
  store i32 %76, ptr %77, align 8, !tbaa !43
  %78 = load ptr, ptr %14, align 8, !tbaa !5
  %79 = load ptr, ptr %23, align 8, !tbaa !5
  %80 = call i32 @vkAllocateMemory(ptr noundef %78, ptr noundef %29, ptr noundef null, ptr noundef %79)
  %81 = icmp ne i32 %80, 0
  br i1 %81, label %82, label %89

82:                                               ; preds = %64
  %83 = call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %83, ptr noundef @.str.4)
          to label %84 unwind label %85

84:                                               ; preds = %82
  call void @__cxa_throw(ptr %83, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #6
  unreachable

85:                                               ; preds = %82
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %26, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %27, align 4
  call void @__cxa_free_exception(ptr %83) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #5
  br label %96

89:                                               ; preds = %64
  %90 = load ptr, ptr %14, align 8, !tbaa !5
  %91 = load ptr, ptr %22, align 8, !tbaa !5
  %92 = load ptr, ptr %91, align 8, !tbaa !5
  %93 = load ptr, ptr %23, align 8, !tbaa !5
  %94 = load ptr, ptr %93, align 8, !tbaa !5
  %95 = call i32 @vkBindImageMemory(ptr noundef %90, ptr noundef %92, ptr noundef %94, i64 noundef 0)
  call void @llvm.lifetime.end.p0(i64 32, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 88, ptr %25) #5
  ret void

96:                                               ; preds = %85, %60
  call void @llvm.lifetime.end.p0(i64 88, ptr %25) #5
  br label %97

97:                                               ; preds = %96
  %98 = load ptr, ptr %26, align 8
  %99 = load i32, ptr %27, align 4
  %100 = insertvalue { ptr, i32 } poison, ptr %98, 0
  %101 = insertvalue { ptr, i32 } %100, i32 %99, 1
  resume { ptr, i32 } %101
}

declare i32 @vkCreateImage(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare void @vkGetImageMemoryRequirements(ptr noundef, ptr noundef, ptr noundef) #2

declare i32 @vkBindImageMemory(ptr noundef, ptr noundef, ptr noundef, i64 noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "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 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 }
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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTS21VkSampleCountFlagBits", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"_ZTS8VkFormat", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"_ZTS13VkImageTiling", !7, i64 0}
!17 = !{!18, !19, i64 0}
!18 = !{!"_ZTS17VkImageCreateInfo", !19, i64 0, !6, i64 8, !10, i64 16, !20, i64 20, !14, i64 24, !21, i64 28, !10, i64 40, !10, i64 44, !12, i64 48, !16, i64 52, !10, i64 56, !22, i64 60, !10, i64 64, !6, i64 72, !23, i64 80}
!19 = !{!"_ZTS15VkStructureType", !7, i64 0}
!20 = !{!"_ZTS11VkImageType", !7, i64 0}
!21 = !{!"_ZTS10VkExtent3D", !10, i64 0, !10, i64 4, !10, i64 8}
!22 = !{!"_ZTS13VkSharingMode", !7, i64 0}
!23 = !{!"_ZTS13VkImageLayout", !7, i64 0}
!24 = !{!18, !20, i64 20}
!25 = !{!18, !10, i64 28}
!26 = !{!18, !10, i64 32}
!27 = !{!18, !10, i64 36}
!28 = !{!18, !10, i64 40}
!29 = !{!18, !10, i64 44}
!30 = !{!18, !14, i64 24}
!31 = !{!18, !16, i64 52}
!32 = !{!18, !23, i64 80}
!33 = !{!18, !10, i64 56}
!34 = !{!18, !12, i64 48}
!35 = !{!18, !22, i64 60}
!36 = !{!37, !19, i64 0}
!37 = !{!"_ZTS20VkMemoryAllocateInfo", !19, i64 0, !6, i64 8, !38, i64 16, !10, i64 24}
!38 = !{!"long", !7, i64 0}
!39 = !{!40, !38, i64 0}
!40 = !{!"_ZTS20VkMemoryRequirements", !38, i64 0, !38, i64 8, !10, i64 16}
!41 = !{!37, !38, i64 16}
!42 = !{!40, !10, i64 16}
!43 = !{!37, !10, 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.VkImageCreateInfo = type { i32, ptr, i32, i32, i32, %struct.VkExtent3D, i32, i32, i32, i32, i32, i32, i32, ptr, i32 }
%struct.VkExtent3D = type { i32, i32, i32 }
%struct.VkMemoryRequirements = type { i64, i64, i32 }
%struct.VkMemoryAllocateInfo = type { i32, ptr, i64, i32 }

@_ZTISt13runtime_error = external constant ptr
@.str.3 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [33 x i8], align 1

; 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

declare i32 @__gxx_personality_v0(...)

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 #3

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN10VulkanUtil14findMemoryTypeEP18VkPhysicalDevice_Tjj(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #4 align 2

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

declare i32 @vkAllocateMemory(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10VulkanUtil11createImageEP18VkPhysicalDevice_TP10VkDevice_Tjj21VkSampleCountFlagBits8VkFormat13VkImageTilingjjRP9VkImage_TRP16VkDeviceMemory_Tj(ptr noundef %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8, ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10, i32 noundef %11) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %13 = alloca %struct.VkImageCreateInfo, align 8
  %14 = alloca %struct.VkMemoryRequirements, align 8
  %15 = alloca %struct.VkMemoryAllocateInfo, align 8
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %13) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(88) %13, i8 0, i64 88, i1 false)
  store i32 14, ptr %13, align 8, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %13, i64 20
  store i32 1, ptr %16, align 4, !tbaa !19
  %17 = getelementptr inbounds i8, ptr %13, i64 28
  store i32 %2, ptr %17, align 4, !tbaa !20
  %18 = getelementptr inbounds i8, ptr %13, i64 32
  store i32 %3, ptr %18, align 8, !tbaa !21
  %19 = getelementptr inbounds i8, ptr %13, i64 36
  store i32 1, ptr %19, align 4, !tbaa !22
  %20 = getelementptr inbounds i8, ptr %13, i64 40
  store i32 1, ptr %20, align 8, !tbaa !23
  %21 = getelementptr inbounds i8, ptr %13, i64 44
  store i32 %11, ptr %21, align 4, !tbaa !24
  %22 = getelementptr inbounds i8, ptr %13, i64 24
  store i32 %5, ptr %22, align 8, !tbaa !25
  %23 = getelementptr inbounds i8, ptr %13, i64 52
  store i32 %6, ptr %23, align 4, !tbaa !26
  %24 = getelementptr inbounds i8, ptr %13, i64 56
  store i32 %7, ptr %24, align 8, !tbaa !27
  %25 = getelementptr inbounds i8, ptr %13, i64 48
  store i32 %4, ptr %25, align 8, !tbaa !28
  %26 = call i32 @vkCreateImage(ptr noundef %1, ptr noundef nonnull %13, ptr noundef null, ptr noundef nonnull %9)
  %.not = icmp eq i32 %26, 0
  br i1 %.not, label %32, label %27

27:                                               ; preds = %12
  %28 = call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull @.str.3)
          to label %29 unwind label %30

29:                                               ; preds = %27
  call void @__cxa_throw(ptr nonnull %28, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #6
  unreachable

30:                                               ; preds = %27
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %28) #5
  br label %50

32:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #5
  %33 = load ptr, ptr %9, align 8, !tbaa !29
  call void @vkGetImageMemoryRequirements(ptr noundef %1, ptr noundef %33, ptr noundef nonnull %14)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %15, i8 0, i64 32, i1 false)
  store i32 5, ptr %15, align 8, !tbaa !30
  %34 = load i64, ptr %14, align 8, !tbaa !33
  %35 = getelementptr inbounds i8, ptr %15, i64 16
  store i64 %34, ptr %35, align 8, !tbaa !35
  %36 = getelementptr inbounds i8, ptr %14, i64 16
  %37 = load i32, ptr %36, align 8, !tbaa !36
  %38 = call noundef i32 @_ZN10VulkanUtil14findMemoryTypeEP18VkPhysicalDevice_Tjj(ptr noundef %0, i32 noundef %37, i32 noundef %8)
  %39 = getelementptr inbounds i8, ptr %15, i64 24
  store i32 %38, ptr %39, align 8, !tbaa !37
  %40 = call i32 @vkAllocateMemory(ptr noundef %1, ptr noundef nonnull %15, ptr noundef null, ptr noundef nonnull %10)
  %.not20 = icmp eq i32 %40, 0
  br i1 %.not20, label %46, label %41

41:                                               ; preds = %32
  %42 = call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %42, ptr noundef nonnull @.str.4)
          to label %43 unwind label %44

43:                                               ; preds = %41
  call void @__cxa_throw(ptr nonnull %42, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #6
  unreachable

44:                                               ; preds = %41
  %45 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %42) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #5
  br label %50

46:                                               ; preds = %32
  %47 = load ptr, ptr %9, align 8, !tbaa !29
  %48 = load ptr, ptr %10, align 8, !tbaa !29
  %49 = call i32 @vkBindImageMemory(ptr noundef %1, ptr noundef %47, ptr noundef %48, i64 noundef 0)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %13) #5
  ret void

50:                                               ; preds = %44, %30
  %.pn = phi { ptr, i32 } [ %31, %30 ], [ %45, %44 ]
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %13) #5
  resume { ptr, i32 } %.pn
}

declare i32 @vkCreateImage(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @vkGetImageMemoryRequirements(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @vkBindImageMemory(ptr noundef, ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "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 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 }
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, !7, i64 0}
!6 = !{!"_ZTS17VkImageCreateInfo", !7, i64 0, !10, i64 8, !11, i64 16, !12, i64 20, !13, i64 24, !14, i64 28, !11, i64 40, !11, i64 44, !15, i64 48, !16, i64 52, !11, i64 56, !17, i64 60, !11, i64 64, !10, i64 72, !18, i64 80}
!7 = !{!"_ZTS15VkStructureType", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!"_ZTS11VkImageType", !8, i64 0}
!13 = !{!"_ZTS8VkFormat", !8, i64 0}
!14 = !{!"_ZTS10VkExtent3D", !11, i64 0, !11, i64 4, !11, i64 8}
!15 = !{!"_ZTS21VkSampleCountFlagBits", !8, i64 0}
!16 = !{!"_ZTS13VkImageTiling", !8, i64 0}
!17 = !{!"_ZTS13VkSharingMode", !8, i64 0}
!18 = !{!"_ZTS13VkImageLayout", !8, i64 0}
!19 = !{!6, !12, i64 20}
!20 = !{!6, !11, i64 28}
!21 = !{!6, !11, i64 32}
!22 = !{!6, !11, i64 36}
!23 = !{!6, !11, i64 40}
!24 = !{!6, !11, i64 44}
!25 = !{!6, !13, i64 24}
!26 = !{!6, !16, i64 52}
!27 = !{!6, !11, i64 56}
!28 = !{!6, !15, i64 48}
!29 = !{!10, !10, i64 0}
!30 = !{!31, !7, i64 0}
!31 = !{!"_ZTS20VkMemoryAllocateInfo", !7, i64 0, !10, i64 8, !32, i64 16, !11, i64 24}
!32 = !{!"long", !8, i64 0}
!33 = !{!34, !32, i64 0}
!34 = !{!"_ZTS20VkMemoryRequirements", !32, i64 0, !32, i64 8, !11, i64 16}
!35 = !{!31, !32, i64 16}
!36 = !{!34, !11, i64 16}
!37 = !{!31, !11, i64 24}


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