; LLVM IR from jrouwe/JoltPhysics :: TestFramework/Renderer/VK/RendererVK.ll (ZN10RendererVK13EndShadowPassEv)

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

%union.VkClearValue = type { %union.VkClearColorValue }
%union.VkClearColorValue = type { [4 x float] }
%struct.VkClearDepthStencilValue = type { float, i32 }
%struct.VkRenderPassBeginInfo = type { i32, ptr, ptr, ptr, %struct.VkRect2D, i32, ptr }
%struct.VkRect2D = type { %struct.VkOffset2D, %struct.VkExtent2D }
%struct.VkOffset2D = type { i32, i32 }
%struct.VkExtent2D = type { i32, i32 }
%"struct.JPH::AssertLastParam" = type { i8 }
%class.RendererVK = type { %class.Renderer, ptr, ptr, ptr, %struct.VkPhysicalDeviceMemoryProperties, ptr, i32, i32, ptr, ptr, ptr, ptr, i8, %"class.JPH::Array", i32, %struct.VkExtent2D, %"class.JPH::Array.1", ptr, ptr, ptr, ptr, ptr, ptr, [2 x ptr], [2 x ptr], ptr, ptr, ptr, ptr, ptr, ptr, %"class.JPH::Array.4", i32, ptr, [2 x ptr], [2 x ptr], [2 x ptr], [2 x ptr], %"class.JPH::Ref", [2 x %"class.std::unique_ptr"], [2 x %"class.std::unique_ptr"], [2 x %"class.std::unique_ptr"], [2 x %"class.JPH::UnorderedMap"], %"class.JPH::UnorderedMap", %"class.JPH::UnorderedMap.9", i32, i32, i64, i64 }
%class.Renderer = type { ptr, ptr, float, i8, [11 x i8], %struct.CameraState, %"class.JPH::Vec3", %class.Frustum, %class.Frustum, i32, %"struct.Renderer::VertexShaderConstantBuffer", %"struct.Renderer::VertexShaderConstantBuffer", %"struct.Renderer::PixelShaderConstantBuffer" }
%struct.CameraState = type <{ %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", float, [12 x i8] }>
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%class.Frustum = type { [5 x %"class.JPH::Plane"] }
%"class.JPH::Plane" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.0 }
%union.anon.0 = type { <4 x float> }
%"struct.Renderer::VertexShaderConstantBuffer" = type { %"class.JPH::Mat44", %"class.JPH::Mat44", %"class.JPH::Mat44", %"class.JPH::Mat44" }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"struct.Renderer::PixelShaderConstantBuffer" = type { %"class.JPH::Vec4", %"class.JPH::Vec4" }
%struct.VkPhysicalDeviceMemoryProperties = type { i32, [32 x %struct.VkMemoryType], i32, [16 x %struct.VkMemoryHeap] }
%struct.VkMemoryType = type { i32, i32 }
%struct.VkMemoryHeap = type { i64, i32 }
%"class.JPH::Array" = type { i64, i64, ptr }
%"class.JPH::Array.1" = type { i64, i64, ptr }
%"class.JPH::Array.4" = type { i64, i64, ptr }
%"class.JPH::Ref" = type { ptr }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.8" }
%"struct.std::_Head_base.8" = type { ptr }
%"class.JPH::UnorderedMap" = type { %"class.JPH::HashTable.base", [4 x i8] }
%"class.JPH::HashTable.base" = type <{ ptr, ptr, i32, i32, i32 }>
%"class.JPH::UnorderedMap.9" = type { %"class.JPH::HashTable.base.11", [4 x i8] }
%"class.JPH::HashTable.base.11" = type <{ ptr, ptr, i32, i32, i32 }>

@.str.12 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [93 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.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: 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) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK3JPH5ArrayIP15VkFramebuffer_TNS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH5ArrayIP15VkFramebuffer_TNS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN10RendererVK16GetCommandBufferEv(ptr noundef nonnull align 16 dereferenceable(1936)) #5 align 2

declare void @vkCmdBeginRenderPass(ptr noundef, ptr noundef, i32 noundef) #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10RendererVK28UpdateViewPortAndScissorRectEjj(ptr noundef nonnull align 16 dereferenceable(1936), i32 noundef, i32 noundef) #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10RendererVK13EndShadowPassEv(ptr noundef nonnull align 16 dereferenceable(1936) %0) unnamed_addr #5 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca [2 x %union.VkClearValue], align 16
  %5 = alloca %union.VkClearColorValue, align 4
  %6 = alloca %struct.VkClearDepthStencilValue, align 4
  %7 = alloca %struct.VkRenderPassBeginInfo, align 8
  %8 = alloca %"struct.JPH::AssertLastParam", align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  %9 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #8
  %10 = call noundef ptr @_ZN10RendererVK16GetCommandBufferEv(ptr noundef nonnull align 16 dereferenceable(1936) %9)
  store ptr %10, ptr %3, align 8, !tbaa !5
  %11 = load ptr, ptr %3, align 8, !tbaa !5
  call void @vkCmdEndRenderPass(ptr noundef %11)
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #8
  store float 0x3FB9168720000000, ptr %5, align 4, !tbaa !9
  %12 = getelementptr inbounds float, ptr %5, i64 1
  store float 0x3FB9168720000000, ptr %12, align 4, !tbaa !9
  %13 = getelementptr inbounds float, ptr %5, i64 2
  store float 0x3FDC189380000000, ptr %13, align 4, !tbaa !9
  %14 = getelementptr inbounds float, ptr %5, i64 3
  store float 1.000000e+00, ptr %14, align 4, !tbaa !9
  %15 = getelementptr inbounds [2 x %union.VkClearValue], ptr %4, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %15, ptr align 4 %5, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %16 = getelementptr inbounds %struct.VkClearDepthStencilValue, ptr %6, i32 0, i32 0
  store float 0.000000e+00, ptr %16, align 4, !tbaa !13
  %17 = getelementptr inbounds %struct.VkClearDepthStencilValue, ptr %6, i32 0, i32 1
  store i32 0, ptr %17, align 4, !tbaa !16
  %18 = getelementptr inbounds [2 x %union.VkClearValue], ptr %4, i64 0, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %18, ptr align 4 %6, i64 8, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.start.p0(i64 64, ptr %7) #8
  call void @llvm.memset.p0.i64(ptr align 8 %7, i8 0, i64 64, i1 false)
  %19 = getelementptr inbounds %struct.VkRenderPassBeginInfo, ptr %7, i32 0, i32 0
  store i32 43, ptr %19, align 8, !tbaa !19
  %20 = getelementptr inbounds %class.RendererVK, ptr %9, i32 0, i32 28
  %21 = load ptr, ptr %20, align 16, !tbaa !25
  %22 = getelementptr inbounds %struct.VkRenderPassBeginInfo, ptr %7, i32 0, i32 2
  store ptr %21, ptr %22, align 8, !tbaa !47
  br label %23

23:                                               ; preds = %1
  %24 = getelementptr inbounds %class.RendererVK, ptr %9, i32 0, i32 32
  %25 = load i32, ptr %24, align 16, !tbaa !48
  %26 = zext i32 %25 to i64
  %27 = getelementptr inbounds %class.RendererVK, ptr %9, i32 0, i32 31
  %28 = call noundef i64 @_ZNK3JPH5ArrayIP15VkFramebuffer_TNS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %27)
  %29 = icmp ult i64 %26, %28
  br i1 %29, label %33, label %30

30:                                               ; preds = %23
  %31 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.12, ptr noundef @.str.13, i32 noundef 895)
  br i1 %31, label %32, label %33

32:                                               ; preds = %30
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #8, !srcloc !49
  br label %33

33:                                               ; preds = %32, %30, %23
  br label %34

34:                                               ; preds = %33
  br label %35

35:                                               ; preds = %34
  %36 = getelementptr inbounds %class.RendererVK, ptr %9, i32 0, i32 31
  %37 = getelementptr inbounds %class.RendererVK, ptr %9, i32 0, i32 32
  %38 = load i32, ptr %37, align 16, !tbaa !48
  %39 = zext i32 %38 to i64
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH5ArrayIP15VkFramebuffer_TNS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %36, i64 noundef %39)
  %41 = load ptr, ptr %40, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.VkRenderPassBeginInfo, ptr %7, i32 0, i32 3
  store ptr %41, ptr %42, align 8, !tbaa !50
  %43 = getelementptr inbounds %class.RendererVK, ptr %9, i32 0, i32 15
  %44 = getelementptr inbounds %struct.VkRenderPassBeginInfo, ptr %7, i32 0, i32 4
  %45 = getelementptr inbounds %struct.VkRect2D, ptr %44, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %45, ptr align 4 %43, i64 8, i1 false), !tbaa.struct !51
  %46 = call noundef i64 @_ZSt4sizeI12VkClearValueLm2EEmRAT0__KT_(ptr noundef nonnull align 4 dereferenceable(32) %4) #8
  %47 = trunc i64 %46 to i32
  %48 = getelementptr inbounds %struct.VkRenderPassBeginInfo, ptr %7, i32 0, i32 5
  store i32 %47, ptr %48, align 8, !tbaa !52
  %49 = getelementptr inbounds [2 x %union.VkClearValue], ptr %4, i64 0, i64 0
  %50 = getelementptr inbounds %struct.VkRenderPassBeginInfo, ptr %7, i32 0, i32 6
  store ptr %49, ptr %50, align 8, !tbaa !53
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  call void @vkCmdBeginRenderPass(ptr noundef %51, ptr noundef %7, i32 noundef 0)
  %52 = getelementptr inbounds %class.RendererVK, ptr %9, i32 0, i32 15
  %53 = getelementptr inbounds %struct.VkExtent2D, ptr %52, i32 0, i32 0
  %54 = load i32, ptr %53, align 4, !tbaa !54
  %55 = getelementptr inbounds %class.RendererVK, ptr %9, i32 0, i32 15
  %56 = getelementptr inbounds %struct.VkExtent2D, ptr %55, i32 0, i32 1
  %57 = load i32, ptr %56, align 4, !tbaa !55
  call void @_ZN10RendererVK28UpdateViewPortAndScissorRectEjj(ptr noundef nonnull align 16 dereferenceable(1936) %9, i32 noundef %54, i32 noundef %57)
  call void @llvm.lifetime.end.p0(i64 64, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  ret void
}

declare void @vkCmdEndRenderPass(ptr noundef) #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZSt4sizeI12VkClearValueLm2EEmRAT0__KT_(ptr noundef nonnull align 4 dereferenceable(32)) #7

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

!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 = !{!"float", !7, i64 0}
!11 = !{i64 0, i64 16, !12}
!12 = !{!7, !7, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTS24VkClearDepthStencilValue", !10, i64 0, !15, i64 4}
!15 = !{!"int", !7, i64 0}
!16 = !{!14, !15, i64 4}
!17 = !{i64 0, i64 4, !9, i64 4, i64 4, !18}
!18 = !{!15, !15, i64 0}
!19 = !{!20, !21, i64 0}
!20 = !{!"_ZTS21VkRenderPassBeginInfo", !21, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !22, i64 32, !15, i64 48, !6, i64 56}
!21 = !{!"_ZTS15VkStructureType", !7, i64 0}
!22 = !{!"_ZTS8VkRect2D", !23, i64 0, !24, i64 8}
!23 = !{!"_ZTS10VkOffset2D", !15, i64 0, !15, i64 4}
!24 = !{!"_ZTS10VkExtent2D", !15, i64 0, !15, i64 4}
!25 = !{!26, !6, i64 1600}
!26 = !{!"_ZTS10RendererVK", !27, i64 0, !6, i64 832, !6, i64 840, !6, i64 848, !36, i64 856, !6, i64 1376, !15, i64 1384, !15, i64 1388, !6, i64 1392, !6, i64 1400, !6, i64 1408, !6, i64 1416, !28, i64 1424, !37, i64 1432, !39, i64 1456, !24, i64 1460, !40, i64 1472, !6, i64 1496, !6, i64 1504, !6, i64 1512, !6, i64 1520, !6, i64 1528, !6, i64 1536, !7, i64 1544, !7, i64 1560, !6, i64 1576, !6, i64 1584, !6, i64 1592, !6, i64 1600, !6, i64 1608, !6, i64 1616, !41, i64 1624, !15, i64 1648, !6, i64 1656, !7, i64 1664, !7, i64 1680, !7, i64 1696, !7, i64 1712, !42, i64 1728, !7, i64 1736, !7, i64 1752, !7, i64 1768, !7, i64 1784, !43, i64 1848, !45, i64 1880, !15, i64 1912, !15, i64 1916, !38, i64 1920, !38, i64 1928}
!27 = !{!"_ZTS8Renderer", !6, i64 8, !10, i64 16, !28, i64 20, !29, i64 32, !30, i64 96, !31, i64 112, !31, i64 192, !15, i64 272, !32, i64 288, !32, i64 544, !34, i64 800}
!28 = !{!"bool", !7, i64 0}
!29 = !{!"_ZTS11CameraState", !30, i64 0, !30, i64 16, !30, i64 32, !10, i64 48}
!30 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!31 = !{!"_ZTS7Frustum", !7, i64 0}
!32 = !{!"_ZTSN8Renderer26VertexShaderConstantBufferE", !33, i64 0, !33, i64 64, !33, i64 128, !33, i64 192}
!33 = !{!"_ZTSN3JPH5Mat44E", !7, i64 0}
!34 = !{!"_ZTSN8Renderer25PixelShaderConstantBufferE", !35, i64 0, !35, i64 16}
!35 = !{!"_ZTSN3JPH4Vec4E", !7, i64 0}
!36 = !{!"_ZTS32VkPhysicalDeviceMemoryProperties", !15, i64 0, !7, i64 4, !15, i64 260, !7, i64 264}
!37 = !{!"_ZTSN3JPH5ArrayIP9VkImage_TNS_12STLAllocatorIS2_EEEE", !38, i64 0, !38, i64 8, !6, i64 16}
!38 = !{!"long", !7, i64 0}
!39 = !{!"_ZTS8VkFormat", !7, i64 0}
!40 = !{!"_ZTSN3JPH5ArrayIP13VkImageView_TNS_12STLAllocatorIS2_EEEE", !38, i64 0, !38, i64 8, !6, i64 16}
!41 = !{!"_ZTSN3JPH5ArrayIP15VkFramebuffer_TNS_12STLAllocatorIS2_EEEE", !38, i64 0, !38, i64 8, !6, i64 16}
!42 = !{!"_ZTSN3JPH3RefI9TextureVKEE", !6, i64 0}
!43 = !{!"_ZTSN3JPH12UnorderedMapIN10RendererVK3KeyENS_5ArrayI8BufferVKNS_12STLAllocatorIS4_EEEENS1_9KeyHasherESt8equal_toIS2_EEE", !44, i64 0}
!44 = !{!"_ZTSN3JPH9HashTableIN10RendererVK3KeyESt4pairIS2_NS_5ArrayI8BufferVKNS_12STLAllocatorIS5_EEEEENS_18UnorderedMapDetailIS2_S8_EENS1_9KeyHasherESt8equal_toIS2_EEE", !6, i64 0, !6, i64 8, !15, i64 16, !15, i64 20, !15, i64 24}
!45 = !{!"_ZTSN3JPH12UnorderedMapIN10RendererVK3KeyENS_5ArrayINS1_6MemoryENS_12STLAllocatorIS4_EEEENS1_9KeyHasherESt8equal_toIS2_EEE", !46, i64 0}
!46 = !{!"_ZTSN3JPH9HashTableIN10RendererVK3KeyESt4pairIS2_NS_5ArrayINS1_6MemoryENS_12STLAllocatorIS5_EEEEENS_18UnorderedMapDetailIS2_S8_EENS1_9KeyHasherESt8equal_toIS2_EEE", !6, i64 0, !6, i64 8, !15, i64 16, !15, i64 20, !15, i64 24}
!47 = !{!20, !6, i64 16}
!48 = !{!26, !15, i64 1648}
!49 = !{i64 2158959542}
!50 = !{!20, !6, i64 24}
!51 = !{i64 0, i64 4, !18, i64 4, i64 4, !18}
!52 = !{!20, !15, i64 48}
!53 = !{!20, !6, i64 56}
!54 = !{!26, !15, i64 1460}
!55 = !{!26, !15, i64 1464}


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

%union.VkClearValue = type { %union.VkClearColorValue }
%union.VkClearColorValue = type { [4 x float] }
%struct.VkRenderPassBeginInfo = type { i32, ptr, ptr, ptr, %struct.VkRect2D, i32, ptr }
%struct.VkRect2D = type { %struct.VkOffset2D, %struct.VkExtent2D }
%struct.VkOffset2D = type { i32, i32 }
%struct.VkExtent2D = type { i32, i32 }

@.str.12 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [93 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK3JPH5ArrayIP15VkFramebuffer_TNS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH5ArrayIP15VkFramebuffer_TNS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN10RendererVK16GetCommandBufferEv(ptr noundef nonnull align 16 dereferenceable(1936)) local_unnamed_addr #4 align 2

declare void @vkCmdBeginRenderPass(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10RendererVK28UpdateViewPortAndScissorRectEjj(ptr noundef nonnull align 16 dereferenceable(1936), i32 noundef, i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10RendererVK13EndShadowPassEv(ptr noundef nonnull align 16 dereferenceable(1936) %0) unnamed_addr #4 align 2 {
  %2 = alloca [2 x %union.VkClearValue], align 16
  %3 = alloca %struct.VkRenderPassBeginInfo, align 8
  %4 = tail call noundef ptr @_ZN10RendererVK16GetCommandBufferEv(ptr noundef nonnull align 16 dereferenceable(1936) %0)
  tail call void @vkCmdEndRenderPass(ptr noundef %4)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #7
  store <4 x float> <float 0x3FB9168720000000, float 0x3FB9168720000000, float 0x3FDC189380000000, float 1.000000e+00>, ptr %2, align 16
  %5 = getelementptr inbounds i8, ptr %2, i64 16
  store float 0.000000e+00, ptr %5, align 16, !tbaa !5
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 20
  store i32 0, ptr %.sroa.4.0..sroa_idx, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %3) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %3, i8 0, i64 56, i1 false)
  store i32 43, ptr %3, align 8, !tbaa !11
  %6 = getelementptr inbounds i8, ptr %0, i64 1600
  %7 = load ptr, ptr %6, align 16, !tbaa !18
  %8 = getelementptr inbounds i8, ptr %3, i64 16
  store ptr %7, ptr %8, align 8, !tbaa !40
  %9 = getelementptr inbounds i8, ptr %0, i64 1648
  %10 = load i32, ptr %9, align 16, !tbaa !41
  %11 = zext i32 %10 to i64
  %12 = getelementptr inbounds i8, ptr %0, i64 1624
  %13 = tail call noundef i64 @_ZNK3JPH5ArrayIP15VkFramebuffer_TNS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  %14 = icmp ugt i64 %13, %11
  br i1 %14, label %18, label %15

15:                                               ; preds = %1
  %16 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.13, i32 noundef 895)
  br i1 %16, label %17, label %18

17:                                               ; preds = %15
  tail call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #7, !srcloc !42
  br label %18

18:                                               ; preds = %17, %15, %1
  %19 = load i32, ptr %9, align 16, !tbaa !41
  %20 = zext i32 %19 to i64
  %21 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH5ArrayIP15VkFramebuffer_TNS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %20)
  %22 = load ptr, ptr %21, align 8, !tbaa !43
  %23 = getelementptr inbounds i8, ptr %3, i64 24
  store ptr %22, ptr %23, align 8, !tbaa !44
  %24 = getelementptr inbounds i8, ptr %0, i64 1460
  %25 = getelementptr inbounds i8, ptr %3, i64 40
  %26 = load i64, ptr %24, align 4
  store i64 %26, ptr %25, align 8
  %27 = call noundef i64 @_ZSt4sizeI12VkClearValueLm2EEmRAT0__KT_(ptr noundef nonnull align 4 dereferenceable(32) %2) #7
  %28 = trunc i64 %27 to i32
  %29 = getelementptr inbounds i8, ptr %3, i64 48
  store i32 %28, ptr %29, align 8, !tbaa !45
  %30 = getelementptr inbounds i8, ptr %3, i64 56
  store ptr %2, ptr %30, align 8, !tbaa !46
  call void @vkCmdBeginRenderPass(ptr noundef %4, ptr noundef nonnull %3, i32 noundef 0)
  %31 = load i32, ptr %24, align 4, !tbaa !47
  %32 = getelementptr inbounds i8, ptr %0, i64 1464
  %33 = load i32, ptr %32, align 8, !tbaa !48
  call void @_ZN10RendererVK28UpdateViewPortAndScissorRectEjj(ptr noundef nonnull align 16 dereferenceable(1936) %0, i32 noundef %31, i32 noundef %33)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  ret void
}

declare void @vkCmdEndRenderPass(ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZSt4sizeI12VkClearValueLm2EEmRAT0__KT_(ptr noundef nonnull align 4 dereferenceable(32)) local_unnamed_addr #6

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { 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 #3 = { inlinehint 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress 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 = { 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTS21VkRenderPassBeginInfo", !13, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !15, i64 32, !10, i64 48, !14, i64 56}
!13 = !{!"_ZTS15VkStructureType", !7, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!"_ZTS8VkRect2D", !16, i64 0, !17, i64 8}
!16 = !{!"_ZTS10VkOffset2D", !10, i64 0, !10, i64 4}
!17 = !{!"_ZTS10VkExtent2D", !10, i64 0, !10, i64 4}
!18 = !{!19, !14, i64 1600}
!19 = !{!"_ZTS10RendererVK", !20, i64 0, !14, i64 832, !14, i64 840, !14, i64 848, !29, i64 856, !14, i64 1376, !10, i64 1384, !10, i64 1388, !14, i64 1392, !14, i64 1400, !14, i64 1408, !14, i64 1416, !21, i64 1424, !30, i64 1432, !32, i64 1456, !17, i64 1460, !33, i64 1472, !14, i64 1496, !14, i64 1504, !14, i64 1512, !14, i64 1520, !14, i64 1528, !14, i64 1536, !7, i64 1544, !7, i64 1560, !14, i64 1576, !14, i64 1584, !14, i64 1592, !14, i64 1600, !14, i64 1608, !14, i64 1616, !34, i64 1624, !10, i64 1648, !14, i64 1656, !7, i64 1664, !7, i64 1680, !7, i64 1696, !7, i64 1712, !35, i64 1728, !7, i64 1736, !7, i64 1752, !7, i64 1768, !7, i64 1784, !36, i64 1848, !38, i64 1880, !10, i64 1912, !10, i64 1916, !31, i64 1920, !31, i64 1928}
!20 = !{!"_ZTS8Renderer", !14, i64 8, !6, i64 16, !21, i64 20, !22, i64 32, !23, i64 96, !24, i64 112, !24, i64 192, !10, i64 272, !25, i64 288, !25, i64 544, !27, i64 800}
!21 = !{!"bool", !7, i64 0}
!22 = !{!"_ZTS11CameraState", !23, i64 0, !23, i64 16, !23, i64 32, !6, i64 48}
!23 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!24 = !{!"_ZTS7Frustum", !7, i64 0}
!25 = !{!"_ZTSN8Renderer26VertexShaderConstantBufferE", !26, i64 0, !26, i64 64, !26, i64 128, !26, i64 192}
!26 = !{!"_ZTSN3JPH5Mat44E", !7, i64 0}
!27 = !{!"_ZTSN8Renderer25PixelShaderConstantBufferE", !28, i64 0, !28, i64 16}
!28 = !{!"_ZTSN3JPH4Vec4E", !7, i64 0}
!29 = !{!"_ZTS32VkPhysicalDeviceMemoryProperties", !10, i64 0, !7, i64 4, !10, i64 260, !7, i64 264}
!30 = !{!"_ZTSN3JPH5ArrayIP9VkImage_TNS_12STLAllocatorIS2_EEEE", !31, i64 0, !31, i64 8, !14, i64 16}
!31 = !{!"long", !7, i64 0}
!32 = !{!"_ZTS8VkFormat", !7, i64 0}
!33 = !{!"_ZTSN3JPH5ArrayIP13VkImageView_TNS_12STLAllocatorIS2_EEEE", !31, i64 0, !31, i64 8, !14, i64 16}
!34 = !{!"_ZTSN3JPH5ArrayIP15VkFramebuffer_TNS_12STLAllocatorIS2_EEEE", !31, i64 0, !31, i64 8, !14, i64 16}
!35 = !{!"_ZTSN3JPH3RefI9TextureVKEE", !14, i64 0}
!36 = !{!"_ZTSN3JPH12UnorderedMapIN10RendererVK3KeyENS_5ArrayI8BufferVKNS_12STLAllocatorIS4_EEEENS1_9KeyHasherESt8equal_toIS2_EEE", !37, i64 0}
!37 = !{!"_ZTSN3JPH9HashTableIN10RendererVK3KeyESt4pairIS2_NS_5ArrayI8BufferVKNS_12STLAllocatorIS5_EEEEENS_18UnorderedMapDetailIS2_S8_EENS1_9KeyHasherESt8equal_toIS2_EEE", !14, i64 0, !14, i64 8, !10, i64 16, !10, i64 20, !10, i64 24}
!38 = !{!"_ZTSN3JPH12UnorderedMapIN10RendererVK3KeyENS_5ArrayINS1_6MemoryENS_12STLAllocatorIS4_EEEENS1_9KeyHasherESt8equal_toIS2_EEE", !39, i64 0}
!39 = !{!"_ZTSN3JPH9HashTableIN10RendererVK3KeyESt4pairIS2_NS_5ArrayINS1_6MemoryENS_12STLAllocatorIS5_EEEEENS_18UnorderedMapDetailIS2_S8_EENS1_9KeyHasherESt8equal_toIS2_EEE", !14, i64 0, !14, i64 8, !10, i64 16, !10, i64 20, !10, i64 24}
!40 = !{!12, !14, i64 16}
!41 = !{!19, !10, i64 1648}
!42 = !{i64 2158959542}
!43 = !{!14, !14, i64 0}
!44 = !{!12, !14, i64 24}
!45 = !{!12, !10, i64 48}
!46 = !{!12, !14, i64 56}
!47 = !{!19, !10, i64 1460}
!48 = !{!19, !10, i64 1464}


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