; LLVM IR from Razakhel/RaZ :: src/RaZ/Render/RenderSystem.ll (ZNK3Raz12RenderSystem13updateShadersEv)

; 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.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.std::allocator.21" = type { i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.222" = type { ptr }
%"class.Raz::RenderSystem" = type { %"class.Raz::System", i32, i32, %"class.std::unique_ptr", ptr, %"class.Raz::RenderGraph", %"class.Raz::UniformBuffer", %"class.Raz::UniformBuffer", %"class.Raz::UniformBuffer", %"class.Raz::UniformBuffer", %"class.std::optional.100", ptr }
%"class.Raz::System" = type { ptr, %"class.std::vector", %"class.Raz::Bitset" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Raz::Entity *, std::allocator<Raz::Entity *>>::_Vector_impl" }
%"struct.std::_Vector_base<Raz::Entity *, std::allocator<Raz::Entity *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Raz::Entity *, std::allocator<Raz::Entity *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Raz::Entity *, std::allocator<Raz::Entity *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Raz::Bitset" = type { %"class.std::vector.5" }
%"class.std::vector.5" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"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.10" }
%"struct.std::_Head_base.10" = type { ptr }
%"class.Raz::RenderGraph" = type { %"class.Raz::Graph", %"class.Raz::RenderPass", %"class.std::vector.75", %"class.std::unordered_set.80", ptr }
%"class.Raz::Graph" = type { %"class.std::vector.11" }
%"class.std::vector.11" = type { %"struct.std::_Vector_base.12" }
%"struct.std::_Vector_base.12" = type { %"struct.std::_Vector_base<std::unique_ptr<Raz::RenderPass>, std::allocator<std::unique_ptr<Raz::RenderPass>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<Raz::RenderPass>, std::allocator<std::unique_ptr<Raz::RenderPass>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<Raz::RenderPass>, std::allocator<std::unique_ptr<Raz::RenderPass>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<Raz::RenderPass>, std::allocator<std::unique_ptr<Raz::RenderPass>>>::_Vector_impl_data" = type { ptr, ptr, 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.16", %"class.std::vector.16" }
%"class.std::vector.16" = type { %"struct.std::_Vector_base.17" }
%"struct.std::_Vector_base.17" = 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.Raz::RenderShaderProgram" = type { %"class.Raz::ShaderProgram", %"class.Raz::VertexShader", %"class.std::optional", %"class.std::optional.49", %"class.std::optional.59", %"class.Raz::FragmentShader" }
%"class.Raz::ShaderProgram" = type { ptr, %"class.Raz::OwnerValue", %"class.std::unordered_map", %"class.std::vector.37", %"class.std::vector.42" }
%"class.Raz::OwnerValue" = type { i32 }
%"class.std::unordered_map" = type { %"class.std::_Hashtable.24" }
%"class.std::_Hashtable.24" = 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.37" = type { %"struct.std::_Vector_base.38" }
%"struct.std::_Vector_base.38" = 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.42" = type { %"struct.std::_Vector_base.43" }
%"struct.std::_Vector_base.43" = 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.49" = type { %"struct.std::_Optional_base.50" }
%"struct.std::_Optional_base.50" = type { %"struct.std::_Optional_payload.52" }
%"struct.std::_Optional_payload.52" = type { %"struct.std::_Optional_payload.base.56", [7 x i8] }
%"struct.std::_Optional_payload.base.56" = type { %"struct.std::_Optional_payload_base.base.55" }
%"struct.std::_Optional_payload_base.base.55" = 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.59" = type { %"struct.std::_Optional_base.60" }
%"struct.std::_Optional_base.60" = type { %"struct.std::_Optional_payload.62" }
%"struct.std::_Optional_payload.62" = type { %"struct.std::_Optional_payload.base.66", [7 x i8] }
%"struct.std::_Optional_payload.base.66" = type { %"struct.std::_Optional_payload_base.base.65" }
%"struct.std::_Optional_payload_base.base.65" = 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.69" }
%"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.69" = type { %"struct.std::_Vector_base.70" }
%"struct.std::_Vector_base.70" = 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.74" }
%"class.Raz::OwnerValue.74" = type { i32 }
%"class.std::vector.75" = type { %"struct.std::_Vector_base.76" }
%"struct.std::_Vector_base.76" = type { %"struct.std::_Vector_base<std::unique_ptr<Raz::RenderProcess>, std::allocator<std::unique_ptr<Raz::RenderProcess>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<Raz::RenderProcess>, std::allocator<std::unique_ptr<Raz::RenderProcess>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<Raz::RenderProcess>, std::allocator<std::unique_ptr<Raz::RenderProcess>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<Raz::RenderProcess>, std::allocator<std::unique_ptr<Raz::RenderProcess>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_set.80" = type { %"class.std::_Hashtable.81" }
%"class.std::_Hashtable.81" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.Raz::UniformBuffer" = type { %"class.Raz::OwnerValue" }
%"class.std::optional.100" = type { %"struct.std::_Optional_base.101" }
%"struct.std::_Optional_base.101" = type { %"struct.std::_Optional_payload.103" }
%"struct.std::_Optional_payload.103" = type { %"struct.std::_Optional_payload.base.107", [3 x i8] }
%"struct.std::_Optional_payload.base.107" = type { %"struct.std::_Optional_payload_base.base.106" }
%"struct.std::_Optional_payload_base.base.106" = type <{ %"union.std::_Optional_payload_base<Raz::Cubemap>::_Storage", i8 }>
%"union.std::_Optional_payload_base<Raz::Cubemap>::_Storage" = type { %"class.Raz::Cubemap" }
%"class.Raz::Cubemap" = type { %"class.Raz::OwnerValue" }

@.str = external hidden unnamed_addr constant [14 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [12 x i8], align 1

declare void @_ZNK3Raz13UniformBuffer16bindUniformBlockERKNS_13ShaderProgramERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEj(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #0

; 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 void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

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

; 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 i64 @_ZNK3Raz5GraphINS_10RenderPassEE12getNodeCountEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt6vectorIPN3Raz6EntityESaIS2_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_cxxneIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3Raz12RenderSystem13updateShadersEv(ptr noundef nonnull align 8 dereferenceable(776) %0) #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::allocator.21", align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator.21", align 1
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator.21", align 1
  %13 = alloca ptr, align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator.222", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator.222", align 8
  %22 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %23 = load ptr, ptr %2, align 8
  %24 = getelementptr inbounds %"class.Raz::RenderSystem", ptr %23, i32 0, i32 5
  call void @_ZNK3Raz11RenderGraph13updateShadersEv(ptr noundef nonnull align 8 dereferenceable(648) %24)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  store i64 0, ptr %3, align 8, !tbaa !9
  br label %25

25:                                               ; preds = %48, %1
  %26 = load i64, ptr %3, align 8, !tbaa !9
  %27 = getelementptr inbounds %"class.Raz::RenderSystem", ptr %23, i32 0, i32 5
  %28 = call noundef i64 @_ZNK3Raz5GraphINS_10RenderPassEE12getNodeCountEv(ptr noundef nonnull align 8 dereferenceable(24) %27) #5
  %29 = icmp ult i64 %26, %28
  br i1 %29, label %31, label %30

30:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  br label %79

31:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %32 = getelementptr inbounds %"class.Raz::RenderSystem", ptr %23, i32 0, i32 5
  %33 = load i64, ptr %3, align 8, !tbaa !9
  %34 = call noundef nonnull align 8 dereferenceable(536) ptr @_ZNK3Raz5GraphINS_10RenderPassEE7getNodeEm(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef %33) #5
  %35 = call noundef nonnull align 8 dereferenceable(384) ptr @_ZNK3Raz10RenderPass10getProgramEv(ptr noundef nonnull align 8 dereferenceable(536) %34)
  store ptr %35, ptr %4, align 8, !tbaa !5
  %36 = getelementptr inbounds %"class.Raz::RenderSystem", ptr %23, i32 0, i32 6
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef @.str, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %38 unwind label %51

38:                                               ; preds = %31
  invoke void @_ZNK3Raz13UniformBuffer16bindUniformBlockERKNS_13ShaderProgramERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEj(ptr noundef nonnull align 4 dereferenceable(4) %36, ptr noundef nonnull align 8 dereferenceable(120) %37, ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef 0)
          to label %39 unwind label %55

39:                                               ; preds = %38
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #5
  %40 = getelementptr inbounds %"class.Raz::RenderSystem", ptr %23, i32 0, i32 7
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %42 unwind label %60

42:                                               ; preds = %39
  invoke void @_ZNK3Raz13UniformBuffer16bindUniformBlockERKNS_13ShaderProgramERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEj(ptr noundef nonnull align 4 dereferenceable(4) %40, ptr noundef nonnull align 8 dereferenceable(120) %41, ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef 1)
          to label %43 unwind label %64

43:                                               ; preds = %42
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #5
  %44 = getelementptr inbounds %"class.Raz::RenderSystem", ptr %23, i32 0, i32 8
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %46 unwind label %69

46:                                               ; preds = %43
  invoke void @_ZNK3Raz13UniformBuffer16bindUniformBlockERKNS_13ShaderProgramERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEj(ptr noundef nonnull align 4 dereferenceable(4) %44, ptr noundef nonnull align 8 dereferenceable(120) %45, ptr noundef nonnull align 8 dereferenceable(32) %11, i32 noundef 2)
          to label %47 unwind label %73

47:                                               ; preds = %46
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  br label %48

48:                                               ; preds = %47
  %49 = load i64, ptr %3, align 8, !tbaa !9
  %50 = add i64 %49, 1
  store i64 %50, ptr %3, align 8, !tbaa !9
  br label %25, !llvm.loop !11

51:                                               ; preds = %31
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %7, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %8, align 4
  br label %59

55:                                               ; preds = %38
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %7, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #5
  br label %59

59:                                               ; preds = %55, %51
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #5
  br label %78

60:                                               ; preds = %39
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %7, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %8, align 4
  br label %68

64:                                               ; preds = %42
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %7, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  br label %68

68:                                               ; preds = %64, %60
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #5
  br label %78

69:                                               ; preds = %43
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %7, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %8, align 4
  br label %77

73:                                               ; preds = %46
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %7, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #5
  br label %77

77:                                               ; preds = %73, %69
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #5
  br label %78

78:                                               ; preds = %77, %68, %59
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  br label %124

79:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %80 = getelementptr inbounds %"class.Raz::System", ptr %23, i32 0, i32 1
  store ptr %80, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %81 = load ptr, ptr %13, align 8, !tbaa !5
  %82 = call ptr @_ZNKSt6vectorIPN3Raz6EntityESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %81) #5
  %83 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %82, ptr %83, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %84 = load ptr, ptr %13, align 8, !tbaa !5
  %85 = call ptr @_ZNKSt6vectorIPN3Raz6EntityESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %84) #5
  %86 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %85, ptr %86, align 8
  br label %87

87:                                               ; preds = %121, %79
  %88 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #5
  br i1 %88, label %90, label %89

89:                                               ; preds = %87
  store i32 5, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %123

90:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  %92 = load ptr, ptr %91, align 8, !tbaa !5
  store ptr %92, ptr %17, align 8, !tbaa !5
  %93 = load ptr, ptr %17, align 8, !tbaa !5
  %94 = call noundef zeroext i1 @_ZNK3Raz6Entity12hasComponentINS_12MeshRendererEEEbv(ptr noundef nonnull align 8 dereferenceable(80) %93)
  br i1 %94, label %96, label %95

95:                                               ; preds = %90
  store i32 6, ptr %16, align 4
  br label %118

96:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %97 = load ptr, ptr %17, align 8, !tbaa !5
  %98 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZN3Raz6Entity12getComponentINS_12MeshRendererEEERT_v(ptr noundef nonnull align 8 dereferenceable(80) %97)
  store ptr %98, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %99 = load ptr, ptr %18, align 8, !tbaa !5
  %100 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3Raz12MeshRenderer12getMaterialsEv(ptr noundef nonnull align 8 dereferenceable(64) %99)
  store ptr %100, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %101 = load ptr, ptr %19, align 8, !tbaa !5
  %102 = call ptr @_ZNSt6vectorIN3Raz8MaterialESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %101) #5
  %103 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.222", ptr %20, i32 0, i32 0
  store ptr %102, ptr %103, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %104 = load ptr, ptr %19, align 8, !tbaa !5
  %105 = call ptr @_ZNSt6vectorIN3Raz8MaterialESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %104) #5
  %106 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.222", ptr %21, i32 0, i32 0
  store ptr %105, ptr %106, align 8
  br label %107

107:                                              ; preds = %114, %96
  %108 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN3Raz8MaterialESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #5
  br i1 %108, label %110, label %109

109:                                              ; preds = %107
  store i32 7, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %116

110:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %111 = call noundef nonnull align 8 dereferenceable(384) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN3Raz8MaterialESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #5
  store ptr %111, ptr %22, align 8, !tbaa !5
  %112 = load ptr, ptr %22, align 8, !tbaa !5
  %113 = call noundef nonnull align 8 dereferenceable(384) ptr @_ZN3Raz8Material10getProgramEv(ptr noundef nonnull align 8 dereferenceable(384) %112) #5
  call void @_ZN3Raz13ShaderProgram13updateShadersEv(ptr noundef nonnull align 8 dereferenceable(120) %113)
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  br label %114

114:                                              ; preds = %110
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN3Raz8MaterialESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #5
  br label %107

116:                                              ; preds = %109
  %117 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZNK3Raz12RenderSystem15updateMaterialsERKNS_12MeshRendererE(ptr noundef nonnull align 8 dereferenceable(776) %23, ptr noundef nonnull align 8 dereferenceable(64) %117)
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  store i32 0, ptr %16, align 4
  br label %118

118:                                              ; preds = %116, %95
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  %119 = load i32, ptr %16, align 4
  switch i32 %119, label %129 [
    i32 0, label %120
    i32 6, label %121
  ]

120:                                              ; preds = %118
  br label %121

121:                                              ; preds = %120, %118
  %122 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  br label %87

123:                                              ; preds = %89
  ret void

124:                                              ; preds = %78
  %125 = load ptr, ptr %7, align 8
  %126 = load i32, ptr %8, align 4
  %127 = insertvalue { ptr, i32 } poison, ptr %125, 0
  %128 = insertvalue { ptr, i32 } %127, i32 %126, 1
  resume { ptr, i32 } %128

129:                                              ; preds = %118
  unreachable
}

declare void @_ZNK3Raz11RenderGraph13updateShadersEv(ptr noundef nonnull align 8 dereferenceable(648)) #0

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK3Raz6Entity12hasComponentINS_12MeshRendererEEEbv(ptr noundef nonnull align 8 dereferenceable(80)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(64) ptr @_ZN3Raz6Entity12getComponentINS_12MeshRendererEEERT_v(ptr noundef nonnull align 8 dereferenceable(80)) #3 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIN3Raz8MaterialESaIS1_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_cxxneIPN3Raz8MaterialESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

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

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

declare void @_ZN3Raz13ShaderProgram13updateShadersEv(ptr noundef nonnull align 8 dereferenceable(120)) #0

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3Raz12RenderSystem15updateMaterialsERKNS_12MeshRendererE(ptr noundef nonnull align 8 dereferenceable(776), ptr noundef nonnull align 8 dereferenceable(64)) #3 align 2

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 = { 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 = { 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 #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"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"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.std::allocator.21" = type { i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.222" = type { ptr }

@.str = external hidden unnamed_addr constant [14 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [12 x i8], align 1

declare void @_ZNK3Raz13UniformBuffer16bindUniformBlockERKNS_13ShaderProgramERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEj(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #0

; 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 void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

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

; 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 i64 @_ZNK3Raz5GraphINS_10RenderPassEE12getNodeCountEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt6vectorIPN3Raz6EntityESaIS2_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_cxxneIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3Raz12RenderSystem13updateShadersEv(ptr noundef nonnull align 8 dereferenceable(776) %0) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::allocator.21", align 1
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::allocator.21", align 1
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator.21", align 1
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator.222", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator.222", align 8
  %12 = getelementptr inbounds i8, ptr %0, i64 96
  tail call void @_ZNK3Raz11RenderGraph13updateShadersEv(ptr noundef nonnull align 8 dereferenceable(648) %12)
  %13 = tail call noundef i64 @_ZNK3Raz5GraphINS_10RenderPassEE12getNodeCountEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  %.not = icmp eq i64 %13, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %1
  %14 = getelementptr inbounds i8, ptr %0, i64 744
  %15 = getelementptr inbounds i8, ptr %0, i64 748
  %16 = getelementptr inbounds i8, ptr %0, i64 752
  br label %21

._crit_edge:                                      ; preds = %29, %1
  %17 = getelementptr inbounds i8, ptr %0, i64 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %18 = call ptr @_ZNKSt6vectorIPN3Raz6EntityESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  store ptr %18, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  %19 = call ptr @_ZNKSt6vectorIPN3Raz6EntityESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  store ptr %19, ptr %9, align 8
  %20 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  br i1 %20, label %.lr.ph33, label %._crit_edge34

21:                                               ; preds = %.lr.ph, %29
  %.028 = phi i64 [ 0, %.lr.ph ], [ %30, %29 ]
  %22 = call noundef nonnull align 8 dereferenceable(536) ptr @_ZNK3Raz5GraphINS_10RenderPassEE7getNodeEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %.028) #5
  %23 = call noundef nonnull align 8 dereferenceable(384) ptr @_ZNK3Raz10RenderPass10getProgramEv(ptr noundef nonnull align 8 dereferenceable(536) %22)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %24 unwind label %33

24:                                               ; preds = %21
  invoke void @_ZNK3Raz13UniformBuffer16bindUniformBlockERKNS_13ShaderProgramERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEj(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 8 dereferenceable(120) %23, ptr noundef nonnull align 8 dereferenceable(32) %2, i32 noundef 0)
          to label %25 unwind label %35

25:                                               ; preds = %24
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %26 unwind label %38

26:                                               ; preds = %25
  invoke void @_ZNK3Raz13UniformBuffer16bindUniformBlockERKNS_13ShaderProgramERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEj(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 8 dereferenceable(120) %23, ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef 1)
          to label %27 unwind label %40

27:                                               ; preds = %26
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %28 unwind label %43

28:                                               ; preds = %27
  invoke void @_ZNK3Raz13UniformBuffer16bindUniformBlockERKNS_13ShaderProgramERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEj(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 8 dereferenceable(120) %23, ptr noundef nonnull align 8 dereferenceable(32) %6, i32 noundef 2)
          to label %29 unwind label %45

29:                                               ; preds = %28
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  %30 = add nuw i64 %.028, 1
  %31 = call noundef i64 @_ZNK3Raz5GraphINS_10RenderPassEE12getNodeCountEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  %32 = icmp ult i64 %30, %31
  br i1 %32, label %21, label %._crit_edge, !llvm.loop !5

33:                                               ; preds = %21
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %37

35:                                               ; preds = %24
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #5
  br label %37

37:                                               ; preds = %35, %33
  %.pn = phi { ptr, i32 } [ %36, %35 ], [ %34, %33 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #5
  br label %48

38:                                               ; preds = %25
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %42

40:                                               ; preds = %26
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  br label %42

42:                                               ; preds = %40, %38
  %.pn23 = phi { ptr, i32 } [ %41, %40 ], [ %39, %38 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  br label %48

43:                                               ; preds = %27
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %47

45:                                               ; preds = %28
  %46 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  br label %47

47:                                               ; preds = %45, %43
  %.pn25 = phi { ptr, i32 } [ %46, %45 ], [ %44, %43 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  br label %48

48:                                               ; preds = %47, %42, %37
  %.pn25.pn = phi { ptr, i32 } [ %.pn25, %47 ], [ %.pn23, %42 ], [ %.pn, %37 ]
  resume { ptr, i32 } %.pn25.pn

._crit_edge34:                                    ; preds = %62, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  ret void

.lr.ph33:                                         ; preds = %._crit_edge, %62
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  %50 = load ptr, ptr %49, align 8, !tbaa !7
  %51 = call noundef zeroext i1 @_ZNK3Raz6Entity12hasComponentINS_12MeshRendererEEEbv(ptr noundef nonnull align 8 dereferenceable(80) %50)
  br i1 %51, label %52, label %62

52:                                               ; preds = %.lr.ph33
  %53 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZN3Raz6Entity12getComponentINS_12MeshRendererEEERT_v(ptr noundef nonnull align 8 dereferenceable(80) %50)
  %54 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3Raz12MeshRenderer12getMaterialsEv(ptr noundef nonnull align 8 dereferenceable(64) %53)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  %55 = call ptr @_ZNSt6vectorIN3Raz8MaterialESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %54) #5
  store ptr %55, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  %56 = call ptr @_ZNSt6vectorIN3Raz8MaterialESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %54) #5
  store ptr %56, ptr %11, align 8
  %57 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN3Raz8MaterialESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  br i1 %57, label %.lr.ph30, label %._crit_edge31

._crit_edge31:                                    ; preds = %.lr.ph30, %52
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @_ZNK3Raz12RenderSystem15updateMaterialsERKNS_12MeshRendererE(ptr noundef nonnull align 8 dereferenceable(776) %0, ptr noundef nonnull align 8 dereferenceable(64) %53)
  br label %62

.lr.ph30:                                         ; preds = %52, %.lr.ph30
  %58 = call noundef nonnull align 8 dereferenceable(384) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN3Raz8MaterialESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  %59 = call noundef nonnull align 8 dereferenceable(384) ptr @_ZN3Raz8Material10getProgramEv(ptr noundef nonnull align 8 dereferenceable(384) %58) #5
  call void @_ZN3Raz13ShaderProgram13updateShadersEv(ptr noundef nonnull align 8 dereferenceable(120) %59)
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN3Raz8MaterialESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  %61 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN3Raz8MaterialESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  br i1 %61, label %.lr.ph30, label %._crit_edge31

62:                                               ; preds = %.lr.ph33, %._crit_edge31
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  %64 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  br i1 %64, label %.lr.ph33, label %._crit_edge34
}

declare void @_ZNK3Raz11RenderGraph13updateShadersEv(ptr noundef nonnull align 8 dereferenceable(648)) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK3Raz6Entity12hasComponentINS_12MeshRendererEEEbv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(64) ptr @_ZN3Raz6Entity12getComponentINS_12MeshRendererEEERT_v(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIN3Raz8MaterialESaIS1_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_cxxneIPN3Raz8MaterialESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(384) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN3Raz8MaterialESt6vectorIS2_SaIS2_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(384) ptr @_ZN3Raz8Material10getProgramEv(ptr noundef nonnull align 8 dereferenceable(384)) local_unnamed_addr #2 align 2

declare void @_ZN3Raz13ShaderProgram13updateShadersEv(ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3Raz12RenderSystem15updateMaterialsERKNS_12MeshRendererE(ptr noundef nonnull align 8 dereferenceable(776), ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #3 align 2

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 = { 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 = { 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 #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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}


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