; LLVM IR from ysyesilyurt/ComputerGraphics :: RayTracing/Shape.ll (ZNK8Triangle9intersectERK3Ray)

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

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

@pScene = external global ptr, align 8

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK8Triangle9intersectERK3Ray(ptr dead_on_unwind noalias writable sret(%struct.IntersectionData) align 4 %0, ptr noundef nonnull align 8 dereferenceable(28) %1, ptr noundef nonnull align 4 dereferenceable(24) %2) unnamed_addr #5 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %struct.Vector3f, align 4
  %7 = alloca %struct.Vector3f, align 4
  %8 = alloca %struct.Vector3f, align 4
  %9 = alloca float, align 4
  %10 = alloca i32, align 4
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca %struct.Vector3f, align 4
  %15 = alloca %struct.Vector3f, align 4
  %16 = alloca %struct.Vector3f, align 4
  %17 = alloca { <2 x float>, float }, align 4
  %18 = alloca { <2 x float>, float }, align 8
  %19 = alloca %struct.Vector3f, align 4
  %20 = alloca %struct.Vector3f, align 4
  %21 = alloca { <2 x float>, float }, align 4
  %22 = alloca { <2 x float>, float }, align 8
  %23 = alloca { <2 x float>, float }, align 8
  %24 = alloca { <2 x float>, float }, align 4
  %25 = alloca { <2 x float>, float }, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  store ptr %2, ptr %5, align 8, !tbaa !5
  %26 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr %6) #7
  %27 = load ptr, ptr @pScene, align 8, !tbaa !5
  %28 = getelementptr inbounds %class.Scene, ptr %27, i32 0, i32 8
  %29 = getelementptr inbounds %class.Triangle, ptr %26, i32 0, i32 1
  %30 = load i32, ptr %29, align 8, !tbaa !9
  %31 = sub nsw i32 %30, 1
  %32 = sext i32 %31 to i64
  %33 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI8Vector3fSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %32) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %6, ptr align 4 %33, i64 12, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.start.p0(i64 12, ptr %7) #7
  %34 = load ptr, ptr @pScene, align 8, !tbaa !5
  %35 = getelementptr inbounds %class.Scene, ptr %34, i32 0, i32 8
  %36 = getelementptr inbounds %class.Triangle, ptr %26, i32 0, i32 2
  %37 = load i32, ptr %36, align 4, !tbaa !15
  %38 = sub nsw i32 %37, 1
  %39 = sext i32 %38 to i64
  %40 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI8Vector3fSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %35, i64 noundef %39) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %7, ptr align 4 %40, i64 12, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.start.p0(i64 12, ptr %8) #7
  %41 = load ptr, ptr @pScene, align 8, !tbaa !5
  %42 = getelementptr inbounds %class.Scene, ptr %41, i32 0, i32 8
  %43 = getelementptr inbounds %class.Triangle, ptr %26, i32 0, i32 3
  %44 = load i32, ptr %43, align 8, !tbaa !16
  %45 = sub nsw i32 %44, 1
  %46 = sext i32 %45 to i64
  %47 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI8Vector3fSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %42, i64 noundef %46) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 4 %47, i64 12, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %48 = getelementptr inbounds %struct.Vector3f, ptr %6, i32 0, i32 0
  %49 = load float, ptr %48, align 4, !tbaa !14
  %50 = getelementptr inbounds %struct.Vector3f, ptr %7, i32 0, i32 0
  %51 = load float, ptr %50, align 4, !tbaa !14
  %52 = fsub float %49, %51
  %53 = getelementptr inbounds %struct.Vector3f, ptr %6, i32 0, i32 0
  %54 = load float, ptr %53, align 4, !tbaa !14
  %55 = getelementptr inbounds %struct.Vector3f, ptr %8, i32 0, i32 0
  %56 = load float, ptr %55, align 4, !tbaa !14
  %57 = fsub float %54, %56
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %class.Ray, ptr %58, i32 0, i32 1
  %60 = getelementptr inbounds %struct.Vector3f, ptr %59, i32 0, i32 0
  %61 = load float, ptr %60, align 4, !tbaa !14
  %62 = getelementptr inbounds %struct.Vector3f, ptr %6, i32 0, i32 1
  %63 = load float, ptr %62, align 4, !tbaa !14
  %64 = getelementptr inbounds %struct.Vector3f, ptr %7, i32 0, i32 1
  %65 = load float, ptr %64, align 4, !tbaa !14
  %66 = fsub float %63, %65
  %67 = getelementptr inbounds %struct.Vector3f, ptr %6, i32 0, i32 1
  %68 = load float, ptr %67, align 4, !tbaa !14
  %69 = getelementptr inbounds %struct.Vector3f, ptr %8, i32 0, i32 1
  %70 = load float, ptr %69, align 4, !tbaa !14
  %71 = fsub float %68, %70
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = getelementptr inbounds %class.Ray, ptr %72, i32 0, i32 1
  %74 = getelementptr inbounds %struct.Vector3f, ptr %73, i32 0, i32 1
  %75 = load float, ptr %74, align 4, !tbaa !14
  %76 = getelementptr inbounds %struct.Vector3f, ptr %6, i32 0, i32 2
  %77 = load float, ptr %76, align 4, !tbaa !14
  %78 = getelementptr inbounds %struct.Vector3f, ptr %7, i32 0, i32 2
  %79 = load float, ptr %78, align 4, !tbaa !14
  %80 = fsub float %77, %79
  %81 = getelementptr inbounds %struct.Vector3f, ptr %6, i32 0, i32 2
  %82 = load float, ptr %81, align 4, !tbaa !14
  %83 = getelementptr inbounds %struct.Vector3f, ptr %8, i32 0, i32 2
  %84 = load float, ptr %83, align 4, !tbaa !14
  %85 = fsub float %82, %84
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = getelementptr inbounds %class.Ray, ptr %86, i32 0, i32 1
  %88 = getelementptr inbounds %struct.Vector3f, ptr %87, i32 0, i32 2
  %89 = load float, ptr %88, align 4, !tbaa !14
  %90 = call noundef float @_Z11determinantfffffffff(float noundef %52, float noundef %57, float noundef %61, float noundef %66, float noundef %71, float noundef %75, float noundef %80, float noundef %85, float noundef %89)
  store float %90, ptr %9, align 4, !tbaa !17
  %91 = load float, ptr %9, align 4, !tbaa !17
  %92 = load ptr, ptr @pScene, align 8, !tbaa !5
  %93 = getelementptr inbounds %class.Scene, ptr %92, i32 0, i32 1
  %94 = load float, ptr %93, align 4, !tbaa !19
  %95 = fcmp olt float %91, %94
  br i1 %95, label %96, label %110

96:                                               ; preds = %3
  %97 = load float, ptr %9, align 4, !tbaa !17
  %98 = load ptr, ptr @pScene, align 8, !tbaa !5
  %99 = getelementptr inbounds %class.Scene, ptr %98, i32 0, i32 1
  %100 = load float, ptr %99, align 4, !tbaa !19
  %101 = fneg float %100
  %102 = fcmp ogt float %97, %101
  br i1 %102, label %103, label %110

103:                                              ; preds = %96
  %104 = getelementptr inbounds %struct.IntersectionData, ptr %0, i32 0, i32 0
  store float 0x47EFFFFFE0000000, ptr %104, align 4, !tbaa !42
  %105 = getelementptr inbounds %struct.IntersectionData, ptr %0, i32 0, i32 1
  %106 = getelementptr inbounds %struct.Vector3f, ptr %105, i32 0, i32 0
  store float 0.000000e+00, ptr %106, align 4, !tbaa !14
  %107 = getelementptr inbounds %struct.Vector3f, ptr %105, i32 0, i32 1
  store float 0.000000e+00, ptr %107, align 4, !tbaa !14
  %108 = getelementptr inbounds %struct.Vector3f, ptr %105, i32 0, i32 2
  store float 0.000000e+00, ptr %108, align 4, !tbaa !14
  %109 = getelementptr inbounds %struct.IntersectionData, ptr %0, i32 0, i32 2
  store i32 -1, ptr %109, align 4, !tbaa !44
  store i32 1, ptr %10, align 4
  br label %314

110:                                              ; preds = %96, %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %111 = getelementptr inbounds %struct.Vector3f, ptr %6, i32 0, i32 0
  %112 = load float, ptr %111, align 4, !tbaa !14
  %113 = load ptr, ptr %5, align 8, !tbaa !5
  %114 = getelementptr inbounds %class.Ray, ptr %113, i32 0, i32 0
  %115 = getelementptr inbounds %struct.Vector3f, ptr %114, i32 0, i32 0
  %116 = load float, ptr %115, align 4, !tbaa !14
  %117 = fsub float %112, %116
  %118 = getelementptr inbounds %struct.Vector3f, ptr %6, i32 0, i32 0
  %119 = load float, ptr %118, align 4, !tbaa !14
  %120 = getelementptr inbounds %struct.Vector3f, ptr %8, i32 0, i32 0
  %121 = load float, ptr %120, align 4, !tbaa !14
  %122 = fsub float %119, %121
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = getelementptr inbounds %class.Ray, ptr %123, i32 0, i32 1
  %125 = getelementptr inbounds %struct.Vector3f, ptr %124, i32 0, i32 0
  %126 = load float, ptr %125, align 4, !tbaa !14
  %127 = getelementptr inbounds %struct.Vector3f, ptr %6, i32 0, i32 1
  %128 = load float, ptr %127, align 4, !tbaa !14
  %129 = load ptr, ptr %5, align 8, !tbaa !5
  %130 = getelementptr inbounds %class.Ray, ptr %129, i32 0, i32 0
  %131 = getelementptr inbounds %struct.Vector3f, ptr %130, i32 0, i32 1
  %132 = load float, ptr %131, align 4, !tbaa !14
  %133 = fsub float %128, %132
  %134 = getelementptr inbounds %struct.Vector3f, ptr %6, i32 0, i32 1
  %135 = load float, ptr %134, align 4, !tbaa !14
  %136 = getelementptr inbounds %struct.Vector3f, ptr %8, i32 0, i32 1
  %137 = load float, ptr %136, align 4, !tbaa !14
  %138 = fsub float %135, %137
  %139 = load ptr, ptr %5, align 8, !tbaa !5
  %140 = getelementptr inbounds %class.Ray, ptr %139, i32 0, i32 1
  %141 = getelementptr inbounds %struct.Vector3f, ptr %140, i32 0, i32 1
  %142 = load float, ptr %141, align 4, !tbaa !14
  %143 = getelementptr inbounds %struct.Vector3f, ptr %6, i32 0, i32 2
  %144 = load float, ptr %143, align 4, !tbaa !14
  %145 = load ptr, ptr %5, align 8, !tbaa !5
  %146 = getelementptr inbounds %class.Ray, ptr %145, i32 0, i32 0
  %147 = getelementptr inbounds %struct.Vector3f, ptr %146, i32 0, i32 2
  %148 = load float, ptr %147, align 4, !tbaa !14
  %149 = fsub float %144, %148
  %150 = getelementptr inbounds %struct.Vector3f, ptr %6, i32 0, i32 2
  %151 = load float, ptr %150, align 4, !tbaa !14
  %152 = getelementptr inbounds %struct.Vector3f, ptr %8, i32 0, i32 2
  %153 = load float, ptr %152, align 4, !tbaa !14
  %154 = fsub float %151, %153
  %155 = load ptr, ptr %5, align 8, !tbaa !5
  %156 = getelementptr inbounds %class.Ray, ptr %155, i32 0, i32 1
  %157 = getelementptr inbounds %struct.Vector3f, ptr %156, i32 0, i32 2
  %158 = load float, ptr %157, align 4, !tbaa !14
  %159 = call noundef float @_Z11determinantfffffffff(float noundef %117, float noundef %122, float noundef %126, float noundef %133, float noundef %138, float noundef %142, float noundef %149, float noundef %154, float noundef %158)
  %160 = load float, ptr %9, align 4, !tbaa !17
  %161 = fdiv float %159, %160
  store float %161, ptr %11, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %162 = getelementptr inbounds %struct.Vector3f, ptr %6, i32 0, i32 0
  %163 = load float, ptr %162, align 4, !tbaa !14
  %164 = getelementptr inbounds %struct.Vector3f, ptr %7, i32 0, i32 0
  %165 = load float, ptr %164, align 4, !tbaa !14
  %166 = fsub float %163, %165
  %167 = getelementptr inbounds %struct.Vector3f, ptr %6, i32 0, i32 0
  %168 = load float, ptr %167, align 4, !tbaa !14
  %169 = load ptr, ptr %5, align 8, !tbaa !5
  %170 = getelementptr inbounds %class.Ray, ptr %169, i32 0, i32 0
  %171 = getelementptr inbounds %struct.Vector3f, ptr %170, i32 0, i32 0
  %172 = load float, ptr %171, align 4, !tbaa !14
  %173 = fsub float %168, %172
  %174 = load ptr, ptr %5, align 8, !tbaa !5
  %175 = getelementptr inbounds %class.Ray, ptr %174, i32 0, i32 1
  %176 = getelementptr inbounds %struct.Vector3f, ptr %175, i32 0, i32 0
  %177 = load float, ptr %176, align 4, !tbaa !14
  %178 = getelementptr inbounds %struct.Vector3f, ptr %6, i32 0, i32 1
  %179 = load float, ptr %178, align 4, !tbaa !14
  %180 = getelementptr inbounds %struct.Vector3f, ptr %7, i32 0, i32 1
  %181 = load float, ptr %180, align 4, !tbaa !14
  %182 = fsub float %179, %181
  %183 = getelementptr inbounds %struct.Vector3f, ptr %6, i32 0, i32 1
  %184 = load float, ptr %183, align 4, !tbaa !14
  %185 = load ptr, ptr %5, align 8, !tbaa !5
  %186 = getelementptr inbounds %class.Ray, ptr %185, i32 0, i32 0
  %187 = getelementptr inbounds %struct.Vector3f, ptr %186, i32 0, i32 1
  %188 = load float, ptr %187, align 4, !tbaa !14
  %189 = fsub float %184, %188
  %190 = load ptr, ptr %5, align 8, !tbaa !5
  %191 = getelementptr inbounds %class.Ray, ptr %190, i32 0, i32 1
  %192 = getelementptr inbounds %struct.Vector3f, ptr %191, i32 0, i32 1
  %193 = load float, ptr %192, align 4, !tbaa !14
  %194 = getelementptr inbounds %struct.Vector3f, ptr %6, i32 0, i32 2
  %195 = load float, ptr %194, align 4, !tbaa !14
  %196 = getelementptr inbounds %struct.Vector3f, ptr %7, i32 0, i32 2
  %197 = load float, ptr %196, align 4, !tbaa !14
  %198 = fsub float %195, %197
  %199 = getelementptr inbounds %struct.Vector3f, ptr %6, i32 0, i32 2
  %200 = load float, ptr %199, align 4, !tbaa !14
  %201 = load ptr, ptr %5, align 8, !tbaa !5
  %202 = getelementptr inbounds %class.Ray, ptr %201, i32 0, i32 0
  %203 = getelementptr inbounds %struct.Vector3f, ptr %202, i32 0, i32 2
  %204 = load float, ptr %203, align 4, !tbaa !14
  %205 = fsub float %200, %204
  %206 = load ptr, ptr %5, align 8, !tbaa !5
  %207 = getelementptr inbounds %class.Ray, ptr %206, i32 0, i32 1
  %208 = getelementptr inbounds %struct.Vector3f, ptr %207, i32 0, i32 2
  %209 = load float, ptr %208, align 4, !tbaa !14
  %210 = call noundef float @_Z11determinantfffffffff(float noundef %166, float noundef %173, float noundef %177, float noundef %182, float noundef %189, float noundef %193, float noundef %198, float noundef %205, float noundef %209)
  %211 = load float, ptr %9, align 4, !tbaa !17
  %212 = fdiv float %210, %211
  store float %212, ptr %12, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %213 = getelementptr inbounds %struct.Vector3f, ptr %6, i32 0, i32 0
  %214 = load float, ptr %213, align 4, !tbaa !14
  %215 = getelementptr inbounds %struct.Vector3f, ptr %7, i32 0, i32 0
  %216 = load float, ptr %215, align 4, !tbaa !14
  %217 = fsub float %214, %216
  %218 = getelementptr inbounds %struct.Vector3f, ptr %6, i32 0, i32 0
  %219 = load float, ptr %218, align 4, !tbaa !14
  %220 = getelementptr inbounds %struct.Vector3f, ptr %8, i32 0, i32 0
  %221 = load float, ptr %220, align 4, !tbaa !14
  %222 = fsub float %219, %221
  %223 = getelementptr inbounds %struct.Vector3f, ptr %6, i32 0, i32 0
  %224 = load float, ptr %223, align 4, !tbaa !14
  %225 = load ptr, ptr %5, align 8, !tbaa !5
  %226 = getelementptr inbounds %class.Ray, ptr %225, i32 0, i32 0
  %227 = getelementptr inbounds %struct.Vector3f, ptr %226, i32 0, i32 0
  %228 = load float, ptr %227, align 4, !tbaa !14
  %229 = fsub float %224, %228
  %230 = getelementptr inbounds %struct.Vector3f, ptr %6, i32 0, i32 1
  %231 = load float, ptr %230, align 4, !tbaa !14
  %232 = getelementptr inbounds %struct.Vector3f, ptr %7, i32 0, i32 1
  %233 = load float, ptr %232, align 4, !tbaa !14
  %234 = fsub float %231, %233
  %235 = getelementptr inbounds %struct.Vector3f, ptr %6, i32 0, i32 1
  %236 = load float, ptr %235, align 4, !tbaa !14
  %237 = getelementptr inbounds %struct.Vector3f, ptr %8, i32 0, i32 1
  %238 = load float, ptr %237, align 4, !tbaa !14
  %239 = fsub float %236, %238
  %240 = getelementptr inbounds %struct.Vector3f, ptr %6, i32 0, i32 1
  %241 = load float, ptr %240, align 4, !tbaa !14
  %242 = load ptr, ptr %5, align 8, !tbaa !5
  %243 = getelementptr inbounds %class.Ray, ptr %242, i32 0, i32 0
  %244 = getelementptr inbounds %struct.Vector3f, ptr %243, i32 0, i32 1
  %245 = load float, ptr %244, align 4, !tbaa !14
  %246 = fsub float %241, %245
  %247 = getelementptr inbounds %struct.Vector3f, ptr %6, i32 0, i32 2
  %248 = load float, ptr %247, align 4, !tbaa !14
  %249 = getelementptr inbounds %struct.Vector3f, ptr %7, i32 0, i32 2
  %250 = load float, ptr %249, align 4, !tbaa !14
  %251 = fsub float %248, %250
  %252 = getelementptr inbounds %struct.Vector3f, ptr %6, i32 0, i32 2
  %253 = load float, ptr %252, align 4, !tbaa !14
  %254 = getelementptr inbounds %struct.Vector3f, ptr %8, i32 0, i32 2
  %255 = load float, ptr %254, align 4, !tbaa !14
  %256 = fsub float %253, %255
  %257 = getelementptr inbounds %struct.Vector3f, ptr %6, i32 0, i32 2
  %258 = load float, ptr %257, align 4, !tbaa !14
  %259 = load ptr, ptr %5, align 8, !tbaa !5
  %260 = getelementptr inbounds %class.Ray, ptr %259, i32 0, i32 0
  %261 = getelementptr inbounds %struct.Vector3f, ptr %260, i32 0, i32 2
  %262 = load float, ptr %261, align 4, !tbaa !14
  %263 = fsub float %258, %262
  %264 = call noundef float @_Z11determinantfffffffff(float noundef %217, float noundef %222, float noundef %229, float noundef %234, float noundef %239, float noundef %246, float noundef %251, float noundef %256, float noundef %263)
  %265 = load float, ptr %9, align 4, !tbaa !17
  %266 = fdiv float %264, %265
  store float %266, ptr %13, align 4, !tbaa !17
  %267 = load float, ptr %13, align 4, !tbaa !17
  %268 = load ptr, ptr @pScene, align 8, !tbaa !5
  %269 = getelementptr inbounds %class.Scene, ptr %268, i32 0, i32 1
  %270 = load float, ptr %269, align 4, !tbaa !19
  %271 = fcmp ogt float %267, %270
  br i1 %271, label %272, label %306

272:                                              ; preds = %110
  %273 = load float, ptr %11, align 4, !tbaa !17
  %274 = load float, ptr %12, align 4, !tbaa !17
  %275 = fadd float %273, %274
  %276 = fcmp ole float %275, 1.000000e+00
  br i1 %276, label %277, label %306

277:                                              ; preds = %272
  %278 = load float, ptr %11, align 4, !tbaa !17
  %279 = fcmp ole float 0.000000e+00, %278
  br i1 %279, label %280, label %306

280:                                              ; preds = %277
  %281 = load float, ptr %12, align 4, !tbaa !17
  %282 = fcmp ole float 0.000000e+00, %281
  br i1 %282, label %283, label %306

283:                                              ; preds = %280
  %284 = getelementptr inbounds %struct.IntersectionData, ptr %0, i32 0, i32 0
  %285 = load float, ptr %13, align 4, !tbaa !17
  store float %285, ptr %284, align 4, !tbaa !42
  %286 = getelementptr inbounds %struct.IntersectionData, ptr %0, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 12, ptr %15) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %7, i64 12, i1 false), !tbaa.struct !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %17, ptr align 4 %16, i64 12, i1 false)
  %287 = getelementptr inbounds { <2 x float>, float }, ptr %17, i32 0, i32 0
  %288 = load <2 x float>, ptr %287, align 4
  %289 = getelementptr inbounds { <2 x float>, float }, ptr %17, i32 0, i32 1
  %290 = load float, ptr %289, align 4
  %291 = call { <2 x float>, float } @_ZNK8Vector3fmiES_(ptr noundef nonnull align 4 dereferenceable(12) %8, <2 x float> %288, float %290)
  store { <2 x float>, float } %291, ptr %18, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %15, ptr align 8 %18, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %19) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 4 %7, i64 12, i1 false), !tbaa.struct !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %20, i64 12, i1 false)
  %292 = getelementptr inbounds { <2 x float>, float }, ptr %21, i32 0, i32 0
  %293 = load <2 x float>, ptr %292, align 4
  %294 = getelementptr inbounds { <2 x float>, float }, ptr %21, i32 0, i32 1
  %295 = load float, ptr %294, align 4
  %296 = call { <2 x float>, float } @_ZNK8Vector3fmiES_(ptr noundef nonnull align 4 dereferenceable(12) %6, <2 x float> %293, float %295)
  store { <2 x float>, float } %296, ptr %22, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 8 %22, i64 12, i1 false)
  %297 = call { <2 x float>, float } @_Z12crossProductRK8Vector3fS1_(ptr noundef nonnull align 4 dereferenceable(12) %15, ptr noundef nonnull align 4 dereferenceable(12) %19)
  store { <2 x float>, float } %297, ptr %23, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 8 %23, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %24, ptr align 4 %14, i64 12, i1 false)
  %298 = getelementptr inbounds { <2 x float>, float }, ptr %24, i32 0, i32 0
  %299 = load <2 x float>, ptr %298, align 4
  %300 = getelementptr inbounds { <2 x float>, float }, ptr %24, i32 0, i32 1
  %301 = load float, ptr %300, align 4
  %302 = call { <2 x float>, float } @_Z9normalize8Vector3f(<2 x float> %299, float %301)
  store { <2 x float>, float } %302, ptr %25, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %286, ptr align 8 %25, i64 12, i1 false)
  %303 = getelementptr inbounds %struct.IntersectionData, ptr %0, i32 0, i32 2
  %304 = getelementptr inbounds %class.Shape, ptr %26, i32 0, i32 2
  %305 = load i32, ptr %304, align 4, !tbaa !45
  store i32 %305, ptr %303, align 4, !tbaa !44
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %15) #7
  store i32 1, ptr %10, align 4
  br label %313

306:                                              ; preds = %280, %277, %272, %110
  %307 = getelementptr inbounds %struct.IntersectionData, ptr %0, i32 0, i32 0
  store float 0x47EFFFFFE0000000, ptr %307, align 4, !tbaa !42
  %308 = getelementptr inbounds %struct.IntersectionData, ptr %0, i32 0, i32 1
  %309 = getelementptr inbounds %struct.Vector3f, ptr %308, i32 0, i32 0
  store float 0.000000e+00, ptr %309, align 4, !tbaa !14
  %310 = getelementptr inbounds %struct.Vector3f, ptr %308, i32 0, i32 1
  store float 0.000000e+00, ptr %310, align 4, !tbaa !14
  %311 = getelementptr inbounds %struct.Vector3f, ptr %308, i32 0, i32 2
  store float 0.000000e+00, ptr %311, align 4, !tbaa !14
  %312 = getelementptr inbounds %struct.IntersectionData, ptr %0, i32 0, i32 2
  store i32 -1, ptr %312, align 4, !tbaa !44
  store i32 1, ptr %10, align 4
  br label %313

313:                                              ; preds = %306, %283
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %314

314:                                              ; preds = %313, %103
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %6) #7
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_Z11determinantfffffffff(float noundef, float noundef, float noundef, float noundef, float noundef, float noundef, float noundef, float noundef, float noundef) #6

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

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


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

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

@pScene = external local_unnamed_addr global ptr, align 8

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK8Triangle9intersectERK3Ray(ptr dead_on_unwind noalias nocapture writable writeonly sret(%struct.IntersectionData) align 4 %0, ptr nocapture noundef nonnull readonly align 8 dereferenceable(28) %1, ptr nocapture noundef nonnull readonly align 4 dereferenceable(24) %2) unnamed_addr #5 align 2 {
  %4 = alloca %struct.Vector3f, align 4
  %5 = alloca %struct.Vector3f, align 4
  %6 = alloca %struct.Vector3f, align 8
  %7 = alloca %struct.Vector3f, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #7
  %8 = load ptr, ptr @pScene, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %8, i64 112
  %10 = getelementptr inbounds i8, ptr %1, i64 16
  %11 = load i32, ptr %10, align 8, !tbaa !9
  %12 = add nsw i32 %11, -1
  %13 = sext i32 %12 to i64
  %14 = tail call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI8Vector3fSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %13) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %4, ptr noundef nonnull align 4 dereferenceable(12) %14, i64 12, i1 false), !tbaa.struct !13
  %15 = load ptr, ptr @pScene, align 8, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %15, i64 112
  %17 = getelementptr inbounds i8, ptr %1, i64 20
  %18 = load i32, ptr %17, align 4, !tbaa !15
  %19 = add nsw i32 %18, -1
  %20 = sext i32 %19 to i64
  %21 = tail call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI8Vector3fSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %20) #7
  %.sroa.038.0.copyload = load <2 x float>, ptr %21, align 4
  %.sroa.11.0..sroa_idx = getelementptr inbounds i8, ptr %21, i64 8
  %.sroa.11.0.copyload = load float, ptr %.sroa.11.0..sroa_idx, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #7
  %22 = load ptr, ptr @pScene, align 8, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %22, i64 112
  %24 = getelementptr inbounds i8, ptr %1, i64 24
  %25 = load i32, ptr %24, align 8, !tbaa !16
  %26 = add nsw i32 %25, -1
  %27 = sext i32 %26 to i64
  %28 = tail call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI8Vector3fSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %27) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %28, i64 12, i1 false), !tbaa.struct !13
  %29 = load float, ptr %4, align 4, !tbaa !14
  %.sroa.038.0.vec.extract = extractelement <2 x float> %.sroa.038.0.copyload, i64 0
  %30 = fsub float %29, %.sroa.038.0.vec.extract
  %31 = load float, ptr %5, align 4, !tbaa !14
  %32 = fsub float %29, %31
  %33 = getelementptr inbounds i8, ptr %2, i64 12
  %34 = load float, ptr %33, align 4, !tbaa !14
  %35 = getelementptr inbounds i8, ptr %4, i64 4
  %36 = load float, ptr %35, align 4, !tbaa !14
  %.sroa.038.4.vec.extract = extractelement <2 x float> %.sroa.038.0.copyload, i64 1
  %37 = fsub float %36, %.sroa.038.4.vec.extract
  %38 = getelementptr inbounds i8, ptr %5, i64 4
  %39 = load float, ptr %38, align 4, !tbaa !14
  %40 = fsub float %36, %39
  %41 = getelementptr inbounds i8, ptr %2, i64 16
  %42 = load float, ptr %41, align 4, !tbaa !14
  %43 = getelementptr inbounds i8, ptr %4, i64 8
  %44 = load float, ptr %43, align 4, !tbaa !14
  %45 = fsub float %44, %.sroa.11.0.copyload
  %46 = getelementptr inbounds i8, ptr %5, i64 8
  %47 = load float, ptr %46, align 4, !tbaa !14
  %48 = fsub float %44, %47
  %49 = getelementptr inbounds i8, ptr %2, i64 20
  %50 = load float, ptr %49, align 4, !tbaa !14
  %51 = tail call noundef float @_Z11determinantfffffffff(float noundef %30, float noundef %32, float noundef %34, float noundef %37, float noundef %40, float noundef %42, float noundef %45, float noundef %48, float noundef %50)
  %52 = load ptr, ptr @pScene, align 8, !tbaa !5
  %53 = getelementptr inbounds i8, ptr %52, i64 4
  %54 = load float, ptr %53, align 4, !tbaa !17
  %55 = fcmp olt float %51, %54
  %56 = fneg float %54
  %57 = fcmp ogt float %51, %56
  %or.cond73 = and i1 %55, %57
  br i1 %or.cond73, label %58, label %60

58:                                               ; preds = %3
  store <4 x float> <float 0x47EFFFFFE0000000, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, ptr %0, align 4, !tbaa !14
  %59 = getelementptr inbounds i8, ptr %0, i64 16
  store i32 -1, ptr %59, align 4, !tbaa !41
  br label %118

60:                                               ; preds = %3
  %61 = load float, ptr %2, align 4, !tbaa !14
  %62 = fsub float %29, %61
  %63 = load float, ptr %33, align 4, !tbaa !14
  %64 = getelementptr inbounds i8, ptr %2, i64 4
  %65 = load float, ptr %64, align 4, !tbaa !14
  %66 = fsub float %36, %65
  %67 = load float, ptr %41, align 4, !tbaa !14
  %68 = getelementptr inbounds i8, ptr %2, i64 8
  %69 = load float, ptr %68, align 4, !tbaa !14
  %70 = fsub float %44, %69
  %71 = load float, ptr %49, align 4, !tbaa !14
  %72 = tail call noundef float @_Z11determinantfffffffff(float noundef %62, float noundef %32, float noundef %63, float noundef %66, float noundef %40, float noundef %67, float noundef %70, float noundef %48, float noundef %71)
  %73 = load float, ptr %2, align 4, !tbaa !14
  %74 = fsub float %29, %73
  %75 = load float, ptr %33, align 4, !tbaa !14
  %76 = load float, ptr %64, align 4, !tbaa !14
  %77 = fsub float %36, %76
  %78 = load float, ptr %41, align 4, !tbaa !14
  %79 = load float, ptr %68, align 4, !tbaa !14
  %80 = fsub float %44, %79
  %81 = load float, ptr %49, align 4, !tbaa !14
  %82 = tail call noundef float @_Z11determinantfffffffff(float noundef %30, float noundef %74, float noundef %75, float noundef %37, float noundef %77, float noundef %78, float noundef %45, float noundef %80, float noundef %81)
  %83 = load float, ptr %2, align 4, !tbaa !14
  %84 = fsub float %29, %83
  %85 = load float, ptr %64, align 4, !tbaa !14
  %86 = fsub float %36, %85
  %87 = load float, ptr %68, align 4, !tbaa !14
  %88 = fsub float %44, %87
  %89 = tail call noundef float @_Z11determinantfffffffff(float noundef %30, float noundef %32, float noundef %84, float noundef %37, float noundef %40, float noundef %86, float noundef %45, float noundef %48, float noundef %88)
  %90 = fdiv float %89, %51
  %91 = load ptr, ptr @pScene, align 8, !tbaa !5
  %92 = getelementptr inbounds i8, ptr %91, i64 4
  %93 = load float, ptr %92, align 4, !tbaa !17
  %94 = fcmp ogt float %90, %93
  br i1 %94, label %95, label %116

95:                                               ; preds = %60
  %96 = insertelement <2 x float> poison, float %72, i64 0
  %97 = insertelement <2 x float> %96, float %82, i64 1
  %98 = insertelement <2 x float> poison, float %51, i64 0
  %99 = shufflevector <2 x float> %98, <2 x float> poison, <2 x i32> zeroinitializer
  %100 = fdiv <2 x float> %97, %99
  %101 = extractelement <2 x float> %100, i64 0
  %102 = extractelement <2 x float> %100, i64 1
  %103 = fadd float %101, %102
  %104 = fcmp ole float %103, 1.000000e+00
  %105 = fcmp oge float %101, 0.000000e+00
  %or.cond = and i1 %105, %104
  %106 = fcmp oge float %102, 0.000000e+00
  %or.cond3 = and i1 %106, %or.cond
  br i1 %or.cond3, label %107, label %116

107:                                              ; preds = %95
  store float %90, ptr %0, align 4, !tbaa !43
  %108 = getelementptr inbounds i8, ptr %0, i64 4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #7
  %109 = call { <2 x float>, float } @_ZNK8Vector3fmiES_(ptr noundef nonnull align 4 dereferenceable(12) %5, <2 x float> %.sroa.038.0.copyload, float %.sroa.11.0.copyload)
  %.fca.0.extract18 = extractvalue { <2 x float>, float } %109, 0
  %.fca.1.extract19 = extractvalue { <2 x float>, float } %109, 1
  store <2 x float> %.fca.0.extract18, ptr %6, align 8
  %.sroa.221.0..sroa_idx = getelementptr inbounds i8, ptr %6, i64 8
  store float %.fca.1.extract19, ptr %.sroa.221.0..sroa_idx, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #7
  %110 = call { <2 x float>, float } @_ZNK8Vector3fmiES_(ptr noundef nonnull align 4 dereferenceable(12) %4, <2 x float> %.sroa.038.0.copyload, float %.sroa.11.0.copyload)
  %.fca.0.extract10 = extractvalue { <2 x float>, float } %110, 0
  %.fca.1.extract11 = extractvalue { <2 x float>, float } %110, 1
  store <2 x float> %.fca.0.extract10, ptr %7, align 8
  %.sroa.213.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 8
  store float %.fca.1.extract11, ptr %.sroa.213.0..sroa_idx, align 8
  %111 = call { <2 x float>, float } @_Z12crossProductRK8Vector3fS1_(ptr noundef nonnull align 4 dereferenceable(12) %6, ptr noundef nonnull align 4 dereferenceable(12) %7)
  %.fca.0.extract6 = extractvalue { <2 x float>, float } %111, 0
  %.fca.1.extract7 = extractvalue { <2 x float>, float } %111, 1
  %112 = call { <2 x float>, float } @_Z9normalize8Vector3f(<2 x float> %.fca.0.extract6, float %.fca.1.extract7)
  %.fca.0.extract = extractvalue { <2 x float>, float } %112, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %112, 1
  store <2 x float> %.fca.0.extract, ptr %108, align 4
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 12
  store float %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 4
  %113 = getelementptr inbounds i8, ptr %0, i64 16
  %114 = getelementptr inbounds i8, ptr %1, i64 12
  %115 = load i32, ptr %114, align 4, !tbaa !44
  store i32 %115, ptr %113, align 4, !tbaa !41
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #7
  br label %118

116:                                              ; preds = %95, %60
  store <4 x float> <float 0x47EFFFFFE0000000, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, ptr %0, align 4, !tbaa !14
  %117 = getelementptr inbounds i8, ptr %0, i64 16
  store i32 -1, ptr %117, align 4, !tbaa !41
  br label %118

118:                                              ; preds = %107, %116, %58
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #7
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_Z11determinantfffffffff(float noundef, float noundef, float noundef, float noundef, float noundef, float noundef, float noundef, float noundef, float noundef) local_unnamed_addr #6

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

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass