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

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

%class.Vec3 = type { [3 x float] }
%class.Vec3.25 = type { [3 x i32] }
%class.Renderer = type <{ ptr, i32, i32, i32, i32, %class.PhotonMap, %class.PhotonMap, %class.RayTracer, %class.Scene, float, [4 x i8] }>
%class.PhotonMap = type <{ %class.RayTracer, %"class.std::vector", i32, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Particle, std::allocator<Particle>>::_Vector_impl" }
%"struct.std::_Vector_base<Particle, std::allocator<Particle>>::_Vector_impl" = type { %"struct.std::_Vector_base<Particle, std::allocator<Particle>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Particle, std::allocator<Particle>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.RayTracer = type { ptr }
%class.Scene = type { ptr, %class.Camera, %"class.std::vector.0", %"class.std::vector.5" }
%class.Camera = type { float, float, %class.Vec3, %class.Vec3, %class.Vec3, %class.Vec3 }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<LightSource, std::allocator<LightSource>>::_Vector_impl" }
%"struct.std::_Vector_base<LightSource, std::allocator<LightSource>>::_Vector_impl" = type { %"struct.std::_Vector_base<LightSource, std::allocator<LightSource>>::_Vector_impl_data" }
%"struct.std::_Vector_base<LightSource, std::allocator<LightSource>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<Mesh, std::allocator<Mesh>>::_Vector_impl" }
%"struct.std::_Vector_base<Mesh, std::allocator<Mesh>>::_Vector_impl" = type { %"struct.std::_Vector_base<Mesh, std::allocator<Mesh>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Mesh, std::allocator<Mesh>>::_Vector_impl_data" = type { ptr, ptr, ptr }

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8Renderer5shadeERK3RayR4Vec3IiERmRfS7_S7_RS3_IfES9_S9_(ptr noundef nonnull align 8 dereferenceable(228), ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #0 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8Renderer17calculateColorRayE3RayRb(ptr dead_on_unwind noalias writable sret(%class.Vec3) align 4 %0, ptr noundef nonnull align 8 dereferenceable(228) %1, ptr noundef %2, ptr noundef nonnull align 1 dereferenceable(1) %3) #0 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca %class.Vec3.25, align 4
  %11 = alloca i1, align 1
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %class.Vec3, align 4
  %15 = alloca %class.Vec3, align 4
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca i8, align 1
  %20 = alloca i32, align 4
  store ptr %0, ptr %5, align 8
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %21 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %10) #5
  call void @_ZN4Vec3IiEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %10)
  store i1 false, ptr %11, align 1
  invoke void @_ZN4Vec3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %0, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
          to label %22 unwind label %37

22:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 12, ptr %14) #5
  invoke void @_ZN4Vec3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %14)
          to label %23 unwind label %41

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

24:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #5
  %25 = getelementptr inbounds %class.Renderer, ptr %21, i32 0, i32 7
  %26 = getelementptr inbounds %class.Renderer, ptr %21, i32 0, i32 8
  %27 = invoke noundef zeroext i1 @_ZN9RayTracer8rayTraceERK3RayRK5SceneRmR4Vec3IiERfSA_SA_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 4 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(112) %26, ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %28 unwind label %49

28:                                               ; preds = %24
  %29 = zext i1 %27 to i8
  store i8 %29, ptr %19, align 1, !tbaa !9
  %30 = load i8, ptr %19, align 1, !tbaa !9, !range !11, !noundef !12
  %31 = trunc i8 %30 to i1
  br i1 %31, label %32, label %35

32:                                               ; preds = %28
  %33 = load float, ptr %18, align 4, !tbaa !13
  %34 = fcmp ogt float %33, 0.000000e+00
  br i1 %34, label %53, label %35

35:                                               ; preds = %32, %28
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  store i8 0, ptr %36, align 1, !tbaa !9
  store i1 true, ptr %11, align 1
  store i32 1, ptr %20, align 4
  br label %55

37:                                               ; preds = %4
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %12, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %13, align 4
  br label %61

41:                                               ; preds = %22
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %12, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %13, align 4
  br label %58

45:                                               ; preds = %23
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %12, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %13, align 4
  br label %57

49:                                               ; preds = %53, %24
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %12, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %15) #5
  br label %57

53:                                               ; preds = %32
  invoke void @_ZN8Renderer5shadeERK3RayR4Vec3IiERmRfS7_S7_RS3_IfES9_S9_(ptr noundef nonnull align 8 dereferenceable(228) %21, ptr noundef nonnull align 4 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(12) %14, ptr noundef nonnull align 4 dereferenceable(12) %15, ptr noundef nonnull align 4 dereferenceable(12) %0)
          to label %54 unwind label %49

54:                                               ; preds = %53
  store i1 true, ptr %11, align 1
  store i32 1, ptr %20, align 4
  br label %55

55:                                               ; preds = %54, %35
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %15) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %15) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %14) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %14) #5
  %56 = load i1, ptr %11, align 1
  br i1 %56, label %60, label %59

57:                                               ; preds = %49, %45
  call void @llvm.lifetime.end.p0(i64 12, ptr %15) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %14) #5
  br label %58

58:                                               ; preds = %57, %41
  call void @llvm.lifetime.end.p0(i64 12, ptr %14) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %0) #5
  br label %61

59:                                               ; preds = %55
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %0) #5
  br label %60

60:                                               ; preds = %59, %55
  call void @_ZN4Vec3IiED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %10) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  ret void

61:                                               ; preds = %58, %37
  call void @_ZN4Vec3IiED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %10) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %62

62:                                               ; preds = %61
  %63 = load ptr, ptr %12, align 8
  %64 = load i32, ptr %13, align 4
  %65 = insertvalue { ptr, i32 } poison, ptr %63, 0
  %66 = insertvalue { ptr, i32 } %65, i32 %64, 1
  resume { ptr, i32 } %66
}

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

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

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


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

%class.Vec3 = type { [3 x float] }
%class.Vec3.25 = type { [3 x i32] }

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8Renderer5shadeERK3RayR4Vec3IiERmRfS7_S7_RS3_IfES9_S9_(ptr noundef nonnull align 8 dereferenceable(228), ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #0 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8Renderer17calculateColorRayE3RayRb(ptr dead_on_unwind noalias writable sret(%class.Vec3) align 4 %0, ptr noundef nonnull align 8 dereferenceable(228) %1, ptr noundef %2, ptr nocapture noundef nonnull writeonly align 1 dereferenceable(1) %3) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca i64, align 8
  %6 = alloca %class.Vec3.25, align 4
  %7 = alloca %class.Vec3, align 4
  %8 = alloca %class.Vec3, align 4
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #5
  call void @_ZN4Vec3IiEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %6)
  call void @_ZN4Vec3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %0, 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 %7) #5
  call void @_ZN4Vec3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %7)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #5
  call void @_ZN4Vec3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %8)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #5
  %12 = getelementptr inbounds i8, ptr %1, i64 104
  %13 = getelementptr inbounds i8, ptr %1, i64 112
  %14 = invoke noundef zeroext i1 @_ZN9RayTracer8rayTraceERK3RayRK5SceneRmR4Vec3IiERfSA_SA_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 4 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(112) %13, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(12) %6, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %15 unwind label %19

15:                                               ; preds = %4
  %16 = load float, ptr %11, align 4
  %17 = fcmp ogt float %16, 0.000000e+00
  %or.cond = select i1 %14, i1 %17, i1 false
  br i1 %or.cond, label %21, label %18

18:                                               ; preds = %15
  store i8 0, ptr %3, align 1, !tbaa !5
  br label %22

19:                                               ; preds = %21, %4
  %20 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %8) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %7) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %0) #5
  call void @_ZN4Vec3IiED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %6) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  resume { ptr, i32 } %20

21:                                               ; preds = %15
  invoke void @_ZN8Renderer5shadeERK3RayR4Vec3IiERmRfS7_S7_RS3_IfES9_S9_(ptr noundef nonnull align 8 dereferenceable(228) %1, ptr noundef nonnull align 4 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(12) %6, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef nonnull align 4 dereferenceable(12) %8, ptr noundef nonnull align 4 dereferenceable(12) %0)
          to label %22 unwind label %19

22:                                               ; preds = %21, %18
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %8) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #5
  call void @_ZN4Vec3IfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %7) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #5
  call void @_ZN4Vec3IiED2Ev(ptr noundef nonnull align 4 dereferenceable(12) %6) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  ret void
}

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

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

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


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