; LLVM IR from Devaniti/BoolkaEngine :: ThirdParty/imgui/backends/imgui_impl_vulkan.ll (Z36ImGui_ImplVulkan_CreateDeviceObjectsv)

; 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, i32, ptr, ptr }
%struct.VkSamplerCreateInfo = type { i32, ptr, i32, i32, i32, i32, i32, i32, i32, float, i32, float, i32, i32, float, float, i32, i32 }
%struct.VkDescriptorSetLayoutBinding = type { i32, i32, i32, i32, ptr }
%struct.VkDescriptorSetLayoutCreateInfo = type { i32, ptr, i32, i32, ptr }
%struct.VkDescriptorSetAllocateInfo = type { i32, ptr, ptr, i32, ptr }
%struct.VkPushConstantRange = type { i32, i32, i32 }
%struct.VkPipelineLayoutCreateInfo = type { i32, ptr, i32, i32, ptr, i32, ptr }

@_ZL16g_VulkanInitInfo = external hidden global %struct.ImGui_ImplVulkan_InitInfo, align 8
@_ZL10g_Pipeline = external hidden global ptr, align 8
@_ZL13g_FontSampler = external hidden global ptr, align 8
@_ZL15g_DescriptorSet = external hidden global ptr, align 8
@_ZL21g_DescriptorSetLayout = external hidden global ptr, align 8
@_ZL16g_PipelineLayout = external hidden global ptr, align 8
@_ZL12g_RenderPass = external hidden global ptr, align 8
@_ZL9g_Subpass = external hidden global i32, align 4

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z36ImGui_ImplVulkan_CreateDeviceObjectsv() #2 {
  %1 = alloca ptr, align 8
  %2 = alloca i32, align 4
  %3 = alloca %struct.VkSamplerCreateInfo, align 8
  %4 = alloca [1 x ptr], align 8
  %5 = alloca [1 x %struct.VkDescriptorSetLayoutBinding], align 16
  %6 = alloca %struct.VkDescriptorSetLayoutCreateInfo, align 8
  %7 = alloca %struct.VkDescriptorSetAllocateInfo, align 8
  %8 = alloca [1 x %struct.VkPushConstantRange], align 4
  %9 = alloca [1 x ptr], align 8
  %10 = alloca %struct.VkPipelineLayoutCreateInfo, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #4
  store ptr @_ZL16g_VulkanInitInfo, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  %11 = load ptr, ptr @_ZL13g_FontSampler, align 8, !tbaa !5
  %12 = icmp ne ptr %11, null
  br i1 %12, label %32, label %13

13:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 80, ptr %3) #4
  call void @llvm.memset.p0.i64(ptr align 8 %3, i8 0, i64 80, i1 false)
  %14 = getelementptr inbounds %struct.VkSamplerCreateInfo, ptr %3, i32 0, i32 0
  store i32 31, ptr %14, align 8, !tbaa !9
  %15 = getelementptr inbounds %struct.VkSamplerCreateInfo, ptr %3, i32 0, i32 3
  store i32 1, ptr %15, align 4, !tbaa !19
  %16 = getelementptr inbounds %struct.VkSamplerCreateInfo, ptr %3, i32 0, i32 4
  store i32 1, ptr %16, align 8, !tbaa !20
  %17 = getelementptr inbounds %struct.VkSamplerCreateInfo, ptr %3, i32 0, i32 5
  store i32 1, ptr %17, align 4, !tbaa !21
  %18 = getelementptr inbounds %struct.VkSamplerCreateInfo, ptr %3, i32 0, i32 6
  store i32 0, ptr %18, align 8, !tbaa !22
  %19 = getelementptr inbounds %struct.VkSamplerCreateInfo, ptr %3, i32 0, i32 7
  store i32 0, ptr %19, align 4, !tbaa !23
  %20 = getelementptr inbounds %struct.VkSamplerCreateInfo, ptr %3, i32 0, i32 8
  store i32 0, ptr %20, align 8, !tbaa !24
  %21 = getelementptr inbounds %struct.VkSamplerCreateInfo, ptr %3, i32 0, i32 14
  store float -1.000000e+03, ptr %21, align 8, !tbaa !25
  %22 = getelementptr inbounds %struct.VkSamplerCreateInfo, ptr %3, i32 0, i32 15
  store float 1.000000e+03, ptr %22, align 4, !tbaa !26
  %23 = getelementptr inbounds %struct.VkSamplerCreateInfo, ptr %3, i32 0, i32 11
  store float 1.000000e+00, ptr %23, align 4, !tbaa !27
  %24 = load ptr, ptr %1, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.ImGui_ImplVulkan_InitInfo, ptr %24, i32 0, i32 2
  %26 = load ptr, ptr %25, align 8, !tbaa !28
  %27 = load ptr, ptr %1, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.ImGui_ImplVulkan_InitInfo, ptr %27, i32 0, i32 11
  %29 = load ptr, ptr %28, align 8, !tbaa !31
  %30 = call i32 @vkCreateSampler(ptr noundef %26, ptr noundef %3, ptr noundef %29, ptr noundef @_ZL13g_FontSampler)
  store i32 %30, ptr %2, align 4, !tbaa !32
  %31 = load i32, ptr %2, align 4, !tbaa !32
  call void @_ZL15check_vk_result8VkResult(i32 noundef %31)
  call void @llvm.lifetime.end.p0(i64 80, ptr %3) #4
  br label %32

32:                                               ; preds = %13, %0
  %33 = load ptr, ptr @_ZL21g_DescriptorSetLayout, align 8, !tbaa !5
  %34 = icmp ne ptr %33, null
  br i1 %34, label %58, label %35

35:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %36 = load ptr, ptr @_ZL13g_FontSampler, align 8, !tbaa !5
  store ptr %36, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #4
  call void @llvm.memset.p0.i64(ptr align 16 %5, i8 0, i64 24, i1 false)
  %37 = getelementptr inbounds [1 x %struct.VkDescriptorSetLayoutBinding], ptr %5, i64 0, i64 0
  %38 = getelementptr inbounds %struct.VkDescriptorSetLayoutBinding, ptr %37, i32 0, i32 1
  store i32 1, ptr %38, align 4, !tbaa !34
  %39 = getelementptr inbounds [1 x %struct.VkDescriptorSetLayoutBinding], ptr %5, i64 0, i64 0
  %40 = getelementptr inbounds %struct.VkDescriptorSetLayoutBinding, ptr %39, i32 0, i32 2
  store i32 1, ptr %40, align 8, !tbaa !37
  %41 = getelementptr inbounds [1 x %struct.VkDescriptorSetLayoutBinding], ptr %5, i64 0, i64 0
  %42 = getelementptr inbounds %struct.VkDescriptorSetLayoutBinding, ptr %41, i32 0, i32 3
  store i32 16, ptr %42, align 4, !tbaa !38
  %43 = getelementptr inbounds [1 x ptr], ptr %4, i64 0, i64 0
  %44 = getelementptr inbounds [1 x %struct.VkDescriptorSetLayoutBinding], ptr %5, i64 0, i64 0
  %45 = getelementptr inbounds %struct.VkDescriptorSetLayoutBinding, ptr %44, i32 0, i32 4
  store ptr %43, ptr %45, align 16, !tbaa !39
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #4
  call void @llvm.memset.p0.i64(ptr align 8 %6, i8 0, i64 32, i1 false)
  %46 = getelementptr inbounds %struct.VkDescriptorSetLayoutCreateInfo, ptr %6, i32 0, i32 0
  store i32 32, ptr %46, align 8, !tbaa !40
  %47 = getelementptr inbounds %struct.VkDescriptorSetLayoutCreateInfo, ptr %6, i32 0, i32 3
  store i32 1, ptr %47, align 4, !tbaa !42
  %48 = getelementptr inbounds [1 x %struct.VkDescriptorSetLayoutBinding], ptr %5, i64 0, i64 0
  %49 = getelementptr inbounds %struct.VkDescriptorSetLayoutCreateInfo, ptr %6, i32 0, i32 4
  store ptr %48, ptr %49, align 8, !tbaa !43
  %50 = load ptr, ptr %1, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.ImGui_ImplVulkan_InitInfo, ptr %50, i32 0, i32 2
  %52 = load ptr, ptr %51, align 8, !tbaa !28
  %53 = load ptr, ptr %1, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.ImGui_ImplVulkan_InitInfo, ptr %53, i32 0, i32 11
  %55 = load ptr, ptr %54, align 8, !tbaa !31
  %56 = call i32 @vkCreateDescriptorSetLayout(ptr noundef %52, ptr noundef %6, ptr noundef %55, ptr noundef @_ZL21g_DescriptorSetLayout)
  store i32 %56, ptr %2, align 4, !tbaa !32
  %57 = load i32, ptr %2, align 4, !tbaa !32
  call void @_ZL15check_vk_result8VkResult(i32 noundef %57)
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  br label %58

58:                                               ; preds = %35, %32
  call void @llvm.lifetime.start.p0(i64 40, ptr %7) #4
  call void @llvm.memset.p0.i64(ptr align 8 %7, i8 0, i64 40, i1 false)
  %59 = getelementptr inbounds %struct.VkDescriptorSetAllocateInfo, ptr %7, i32 0, i32 0
  store i32 34, ptr %59, align 8, !tbaa !44
  %60 = load ptr, ptr %1, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.ImGui_ImplVulkan_InitInfo, ptr %60, i32 0, i32 6
  %62 = load ptr, ptr %61, align 8, !tbaa !46
  %63 = getelementptr inbounds %struct.VkDescriptorSetAllocateInfo, ptr %7, i32 0, i32 2
  store ptr %62, ptr %63, align 8, !tbaa !47
  %64 = getelementptr inbounds %struct.VkDescriptorSetAllocateInfo, ptr %7, i32 0, i32 3
  store i32 1, ptr %64, align 8, !tbaa !48
  %65 = getelementptr inbounds %struct.VkDescriptorSetAllocateInfo, ptr %7, i32 0, i32 4
  store ptr @_ZL21g_DescriptorSetLayout, ptr %65, align 8, !tbaa !49
  %66 = load ptr, ptr %1, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.ImGui_ImplVulkan_InitInfo, ptr %66, i32 0, i32 2
  %68 = load ptr, ptr %67, align 8, !tbaa !28
  %69 = call i32 @vkAllocateDescriptorSets(ptr noundef %68, ptr noundef %7, ptr noundef @_ZL15g_DescriptorSet)
  store i32 %69, ptr %2, align 4, !tbaa !32
  %70 = load i32, ptr %2, align 4, !tbaa !32
  call void @_ZL15check_vk_result8VkResult(i32 noundef %70)
  call void @llvm.lifetime.end.p0(i64 40, ptr %7) #4
  %71 = load ptr, ptr @_ZL16g_PipelineLayout, align 8, !tbaa !5
  %72 = icmp ne ptr %71, null
  br i1 %72, label %96, label %73

73:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 12, ptr %8) #4
  call void @llvm.memset.p0.i64(ptr align 4 %8, i8 0, i64 12, i1 false)
  %74 = getelementptr inbounds [1 x %struct.VkPushConstantRange], ptr %8, i64 0, i64 0
  %75 = getelementptr inbounds %struct.VkPushConstantRange, ptr %74, i32 0, i32 0
  store i32 1, ptr %75, align 4, !tbaa !50
  %76 = getelementptr inbounds [1 x %struct.VkPushConstantRange], ptr %8, i64 0, i64 0
  %77 = getelementptr inbounds %struct.VkPushConstantRange, ptr %76, i32 0, i32 1
  store i32 0, ptr %77, align 4, !tbaa !52
  %78 = getelementptr inbounds [1 x %struct.VkPushConstantRange], ptr %8, i64 0, i64 0
  %79 = getelementptr inbounds %struct.VkPushConstantRange, ptr %78, i32 0, i32 2
  store i32 16, ptr %79, align 4, !tbaa !53
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %80 = load ptr, ptr @_ZL21g_DescriptorSetLayout, align 8, !tbaa !5
  store ptr %80, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 48, ptr %10) #4
  call void @llvm.memset.p0.i64(ptr align 8 %10, i8 0, i64 48, i1 false)
  %81 = getelementptr inbounds %struct.VkPipelineLayoutCreateInfo, ptr %10, i32 0, i32 0
  store i32 30, ptr %81, align 8, !tbaa !54
  %82 = getelementptr inbounds %struct.VkPipelineLayoutCreateInfo, ptr %10, i32 0, i32 3
  store i32 1, ptr %82, align 4, !tbaa !56
  %83 = getelementptr inbounds [1 x ptr], ptr %9, i64 0, i64 0
  %84 = getelementptr inbounds %struct.VkPipelineLayoutCreateInfo, ptr %10, i32 0, i32 4
  store ptr %83, ptr %84, align 8, !tbaa !57
  %85 = getelementptr inbounds %struct.VkPipelineLayoutCreateInfo, ptr %10, i32 0, i32 5
  store i32 1, ptr %85, align 8, !tbaa !58
  %86 = getelementptr inbounds [1 x %struct.VkPushConstantRange], ptr %8, i64 0, i64 0
  %87 = getelementptr inbounds %struct.VkPipelineLayoutCreateInfo, ptr %10, i32 0, i32 6
  store ptr %86, ptr %87, align 8, !tbaa !59
  %88 = load ptr, ptr %1, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.ImGui_ImplVulkan_InitInfo, ptr %88, i32 0, i32 2
  %90 = load ptr, ptr %89, align 8, !tbaa !28
  %91 = load ptr, ptr %1, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.ImGui_ImplVulkan_InitInfo, ptr %91, i32 0, i32 11
  %93 = load ptr, ptr %92, align 8, !tbaa !31
  %94 = call i32 @vkCreatePipelineLayout(ptr noundef %90, ptr noundef %10, ptr noundef %93, ptr noundef @_ZL16g_PipelineLayout)
  store i32 %94, ptr %2, align 4, !tbaa !32
  %95 = load i32, ptr %2, align 4, !tbaa !32
  call void @_ZL15check_vk_result8VkResult(i32 noundef %95)
  call void @llvm.lifetime.end.p0(i64 48, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr %8) #4
  br label %96

96:                                               ; preds = %73, %58
  %97 = load ptr, ptr %1, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.ImGui_ImplVulkan_InitInfo, ptr %97, i32 0, i32 2
  %99 = load ptr, ptr %98, align 8, !tbaa !28
  %100 = load ptr, ptr %1, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.ImGui_ImplVulkan_InitInfo, ptr %100, i32 0, i32 11
  %102 = load ptr, ptr %101, align 8, !tbaa !31
  %103 = load ptr, ptr %1, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.ImGui_ImplVulkan_InitInfo, ptr %103, i32 0, i32 5
  %105 = load ptr, ptr %104, align 8, !tbaa !60
  %106 = load ptr, ptr @_ZL12g_RenderPass, align 8, !tbaa !5
  %107 = load ptr, ptr %1, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.ImGui_ImplVulkan_InitInfo, ptr %107, i32 0, i32 10
  %109 = load i32, ptr %108, align 4, !tbaa !61
  %110 = load i32, ptr @_ZL9g_Subpass, align 4, !tbaa !62
  call void @_ZL31ImGui_ImplVulkan_CreatePipelineP10VkDevice_TPK21VkAllocationCallbacksP17VkPipelineCache_TP14VkRenderPass_T21VkSampleCountFlagBitsPP12VkPipeline_Tj(ptr noundef %99, ptr noundef %102, ptr noundef %105, ptr noundef %106, i32 noundef %109, ptr noundef @_ZL10g_Pipeline, i32 noundef %110)
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #4
  ret i1 true
}

declare i32 @vkCreateSampler(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare i32 @vkCreateDescriptorSetLayout(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare i32 @vkAllocateDescriptorSets(ptr noundef, ptr noundef, ptr noundef) #3

declare i32 @vkCreatePipelineLayout(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { 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 #3 = { "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 = { 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, !11, i64 0}
!10 = !{!"_ZTS19VkSamplerCreateInfo", !11, i64 0, !6, i64 8, !12, i64 16, !13, i64 20, !13, i64 24, !14, i64 28, !15, i64 32, !15, i64 36, !15, i64 40, !16, i64 44, !12, i64 48, !16, i64 52, !12, i64 56, !17, i64 60, !16, i64 64, !16, i64 68, !18, i64 72, !12, i64 76}
!11 = !{!"_ZTS15VkStructureType", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTS8VkFilter", !7, i64 0}
!14 = !{!"_ZTS19VkSamplerMipmapMode", !7, i64 0}
!15 = !{!"_ZTS20VkSamplerAddressMode", !7, i64 0}
!16 = !{!"float", !7, i64 0}
!17 = !{!"_ZTS11VkCompareOp", !7, i64 0}
!18 = !{!"_ZTS13VkBorderColor", !7, i64 0}
!19 = !{!10, !13, i64 20}
!20 = !{!10, !13, i64 24}
!21 = !{!10, !14, i64 28}
!22 = !{!10, !15, i64 32}
!23 = !{!10, !15, i64 36}
!24 = !{!10, !15, i64 40}
!25 = !{!10, !16, i64 64}
!26 = !{!10, !16, i64 68}
!27 = !{!10, !16, i64 52}
!28 = !{!29, !6, i64 16}
!29 = !{!"_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, !12, i64 64, !30, i64 68, !6, i64 72, !6, i64 80}
!30 = !{!"_ZTS21VkSampleCountFlagBits", !7, i64 0}
!31 = !{!29, !6, i64 72}
!32 = !{!33, !33, i64 0}
!33 = !{!"_ZTS8VkResult", !7, i64 0}
!34 = !{!35, !36, i64 4}
!35 = !{!"_ZTS28VkDescriptorSetLayoutBinding", !12, i64 0, !36, i64 4, !12, i64 8, !12, i64 12, !6, i64 16}
!36 = !{!"_ZTS16VkDescriptorType", !7, i64 0}
!37 = !{!35, !12, i64 8}
!38 = !{!35, !12, i64 12}
!39 = !{!35, !6, i64 16}
!40 = !{!41, !11, i64 0}
!41 = !{!"_ZTS31VkDescriptorSetLayoutCreateInfo", !11, i64 0, !6, i64 8, !12, i64 16, !12, i64 20, !6, i64 24}
!42 = !{!41, !12, i64 20}
!43 = !{!41, !6, i64 24}
!44 = !{!45, !11, i64 0}
!45 = !{!"_ZTS27VkDescriptorSetAllocateInfo", !11, i64 0, !6, i64 8, !6, i64 16, !12, i64 24, !6, i64 32}
!46 = !{!29, !6, i64 48}
!47 = !{!45, !6, i64 16}
!48 = !{!45, !12, i64 24}
!49 = !{!45, !6, i64 32}
!50 = !{!51, !12, i64 0}
!51 = !{!"_ZTS19VkPushConstantRange", !12, i64 0, !12, i64 4, !12, i64 8}
!52 = !{!51, !12, i64 4}
!53 = !{!51, !12, i64 8}
!54 = !{!55, !11, i64 0}
!55 = !{!"_ZTS26VkPipelineLayoutCreateInfo", !11, i64 0, !6, i64 8, !12, i64 16, !12, i64 20, !6, i64 24, !12, i64 32, !6, i64 40}
!56 = !{!55, !12, i64 20}
!57 = !{!55, !6, i64 24}
!58 = !{!55, !12, i64 32}
!59 = !{!55, !6, i64 40}
!60 = !{!29, !6, i64 40}
!61 = !{!29, !30, i64 68}
!62 = !{!12, !12, i64 0}


; 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, i32, ptr, ptr }
%struct.VkSamplerCreateInfo = type { i32, ptr, i32, i32, i32, i32, i32, i32, i32, float, i32, float, i32, i32, float, float, i32, i32 }
%struct.VkDescriptorSetLayoutBinding = type { i32, i32, i32, i32, ptr }
%struct.VkDescriptorSetLayoutCreateInfo = type { i32, ptr, i32, i32, ptr }
%struct.VkDescriptorSetAllocateInfo = type { i32, ptr, ptr, i32, ptr }
%struct.VkPushConstantRange = type { i32, i32, i32 }
%struct.VkPipelineLayoutCreateInfo = type { i32, ptr, i32, i32, ptr, i32, ptr }

@_ZL16g_VulkanInitInfo = external hidden local_unnamed_addr global %struct.ImGui_ImplVulkan_InitInfo, align 8
@_ZL10g_Pipeline = external hidden global ptr, align 8
@_ZL13g_FontSampler = external hidden global ptr, align 8
@_ZL15g_DescriptorSet = external hidden global ptr, align 8
@_ZL21g_DescriptorSetLayout = external hidden global ptr, align 8
@_ZL16g_PipelineLayout = external hidden global ptr, align 8
@_ZL12g_RenderPass = external hidden local_unnamed_addr global ptr, align 8
@_ZL9g_Subpass = external hidden local_unnamed_addr global i32, align 4

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z36ImGui_ImplVulkan_CreateDeviceObjectsv() local_unnamed_addr #2 {
  %1 = alloca %struct.VkSamplerCreateInfo, align 8
  %2 = alloca [1 x ptr], align 8
  %3 = alloca [1 x %struct.VkDescriptorSetLayoutBinding], align 16
  %4 = alloca %struct.VkDescriptorSetLayoutCreateInfo, align 8
  %5 = alloca %struct.VkDescriptorSetAllocateInfo, align 8
  %6 = alloca [1 x %struct.VkPushConstantRange], align 4
  %7 = alloca [1 x ptr], align 8
  %8 = alloca %struct.VkPipelineLayoutCreateInfo, align 8
  %9 = load ptr, ptr @_ZL13g_FontSampler, align 8, !tbaa !5
  %.not = icmp eq ptr %9, null
  br i1 %.not, label %10, label %20

10:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %1) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %1, i8 0, i64 80, i1 false)
  store i32 31, ptr %1, align 8, !tbaa !9
  %11 = getelementptr inbounds i8, ptr %1, i64 20
  store i32 1, ptr %11, align 4, !tbaa !19
  %12 = getelementptr inbounds i8, ptr %1, i64 24
  store i32 1, ptr %12, align 8, !tbaa !20
  %13 = getelementptr inbounds i8, ptr %1, i64 28
  store i32 1, ptr %13, align 4, !tbaa !21
  %14 = getelementptr inbounds i8, ptr %1, i64 36
  store i32 0, ptr %14, align 4, !tbaa !22
  %15 = getelementptr inbounds i8, ptr %1, i64 64
  store <2 x float> <float -1.000000e+03, float 1.000000e+03>, ptr %15, align 8, !tbaa !23
  %16 = getelementptr inbounds i8, ptr %1, i64 52
  store float 1.000000e+00, ptr %16, align 4, !tbaa !24
  %17 = load ptr, ptr getelementptr inbounds (i8, ptr @_ZL16g_VulkanInitInfo, i64 16), align 8, !tbaa !25
  %18 = load ptr, ptr getelementptr inbounds (i8, ptr @_ZL16g_VulkanInitInfo, i64 72), align 8, !tbaa !28
  %19 = call i32 @vkCreateSampler(ptr noundef %17, ptr noundef nonnull %1, ptr noundef %18, ptr noundef nonnull @_ZL13g_FontSampler)
  call void @_ZL15check_vk_result8VkResult(i32 noundef %19)
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %1) #4
  br label %20

20:                                               ; preds = %10, %0
  %21 = load ptr, ptr @_ZL21g_DescriptorSetLayout, align 8, !tbaa !5
  %.not15 = icmp eq ptr %21, null
  br i1 %.not15, label %22, label %33

22:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  %23 = load ptr, ptr @_ZL13g_FontSampler, align 8, !tbaa !5
  store ptr %23, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %3, i8 0, i64 16, i1 false)
  %24 = getelementptr inbounds i8, ptr %3, i64 4
  store i32 1, ptr %24, align 4, !tbaa !29
  %25 = getelementptr inbounds i8, ptr %3, i64 8
  store i32 1, ptr %25, align 8, !tbaa !32
  %26 = getelementptr inbounds i8, ptr %3, i64 12
  store i32 16, ptr %26, align 4, !tbaa !33
  %27 = getelementptr inbounds i8, ptr %3, i64 16
  store ptr %2, ptr %27, align 16, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %4, i8 0, i64 24, i1 false)
  store i32 32, ptr %4, align 8, !tbaa !35
  %28 = getelementptr inbounds i8, ptr %4, i64 20
  store i32 1, ptr %28, align 4, !tbaa !37
  %29 = getelementptr inbounds i8, ptr %4, i64 24
  store ptr %3, ptr %29, align 8, !tbaa !38
  %30 = load ptr, ptr getelementptr inbounds (i8, ptr @_ZL16g_VulkanInitInfo, i64 16), align 8, !tbaa !25
  %31 = load ptr, ptr getelementptr inbounds (i8, ptr @_ZL16g_VulkanInitInfo, i64 72), align 8, !tbaa !28
  %32 = call i32 @vkCreateDescriptorSetLayout(ptr noundef %30, ptr noundef nonnull %4, ptr noundef %31, ptr noundef nonnull @_ZL21g_DescriptorSetLayout)
  call void @_ZL15check_vk_result8VkResult(i32 noundef %32)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  br label %33

33:                                               ; preds = %22, %20
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %5, i8 0, i64 32, i1 false)
  store i32 34, ptr %5, align 8, !tbaa !39
  %34 = load ptr, ptr getelementptr inbounds (i8, ptr @_ZL16g_VulkanInitInfo, i64 48), align 8, !tbaa !41
  %35 = getelementptr inbounds i8, ptr %5, i64 16
  store ptr %34, ptr %35, align 8, !tbaa !42
  %36 = getelementptr inbounds i8, ptr %5, i64 24
  store i32 1, ptr %36, align 8, !tbaa !43
  %37 = getelementptr inbounds i8, ptr %5, i64 32
  store ptr @_ZL21g_DescriptorSetLayout, ptr %37, align 8, !tbaa !44
  %38 = load ptr, ptr getelementptr inbounds (i8, ptr @_ZL16g_VulkanInitInfo, i64 16), align 8, !tbaa !25
  %39 = call i32 @vkAllocateDescriptorSets(ptr noundef %38, ptr noundef nonnull %5, ptr noundef nonnull @_ZL15g_DescriptorSet)
  call void @_ZL15check_vk_result8VkResult(i32 noundef %39)
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #4
  %40 = load ptr, ptr @_ZL16g_PipelineLayout, align 8, !tbaa !5
  %.not16 = icmp eq ptr %40, null
  br i1 %.not16, label %41, label %52

41:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #4
  store i32 1, ptr %6, align 4, !tbaa !45
  %42 = getelementptr inbounds i8, ptr %6, i64 4
  store i32 0, ptr %42, align 4, !tbaa !47
  %43 = getelementptr inbounds i8, ptr %6, i64 8
  store i32 16, ptr %43, align 4, !tbaa !48
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %44 = load ptr, ptr @_ZL21g_DescriptorSetLayout, align 8, !tbaa !5
  store ptr %44, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %8) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %8, i8 0, i64 40, i1 false)
  store i32 30, ptr %8, align 8, !tbaa !49
  %45 = getelementptr inbounds i8, ptr %8, i64 20
  store i32 1, ptr %45, align 4, !tbaa !51
  %46 = getelementptr inbounds i8, ptr %8, i64 24
  store ptr %7, ptr %46, align 8, !tbaa !52
  %47 = getelementptr inbounds i8, ptr %8, i64 32
  store i32 1, ptr %47, align 8, !tbaa !53
  %48 = getelementptr inbounds i8, ptr %8, i64 40
  store ptr %6, ptr %48, align 8, !tbaa !54
  %49 = load ptr, ptr getelementptr inbounds (i8, ptr @_ZL16g_VulkanInitInfo, i64 16), align 8, !tbaa !25
  %50 = load ptr, ptr getelementptr inbounds (i8, ptr @_ZL16g_VulkanInitInfo, i64 72), align 8, !tbaa !28
  %51 = call i32 @vkCreatePipelineLayout(ptr noundef %49, ptr noundef nonnull %8, ptr noundef %50, ptr noundef nonnull @_ZL16g_PipelineLayout)
  call void @_ZL15check_vk_result8VkResult(i32 noundef %51)
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #4
  br label %52

52:                                               ; preds = %41, %33
  %53 = load ptr, ptr getelementptr inbounds (i8, ptr @_ZL16g_VulkanInitInfo, i64 16), align 8, !tbaa !25
  %54 = load ptr, ptr getelementptr inbounds (i8, ptr @_ZL16g_VulkanInitInfo, i64 72), align 8, !tbaa !28
  %55 = load ptr, ptr getelementptr inbounds (i8, ptr @_ZL16g_VulkanInitInfo, i64 40), align 8, !tbaa !55
  %56 = load ptr, ptr @_ZL12g_RenderPass, align 8, !tbaa !5
  %57 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL16g_VulkanInitInfo, i64 68), align 4, !tbaa !56
  %58 = load i32, ptr @_ZL9g_Subpass, align 4, !tbaa !57
  call void @_ZL31ImGui_ImplVulkan_CreatePipelineP10VkDevice_TPK21VkAllocationCallbacksP17VkPipelineCache_TP14VkRenderPass_T21VkSampleCountFlagBitsPP12VkPipeline_Tj(ptr noundef %53, ptr noundef %54, ptr noundef %55, ptr noundef %56, i32 noundef %57, ptr noundef nonnull @_ZL10g_Pipeline, i32 noundef %58)
  ret i1 true
}

declare i32 @vkCreateSampler(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare i32 @vkCreateDescriptorSetLayout(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare i32 @vkAllocateDescriptorSets(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare i32 @vkCreatePipelineLayout(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { 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 #3 = { "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 = { 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, !11, i64 0}
!10 = !{!"_ZTS19VkSamplerCreateInfo", !11, i64 0, !6, i64 8, !12, i64 16, !13, i64 20, !13, i64 24, !14, i64 28, !15, i64 32, !15, i64 36, !15, i64 40, !16, i64 44, !12, i64 48, !16, i64 52, !12, i64 56, !17, i64 60, !16, i64 64, !16, i64 68, !18, i64 72, !12, i64 76}
!11 = !{!"_ZTS15VkStructureType", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTS8VkFilter", !7, i64 0}
!14 = !{!"_ZTS19VkSamplerMipmapMode", !7, i64 0}
!15 = !{!"_ZTS20VkSamplerAddressMode", !7, i64 0}
!16 = !{!"float", !7, i64 0}
!17 = !{!"_ZTS11VkCompareOp", !7, i64 0}
!18 = !{!"_ZTS13VkBorderColor", !7, i64 0}
!19 = !{!10, !13, i64 20}
!20 = !{!10, !13, i64 24}
!21 = !{!10, !14, i64 28}
!22 = !{!10, !15, i64 36}
!23 = !{!16, !16, i64 0}
!24 = !{!10, !16, i64 52}
!25 = !{!26, !6, i64 16}
!26 = !{!"_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, !12, i64 64, !27, i64 68, !6, i64 72, !6, i64 80}
!27 = !{!"_ZTS21VkSampleCountFlagBits", !7, i64 0}
!28 = !{!26, !6, i64 72}
!29 = !{!30, !31, i64 4}
!30 = !{!"_ZTS28VkDescriptorSetLayoutBinding", !12, i64 0, !31, i64 4, !12, i64 8, !12, i64 12, !6, i64 16}
!31 = !{!"_ZTS16VkDescriptorType", !7, i64 0}
!32 = !{!30, !12, i64 8}
!33 = !{!30, !12, i64 12}
!34 = !{!30, !6, i64 16}
!35 = !{!36, !11, i64 0}
!36 = !{!"_ZTS31VkDescriptorSetLayoutCreateInfo", !11, i64 0, !6, i64 8, !12, i64 16, !12, i64 20, !6, i64 24}
!37 = !{!36, !12, i64 20}
!38 = !{!36, !6, i64 24}
!39 = !{!40, !11, i64 0}
!40 = !{!"_ZTS27VkDescriptorSetAllocateInfo", !11, i64 0, !6, i64 8, !6, i64 16, !12, i64 24, !6, i64 32}
!41 = !{!26, !6, i64 48}
!42 = !{!40, !6, i64 16}
!43 = !{!40, !12, i64 24}
!44 = !{!40, !6, i64 32}
!45 = !{!46, !12, i64 0}
!46 = !{!"_ZTS19VkPushConstantRange", !12, i64 0, !12, i64 4, !12, i64 8}
!47 = !{!46, !12, i64 4}
!48 = !{!46, !12, i64 8}
!49 = !{!50, !11, i64 0}
!50 = !{!"_ZTS26VkPipelineLayoutCreateInfo", !11, i64 0, !6, i64 8, !12, i64 16, !12, i64 20, !6, i64 24, !12, i64 32, !6, i64 40}
!51 = !{!50, !12, i64 20}
!52 = !{!50, !6, i64 24}
!53 = !{!50, !12, i64 32}
!54 = !{!50, !6, i64 40}
!55 = !{!26, !6, i64 40}
!56 = !{!26, !27, i64 68}
!57 = !{!12, !12, i64 0}


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SLPVectorizerPass,SROAPass