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

; 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.Raz::Vector.240" = type { %"struct.std::array.241" }
%"struct.std::array.241" = type { [4 x float] }
%"class.Raz::Color" = type { %"class.Raz::Vector" }
%"class.Raz::Vector" = type { %"struct.std::array" }
%"struct.std::array" = type { [3 x float] }
%"struct.Raz::Radians" = type { float }
%"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" }

@.str.10 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [106 x i8], align 1
@__PRETTY_FUNCTION__._ZNK3Raz12RenderSystem11updateLightERKNS_6EntityEj = external hidden unnamed_addr constant [72 x i8], align 1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3Raz12RenderSystem11updateLightERKNS_6EntityEj(ptr noundef nonnull align 8 dereferenceable(776) %0, ptr noundef nonnull align 8 dereferenceable(80) %1, i32 noundef %2) #2 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca %"class.Raz::Vector.240", align 4
  %10 = alloca %"class.Raz::Vector.240", align 4
  %11 = alloca %"class.Raz::Color", align 4
  %12 = alloca { <2 x float>, float }, align 4
  %13 = alloca %"struct.Raz::Radians", align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  %14 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNK3Raz6Entity12getComponentINS_5LightEEERKT_v(ptr noundef nonnull align 8 dereferenceable(80) %15)
  store ptr %16, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %17 = load i32, ptr %6, align 4, !tbaa !9
  %18 = zext i32 %17 to i64
  %19 = mul i64 64, %18
  store i64 %19, ptr %8, align 8, !tbaa !11
  %20 = load ptr, ptr %7, align 8, !tbaa !5
  %21 = call noundef i32 @_ZNK3Raz5Light7getTypeEv(ptr noundef nonnull align 8 dereferenceable(48) %20) #7
  %22 = icmp eq i32 %21, 1
  br i1 %22, label %23, label %27

23:                                               ; preds = %3
  %24 = getelementptr inbounds %"class.Raz::RenderSystem", ptr %14, i32 0, i32 7
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #7
  call void @_ZN3Raz6VectorIfLm4EEC2Ef(ptr noundef nonnull align 4 dereferenceable(16) %9, float noundef 0.000000e+00) #7
  %25 = load i64, ptr %8, align 8, !tbaa !11
  %26 = trunc i64 %25 to i32
  call void @_ZNK3Raz13UniformBuffer8sendDataIfLm4EEEvRKNS_6VectorIT_XT0_EEEj(ptr noundef nonnull align 4 dereferenceable(4) %24, ptr noundef nonnull align 4 dereferenceable(16) %9, i32 noundef %26) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #7
  br label %40

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

30:                                               ; preds = %27
  br label %33

31:                                               ; preds = %27
  call void @__assert_fail(ptr noundef @.str.12, ptr noundef @.str.10, i32 noundef 286, ptr noundef @__PRETTY_FUNCTION__._ZNK3Raz12RenderSystem11updateLightERKNS_6EntityEj) #8
  unreachable

32:                                               ; No predecessors!
  br label %33

33:                                               ; preds = %32, %30
  %34 = getelementptr inbounds %"class.Raz::RenderSystem", ptr %14, i32 0, i32 7
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #7
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK3Raz6Entity12getComponentINS_9TransformEEERKT_v(ptr noundef nonnull align 8 dereferenceable(80) %35)
  %37 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3Raz9Transform11getPositionEv(ptr noundef nonnull align 8 dereferenceable(56) %36)
  call void @_ZN3Raz6VectorIfLm4EEC2ERKNS0_IfLm3EEEf(ptr noundef nonnull align 4 dereferenceable(16) %10, ptr noundef nonnull align 4 dereferenceable(12) %37, float noundef 1.000000e+00) #7
  %38 = load i64, ptr %8, align 8, !tbaa !11
  %39 = trunc i64 %38 to i32
  call void @_ZNK3Raz13UniformBuffer8sendDataIfLm4EEEvRKNS_6VectorIT_XT0_EEEj(ptr noundef nonnull align 4 dereferenceable(4) %34, ptr noundef nonnull align 4 dereferenceable(16) %10, i32 noundef %39) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #7
  br label %40

40:                                               ; preds = %33, %23
  %41 = getelementptr inbounds %"class.Raz::RenderSystem", ptr %14, i32 0, i32 7
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3Raz5Light12getDirectionEv(ptr noundef nonnull align 8 dereferenceable(48) %42) #7
  %44 = load i64, ptr %8, align 8, !tbaa !11
  %45 = add i64 %44, 16
  %46 = trunc i64 %45 to i32
  call void @_ZNK3Raz13UniformBuffer8sendDataIfLm3EEEvRKNS_6VectorIT_XT0_EEEj(ptr noundef nonnull align 4 dereferenceable(4) %41, ptr noundef nonnull align 4 dereferenceable(12) %43, i32 noundef %46) #7
  %47 = getelementptr inbounds %"class.Raz::RenderSystem", ptr %14, i32 0, i32 7
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3Raz5Light8getColorEv(ptr noundef nonnull align 8 dereferenceable(48) %48) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 4 %49, i64 12, i1 false), !tbaa.struct !13
  %50 = load i64, ptr %8, align 8, !tbaa !11
  %51 = add i64 %50, 32
  %52 = trunc i64 %51 to i32
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 4 %11, i64 12, i1 false)
  %53 = getelementptr inbounds { <2 x float>, float }, ptr %12, i32 0, i32 0
  %54 = load <2 x float>, ptr %53, align 4
  %55 = getelementptr inbounds { <2 x float>, float }, ptr %12, i32 0, i32 1
  %56 = load float, ptr %55, align 4
  call void @_ZNK3Raz13UniformBuffer8sendDataINS_5ColorEEEvT_j(ptr noundef nonnull align 4 dereferenceable(4) %47, <2 x float> %54, float %56, i32 noundef %52) #7
  %57 = getelementptr inbounds %"class.Raz::RenderSystem", ptr %14, i32 0, i32 7
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = call noundef float @_ZNK3Raz5Light9getEnergyEv(ptr noundef nonnull align 8 dereferenceable(48) %58) #7
  %60 = load i64, ptr %8, align 8, !tbaa !11
  %61 = add i64 %60, 48
  %62 = trunc i64 %61 to i32
  call void @_ZNK3Raz13UniformBuffer8sendDataIfEEvT_j(ptr noundef nonnull align 4 dereferenceable(4) %57, float noundef %59, i32 noundef %62) #7
  %63 = getelementptr inbounds %"class.Raz::RenderSystem", ptr %14, i32 0, i32 7
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = call float @_ZNK3Raz5Light8getAngleEv(ptr noundef nonnull align 8 dereferenceable(48) %64) #7
  %66 = getelementptr inbounds %"struct.Raz::Radians", ptr %13, i32 0, i32 0
  store float %65, ptr %66, align 4
  %67 = getelementptr inbounds %"struct.Raz::Radians", ptr %13, i32 0, i32 0
  %68 = load float, ptr %67, align 4, !tbaa !15
  %69 = load i64, ptr %8, align 8, !tbaa !11
  %70 = add i64 %69, 48
  %71 = add i64 %70, 4
  %72 = trunc i64 %71 to i32
  call void @_ZNK3Raz13UniformBuffer8sendDataIfEEvT_j(ptr noundef nonnull align 4 dereferenceable(4) %63, float noundef %68, i32 noundef %72) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  ret void
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3Raz9Transform11getPositionEv(ptr noundef nonnull align 8 dereferenceable(56)) #1 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3Raz6VectorIfLm4EEC2Ef(ptr noundef nonnull align 4 dereferenceable(16), float noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZNK3Raz6Entity12getComponentINS_9TransformEEERKT_v(ptr noundef nonnull align 8 dereferenceable(80)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3Raz6VectorIfLm4EEC2ERKNS0_IfLm3EEEf(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(12), float noundef) unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3Raz13UniformBuffer8sendDataINS_5ColorEEEvT_j(ptr noundef nonnull align 4 dereferenceable(4), <2 x float>, float, i32 noundef) #5 align 2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nounwind 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nounwind }
attributes #8 = { noreturn 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}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{i64 0, i64 12, !14}
!14 = !{!7, !7, i64 0}
!15 = !{!16, !17, i64 0}
!16 = !{!"_ZTSN3Raz7RadiansIfEE", !17, i64 0}
!17 = !{!"float", !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.Raz::Vector.240" = type { %"struct.std::array.241" }
%"struct.std::array.241" = type { [4 x float] }

@.str.10 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [106 x i8], align 1
@__PRETTY_FUNCTION__._ZNK3Raz12RenderSystem11updateLightERKNS_6EntityEj = external hidden unnamed_addr constant [72 x i8], align 1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3Raz12RenderSystem11updateLightERKNS_6EntityEj(ptr noundef nonnull align 8 dereferenceable(776) %0, ptr noundef nonnull align 8 dereferenceable(80) %1, i32 noundef %2) local_unnamed_addr #2 align 2 {
  %4 = alloca %"class.Raz::Vector.240", align 4
  %5 = alloca %"class.Raz::Vector.240", align 4
  %6 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZNK3Raz6Entity12getComponentINS_5LightEEERKT_v(ptr noundef nonnull align 8 dereferenceable(80) %1)
  %7 = zext i32 %2 to i64
  %8 = shl nuw nsw i64 %7, 6
  %9 = tail call noundef i32 @_ZNK3Raz5Light7getTypeEv(ptr noundef nonnull align 8 dereferenceable(48) %6) #6
  %10 = icmp eq i32 %9, 1
  br i1 %10, label %11, label %14

11:                                               ; preds = %3
  %12 = getelementptr inbounds i8, ptr %0, i64 748
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #6
  call void @_ZN3Raz6VectorIfLm4EEC2Ef(ptr noundef nonnull align 4 dereferenceable(16) %4, float noundef 0.000000e+00) #6
  %13 = trunc i64 %8 to i32
  call void @_ZNK3Raz13UniformBuffer8sendDataIfLm4EEEvRKNS_6VectorIT_XT0_EEEj(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(16) %4, i32 noundef %13) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  br label %22

14:                                               ; preds = %3
  %15 = tail call noundef zeroext i1 @_ZNK3Raz6Entity12hasComponentINS_9TransformEEEbv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  br i1 %15, label %17, label %16

16:                                               ; preds = %14
  tail call void @__assert_fail(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.10, i32 noundef 286, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK3Raz12RenderSystem11updateLightERKNS_6EntityEj) #7
  unreachable

17:                                               ; preds = %14
  %18 = getelementptr inbounds i8, ptr %0, i64 748
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  %19 = tail call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK3Raz6Entity12getComponentINS_9TransformEEERKT_v(ptr noundef nonnull align 8 dereferenceable(80) %1)
  %20 = tail call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3Raz9Transform11getPositionEv(ptr noundef nonnull align 8 dereferenceable(56) %19)
  call void @_ZN3Raz6VectorIfLm4EEC2ERKNS0_IfLm3EEEf(ptr noundef nonnull align 4 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(12) %20, float noundef 1.000000e+00) #6
  %21 = trunc i64 %8 to i32
  call void @_ZNK3Raz13UniformBuffer8sendDataIfLm4EEEvRKNS_6VectorIT_XT0_EEEj(ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(16) %5, i32 noundef %21) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  br label %22

22:                                               ; preds = %17, %11
  %.pre-phi = phi i32 [ %21, %17 ], [ %13, %11 ]
  %23 = getelementptr inbounds i8, ptr %0, i64 748
  %24 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3Raz5Light12getDirectionEv(ptr noundef nonnull align 8 dereferenceable(48) %6) #6
  %25 = or disjoint i32 %.pre-phi, 16
  call void @_ZNK3Raz13UniformBuffer8sendDataIfLm3EEEvRKNS_6VectorIT_XT0_EEEj(ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 4 dereferenceable(12) %24, i32 noundef %25) #6
  %26 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3Raz5Light8getColorEv(ptr noundef nonnull align 8 dereferenceable(48) %6) #6
  %.sroa.02.0.copyload = load <2 x float>, ptr %26, align 4
  %.sroa.23.0..sroa_idx = getelementptr inbounds i8, ptr %26, i64 8
  %.sroa.23.0.copyload = load float, ptr %.sroa.23.0..sroa_idx, align 4, !tbaa !5
  %27 = or disjoint i32 %.pre-phi, 32
  call void @_ZNK3Raz13UniformBuffer8sendDataINS_5ColorEEEvT_j(ptr noundef nonnull align 4 dereferenceable(4) %23, <2 x float> %.sroa.02.0.copyload, float %.sroa.23.0.copyload, i32 noundef %27) #6
  %28 = call noundef float @_ZNK3Raz5Light9getEnergyEv(ptr noundef nonnull align 8 dereferenceable(48) %6) #6
  %29 = or disjoint i32 %.pre-phi, 48
  call void @_ZNK3Raz13UniformBuffer8sendDataIfEEvT_j(ptr noundef nonnull align 4 dereferenceable(4) %23, float noundef %28, i32 noundef %29) #6
  %30 = call float @_ZNK3Raz5Light8getAngleEv(ptr noundef nonnull align 8 dereferenceable(48) %6) #6
  %31 = or disjoint i32 %.pre-phi, 52
  call void @_ZNK3Raz13UniformBuffer8sendDataIfEEvT_j(ptr noundef nonnull align 4 dereferenceable(4) %23, float noundef %30, i32 noundef %31) #6
  ret void
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3Raz9Transform11getPositionEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3Raz6VectorIfLm4EEC2Ef(ptr noundef nonnull align 4 dereferenceable(16), float noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZNK3Raz6Entity12getComponentINS_9TransformEEERKT_v(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3Raz6VectorIfLm4EEC2ERKNS0_IfLm3EEEf(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(12), float noundef) unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3Raz13UniformBuffer8sendDataINS_5ColorEEEvT_j(ptr noundef nonnull align 4 dereferenceable(4), <2 x float>, float, i32 noundef) local_unnamed_addr #5 align 2

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

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

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

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass