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

; 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.VkSurfaceFormatKHR = type { i32, i32 }
%struct.VkSurfaceCapabilitiesKHR = type { i32, i32, %struct.VkExtent2D, %struct.VkExtent2D, %struct.VkExtent2D, i32, i32, i32, i32, i32 }
%struct.VkExtent2D = type { i32, i32 }
%struct.VkSwapchainCreateInfoKHR = type { i32, ptr, i32, ptr, i32, i32, i32, %struct.VkExtent2D, i32, i32, i32, i32, ptr, i32, i32, i32, i32, ptr }
%struct.VkImageFormatProperties = type { %struct.VkExtent3D, i32, i32, i32, i64 }
%struct.VkExtent3D = type { i32, i32, i32 }
%struct.VkFramebufferCreateInfo = type { i32, ptr, i32, ptr, i32, ptr, i32, i32, i32 }
%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 }
%"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 @_Z18FatalErrorIfFailed8VkResult(i32 noundef) #1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN10RendererVK15FindDepthFormatEv(ptr noundef nonnull align 16 dereferenceable(1936)) #4 align 2

declare i32 @vkCreateFramebuffer(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10RendererVK15CreateSwapChainEP18VkPhysicalDevice_T(ptr noundef nonnull align 16 dereferenceable(1936) %0, ptr noundef %1) #4 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %struct.VkSurfaceFormatKHR, align 4
  %6 = alloca %struct.VkSurfaceCapabilitiesKHR, align 4
  %7 = alloca %struct.VkExtent2D, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %struct.VkSwapchainCreateInfoKHR, align 8
  %12 = alloca [2 x i32], align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %struct.VkImageFormatProperties, align 8
  %19 = alloca i32, align 4
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca [2 x ptr], align 16
  %23 = alloca %struct.VkFramebufferCreateInfo, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %24 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #9
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = call i64 @_ZN10RendererVK12SelectFormatEP18VkPhysicalDevice_T(ptr noundef nonnull align 16 dereferenceable(1936) %24, ptr noundef %25)
  store i64 %26, ptr %5, align 4
  %27 = getelementptr inbounds %struct.VkSurfaceFormatKHR, ptr %5, i32 0, i32 0
  %28 = load i32, ptr %27, align 4, !tbaa !9
  %29 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 14
  store i32 %28, ptr %29, align 16, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 52, ptr %6) #9
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 10
  %32 = load ptr, ptr %31, align 16, !tbaa !37
  %33 = call i32 @vkGetPhysicalDeviceSurfaceCapabilitiesKHR(ptr noundef %30, ptr noundef %32, ptr noundef %6)
  %34 = getelementptr inbounds %struct.VkSurfaceCapabilitiesKHR, ptr %6, i32 0, i32 2
  %35 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 15
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %35, ptr align 4 %34, i64 8, i1 false), !tbaa.struct !38
  %36 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 15
  %37 = getelementptr inbounds %struct.VkExtent2D, ptr %36, i32 0, i32 0
  %38 = load i32, ptr %37, align 4, !tbaa !40
  %39 = icmp eq i32 %38, -1
  br i1 %39, label %45, label %40

40:                                               ; preds = %2
  %41 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 15
  %42 = getelementptr inbounds %struct.VkExtent2D, ptr %41, i32 0, i32 1
  %43 = load i32, ptr %42, align 4, !tbaa !41
  %44 = icmp eq i32 %43, -1
  br i1 %44, label %45, label %55

45:                                               ; preds = %40, %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #9
  %46 = getelementptr inbounds %struct.VkExtent2D, ptr %7, i32 0, i32 0
  %47 = getelementptr inbounds %class.Renderer, ptr %24, i32 0, i32 1
  %48 = load ptr, ptr %47, align 8, !tbaa !42
  %49 = call noundef i32 @_ZN17ApplicationWindow14GetWindowWidthEv(ptr noundef nonnull align 8 dereferenceable(48) %48)
  store i32 %49, ptr %46, align 4, !tbaa !43
  %50 = getelementptr inbounds %struct.VkExtent2D, ptr %7, i32 0, i32 1
  %51 = getelementptr inbounds %class.Renderer, ptr %24, i32 0, i32 1
  %52 = load ptr, ptr %51, align 8, !tbaa !42
  %53 = call noundef i32 @_ZN17ApplicationWindow15GetWindowHeightEv(ptr noundef nonnull align 8 dereferenceable(48) %52)
  store i32 %53, ptr %50, align 4, !tbaa !44
  %54 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 15
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %54, ptr align 4 %7, i64 8, i1 false), !tbaa.struct !38
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  br label %55

55:                                               ; preds = %45, %40
  %56 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 15
  %57 = getelementptr inbounds %struct.VkExtent2D, ptr %56, i32 0, i32 0
  %58 = load i32, ptr %57, align 4, !tbaa !40
  %59 = getelementptr inbounds %struct.VkSurfaceCapabilitiesKHR, ptr %6, i32 0, i32 3
  %60 = getelementptr inbounds %struct.VkExtent2D, ptr %59, i32 0, i32 0
  %61 = load i32, ptr %60, align 4, !tbaa !45
  %62 = getelementptr inbounds %struct.VkSurfaceCapabilitiesKHR, ptr %6, i32 0, i32 4
  %63 = getelementptr inbounds %struct.VkExtent2D, ptr %62, i32 0, i32 0
  %64 = load i32, ptr %63, align 4, !tbaa !48
  %65 = call noundef i32 @_ZN3JPH5ClampIjEET_S1_S1_S1_(i32 noundef %58, i32 noundef %61, i32 noundef %64)
  %66 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 15
  %67 = getelementptr inbounds %struct.VkExtent2D, ptr %66, i32 0, i32 0
  store i32 %65, ptr %67, align 4, !tbaa !40
  %68 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 15
  %69 = getelementptr inbounds %struct.VkExtent2D, ptr %68, i32 0, i32 1
  %70 = load i32, ptr %69, align 4, !tbaa !41
  %71 = getelementptr inbounds %struct.VkSurfaceCapabilitiesKHR, ptr %6, i32 0, i32 3
  %72 = getelementptr inbounds %struct.VkExtent2D, ptr %71, i32 0, i32 1
  %73 = load i32, ptr %72, align 4, !tbaa !49
  %74 = getelementptr inbounds %struct.VkSurfaceCapabilitiesKHR, ptr %6, i32 0, i32 4
  %75 = getelementptr inbounds %struct.VkExtent2D, ptr %74, i32 0, i32 1
  %76 = load i32, ptr %75, align 4, !tbaa !50
  %77 = call noundef i32 @_ZN3JPH5ClampIjEET_S1_S1_S1_(i32 noundef %70, i32 noundef %73, i32 noundef %76)
  %78 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 15
  %79 = getelementptr inbounds %struct.VkExtent2D, ptr %78, i32 0, i32 1
  store i32 %77, ptr %79, align 4, !tbaa !41
  %80 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 15
  %81 = getelementptr inbounds %struct.VkExtent2D, ptr %80, i32 0, i32 0
  %82 = load i32, ptr %81, align 4, !tbaa !40
  %83 = icmp eq i32 %82, 0
  br i1 %83, label %89, label %84

84:                                               ; preds = %55
  %85 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 15
  %86 = getelementptr inbounds %struct.VkExtent2D, ptr %85, i32 0, i32 1
  %87 = load i32, ptr %86, align 4, !tbaa !41
  %88 = icmp eq i32 %87, 0
  br i1 %88, label %89, label %90

89:                                               ; preds = %84, %55
  store i32 1, ptr %8, align 4
  br label %282

90:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  %91 = getelementptr inbounds %struct.VkSurfaceCapabilitiesKHR, ptr %6, i32 0, i32 0
  %92 = load i32, ptr %91, align 4, !tbaa !51
  %93 = add i32 %92, 1
  store i32 %93, ptr %10, align 4, !tbaa !39
  %94 = getelementptr inbounds %struct.VkSurfaceCapabilitiesKHR, ptr %6, i32 0, i32 1
  %95 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %94)
  %96 = getelementptr inbounds %struct.VkSurfaceCapabilitiesKHR, ptr %6, i32 0, i32 0
  %97 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %95, ptr noundef nonnull align 4 dereferenceable(4) %96)
  %98 = load i32, ptr %97, align 4, !tbaa !39
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  store i32 %98, ptr %9, align 4, !tbaa !39
  call void @llvm.lifetime.start.p0(i64 104, ptr %11) #9
  call void @llvm.memset.p0.i64(ptr align 8 %11, i8 0, i64 104, i1 false)
  %99 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %11, i32 0, i32 0
  store i32 1000001000, ptr %99, align 8, !tbaa !52
  %100 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 10
  %101 = load ptr, ptr %100, align 16, !tbaa !37
  %102 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %11, i32 0, i32 3
  store ptr %101, ptr %102, align 8, !tbaa !58
  %103 = load i32, ptr %9, align 4, !tbaa !39
  %104 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %11, i32 0, i32 4
  store i32 %103, ptr %104, align 8, !tbaa !59
  %105 = getelementptr inbounds %struct.VkSurfaceFormatKHR, ptr %5, i32 0, i32 0
  %106 = load i32, ptr %105, align 4, !tbaa !9
  %107 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %11, i32 0, i32 5
  store i32 %106, ptr %107, align 4, !tbaa !60
  %108 = getelementptr inbounds %struct.VkSurfaceFormatKHR, ptr %5, i32 0, i32 1
  %109 = load i32, ptr %108, align 4, !tbaa !61
  %110 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %11, i32 0, i32 6
  store i32 %109, ptr %110, align 8, !tbaa !62
  %111 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 15
  %112 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %11, i32 0, i32 7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %112, ptr align 4 %111, i64 8, i1 false), !tbaa.struct !38
  %113 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %11, i32 0, i32 8
  store i32 1, ptr %113, align 4, !tbaa !63
  %114 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %11, i32 0, i32 9
  store i32 16, ptr %114, align 8, !tbaa !64
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  %115 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 6
  %116 = load i32, ptr %115, align 8, !tbaa !65
  store i32 %116, ptr %12, align 4, !tbaa !39
  %117 = getelementptr inbounds i32, ptr %12, i64 1
  %118 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 7
  %119 = load i32, ptr %118, align 4, !tbaa !66
  store i32 %119, ptr %117, align 4, !tbaa !39
  %120 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 6
  %121 = load i32, ptr %120, align 8, !tbaa !65
  %122 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 7
  %123 = load i32, ptr %122, align 4, !tbaa !66
  %124 = icmp ne i32 %121, %123
  br i1 %124, label %125, label %130

125:                                              ; preds = %90
  %126 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %11, i32 0, i32 10
  store i32 1, ptr %126, align 4, !tbaa !67
  %127 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %11, i32 0, i32 11
  store i32 2, ptr %127, align 8, !tbaa !68
  %128 = getelementptr inbounds [2 x i32], ptr %12, i64 0, i64 0
  %129 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %11, i32 0, i32 12
  store ptr %128, ptr %129, align 8, !tbaa !69
  br label %132

130:                                              ; preds = %90
  %131 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %11, i32 0, i32 10
  store i32 0, ptr %131, align 4, !tbaa !67
  br label %132

132:                                              ; preds = %130, %125
  %133 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %11, i32 0, i32 10
  store i32 0, ptr %133, align 4, !tbaa !67
  %134 = getelementptr inbounds %struct.VkSurfaceCapabilitiesKHR, ptr %6, i32 0, i32 7
  %135 = load i32, ptr %134, align 4, !tbaa !70
  %136 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %11, i32 0, i32 13
  store i32 %135, ptr %136, align 8, !tbaa !71
  %137 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %11, i32 0, i32 14
  store i32 1, ptr %137, align 4, !tbaa !72
  %138 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %11, i32 0, i32 15
  store i32 2, ptr %138, align 8, !tbaa !73
  %139 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %11, i32 0, i32 16
  store i32 1, ptr %139, align 4, !tbaa !74
  %140 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 5
  %141 = load ptr, ptr %140, align 16, !tbaa !75
  %142 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 11
  %143 = call i32 @vkCreateSwapchainKHR(ptr noundef %141, ptr noundef %11, ptr noundef null, ptr noundef %142)
  call void @_Z18FatalErrorIfFailed8VkResult(i32 noundef %143)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  %144 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 5
  %145 = load ptr, ptr %144, align 16, !tbaa !75
  %146 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 11
  %147 = load ptr, ptr %146, align 8, !tbaa !76
  %148 = call i32 @vkGetSwapchainImagesKHR(ptr noundef %145, ptr noundef %147, ptr noundef %13, ptr noundef null)
  call void @_Z18FatalErrorIfFailed8VkResult(i32 noundef %148)
  %149 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 13
  %150 = load i32, ptr %13, align 4, !tbaa !39
  %151 = zext i32 %150 to i64
  call void @_ZN3JPH5ArrayIP9VkImage_TNS_12STLAllocatorIS2_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %149, i64 noundef %151)
  %152 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 5
  %153 = load ptr, ptr %152, align 16, !tbaa !75
  %154 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 11
  %155 = load ptr, ptr %154, align 8, !tbaa !76
  %156 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 13
  %157 = call noundef ptr @_ZN3JPH5ArrayIP9VkImage_TNS_12STLAllocatorIS2_EEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %156)
  %158 = call i32 @vkGetSwapchainImagesKHR(ptr noundef %153, ptr noundef %155, ptr noundef %13, ptr noundef %157)
  call void @_Z18FatalErrorIfFailed8VkResult(i32 noundef %158)
  %159 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 16
  %160 = load i32, ptr %13, align 4, !tbaa !39
  %161 = zext i32 %160 to i64
  call void @_ZN3JPH5ArrayIP13VkImageView_TNS_12STLAllocatorIS2_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %159, i64 noundef %161)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #9
  store i32 0, ptr %14, align 4, !tbaa !39
  br label %162

162:                                              ; preds = %180, %132
  %163 = load i32, ptr %14, align 4, !tbaa !39
  %164 = load i32, ptr %13, align 4, !tbaa !39
  %165 = icmp ult i32 %163, %164
  br i1 %165, label %167, label %166

166:                                              ; preds = %162
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  br label %183

167:                                              ; preds = %162
  %168 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 13
  %169 = load i32, ptr %14, align 4, !tbaa !39
  %170 = zext i32 %169 to i64
  %171 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH5ArrayIP9VkImage_TNS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %168, i64 noundef %170)
  %172 = load ptr, ptr %171, align 8, !tbaa !5
  %173 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 14
  %174 = load i32, ptr %173, align 16, !tbaa !13
  %175 = call noundef ptr @_ZN10RendererVK15CreateImageViewEP9VkImage_T8VkFormatj(ptr noundef nonnull align 16 dereferenceable(1936) %24, ptr noundef %172, i32 noundef %174, i32 noundef 1)
  %176 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 16
  %177 = load i32, ptr %14, align 4, !tbaa !39
  %178 = zext i32 %177 to i64
  %179 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH5ArrayIP13VkImageView_TNS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %176, i64 noundef %178)
  store ptr %175, ptr %179, align 8, !tbaa !5
  br label %180

180:                                              ; preds = %167
  %181 = load i32, ptr %14, align 4, !tbaa !39
  %182 = add i32 %181, 1
  store i32 %182, ptr %14, align 4, !tbaa !39
  br label %162, !llvm.loop !77

183:                                              ; preds = %166
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #9
  %184 = call noundef i32 @_ZN10RendererVK15FindDepthFormatEv(ptr noundef nonnull align 16 dereferenceable(1936) %24)
  store i32 %184, ptr %15, align 4, !tbaa !79
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #9
  store i32 32, ptr %16, align 4, !tbaa !39
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #9
  store i32 1, ptr %17, align 4, !tbaa !39
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #9
  call void @llvm.memset.p0.i64(ptr align 8 %18, i8 0, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #9
  %185 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 3
  %186 = load ptr, ptr %185, align 16, !tbaa !80
  %187 = load i32, ptr %15, align 4, !tbaa !79
  %188 = load i32, ptr %16, align 4, !tbaa !39
  %189 = or i32 %188, 64
  %190 = call i32 @vkGetPhysicalDeviceImageFormatProperties(ptr noundef %186, i32 noundef %187, i32 noundef 1, i32 noundef 0, i32 noundef %189, i32 noundef 0, ptr noundef %18)
  store i32 %190, ptr %19, align 4, !tbaa !81
  %191 = load i32, ptr %19, align 4, !tbaa !81
  %192 = icmp eq i32 %191, 0
  br i1 %192, label %193, label %220

193:                                              ; preds = %183
  %194 = load i32, ptr %16, align 4, !tbaa !39
  %195 = or i32 %194, 64
  store i32 %195, ptr %16, align 4, !tbaa !39
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #9
  store i64 0, ptr %20, align 8, !tbaa !83
  br label %196

196:                                              ; preds = %215, %193
  %197 = load i64, ptr %20, align 8, !tbaa !83
  %198 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 4
  %199 = getelementptr inbounds %struct.VkPhysicalDeviceMemoryProperties, ptr %198, i32 0, i32 0
  %200 = load i32, ptr %199, align 8, !tbaa !84
  %201 = zext i32 %200 to i64
  %202 = icmp ult i64 %197, %201
  br i1 %202, label %204, label %203

203:                                              ; preds = %196
  store i32 5, ptr %8, align 4
  br label %218

204:                                              ; preds = %196
  %205 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 4
  %206 = getelementptr inbounds %struct.VkPhysicalDeviceMemoryProperties, ptr %205, i32 0, i32 1
  %207 = load i64, ptr %20, align 8, !tbaa !83
  %208 = getelementptr inbounds [32 x %struct.VkMemoryType], ptr %206, i64 0, i64 %207
  %209 = getelementptr inbounds %struct.VkMemoryType, ptr %208, i32 0, i32 0
  %210 = load i32, ptr %209, align 4, !tbaa !85
  %211 = and i32 %210, 16
  %212 = icmp ne i32 %211, 0
  br i1 %212, label %213, label %214

213:                                              ; preds = %204
  store i32 16, ptr %17, align 4, !tbaa !39
  store i32 5, ptr %8, align 4
  br label %218

214:                                              ; preds = %204
  br label %215

215:                                              ; preds = %214
  %216 = load i64, ptr %20, align 8, !tbaa !83
  %217 = add i64 %216, 1
  store i64 %217, ptr %20, align 8, !tbaa !83
  br label %196, !llvm.loop !87

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

219:                                              ; preds = %218
  br label %220

220:                                              ; preds = %219, %183
  %221 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 15
  %222 = getelementptr inbounds %struct.VkExtent2D, ptr %221, i32 0, i32 0
  %223 = load i32, ptr %222, align 4, !tbaa !40
  %224 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 15
  %225 = getelementptr inbounds %struct.VkExtent2D, ptr %224, i32 0, i32 1
  %226 = load i32, ptr %225, align 4, !tbaa !41
  %227 = load i32, ptr %15, align 4, !tbaa !79
  %228 = load i32, ptr %16, align 4, !tbaa !39
  %229 = load i32, ptr %17, align 4, !tbaa !39
  %230 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 17
  %231 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 18
  call void @_ZN10RendererVK11CreateImageEjj8VkFormat13VkImageTilingjjRP9VkImage_TRP16VkDeviceMemory_T(ptr noundef nonnull align 16 dereferenceable(1936) %24, i32 noundef %223, i32 noundef %226, i32 noundef %227, i32 noundef 0, i32 noundef %228, i32 noundef %229, ptr noundef nonnull align 8 dereferenceable(8) %230, ptr noundef nonnull align 8 dereferenceable(8) %231)
  %232 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 17
  %233 = load ptr, ptr %232, align 8, !tbaa !88
  %234 = load i32, ptr %15, align 4, !tbaa !79
  %235 = call noundef ptr @_ZN10RendererVK15CreateImageViewEP9VkImage_T8VkFormatj(ptr noundef nonnull align 16 dereferenceable(1936) %24, ptr noundef %233, i32 noundef %234, i32 noundef 2)
  %236 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 19
  store ptr %235, ptr %236, align 8, !tbaa !89
  %237 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 31
  %238 = load i32, ptr %13, align 4, !tbaa !39
  %239 = zext i32 %238 to i64
  call void @_ZN3JPH5ArrayIP15VkFramebuffer_TNS_12STLAllocatorIS2_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %237, i64 noundef %239)
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #9
  store i64 0, ptr %21, align 8, !tbaa !83
  br label %240

240:                                              ; preds = %278, %220
  %241 = load i64, ptr %21, align 8, !tbaa !83
  %242 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 31
  %243 = call noundef i64 @_ZNK3JPH5ArrayIP15VkFramebuffer_TNS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %242)
  %244 = icmp ult i64 %241, %243
  br i1 %244, label %246, label %245

245:                                              ; preds = %240
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  br label %281

246:                                              ; preds = %240
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #9
  %247 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 16
  %248 = load i64, ptr %21, align 8, !tbaa !83
  %249 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH5ArrayIP13VkImageView_TNS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %247, i64 noundef %248)
  %250 = load ptr, ptr %249, align 8, !tbaa !5
  store ptr %250, ptr %22, align 8, !tbaa !5
  %251 = getelementptr inbounds ptr, ptr %22, i64 1
  %252 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 19
  %253 = load ptr, ptr %252, align 8, !tbaa !89
  store ptr %253, ptr %251, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 64, ptr %23) #9
  call void @llvm.memset.p0.i64(ptr align 8 %23, i8 0, i64 64, i1 false)
  %254 = getelementptr inbounds %struct.VkFramebufferCreateInfo, ptr %23, i32 0, i32 0
  store i32 37, ptr %254, align 8, !tbaa !90
  %255 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 28
  %256 = load ptr, ptr %255, align 16, !tbaa !92
  %257 = getelementptr inbounds %struct.VkFramebufferCreateInfo, ptr %23, i32 0, i32 3
  store ptr %256, ptr %257, align 8, !tbaa !93
  %258 = call noundef i64 @_ZSt4sizeIP13VkImageView_TLm2EEmRAT0__KT_(ptr noundef nonnull align 8 dereferenceable(16) %22) #9
  %259 = trunc i64 %258 to i32
  %260 = getelementptr inbounds %struct.VkFramebufferCreateInfo, ptr %23, i32 0, i32 4
  store i32 %259, ptr %260, align 8, !tbaa !94
  %261 = getelementptr inbounds [2 x ptr], ptr %22, i64 0, i64 0
  %262 = getelementptr inbounds %struct.VkFramebufferCreateInfo, ptr %23, i32 0, i32 5
  store ptr %261, ptr %262, align 8, !tbaa !95
  %263 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 15
  %264 = getelementptr inbounds %struct.VkExtent2D, ptr %263, i32 0, i32 0
  %265 = load i32, ptr %264, align 4, !tbaa !40
  %266 = getelementptr inbounds %struct.VkFramebufferCreateInfo, ptr %23, i32 0, i32 6
  store i32 %265, ptr %266, align 8, !tbaa !96
  %267 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 15
  %268 = getelementptr inbounds %struct.VkExtent2D, ptr %267, i32 0, i32 1
  %269 = load i32, ptr %268, align 4, !tbaa !41
  %270 = getelementptr inbounds %struct.VkFramebufferCreateInfo, ptr %23, i32 0, i32 7
  store i32 %269, ptr %270, align 4, !tbaa !97
  %271 = getelementptr inbounds %struct.VkFramebufferCreateInfo, ptr %23, i32 0, i32 8
  store i32 1, ptr %271, align 8, !tbaa !98
  %272 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 5
  %273 = load ptr, ptr %272, align 16, !tbaa !75
  %274 = getelementptr inbounds %class.RendererVK, ptr %24, i32 0, i32 31
  %275 = load i64, ptr %21, align 8, !tbaa !83
  %276 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH5ArrayIP15VkFramebuffer_TNS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %274, i64 noundef %275)
  %277 = call i32 @vkCreateFramebuffer(ptr noundef %273, ptr noundef %23, ptr noundef null, ptr noundef %276)
  call void @_Z18FatalErrorIfFailed8VkResult(i32 noundef %277)
  call void @llvm.lifetime.end.p0(i64 64, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #9
  br label %278

278:                                              ; preds = %246
  %279 = load i64, ptr %21, align 8, !tbaa !83
  %280 = add i64 %279, 1
  store i64 %280, ptr %21, align 8, !tbaa !83
  br label %240, !llvm.loop !99

281:                                              ; preds = %245
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 104, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  store i32 0, ptr %8, align 4
  br label %282

282:                                              ; preds = %281, %89
  call void @llvm.lifetime.end.p0(i64 52, ptr %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #9
  %283 = load i32, ptr %8, align 4
  switch i32 %283, label %285 [
    i32 0, label %284
    i32 1, label %284
  ]

284:                                              ; preds = %282, %282
  ret void

285:                                              ; preds = %282
  unreachable
}

declare i32 @vkGetPhysicalDeviceSurfaceCapabilitiesKHR(ptr noundef, ptr noundef, ptr noundef) #1

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef i32 @_ZN3JPH5ClampIjEET_S1_S1_S1_(i32 noundef, i32 noundef, i32 noundef) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #7

declare i32 @vkCreateSwapchainKHR(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare i32 @vkGetSwapchainImagesKHR(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

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

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

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

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

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

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

declare i32 @vkGetPhysicalDeviceImageFormatProperties(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) #1

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZSt4sizeIP13VkImageView_TLm2EEmRAT0__KT_(ptr noundef nonnull align 8 dereferenceable(16)) #5

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

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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 = { 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 #8 = { inlinehint 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 #9 = { 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, !11, i64 0}
!10 = !{!"_ZTS18VkSurfaceFormatKHR", !11, i64 0, !12, i64 4}
!11 = !{!"_ZTS8VkFormat", !7, i64 0}
!12 = !{!"_ZTS15VkColorSpaceKHR", !7, i64 0}
!13 = !{!14, !11, i64 1456}
!14 = !{!"_ZTS10RendererVK", !15, i64 0, !6, i64 832, !6, i64 840, !6, i64 848, !26, i64 856, !6, i64 1376, !21, i64 1384, !21, i64 1388, !6, i64 1392, !6, i64 1400, !6, i64 1408, !6, i64 1416, !17, i64 1424, !27, i64 1432, !11, i64 1456, !29, i64 1460, !30, 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, !31, i64 1624, !21, i64 1648, !6, i64 1656, !7, i64 1664, !7, i64 1680, !7, i64 1696, !7, i64 1712, !32, i64 1728, !7, i64 1736, !7, i64 1752, !7, i64 1768, !7, i64 1784, !33, i64 1848, !35, i64 1880, !21, i64 1912, !21, i64 1916, !28, i64 1920, !28, i64 1928}
!15 = !{!"_ZTS8Renderer", !6, i64 8, !16, i64 16, !17, i64 20, !18, i64 32, !19, i64 96, !20, i64 112, !20, i64 192, !21, i64 272, !22, i64 288, !22, i64 544, !24, i64 800}
!16 = !{!"float", !7, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"_ZTS11CameraState", !19, i64 0, !19, i64 16, !19, i64 32, !16, i64 48}
!19 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!20 = !{!"_ZTS7Frustum", !7, i64 0}
!21 = !{!"int", !7, i64 0}
!22 = !{!"_ZTSN8Renderer26VertexShaderConstantBufferE", !23, i64 0, !23, i64 64, !23, i64 128, !23, i64 192}
!23 = !{!"_ZTSN3JPH5Mat44E", !7, i64 0}
!24 = !{!"_ZTSN8Renderer25PixelShaderConstantBufferE", !25, i64 0, !25, i64 16}
!25 = !{!"_ZTSN3JPH4Vec4E", !7, i64 0}
!26 = !{!"_ZTS32VkPhysicalDeviceMemoryProperties", !21, i64 0, !7, i64 4, !21, i64 260, !7, i64 264}
!27 = !{!"_ZTSN3JPH5ArrayIP9VkImage_TNS_12STLAllocatorIS2_EEEE", !28, i64 0, !28, i64 8, !6, i64 16}
!28 = !{!"long", !7, i64 0}
!29 = !{!"_ZTS10VkExtent2D", !21, i64 0, !21, i64 4}
!30 = !{!"_ZTSN3JPH5ArrayIP13VkImageView_TNS_12STLAllocatorIS2_EEEE", !28, i64 0, !28, i64 8, !6, i64 16}
!31 = !{!"_ZTSN3JPH5ArrayIP15VkFramebuffer_TNS_12STLAllocatorIS2_EEEE", !28, i64 0, !28, i64 8, !6, i64 16}
!32 = !{!"_ZTSN3JPH3RefI9TextureVKEE", !6, i64 0}
!33 = !{!"_ZTSN3JPH12UnorderedMapIN10RendererVK3KeyENS_5ArrayI8BufferVKNS_12STLAllocatorIS4_EEEENS1_9KeyHasherESt8equal_toIS2_EEE", !34, i64 0}
!34 = !{!"_ZTSN3JPH9HashTableIN10RendererVK3KeyESt4pairIS2_NS_5ArrayI8BufferVKNS_12STLAllocatorIS5_EEEEENS_18UnorderedMapDetailIS2_S8_EENS1_9KeyHasherESt8equal_toIS2_EEE", !6, i64 0, !6, i64 8, !21, i64 16, !21, i64 20, !21, i64 24}
!35 = !{!"_ZTSN3JPH12UnorderedMapIN10RendererVK3KeyENS_5ArrayINS1_6MemoryENS_12STLAllocatorIS4_EEEENS1_9KeyHasherESt8equal_toIS2_EEE", !36, i64 0}
!36 = !{!"_ZTSN3JPH9HashTableIN10RendererVK3KeyESt4pairIS2_NS_5ArrayINS1_6MemoryENS_12STLAllocatorIS5_EEEEENS_18UnorderedMapDetailIS2_S8_EENS1_9KeyHasherESt8equal_toIS2_EEE", !6, i64 0, !6, i64 8, !21, i64 16, !21, i64 20, !21, i64 24}
!37 = !{!14, !6, i64 1408}
!38 = !{i64 0, i64 4, !39, i64 4, i64 4, !39}
!39 = !{!21, !21, i64 0}
!40 = !{!14, !21, i64 1460}
!41 = !{!14, !21, i64 1464}
!42 = !{!15, !6, i64 8}
!43 = !{!29, !21, i64 0}
!44 = !{!29, !21, i64 4}
!45 = !{!46, !21, i64 16}
!46 = !{!"_ZTS24VkSurfaceCapabilitiesKHR", !21, i64 0, !21, i64 4, !29, i64 8, !29, i64 16, !29, i64 24, !21, i64 32, !21, i64 36, !47, i64 40, !21, i64 44, !21, i64 48}
!47 = !{!"_ZTS29VkSurfaceTransformFlagBitsKHR", !7, i64 0}
!48 = !{!46, !21, i64 24}
!49 = !{!46, !21, i64 20}
!50 = !{!46, !21, i64 28}
!51 = !{!46, !21, i64 0}
!52 = !{!53, !54, i64 0}
!53 = !{!"_ZTS24VkSwapchainCreateInfoKHR", !54, i64 0, !6, i64 8, !21, i64 16, !6, i64 24, !21, i64 32, !11, i64 36, !12, i64 40, !29, i64 44, !21, i64 52, !21, i64 56, !55, i64 60, !21, i64 64, !6, i64 72, !47, i64 80, !56, i64 84, !57, i64 88, !21, i64 92, !6, i64 96}
!54 = !{!"_ZTS15VkStructureType", !7, i64 0}
!55 = !{!"_ZTS13VkSharingMode", !7, i64 0}
!56 = !{!"_ZTS27VkCompositeAlphaFlagBitsKHR", !7, i64 0}
!57 = !{!"_ZTS16VkPresentModeKHR", !7, i64 0}
!58 = !{!53, !6, i64 24}
!59 = !{!53, !21, i64 32}
!60 = !{!53, !11, i64 36}
!61 = !{!10, !12, i64 4}
!62 = !{!53, !12, i64 40}
!63 = !{!53, !21, i64 52}
!64 = !{!53, !21, i64 56}
!65 = !{!14, !21, i64 1384}
!66 = !{!14, !21, i64 1388}
!67 = !{!53, !55, i64 60}
!68 = !{!53, !21, i64 64}
!69 = !{!53, !6, i64 72}
!70 = !{!46, !47, i64 40}
!71 = !{!53, !47, i64 80}
!72 = !{!53, !56, i64 84}
!73 = !{!53, !57, i64 88}
!74 = !{!53, !21, i64 92}
!75 = !{!14, !6, i64 1376}
!76 = !{!14, !6, i64 1416}
!77 = distinct !{!77, !78}
!78 = !{!"llvm.loop.mustprogress"}
!79 = !{!11, !11, i64 0}
!80 = !{!14, !6, i64 848}
!81 = !{!82, !82, i64 0}
!82 = !{!"_ZTS8VkResult", !7, i64 0}
!83 = !{!28, !28, i64 0}
!84 = !{!14, !21, i64 856}
!85 = !{!86, !21, i64 0}
!86 = !{!"_ZTS12VkMemoryType", !21, i64 0, !21, i64 4}
!87 = distinct !{!87, !78}
!88 = !{!14, !6, i64 1496}
!89 = !{!14, !6, i64 1512}
!90 = !{!91, !54, i64 0}
!91 = !{!"_ZTS23VkFramebufferCreateInfo", !54, i64 0, !6, i64 8, !21, i64 16, !6, i64 24, !21, i64 32, !6, i64 40, !21, i64 48, !21, i64 52, !21, i64 56}
!92 = !{!14, !6, i64 1600}
!93 = !{!91, !6, i64 24}
!94 = !{!91, !21, i64 32}
!95 = !{!91, !6, i64 40}
!96 = !{!91, !21, i64 48}
!97 = !{!91, !21, i64 52}
!98 = !{!91, !21, i64 56}
!99 = distinct !{!99, !78}


; 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.VkSurfaceCapabilitiesKHR = type { i32, i32, %struct.VkExtent2D, %struct.VkExtent2D, %struct.VkExtent2D, i32, i32, i32, i32, i32 }
%struct.VkExtent2D = type { i32, i32 }
%struct.VkSwapchainCreateInfoKHR = type { i32, ptr, i32, ptr, i32, i32, i32, %struct.VkExtent2D, i32, i32, i32, i32, ptr, i32, i32, i32, i32, ptr }
%struct.VkImageFormatProperties = type { %struct.VkExtent3D, i32, i32, i32, i64 }
%struct.VkExtent3D = type { i32, i32, i32 }
%struct.VkFramebufferCreateInfo = type { i32, ptr, i32, ptr, i32, ptr, i32, i32, i32 }
%struct.VkMemoryType = type { i32, i32 }

; 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

declare void @_Z18FatalErrorIfFailed8VkResult(i32 noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZN10RendererVK12SelectFormatEP18VkPhysicalDevice_T(ptr noundef nonnull align 16 dereferenceable(1936), ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN10RendererVK15FindDepthFormatEv(ptr noundef nonnull align 16 dereferenceable(1936)) local_unnamed_addr #3 align 2

declare i32 @vkCreateFramebuffer(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10RendererVK15CreateSwapChainEP18VkPhysicalDevice_T(ptr noundef nonnull align 16 dereferenceable(1936) %0, ptr noundef %1) local_unnamed_addr #3 align 2 {
  %3 = alloca %struct.VkSurfaceCapabilitiesKHR, align 4
  %4 = alloca i32, align 4
  %5 = alloca %struct.VkSwapchainCreateInfoKHR, align 8
  %6 = alloca [2 x i32], align 4
  %7 = alloca i32, align 4
  %8 = alloca %struct.VkImageFormatProperties, align 8
  %9 = alloca [2 x ptr], align 16
  %10 = alloca %struct.VkFramebufferCreateInfo, align 8
  %11 = tail call i64 @_ZN10RendererVK12SelectFormatEP18VkPhysicalDevice_T(ptr noundef nonnull align 16 dereferenceable(1936) %0, ptr noundef %1)
  %.sroa.020.0.extract.trunc = trunc i64 %11 to i32
  %.sroa.5.0.extract.shift = lshr i64 %11, 32
  %.sroa.5.0.extract.trunc = trunc nuw i64 %.sroa.5.0.extract.shift to i32
  %12 = getelementptr inbounds i8, ptr %0, i64 1456
  store i32 %.sroa.020.0.extract.trunc, ptr %12, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 52, ptr nonnull %3) #8
  %13 = getelementptr inbounds i8, ptr %0, i64 1408
  %14 = load ptr, ptr %13, align 16, !tbaa !33
  %15 = call i32 @vkGetPhysicalDeviceSurfaceCapabilitiesKHR(ptr noundef %1, ptr noundef %14, ptr noundef nonnull %3)
  %16 = getelementptr inbounds i8, ptr %3, i64 8
  %17 = getelementptr inbounds i8, ptr %0, i64 1460
  %18 = load i64, ptr %16, align 4
  store i64 %18, ptr %17, align 4
  %19 = trunc i64 %18 to i32
  %20 = icmp eq i32 %19, -1
  %21 = getelementptr inbounds i8, ptr %0, i64 1464
  %22 = icmp ugt i64 %18, -4294967297
  %or.cond = or i1 %20, %22
  br i1 %or.cond, label %23, label %29

23:                                               ; preds = %2
  %24 = getelementptr inbounds i8, ptr %0, i64 8
  %25 = load ptr, ptr %24, align 8, !tbaa !34
  %26 = call noundef i32 @_ZN17ApplicationWindow14GetWindowWidthEv(ptr noundef nonnull align 8 dereferenceable(48) %25)
  %27 = load ptr, ptr %24, align 8, !tbaa !34
  %28 = call noundef i32 @_ZN17ApplicationWindow15GetWindowHeightEv(ptr noundef nonnull align 8 dereferenceable(48) %27)
  store i32 %26, ptr %17, align 4, !tbaa !35
  store i32 %28, ptr %21, align 8, !tbaa !35
  br label %29

29:                                               ; preds = %2, %23
  %30 = phi i32 [ %19, %2 ], [ %26, %23 ]
  %31 = getelementptr inbounds i8, ptr %3, i64 16
  %32 = load i32, ptr %31, align 4, !tbaa !36
  %33 = getelementptr inbounds i8, ptr %3, i64 24
  %34 = load i32, ptr %33, align 4, !tbaa !39
  %35 = call noundef i32 @_ZN3JPH5ClampIjEET_S1_S1_S1_(i32 noundef %30, i32 noundef %32, i32 noundef %34)
  store i32 %35, ptr %17, align 4, !tbaa !40
  %36 = load i32, ptr %21, align 8, !tbaa !41
  %37 = getelementptr inbounds i8, ptr %3, i64 20
  %38 = load i32, ptr %37, align 4, !tbaa !42
  %39 = getelementptr inbounds i8, ptr %3, i64 28
  %40 = load i32, ptr %39, align 4, !tbaa !43
  %41 = call noundef i32 @_ZN3JPH5ClampIjEET_S1_S1_S1_(i32 noundef %36, i32 noundef %38, i32 noundef %40)
  store i32 %41, ptr %21, align 8, !tbaa !41
  %42 = load i32, ptr %17, align 4, !tbaa !40
  %43 = icmp eq i32 %42, 0
  %44 = icmp eq i32 %41, 0
  %or.cond31 = or i1 %44, %43
  br i1 %or.cond31, label %149, label %45

45:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  %46 = load i32, ptr %3, align 4, !tbaa !44
  %47 = add i32 %46, 1
  store i32 %47, ptr %4, align 4, !tbaa !35
  %48 = getelementptr inbounds i8, ptr %3, i64 4
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %48)
  %50 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %49, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %51 = load i32, ptr %50, align 4, !tbaa !35
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %5) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(104) %5, i8 0, i64 104, i1 false)
  store i32 1000001000, ptr %5, align 8, !tbaa !45
  %52 = load ptr, ptr %13, align 16, !tbaa !33
  %53 = getelementptr inbounds i8, ptr %5, i64 24
  store ptr %52, ptr %53, align 8, !tbaa !52
  %54 = getelementptr inbounds i8, ptr %5, i64 32
  store i32 %51, ptr %54, align 8, !tbaa !53
  %55 = getelementptr inbounds i8, ptr %5, i64 36
  store i32 %.sroa.020.0.extract.trunc, ptr %55, align 4, !tbaa !54
  %56 = getelementptr inbounds i8, ptr %5, i64 40
  store i32 %.sroa.5.0.extract.trunc, ptr %56, align 8, !tbaa !55
  %57 = getelementptr inbounds i8, ptr %5, i64 44
  %58 = load i64, ptr %17, align 4
  store i64 %58, ptr %57, align 4
  %59 = getelementptr inbounds i8, ptr %5, i64 52
  store i32 1, ptr %59, align 4, !tbaa !56
  %60 = getelementptr inbounds i8, ptr %5, i64 56
  store i32 16, ptr %60, align 8, !tbaa !57
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %61 = getelementptr inbounds i8, ptr %0, i64 1384
  %62 = load i32, ptr %61, align 8, !tbaa !58
  store i32 %62, ptr %6, align 4, !tbaa !35
  %63 = getelementptr inbounds i8, ptr %6, i64 4
  %64 = getelementptr inbounds i8, ptr %0, i64 1388
  %65 = load i32, ptr %64, align 4, !tbaa !59
  store i32 %65, ptr %63, align 4, !tbaa !35
  %.not = icmp eq i32 %62, %65
  br i1 %.not, label %69, label %66

66:                                               ; preds = %45
  %67 = getelementptr inbounds i8, ptr %5, i64 64
  store i32 2, ptr %67, align 8, !tbaa !60
  %68 = getelementptr inbounds i8, ptr %5, i64 72
  store ptr %6, ptr %68, align 8, !tbaa !61
  br label %69

69:                                               ; preds = %45, %66
  %70 = getelementptr inbounds i8, ptr %5, i64 60
  store i32 0, ptr %70, align 4, !tbaa !62
  %71 = getelementptr inbounds i8, ptr %3, i64 40
  %72 = load i32, ptr %71, align 4, !tbaa !63
  %73 = getelementptr inbounds i8, ptr %5, i64 80
  store i32 %72, ptr %73, align 8, !tbaa !64
  %74 = getelementptr inbounds i8, ptr %5, i64 84
  store i32 1, ptr %74, align 4, !tbaa !65
  %75 = getelementptr inbounds i8, ptr %5, i64 88
  store i32 2, ptr %75, align 8, !tbaa !66
  %76 = getelementptr inbounds i8, ptr %5, i64 92
  store i32 1, ptr %76, align 4, !tbaa !67
  %77 = getelementptr inbounds i8, ptr %0, i64 1376
  %78 = load ptr, ptr %77, align 16, !tbaa !68
  %79 = getelementptr inbounds i8, ptr %0, i64 1416
  %80 = call i32 @vkCreateSwapchainKHR(ptr noundef %78, ptr noundef nonnull %5, ptr noundef null, ptr noundef nonnull %79)
  call void @_Z18FatalErrorIfFailed8VkResult(i32 noundef %80)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #8
  %81 = load ptr, ptr %77, align 16, !tbaa !68
  %82 = load ptr, ptr %79, align 8, !tbaa !69
  %83 = call i32 @vkGetSwapchainImagesKHR(ptr noundef %81, ptr noundef %82, ptr noundef nonnull %7, ptr noundef null)
  call void @_Z18FatalErrorIfFailed8VkResult(i32 noundef %83)
  %84 = getelementptr inbounds i8, ptr %0, i64 1432
  %85 = load i32, ptr %7, align 4, !tbaa !35
  %86 = zext i32 %85 to i64
  call void @_ZN3JPH5ArrayIP9VkImage_TNS_12STLAllocatorIS2_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %84, i64 noundef %86)
  %87 = load ptr, ptr %77, align 16, !tbaa !68
  %88 = load ptr, ptr %79, align 8, !tbaa !69
  %89 = call noundef ptr @_ZN3JPH5ArrayIP9VkImage_TNS_12STLAllocatorIS2_EEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %84)
  %90 = call i32 @vkGetSwapchainImagesKHR(ptr noundef %87, ptr noundef %88, ptr noundef nonnull %7, ptr noundef %89)
  call void @_Z18FatalErrorIfFailed8VkResult(i32 noundef %90)
  %91 = getelementptr inbounds i8, ptr %0, i64 1472
  %92 = load i32, ptr %7, align 4, !tbaa !35
  %93 = zext i32 %92 to i64
  call void @_ZN3JPH5ArrayIP13VkImageView_TNS_12STLAllocatorIS2_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %91, i64 noundef %93)
  %94 = load i32, ptr %7, align 4, !tbaa !35
  %.not41 = icmp eq i32 %94, 0
  br i1 %.not41, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %69
  %95 = call noundef i32 @_ZN10RendererVK15FindDepthFormatEv(ptr noundef nonnull align 16 dereferenceable(1936) %0)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %8, i8 0, i64 32, i1 false)
  %96 = getelementptr inbounds i8, ptr %0, i64 848
  %97 = load ptr, ptr %96, align 16, !tbaa !70
  %98 = call i32 @vkGetPhysicalDeviceImageFormatProperties(ptr noundef %97, i32 noundef %95, i32 noundef 1, i32 noundef 0, i32 noundef 96, i32 noundef 0, ptr noundef nonnull %8)
  %99 = icmp eq i32 %98, 0
  br i1 %99, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %._crit_edge
  %100 = getelementptr inbounds i8, ptr %0, i64 860
  %101 = getelementptr inbounds i8, ptr %0, i64 856
  %102 = load i32, ptr %101, align 8, !tbaa !71
  %103 = zext i32 %102 to i64
  %.not42 = icmp eq i32 %102, 0
  br i1 %.not42, label %.loopexit, label %.lr.ph34

.lr.ph:                                           ; preds = %69, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %69 ]
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH5ArrayIP9VkImage_TNS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %84, i64 noundef %indvars.iv)
  %105 = load ptr, ptr %104, align 8, !tbaa !72
  %106 = load i32, ptr %12, align 16, !tbaa !5
  %107 = call noundef ptr @_ZN10RendererVK15CreateImageViewEP9VkImage_T8VkFormatj(ptr noundef nonnull align 16 dereferenceable(1936) %0, ptr noundef %105, i32 noundef %106, i32 noundef 1)
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH5ArrayIP13VkImageView_TNS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %91, i64 noundef %indvars.iv)
  store ptr %107, ptr %108, align 8, !tbaa !72
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %109 = load i32, ptr %7, align 4, !tbaa !35
  %110 = zext i32 %109 to i64
  %111 = icmp ult i64 %indvars.iv.next, %110
  br i1 %111, label %.lr.ph, label %._crit_edge, !llvm.loop !73

112:                                              ; preds = %.lr.ph34
  %113 = add nuw nsw i64 %.02433, 1
  %exitcond.not = icmp eq i64 %113, %103
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph34, !llvm.loop !75

.lr.ph34:                                         ; preds = %.preheader, %112
  %.02433 = phi i64 [ %113, %112 ], [ 0, %.preheader ]
  %114 = getelementptr inbounds [32 x %struct.VkMemoryType], ptr %100, i64 0, i64 %.02433
  %115 = load i32, ptr %114, align 4, !tbaa !76
  %116 = and i32 %115, 16
  %.not28 = icmp eq i32 %116, 0
  br i1 %.not28, label %112, label %.loopexit

.loopexit:                                        ; preds = %.lr.ph34, %112, %.preheader, %._crit_edge
  %.026 = phi i32 [ 32, %._crit_edge ], [ 96, %.preheader ], [ 96, %112 ], [ 96, %.lr.ph34 ]
  %.1 = phi i32 [ 1, %._crit_edge ], [ 1, %.preheader ], [ 16, %.lr.ph34 ], [ 1, %112 ]
  %117 = load i32, ptr %17, align 4, !tbaa !40
  %118 = load i32, ptr %21, align 8, !tbaa !41
  %119 = getelementptr inbounds i8, ptr %0, i64 1496
  %120 = getelementptr inbounds i8, ptr %0, i64 1504
  call void @_ZN10RendererVK11CreateImageEjj8VkFormat13VkImageTilingjjRP9VkImage_TRP16VkDeviceMemory_T(ptr noundef nonnull align 16 dereferenceable(1936) %0, i32 noundef %117, i32 noundef %118, i32 noundef %95, i32 noundef 0, i32 noundef %.026, i32 noundef %.1, ptr noundef nonnull align 8 dereferenceable(8) %119, ptr noundef nonnull align 8 dereferenceable(8) %120)
  %121 = load ptr, ptr %119, align 8, !tbaa !78
  %122 = call noundef ptr @_ZN10RendererVK15CreateImageViewEP9VkImage_T8VkFormatj(ptr noundef nonnull align 16 dereferenceable(1936) %0, ptr noundef %121, i32 noundef %95, i32 noundef 2)
  %123 = getelementptr inbounds i8, ptr %0, i64 1512
  store ptr %122, ptr %123, align 8, !tbaa !79
  %124 = getelementptr inbounds i8, ptr %0, i64 1624
  %125 = load i32, ptr %7, align 4, !tbaa !35
  %126 = zext i32 %125 to i64
  call void @_ZN3JPH5ArrayIP15VkFramebuffer_TNS_12STLAllocatorIS2_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %124, i64 noundef %126)
  %127 = call noundef i64 @_ZNK3JPH5ArrayIP15VkFramebuffer_TNS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %124)
  %.not43 = icmp eq i64 %127, 0
  br i1 %.not43, label %._crit_edge40, label %.lr.ph39

.lr.ph39:                                         ; preds = %.loopexit
  %128 = getelementptr inbounds i8, ptr %9, i64 8
  %129 = getelementptr inbounds i8, ptr %0, i64 1600
  %130 = getelementptr inbounds i8, ptr %10, i64 24
  %131 = getelementptr inbounds i8, ptr %10, i64 32
  %132 = getelementptr inbounds i8, ptr %10, i64 40
  %133 = getelementptr inbounds i8, ptr %10, i64 48
  %134 = getelementptr inbounds i8, ptr %10, i64 56
  br label %135

._crit_edge40:                                    ; preds = %135, %.loopexit
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %5) #8
  br label %149

135:                                              ; preds = %.lr.ph39, %135
  %.037 = phi i64 [ 0, %.lr.ph39 ], [ %146, %135 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #8
  %136 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH5ArrayIP13VkImageView_TNS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %91, i64 noundef %.037)
  %137 = load ptr, ptr %136, align 8, !tbaa !72
  store ptr %137, ptr %9, align 16, !tbaa !72
  %138 = load ptr, ptr %123, align 8, !tbaa !79
  store ptr %138, ptr %128, align 8, !tbaa !72
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %10) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %10, i8 0, i64 64, i1 false)
  store i32 37, ptr %10, align 8, !tbaa !80
  %139 = load ptr, ptr %129, align 16, !tbaa !82
  store ptr %139, ptr %130, align 8, !tbaa !83
  %140 = call noundef i64 @_ZSt4sizeIP13VkImageView_TLm2EEmRAT0__KT_(ptr noundef nonnull align 8 dereferenceable(16) %9) #8
  %141 = trunc i64 %140 to i32
  store i32 %141, ptr %131, align 8, !tbaa !84
  store ptr %9, ptr %132, align 8, !tbaa !85
  %142 = load <2 x i32>, ptr %17, align 4, !tbaa !35
  store <2 x i32> %142, ptr %133, align 8, !tbaa !35
  store i32 1, ptr %134, align 8, !tbaa !86
  %143 = load ptr, ptr %77, align 16, !tbaa !68
  %144 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH5ArrayIP15VkFramebuffer_TNS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %124, i64 noundef %.037)
  %145 = call i32 @vkCreateFramebuffer(ptr noundef %143, ptr noundef nonnull %10, ptr noundef null, ptr noundef nonnull %144)
  call void @_Z18FatalErrorIfFailed8VkResult(i32 noundef %145)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #8
  %146 = add nuw i64 %.037, 1
  %147 = call noundef i64 @_ZNK3JPH5ArrayIP15VkFramebuffer_TNS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %124)
  %148 = icmp ult i64 %146, %147
  br i1 %148, label %135, label %._crit_edge40, !llvm.loop !87

149:                                              ; preds = %29, %._crit_edge40
  call void @llvm.lifetime.end.p0(i64 52, ptr nonnull %3) #8
  ret void
}

declare i32 @vkGetPhysicalDeviceSurfaceCapabilitiesKHR(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef i32 @_ZN3JPH5ClampIjEET_S1_S1_S1_(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6

declare i32 @vkCreateSwapchainKHR(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @vkGetSwapchainImagesKHR(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN10RendererVK15CreateImageViewEP9VkImage_T8VkFormatj(ptr noundef nonnull align 16 dereferenceable(1936), ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #3 align 2

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

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

declare i32 @vkGetPhysicalDeviceImageFormatProperties(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10RendererVK11CreateImageEjj8VkFormat13VkImageTilingjjRP9VkImage_TRP16VkDeviceMemory_T(ptr noundef nonnull align 16 dereferenceable(1936), i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZSt4sizeIP13VkImageView_TLm2EEmRAT0__KT_(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4

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

attributes #0 = { mustprogress 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 nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { 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 = { 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 #7 = { inlinehint 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 #8 = { 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, !24, i64 1456}
!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 1408}
!34 = !{!7, !8, i64 8}
!35 = !{!16, !16, i64 0}
!36 = !{!37, !16, i64 16}
!37 = !{!"_ZTS24VkSurfaceCapabilitiesKHR", !16, i64 0, !16, i64 4, !25, i64 8, !25, i64 16, !25, i64 24, !16, i64 32, !16, i64 36, !38, i64 40, !16, i64 44, !16, i64 48}
!38 = !{!"_ZTS29VkSurfaceTransformFlagBitsKHR", !9, i64 0}
!39 = !{!37, !16, i64 24}
!40 = !{!6, !16, i64 1460}
!41 = !{!6, !16, i64 1464}
!42 = !{!37, !16, i64 20}
!43 = !{!37, !16, i64 28}
!44 = !{!37, !16, i64 0}
!45 = !{!46, !47, i64 0}
!46 = !{!"_ZTS24VkSwapchainCreateInfoKHR", !47, i64 0, !8, i64 8, !16, i64 16, !8, i64 24, !16, i64 32, !24, i64 36, !48, i64 40, !25, i64 44, !16, i64 52, !16, i64 56, !49, i64 60, !16, i64 64, !8, i64 72, !38, i64 80, !50, i64 84, !51, i64 88, !16, i64 92, !8, i64 96}
!47 = !{!"_ZTS15VkStructureType", !9, i64 0}
!48 = !{!"_ZTS15VkColorSpaceKHR", !9, i64 0}
!49 = !{!"_ZTS13VkSharingMode", !9, i64 0}
!50 = !{!"_ZTS27VkCompositeAlphaFlagBitsKHR", !9, i64 0}
!51 = !{!"_ZTS16VkPresentModeKHR", !9, i64 0}
!52 = !{!46, !8, i64 24}
!53 = !{!46, !16, i64 32}
!54 = !{!46, !24, i64 36}
!55 = !{!46, !48, i64 40}
!56 = !{!46, !16, i64 52}
!57 = !{!46, !16, i64 56}
!58 = !{!6, !16, i64 1384}
!59 = !{!6, !16, i64 1388}
!60 = !{!46, !16, i64 64}
!61 = !{!46, !8, i64 72}
!62 = !{!46, !49, i64 60}
!63 = !{!37, !38, i64 40}
!64 = !{!46, !38, i64 80}
!65 = !{!46, !50, i64 84}
!66 = !{!46, !51, i64 88}
!67 = !{!46, !16, i64 92}
!68 = !{!6, !8, i64 1376}
!69 = !{!6, !8, i64 1416}
!70 = !{!6, !8, i64 848}
!71 = !{!6, !16, i64 856}
!72 = !{!8, !8, i64 0}
!73 = distinct !{!73, !74}
!74 = !{!"llvm.loop.mustprogress"}
!75 = distinct !{!75, !74}
!76 = !{!77, !16, i64 0}
!77 = !{!"_ZTS12VkMemoryType", !16, i64 0, !16, i64 4}
!78 = !{!6, !8, i64 1496}
!79 = !{!6, !8, i64 1512}
!80 = !{!81, !47, i64 0}
!81 = !{!"_ZTS23VkFramebufferCreateInfo", !47, i64 0, !8, i64 8, !16, i64 16, !8, i64 24, !16, i64 32, !8, i64 40, !16, i64 48, !16, i64 52, !16, i64 56}
!82 = !{!6, !8, i64 1600}
!83 = !{!81, !8, i64 24}
!84 = !{!81, !16, i64 32}
!85 = !{!81, !8, i64 40}
!86 = !{!81, !16, i64 56}
!87 = distinct !{!87, !74}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MergedLoadStoreMotionPass,ReassociatePass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass