; LLVM IR from ysyesilyurt/ComputerGraphics :: RayTracing/Scene.ll (Z15computeRadianceRK3RayRK16IntersectionDataP5Scenei)

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

%struct.IntersectionData = type { float, %struct.Vector3f, i32 }
%struct.Vector3f = type { %union.anon, %union.anon.0, %union.anon.1 }
%union.anon = type { float }
%union.anon.0 = type { float }
%union.anon.1 = type { float }
%class.Ray = type { %struct.Vector3f, %struct.Vector3f }
%class.Scene = type { i32, float, float, %struct.Vector3f, %struct.Vector3f, %"class.std::vector.2", %"class.std::vector.7", %"class.std::vector.12", %"class.std::vector.17", %"class.std::vector" }
%"class.std::vector.2" = type { %"struct.std::_Vector_base.3" }
%"struct.std::_Vector_base.3" = type { %"struct.std::_Vector_base<Camera *, std::allocator<Camera *>>::_Vector_impl" }
%"struct.std::_Vector_base<Camera *, std::allocator<Camera *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Camera *, std::allocator<Camera *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Camera *, std::allocator<Camera *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.7" = type { %"struct.std::_Vector_base.8" }
%"struct.std::_Vector_base.8" = type { %"struct.std::_Vector_base<PointLight *, std::allocator<PointLight *>>::_Vector_impl" }
%"struct.std::_Vector_base<PointLight *, std::allocator<PointLight *>>::_Vector_impl" = type { %"struct.std::_Vector_base<PointLight *, std::allocator<PointLight *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<PointLight *, std::allocator<PointLight *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.12" = type { %"struct.std::_Vector_base.13" }
%"struct.std::_Vector_base.13" = type { %"struct.std::_Vector_base<Material *, std::allocator<Material *>>::_Vector_impl" }
%"struct.std::_Vector_base<Material *, std::allocator<Material *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Material *, std::allocator<Material *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Material *, std::allocator<Material *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.17" = type { %"struct.std::_Vector_base.18" }
%"struct.std::_Vector_base.18" = type { %"struct.std::_Vector_base<Vector3f, std::allocator<Vector3f>>::_Vector_impl" }
%"struct.std::_Vector_base<Vector3f, std::allocator<Vector3f>>::_Vector_impl" = type { %"struct.std::_Vector_base<Vector3f, std::allocator<Vector3f>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Vector3f, std::allocator<Vector3f>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Shape *, std::allocator<Shape *>>::_Vector_impl" }
%"struct.std::_Vector_base<Shape *, std::allocator<Shape *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Shape *, std::allocator<Shape *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Shape *, std::allocator<Shape *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.PointLight = type { %struct.Vector3f, %struct.Vector3f }
%class.Material = type { i32, i32, %struct.Vector3f, %struct.Vector3f, %struct.Vector3f, %struct.Vector3f }

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12intersectRayRK3RayRKSt6vectorIP5ShapeSaIS4_EE(ptr dead_on_unwind noalias writable sret(%struct.IntersectionData) align 4, ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #0

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, float } @_Z15computeSpecularPK8MaterialRK8Vector3fS4_S4_(ptr noundef, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_Z10dotProductRK8Vector3fS1_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local { <2 x float>, float } @_ZNK8Vector3fmlEf(ptr noundef nonnull align 4 dereferenceable(12), float noundef) #3 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) #4

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, float } @_Z14computeDiffusePK8MaterialRK8Vector3fS4_S4_(ptr noundef, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { <2 x float>, float } @_Z14computeAmbientPK8MaterialRK8Vector3f(ptr noundef, ptr noundef nonnull align 4 dereferenceable(12)) #5

; Function Attrs: mustprogress uwtable
define dso_local { <2 x float>, float } @_Z15computeRadianceRK3RayRK16IntersectionDataP5Scenei(ptr noundef nonnull align 4 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(20) %1, ptr noundef %2, i32 noundef %3) #2 {
  %5 = alloca %struct.Vector3f, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca %struct.Vector3f, align 4
  %12 = alloca { <2 x float>, float }, align 8
  %13 = alloca %struct.Vector3f, align 4
  %14 = alloca { <2 x float>, float }, align 4
  %15 = alloca %struct.Vector3f, align 4
  %16 = alloca %struct.Vector3f, align 4
  %17 = alloca { <2 x float>, float }, align 8
  %18 = alloca { <2 x float>, float }, align 4
  %19 = alloca { <2 x float>, float }, align 8
  %20 = alloca %struct.Vector3f, align 4
  %21 = alloca %struct.Vector3f, align 4
  %22 = alloca { <2 x float>, float }, align 4
  %23 = alloca { <2 x float>, float }, align 8
  %24 = alloca %struct.Vector3f, align 4
  %25 = alloca %struct.Vector3f, align 4
  %26 = alloca { <2 x float>, float }, align 4
  %27 = alloca { <2 x float>, float }, align 8
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca %struct.Vector3f, align 4
  %31 = alloca %struct.Vector3f, align 4
  %32 = alloca { <2 x float>, float }, align 4
  %33 = alloca { <2 x float>, float }, align 8
  %34 = alloca %struct.Vector3f, align 4
  %35 = alloca %struct.Vector3f, align 4
  %36 = alloca { <2 x float>, float }, align 4
  %37 = alloca { <2 x float>, float }, align 8
  %38 = alloca %class.Ray, align 4
  %39 = alloca %struct.Vector3f, align 4
  %40 = alloca { <2 x float>, float }, align 8
  %41 = alloca %struct.Vector3f, align 4
  %42 = alloca %struct.Vector3f, align 4
  %43 = alloca { <2 x float>, float }, align 4
  %44 = alloca { <2 x float>, float }, align 8
  %45 = alloca { <2 x float>, float }, align 4
  %46 = alloca %struct.Vector3f, align 4
  %47 = alloca { <2 x float>, float }, align 4
  %48 = alloca %struct.IntersectionData, align 4
  %49 = alloca %struct.Vector3f, align 4
  %50 = alloca { <2 x float>, float }, align 8
  %51 = alloca %struct.Vector3f, align 4
  %52 = alloca { <2 x float>, float }, align 8
  %53 = alloca %struct.Vector3f, align 4
  %54 = alloca { <2 x float>, float }, align 4
  %55 = alloca %struct.Vector3f, align 4
  %56 = alloca %struct.Vector3f, align 4
  %57 = alloca %struct.Vector3f, align 4
  %58 = alloca { <2 x float>, float }, align 4
  %59 = alloca { <2 x float>, float }, align 8
  %60 = alloca { <2 x float>, float }, align 4
  %61 = alloca { <2 x float>, float }, align 8
  %62 = alloca %struct.Vector3f, align 4
  %63 = alloca { <2 x float>, float }, align 8
  %64 = alloca %struct.Vector3f, align 4
  %65 = alloca { <2 x float>, float }, align 4
  %66 = alloca %class.Ray, align 4
  %67 = alloca float, align 4
  %68 = alloca %struct.Vector3f, align 4
  %69 = alloca %struct.Vector3f, align 4
  %70 = alloca { <2 x float>, float }, align 8
  %71 = alloca %struct.Vector3f, align 4
  %72 = alloca { <2 x float>, float }, align 8
  %73 = alloca { <2 x float>, float }, align 4
  %74 = alloca { <2 x float>, float }, align 8
  %75 = alloca { <2 x float>, float }, align 4
  %76 = alloca %struct.Vector3f, align 4
  %77 = alloca %struct.Vector3f, align 4
  %78 = alloca { <2 x float>, float }, align 8
  %79 = alloca { <2 x float>, float }, align 4
  %80 = alloca { <2 x float>, float }, align 8
  %81 = alloca { <2 x float>, float }, align 4
  %82 = alloca %struct.IntersectionData, align 4
  %83 = alloca %struct.Vector3f, align 4
  %84 = alloca { <2 x float>, float }, align 8
  %85 = alloca %struct.Vector3f, align 4
  %86 = alloca { <2 x float>, float }, align 4
  %87 = alloca float, align 4
  %88 = alloca float, align 4
  %89 = alloca float, align 4
  %90 = alloca float, align 4
  %91 = alloca float, align 4
  %92 = alloca float, align 4
  %93 = alloca { <2 x float>, float }, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !9
  %94 = getelementptr inbounds %struct.Vector3f, ptr %5, i32 0, i32 0
  store float 0.000000e+00, ptr %94, align 4, !tbaa !11
  %95 = getelementptr inbounds %struct.Vector3f, ptr %5, i32 0, i32 1
  store float 0.000000e+00, ptr %95, align 4, !tbaa !11
  %96 = getelementptr inbounds %struct.Vector3f, ptr %5, i32 0, i32 2
  store float 0.000000e+00, ptr %96, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #10
  %97 = load ptr, ptr %8, align 8, !tbaa !5
  %98 = getelementptr inbounds %class.Scene, ptr %97, i32 0, i32 7
  %99 = load ptr, ptr %7, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.IntersectionData, ptr %99, i32 0, i32 2
  %101 = load i32, ptr %100, align 4, !tbaa !12
  %102 = sub nsw i32 %101, 1
  %103 = sext i32 %102 to i64
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP8MaterialSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %98, i64 noundef %103) #10
  %105 = load ptr, ptr %104, align 8, !tbaa !5
  store ptr %105, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %11) #10
  %106 = load ptr, ptr %10, align 8, !tbaa !5
  %107 = load ptr, ptr %8, align 8, !tbaa !5
  %108 = getelementptr inbounds %class.Scene, ptr %107, i32 0, i32 4
  %109 = call { <2 x float>, float } @_Z14computeAmbientPK8MaterialRK8Vector3f(ptr noundef %106, ptr noundef nonnull align 4 dereferenceable(12) %108)
  store { <2 x float>, float } %109, ptr %12, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 8 %12, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %11, i64 12, i1 false), !tbaa.struct !16
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 4 %13, i64 12, i1 false)
  %110 = getelementptr inbounds { <2 x float>, float }, ptr %14, i32 0, i32 0
  %111 = load <2 x float>, ptr %110, align 4
  %112 = getelementptr inbounds { <2 x float>, float }, ptr %14, i32 0, i32 1
  %113 = load float, ptr %112, align 4
  %114 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN8Vector3faSES_(ptr noundef nonnull align 4 dereferenceable(12) %5, <2 x float> %111, float %113)
  call void @llvm.lifetime.start.p0(i64 12, ptr %15) #10
  %115 = load ptr, ptr %6, align 8, !tbaa !5
  %116 = getelementptr inbounds %class.Ray, ptr %115, i32 0, i32 0
  %117 = load ptr, ptr %6, align 8, !tbaa !5
  %118 = getelementptr inbounds %class.Ray, ptr %117, i32 0, i32 1
  %119 = load ptr, ptr %7, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.IntersectionData, ptr %119, i32 0, i32 0
  %121 = load float, ptr %120, align 4, !tbaa !17
  %122 = call { <2 x float>, float } @_ZNK8Vector3fmlEf(ptr noundef nonnull align 4 dereferenceable(12) %118, float noundef %121)
  store { <2 x float>, float } %122, ptr %17, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 8 %17, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 4 %16, i64 12, i1 false)
  %123 = getelementptr inbounds { <2 x float>, float }, ptr %18, i32 0, i32 0
  %124 = load <2 x float>, ptr %123, align 4
  %125 = getelementptr inbounds { <2 x float>, float }, ptr %18, i32 0, i32 1
  %126 = load float, ptr %125, align 4
  %127 = call { <2 x float>, float } @_ZNK8Vector3fplES_(ptr noundef nonnull align 4 dereferenceable(12) %116, <2 x float> %124, float %126)
  store { <2 x float>, float } %127, ptr %19, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %15, ptr align 8 %19, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %20) #10
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = getelementptr inbounds %class.Ray, ptr %128, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %15, i64 12, i1 false), !tbaa.struct !16
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 4 %21, i64 12, i1 false)
  %130 = getelementptr inbounds { <2 x float>, float }, ptr %22, i32 0, i32 0
  %131 = load <2 x float>, ptr %130, align 4
  %132 = getelementptr inbounds { <2 x float>, float }, ptr %22, i32 0, i32 1
  %133 = load float, ptr %132, align 4
  %134 = call { <2 x float>, float } @_ZNK8Vector3fmiES_(ptr noundef nonnull align 4 dereferenceable(12) %129, <2 x float> %131, float %133)
  store { <2 x float>, float } %134, ptr %23, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 8 %23, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %24) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %25, ptr align 4 %20, i64 12, i1 false), !tbaa.struct !16
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %26, ptr align 4 %25, i64 12, i1 false)
  %135 = getelementptr inbounds { <2 x float>, float }, ptr %26, i32 0, i32 0
  %136 = load <2 x float>, ptr %135, align 4
  %137 = getelementptr inbounds { <2 x float>, float }, ptr %26, i32 0, i32 1
  %138 = load float, ptr %137, align 4
  %139 = call { <2 x float>, float } @_Z9normalize8Vector3f(<2 x float> %136, float %138)
  store { <2 x float>, float } %139, ptr %27, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %24, ptr align 8 %27, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #10
  store i32 0, ptr %28, align 4, !tbaa !9
  br label %140

140:                                              ; preds = %234, %4
  %141 = load i32, ptr %28, align 4, !tbaa !9
  %142 = sext i32 %141 to i64
  %143 = load ptr, ptr %8, align 8, !tbaa !5
  %144 = getelementptr inbounds %class.Scene, ptr %143, i32 0, i32 6
  %145 = call noundef i64 @_ZNKSt6vectorIP10PointLightSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %144) #10
  %146 = icmp ult i64 %142, %145
  br i1 %146, label %148, label %147

147:                                              ; preds = %140
  store i32 2, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #10
  br label %237

148:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 12, ptr %30) #10
  %149 = load ptr, ptr %8, align 8, !tbaa !5
  %150 = getelementptr inbounds %class.Scene, ptr %149, i32 0, i32 6
  %151 = load i32, ptr %28, align 4, !tbaa !9
  %152 = sext i32 %151 to i64
  %153 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10PointLightSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %150, i64 noundef %152) #10
  %154 = load ptr, ptr %153, align 8, !tbaa !5
  %155 = getelementptr inbounds %class.PointLight, ptr %154, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %31, ptr align 4 %15, i64 12, i1 false), !tbaa.struct !16
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %32, ptr align 4 %31, i64 12, i1 false)
  %156 = getelementptr inbounds { <2 x float>, float }, ptr %32, i32 0, i32 0
  %157 = load <2 x float>, ptr %156, align 4
  %158 = getelementptr inbounds { <2 x float>, float }, ptr %32, i32 0, i32 1
  %159 = load float, ptr %158, align 4
  %160 = call { <2 x float>, float } @_ZNK8Vector3fmiES_(ptr noundef nonnull align 4 dereferenceable(12) %155, <2 x float> %157, float %159)
  store { <2 x float>, float } %160, ptr %33, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %30, ptr align 8 %33, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %34) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %35, ptr align 4 %30, i64 12, i1 false), !tbaa.struct !16
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %36, ptr align 4 %35, i64 12, i1 false)
  %161 = getelementptr inbounds { <2 x float>, float }, ptr %36, i32 0, i32 0
  %162 = load <2 x float>, ptr %161, align 4
  %163 = getelementptr inbounds { <2 x float>, float }, ptr %36, i32 0, i32 1
  %164 = load float, ptr %163, align 4
  %165 = call { <2 x float>, float } @_Z9normalize8Vector3f(<2 x float> %162, float %164)
  store { <2 x float>, float } %165, ptr %37, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %34, ptr align 8 %37, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr %38) #10
  call void @_ZN3RayC1Ev(ptr noundef nonnull align 4 dereferenceable(24) %38)
  call void @llvm.lifetime.start.p0(i64 12, ptr %39) #10
  %166 = load ptr, ptr %8, align 8, !tbaa !5
  %167 = getelementptr inbounds %class.Scene, ptr %166, i32 0, i32 2
  %168 = load float, ptr %167, align 8, !tbaa !18
  %169 = call { <2 x float>, float } @_ZNK8Vector3fmlEf(ptr noundef nonnull align 4 dereferenceable(12) %34, float noundef %168)
  store { <2 x float>, float } %169, ptr %40, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %39, ptr align 8 %40, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %42, ptr align 4 %39, i64 12, i1 false), !tbaa.struct !16
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %43, ptr align 4 %42, i64 12, i1 false)
  %170 = getelementptr inbounds { <2 x float>, float }, ptr %43, i32 0, i32 0
  %171 = load <2 x float>, ptr %170, align 4
  %172 = getelementptr inbounds { <2 x float>, float }, ptr %43, i32 0, i32 1
  %173 = load float, ptr %172, align 4
  %174 = call { <2 x float>, float } @_ZNK8Vector3fplES_(ptr noundef nonnull align 4 dereferenceable(12) %15, <2 x float> %171, float %173)
  store { <2 x float>, float } %174, ptr %44, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %41, ptr align 8 %44, i64 12, i1 false)
  %175 = getelementptr inbounds %class.Ray, ptr %38, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %45, ptr align 4 %41, i64 12, i1 false)
  %176 = getelementptr inbounds { <2 x float>, float }, ptr %45, i32 0, i32 0
  %177 = load <2 x float>, ptr %176, align 4
  %178 = getelementptr inbounds { <2 x float>, float }, ptr %45, i32 0, i32 1
  %179 = load float, ptr %178, align 4
  %180 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN8Vector3faSES_(ptr noundef nonnull align 4 dereferenceable(12) %175, <2 x float> %177, float %179)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %46, ptr align 4 %34, i64 12, i1 false), !tbaa.struct !16
  %181 = getelementptr inbounds %class.Ray, ptr %38, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %47, ptr align 4 %46, i64 12, i1 false)
  %182 = getelementptr inbounds { <2 x float>, float }, ptr %47, i32 0, i32 0
  %183 = load <2 x float>, ptr %182, align 4
  %184 = getelementptr inbounds { <2 x float>, float }, ptr %47, i32 0, i32 1
  %185 = load float, ptr %184, align 4
  %186 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN8Vector3faSES_(ptr noundef nonnull align 4 dereferenceable(12) %181, <2 x float> %183, float %185)
  call void @llvm.lifetime.start.p0(i64 20, ptr %48) #10
  %187 = load ptr, ptr %8, align 8, !tbaa !5
  %188 = getelementptr inbounds %class.Scene, ptr %187, i32 0, i32 9
  call void @_Z12intersectRayRK3RayRKSt6vectorIP5ShapeSaIS4_EE(ptr dead_on_unwind writable sret(%struct.IntersectionData) align 4 %48, ptr noundef nonnull align 4 dereferenceable(24) %38, ptr noundef nonnull align 8 dereferenceable(24) %188)
  %189 = getelementptr inbounds %struct.IntersectionData, ptr %48, i32 0, i32 0
  %190 = load float, ptr %189, align 4, !tbaa !17
  %191 = call noundef float @_Z12vectorLengthRK8Vector3f(ptr noundef nonnull align 4 dereferenceable(12) %30)
  %192 = fcmp oge float %190, %191
  br i1 %192, label %193, label %229

193:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 12, ptr %49) #10
  %194 = load ptr, ptr %8, align 8, !tbaa !5
  %195 = getelementptr inbounds %class.Scene, ptr %194, i32 0, i32 6
  %196 = load i32, ptr %28, align 4, !tbaa !9
  %197 = sext i32 %196 to i64
  %198 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10PointLightSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %195, i64 noundef %197) #10
  %199 = load ptr, ptr %198, align 8, !tbaa !5
  %200 = call { <2 x float>, float } @_ZN10PointLight24computeLightContributionERK8Vector3f(ptr noundef nonnull align 4 dereferenceable(24) %199, ptr noundef nonnull align 4 dereferenceable(12) %15)
  store { <2 x float>, float } %200, ptr %50, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %49, ptr align 8 %50, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %51) #10
  %201 = load ptr, ptr %10, align 8, !tbaa !5
  %202 = load ptr, ptr %7, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.IntersectionData, ptr %202, i32 0, i32 1
  %204 = call { <2 x float>, float } @_Z14computeDiffusePK8MaterialRK8Vector3fS4_S4_(ptr noundef %201, ptr noundef nonnull align 4 dereferenceable(12) %203, ptr noundef nonnull align 4 dereferenceable(12) %34, ptr noundef nonnull align 4 dereferenceable(12) %49)
  store { <2 x float>, float } %204, ptr %52, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %51, ptr align 8 %52, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %53, ptr align 4 %51, i64 12, i1 false), !tbaa.struct !16
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %54, ptr align 4 %53, i64 12, i1 false)
  %205 = getelementptr inbounds { <2 x float>, float }, ptr %54, i32 0, i32 0
  %206 = load <2 x float>, ptr %205, align 4
  %207 = getelementptr inbounds { <2 x float>, float }, ptr %54, i32 0, i32 1
  %208 = load float, ptr %207, align 4
  %209 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN8Vector3fpLES_(ptr noundef nonnull align 4 dereferenceable(12) %5, <2 x float> %206, float %208)
  call void @llvm.lifetime.start.p0(i64 12, ptr %55) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %57, ptr align 4 %24, i64 12, i1 false), !tbaa.struct !16
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %58, ptr align 4 %57, i64 12, i1 false)
  %210 = getelementptr inbounds { <2 x float>, float }, ptr %58, i32 0, i32 0
  %211 = load <2 x float>, ptr %210, align 4
  %212 = getelementptr inbounds { <2 x float>, float }, ptr %58, i32 0, i32 1
  %213 = load float, ptr %212, align 4
  %214 = call { <2 x float>, float } @_ZNK8Vector3fplES_(ptr noundef nonnull align 4 dereferenceable(12) %34, <2 x float> %211, float %213)
  store { <2 x float>, float } %214, ptr %59, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %56, ptr align 8 %59, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %60, ptr align 4 %56, i64 12, i1 false)
  %215 = getelementptr inbounds { <2 x float>, float }, ptr %60, i32 0, i32 0
  %216 = load <2 x float>, ptr %215, align 4
  %217 = getelementptr inbounds { <2 x float>, float }, ptr %60, i32 0, i32 1
  %218 = load float, ptr %217, align 4
  %219 = call { <2 x float>, float } @_Z9normalize8Vector3f(<2 x float> %216, float %218)
  store { <2 x float>, float } %219, ptr %61, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %55, ptr align 8 %61, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %62) #10
  %220 = load ptr, ptr %10, align 8, !tbaa !5
  %221 = load ptr, ptr %7, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.IntersectionData, ptr %221, i32 0, i32 1
  %223 = call { <2 x float>, float } @_Z15computeSpecularPK8MaterialRK8Vector3fS4_S4_(ptr noundef %220, ptr noundef nonnull align 4 dereferenceable(12) %222, ptr noundef nonnull align 4 dereferenceable(12) %49, ptr noundef nonnull align 4 dereferenceable(12) %55)
  store { <2 x float>, float } %223, ptr %63, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %62, ptr align 8 %63, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %64, ptr align 4 %62, i64 12, i1 false), !tbaa.struct !16
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %65, ptr align 4 %64, i64 12, i1 false)
  %224 = getelementptr inbounds { <2 x float>, float }, ptr %65, i32 0, i32 0
  %225 = load <2 x float>, ptr %224, align 4
  %226 = getelementptr inbounds { <2 x float>, float }, ptr %65, i32 0, i32 1
  %227 = load float, ptr %226, align 4
  %228 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN8Vector3fpLES_(ptr noundef nonnull align 4 dereferenceable(12) %5, <2 x float> %225, float %227)
  call void @llvm.lifetime.end.p0(i64 12, ptr %62) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr %55) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr %51) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr %49) #10
  br label %230

229:                                              ; preds = %148
  store i32 4, ptr %29, align 4
  br label %231

230:                                              ; preds = %193
  store i32 0, ptr %29, align 4
  br label %231

231:                                              ; preds = %230, %229
  call void @llvm.lifetime.end.p0(i64 20, ptr %48) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr %39) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %38) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr %34) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr %30) #10
  %232 = load i32, ptr %29, align 4
  switch i32 %232, label %349 [
    i32 0, label %233
    i32 4, label %234
  ]

233:                                              ; preds = %231
  br label %234

234:                                              ; preds = %233, %231
  %235 = load i32, ptr %28, align 4, !tbaa !9
  %236 = add nsw i32 %235, 1
  store i32 %236, ptr %28, align 4, !tbaa !9
  br label %140, !llvm.loop !40

237:                                              ; preds = %147
  %238 = load ptr, ptr %10, align 8, !tbaa !5
  %239 = getelementptr inbounds %class.Material, ptr %238, i32 0, i32 5
  %240 = getelementptr inbounds %struct.Vector3f, ptr %239, i32 0, i32 0
  %241 = load float, ptr %240, align 4, !tbaa !11
  %242 = fcmp ogt float %241, 0.000000e+00
  br i1 %242, label %255, label %243

243:                                              ; preds = %237
  %244 = load ptr, ptr %10, align 8, !tbaa !5
  %245 = getelementptr inbounds %class.Material, ptr %244, i32 0, i32 5
  %246 = getelementptr inbounds %struct.Vector3f, ptr %245, i32 0, i32 1
  %247 = load float, ptr %246, align 4, !tbaa !11
  %248 = fcmp ogt float %247, 0.000000e+00
  br i1 %248, label %255, label %249

249:                                              ; preds = %243
  %250 = load ptr, ptr %10, align 8, !tbaa !5
  %251 = getelementptr inbounds %class.Material, ptr %250, i32 0, i32 5
  %252 = getelementptr inbounds %struct.Vector3f, ptr %251, i32 0, i32 2
  %253 = load float, ptr %252, align 4, !tbaa !11
  %254 = fcmp ogt float %253, 0.000000e+00
  br i1 %254, label %255, label %332

255:                                              ; preds = %249, %243, %237
  %256 = load i32, ptr %9, align 4, !tbaa !9
  %257 = icmp sgt i32 %256, 0
  br i1 %257, label %258, label %332

258:                                              ; preds = %255
  call void @llvm.lifetime.start.p0(i64 24, ptr %66) #10
  call void @_ZN3RayC1Ev(ptr noundef nonnull align 4 dereferenceable(24) %66)
  call void @llvm.lifetime.start.p0(i64 4, ptr %67) #10
  %259 = load ptr, ptr %7, align 8, !tbaa !5
  %260 = getelementptr inbounds %struct.IntersectionData, ptr %259, i32 0, i32 1
  %261 = call noundef float @_Z10dotProductRK8Vector3fS1_(ptr noundef nonnull align 4 dereferenceable(12) %260, ptr noundef nonnull align 4 dereferenceable(12) %24)
  store float %261, ptr %67, align 4, !tbaa !42
  call void @llvm.lifetime.start.p0(i64 12, ptr %69) #10
  %262 = call { <2 x float>, float } @_ZNK8Vector3fmlEf(ptr noundef nonnull align 4 dereferenceable(12) %24, float noundef -1.000000e+00)
  store { <2 x float>, float } %262, ptr %70, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %69, ptr align 8 %70, i64 12, i1 false)
  %263 = load ptr, ptr %7, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.IntersectionData, ptr %263, i32 0, i32 1
  %265 = load float, ptr %67, align 4, !tbaa !42
  %266 = fmul float 2.000000e+00, %265
  %267 = call { <2 x float>, float } @_ZNK8Vector3fmlEf(ptr noundef nonnull align 4 dereferenceable(12) %264, float noundef %266)
  store { <2 x float>, float } %267, ptr %72, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %71, ptr align 8 %72, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %73, ptr align 4 %71, i64 12, i1 false)
  %268 = getelementptr inbounds { <2 x float>, float }, ptr %73, i32 0, i32 0
  %269 = load <2 x float>, ptr %268, align 4
  %270 = getelementptr inbounds { <2 x float>, float }, ptr %73, i32 0, i32 1
  %271 = load float, ptr %270, align 4
  %272 = call { <2 x float>, float } @_ZNK8Vector3fplES_(ptr noundef nonnull align 4 dereferenceable(12) %69, <2 x float> %269, float %271)
  store { <2 x float>, float } %272, ptr %74, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %68, ptr align 8 %74, i64 12, i1 false)
  %273 = getelementptr inbounds %class.Ray, ptr %66, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %75, ptr align 4 %68, i64 12, i1 false)
  %274 = getelementptr inbounds { <2 x float>, float }, ptr %75, i32 0, i32 0
  %275 = load <2 x float>, ptr %274, align 4
  %276 = getelementptr inbounds { <2 x float>, float }, ptr %75, i32 0, i32 1
  %277 = load float, ptr %276, align 4
  %278 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN8Vector3faSES_(ptr noundef nonnull align 4 dereferenceable(12) %273, <2 x float> %275, float %277)
  call void @llvm.lifetime.end.p0(i64 12, ptr %69) #10
  %279 = getelementptr inbounds %class.Ray, ptr %66, i32 0, i32 1
  %280 = load ptr, ptr %8, align 8, !tbaa !5
  %281 = getelementptr inbounds %class.Scene, ptr %280, i32 0, i32 2
  %282 = load float, ptr %281, align 8, !tbaa !18
  %283 = call { <2 x float>, float } @_ZNK8Vector3fmlEf(ptr noundef nonnull align 4 dereferenceable(12) %279, float noundef %282)
  store { <2 x float>, float } %283, ptr %78, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %77, ptr align 8 %78, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %79, ptr align 4 %77, i64 12, i1 false)
  %284 = getelementptr inbounds { <2 x float>, float }, ptr %79, i32 0, i32 0
  %285 = load <2 x float>, ptr %284, align 4
  %286 = getelementptr inbounds { <2 x float>, float }, ptr %79, i32 0, i32 1
  %287 = load float, ptr %286, align 4
  %288 = call { <2 x float>, float } @_ZNK8Vector3fplES_(ptr noundef nonnull align 4 dereferenceable(12) %15, <2 x float> %285, float %287)
  store { <2 x float>, float } %288, ptr %80, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %76, ptr align 8 %80, i64 12, i1 false)
  %289 = getelementptr inbounds %class.Ray, ptr %66, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %81, ptr align 4 %76, i64 12, i1 false)
  %290 = getelementptr inbounds { <2 x float>, float }, ptr %81, i32 0, i32 0
  %291 = load <2 x float>, ptr %290, align 4
  %292 = getelementptr inbounds { <2 x float>, float }, ptr %81, i32 0, i32 1
  %293 = load float, ptr %292, align 4
  %294 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN8Vector3faSES_(ptr noundef nonnull align 4 dereferenceable(12) %289, <2 x float> %291, float %293)
  call void @llvm.lifetime.start.p0(i64 20, ptr %82) #10
  %295 = load ptr, ptr %8, align 8, !tbaa !5
  %296 = getelementptr inbounds %class.Scene, ptr %295, i32 0, i32 9
  call void @_Z12intersectRayRK3RayRKSt6vectorIP5ShapeSaIS4_EE(ptr dead_on_unwind writable sret(%struct.IntersectionData) align 4 %82, ptr noundef nonnull align 4 dereferenceable(24) %66, ptr noundef nonnull align 8 dereferenceable(24) %296)
  %297 = getelementptr inbounds %struct.IntersectionData, ptr %82, i32 0, i32 0
  %298 = load float, ptr %297, align 4, !tbaa !17
  %299 = fcmp une float %298, 0x47EFFFFFE0000000
  br i1 %299, label %300, label %331

300:                                              ; preds = %258
  call void @llvm.lifetime.start.p0(i64 12, ptr %83) #10
  %301 = load ptr, ptr %8, align 8, !tbaa !5
  %302 = load i32, ptr %9, align 4, !tbaa !9
  %303 = sub nsw i32 %302, 1
  %304 = call { <2 x float>, float } @_Z15computeRadianceRK3RayRK16IntersectionDataP5Scenei(ptr noundef nonnull align 4 dereferenceable(24) %66, ptr noundef nonnull align 4 dereferenceable(20) %82, ptr noundef %301, i32 noundef %303)
  store { <2 x float>, float } %304, ptr %84, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %83, ptr align 8 %84, i64 12, i1 false)
  %305 = load ptr, ptr %10, align 8, !tbaa !5
  %306 = getelementptr inbounds %class.Material, ptr %305, i32 0, i32 5
  %307 = getelementptr inbounds %struct.Vector3f, ptr %306, i32 0, i32 0
  %308 = load float, ptr %307, align 4, !tbaa !11
  %309 = getelementptr inbounds %struct.Vector3f, ptr %83, i32 0, i32 0
  %310 = load float, ptr %309, align 4, !tbaa !11
  %311 = fmul float %310, %308
  store float %311, ptr %309, align 4, !tbaa !11
  %312 = load ptr, ptr %10, align 8, !tbaa !5
  %313 = getelementptr inbounds %class.Material, ptr %312, i32 0, i32 5
  %314 = getelementptr inbounds %struct.Vector3f, ptr %313, i32 0, i32 1
  %315 = load float, ptr %314, align 4, !tbaa !11
  %316 = getelementptr inbounds %struct.Vector3f, ptr %83, i32 0, i32 1
  %317 = load float, ptr %316, align 4, !tbaa !11
  %318 = fmul float %317, %315
  store float %318, ptr %316, align 4, !tbaa !11
  %319 = load ptr, ptr %10, align 8, !tbaa !5
  %320 = getelementptr inbounds %class.Material, ptr %319, i32 0, i32 5
  %321 = getelementptr inbounds %struct.Vector3f, ptr %320, i32 0, i32 2
  %322 = load float, ptr %321, align 4, !tbaa !11
  %323 = getelementptr inbounds %struct.Vector3f, ptr %83, i32 0, i32 2
  %324 = load float, ptr %323, align 4, !tbaa !11
  %325 = fmul float %324, %322
  store float %325, ptr %323, align 4, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %85, ptr align 4 %83, i64 12, i1 false), !tbaa.struct !16
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %86, ptr align 4 %85, i64 12, i1 false)
  %326 = getelementptr inbounds { <2 x float>, float }, ptr %86, i32 0, i32 0
  %327 = load <2 x float>, ptr %326, align 4
  %328 = getelementptr inbounds { <2 x float>, float }, ptr %86, i32 0, i32 1
  %329 = load float, ptr %328, align 4
  %330 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN8Vector3fpLES_(ptr noundef nonnull align 4 dereferenceable(12) %5, <2 x float> %327, float %329)
  call void @llvm.lifetime.end.p0(i64 12, ptr %83) #10
  br label %331

331:                                              ; preds = %300, %258
  call void @llvm.lifetime.end.p0(i64 20, ptr %82) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %67) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %66) #10
  br label %332

332:                                              ; preds = %331, %255, %249
  call void @llvm.lifetime.start.p0(i64 4, ptr %87) #10
  store float 0.000000e+00, ptr %87, align 4, !tbaa !42
  %333 = getelementptr inbounds %struct.Vector3f, ptr %5, i32 0, i32 0
  %334 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %87, ptr noundef nonnull align 4 dereferenceable(4) %333)
  call void @llvm.lifetime.start.p0(i64 4, ptr %88) #10
  store float 2.550000e+02, ptr %88, align 4, !tbaa !42
  %335 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %334, ptr noundef nonnull align 4 dereferenceable(4) %88)
  %336 = load float, ptr %335, align 4, !tbaa !42
  %337 = getelementptr inbounds %struct.Vector3f, ptr %5, i32 0, i32 0
  store float %336, ptr %337, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %88) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %87) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %89) #10
  store float 0.000000e+00, ptr %89, align 4, !tbaa !42
  %338 = getelementptr inbounds %struct.Vector3f, ptr %5, i32 0, i32 1
  %339 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %89, ptr noundef nonnull align 4 dereferenceable(4) %338)
  call void @llvm.lifetime.start.p0(i64 4, ptr %90) #10
  store float 2.550000e+02, ptr %90, align 4, !tbaa !42
  %340 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %339, ptr noundef nonnull align 4 dereferenceable(4) %90)
  %341 = load float, ptr %340, align 4, !tbaa !42
  %342 = getelementptr inbounds %struct.Vector3f, ptr %5, i32 0, i32 1
  store float %341, ptr %342, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %90) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %89) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %91) #10
  store float 0.000000e+00, ptr %91, align 4, !tbaa !42
  %343 = getelementptr inbounds %struct.Vector3f, ptr %5, i32 0, i32 2
  %344 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %91, ptr noundef nonnull align 4 dereferenceable(4) %343)
  call void @llvm.lifetime.start.p0(i64 4, ptr %92) #10
  store float 2.550000e+02, ptr %92, align 4, !tbaa !42
  %345 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %344, ptr noundef nonnull align 4 dereferenceable(4) %92)
  %346 = load float, ptr %345, align 4, !tbaa !42
  %347 = getelementptr inbounds %struct.Vector3f, ptr %5, i32 0, i32 2
  store float %346, ptr %347, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %92) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %91) #10
  store i32 1, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr %20) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %93, ptr align 4 %5, i64 12, i1 false)
  %348 = load { <2 x float>, float }, ptr %93, align 8
  ret { <2 x float>, float } %348

349:                                              ; preds = %231
  unreachable
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN8Vector3faSES_(ptr noundef nonnull align 4 dereferenceable(12), <2 x float>, float) #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local { <2 x float>, float } @_ZNK8Vector3fplES_(ptr noundef nonnull align 4 dereferenceable(12), <2 x float>, float) #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local { <2 x float>, float } @_ZNK8Vector3fmiES_(ptr noundef nonnull align 4 dereferenceable(12), <2 x float>, float) #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, float } @_Z9normalize8Vector3f(<2 x float>, float) #7

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

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

declare void @_ZN3RayC1Ev(ptr noundef nonnull align 4 dereferenceable(24)) unnamed_addr #8

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef float @_Z12vectorLengthRK8Vector3f(ptr noundef nonnull align 4 dereferenceable(12)) #9

declare { <2 x float>, float } @_ZN10PointLight24computeLightContributionERK8Vector3f(ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12)) #8

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN8Vector3fpLES_(ptr noundef nonnull align 4 dereferenceable(12), <2 x float>, float) #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress 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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { inlinehint 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 #7 = { inlinehint 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 #8 = { "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 #9 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #10 = { 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 = !{!7, !7, i64 0}
!12 = !{!13, !10, i64 16}
!13 = !{!"_ZTS16IntersectionData", !14, i64 0, !15, i64 4, !10, i64 16}
!14 = !{!"float", !7, i64 0}
!15 = !{!"_ZTS8Vector3f", !7, i64 0, !7, i64 4, !7, i64 8}
!16 = !{i64 0, i64 4, !11, i64 4, i64 4, !11, i64 8, i64 4, !11}
!17 = !{!13, !14, i64 0}
!18 = !{!19, !14, i64 8}
!19 = !{!"_ZTS5Scene", !10, i64 0, !14, i64 4, !14, i64 8, !15, i64 12, !15, i64 24, !20, i64 40, !24, i64 64, !28, i64 88, !32, i64 112, !36, i64 136}
!20 = !{!"_ZTSSt6vectorIP6CameraSaIS1_EE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIP6CameraSaIS1_EE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIP6CameraSaIS1_EE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIP6CameraSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = !{!"_ZTSSt6vectorIP10PointLightSaIS1_EE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseIP10PointLightSaIS1_EE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIP10PointLightSaIS1_EE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIP10PointLightSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!28 = !{!"_ZTSSt6vectorIP8MaterialSaIS1_EE", !29, i64 0}
!29 = !{!"_ZTSSt12_Vector_baseIP8MaterialSaIS1_EE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIP8MaterialSaIS1_EE12_Vector_implE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIP8MaterialSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!32 = !{!"_ZTSSt6vectorI8Vector3fSaIS0_EE", !33, i64 0}
!33 = !{!"_ZTSSt12_Vector_baseI8Vector3fSaIS0_EE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseI8Vector3fSaIS0_EE12_Vector_implE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseI8Vector3fSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!36 = !{!"_ZTSSt6vectorIP5ShapeSaIS1_EE", !37, i64 0}
!37 = !{!"_ZTSSt12_Vector_baseIP5ShapeSaIS1_EE", !38, i64 0}
!38 = !{!"_ZTSNSt12_Vector_baseIP5ShapeSaIS1_EE12_Vector_implE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseIP5ShapeSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!40 = distinct !{!40, !41}
!41 = !{!"llvm.loop.mustprogress"}
!42 = !{!14, !14, 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"

%struct.IntersectionData = type { float, %struct.Vector3f, i32 }
%struct.Vector3f = type { %union.anon, %union.anon.0, %union.anon.1 }
%union.anon = type { float }
%union.anon.0 = type { float }
%union.anon.1 = type { float }
%class.Ray = type { %struct.Vector3f, %struct.Vector3f }

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12intersectRayRK3RayRKSt6vectorIP5ShapeSaIS4_EE(ptr dead_on_unwind noalias writable sret(%struct.IntersectionData) align 4, ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, float } @_Z15computeSpecularPK8MaterialRK8Vector3fS4_S4_(ptr noundef, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_Z10dotProductRK8Vector3fS1_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local { <2 x float>, float } @_ZNK8Vector3fmlEf(ptr noundef nonnull align 4 dereferenceable(12), float noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, float } @_Z14computeDiffusePK8MaterialRK8Vector3fS4_S4_(ptr noundef, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { <2 x float>, float } @_Z14computeAmbientPK8MaterialRK8Vector3f(ptr noundef, ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local { <2 x float>, float } @_Z15computeRadianceRK3RayRK16IntersectionDataP5Scenei(ptr noundef nonnull align 4 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(20) %1, ptr noundef %2, i32 noundef %3) local_unnamed_addr #2 {
  %5 = alloca %struct.Vector3f, align 8
  %6 = alloca %struct.Vector3f, align 8
  %7 = alloca %struct.Vector3f, align 8
  %8 = alloca %struct.Vector3f, align 8
  %9 = alloca %struct.Vector3f, align 8
  %10 = alloca %class.Ray, align 4
  %11 = alloca %struct.IntersectionData, align 4
  %12 = alloca %struct.Vector3f, align 8
  %13 = alloca %struct.Vector3f, align 8
  %14 = alloca %class.Ray, align 4
  %15 = alloca %struct.Vector3f, align 8
  %16 = alloca %struct.IntersectionData, align 4
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca float, align 4
  %20 = alloca float, align 4
  %21 = alloca float, align 4
  %22 = alloca float, align 4
  store <2 x float> zeroinitializer, ptr %5, align 8, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %5, i64 8
  store float 0.000000e+00, ptr %23, align 8, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %2, i64 88
  %25 = getelementptr inbounds i8, ptr %1, i64 16
  %26 = load i32, ptr %25, align 4, !tbaa !8
  %27 = add nsw i32 %26, -1
  %28 = sext i32 %27 to i64
  %29 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP8MaterialSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %28) #9
  %30 = load ptr, ptr %29, align 8, !tbaa !13
  %31 = getelementptr inbounds i8, ptr %2, i64 24
  %32 = tail call { <2 x float>, float } @_Z14computeAmbientPK8MaterialRK8Vector3f(ptr noundef %30, ptr noundef nonnull align 4 dereferenceable(12) %31)
  %.fca.0.extract162 = extractvalue { <2 x float>, float } %32, 0
  %.fca.1.extract163 = extractvalue { <2 x float>, float } %32, 1
  %33 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN8Vector3faSES_(ptr noundef nonnull align 4 dereferenceable(12) %5, <2 x float> %.fca.0.extract162, float %.fca.1.extract163)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #9
  %34 = getelementptr inbounds i8, ptr %0, i64 12
  %35 = load float, ptr %1, align 4, !tbaa !15
  %36 = call { <2 x float>, float } @_ZNK8Vector3fmlEf(ptr noundef nonnull align 4 dereferenceable(12) %34, float noundef %35)
  %.fca.0.extract152 = extractvalue { <2 x float>, float } %36, 0
  %.fca.1.extract153 = extractvalue { <2 x float>, float } %36, 1
  %37 = call { <2 x float>, float } @_ZNK8Vector3fplES_(ptr noundef nonnull align 4 dereferenceable(12) %0, <2 x float> %.fca.0.extract152, float %.fca.1.extract153)
  %.fca.0.extract146 = extractvalue { <2 x float>, float } %37, 0
  %.fca.1.extract147 = extractvalue { <2 x float>, float } %37, 1
  store <2 x float> %.fca.0.extract146, ptr %6, align 8
  %.sroa.2149.0..sroa_idx = getelementptr inbounds i8, ptr %6, i64 8
  store float %.fca.1.extract147, ptr %.sroa.2149.0..sroa_idx, align 8
  %38 = call { <2 x float>, float } @_ZNK8Vector3fmiES_(ptr noundef nonnull align 4 dereferenceable(12) %0, <2 x float> %.fca.0.extract146, float %.fca.1.extract147)
  %.fca.0.extract136 = extractvalue { <2 x float>, float } %38, 0
  %.fca.1.extract137 = extractvalue { <2 x float>, float } %38, 1
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #9
  %39 = call { <2 x float>, float } @_Z9normalize8Vector3f(<2 x float> %.fca.0.extract136, float %.fca.1.extract137)
  %.fca.0.extract128 = extractvalue { <2 x float>, float } %39, 0
  %.fca.1.extract129 = extractvalue { <2 x float>, float } %39, 1
  store <2 x float> %.fca.0.extract128, ptr %7, align 8
  %.sroa.2131.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 8
  store float %.fca.1.extract129, ptr %.sroa.2131.0..sroa_idx, align 8
  %40 = getelementptr inbounds i8, ptr %2, i64 64
  %41 = call noundef i64 @_ZNKSt6vectorIP10PointLightSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %40) #9
  %.not = icmp eq i64 %41, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %4
  %.sroa.2120.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 8
  %.sroa.2112.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 8
  %42 = getelementptr inbounds i8, ptr %2, i64 8
  %43 = getelementptr inbounds i8, ptr %10, i64 12
  %44 = getelementptr inbounds i8, ptr %2, i64 136
  %.sroa.286.0..sroa_idx = getelementptr inbounds i8, ptr %12, i64 8
  %45 = getelementptr inbounds i8, ptr %1, i64 4
  %.sroa.260.0..sroa_idx = getelementptr inbounds i8, ptr %13, i64 8
  br label %49

._crit_edge:                                      ; preds = %72, %4
  %46 = getelementptr inbounds i8, ptr %30, i64 44
  %47 = load float, ptr %46, align 4, !tbaa !5
  %48 = fcmp ogt float %47, 0.000000e+00
  br i1 %48, label %84, label %75

49:                                               ; preds = %.lr.ph, %72
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %72 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #9
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10PointLightSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %indvars.iv) #9
  %51 = load ptr, ptr %50, align 8, !tbaa !13
  %.sroa.0123.0.copyload = load <2 x float>, ptr %6, align 8
  %.sroa.2124.0.copyload = load float, ptr %.sroa.2149.0..sroa_idx, align 8, !tbaa !5
  %52 = call { <2 x float>, float } @_ZNK8Vector3fmiES_(ptr noundef nonnull align 4 dereferenceable(12) %51, <2 x float> %.sroa.0123.0.copyload, float %.sroa.2124.0.copyload)
  %.fca.0.extract117 = extractvalue { <2 x float>, float } %52, 0
  %.fca.1.extract118 = extractvalue { <2 x float>, float } %52, 1
  store <2 x float> %.fca.0.extract117, ptr %8, align 8
  store float %.fca.1.extract118, ptr %.sroa.2120.0..sroa_idx, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #9
  %53 = call { <2 x float>, float } @_Z9normalize8Vector3f(<2 x float> %.fca.0.extract117, float %.fca.1.extract118)
  %.fca.0.extract109 = extractvalue { <2 x float>, float } %53, 0
  %.fca.1.extract110 = extractvalue { <2 x float>, float } %53, 1
  store <2 x float> %.fca.0.extract109, ptr %9, align 8
  store float %.fca.1.extract110, ptr %.sroa.2112.0..sroa_idx, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #9
  call void @_ZN3RayC1Ev(ptr noundef nonnull align 4 dereferenceable(24) %10)
  %54 = load float, ptr %42, align 8, !tbaa !16
  %55 = call { <2 x float>, float } @_ZNK8Vector3fmlEf(ptr noundef nonnull align 4 dereferenceable(12) %9, float noundef %54)
  %.fca.0.extract103 = extractvalue { <2 x float>, float } %55, 0
  %.fca.1.extract104 = extractvalue { <2 x float>, float } %55, 1
  %56 = call { <2 x float>, float } @_ZNK8Vector3fplES_(ptr noundef nonnull align 4 dereferenceable(12) %6, <2 x float> %.fca.0.extract103, float %.fca.1.extract104)
  %.fca.0.extract93 = extractvalue { <2 x float>, float } %56, 0
  %.fca.1.extract94 = extractvalue { <2 x float>, float } %56, 1
  %57 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN8Vector3faSES_(ptr noundef nonnull align 4 dereferenceable(12) %10, <2 x float> %.fca.0.extract93, float %.fca.1.extract94)
  %.sroa.089.0.copyload = load <2 x float>, ptr %9, align 8
  %.sroa.290.0.copyload = load float, ptr %.sroa.2112.0..sroa_idx, align 8, !tbaa !5
  %58 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN8Vector3faSES_(ptr noundef nonnull align 4 dereferenceable(12) %43, <2 x float> %.sroa.089.0.copyload, float %.sroa.290.0.copyload)
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %11) #9
  call void @_Z12intersectRayRK3RayRKSt6vectorIP5ShapeSaIS4_EE(ptr dead_on_unwind nonnull writable sret(%struct.IntersectionData) align 4 %11, ptr noundef nonnull align 4 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %44)
  %59 = load float, ptr %11, align 4, !tbaa !15
  %60 = call noundef float @_Z12vectorLengthRK8Vector3f(ptr noundef nonnull align 4 dereferenceable(12) %8)
  %61 = fcmp ult float %59, %60
  br i1 %61, label %72, label %62

62:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %12) #9
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10PointLightSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %indvars.iv) #9
  %64 = load ptr, ptr %63, align 8, !tbaa !13
  %65 = call { <2 x float>, float } @_ZN10PointLight24computeLightContributionERK8Vector3f(ptr noundef nonnull align 4 dereferenceable(24) %64, ptr noundef nonnull align 4 dereferenceable(12) %6)
  %.fca.0.extract83 = extractvalue { <2 x float>, float } %65, 0
  %.fca.1.extract84 = extractvalue { <2 x float>, float } %65, 1
  store <2 x float> %.fca.0.extract83, ptr %12, align 8
  store float %.fca.1.extract84, ptr %.sroa.286.0..sroa_idx, align 8
  %66 = call { <2 x float>, float } @_Z14computeDiffusePK8MaterialRK8Vector3fS4_S4_(ptr noundef %30, ptr noundef nonnull align 4 dereferenceable(12) %45, ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %12)
  %.fca.0.extract77 = extractvalue { <2 x float>, float } %66, 0
  %.fca.1.extract78 = extractvalue { <2 x float>, float } %66, 1
  %67 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN8Vector3fpLES_(ptr noundef nonnull align 4 dereferenceable(12) %5, <2 x float> %.fca.0.extract77, float %.fca.1.extract78)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %13) #9
  %68 = call { <2 x float>, float } @_ZNK8Vector3fplES_(ptr noundef nonnull align 4 dereferenceable(12) %9, <2 x float> %.fca.0.extract128, float %.fca.1.extract129)
  %.fca.0.extract63 = extractvalue { <2 x float>, float } %68, 0
  %.fca.1.extract64 = extractvalue { <2 x float>, float } %68, 1
  %69 = call { <2 x float>, float } @_Z9normalize8Vector3f(<2 x float> %.fca.0.extract63, float %.fca.1.extract64)
  %.fca.0.extract57 = extractvalue { <2 x float>, float } %69, 0
  %.fca.1.extract58 = extractvalue { <2 x float>, float } %69, 1
  store <2 x float> %.fca.0.extract57, ptr %13, align 8
  store float %.fca.1.extract58, ptr %.sroa.260.0..sroa_idx, align 8
  %70 = call { <2 x float>, float } @_Z15computeSpecularPK8MaterialRK8Vector3fS4_S4_(ptr noundef %30, ptr noundef nonnull align 4 dereferenceable(12) %45, ptr noundef nonnull align 4 dereferenceable(12) %12, ptr noundef nonnull align 4 dereferenceable(12) %13)
  %.fca.0.extract52 = extractvalue { <2 x float>, float } %70, 0
  %.fca.1.extract53 = extractvalue { <2 x float>, float } %70, 1
  %71 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN8Vector3fpLES_(ptr noundef nonnull align 4 dereferenceable(12) %5, <2 x float> %.fca.0.extract52, float %.fca.1.extract53)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #9
  br label %72

72:                                               ; preds = %49, %62
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %11) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %73 = call noundef i64 @_ZNKSt6vectorIP10PointLightSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %40) #9
  %74 = icmp ugt i64 %73, %indvars.iv.next
  br i1 %74, label %49, label %._crit_edge, !llvm.loop !38

75:                                               ; preds = %._crit_edge
  %76 = getelementptr inbounds i8, ptr %30, i64 48
  %77 = load float, ptr %76, align 4, !tbaa !5
  %78 = fcmp ogt float %77, 0.000000e+00
  br i1 %78, label %84, label %79

79:                                               ; preds = %75
  %80 = getelementptr inbounds i8, ptr %30, i64 52
  %81 = load float, ptr %80, align 4, !tbaa !5
  %82 = fcmp ogt float %81, 0.000000e+00
  %83 = icmp sgt i32 %3, 0
  %or.cond = and i1 %83, %82
  br i1 %or.cond, label %85, label %112

84:                                               ; preds = %75, %._crit_edge
  %.old1 = icmp sgt i32 %3, 0
  br i1 %.old1, label %85, label %112

85:                                               ; preds = %79, %84
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #9
  call void @_ZN3RayC1Ev(ptr noundef nonnull align 4 dereferenceable(24) %14)
  %86 = getelementptr inbounds i8, ptr %1, i64 4
  %87 = call noundef float @_Z10dotProductRK8Vector3fS1_(ptr noundef nonnull align 4 dereferenceable(12) %86, ptr noundef nonnull align 4 dereferenceable(12) %7)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %15) #9
  %88 = call { <2 x float>, float } @_ZNK8Vector3fmlEf(ptr noundef nonnull align 4 dereferenceable(12) %7, float noundef -1.000000e+00)
  %.fca.0.extract42 = extractvalue { <2 x float>, float } %88, 0
  %.fca.1.extract43 = extractvalue { <2 x float>, float } %88, 1
  store <2 x float> %.fca.0.extract42, ptr %15, align 8
  %.sroa.245.0..sroa_idx = getelementptr inbounds i8, ptr %15, i64 8
  store float %.fca.1.extract43, ptr %.sroa.245.0..sroa_idx, align 8
  %89 = fmul float %87, 2.000000e+00
  %90 = call { <2 x float>, float } @_ZNK8Vector3fmlEf(ptr noundef nonnull align 4 dereferenceable(12) %86, float noundef %89)
  %.fca.0.extract36 = extractvalue { <2 x float>, float } %90, 0
  %.fca.1.extract37 = extractvalue { <2 x float>, float } %90, 1
  %91 = call { <2 x float>, float } @_ZNK8Vector3fplES_(ptr noundef nonnull align 4 dereferenceable(12) %15, <2 x float> %.fca.0.extract36, float %.fca.1.extract37)
  %.fca.0.extract30 = extractvalue { <2 x float>, float } %91, 0
  %.fca.1.extract31 = extractvalue { <2 x float>, float } %91, 1
  %92 = getelementptr inbounds i8, ptr %14, i64 12
  %93 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN8Vector3faSES_(ptr noundef nonnull align 4 dereferenceable(12) %92, <2 x float> %.fca.0.extract30, float %.fca.1.extract31)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %15) #9
  %94 = getelementptr inbounds i8, ptr %2, i64 8
  %95 = load float, ptr %94, align 8, !tbaa !16
  %96 = call { <2 x float>, float } @_ZNK8Vector3fmlEf(ptr noundef nonnull align 4 dereferenceable(12) %92, float noundef %95)
  %.fca.0.extract20 = extractvalue { <2 x float>, float } %96, 0
  %.fca.1.extract21 = extractvalue { <2 x float>, float } %96, 1
  %97 = call { <2 x float>, float } @_ZNK8Vector3fplES_(ptr noundef nonnull align 4 dereferenceable(12) %6, <2 x float> %.fca.0.extract20, float %.fca.1.extract21)
  %.fca.0.extract14 = extractvalue { <2 x float>, float } %97, 0
  %.fca.1.extract15 = extractvalue { <2 x float>, float } %97, 1
  %98 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN8Vector3faSES_(ptr noundef nonnull align 4 dereferenceable(12) %14, <2 x float> %.fca.0.extract14, float %.fca.1.extract15)
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %16) #9
  %99 = getelementptr inbounds i8, ptr %2, i64 136
  call void @_Z12intersectRayRK3RayRKSt6vectorIP5ShapeSaIS4_EE(ptr dead_on_unwind nonnull writable sret(%struct.IntersectionData) align 4 %16, ptr noundef nonnull align 4 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %99)
  %100 = load float, ptr %16, align 4, !tbaa !15
  %101 = fcmp une float %100, 0x47EFFFFFE0000000
  br i1 %101, label %102, label %111

102:                                              ; preds = %85
  %103 = add nsw i32 %3, -1
  %104 = call { <2 x float>, float } @_Z15computeRadianceRK3RayRK16IntersectionDataP5Scenei(ptr noundef nonnull align 4 dereferenceable(24) %14, ptr noundef nonnull align 4 dereferenceable(20) %16, ptr noundef nonnull %2, i32 noundef %103)
  %.fca.0.extract = extractvalue { <2 x float>, float } %104, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %104, 1
  %105 = load <2 x float>, ptr %46, align 4, !tbaa !5
  %106 = fmul <2 x float> %105, %.fca.0.extract
  %107 = getelementptr inbounds i8, ptr %30, i64 52
  %108 = load float, ptr %107, align 4, !tbaa !5
  %109 = fmul float %.fca.1.extract, %108
  %110 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN8Vector3fpLES_(ptr noundef nonnull align 4 dereferenceable(12) %5, <2 x float> %106, float %109)
  br label %111

111:                                              ; preds = %102, %85
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %16) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #9
  br label %112

112:                                              ; preds = %111, %84, %79
  %113 = getelementptr inbounds i8, ptr %5, i64 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #9
  store float 0.000000e+00, ptr %17, align 4, !tbaa !40
  %114 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #9
  store float 2.550000e+02, ptr %18, align 4, !tbaa !40
  %115 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %114, ptr noundef nonnull align 4 dereferenceable(4) %18)
  %116 = load float, ptr %115, align 4, !tbaa !40
  store float %116, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #9
  store float 0.000000e+00, ptr %19, align 4, !tbaa !40
  %117 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %113)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #9
  store float 2.550000e+02, ptr %20, align 4, !tbaa !40
  %118 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %117, ptr noundef nonnull align 4 dereferenceable(4) %20)
  %119 = load float, ptr %118, align 4, !tbaa !40
  store float %119, ptr %113, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %21) #9
  store float 0.000000e+00, ptr %21, align 4, !tbaa !40
  %120 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %21, ptr noundef nonnull align 4 dereferenceable(4) %23)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %22) #9
  store float 2.550000e+02, ptr %22, align 4, !tbaa !40
  %121 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %120, ptr noundef nonnull align 4 dereferenceable(4) %22)
  %122 = load float, ptr %121, align 4, !tbaa !40
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #9
  %.sroa.0.0.copyload = load <2 x float>, ptr %5, align 8
  %.fca.0.insert = insertvalue { <2 x float>, float } poison, <2 x float> %.sroa.0.0.copyload, 0
  %.fca.1.insert = insertvalue { <2 x float>, float } %.fca.0.insert, float %122, 1
  ret { <2 x float>, float } %.fca.1.insert
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local { <2 x float>, float } @_ZNK8Vector3fplES_(ptr noundef nonnull align 4 dereferenceable(12), <2 x float>, float) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local { <2 x float>, float } @_ZNK8Vector3fmiES_(ptr noundef nonnull align 4 dereferenceable(12), <2 x float>, float) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, float } @_Z9normalize8Vector3f(<2 x float>, float) local_unnamed_addr #6

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

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

declare void @_ZN3RayC1Ev(ptr noundef nonnull align 4 dereferenceable(24)) unnamed_addr #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef float @_Z12vectorLengthRK8Vector3f(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #8

declare { <2 x float>, float } @_ZN10PointLight24computeLightContributionERK8Vector3f(ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #7

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress 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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { inlinehint 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 = { inlinehint 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 #7 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { 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"}
!8 = !{!9, !12, i64 16}
!9 = !{!"_ZTS16IntersectionData", !10, i64 0, !11, i64 4, !12, i64 16}
!10 = !{!"float", !6, i64 0}
!11 = !{!"_ZTS8Vector3f", !6, i64 0, !6, i64 4, !6, i64 8}
!12 = !{!"int", !6, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !6, i64 0}
!15 = !{!9, !10, i64 0}
!16 = !{!17, !10, i64 8}
!17 = !{!"_ZTS5Scene", !12, i64 0, !10, i64 4, !10, i64 8, !11, i64 12, !11, i64 24, !18, i64 40, !22, i64 64, !26, i64 88, !30, i64 112, !34, i64 136}
!18 = !{!"_ZTSSt6vectorIP6CameraSaIS1_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIP6CameraSaIS1_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIP6CameraSaIS1_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIP6CameraSaIS1_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!22 = !{!"_ZTSSt6vectorIP10PointLightSaIS1_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIP10PointLightSaIS1_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIP10PointLightSaIS1_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIP10PointLightSaIS1_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!26 = !{!"_ZTSSt6vectorIP8MaterialSaIS1_EE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseIP8MaterialSaIS1_EE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIP8MaterialSaIS1_EE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIP8MaterialSaIS1_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!30 = !{!"_ZTSSt6vectorI8Vector3fSaIS0_EE", !31, i64 0}
!31 = !{!"_ZTSSt12_Vector_baseI8Vector3fSaIS0_EE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseI8Vector3fSaIS0_EE12_Vector_implE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseI8Vector3fSaIS0_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!34 = !{!"_ZTSSt6vectorIP5ShapeSaIS1_EE", !35, i64 0}
!35 = !{!"_ZTSSt12_Vector_baseIP5ShapeSaIS1_EE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseIP5ShapeSaIS1_EE12_Vector_implE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseIP5ShapeSaIS1_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.mustprogress"}
!40 = !{!10, !10, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass