; LLVM IR from khushmmehta/Scorch-V :: src/vendor/imgui/backends (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.VkCommandPoolCreateInfo = type { i32, ptr, i32, i32 }
%struct.VkCommandBufferAllocateInfo = type { i32, ptr, ptr, i32, i32 }
%struct.VkFenceCreateInfo = type { i32, ptr, i32 }
%struct.VkSemaphoreCreateInfo = type { i32, ptr, i32 }
%struct.ImGui_ImplVulkanH_Window = type { i32, i32, ptr, ptr, %struct.VkSurfaceFormatKHR, i32, ptr, ptr, i8, 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_ImplVulkanH_Frame = type { ptr, ptr, ptr, ptr, ptr, ptr }
%struct.ImGui_ImplVulkanH_FrameSemaphores = type { ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [102 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [48 x i8], align 1
@__PRETTY_FUNCTION__._Z44ImGui_ImplVulkanH_CreateWindowCommandBuffersP18VkPhysicalDevice_TP10VkDevice_TP24ImGui_ImplVulkanH_WindowjPK21VkAllocationCallbacks = external hidden unnamed_addr constant [147 x i8], align 1

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

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

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

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

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

declare i32 @vkCreateCommandPool(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #4

declare i32 @vkAllocateCommandBuffers(ptr noundef, ptr noundef, ptr noundef) #4

; Function Attrs: mustprogress uwtable
define dso_local void @_Z44ImGui_ImplVulkanH_CreateWindowCommandBuffersP18VkPhysicalDevice_TP10VkDevice_TP24ImGui_ImplVulkanH_WindowjPK21VkAllocationCallbacks(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef %4) #3 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca %struct.VkCommandPoolCreateInfo, align 8
  %16 = alloca %struct.VkCommandBufferAllocateInfo, align 8
  %17 = alloca %struct.VkFenceCreateInfo, align 8
  %18 = alloca %struct.VkSemaphoreCreateInfo, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !9
  store ptr %4, ptr %10, align 8, !tbaa !5
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = icmp ne ptr %19, null
  br i1 %20, label %21, label %24

21:                                               ; preds = %5
  %22 = load ptr, ptr %7, align 8, !tbaa !5
  %23 = icmp ne ptr %22, null
  br label %24

24:                                               ; preds = %21, %5
  %25 = phi i1 [ false, %5 ], [ %23, %21 ]
  br i1 %25, label %26, label %27

26:                                               ; preds = %24
  br label %29

27:                                               ; preds = %24
  call void @__assert_fail(ptr noundef @.str.30, ptr noundef @.str.1, i32 noundef 1320, ptr noundef @__PRETTY_FUNCTION__._Z44ImGui_ImplVulkanH_CreateWindowCommandBuffersP18VkPhysicalDevice_TP10VkDevice_TP24ImGui_ImplVulkanH_WindowjPK21VkAllocationCallbacks) #5
  unreachable

28:                                               ; No predecessors!
  br label %29

29:                                               ; preds = %28, %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %30

30:                                               ; preds = %93, %29
  %31 = load i32, ptr %12, align 4, !tbaa !9
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %32, i32 0, i32 12
  %34 = load i32, ptr %33, align 8, !tbaa !11
  %35 = icmp ult i32 %31, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %96

37:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %38 = load ptr, ptr %8, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %38, i32 0, i32 14
  %40 = load ptr, ptr %39, align 8, !tbaa !18
  %41 = load i32, ptr %12, align 4, !tbaa !9
  %42 = zext i32 %41 to i64
  %43 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %40, i64 %42
  store ptr %43, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Window, ptr %44, i32 0, i32 15
  %46 = load ptr, ptr %45, align 8, !tbaa !19
  %47 = load i32, ptr %12, align 4, !tbaa !9
  %48 = zext i32 %47 to i64
  %49 = getelementptr inbounds %struct.ImGui_ImplVulkanH_FrameSemaphores, ptr %46, i64 %48
  store ptr %49, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #6
  call void @llvm.memset.p0.i64(ptr align 8 %15, i8 0, i64 24, i1 false)
  %50 = getelementptr inbounds %struct.VkCommandPoolCreateInfo, ptr %15, i32 0, i32 0
  store i32 39, ptr %50, align 8, !tbaa !20
  %51 = getelementptr inbounds %struct.VkCommandPoolCreateInfo, ptr %15, i32 0, i32 2
  store i32 2, ptr %51, align 8, !tbaa !23
  %52 = load i32, ptr %9, align 4, !tbaa !9
  %53 = getelementptr inbounds %struct.VkCommandPoolCreateInfo, ptr %15, i32 0, i32 3
  store i32 %52, ptr %53, align 4, !tbaa !24
  %54 = load ptr, ptr %7, align 8, !tbaa !5
  %55 = load ptr, ptr %10, align 8, !tbaa !5
  %56 = load ptr, ptr %13, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %56, i32 0, i32 0
  %58 = call i32 @vkCreateCommandPool(ptr noundef %54, ptr noundef %15, ptr noundef %55, ptr noundef %57)
  store i32 %58, ptr %11, align 4, !tbaa !25
  %59 = load i32, ptr %11, align 4, !tbaa !25
  call void @_ZL15check_vk_result8VkResult(i32 noundef %59)
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #6
  call void @llvm.memset.p0.i64(ptr align 8 %16, i8 0, i64 32, i1 false)
  %60 = getelementptr inbounds %struct.VkCommandBufferAllocateInfo, ptr %16, i32 0, i32 0
  store i32 40, ptr %60, align 8, !tbaa !27
  %61 = load ptr, ptr %13, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %61, i32 0, i32 0
  %63 = load ptr, ptr %62, align 8, !tbaa !30
  %64 = getelementptr inbounds %struct.VkCommandBufferAllocateInfo, ptr %16, i32 0, i32 2
  store ptr %63, ptr %64, align 8, !tbaa !32
  %65 = getelementptr inbounds %struct.VkCommandBufferAllocateInfo, ptr %16, i32 0, i32 3
  store i32 0, ptr %65, align 8, !tbaa !33
  %66 = getelementptr inbounds %struct.VkCommandBufferAllocateInfo, ptr %16, i32 0, i32 4
  store i32 1, ptr %66, align 4, !tbaa !34
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = load ptr, ptr %13, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %68, i32 0, i32 1
  %70 = call i32 @vkAllocateCommandBuffers(ptr noundef %67, ptr noundef %16, ptr noundef %69)
  store i32 %70, ptr %11, align 4, !tbaa !25
  %71 = load i32, ptr %11, align 4, !tbaa !25
  call void @_ZL15check_vk_result8VkResult(i32 noundef %71)
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #6
  call void @llvm.memset.p0.i64(ptr align 8 %17, i8 0, i64 24, i1 false)
  %72 = getelementptr inbounds %struct.VkFenceCreateInfo, ptr %17, i32 0, i32 0
  store i32 8, ptr %72, align 8, !tbaa !35
  %73 = getelementptr inbounds %struct.VkFenceCreateInfo, ptr %17, i32 0, i32 2
  store i32 1, ptr %73, align 8, !tbaa !37
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  %75 = load ptr, ptr %10, align 8, !tbaa !5
  %76 = load ptr, ptr %13, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %76, i32 0, i32 2
  %78 = call i32 @vkCreateFence(ptr noundef %74, ptr noundef %17, ptr noundef %75, ptr noundef %77)
  store i32 %78, ptr %11, align 4, !tbaa !25
  %79 = load i32, ptr %11, align 4, !tbaa !25
  call void @_ZL15check_vk_result8VkResult(i32 noundef %79)
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #6
  call void @llvm.memset.p0.i64(ptr align 8 %18, i8 0, i64 24, i1 false)
  %80 = getelementptr inbounds %struct.VkSemaphoreCreateInfo, ptr %18, i32 0, i32 0
  store i32 9, ptr %80, align 8, !tbaa !38
  %81 = load ptr, ptr %7, align 8, !tbaa !5
  %82 = load ptr, ptr %10, align 8, !tbaa !5
  %83 = load ptr, ptr %14, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.ImGui_ImplVulkanH_FrameSemaphores, ptr %83, i32 0, i32 0
  %85 = call i32 @vkCreateSemaphore(ptr noundef %81, ptr noundef %18, ptr noundef %82, ptr noundef %84)
  store i32 %85, ptr %11, align 4, !tbaa !25
  %86 = load i32, ptr %11, align 4, !tbaa !25
  call void @_ZL15check_vk_result8VkResult(i32 noundef %86)
  %87 = load ptr, ptr %7, align 8, !tbaa !5
  %88 = load ptr, ptr %10, align 8, !tbaa !5
  %89 = load ptr, ptr %14, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.ImGui_ImplVulkanH_FrameSemaphores, ptr %89, i32 0, i32 1
  %91 = call i32 @vkCreateSemaphore(ptr noundef %87, ptr noundef %18, ptr noundef %88, ptr noundef %90)
  store i32 %91, ptr %11, align 4, !tbaa !25
  %92 = load i32, ptr %11, align 4, !tbaa !25
  call void @_ZL15check_vk_result8VkResult(i32 noundef %92)
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %93

93:                                               ; preds = %37
  %94 = load i32, ptr %12, align 4, !tbaa !9
  %95 = add i32 %94, 1
  store i32 %95, ptr %12, align 4, !tbaa !9
  br label %30, !llvm.loop !40

96:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  ret void
}

declare i32 @vkCreateFence(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #4

declare i32 @vkCreateSemaphore(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 = { noreturn nounwind }
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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 80}
!12 = !{!"_ZTS24ImGui_ImplVulkanH_Window", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16, !13, i64 24, !16, i64 32, !6, i64 40, !6, i64 48, !17, i64 56, !17, i64 57, !7, i64 60, !10, i64 76, !10, i64 80, !10, i64 84, !6, i64 88, !6, i64 96}
!13 = !{!"_ZTS18VkSurfaceFormatKHR", !14, i64 0, !15, i64 4}
!14 = !{!"_ZTS8VkFormat", !7, i64 0}
!15 = !{!"_ZTS15VkColorSpaceKHR", !7, i64 0}
!16 = !{!"_ZTS16VkPresentModeKHR", !7, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{!12, !6, i64 88}
!19 = !{!12, !6, i64 96}
!20 = !{!21, !22, i64 0}
!21 = !{!"_ZTS23VkCommandPoolCreateInfo", !22, i64 0, !6, i64 8, !10, i64 16, !10, i64 20}
!22 = !{!"_ZTS15VkStructureType", !7, i64 0}
!23 = !{!21, !10, i64 16}
!24 = !{!21, !10, i64 20}
!25 = !{!26, !26, i64 0}
!26 = !{!"_ZTS8VkResult", !7, i64 0}
!27 = !{!28, !22, i64 0}
!28 = !{!"_ZTS27VkCommandBufferAllocateInfo", !22, i64 0, !6, i64 8, !6, i64 16, !29, i64 24, !10, i64 28}
!29 = !{!"_ZTS20VkCommandBufferLevel", !7, i64 0}
!30 = !{!31, !6, i64 0}
!31 = !{!"_ZTS23ImGui_ImplVulkanH_Frame", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!32 = !{!28, !6, i64 16}
!33 = !{!28, !29, i64 24}
!34 = !{!28, !10, i64 28}
!35 = !{!36, !22, i64 0}
!36 = !{!"_ZTS17VkFenceCreateInfo", !22, i64 0, !6, i64 8, !10, i64 16}
!37 = !{!36, !10, i64 16}
!38 = !{!39, !22, i64 0}
!39 = !{!"_ZTS21VkSemaphoreCreateInfo", !22, i64 0, !6, i64 8, !10, i64 16}
!40 = distinct !{!40, !41}
!41 = !{!"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.VkCommandPoolCreateInfo = type { i32, ptr, i32, i32 }
%struct.VkCommandBufferAllocateInfo = type { i32, ptr, ptr, i32, i32 }
%struct.VkFenceCreateInfo = type { i32, ptr, i32 }
%struct.VkSemaphoreCreateInfo = type { i32, ptr, i32 }
%struct.ImGui_ImplVulkanH_Frame = type { ptr, ptr, ptr, ptr, ptr, ptr }
%struct.ImGui_ImplVulkanH_FrameSemaphores = type { ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [102 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [48 x i8], align 1
@__PRETTY_FUNCTION__._Z44ImGui_ImplVulkanH_CreateWindowCommandBuffersP18VkPhysicalDevice_TP10VkDevice_TP24ImGui_ImplVulkanH_WindowjPK21VkAllocationCallbacks = external hidden unnamed_addr constant [147 x i8], align 1

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

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

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

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

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

declare i32 @vkCreateCommandPool(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

declare i32 @vkAllocateCommandBuffers(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local void @_Z44ImGui_ImplVulkanH_CreateWindowCommandBuffersP18VkPhysicalDevice_TP10VkDevice_TP24ImGui_ImplVulkanH_WindowjPK21VkAllocationCallbacks(ptr noundef readnone %0, ptr noundef %1, ptr nocapture noundef readonly %2, i32 noundef %3, ptr noundef %4) local_unnamed_addr #3 {
  %6 = alloca %struct.VkCommandPoolCreateInfo, align 8
  %7 = alloca %struct.VkCommandBufferAllocateInfo, align 8
  %8 = alloca %struct.VkFenceCreateInfo, align 8
  %9 = alloca %struct.VkSemaphoreCreateInfo, align 8
  %10 = icmp ne ptr %0, null
  %11 = icmp ne ptr %1, null
  %12 = and i1 %10, %11
  br i1 %12, label %.preheader, label %22

.preheader:                                       ; preds = %5
  %13 = getelementptr inbounds i8, ptr %2, i64 80
  %14 = load i32, ptr %13, align 8, !tbaa !5
  %.not = icmp eq i32 %14, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %15 = getelementptr inbounds i8, ptr %2, i64 88
  %16 = getelementptr inbounds i8, ptr %2, i64 96
  %17 = getelementptr inbounds i8, ptr %6, i64 16
  %18 = getelementptr inbounds i8, ptr %6, i64 20
  %19 = getelementptr inbounds i8, ptr %7, i64 16
  %20 = getelementptr inbounds i8, ptr %7, i64 28
  %21 = getelementptr inbounds i8, ptr %8, i64 16
  br label %23

22:                                               ; preds = %5
  tail call void @__assert_fail(ptr noundef nonnull @.str.30, ptr noundef nonnull @.str.1, i32 noundef 1320, ptr noundef nonnull @__PRETTY_FUNCTION__._Z44ImGui_ImplVulkanH_CreateWindowCommandBuffersP18VkPhysicalDevice_TP10VkDevice_TP24ImGui_ImplVulkanH_WindowjPK21VkAllocationCallbacks) #5
  unreachable

._crit_edge:                                      ; preds = %23, %.preheader
  ret void

23:                                               ; preds = %.lr.ph, %23
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %23 ]
  %24 = load ptr, ptr %15, align 8, !tbaa !16
  %25 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %24, i64 %indvars.iv
  %26 = load ptr, ptr %16, align 8, !tbaa !17
  %27 = getelementptr inbounds %struct.ImGui_ImplVulkanH_FrameSemaphores, ptr %26, i64 %indvars.iv
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %6, i8 0, i64 16, i1 false)
  store i32 39, ptr %6, align 8, !tbaa !18
  store i32 2, ptr %17, align 8, !tbaa !21
  store i32 %3, ptr %18, align 4, !tbaa !22
  %28 = call i32 @vkCreateCommandPool(ptr noundef nonnull %1, ptr noundef nonnull %6, ptr noundef %4, ptr noundef %25)
  call void @_ZL15check_vk_result8VkResult(i32 noundef %28)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %7, i8 0, i64 32, i1 false)
  store i32 40, ptr %7, align 8, !tbaa !23
  %29 = load ptr, ptr %25, align 8, !tbaa !26
  store ptr %29, ptr %19, align 8, !tbaa !28
  store i32 1, ptr %20, align 4, !tbaa !29
  %30 = getelementptr inbounds i8, ptr %25, i64 8
  %31 = call i32 @vkAllocateCommandBuffers(ptr noundef nonnull %1, ptr noundef nonnull %7, ptr noundef nonnull %30)
  call void @_ZL15check_vk_result8VkResult(i32 noundef %31)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %8, i8 0, i64 24, i1 false)
  store i32 8, ptr %8, align 8, !tbaa !30
  store i32 1, ptr %21, align 8, !tbaa !32
  %32 = getelementptr inbounds i8, ptr %25, i64 16
  %33 = call i32 @vkCreateFence(ptr noundef nonnull %1, ptr noundef nonnull %8, ptr noundef %4, ptr noundef nonnull %32)
  call void @_ZL15check_vk_result8VkResult(i32 noundef %33)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %9, i8 0, i64 24, i1 false)
  store i32 9, ptr %9, align 8, !tbaa !33
  %34 = call i32 @vkCreateSemaphore(ptr noundef nonnull %1, ptr noundef nonnull %9, ptr noundef %4, ptr noundef %27)
  call void @_ZL15check_vk_result8VkResult(i32 noundef %34)
  %35 = getelementptr inbounds i8, ptr %27, i64 8
  %36 = call i32 @vkCreateSemaphore(ptr noundef nonnull %1, ptr noundef nonnull %9, ptr noundef %4, ptr noundef nonnull %35)
  call void @_ZL15check_vk_result8VkResult(i32 noundef %36)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %37 = load i32, ptr %13, align 8, !tbaa !5
  %38 = zext i32 %37 to i64
  %39 = icmp ult i64 %indvars.iv.next, %38
  br i1 %39, label %23, label %._crit_edge, !llvm.loop !35
}

declare i32 @vkCreateFence(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

declare i32 @vkCreateSemaphore(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 = { noreturn nounwind }
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, !7, i64 80}
!6 = !{!"_ZTS24ImGui_ImplVulkanH_Window", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 16, !11, i64 24, !14, i64 32, !10, i64 40, !10, i64 48, !15, i64 56, !15, i64 57, !8, i64 60, !7, i64 76, !7, i64 80, !7, i64 84, !10, i64 88, !10, i64 96}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_ZTS18VkSurfaceFormatKHR", !12, i64 0, !13, i64 4}
!12 = !{!"_ZTS8VkFormat", !8, i64 0}
!13 = !{!"_ZTS15VkColorSpaceKHR", !8, i64 0}
!14 = !{!"_ZTS16VkPresentModeKHR", !8, i64 0}
!15 = !{!"bool", !8, i64 0}
!16 = !{!6, !10, i64 88}
!17 = !{!6, !10, i64 96}
!18 = !{!19, !20, i64 0}
!19 = !{!"_ZTS23VkCommandPoolCreateInfo", !20, i64 0, !10, i64 8, !7, i64 16, !7, i64 20}
!20 = !{!"_ZTS15VkStructureType", !8, i64 0}
!21 = !{!19, !7, i64 16}
!22 = !{!19, !7, i64 20}
!23 = !{!24, !20, i64 0}
!24 = !{!"_ZTS27VkCommandBufferAllocateInfo", !20, i64 0, !10, i64 8, !10, i64 16, !25, i64 24, !7, i64 28}
!25 = !{!"_ZTS20VkCommandBufferLevel", !8, i64 0}
!26 = !{!27, !10, i64 0}
!27 = !{!"_ZTS23ImGui_ImplVulkanH_Frame", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40}
!28 = !{!24, !10, i64 16}
!29 = !{!24, !7, i64 28}
!30 = !{!31, !20, i64 0}
!31 = !{!"_ZTS17VkFenceCreateInfo", !20, i64 0, !10, i64 8, !7, i64 16}
!32 = !{!31, !7, i64 16}
!33 = !{!34, !20, i64 0}
!34 = !{!"_ZTS21VkSemaphoreCreateInfo", !20, i64 0, !10, i64 8, !7, i64 16}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.mustprogress"}


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