; LLVM IR from nikitakaraevv/ray-tracing-engine :: source/Main.ll (ZN8Renderer5shadeERK3RayR4Vec3IiERmRfS7_S7_RS3_IfES9_S9_)

; 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.Vec3 = type { [3 x float] }
%class.Material = type { ptr, float, float, %class.Vec3, %class.Vec3 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%class.LightSource = type { ptr, %class.Vec3, %class.Vec3, %class.Vec3, %class.Vec3, %class.Vec3, %class.Vec3, float, %"class.std::uniform_real_distribution", float, float, float, float, float }
%"class.std::uniform_real_distribution" = type { %"struct.std::uniform_real_distribution<float>::param_type" }
%"struct.std::uniform_real_distribution<float>::param_type" = type { float, float }
%class.Ray = type { %class.Vec3, %class.Vec3 }
%class.Renderer = type <{ ptr, i32, i32, i32, i32, %class.PhotonMap, %class.PhotonMap, %class.RayTracer, %class.Scene, float, [4 x i8] }>
%class.PhotonMap = type <{ %class.RayTracer, %"class.std::vector", i32, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Particle, std::allocator<Particle>>::_Vector_impl" }
%"struct.std::_Vector_base<Particle, std::allocator<Particle>>::_Vector_impl" = type { %"struct.std::_Vector_base<Particle, std::allocator<Particle>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Particle, std::allocator<Particle>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.RayTracer = type { ptr }
%class.Scene = type { ptr, %class.Camera, %"class.std::vector.0", %"class.std::vector.5" }
%class.Camera = type { float, float, %class.Vec3, %class.Vec3, %class.Vec3, %class.Vec3 }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<LightSource, std::allocator<LightSource>>::_Vector_impl" }
%"struct.std::_Vector_base<LightSource, std::allocator<LightSource>>::_Vector_impl" = type { %"struct.std::_Vector_base<LightSource, std::allocator<LightSource>>::_Vector_impl_data" }
%"struct.std::_Vector_base<LightSource, std::allocator<LightSource>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<Mesh, std::allocator<Mesh>>::_Vector_impl" }
%"struct.std::_Vector_base<Mesh, std::allocator<Mesh>>::_Vector_impl" = type { %"struct.std::_Vector_base<Mesh, std::allocator<Mesh>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Mesh, std::allocator<Mesh>>::_Vector_impl_data" = type { ptr, ptr, ptr }

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8Renderer5shadeERK3RayR4Vec3IiERmRfS7_S7_RS3_IfES9_S9_(ptr noundef nonnull align 8 dereferenceable(228) %0, ptr noundef nonnull align 4 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef nonnull align 4 dereferenceable(12) %8, ptr noundef nonnull align 4 dereferenceable(12) %9) #0 align 2 personality ptr @__gxx_personality_v0 {
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca float, align 4
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca %class.Vec3, align 4
  %27 = alloca %class.Vec3, align 4
  %28 = alloca ptr, align 8
  %29 = alloca i32, align 4
  %30 = alloca %class.Vec3, align 4
  %31 = alloca %class.Vec3, align 4
  %32 = alloca %class.Vec3, align 4
  %33 = alloca %class.Material, align 8
  %34 = alloca %class.Vec3, align 4
  %35 = alloca ptr, align 8
  %36 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %37 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %38 = alloca i32, align 4
  %39 = alloca %class.LightSource, align 8
  %40 = alloca %class.Vec3, align 4
  %41 = alloca %class.Vec3, align 4
  %42 = alloca %class.Ray, align 4
  %43 = alloca %class.Vec3, align 4
  %44 = alloca %class.Vec3, align 4
  %45 = alloca %class.Vec3, align 4
  %46 = alloca %class.Vec3, align 4
  store ptr %0, ptr %11, align 8, !tbaa !5
  store ptr %1, ptr %12, align 8, !tbaa !5
  store ptr %2, ptr %13, align 8, !tbaa !5
  store ptr %3, ptr %14, align 8, !tbaa !5
  store ptr %4, ptr %15, align 8, !tbaa !5
  store ptr %5, ptr %16, align 8, !tbaa !5
  store ptr %6, ptr %17, align 8, !tbaa !5
  store ptr %7, ptr %18, align 8, !tbaa !5
  store ptr %8, ptr %19, align 8, !tbaa !5
  store ptr %9, ptr %20, align 8, !tbaa !5
  %47 = load ptr, ptr %11, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  %48 = load ptr, ptr %15, align 8, !tbaa !5
  %49 = load float, ptr %48, align 4, !tbaa !9
  %50 = fsub float 1.000000e+00, %49
  %51 = load ptr, ptr %16, align 8, !tbaa !5
  %52 = load float, ptr %51, align 4, !tbaa !9
  %53 = fsub float %50, %52
  store float %53, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %54 = getelementptr inbounds %class.Renderer, ptr %47, i32 0, i32 8
  %55 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN5Scene6meshesEv(ptr noundef nonnull align 8 dereferenceable(112) %54)
  %56 = load ptr, ptr %14, align 8, !tbaa !5
  %57 = load i64, ptr %56, align 8, !tbaa !11
  %58 = call noundef nonnull align 8 dereferenceable(208) ptr @_ZNSt6vectorI4MeshSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %55, i64 noundef %57) #5
  store ptr %58, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  %59 = load ptr, ptr %22, align 8, !tbaa !5
  %60 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK4Mesh15vertexPositionsEv(ptr noundef nonnull align 8 dereferenceable(208) %59)
  store ptr %60, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %61 = load ptr, ptr %22, align 8, !tbaa !5
  %62 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK4Mesh13vertexNormalsEv(ptr noundef nonnull align 8 dereferenceable(208) %61)
  store ptr %62, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  %63 = getelementptr inbounds %class.Renderer, ptr %47, i32 0, i32 8
  %64 = call noundef nonnull align 4 dereferenceable(56) ptr @_ZN5Scene6cameraEv(ptr noundef nonnull align 8 dereferenceable(112) %63)
  store ptr %64, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %26) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %27) #5
  %65 = load ptr, ptr %24, align 8, !tbaa !5
  %66 = load ptr, ptr %13, align 8, !tbaa !5
  %67 = load float, ptr %21, align 4, !tbaa !9
  %68 = load ptr, ptr %15, align 8, !tbaa !5
  %69 = load float, ptr %68, align 4, !tbaa !9
  %70 = load ptr, ptr %16, align 8, !tbaa !5
  %71 = load float, ptr %70, align 4, !tbaa !9
  call void @_ZN8Renderer6dotArrERKSt6vectorI4Vec3IfESaIS2_EERS1_IiEfff(ptr dead_on_unwind writable sret(%class.Vec3) align 4 %27, ptr noundef nonnull align 8 dereferenceable(228) %47, ptr noundef nonnull align 8 dereferenceable(24) %65, ptr noundef nonnull align 4 dereferenceable(12) %66, float noundef %67, float noundef %69, float noundef %71)
  invoke void @_Z9normalizeIfE4Vec3IT_ERKS2_(ptr dead_on_unwind writable sret(%class.Vec3) align 4 %26, ptr noundef nonnull align 4 dereferenceable(12) %27)
          to label %72 unwind label %108

72:                                               ; preds = %10
  %73 = load ptr, ptr %18, align 8, !tbaa !5
  %74 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN4Vec3IfEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %73, ptr noundef nonnull align 4 dereferenceable(12) %26)
          to label %75 unwind label %112

75:                                               ; preds = %72
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %26) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %27) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %26) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %30) #5
  %76 = load ptr, ptr %23, align 8, !tbaa !5
  %77 = load ptr, ptr %13, align 8, !tbaa !5
  %78 = load float, ptr %21, align 4, !tbaa !9
  %79 = load ptr, ptr %15, align 8, !tbaa !5
  %80 = load float, ptr %79, align 4, !tbaa !9
  %81 = load ptr, ptr %16, align 8, !tbaa !5
  %82 = load float, ptr %81, align 4, !tbaa !9
  call void @_ZN8Renderer6dotArrERKSt6vectorI4Vec3IfESaIS2_EERS1_IiEfff(ptr dead_on_unwind writable sret(%class.Vec3) align 4 %30, ptr noundef nonnull align 8 dereferenceable(228) %47, ptr noundef nonnull align 8 dereferenceable(24) %76, ptr noundef nonnull align 4 dereferenceable(12) %77, float noundef %78, float noundef %80, float noundef %82)
  %83 = load ptr, ptr %19, align 8, !tbaa !5
  %84 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN4Vec3IfEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %83, ptr noundef nonnull align 4 dereferenceable(12) %30)
          to label %85 unwind label %117

85:                                               ; preds = %75
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %30) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %30) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %31) #5
  call void @_ZN4Vec3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %31)
  call void @llvm.lifetime.start.p0(i64 12, ptr %32) #5
  invoke void @_ZN4Vec3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %32)
          to label %86 unwind label %121

86:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 40, ptr %33) #5
  %87 = load ptr, ptr %22, align 8, !tbaa !5
  %88 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZNK4Mesh8materialEv(ptr noundef nonnull align 8 dereferenceable(208) %87)
          to label %89 unwind label %125

89:                                               ; preds = %86
  invoke void @_ZN8MaterialC2ERKS_(ptr noundef nonnull align 8 dereferenceable(40) %33, ptr noundef nonnull align 8 dereferenceable(40) %88)
          to label %90 unwind label %125

90:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 12, ptr %34) #5
  %91 = load ptr, ptr %25, align 8, !tbaa !5
  %92 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZNK6Camera8positionEv(ptr noundef nonnull align 4 dereferenceable(56) %91)
          to label %93 unwind label %129

93:                                               ; preds = %90
  %94 = load ptr, ptr %19, align 8, !tbaa !5
  invoke void @_ZNK4Vec3IfEmiERKS0_(ptr dead_on_unwind writable sret(%class.Vec3) align 4 %34, ptr noundef nonnull align 4 dereferenceable(12) %92, ptr noundef nonnull align 4 dereferenceable(12) %94)
          to label %95 unwind label %129

95:                                               ; preds = %93
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #5
  %96 = getelementptr inbounds %class.Renderer, ptr %47, i32 0, i32 8
  %97 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5Scene12lightsourcesEv(ptr noundef nonnull align 8 dereferenceable(112) %96)
          to label %98 unwind label %133

98:                                               ; preds = %95
  store ptr %97, ptr %35, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #5
  %99 = load ptr, ptr %35, align 8, !tbaa !5
  %100 = call ptr @_ZNSt6vectorI11LightSourceSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %99) #5
  %101 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %36, i32 0, i32 0
  store ptr %100, ptr %101, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #5
  %102 = load ptr, ptr %35, align 8, !tbaa !5
  %103 = call ptr @_ZNSt6vectorI11LightSourceSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %102) #5
  %104 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %37, i32 0, i32 0
  store ptr %103, ptr %104, align 8
  br label %105

105:                                              ; preds = %199, %98
  %106 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP11LightSourceSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull align 8 dereferenceable(8) %37) #5
  br i1 %106, label %137, label %107

107:                                              ; preds = %105
  store i32 2, ptr %38, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #5
  br label %238

108:                                              ; preds = %10
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %28, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %29, align 4
  br label %116

112:                                              ; preds = %72
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %28, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %29, align 4
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %26) #5
  br label %116

116:                                              ; preds = %112, %108
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %27) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %26) #5
  br label %242

117:                                              ; preds = %75
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %28, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %29, align 4
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %30) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %30) #5
  br label %242

121:                                              ; preds = %85
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %28, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %29, align 4
  br label %241

125:                                              ; preds = %89, %86
  %126 = landingpad { ptr, i32 }
          cleanup
  %127 = extractvalue { ptr, i32 } %126, 0
  store ptr %127, ptr %28, align 8
  %128 = extractvalue { ptr, i32 } %126, 1
  store i32 %128, ptr %29, align 4
  br label %240

129:                                              ; preds = %93, %90
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %28, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %29, align 4
  br label %239

133:                                              ; preds = %95
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %28, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %29, align 4
  br label %237

137:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 112, ptr %39) #5
  %138 = call noundef nonnull align 8 dereferenceable(112) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP11LightSourceSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %36) #5
  invoke void @_ZN11LightSourceC2ERKS_(ptr noundef nonnull align 8 dereferenceable(112) %39, ptr noundef nonnull align 8 dereferenceable(112) %138)
          to label %139 unwind label %155

139:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 12, ptr %40) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %41) #5
  invoke void @_ZN11LightSource16randAreaPositionEv(ptr dead_on_unwind writable sret(%class.Vec3) align 4 %41, ptr noundef nonnull align 8 dereferenceable(112) %39)
          to label %140 unwind label %159

140:                                              ; preds = %139
  %141 = load ptr, ptr %19, align 8, !tbaa !5
  invoke void @_ZNK4Vec3IfEmiERKS0_(ptr dead_on_unwind writable sret(%class.Vec3) align 4 %40, ptr noundef nonnull align 4 dereferenceable(12) %41, ptr noundef nonnull align 4 dereferenceable(12) %141)
          to label %142 unwind label %163

142:                                              ; preds = %140
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %41) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %41) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %42) #5
  %143 = load ptr, ptr %19, align 8, !tbaa !5
  invoke void @_ZN3RayC2ERK4Vec3IfES3_(ptr noundef nonnull align 4 dereferenceable(24) %42, ptr noundef nonnull align 4 dereferenceable(12) %143, ptr noundef nonnull align 4 dereferenceable(12) %40)
          to label %144 unwind label %168

144:                                              ; preds = %142
  %145 = getelementptr inbounds %class.Renderer, ptr %47, i32 0, i32 7
  %146 = getelementptr inbounds %class.Renderer, ptr %47, i32 0, i32 8
  %147 = load ptr, ptr %14, align 8, !tbaa !5
  %148 = load ptr, ptr %13, align 8, !tbaa !5
  %149 = load ptr, ptr %15, align 8, !tbaa !5
  %150 = load ptr, ptr %16, align 8, !tbaa !5
  %151 = load ptr, ptr %17, align 8, !tbaa !5
  %152 = invoke noundef zeroext i1 @_ZN9RayTracer8rayTraceERK3RayRK5SceneRmR4Vec3IiERfSA_SA_(ptr noundef nonnull align 8 dereferenceable(8) %145, ptr noundef nonnull align 4 dereferenceable(24) %42, ptr noundef nonnull align 8 dereferenceable(112) %146, ptr noundef nonnull align 8 dereferenceable(8) %147, ptr noundef nonnull align 4 dereferenceable(12) %148, ptr noundef nonnull align 4 dereferenceable(4) %149, ptr noundef nonnull align 4 dereferenceable(4) %150, ptr noundef nonnull align 4 dereferenceable(4) %151)
          to label %153 unwind label %172

153:                                              ; preds = %144
  br i1 %152, label %154, label %176

154:                                              ; preds = %153
  store i32 3, ptr %38, align 4
  br label %193

155:                                              ; preds = %137
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %28, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %29, align 4
  br label %236

159:                                              ; preds = %139
  %160 = landingpad { ptr, i32 }
          cleanup
  %161 = extractvalue { ptr, i32 } %160, 0
  store ptr %161, ptr %28, align 8
  %162 = extractvalue { ptr, i32 } %160, 1
  store i32 %162, ptr %29, align 4
  br label %167

163:                                              ; preds = %140
  %164 = landingpad { ptr, i32 }
          cleanup
  %165 = extractvalue { ptr, i32 } %164, 0
  store ptr %165, ptr %28, align 8
  %166 = extractvalue { ptr, i32 } %164, 1
  store i32 %166, ptr %29, align 4
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %41) #5
  br label %167

167:                                              ; preds = %163, %159
  call void @llvm.lifetime.end.p0(i64 12, ptr %41) #5
  br label %235

168:                                              ; preds = %142
  %169 = landingpad { ptr, i32 }
          cleanup
  %170 = extractvalue { ptr, i32 } %169, 0
  store ptr %170, ptr %28, align 8
  %171 = extractvalue { ptr, i32 } %169, 1
  store i32 %171, ptr %29, align 4
  br label %234

172:                                              ; preds = %144
  %173 = landingpad { ptr, i32 }
          cleanup
  %174 = extractvalue { ptr, i32 } %173, 0
  store ptr %174, ptr %28, align 8
  %175 = extractvalue { ptr, i32 } %173, 1
  store i32 %175, ptr %29, align 4
  br label %233

176:                                              ; preds = %153
  call void @llvm.lifetime.start.p0(i64 12, ptr %43) #5
  %177 = load ptr, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %44) #5
  %178 = load ptr, ptr %12, align 8, !tbaa !5
  %179 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3Ray9directionEv(ptr noundef nonnull align 4 dereferenceable(24) %178)
          to label %180 unwind label %201

180:                                              ; preds = %176
  invoke void @_ZNK4Vec3IfEngEv(ptr dead_on_unwind writable sret(%class.Vec3) align 4 %44, ptr noundef nonnull align 4 dereferenceable(12) %179)
          to label %181 unwind label %201

181:                                              ; preds = %180
  invoke void @_ZN8Material21evaluateColorResponseERK4Vec3IfES3_S3_(ptr dead_on_unwind writable sret(%class.Vec3) align 4 %43, ptr noundef nonnull align 8 dereferenceable(40) %33, ptr noundef nonnull align 4 dereferenceable(12) %177, ptr noundef nonnull align 4 dereferenceable(12) %40, ptr noundef nonnull align 4 dereferenceable(12) %44)
          to label %182 unwind label %205

182:                                              ; preds = %181
  %183 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN4Vec3IfEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %32, ptr noundef nonnull align 4 dereferenceable(12) %43)
          to label %184 unwind label %209

184:                                              ; preds = %182
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %43) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %44) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %44) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %43) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %45) #5
  %185 = load ptr, ptr %19, align 8, !tbaa !5
  invoke void @_ZN11LightSource13evaluateLightERK4Vec3IfE(ptr dead_on_unwind writable sret(%class.Vec3) align 4 %45, ptr noundef nonnull align 8 dereferenceable(112) %39, ptr noundef nonnull align 4 dereferenceable(12) %185)
          to label %186 unwind label %215

186:                                              ; preds = %184
  %187 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN4Vec3IfEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %31, ptr noundef nonnull align 4 dereferenceable(12) %45)
          to label %188 unwind label %219

188:                                              ; preds = %186
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %45) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %45) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %46) #5
  invoke void @_ZNK4Vec3IfEmlERKS0_(ptr dead_on_unwind writable sret(%class.Vec3) align 4 %46, ptr noundef nonnull align 4 dereferenceable(12) %31, ptr noundef nonnull align 4 dereferenceable(12) %32)
          to label %189 unwind label %224

189:                                              ; preds = %188
  %190 = load ptr, ptr %20, align 8, !tbaa !5
  %191 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN4Vec3IfEpLERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %190, ptr noundef nonnull align 4 dereferenceable(12) %46)
          to label %192 unwind label %228

192:                                              ; preds = %189
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %46) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %46) #5
  store i32 0, ptr %38, align 4
  br label %193

193:                                              ; preds = %192, %154
  call void @_ZN3RayD2Ev(ptr noundef nonnull align 4 dereferenceable(24) %42) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %42) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %40) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %40) #5
  %194 = load i32, ptr %38, align 4
  switch i32 %194, label %196 [
    i32 0, label %195
  ]

195:                                              ; preds = %193
  store i32 0, ptr %38, align 4
  br label %196

196:                                              ; preds = %195, %193
  call void @_ZN11LightSourceD2Ev(ptr noundef nonnull align 8 dereferenceable(112) %39) #5
  call void @llvm.lifetime.end.p0(i64 112, ptr %39) #5
  %197 = load i32, ptr %38, align 4
  switch i32 %197, label %248 [
    i32 0, label %198
    i32 3, label %199
  ]

198:                                              ; preds = %196
  br label %199

199:                                              ; preds = %198, %196
  %200 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP11LightSourceSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %36) #5
  br label %105

201:                                              ; preds = %180, %176
  %202 = landingpad { ptr, i32 }
          cleanup
  %203 = extractvalue { ptr, i32 } %202, 0
  store ptr %203, ptr %28, align 8
  %204 = extractvalue { ptr, i32 } %202, 1
  store i32 %204, ptr %29, align 4
  br label %214

205:                                              ; preds = %181
  %206 = landingpad { ptr, i32 }
          cleanup
  %207 = extractvalue { ptr, i32 } %206, 0
  store ptr %207, ptr %28, align 8
  %208 = extractvalue { ptr, i32 } %206, 1
  store i32 %208, ptr %29, align 4
  br label %213

209:                                              ; preds = %182
  %210 = landingpad { ptr, i32 }
          cleanup
  %211 = extractvalue { ptr, i32 } %210, 0
  store ptr %211, ptr %28, align 8
  %212 = extractvalue { ptr, i32 } %210, 1
  store i32 %212, ptr %29, align 4
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %43) #5
  br label %213

213:                                              ; preds = %209, %205
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %44) #5
  br label %214

214:                                              ; preds = %213, %201
  call void @llvm.lifetime.end.p0(i64 12, ptr %44) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %43) #5
  br label %233

215:                                              ; preds = %184
  %216 = landingpad { ptr, i32 }
          cleanup
  %217 = extractvalue { ptr, i32 } %216, 0
  store ptr %217, ptr %28, align 8
  %218 = extractvalue { ptr, i32 } %216, 1
  store i32 %218, ptr %29, align 4
  br label %223

219:                                              ; preds = %186
  %220 = landingpad { ptr, i32 }
          cleanup
  %221 = extractvalue { ptr, i32 } %220, 0
  store ptr %221, ptr %28, align 8
  %222 = extractvalue { ptr, i32 } %220, 1
  store i32 %222, ptr %29, align 4
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %45) #5
  br label %223

223:                                              ; preds = %219, %215
  call void @llvm.lifetime.end.p0(i64 12, ptr %45) #5
  br label %233

224:                                              ; preds = %188
  %225 = landingpad { ptr, i32 }
          cleanup
  %226 = extractvalue { ptr, i32 } %225, 0
  store ptr %226, ptr %28, align 8
  %227 = extractvalue { ptr, i32 } %225, 1
  store i32 %227, ptr %29, align 4
  br label %232

228:                                              ; preds = %189
  %229 = landingpad { ptr, i32 }
          cleanup
  %230 = extractvalue { ptr, i32 } %229, 0
  store ptr %230, ptr %28, align 8
  %231 = extractvalue { ptr, i32 } %229, 1
  store i32 %231, ptr %29, align 4
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %46) #5
  br label %232

232:                                              ; preds = %228, %224
  call void @llvm.lifetime.end.p0(i64 12, ptr %46) #5
  br label %233

233:                                              ; preds = %232, %223, %214, %172
  call void @_ZN3RayD2Ev(ptr noundef nonnull align 4 dereferenceable(24) %42) #5
  br label %234

234:                                              ; preds = %233, %168
  call void @llvm.lifetime.end.p0(i64 24, ptr %42) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %40) #5
  br label %235

235:                                              ; preds = %234, %167
  call void @llvm.lifetime.end.p0(i64 12, ptr %40) #5
  call void @_ZN11LightSourceD2Ev(ptr noundef nonnull align 8 dereferenceable(112) %39) #5
  br label %236

236:                                              ; preds = %235, %155
  call void @llvm.lifetime.end.p0(i64 112, ptr %39) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #5
  br label %237

237:                                              ; preds = %236, %133
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %34) #5
  br label %239

238:                                              ; preds = %107
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %34) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %34) #5
  call void @_ZN8MaterialD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %33) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %33) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %32) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %32) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %31) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  ret void

239:                                              ; preds = %237, %129
  call void @llvm.lifetime.end.p0(i64 12, ptr %34) #5
  call void @_ZN8MaterialD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %33) #5
  br label %240

240:                                              ; preds = %239, %125
  call void @llvm.lifetime.end.p0(i64 40, ptr %33) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %32) #5
  br label %241

241:                                              ; preds = %240, %121
  call void @llvm.lifetime.end.p0(i64 12, ptr %32) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %31) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %31) #5
  br label %242

242:                                              ; preds = %241, %117, %116
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %243

243:                                              ; preds = %242
  %244 = load ptr, ptr %28, align 8
  %245 = load i32, ptr %29, align 4
  %246 = insertvalue { ptr, i32 } poison, ptr %244, 0
  %247 = insertvalue { ptr, i32 } %246, i32 %245, 1
  resume { ptr, i32 } %247

248:                                              ; preds = %196
  unreachable
}

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(56) ptr @_ZN5Scene6cameraEv(ptr noundef nonnull align 8 dereferenceable(112)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z9normalizeIfE4Vec3IT_ERKS2_(ptr dead_on_unwind noalias writable sret(%class.Vec3) align 4, ptr noundef nonnull align 4 dereferenceable(12)) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8Renderer6dotArrERKSt6vectorI4Vec3IfESaIS2_EERS1_IiEfff(ptr dead_on_unwind noalias writable sret(%class.Vec3) align 4, ptr noundef nonnull align 8 dereferenceable(228), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4Vec3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8MaterialC2ERKS_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #4 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK4Vec3IfEmiERKS0_(ptr dead_on_unwind noalias writable sret(%class.Vec3) align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #4 align 2

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN11LightSourceC2ERKS_(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(112)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN11LightSource16randAreaPositionEv(ptr dead_on_unwind noalias writable sret(%class.Vec3) align 4, ptr noundef nonnull align 8 dereferenceable(112)) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3RayC2ERK4Vec3IfES3_(ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN9RayTracer8rayTraceERK3RayRK5SceneRmR4Vec3IiERfSA_SA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8Material21evaluateColorResponseERK4Vec3IfES3_S3_(ptr dead_on_unwind noalias writable sret(%class.Vec3) align 4, ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3Ray9directionEv(ptr noundef nonnull align 4 dereferenceable(24)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK4Vec3IfEngEv(ptr dead_on_unwind noalias writable sret(%class.Vec3) align 4, ptr noundef nonnull align 4 dereferenceable(12)) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN11LightSource13evaluateLightERK4Vec3IfE(ptr dead_on_unwind noalias writable sret(%class.Vec3) align 4, ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 4 dereferenceable(12)) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK4Vec3IfEmlERKS0_(ptr dead_on_unwind noalias writable sret(%class.Vec3) align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #4 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3RayD2Ev(ptr noundef nonnull align 4 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11LightSourceD2Ev(ptr noundef nonnull align 8 dereferenceable(112)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8MaterialD2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #3 align 2

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !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.Vec3 = type { [3 x float] }
%class.Material = type { ptr, float, float, %class.Vec3, %class.Vec3 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%class.LightSource = type { ptr, %class.Vec3, %class.Vec3, %class.Vec3, %class.Vec3, %class.Vec3, %class.Vec3, float, %"class.std::uniform_real_distribution", float, float, float, float, float }
%"class.std::uniform_real_distribution" = type { %"struct.std::uniform_real_distribution<float>::param_type" }
%"struct.std::uniform_real_distribution<float>::param_type" = type { float, float }
%class.Ray = type { %class.Vec3, %class.Vec3 }

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8Renderer5shadeERK3RayR4Vec3IiERmRfS7_S7_RS3_IfES9_S9_(ptr noundef nonnull align 8 dereferenceable(228) %0, ptr noundef nonnull align 4 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef nonnull align 4 dereferenceable(12) %8, ptr noundef nonnull align 4 dereferenceable(12) %9) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %11 = alloca %class.Vec3, align 4
  %12 = alloca %class.Vec3, align 4
  %13 = alloca %class.Vec3, align 4
  %14 = alloca %class.Vec3, align 4
  %15 = alloca %class.Vec3, align 4
  %16 = alloca %class.Material, align 8
  %17 = alloca %class.Vec3, align 4
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %20 = alloca %class.LightSource, align 8
  %21 = alloca %class.Vec3, align 4
  %22 = alloca %class.Vec3, align 4
  %23 = alloca %class.Ray, align 4
  %24 = alloca %class.Vec3, align 4
  %25 = alloca %class.Vec3, align 4
  %26 = alloca %class.Vec3, align 4
  %27 = alloca %class.Vec3, align 4
  %28 = load float, ptr %4, align 4, !tbaa !5
  %29 = fsub float 1.000000e+00, %28
  %30 = load float, ptr %5, align 4, !tbaa !5
  %31 = fsub float %29, %30
  %32 = getelementptr inbounds i8, ptr %0, i64 112
  %33 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZN5Scene6meshesEv(ptr noundef nonnull align 8 dereferenceable(112) %32)
  %34 = load i64, ptr %3, align 8, !tbaa !9
  %35 = tail call noundef nonnull align 8 dereferenceable(208) ptr @_ZNSt6vectorI4MeshSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %33, i64 noundef %34) #5
  %36 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK4Mesh15vertexPositionsEv(ptr noundef nonnull align 8 dereferenceable(208) %35)
  %37 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK4Mesh13vertexNormalsEv(ptr noundef nonnull align 8 dereferenceable(208) %35)
  %38 = tail call noundef nonnull align 4 dereferenceable(56) ptr @_ZN5Scene6cameraEv(ptr noundef nonnull align 8 dereferenceable(112) %32)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %12) #5
  %39 = load float, ptr %4, align 4, !tbaa !5
  %40 = load float, ptr %5, align 4, !tbaa !5
  call void @_ZN8Renderer6dotArrERKSt6vectorI4Vec3IfESaIS2_EERS1_IiEfff(ptr dead_on_unwind nonnull writable sret(%class.Vec3) align 4 %12, ptr noundef nonnull align 8 dereferenceable(228) %0, ptr noundef nonnull align 8 dereferenceable(24) %37, ptr noundef nonnull align 4 dereferenceable(12) %2, float noundef %31, float noundef %39, float noundef %40)
  invoke void @_Z9normalizeIfE4Vec3IT_ERKS2_(ptr dead_on_unwind nonnull writable sret(%class.Vec3) align 4 %11, ptr noundef nonnull align 4 dereferenceable(12) %12)
          to label %41 unwind label %55

41:                                               ; preds = %10
  %42 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN4Vec3IfEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef nonnull align 4 dereferenceable(12) %11)
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %11) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %12) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %13) #5
  %43 = load float, ptr %4, align 4, !tbaa !5
  %44 = load float, ptr %5, align 4, !tbaa !5
  call void @_ZN8Renderer6dotArrERKSt6vectorI4Vec3IfESaIS2_EERS1_IiEfff(ptr dead_on_unwind nonnull writable sret(%class.Vec3) align 4 %13, ptr noundef nonnull align 8 dereferenceable(228) %0, ptr noundef nonnull align 8 dereferenceable(24) %36, ptr noundef nonnull align 4 dereferenceable(12) %2, float noundef %31, float noundef %43, float noundef %44)
  %45 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN4Vec3IfEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %8, ptr noundef nonnull align 4 dereferenceable(12) %13)
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %13) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %14) #5
  call void @_ZN4Vec3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %14)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %15) #5
  call void @_ZN4Vec3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %15)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %16) #5
  %46 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNK4Mesh8materialEv(ptr noundef nonnull align 8 dereferenceable(208) %35)
  invoke void @_ZN8MaterialC2ERKS_(ptr noundef nonnull align 8 dereferenceable(40) %16, ptr noundef nonnull align 8 dereferenceable(40) %46)
          to label %47 unwind label %57

47:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %17) #5
  %48 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK6Camera8positionEv(ptr noundef nonnull align 4 dereferenceable(56) %38)
  invoke void @_ZNK4Vec3IfEmiERKS0_(ptr dead_on_unwind nonnull writable sret(%class.Vec3) align 4 %17, ptr noundef nonnull align 4 dereferenceable(12) %48, ptr noundef nonnull align 4 dereferenceable(12) %8)
          to label %49 unwind label %59

49:                                               ; preds = %47
  %50 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN5Scene12lightsourcesEv(ptr noundef nonnull align 8 dereferenceable(112) %32)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #5
  %51 = call ptr @_ZNSt6vectorI11LightSourceSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %50) #5
  store ptr %51, ptr %18, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #5
  %52 = call ptr @_ZNSt6vectorI11LightSourceSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %50) #5
  store ptr %52, ptr %19, align 8
  %53 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP11LightSourceSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #5
  br i1 %53, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %49
  %54 = getelementptr inbounds i8, ptr %0, i64 104
  br label %61

._crit_edge:                                      ; preds = %89, %49
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %17) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %17) #5
  call void @_ZN8MaterialD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %16) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %16) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %15) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %15) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %14) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %14) #5
  ret void

55:                                               ; preds = %10
  %56 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %12) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #5
  br label %107

57:                                               ; preds = %41
  %58 = landingpad { ptr, i32 }
          cleanup
  br label %106

59:                                               ; preds = %47
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %105

61:                                               ; preds = %.lr.ph, %89
  call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %20) #5
  %62 = call noundef nonnull align 8 dereferenceable(112) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP11LightSourceSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #5
  invoke void @_ZN11LightSourceC2ERKS_(ptr noundef nonnull align 8 dereferenceable(112) %20, ptr noundef nonnull align 8 dereferenceable(112) %62)
          to label %63 unwind label %69

63:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %21) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %22) #5
  invoke void @_ZN11LightSource16randAreaPositionEv(ptr dead_on_unwind nonnull writable sret(%class.Vec3) align 4 %22, ptr noundef nonnull align 8 dereferenceable(112) %20)
          to label %64 unwind label %71

64:                                               ; preds = %63
  invoke void @_ZNK4Vec3IfEmiERKS0_(ptr dead_on_unwind nonnull writable sret(%class.Vec3) align 4 %21, ptr noundef nonnull align 4 dereferenceable(12) %22, ptr noundef nonnull align 4 dereferenceable(12) %8)
          to label %65 unwind label %73

65:                                               ; preds = %64
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %22) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %22) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %23) #5
  invoke void @_ZN3RayC2ERK4Vec3IfES3_(ptr noundef nonnull align 4 dereferenceable(24) %23, ptr noundef nonnull align 4 dereferenceable(12) %8, ptr noundef nonnull align 4 dereferenceable(12) %21)
          to label %66 unwind label %76

66:                                               ; preds = %65
  %67 = invoke noundef zeroext i1 @_ZN9RayTracer8rayTraceERK3RayRK5SceneRmR4Vec3IiERfSA_SA_(ptr noundef nonnull align 8 dereferenceable(8) %54, ptr noundef nonnull align 4 dereferenceable(24) %23, ptr noundef nonnull align 8 dereferenceable(112) %32, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %68 unwind label %78

68:                                               ; preds = %66
  br i1 %67, label %89, label %80

69:                                               ; preds = %61
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %104

71:                                               ; preds = %63
  %72 = landingpad { ptr, i32 }
          cleanup
  br label %75

73:                                               ; preds = %64
  %74 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %22) #5
  br label %75

75:                                               ; preds = %73, %71
  %.pn = phi { ptr, i32 } [ %74, %73 ], [ %72, %71 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %22) #5
  br label %103

76:                                               ; preds = %65
  %77 = landingpad { ptr, i32 }
          cleanup
  br label %102

78:                                               ; preds = %66
  %79 = landingpad { ptr, i32 }
          cleanup
  br label %101

80:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %24) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %25) #5
  %81 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3Ray9directionEv(ptr noundef nonnull align 4 dereferenceable(24) %1)
  invoke void @_ZNK4Vec3IfEngEv(ptr dead_on_unwind nonnull writable sret(%class.Vec3) align 4 %25, ptr noundef nonnull align 4 dereferenceable(12) %81)
          to label %82 unwind label %92

82:                                               ; preds = %80
  invoke void @_ZN8Material21evaluateColorResponseERK4Vec3IfES3_S3_(ptr dead_on_unwind nonnull writable sret(%class.Vec3) align 4 %24, ptr noundef nonnull align 8 dereferenceable(40) %16, ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef nonnull align 4 dereferenceable(12) %21, ptr noundef nonnull align 4 dereferenceable(12) %25)
          to label %83 unwind label %94

83:                                               ; preds = %82
  %84 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN4Vec3IfEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %15, ptr noundef nonnull align 4 dereferenceable(12) %24)
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %24) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %25) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %25) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %24) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %26) #5
  invoke void @_ZN11LightSource13evaluateLightERK4Vec3IfE(ptr dead_on_unwind nonnull writable sret(%class.Vec3) align 4 %26, ptr noundef nonnull align 8 dereferenceable(112) %20, ptr noundef nonnull align 4 dereferenceable(12) %8)
          to label %85 unwind label %97

85:                                               ; preds = %83
  %86 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN4Vec3IfEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %14, ptr noundef nonnull align 4 dereferenceable(12) %26)
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %26) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %26) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %27) #5
  invoke void @_ZNK4Vec3IfEmlERKS0_(ptr dead_on_unwind nonnull writable sret(%class.Vec3) align 4 %27, ptr noundef nonnull align 4 dereferenceable(12) %14, ptr noundef nonnull align 4 dereferenceable(12) %15)
          to label %87 unwind label %99

87:                                               ; preds = %85
  %88 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN4Vec3IfEpLERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %27)
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %27) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %27) #5
  br label %89

89:                                               ; preds = %68, %87
  call void @_ZN3RayD2Ev(ptr noundef nonnull align 4 dereferenceable(24) %23) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %23) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %21) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %21) #5
  call void @_ZN11LightSourceD2Ev(ptr noundef nonnull align 8 dereferenceable(112) %20) #5
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %20) #5
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP11LightSourceSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #5
  %91 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP11LightSourceSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #5
  br i1 %91, label %61, label %._crit_edge

92:                                               ; preds = %80
  %93 = landingpad { ptr, i32 }
          cleanup
  br label %96

94:                                               ; preds = %82
  %95 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %25) #5
  br label %96

96:                                               ; preds = %94, %92
  %.pn47 = phi { ptr, i32 } [ %95, %94 ], [ %93, %92 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %25) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %24) #5
  br label %101

97:                                               ; preds = %83
  %98 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %26) #5
  br label %101

99:                                               ; preds = %85
  %100 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %27) #5
  br label %101

101:                                              ; preds = %99, %97, %96, %78
  %.pn49 = phi { ptr, i32 } [ %100, %99 ], [ %98, %97 ], [ %.pn47, %96 ], [ %79, %78 ]
  call void @_ZN3RayD2Ev(ptr noundef nonnull align 4 dereferenceable(24) %23) #5
  br label %102

102:                                              ; preds = %101, %76
  %.pn49.pn = phi { ptr, i32 } [ %.pn49, %101 ], [ %77, %76 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %23) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %21) #5
  br label %103

103:                                              ; preds = %102, %75
  %.pn49.pn.pn = phi { ptr, i32 } [ %.pn49.pn, %102 ], [ %.pn, %75 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %21) #5
  call void @_ZN11LightSourceD2Ev(ptr noundef nonnull align 8 dereferenceable(112) %20) #5
  br label %104

104:                                              ; preds = %103, %69
  %.pn49.pn.pn.pn = phi { ptr, i32 } [ %.pn49.pn.pn, %103 ], [ %70, %69 ]
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %17) #5
  br label %105

105:                                              ; preds = %104, %59
  %.pn49.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn49.pn.pn.pn, %104 ], [ %60, %59 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %17) #5
  call void @_ZN8MaterialD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %16) #5
  br label %106

106:                                              ; preds = %105, %57
  %.pn49.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn49.pn.pn.pn.pn, %105 ], [ %58, %57 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %16) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %15) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %15) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %14) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %14) #5
  br label %107

107:                                              ; preds = %106, %55
  %.pn49.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn49.pn.pn.pn.pn.pn, %106 ], [ %56, %55 ]
  resume { ptr, i32 } %.pn49.pn.pn.pn.pn.pn.pn
}

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(56) ptr @_ZN5Scene6cameraEv(ptr noundef nonnull align 8 dereferenceable(112)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z9normalizeIfE4Vec3IT_ERKS2_(ptr dead_on_unwind noalias writable sret(%class.Vec3) align 4, ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8Renderer6dotArrERKSt6vectorI4Vec3IfESaIS2_EERS1_IiEfff(ptr dead_on_unwind noalias writable sret(%class.Vec3) align 4, ptr noundef nonnull align 8 dereferenceable(228), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) local_unnamed_addr #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4Vec3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8MaterialC2ERKS_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #4 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK4Vec3IfEmiERKS0_(ptr dead_on_unwind noalias writable sret(%class.Vec3) align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #4 align 2

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN11LightSourceC2ERKS_(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(112)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN11LightSource16randAreaPositionEv(ptr dead_on_unwind noalias writable sret(%class.Vec3) align 4, ptr noundef nonnull align 8 dereferenceable(112)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3RayC2ERK4Vec3IfES3_(ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN9RayTracer8rayTraceERK3RayRK5SceneRmR4Vec3IiERfSA_SA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8Material21evaluateColorResponseERK4Vec3IfES3_S3_(ptr dead_on_unwind noalias writable sret(%class.Vec3) align 4, ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3Ray9directionEv(ptr noundef nonnull align 4 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK4Vec3IfEngEv(ptr dead_on_unwind noalias writable sret(%class.Vec3) align 4, ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN11LightSource13evaluateLightERK4Vec3IfE(ptr dead_on_unwind noalias writable sret(%class.Vec3) align 4, ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK4Vec3IfEmlERKS0_(ptr dead_on_unwind noalias writable sret(%class.Vec3) align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #4 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3RayD2Ev(ptr noundef nonnull align 4 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11LightSourceD2Ev(ptr noundef nonnull align 8 dereferenceable(112)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8MaterialD2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #3 align 2

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}


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