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

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

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

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

declare void @_ZNK3Raz13UniformBuffer4bindEv(ptr noundef nonnull align 4 dereferenceable(4)) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3Raz12RenderSystem12updateLightsEv(ptr noundef nonnull align 8 dereferenceable(776) %0) #2 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %9 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !9
  %10 = getelementptr inbounds %"class.Raz::RenderSystem", ptr %9, i32 0, i32 7
  call void @_ZNK3Raz13UniformBuffer4bindEv(ptr noundef nonnull align 4 dereferenceable(4) %10)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %11 = getelementptr inbounds %"class.Raz::System", ptr %9, i32 0, i32 1
  store ptr %11, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  %13 = call ptr @_ZNKSt6vectorIPN3Raz6EntityESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  %14 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %5, i32 0, i32 0
  store ptr %13, ptr %14, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = call ptr @_ZNKSt6vectorIPN3Raz6EntityESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  %17 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  store ptr %16, ptr %17, align 8
  br label %18

18:                                               ; preds = %38, %1
  %19 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  br i1 %19, label %21, label %20

20:                                               ; preds = %18
  store i32 2, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  br label %40

21:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %23 = load ptr, ptr %22, align 8, !tbaa !5
  store ptr %23, ptr %8, align 8, !tbaa !5
  %24 = load ptr, ptr %8, align 8, !tbaa !5
  %25 = call noundef zeroext i1 @_ZNK3Raz6Entity9isEnabledEv(ptr noundef nonnull align 8 dereferenceable(80) %24) #6
  br i1 %25, label %26, label %29

26:                                               ; preds = %21
  %27 = load ptr, ptr %8, align 8, !tbaa !5
  %28 = call noundef zeroext i1 @_ZNK3Raz6Entity12hasComponentINS_5LightEEEbv(ptr noundef nonnull align 8 dereferenceable(80) %27)
  br i1 %28, label %30, label %29

29:                                               ; preds = %26, %21
  store i32 3, ptr %7, align 4
  br label %35

30:                                               ; preds = %26
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  %32 = load i32, ptr %3, align 4, !tbaa !9
  call void @_ZNK3Raz12RenderSystem11updateLightERKNS_6EntityEj(ptr noundef nonnull align 8 dereferenceable(776) %9, ptr noundef nonnull align 8 dereferenceable(80) %31, i32 noundef %32)
  %33 = load i32, ptr %3, align 4, !tbaa !9
  %34 = add i32 %33, 1
  store i32 %34, ptr %3, align 4, !tbaa !9
  store i32 0, ptr %7, align 4
  br label %35

35:                                               ; preds = %30, %29
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  %36 = load i32, ptr %7, align 4
  switch i32 %36, label %43 [
    i32 0, label %37
    i32 3, label %38
  ]

37:                                               ; preds = %35
  br label %38

38:                                               ; preds = %37, %35
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  br label %18

40:                                               ; preds = %20
  %41 = getelementptr inbounds %"class.Raz::RenderSystem", ptr %9, i32 0, i32 7
  %42 = load i32, ptr %3, align 4, !tbaa !9
  call void @_ZNK3Raz13UniformBuffer8sendDataIjEEvT_j(ptr noundef nonnull align 4 dereferenceable(4) %41, i32 noundef %42, i32 noundef 6400) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  ret void

43:                                               ; preds = %35
  unreachable
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3Raz12RenderSystem11updateLightERKNS_6EntityEj(ptr noundef nonnull align 8 dereferenceable(776), ptr noundef nonnull align 8 dereferenceable(80), i32 noundef) #5 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)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3Raz13UniformBuffer8sendDataIjEEvT_j(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef, i32 noundef) #3 align 2

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


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

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

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

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

declare void @_ZNK3Raz13UniformBuffer4bindEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3Raz12RenderSystem12updateLightsEv(ptr noundef nonnull align 8 dereferenceable(776) %0) local_unnamed_addr #2 align 2 {
  %2 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = getelementptr inbounds i8, ptr %0, i64 748
  tail call void @_ZNK3Raz13UniformBuffer4bindEv(ptr noundef nonnull align 4 dereferenceable(4) %4)
  %5 = getelementptr inbounds i8, ptr %0, i64 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  %6 = tail call ptr @_ZNKSt6vectorIPN3Raz6EntityESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  store ptr %6, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %7 = tail call ptr @_ZNKSt6vectorIPN3Raz6EntityESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  store ptr %7, ptr %3, align 8
  %8 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  br i1 %8, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %16, %1
  %.0.lcssa = phi i32 [ 0, %1 ], [ %.1, %16 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @_ZNK3Raz13UniformBuffer8sendDataIjEEvT_j(ptr noundef nonnull align 4 dereferenceable(4) %4, i32 noundef %.0.lcssa, i32 noundef 6400) #6
  ret void

.lr.ph:                                           ; preds = %1, %16
  %.08 = phi i32 [ %.1, %16 ], [ 0, %1 ]
  %9 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #6
  %10 = load ptr, ptr %9, align 8, !tbaa !5
  %11 = call noundef zeroext i1 @_ZNK3Raz6Entity9isEnabledEv(ptr noundef nonnull align 8 dereferenceable(80) %10) #6
  br i1 %11, label %12, label %16

12:                                               ; preds = %.lr.ph
  %13 = call noundef zeroext i1 @_ZNK3Raz6Entity12hasComponentINS_5LightEEEbv(ptr noundef nonnull align 8 dereferenceable(80) %10)
  br i1 %13, label %14, label %16

14:                                               ; preds = %12
  call void @_ZNK3Raz12RenderSystem11updateLightERKNS_6EntityEj(ptr noundef nonnull align 8 dereferenceable(776) %0, ptr noundef nonnull align 8 dereferenceable(80) %10, i32 noundef %.08)
  %15 = add i32 %.08, 1
  br label %16

16:                                               ; preds = %.lr.ph, %12, %14
  %.1 = phi i32 [ %15, %14 ], [ %.08, %12 ], [ %.08, %.lr.ph ]
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #6
  %18 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKPN3Raz6EntityESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  br i1 %18, label %.lr.ph, label %._crit_edge
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3Raz12RenderSystem11updateLightERKNS_6EntityEj(ptr noundef nonnull align 8 dereferenceable(776), ptr noundef nonnull align 8 dereferenceable(80), i32 noundef) local_unnamed_addr #5 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 #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3Raz13UniformBuffer8sendDataIjEEvT_j(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef, i32 noundef) local_unnamed_addr #3 align 2

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


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