; LLVM IR from vertver/Fresponze-old :: modules/imgui/examples/example_glfw_vulkan (main)

; 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.ImGui_ImplVulkanH_Window = type { i32, i32, ptr, ptr, %struct.VkSurfaceFormatKHR, i32, ptr, i8, %union.VkClearValue, i32, i32, i32, ptr, ptr }
%struct.VkSurfaceFormatKHR = type { i32, i32 }
%union.VkClearValue = type { %union.VkClearColorValue }
%union.VkClearColorValue = type { [4 x float] }
%struct.ImGui_ImplVulkan_InitInfo = type { ptr, ptr, ptr, i32, ptr, ptr, ptr, i32, i32, i32, ptr, ptr }
%struct.VkCommandBufferBeginInfo = type { i32, ptr, i32, ptr }
%struct.VkSubmitInfo = type { i32, ptr, i32, ptr, ptr, i32, ptr, i32, ptr }
%struct.ImVec4 = type { float, float, float, float }
%struct.ImVec2 = type { float, float }
%struct.ImGui_ImplVulkanH_Frame = type { ptr, ptr, ptr, ptr, ptr, ptr }
%struct.ImGuiIO = type { i32, i32, %struct.ImVec2, float, float, ptr, ptr, float, float, float, [22 x i32], float, float, ptr, ptr, float, i8, ptr, %struct.ImVec2, i8, i8, i8, i8, i8, float, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %struct.ImVec2, [5 x i8], float, float, i8, i8, i8, i8, [512 x i8], [21 x float], i8, i8, i8, i8, i8, i8, i8, float, i32, i32, i32, i32, i32, %struct.ImVec2, i32, %struct.ImVec2, [5 x %struct.ImVec2], [5 x double], [5 x i8], [5 x i8], [5 x i8], [5 x i8], [5 x i8], [5 x float], [5 x float], [5 x %struct.ImVec2], [5 x float], [512 x float], [512 x float], [21 x float], [21 x float], float, i16, %struct.ImVector }
%struct.ImVector = type { i32, i32, ptr }
%struct.ImDrawData = type <{ i8, [7 x i8], ptr, i32, i32, i32, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, [4 x i8] }>

@_ZL16g_MainWindowData = external hidden global %struct.ImGui_ImplVulkanH_Window, align 8
@.str = external hidden unnamed_addr constant [31 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [28 x i8], align 1
@_ZL10g_Instance = external hidden global ptr, align 8
@_ZL11g_Allocator = external hidden global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [9 x i8], align 1
@_ZL16g_PhysicalDevice = external hidden global ptr, align 8
@_ZL8g_Device = external hidden global ptr, align 8
@_ZL13g_QueueFamily = external hidden global i32, align 4
@_ZL7g_Queue = external hidden global ptr, align 8
@_ZL15g_PipelineCache = external hidden global ptr, align 8
@_ZL16g_DescriptorPool = external hidden global ptr, align 8
@_ZL15g_MinImageCount = external hidden global i32, align 4
@_ZL18g_SwapChainRebuild = external hidden global i8, align 1
@_ZL22g_SwapChainResizeWidth = external hidden global i32, align 4
@_ZL23g_SwapChainResizeHeight = external hidden global i32, align 4
@_ZZ4mainE1f = external hidden global float, align 4
@_ZZ4mainE7counter = external hidden global i32, align 4
@.str.3 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca %struct.ImGui_ImplVulkan_InitInfo, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca %struct.VkCommandBufferBeginInfo, align 8
  %20 = alloca %struct.VkSubmitInfo, align 8
  %21 = alloca i8, align 1
  %22 = alloca i8, align 1
  %23 = alloca %struct.ImVec4, align 4
  %24 = alloca %struct.ImVec2, align 4
  %25 = alloca %struct.ImVec2, align 4
  %26 = alloca ptr, align 8
  %27 = alloca i8, align 1
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  %28 = call ptr @glfwSetErrorCallback(ptr noundef @_ZL19glfw_error_callbackiPKc)
  %29 = call i32 @glfwInit()
  %30 = icmp ne i32 %29, 0
  br i1 %30, label %32, label %31

31:                                               ; preds = %2
  store i32 1, ptr %3, align 4
  br label %217

32:                                               ; preds = %2
  call void @glfwWindowHint(i32 noundef 139265, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %33 = call ptr @glfwCreateWindow(i32 noundef 1280, i32 noundef 720, ptr noundef @.str, ptr noundef null, ptr noundef null)
  store ptr %33, ptr %6, align 8, !tbaa !9
  %34 = call i32 @glfwVulkanSupported()
  %35 = icmp ne i32 %34, 0
  br i1 %35, label %38, label %36

36:                                               ; preds = %32
  %37 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %216

38:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %39 = call ptr @glfwGetRequiredInstanceExtensions(ptr noundef %8)
  store ptr %39, ptr %9, align 8, !tbaa !9
  %40 = load ptr, ptr %9, align 8, !tbaa !9
  %41 = load i32, ptr %8, align 4, !tbaa !5
  call void @_ZL11SetupVulkanPPKcj(ptr noundef %40, i32 noundef %41)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %42 = load ptr, ptr @_ZL10g_Instance, align 8, !tbaa !9
  %43 = load ptr, ptr %6, align 8, !tbaa !9
  %44 = load ptr, ptr @_ZL11g_Allocator, align 8, !tbaa !9
  %45 = call i32 @glfwCreateWindowSurface(ptr noundef %42, ptr noundef %43, ptr noundef %44, ptr noundef %10)
  store i32 %45, ptr %11, align 4, !tbaa !11
  %46 = load i32, ptr %11, align 4, !tbaa !11
  call void @_ZL15check_vk_result8VkResult(i32 noundef %46)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %47 = load ptr, ptr %6, align 8, !tbaa !9
  call void @glfwGetFramebufferSize(ptr noundef %47, ptr noundef %12, ptr noundef %13)
  %48 = load ptr, ptr %6, align 8, !tbaa !9
  %49 = call ptr @glfwSetFramebufferSizeCallback(ptr noundef %48, ptr noundef @_ZL20glfw_resize_callbackP10GLFWwindowii)
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  store ptr @_ZL16g_MainWindowData, ptr %14, align 8, !tbaa !9
  %50 = load ptr, ptr %14, align 8, !tbaa !9
  %51 = load ptr, ptr %10, align 8, !tbaa !9
  %52 = load i32, ptr %12, align 4, !tbaa !5
  %53 = load i32, ptr %13, align 4, !tbaa !5
  call void @_ZL17SetupVulkanWindowP24ImGui_ImplVulkanH_WindowP14VkSurfaceKHR_Tii(ptr noundef %50, ptr noundef %51, i32 noundef %52, i32 noundef %53)
  %54 = call noundef zeroext i1 @_ZN5ImGui30DebugCheckVersionAndDataLayoutEPKcmmmmmm(ptr noundef @.str.2, i64 noundef 5472, i64 noundef 952, i64 noundef 8, i64 noundef 16, i64 noundef 20, i64 noundef 2)
  %55 = call noundef ptr @_ZN5ImGui13CreateContextEP11ImFontAtlas(ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %56 = call noundef nonnull align 8 dereferenceable(5472) ptr @_ZN5ImGui5GetIOEv()
  store ptr %56, ptr %15, align 8, !tbaa !9
  %57 = load ptr, ptr %15, align 8, !tbaa !9
  call void @_ZN5ImGui15StyleColorsDarkEP10ImGuiStyle(ptr noundef null)
  %58 = load ptr, ptr %6, align 8, !tbaa !9
  %59 = call noundef zeroext i1 @_Z28ImGui_ImplGlfw_InitForVulkanP10GLFWwindowb(ptr noundef %58, i1 noundef zeroext true)
  call void @llvm.lifetime.start.p0(i64 88, ptr %16) #6
  call void @llvm.memset.p0.i64(ptr align 8 %16, i8 0, i64 88, i1 false)
  %60 = load ptr, ptr @_ZL10g_Instance, align 8, !tbaa !9
  %61 = getelementptr inbounds %struct.ImGui_ImplVulkan_InitInfo, ptr %16, i32 0, i32 0
  store ptr %60, ptr %61, align 8, !tbaa !13
  %62 = load ptr, ptr @_ZL16g_PhysicalDevice, align 8, !tbaa !9
  %63 = getelementptr inbounds %struct.ImGui_ImplVulkan_InitInfo, ptr %16, i32 0, i32 1
  store ptr %62, ptr %63, align 8, !tbaa !16
  %64 = load ptr, ptr @_ZL8g_Device, align 8, !tbaa !9
  %65 = getelementptr inbounds %struct.ImGui_ImplVulkan_InitInfo, ptr %16, i32 0, i32 2
  store ptr %64, ptr %65, align 8, !tbaa !17
  %66 = load i32, ptr @_ZL13g_QueueFamily, align 4, !tbaa !5
  %67 = getelementptr inbounds %struct.ImGui_ImplVulkan_InitInfo, ptr %16, i32 0, i32 3
  store i32 %66, ptr %67, align 8, !tbaa !18
  %68 = load ptr, ptr @_ZL7g_Queue, align 8, !tbaa !9
  %69 = getelementptr inbounds %struct.ImGui_ImplVulkan_InitInfo, ptr %16, i32 0, i32 4
  store ptr %68, ptr %69, align 8, !tbaa !19
  %70 = load ptr, ptr @_ZL15g_PipelineCache, align 8, !tbaa !9
  %71 = getelementptr inbounds %struct.ImGui_ImplVulkan_InitInfo, ptr %16, i32 0, i32 5
  store ptr %70, ptr %71, align 8, !tbaa !20
  %72 = load ptr, ptr @_ZL16g_DescriptorPool, align 8, !tbaa !9
  %73 = getelementptr inbounds %struct.ImGui_ImplVulkan_InitInfo, ptr %16, i32 0, i32 6
  store ptr %72, ptr %73, align 8, !tbaa !21
  %74 = load ptr, ptr @_ZL11g_Allocator, align 8, !tbaa !9
  %75 = getelementptr inbounds %struct.ImGui_ImplVulkan_InitInfo, ptr %16, i32 0, i32 10
  store ptr %74, ptr %75, align 8, !tbaa !22
  %76 = load i32, ptr @_ZL15g_MinImageCount, align 4, !tbaa !5
  %77 = getelementptr inbounds %struct.ImGui_ImplVulkan_InitInfo, ptr %16, i32 0, i32 7
  store i32 %76, ptr %77, align 8, !tbaa !23
  %78 = load ptr, ptr %14, align 8, !tbaa !9
  %79 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %78, i32 0, i32 10
  %80 = load i32, ptr %79, align 8, !tbaa !24
  %81 = getelementptr inbounds %struct.ImGui_ImplVulkan_InitInfo, ptr %16, i32 0, i32 8
  store i32 %80, ptr %81, align 4, !tbaa !31
  %82 = getelementptr inbounds %struct.ImGui_ImplVulkan_InitInfo, ptr %16, i32 0, i32 11
  store ptr @_ZL15check_vk_result8VkResult, ptr %82, align 8, !tbaa !32
  %83 = load ptr, ptr %14, align 8, !tbaa !9
  %84 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %83, i32 0, i32 6
  %85 = load ptr, ptr %84, align 8, !tbaa !33
  %86 = call noundef zeroext i1 @_Z21ImGui_ImplVulkan_InitP25ImGui_ImplVulkan_InitInfoP14VkRenderPass_T(ptr noundef %16, ptr noundef %85)
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %87 = load ptr, ptr %14, align 8, !tbaa !9
  %88 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %87, i32 0, i32 12
  %89 = load ptr, ptr %88, align 8, !tbaa !34
  %90 = load ptr, ptr %14, align 8, !tbaa !9
  %91 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %90, i32 0, i32 9
  %92 = load i32, ptr %91, align 4, !tbaa !35
  %93 = zext i32 %92 to i64
  %94 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %89, i64 %93
  %95 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %94, i32 0, i32 0
  %96 = load ptr, ptr %95, align 8, !tbaa !36
  store ptr %96, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %97 = load ptr, ptr %14, align 8, !tbaa !9
  %98 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %97, i32 0, i32 12
  %99 = load ptr, ptr %98, align 8, !tbaa !34
  %100 = load ptr, ptr %14, align 8, !tbaa !9
  %101 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %100, i32 0, i32 9
  %102 = load i32, ptr %101, align 4, !tbaa !35
  %103 = zext i32 %102 to i64
  %104 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %99, i64 %103
  %105 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %104, i32 0, i32 1
  %106 = load ptr, ptr %105, align 8, !tbaa !38
  store ptr %106, ptr %18, align 8, !tbaa !9
  %107 = load ptr, ptr @_ZL8g_Device, align 8, !tbaa !9
  %108 = load ptr, ptr %17, align 8, !tbaa !9
  %109 = call i32 @vkResetCommandPool(ptr noundef %107, ptr noundef %108, i32 noundef 0)
  store i32 %109, ptr %11, align 4, !tbaa !11
  %110 = load i32, ptr %11, align 4, !tbaa !11
  call void @_ZL15check_vk_result8VkResult(i32 noundef %110)
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #6
  call void @llvm.memset.p0.i64(ptr align 8 %19, i8 0, i64 32, i1 false)
  %111 = getelementptr inbounds %struct.VkCommandBufferBeginInfo, ptr %19, i32 0, i32 0
  store i32 42, ptr %111, align 8, !tbaa !39
  %112 = getelementptr inbounds %struct.VkCommandBufferBeginInfo, ptr %19, i32 0, i32 2
  %113 = load i32, ptr %112, align 8, !tbaa !42
  %114 = or i32 %113, 1
  store i32 %114, ptr %112, align 8, !tbaa !42
  %115 = load ptr, ptr %18, align 8, !tbaa !9
  %116 = call i32 @vkBeginCommandBuffer(ptr noundef %115, ptr noundef %19)
  store i32 %116, ptr %11, align 4, !tbaa !11
  %117 = load i32, ptr %11, align 4, !tbaa !11
  call void @_ZL15check_vk_result8VkResult(i32 noundef %117)
  %118 = load ptr, ptr %18, align 8, !tbaa !9
  %119 = call noundef zeroext i1 @_Z35ImGui_ImplVulkan_CreateFontsTextureP17VkCommandBuffer_T(ptr noundef %118)
  call void @llvm.lifetime.start.p0(i64 72, ptr %20) #6
  call void @llvm.memset.p0.i64(ptr align 8 %20, i8 0, i64 72, i1 false)
  %120 = getelementptr inbounds %struct.VkSubmitInfo, ptr %20, i32 0, i32 0
  store i32 4, ptr %120, align 8, !tbaa !43
  %121 = getelementptr inbounds %struct.VkSubmitInfo, ptr %20, i32 0, i32 5
  store i32 1, ptr %121, align 8, !tbaa !45
  %122 = getelementptr inbounds %struct.VkSubmitInfo, ptr %20, i32 0, i32 6
  store ptr %18, ptr %122, align 8, !tbaa !46
  %123 = load ptr, ptr %18, align 8, !tbaa !9
  %124 = call i32 @vkEndCommandBuffer(ptr noundef %123)
  store i32 %124, ptr %11, align 4, !tbaa !11
  %125 = load i32, ptr %11, align 4, !tbaa !11
  call void @_ZL15check_vk_result8VkResult(i32 noundef %125)
  %126 = load ptr, ptr @_ZL7g_Queue, align 8, !tbaa !9
  %127 = call i32 @vkQueueSubmit(ptr noundef %126, i32 noundef 1, ptr noundef %20, ptr noundef null)
  store i32 %127, ptr %11, align 4, !tbaa !11
  %128 = load i32, ptr %11, align 4, !tbaa !11
  call void @_ZL15check_vk_result8VkResult(i32 noundef %128)
  %129 = load ptr, ptr @_ZL8g_Device, align 8, !tbaa !9
  %130 = call i32 @vkDeviceWaitIdle(ptr noundef %129)
  store i32 %130, ptr %11, align 4, !tbaa !11
  %131 = load i32, ptr %11, align 4, !tbaa !11
  call void @_ZL15check_vk_result8VkResult(i32 noundef %131)
  call void @_Z41ImGui_ImplVulkan_DestroyFontUploadObjectsv()
  call void @llvm.lifetime.end.p0(i64 72, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #6
  store i8 1, ptr %21, align 1, !tbaa !47
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #6
  store i8 0, ptr %22, align 1, !tbaa !47
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #6
  call void @_ZN6ImVec4C2Effff(ptr noundef nonnull align 4 dereferenceable(16) %23, float noundef 0x3FDCCCCCC0000000, float noundef 0x3FE19999A0000000, float noundef 0x3FE3333340000000, float noundef 1.000000e+00)
  br label %132

132:                                              ; preds = %210, %38
  %133 = load ptr, ptr %6, align 8, !tbaa !9
  %134 = call i32 @glfwWindowShouldClose(ptr noundef %133)
  %135 = icmp ne i32 %134, 0
  %136 = xor i1 %135, true
  br i1 %136, label %137, label %211

137:                                              ; preds = %132
  call void @glfwPollEvents()
  %138 = load i8, ptr @_ZL18g_SwapChainRebuild, align 1, !tbaa !47, !range !48, !noundef !49
  %139 = trunc i8 %138 to i1
  br i1 %139, label %140, label %156

140:                                              ; preds = %137
  %141 = load i32, ptr @_ZL22g_SwapChainResizeWidth, align 4, !tbaa !5
  %142 = icmp sgt i32 %141, 0
  br i1 %142, label %143, label %156

143:                                              ; preds = %140
  %144 = load i32, ptr @_ZL23g_SwapChainResizeHeight, align 4, !tbaa !5
  %145 = icmp sgt i32 %144, 0
  br i1 %145, label %146, label %156

146:                                              ; preds = %143
  store i8 0, ptr @_ZL18g_SwapChainRebuild, align 1, !tbaa !47
  %147 = load i32, ptr @_ZL15g_MinImageCount, align 4, !tbaa !5
  call void @_Z33ImGui_ImplVulkan_SetMinImageCountj(i32 noundef %147)
  %148 = load ptr, ptr @_ZL10g_Instance, align 8, !tbaa !9
  %149 = load ptr, ptr @_ZL16g_PhysicalDevice, align 8, !tbaa !9
  %150 = load ptr, ptr @_ZL8g_Device, align 8, !tbaa !9
  %151 = load i32, ptr @_ZL13g_QueueFamily, align 4, !tbaa !5
  %152 = load ptr, ptr @_ZL11g_Allocator, align 8, !tbaa !9
  %153 = load i32, ptr @_ZL22g_SwapChainResizeWidth, align 4, !tbaa !5
  %154 = load i32, ptr @_ZL23g_SwapChainResizeHeight, align 4, !tbaa !5
  %155 = load i32, ptr @_ZL15g_MinImageCount, align 4, !tbaa !5
  call void @_Z38ImGui_ImplVulkanH_CreateOrResizeWindowP12VkInstance_TP18VkPhysicalDevice_TP10VkDevice_TP24ImGui_ImplVulkanH_WindowjPK21VkAllocationCallbacksiij(ptr noundef %148, ptr noundef %149, ptr noundef %150, ptr noundef @_ZL16g_MainWindowData, i32 noundef %151, ptr noundef %152, i32 noundef %153, i32 noundef %154, i32 noundef %155)
  store i32 0, ptr getelementptr inbounds (%struct.ImGui_ImplVulkanH_Window, ptr @_ZL16g_MainWindowData, i32 0, i32 9), align 4, !tbaa !35
  br label %156

156:                                              ; preds = %146, %143, %140, %137
  call void @_Z25ImGui_ImplVulkan_NewFramev()
  call void @_Z23ImGui_ImplGlfw_NewFramev()
  call void @_ZN5ImGui8NewFrameEv()
  %157 = load i8, ptr %21, align 1, !tbaa !47, !range !48, !noundef !49
  %158 = trunc i8 %157 to i1
  br i1 %158, label %159, label %160

159:                                              ; preds = %156
  call void @_ZN5ImGui14ShowDemoWindowEPb(ptr noundef %21)
  br label %160

160:                                              ; preds = %159, %156
  %161 = call noundef zeroext i1 @_ZN5ImGui5BeginEPKcPbi(ptr noundef @.str.3, ptr noundef null, i32 noundef 0)
  call void (ptr, ...) @_ZN5ImGui4TextEPKcz(ptr noundef @.str.4)
  %162 = call noundef zeroext i1 @_ZN5ImGui8CheckboxEPKcPb(ptr noundef @.str.5, ptr noundef %21)
  %163 = call noundef zeroext i1 @_ZN5ImGui8CheckboxEPKcPb(ptr noundef @.str.6, ptr noundef %22)
  %164 = call noundef zeroext i1 @_ZN5ImGui11SliderFloatEPKcPfffS1_f(ptr noundef @.str.7, ptr noundef @_ZZ4mainE1f, float noundef 0.000000e+00, float noundef 1.000000e+00, ptr noundef @.str.8, float noundef 1.000000e+00)
  %165 = call noundef zeroext i1 @_ZN5ImGui10ColorEdit3EPKcPfi(ptr noundef @.str.9, ptr noundef %23, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %24, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %166 = call noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef @.str.10, ptr noundef nonnull align 4 dereferenceable(8) %24)
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br i1 %166, label %167, label %170

167:                                              ; preds = %160
  %168 = load i32, ptr @_ZZ4mainE7counter, align 4, !tbaa !5
  %169 = add nsw i32 %168, 1
  store i32 %169, ptr @_ZZ4mainE7counter, align 4, !tbaa !5
  br label %170

170:                                              ; preds = %167, %160
  call void @_ZN5ImGui8SameLineEff(float noundef 0.000000e+00, float noundef -1.000000e+00)
  %171 = load i32, ptr @_ZZ4mainE7counter, align 4, !tbaa !5
  call void (ptr, ...) @_ZN5ImGui4TextEPKcz(ptr noundef @.str.11, i32 noundef %171)
  %172 = call noundef nonnull align 8 dereferenceable(5472) ptr @_ZN5ImGui5GetIOEv()
  %173 = getelementptr inbounds %struct.ImGuiIO, ptr %172, i32 0, i32 53
  %174 = load float, ptr %173, align 8, !tbaa !50
  %175 = fdiv float 1.000000e+03, %174
  %176 = fpext float %175 to double
  %177 = call noundef nonnull align 8 dereferenceable(5472) ptr @_ZN5ImGui5GetIOEv()
  %178 = getelementptr inbounds %struct.ImGuiIO, ptr %177, i32 0, i32 53
  %179 = load float, ptr %178, align 8, !tbaa !50
  %180 = fpext float %179 to double
  call void (ptr, ...) @_ZN5ImGui4TextEPKcz(ptr noundef @.str.12, double noundef %176, double noundef %180)
  call void @_ZN5ImGui3EndEv()
  %181 = load i8, ptr %22, align 1, !tbaa !47, !range !48, !noundef !49
  %182 = trunc i8 %181 to i1
  br i1 %182, label %183, label %188

183:                                              ; preds = %170
  %184 = call noundef zeroext i1 @_ZN5ImGui5BeginEPKcPbi(ptr noundef @.str.6, ptr noundef %22, i32 noundef 0)
  call void (ptr, ...) @_ZN5ImGui4TextEPKcz(ptr noundef @.str.13)
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %25, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %185 = call noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef @.str.14, ptr noundef nonnull align 4 dereferenceable(8) %25)
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  br i1 %185, label %186, label %187

186:                                              ; preds = %183
  store i8 0, ptr %22, align 1, !tbaa !47
  br label %187

187:                                              ; preds = %186, %183
  call void @_ZN5ImGui3EndEv()
  br label %188

188:                                              ; preds = %187, %170
  call void @_ZN5ImGui6RenderEv()
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  %189 = call noundef ptr @_ZN5ImGui11GetDrawDataEv()
  store ptr %189, ptr %26, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #6
  %190 = load ptr, ptr %26, align 8, !tbaa !9
  %191 = getelementptr inbounds %struct.ImDrawData, ptr %190, i32 0, i32 7
  %192 = getelementptr inbounds %struct.ImVec2, ptr %191, i32 0, i32 0
  %193 = load float, ptr %192, align 4, !tbaa !56
  %194 = fcmp ole float %193, 0.000000e+00
  br i1 %194, label %201, label %195

195:                                              ; preds = %188
  %196 = load ptr, ptr %26, align 8, !tbaa !9
  %197 = getelementptr inbounds %struct.ImDrawData, ptr %196, i32 0, i32 7
  %198 = getelementptr inbounds %struct.ImVec2, ptr %197, i32 0, i32 1
  %199 = load float, ptr %198, align 4, !tbaa !58
  %200 = fcmp ole float %199, 0.000000e+00
  br label %201

201:                                              ; preds = %195, %188
  %202 = phi i1 [ true, %188 ], [ %200, %195 ]
  %203 = zext i1 %202 to i8
  store i8 %203, ptr %27, align 1, !tbaa !47
  %204 = load i8, ptr %27, align 1, !tbaa !47, !range !48, !noundef !49
  %205 = trunc i8 %204 to i1
  br i1 %205, label %210, label %206

206:                                              ; preds = %201
  %207 = load ptr, ptr %14, align 8, !tbaa !9
  %208 = load ptr, ptr %26, align 8, !tbaa !9
  call void @_ZL11FrameRenderP24ImGui_ImplVulkanH_WindowP10ImDrawData(ptr noundef %207, ptr noundef %208)
  %209 = load ptr, ptr %14, align 8, !tbaa !9
  call void @_ZL12FramePresentP24ImGui_ImplVulkanH_Window(ptr noundef %209)
  br label %210

210:                                              ; preds = %206, %201
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  br label %132, !llvm.loop !59

211:                                              ; preds = %132
  %212 = load ptr, ptr @_ZL8g_Device, align 8, !tbaa !9
  %213 = call i32 @vkDeviceWaitIdle(ptr noundef %212)
  store i32 %213, ptr %11, align 4, !tbaa !11
  %214 = load i32, ptr %11, align 4, !tbaa !11
  call void @_ZL15check_vk_result8VkResult(i32 noundef %214)
  call void @_Z25ImGui_ImplVulkan_Shutdownv()
  call void @_Z23ImGui_ImplGlfw_Shutdownv()
  call void @_ZN5ImGui14DestroyContextEP12ImGuiContext(ptr noundef null)
  call void @_ZL19CleanupVulkanWindowv()
  call void @_ZL13CleanupVulkanv()
  %215 = load ptr, ptr %6, align 8, !tbaa !9
  call void @glfwDestroyWindow(ptr noundef %215)
  call void @glfwTerminate()
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 88, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %216

216:                                              ; preds = %211, %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %217

217:                                              ; preds = %216, %31
  %218 = load i32, ptr %3, align 4
  ret i32 %218
}

declare ptr @glfwSetErrorCallback(ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL19glfw_error_callbackiPKc(i32 noundef, ptr noundef) #2

declare i32 @glfwInit() #1

declare void @glfwWindowHint(i32 noundef, i32 noundef) #1

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

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

declare i32 @glfwVulkanSupported() #1

declare i32 @printf(ptr noundef, ...) #1

declare ptr @glfwGetRequiredInstanceExtensions(ptr noundef) #1

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

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

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

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

declare ptr @glfwSetFramebufferSizeCallback(ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL20glfw_resize_callbackP10GLFWwindowii(ptr noundef, i32 noundef, i32 noundef) #2

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

declare noundef zeroext i1 @_ZN5ImGui30DebugCheckVersionAndDataLayoutEPKcmmmmmm(ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef) #1

declare noundef ptr @_ZN5ImGui13CreateContextEP11ImFontAtlas(ptr noundef) #1

declare noundef nonnull align 8 dereferenceable(5472) ptr @_ZN5ImGui5GetIOEv() #1

declare void @_ZN5ImGui15StyleColorsDarkEP10ImGuiStyle(ptr noundef) #1

declare noundef zeroext i1 @_Z28ImGui_ImplGlfw_InitForVulkanP10GLFWwindowb(ptr noundef, i1 noundef zeroext) #1

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

declare noundef zeroext i1 @_Z21ImGui_ImplVulkan_InitP25ImGui_ImplVulkan_InitInfoP14VkRenderPass_T(ptr noundef, ptr noundef) #1

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

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

declare noundef zeroext i1 @_Z35ImGui_ImplVulkan_CreateFontsTextureP17VkCommandBuffer_T(ptr noundef) #1

declare i32 @vkEndCommandBuffer(ptr noundef) #1

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

declare i32 @vkDeviceWaitIdle(ptr noundef) #1

declare void @_Z41ImGui_ImplVulkan_DestroyFontUploadObjectsv() #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6ImVec4C2Effff(ptr noundef nonnull align 4 dereferenceable(16), float noundef, float noundef, float noundef, float noundef) unnamed_addr #2 align 2

declare i32 @glfwWindowShouldClose(ptr noundef) #1

declare void @glfwPollEvents() #1

declare void @_Z33ImGui_ImplVulkan_SetMinImageCountj(i32 noundef) #1

declare void @_Z38ImGui_ImplVulkanH_CreateOrResizeWindowP12VkInstance_TP18VkPhysicalDevice_TP10VkDevice_TP24ImGui_ImplVulkanH_WindowjPK21VkAllocationCallbacksiij(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef) #1

declare void @_Z25ImGui_ImplVulkan_NewFramev() #1

declare void @_Z23ImGui_ImplGlfw_NewFramev() #1

declare void @_ZN5ImGui8NewFrameEv() #1

declare void @_ZN5ImGui14ShowDemoWindowEPb(ptr noundef) #1

declare noundef zeroext i1 @_ZN5ImGui5BeginEPKcPbi(ptr noundef, ptr noundef, i32 noundef) #1

declare void @_ZN5ImGui4TextEPKcz(ptr noundef, ...) #1

declare noundef zeroext i1 @_ZN5ImGui8CheckboxEPKcPb(ptr noundef, ptr noundef) #1

declare noundef zeroext i1 @_ZN5ImGui11SliderFloatEPKcPfffS1_f(ptr noundef, ptr noundef, float noundef, float noundef, ptr noundef, float noundef) #1

declare noundef zeroext i1 @_ZN5ImGui10ColorEdit3EPKcPfi(ptr noundef, ptr noundef, i32 noundef) #1

declare noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef, ptr noundef nonnull align 4 dereferenceable(8)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #2 align 2

declare void @_ZN5ImGui8SameLineEff(float noundef, float noundef) #1

declare void @_ZN5ImGui3EndEv() #1

declare void @_ZN5ImGui6RenderEv() #1

declare noundef ptr @_ZN5ImGui11GetDrawDataEv() #1

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL12FramePresentP24ImGui_ImplVulkanH_Window(ptr noundef) #4

declare void @_Z25ImGui_ImplVulkan_Shutdownv() #1

declare void @_Z23ImGui_ImplGlfw_Shutdownv() #1

declare void @_ZN5ImGui14DestroyContextEP12ImGuiContext(ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL19CleanupVulkanWindowv() #4

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL13CleanupVulkanv() #4

declare void @glfwDestroyWindow(ptr noundef) #1

declare void @glfwTerminate() #1

attributes #0 = { mustprogress norecurse 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 #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 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 #3 = { nocallback nofree nosync 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTS8VkResult", !7, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTS25ImGui_ImplVulkan_InitInfo", !10, i64 0, !10, i64 8, !10, i64 16, !6, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !6, i64 56, !6, i64 60, !15, i64 64, !10, i64 72, !10, i64 80}
!15 = !{!"_ZTS21VkSampleCountFlagBits", !7, i64 0}
!16 = !{!14, !10, i64 8}
!17 = !{!14, !10, i64 16}
!18 = !{!14, !6, i64 24}
!19 = !{!14, !10, i64 32}
!20 = !{!14, !10, i64 40}
!21 = !{!14, !10, i64 48}
!22 = !{!14, !10, i64 72}
!23 = !{!14, !6, i64 56}
!24 = !{!25, !6, i64 72}
!25 = !{!"_ZTS24ImGui_ImplVulkanH_Window", !6, i64 0, !6, i64 4, !10, i64 8, !10, i64 16, !26, i64 24, !29, i64 32, !10, i64 40, !30, i64 48, !7, i64 52, !6, i64 68, !6, i64 72, !6, i64 76, !10, i64 80, !10, i64 88}
!26 = !{!"_ZTS18VkSurfaceFormatKHR", !27, i64 0, !28, i64 4}
!27 = !{!"_ZTS8VkFormat", !7, i64 0}
!28 = !{!"_ZTS15VkColorSpaceKHR", !7, i64 0}
!29 = !{!"_ZTS16VkPresentModeKHR", !7, i64 0}
!30 = !{!"bool", !7, i64 0}
!31 = !{!14, !6, i64 60}
!32 = !{!14, !10, i64 80}
!33 = !{!25, !10, i64 40}
!34 = !{!25, !10, i64 80}
!35 = !{!25, !6, i64 68}
!36 = !{!37, !10, i64 0}
!37 = !{!"_ZTS23ImGui_ImplVulkanH_Frame", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40}
!38 = !{!37, !10, i64 8}
!39 = !{!40, !41, i64 0}
!40 = !{!"_ZTS24VkCommandBufferBeginInfo", !41, i64 0, !10, i64 8, !6, i64 16, !10, i64 24}
!41 = !{!"_ZTS15VkStructureType", !7, i64 0}
!42 = !{!40, !6, i64 16}
!43 = !{!44, !41, i64 0}
!44 = !{!"_ZTS12VkSubmitInfo", !41, i64 0, !10, i64 8, !6, i64 16, !10, i64 24, !10, i64 32, !6, i64 40, !10, i64 48, !6, i64 56, !10, i64 64}
!45 = !{!44, !6, i64 40}
!46 = !{!44, !10, i64 48}
!47 = !{!30, !30, i64 0}
!48 = !{i8 0, i8 2}
!49 = !{}
!50 = !{!51, !53, i64 928}
!51 = !{!"_ZTS7ImGuiIO", !6, i64 0, !6, i64 4, !52, i64 8, !53, i64 16, !53, i64 20, !10, i64 24, !10, i64 32, !53, i64 40, !53, i64 44, !53, i64 48, !7, i64 52, !53, i64 140, !53, i64 144, !10, i64 152, !10, i64 160, !53, i64 168, !30, i64 172, !10, i64 176, !52, i64 184, !30, i64 192, !30, i64 193, !30, i64 194, !30, i64 195, !30, i64 196, !53, i64 200, !10, i64 208, !10, i64 216, !10, i64 224, !10, i64 232, !10, i64 240, !10, i64 248, !10, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !52, i64 296, !7, i64 304, !53, i64 312, !53, i64 316, !30, i64 320, !30, i64 321, !30, i64 322, !30, i64 323, !7, i64 324, !7, i64 836, !30, i64 920, !30, i64 921, !30, i64 922, !30, i64 923, !30, i64 924, !30, i64 925, !30, i64 926, !53, i64 928, !6, i64 932, !6, i64 936, !6, i64 940, !6, i64 944, !6, i64 948, !52, i64 952, !6, i64 960, !52, i64 964, !7, i64 972, !7, i64 1016, !7, i64 1056, !7, i64 1061, !7, i64 1066, !7, i64 1071, !7, i64 1076, !7, i64 1084, !7, i64 1104, !7, i64 1124, !7, i64 1164, !7, i64 1184, !7, i64 3232, !7, i64 5280, !7, i64 5364, !53, i64 5448, !54, i64 5452, !55, i64 5456}
!52 = !{!"_ZTS6ImVec2", !53, i64 0, !53, i64 4}
!53 = !{!"float", !7, i64 0}
!54 = !{!"short", !7, i64 0}
!55 = !{!"_ZTS8ImVectorItE", !6, i64 0, !6, i64 4, !10, i64 8}
!56 = !{!57, !53, i64 36}
!57 = !{!"_ZTS10ImDrawData", !30, i64 0, !10, i64 8, !6, i64 16, !6, i64 20, !6, i64 24, !52, i64 28, !52, i64 36, !52, i64 44}
!58 = !{!57, !53, i64 40}
!59 = distinct !{!59, !60}
!60 = !{!"llvm.loop.mustprogress"}


; 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.ImGui_ImplVulkanH_Window = type { i32, i32, ptr, ptr, %struct.VkSurfaceFormatKHR, i32, ptr, i8, %union.VkClearValue, i32, i32, i32, ptr, ptr }
%struct.VkSurfaceFormatKHR = type { i32, i32 }
%union.VkClearValue = type { %union.VkClearColorValue }
%union.VkClearColorValue = type { [4 x float] }
%struct.ImGui_ImplVulkan_InitInfo = type { ptr, ptr, ptr, i32, ptr, ptr, ptr, i32, i32, i32, ptr, ptr }
%struct.VkCommandBufferBeginInfo = type { i32, ptr, i32, ptr }
%struct.VkSubmitInfo = type { i32, ptr, i32, ptr, ptr, i32, ptr, i32, ptr }
%struct.ImVec4 = type { float, float, float, float }
%struct.ImVec2 = type { float, float }
%struct.ImGui_ImplVulkanH_Frame = type { ptr, ptr, ptr, ptr, ptr, ptr }

@_ZL16g_MainWindowData = external hidden global %struct.ImGui_ImplVulkanH_Window, align 8
@.str = external hidden unnamed_addr constant [31 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [28 x i8], align 1
@_ZL10g_Instance = external hidden local_unnamed_addr global ptr, align 8
@_ZL11g_Allocator = external hidden local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [9 x i8], align 1
@_ZL16g_PhysicalDevice = external hidden local_unnamed_addr global ptr, align 8
@_ZL8g_Device = external hidden local_unnamed_addr global ptr, align 8
@_ZL13g_QueueFamily = external hidden local_unnamed_addr global i32, align 4
@_ZL7g_Queue = external hidden local_unnamed_addr global ptr, align 8
@_ZL15g_PipelineCache = external hidden local_unnamed_addr global ptr, align 8
@_ZL16g_DescriptorPool = external hidden local_unnamed_addr global ptr, align 8
@_ZL15g_MinImageCount = external hidden local_unnamed_addr global i32, align 4
@_ZL18g_SwapChainRebuild = external hidden local_unnamed_addr global i8, align 1
@_ZL22g_SwapChainResizeWidth = external hidden local_unnamed_addr global i32, align 4
@_ZL23g_SwapChainResizeHeight = external hidden local_unnamed_addr global i32, align 4
@_ZZ4mainE1f = external hidden global float, align 4
@_ZZ4mainE7counter = external hidden local_unnamed_addr global i32, align 4
@.str.3 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef range(i32 0, 2) i32 @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %struct.ImGui_ImplVulkan_InitInfo, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %struct.VkCommandBufferBeginInfo, align 8
  %10 = alloca %struct.VkSubmitInfo, align 8
  %11 = alloca i8, align 1
  %12 = alloca i8, align 1
  %13 = alloca %struct.ImVec4, align 4
  %14 = alloca %struct.ImVec2, align 4
  %15 = alloca %struct.ImVec2, align 4
  %16 = tail call ptr @glfwSetErrorCallback(ptr noundef nonnull @_ZL19glfw_error_callbackiPKc)
  %17 = tail call i32 @glfwInit()
  %.not = icmp eq i32 %17, 0
  br i1 %.not, label %141, label %18

18:                                               ; preds = %2
  tail call void @glfwWindowHint(i32 noundef 139265, i32 noundef 0)
  %19 = tail call ptr @glfwCreateWindow(i32 noundef 1280, i32 noundef 720, ptr noundef nonnull @.str, ptr noundef null, ptr noundef null)
  %20 = tail call i32 @glfwVulkanSupported()
  %.not32 = icmp eq i32 %20, 0
  br i1 %.not32, label %21, label %23

21:                                               ; preds = %18
  %22 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  br label %141

23:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  store i32 0, ptr %3, align 4, !tbaa !5
  %24 = call ptr @glfwGetRequiredInstanceExtensions(ptr noundef nonnull %3)
  %25 = load i32, ptr %3, align 4, !tbaa !5
  call void @_ZL11SetupVulkanPPKcj(ptr noundef %24, i32 noundef %25)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %26 = load ptr, ptr @_ZL10g_Instance, align 8, !tbaa !9
  %27 = load ptr, ptr @_ZL11g_Allocator, align 8, !tbaa !9
  %28 = call i32 @glfwCreateWindowSurface(ptr noundef %26, ptr noundef %19, ptr noundef %27, ptr noundef nonnull %4)
  call void @_ZL15check_vk_result8VkResult(i32 noundef %28)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  call void @glfwGetFramebufferSize(ptr noundef %19, ptr noundef nonnull %5, ptr noundef nonnull %6)
  %29 = call ptr @glfwSetFramebufferSizeCallback(ptr noundef %19, ptr noundef nonnull @_ZL20glfw_resize_callbackP10GLFWwindowii)
  %30 = load ptr, ptr %4, align 8, !tbaa !9
  %31 = load i32, ptr %5, align 4, !tbaa !5
  %32 = load i32, ptr %6, align 4, !tbaa !5
  call void @_ZL17SetupVulkanWindowP24ImGui_ImplVulkanH_WindowP14VkSurfaceKHR_Tii(ptr noundef nonnull @_ZL16g_MainWindowData, ptr noundef %30, i32 noundef %31, i32 noundef %32)
  %33 = call noundef zeroext i1 @_ZN5ImGui30DebugCheckVersionAndDataLayoutEPKcmmmmmm(ptr noundef nonnull @.str.2, i64 noundef 5472, i64 noundef 952, i64 noundef 8, i64 noundef 16, i64 noundef 20, i64 noundef 2)
  %34 = call noundef ptr @_ZN5ImGui13CreateContextEP11ImFontAtlas(ptr noundef null)
  %35 = call noundef nonnull align 8 dereferenceable(5472) ptr @_ZN5ImGui5GetIOEv()
  call void @_ZN5ImGui15StyleColorsDarkEP10ImGuiStyle(ptr noundef null)
  %36 = call noundef zeroext i1 @_Z28ImGui_ImplGlfw_InitForVulkanP10GLFWwindowb(ptr noundef %19, i1 noundef zeroext true)
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %7) #7
  %37 = getelementptr inbounds i8, ptr %7, i64 24
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(88) %37, i8 0, i64 48, i1 false)
  %38 = load ptr, ptr @_ZL10g_Instance, align 8, !tbaa !9
  store ptr %38, ptr %7, align 8, !tbaa !11
  %39 = load ptr, ptr @_ZL16g_PhysicalDevice, align 8, !tbaa !9
  %40 = getelementptr inbounds i8, ptr %7, i64 8
  store ptr %39, ptr %40, align 8, !tbaa !14
  %41 = load ptr, ptr @_ZL8g_Device, align 8, !tbaa !9
  %42 = getelementptr inbounds i8, ptr %7, i64 16
  store ptr %41, ptr %42, align 8, !tbaa !15
  %43 = load i32, ptr @_ZL13g_QueueFamily, align 4, !tbaa !5
  %44 = getelementptr inbounds i8, ptr %7, i64 24
  store i32 %43, ptr %44, align 8, !tbaa !16
  %45 = load ptr, ptr @_ZL7g_Queue, align 8, !tbaa !9
  %46 = getelementptr inbounds i8, ptr %7, i64 32
  store ptr %45, ptr %46, align 8, !tbaa !17
  %47 = load ptr, ptr @_ZL15g_PipelineCache, align 8, !tbaa !9
  %48 = getelementptr inbounds i8, ptr %7, i64 40
  store ptr %47, ptr %48, align 8, !tbaa !18
  %49 = load ptr, ptr @_ZL16g_DescriptorPool, align 8, !tbaa !9
  %50 = getelementptr inbounds i8, ptr %7, i64 48
  store ptr %49, ptr %50, align 8, !tbaa !19
  %51 = load ptr, ptr @_ZL11g_Allocator, align 8, !tbaa !9
  %52 = getelementptr inbounds i8, ptr %7, i64 72
  store ptr %51, ptr %52, align 8, !tbaa !20
  %53 = load i32, ptr @_ZL15g_MinImageCount, align 4, !tbaa !5
  %54 = getelementptr inbounds i8, ptr %7, i64 56
  store i32 %53, ptr %54, align 8, !tbaa !21
  %55 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL16g_MainWindowData, i64 72), align 8, !tbaa !22
  %56 = getelementptr inbounds i8, ptr %7, i64 60
  store i32 %55, ptr %56, align 4, !tbaa !29
  %57 = getelementptr inbounds i8, ptr %7, i64 80
  store ptr @_ZL15check_vk_result8VkResult, ptr %57, align 8, !tbaa !30
  %58 = load ptr, ptr getelementptr inbounds (i8, ptr @_ZL16g_MainWindowData, i64 40), align 8, !tbaa !31
  %59 = call noundef zeroext i1 @_Z21ImGui_ImplVulkan_InitP25ImGui_ImplVulkan_InitInfoP14VkRenderPass_T(ptr noundef nonnull %7, ptr noundef %58)
  %60 = load ptr, ptr getelementptr inbounds (i8, ptr @_ZL16g_MainWindowData, i64 80), align 8, !tbaa !32
  %61 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL16g_MainWindowData, i64 68), align 4, !tbaa !33
  %62 = zext i32 %61 to i64
  %63 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %60, i64 %62
  %64 = load ptr, ptr %63, align 8, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %65 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %60, i64 %62, i32 1
  %66 = load ptr, ptr %65, align 8, !tbaa !36
  store ptr %66, ptr %8, align 8, !tbaa !9
  %67 = load ptr, ptr @_ZL8g_Device, align 8, !tbaa !9
  %68 = call i32 @vkResetCommandPool(ptr noundef %67, ptr noundef %64, i32 noundef 0)
  call void @_ZL15check_vk_result8VkResult(i32 noundef %68)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %9, i8 0, i64 32, i1 false)
  store i32 42, ptr %9, align 8, !tbaa !37
  %69 = getelementptr inbounds i8, ptr %9, i64 16
  store i32 1, ptr %69, align 8, !tbaa !40
  %70 = call i32 @vkBeginCommandBuffer(ptr noundef %66, ptr noundef nonnull %9)
  call void @_ZL15check_vk_result8VkResult(i32 noundef %70)
  %71 = call noundef zeroext i1 @_Z35ImGui_ImplVulkan_CreateFontsTextureP17VkCommandBuffer_T(ptr noundef %66)
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %10) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(72) %10, i8 0, i64 72, i1 false)
  store i32 4, ptr %10, align 8, !tbaa !41
  %72 = getelementptr inbounds i8, ptr %10, i64 40
  store i32 1, ptr %72, align 8, !tbaa !43
  %73 = getelementptr inbounds i8, ptr %10, i64 48
  store ptr %8, ptr %73, align 8, !tbaa !44
  %74 = call i32 @vkEndCommandBuffer(ptr noundef %66)
  call void @_ZL15check_vk_result8VkResult(i32 noundef %74)
  %75 = load ptr, ptr @_ZL7g_Queue, align 8, !tbaa !9
  %76 = call i32 @vkQueueSubmit(ptr noundef %75, i32 noundef 1, ptr noundef nonnull %10, ptr noundef null)
  call void @_ZL15check_vk_result8VkResult(i32 noundef %76)
  %77 = load ptr, ptr @_ZL8g_Device, align 8, !tbaa !9
  %78 = call i32 @vkDeviceWaitIdle(ptr noundef %77)
  call void @_ZL15check_vk_result8VkResult(i32 noundef %78)
  call void @_Z41ImGui_ImplVulkan_DestroyFontUploadObjectsv()
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #7
  store i8 1, ptr %11, align 1, !tbaa !45
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #7
  store i8 0, ptr %12, align 1, !tbaa !45
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #7
  call void @_ZN6ImVec4C2Effff(ptr noundef nonnull align 4 dereferenceable(16) %13, float noundef 0x3FDCCCCCC0000000, float noundef 0x3FE19999A0000000, float noundef 0x3FE3333340000000, float noundef 1.000000e+00)
  %79 = call i32 @glfwWindowShouldClose(ptr noundef %19)
  %.not3334 = icmp eq i32 %79, 0
  br i1 %.not3334, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %23, %.critedge
  call void @glfwPollEvents()
  %80 = load i8, ptr @_ZL18g_SwapChainRebuild, align 1, !tbaa !45, !range !46, !noundef !47
  %81 = trunc nuw i8 %80 to i1
  %82 = load i32, ptr @_ZL22g_SwapChainResizeWidth, align 4
  %83 = icmp sgt i32 %82, 0
  %or.cond = select i1 %81, i1 %83, i1 false
  %84 = load i32, ptr @_ZL23g_SwapChainResizeHeight, align 4
  %85 = icmp sgt i32 %84, 0
  %or.cond3 = select i1 %or.cond, i1 %85, i1 false
  br i1 %or.cond3, label %86, label %96

86:                                               ; preds = %.lr.ph
  store i8 0, ptr @_ZL18g_SwapChainRebuild, align 1, !tbaa !45
  %87 = load i32, ptr @_ZL15g_MinImageCount, align 4, !tbaa !5
  call void @_Z33ImGui_ImplVulkan_SetMinImageCountj(i32 noundef %87)
  %88 = load ptr, ptr @_ZL10g_Instance, align 8, !tbaa !9
  %89 = load ptr, ptr @_ZL16g_PhysicalDevice, align 8, !tbaa !9
  %90 = load ptr, ptr @_ZL8g_Device, align 8, !tbaa !9
  %91 = load i32, ptr @_ZL13g_QueueFamily, align 4, !tbaa !5
  %92 = load ptr, ptr @_ZL11g_Allocator, align 8, !tbaa !9
  %93 = load i32, ptr @_ZL22g_SwapChainResizeWidth, align 4, !tbaa !5
  %94 = load i32, ptr @_ZL23g_SwapChainResizeHeight, align 4, !tbaa !5
  %95 = load i32, ptr @_ZL15g_MinImageCount, align 4, !tbaa !5
  call void @_Z38ImGui_ImplVulkanH_CreateOrResizeWindowP12VkInstance_TP18VkPhysicalDevice_TP10VkDevice_TP24ImGui_ImplVulkanH_WindowjPK21VkAllocationCallbacksiij(ptr noundef %88, ptr noundef %89, ptr noundef %90, ptr noundef nonnull @_ZL16g_MainWindowData, i32 noundef %91, ptr noundef %92, i32 noundef %93, i32 noundef %94, i32 noundef %95)
  store i32 0, ptr getelementptr inbounds (i8, ptr @_ZL16g_MainWindowData, i64 68), align 4, !tbaa !33
  br label %96

96:                                               ; preds = %86, %.lr.ph
  call void @_Z25ImGui_ImplVulkan_NewFramev()
  call void @_Z23ImGui_ImplGlfw_NewFramev()
  call void @_ZN5ImGui8NewFrameEv()
  %97 = load i8, ptr %11, align 1, !tbaa !45, !range !46, !noundef !47
  %98 = trunc nuw i8 %97 to i1
  br i1 %98, label %99, label %100

99:                                               ; preds = %96
  call void @_ZN5ImGui14ShowDemoWindowEPb(ptr noundef nonnull %11)
  br label %100

100:                                              ; preds = %99, %96
  %101 = call noundef zeroext i1 @_ZN5ImGui5BeginEPKcPbi(ptr noundef nonnull @.str.3, ptr noundef null, i32 noundef 0)
  call void (ptr, ...) @_ZN5ImGui4TextEPKcz(ptr noundef nonnull @.str.4)
  %102 = call noundef zeroext i1 @_ZN5ImGui8CheckboxEPKcPb(ptr noundef nonnull @.str.5, ptr noundef nonnull %11)
  %103 = call noundef zeroext i1 @_ZN5ImGui8CheckboxEPKcPb(ptr noundef nonnull @.str.6, ptr noundef nonnull %12)
  %104 = call noundef zeroext i1 @_ZN5ImGui11SliderFloatEPKcPfffS1_f(ptr noundef nonnull @.str.7, ptr noundef nonnull @_ZZ4mainE1f, float noundef 0.000000e+00, float noundef 1.000000e+00, ptr noundef nonnull @.str.8, float noundef 1.000000e+00)
  %105 = call noundef zeroext i1 @_ZN5ImGui10ColorEdit3EPKcPfi(ptr noundef nonnull @.str.9, ptr noundef nonnull %13, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %14, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %106 = call noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef nonnull @.str.10, ptr noundef nonnull align 4 dereferenceable(8) %14)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  br i1 %106, label %107, label %110

107:                                              ; preds = %100
  %108 = load i32, ptr @_ZZ4mainE7counter, align 4, !tbaa !5
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr @_ZZ4mainE7counter, align 4, !tbaa !5
  br label %110

110:                                              ; preds = %107, %100
  call void @_ZN5ImGui8SameLineEff(float noundef 0.000000e+00, float noundef -1.000000e+00)
  %111 = load i32, ptr @_ZZ4mainE7counter, align 4, !tbaa !5
  call void (ptr, ...) @_ZN5ImGui4TextEPKcz(ptr noundef nonnull @.str.11, i32 noundef %111)
  %112 = call noundef nonnull align 8 dereferenceable(5472) ptr @_ZN5ImGui5GetIOEv()
  %113 = getelementptr inbounds i8, ptr %112, i64 928
  %114 = load float, ptr %113, align 8, !tbaa !48
  %115 = fdiv float 1.000000e+03, %114
  %116 = fpext float %115 to double
  %117 = call noundef nonnull align 8 dereferenceable(5472) ptr @_ZN5ImGui5GetIOEv()
  %118 = getelementptr inbounds i8, ptr %117, i64 928
  %119 = load float, ptr %118, align 8, !tbaa !48
  %120 = fpext float %119 to double
  call void (ptr, ...) @_ZN5ImGui4TextEPKcz(ptr noundef nonnull @.str.12, double noundef %116, double noundef %120)
  call void @_ZN5ImGui3EndEv()
  %121 = load i8, ptr %12, align 1, !tbaa !45, !range !46, !noundef !47
  %122 = trunc nuw i8 %121 to i1
  br i1 %122, label %123, label %128

123:                                              ; preds = %110
  %124 = call noundef zeroext i1 @_ZN5ImGui5BeginEPKcPbi(ptr noundef nonnull @.str.6, ptr noundef nonnull %12, i32 noundef 0)
  call void (ptr, ...) @_ZN5ImGui4TextEPKcz(ptr noundef nonnull @.str.13)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %15, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %125 = call noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef nonnull @.str.14, ptr noundef nonnull align 4 dereferenceable(8) %15)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  br i1 %125, label %126, label %127

126:                                              ; preds = %123
  store i8 0, ptr %12, align 1, !tbaa !45
  br label %127

127:                                              ; preds = %126, %123
  call void @_ZN5ImGui3EndEv()
  br label %128

128:                                              ; preds = %127, %110
  call void @_ZN5ImGui6RenderEv()
  %129 = call noundef ptr @_ZN5ImGui11GetDrawDataEv()
  %130 = getelementptr inbounds i8, ptr %129, i64 36
  %131 = load float, ptr %130, align 4, !tbaa !54
  %132 = fcmp ugt float %131, 0.000000e+00
  br i1 %132, label %133, label %.critedge

133:                                              ; preds = %128
  %134 = getelementptr inbounds i8, ptr %129, i64 40
  %135 = load float, ptr %134, align 4, !tbaa !56
  %136 = fcmp ugt float %135, 0.000000e+00
  br i1 %136, label %137, label %.critedge

137:                                              ; preds = %133
  call void @_ZL11FrameRenderP24ImGui_ImplVulkanH_WindowP10ImDrawData(ptr noundef nonnull @_ZL16g_MainWindowData, ptr noundef nonnull %129)
  call void @_ZL12FramePresentP24ImGui_ImplVulkanH_Window(ptr noundef nonnull @_ZL16g_MainWindowData)
  br label %.critedge

.critedge:                                        ; preds = %128, %137, %133
  %138 = call i32 @glfwWindowShouldClose(ptr noundef %19)
  %.not33 = icmp eq i32 %138, 0
  br i1 %.not33, label %.lr.ph, label %._crit_edge, !llvm.loop !57

._crit_edge:                                      ; preds = %.critedge, %23
  %139 = load ptr, ptr @_ZL8g_Device, align 8, !tbaa !9
  %140 = call i32 @vkDeviceWaitIdle(ptr noundef %139)
  call void @_ZL15check_vk_result8VkResult(i32 noundef %140)
  call void @_Z25ImGui_ImplVulkan_Shutdownv()
  call void @_Z23ImGui_ImplGlfw_Shutdownv()
  call void @_ZN5ImGui14DestroyContextEP12ImGuiContext(ptr noundef null)
  call void @_ZL19CleanupVulkanWindowv()
  call void @_ZL13CleanupVulkanv()
  call void @glfwDestroyWindow(ptr noundef %19)
  call void @glfwTerminate()
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  br label %141

141:                                              ; preds = %21, %._crit_edge, %2
  %.1 = phi i32 [ 1, %2 ], [ 0, %._crit_edge ], [ 1, %21 ]
  ret i32 %.1
}

declare ptr @glfwSetErrorCallback(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL19glfw_error_callbackiPKc(i32 noundef, ptr noundef) #2

declare i32 @glfwInit() local_unnamed_addr #1

declare void @glfwWindowHint(i32 noundef, i32 noundef) local_unnamed_addr #1

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

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

declare i32 @glfwVulkanSupported() local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4

declare ptr @glfwGetRequiredInstanceExtensions(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL11SetupVulkanPPKcj(ptr noundef, i32 noundef) local_unnamed_addr #5

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

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

declare void @glfwGetFramebufferSize(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @glfwSetFramebufferSizeCallback(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL20glfw_resize_callbackP10GLFWwindowii(ptr noundef, i32 noundef, i32 noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL17SetupVulkanWindowP24ImGui_ImplVulkanH_WindowP14VkSurfaceKHR_Tii(ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #5

declare noundef zeroext i1 @_ZN5ImGui30DebugCheckVersionAndDataLayoutEPKcmmmmmm(ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #1

declare noundef ptr @_ZN5ImGui13CreateContextEP11ImFontAtlas(ptr noundef) local_unnamed_addr #1

declare noundef nonnull align 8 dereferenceable(5472) ptr @_ZN5ImGui5GetIOEv() local_unnamed_addr #1

declare void @_ZN5ImGui15StyleColorsDarkEP10ImGuiStyle(ptr noundef) local_unnamed_addr #1

declare noundef zeroext i1 @_Z28ImGui_ImplGlfw_InitForVulkanP10GLFWwindowb(ptr noundef, i1 noundef zeroext) 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) #6

declare noundef zeroext i1 @_Z21ImGui_ImplVulkan_InitP25ImGui_ImplVulkan_InitInfoP14VkRenderPass_T(ptr noundef, ptr noundef) local_unnamed_addr #1

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

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

declare noundef zeroext i1 @_Z35ImGui_ImplVulkan_CreateFontsTextureP17VkCommandBuffer_T(ptr noundef) local_unnamed_addr #1

declare i32 @vkEndCommandBuffer(ptr noundef) local_unnamed_addr #1

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

declare i32 @vkDeviceWaitIdle(ptr noundef) local_unnamed_addr #1

declare void @_Z41ImGui_ImplVulkan_DestroyFontUploadObjectsv() local_unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6ImVec4C2Effff(ptr noundef nonnull align 4 dereferenceable(16), float noundef, float noundef, float noundef, float noundef) unnamed_addr #2 align 2

declare i32 @glfwWindowShouldClose(ptr noundef) local_unnamed_addr #1

declare void @glfwPollEvents() local_unnamed_addr #1

declare void @_Z33ImGui_ImplVulkan_SetMinImageCountj(i32 noundef) local_unnamed_addr #1

declare void @_Z38ImGui_ImplVulkanH_CreateOrResizeWindowP12VkInstance_TP18VkPhysicalDevice_TP10VkDevice_TP24ImGui_ImplVulkanH_WindowjPK21VkAllocationCallbacksiij(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

declare void @_Z25ImGui_ImplVulkan_NewFramev() local_unnamed_addr #1

declare void @_Z23ImGui_ImplGlfw_NewFramev() local_unnamed_addr #1

declare void @_ZN5ImGui8NewFrameEv() local_unnamed_addr #1

declare void @_ZN5ImGui14ShowDemoWindowEPb(ptr noundef) local_unnamed_addr #1

declare noundef zeroext i1 @_ZN5ImGui5BeginEPKcPbi(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare void @_ZN5ImGui4TextEPKcz(ptr noundef, ...) local_unnamed_addr #1

declare noundef zeroext i1 @_ZN5ImGui8CheckboxEPKcPb(ptr noundef, ptr noundef) local_unnamed_addr #1

declare noundef zeroext i1 @_ZN5ImGui11SliderFloatEPKcPfffS1_f(ptr noundef, ptr noundef, float noundef, float noundef, ptr noundef, float noundef) local_unnamed_addr #1

declare noundef zeroext i1 @_ZN5ImGui10ColorEdit3EPKcPfi(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef, ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #2 align 2

declare void @_ZN5ImGui8SameLineEff(float noundef, float noundef) local_unnamed_addr #1

declare void @_ZN5ImGui3EndEv() local_unnamed_addr #1

declare void @_ZN5ImGui6RenderEv() local_unnamed_addr #1

declare noundef ptr @_ZN5ImGui11GetDrawDataEv() local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL11FrameRenderP24ImGui_ImplVulkanH_WindowP10ImDrawData(ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL12FramePresentP24ImGui_ImplVulkanH_Window(ptr noundef) local_unnamed_addr #5

declare void @_Z25ImGui_ImplVulkan_Shutdownv() local_unnamed_addr #1

declare void @_Z23ImGui_ImplGlfw_Shutdownv() local_unnamed_addr #1

declare void @_ZN5ImGui14DestroyContextEP12ImGuiContext(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL19CleanupVulkanWindowv() local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL13CleanupVulkanv() local_unnamed_addr #5

declare void @glfwDestroyWindow(ptr noundef) local_unnamed_addr #1

declare void @glfwTerminate() local_unnamed_addr #1

attributes #0 = { mustprogress norecurse 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 #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 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTS25ImGui_ImplVulkan_InitInfo", !10, i64 0, !10, i64 8, !10, i64 16, !6, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !6, i64 56, !6, i64 60, !13, i64 64, !10, i64 72, !10, i64 80}
!13 = !{!"_ZTS21VkSampleCountFlagBits", !7, i64 0}
!14 = !{!12, !10, i64 8}
!15 = !{!12, !10, i64 16}
!16 = !{!12, !6, i64 24}
!17 = !{!12, !10, i64 32}
!18 = !{!12, !10, i64 40}
!19 = !{!12, !10, i64 48}
!20 = !{!12, !10, i64 72}
!21 = !{!12, !6, i64 56}
!22 = !{!23, !6, i64 72}
!23 = !{!"_ZTS24ImGui_ImplVulkanH_Window", !6, i64 0, !6, i64 4, !10, i64 8, !10, i64 16, !24, i64 24, !27, i64 32, !10, i64 40, !28, i64 48, !7, i64 52, !6, i64 68, !6, i64 72, !6, i64 76, !10, i64 80, !10, i64 88}
!24 = !{!"_ZTS18VkSurfaceFormatKHR", !25, i64 0, !26, i64 4}
!25 = !{!"_ZTS8VkFormat", !7, i64 0}
!26 = !{!"_ZTS15VkColorSpaceKHR", !7, i64 0}
!27 = !{!"_ZTS16VkPresentModeKHR", !7, i64 0}
!28 = !{!"bool", !7, i64 0}
!29 = !{!12, !6, i64 60}
!30 = !{!12, !10, i64 80}
!31 = !{!23, !10, i64 40}
!32 = !{!23, !10, i64 80}
!33 = !{!23, !6, i64 68}
!34 = !{!35, !10, i64 0}
!35 = !{!"_ZTS23ImGui_ImplVulkanH_Frame", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40}
!36 = !{!35, !10, i64 8}
!37 = !{!38, !39, i64 0}
!38 = !{!"_ZTS24VkCommandBufferBeginInfo", !39, i64 0, !10, i64 8, !6, i64 16, !10, i64 24}
!39 = !{!"_ZTS15VkStructureType", !7, i64 0}
!40 = !{!38, !6, i64 16}
!41 = !{!42, !39, i64 0}
!42 = !{!"_ZTS12VkSubmitInfo", !39, i64 0, !10, i64 8, !6, i64 16, !10, i64 24, !10, i64 32, !6, i64 40, !10, i64 48, !6, i64 56, !10, i64 64}
!43 = !{!42, !6, i64 40}
!44 = !{!42, !10, i64 48}
!45 = !{!28, !28, i64 0}
!46 = !{i8 0, i8 2}
!47 = !{}
!48 = !{!49, !51, i64 928}
!49 = !{!"_ZTS7ImGuiIO", !6, i64 0, !6, i64 4, !50, i64 8, !51, i64 16, !51, i64 20, !10, i64 24, !10, i64 32, !51, i64 40, !51, i64 44, !51, i64 48, !7, i64 52, !51, i64 140, !51, i64 144, !10, i64 152, !10, i64 160, !51, i64 168, !28, i64 172, !10, i64 176, !50, i64 184, !28, i64 192, !28, i64 193, !28, i64 194, !28, i64 195, !28, i64 196, !51, i64 200, !10, i64 208, !10, i64 216, !10, i64 224, !10, i64 232, !10, i64 240, !10, i64 248, !10, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !50, i64 296, !7, i64 304, !51, i64 312, !51, i64 316, !28, i64 320, !28, i64 321, !28, i64 322, !28, i64 323, !7, i64 324, !7, i64 836, !28, i64 920, !28, i64 921, !28, i64 922, !28, i64 923, !28, i64 924, !28, i64 925, !28, i64 926, !51, i64 928, !6, i64 932, !6, i64 936, !6, i64 940, !6, i64 944, !6, i64 948, !50, i64 952, !6, i64 960, !50, i64 964, !7, i64 972, !7, i64 1016, !7, i64 1056, !7, i64 1061, !7, i64 1066, !7, i64 1071, !7, i64 1076, !7, i64 1084, !7, i64 1104, !7, i64 1124, !7, i64 1164, !7, i64 1184, !7, i64 3232, !7, i64 5280, !7, i64 5364, !51, i64 5448, !52, i64 5452, !53, i64 5456}
!50 = !{!"_ZTS6ImVec2", !51, i64 0, !51, i64 4}
!51 = !{!"float", !7, i64 0}
!52 = !{!"short", !7, i64 0}
!53 = !{!"_ZTS8ImVectorItE", !6, i64 0, !6, i64 4, !10, i64 8}
!54 = !{!55, !51, i64 36}
!55 = !{!"_ZTS10ImDrawData", !28, i64 0, !10, i64 8, !6, i64 16, !6, i64 20, !6, i64 24, !50, i64 28, !50, i64 36, !50, i64 44}
!56 = !{!55, !51, i64 40}
!57 = distinct !{!57, !58}
!58 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass