; LLVM IR from Razakhel/RaZ :: src/RaZ/Render/RenderPass.ll (ZNK3Raz10RenderPass7isValidEv)

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

%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.62" = type { ptr }
%class.anon = type { ptr }
%"class.Raz::RenderPass" = type <{ %"class.Raz::GraphNode", i8, [7 x i8], %"class.std::__cxx11::basic_string", %"class.Raz::RenderShaderProgram", %"class.Raz::Framebuffer", %"class.Raz::RenderTimer", [4 x i8] }>
%"class.Raz::GraphNode" = type { ptr, %"class.std::vector", %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Raz::RenderPass *, std::allocator<Raz::RenderPass *>>::_Vector_impl" }
%"struct.std::_Vector_base<Raz::RenderPass *, std::allocator<Raz::RenderPass *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Raz::RenderPass *, std::allocator<Raz::RenderPass *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Raz::RenderPass *, std::allocator<Raz::RenderPass *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.Raz::RenderShaderProgram" = type { %"class.Raz::ShaderProgram", %"class.Raz::VertexShader", %"class.std::optional", %"class.std::optional.33", %"class.std::optional.43", %"class.Raz::FragmentShader" }
%"class.Raz::ShaderProgram" = type { ptr, %"class.Raz::OwnerValue", %"class.std::unordered_map", %"class.std::vector.21", %"class.std::vector.26" }
%"class.Raz::OwnerValue" = type { i32 }
%"class.std::unordered_map" = type { %"class.std::_Hashtable.8" }
%"class.std::_Hashtable.8" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::vector.21" = type { %"struct.std::_Vector_base.22" }
%"struct.std::_Vector_base.22" = type { %"struct.std::_Vector_base<std::pair<std::shared_ptr<Raz::Texture>, std::__cxx11::basic_string<char>>, std::allocator<std::pair<std::shared_ptr<Raz::Texture>, std::__cxx11::basic_string<char>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<std::shared_ptr<Raz::Texture>, std::__cxx11::basic_string<char>>, std::allocator<std::pair<std::shared_ptr<Raz::Texture>, std::__cxx11::basic_string<char>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<std::shared_ptr<Raz::Texture>, std::__cxx11::basic_string<char>>, std::allocator<std::pair<std::shared_ptr<Raz::Texture>, std::__cxx11::basic_string<char>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<std::shared_ptr<Raz::Texture>, std::__cxx11::basic_string<char>>, std::allocator<std::pair<std::shared_ptr<Raz::Texture>, std::__cxx11::basic_string<char>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.26" = type { %"struct.std::_Vector_base.27" }
%"struct.std::_Vector_base.27" = type { %"struct.std::_Vector_base<std::pair<std::shared_ptr<Raz::Texture>, Raz::ShaderProgram::ImageTextureAttachment>, std::allocator<std::pair<std::shared_ptr<Raz::Texture>, Raz::ShaderProgram::ImageTextureAttachment>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<std::shared_ptr<Raz::Texture>, Raz::ShaderProgram::ImageTextureAttachment>, std::allocator<std::pair<std::shared_ptr<Raz::Texture>, Raz::ShaderProgram::ImageTextureAttachment>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<std::shared_ptr<Raz::Texture>, Raz::ShaderProgram::ImageTextureAttachment>, std::allocator<std::pair<std::shared_ptr<Raz::Texture>, Raz::ShaderProgram::ImageTextureAttachment>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<std::shared_ptr<Raz::Texture>, Raz::ShaderProgram::ImageTextureAttachment>, std::allocator<std::pair<std::shared_ptr<Raz::Texture>, Raz::ShaderProgram::ImageTextureAttachment>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Raz::VertexShader" = type { %"class.Raz::Shader" }
%"class.Raz::Shader" = type { ptr, %"class.Raz::OwnerValue", %"class.Raz::FilePath" }
%"class.Raz::FilePath" = type { %"class.std::__cxx11::basic_string" }
%"class.std::optional" = type { %"struct.std::_Optional_base" }
%"struct.std::_Optional_base" = type { %"struct.std::_Optional_payload" }
%"struct.std::_Optional_payload" = type { %"struct.std::_Optional_payload.base", [7 x i8] }
%"struct.std::_Optional_payload.base" = type { %"struct.std::_Optional_payload_base.base" }
%"struct.std::_Optional_payload_base.base" = type <{ %"union.std::_Optional_payload_base<Raz::TessellationControlShader>::_Storage", i8 }>
%"union.std::_Optional_payload_base<Raz::TessellationControlShader>::_Storage" = type { %"class.Raz::TessellationControlShader" }
%"class.Raz::TessellationControlShader" = type { %"class.Raz::Shader" }
%"class.std::optional.33" = type { %"struct.std::_Optional_base.34" }
%"struct.std::_Optional_base.34" = type { %"struct.std::_Optional_payload.36" }
%"struct.std::_Optional_payload.36" = type { %"struct.std::_Optional_payload.base.40", [7 x i8] }
%"struct.std::_Optional_payload.base.40" = type { %"struct.std::_Optional_payload_base.base.39" }
%"struct.std::_Optional_payload_base.base.39" = type <{ %"union.std::_Optional_payload_base<Raz::TessellationEvaluationShader>::_Storage", i8 }>
%"union.std::_Optional_payload_base<Raz::TessellationEvaluationShader>::_Storage" = type { %"class.Raz::TessellationEvaluationShader" }
%"class.Raz::TessellationEvaluationShader" = type { %"class.Raz::Shader" }
%"class.std::optional.43" = type { %"struct.std::_Optional_base.44" }
%"struct.std::_Optional_base.44" = type { %"struct.std::_Optional_payload.46" }
%"struct.std::_Optional_payload.46" = type { %"struct.std::_Optional_payload.base.50", [7 x i8] }
%"struct.std::_Optional_payload.base.50" = type { %"struct.std::_Optional_payload_base.base.49" }
%"struct.std::_Optional_payload_base.base.49" = type <{ %"union.std::_Optional_payload_base<Raz::GeometryShader>::_Storage", i8 }>
%"union.std::_Optional_payload_base<Raz::GeometryShader>::_Storage" = type { %"class.Raz::GeometryShader" }
%"class.Raz::GeometryShader" = type { %"class.Raz::Shader" }
%"class.Raz::FragmentShader" = type { %"class.Raz::Shader" }
%"class.Raz::Framebuffer" = type { %"class.Raz::OwnerValue", %"class.std::shared_ptr", %"class.std::vector.53" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::vector.53" = type { %"struct.std::_Vector_base.54" }
%"struct.std::_Vector_base.54" = type { %"struct.std::_Vector_base<std::pair<std::shared_ptr<Raz::Texture2D>, unsigned int>, std::allocator<std::pair<std::shared_ptr<Raz::Texture2D>, unsigned int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<std::shared_ptr<Raz::Texture2D>, unsigned int>, std::allocator<std::pair<std::shared_ptr<Raz::Texture2D>, unsigned int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<std::shared_ptr<Raz::Texture2D>, unsigned int>, std::allocator<std::pair<std::shared_ptr<Raz::Texture2D>, unsigned int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<std::shared_ptr<Raz::Texture2D>, unsigned int>, std::allocator<std::pair<std::shared_ptr<Raz::Texture2D>, unsigned int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Raz::RenderTimer" = type { %"class.Raz::OwnerValue.58" }
%"class.Raz::OwnerValue.58" = type { i32 }

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK3Raz10RenderPass7isValidEv(ptr noundef nonnull align 8 dereferenceable(536) %0) #0 align 2 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator.62", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator.62", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator.62", align 8
  %15 = alloca %class.anon, align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator.62", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %17 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %18 = getelementptr inbounds %"class.Raz::RenderPass", ptr %17, i32 0, i32 5
  %19 = getelementptr inbounds %"class.Raz::Framebuffer", ptr %18, i32 0, i32 2
  store ptr %19, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %20 = getelementptr inbounds %"class.Raz::RenderPass", ptr %17, i32 0, i32 4
  %21 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3Raz13ShaderProgram11getTexturesB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(120) %20) #5
  store ptr %21, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = call ptr @_ZNKSt6vectorISt4pairISt10shared_ptrIN3Raz7TextureEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESaISB_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %22) #5
  %24 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  store ptr %23, ptr %24, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = call ptr @_ZNKSt6vectorISt4pairISt10shared_ptrIN3Raz7TextureEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESaISB_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #5
  %27 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %7, i32 0, i32 0
  store ptr %26, ptr %27, align 8
  br label %28

28:                                               ; preds = %81, %1
  %29 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt4pairISt10shared_ptrIN3Raz7TextureEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorISC_SaISC_EEEEbRKNS_17__normal_iteratorIT_T0_EESN_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  br i1 %29, label %31, label %30

30:                                               ; preds = %28
  store i32 2, ptr %8, align 4
  br label %83

31:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %32 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKSt4pairISt10shared_ptrIN3Raz7TextureEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorISC_SaISC_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  store ptr %32, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZSt3getILm0ESt10shared_ptrIN3Raz7TextureEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKSE_(ptr noundef nonnull align 8 dereferenceable(48) %33) #5
  store ptr %34, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  %36 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZSt3getILm1ESt10shared_ptrIN3Raz7TextureEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKSE_(ptr noundef nonnull align 8 dereferenceable(48) %35) #5
  store ptr %36, ptr %11, align 8, !tbaa !5
  %37 = load ptr, ptr %10, align 8, !tbaa !5
  %38 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Raz7TextureELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %37) #5
  %39 = call noundef i32 @_ZNK3Raz7Texture13getColorspaceEv(ptr noundef nonnull align 8 dereferenceable(24) %38)
  %40 = icmp eq i32 %39, 6
  br i1 %40, label %41, label %52

41:                                               ; preds = %31
  %42 = getelementptr inbounds %"class.Raz::RenderPass", ptr %17, i32 0, i32 5
  %43 = call noundef zeroext i1 @_ZNK3Raz11Framebuffer14hasDepthBufferEv(ptr noundef nonnull align 8 dereferenceable(48) %42) #5
  br i1 %43, label %44, label %52

44:                                               ; preds = %41
  %45 = load ptr, ptr %10, align 8, !tbaa !5
  %46 = call noundef ptr @_ZNKSt12__shared_ptrIN3Raz7TextureELN9__gnu_cxx12_Lock_policyE2EE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %45) #5
  %47 = getelementptr inbounds %"class.Raz::RenderPass", ptr %17, i32 0, i32 5
  %48 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3Raz11Framebuffer14getDepthBufferEv(ptr noundef nonnull align 8 dereferenceable(48) %47) #5
  %49 = icmp eq ptr %46, %48
  br i1 %49, label %50, label %51

50:                                               ; preds = %44
  store i1 false, ptr %2, align 1
  store i32 1, ptr %8, align 4
  br label %78

51:                                               ; preds = %44
  br label %52

52:                                               ; preds = %51, %41, %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = call ptr @_ZNKSt6vectorISt4pairISt10shared_ptrIN3Raz9Texture2DEEjESaIS5_EE6cbeginEv(ptr noundef nonnull align 8 dereferenceable(24) %53) #5
  %55 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.62", ptr %13, i32 0, i32 0
  store ptr %54, ptr %55, align 8
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = call ptr @_ZNKSt6vectorISt4pairISt10shared_ptrIN3Raz9Texture2DEEjESaIS5_EE4cendEv(ptr noundef nonnull align 8 dereferenceable(24) %56) #5
  %58 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.62", ptr %14, i32 0, i32 0
  store ptr %57, ptr %58, align 8
  %59 = getelementptr inbounds %class.anon, ptr %15, i32 0, i32 0
  %60 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %60, ptr %59, align 8, !tbaa !5
  %61 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.62", ptr %13, i32 0, i32 0
  %62 = load ptr, ptr %61, align 8
  %63 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.62", ptr %14, i32 0, i32 0
  %64 = load ptr, ptr %63, align 8
  %65 = getelementptr inbounds %class.anon, ptr %15, i32 0, i32 0
  %66 = load ptr, ptr %65, align 8
  %67 = call ptr @"_ZSt7find_ifIN9__gnu_cxx17__normal_iteratorIPKSt4pairISt10shared_ptrIN3Raz9Texture2DEEjESt6vectorIS7_SaIS7_EEEEZNKS4_10RenderPass7isValidEvE3$_0ET_SG_SG_T0_"(ptr %62, ptr %64, ptr %66)
  %68 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.62", ptr %12, i32 0, i32 0
  store ptr %67, ptr %68, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = call ptr @_ZNKSt6vectorISt4pairISt10shared_ptrIN3Raz9Texture2DEEjESaIS5_EE4cendEv(ptr noundef nonnull align 8 dereferenceable(24) %69) #5
  %71 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.62", ptr %16, i32 0, i32 0
  store ptr %70, ptr %71, align 8
  %72 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt4pairISt10shared_ptrIN3Raz9Texture2DEEjESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br i1 %72, label %73, label %74

73:                                               ; preds = %52
  store i1 false, ptr %2, align 1
  store i32 1, ptr %8, align 4
  br label %75

74:                                               ; preds = %52
  store i32 0, ptr %8, align 4
  br label %75

75:                                               ; preds = %74, %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  %76 = load i32, ptr %8, align 4
  switch i32 %76, label %78 [
    i32 0, label %77
  ]

77:                                               ; preds = %75
  store i32 0, ptr %8, align 4
  br label %78

78:                                               ; preds = %77, %75, %50
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  %79 = load i32, ptr %8, align 4
  switch i32 %79, label %83 [
    i32 0, label %80
  ]

80:                                               ; preds = %78
  br label %81

81:                                               ; preds = %80
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKSt4pairISt10shared_ptrIN3Raz7TextureEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorISC_SaISC_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br label %28

83:                                               ; preds = %78, %30
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  %84 = load i32, ptr %8, align 4
  switch i32 %84, label %86 [
    i32 2, label %85
  ]

85:                                               ; preds = %83
  store i1 true, ptr %2, align 1
  store i32 1, ptr %8, align 4
  br label %86

86:                                               ; preds = %85, %83
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  %87 = load i1, ptr %2, align 1
  ret i1 %87
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3Raz13ShaderProgram11getTexturesB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(120)) #2 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt4pairISt10shared_ptrIN3Raz7TextureEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorISC_SaISC_EEEEbRKNS_17__normal_iteratorIT_T0_EESN_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKSt4pairISt10shared_ptrIN3Raz7TextureEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorISC_SaISC_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZSt3getILm0ESt10shared_ptrIN3Raz7TextureEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKSE_(ptr noundef nonnull align 8 dereferenceable(48)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZSt3getILm1ESt10shared_ptrIN3Raz7TextureEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKSE_(ptr noundef nonnull align 8 dereferenceable(48)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessIN3Raz7TextureELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3Raz7Texture13getColorspaceEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3Raz11Framebuffer14hasDepthBufferEv(ptr noundef nonnull align 8 dereferenceable(48)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt12__shared_ptrIN3Raz7TextureELN9__gnu_cxx12_Lock_policyE2EE3getEv(ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3Raz11Framebuffer14getDepthBufferEv(ptr noundef nonnull align 8 dereferenceable(48)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden ptr @"_ZSt7find_ifIN9__gnu_cxx17__normal_iteratorIPKSt4pairISt10shared_ptrIN3Raz9Texture2DEEjESt6vectorIS7_SaIS7_EEEEZNKS4_10RenderPass7isValidEvE3$_0ET_SG_SG_T0_"(ptr, ptr, ptr) #4

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt4pairISt10shared_ptrIN3Raz9Texture2DEEjESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKSt4pairISt10shared_ptrIN3Raz7TextureEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorISC_SaISC_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 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 = { 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 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 = { 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"}


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

%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.62" = type { ptr }

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK3Raz10RenderPass7isValidEv(ptr noundef nonnull align 8 dereferenceable(536) %0) local_unnamed_addr #0 align 2 {
  %2 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator.62", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.62", align 8
  %6 = getelementptr inbounds i8, ptr %0, i64 480
  %7 = getelementptr inbounds i8, ptr %0, i64 504
  %8 = getelementptr inbounds i8, ptr %0, i64 96
  %9 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3Raz13ShaderProgram11getTexturesB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(120) %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  %10 = tail call ptr @_ZNKSt6vectorISt4pairISt10shared_ptrIN3Raz7TextureEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESaISB_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  store ptr %10, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %11 = tail call ptr @_ZNKSt6vectorISt4pairISt10shared_ptrIN3Raz7TextureEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESaISB_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  store ptr %11, ptr %3, align 8
  %12 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt4pairISt10shared_ptrIN3Raz7TextureEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorISC_SaISC_EEEEbRKNS_17__normal_iteratorIT_T0_EESN_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  br i1 %12, label %.lr.ph, label %.critedge

.lr.ph:                                           ; preds = %1, %31
  %13 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKSt4pairISt10shared_ptrIN3Raz7TextureEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorISC_SaISC_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZSt3getILm0ESt10shared_ptrIN3Raz7TextureEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKSE_(ptr noundef nonnull align 8 dereferenceable(48) %13) #5
  %15 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZSt3getILm1ESt10shared_ptrIN3Raz7TextureEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKSE_(ptr noundef nonnull align 8 dereferenceable(48) %13) #5
  %16 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Raz7TextureELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  %17 = call noundef i32 @_ZNK3Raz7Texture13getColorspaceEv(ptr noundef nonnull align 8 dereferenceable(24) %16)
  %18 = icmp eq i32 %17, 6
  br i1 %18, label %19, label %25

19:                                               ; preds = %.lr.ph
  %20 = call noundef zeroext i1 @_ZNK3Raz11Framebuffer14hasDepthBufferEv(ptr noundef nonnull align 8 dereferenceable(48) %6) #5
  br i1 %20, label %21, label %25

21:                                               ; preds = %19
  %22 = call noundef ptr @_ZNKSt12__shared_ptrIN3Raz7TextureELN9__gnu_cxx12_Lock_policyE2EE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %14) #5
  %23 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3Raz11Framebuffer14getDepthBufferEv(ptr noundef nonnull align 8 dereferenceable(48) %6) #5
  %24 = icmp eq ptr %22, %23
  br i1 %24, label %select.unfold, label %25

25:                                               ; preds = %21, %19, %.lr.ph
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %26 = call ptr @_ZNKSt6vectorISt4pairISt10shared_ptrIN3Raz9Texture2DEEjESaIS5_EE6cbeginEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  %27 = call ptr @_ZNKSt6vectorISt4pairISt10shared_ptrIN3Raz9Texture2DEEjESaIS5_EE4cendEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  %28 = call ptr @"_ZSt7find_ifIN9__gnu_cxx17__normal_iteratorIPKSt4pairISt10shared_ptrIN3Raz9Texture2DEEjESt6vectorIS7_SaIS7_EEEEZNKS4_10RenderPass7isValidEvE3$_0ET_SG_SG_T0_"(ptr %26, ptr %27, ptr nonnull %14)
  store ptr %28, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %29 = call ptr @_ZNKSt6vectorISt4pairISt10shared_ptrIN3Raz9Texture2DEEjESaIS5_EE4cendEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  store ptr %29, ptr %5, align 8
  %30 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt4pairISt10shared_ptrIN3Raz9Texture2DEEjESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br i1 %30, label %select.unfold, label %31

31:                                               ; preds = %25
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKSt4pairISt10shared_ptrIN3Raz7TextureEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorISC_SaISC_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  %33 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt4pairISt10shared_ptrIN3Raz7TextureEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorISC_SaISC_EEEEbRKNS_17__normal_iteratorIT_T0_EESN_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  br i1 %33, label %.lr.ph, label %.critedge

select.unfold:                                    ; preds = %25, %21
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  br label %34

.critedge:                                        ; preds = %31, %1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  br label %34

34:                                               ; preds = %select.unfold, %.critedge
  %.4 = phi i1 [ false, %select.unfold ], [ true, %.critedge ]
  ret i1 %.4
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3Raz13ShaderProgram11getTexturesB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt6vectorISt4pairISt10shared_ptrIN3Raz7TextureEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESaISB_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt6vectorISt4pairISt10shared_ptrIN3Raz7TextureEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESaISB_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt4pairISt10shared_ptrIN3Raz7TextureEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorISC_SaISC_EEEEbRKNS_17__normal_iteratorIT_T0_EESN_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKSt4pairISt10shared_ptrIN3Raz7TextureEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorISC_SaISC_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZSt3getILm0ESt10shared_ptrIN3Raz7TextureEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKSE_(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZSt3getILm1ESt10shared_ptrIN3Raz7TextureEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKSE_(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessIN3Raz7TextureELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3Raz7Texture13getColorspaceEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3Raz11Framebuffer14hasDepthBufferEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt12__shared_ptrIN3Raz7TextureELN9__gnu_cxx12_Lock_policyE2EE3getEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3Raz11Framebuffer14getDepthBufferEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden ptr @"_ZSt7find_ifIN9__gnu_cxx17__normal_iteratorIPKSt4pairISt10shared_ptrIN3Raz9Texture2DEEjESt6vectorIS7_SaIS7_EEEEZNKS4_10RenderPass7isValidEvE3$_0ET_SG_SG_T0_"(ptr, ptr, ptr) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt6vectorISt4pairISt10shared_ptrIN3Raz9Texture2DEEjESaIS5_EE6cbeginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt6vectorISt4pairISt10shared_ptrIN3Raz9Texture2DEEjESaIS5_EE4cendEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt4pairISt10shared_ptrIN3Raz9Texture2DEEjESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) 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) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKSt4pairISt10shared_ptrIN3Raz7TextureEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorISC_SaISC_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 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 = { 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 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 = { 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)"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass