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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%class.Vec3 = type { [3 x float] }
%class.Image = type { ptr, i64, i64, %"class.std::vector.10" }
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<Vec3<float>, std::allocator<Vec3<float>>>::_Vector_impl" }
%"struct.std::_Vector_base<Vec3<float>, std::allocator<Vec3<float>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Vec3<float>, std::allocator<Vec3<float>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Vec3<float>, std::allocator<Vec3<float>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.PhotonMap = type <{ %class.RayTracer, %"class.std::vector", i32, [4 x i8] }>
%class.RayTracer = type { ptr }
%"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.kdtree = type { ptr, ptr, double, i64, %"class.std::vector.26", %"class.std::vector.26" }
%"class.std::vector.26" = type { %"struct.std::_Vector_base.27" }
%"struct.std::_Vector_base.27" = type { %"struct.std::_Vector_base<kdtree::node, std::allocator<kdtree::node>>::_Vector_impl" }
%"struct.std::_Vector_base<kdtree::node, std::allocator<kdtree::node>>::_Vector_impl" = type { %"struct.std::_Vector_base<kdtree::node, std::allocator<kdtree::node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<kdtree::node, std::allocator<kdtree::node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.31" = type { ptr }
%"class.std::vector.32" = type { %"struct.std::_Vector_base.33" }
%"struct.std::_Vector_base.33" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.20" = type { %"struct.std::_Vector_base.21" }
%"struct.std::_Vector_base.21" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.22" = type { i8 }
%"class.std::allocator.34" = type { i8 }
%"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.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.37" = type { i8 }
%class.Renderer = type <{ ptr, i32, i32, i32, i32, %class.PhotonMap, %class.PhotonMap, %class.RayTracer, %class.Scene, float, [4 x i8] }>
%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 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [43 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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)) #1 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)) #1 align 2

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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)) #1 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8Renderer17calculateColorRayE3RayRbR6kdtree(ptr dead_on_unwind noalias writable sret(%class.Vec3) align 4, ptr noundef nonnull align 8 dereferenceable(228), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(80)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8Renderer18calculateColorPathE3RayRbii(ptr dead_on_unwind noalias writable sret(%class.Vec3) align 4, ptr noundef nonnull align 8 dereferenceable(228), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1), i32 noundef, i32 noundef) #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4Vec3IfEC2ERKS0_(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 void @_ZNK4Vec3IfEplERKS0_(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 uwtable
declare dso_local void @_ZN3RayC2ERKS_(ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(24)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8Renderer18calculateColorPathE3RayRbiiR6kdtree(ptr dead_on_unwind noalias writable sret(%class.Vec3) align 4, ptr noundef nonnull align 8 dereferenceable(228), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1), i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(80)) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8Renderer6renderER5Image(ptr noundef nonnull align 8 dereferenceable(228) %0, ptr noundef nonnull align 8 dereferenceable(48) %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %class.Image, align 8
  %9 = alloca %class.Image, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %class.PhotonMap, align 8
  %13 = alloca %class.RayTracer, align 8
  %14 = alloca %class.kdtree, align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator.31", align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator.31", align 8
  %17 = alloca %"class.std::vector.32", align 8
  %18 = alloca %"class.std::vector.20", align 8
  %19 = alloca %"class.std::allocator.22", align 1
  %20 = alloca %"class.std::allocator.34", align 1
  %21 = alloca %"class.std::uniform_real_distribution", align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca %class.Vec3, align 4
  %27 = alloca %class.Vec3, align 4
  %28 = alloca float, align 4
  %29 = alloca float, align 4
  %30 = alloca %class.Ray, align 4
  %31 = alloca i8, align 1
  %32 = alloca %class.Vec3, align 4
  %33 = alloca %class.Vec3, align 4
  %34 = alloca %class.Ray, align 4
  %35 = alloca %class.Vec3, align 4
  %36 = alloca %class.Ray, align 4
  %37 = alloca %class.Vec3, align 4
  %38 = alloca %class.Ray, align 4
  %39 = alloca %class.Vec3, align 4
  %40 = alloca %class.Ray, align 4
  %41 = alloca %class.Vec3, align 4
  %42 = alloca %class.Vec3, align 4
  %43 = alloca i32, align 4
  %44 = alloca i32, align 4
  %45 = alloca %class.Vec3, align 4
  %46 = alloca %class.Vec3, align 4
  %47 = alloca %class.Vec3, align 4
  %48 = alloca %class.Vec3, align 4
  %49 = alloca %"class.std::__cxx11::basic_string", align 8
  %50 = alloca %"class.std::allocator.37", align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %51 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = call noundef i64 @_ZNK5Image5widthEv(ptr noundef nonnull align 8 dereferenceable(48) %52)
  store i64 %53, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = call noundef i64 @_ZNK5Image6heightEv(ptr noundef nonnull align 8 dereferenceable(48) %54)
  store i64 %55, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %56 = getelementptr inbounds %class.Renderer, ptr %51, i32 0, i32 8
  %57 = call noundef nonnull align 4 dereferenceable(56) ptr @_ZN5Scene6cameraEv(ptr noundef nonnull align 8 dereferenceable(112) %56)
  store ptr %57, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 48, ptr %8) #5
  %58 = load i64, ptr %5, align 8, !tbaa !9
  %59 = load i64, ptr %6, align 8, !tbaa !9
  call void @_ZN5ImageC2Emm(ptr noundef nonnull align 8 dereferenceable(48) %8, i64 noundef %58, i64 noundef %59)
  call void @llvm.lifetime.start.p0(i64 48, ptr %9) #5
  %60 = load i64, ptr %5, align 8, !tbaa !9
  %61 = load i64, ptr %6, align 8, !tbaa !9
  invoke void @_ZN5ImageC2Emm(ptr noundef nonnull align 8 dereferenceable(48) %9, i64 noundef %60, i64 noundef %61)
          to label %62 unwind label %76

62:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 40, ptr %12) #5
  %63 = getelementptr inbounds %class.Renderer, ptr %51, i32 0, i32 8
  %64 = getelementptr inbounds %class.Renderer, ptr %51, i32 0, i32 3
  %65 = load i32, ptr %64, align 8, !tbaa !11
  %66 = getelementptr inbounds %class.Renderer, ptr %51, i32 0, i32 7
  call void @_ZN9RayTracerC2ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %66) #5
  invoke void @_ZN9PhotonMapC2ERK5Scenei9RayTracer(ptr noundef nonnull align 8 dereferenceable(36) %12, ptr noundef nonnull align 8 dereferenceable(112) %63, i32 noundef %65, ptr noundef %13)
          to label %67 unwind label %80

67:                                               ; preds = %62
  call void @_ZN9RayTracerD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #5
  %68 = getelementptr inbounds %class.Renderer, ptr %51, i32 0, i32 3
  %69 = load i32, ptr %68, align 8, !tbaa !11
  %70 = icmp sgt i32 %69, 0
  br i1 %70, label %71, label %88

71:                                               ; preds = %67
  %72 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
          to label %73 unwind label %84

73:                                               ; preds = %71
  %74 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %72, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %75 unwind label %84

75:                                               ; preds = %73
  br label %88

76:                                               ; preds = %2
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %10, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %11, align 4
  br label %478

80:                                               ; preds = %62
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %10, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %11, align 4
  call void @_ZN9RayTracerD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #5
  br label %477

84:                                               ; preds = %73, %71
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %10, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %11, align 4
  br label %476

88:                                               ; preds = %75, %67
  call void @llvm.lifetime.start.p0(i64 80, ptr %14) #5
  %89 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN9PhotonMap4listEv(ptr noundef nonnull align 8 dereferenceable(36) %12)
          to label %90 unwind label %113

90:                                               ; preds = %88
  %91 = call ptr @_ZNSt6vectorI8ParticleSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %89) #5
  %92 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.31", ptr %15, i32 0, i32 0
  store ptr %91, ptr %92, align 8
  %93 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN9PhotonMap4listEv(ptr noundef nonnull align 8 dereferenceable(36) %12)
          to label %94 unwind label %113

94:                                               ; preds = %90
  %95 = call ptr @_ZNSt6vectorI8ParticleSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %93) #5
  %96 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.31", ptr %16, i32 0, i32 0
  store ptr %95, ptr %96, align 8
  %97 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.31", ptr %15, i32 0, i32 0
  %98 = load ptr, ptr %97, align 8
  %99 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.31", ptr %16, i32 0, i32 0
  %100 = load ptr, ptr %99, align 8
  invoke void @_ZN6kdtreeC2IN9__gnu_cxx17__normal_iteratorIP8ParticleSt6vectorIS3_SaIS3_EEEEEET_S9_(ptr noundef nonnull align 8 dereferenceable(80) %14, ptr %98, ptr %100)
          to label %101 unwind label %113

101:                                              ; preds = %94
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #5
  %102 = load i64, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #5
  %103 = load i64, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #5
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #5
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %103, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %104 unwind label %117

104:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #5
  call void @_ZNSaISt6vectorIiSaIiEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %102, ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %105 unwind label %121

105:                                              ; preds = %104
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #5
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  invoke void @_ZNSt25uniform_real_distributionIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %21, float noundef 0.000000e+00, float noundef 1.000000e+00)
          to label %106 unwind label %126

106:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  store i32 0, ptr %22, align 4, !tbaa !32
  br label %107

107:                                              ; preds = %456, %106
  %108 = load i32, ptr %22, align 4, !tbaa !32
  %109 = getelementptr inbounds %class.Renderer, ptr %51, i32 0, i32 1
  %110 = load i32, ptr %109, align 8, !tbaa !33
  %111 = icmp slt i32 %108, %110
  br i1 %111, label %130, label %112

112:                                              ; preds = %107
  store i32 2, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %469

113:                                              ; preds = %94, %90, %88
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %10, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %11, align 4
  br label %475

117:                                              ; preds = %101
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %10, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %11, align 4
  br label %125

121:                                              ; preds = %104
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %10, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %11, align 4
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #5
  br label %125

125:                                              ; preds = %121, %117
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #5
  br label %474

126:                                              ; preds = %469, %105
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %10, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %11, align 4
  br label %473

130:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  store i32 0, ptr %24, align 4, !tbaa !32
  br label %131

131:                                              ; preds = %361, %130
  %132 = load i32, ptr %24, align 4, !tbaa !32
  %133 = sext i32 %132 to i64
  %134 = load i64, ptr %6, align 8, !tbaa !9
  %135 = icmp ult i64 %133, %134
  br i1 %135, label %137, label %136

136:                                              ; preds = %131
  store i32 5, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  br label %365

137:                                              ; preds = %131
  %138 = load i32, ptr %22, align 4, !tbaa !32
  %139 = sext i32 %138 to i64
  %140 = load i64, ptr %6, align 8, !tbaa !9
  %141 = mul i64 %139, %140
  %142 = uitofp i64 %141 to float
  %143 = load i32, ptr %24, align 4, !tbaa !32
  %144 = add nsw i32 %143, 1
  %145 = sitofp i32 %144 to float
  %146 = fadd float %142, %145
  %147 = load i64, ptr %6, align 8, !tbaa !9
  %148 = uitofp i64 %147 to float
  %149 = getelementptr inbounds %class.Renderer, ptr %51, i32 0, i32 1
  %150 = load i32, ptr %149, align 8, !tbaa !33
  %151 = sitofp i32 %150 to float
  %152 = fmul float %148, %151
  %153 = fdiv float %146, %152
  invoke void @_ZN8Renderer16printProgressBarEf(ptr noundef nonnull align 8 dereferenceable(228) %51, float noundef %153)
          to label %154 unwind label %161

154:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  store i32 0, ptr %25, align 4, !tbaa !32
  br label %155

155:                                              ; preds = %350, %154
  %156 = load i32, ptr %25, align 4, !tbaa !32
  %157 = sext i32 %156 to i64
  %158 = load i64, ptr %5, align 8, !tbaa !9
  %159 = icmp ult i64 %157, %158
  br i1 %159, label %165, label %160

160:                                              ; preds = %155
  store i32 8, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  br label %360

161:                                              ; preds = %137
  %162 = landingpad { ptr, i32 }
          cleanup
  %163 = extractvalue { ptr, i32 } %162, 0
  store ptr %163, ptr %10, align 8
  %164 = extractvalue { ptr, i32 } %162, 1
  store i32 %164, ptr %11, align 4
  br label %364

165:                                              ; preds = %155
  call void @llvm.lifetime.start.p0(i64 12, ptr %26) #5
  invoke void @_ZN4Vec3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %26, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
          to label %166 unwind label %198

166:                                              ; preds = %165
  call void @llvm.lifetime.start.p0(i64 12, ptr %27) #5
  %167 = getelementptr inbounds %class.Renderer, ptr %51, i32 0, i32 7
  %168 = load i32, ptr %22, align 4, !tbaa !32
  %169 = getelementptr inbounds %class.Renderer, ptr %51, i32 0, i32 1
  %170 = load i32, ptr %169, align 8, !tbaa !33
  invoke void @_ZN9RayTracer12jitterSampleEii(ptr dead_on_unwind writable sret(%class.Vec3) align 4 %27, ptr noundef nonnull align 8 dereferenceable(8) %167, i32 noundef %168, i32 noundef %170)
          to label %171 unwind label %202

171:                                              ; preds = %166
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  %172 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN4Vec3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %27, i32 noundef 0)
          to label %173 unwind label %206

173:                                              ; preds = %171
  %174 = load float, ptr %172, align 4, !tbaa !34
  store float %174, ptr %28, align 4, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #5
  %175 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN4Vec3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %27, i32 noundef 1)
          to label %176 unwind label %210

176:                                              ; preds = %173
  %177 = load float, ptr %175, align 4, !tbaa !34
  store float %177, ptr %29, align 4, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 24, ptr %30) #5
  %178 = load ptr, ptr %7, align 8, !tbaa !5
  %179 = load i32, ptr %25, align 4, !tbaa !32
  %180 = sitofp i32 %179 to float
  %181 = load float, ptr %28, align 4, !tbaa !34
  %182 = fadd float %180, %181
  %183 = load i64, ptr %5, align 8, !tbaa !9
  %184 = uitofp i64 %183 to float
  %185 = fdiv float %182, %184
  %186 = load i32, ptr %24, align 4, !tbaa !32
  %187 = sitofp i32 %186 to float
  %188 = load float, ptr %29, align 4, !tbaa !34
  %189 = fadd float %187, %188
  %190 = load i64, ptr %6, align 8, !tbaa !9
  %191 = uitofp i64 %190 to float
  %192 = fdiv float %189, %191
  %193 = fsub float 1.000000e+00, %192
  invoke void @_ZNK6Camera5rayAtEff(ptr dead_on_unwind writable sret(%class.Ray) align 4 %30, ptr noundef nonnull align 4 dereferenceable(56) %178, float noundef %185, float noundef %193)
          to label %194 unwind label %214

194:                                              ; preds = %176
  call void @llvm.lifetime.start.p0(i64 1, ptr %31) #5
  store i8 1, ptr %31, align 1, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 12, ptr %32) #5
  invoke void @_ZN4Vec3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %32, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
          to label %195 unwind label %218

195:                                              ; preds = %194
  %196 = getelementptr inbounds %class.Renderer, ptr %51, i32 0, i32 2
  %197 = load i32, ptr %196, align 4, !tbaa !37
  switch i32 %197, label %310 [
    i32 0, label %222
    i32 1, label %268
  ]

198:                                              ; preds = %165
  %199 = landingpad { ptr, i32 }
          cleanup
  %200 = extractvalue { ptr, i32 } %199, 0
  store ptr %200, ptr %10, align 8
  %201 = extractvalue { ptr, i32 } %199, 1
  store i32 %201, ptr %11, align 4
  br label %359

202:                                              ; preds = %166
  %203 = landingpad { ptr, i32 }
          cleanup
  %204 = extractvalue { ptr, i32 } %203, 0
  store ptr %204, ptr %10, align 8
  %205 = extractvalue { ptr, i32 } %203, 1
  store i32 %205, ptr %11, align 4
  br label %358

206:                                              ; preds = %171
  %207 = landingpad { ptr, i32 }
          cleanup
  %208 = extractvalue { ptr, i32 } %207, 0
  store ptr %208, ptr %10, align 8
  %209 = extractvalue { ptr, i32 } %207, 1
  store i32 %209, ptr %11, align 4
  br label %357

210:                                              ; preds = %173
  %211 = landingpad { ptr, i32 }
          cleanup
  %212 = extractvalue { ptr, i32 } %211, 0
  store ptr %212, ptr %10, align 8
  %213 = extractvalue { ptr, i32 } %211, 1
  store i32 %213, ptr %11, align 4
  br label %356

214:                                              ; preds = %176
  %215 = landingpad { ptr, i32 }
          cleanup
  %216 = extractvalue { ptr, i32 } %215, 0
  store ptr %216, ptr %10, align 8
  %217 = extractvalue { ptr, i32 } %215, 1
  store i32 %217, ptr %11, align 4
  br label %355

218:                                              ; preds = %194
  %219 = landingpad { ptr, i32 }
          cleanup
  %220 = extractvalue { ptr, i32 } %219, 0
  store ptr %220, ptr %10, align 8
  %221 = extractvalue { ptr, i32 } %219, 1
  store i32 %221, ptr %11, align 4
  br label %354

222:                                              ; preds = %195
  %223 = invoke noundef zeroext i1 @_ZNK6kdtree5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %14)
          to label %224 unwind label %230

224:                                              ; preds = %222
  br i1 %223, label %248, label %225

225:                                              ; preds = %224
  call void @llvm.lifetime.start.p0(i64 12, ptr %33) #5
  invoke void @_ZN3RayC2ERKS_(ptr noundef nonnull align 4 dereferenceable(24) %34, ptr noundef nonnull align 4 dereferenceable(24) %30)
          to label %226 unwind label %234

226:                                              ; preds = %225
  invoke void @_ZN8Renderer17calculateColorRayE3RayRbR6kdtree(ptr dead_on_unwind writable sret(%class.Vec3) align 4 %33, ptr noundef nonnull align 8 dereferenceable(228) %51, ptr noundef %34, ptr noundef nonnull align 1 dereferenceable(1) %31, ptr noundef nonnull align 8 dereferenceable(80) %14)
          to label %227 unwind label %238

227:                                              ; preds = %226
  %228 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN4Vec3IfEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %32, ptr noundef nonnull align 4 dereferenceable(12) %33)
          to label %229 unwind label %242

229:                                              ; preds = %227
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %33) #5
  call void @_ZN3RayD2Ev(ptr noundef nonnull align 4 dereferenceable(24) %34) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %33) #5
  br label %267

230:                                              ; preds = %347, %341, %268, %222
  %231 = landingpad { ptr, i32 }
          cleanup
  %232 = extractvalue { ptr, i32 } %231, 0
  store ptr %232, ptr %10, align 8
  %233 = extractvalue { ptr, i32 } %231, 1
  store i32 %233, ptr %11, align 4
  br label %353

234:                                              ; preds = %225
  %235 = landingpad { ptr, i32 }
          cleanup
  %236 = extractvalue { ptr, i32 } %235, 0
  store ptr %236, ptr %10, align 8
  %237 = extractvalue { ptr, i32 } %235, 1
  store i32 %237, ptr %11, align 4
  br label %247

238:                                              ; preds = %226
  %239 = landingpad { ptr, i32 }
          cleanup
  %240 = extractvalue { ptr, i32 } %239, 0
  store ptr %240, ptr %10, align 8
  %241 = extractvalue { ptr, i32 } %239, 1
  store i32 %241, ptr %11, align 4
  br label %246

242:                                              ; preds = %227
  %243 = landingpad { ptr, i32 }
          cleanup
  %244 = extractvalue { ptr, i32 } %243, 0
  store ptr %244, ptr %10, align 8
  %245 = extractvalue { ptr, i32 } %243, 1
  store i32 %245, ptr %11, align 4
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %33) #5
  br label %246

246:                                              ; preds = %242, %238
  call void @_ZN3RayD2Ev(ptr noundef nonnull align 4 dereferenceable(24) %34) #5
  br label %247

247:                                              ; preds = %246, %234
  call void @llvm.lifetime.end.p0(i64 12, ptr %33) #5
  br label %353

248:                                              ; preds = %224
  call void @llvm.lifetime.start.p0(i64 12, ptr %35) #5
  invoke void @_ZN3RayC2ERKS_(ptr noundef nonnull align 4 dereferenceable(24) %36, ptr noundef nonnull align 4 dereferenceable(24) %30)
          to label %249 unwind label %253

249:                                              ; preds = %248
  invoke void @_ZN8Renderer17calculateColorRayE3RayRb(ptr dead_on_unwind writable sret(%class.Vec3) align 4 %35, ptr noundef nonnull align 8 dereferenceable(228) %51, ptr noundef %36, ptr noundef nonnull align 1 dereferenceable(1) %31)
          to label %250 unwind label %257

250:                                              ; preds = %249
  %251 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN4Vec3IfEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %32, ptr noundef nonnull align 4 dereferenceable(12) %35)
          to label %252 unwind label %261

252:                                              ; preds = %250
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %35) #5
  call void @_ZN3RayD2Ev(ptr noundef nonnull align 4 dereferenceable(24) %36) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %35) #5
  br label %267

253:                                              ; preds = %248
  %254 = landingpad { ptr, i32 }
          cleanup
  %255 = extractvalue { ptr, i32 } %254, 0
  store ptr %255, ptr %10, align 8
  %256 = extractvalue { ptr, i32 } %254, 1
  store i32 %256, ptr %11, align 4
  br label %266

257:                                              ; preds = %249
  %258 = landingpad { ptr, i32 }
          cleanup
  %259 = extractvalue { ptr, i32 } %258, 0
  store ptr %259, ptr %10, align 8
  %260 = extractvalue { ptr, i32 } %258, 1
  store i32 %260, ptr %11, align 4
  br label %265

261:                                              ; preds = %250
  %262 = landingpad { ptr, i32 }
          cleanup
  %263 = extractvalue { ptr, i32 } %262, 0
  store ptr %263, ptr %10, align 8
  %264 = extractvalue { ptr, i32 } %262, 1
  store i32 %264, ptr %11, align 4
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %35) #5
  br label %265

265:                                              ; preds = %261, %257
  call void @_ZN3RayD2Ev(ptr noundef nonnull align 4 dereferenceable(24) %36) #5
  br label %266

266:                                              ; preds = %265, %253
  call void @llvm.lifetime.end.p0(i64 12, ptr %35) #5
  br label %353

267:                                              ; preds = %252, %229
  br label %311

268:                                              ; preds = %195
  %269 = invoke noundef zeroext i1 @_ZNK6kdtree5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %14)
          to label %270 unwind label %230

270:                                              ; preds = %268
  br i1 %269, label %290, label %271

271:                                              ; preds = %270
  call void @llvm.lifetime.start.p0(i64 12, ptr %37) #5
  invoke void @_ZN3RayC2ERKS_(ptr noundef nonnull align 4 dereferenceable(24) %38, ptr noundef nonnull align 4 dereferenceable(24) %30)
          to label %272 unwind label %276

272:                                              ; preds = %271
  invoke void @_ZN8Renderer18calculateColorPathE3RayRbiiR6kdtree(ptr dead_on_unwind writable sret(%class.Vec3) align 4 %37, ptr noundef nonnull align 8 dereferenceable(228) %51, ptr noundef %38, ptr noundef nonnull align 1 dereferenceable(1) %31, i32 noundef 0, i32 noundef 3, ptr noundef nonnull align 8 dereferenceable(80) %14)
          to label %273 unwind label %280

273:                                              ; preds = %272
  %274 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN4Vec3IfEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %32, ptr noundef nonnull align 4 dereferenceable(12) %37)
          to label %275 unwind label %284

275:                                              ; preds = %273
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %37) #5
  call void @_ZN3RayD2Ev(ptr noundef nonnull align 4 dereferenceable(24) %38) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %37) #5
  br label %309

276:                                              ; preds = %271
  %277 = landingpad { ptr, i32 }
          cleanup
  %278 = extractvalue { ptr, i32 } %277, 0
  store ptr %278, ptr %10, align 8
  %279 = extractvalue { ptr, i32 } %277, 1
  store i32 %279, ptr %11, align 4
  br label %289

280:                                              ; preds = %272
  %281 = landingpad { ptr, i32 }
          cleanup
  %282 = extractvalue { ptr, i32 } %281, 0
  store ptr %282, ptr %10, align 8
  %283 = extractvalue { ptr, i32 } %281, 1
  store i32 %283, ptr %11, align 4
  br label %288

284:                                              ; preds = %273
  %285 = landingpad { ptr, i32 }
          cleanup
  %286 = extractvalue { ptr, i32 } %285, 0
  store ptr %286, ptr %10, align 8
  %287 = extractvalue { ptr, i32 } %285, 1
  store i32 %287, ptr %11, align 4
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %37) #5
  br label %288

288:                                              ; preds = %284, %280
  call void @_ZN3RayD2Ev(ptr noundef nonnull align 4 dereferenceable(24) %38) #5
  br label %289

289:                                              ; preds = %288, %276
  call void @llvm.lifetime.end.p0(i64 12, ptr %37) #5
  br label %353

290:                                              ; preds = %270
  call void @llvm.lifetime.start.p0(i64 12, ptr %39) #5
  invoke void @_ZN3RayC2ERKS_(ptr noundef nonnull align 4 dereferenceable(24) %40, ptr noundef nonnull align 4 dereferenceable(24) %30)
          to label %291 unwind label %295

291:                                              ; preds = %290
  invoke void @_ZN8Renderer18calculateColorPathE3RayRbii(ptr dead_on_unwind writable sret(%class.Vec3) align 4 %39, ptr noundef nonnull align 8 dereferenceable(228) %51, ptr noundef %40, ptr noundef nonnull align 1 dereferenceable(1) %31, i32 noundef 0, i32 noundef 3)
          to label %292 unwind label %299

292:                                              ; preds = %291
  %293 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN4Vec3IfEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %32, ptr noundef nonnull align 4 dereferenceable(12) %39)
          to label %294 unwind label %303

294:                                              ; preds = %292
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %39) #5
  call void @_ZN3RayD2Ev(ptr noundef nonnull align 4 dereferenceable(24) %40) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %39) #5
  br label %309

295:                                              ; preds = %290
  %296 = landingpad { ptr, i32 }
          cleanup
  %297 = extractvalue { ptr, i32 } %296, 0
  store ptr %297, ptr %10, align 8
  %298 = extractvalue { ptr, i32 } %296, 1
  store i32 %298, ptr %11, align 4
  br label %308

299:                                              ; preds = %291
  %300 = landingpad { ptr, i32 }
          cleanup
  %301 = extractvalue { ptr, i32 } %300, 0
  store ptr %301, ptr %10, align 8
  %302 = extractvalue { ptr, i32 } %300, 1
  store i32 %302, ptr %11, align 4
  br label %307

303:                                              ; preds = %292
  %304 = landingpad { ptr, i32 }
          cleanup
  %305 = extractvalue { ptr, i32 } %304, 0
  store ptr %305, ptr %10, align 8
  %306 = extractvalue { ptr, i32 } %304, 1
  store i32 %306, ptr %11, align 4
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %39) #5
  br label %307

307:                                              ; preds = %303, %299
  call void @_ZN3RayD2Ev(ptr noundef nonnull align 4 dereferenceable(24) %40) #5
  br label %308

308:                                              ; preds = %307, %295
  call void @llvm.lifetime.end.p0(i64 12, ptr %39) #5
  br label %353

309:                                              ; preds = %294, %275
  br label %311

310:                                              ; preds = %195
  br label %311

311:                                              ; preds = %310, %309, %267
  call void @llvm.lifetime.start.p0(i64 12, ptr %41) #5
  invoke void @_ZN4Vec3IfEC2ERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %42, ptr noundef nonnull align 4 dereferenceable(12) %32)
          to label %312 unwind label %327

312:                                              ; preds = %311
  invoke void @_ZN8Renderer14normalizeColorE4Vec3IfE(ptr dead_on_unwind writable sret(%class.Vec3) align 4 %41, ptr noundef nonnull align 8 dereferenceable(228) %51, ptr noundef %42)
          to label %313 unwind label %331

313:                                              ; preds = %312
  %314 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN4Vec3IfEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %26, ptr noundef nonnull align 4 dereferenceable(12) %41)
          to label %315 unwind label %335

315:                                              ; preds = %313
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %41) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %42) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %41) #5
  %316 = load i8, ptr %31, align 1, !tbaa !35, !range !38, !noundef !39
  %317 = trunc i8 %316 to i1
  br i1 %317, label %318, label %341

318:                                              ; preds = %315
  %319 = load i32, ptr %25, align 4, !tbaa !32
  %320 = sext i32 %319 to i64
  %321 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %320) #5
  %322 = load i32, ptr %24, align 4, !tbaa !32
  %323 = sext i32 %322 to i64
  %324 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %321, i64 noundef %323) #5
  %325 = load i32, ptr %324, align 4, !tbaa !32
  %326 = add nsw i32 %325, 1
  store i32 %326, ptr %324, align 4, !tbaa !32
  br label %341

327:                                              ; preds = %311
  %328 = landingpad { ptr, i32 }
          cleanup
  %329 = extractvalue { ptr, i32 } %328, 0
  store ptr %329, ptr %10, align 8
  %330 = extractvalue { ptr, i32 } %328, 1
  store i32 %330, ptr %11, align 4
  br label %340

331:                                              ; preds = %312
  %332 = landingpad { ptr, i32 }
          cleanup
  %333 = extractvalue { ptr, i32 } %332, 0
  store ptr %333, ptr %10, align 8
  %334 = extractvalue { ptr, i32 } %332, 1
  store i32 %334, ptr %11, align 4
  br label %339

335:                                              ; preds = %313
  %336 = landingpad { ptr, i32 }
          cleanup
  %337 = extractvalue { ptr, i32 } %336, 0
  store ptr %337, ptr %10, align 8
  %338 = extractvalue { ptr, i32 } %336, 1
  store i32 %338, ptr %11, align 4
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %41) #5
  br label %339

339:                                              ; preds = %335, %331
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %42) #5
  br label %340

340:                                              ; preds = %339, %327
  call void @llvm.lifetime.end.p0(i64 12, ptr %41) #5
  br label %353

341:                                              ; preds = %318, %315
  %342 = load i32, ptr %25, align 4, !tbaa !32
  %343 = sext i32 %342 to i64
  %344 = load i32, ptr %24, align 4, !tbaa !32
  %345 = sext i32 %344 to i64
  %346 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN5ImageclEmm(ptr noundef nonnull align 8 dereferenceable(48) %8, i64 noundef %343, i64 noundef %345)
          to label %347 unwind label %230

347:                                              ; preds = %341
  %348 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN4Vec3IfEpLERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %346, ptr noundef nonnull align 4 dereferenceable(12) %26)
          to label %349 unwind label %230

349:                                              ; preds = %347
  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 @llvm.lifetime.end.p0(i64 1, ptr %31) #5
  call void @_ZN3RayD2Ev(ptr noundef nonnull align 4 dereferenceable(24) %30) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #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 @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %26) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %26) #5
  br label %350

350:                                              ; preds = %349
  %351 = load i32, ptr %25, align 4, !tbaa !32
  %352 = add nsw i32 %351, 1
  store i32 %352, ptr %25, align 4, !tbaa !32
  br label %155, !llvm.loop !40

353:                                              ; preds = %340, %308, %289, %266, %247, %230
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %32) #5
  br label %354

354:                                              ; preds = %353, %218
  call void @llvm.lifetime.end.p0(i64 12, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #5
  call void @_ZN3RayD2Ev(ptr noundef nonnull align 4 dereferenceable(24) %30) #5
  br label %355

355:                                              ; preds = %354, %214
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #5
  br label %356

356:                                              ; preds = %355, %210
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  br label %357

357:                                              ; preds = %356, %206
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %27) #5
  br label %358

358:                                              ; preds = %357, %202
  call void @llvm.lifetime.end.p0(i64 12, ptr %27) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %26) #5
  br label %359

359:                                              ; preds = %358, %198
  call void @llvm.lifetime.end.p0(i64 12, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  br label %364

360:                                              ; preds = %160
  br label %361

361:                                              ; preds = %360
  %362 = load i32, ptr %24, align 4, !tbaa !32
  %363 = add nsw i32 %362, 1
  store i32 %363, ptr %24, align 4, !tbaa !32
  br label %131, !llvm.loop !42

364:                                              ; preds = %359, %161
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  br label %468

365:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #5
  store i32 0, ptr %43, align 4, !tbaa !32
  br label %366

366:                                              ; preds = %450, %365
  %367 = load i32, ptr %43, align 4, !tbaa !32
  %368 = sext i32 %367 to i64
  %369 = load i64, ptr %6, align 8, !tbaa !9
  %370 = icmp ult i64 %368, %369
  br i1 %370, label %372, label %371

371:                                              ; preds = %366
  store i32 12, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #5
  br label %453

372:                                              ; preds = %366
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #5
  store i32 0, ptr %44, align 4, !tbaa !32
  br label %373

373:                                              ; preds = %422, %372
  %374 = load i32, ptr %44, align 4, !tbaa !32
  %375 = sext i32 %374 to i64
  %376 = load i64, ptr %5, align 8, !tbaa !9
  %377 = icmp ult i64 %375, %376
  br i1 %377, label %379, label %378

378:                                              ; preds = %373
  store i32 15, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #5
  br label %449

379:                                              ; preds = %373
  call void @llvm.lifetime.start.p0(i64 12, ptr %45) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %46) #5
  %380 = load i32, ptr %44, align 4, !tbaa !32
  %381 = sext i32 %380 to i64
  %382 = load i32, ptr %43, align 4, !tbaa !32
  %383 = sext i32 %382 to i64
  %384 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN5ImageclEmm(ptr noundef nonnull align 8 dereferenceable(48) %8, i64 noundef %381, i64 noundef %383)
          to label %385 unwind label %425

385:                                              ; preds = %379
  %386 = load i32, ptr %22, align 4, !tbaa !32
  %387 = add nsw i32 %386, 1
  %388 = sitofp i32 %387 to float
  invoke void @_ZNK4Vec3IfEdvEf(ptr dead_on_unwind writable sret(%class.Vec3) align 4 %46, ptr noundef nonnull align 4 dereferenceable(12) %384, float noundef %388)
          to label %389 unwind label %425

389:                                              ; preds = %385
  call void @llvm.lifetime.start.p0(i64 12, ptr %47) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %48) #5
  %390 = load ptr, ptr %4, align 8, !tbaa !5
  %391 = load i32, ptr %44, align 4, !tbaa !32
  %392 = sext i32 %391 to i64
  %393 = load i32, ptr %43, align 4, !tbaa !32
  %394 = sext i32 %393 to i64
  %395 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN5ImageclEmm(ptr noundef nonnull align 8 dereferenceable(48) %390, i64 noundef %392, i64 noundef %394)
          to label %396 unwind label %429

396:                                              ; preds = %389
  %397 = load i32, ptr %22, align 4, !tbaa !32
  %398 = add nsw i32 %397, 1
  %399 = load i32, ptr %44, align 4, !tbaa !32
  %400 = sext i32 %399 to i64
  %401 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %400) #5
  %402 = load i32, ptr %43, align 4, !tbaa !32
  %403 = sext i32 %402 to i64
  %404 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %401, i64 noundef %403) #5
  %405 = load i32, ptr %404, align 4, !tbaa !32
  %406 = sub nsw i32 %398, %405
  %407 = sitofp i32 %406 to float
  invoke void @_ZNK4Vec3IfEmlEf(ptr dead_on_unwind writable sret(%class.Vec3) align 4 %48, ptr noundef nonnull align 4 dereferenceable(12) %395, float noundef %407)
          to label %408 unwind label %429

408:                                              ; preds = %396
  %409 = load i32, ptr %22, align 4, !tbaa !32
  %410 = add nsw i32 %409, 1
  %411 = sitofp i32 %410 to float
  invoke void @_ZNK4Vec3IfEdvEf(ptr dead_on_unwind writable sret(%class.Vec3) align 4 %47, ptr noundef nonnull align 4 dereferenceable(12) %48, float noundef %411)
          to label %412 unwind label %433

412:                                              ; preds = %408
  invoke void @_ZNK4Vec3IfEplERKS0_(ptr dead_on_unwind writable sret(%class.Vec3) align 4 %45, ptr noundef nonnull align 4 dereferenceable(12) %46, ptr noundef nonnull align 4 dereferenceable(12) %47)
          to label %413 unwind label %437

413:                                              ; preds = %412
  %414 = load i32, ptr %44, align 4, !tbaa !32
  %415 = sext i32 %414 to i64
  %416 = load i32, ptr %43, align 4, !tbaa !32
  %417 = sext i32 %416 to i64
  %418 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN5ImageclEmm(ptr noundef nonnull align 8 dereferenceable(48) %9, i64 noundef %415, i64 noundef %417)
          to label %419 unwind label %441

419:                                              ; preds = %413
  %420 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN4Vec3IfEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %418, ptr noundef nonnull align 4 dereferenceable(12) %45)
          to label %421 unwind label %441

421:                                              ; preds = %419
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %45) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %47) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %48) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %48) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %47) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %46) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %46) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %45) #5
  br label %422

422:                                              ; preds = %421
  %423 = load i32, ptr %44, align 4, !tbaa !32
  %424 = add nsw i32 %423, 1
  store i32 %424, ptr %44, align 4, !tbaa !32
  br label %373, !llvm.loop !43

425:                                              ; preds = %385, %379
  %426 = landingpad { ptr, i32 }
          cleanup
  %427 = extractvalue { ptr, i32 } %426, 0
  store ptr %427, ptr %10, align 8
  %428 = extractvalue { ptr, i32 } %426, 1
  store i32 %428, ptr %11, align 4
  br label %448

429:                                              ; preds = %396, %389
  %430 = landingpad { ptr, i32 }
          cleanup
  %431 = extractvalue { ptr, i32 } %430, 0
  store ptr %431, ptr %10, align 8
  %432 = extractvalue { ptr, i32 } %430, 1
  store i32 %432, ptr %11, align 4
  br label %447

433:                                              ; preds = %408
  %434 = landingpad { ptr, i32 }
          cleanup
  %435 = extractvalue { ptr, i32 } %434, 0
  store ptr %435, ptr %10, align 8
  %436 = extractvalue { ptr, i32 } %434, 1
  store i32 %436, ptr %11, align 4
  br label %446

437:                                              ; preds = %412
  %438 = landingpad { ptr, i32 }
          cleanup
  %439 = extractvalue { ptr, i32 } %438, 0
  store ptr %439, ptr %10, align 8
  %440 = extractvalue { ptr, i32 } %438, 1
  store i32 %440, ptr %11, align 4
  br label %445

441:                                              ; preds = %419, %413
  %442 = landingpad { ptr, i32 }
          cleanup
  %443 = extractvalue { ptr, i32 } %442, 0
  store ptr %443, ptr %10, align 8
  %444 = extractvalue { ptr, i32 } %442, 1
  store i32 %444, ptr %11, align 4
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %45) #5
  br label %445

445:                                              ; preds = %441, %437
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %47) #5
  br label %446

446:                                              ; preds = %445, %433
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %48) #5
  br label %447

447:                                              ; preds = %446, %429
  call void @llvm.lifetime.end.p0(i64 12, ptr %48) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %47) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %46) #5
  br label %448

448:                                              ; preds = %447, %425
  call void @llvm.lifetime.end.p0(i64 12, ptr %46) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %45) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #5
  br label %468

449:                                              ; preds = %378
  br label %450

450:                                              ; preds = %449
  %451 = load i32, ptr %43, align 4, !tbaa !32
  %452 = add nsw i32 %451, 1
  store i32 %452, ptr %43, align 4, !tbaa !32
  br label %366, !llvm.loop !44

453:                                              ; preds = %371
  call void @llvm.lifetime.start.p0(i64 32, ptr %49) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %50) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %50) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %49, ptr noundef @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %50)
          to label %454 unwind label %459

454:                                              ; preds = %453
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %50) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %50) #5
  invoke void @_ZN5Image7savePPMERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(48) %9, ptr noundef nonnull align 8 dereferenceable(32) %49)
          to label %455 unwind label %463

455:                                              ; preds = %454
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %49) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %49) #5
  br label %456

456:                                              ; preds = %455
  %457 = load i32, ptr %22, align 4, !tbaa !32
  %458 = add nsw i32 %457, 1
  store i32 %458, ptr %22, align 4, !tbaa !32
  br label %107, !llvm.loop !45

459:                                              ; preds = %453
  %460 = landingpad { ptr, i32 }
          cleanup
  %461 = extractvalue { ptr, i32 } %460, 0
  store ptr %461, ptr %10, align 8
  %462 = extractvalue { ptr, i32 } %460, 1
  store i32 %462, ptr %11, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %50) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %50) #5
  br label %467

463:                                              ; preds = %454
  %464 = landingpad { ptr, i32 }
          cleanup
  %465 = extractvalue { ptr, i32 } %464, 0
  store ptr %465, ptr %10, align 8
  %466 = extractvalue { ptr, i32 } %464, 1
  store i32 %466, ptr %11, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %49) #5
  br label %467

467:                                              ; preds = %463, %459
  call void @llvm.lifetime.end.p0(i64 32, ptr %49) #5
  br label %468

468:                                              ; preds = %467, %448, %364
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %473

469:                                              ; preds = %112
  %470 = load ptr, ptr %4, align 8, !tbaa !5
  %471 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5ImageaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %470, ptr noundef nonnull align 8 dereferenceable(48) %9)
          to label %472 unwind label %126

472:                                              ; preds = %469
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #5
  call void @_ZN6kdtreeD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %14) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %14) #5
  call void @_ZN9PhotonMapD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %12) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %12) #5
  call void @_ZN5ImageD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %9) #5
  call void @_ZN5ImageD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  ret void

473:                                              ; preds = %468, %126
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  br label %474

474:                                              ; preds = %473, %125
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #5
  call void @_ZN6kdtreeD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %14) #5
  br label %475

475:                                              ; preds = %474, %113
  call void @llvm.lifetime.end.p0(i64 80, ptr %14) #5
  br label %476

476:                                              ; preds = %475, %84
  call void @_ZN9PhotonMapD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %12) #5
  br label %477

477:                                              ; preds = %476, %80
  call void @llvm.lifetime.end.p0(i64 40, ptr %12) #5
  call void @_ZN5ImageD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #5
  br label %478

478:                                              ; preds = %477, %76
  call void @llvm.lifetime.end.p0(i64 48, ptr %9) #5
  call void @_ZN5ImageD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  br label %479

479:                                              ; preds = %478
  %480 = load ptr, ptr %10, align 8
  %481 = load i32, ptr %11, align 4
  %482 = insertvalue { ptr, i32 } poison, ptr %480, 0
  %483 = insertvalue { ptr, i32 } %482, i32 %481, 1
  resume { ptr, i32 } %483
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9PhotonMapC2ERK5Scenei9RayTracer(ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(112), i32 noundef, ptr noundef) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #4

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt25uniform_real_distributionIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8Renderer16printProgressBarEf(ptr noundef nonnull align 8 dereferenceable(228), float noundef) #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK6Camera5rayAtEff(ptr dead_on_unwind noalias writable sret(%class.Ray) align 4, ptr noundef nonnull align 4 dereferenceable(56), float noundef, float noundef) #3 align 2

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

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5Image7savePPMERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(32)) #4 align 2

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

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

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

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !13, i64 16}
!12 = !{!"_ZTS8Renderer", !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !14, i64 24, !14, i64 64, !15, i64 104, !20, i64 112, !22, i64 224}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTS9PhotonMap", !15, i64 0, !16, i64 8, !13, i64 32}
!15 = !{!"_ZTS9RayTracer"}
!16 = !{!"_ZTSSt6vectorI8ParticleSaIS0_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseI8ParticleSaIS0_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseI8ParticleSaIS0_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseI8ParticleSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"_ZTS5Scene", !21, i64 8, !24, i64 64, !28, i64 88}
!21 = !{!"_ZTS6Camera", !22, i64 0, !22, i64 4, !23, i64 8, !23, i64 20, !23, i64 32, !23, i64 44}
!22 = !{!"float", !7, i64 0}
!23 = !{!"_ZTS4Vec3IfE", !7, i64 0}
!24 = !{!"_ZTSSt6vectorI11LightSourceSaIS0_EE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseI11LightSourceSaIS0_EE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseI11LightSourceSaIS0_EE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseI11LightSourceSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!28 = !{!"_ZTSSt6vectorI4MeshSaIS0_EE", !29, i64 0}
!29 = !{!"_ZTSSt12_Vector_baseI4MeshSaIS0_EE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseI4MeshSaIS0_EE12_Vector_implE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseI4MeshSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!32 = !{!13, !13, i64 0}
!33 = !{!12, !13, i64 8}
!34 = !{!22, !22, i64 0}
!35 = !{!36, !36, i64 0}
!36 = !{!"bool", !7, i64 0}
!37 = !{!12, !13, i64 12}
!38 = !{i8 0, i8 2}
!39 = !{}
!40 = distinct !{!40, !41}
!41 = !{!"llvm.loop.mustprogress"}
!42 = distinct !{!42, !41}
!43 = distinct !{!43, !41}
!44 = distinct !{!44, !41}
!45 = distinct !{!45, !41}


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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%class.Vec3 = type { [3 x float] }
%class.Image = type { ptr, i64, i64, %"class.std::vector.10" }
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<Vec3<float>, std::allocator<Vec3<float>>>::_Vector_impl" }
%"struct.std::_Vector_base<Vec3<float>, std::allocator<Vec3<float>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Vec3<float>, std::allocator<Vec3<float>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Vec3<float>, std::allocator<Vec3<float>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.PhotonMap = type <{ %class.RayTracer, %"class.std::vector", i32, [4 x i8] }>
%class.RayTracer = type { ptr }
%"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.kdtree = type { ptr, ptr, double, i64, %"class.std::vector.26", %"class.std::vector.26" }
%"class.std::vector.26" = type { %"struct.std::_Vector_base.27" }
%"struct.std::_Vector_base.27" = type { %"struct.std::_Vector_base<kdtree::node, std::allocator<kdtree::node>>::_Vector_impl" }
%"struct.std::_Vector_base<kdtree::node, std::allocator<kdtree::node>>::_Vector_impl" = type { %"struct.std::_Vector_base<kdtree::node, std::allocator<kdtree::node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<kdtree::node, std::allocator<kdtree::node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.32" = type { %"struct.std::_Vector_base.33" }
%"struct.std::_Vector_base.33" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.20" = type { %"struct.std::_Vector_base.21" }
%"struct.std::_Vector_base.21" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.22" = type { i8 }
%"class.std::allocator.34" = type { i8 }
%"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.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.37" = type { i8 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [43 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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 #1 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 #1 align 2

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 #1 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8Renderer17calculateColorRayE3RayRbR6kdtree(ptr dead_on_unwind noalias writable sret(%class.Vec3) align 4, ptr noundef nonnull align 8 dereferenceable(228), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8Renderer18calculateColorPathE3RayRbii(ptr dead_on_unwind noalias writable sret(%class.Vec3) align 4, ptr noundef nonnull align 8 dereferenceable(228), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1), i32 noundef, i32 noundef) local_unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4Vec3IfEC2ERKS0_(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 void @_ZNK4Vec3IfEplERKS0_(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 uwtable
declare dso_local void @_ZN3RayC2ERKS_(ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(24)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8Renderer18calculateColorPathE3RayRbiiR6kdtree(ptr dead_on_unwind noalias writable sret(%class.Vec3) align 4, ptr noundef nonnull align 8 dereferenceable(228), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1), i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8Renderer6renderER5Image(ptr noundef nonnull align 8 dereferenceable(228) %0, ptr noundef nonnull align 8 dereferenceable(48) %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %class.Image, align 8
  %4 = alloca %class.Image, align 8
  %5 = alloca %class.PhotonMap, align 8
  %6 = alloca %class.RayTracer, align 8
  %7 = alloca %class.kdtree, align 8
  %8 = alloca %"class.std::vector.32", align 8
  %9 = alloca %"class.std::vector.20", align 8
  %10 = alloca %"class.std::allocator.22", align 1
  %11 = alloca %"class.std::allocator.34", align 1
  %12 = alloca %"class.std::uniform_real_distribution", align 4
  %13 = alloca %class.Vec3, align 4
  %14 = alloca %class.Vec3, align 4
  %15 = alloca %class.Ray, align 4
  %16 = alloca i8, align 1
  %17 = alloca %class.Vec3, align 4
  %18 = alloca %class.Vec3, align 4
  %19 = alloca %class.Ray, align 4
  %20 = alloca %class.Vec3, align 4
  %21 = alloca %class.Ray, align 4
  %22 = alloca %class.Vec3, align 4
  %23 = alloca %class.Ray, align 4
  %24 = alloca %class.Vec3, align 4
  %25 = alloca %class.Ray, align 4
  %26 = alloca %class.Vec3, align 4
  %27 = alloca %class.Vec3, align 4
  %28 = alloca %class.Vec3, align 4
  %29 = alloca %class.Vec3, align 4
  %30 = alloca %class.Vec3, align 4
  %31 = alloca %class.Vec3, align 4
  %32 = alloca %"class.std::__cxx11::basic_string", align 8
  %33 = alloca %"class.std::allocator.37", align 1
  %34 = tail call noundef i64 @_ZNK5Image5widthEv(ptr noundef nonnull align 8 dereferenceable(48) %1)
  %35 = tail call noundef i64 @_ZNK5Image6heightEv(ptr noundef nonnull align 8 dereferenceable(48) %1)
  %36 = getelementptr inbounds i8, ptr %0, i64 112
  %37 = tail call noundef nonnull align 4 dereferenceable(56) ptr @_ZN5Scene6cameraEv(ptr noundef nonnull align 8 dereferenceable(112) %36)
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #5
  call void @_ZN5ImageC2Emm(ptr noundef nonnull align 8 dereferenceable(48) %3, i64 noundef %34, i64 noundef %35)
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #5
  invoke void @_ZN5ImageC2Emm(ptr noundef nonnull align 8 dereferenceable(48) %4, i64 noundef %34, i64 noundef %35)
          to label %38 unwind label %49

38:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #5
  %39 = getelementptr inbounds i8, ptr %0, i64 16
  %40 = load i32, ptr %39, align 8, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %0, i64 104
  call void @_ZN9RayTracerC2ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %41) #5
  invoke void @_ZN9PhotonMapC2ERK5Scenei9RayTracer(ptr noundef nonnull align 8 dereferenceable(36) %5, ptr noundef nonnull align 8 dereferenceable(112) %36, i32 noundef %40, ptr noundef nonnull %6)
          to label %42 unwind label %51

42:                                               ; preds = %38
  call void @_ZN9RayTracerD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %43 = load i32, ptr %39, align 8, !tbaa !5
  %44 = icmp sgt i32 %43, 0
  br i1 %44, label %45, label %55

45:                                               ; preds = %42
  %46 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
          to label %47 unwind label %53

47:                                               ; preds = %45
  %48 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %55 unwind label %53

49:                                               ; preds = %2
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %209

51:                                               ; preds = %38
  %52 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9RayTracerD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br label %208

53:                                               ; preds = %47, %45
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %207

55:                                               ; preds = %47, %42
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %7) #5
  %56 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN9PhotonMap4listEv(ptr noundef nonnull align 8 dereferenceable(36) %5)
  %57 = call ptr @_ZNSt6vectorI8ParticleSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %56) #5
  %58 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN9PhotonMap4listEv(ptr noundef nonnull align 8 dereferenceable(36) %5)
  %59 = call ptr @_ZNSt6vectorI8ParticleSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %58) #5
  invoke void @_ZN6kdtreeC2IN9__gnu_cxx17__normal_iteratorIP8ParticleSt6vectorIS3_SaIS3_EEEEEET_S9_(ptr noundef nonnull align 8 dereferenceable(80) %7, ptr %57, ptr %59)
          to label %60 unwind label %145

60:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #5
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %35, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %61 unwind label %147

61:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #5
  call void @_ZNSaISt6vectorIiSaIiEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %34, ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %62 unwind label %149

62:                                               ; preds = %61
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #5
  invoke void @_ZNSt25uniform_real_distributionIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %12, float noundef 0.000000e+00, float noundef 1.000000e+00)
          to label %.preheader118 unwind label %152

.preheader118:                                    ; preds = %62
  %63 = getelementptr inbounds i8, ptr %0, i64 8
  %64 = load i32, ptr %63, align 8, !tbaa !29
  %65 = icmp sgt i32 %64, 0
  br i1 %65, label %.preheader117.lr.ph, label %._crit_edge

.preheader117.lr.ph:                              ; preds = %.preheader118
  %.not = icmp eq i64 %35, 0
  %66 = uitofp i64 %35 to float
  %.not175 = icmp eq i64 %34, 0
  %67 = uitofp i64 %34 to float
  %68 = getelementptr inbounds i8, ptr %0, i64 12
  br label %.preheader117

.preheader117:                                    ; preds = %.preheader117.lr.ph, %194
  %indvars.iv200 = phi i64 [ 0, %.preheader117.lr.ph ], [ %indvars.iv.next201, %194 ]
  br i1 %.not, label %._crit_edge160, label %.lr.ph121

.lr.ph121:                                        ; preds = %.preheader117
  %69 = mul i64 %35, %indvars.iv200
  %70 = uitofp i64 %69 to float
  br i1 %.not175, label %.lr.ph121.split, label %.lr.ph121.split.us.preheader

.lr.ph121.split.us.preheader:                     ; preds = %.lr.ph121
  %71 = trunc nuw nsw i64 %indvars.iv200 to i32
  br label %.lr.ph121.split.us

.lr.ph121.split.us:                               ; preds = %.lr.ph121.split.us.preheader, %..loopexit_crit_edge.us
  %indvars.iv181 = phi i64 [ 0, %.lr.ph121.split.us.preheader ], [ %indvars.iv.next182, %..loopexit_crit_edge.us ]
  %indvars.iv.next182 = add nuw nsw i64 %indvars.iv181, 1
  %72 = trunc nuw nsw i64 %indvars.iv.next182 to i32
  %73 = uitofp nneg i32 %72 to float
  %74 = fadd float %70, %73
  %75 = load i32, ptr %63, align 8, !tbaa !29
  %76 = sitofp i32 %75 to float
  %77 = fmul float %66, %76
  %78 = fdiv float %74, %77
  invoke void @_ZN8Renderer16printProgressBarEf(ptr noundef nonnull align 8 dereferenceable(228) %0, float noundef %78)
          to label %.preheader115.us unwind label %.split.us

79:                                               ; preds = %.preheader115.us, %126
  %indvars.iv = phi i64 [ 0, %.preheader115.us ], [ %indvars.iv.next, %126 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %13) #5
  call void @_ZN4Vec3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %13, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %14) #5
  %80 = load i32, ptr %63, align 8, !tbaa !29
  invoke void @_ZN9RayTracer12jitterSampleEii(ptr dead_on_unwind nonnull writable sret(%class.Vec3) align 4 %14, ptr noundef nonnull align 8 dereferenceable(8) %41, i32 noundef %71, i32 noundef %80)
          to label %81 unwind label %.split123.us

81:                                               ; preds = %79
  %82 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4Vec3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %14, i32 noundef 0)
  %83 = load float, ptr %82, align 4, !tbaa !30
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4Vec3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %14, i32 noundef 1)
  %85 = load float, ptr %84, align 4, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #5
  %86 = trunc nuw nsw i64 %indvars.iv to i32
  %87 = uitofp nneg i32 %86 to float
  %88 = fadd float %83, %87
  %89 = fdiv float %88, %67
  %90 = fadd float %85, %130
  %91 = fdiv float %90, %66
  %92 = fsub float 1.000000e+00, %91
  invoke void @_ZNK6Camera5rayAtEff(ptr dead_on_unwind nonnull writable sret(%class.Ray) align 4 %15, ptr noundef nonnull align 4 dereferenceable(56) %37, float noundef %89, float noundef %92)
          to label %93 unwind label %.split126.us

93:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %16) #5
  store i8 1, ptr %16, align 1, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %17) #5
  call void @_ZN4Vec3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %17, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %94 = load i32, ptr %68, align 4, !tbaa !33
  switch i32 %94, label %115 [
    i32 0, label %105
    i32 1, label %95
  ]

95:                                               ; preds = %93
  %96 = call noundef zeroext i1 @_ZNK6kdtree5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %7)
  br i1 %96, label %101, label %97

97:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %22) #5
  invoke void @_ZN3RayC2ERKS_(ptr noundef nonnull align 4 dereferenceable(24) %23, ptr noundef nonnull align 4 dereferenceable(24) %15)
          to label %98 unwind label %.split129.us

98:                                               ; preds = %97
  invoke void @_ZN8Renderer18calculateColorPathE3RayRbiiR6kdtree(ptr dead_on_unwind nonnull writable sret(%class.Vec3) align 4 %22, ptr noundef nonnull align 8 dereferenceable(228) %0, ptr noundef nonnull %23, ptr noundef nonnull align 1 dereferenceable(1) %16, i32 noundef 0, i32 noundef 3, ptr noundef nonnull align 8 dereferenceable(80) %7)
          to label %99 unwind label %.split132.us

99:                                               ; preds = %98
  %100 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN4Vec3IfEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %17, ptr noundef nonnull align 4 dereferenceable(12) %22)
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %22) #5
  call void @_ZN3RayD2Ev(ptr noundef nonnull align 4 dereferenceable(24) %23) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %22) #5
  br label %115

101:                                              ; preds = %95
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %24) #5
  invoke void @_ZN3RayC2ERKS_(ptr noundef nonnull align 4 dereferenceable(24) %25, ptr noundef nonnull align 4 dereferenceable(24) %15)
          to label %102 unwind label %.split135.us

102:                                              ; preds = %101
  invoke void @_ZN8Renderer18calculateColorPathE3RayRbii(ptr dead_on_unwind nonnull writable sret(%class.Vec3) align 4 %24, ptr noundef nonnull align 8 dereferenceable(228) %0, ptr noundef nonnull %25, ptr noundef nonnull align 1 dereferenceable(1) %16, i32 noundef 0, i32 noundef 3)
          to label %103 unwind label %.split138.us

103:                                              ; preds = %102
  %104 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN4Vec3IfEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %17, ptr noundef nonnull align 4 dereferenceable(12) %24)
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %24) #5
  call void @_ZN3RayD2Ev(ptr noundef nonnull align 4 dereferenceable(24) %25) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %24) #5
  br label %115

105:                                              ; preds = %93
  %106 = call noundef zeroext i1 @_ZNK6kdtree5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %7)
  br i1 %106, label %111, label %107

107:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %18) #5
  invoke void @_ZN3RayC2ERKS_(ptr noundef nonnull align 4 dereferenceable(24) %19, ptr noundef nonnull align 4 dereferenceable(24) %15)
          to label %108 unwind label %.split141.us

108:                                              ; preds = %107
  invoke void @_ZN8Renderer17calculateColorRayE3RayRbR6kdtree(ptr dead_on_unwind nonnull writable sret(%class.Vec3) align 4 %18, ptr noundef nonnull align 8 dereferenceable(228) %0, ptr noundef nonnull %19, ptr noundef nonnull align 1 dereferenceable(1) %16, ptr noundef nonnull align 8 dereferenceable(80) %7)
          to label %109 unwind label %.split144.us

109:                                              ; preds = %108
  %110 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN4Vec3IfEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %17, ptr noundef nonnull align 4 dereferenceable(12) %18)
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %18) #5
  call void @_ZN3RayD2Ev(ptr noundef nonnull align 4 dereferenceable(24) %19) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %18) #5
  br label %115

111:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %20) #5
  invoke void @_ZN3RayC2ERKS_(ptr noundef nonnull align 4 dereferenceable(24) %21, ptr noundef nonnull align 4 dereferenceable(24) %15)
          to label %112 unwind label %.split147.us

112:                                              ; preds = %111
  invoke void @_ZN8Renderer17calculateColorRayE3RayRb(ptr dead_on_unwind nonnull writable sret(%class.Vec3) align 4 %20, ptr noundef nonnull align 8 dereferenceable(228) %0, ptr noundef nonnull %21, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %113 unwind label %.split150.us

113:                                              ; preds = %112
  %114 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN4Vec3IfEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %17, ptr noundef nonnull align 4 dereferenceable(12) %20)
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %20) #5
  call void @_ZN3RayD2Ev(ptr noundef nonnull align 4 dereferenceable(24) %21) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %20) #5
  br label %115

115:                                              ; preds = %113, %109, %103, %99, %93
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %26) #5
  invoke void @_ZN4Vec3IfEC2ERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %27, ptr noundef nonnull align 4 dereferenceable(12) %17)
          to label %116 unwind label %.split153.us

116:                                              ; preds = %115
  invoke void @_ZN8Renderer14normalizeColorE4Vec3IfE(ptr dead_on_unwind nonnull writable sret(%class.Vec3) align 4 %26, ptr noundef nonnull align 8 dereferenceable(228) %0, ptr noundef nonnull %27)
          to label %117 unwind label %.split156.us

117:                                              ; preds = %116
  %118 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN4Vec3IfEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %13, ptr noundef nonnull align 4 dereferenceable(12) %26)
  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 nonnull %26) #5
  %119 = load i8, ptr %16, align 1, !tbaa !31, !range !34, !noundef !35
  %120 = trunc nuw i8 %119 to i1
  br i1 %120, label %121, label %126

121:                                              ; preds = %117
  %122 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %indvars.iv) #5
  %123 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %122, i64 noundef %indvars.iv181) #5
  %124 = load i32, ptr %123, align 4, !tbaa !36
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %123, align 4, !tbaa !36
  br label %126

126:                                              ; preds = %121, %117
  %127 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5ImageclEmm(ptr noundef nonnull align 8 dereferenceable(48) %3, i64 noundef %indvars.iv, i64 noundef %indvars.iv181)
  %128 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN4Vec3IfEpLERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %127, ptr noundef nonnull align 4 dereferenceable(12) %13)
  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 @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #5
  call void @_ZN3RayD2Ev(ptr noundef nonnull align 4 dereferenceable(24) %15) #5
  call void @llvm.lifetime.end.p0(i64 24, 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
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %13) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #5
  %indvars.iv.next = add nuw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %34
  br i1 %exitcond.not, label %..loopexit_crit_edge.us, label %79, !llvm.loop !37

.preheader115.us:                                 ; preds = %.lr.ph121.split.us
  %129 = trunc nuw nsw i64 %indvars.iv181 to i32
  %130 = uitofp nneg i32 %129 to float
  br label %79

..loopexit_crit_edge.us:                          ; preds = %126
  %exitcond184.not = icmp eq i64 %indvars.iv.next182, %35
  br i1 %exitcond184.not, label %.preheader.us.preheader, label %.lr.ph121.split.us, !llvm.loop !39

.split.us:                                        ; preds = %.lr.ph121.split.us
  %131 = landingpad { ptr, i32 }
          cleanup
  br label %204

.split123.us:                                     ; preds = %79
  %132 = landingpad { ptr, i32 }
          cleanup
  br label %189

.split126.us:                                     ; preds = %81
  %133 = landingpad { ptr, i32 }
          cleanup
  br label %188

.split129.us:                                     ; preds = %97
  %134 = landingpad { ptr, i32 }
          cleanup
  br label %184

.split132.us:                                     ; preds = %98
  %135 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3RayD2Ev(ptr noundef nonnull align 4 dereferenceable(24) %23) #5
  br label %184

.split135.us:                                     ; preds = %101
  %136 = landingpad { ptr, i32 }
          cleanup
  br label %185

.split138.us:                                     ; preds = %102
  %137 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3RayD2Ev(ptr noundef nonnull align 4 dereferenceable(24) %25) #5
  br label %185

.split141.us:                                     ; preds = %107
  %138 = landingpad { ptr, i32 }
          cleanup
  br label %182

.split144.us:                                     ; preds = %108
  %139 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3RayD2Ev(ptr noundef nonnull align 4 dereferenceable(24) %19) #5
  br label %182

.split147.us:                                     ; preds = %111
  %140 = landingpad { ptr, i32 }
          cleanup
  br label %183

.split150.us:                                     ; preds = %112
  %141 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3RayD2Ev(ptr noundef nonnull align 4 dereferenceable(24) %21) #5
  br label %183

.split153.us:                                     ; preds = %115
  %142 = landingpad { ptr, i32 }
          cleanup
  br label %186

.split156.us:                                     ; preds = %116
  %143 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %27) #5
  br label %186

._crit_edge:                                      ; preds = %194, %.preheader118
  %144 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN5ImageaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(48) %4)
          to label %203 unwind label %152

145:                                              ; preds = %55
  %146 = landingpad { ptr, i32 }
          cleanup
  br label %206

147:                                              ; preds = %60
  %148 = landingpad { ptr, i32 }
          cleanup
  br label %151

149:                                              ; preds = %61
  %150 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  br label %151

151:                                              ; preds = %149, %147
  %.pn = phi { ptr, i32 } [ %150, %149 ], [ %148, %147 ]
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #5
  br label %205

152:                                              ; preds = %._crit_edge, %62
  %153 = landingpad { ptr, i32 }
          cleanup
  br label %204

.preheader.lr.ph:                                 ; preds = %.preheader115
  br i1 %.not175, label %._crit_edge160, label %.preheader.us.preheader

.preheader.us.preheader:                          ; preds = %..loopexit_crit_edge.us, %.preheader.lr.ph
  %.in = trunc i64 %indvars.iv200 to i32
  %154 = add i32 %.in, 1
  %155 = uitofp i32 %154 to float
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge.us
  %indvars.iv193 = phi i64 [ 0, %.preheader.us.preheader ], [ %indvars.iv.next194, %._crit_edge.us ]
  br label %156

156:                                              ; preds = %.preheader.us, %167
  %indvars.iv189 = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next190, %167 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %28) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %29) #5
  %157 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5ImageclEmm(ptr noundef nonnull align 8 dereferenceable(48) %3, i64 noundef %indvars.iv189, i64 noundef %indvars.iv193)
  invoke void @_ZNK4Vec3IfEdvEf(ptr dead_on_unwind nonnull writable sret(%class.Vec3) align 4 %29, ptr noundef nonnull align 4 dereferenceable(12) %157, float noundef %155)
          to label %158 unwind label %.split162.us

158:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %30) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %31) #5
  %159 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5ImageclEmm(ptr noundef nonnull align 8 dereferenceable(48) %1, i64 noundef %indvars.iv189, i64 noundef %indvars.iv193)
  %160 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %indvars.iv189) #5
  %161 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %160, i64 noundef %indvars.iv193) #5
  %162 = load i32, ptr %161, align 4, !tbaa !36
  %163 = sub nsw i32 %154, %162
  %164 = sitofp i32 %163 to float
  invoke void @_ZNK4Vec3IfEmlEf(ptr dead_on_unwind nonnull writable sret(%class.Vec3) align 4 %31, ptr noundef nonnull align 4 dereferenceable(12) %159, float noundef %164)
          to label %165 unwind label %.split165.us

165:                                              ; preds = %158
  invoke void @_ZNK4Vec3IfEdvEf(ptr dead_on_unwind nonnull writable sret(%class.Vec3) align 4 %30, ptr noundef nonnull align 4 dereferenceable(12) %31, float noundef %155)
          to label %166 unwind label %.split168.us

166:                                              ; preds = %165
  invoke void @_ZNK4Vec3IfEplERKS0_(ptr dead_on_unwind nonnull writable sret(%class.Vec3) align 4 %28, ptr noundef nonnull align 4 dereferenceable(12) %29, ptr noundef nonnull align 4 dereferenceable(12) %30)
          to label %167 unwind label %.split171.us

167:                                              ; preds = %166
  %168 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5ImageclEmm(ptr noundef nonnull align 8 dereferenceable(48) %4, i64 noundef %indvars.iv189, i64 noundef %indvars.iv193)
  %169 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN4Vec3IfEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %168, ptr noundef nonnull align 4 dereferenceable(12) %28)
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %28) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %30) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %31) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %31) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %30) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %29) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %29) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %28) #5
  %indvars.iv.next190 = add nuw i64 %indvars.iv189, 1
  %exitcond192.not = icmp eq i64 %indvars.iv.next190, %34
  br i1 %exitcond192.not, label %._crit_edge.us, label %156, !llvm.loop !40

._crit_edge.us:                                   ; preds = %167
  %indvars.iv.next194 = add nuw i64 %indvars.iv193, 1
  %exitcond196.not = icmp eq i64 %indvars.iv.next194, %35
  br i1 %exitcond196.not, label %._crit_edge160, label %.preheader.us, !llvm.loop !41

.split162.us:                                     ; preds = %156
  %170 = landingpad { ptr, i32 }
          cleanup
  br label %192

.split165.us:                                     ; preds = %158
  %171 = landingpad { ptr, i32 }
          cleanup
  br label %191

.split168.us:                                     ; preds = %165
  %172 = landingpad { ptr, i32 }
          cleanup
  br label %190

.split171.us:                                     ; preds = %166
  %173 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %30) #5
  br label %190

.lr.ph121.split:                                  ; preds = %.lr.ph121, %.preheader115
  %indvars.iv185 = phi i64 [ %indvars.iv.next186, %.preheader115 ], [ 0, %.lr.ph121 ]
  %indvars.iv.next186 = add nuw nsw i64 %indvars.iv185, 1
  %174 = trunc nuw nsw i64 %indvars.iv.next186 to i32
  %175 = uitofp nneg i32 %174 to float
  %176 = fadd float %70, %175
  %177 = load i32, ptr %63, align 8, !tbaa !29
  %178 = sitofp i32 %177 to float
  %179 = fmul float %66, %178
  %180 = fdiv float %176, %179
  invoke void @_ZN8Renderer16printProgressBarEf(ptr noundef nonnull align 8 dereferenceable(228) %0, float noundef %180)
          to label %.preheader115 unwind label %.split

.preheader115:                                    ; preds = %.lr.ph121.split
  %exitcond188.not = icmp eq i64 %indvars.iv.next186, %35
  br i1 %exitcond188.not, label %.preheader.lr.ph, label %.lr.ph121.split, !llvm.loop !39

.split:                                           ; preds = %.lr.ph121.split
  %181 = landingpad { ptr, i32 }
          cleanup
  br label %204

182:                                              ; preds = %.split144.us, %.split141.us
  %.pn98 = phi { ptr, i32 } [ %139, %.split144.us ], [ %138, %.split141.us ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %18) #5
  br label %187

183:                                              ; preds = %.split150.us, %.split147.us
  %.pn100 = phi { ptr, i32 } [ %141, %.split150.us ], [ %140, %.split147.us ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %20) #5
  br label %187

184:                                              ; preds = %.split132.us, %.split129.us
  %.pn94 = phi { ptr, i32 } [ %135, %.split132.us ], [ %134, %.split129.us ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %22) #5
  br label %187

185:                                              ; preds = %.split138.us, %.split135.us
  %.pn96 = phi { ptr, i32 } [ %137, %.split138.us ], [ %136, %.split135.us ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %24) #5
  br label %187

186:                                              ; preds = %.split156.us, %.split153.us
  %.pn102 = phi { ptr, i32 } [ %143, %.split156.us ], [ %142, %.split153.us ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %26) #5
  br label %187

187:                                              ; preds = %186, %185, %184, %183, %182
  %.pn102.pn = phi { ptr, i32 } [ %.pn102, %186 ], [ %.pn96, %185 ], [ %.pn94, %184 ], [ %.pn100, %183 ], [ %.pn98, %182 ]
  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 @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #5
  call void @_ZN3RayD2Ev(ptr noundef nonnull align 4 dereferenceable(24) %15) #5
  br label %188

188:                                              ; preds = %187, %.split126.us
  %.pn102.pn.pn = phi { ptr, i32 } [ %.pn102.pn, %187 ], [ %133, %.split126.us ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %14) #5
  br label %189

189:                                              ; preds = %188, %.split123.us
  %.pn102.pn.pn.pn = phi { ptr, i32 } [ %.pn102.pn.pn, %188 ], [ %132, %.split123.us ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %14) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %13) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #5
  br label %204

._crit_edge160:                                   ; preds = %._crit_edge.us, %.preheader117, %.preheader.lr.ph
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %32) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %33) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %32, ptr noundef nonnull @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %33)
          to label %193 unwind label %198

190:                                              ; preds = %.split171.us, %.split168.us
  %.pn90 = phi { ptr, i32 } [ %173, %.split171.us ], [ %172, %.split168.us ]
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %31) #5
  br label %191

191:                                              ; preds = %190, %.split165.us
  %.pn90.pn = phi { ptr, i32 } [ %.pn90, %190 ], [ %171, %.split165.us ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %31) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %30) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %29) #5
  br label %192

192:                                              ; preds = %191, %.split162.us
  %.pn90.pn.pn = phi { ptr, i32 } [ %.pn90.pn, %191 ], [ %170, %.split162.us ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %29) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %28) #5
  br label %204

193:                                              ; preds = %._crit_edge160
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %33) #5
  invoke void @_ZN5Image7savePPMERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(32) %32)
          to label %194 unwind label %200

194:                                              ; preds = %193
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %32) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %32) #5
  %indvars.iv.next201 = add nuw nsw i64 %indvars.iv200, 1
  %195 = load i32, ptr %63, align 8, !tbaa !29
  %196 = sext i32 %195 to i64
  %197 = icmp slt i64 %indvars.iv.next201, %196
  br i1 %197, label %.preheader117, label %._crit_edge, !llvm.loop !42

198:                                              ; preds = %._crit_edge160
  %199 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %33) #5
  br label %202

200:                                              ; preds = %193
  %201 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %32) #5
  br label %202

202:                                              ; preds = %200, %198
  %.pn88 = phi { ptr, i32 } [ %201, %200 ], [ %199, %198 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %32) #5
  br label %204

203:                                              ; preds = %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  call void @_ZN6kdtreeD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %7) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %7) #5
  call void @_ZN9PhotonMapD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %5) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #5
  call void @_ZN5ImageD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #5
  call void @_ZN5ImageD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #5
  ret void

204:                                              ; preds = %.split, %.split.us, %192, %202, %189, %152
  %.pn102.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %153, %152 ], [ %.pn90.pn.pn, %192 ], [ %.pn88, %202 ], [ %.pn102.pn.pn.pn, %189 ], [ %181, %.split ], [ %131, %.split.us ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  br label %205

205:                                              ; preds = %204, %151
  %.pn102.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn102.pn.pn.pn.pn.pn.pn, %204 ], [ %.pn, %151 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  call void @_ZN6kdtreeD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %7) #5
  br label %206

206:                                              ; preds = %205, %145
  %.pn102.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn102.pn.pn.pn.pn.pn.pn.pn, %205 ], [ %146, %145 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %7) #5
  br label %207

207:                                              ; preds = %206, %53
  %.pn102.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn102.pn.pn.pn.pn.pn.pn.pn.pn, %206 ], [ %54, %53 ]
  call void @_ZN9PhotonMapD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %5) #5
  br label %208

208:                                              ; preds = %207, %51
  %.pn102.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn102.pn.pn.pn.pn.pn.pn.pn.pn.pn, %207 ], [ %52, %51 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #5
  call void @_ZN5ImageD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #5
  br label %209

209:                                              ; preds = %208, %49
  %.pn102.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn102.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %208 ], [ %50, %49 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #5
  call void @_ZN5ImageD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn102.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9PhotonMapC2ERK5Scenei9RayTracer(ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(112), i32 noundef, ptr noundef) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #4

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt25uniform_real_distributionIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8Renderer16printProgressBarEf(ptr noundef nonnull align 8 dereferenceable(228), float noundef) local_unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK6Camera5rayAtEff(ptr dead_on_unwind noalias writable sret(%class.Ray) align 4, ptr noundef nonnull align 4 dereferenceable(56), float noundef, float noundef) local_unnamed_addr #3 align 2

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

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5Image7savePPMERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4 align 2

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

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

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

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

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

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

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

attributes #0 = { 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 #1 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress 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, !7, i64 16}
!6 = !{!"_ZTS8Renderer", !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !10, i64 24, !10, i64 64, !11, i64 104, !17, i64 112, !19, i64 224}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS9PhotonMap", !11, i64 0, !12, i64 8, !7, i64 32}
!11 = !{!"_ZTS9RayTracer"}
!12 = !{!"_ZTSSt6vectorI8ParticleSaIS0_EE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseI8ParticleSaIS0_EE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseI8ParticleSaIS0_EE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseI8ParticleSaIS0_EE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!16 = !{!"any pointer", !8, i64 0}
!17 = !{!"_ZTS5Scene", !18, i64 8, !21, i64 64, !25, i64 88}
!18 = !{!"_ZTS6Camera", !19, i64 0, !19, i64 4, !20, i64 8, !20, i64 20, !20, i64 32, !20, i64 44}
!19 = !{!"float", !8, i64 0}
!20 = !{!"_ZTS4Vec3IfE", !8, i64 0}
!21 = !{!"_ZTSSt6vectorI11LightSourceSaIS0_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseI11LightSourceSaIS0_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseI11LightSourceSaIS0_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseI11LightSourceSaIS0_EE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!25 = !{!"_ZTSSt6vectorI4MeshSaIS0_EE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseI4MeshSaIS0_EE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseI4MeshSaIS0_EE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseI4MeshSaIS0_EE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!29 = !{!6, !7, i64 8}
!30 = !{!19, !19, i64 0}
!31 = !{!32, !32, i64 0}
!32 = !{!"bool", !8, i64 0}
!33 = !{!6, !7, i64 12}
!34 = !{i8 0, i8 2}
!35 = !{}
!36 = !{!7, !7, i64 0}
!37 = distinct !{!37, !38}
!38 = !{!"llvm.loop.mustprogress"}
!39 = distinct !{!39, !38}
!40 = distinct !{!40, !38}
!41 = distinct !{!41, !38}
!42 = distinct !{!42, !38}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass