; LLVM IR from jrouwe/JoltPhysics :: TestFramework/Renderer/VK/RendererVK.ll (ZN10RendererVK16DestroySwapChainEv)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%class.RendererVK = type { %class.Renderer, ptr, ptr, ptr, %struct.VkPhysicalDeviceMemoryProperties, ptr, i32, i32, ptr, ptr, ptr, ptr, i8, %"class.JPH::Array", i32, %struct.VkExtent2D, %"class.JPH::Array.1", ptr, ptr, ptr, ptr, ptr, ptr, [2 x ptr], [2 x ptr], ptr, ptr, ptr, ptr, ptr, ptr, %"class.JPH::Array.4", i32, ptr, [2 x ptr], [2 x ptr], [2 x ptr], [2 x ptr], %"class.JPH::Ref", [2 x %"class.std::unique_ptr"], [2 x %"class.std::unique_ptr"], [2 x %"class.std::unique_ptr"], [2 x %"class.JPH::UnorderedMap"], %"class.JPH::UnorderedMap", %"class.JPH::UnorderedMap.9", i32, i32, i64, i64 }
%class.Renderer = type { ptr, ptr, float, i8, [11 x i8], %struct.CameraState, %"class.JPH::Vec3", %class.Frustum, %class.Frustum, i32, %"struct.Renderer::VertexShaderConstantBuffer", %"struct.Renderer::VertexShaderConstantBuffer", %"struct.Renderer::PixelShaderConstantBuffer" }
%struct.CameraState = type <{ %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", float, [12 x i8] }>
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%class.Frustum = type { [5 x %"class.JPH::Plane"] }
%"class.JPH::Plane" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.0 }
%union.anon.0 = type { <4 x float> }
%"struct.Renderer::VertexShaderConstantBuffer" = type { %"class.JPH::Mat44", %"class.JPH::Mat44", %"class.JPH::Mat44", %"class.JPH::Mat44" }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"struct.Renderer::PixelShaderConstantBuffer" = type { %"class.JPH::Vec4", %"class.JPH::Vec4" }
%struct.VkPhysicalDeviceMemoryProperties = type { i32, [32 x %struct.VkMemoryType], i32, [16 x %struct.VkMemoryHeap] }
%struct.VkMemoryType = type { i32, i32 }
%struct.VkMemoryHeap = type { i64, i32 }
%"class.JPH::Array" = type { i64, i64, ptr }
%struct.VkExtent2D = type { i32, i32 }
%"class.JPH::Array.1" = type { i64, i64, ptr }
%"class.JPH::Array.4" = type { i64, i64, ptr }
%"class.JPH::Ref" = type { ptr }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.8" }
%"struct.std::_Head_base.8" = type { ptr }
%"class.JPH::UnorderedMap" = type { %"class.JPH::HashTable.base", [4 x i8] }
%"class.JPH::HashTable.base" = type <{ ptr, ptr, i32, i32, i32 }>
%"class.JPH::UnorderedMap.9" = type { %"class.JPH::HashTable.base.11", [4 x i8] }
%"class.JPH::HashTable.base.11" = type <{ ptr, ptr, i32, i32, i32 }>

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

declare void @vkDestroyFramebuffer(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10RendererVK16DestroySwapChainEv(ptr noundef nonnull align 16 dereferenceable(1936) %0) #2 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %11 = load ptr, ptr %2, align 8
  %12 = getelementptr inbounds %class.RendererVK, ptr %11, i32 0, i32 19
  %13 = load ptr, ptr %12, align 8, !tbaa !9
  %14 = icmp ne ptr %13, null
  br i1 %14, label %15, label %24

15:                                               ; preds = %1
  %16 = getelementptr inbounds %class.RendererVK, ptr %11, i32 0, i32 5
  %17 = load ptr, ptr %16, align 16, !tbaa !34
  %18 = getelementptr inbounds %class.RendererVK, ptr %11, i32 0, i32 19
  %19 = load ptr, ptr %18, align 8, !tbaa !9
  call void @vkDestroyImageView(ptr noundef %17, ptr noundef %19, ptr noundef null)
  %20 = getelementptr inbounds %class.RendererVK, ptr %11, i32 0, i32 17
  %21 = load ptr, ptr %20, align 8, !tbaa !35
  %22 = getelementptr inbounds %class.RendererVK, ptr %11, i32 0, i32 18
  %23 = load ptr, ptr %22, align 16, !tbaa !36
  call void @_ZN10RendererVK12DestroyImageEP9VkImage_TP16VkDeviceMemory_T(ptr noundef nonnull align 16 dereferenceable(1936) %11, ptr noundef %21, ptr noundef %23)
  br label %24

24:                                               ; preds = %15, %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  %25 = getelementptr inbounds %class.RendererVK, ptr %11, i32 0, i32 31
  store ptr %25, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = call noundef ptr @_ZN3JPH5ArrayIP15VkFramebuffer_TNS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %26)
  store ptr %27, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = call noundef ptr @_ZN3JPH5ArrayIP15VkFramebuffer_TNS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %28)
  store ptr %29, ptr %5, align 8, !tbaa !5
  br label %30

30:                                               ; preds = %41, %24
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = icmp ne ptr %31, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  br label %44

35:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = load ptr, ptr %36, align 8, !tbaa !5
  store ptr %37, ptr %6, align 8, !tbaa !5
  %38 = getelementptr inbounds %class.RendererVK, ptr %11, i32 0, i32 5
  %39 = load ptr, ptr %38, align 16, !tbaa !34
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  call void @vkDestroyFramebuffer(ptr noundef %39, ptr noundef %40, ptr noundef null)
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  br label %41

41:                                               ; preds = %35
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = getelementptr inbounds ptr, ptr %42, i32 1
  store ptr %43, ptr %4, align 8, !tbaa !5
  br label %30

44:                                               ; preds = %34
  %45 = getelementptr inbounds %class.RendererVK, ptr %11, i32 0, i32 31
  call void @_ZN3JPH5ArrayIP15VkFramebuffer_TNS_12STLAllocatorIS2_EEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %45)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %46 = getelementptr inbounds %class.RendererVK, ptr %11, i32 0, i32 16
  store ptr %46, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  %48 = call noundef ptr @_ZN3JPH5ArrayIP13VkImageView_TNS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %47)
  store ptr %48, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = call noundef ptr @_ZN3JPH5ArrayIP13VkImageView_TNS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %49)
  store ptr %50, ptr %9, align 8, !tbaa !5
  br label %51

51:                                               ; preds = %62, %44
  %52 = load ptr, ptr %8, align 8, !tbaa !5
  %53 = load ptr, ptr %9, align 8, !tbaa !5
  %54 = icmp ne ptr %52, %53
  br i1 %54, label %56, label %55

55:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %65

56:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = load ptr, ptr %57, align 8, !tbaa !5
  store ptr %58, ptr %10, align 8, !tbaa !5
  %59 = getelementptr inbounds %class.RendererVK, ptr %11, i32 0, i32 5
  %60 = load ptr, ptr %59, align 16, !tbaa !34
  %61 = load ptr, ptr %10, align 8, !tbaa !5
  call void @vkDestroyImageView(ptr noundef %60, ptr noundef %61, ptr noundef null)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %62

62:                                               ; preds = %56
  %63 = load ptr, ptr %8, align 8, !tbaa !5
  %64 = getelementptr inbounds ptr, ptr %63, i32 1
  store ptr %64, ptr %8, align 8, !tbaa !5
  br label %51

65:                                               ; preds = %55
  %66 = getelementptr inbounds %class.RendererVK, ptr %11, i32 0, i32 16
  call void @_ZN3JPH5ArrayIP13VkImageView_TNS_12STLAllocatorIS2_EEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %66)
  %67 = getelementptr inbounds %class.RendererVK, ptr %11, i32 0, i32 11
  %68 = load ptr, ptr %67, align 8, !tbaa !37
  %69 = icmp ne ptr %68, null
  br i1 %69, label %70, label %76

70:                                               ; preds = %65
  %71 = getelementptr inbounds %class.RendererVK, ptr %11, i32 0, i32 5
  %72 = load ptr, ptr %71, align 16, !tbaa !34
  %73 = getelementptr inbounds %class.RendererVK, ptr %11, i32 0, i32 11
  %74 = load ptr, ptr %73, align 8, !tbaa !37
  call void @vkDestroySwapchainKHR(ptr noundef %72, ptr noundef %74, ptr noundef null)
  %75 = getelementptr inbounds %class.RendererVK, ptr %11, i32 0, i32 11
  store ptr null, ptr %75, align 8, !tbaa !37
  br label %76

76:                                               ; preds = %70, %65
  ret void
}

declare void @vkDestroyImageView(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10RendererVK12DestroyImageEP9VkImage_TP16VkDeviceMemory_T(ptr noundef nonnull align 16 dereferenceable(1936), ptr noundef, ptr noundef) #2 align 2

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

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

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

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

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

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

declare void @vkDestroySwapchainKHR(ptr noundef, ptr noundef, ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 1512}
!10 = !{!"_ZTS10RendererVK", !11, i64 0, !6, i64 832, !6, i64 840, !6, i64 848, !22, i64 856, !6, i64 1376, !17, i64 1384, !17, i64 1388, !6, i64 1392, !6, i64 1400, !6, i64 1408, !6, i64 1416, !13, i64 1424, !23, i64 1432, !25, i64 1456, !26, i64 1460, !27, i64 1472, !6, i64 1496, !6, i64 1504, !6, i64 1512, !6, i64 1520, !6, i64 1528, !6, i64 1536, !7, i64 1544, !7, i64 1560, !6, i64 1576, !6, i64 1584, !6, i64 1592, !6, i64 1600, !6, i64 1608, !6, i64 1616, !28, i64 1624, !17, i64 1648, !6, i64 1656, !7, i64 1664, !7, i64 1680, !7, i64 1696, !7, i64 1712, !29, i64 1728, !7, i64 1736, !7, i64 1752, !7, i64 1768, !7, i64 1784, !30, i64 1848, !32, i64 1880, !17, i64 1912, !17, i64 1916, !24, i64 1920, !24, i64 1928}
!11 = !{!"_ZTS8Renderer", !6, i64 8, !12, i64 16, !13, i64 20, !14, i64 32, !15, i64 96, !16, i64 112, !16, i64 192, !17, i64 272, !18, i64 288, !18, i64 544, !20, i64 800}
!12 = !{!"float", !7, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTS11CameraState", !15, i64 0, !15, i64 16, !15, i64 32, !12, i64 48}
!15 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!16 = !{!"_ZTS7Frustum", !7, i64 0}
!17 = !{!"int", !7, i64 0}
!18 = !{!"_ZTSN8Renderer26VertexShaderConstantBufferE", !19, i64 0, !19, i64 64, !19, i64 128, !19, i64 192}
!19 = !{!"_ZTSN3JPH5Mat44E", !7, i64 0}
!20 = !{!"_ZTSN8Renderer25PixelShaderConstantBufferE", !21, i64 0, !21, i64 16}
!21 = !{!"_ZTSN3JPH4Vec4E", !7, i64 0}
!22 = !{!"_ZTS32VkPhysicalDeviceMemoryProperties", !17, i64 0, !7, i64 4, !17, i64 260, !7, i64 264}
!23 = !{!"_ZTSN3JPH5ArrayIP9VkImage_TNS_12STLAllocatorIS2_EEEE", !24, i64 0, !24, i64 8, !6, i64 16}
!24 = !{!"long", !7, i64 0}
!25 = !{!"_ZTS8VkFormat", !7, i64 0}
!26 = !{!"_ZTS10VkExtent2D", !17, i64 0, !17, i64 4}
!27 = !{!"_ZTSN3JPH5ArrayIP13VkImageView_TNS_12STLAllocatorIS2_EEEE", !24, i64 0, !24, i64 8, !6, i64 16}
!28 = !{!"_ZTSN3JPH5ArrayIP15VkFramebuffer_TNS_12STLAllocatorIS2_EEEE", !24, i64 0, !24, i64 8, !6, i64 16}
!29 = !{!"_ZTSN3JPH3RefI9TextureVKEE", !6, i64 0}
!30 = !{!"_ZTSN3JPH12UnorderedMapIN10RendererVK3KeyENS_5ArrayI8BufferVKNS_12STLAllocatorIS4_EEEENS1_9KeyHasherESt8equal_toIS2_EEE", !31, i64 0}
!31 = !{!"_ZTSN3JPH9HashTableIN10RendererVK3KeyESt4pairIS2_NS_5ArrayI8BufferVKNS_12STLAllocatorIS5_EEEEENS_18UnorderedMapDetailIS2_S8_EENS1_9KeyHasherESt8equal_toIS2_EEE", !6, i64 0, !6, i64 8, !17, i64 16, !17, i64 20, !17, i64 24}
!32 = !{!"_ZTSN3JPH12UnorderedMapIN10RendererVK3KeyENS_5ArrayINS1_6MemoryENS_12STLAllocatorIS4_EEEENS1_9KeyHasherESt8equal_toIS2_EEE", !33, i64 0}
!33 = !{!"_ZTSN3JPH9HashTableIN10RendererVK3KeyESt4pairIS2_NS_5ArrayINS1_6MemoryENS_12STLAllocatorIS5_EEEEENS_18UnorderedMapDetailIS2_S8_EENS1_9KeyHasherESt8equal_toIS2_EEE", !6, i64 0, !6, i64 8, !17, i64 16, !17, i64 20, !17, i64 24}
!34 = !{!10, !6, i64 1376}
!35 = !{!10, !6, i64 1496}
!36 = !{!10, !6, i64 1504}
!37 = !{!10, !6, i64 1416}


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

declare void @vkDestroyFramebuffer(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10RendererVK16DestroySwapChainEv(ptr noundef nonnull align 16 dereferenceable(1936) %0) local_unnamed_addr #1 align 2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 1512
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %.not = icmp eq ptr %3, null
  br i1 %.not, label %11, label %4

4:                                                ; preds = %1
  %5 = getelementptr inbounds i8, ptr %0, i64 1376
  %6 = load ptr, ptr %5, align 16, !tbaa !33
  tail call void @vkDestroyImageView(ptr noundef %6, ptr noundef nonnull %3, ptr noundef null)
  %7 = getelementptr inbounds i8, ptr %0, i64 1496
  %8 = load ptr, ptr %7, align 8, !tbaa !34
  %9 = getelementptr inbounds i8, ptr %0, i64 1504
  %10 = load ptr, ptr %9, align 16, !tbaa !35
  tail call void @_ZN10RendererVK12DestroyImageEP9VkImage_TP16VkDeviceMemory_T(ptr noundef nonnull align 16 dereferenceable(1936) %0, ptr noundef %8, ptr noundef %10)
  br label %11

11:                                               ; preds = %4, %1
  %12 = getelementptr inbounds i8, ptr %0, i64 1624
  %13 = tail call noundef ptr @_ZN3JPH5ArrayIP15VkFramebuffer_TNS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  %14 = tail call noundef ptr @_ZN3JPH5ArrayIP15VkFramebuffer_TNS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  %.not1821 = icmp eq ptr %13, %14
  br i1 %.not1821, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %11
  %15 = getelementptr inbounds i8, ptr %0, i64 1376
  br label %20

._crit_edge:                                      ; preds = %20, %11
  tail call void @_ZN3JPH5ArrayIP15VkFramebuffer_TNS_12STLAllocatorIS2_EEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  %16 = getelementptr inbounds i8, ptr %0, i64 1472
  %17 = tail call noundef ptr @_ZN3JPH5ArrayIP13VkImageView_TNS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %16)
  %18 = tail call noundef ptr @_ZN3JPH5ArrayIP13VkImageView_TNS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %16)
  %.not1923 = icmp eq ptr %17, %18
  br i1 %.not1923, label %._crit_edge27, label %.lr.ph26

.lr.ph26:                                         ; preds = %._crit_edge
  %19 = getelementptr inbounds i8, ptr %0, i64 1376
  br label %26

20:                                               ; preds = %.lr.ph, %20
  %.022 = phi ptr [ %13, %.lr.ph ], [ %23, %20 ]
  %21 = load ptr, ptr %.022, align 8, !tbaa !36
  %22 = load ptr, ptr %15, align 16, !tbaa !33
  tail call void @vkDestroyFramebuffer(ptr noundef %22, ptr noundef %21, ptr noundef null)
  %23 = getelementptr inbounds i8, ptr %.022, i64 8
  %.not18 = icmp eq ptr %23, %14
  br i1 %.not18, label %._crit_edge, label %20

._crit_edge27:                                    ; preds = %26, %._crit_edge
  tail call void @_ZN3JPH5ArrayIP13VkImageView_TNS_12STLAllocatorIS2_EEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %16)
  %24 = getelementptr inbounds i8, ptr %0, i64 1416
  %25 = load ptr, ptr %24, align 8, !tbaa !37
  %.not20 = icmp eq ptr %25, null
  br i1 %.not20, label %33, label %30

26:                                               ; preds = %.lr.ph26, %26
  %.01524 = phi ptr [ %17, %.lr.ph26 ], [ %29, %26 ]
  %27 = load ptr, ptr %.01524, align 8, !tbaa !36
  %28 = load ptr, ptr %19, align 16, !tbaa !33
  tail call void @vkDestroyImageView(ptr noundef %28, ptr noundef %27, ptr noundef null)
  %29 = getelementptr inbounds i8, ptr %.01524, i64 8
  %.not19 = icmp eq ptr %29, %18
  br i1 %.not19, label %._crit_edge27, label %26

30:                                               ; preds = %._crit_edge27
  %31 = getelementptr inbounds i8, ptr %0, i64 1376
  %32 = load ptr, ptr %31, align 16, !tbaa !33
  tail call void @vkDestroySwapchainKHR(ptr noundef %32, ptr noundef nonnull %25, ptr noundef null)
  store ptr null, ptr %24, align 8, !tbaa !37
  br label %33

33:                                               ; preds = %30, %._crit_edge27
  ret void
}

declare void @vkDestroyImageView(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10RendererVK12DestroyImageEP9VkImage_TP16VkDeviceMemory_T(ptr noundef nonnull align 16 dereferenceable(1936), ptr noundef, ptr noundef) local_unnamed_addr #1 align 2

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

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

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

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

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

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

declare void @vkDestroySwapchainKHR(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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" }

!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, !8, i64 1512}
!6 = !{!"_ZTS10RendererVK", !7, i64 0, !8, i64 832, !8, i64 840, !8, i64 848, !21, i64 856, !8, i64 1376, !16, i64 1384, !16, i64 1388, !8, i64 1392, !8, i64 1400, !8, i64 1408, !8, i64 1416, !12, i64 1424, !22, i64 1432, !24, i64 1456, !25, i64 1460, !26, i64 1472, !8, i64 1496, !8, i64 1504, !8, i64 1512, !8, i64 1520, !8, i64 1528, !8, i64 1536, !9, i64 1544, !9, i64 1560, !8, i64 1576, !8, i64 1584, !8, i64 1592, !8, i64 1600, !8, i64 1608, !8, i64 1616, !27, i64 1624, !16, i64 1648, !8, i64 1656, !9, i64 1664, !9, i64 1680, !9, i64 1696, !9, i64 1712, !28, i64 1728, !9, i64 1736, !9, i64 1752, !9, i64 1768, !9, i64 1784, !29, i64 1848, !31, i64 1880, !16, i64 1912, !16, i64 1916, !23, i64 1920, !23, i64 1928}
!7 = !{!"_ZTS8Renderer", !8, i64 8, !11, i64 16, !12, i64 20, !13, i64 32, !14, i64 96, !15, i64 112, !15, i64 192, !16, i64 272, !17, i64 288, !17, i64 544, !19, i64 800}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"float", !9, i64 0}
!12 = !{!"bool", !9, i64 0}
!13 = !{!"_ZTS11CameraState", !14, i64 0, !14, i64 16, !14, i64 32, !11, i64 48}
!14 = !{!"_ZTSN3JPH4Vec3E", !9, i64 0}
!15 = !{!"_ZTS7Frustum", !9, i64 0}
!16 = !{!"int", !9, i64 0}
!17 = !{!"_ZTSN8Renderer26VertexShaderConstantBufferE", !18, i64 0, !18, i64 64, !18, i64 128, !18, i64 192}
!18 = !{!"_ZTSN3JPH5Mat44E", !9, i64 0}
!19 = !{!"_ZTSN8Renderer25PixelShaderConstantBufferE", !20, i64 0, !20, i64 16}
!20 = !{!"_ZTSN3JPH4Vec4E", !9, i64 0}
!21 = !{!"_ZTS32VkPhysicalDeviceMemoryProperties", !16, i64 0, !9, i64 4, !16, i64 260, !9, i64 264}
!22 = !{!"_ZTSN3JPH5ArrayIP9VkImage_TNS_12STLAllocatorIS2_EEEE", !23, i64 0, !23, i64 8, !8, i64 16}
!23 = !{!"long", !9, i64 0}
!24 = !{!"_ZTS8VkFormat", !9, i64 0}
!25 = !{!"_ZTS10VkExtent2D", !16, i64 0, !16, i64 4}
!26 = !{!"_ZTSN3JPH5ArrayIP13VkImageView_TNS_12STLAllocatorIS2_EEEE", !23, i64 0, !23, i64 8, !8, i64 16}
!27 = !{!"_ZTSN3JPH5ArrayIP15VkFramebuffer_TNS_12STLAllocatorIS2_EEEE", !23, i64 0, !23, i64 8, !8, i64 16}
!28 = !{!"_ZTSN3JPH3RefI9TextureVKEE", !8, i64 0}
!29 = !{!"_ZTSN3JPH12UnorderedMapIN10RendererVK3KeyENS_5ArrayI8BufferVKNS_12STLAllocatorIS4_EEEENS1_9KeyHasherESt8equal_toIS2_EEE", !30, i64 0}
!30 = !{!"_ZTSN3JPH9HashTableIN10RendererVK3KeyESt4pairIS2_NS_5ArrayI8BufferVKNS_12STLAllocatorIS5_EEEEENS_18UnorderedMapDetailIS2_S8_EENS1_9KeyHasherESt8equal_toIS2_EEE", !8, i64 0, !8, i64 8, !16, i64 16, !16, i64 20, !16, i64 24}
!31 = !{!"_ZTSN3JPH12UnorderedMapIN10RendererVK3KeyENS_5ArrayINS1_6MemoryENS_12STLAllocatorIS4_EEEENS1_9KeyHasherESt8equal_toIS2_EEE", !32, i64 0}
!32 = !{!"_ZTSN3JPH9HashTableIN10RendererVK3KeyESt4pairIS2_NS_5ArrayINS1_6MemoryENS_12STLAllocatorIS5_EEEEENS_18UnorderedMapDetailIS2_S8_EENS1_9KeyHasherESt8equal_toIS2_EEE", !8, i64 0, !8, i64 8, !16, i64 16, !16, i64 20, !16, i64 24}
!33 = !{!6, !8, i64 1376}
!34 = !{!6, !8, i64 1496}
!35 = !{!6, !8, i64 1504}
!36 = !{!8, !8, i64 0}
!37 = !{!6, !8, i64 1416}


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