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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.ImGui_ImplVulkanH_Frame = type { ptr, ptr, ptr, ptr, ptr, ptr }

declare void @vkDestroyImageView(ptr noundef, ptr noundef, ptr noundef) #0

declare void @vkFreeCommandBuffers(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #0

declare void @vkDestroyCommandPool(ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_Z30ImGui_ImplVulkanH_DestroyFrameP10VkDevice_TP23ImGui_ImplVulkanH_FramePK21VkAllocationCallbacks(ptr noundef %0, ptr noundef %1, ptr noundef %2) #1 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %7 = load ptr, ptr %4, align 8, !tbaa !5
  %8 = load ptr, ptr %5, align 8, !tbaa !5
  %9 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %8, i32 0, i32 2
  %10 = load ptr, ptr %9, align 8, !tbaa !9
  %11 = load ptr, ptr %6, align 8, !tbaa !5
  call void @vkDestroyFence(ptr noundef %7, ptr noundef %10, ptr noundef %11)
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %13, i32 0, i32 0
  %15 = load ptr, ptr %14, align 8, !tbaa !11
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %16, i32 0, i32 1
  call void @vkFreeCommandBuffers(ptr noundef %12, ptr noundef %15, i32 noundef 1, ptr noundef %17)
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %19, i32 0, i32 0
  %21 = load ptr, ptr %20, align 8, !tbaa !11
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  call void @vkDestroyCommandPool(ptr noundef %18, ptr noundef %21, ptr noundef %22)
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %23, i32 0, i32 2
  store ptr null, ptr %24, align 8, !tbaa !9
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %25, i32 0, i32 1
  store ptr null, ptr %26, align 8, !tbaa !12
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %27, i32 0, i32 0
  store ptr null, ptr %28, align 8, !tbaa !11
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %30, i32 0, i32 4
  %32 = load ptr, ptr %31, align 8, !tbaa !13
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  call void @vkDestroyImageView(ptr noundef %29, ptr noundef %32, ptr noundef %33)
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.ImGui_ImplVulkanH_Frame, ptr %35, i32 0, i32 5
  %37 = load ptr, ptr %36, align 8, !tbaa !14
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  call void @vkDestroyFramebuffer(ptr noundef %34, ptr noundef %37, ptr noundef %38)
  ret void
}

declare void @vkDestroyFence(ptr noundef, ptr noundef, ptr noundef) #0

declare void @vkDestroyFramebuffer(ptr noundef, ptr noundef, ptr noundef) #0

attributes #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 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" }

!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, !6, i64 16}
!10 = !{!"_ZTS23ImGui_ImplVulkanH_Frame", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!11 = !{!10, !6, i64 0}
!12 = !{!10, !6, i64 8}
!13 = !{!10, !6, i64 32}
!14 = !{!10, !6, i64 40}


; 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"

declare void @vkDestroyImageView(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @vkFreeCommandBuffers(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

declare void @vkDestroyCommandPool(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_Z30ImGui_ImplVulkanH_DestroyFrameP10VkDevice_TP23ImGui_ImplVulkanH_FramePK21VkAllocationCallbacks(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #1 {
  %4 = getelementptr inbounds i8, ptr %1, i64 16
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  tail call void @vkDestroyFence(ptr noundef %0, ptr noundef %5, ptr noundef %2)
  %6 = load ptr, ptr %1, align 8, !tbaa !10
  %7 = getelementptr inbounds i8, ptr %1, i64 8
  tail call void @vkFreeCommandBuffers(ptr noundef %0, ptr noundef %6, i32 noundef 1, ptr noundef nonnull %7)
  %8 = load ptr, ptr %1, align 8, !tbaa !10
  tail call void @vkDestroyCommandPool(ptr noundef %0, ptr noundef %8, ptr noundef %2)
  %9 = getelementptr inbounds i8, ptr %1, i64 32
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %1, i8 0, i64 24, i1 false)
  %10 = load ptr, ptr %9, align 8, !tbaa !11
  tail call void @vkDestroyImageView(ptr noundef %0, ptr noundef %10, ptr noundef %2)
  %11 = getelementptr inbounds i8, ptr %1, i64 40
  %12 = load ptr, ptr %11, align 8, !tbaa !12
  tail call void @vkDestroyFramebuffer(ptr noundef %0, ptr noundef %12, ptr noundef %2)
  ret void
}

declare void @vkDestroyFence(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @vkDestroyFramebuffer(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

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

attributes #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 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }

!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 16}
!6 = !{!"_ZTS23ImGui_ImplVulkanH_Frame", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!6, !7, i64 0}
!11 = !{!6, !7, i64 32}
!12 = !{!6, !7, i64 40}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InstCombinePass,MemCpyOptPass,SROAPass,TailCallElimPass