; LLVM IR from hadryansalles/Luz :: deps/imgui (imgui_impl_vulkan)

; 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.VkImageSubresourceRange = type { i32, i32, i32, 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.VkExtent2D = type { i32, i32 }
%struct.VkSurfaceCapabilitiesKHR = type { i32, i32, %struct.VkExtent2D, %struct.VkExtent2D, %struct.VkExtent2D, i32, i32, i32, i32, i32 }
%struct.VkAttachmentDescription = type { i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.VkAttachmentReference = type { i32, i32 }
%struct.VkSubpassDescription = type { i32, i32, i32, ptr, i32, ptr, ptr, ptr, i32, ptr }
%struct.VkSubpassDependency = type { i32, i32, i32, i32, i32, i32, i32 }
%struct.VkRenderPassCreateInfo = type { i32, ptr, i32, i32, ptr, i32, ptr, i32, ptr }
%struct.VkImageViewCreateInfo = type { i32, ptr, i32, ptr, i32, i32, %struct.VkComponentMapping, %struct.VkImageSubresourceRange }
%struct.VkComponentMapping = type { i32, i32, i32, i32 }
%struct.VkFramebufferCreateInfo = type { i32, ptr, i32, ptr, i32, ptr, i32, i32, i32 }
%struct.ImGui_ImplVulkanH_Window = type { i32, i32, ptr, ptr, %struct.VkSurfaceFormatKHR, i32, ptr, ptr, i8, i8, %union.VkClearValue, i32, i32, i32, i32, ptr, ptr }
%struct.VkSurfaceFormatKHR = type { i32, i32 }
%union.VkClearValue = type { %union.VkClearColorValue }
%union.VkClearColorValue = type { [4 x float] }
%struct.ImGui_ImplVulkanH_Frame = type { ptr, ptr, ptr, ptr, ptr, ptr }
%struct.ImGui_ImplVulkanH_FrameSemaphores = type { ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [34 x i8], align 1
@__PRETTY_FUNCTION__._Z39ImGui_ImplVulkanH_CreateWindowSwapChainP18VkPhysicalDevice_TP10VkDevice_TP24ImGui_ImplVulkanH_WindowPK21VkAllocationCallbacksiij = external hidden unnamed_addr constant [152 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [56 x i8], align 1
@__const._Z39ImGui_ImplVulkanH_CreateWindowSwapChainP18VkPhysicalDevice_TP10VkDevice_TP24ImGui_ImplVulkanH_WindowPK21VkAllocationCallbacksiij.image_range = external hidden unnamed_addr constant %struct.VkImageSubresourceRange, align 4

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

declare noundef ptr @_ZN5ImGui8MemAllocEm(i64 noundef) #2

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL15check_vk_result8VkResult(i32 noundef) #4

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

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

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

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

declare void @_ZN5ImGui7MemFreeEPv(ptr noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z49ImGui_ImplVulkanH_GetMinImageCountFromPresentMode16VkPresentModeKHR(i32 noundef) #6

; Function Attrs: mustprogress uwtable
define dso_local void @_Z39ImGui_ImplVulkanH_CreateWindowSwapChainP18VkPhysicalDevice_TP10VkDevice_TP24ImGui_ImplVulkanH_WindowPK21VkAllocationCallbacksiij(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6) #4 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %struct.VkSwapchainCreateInfoKHR, align 8
  %20 = alloca %struct.VkSurfaceCapabilitiesKHR, align 4
  %21 = alloca [16 x ptr], align 16
  %22 = alloca i32, align 4
  %23 = alloca %struct.VkAttachmentDescription, align 4
  %24 = alloca %struct.VkAttachmentReference, align 4
  %25 = alloca %struct.VkSubpassDescription, align 8
  %26 = alloca %struct.VkSubpassDependency, align 4
  %27 = alloca %struct.VkRenderPassCreateInfo, align 8
  %28 = alloca %struct.VkImageViewCreateInfo, align 8
  %29 = alloca %struct.VkImageSubresourceRange, align 4
  %30 = alloca i32, align 4
  %31 = alloca ptr, align 8
  %32 = alloca [1 x ptr], align 8
  %33 = alloca %struct.VkFramebufferCreateInfo, align 8
  %34 = alloca i32, align 4
  %35 = alloca ptr, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store i32 %4, ptr %12, align 4, !tbaa !9
  store i32 %5, ptr %13, align 4, !tbaa !9
  store i32 %6, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %36 = load ptr, ptr %10, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %36, i32 0, i32 2
  %38 = load ptr, ptr %37, align 8, !tbaa !11
  store ptr %38, ptr %16, align 8, !tbaa !5
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %39, i32 0, i32 2
  store ptr null, ptr %40, align 8, !tbaa !11
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  %42 = call i32 @vkDeviceWaitIdle(ptr noundef %41)
  store i32 %42, ptr %15, align 4, !tbaa !18
  %43 = load i32, ptr %15, align 4, !tbaa !18
  call void @_ZL15check_vk_result8VkResult(i32 noundef %43)
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %60, %7
  %45 = load i32, ptr %17, align 4, !tbaa !9
  %46 = load ptr, ptr %10, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %46, i32 0, i32 12
  %48 = load i32, ptr %47, align 8, !tbaa !20
  %49 = icmp ult i32 %45, %48
  br i1 %49, label %51, label %50

50:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %63

51:                                               ; preds = %44
  %52 = load ptr, ptr %9, align 8, !tbaa !5
  %53 = load ptr, ptr %10, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %53, i32 0, i32 15
  %55 = load ptr, ptr %54, align 8, !tbaa !21
  %56 = load i32, ptr %17, align 4, !tbaa !9
  %57 = zext i32 %56 to i64
  %58 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %55, i64 %57
  %59 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_Z30ImGui_ImplVulkanH_DestroyFrameP10VkDevice_TP23ImGui_ImplVulkanH_FramePK21VkAllocationCallbacks(ptr noundef %52, ptr noundef %58, ptr noundef %59)
  br label %60

60:                                               ; preds = %51
  %61 = load i32, ptr %17, align 4, !tbaa !9
  %62 = add i32 %61, 1
  store i32 %62, ptr %17, align 4, !tbaa !9
  br label %44, !llvm.loop !22

63:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %64

64:                                               ; preds = %80, %63
  %65 = load i32, ptr %18, align 4, !tbaa !9
  %66 = load ptr, ptr %10, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %66, i32 0, i32 13
  %68 = load i32, ptr %67, align 4, !tbaa !24
  %69 = icmp ult i32 %65, %68
  br i1 %69, label %71, label %70

70:                                               ; preds = %64
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %83

71:                                               ; preds = %64
  %72 = load ptr, ptr %9, align 8, !tbaa !5
  %73 = load ptr, ptr %10, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %73, i32 0, i32 16
  %75 = load ptr, ptr %74, align 8, !tbaa !25
  %76 = load i32, ptr %18, align 4, !tbaa !9
  %77 = zext i32 %76 to i64
  %78 = getelementptr inbounds %struct.ImGui_ImplVulkanH_FrameSemaphores, ptr %75, i64 %77
  %79 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_Z40ImGui_ImplVulkanH_DestroyFrameSemaphoresP10VkDevice_TP33ImGui_ImplVulkanH_FrameSemaphoresPK21VkAllocationCallbacks(ptr noundef %72, ptr noundef %78, ptr noundef %79)
  br label %80

80:                                               ; preds = %71
  %81 = load i32, ptr %18, align 4, !tbaa !9
  %82 = add i32 %81, 1
  store i32 %82, ptr %18, align 4, !tbaa !9
  br label %64, !llvm.loop !26

83:                                               ; preds = %70
  %84 = load ptr, ptr %10, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %84, i32 0, i32 15
  %86 = load ptr, ptr %85, align 8, !tbaa !21
  call void @_ZN5ImGui7MemFreeEPv(ptr noundef %86)
  %87 = load ptr, ptr %10, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %87, i32 0, i32 16
  %89 = load ptr, ptr %88, align 8, !tbaa !25
  call void @_ZN5ImGui7MemFreeEPv(ptr noundef %89)
  %90 = load ptr, ptr %10, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %90, i32 0, i32 15
  store ptr null, ptr %91, align 8, !tbaa !21
  %92 = load ptr, ptr %10, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %92, i32 0, i32 16
  store ptr null, ptr %93, align 8, !tbaa !25
  %94 = load ptr, ptr %10, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %94, i32 0, i32 12
  store i32 0, ptr %95, align 8, !tbaa !20
  %96 = load ptr, ptr %10, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %96, i32 0, i32 6
  %98 = load ptr, ptr %97, align 8, !tbaa !27
  %99 = icmp ne ptr %98, null
  br i1 %99, label %100, label %106

100:                                              ; preds = %83
  %101 = load ptr, ptr %9, align 8, !tbaa !5
  %102 = load ptr, ptr %10, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %102, i32 0, i32 6
  %104 = load ptr, ptr %103, align 8, !tbaa !27
  %105 = load ptr, ptr %11, align 8, !tbaa !5
  call void @vkDestroyRenderPass(ptr noundef %101, ptr noundef %104, ptr noundef %105)
  br label %106

106:                                              ; preds = %100, %83
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %107, i32 0, i32 7
  %109 = load ptr, ptr %108, align 8, !tbaa !28
  %110 = icmp ne ptr %109, null
  br i1 %110, label %111, label %117

111:                                              ; preds = %106
  %112 = load ptr, ptr %9, align 8, !tbaa !5
  %113 = load ptr, ptr %10, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %113, i32 0, i32 7
  %115 = load ptr, ptr %114, align 8, !tbaa !28
  %116 = load ptr, ptr %11, align 8, !tbaa !5
  call void @vkDestroyPipeline(ptr noundef %112, ptr noundef %115, ptr noundef %116)
  br label %117

117:                                              ; preds = %111, %106
  %118 = load i32, ptr %14, align 4, !tbaa !9
  %119 = icmp eq i32 %118, 0
  br i1 %119, label %120, label %125

120:                                              ; preds = %117
  %121 = load ptr, ptr %10, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %121, i32 0, i32 5
  %123 = load i32, ptr %122, align 8, !tbaa !29
  %124 = call noundef i32 @_Z49ImGui_ImplVulkanH_GetMinImageCountFromPresentMode16VkPresentModeKHR(i32 noundef %123)
  store i32 %124, ptr %14, align 4, !tbaa !9
  br label %125

125:                                              ; preds = %120, %117
  call void @llvm.lifetime.start.p0(i64 104, ptr %19) #7
  call void @llvm.memset.p0.i64(ptr align 8 %19, i8 0, i64 104, i1 false)
  %126 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %19, i32 0, i32 0
  store i32 1000001000, ptr %126, align 8, !tbaa !30
  %127 = load ptr, ptr %10, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %127, i32 0, i32 3
  %129 = load ptr, ptr %128, align 8, !tbaa !37
  %130 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %19, i32 0, i32 3
  store ptr %129, ptr %130, align 8, !tbaa !38
  %131 = load i32, ptr %14, align 4, !tbaa !9
  %132 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %19, i32 0, i32 4
  store i32 %131, ptr %132, align 8, !tbaa !39
  %133 = load ptr, ptr %10, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %133, i32 0, i32 4
  %135 = getelementptr inbounds %struct.VkSurfaceFormatKHR, ptr %134, i32 0, i32 0
  %136 = load i32, ptr %135, align 8, !tbaa !40
  %137 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %19, i32 0, i32 5
  store i32 %136, ptr %137, align 4, !tbaa !41
  %138 = load ptr, ptr %10, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %138, i32 0, i32 4
  %140 = getelementptr inbounds %struct.VkSurfaceFormatKHR, ptr %139, i32 0, i32 1
  %141 = load i32, ptr %140, align 4, !tbaa !42
  %142 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %19, i32 0, i32 6
  store i32 %141, ptr %142, align 8, !tbaa !43
  %143 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %19, i32 0, i32 8
  store i32 1, ptr %143, align 4, !tbaa !44
  %144 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %19, i32 0, i32 9
  store i32 16, ptr %144, align 8, !tbaa !45
  %145 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %19, i32 0, i32 10
  store i32 0, ptr %145, align 4, !tbaa !46
  %146 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %19, i32 0, i32 13
  store i32 1, ptr %146, align 8, !tbaa !47
  %147 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %19, i32 0, i32 14
  store i32 1, ptr %147, align 4, !tbaa !48
  %148 = load ptr, ptr %10, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %148, i32 0, i32 5
  %150 = load i32, ptr %149, align 8, !tbaa !29
  %151 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %19, i32 0, i32 15
  store i32 %150, ptr %151, align 8, !tbaa !49
  %152 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %19, i32 0, i32 16
  store i32 1, ptr %152, align 4, !tbaa !50
  %153 = load ptr, ptr %16, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %19, i32 0, i32 17
  store ptr %153, ptr %154, align 8, !tbaa !51
  call void @llvm.lifetime.start.p0(i64 52, ptr %20) #7
  %155 = load ptr, ptr %8, align 8, !tbaa !5
  %156 = load ptr, ptr %10, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %156, i32 0, i32 3
  %158 = load ptr, ptr %157, align 8, !tbaa !37
  %159 = call i32 @vkGetPhysicalDeviceSurfaceCapabilitiesKHR(ptr noundef %155, ptr noundef %158, ptr noundef %20)
  store i32 %159, ptr %15, align 4, !tbaa !18
  %160 = load i32, ptr %15, align 4, !tbaa !18
  call void @_ZL15check_vk_result8VkResult(i32 noundef %160)
  %161 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %19, i32 0, i32 4
  %162 = load i32, ptr %161, align 8, !tbaa !39
  %163 = getelementptr inbounds %struct.VkSurfaceCapabilitiesKHR, ptr %20, i32 0, i32 0
  %164 = load i32, ptr %163, align 4, !tbaa !52
  %165 = icmp ult i32 %162, %164
  br i1 %165, label %166, label %170

166:                                              ; preds = %125
  %167 = getelementptr inbounds %struct.VkSurfaceCapabilitiesKHR, ptr %20, i32 0, i32 0
  %168 = load i32, ptr %167, align 4, !tbaa !52
  %169 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %19, i32 0, i32 4
  store i32 %168, ptr %169, align 8, !tbaa !39
  br label %185

170:                                              ; preds = %125
  %171 = getelementptr inbounds %struct.VkSurfaceCapabilitiesKHR, ptr %20, i32 0, i32 1
  %172 = load i32, ptr %171, align 4, !tbaa !54
  %173 = icmp ne i32 %172, 0
  br i1 %173, label %174, label %184

174:                                              ; preds = %170
  %175 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %19, i32 0, i32 4
  %176 = load i32, ptr %175, align 8, !tbaa !39
  %177 = getelementptr inbounds %struct.VkSurfaceCapabilitiesKHR, ptr %20, i32 0, i32 1
  %178 = load i32, ptr %177, align 4, !tbaa !54
  %179 = icmp ugt i32 %176, %178
  br i1 %179, label %180, label %184

180:                                              ; preds = %174
  %181 = getelementptr inbounds %struct.VkSurfaceCapabilitiesKHR, ptr %20, i32 0, i32 1
  %182 = load i32, ptr %181, align 4, !tbaa !54
  %183 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %19, i32 0, i32 4
  store i32 %182, ptr %183, align 8, !tbaa !39
  br label %184

184:                                              ; preds = %180, %174, %170
  br label %185

185:                                              ; preds = %184, %166
  %186 = getelementptr inbounds %struct.VkSurfaceCapabilitiesKHR, ptr %20, i32 0, i32 2
  %187 = getelementptr inbounds %struct.VkExtent2D, ptr %186, i32 0, i32 0
  %188 = load i32, ptr %187, align 4, !tbaa !55
  %189 = icmp eq i32 %188, -1
  br i1 %189, label %190, label %201

190:                                              ; preds = %185
  %191 = load i32, ptr %12, align 4, !tbaa !9
  %192 = load ptr, ptr %10, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %192, i32 0, i32 0
  store i32 %191, ptr %193, align 8, !tbaa !56
  %194 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %19, i32 0, i32 7
  %195 = getelementptr inbounds %struct.VkExtent2D, ptr %194, i32 0, i32 0
  store i32 %191, ptr %195, align 4, !tbaa !57
  %196 = load i32, ptr %13, align 4, !tbaa !9
  %197 = load ptr, ptr %10, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %197, i32 0, i32 1
  store i32 %196, ptr %198, align 4, !tbaa !58
  %199 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %19, i32 0, i32 7
  %200 = getelementptr inbounds %struct.VkExtent2D, ptr %199, i32 0, i32 1
  store i32 %196, ptr %200, align 4, !tbaa !59
  br label %216

201:                                              ; preds = %185
  %202 = getelementptr inbounds %struct.VkSurfaceCapabilitiesKHR, ptr %20, i32 0, i32 2
  %203 = getelementptr inbounds %struct.VkExtent2D, ptr %202, i32 0, i32 0
  %204 = load i32, ptr %203, align 4, !tbaa !55
  %205 = load ptr, ptr %10, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %205, i32 0, i32 0
  store i32 %204, ptr %206, align 8, !tbaa !56
  %207 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %19, i32 0, i32 7
  %208 = getelementptr inbounds %struct.VkExtent2D, ptr %207, i32 0, i32 0
  store i32 %204, ptr %208, align 4, !tbaa !57
  %209 = getelementptr inbounds %struct.VkSurfaceCapabilitiesKHR, ptr %20, i32 0, i32 2
  %210 = getelementptr inbounds %struct.VkExtent2D, ptr %209, i32 0, i32 1
  %211 = load i32, ptr %210, align 4, !tbaa !60
  %212 = load ptr, ptr %10, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %212, i32 0, i32 1
  store i32 %211, ptr %213, align 4, !tbaa !58
  %214 = getelementptr inbounds %struct.VkSwapchainCreateInfoKHR, ptr %19, i32 0, i32 7
  %215 = getelementptr inbounds %struct.VkExtent2D, ptr %214, i32 0, i32 1
  store i32 %211, ptr %215, align 4, !tbaa !59
  br label %216

216:                                              ; preds = %201, %190
  %217 = load ptr, ptr %9, align 8, !tbaa !5
  %218 = load ptr, ptr %11, align 8, !tbaa !5
  %219 = load ptr, ptr %10, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %219, i32 0, i32 2
  %221 = call i32 @vkCreateSwapchainKHR(ptr noundef %217, ptr noundef %19, ptr noundef %218, ptr noundef %220)
  store i32 %221, ptr %15, align 4, !tbaa !18
  %222 = load i32, ptr %15, align 4, !tbaa !18
  call void @_ZL15check_vk_result8VkResult(i32 noundef %222)
  %223 = load ptr, ptr %9, align 8, !tbaa !5
  %224 = load ptr, ptr %10, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %224, i32 0, i32 2
  %226 = load ptr, ptr %225, align 8, !tbaa !11
  %227 = load ptr, ptr %10, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %227, i32 0, i32 12
  %229 = call i32 @vkGetSwapchainImagesKHR(ptr noundef %223, ptr noundef %226, ptr noundef %228, ptr noundef null)
  store i32 %229, ptr %15, align 4, !tbaa !18
  %230 = load i32, ptr %15, align 4, !tbaa !18
  call void @_ZL15check_vk_result8VkResult(i32 noundef %230)
  call void @llvm.lifetime.start.p0(i64 128, ptr %21) #7
  call void @llvm.memset.p0.i64(ptr align 16 %21, i8 0, i64 128, i1 false)
  %231 = load ptr, ptr %10, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %231, i32 0, i32 12
  %233 = load i32, ptr %232, align 8, !tbaa !20
  %234 = load i32, ptr %14, align 4, !tbaa !9
  %235 = icmp uge i32 %233, %234
  br i1 %235, label %236, label %237

236:                                              ; preds = %216
  br label %239

237:                                              ; preds = %216
  call void @__assert_fail(ptr noundef @.str.31, ptr noundef @.str.1, i32 noundef 1485, ptr noundef @__PRETTY_FUNCTION__._Z39ImGui_ImplVulkanH_CreateWindowSwapChainP18VkPhysicalDevice_TP10VkDevice_TP24ImGui_ImplVulkanH_WindowPK21VkAllocationCallbacksiij) #8
  unreachable

238:                                              ; No predecessors!
  br label %239

239:                                              ; preds = %238, %236
  %240 = load ptr, ptr %10, align 8, !tbaa !5
  %241 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %240, i32 0, i32 12
  %242 = load i32, ptr %241, align 8, !tbaa !20
  %243 = icmp ult i32 %242, 16
  br i1 %243, label %244, label %245

244:                                              ; preds = %239
  br label %247

245:                                              ; preds = %239
  call void @__assert_fail(ptr noundef @.str.32, ptr noundef @.str.1, i32 noundef 1486, ptr noundef @__PRETTY_FUNCTION__._Z39ImGui_ImplVulkanH_CreateWindowSwapChainP18VkPhysicalDevice_TP10VkDevice_TP24ImGui_ImplVulkanH_WindowPK21VkAllocationCallbacksiij) #8
  unreachable

246:                                              ; No predecessors!
  br label %247

247:                                              ; preds = %246, %244
  %248 = load ptr, ptr %9, align 8, !tbaa !5
  %249 = load ptr, ptr %10, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %249, i32 0, i32 2
  %251 = load ptr, ptr %250, align 8, !tbaa !11
  %252 = load ptr, ptr %10, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %252, i32 0, i32 12
  %254 = getelementptr inbounds [16 x ptr], ptr %21, i64 0, i64 0
  %255 = call i32 @vkGetSwapchainImagesKHR(ptr noundef %248, ptr noundef %251, ptr noundef %253, ptr noundef %254)
  store i32 %255, ptr %15, align 4, !tbaa !18
  %256 = load i32, ptr %15, align 4, !tbaa !18
  call void @_ZL15check_vk_result8VkResult(i32 noundef %256)
  %257 = load ptr, ptr %10, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %257, i32 0, i32 15
  %259 = load ptr, ptr %258, align 8, !tbaa !21
  %260 = icmp eq ptr %259, null
  br i1 %260, label %261, label %266

261:                                              ; preds = %247
  %262 = load ptr, ptr %10, align 8, !tbaa !5
  %263 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %262, i32 0, i32 16
  %264 = load ptr, ptr %263, align 8, !tbaa !25
  %265 = icmp eq ptr %264, null
  br label %266

266:                                              ; preds = %261, %247
  %267 = phi i1 [ false, %247 ], [ %265, %261 ]
  br i1 %267, label %268, label %269

268:                                              ; preds = %266
  br label %271

269:                                              ; preds = %266
  call void @__assert_fail(ptr noundef @.str.33, ptr noundef @.str.1, i32 noundef 1490, ptr noundef @__PRETTY_FUNCTION__._Z39ImGui_ImplVulkanH_CreateWindowSwapChainP18VkPhysicalDevice_TP10VkDevice_TP24ImGui_ImplVulkanH_WindowPK21VkAllocationCallbacksiij) #8
  unreachable

270:                                              ; No predecessors!
  br label %271

271:                                              ; preds = %270, %268
  %272 = load ptr, ptr %10, align 8, !tbaa !5
  %273 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %272, i32 0, i32 12
  %274 = load i32, ptr %273, align 8, !tbaa !20
  %275 = add i32 %274, 1
  %276 = load ptr, ptr %10, align 8, !tbaa !5
  %277 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %276, i32 0, i32 13
  store i32 %275, ptr %277, align 4, !tbaa !24
  %278 = load ptr, ptr %10, align 8, !tbaa !5
  %279 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %278, i32 0, i32 12
  %280 = load i32, ptr %279, align 8, !tbaa !20
  %281 = zext i32 %280 to i64
  %282 = mul i64 48, %281
  %283 = call noundef ptr @_ZN5ImGui8MemAllocEm(i64 noundef %282)
  %284 = load ptr, ptr %10, align 8, !tbaa !5
  %285 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %284, i32 0, i32 15
  store ptr %283, ptr %285, align 8, !tbaa !21
  %286 = load ptr, ptr %10, align 8, !tbaa !5
  %287 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %286, i32 0, i32 13
  %288 = load i32, ptr %287, align 4, !tbaa !24
  %289 = zext i32 %288 to i64
  %290 = mul i64 16, %289
  %291 = call noundef ptr @_ZN5ImGui8MemAllocEm(i64 noundef %290)
  %292 = load ptr, ptr %10, align 8, !tbaa !5
  %293 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %292, i32 0, i32 16
  store ptr %291, ptr %293, align 8, !tbaa !25
  %294 = load ptr, ptr %10, align 8, !tbaa !5
  %295 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %294, i32 0, i32 15
  %296 = load ptr, ptr %295, align 8, !tbaa !21
  %297 = load ptr, ptr %10, align 8, !tbaa !5
  %298 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %297, i32 0, i32 12
  %299 = load i32, ptr %298, align 8, !tbaa !20
  %300 = zext i32 %299 to i64
  %301 = mul i64 48, %300
  call void @llvm.memset.p0.i64(ptr align 8 %296, i8 0, i64 %301, i1 false)
  %302 = load ptr, ptr %10, align 8, !tbaa !5
  %303 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %302, i32 0, i32 16
  %304 = load ptr, ptr %303, align 8, !tbaa !25
  %305 = load ptr, ptr %10, align 8, !tbaa !5
  %306 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %305, i32 0, i32 13
  %307 = load i32, ptr %306, align 4, !tbaa !24
  %308 = zext i32 %307 to i64
  %309 = mul i64 16, %308
  call void @llvm.memset.p0.i64(ptr align 8 %304, i8 0, i64 %309, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %310

310:                                              ; preds = %329, %271
  %311 = load i32, ptr %22, align 4, !tbaa !9
  %312 = load ptr, ptr %10, align 8, !tbaa !5
  %313 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %312, i32 0, i32 12
  %314 = load i32, ptr %313, align 8, !tbaa !20
  %315 = icmp ult i32 %311, %314
  br i1 %315, label %317, label %316

316:                                              ; preds = %310
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %332

317:                                              ; preds = %310
  %318 = load i32, ptr %22, align 4, !tbaa !9
  %319 = zext i32 %318 to i64
  %320 = getelementptr inbounds [16 x ptr], ptr %21, i64 0, i64 %319
  %321 = load ptr, ptr %320, align 8, !tbaa !5
  %322 = load ptr, ptr %10, align 8, !tbaa !5
  %323 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %322, i32 0, i32 15
  %324 = load ptr, ptr %323, align 8, !tbaa !21
  %325 = load i32, ptr %22, align 4, !tbaa !9
  %326 = zext i32 %325 to i64
  %327 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %324, i64 %326
  %328 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %327, i32 0, i32 3
  store ptr %321, ptr %328, align 8, !tbaa !61
  br label %329

329:                                              ; preds = %317
  %330 = load i32, ptr %22, align 4, !tbaa !9
  %331 = add i32 %330, 1
  store i32 %331, ptr %22, align 4, !tbaa !9
  br label %310, !llvm.loop !63

332:                                              ; preds = %316
  call void @llvm.lifetime.end.p0(i64 128, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 52, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 104, ptr %19) #7
  %333 = load ptr, ptr %16, align 8, !tbaa !5
  %334 = icmp ne ptr %333, null
  br i1 %334, label %335, label %339

335:                                              ; preds = %332
  %336 = load ptr, ptr %9, align 8, !tbaa !5
  %337 = load ptr, ptr %16, align 8, !tbaa !5
  %338 = load ptr, ptr %11, align 8, !tbaa !5
  call void @vkDestroySwapchainKHR(ptr noundef %336, ptr noundef %337, ptr noundef %338)
  br label %339

339:                                              ; preds = %335, %332
  %340 = load ptr, ptr %10, align 8, !tbaa !5
  %341 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %340, i32 0, i32 8
  %342 = load i8, ptr %341, align 8, !tbaa !64, !range !65, !noundef !66
  %343 = trunc i8 %342 to i1
  %344 = zext i1 %343 to i32
  %345 = icmp eq i32 %344, 0
  br i1 %345, label %346, label %389

346:                                              ; preds = %339
  call void @llvm.lifetime.start.p0(i64 36, ptr %23) #7
  call void @llvm.memset.p0.i64(ptr align 4 %23, i8 0, i64 36, i1 false)
  %347 = load ptr, ptr %10, align 8, !tbaa !5
  %348 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %347, i32 0, i32 4
  %349 = getelementptr inbounds %struct.VkSurfaceFormatKHR, ptr %348, i32 0, i32 0
  %350 = load i32, ptr %349, align 8, !tbaa !40
  %351 = getelementptr inbounds %struct.VkAttachmentDescription, ptr %23, i32 0, i32 1
  store i32 %350, ptr %351, align 4, !tbaa !67
  %352 = getelementptr inbounds %struct.VkAttachmentDescription, ptr %23, i32 0, i32 2
  store i32 1, ptr %352, align 4, !tbaa !73
  %353 = load ptr, ptr %10, align 8, !tbaa !5
  %354 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %353, i32 0, i32 9
  %355 = load i8, ptr %354, align 1, !tbaa !74, !range !65, !noundef !66
  %356 = trunc i8 %355 to i1
  %357 = zext i1 %356 to i64
  %358 = select i1 %356, i32 1, i32 2
  %359 = getelementptr inbounds %struct.VkAttachmentDescription, ptr %23, i32 0, i32 3
  store i32 %358, ptr %359, align 4, !tbaa !75
  %360 = getelementptr inbounds %struct.VkAttachmentDescription, ptr %23, i32 0, i32 4
  store i32 0, ptr %360, align 4, !tbaa !76
  %361 = getelementptr inbounds %struct.VkAttachmentDescription, ptr %23, i32 0, i32 5
  store i32 2, ptr %361, align 4, !tbaa !77
  %362 = getelementptr inbounds %struct.VkAttachmentDescription, ptr %23, i32 0, i32 6
  store i32 1, ptr %362, align 4, !tbaa !78
  %363 = getelementptr inbounds %struct.VkAttachmentDescription, ptr %23, i32 0, i32 7
  store i32 0, ptr %363, align 4, !tbaa !79
  %364 = getelementptr inbounds %struct.VkAttachmentDescription, ptr %23, i32 0, i32 8
  store i32 1000001002, ptr %364, align 4, !tbaa !80
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  call void @llvm.memset.p0.i64(ptr align 4 %24, i8 0, i64 8, i1 false)
  %365 = getelementptr inbounds %struct.VkAttachmentReference, ptr %24, i32 0, i32 0
  store i32 0, ptr %365, align 4, !tbaa !81
  %366 = getelementptr inbounds %struct.VkAttachmentReference, ptr %24, i32 0, i32 1
  store i32 2, ptr %366, align 4, !tbaa !83
  call void @llvm.lifetime.start.p0(i64 72, ptr %25) #7
  call void @llvm.memset.p0.i64(ptr align 8 %25, i8 0, i64 72, i1 false)
  %367 = getelementptr inbounds %struct.VkSubpassDescription, ptr %25, i32 0, i32 1
  store i32 0, ptr %367, align 4, !tbaa !84
  %368 = getelementptr inbounds %struct.VkSubpassDescription, ptr %25, i32 0, i32 4
  store i32 1, ptr %368, align 8, !tbaa !87
  %369 = getelementptr inbounds %struct.VkSubpassDescription, ptr %25, i32 0, i32 5
  store ptr %24, ptr %369, align 8, !tbaa !88
  call void @llvm.lifetime.start.p0(i64 28, ptr %26) #7
  call void @llvm.memset.p0.i64(ptr align 4 %26, i8 0, i64 28, i1 false)
  %370 = getelementptr inbounds %struct.VkSubpassDependency, ptr %26, i32 0, i32 0
  store i32 -1, ptr %370, align 4, !tbaa !89
  %371 = getelementptr inbounds %struct.VkSubpassDependency, ptr %26, i32 0, i32 1
  store i32 0, ptr %371, align 4, !tbaa !91
  %372 = getelementptr inbounds %struct.VkSubpassDependency, ptr %26, i32 0, i32 2
  store i32 1024, ptr %372, align 4, !tbaa !92
  %373 = getelementptr inbounds %struct.VkSubpassDependency, ptr %26, i32 0, i32 3
  store i32 1024, ptr %373, align 4, !tbaa !93
  %374 = getelementptr inbounds %struct.VkSubpassDependency, ptr %26, i32 0, i32 4
  store i32 0, ptr %374, align 4, !tbaa !94
  %375 = getelementptr inbounds %struct.VkSubpassDependency, ptr %26, i32 0, i32 5
  store i32 256, ptr %375, align 4, !tbaa !95
  call void @llvm.lifetime.start.p0(i64 64, ptr %27) #7
  call void @llvm.memset.p0.i64(ptr align 8 %27, i8 0, i64 64, i1 false)
  %376 = getelementptr inbounds %struct.VkRenderPassCreateInfo, ptr %27, i32 0, i32 0
  store i32 38, ptr %376, align 8, !tbaa !96
  %377 = getelementptr inbounds %struct.VkRenderPassCreateInfo, ptr %27, i32 0, i32 3
  store i32 1, ptr %377, align 4, !tbaa !98
  %378 = getelementptr inbounds %struct.VkRenderPassCreateInfo, ptr %27, i32 0, i32 4
  store ptr %23, ptr %378, align 8, !tbaa !99
  %379 = getelementptr inbounds %struct.VkRenderPassCreateInfo, ptr %27, i32 0, i32 5
  store i32 1, ptr %379, align 8, !tbaa !100
  %380 = getelementptr inbounds %struct.VkRenderPassCreateInfo, ptr %27, i32 0, i32 6
  store ptr %25, ptr %380, align 8, !tbaa !101
  %381 = getelementptr inbounds %struct.VkRenderPassCreateInfo, ptr %27, i32 0, i32 7
  store i32 1, ptr %381, align 8, !tbaa !102
  %382 = getelementptr inbounds %struct.VkRenderPassCreateInfo, ptr %27, i32 0, i32 8
  store ptr %26, ptr %382, align 8, !tbaa !103
  %383 = load ptr, ptr %9, align 8, !tbaa !5
  %384 = load ptr, ptr %11, align 8, !tbaa !5
  %385 = load ptr, ptr %10, align 8, !tbaa !5
  %386 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %385, i32 0, i32 6
  %387 = call i32 @vkCreateRenderPass(ptr noundef %383, ptr noundef %27, ptr noundef %384, ptr noundef %386)
  store i32 %387, ptr %15, align 4, !tbaa !18
  %388 = load i32, ptr %15, align 4, !tbaa !18
  call void @_ZL15check_vk_result8VkResult(i32 noundef %388)
  call void @llvm.lifetime.end.p0(i64 64, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 28, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr %23) #7
  br label %389

389:                                              ; preds = %346, %339
  call void @llvm.lifetime.start.p0(i64 80, ptr %28) #7
  call void @llvm.memset.p0.i64(ptr align 8 %28, i8 0, i64 80, i1 false)
  %390 = getelementptr inbounds %struct.VkImageViewCreateInfo, ptr %28, i32 0, i32 0
  store i32 15, ptr %390, align 8, !tbaa !104
  %391 = getelementptr inbounds %struct.VkImageViewCreateInfo, ptr %28, i32 0, i32 4
  store i32 1, ptr %391, align 8, !tbaa !110
  %392 = load ptr, ptr %10, align 8, !tbaa !5
  %393 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %392, i32 0, i32 4
  %394 = getelementptr inbounds %struct.VkSurfaceFormatKHR, ptr %393, i32 0, i32 0
  %395 = load i32, ptr %394, align 8, !tbaa !40
  %396 = getelementptr inbounds %struct.VkImageViewCreateInfo, ptr %28, i32 0, i32 5
  store i32 %395, ptr %396, align 4, !tbaa !111
  %397 = getelementptr inbounds %struct.VkImageViewCreateInfo, ptr %28, i32 0, i32 6
  %398 = getelementptr inbounds %struct.VkComponentMapping, ptr %397, i32 0, i32 0
  store i32 3, ptr %398, align 8, !tbaa !112
  %399 = getelementptr inbounds %struct.VkImageViewCreateInfo, ptr %28, i32 0, i32 6
  %400 = getelementptr inbounds %struct.VkComponentMapping, ptr %399, i32 0, i32 1
  store i32 4, ptr %400, align 4, !tbaa !113
  %401 = getelementptr inbounds %struct.VkImageViewCreateInfo, ptr %28, i32 0, i32 6
  %402 = getelementptr inbounds %struct.VkComponentMapping, ptr %401, i32 0, i32 2
  store i32 5, ptr %402, align 8, !tbaa !114
  %403 = getelementptr inbounds %struct.VkImageViewCreateInfo, ptr %28, i32 0, i32 6
  %404 = getelementptr inbounds %struct.VkComponentMapping, ptr %403, i32 0, i32 3
  store i32 6, ptr %404, align 4, !tbaa !115
  call void @llvm.lifetime.start.p0(i64 20, ptr %29) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %29, ptr align 4 @__const._Z39ImGui_ImplVulkanH_CreateWindowSwapChainP18VkPhysicalDevice_TP10VkDevice_TP24ImGui_ImplVulkanH_WindowPK21VkAllocationCallbacksiij.image_range, i64 20, i1 false)
  %405 = getelementptr inbounds %struct.VkImageViewCreateInfo, ptr %28, i32 0, i32 7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %405, ptr align 4 %29, i64 20, i1 false), !tbaa.struct !116
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #7
  store i32 0, ptr %30, align 4, !tbaa !9
  br label %406

406:                                              ; preds = %430, %389
  %407 = load i32, ptr %30, align 4, !tbaa !9
  %408 = load ptr, ptr %10, align 8, !tbaa !5
  %409 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %408, i32 0, i32 12
  %410 = load i32, ptr %409, align 8, !tbaa !20
  %411 = icmp ult i32 %407, %410
  br i1 %411, label %413, label %412

412:                                              ; preds = %406
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  br label %433

413:                                              ; preds = %406
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #7
  %414 = load ptr, ptr %10, align 8, !tbaa !5
  %415 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %414, i32 0, i32 15
  %416 = load ptr, ptr %415, align 8, !tbaa !21
  %417 = load i32, ptr %30, align 4, !tbaa !9
  %418 = zext i32 %417 to i64
  %419 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %416, i64 %418
  store ptr %419, ptr %31, align 8, !tbaa !5
  %420 = load ptr, ptr %31, align 8, !tbaa !5
  %421 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %420, i32 0, i32 3
  %422 = load ptr, ptr %421, align 8, !tbaa !61
  %423 = getelementptr inbounds %struct.VkImageViewCreateInfo, ptr %28, i32 0, i32 3
  store ptr %422, ptr %423, align 8, !tbaa !117
  %424 = load ptr, ptr %9, align 8, !tbaa !5
  %425 = load ptr, ptr %11, align 8, !tbaa !5
  %426 = load ptr, ptr %31, align 8, !tbaa !5
  %427 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %426, i32 0, i32 4
  %428 = call i32 @vkCreateImageView(ptr noundef %424, ptr noundef %28, ptr noundef %425, ptr noundef %427)
  store i32 %428, ptr %15, align 4, !tbaa !18
  %429 = load i32, ptr %15, align 4, !tbaa !18
  call void @_ZL15check_vk_result8VkResult(i32 noundef %429)
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  br label %430

430:                                              ; preds = %413
  %431 = load i32, ptr %30, align 4, !tbaa !9
  %432 = add i32 %431, 1
  store i32 %432, ptr %30, align 4, !tbaa !9
  br label %406, !llvm.loop !118

433:                                              ; preds = %412
  call void @llvm.lifetime.end.p0(i64 20, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %28) #7
  %434 = load ptr, ptr %10, align 8, !tbaa !5
  %435 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %434, i32 0, i32 8
  %436 = load i8, ptr %435, align 8, !tbaa !64, !range !65, !noundef !66
  %437 = trunc i8 %436 to i1
  %438 = zext i1 %437 to i32
  %439 = icmp eq i32 %438, 0
  br i1 %439, label %440, label %486

440:                                              ; preds = %433
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr %33) #7
  call void @llvm.memset.p0.i64(ptr align 8 %33, i8 0, i64 64, i1 false)
  %441 = getelementptr inbounds %struct.VkFramebufferCreateInfo, ptr %33, i32 0, i32 0
  store i32 37, ptr %441, align 8, !tbaa !119
  %442 = load ptr, ptr %10, align 8, !tbaa !5
  %443 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %442, i32 0, i32 6
  %444 = load ptr, ptr %443, align 8, !tbaa !27
  %445 = getelementptr inbounds %struct.VkFramebufferCreateInfo, ptr %33, i32 0, i32 3
  store ptr %444, ptr %445, align 8, !tbaa !121
  %446 = getelementptr inbounds %struct.VkFramebufferCreateInfo, ptr %33, i32 0, i32 4
  store i32 1, ptr %446, align 8, !tbaa !122
  %447 = getelementptr inbounds [1 x ptr], ptr %32, i64 0, i64 0
  %448 = getelementptr inbounds %struct.VkFramebufferCreateInfo, ptr %33, i32 0, i32 5
  store ptr %447, ptr %448, align 8, !tbaa !123
  %449 = load ptr, ptr %10, align 8, !tbaa !5
  %450 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %449, i32 0, i32 0
  %451 = load i32, ptr %450, align 8, !tbaa !56
  %452 = getelementptr inbounds %struct.VkFramebufferCreateInfo, ptr %33, i32 0, i32 6
  store i32 %451, ptr %452, align 8, !tbaa !124
  %453 = load ptr, ptr %10, align 8, !tbaa !5
  %454 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %453, i32 0, i32 1
  %455 = load i32, ptr %454, align 4, !tbaa !58
  %456 = getelementptr inbounds %struct.VkFramebufferCreateInfo, ptr %33, i32 0, i32 7
  store i32 %455, ptr %456, align 4, !tbaa !125
  %457 = getelementptr inbounds %struct.VkFramebufferCreateInfo, ptr %33, i32 0, i32 8
  store i32 1, ptr %457, align 8, !tbaa !126
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #7
  store i32 0, ptr %34, align 4, !tbaa !9
  br label %458

458:                                              ; preds = %482, %440
  %459 = load i32, ptr %34, align 4, !tbaa !9
  %460 = load ptr, ptr %10, align 8, !tbaa !5
  %461 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %460, i32 0, i32 12
  %462 = load i32, ptr %461, align 8, !tbaa !20
  %463 = icmp ult i32 %459, %462
  br i1 %463, label %465, label %464

464:                                              ; preds = %458
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #7
  br label %485

465:                                              ; preds = %458
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #7
  %466 = load ptr, ptr %10, align 8, !tbaa !5
  %467 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %466, i32 0, i32 15
  %468 = load ptr, ptr %467, align 8, !tbaa !21
  %469 = load i32, ptr %34, align 4, !tbaa !9
  %470 = zext i32 %469 to i64
  %471 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %468, i64 %470
  store ptr %471, ptr %35, align 8, !tbaa !5
  %472 = load ptr, ptr %35, align 8, !tbaa !5
  %473 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %472, i32 0, i32 4
  %474 = load ptr, ptr %473, align 8, !tbaa !127
  %475 = getelementptr inbounds [1 x ptr], ptr %32, i64 0, i64 0
  store ptr %474, ptr %475, align 8, !tbaa !5
  %476 = load ptr, ptr %9, align 8, !tbaa !5
  %477 = load ptr, ptr %11, align 8, !tbaa !5
  %478 = load ptr, ptr %35, align 8, !tbaa !5
  %479 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %478, i32 0, i32 5
  %480 = call i32 @vkCreateFramebuffer(ptr noundef %476, ptr noundef %33, ptr noundef %477, ptr noundef %479)
  store i32 %480, ptr %15, align 4, !tbaa !18
  %481 = load i32, ptr %15, align 4, !tbaa !18
  call void @_ZL15check_vk_result8VkResult(i32 noundef %481)
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #7
  br label %482

482:                                              ; preds = %465
  %483 = load i32, ptr %34, align 4, !tbaa !9
  %484 = add i32 %483, 1
  store i32 %484, ptr %34, align 4, !tbaa !9
  br label %458, !llvm.loop !128

485:                                              ; preds = %464
  call void @llvm.lifetime.end.p0(i64 64, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #7
  br label %486

486:                                              ; preds = %485, %433
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  ret void
}

declare i32 @vkDeviceWaitIdle(ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z30ImGui_ImplVulkanH_DestroyFrameP10VkDevice_TP23ImGui_ImplVulkanH_FramePK21VkAllocationCallbacks(ptr noundef, ptr noundef, ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z40ImGui_ImplVulkanH_DestroyFrameSemaphoresP10VkDevice_TP33ImGui_ImplVulkanH_FrameSemaphoresPK21VkAllocationCallbacks(ptr noundef, ptr noundef, ptr noundef) #4

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

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 = { nounwind }
attributes #8 = { noreturn 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 8}
!12 = !{!"_ZTS24ImGui_ImplVulkanH_Window", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16, !13, i64 24, !16, i64 32, !6, i64 40, !6, i64 48, !17, i64 56, !17, i64 57, !7, i64 60, !10, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !6, i64 96, !6, i64 104}
!13 = !{!"_ZTS18VkSurfaceFormatKHR", !14, i64 0, !15, i64 4}
!14 = !{!"_ZTS8VkFormat", !7, i64 0}
!15 = !{!"_ZTS15VkColorSpaceKHR", !7, i64 0}
!16 = !{!"_ZTS16VkPresentModeKHR", !7, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"_ZTS8VkResult", !7, i64 0}
!20 = !{!12, !10, i64 80}
!21 = !{!12, !6, i64 96}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!12, !10, i64 84}
!25 = !{!12, !6, i64 104}
!26 = distinct !{!26, !23}
!27 = !{!12, !6, i64 40}
!28 = !{!12, !6, i64 48}
!29 = !{!12, !16, i64 32}
!30 = !{!31, !32, i64 0}
!31 = !{!"_ZTS24VkSwapchainCreateInfoKHR", !32, i64 0, !6, i64 8, !10, i64 16, !6, i64 24, !10, i64 32, !14, i64 36, !15, i64 40, !33, i64 44, !10, i64 52, !10, i64 56, !34, i64 60, !10, i64 64, !6, i64 72, !35, i64 80, !36, i64 84, !16, i64 88, !10, i64 92, !6, i64 96}
!32 = !{!"_ZTS15VkStructureType", !7, i64 0}
!33 = !{!"_ZTS10VkExtent2D", !10, i64 0, !10, i64 4}
!34 = !{!"_ZTS13VkSharingMode", !7, i64 0}
!35 = !{!"_ZTS29VkSurfaceTransformFlagBitsKHR", !7, i64 0}
!36 = !{!"_ZTS27VkCompositeAlphaFlagBitsKHR", !7, i64 0}
!37 = !{!12, !6, i64 16}
!38 = !{!31, !6, i64 24}
!39 = !{!31, !10, i64 32}
!40 = !{!12, !14, i64 24}
!41 = !{!31, !14, i64 36}
!42 = !{!12, !15, i64 28}
!43 = !{!31, !15, i64 40}
!44 = !{!31, !10, i64 52}
!45 = !{!31, !10, i64 56}
!46 = !{!31, !34, i64 60}
!47 = !{!31, !35, i64 80}
!48 = !{!31, !36, i64 84}
!49 = !{!31, !16, i64 88}
!50 = !{!31, !10, i64 92}
!51 = !{!31, !6, i64 96}
!52 = !{!53, !10, i64 0}
!53 = !{!"_ZTS24VkSurfaceCapabilitiesKHR", !10, i64 0, !10, i64 4, !33, i64 8, !33, i64 16, !33, i64 24, !10, i64 32, !10, i64 36, !35, i64 40, !10, i64 44, !10, i64 48}
!54 = !{!53, !10, i64 4}
!55 = !{!53, !10, i64 8}
!56 = !{!12, !10, i64 0}
!57 = !{!31, !10, i64 44}
!58 = !{!12, !10, i64 4}
!59 = !{!31, !10, i64 48}
!60 = !{!53, !10, i64 12}
!61 = !{!62, !6, i64 24}
!62 = !{!"_ZTS23ImGui_ImplVulkanH_Frame", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!63 = distinct !{!63, !23}
!64 = !{!12, !17, i64 56}
!65 = !{i8 0, i8 2}
!66 = !{}
!67 = !{!68, !14, i64 4}
!68 = !{!"_ZTS23VkAttachmentDescription", !10, i64 0, !14, i64 4, !69, i64 8, !70, i64 12, !71, i64 16, !70, i64 20, !71, i64 24, !72, i64 28, !72, i64 32}
!69 = !{!"_ZTS21VkSampleCountFlagBits", !7, i64 0}
!70 = !{!"_ZTS18VkAttachmentLoadOp", !7, i64 0}
!71 = !{!"_ZTS19VkAttachmentStoreOp", !7, i64 0}
!72 = !{!"_ZTS13VkImageLayout", !7, i64 0}
!73 = !{!68, !69, i64 8}
!74 = !{!12, !17, i64 57}
!75 = !{!68, !70, i64 12}
!76 = !{!68, !71, i64 16}
!77 = !{!68, !70, i64 20}
!78 = !{!68, !71, i64 24}
!79 = !{!68, !72, i64 28}
!80 = !{!68, !72, i64 32}
!81 = !{!82, !10, i64 0}
!82 = !{!"_ZTS21VkAttachmentReference", !10, i64 0, !72, i64 4}
!83 = !{!82, !72, i64 4}
!84 = !{!85, !86, i64 4}
!85 = !{!"_ZTS20VkSubpassDescription", !10, i64 0, !86, i64 4, !10, i64 8, !6, i64 16, !10, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !10, i64 56, !6, i64 64}
!86 = !{!"_ZTS19VkPipelineBindPoint", !7, i64 0}
!87 = !{!85, !10, i64 24}
!88 = !{!85, !6, i64 32}
!89 = !{!90, !10, i64 0}
!90 = !{!"_ZTS19VkSubpassDependency", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24}
!91 = !{!90, !10, i64 4}
!92 = !{!90, !10, i64 8}
!93 = !{!90, !10, i64 12}
!94 = !{!90, !10, i64 16}
!95 = !{!90, !10, i64 20}
!96 = !{!97, !32, i64 0}
!97 = !{!"_ZTS22VkRenderPassCreateInfo", !32, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !6, i64 24, !10, i64 32, !6, i64 40, !10, i64 48, !6, i64 56}
!98 = !{!97, !10, i64 20}
!99 = !{!97, !6, i64 24}
!100 = !{!97, !10, i64 32}
!101 = !{!97, !6, i64 40}
!102 = !{!97, !10, i64 48}
!103 = !{!97, !6, i64 56}
!104 = !{!105, !32, i64 0}
!105 = !{!"_ZTS21VkImageViewCreateInfo", !32, i64 0, !6, i64 8, !10, i64 16, !6, i64 24, !106, i64 32, !14, i64 36, !107, i64 40, !109, i64 56}
!106 = !{!"_ZTS15VkImageViewType", !7, i64 0}
!107 = !{!"_ZTS18VkComponentMapping", !108, i64 0, !108, i64 4, !108, i64 8, !108, i64 12}
!108 = !{!"_ZTS18VkComponentSwizzle", !7, i64 0}
!109 = !{!"_ZTS23VkImageSubresourceRange", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16}
!110 = !{!105, !106, i64 32}
!111 = !{!105, !14, i64 36}
!112 = !{!105, !108, i64 40}
!113 = !{!105, !108, i64 44}
!114 = !{!105, !108, i64 48}
!115 = !{!105, !108, i64 52}
!116 = !{i64 0, i64 4, !9, i64 4, i64 4, !9, i64 8, i64 4, !9, i64 12, i64 4, !9, i64 16, i64 4, !9}
!117 = !{!105, !6, i64 24}
!118 = distinct !{!118, !23}
!119 = !{!120, !32, i64 0}
!120 = !{!"_ZTS23VkFramebufferCreateInfo", !32, i64 0, !6, i64 8, !10, i64 16, !6, i64 24, !10, i64 32, !6, i64 40, !10, i64 48, !10, i64 52, !10, i64 56}
!121 = !{!120, !6, i64 24}
!122 = !{!120, !10, i64 32}
!123 = !{!120, !6, i64 40}
!124 = !{!120, !10, i64 48}
!125 = !{!120, !10, i64 52}
!126 = !{!120, !10, i64 56}
!127 = !{!62, !6, i64 32}
!128 = distinct !{!128, !23}


; 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.VkImageSubresourceRange = type { i32, i32, i32, 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.VkExtent2D = type { i32, i32 }
%struct.VkSurfaceCapabilitiesKHR = type { i32, i32, %struct.VkExtent2D, %struct.VkExtent2D, %struct.VkExtent2D, i32, i32, i32, i32, i32 }
%struct.VkAttachmentDescription = type { i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.VkAttachmentReference = type { i32, i32 }
%struct.VkSubpassDescription = type { i32, i32, i32, ptr, i32, ptr, ptr, ptr, i32, ptr }
%struct.VkSubpassDependency = type { i32, i32, i32, i32, i32, i32, i32 }
%struct.VkRenderPassCreateInfo = type { i32, ptr, i32, i32, ptr, i32, ptr, i32, ptr }
%struct.VkImageViewCreateInfo = type { i32, ptr, i32, ptr, i32, i32, %struct.VkComponentMapping, %struct.VkImageSubresourceRange }
%struct.VkComponentMapping = type { i32, i32, i32, i32 }
%struct.VkFramebufferCreateInfo = type { i32, ptr, i32, ptr, i32, ptr, i32, i32, i32 }
%struct.ImGui_ImplVulkanH_Frame = type { ptr, ptr, ptr, ptr, ptr, ptr }
%struct.ImGui_ImplVulkanH_FrameSemaphores = type { ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [34 x i8], align 1
@__PRETTY_FUNCTION__._Z39ImGui_ImplVulkanH_CreateWindowSwapChainP18VkPhysicalDevice_TP10VkDevice_TP24ImGui_ImplVulkanH_WindowPK21VkAllocationCallbacksiij = external hidden unnamed_addr constant [152 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [56 x i8], align 1
@__const._Z39ImGui_ImplVulkanH_CreateWindowSwapChainP18VkPhysicalDevice_TP10VkDevice_TP24ImGui_ImplVulkanH_WindowPK21VkAllocationCallbacksiij.image_range = external hidden unnamed_addr constant %struct.VkImageSubresourceRange, align 4

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

declare noundef ptr @_ZN5ImGui8MemAllocEm(i64 noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL15check_vk_result8VkResult(i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress 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) #5

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

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

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

declare void @_ZN5ImGui7MemFreeEPv(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z49ImGui_ImplVulkanH_GetMinImageCountFromPresentMode16VkPresentModeKHR(i32 noundef) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
define dso_local void @_Z39ImGui_ImplVulkanH_CreateWindowSwapChainP18VkPhysicalDevice_TP10VkDevice_TP24ImGui_ImplVulkanH_WindowPK21VkAllocationCallbacksiij(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6) local_unnamed_addr #4 {
  %8 = alloca %struct.VkSwapchainCreateInfoKHR, align 8
  %9 = alloca %struct.VkSurfaceCapabilitiesKHR, align 4
  %10 = alloca [16 x ptr], align 16
  %11 = alloca %struct.VkAttachmentDescription, align 4
  %12 = alloca %struct.VkAttachmentReference, align 8
  %13 = alloca %struct.VkSubpassDescription, align 8
  %14 = alloca %struct.VkSubpassDependency, align 16
  %15 = alloca %struct.VkRenderPassCreateInfo, align 8
  %16 = alloca %struct.VkImageViewCreateInfo, align 8
  %17 = alloca [1 x ptr], align 8
  %18 = alloca %struct.VkFramebufferCreateInfo, align 8
  %19 = getelementptr inbounds i8, ptr %2, i64 8
  %20 = load ptr, ptr %19, align 8, !tbaa !5
  store ptr null, ptr %19, align 8, !tbaa !5
  %21 = tail call i32 @vkDeviceWaitIdle(ptr noundef %1)
  tail call void @_ZL15check_vk_result8VkResult(i32 noundef %21)
  %22 = getelementptr inbounds i8, ptr %2, i64 80
  %23 = load i32, ptr %22, align 8, !tbaa !16
  %.not150 = icmp eq i32 %23, 0
  br i1 %.not150, label %.preheader, label %.lr.ph

.lr.ph:                                           ; preds = %7
  %24 = getelementptr inbounds i8, ptr %2, i64 96
  br label %28

.preheader:                                       ; preds = %28, %7
  %25 = getelementptr inbounds i8, ptr %2, i64 84
  %26 = load i32, ptr %25, align 4, !tbaa !17
  %.not151 = icmp eq i32 %26, 0
  br i1 %.not151, label %._crit_edge, label %.lr.ph137

.lr.ph137:                                        ; preds = %.preheader
  %27 = getelementptr inbounds i8, ptr %2, i64 104
  br label %40

28:                                               ; preds = %.lr.ph, %28
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %28 ]
  %29 = load ptr, ptr %24, align 8, !tbaa !18
  %30 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %29, i64 %indvars.iv
  tail call void @_Z30ImGui_ImplVulkanH_DestroyFrameP10VkDevice_TP23ImGui_ImplVulkanH_FramePK21VkAllocationCallbacks(ptr noundef %1, ptr noundef %30, ptr noundef %3)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %31 = load i32, ptr %22, align 8, !tbaa !16
  %32 = zext i32 %31 to i64
  %33 = icmp ult i64 %indvars.iv.next, %32
  br i1 %33, label %28, label %.preheader, !llvm.loop !19

._crit_edge:                                      ; preds = %40, %.preheader
  %34 = getelementptr inbounds i8, ptr %2, i64 96
  %35 = load ptr, ptr %34, align 8, !tbaa !18
  tail call void @_ZN5ImGui7MemFreeEPv(ptr noundef %35)
  %36 = getelementptr inbounds i8, ptr %2, i64 104
  %37 = load ptr, ptr %36, align 8, !tbaa !21
  tail call void @_ZN5ImGui7MemFreeEPv(ptr noundef %37)
  store i32 0, ptr %22, align 8, !tbaa !16
  %38 = getelementptr inbounds i8, ptr %2, i64 40
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %34, i8 0, i64 16, i1 false)
  %39 = load ptr, ptr %38, align 8, !tbaa !22
  %.not = icmp eq ptr %39, null
  br i1 %.not, label %47, label %46

40:                                               ; preds = %.lr.ph137, %40
  %indvars.iv156 = phi i64 [ 0, %.lr.ph137 ], [ %indvars.iv.next157, %40 ]
  %41 = load ptr, ptr %27, align 8, !tbaa !21
  %42 = getelementptr inbounds %struct.ImGui_ImplVulkanH_FrameSemaphores, ptr %41, i64 %indvars.iv156
  tail call void @_Z40ImGui_ImplVulkanH_DestroyFrameSemaphoresP10VkDevice_TP33ImGui_ImplVulkanH_FrameSemaphoresPK21VkAllocationCallbacks(ptr noundef %1, ptr noundef %42, ptr noundef %3)
  %indvars.iv.next157 = add nuw nsw i64 %indvars.iv156, 1
  %43 = load i32, ptr %25, align 4, !tbaa !17
  %44 = zext i32 %43 to i64
  %45 = icmp ult i64 %indvars.iv.next157, %44
  br i1 %45, label %40, label %._crit_edge, !llvm.loop !23

46:                                               ; preds = %._crit_edge
  tail call void @vkDestroyRenderPass(ptr noundef %1, ptr noundef nonnull %39, ptr noundef %3)
  br label %47

47:                                               ; preds = %46, %._crit_edge
  %48 = getelementptr inbounds i8, ptr %2, i64 48
  %49 = load ptr, ptr %48, align 8, !tbaa !24
  %.not130 = icmp eq ptr %49, null
  br i1 %.not130, label %51, label %50

50:                                               ; preds = %47
  tail call void @vkDestroyPipeline(ptr noundef %1, ptr noundef nonnull %49, ptr noundef %3)
  br label %51

51:                                               ; preds = %50, %47
  %52 = icmp eq i32 %6, 0
  br i1 %52, label %53, label %57

53:                                               ; preds = %51
  %54 = getelementptr inbounds i8, ptr %2, i64 32
  %55 = load i32, ptr %54, align 8, !tbaa !25
  %56 = tail call noundef i32 @_Z49ImGui_ImplVulkanH_GetMinImageCountFromPresentMode16VkPresentModeKHR(i32 noundef %55)
  br label %57

57:                                               ; preds = %53, %51
  %.0 = phi i32 [ %56, %53 ], [ %6, %51 ]
  call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %8) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(104) %8, i8 0, i64 80, i1 false)
  store i32 1000001000, ptr %8, align 8, !tbaa !26
  %58 = getelementptr inbounds i8, ptr %2, i64 16
  %59 = load ptr, ptr %58, align 8, !tbaa !33
  %60 = getelementptr inbounds i8, ptr %8, i64 24
  store ptr %59, ptr %60, align 8, !tbaa !34
  %61 = getelementptr inbounds i8, ptr %8, i64 32
  store i32 %.0, ptr %61, align 8, !tbaa !35
  %62 = getelementptr inbounds i8, ptr %2, i64 24
  %63 = getelementptr inbounds i8, ptr %8, i64 36
  %64 = load <2 x i32>, ptr %62, align 8, !tbaa !36
  store <2 x i32> %64, ptr %63, align 4, !tbaa !36
  %65 = getelementptr inbounds i8, ptr %8, i64 52
  store i32 1, ptr %65, align 4, !tbaa !37
  %66 = getelementptr inbounds i8, ptr %8, i64 56
  store i32 16, ptr %66, align 8, !tbaa !38
  %67 = getelementptr inbounds i8, ptr %8, i64 80
  store i32 1, ptr %67, align 8, !tbaa !39
  %68 = getelementptr inbounds i8, ptr %8, i64 84
  store i32 1, ptr %68, align 4, !tbaa !40
  %69 = getelementptr inbounds i8, ptr %2, i64 32
  %70 = load i32, ptr %69, align 8, !tbaa !25
  %71 = getelementptr inbounds i8, ptr %8, i64 88
  store i32 %70, ptr %71, align 8, !tbaa !41
  %72 = getelementptr inbounds i8, ptr %8, i64 92
  store i32 1, ptr %72, align 4, !tbaa !42
  %73 = getelementptr inbounds i8, ptr %8, i64 96
  store ptr %20, ptr %73, align 8, !tbaa !43
  call void @llvm.lifetime.start.p0(i64 52, ptr nonnull %9) #7
  %74 = call i32 @vkGetPhysicalDeviceSurfaceCapabilitiesKHR(ptr noundef %0, ptr noundef %59, ptr noundef nonnull %9)
  call void @_ZL15check_vk_result8VkResult(i32 noundef %74)
  %75 = load i32, ptr %9, align 4, !tbaa !44
  %76 = icmp ult i32 %.0, %75
  br i1 %76, label %.sink.split, label %77

77:                                               ; preds = %57
  %78 = getelementptr inbounds i8, ptr %9, i64 4
  %79 = load i32, ptr %78, align 4, !tbaa !46
  %.not131 = icmp ne i32 %79, 0
  %80 = icmp ugt i32 %.0, %79
  %or.cond = and i1 %.not131, %80
  br i1 %or.cond, label %.sink.split, label %81

.sink.split:                                      ; preds = %77, %57
  %.sink = phi i32 [ %75, %57 ], [ %79, %77 ]
  store i32 %.sink, ptr %61, align 8, !tbaa !35
  br label %81

81:                                               ; preds = %.sink.split, %77
  %82 = getelementptr inbounds i8, ptr %9, i64 8
  %83 = load i32, ptr %82, align 4, !tbaa !47
  %84 = icmp eq i32 %83, -1
  %85 = getelementptr inbounds i8, ptr %9, i64 12
  %86 = load i32, ptr %85, align 4
  %.sink170 = select i1 %84, i32 %4, i32 %83
  %.sink168 = select i1 %84, i32 %5, i32 %86
  store i32 %.sink170, ptr %2, align 8
  %87 = getelementptr inbounds i8, ptr %8, i64 44
  store i32 %.sink170, ptr %87, align 4
  %88 = getelementptr inbounds i8, ptr %2, i64 4
  store i32 %.sink168, ptr %88, align 4
  %89 = getelementptr inbounds i8, ptr %8, i64 48
  store i32 %.sink168, ptr %89, align 8
  %90 = call i32 @vkCreateSwapchainKHR(ptr noundef %1, ptr noundef nonnull %8, ptr noundef %3, ptr noundef nonnull %19)
  call void @_ZL15check_vk_result8VkResult(i32 noundef %90)
  %91 = load ptr, ptr %19, align 8, !tbaa !5
  %92 = call i32 @vkGetSwapchainImagesKHR(ptr noundef %1, ptr noundef %91, ptr noundef nonnull %22, ptr noundef null)
  call void @_ZL15check_vk_result8VkResult(i32 noundef %92)
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %10) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(128) %10, i8 0, i64 128, i1 false)
  %93 = load i32, ptr %22, align 8, !tbaa !16
  %.not132 = icmp ult i32 %93, %.0
  br i1 %.not132, label %94, label %95

94:                                               ; preds = %81
  call void @__assert_fail(ptr noundef nonnull @.str.31, ptr noundef nonnull @.str.1, i32 noundef 1485, ptr noundef nonnull @__PRETTY_FUNCTION__._Z39ImGui_ImplVulkanH_CreateWindowSwapChainP18VkPhysicalDevice_TP10VkDevice_TP24ImGui_ImplVulkanH_WindowPK21VkAllocationCallbacksiij) #8
  unreachable

95:                                               ; preds = %81
  %96 = icmp ult i32 %93, 16
  br i1 %96, label %98, label %97

97:                                               ; preds = %95
  call void @__assert_fail(ptr noundef nonnull @.str.32, ptr noundef nonnull @.str.1, i32 noundef 1486, ptr noundef nonnull @__PRETTY_FUNCTION__._Z39ImGui_ImplVulkanH_CreateWindowSwapChainP18VkPhysicalDevice_TP10VkDevice_TP24ImGui_ImplVulkanH_WindowPK21VkAllocationCallbacksiij) #8
  unreachable

98:                                               ; preds = %95
  %99 = load ptr, ptr %19, align 8, !tbaa !5
  %100 = call i32 @vkGetSwapchainImagesKHR(ptr noundef %1, ptr noundef %99, ptr noundef nonnull %22, ptr noundef nonnull %10)
  call void @_ZL15check_vk_result8VkResult(i32 noundef %100)
  %101 = load ptr, ptr %34, align 8, !tbaa !18
  %102 = icmp eq ptr %101, null
  br i1 %102, label %103, label %.critedge

103:                                              ; preds = %98
  %104 = load ptr, ptr %36, align 8, !tbaa !21
  %105 = icmp eq ptr %104, null
  br i1 %105, label %106, label %.critedge

.critedge:                                        ; preds = %98, %103
  call void @__assert_fail(ptr noundef nonnull @.str.33, ptr noundef nonnull @.str.1, i32 noundef 1490, ptr noundef nonnull @__PRETTY_FUNCTION__._Z39ImGui_ImplVulkanH_CreateWindowSwapChainP18VkPhysicalDevice_TP10VkDevice_TP24ImGui_ImplVulkanH_WindowPK21VkAllocationCallbacksiij) #8
  unreachable

106:                                              ; preds = %103
  %107 = load i32, ptr %22, align 8, !tbaa !16
  %108 = add i32 %107, 1
  store i32 %108, ptr %25, align 4, !tbaa !17
  %109 = zext i32 %107 to i64
  %110 = mul nuw nsw i64 %109, 48
  %111 = call noundef ptr @_ZN5ImGui8MemAllocEm(i64 noundef %110)
  store ptr %111, ptr %34, align 8, !tbaa !18
  %112 = load i32, ptr %25, align 4, !tbaa !17
  %113 = zext i32 %112 to i64
  %114 = shl nuw nsw i64 %113, 4
  %115 = call noundef ptr @_ZN5ImGui8MemAllocEm(i64 noundef %114)
  store ptr %115, ptr %36, align 8, !tbaa !21
  %116 = load ptr, ptr %34, align 8, !tbaa !18
  %117 = load i32, ptr %22, align 8, !tbaa !16
  %118 = zext i32 %117 to i64
  %119 = mul nuw nsw i64 %118, 48
  call void @llvm.memset.p0.i64(ptr align 8 %116, i8 0, i64 %119, i1 false)
  %120 = load ptr, ptr %36, align 8, !tbaa !21
  %121 = load i32, ptr %25, align 4, !tbaa !17
  %122 = zext i32 %121 to i64
  %123 = shl nuw nsw i64 %122, 4
  call void @llvm.memset.p0.i64(ptr align 8 %120, i8 0, i64 %123, i1 false)
  %124 = load i32, ptr %22, align 8, !tbaa !16
  %.not152 = icmp eq i32 %124, 0
  br i1 %.not152, label %._crit_edge141, label %.lr.ph140

.lr.ph140:                                        ; preds = %106
  %125 = load ptr, ptr %34, align 8, !tbaa !18
  %wide.trip.count = zext i32 %124 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %126 = icmp ult i32 %124, 4
  br i1 %126, label %._crit_edge141.loopexit.unr-lcssa, label %.lr.ph140.new

.lr.ph140.new:                                    ; preds = %.lr.ph140
  %unroll_iter = and i64 %wide.trip.count, 4294967292
  br label %130

._crit_edge141.loopexit.unr-lcssa:                ; preds = %130, %.lr.ph140
  %indvars.iv159.unr = phi i64 [ 0, %.lr.ph140 ], [ %indvars.iv.next160.3, %130 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge141, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge141.loopexit.unr-lcssa, %.epil.preheader
  %indvars.iv159.epil = phi i64 [ %indvars.iv.next160.epil, %.epil.preheader ], [ %indvars.iv159.unr, %._crit_edge141.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge141.loopexit.unr-lcssa ]
  %127 = getelementptr inbounds [16 x ptr], ptr %10, i64 0, i64 %indvars.iv159.epil
  %128 = load ptr, ptr %127, align 8, !tbaa !48
  %129 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %125, i64 %indvars.iv159.epil, i32 3
  store ptr %128, ptr %129, align 8, !tbaa !49
  %indvars.iv.next160.epil = add nuw nsw i64 %indvars.iv159.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge141, label %.epil.preheader, !llvm.loop !51

._crit_edge141:                                   ; preds = %._crit_edge141.loopexit.unr-lcssa, %.epil.preheader, %106
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 52, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %8) #7
  %.not133 = icmp eq ptr %20, null
  br i1 %.not133, label %144, label %143

130:                                              ; preds = %130, %.lr.ph140.new
  %indvars.iv159 = phi i64 [ 0, %.lr.ph140.new ], [ %indvars.iv.next160.3, %130 ]
  %niter = phi i64 [ 0, %.lr.ph140.new ], [ %niter.next.3, %130 ]
  %131 = getelementptr inbounds [16 x ptr], ptr %10, i64 0, i64 %indvars.iv159
  %132 = load ptr, ptr %131, align 16, !tbaa !48
  %133 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %125, i64 %indvars.iv159, i32 3
  store ptr %132, ptr %133, align 8, !tbaa !49
  %indvars.iv.next160 = or disjoint i64 %indvars.iv159, 1
  %134 = getelementptr inbounds [16 x ptr], ptr %10, i64 0, i64 %indvars.iv.next160
  %135 = load ptr, ptr %134, align 8, !tbaa !48
  %136 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %125, i64 %indvars.iv.next160, i32 3
  store ptr %135, ptr %136, align 8, !tbaa !49
  %indvars.iv.next160.1 = or disjoint i64 %indvars.iv159, 2
  %137 = getelementptr inbounds [16 x ptr], ptr %10, i64 0, i64 %indvars.iv.next160.1
  %138 = load ptr, ptr %137, align 16, !tbaa !48
  %139 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %125, i64 %indvars.iv.next160.1, i32 3
  store ptr %138, ptr %139, align 8, !tbaa !49
  %indvars.iv.next160.2 = or disjoint i64 %indvars.iv159, 3
  %140 = getelementptr inbounds [16 x ptr], ptr %10, i64 0, i64 %indvars.iv.next160.2
  %141 = load ptr, ptr %140, align 8, !tbaa !48
  %142 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %125, i64 %indvars.iv.next160.2, i32 3
  store ptr %141, ptr %142, align 8, !tbaa !49
  %indvars.iv.next160.3 = add nuw nsw i64 %indvars.iv159, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge141.loopexit.unr-lcssa, label %130, !llvm.loop !53

143:                                              ; preds = %._crit_edge141
  call void @vkDestroySwapchainKHR(ptr noundef %1, ptr noundef nonnull %20, ptr noundef %3)
  br label %144

144:                                              ; preds = %143, %._crit_edge141
  %145 = getelementptr inbounds i8, ptr %2, i64 56
  %146 = load i8, ptr %145, align 8, !tbaa !54, !range !55, !noundef !56
  %147 = icmp eq i8 %146, 0
  br i1 %147, label %148, label %171

148:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %11) #7
  store i32 0, ptr %11, align 4
  %149 = load i32, ptr %62, align 8, !tbaa !57
  %150 = getelementptr inbounds i8, ptr %11, i64 4
  store i32 %149, ptr %150, align 4, !tbaa !58
  %151 = getelementptr inbounds i8, ptr %11, i64 8
  store i32 1, ptr %151, align 4, !tbaa !64
  %152 = getelementptr inbounds i8, ptr %2, i64 57
  %153 = load i8, ptr %152, align 1, !tbaa !65, !range !55, !noundef !56
  %154 = trunc nuw i8 %153 to i1
  %155 = select i1 %154, i32 1, i32 2
  %156 = getelementptr inbounds i8, ptr %11, i64 12
  store i32 %155, ptr %156, align 4, !tbaa !66
  %157 = getelementptr inbounds i8, ptr %11, i64 16
  store <4 x i32> <i32 0, i32 2, i32 1, i32 0>, ptr %157, align 4, !tbaa !36
  %158 = getelementptr inbounds i8, ptr %11, i64 32
  store i32 1000001002, ptr %158, align 4, !tbaa !67
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  store i64 8589934592, ptr %12, align 8
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %13) #7
  %159 = getelementptr inbounds i8, ptr %13, i64 24
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(72) %13, i8 0, i64 72, i1 false)
  store i32 1, ptr %159, align 8, !tbaa !68
  %160 = getelementptr inbounds i8, ptr %13, i64 32
  store ptr %12, ptr %160, align 8, !tbaa !71
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %14) #7
  %161 = getelementptr inbounds i8, ptr %14, i64 24
  store i32 0, ptr %161, align 8
  store <4 x i32> <i32 -1, i32 0, i32 1024, i32 1024>, ptr %14, align 16, !tbaa !72
  %162 = getelementptr inbounds i8, ptr %14, i64 16
  store i32 0, ptr %162, align 16, !tbaa !73
  %163 = getelementptr inbounds i8, ptr %14, i64 20
  store i32 256, ptr %163, align 4, !tbaa !75
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %15) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %15, i8 0, i64 56, i1 false)
  store i32 38, ptr %15, align 8, !tbaa !76
  %164 = getelementptr inbounds i8, ptr %15, i64 20
  store i32 1, ptr %164, align 4, !tbaa !78
  %165 = getelementptr inbounds i8, ptr %15, i64 24
  store ptr %11, ptr %165, align 8, !tbaa !79
  %166 = getelementptr inbounds i8, ptr %15, i64 32
  store i32 1, ptr %166, align 8, !tbaa !80
  %167 = getelementptr inbounds i8, ptr %15, i64 40
  store ptr %13, ptr %167, align 8, !tbaa !81
  %168 = getelementptr inbounds i8, ptr %15, i64 48
  store i32 1, ptr %168, align 8, !tbaa !82
  %169 = getelementptr inbounds i8, ptr %15, i64 56
  store ptr %14, ptr %169, align 8, !tbaa !83
  %170 = call i32 @vkCreateRenderPass(ptr noundef %1, ptr noundef nonnull %15, ptr noundef %3, ptr noundef nonnull %38)
  call void @_ZL15check_vk_result8VkResult(i32 noundef %170)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %11) #7
  br label %171

171:                                              ; preds = %148, %144
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %16) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %16, i8 0, i64 80, i1 false)
  store i32 15, ptr %16, align 8, !tbaa !84
  %172 = getelementptr inbounds i8, ptr %16, i64 32
  store i32 1, ptr %172, align 8, !tbaa !90
  %173 = load i32, ptr %62, align 8, !tbaa !57
  %174 = getelementptr inbounds i8, ptr %16, i64 36
  store i32 %173, ptr %174, align 4, !tbaa !91
  %175 = getelementptr inbounds i8, ptr %16, i64 40
  store <4 x i32> <i32 3, i32 4, i32 5, i32 6>, ptr %175, align 8, !tbaa !92
  %176 = getelementptr inbounds i8, ptr %16, i64 56
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %176, ptr noundef nonnull align 4 dereferenceable(20) @__const._Z39ImGui_ImplVulkanH_CreateWindowSwapChainP18VkPhysicalDevice_TP10VkDevice_TP24ImGui_ImplVulkanH_WindowPK21VkAllocationCallbacksiij.image_range, i64 20, i1 false), !tbaa.struct !93
  %177 = load i32, ptr %22, align 8, !tbaa !16
  %.not153 = icmp eq i32 %177, 0
  br i1 %.not153, label %._crit_edge145, label %.lr.ph144

.lr.ph144:                                        ; preds = %171
  %178 = getelementptr inbounds i8, ptr %16, i64 24
  br label %182

._crit_edge145.loopexit:                          ; preds = %182
  %179 = icmp eq i32 %189, 0
  br label %._crit_edge145

._crit_edge145:                                   ; preds = %._crit_edge145.loopexit, %171
  %.not154 = phi i1 [ %179, %._crit_edge145.loopexit ], [ true, %171 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %16) #7
  %180 = load i8, ptr %145, align 8, !tbaa !54, !range !55, !noundef !56
  %181 = icmp eq i8 %180, 0
  br i1 %181, label %192, label %209

182:                                              ; preds = %.lr.ph144, %182
  %indvars.iv162 = phi i64 [ 0, %.lr.ph144 ], [ %indvars.iv.next163, %182 ]
  %183 = load ptr, ptr %34, align 8, !tbaa !18
  %184 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %183, i64 %indvars.iv162
  %185 = getelementptr inbounds i8, ptr %184, i64 24
  %186 = load ptr, ptr %185, align 8, !tbaa !49
  store ptr %186, ptr %178, align 8, !tbaa !94
  %187 = getelementptr inbounds i8, ptr %184, i64 32
  %188 = call i32 @vkCreateImageView(ptr noundef %1, ptr noundef nonnull %16, ptr noundef %3, ptr noundef nonnull %187)
  call void @_ZL15check_vk_result8VkResult(i32 noundef %188)
  %indvars.iv.next163 = add nuw nsw i64 %indvars.iv162, 1
  %189 = load i32, ptr %22, align 8, !tbaa !16
  %190 = zext i32 %189 to i64
  %191 = icmp ult i64 %indvars.iv.next163, %190
  br i1 %191, label %182, label %._crit_edge145.loopexit, !llvm.loop !95

192:                                              ; preds = %._crit_edge145
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %18) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %18, i8 0, i64 64, i1 false)
  store i32 37, ptr %18, align 8, !tbaa !96
  %193 = load ptr, ptr %38, align 8, !tbaa !22
  %194 = getelementptr inbounds i8, ptr %18, i64 24
  store ptr %193, ptr %194, align 8, !tbaa !98
  %195 = getelementptr inbounds i8, ptr %18, i64 32
  store i32 1, ptr %195, align 8, !tbaa !99
  %196 = getelementptr inbounds i8, ptr %18, i64 40
  store ptr %17, ptr %196, align 8, !tbaa !100
  %197 = getelementptr inbounds i8, ptr %18, i64 48
  %198 = load <2 x i32>, ptr %2, align 8, !tbaa !72
  store <2 x i32> %198, ptr %197, align 8, !tbaa !72
  %199 = getelementptr inbounds i8, ptr %18, i64 56
  store i32 1, ptr %199, align 8, !tbaa !101
  br i1 %.not154, label %._crit_edge149, label %.lr.ph148

._crit_edge149:                                   ; preds = %.lr.ph148, %192
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  br label %209

.lr.ph148:                                        ; preds = %192, %.lr.ph148
  %indvars.iv165 = phi i64 [ %indvars.iv.next166, %.lr.ph148 ], [ 0, %192 ]
  %200 = load ptr, ptr %34, align 8, !tbaa !18
  %201 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %200, i64 %indvars.iv165
  %202 = getelementptr inbounds i8, ptr %201, i64 32
  %203 = load ptr, ptr %202, align 8, !tbaa !102
  store ptr %203, ptr %17, align 8, !tbaa !48
  %204 = getelementptr inbounds i8, ptr %201, i64 40
  %205 = call i32 @vkCreateFramebuffer(ptr noundef %1, ptr noundef nonnull %18, ptr noundef %3, ptr noundef nonnull %204)
  call void @_ZL15check_vk_result8VkResult(i32 noundef %205)
  %indvars.iv.next166 = add nuw nsw i64 %indvars.iv165, 1
  %206 = load i32, ptr %22, align 8, !tbaa !16
  %207 = zext i32 %206 to i64
  %208 = icmp ult i64 %indvars.iv.next166, %207
  br i1 %208, label %.lr.ph148, label %._crit_edge149, !llvm.loop !103

209:                                              ; preds = %._crit_edge149, %._crit_edge145
  ret void
}

declare i32 @vkDeviceWaitIdle(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z30ImGui_ImplVulkanH_DestroyFrameP10VkDevice_TP23ImGui_ImplVulkanH_FramePK21VkAllocationCallbacks(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z40ImGui_ImplVulkanH_DestroyFrameSemaphoresP10VkDevice_TP33ImGui_ImplVulkanH_FrameSemaphoresPK21VkAllocationCallbacks(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

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

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

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

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 = { nounwind }
attributes #8 = { noreturn 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, !10, i64 8}
!6 = !{!"_ZTS24ImGui_ImplVulkanH_Window", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 16, !11, i64 24, !14, i64 32, !10, i64 40, !10, i64 48, !15, i64 56, !15, i64 57, !8, i64 60, !7, i64 76, !7, i64 80, !7, i64 84, !7, i64 88, !10, i64 96, !10, i64 104}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_ZTS18VkSurfaceFormatKHR", !12, i64 0, !13, i64 4}
!12 = !{!"_ZTS8VkFormat", !8, i64 0}
!13 = !{!"_ZTS15VkColorSpaceKHR", !8, i64 0}
!14 = !{!"_ZTS16VkPresentModeKHR", !8, i64 0}
!15 = !{!"bool", !8, i64 0}
!16 = !{!6, !7, i64 80}
!17 = !{!6, !7, i64 84}
!18 = !{!6, !10, i64 96}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!6, !10, i64 104}
!22 = !{!6, !10, i64 40}
!23 = distinct !{!23, !20}
!24 = !{!6, !10, i64 48}
!25 = !{!6, !14, i64 32}
!26 = !{!27, !28, i64 0}
!27 = !{!"_ZTS24VkSwapchainCreateInfoKHR", !28, i64 0, !10, i64 8, !7, i64 16, !10, i64 24, !7, i64 32, !12, i64 36, !13, i64 40, !29, i64 44, !7, i64 52, !7, i64 56, !30, i64 60, !7, i64 64, !10, i64 72, !31, i64 80, !32, i64 84, !14, i64 88, !7, i64 92, !10, i64 96}
!28 = !{!"_ZTS15VkStructureType", !8, i64 0}
!29 = !{!"_ZTS10VkExtent2D", !7, i64 0, !7, i64 4}
!30 = !{!"_ZTS13VkSharingMode", !8, i64 0}
!31 = !{!"_ZTS29VkSurfaceTransformFlagBitsKHR", !8, i64 0}
!32 = !{!"_ZTS27VkCompositeAlphaFlagBitsKHR", !8, i64 0}
!33 = !{!6, !10, i64 16}
!34 = !{!27, !10, i64 24}
!35 = !{!27, !7, i64 32}
!36 = !{!8, !8, i64 0}
!37 = !{!27, !7, i64 52}
!38 = !{!27, !7, i64 56}
!39 = !{!27, !31, i64 80}
!40 = !{!27, !32, i64 84}
!41 = !{!27, !14, i64 88}
!42 = !{!27, !7, i64 92}
!43 = !{!27, !10, i64 96}
!44 = !{!45, !7, i64 0}
!45 = !{!"_ZTS24VkSurfaceCapabilitiesKHR", !7, i64 0, !7, i64 4, !29, i64 8, !29, i64 16, !29, i64 24, !7, i64 32, !7, i64 36, !31, i64 40, !7, i64 44, !7, i64 48}
!46 = !{!45, !7, i64 4}
!47 = !{!45, !7, i64 8}
!48 = !{!10, !10, i64 0}
!49 = !{!50, !10, i64 24}
!50 = !{!"_ZTS23ImGui_ImplVulkanH_Frame", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40}
!51 = distinct !{!51, !52}
!52 = !{!"llvm.loop.unroll.disable"}
!53 = distinct !{!53, !20}
!54 = !{!6, !15, i64 56}
!55 = !{i8 0, i8 2}
!56 = !{}
!57 = !{!6, !12, i64 24}
!58 = !{!59, !12, i64 4}
!59 = !{!"_ZTS23VkAttachmentDescription", !7, i64 0, !12, i64 4, !60, i64 8, !61, i64 12, !62, i64 16, !61, i64 20, !62, i64 24, !63, i64 28, !63, i64 32}
!60 = !{!"_ZTS21VkSampleCountFlagBits", !8, i64 0}
!61 = !{!"_ZTS18VkAttachmentLoadOp", !8, i64 0}
!62 = !{!"_ZTS19VkAttachmentStoreOp", !8, i64 0}
!63 = !{!"_ZTS13VkImageLayout", !8, i64 0}
!64 = !{!59, !60, i64 8}
!65 = !{!6, !15, i64 57}
!66 = !{!59, !61, i64 12}
!67 = !{!59, !63, i64 32}
!68 = !{!69, !7, i64 24}
!69 = !{!"_ZTS20VkSubpassDescription", !7, i64 0, !70, i64 4, !7, i64 8, !10, i64 16, !7, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !7, i64 56, !10, i64 64}
!70 = !{!"_ZTS19VkPipelineBindPoint", !8, i64 0}
!71 = !{!69, !10, i64 32}
!72 = !{!7, !7, i64 0}
!73 = !{!74, !7, i64 16}
!74 = !{!"_ZTS19VkSubpassDependency", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24}
!75 = !{!74, !7, i64 20}
!76 = !{!77, !28, i64 0}
!77 = !{!"_ZTS22VkRenderPassCreateInfo", !28, i64 0, !10, i64 8, !7, i64 16, !7, i64 20, !10, i64 24, !7, i64 32, !10, i64 40, !7, i64 48, !10, i64 56}
!78 = !{!77, !7, i64 20}
!79 = !{!77, !10, i64 24}
!80 = !{!77, !7, i64 32}
!81 = !{!77, !10, i64 40}
!82 = !{!77, !7, i64 48}
!83 = !{!77, !10, i64 56}
!84 = !{!85, !28, i64 0}
!85 = !{!"_ZTS21VkImageViewCreateInfo", !28, i64 0, !10, i64 8, !7, i64 16, !10, i64 24, !86, i64 32, !12, i64 36, !87, i64 40, !89, i64 56}
!86 = !{!"_ZTS15VkImageViewType", !8, i64 0}
!87 = !{!"_ZTS18VkComponentMapping", !88, i64 0, !88, i64 4, !88, i64 8, !88, i64 12}
!88 = !{!"_ZTS18VkComponentSwizzle", !8, i64 0}
!89 = !{!"_ZTS23VkImageSubresourceRange", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16}
!90 = !{!85, !86, i64 32}
!91 = !{!85, !12, i64 36}
!92 = !{!88, !88, i64 0}
!93 = !{i64 0, i64 4, !72, i64 4, i64 4, !72, i64 8, i64 4, !72, i64 12, i64 4, !72, i64 16, i64 4, !72}
!94 = !{!85, !10, i64 24}
!95 = distinct !{!95, !20}
!96 = !{!97, !28, i64 0}
!97 = !{!"_ZTS23VkFramebufferCreateInfo", !28, i64 0, !10, i64 8, !7, i64 16, !10, i64 24, !7, i64 32, !10, i64 40, !7, i64 48, !7, i64 52, !7, i64 56}
!98 = !{!97, !10, i64 24}
!99 = !{!97, !7, i64 32}
!100 = !{!97, !10, i64 40}
!101 = !{!97, !7, i64 56}
!102 = !{!50, !10, i64 32}
!103 = distinct !{!103, !20}


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