; LLVM IR from vertver/Fresponze-old :: modules/imgui/examples (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.ImGui_ImplVulkan_InitInfo = type { ptr, ptr, ptr, i32, ptr, ptr, ptr, i32, i32, i32, ptr, ptr }
%struct.ImGui_ImplVulkanH_WindowRenderBuffers = type { i32, i32, ptr }
%struct.VkMappedMemoryRange = type { i32, ptr, ptr, i64, i64 }
%struct.ImVec2 = type { float, float }
%struct.ImVec4 = type { float, float, float, float }
%struct.VkRect2D = type { %struct.VkOffset2D, %struct.VkExtent2D }
%struct.VkOffset2D = type { i32, i32 }
%struct.VkExtent2D = type { i32, i32 }
%struct.ImDrawData = type <{ i8, [7 x i8], ptr, i32, i32, i32, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, [4 x i8] }>
%struct.ImGui_ImplVulkanH_FrameRenderBuffers = type { ptr, ptr, i64, i64, ptr, ptr }
%struct.ImDrawList = type { %struct.ImVector, %struct.ImVector.0, %struct.ImVector.1, i32, ptr, ptr, i32, ptr, ptr, %struct.ImVector.2, %struct.ImVector.3, %struct.ImVector.4, %struct.ImDrawCmd, %struct.ImDrawListSplitter }
%struct.ImVector = type { i32, i32, ptr }
%struct.ImVector.0 = type { i32, i32, ptr }
%struct.ImVector.1 = type { i32, i32, ptr }
%struct.ImVector.2 = type { i32, i32, ptr }
%struct.ImVector.3 = type { i32, i32, ptr }
%struct.ImVector.4 = type { i32, i32, ptr }
%struct.ImDrawCmd = type { %struct.ImVec4, ptr, i32, i32, i32, ptr, ptr }
%struct.ImDrawListSplitter = type { i32, i32, %struct.ImVector.5 }
%struct.ImVector.5 = type { i32, i32, ptr }
%struct.ImDrawVert = type { %struct.ImVec2, %struct.ImVec2, i32 }

@_ZL16g_VulkanInitInfo = external hidden global %struct.ImGui_ImplVulkan_InitInfo, align 8
@_ZL25g_MainWindowRenderBuffers = external hidden global %struct.ImGui_ImplVulkanH_WindowRenderBuffers, align 8
@.str = external hidden unnamed_addr constant [28 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [100 x i8], align 1
@__PRETTY_FUNCTION__._Z31ImGui_ImplVulkan_RenderDrawDataP10ImDrawDataP17VkCommandBuffer_T = external hidden unnamed_addr constant [68 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z31ImGui_ImplVulkan_RenderDrawDataP10ImDrawDataP17VkCommandBuffer_T(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca [2 x %struct.VkMappedMemoryRange], align 16
  %19 = alloca %struct.ImVec2, align 4
  %20 = alloca %struct.ImVec2, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca ptr, align 8
  %27 = alloca %struct.ImVec4, align 4
  %28 = alloca %struct.VkRect2D, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.ImDrawData, ptr %29, i32 0, i32 7
  %31 = getelementptr inbounds %struct.ImVec2, ptr %30, i32 0, i32 0
  %32 = load float, ptr %31, align 4, !tbaa !9
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.ImDrawData, ptr %33, i32 0, i32 8
  %35 = getelementptr inbounds %struct.ImVec2, ptr %34, i32 0, i32 0
  %36 = load float, ptr %35, align 4, !tbaa !15
  %37 = fmul float %32, %36
  %38 = fptosi float %37 to i32
  store i32 %38, ptr %5, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.ImDrawData, ptr %39, i32 0, i32 7
  %41 = getelementptr inbounds %struct.ImVec2, ptr %40, i32 0, i32 1
  %42 = load float, ptr %41, align 4, !tbaa !17
  %43 = load ptr, ptr %3, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.ImDrawData, ptr %43, i32 0, i32 8
  %45 = getelementptr inbounds %struct.ImVec2, ptr %44, i32 0, i32 1
  %46 = load float, ptr %45, align 4, !tbaa !18
  %47 = fmul float %42, %46
  %48 = fptosi float %47 to i32
  store i32 %48, ptr %6, align 4, !tbaa !16
  %49 = load i32, ptr %5, align 4, !tbaa !16
  %50 = icmp sle i32 %49, 0
  br i1 %50, label %54, label %51

51:                                               ; preds = %2
  %52 = load i32, ptr %6, align 4, !tbaa !16
  %53 = icmp sle i32 %52, 0
  br i1 %53, label %54, label %55

54:                                               ; preds = %51, %2
  store i32 1, ptr %7, align 4
  br label %476

55:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  store ptr @_ZL16g_VulkanInitInfo, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  store ptr @_ZL25g_MainWindowRenderBuffers, ptr %9, align 8, !tbaa !5
  %56 = load ptr, ptr %9, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.ImGui_ImplVulkanH_WindowRenderBuffers, ptr %56, i32 0, i32 2
  %58 = load ptr, ptr %57, align 8, !tbaa !19
  %59 = icmp eq ptr %58, null
  br i1 %59, label %60, label %84

60:                                               ; preds = %55
  %61 = load ptr, ptr %9, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.ImGui_ImplVulkanH_WindowRenderBuffers, ptr %61, i32 0, i32 0
  store i32 0, ptr %62, align 8, !tbaa !21
  %63 = load ptr, ptr %8, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.ImGui_ImplVulkan_InitInfo, ptr %63, i32 0, i32 8
  %65 = load i32, ptr %64, align 4, !tbaa !22
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.ImGui_ImplVulkanH_WindowRenderBuffers, ptr %66, i32 0, i32 1
  store i32 %65, ptr %67, align 4, !tbaa !25
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.ImGui_ImplVulkanH_WindowRenderBuffers, ptr %68, i32 0, i32 1
  %70 = load i32, ptr %69, align 4, !tbaa !25
  %71 = zext i32 %70 to i64
  %72 = mul i64 48, %71
  %73 = call noundef ptr @_ZN5ImGui8MemAllocEm(i64 noundef %72)
  %74 = load ptr, ptr %9, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.ImGui_ImplVulkanH_WindowRenderBuffers, ptr %74, i32 0, i32 2
  store ptr %73, ptr %75, align 8, !tbaa !19
  %76 = load ptr, ptr %9, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.ImGui_ImplVulkanH_WindowRenderBuffers, ptr %76, i32 0, i32 2
  %78 = load ptr, ptr %77, align 8, !tbaa !19
  %79 = load ptr, ptr %9, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.ImGui_ImplVulkanH_WindowRenderBuffers, ptr %79, i32 0, i32 1
  %81 = load i32, ptr %80, align 4, !tbaa !25
  %82 = zext i32 %81 to i64
  %83 = mul i64 48, %82
  call void @llvm.memset.p0.i64(ptr align 8 %78, i8 0, i64 %83, i1 false)
  br label %84

84:                                               ; preds = %60, %55
  %85 = load ptr, ptr %9, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.ImGui_ImplVulkanH_WindowRenderBuffers, ptr %85, i32 0, i32 1
  %87 = load i32, ptr %86, align 4, !tbaa !25
  %88 = load ptr, ptr %8, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.ImGui_ImplVulkan_InitInfo, ptr %88, i32 0, i32 8
  %90 = load i32, ptr %89, align 4, !tbaa !22
  %91 = icmp eq i32 %87, %90
  br i1 %91, label %92, label %93

92:                                               ; preds = %84
  br label %95

93:                                               ; preds = %84
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 334, ptr noundef @__PRETTY_FUNCTION__._Z31ImGui_ImplVulkan_RenderDrawDataP10ImDrawDataP17VkCommandBuffer_T) #9
  unreachable

94:                                               ; No predecessors!
  br label %95

95:                                               ; preds = %94, %92
  %96 = load ptr, ptr %9, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.ImGui_ImplVulkanH_WindowRenderBuffers, ptr %96, i32 0, i32 0
  %98 = load i32, ptr %97, align 8, !tbaa !21
  %99 = add i32 %98, 1
  %100 = load ptr, ptr %9, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.ImGui_ImplVulkanH_WindowRenderBuffers, ptr %100, i32 0, i32 1
  %102 = load i32, ptr %101, align 4, !tbaa !25
  %103 = urem i32 %99, %102
  %104 = load ptr, ptr %9, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.ImGui_ImplVulkanH_WindowRenderBuffers, ptr %104, i32 0, i32 0
  store i32 %103, ptr %105, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %106 = load ptr, ptr %9, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.ImGui_ImplVulkanH_WindowRenderBuffers, ptr %106, i32 0, i32 2
  %108 = load ptr, ptr %107, align 8, !tbaa !19
  %109 = load ptr, ptr %9, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.ImGui_ImplVulkanH_WindowRenderBuffers, ptr %109, i32 0, i32 0
  %111 = load i32, ptr %110, align 8, !tbaa !21
  %112 = zext i32 %111 to i64
  %113 = getelementptr inbounds %struct.ImGui_ImplVulkanH_FrameRenderBuffers, ptr %108, i64 %112
  store ptr %113, ptr %10, align 8, !tbaa !5
  %114 = load ptr, ptr %3, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.ImDrawData, ptr %114, i32 0, i32 5
  %116 = load i32, ptr %115, align 8, !tbaa !26
  %117 = icmp sgt i32 %116, 0
  br i1 %117, label %118, label %276

118:                                              ; preds = %95
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %119 = load ptr, ptr %3, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.ImDrawData, ptr %119, i32 0, i32 5
  %121 = load i32, ptr %120, align 8, !tbaa !26
  %122 = sext i32 %121 to i64
  %123 = mul i64 %122, 20
  store i64 %123, ptr %11, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %124 = load ptr, ptr %3, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.ImDrawData, ptr %124, i32 0, i32 4
  %126 = load i32, ptr %125, align 4, !tbaa !29
  %127 = sext i32 %126 to i64
  %128 = mul i64 %127, 2
  store i64 %128, ptr %12, align 8, !tbaa !27
  %129 = load ptr, ptr %10, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.ImGui_ImplVulkanH_FrameRenderBuffers, ptr %129, i32 0, i32 4
  %131 = load ptr, ptr %130, align 8, !tbaa !30
  %132 = icmp eq ptr %131, null
  br i1 %132, label %139, label %133

133:                                              ; preds = %118
  %134 = load ptr, ptr %10, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.ImGui_ImplVulkanH_FrameRenderBuffers, ptr %134, i32 0, i32 2
  %136 = load i64, ptr %135, align 8, !tbaa !32
  %137 = load i64, ptr %11, align 8, !tbaa !27
  %138 = icmp ult i64 %136, %137
  br i1 %138, label %139, label %147

139:                                              ; preds = %133, %118
  %140 = load ptr, ptr %10, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.ImGui_ImplVulkanH_FrameRenderBuffers, ptr %140, i32 0, i32 4
  %142 = load ptr, ptr %10, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.ImGui_ImplVulkanH_FrameRenderBuffers, ptr %142, i32 0, i32 0
  %144 = load ptr, ptr %10, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.ImGui_ImplVulkanH_FrameRenderBuffers, ptr %144, i32 0, i32 2
  %146 = load i64, ptr %11, align 8, !tbaa !27
  call void @_ZL20CreateOrResizeBufferRP10VkBuffer_TRP16VkDeviceMemory_TRmm21VkBufferUsageFlagBits(ptr noundef nonnull align 8 dereferenceable(8) %141, ptr noundef nonnull align 8 dereferenceable(8) %143, ptr noundef nonnull align 8 dereferenceable(8) %145, i64 noundef %146, i32 noundef 128)
  br label %147

147:                                              ; preds = %139, %133
  %148 = load ptr, ptr %10, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.ImGui_ImplVulkanH_FrameRenderBuffers, ptr %148, i32 0, i32 5
  %150 = load ptr, ptr %149, align 8, !tbaa !33
  %151 = icmp eq ptr %150, null
  br i1 %151, label %158, label %152

152:                                              ; preds = %147
  %153 = load ptr, ptr %10, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.ImGui_ImplVulkanH_FrameRenderBuffers, ptr %153, i32 0, i32 3
  %155 = load i64, ptr %154, align 8, !tbaa !34
  %156 = load i64, ptr %12, align 8, !tbaa !27
  %157 = icmp ult i64 %155, %156
  br i1 %157, label %158, label %166

158:                                              ; preds = %152, %147
  %159 = load ptr, ptr %10, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.ImGui_ImplVulkanH_FrameRenderBuffers, ptr %159, i32 0, i32 5
  %161 = load ptr, ptr %10, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.ImGui_ImplVulkanH_FrameRenderBuffers, ptr %161, i32 0, i32 1
  %163 = load ptr, ptr %10, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.ImGui_ImplVulkanH_FrameRenderBuffers, ptr %163, i32 0, i32 3
  %165 = load i64, ptr %12, align 8, !tbaa !27
  call void @_ZL20CreateOrResizeBufferRP10VkBuffer_TRP16VkDeviceMemory_TRmm21VkBufferUsageFlagBits(ptr noundef nonnull align 8 dereferenceable(8) %160, ptr noundef nonnull align 8 dereferenceable(8) %162, ptr noundef nonnull align 8 dereferenceable(8) %164, i64 noundef %165, i32 noundef 64)
  br label %166

166:                                              ; preds = %158, %152
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  store ptr null, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  store ptr null, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  %167 = load ptr, ptr %8, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.ImGui_ImplVulkan_InitInfo, ptr %167, i32 0, i32 2
  %169 = load ptr, ptr %168, align 8, !tbaa !35
  %170 = load ptr, ptr %10, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.ImGui_ImplVulkanH_FrameRenderBuffers, ptr %170, i32 0, i32 0
  %172 = load ptr, ptr %171, align 8, !tbaa !36
  %173 = load i64, ptr %11, align 8, !tbaa !27
  %174 = call i32 @vkMapMemory(ptr noundef %169, ptr noundef %172, i64 noundef 0, i64 noundef %173, i32 noundef 0, ptr noundef %13)
  store i32 %174, ptr %15, align 4, !tbaa !37
  %175 = load i32, ptr %15, align 4, !tbaa !37
  call void @_ZL15check_vk_result8VkResult(i32 noundef %175)
  %176 = load ptr, ptr %8, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.ImGui_ImplVulkan_InitInfo, ptr %176, i32 0, i32 2
  %178 = load ptr, ptr %177, align 8, !tbaa !35
  %179 = load ptr, ptr %10, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.ImGui_ImplVulkanH_FrameRenderBuffers, ptr %179, i32 0, i32 1
  %181 = load ptr, ptr %180, align 8, !tbaa !39
  %182 = load i64, ptr %12, align 8, !tbaa !27
  %183 = call i32 @vkMapMemory(ptr noundef %178, ptr noundef %181, i64 noundef 0, i64 noundef %182, i32 noundef 0, ptr noundef %14)
  store i32 %183, ptr %15, align 4, !tbaa !37
  %184 = load i32, ptr %15, align 4, !tbaa !37
  call void @_ZL15check_vk_result8VkResult(i32 noundef %184)
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 0, ptr %16, align 4, !tbaa !16
  br label %185

185:                                              ; preds = %236, %166
  %186 = load i32, ptr %16, align 4, !tbaa !16
  %187 = load ptr, ptr %3, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.ImDrawData, ptr %187, i32 0, i32 3
  %189 = load i32, ptr %188, align 8, !tbaa !40
  %190 = icmp slt i32 %186, %189
  br i1 %190, label %192, label %191

191:                                              ; preds = %185
  store i32 2, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %239

192:                                              ; preds = %185
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %193 = load ptr, ptr %3, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.ImDrawData, ptr %193, i32 0, i32 2
  %195 = load ptr, ptr %194, align 8, !tbaa !41
  %196 = load i32, ptr %16, align 4, !tbaa !16
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds ptr, ptr %195, i64 %197
  %199 = load ptr, ptr %198, align 8, !tbaa !5
  store ptr %199, ptr %17, align 8, !tbaa !5
  %200 = load ptr, ptr %13, align 8, !tbaa !5
  %201 = load ptr, ptr %17, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.ImDrawList, ptr %201, i32 0, i32 2
  %203 = getelementptr inbounds %struct.ImVector.1, ptr %202, i32 0, i32 2
  %204 = load ptr, ptr %203, align 8, !tbaa !42
  %205 = load ptr, ptr %17, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.ImDrawList, ptr %205, i32 0, i32 2
  %207 = getelementptr inbounds %struct.ImVector.1, ptr %206, i32 0, i32 0
  %208 = load i32, ptr %207, align 8, !tbaa !54
  %209 = sext i32 %208 to i64
  %210 = mul i64 %209, 20
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %200, ptr align 4 %204, i64 %210, i1 false)
  %211 = load ptr, ptr %14, align 8, !tbaa !5
  %212 = load ptr, ptr %17, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.ImDrawList, ptr %212, i32 0, i32 1
  %214 = getelementptr inbounds %struct.ImVector.0, ptr %213, i32 0, i32 2
  %215 = load ptr, ptr %214, align 8, !tbaa !55
  %216 = load ptr, ptr %17, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.ImDrawList, ptr %216, i32 0, i32 1
  %218 = getelementptr inbounds %struct.ImVector.0, ptr %217, i32 0, i32 0
  %219 = load i32, ptr %218, align 8, !tbaa !56
  %220 = sext i32 %219 to i64
  %221 = mul i64 %220, 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %211, ptr align 2 %215, i64 %221, i1 false)
  %222 = load ptr, ptr %17, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.ImDrawList, ptr %222, i32 0, i32 2
  %224 = getelementptr inbounds %struct.ImVector.1, ptr %223, i32 0, i32 0
  %225 = load i32, ptr %224, align 8, !tbaa !54
  %226 = load ptr, ptr %13, align 8, !tbaa !5
  %227 = sext i32 %225 to i64
  %228 = getelementptr inbounds %struct.ImDrawVert, ptr %226, i64 %227
  store ptr %228, ptr %13, align 8, !tbaa !5
  %229 = load ptr, ptr %17, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.ImDrawList, ptr %229, i32 0, i32 1
  %231 = getelementptr inbounds %struct.ImVector.0, ptr %230, i32 0, i32 0
  %232 = load i32, ptr %231, align 8, !tbaa !56
  %233 = load ptr, ptr %14, align 8, !tbaa !5
  %234 = sext i32 %232 to i64
  %235 = getelementptr inbounds i16, ptr %233, i64 %234
  store ptr %235, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %236

236:                                              ; preds = %192
  %237 = load i32, ptr %16, align 4, !tbaa !16
  %238 = add nsw i32 %237, 1
  store i32 %238, ptr %16, align 4, !tbaa !16
  br label %185, !llvm.loop !57

239:                                              ; preds = %191
  call void @llvm.lifetime.start.p0(i64 80, ptr %18) #8
  call void @llvm.memset.p0.i64(ptr align 16 %18, i8 0, i64 80, i1 false)
  %240 = getelementptr inbounds [2 x %struct.VkMappedMemoryRange], ptr %18, i64 0, i64 0
  %241 = getelementptr inbounds %struct.VkMappedMemoryRange, ptr %240, i32 0, i32 0
  store i32 6, ptr %241, align 16, !tbaa !59
  %242 = load ptr, ptr %10, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.ImGui_ImplVulkanH_FrameRenderBuffers, ptr %242, i32 0, i32 0
  %244 = load ptr, ptr %243, align 8, !tbaa !36
  %245 = getelementptr inbounds [2 x %struct.VkMappedMemoryRange], ptr %18, i64 0, i64 0
  %246 = getelementptr inbounds %struct.VkMappedMemoryRange, ptr %245, i32 0, i32 2
  store ptr %244, ptr %246, align 16, !tbaa !62
  %247 = getelementptr inbounds [2 x %struct.VkMappedMemoryRange], ptr %18, i64 0, i64 0
  %248 = getelementptr inbounds %struct.VkMappedMemoryRange, ptr %247, i32 0, i32 4
  store i64 -1, ptr %248, align 16, !tbaa !63
  %249 = getelementptr inbounds [2 x %struct.VkMappedMemoryRange], ptr %18, i64 0, i64 1
  %250 = getelementptr inbounds %struct.VkMappedMemoryRange, ptr %249, i32 0, i32 0
  store i32 6, ptr %250, align 8, !tbaa !59
  %251 = load ptr, ptr %10, align 8, !tbaa !5
  %252 = getelementptr inbounds %struct.ImGui_ImplVulkanH_FrameRenderBuffers, ptr %251, i32 0, i32 1
  %253 = load ptr, ptr %252, align 8, !tbaa !39
  %254 = getelementptr inbounds [2 x %struct.VkMappedMemoryRange], ptr %18, i64 0, i64 1
  %255 = getelementptr inbounds %struct.VkMappedMemoryRange, ptr %254, i32 0, i32 2
  store ptr %253, ptr %255, align 8, !tbaa !62
  %256 = getelementptr inbounds [2 x %struct.VkMappedMemoryRange], ptr %18, i64 0, i64 1
  %257 = getelementptr inbounds %struct.VkMappedMemoryRange, ptr %256, i32 0, i32 4
  store i64 -1, ptr %257, align 8, !tbaa !63
  %258 = load ptr, ptr %8, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.ImGui_ImplVulkan_InitInfo, ptr %258, i32 0, i32 2
  %260 = load ptr, ptr %259, align 8, !tbaa !35
  %261 = getelementptr inbounds [2 x %struct.VkMappedMemoryRange], ptr %18, i64 0, i64 0
  %262 = call i32 @vkFlushMappedMemoryRanges(ptr noundef %260, i32 noundef 2, ptr noundef %261)
  store i32 %262, ptr %15, align 4, !tbaa !37
  %263 = load i32, ptr %15, align 4, !tbaa !37
  call void @_ZL15check_vk_result8VkResult(i32 noundef %263)
  %264 = load ptr, ptr %8, align 8, !tbaa !5
  %265 = getelementptr inbounds %struct.ImGui_ImplVulkan_InitInfo, ptr %264, i32 0, i32 2
  %266 = load ptr, ptr %265, align 8, !tbaa !35
  %267 = load ptr, ptr %10, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct.ImGui_ImplVulkanH_FrameRenderBuffers, ptr %267, i32 0, i32 0
  %269 = load ptr, ptr %268, align 8, !tbaa !36
  call void @vkUnmapMemory(ptr noundef %266, ptr noundef %269)
  %270 = load ptr, ptr %8, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.ImGui_ImplVulkan_InitInfo, ptr %270, i32 0, i32 2
  %272 = load ptr, ptr %271, align 8, !tbaa !35
  %273 = load ptr, ptr %10, align 8, !tbaa !5
  %274 = getelementptr inbounds %struct.ImGui_ImplVulkanH_FrameRenderBuffers, ptr %273, i32 0, i32 1
  %275 = load ptr, ptr %274, align 8, !tbaa !39
  call void @vkUnmapMemory(ptr noundef %272, ptr noundef %275)
  call void @llvm.lifetime.end.p0(i64 80, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  br label %276

276:                                              ; preds = %239, %95
  %277 = load ptr, ptr %3, align 8, !tbaa !5
  %278 = load ptr, ptr %4, align 8, !tbaa !5
  %279 = load ptr, ptr %10, align 8, !tbaa !5
  %280 = load i32, ptr %5, align 4, !tbaa !16
  %281 = load i32, ptr %6, align 4, !tbaa !16
  call void @_ZL33ImGui_ImplVulkan_SetupRenderStateP10ImDrawDataP17VkCommandBuffer_TP36ImGui_ImplVulkanH_FrameRenderBuffersii(ptr noundef %277, ptr noundef %278, ptr noundef %279, i32 noundef %280, i32 noundef %281)
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %282 = load ptr, ptr %3, align 8, !tbaa !5
  %283 = getelementptr inbounds %struct.ImDrawData, ptr %282, i32 0, i32 6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 4 %283, i64 8, i1 false), !tbaa.struct !64
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %284 = load ptr, ptr %3, align 8, !tbaa !5
  %285 = getelementptr inbounds %struct.ImDrawData, ptr %284, i32 0, i32 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 4 %285, i64 8, i1 false), !tbaa.struct !64
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  store i32 0, ptr %21, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  store i32 0, ptr %22, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  store i32 0, ptr %23, align 4, !tbaa !16
  br label %286

286:                                              ; preds = %472, %276
  %287 = load i32, ptr %23, align 4, !tbaa !16
  %288 = load ptr, ptr %3, align 8, !tbaa !5
  %289 = getelementptr inbounds %struct.ImDrawData, ptr %288, i32 0, i32 3
  %290 = load i32, ptr %289, align 8, !tbaa !40
  %291 = icmp slt i32 %287, %290
  br i1 %291, label %293, label %292

292:                                              ; preds = %286
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %475

293:                                              ; preds = %286
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  %294 = load ptr, ptr %3, align 8, !tbaa !5
  %295 = getelementptr inbounds %struct.ImDrawData, ptr %294, i32 0, i32 2
  %296 = load ptr, ptr %295, align 8, !tbaa !41
  %297 = load i32, ptr %23, align 4, !tbaa !16
  %298 = sext i32 %297 to i64
  %299 = getelementptr inbounds ptr, ptr %296, i64 %298
  %300 = load ptr, ptr %299, align 8, !tbaa !5
  store ptr %300, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  store i32 0, ptr %25, align 4, !tbaa !16
  br label %301

301:                                              ; preds = %456, %293
  %302 = load i32, ptr %25, align 4, !tbaa !16
  %303 = load ptr, ptr %24, align 8, !tbaa !5
  %304 = getelementptr inbounds %struct.ImDrawList, ptr %303, i32 0, i32 0
  %305 = getelementptr inbounds %struct.ImVector, ptr %304, i32 0, i32 0
  %306 = load i32, ptr %305, align 8, !tbaa !66
  %307 = icmp slt i32 %302, %306
  br i1 %307, label %309, label %308

308:                                              ; preds = %301
  store i32 8, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  br label %459

309:                                              ; preds = %301
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #8
  %310 = load ptr, ptr %24, align 8, !tbaa !5
  %311 = getelementptr inbounds %struct.ImDrawList, ptr %310, i32 0, i32 0
  %312 = load i32, ptr %25, align 4, !tbaa !16
  %313 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK8ImVectorI9ImDrawCmdEixEi(ptr noundef nonnull align 8 dereferenceable(16) %311, i32 noundef %312)
  store ptr %313, ptr %26, align 8, !tbaa !5
  %314 = load ptr, ptr %26, align 8, !tbaa !5
  %315 = getelementptr inbounds %struct.ImDrawCmd, ptr %314, i32 0, i32 5
  %316 = load ptr, ptr %315, align 8, !tbaa !67
  %317 = icmp ne ptr %316, null
  br i1 %317, label %318, label %336

318:                                              ; preds = %309
  %319 = load ptr, ptr %26, align 8, !tbaa !5
  %320 = getelementptr inbounds %struct.ImDrawCmd, ptr %319, i32 0, i32 5
  %321 = load ptr, ptr %320, align 8, !tbaa !67
  %322 = icmp eq ptr %321, inttoptr (i64 -1 to ptr)
  br i1 %322, label %323, label %329

323:                                              ; preds = %318
  %324 = load ptr, ptr %3, align 8, !tbaa !5
  %325 = load ptr, ptr %4, align 8, !tbaa !5
  %326 = load ptr, ptr %10, align 8, !tbaa !5
  %327 = load i32, ptr %5, align 4, !tbaa !16
  %328 = load i32, ptr %6, align 4, !tbaa !16
  call void @_ZL33ImGui_ImplVulkan_SetupRenderStateP10ImDrawDataP17VkCommandBuffer_TP36ImGui_ImplVulkanH_FrameRenderBuffersii(ptr noundef %324, ptr noundef %325, ptr noundef %326, i32 noundef %327, i32 noundef %328)
  br label %335

329:                                              ; preds = %318
  %330 = load ptr, ptr %26, align 8, !tbaa !5
  %331 = getelementptr inbounds %struct.ImDrawCmd, ptr %330, i32 0, i32 5
  %332 = load ptr, ptr %331, align 8, !tbaa !67
  %333 = load ptr, ptr %24, align 8, !tbaa !5
  %334 = load ptr, ptr %26, align 8, !tbaa !5
  call void %332(ptr noundef %333, ptr noundef %334)
  br label %335

335:                                              ; preds = %329, %323
  br label %455

336:                                              ; preds = %309
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #8
  call void @_ZN6ImVec4C2Ev(ptr noundef nonnull align 4 dereferenceable(16) %27)
  %337 = load ptr, ptr %26, align 8, !tbaa !5
  %338 = getelementptr inbounds %struct.ImDrawCmd, ptr %337, i32 0, i32 0
  %339 = getelementptr inbounds %struct.ImVec4, ptr %338, i32 0, i32 0
  %340 = load float, ptr %339, align 8, !tbaa !68
  %341 = getelementptr inbounds %struct.ImVec2, ptr %19, i32 0, i32 0
  %342 = load float, ptr %341, align 4, !tbaa !69
  %343 = fsub float %340, %342
  %344 = getelementptr inbounds %struct.ImVec2, ptr %20, i32 0, i32 0
  %345 = load float, ptr %344, align 4, !tbaa !69
  %346 = fmul float %343, %345
  %347 = getelementptr inbounds %struct.ImVec4, ptr %27, i32 0, i32 0
  store float %346, ptr %347, align 4, !tbaa !70
  %348 = load ptr, ptr %26, align 8, !tbaa !5
  %349 = getelementptr inbounds %struct.ImDrawCmd, ptr %348, i32 0, i32 0
  %350 = getelementptr inbounds %struct.ImVec4, ptr %349, i32 0, i32 1
  %351 = load float, ptr %350, align 4, !tbaa !71
  %352 = getelementptr inbounds %struct.ImVec2, ptr %19, i32 0, i32 1
  %353 = load float, ptr %352, align 4, !tbaa !72
  %354 = fsub float %351, %353
  %355 = getelementptr inbounds %struct.ImVec2, ptr %20, i32 0, i32 1
  %356 = load float, ptr %355, align 4, !tbaa !72
  %357 = fmul float %354, %356
  %358 = getelementptr inbounds %struct.ImVec4, ptr %27, i32 0, i32 1
  store float %357, ptr %358, align 4, !tbaa !73
  %359 = load ptr, ptr %26, align 8, !tbaa !5
  %360 = getelementptr inbounds %struct.ImDrawCmd, ptr %359, i32 0, i32 0
  %361 = getelementptr inbounds %struct.ImVec4, ptr %360, i32 0, i32 2
  %362 = load float, ptr %361, align 8, !tbaa !74
  %363 = getelementptr inbounds %struct.ImVec2, ptr %19, i32 0, i32 0
  %364 = load float, ptr %363, align 4, !tbaa !69
  %365 = fsub float %362, %364
  %366 = getelementptr inbounds %struct.ImVec2, ptr %20, i32 0, i32 0
  %367 = load float, ptr %366, align 4, !tbaa !69
  %368 = fmul float %365, %367
  %369 = getelementptr inbounds %struct.ImVec4, ptr %27, i32 0, i32 2
  store float %368, ptr %369, align 4, !tbaa !75
  %370 = load ptr, ptr %26, align 8, !tbaa !5
  %371 = getelementptr inbounds %struct.ImDrawCmd, ptr %370, i32 0, i32 0
  %372 = getelementptr inbounds %struct.ImVec4, ptr %371, i32 0, i32 3
  %373 = load float, ptr %372, align 4, !tbaa !76
  %374 = getelementptr inbounds %struct.ImVec2, ptr %19, i32 0, i32 1
  %375 = load float, ptr %374, align 4, !tbaa !72
  %376 = fsub float %373, %375
  %377 = getelementptr inbounds %struct.ImVec2, ptr %20, i32 0, i32 1
  %378 = load float, ptr %377, align 4, !tbaa !72
  %379 = fmul float %376, %378
  %380 = getelementptr inbounds %struct.ImVec4, ptr %27, i32 0, i32 3
  store float %379, ptr %380, align 4, !tbaa !77
  %381 = getelementptr inbounds %struct.ImVec4, ptr %27, i32 0, i32 0
  %382 = load float, ptr %381, align 4, !tbaa !70
  %383 = load i32, ptr %5, align 4, !tbaa !16
  %384 = sitofp i32 %383 to float
  %385 = fcmp olt float %382, %384
  br i1 %385, label %386, label %454

386:                                              ; preds = %336
  %387 = getelementptr inbounds %struct.ImVec4, ptr %27, i32 0, i32 1
  %388 = load float, ptr %387, align 4, !tbaa !73
  %389 = load i32, ptr %6, align 4, !tbaa !16
  %390 = sitofp i32 %389 to float
  %391 = fcmp olt float %388, %390
  br i1 %391, label %392, label %454

392:                                              ; preds = %386
  %393 = getelementptr inbounds %struct.ImVec4, ptr %27, i32 0, i32 2
  %394 = load float, ptr %393, align 4, !tbaa !75
  %395 = fcmp oge float %394, 0.000000e+00
  br i1 %395, label %396, label %454

396:                                              ; preds = %392
  %397 = getelementptr inbounds %struct.ImVec4, ptr %27, i32 0, i32 3
  %398 = load float, ptr %397, align 4, !tbaa !77
  %399 = fcmp oge float %398, 0.000000e+00
  br i1 %399, label %400, label %454

400:                                              ; preds = %396
  %401 = getelementptr inbounds %struct.ImVec4, ptr %27, i32 0, i32 0
  %402 = load float, ptr %401, align 4, !tbaa !70
  %403 = fcmp olt float %402, 0.000000e+00
  br i1 %403, label %404, label %406

404:                                              ; preds = %400
  %405 = getelementptr inbounds %struct.ImVec4, ptr %27, i32 0, i32 0
  store float 0.000000e+00, ptr %405, align 4, !tbaa !70
  br label %406

406:                                              ; preds = %404, %400
  %407 = getelementptr inbounds %struct.ImVec4, ptr %27, i32 0, i32 1
  %408 = load float, ptr %407, align 4, !tbaa !73
  %409 = fcmp olt float %408, 0.000000e+00
  br i1 %409, label %410, label %412

410:                                              ; preds = %406
  %411 = getelementptr inbounds %struct.ImVec4, ptr %27, i32 0, i32 1
  store float 0.000000e+00, ptr %411, align 4, !tbaa !73
  br label %412

412:                                              ; preds = %410, %406
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #8
  %413 = getelementptr inbounds %struct.ImVec4, ptr %27, i32 0, i32 0
  %414 = load float, ptr %413, align 4, !tbaa !70
  %415 = fptosi float %414 to i32
  %416 = getelementptr inbounds %struct.VkRect2D, ptr %28, i32 0, i32 0
  %417 = getelementptr inbounds %struct.VkOffset2D, ptr %416, i32 0, i32 0
  store i32 %415, ptr %417, align 4, !tbaa !78
  %418 = getelementptr inbounds %struct.ImVec4, ptr %27, i32 0, i32 1
  %419 = load float, ptr %418, align 4, !tbaa !73
  %420 = fptosi float %419 to i32
  %421 = getelementptr inbounds %struct.VkRect2D, ptr %28, i32 0, i32 0
  %422 = getelementptr inbounds %struct.VkOffset2D, ptr %421, i32 0, i32 1
  store i32 %420, ptr %422, align 4, !tbaa !82
  %423 = getelementptr inbounds %struct.ImVec4, ptr %27, i32 0, i32 2
  %424 = load float, ptr %423, align 4, !tbaa !75
  %425 = getelementptr inbounds %struct.ImVec4, ptr %27, i32 0, i32 0
  %426 = load float, ptr %425, align 4, !tbaa !70
  %427 = fsub float %424, %426
  %428 = fptoui float %427 to i32
  %429 = getelementptr inbounds %struct.VkRect2D, ptr %28, i32 0, i32 1
  %430 = getelementptr inbounds %struct.VkExtent2D, ptr %429, i32 0, i32 0
  store i32 %428, ptr %430, align 4, !tbaa !83
  %431 = getelementptr inbounds %struct.ImVec4, ptr %27, i32 0, i32 3
  %432 = load float, ptr %431, align 4, !tbaa !77
  %433 = getelementptr inbounds %struct.ImVec4, ptr %27, i32 0, i32 1
  %434 = load float, ptr %433, align 4, !tbaa !73
  %435 = fsub float %432, %434
  %436 = fptoui float %435 to i32
  %437 = getelementptr inbounds %struct.VkRect2D, ptr %28, i32 0, i32 1
  %438 = getelementptr inbounds %struct.VkExtent2D, ptr %437, i32 0, i32 1
  store i32 %436, ptr %438, align 4, !tbaa !84
  %439 = load ptr, ptr %4, align 8, !tbaa !5
  call void @vkCmdSetScissor(ptr noundef %439, i32 noundef 0, i32 noundef 1, ptr noundef %28)
  %440 = load ptr, ptr %4, align 8, !tbaa !5
  %441 = load ptr, ptr %26, align 8, !tbaa !5
  %442 = getelementptr inbounds %struct.ImDrawCmd, ptr %441, i32 0, i32 4
  %443 = load i32, ptr %442, align 8, !tbaa !85
  %444 = load ptr, ptr %26, align 8, !tbaa !5
  %445 = getelementptr inbounds %struct.ImDrawCmd, ptr %444, i32 0, i32 3
  %446 = load i32, ptr %445, align 4, !tbaa !86
  %447 = load i32, ptr %22, align 4, !tbaa !16
  %448 = add i32 %446, %447
  %449 = load ptr, ptr %26, align 8, !tbaa !5
  %450 = getelementptr inbounds %struct.ImDrawCmd, ptr %449, i32 0, i32 2
  %451 = load i32, ptr %450, align 8, !tbaa !87
  %452 = load i32, ptr %21, align 4, !tbaa !16
  %453 = add i32 %451, %452
  call void @vkCmdDrawIndexed(ptr noundef %440, i32 noundef %443, i32 noundef 1, i32 noundef %448, i32 noundef %453, i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #8
  br label %454

454:                                              ; preds = %412, %396, %392, %386, %336
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #8
  br label %455

455:                                              ; preds = %454, %335
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  br label %456

456:                                              ; preds = %455
  %457 = load i32, ptr %25, align 4, !tbaa !16
  %458 = add nsw i32 %457, 1
  store i32 %458, ptr %25, align 4, !tbaa !16
  br label %301, !llvm.loop !88

459:                                              ; preds = %308
  %460 = load ptr, ptr %24, align 8, !tbaa !5
  %461 = getelementptr inbounds %struct.ImDrawList, ptr %460, i32 0, i32 1
  %462 = getelementptr inbounds %struct.ImVector.0, ptr %461, i32 0, i32 0
  %463 = load i32, ptr %462, align 8, !tbaa !56
  %464 = load i32, ptr %22, align 4, !tbaa !16
  %465 = add nsw i32 %464, %463
  store i32 %465, ptr %22, align 4, !tbaa !16
  %466 = load ptr, ptr %24, align 8, !tbaa !5
  %467 = getelementptr inbounds %struct.ImDrawList, ptr %466, i32 0, i32 2
  %468 = getelementptr inbounds %struct.ImVector.1, ptr %467, i32 0, i32 0
  %469 = load i32, ptr %468, align 8, !tbaa !54
  %470 = load i32, ptr %21, align 4, !tbaa !16
  %471 = add nsw i32 %470, %469
  store i32 %471, ptr %21, align 4, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  br label %472

472:                                              ; preds = %459
  %473 = load i32, ptr %23, align 4, !tbaa !16
  %474 = add nsw i32 %473, 1
  store i32 %474, ptr %23, align 4, !tbaa !16
  br label %286, !llvm.loop !89

475:                                              ; preds = %292
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  store i32 0, ptr %7, align 4
  br label %476

476:                                              ; preds = %475, %54
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  %477 = load i32, ptr %7, align 4
  switch i32 %477, label %479 [
    i32 0, label %478
    i32 1, label %478
  ]

478:                                              ; preds = %476, %476
  ret void

479:                                              ; preds = %476
  unreachable
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL20CreateOrResizeBufferRP10VkBuffer_TRP16VkDeviceMemory_TRmm21VkBufferUsageFlagBits(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), i64 noundef, i32 noundef) #0

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZNK8ImVectorI9ImDrawCmdEixEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #6 align 2

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

declare void @vkCmdSetScissor(ptr noundef, i32 noundef, i32 noundef, ptr noundef) #2

declare void @vkCmdDrawIndexed(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }
attributes #9 = { 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, !14, i64 36}
!10 = !{!"_ZTS10ImDrawData", !11, i64 0, !6, i64 8, !12, i64 16, !12, i64 20, !12, i64 24, !13, i64 28, !13, i64 36, !13, i64 44}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTS6ImVec2", !14, i64 0, !14, i64 4}
!14 = !{!"float", !7, i64 0}
!15 = !{!10, !14, i64 44}
!16 = !{!12, !12, i64 0}
!17 = !{!10, !14, i64 40}
!18 = !{!10, !14, i64 48}
!19 = !{!20, !6, i64 8}
!20 = !{!"_ZTS37ImGui_ImplVulkanH_WindowRenderBuffers", !12, i64 0, !12, i64 4, !6, i64 8}
!21 = !{!20, !12, i64 0}
!22 = !{!23, !12, i64 60}
!23 = !{!"_ZTS25ImGui_ImplVulkan_InitInfo", !6, i64 0, !6, i64 8, !6, i64 16, !12, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !12, i64 56, !12, i64 60, !24, i64 64, !6, i64 72, !6, i64 80}
!24 = !{!"_ZTS21VkSampleCountFlagBits", !7, i64 0}
!25 = !{!20, !12, i64 4}
!26 = !{!10, !12, i64 24}
!27 = !{!28, !28, i64 0}
!28 = !{!"long", !7, i64 0}
!29 = !{!10, !12, i64 20}
!30 = !{!31, !6, i64 32}
!31 = !{!"_ZTS36ImGui_ImplVulkanH_FrameRenderBuffers", !6, i64 0, !6, i64 8, !28, i64 16, !28, i64 24, !6, i64 32, !6, i64 40}
!32 = !{!31, !28, i64 16}
!33 = !{!31, !6, i64 40}
!34 = !{!31, !28, i64 24}
!35 = !{!23, !6, i64 16}
!36 = !{!31, !6, i64 0}
!37 = !{!38, !38, i64 0}
!38 = !{!"_ZTS8VkResult", !7, i64 0}
!39 = !{!31, !6, i64 8}
!40 = !{!10, !12, i64 16}
!41 = !{!10, !6, i64 8}
!42 = !{!43, !6, i64 40}
!43 = !{!"_ZTS10ImDrawList", !44, i64 0, !45, i64 16, !46, i64 32, !12, i64 48, !6, i64 56, !6, i64 64, !12, i64 72, !6, i64 80, !6, i64 88, !47, i64 96, !48, i64 112, !49, i64 128, !50, i64 144, !52, i64 200}
!44 = !{!"_ZTS8ImVectorI9ImDrawCmdE", !12, i64 0, !12, i64 4, !6, i64 8}
!45 = !{!"_ZTS8ImVectorItE", !12, i64 0, !12, i64 4, !6, i64 8}
!46 = !{!"_ZTS8ImVectorI10ImDrawVertE", !12, i64 0, !12, i64 4, !6, i64 8}
!47 = !{!"_ZTS8ImVectorI6ImVec4E", !12, i64 0, !12, i64 4, !6, i64 8}
!48 = !{!"_ZTS8ImVectorIPvE", !12, i64 0, !12, i64 4, !6, i64 8}
!49 = !{!"_ZTS8ImVectorI6ImVec2E", !12, i64 0, !12, i64 4, !6, i64 8}
!50 = !{!"_ZTS9ImDrawCmd", !51, i64 0, !6, i64 16, !12, i64 24, !12, i64 28, !12, i64 32, !6, i64 40, !6, i64 48}
!51 = !{!"_ZTS6ImVec4", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12}
!52 = !{!"_ZTS18ImDrawListSplitter", !12, i64 0, !12, i64 4, !53, i64 8}
!53 = !{!"_ZTS8ImVectorI13ImDrawChannelE", !12, i64 0, !12, i64 4, !6, i64 8}
!54 = !{!43, !12, i64 32}
!55 = !{!43, !6, i64 24}
!56 = !{!43, !12, i64 16}
!57 = distinct !{!57, !58}
!58 = !{!"llvm.loop.mustprogress"}
!59 = !{!60, !61, i64 0}
!60 = !{!"_ZTS19VkMappedMemoryRange", !61, i64 0, !6, i64 8, !6, i64 16, !28, i64 24, !28, i64 32}
!61 = !{!"_ZTS15VkStructureType", !7, i64 0}
!62 = !{!60, !6, i64 16}
!63 = !{!60, !28, i64 32}
!64 = !{i64 0, i64 4, !65, i64 4, i64 4, !65}
!65 = !{!14, !14, i64 0}
!66 = !{!43, !12, i64 0}
!67 = !{!50, !6, i64 40}
!68 = !{!50, !14, i64 0}
!69 = !{!13, !14, i64 0}
!70 = !{!51, !14, i64 0}
!71 = !{!50, !14, i64 4}
!72 = !{!13, !14, i64 4}
!73 = !{!51, !14, i64 4}
!74 = !{!50, !14, i64 8}
!75 = !{!51, !14, i64 8}
!76 = !{!50, !14, i64 12}
!77 = !{!51, !14, i64 12}
!78 = !{!79, !12, i64 0}
!79 = !{!"_ZTS8VkRect2D", !80, i64 0, !81, i64 8}
!80 = !{!"_ZTS10VkOffset2D", !12, i64 0, !12, i64 4}
!81 = !{!"_ZTS10VkExtent2D", !12, i64 0, !12, i64 4}
!82 = !{!79, !12, i64 4}
!83 = !{!79, !12, i64 8}
!84 = !{!79, !12, i64 12}
!85 = !{!50, !12, i64 32}
!86 = !{!50, !12, i64 28}
!87 = !{!50, !12, i64 24}
!88 = distinct !{!88, !58}
!89 = distinct !{!89, !58}


; 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_ImplVulkan_InitInfo = type { ptr, ptr, ptr, i32, ptr, ptr, ptr, i32, i32, i32, ptr, ptr }
%struct.ImGui_ImplVulkanH_WindowRenderBuffers = type { i32, i32, ptr }
%struct.VkMappedMemoryRange = type { i32, ptr, ptr, i64, i64 }
%struct.ImVec4 = type { float, float, float, float }
%struct.VkRect2D = type { %struct.VkOffset2D, %struct.VkExtent2D }
%struct.VkOffset2D = type { i32, i32 }
%struct.VkExtent2D = type { i32, i32 }
%struct.ImGui_ImplVulkanH_FrameRenderBuffers = type { ptr, ptr, i64, i64, ptr, ptr }
%struct.ImDrawVert = type { %struct.ImVec2, %struct.ImVec2, i32 }
%struct.ImVec2 = type { float, float }

@_ZL16g_VulkanInitInfo = external hidden local_unnamed_addr global %struct.ImGui_ImplVulkan_InitInfo, align 8
@_ZL25g_MainWindowRenderBuffers = external hidden local_unnamed_addr global %struct.ImGui_ImplVulkanH_WindowRenderBuffers, align 8
@.str = external hidden unnamed_addr constant [28 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [100 x i8], align 1
@__PRETTY_FUNCTION__._Z31ImGui_ImplVulkan_RenderDrawDataP10ImDrawDataP17VkCommandBuffer_T = external hidden unnamed_addr constant [68 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z31ImGui_ImplVulkan_RenderDrawDataP10ImDrawDataP17VkCommandBuffer_T(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca [2 x %struct.VkMappedMemoryRange], align 16
  %6 = alloca %struct.ImVec4, align 8
  %7 = alloca %struct.VkRect2D, align 8
  %8 = getelementptr inbounds i8, ptr %0, i64 36
  %9 = getelementptr inbounds i8, ptr %0, i64 44
  %10 = load <2 x float>, ptr %8, align 4, !tbaa !5
  %11 = load <2 x float>, ptr %9, align 4, !tbaa !5
  %12 = fmul <2 x float> %10, %11
  %13 = fptosi <2 x float> %12 to <2 x i32>
  %14 = icmp slt <2 x i32> %13, <i32 1, i32 1>
  %15 = extractelement <2 x i1> %14, i64 0
  %16 = extractelement <2 x i1> %14, i64 1
  %or.cond = select i1 %15, i1 true, i1 %16
  br i1 %or.cond, label %.loopexit, label %17

17:                                               ; preds = %2
  %18 = load ptr, ptr getelementptr inbounds (i8, ptr @_ZL25g_MainWindowRenderBuffers, i64 8), align 8, !tbaa !9
  %19 = icmp eq ptr %18, null
  br i1 %19, label %20, label %28

20:                                               ; preds = %17
  store i32 0, ptr @_ZL25g_MainWindowRenderBuffers, align 8, !tbaa !13
  %21 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL16g_VulkanInitInfo, i64 60), align 4, !tbaa !14
  store i32 %21, ptr getelementptr inbounds (i8, ptr @_ZL25g_MainWindowRenderBuffers, i64 4), align 4, !tbaa !17
  %22 = zext i32 %21 to i64
  %23 = mul nuw nsw i64 %22, 48
  %24 = tail call noundef ptr @_ZN5ImGui8MemAllocEm(i64 noundef %23)
  store ptr %24, ptr getelementptr inbounds (i8, ptr @_ZL25g_MainWindowRenderBuffers, i64 8), align 8, !tbaa !9
  %25 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL25g_MainWindowRenderBuffers, i64 4), align 4, !tbaa !17
  %26 = zext i32 %25 to i64
  %27 = mul nuw nsw i64 %26, 48
  tail call void @llvm.memset.p0.i64(ptr align 8 %24, i8 0, i64 %27, i1 false)
  br label %28

28:                                               ; preds = %20, %17
  %29 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL25g_MainWindowRenderBuffers, i64 4), align 4, !tbaa !17
  %30 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL16g_VulkanInitInfo, i64 60), align 4, !tbaa !14
  %31 = icmp eq i32 %29, %30
  br i1 %31, label %33, label %32

32:                                               ; preds = %28
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 334, ptr noundef nonnull @__PRETTY_FUNCTION__._Z31ImGui_ImplVulkan_RenderDrawDataP10ImDrawDataP17VkCommandBuffer_T) #8
  unreachable

33:                                               ; preds = %28
  %34 = load i32, ptr @_ZL25g_MainWindowRenderBuffers, align 8, !tbaa !13
  %35 = add i32 %34, 1
  %36 = urem i32 %35, %29
  store i32 %36, ptr @_ZL25g_MainWindowRenderBuffers, align 8, !tbaa !13
  %37 = load ptr, ptr getelementptr inbounds (i8, ptr @_ZL25g_MainWindowRenderBuffers, i64 8), align 8, !tbaa !9
  %38 = zext i32 %36 to i64
  %39 = getelementptr inbounds %struct.ImGui_ImplVulkanH_FrameRenderBuffers, ptr %37, i64 %38
  %40 = getelementptr inbounds i8, ptr %0, i64 24
  %41 = load i32, ptr %40, align 8, !tbaa !18
  %42 = icmp sgt i32 %41, 0
  br i1 %42, label %43, label %124

43:                                               ; preds = %33
  %44 = zext nneg i32 %41 to i64
  %45 = mul nuw nsw i64 %44, 20
  %46 = getelementptr inbounds i8, ptr %0, i64 20
  %47 = load i32, ptr %46, align 4, !tbaa !22
  %48 = sext i32 %47 to i64
  %49 = shl nsw i64 %48, 1
  %50 = getelementptr inbounds i8, ptr %39, i64 32
  %51 = load ptr, ptr %50, align 8, !tbaa !23
  %52 = icmp eq ptr %51, null
  br i1 %52, label %57, label %53

53:                                               ; preds = %43
  %54 = getelementptr inbounds i8, ptr %39, i64 16
  %55 = load i64, ptr %54, align 8, !tbaa !26
  %56 = icmp ult i64 %55, %45
  br i1 %56, label %57, label %59

57:                                               ; preds = %53, %43
  %58 = getelementptr inbounds i8, ptr %39, i64 16
  tail call void @_ZL20CreateOrResizeBufferRP10VkBuffer_TRP16VkDeviceMemory_TRmm21VkBufferUsageFlagBits(ptr noundef nonnull align 8 dereferenceable(8) %50, ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef nonnull align 8 dereferenceable(8) %58, i64 noundef %45, i32 noundef 128)
  br label %59

59:                                               ; preds = %57, %53
  %60 = getelementptr inbounds i8, ptr %39, i64 40
  %61 = load ptr, ptr %60, align 8, !tbaa !27
  %62 = icmp eq ptr %61, null
  br i1 %62, label %67, label %63

63:                                               ; preds = %59
  %64 = getelementptr inbounds i8, ptr %39, i64 24
  %65 = load i64, ptr %64, align 8, !tbaa !28
  %66 = icmp ult i64 %65, %49
  br i1 %66, label %67, label %70

67:                                               ; preds = %63, %59
  %68 = getelementptr inbounds i8, ptr %39, i64 8
  %69 = getelementptr inbounds i8, ptr %39, i64 24
  tail call void @_ZL20CreateOrResizeBufferRP10VkBuffer_TRP16VkDeviceMemory_TRmm21VkBufferUsageFlagBits(ptr noundef nonnull align 8 dereferenceable(8) %60, ptr noundef nonnull align 8 dereferenceable(8) %68, ptr noundef nonnull align 8 dereferenceable(8) %69, i64 noundef %49, i32 noundef 64)
  br label %70

70:                                               ; preds = %67, %63
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #9
  store ptr null, ptr %3, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #9
  store ptr null, ptr %4, align 8, !tbaa !29
  %71 = load ptr, ptr getelementptr inbounds (i8, ptr @_ZL16g_VulkanInitInfo, i64 16), align 8, !tbaa !30
  %72 = load ptr, ptr %39, align 8, !tbaa !31
  %73 = call i32 @vkMapMemory(ptr noundef %71, ptr noundef %72, i64 noundef 0, i64 noundef %45, i32 noundef 0, ptr noundef nonnull %3)
  call void @_ZL15check_vk_result8VkResult(i32 noundef %73)
  %74 = load ptr, ptr getelementptr inbounds (i8, ptr @_ZL16g_VulkanInitInfo, i64 16), align 8, !tbaa !30
  %75 = getelementptr inbounds i8, ptr %39, i64 8
  %76 = load ptr, ptr %75, align 8, !tbaa !32
  %77 = call i32 @vkMapMemory(ptr noundef %74, ptr noundef %76, i64 noundef 0, i64 noundef %49, i32 noundef 0, ptr noundef nonnull %4)
  call void @_ZL15check_vk_result8VkResult(i32 noundef %77)
  %78 = getelementptr inbounds i8, ptr %0, i64 16
  %79 = load i32, ptr %78, align 8, !tbaa !33
  %80 = icmp sgt i32 %79, 0
  br i1 %80, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %70
  %81 = getelementptr inbounds i8, ptr %0, i64 8
  %.pre = load ptr, ptr %3, align 8, !tbaa !29
  br label %95

._crit_edge:                                      ; preds = %95, %70
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %5) #9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(80) %5, i8 0, i64 80, i1 false)
  store i32 6, ptr %5, align 16, !tbaa !34
  %82 = load ptr, ptr %39, align 8, !tbaa !31
  %83 = getelementptr inbounds i8, ptr %5, i64 16
  store ptr %82, ptr %83, align 16, !tbaa !37
  %84 = getelementptr inbounds i8, ptr %5, i64 32
  store i64 -1, ptr %84, align 16, !tbaa !38
  %85 = getelementptr inbounds i8, ptr %5, i64 40
  store i32 6, ptr %85, align 8, !tbaa !34
  %86 = load ptr, ptr %75, align 8, !tbaa !32
  %87 = getelementptr inbounds i8, ptr %5, i64 56
  store ptr %86, ptr %87, align 8, !tbaa !37
  %88 = getelementptr inbounds i8, ptr %5, i64 72
  store i64 -1, ptr %88, align 8, !tbaa !38
  %89 = load ptr, ptr getelementptr inbounds (i8, ptr @_ZL16g_VulkanInitInfo, i64 16), align 8, !tbaa !30
  %90 = call i32 @vkFlushMappedMemoryRanges(ptr noundef %89, i32 noundef 2, ptr noundef nonnull %5)
  call void @_ZL15check_vk_result8VkResult(i32 noundef %90)
  %91 = load ptr, ptr getelementptr inbounds (i8, ptr @_ZL16g_VulkanInitInfo, i64 16), align 8, !tbaa !30
  %92 = load ptr, ptr %39, align 8, !tbaa !31
  call void @vkUnmapMemory(ptr noundef %91, ptr noundef %92)
  %93 = load ptr, ptr getelementptr inbounds (i8, ptr @_ZL16g_VulkanInitInfo, i64 16), align 8, !tbaa !30
  %94 = load ptr, ptr %75, align 8, !tbaa !32
  call void @vkUnmapMemory(ptr noundef %93, ptr noundef %94)
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  br label %124

95:                                               ; preds = %.lr.ph, %95
  %96 = phi ptr [ %.pre, %.lr.ph ], [ %116, %95 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %95 ]
  %97 = load ptr, ptr %81, align 8, !tbaa !39
  %98 = getelementptr inbounds ptr, ptr %97, i64 %indvars.iv
  %99 = load ptr, ptr %98, align 8, !tbaa !29
  %100 = getelementptr inbounds i8, ptr %99, i64 32
  %101 = getelementptr inbounds i8, ptr %99, i64 40
  %102 = load ptr, ptr %101, align 8, !tbaa !40
  %103 = load i32, ptr %100, align 8, !tbaa !52
  %104 = sext i32 %103 to i64
  %105 = mul nsw i64 %104, 20
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %96, ptr align 4 %102, i64 %105, i1 false)
  %106 = load ptr, ptr %4, align 8, !tbaa !29
  %107 = getelementptr inbounds i8, ptr %99, i64 16
  %108 = getelementptr inbounds i8, ptr %99, i64 24
  %109 = load ptr, ptr %108, align 8, !tbaa !53
  %110 = load i32, ptr %107, align 8, !tbaa !54
  %111 = sext i32 %110 to i64
  %112 = shl nsw i64 %111, 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %106, ptr align 2 %109, i64 %112, i1 false)
  %113 = load i32, ptr %100, align 8, !tbaa !52
  %114 = load ptr, ptr %3, align 8, !tbaa !29
  %115 = sext i32 %113 to i64
  %116 = getelementptr inbounds %struct.ImDrawVert, ptr %114, i64 %115
  store ptr %116, ptr %3, align 8, !tbaa !29
  %117 = load i32, ptr %107, align 8, !tbaa !54
  %118 = load ptr, ptr %4, align 8, !tbaa !29
  %119 = sext i32 %117 to i64
  %120 = getelementptr inbounds i16, ptr %118, i64 %119
  store ptr %120, ptr %4, align 8, !tbaa !29
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %121 = load i32, ptr %78, align 8, !tbaa !33
  %122 = sext i32 %121 to i64
  %123 = icmp slt i64 %indvars.iv.next, %122
  br i1 %123, label %95, label %._crit_edge, !llvm.loop !55

124:                                              ; preds = %._crit_edge, %33
  %125 = extractelement <2 x i32> %13, i64 0
  %126 = extractelement <2 x i32> %13, i64 1
  call void @_ZL33ImGui_ImplVulkan_SetupRenderStateP10ImDrawDataP17VkCommandBuffer_TP36ImGui_ImplVulkanH_FrameRenderBuffersii(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %39, i32 noundef %125, i32 noundef %126)
  %127 = getelementptr inbounds i8, ptr %0, i64 28
  %128 = load <2 x float>, ptr %127, align 4, !tbaa !5
  %129 = load <2 x float>, ptr %9, align 4, !tbaa !5
  %130 = getelementptr inbounds i8, ptr %0, i64 16
  %131 = load i32, ptr %130, align 8, !tbaa !33
  %132 = icmp sgt i32 %131, 0
  br i1 %132, label %.lr.ph140, label %.loopexit

.lr.ph140:                                        ; preds = %124
  %133 = getelementptr inbounds i8, ptr %0, i64 8
  %134 = getelementptr inbounds i8, ptr %6, i64 4
  %135 = getelementptr inbounds i8, ptr %6, i64 8
  %136 = uitofp nneg i32 %125 to float
  %137 = uitofp nneg i32 %126 to float
  %138 = getelementptr inbounds i8, ptr %7, i64 8
  br label %139

139:                                              ; preds = %.lr.ph140, %._crit_edge135
  %140 = phi i32 [ %131, %.lr.ph140 ], [ %146, %._crit_edge135 ]
  %indvars.iv142 = phi i64 [ 0, %.lr.ph140 ], [ %indvars.iv.next143, %._crit_edge135 ]
  %.0122137 = phi i32 [ 0, %.lr.ph140 ], [ %149, %._crit_edge135 ]
  %.0123136 = phi i32 [ 0, %.lr.ph140 ], [ %152, %._crit_edge135 ]
  %141 = load ptr, ptr %133, align 8, !tbaa !39
  %142 = getelementptr inbounds ptr, ptr %141, i64 %indvars.iv142
  %143 = load ptr, ptr %142, align 8, !tbaa !29
  %144 = load i32, ptr %143, align 8, !tbaa !57
  %145 = icmp sgt i32 %144, 0
  br i1 %145, label %.lr.ph134, label %._crit_edge135

._crit_edge135.loopexit:                          ; preds = %200
  %.pre145 = load i32, ptr %130, align 8, !tbaa !33
  br label %._crit_edge135

._crit_edge135:                                   ; preds = %._crit_edge135.loopexit, %139
  %146 = phi i32 [ %.pre145, %._crit_edge135.loopexit ], [ %140, %139 ]
  %147 = getelementptr inbounds i8, ptr %143, i64 16
  %148 = load i32, ptr %147, align 8, !tbaa !54
  %149 = add nsw i32 %148, %.0122137
  %150 = getelementptr inbounds i8, ptr %143, i64 32
  %151 = load i32, ptr %150, align 8, !tbaa !52
  %152 = add nsw i32 %151, %.0123136
  %indvars.iv.next143 = add nuw nsw i64 %indvars.iv142, 1
  %153 = sext i32 %146 to i64
  %154 = icmp slt i64 %indvars.iv.next143, %153
  br i1 %154, label %139, label %.loopexit, !llvm.loop !58

.lr.ph134:                                        ; preds = %139, %200
  %.0132 = phi i32 [ %201, %200 ], [ 0, %139 ]
  %155 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK8ImVectorI9ImDrawCmdEixEi(ptr noundef nonnull align 8 dereferenceable(16) %143, i32 noundef %.0132)
  %156 = getelementptr inbounds i8, ptr %155, i64 40
  %157 = load ptr, ptr %156, align 8, !tbaa !59
  %magicptr = ptrtoint ptr %157 to i64
  switch i64 %magicptr, label %159 [
    i64 0, label %160
    i64 -1, label %158
  ]

158:                                              ; preds = %.lr.ph134
  call void @_ZL33ImGui_ImplVulkan_SetupRenderStateP10ImDrawDataP17VkCommandBuffer_TP36ImGui_ImplVulkanH_FrameRenderBuffersii(ptr noundef %0, ptr noundef %1, ptr noundef %39, i32 noundef %125, i32 noundef %126)
  br label %200

159:                                              ; preds = %.lr.ph134
  call void %157(ptr noundef nonnull %143, ptr noundef nonnull %155)
  br label %200

160:                                              ; preds = %.lr.ph134
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #9
  call void @_ZN6ImVec4C2Ev(ptr noundef nonnull align 4 dereferenceable(16) %6)
  %161 = load <2 x float>, ptr %155, align 8, !tbaa !5
  %162 = fsub <2 x float> %161, %128
  %163 = fmul <2 x float> %129, %162
  store <2 x float> %163, ptr %6, align 8, !tbaa !5
  %164 = getelementptr inbounds i8, ptr %155, i64 8
  %165 = load <2 x float>, ptr %164, align 8, !tbaa !5
  %166 = fsub <2 x float> %165, %128
  %167 = fmul <2 x float> %129, %166
  store <2 x float> %167, ptr %135, align 8, !tbaa !5
  %168 = extractelement <2 x float> %163, i64 0
  %169 = fcmp olt float %168, %136
  br i1 %169, label %170, label %199

170:                                              ; preds = %160
  %171 = extractelement <2 x float> %163, i64 1
  %172 = fcmp olt float %171, %137
  %173 = extractelement <2 x float> %167, i64 0
  %174 = fcmp oge float %173, 0.000000e+00
  %or.cond4 = select i1 %172, i1 %174, i1 false
  %175 = extractelement <2 x float> %167, i64 1
  %176 = fcmp oge float %175, 0.000000e+00
  %or.cond7 = select i1 %or.cond4, i1 %176, i1 false
  br i1 %or.cond7, label %177, label %199

177:                                              ; preds = %170
  %178 = fcmp olt float %168, 0.000000e+00
  br i1 %178, label %179, label %180

179:                                              ; preds = %177
  store float 0.000000e+00, ptr %6, align 8, !tbaa !60
  br label %180

180:                                              ; preds = %179, %177
  %181 = phi float [ 0.000000e+00, %179 ], [ %168, %177 ]
  %182 = fcmp olt float %171, 0.000000e+00
  br i1 %182, label %183, label %184

183:                                              ; preds = %180
  store float 0.000000e+00, ptr %134, align 4, !tbaa !61
  br label %184

184:                                              ; preds = %183, %180
  %185 = phi float [ 0.000000e+00, %183 ], [ %171, %180 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #9
  %186 = insertelement <2 x float> poison, float %181, i64 0
  %187 = insertelement <2 x float> %186, float %185, i64 1
  %188 = fptosi <2 x float> %187 to <2 x i32>
  store <2 x i32> %188, ptr %7, align 8, !tbaa !62
  %189 = fsub <2 x float> %167, %187
  %190 = fptoui <2 x float> %189 to <2 x i32>
  store <2 x i32> %190, ptr %138, align 8, !tbaa !62
  call void @vkCmdSetScissor(ptr noundef %1, i32 noundef 0, i32 noundef 1, ptr noundef nonnull %7)
  %191 = getelementptr inbounds i8, ptr %155, i64 32
  %192 = load i32, ptr %191, align 8, !tbaa !63
  %193 = getelementptr inbounds i8, ptr %155, i64 28
  %194 = load i32, ptr %193, align 4, !tbaa !64
  %195 = add i32 %194, %.0122137
  %196 = getelementptr inbounds i8, ptr %155, i64 24
  %197 = load i32, ptr %196, align 8, !tbaa !65
  %198 = add i32 %197, %.0123136
  call void @vkCmdDrawIndexed(ptr noundef %1, i32 noundef %192, i32 noundef 1, i32 noundef %195, i32 noundef %198, i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #9
  br label %199

199:                                              ; preds = %184, %170, %160
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #9
  br label %200

200:                                              ; preds = %158, %159, %199
  %201 = add nuw nsw i32 %.0132, 1
  %202 = load i32, ptr %143, align 8, !tbaa !57
  %203 = icmp slt i32 %201, %202
  br i1 %203, label %.lr.ph134, label %._crit_edge135.loopexit, !llvm.loop !66

.loopexit:                                        ; preds = %._crit_edge135, %124, %2
  ret void
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL20CreateOrResizeBufferRP10VkBuffer_TRP16VkDeviceMemory_TRmm21VkBufferUsageFlagBits(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), i64 noundef, i32 noundef) local_unnamed_addr #0

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZNK8ImVectorI9ImDrawCmdEixEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #6 align 2

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

declare void @vkCmdSetScissor(ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

declare void @vkCmdDrawIndexed(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { noreturn nounwind }
attributes #9 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !12, i64 8}
!10 = !{!"_ZTS37ImGui_ImplVulkanH_WindowRenderBuffers", !11, i64 0, !11, i64 4, !12, i64 8}
!11 = !{!"int", !7, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!10, !11, i64 0}
!14 = !{!15, !11, i64 60}
!15 = !{!"_ZTS25ImGui_ImplVulkan_InitInfo", !12, i64 0, !12, i64 8, !12, i64 16, !11, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !11, i64 56, !11, i64 60, !16, i64 64, !12, i64 72, !12, i64 80}
!16 = !{!"_ZTS21VkSampleCountFlagBits", !7, i64 0}
!17 = !{!10, !11, i64 4}
!18 = !{!19, !11, i64 24}
!19 = !{!"_ZTS10ImDrawData", !20, i64 0, !12, i64 8, !11, i64 16, !11, i64 20, !11, i64 24, !21, i64 28, !21, i64 36, !21, i64 44}
!20 = !{!"bool", !7, i64 0}
!21 = !{!"_ZTS6ImVec2", !6, i64 0, !6, i64 4}
!22 = !{!19, !11, i64 20}
!23 = !{!24, !12, i64 32}
!24 = !{!"_ZTS36ImGui_ImplVulkanH_FrameRenderBuffers", !12, i64 0, !12, i64 8, !25, i64 16, !25, i64 24, !12, i64 32, !12, i64 40}
!25 = !{!"long", !7, i64 0}
!26 = !{!24, !25, i64 16}
!27 = !{!24, !12, i64 40}
!28 = !{!24, !25, i64 24}
!29 = !{!12, !12, i64 0}
!30 = !{!15, !12, i64 16}
!31 = !{!24, !12, i64 0}
!32 = !{!24, !12, i64 8}
!33 = !{!19, !11, i64 16}
!34 = !{!35, !36, i64 0}
!35 = !{!"_ZTS19VkMappedMemoryRange", !36, i64 0, !12, i64 8, !12, i64 16, !25, i64 24, !25, i64 32}
!36 = !{!"_ZTS15VkStructureType", !7, i64 0}
!37 = !{!35, !12, i64 16}
!38 = !{!35, !25, i64 32}
!39 = !{!19, !12, i64 8}
!40 = !{!41, !12, i64 40}
!41 = !{!"_ZTS10ImDrawList", !42, i64 0, !43, i64 16, !44, i64 32, !11, i64 48, !12, i64 56, !12, i64 64, !11, i64 72, !12, i64 80, !12, i64 88, !45, i64 96, !46, i64 112, !47, i64 128, !48, i64 144, !50, i64 200}
!42 = !{!"_ZTS8ImVectorI9ImDrawCmdE", !11, i64 0, !11, i64 4, !12, i64 8}
!43 = !{!"_ZTS8ImVectorItE", !11, i64 0, !11, i64 4, !12, i64 8}
!44 = !{!"_ZTS8ImVectorI10ImDrawVertE", !11, i64 0, !11, i64 4, !12, i64 8}
!45 = !{!"_ZTS8ImVectorI6ImVec4E", !11, i64 0, !11, i64 4, !12, i64 8}
!46 = !{!"_ZTS8ImVectorIPvE", !11, i64 0, !11, i64 4, !12, i64 8}
!47 = !{!"_ZTS8ImVectorI6ImVec2E", !11, i64 0, !11, i64 4, !12, i64 8}
!48 = !{!"_ZTS9ImDrawCmd", !49, i64 0, !12, i64 16, !11, i64 24, !11, i64 28, !11, i64 32, !12, i64 40, !12, i64 48}
!49 = !{!"_ZTS6ImVec4", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!50 = !{!"_ZTS18ImDrawListSplitter", !11, i64 0, !11, i64 4, !51, i64 8}
!51 = !{!"_ZTS8ImVectorI13ImDrawChannelE", !11, i64 0, !11, i64 4, !12, i64 8}
!52 = !{!41, !11, i64 32}
!53 = !{!41, !12, i64 24}
!54 = !{!41, !11, i64 16}
!55 = distinct !{!55, !56}
!56 = !{!"llvm.loop.mustprogress"}
!57 = !{!41, !11, i64 0}
!58 = distinct !{!58, !56}
!59 = !{!48, !12, i64 40}
!60 = !{!49, !6, i64 0}
!61 = !{!49, !6, i64 4}
!62 = !{!11, !11, i64 0}
!63 = !{!48, !11, i64 32}
!64 = !{!48, !11, i64 28}
!65 = !{!48, !11, i64 24}
!66 = distinct !{!66, !56}


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