; LLVM IR from BrunoLevy/learn-fpga :: FemtoRV/FIRMWARE/CPP_EXAMPLES (tinyrt_cpp)

; 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.vec = type { float, float, float }
%struct.Material = type { float, %struct.vec.0, %struct.vec, float }
%struct.vec.0 = type { float, float, float, float }
%struct.Light = type { %struct.vec, float }

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

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

; 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) #1

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

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

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

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #6

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z15scene_intersectRK3vecILm3EfES2_RKSt6vectorI6SphereSaIS4_EERS0_S9_R8Material(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(36)) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN3vecILm3EfE9normalizeEf(ptr noundef nonnull align 4 dereferenceable(12), float noundef) #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local { <2 x float>, float } @_Z8cast_rayRK3vecILm3EfES2_RKSt6vectorI6SphereSaIS4_EERKS3_I5LightSaIS9_EEm(ptr noundef nonnull align 4 dereferenceable(12) %0, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %4) #0 {
  %6 = alloca %struct.vec, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca %struct.vec, align 4
  %13 = alloca %struct.vec, align 4
  %14 = alloca %struct.Material, align 4
  %15 = alloca i32, align 4
  %16 = alloca %struct.vec, align 4
  %17 = alloca %struct.vec, align 4
  %18 = alloca { <2 x float>, float }, align 8
  %19 = alloca %struct.vec, align 4
  %20 = alloca %struct.vec, align 4
  %21 = alloca { <2 x float>, float }, align 8
  %22 = alloca %struct.vec, align 4
  %23 = alloca %struct.vec, align 4
  %24 = alloca %struct.vec, align 4
  %25 = alloca double, align 8
  %26 = alloca { <2 x float>, float }, align 8
  %27 = alloca { <2 x float>, float }, align 4
  %28 = alloca { <2 x float>, float }, align 8
  %29 = alloca %struct.vec, align 4
  %30 = alloca %struct.vec, align 4
  %31 = alloca double, align 8
  %32 = alloca { <2 x float>, float }, align 8
  %33 = alloca { <2 x float>, float }, align 4
  %34 = alloca { <2 x float>, float }, align 8
  %35 = alloca %struct.vec, align 4
  %36 = alloca %struct.vec, align 4
  %37 = alloca %struct.vec, align 4
  %38 = alloca double, align 8
  %39 = alloca { <2 x float>, float }, align 8
  %40 = alloca { <2 x float>, float }, align 4
  %41 = alloca { <2 x float>, float }, align 8
  %42 = alloca %struct.vec, align 4
  %43 = alloca %struct.vec, align 4
  %44 = alloca double, align 8
  %45 = alloca { <2 x float>, float }, align 8
  %46 = alloca { <2 x float>, float }, align 4
  %47 = alloca { <2 x float>, float }, align 8
  %48 = alloca %struct.vec, align 4
  %49 = alloca { <2 x float>, float }, align 8
  %50 = alloca %struct.vec, align 4
  %51 = alloca { <2 x float>, float }, align 8
  %52 = alloca float, align 4
  %53 = alloca float, align 4
  %54 = alloca i64, align 8
  %55 = alloca %struct.vec, align 4
  %56 = alloca %struct.vec, align 4
  %57 = alloca %struct.vec, align 4
  %58 = alloca { <2 x float>, float }, align 4
  %59 = alloca { <2 x float>, float }, align 8
  %60 = alloca float, align 4
  %61 = alloca %struct.vec, align 4
  %62 = alloca %struct.vec, align 4
  %63 = alloca { <2 x float>, float }, align 4
  %64 = alloca { <2 x float>, float }, align 8
  %65 = alloca %struct.vec, align 4
  %66 = alloca %struct.vec, align 4
  %67 = alloca %struct.vec, align 4
  %68 = alloca double, align 8
  %69 = alloca { <2 x float>, float }, align 8
  %70 = alloca { <2 x float>, float }, align 4
  %71 = alloca { <2 x float>, float }, align 8
  %72 = alloca %struct.vec, align 4
  %73 = alloca %struct.vec, align 4
  %74 = alloca double, align 8
  %75 = alloca { <2 x float>, float }, align 8
  %76 = alloca { <2 x float>, float }, align 4
  %77 = alloca { <2 x float>, float }, align 8
  %78 = alloca %struct.vec, align 4
  %79 = alloca %struct.vec, align 4
  %80 = alloca %struct.Material, align 4
  %81 = alloca %struct.vec, align 4
  %82 = alloca %struct.vec, align 4
  %83 = alloca { <2 x float>, float }, align 4
  %84 = alloca { <2 x float>, float }, align 8
  %85 = alloca float, align 4
  %86 = alloca float, align 4
  %87 = alloca float, align 4
  %88 = alloca float, align 4
  %89 = alloca %struct.vec, align 4
  %90 = alloca %struct.vec, align 4
  %91 = alloca %struct.vec, align 4
  %92 = alloca { <2 x float>, float }, align 8
  %93 = alloca { <2 x float>, float }, align 8
  %94 = alloca { <2 x float>, float }, align 8
  %95 = alloca %struct.vec, align 4
  %96 = alloca %struct.vec, align 4
  %97 = alloca %struct.vec, align 4
  %98 = alloca %struct.vec, align 4
  %99 = alloca { <2 x float>, float }, align 8
  %100 = alloca { <2 x float>, float }, align 8
  %101 = alloca %struct.vec, align 4
  %102 = alloca %struct.vec, align 4
  %103 = alloca %struct.vec, align 4
  %104 = alloca { <2 x float>, float }, align 8
  %105 = alloca { <2 x float>, float }, align 8
  %106 = alloca { <2 x float>, float }, align 4
  %107 = alloca { <2 x float>, float }, align 8
  %108 = alloca %struct.vec, align 4
  %109 = alloca { <2 x float>, float }, align 8
  %110 = alloca { <2 x float>, float }, align 4
  %111 = alloca { <2 x float>, float }, align 8
  %112 = alloca %struct.vec, align 4
  %113 = alloca { <2 x float>, float }, align 8
  %114 = alloca { <2 x float>, float }, align 4
  %115 = alloca { <2 x float>, float }, align 8
  %116 = alloca { <2 x float>, float }, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store i64 %4, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #9
  call void @_ZN3vecILm3EfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %12)
  call void @llvm.lifetime.start.p0(i64 12, ptr %13) #9
  call void @_ZN3vecILm3EfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %13)
  call void @llvm.lifetime.start.p0(i64 36, ptr %14) #9
  call void @_ZN8MaterialC2Ev(ptr noundef nonnull align 4 dereferenceable(36) %14)
  %117 = load i64, ptr %11, align 8, !tbaa !9
  %118 = icmp ugt i64 %117, 4
  br i1 %118, label %124, label %119

119:                                              ; preds = %5
  %120 = load ptr, ptr %7, align 8, !tbaa !5
  %121 = load ptr, ptr %8, align 8, !tbaa !5
  %122 = load ptr, ptr %9, align 8, !tbaa !5
  %123 = call noundef zeroext i1 @_Z15scene_intersectRK3vecILm3EfES2_RKSt6vectorI6SphereSaIS4_EERS0_S9_R8Material(ptr noundef nonnull align 4 dereferenceable(12) %120, ptr noundef nonnull align 4 dereferenceable(12) %121, ptr noundef nonnull align 8 dereferenceable(24) %122, ptr noundef nonnull align 4 dereferenceable(12) %12, ptr noundef nonnull align 4 dereferenceable(12) %13, ptr noundef nonnull align 4 dereferenceable(36) %14)
  br i1 %123, label %125, label %124

124:                                              ; preds = %119, %5
  call void @_ZN3vecILm3EfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %6, float noundef 0x3FC99999A0000000, float noundef 0x3FE6666660000000, float noundef 0x3FE99999A0000000)
  store i32 1, ptr %15, align 4
  br label %301

125:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 12, ptr %16) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr %17) #9
  %126 = load ptr, ptr %8, align 8, !tbaa !5
  %127 = call { <2 x float>, float } @_Z7reflectRK3vecILm3EfES2_(ptr noundef nonnull align 4 dereferenceable(12) %126, ptr noundef nonnull align 4 dereferenceable(12) %13)
  store { <2 x float>, float } %127, ptr %18, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %17, ptr align 8 %18, i64 12, i1 false)
  %128 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN3vecILm3EfE9normalizeEf(ptr noundef nonnull align 4 dereferenceable(12) %17, float noundef 1.000000e+00)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %128, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 12, ptr %17) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr %19) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr %20) #9
  %129 = load ptr, ptr %8, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.Material, ptr %14, i32 0, i32 0
  %131 = load float, ptr %130, align 4, !tbaa !14
  %132 = call { <2 x float>, float } @_Z7refractRK3vecILm3EfES2_ff(ptr noundef nonnull align 4 dereferenceable(12) %129, ptr noundef nonnull align 4 dereferenceable(12) %13, float noundef %131, float noundef 1.000000e+00)
  store { <2 x float>, float } %132, ptr %21, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 8 %21, i64 12, i1 false)
  %133 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN3vecILm3EfE9normalizeEf(ptr noundef nonnull align 4 dereferenceable(12) %20, float noundef 1.000000e+00)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 4 %133, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 12, ptr %20) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr %22) #9
  %134 = call noundef float @_ZmlILm3EfET0_RK3vecIXT_ES0_ES4_(ptr noundef nonnull align 4 dereferenceable(12) %16, ptr noundef nonnull align 4 dereferenceable(12) %13)
  %135 = fcmp olt float %134, 0.000000e+00
  call void @llvm.lifetime.start.p0(i64 12, ptr %24) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr %30) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #9
  br i1 %135, label %136, label %143

136:                                              ; preds = %125
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %23, ptr align 4 %12, i64 12, i1 false), !tbaa.struct !11
  store double 1.000000e-03, ptr %25, align 8, !tbaa !18
  %137 = call { <2 x float>, float } @_ZmlILm3EfdE3vecIXT_ET0_ERKS2_RKT1_(ptr noundef nonnull align 4 dereferenceable(12) %13, ptr noundef nonnull align 8 dereferenceable(8) %25)
  store { <2 x float>, float } %137, ptr %26, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %24, ptr align 8 %26, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %27, ptr align 4 %23, i64 12, i1 false)
  %138 = getelementptr inbounds { <2 x float>, float }, ptr %27, i32 0, i32 0
  %139 = load <2 x float>, ptr %138, align 4
  %140 = getelementptr inbounds { <2 x float>, float }, ptr %27, i32 0, i32 1
  %141 = load float, ptr %140, align 4
  %142 = call { <2 x float>, float } @_ZmiILm3EfE3vecIXT_ET0_ES2_RKS2_(<2 x float> %139, float %141, ptr noundef nonnull align 4 dereferenceable(12) %24)
  store { <2 x float>, float } %142, ptr %28, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 8 %28, i64 12, i1 false)
  br label %150

143:                                              ; preds = %125
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %29, ptr align 4 %12, i64 12, i1 false), !tbaa.struct !11
  store double 1.000000e-03, ptr %31, align 8, !tbaa !18
  %144 = call { <2 x float>, float } @_ZmlILm3EfdE3vecIXT_ET0_ERKS2_RKT1_(ptr noundef nonnull align 4 dereferenceable(12) %13, ptr noundef nonnull align 8 dereferenceable(8) %31)
  store { <2 x float>, float } %144, ptr %32, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %30, ptr align 8 %32, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %33, ptr align 4 %29, i64 12, i1 false)
  %145 = getelementptr inbounds { <2 x float>, float }, ptr %33, i32 0, i32 0
  %146 = load <2 x float>, ptr %145, align 4
  %147 = getelementptr inbounds { <2 x float>, float }, ptr %33, i32 0, i32 1
  %148 = load float, ptr %147, align 4
  %149 = call { <2 x float>, float } @_ZplILm3EfE3vecIXT_ET0_ES2_RKS2_(<2 x float> %146, float %148, ptr noundef nonnull align 4 dereferenceable(12) %30)
  store { <2 x float>, float } %149, ptr %34, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 8 %34, i64 12, i1 false)
  br label %150

150:                                              ; preds = %143, %136
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %30) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr %35) #9
  %151 = call noundef float @_ZmlILm3EfET0_RK3vecIXT_ES0_ES4_(ptr noundef nonnull align 4 dereferenceable(12) %19, ptr noundef nonnull align 4 dereferenceable(12) %13)
  %152 = fcmp olt float %151, 0.000000e+00
  call void @llvm.lifetime.start.p0(i64 12, ptr %37) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr %43) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #9
  br i1 %152, label %153, label %160

153:                                              ; preds = %150
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %36, ptr align 4 %12, i64 12, i1 false), !tbaa.struct !11
  store double 1.000000e-03, ptr %38, align 8, !tbaa !18
  %154 = call { <2 x float>, float } @_ZmlILm3EfdE3vecIXT_ET0_ERKS2_RKT1_(ptr noundef nonnull align 4 dereferenceable(12) %13, ptr noundef nonnull align 8 dereferenceable(8) %38)
  store { <2 x float>, float } %154, ptr %39, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %37, ptr align 8 %39, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %40, ptr align 4 %36, i64 12, i1 false)
  %155 = getelementptr inbounds { <2 x float>, float }, ptr %40, i32 0, i32 0
  %156 = load <2 x float>, ptr %155, align 4
  %157 = getelementptr inbounds { <2 x float>, float }, ptr %40, i32 0, i32 1
  %158 = load float, ptr %157, align 4
  %159 = call { <2 x float>, float } @_ZmiILm3EfE3vecIXT_ET0_ES2_RKS2_(<2 x float> %156, float %158, ptr noundef nonnull align 4 dereferenceable(12) %37)
  store { <2 x float>, float } %159, ptr %41, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %35, ptr align 8 %41, i64 12, i1 false)
  br label %167

160:                                              ; preds = %150
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %42, ptr align 4 %12, i64 12, i1 false), !tbaa.struct !11
  store double 1.000000e-03, ptr %44, align 8, !tbaa !18
  %161 = call { <2 x float>, float } @_ZmlILm3EfdE3vecIXT_ET0_ERKS2_RKT1_(ptr noundef nonnull align 4 dereferenceable(12) %13, ptr noundef nonnull align 8 dereferenceable(8) %44)
  store { <2 x float>, float } %161, ptr %45, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %43, ptr align 8 %45, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %46, ptr align 4 %42, i64 12, i1 false)
  %162 = getelementptr inbounds { <2 x float>, float }, ptr %46, i32 0, i32 0
  %163 = load <2 x float>, ptr %162, align 4
  %164 = getelementptr inbounds { <2 x float>, float }, ptr %46, i32 0, i32 1
  %165 = load float, ptr %164, align 4
  %166 = call { <2 x float>, float } @_ZplILm3EfE3vecIXT_ET0_ES2_RKS2_(<2 x float> %163, float %165, ptr noundef nonnull align 4 dereferenceable(12) %43)
  store { <2 x float>, float } %166, ptr %47, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %35, ptr align 8 %47, i64 12, i1 false)
  br label %167

167:                                              ; preds = %160, %153
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %43) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %37) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr %48) #9
  %168 = load ptr, ptr %9, align 8, !tbaa !5
  %169 = load ptr, ptr %10, align 8, !tbaa !5
  %170 = load i64, ptr %11, align 8, !tbaa !9
  %171 = add i64 %170, 1
  %172 = call { <2 x float>, float } @_Z8cast_rayRK3vecILm3EfES2_RKSt6vectorI6SphereSaIS4_EERKS3_I5LightSaIS9_EEm(ptr noundef nonnull align 4 dereferenceable(12) %22, ptr noundef nonnull align 4 dereferenceable(12) %16, ptr noundef nonnull align 8 dereferenceable(24) %168, ptr noundef nonnull align 8 dereferenceable(24) %169, i64 noundef %171)
  store { <2 x float>, float } %172, ptr %49, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %48, ptr align 8 %49, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %50) #9
  %173 = load ptr, ptr %9, align 8, !tbaa !5
  %174 = load ptr, ptr %10, align 8, !tbaa !5
  %175 = load i64, ptr %11, align 8, !tbaa !9
  %176 = add i64 %175, 1
  %177 = call { <2 x float>, float } @_Z8cast_rayRK3vecILm3EfES2_RKSt6vectorI6SphereSaIS4_EERKS3_I5LightSaIS9_EEm(ptr noundef nonnull align 4 dereferenceable(12) %35, ptr noundef nonnull align 4 dereferenceable(12) %19, ptr noundef nonnull align 8 dereferenceable(24) %173, ptr noundef nonnull align 8 dereferenceable(24) %174, i64 noundef %176)
  store { <2 x float>, float } %177, ptr %51, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %50, ptr align 8 %51, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %52) #9
  store float 0.000000e+00, ptr %52, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %53) #9
  store float 0.000000e+00, ptr %53, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %54) #9
  store i64 0, ptr %54, align 8, !tbaa !9
  br label %178

178:                                              ; preds = %267, %167
  %179 = load i64, ptr %54, align 8, !tbaa !9
  %180 = load ptr, ptr %10, align 8, !tbaa !5
  %181 = call noundef i64 @_ZNKSt6vectorI5LightSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %180) #9
  %182 = icmp ult i64 %179, %181
  br i1 %182, label %184, label %183

183:                                              ; preds = %178
  store i32 2, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #9
  br label %270

184:                                              ; preds = %178
  call void @llvm.lifetime.start.p0(i64 12, ptr %55) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr %56) #9
  %185 = load ptr, ptr %10, align 8, !tbaa !5
  %186 = load i64, ptr %54, align 8, !tbaa !9
  %187 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI5LightSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %185, i64 noundef %186) #9
  %188 = getelementptr inbounds %struct.Light, ptr %187, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %57, ptr align 4 %188, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %58, ptr align 4 %57, i64 12, i1 false)
  %189 = getelementptr inbounds { <2 x float>, float }, ptr %58, i32 0, i32 0
  %190 = load <2 x float>, ptr %189, align 4
  %191 = getelementptr inbounds { <2 x float>, float }, ptr %58, i32 0, i32 1
  %192 = load float, ptr %191, align 4
  %193 = call { <2 x float>, float } @_ZmiILm3EfE3vecIXT_ET0_ES2_RKS2_(<2 x float> %190, float %192, ptr noundef nonnull align 4 dereferenceable(12) %12)
  store { <2 x float>, float } %193, ptr %59, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %56, ptr align 8 %59, i64 12, i1 false)
  %194 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN3vecILm3EfE9normalizeEf(ptr noundef nonnull align 4 dereferenceable(12) %56, float noundef 1.000000e+00)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %55, ptr align 4 %194, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 12, ptr %56) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %60) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr %61) #9
  %195 = load ptr, ptr %10, align 8, !tbaa !5
  %196 = load i64, ptr %54, align 8, !tbaa !9
  %197 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI5LightSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %195, i64 noundef %196) #9
  %198 = getelementptr inbounds %struct.Light, ptr %197, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %62, ptr align 4 %198, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %63, ptr align 4 %62, i64 12, i1 false)
  %199 = getelementptr inbounds { <2 x float>, float }, ptr %63, i32 0, i32 0
  %200 = load <2 x float>, ptr %199, align 4
  %201 = getelementptr inbounds { <2 x float>, float }, ptr %63, i32 0, i32 1
  %202 = load float, ptr %201, align 4
  %203 = call { <2 x float>, float } @_ZmiILm3EfE3vecIXT_ET0_ES2_RKS2_(<2 x float> %200, float %202, ptr noundef nonnull align 4 dereferenceable(12) %12)
  store { <2 x float>, float } %203, ptr %64, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %61, ptr align 8 %64, i64 12, i1 false)
  %204 = call noundef float @_ZN3vecILm3EfE4normEv(ptr noundef nonnull align 4 dereferenceable(12) %61)
  call void @llvm.lifetime.end.p0(i64 12, ptr %61) #9
  store float %204, ptr %60, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 12, ptr %65) #9
  %205 = call noundef float @_ZmlILm3EfET0_RK3vecIXT_ES0_ES4_(ptr noundef nonnull align 4 dereferenceable(12) %55, ptr noundef nonnull align 4 dereferenceable(12) %13)
  %206 = fcmp olt float %205, 0.000000e+00
  call void @llvm.lifetime.start.p0(i64 12, ptr %67) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %68) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr %73) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %74) #9
  br i1 %206, label %207, label %214

207:                                              ; preds = %184
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %66, ptr align 4 %12, i64 12, i1 false), !tbaa.struct !11
  store double 1.000000e-03, ptr %68, align 8, !tbaa !18
  %208 = call { <2 x float>, float } @_ZmlILm3EfdE3vecIXT_ET0_ERKS2_RKT1_(ptr noundef nonnull align 4 dereferenceable(12) %13, ptr noundef nonnull align 8 dereferenceable(8) %68)
  store { <2 x float>, float } %208, ptr %69, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %67, ptr align 8 %69, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %70, ptr align 4 %66, i64 12, i1 false)
  %209 = getelementptr inbounds { <2 x float>, float }, ptr %70, i32 0, i32 0
  %210 = load <2 x float>, ptr %209, align 4
  %211 = getelementptr inbounds { <2 x float>, float }, ptr %70, i32 0, i32 1
  %212 = load float, ptr %211, align 4
  %213 = call { <2 x float>, float } @_ZmiILm3EfE3vecIXT_ET0_ES2_RKS2_(<2 x float> %210, float %212, ptr noundef nonnull align 4 dereferenceable(12) %67)
  store { <2 x float>, float } %213, ptr %71, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %65, ptr align 8 %71, i64 12, i1 false)
  br label %221

214:                                              ; preds = %184
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %72, ptr align 4 %12, i64 12, i1 false), !tbaa.struct !11
  store double 1.000000e-03, ptr %74, align 8, !tbaa !18
  %215 = call { <2 x float>, float } @_ZmlILm3EfdE3vecIXT_ET0_ERKS2_RKT1_(ptr noundef nonnull align 4 dereferenceable(12) %13, ptr noundef nonnull align 8 dereferenceable(8) %74)
  store { <2 x float>, float } %215, ptr %75, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %73, ptr align 8 %75, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %76, ptr align 4 %72, i64 12, i1 false)
  %216 = getelementptr inbounds { <2 x float>, float }, ptr %76, i32 0, i32 0
  %217 = load <2 x float>, ptr %216, align 4
  %218 = getelementptr inbounds { <2 x float>, float }, ptr %76, i32 0, i32 1
  %219 = load float, ptr %218, align 4
  %220 = call { <2 x float>, float } @_ZplILm3EfE3vecIXT_ET0_ES2_RKS2_(<2 x float> %217, float %219, ptr noundef nonnull align 4 dereferenceable(12) %73)
  store { <2 x float>, float } %220, ptr %77, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %65, ptr align 8 %77, i64 12, i1 false)
  br label %221

221:                                              ; preds = %214, %207
  call void @llvm.lifetime.end.p0(i64 8, ptr %74) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %73) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %68) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %67) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr %78) #9
  call void @_ZN3vecILm3EfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %78)
  call void @llvm.lifetime.start.p0(i64 12, ptr %79) #9
  call void @_ZN3vecILm3EfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %79)
  call void @llvm.lifetime.start.p0(i64 36, ptr %80) #9
  call void @_ZN8MaterialC2Ev(ptr noundef nonnull align 4 dereferenceable(36) %80)
  %222 = load ptr, ptr %9, align 8, !tbaa !5
  %223 = call noundef zeroext i1 @_Z15scene_intersectRK3vecILm3EfES2_RKSt6vectorI6SphereSaIS4_EERS0_S9_R8Material(ptr noundef nonnull align 4 dereferenceable(12) %65, ptr noundef nonnull align 4 dereferenceable(12) %55, ptr noundef nonnull align 8 dereferenceable(24) %222, ptr noundef nonnull align 4 dereferenceable(12) %78, ptr noundef nonnull align 4 dereferenceable(12) %79, ptr noundef nonnull align 4 dereferenceable(36) %80)
  call void @llvm.lifetime.start.p0(i64 12, ptr %81) #9
  br i1 %223, label %224, label %233

224:                                              ; preds = %221
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %82, ptr align 4 %78, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %83, ptr align 4 %82, i64 12, i1 false)
  %225 = getelementptr inbounds { <2 x float>, float }, ptr %83, i32 0, i32 0
  %226 = load <2 x float>, ptr %225, align 4
  %227 = getelementptr inbounds { <2 x float>, float }, ptr %83, i32 0, i32 1
  %228 = load float, ptr %227, align 4
  %229 = call { <2 x float>, float } @_ZmiILm3EfE3vecIXT_ET0_ES2_RKS2_(<2 x float> %226, float %228, ptr noundef nonnull align 4 dereferenceable(12) %65)
  store { <2 x float>, float } %229, ptr %84, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %81, ptr align 8 %84, i64 12, i1 false)
  %230 = call noundef float @_ZN3vecILm3EfE4normEv(ptr noundef nonnull align 4 dereferenceable(12) %81)
  %231 = load float, ptr %60, align 4, !tbaa !12
  %232 = fcmp olt float %230, %231
  br label %233

233:                                              ; preds = %224, %221
  %234 = phi i1 [ false, %221 ], [ %232, %224 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr %81) #9
  br i1 %234, label %235, label %236

235:                                              ; preds = %233
  store i32 4, ptr %15, align 4
  br label %264

236:                                              ; preds = %233
  %237 = load ptr, ptr %10, align 8, !tbaa !5
  %238 = load i64, ptr %54, align 8, !tbaa !9
  %239 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI5LightSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %237, i64 noundef %238) #9
  %240 = getelementptr inbounds %struct.Light, ptr %239, i32 0, i32 1
  %241 = load float, ptr %240, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %85) #9
  store float 0.000000e+00, ptr %85, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %86) #9
  %242 = call noundef float @_ZmlILm3EfET0_RK3vecIXT_ES0_ES4_(ptr noundef nonnull align 4 dereferenceable(12) %55, ptr noundef nonnull align 4 dereferenceable(12) %13)
  store float %242, ptr %86, align 4, !tbaa !12
  %243 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %85, ptr noundef nonnull align 4 dereferenceable(4) %86)
  %244 = load float, ptr %243, align 4, !tbaa !12
  %245 = load float, ptr %52, align 4, !tbaa !12
  %246 = call float @llvm.fmuladd.f32(float %241, float %244, float %245)
  store float %246, ptr %52, align 4, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 4, ptr %86) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %85) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %87) #9
  store float 0.000000e+00, ptr %87, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %88) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr %89) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr %90) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr %91) #9
  %247 = call { <2 x float>, float } @_ZngILm3EfE3vecIXT_ET0_ERKS2_(ptr noundef nonnull align 4 dereferenceable(12) %55)
  store { <2 x float>, float } %247, ptr %92, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %91, ptr align 8 %92, i64 12, i1 false)
  %248 = call { <2 x float>, float } @_Z7reflectRK3vecILm3EfES2_(ptr noundef nonnull align 4 dereferenceable(12) %91, ptr noundef nonnull align 4 dereferenceable(12) %13)
  store { <2 x float>, float } %248, ptr %93, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %90, ptr align 8 %93, i64 12, i1 false)
  %249 = call { <2 x float>, float } @_ZngILm3EfE3vecIXT_ET0_ERKS2_(ptr noundef nonnull align 4 dereferenceable(12) %90)
  store { <2 x float>, float } %249, ptr %94, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %89, ptr align 8 %94, i64 12, i1 false)
  %250 = load ptr, ptr %8, align 8, !tbaa !5
  %251 = call noundef float @_ZmlILm3EfET0_RK3vecIXT_ES0_ES4_(ptr noundef nonnull align 4 dereferenceable(12) %89, ptr noundef nonnull align 4 dereferenceable(12) %250)
  store float %251, ptr %88, align 4, !tbaa !12
  %252 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %87, ptr noundef nonnull align 4 dereferenceable(4) %88)
  %253 = load float, ptr %252, align 4, !tbaa !12
  %254 = getelementptr inbounds %struct.Material, ptr %14, i32 0, i32 3
  %255 = load float, ptr %254, align 4, !tbaa !22
  %256 = call float @powf(float noundef %253, float noundef %255) #9
  %257 = load ptr, ptr %10, align 8, !tbaa !5
  %258 = load i64, ptr %54, align 8, !tbaa !9
  %259 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI5LightSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %257, i64 noundef %258) #9
  %260 = getelementptr inbounds %struct.Light, ptr %259, i32 0, i32 1
  %261 = load float, ptr %260, align 4, !tbaa !20
  %262 = load float, ptr %53, align 4, !tbaa !12
  %263 = call float @llvm.fmuladd.f32(float %256, float %261, float %262)
  store float %263, ptr %53, align 4, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 12, ptr %91) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %90) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %89) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %88) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %87) #9
  store i32 0, ptr %15, align 4
  br label %264

264:                                              ; preds = %236, %235
  call void @llvm.lifetime.end.p0(i64 36, ptr %80) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %79) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %78) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %65) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %60) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %55) #9
  %265 = load i32, ptr %15, align 4
  switch i32 %265, label %303 [
    i32 0, label %266
    i32 4, label %267
  ]

266:                                              ; preds = %264
  br label %267

267:                                              ; preds = %266, %264
  %268 = load i64, ptr %54, align 8, !tbaa !9
  %269 = add i64 %268, 1
  store i64 %269, ptr %54, align 8, !tbaa !9
  br label %178, !llvm.loop !23

270:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 12, ptr %98) #9
  %271 = getelementptr inbounds %struct.Material, ptr %14, i32 0, i32 2
  %272 = call { <2 x float>, float } @_ZmlILm3EffE3vecIXT_ET0_ERKS2_RKT1_(ptr noundef nonnull align 4 dereferenceable(12) %271, ptr noundef nonnull align 4 dereferenceable(4) %52)
  store { <2 x float>, float } %272, ptr %99, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %98, ptr align 8 %99, i64 12, i1 false)
  %273 = getelementptr inbounds %struct.Material, ptr %14, i32 0, i32 1
  %274 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3vecILm4EfEixEm(ptr noundef nonnull align 4 dereferenceable(16) %273, i64 noundef 0)
  %275 = call { <2 x float>, float } @_ZmlILm3EffE3vecIXT_ET0_ERKS2_RKT1_(ptr noundef nonnull align 4 dereferenceable(12) %98, ptr noundef nonnull align 4 dereferenceable(4) %274)
  store { <2 x float>, float } %275, ptr %100, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %97, ptr align 8 %100, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %101) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr %102) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr %103) #9
  call void @_ZN3vecILm3EfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %103, float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef 1.000000e+00)
  %276 = call { <2 x float>, float } @_ZmlILm3EffE3vecIXT_ET0_ERKS2_RKT1_(ptr noundef nonnull align 4 dereferenceable(12) %103, ptr noundef nonnull align 4 dereferenceable(4) %53)
  store { <2 x float>, float } %276, ptr %104, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %102, ptr align 8 %104, i64 12, i1 false)
  %277 = getelementptr inbounds %struct.Material, ptr %14, i32 0, i32 1
  %278 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3vecILm4EfEixEm(ptr noundef nonnull align 4 dereferenceable(16) %277, i64 noundef 1)
  %279 = call { <2 x float>, float } @_ZmlILm3EffE3vecIXT_ET0_ERKS2_RKT1_(ptr noundef nonnull align 4 dereferenceable(12) %102, ptr noundef nonnull align 4 dereferenceable(4) %278)
  store { <2 x float>, float } %279, ptr %105, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %101, ptr align 8 %105, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %106, ptr align 4 %97, i64 12, i1 false)
  %280 = getelementptr inbounds { <2 x float>, float }, ptr %106, i32 0, i32 0
  %281 = load <2 x float>, ptr %280, align 4
  %282 = getelementptr inbounds { <2 x float>, float }, ptr %106, i32 0, i32 1
  %283 = load float, ptr %282, align 4
  %284 = call { <2 x float>, float } @_ZplILm3EfE3vecIXT_ET0_ES2_RKS2_(<2 x float> %281, float %283, ptr noundef nonnull align 4 dereferenceable(12) %101)
  store { <2 x float>, float } %284, ptr %107, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %96, ptr align 8 %107, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %108) #9
  %285 = getelementptr inbounds %struct.Material, ptr %14, i32 0, i32 1
  %286 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3vecILm4EfEixEm(ptr noundef nonnull align 4 dereferenceable(16) %285, i64 noundef 2)
  %287 = call { <2 x float>, float } @_ZmlILm3EffE3vecIXT_ET0_ERKS2_RKT1_(ptr noundef nonnull align 4 dereferenceable(12) %48, ptr noundef nonnull align 4 dereferenceable(4) %286)
  store { <2 x float>, float } %287, ptr %109, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %108, ptr align 8 %109, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %110, ptr align 4 %96, i64 12, i1 false)
  %288 = getelementptr inbounds { <2 x float>, float }, ptr %110, i32 0, i32 0
  %289 = load <2 x float>, ptr %288, align 4
  %290 = getelementptr inbounds { <2 x float>, float }, ptr %110, i32 0, i32 1
  %291 = load float, ptr %290, align 4
  %292 = call { <2 x float>, float } @_ZplILm3EfE3vecIXT_ET0_ES2_RKS2_(<2 x float> %289, float %291, ptr noundef nonnull align 4 dereferenceable(12) %108)
  store { <2 x float>, float } %292, ptr %111, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %95, ptr align 8 %111, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %112) #9
  %293 = getelementptr inbounds %struct.Material, ptr %14, i32 0, i32 1
  %294 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3vecILm4EfEixEm(ptr noundef nonnull align 4 dereferenceable(16) %293, i64 noundef 3)
  %295 = call { <2 x float>, float } @_ZmlILm3EffE3vecIXT_ET0_ERKS2_RKT1_(ptr noundef nonnull align 4 dereferenceable(12) %50, ptr noundef nonnull align 4 dereferenceable(4) %294)
  store { <2 x float>, float } %295, ptr %113, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %112, ptr align 8 %113, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %114, ptr align 4 %95, i64 12, i1 false)
  %296 = getelementptr inbounds { <2 x float>, float }, ptr %114, i32 0, i32 0
  %297 = load <2 x float>, ptr %296, align 4
  %298 = getelementptr inbounds { <2 x float>, float }, ptr %114, i32 0, i32 1
  %299 = load float, ptr %298, align 4
  %300 = call { <2 x float>, float } @_ZplILm3EfE3vecIXT_ET0_ES2_RKS2_(<2 x float> %297, float %299, ptr noundef nonnull align 4 dereferenceable(12) %112)
  store { <2 x float>, float } %300, ptr %115, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %6, ptr align 8 %115, i64 12, i1 false)
  call void @llvm.lifetime.end.p0(i64 12, ptr %112) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %108) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %103) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %102) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %101) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %98) #9
  store i32 1, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %53) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %52) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %50) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %48) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %35) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #9
  br label %301

301:                                              ; preds = %270, %124
  call void @llvm.lifetime.end.p0(i64 36, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %116, ptr align 4 %6, i64 12, i1 false)
  %302 = load { <2 x float>, float }, ptr %116, align 8
  ret { <2 x float>, float } %302

303:                                              ; preds = %264
  unreachable
}

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZN3vecILm3EfE4normEv(ptr noundef nonnull align 4 dereferenceable(12)) #3 align 2

; Function Attrs: nounwind
declare float @powf(float noundef, float noundef) #8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN3vecILm4EfEixEm(ptr noundef nonnull align 4 dereferenceable(16), i64 noundef) #4 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 = !{i64 0, i64 4, !12, i64 4, i64 4, !12, i64 8, i64 4, !12}
!12 = !{!13, !13, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = !{!15, !13, i64 0}
!15 = !{!"_ZTS8Material", !13, i64 0, !16, i64 4, !17, i64 20, !13, i64 32}
!16 = !{!"_ZTS3vecILm4EfE", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12}
!17 = !{!"_ZTS3vecILm3EfE", !13, i64 0, !13, i64 4, !13, i64 8}
!18 = !{!19, !19, i64 0}
!19 = !{!"double", !7, i64 0}
!20 = !{!21, !13, i64 12}
!21 = !{!"_ZTS5Light", !17, i64 0, !13, i64 12}
!22 = !{!15, !13, i64 32}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}


; 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.vec = type { float, float, float }
%struct.Material = type { float, %struct.vec.0, %struct.vec, float }
%struct.vec.0 = type { float, float, float, float }

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

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

; 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) #1

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

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

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

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

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #6

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z15scene_intersectRK3vecILm3EfES2_RKSt6vectorI6SphereSaIS4_EERS0_S9_R8Material(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(36)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN3vecILm3EfE9normalizeEf(ptr noundef nonnull align 4 dereferenceable(12), float noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local { <2 x float>, float } @_Z8cast_rayRK3vecILm3EfES2_RKSt6vectorI6SphereSaIS4_EERKS3_I5LightSaIS9_EEm(ptr noundef nonnull align 4 dereferenceable(12) %0, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %4) local_unnamed_addr #0 {
  %6 = alloca %struct.vec, align 8
  %7 = alloca %struct.vec, align 8
  %8 = alloca %struct.vec, align 4
  %9 = alloca %struct.Material, align 4
  %10 = alloca %struct.vec, align 4
  %11 = alloca %struct.vec, align 8
  %12 = alloca %struct.vec, align 4
  %13 = alloca %struct.vec, align 8
  %14 = alloca %struct.vec, align 8
  %15 = alloca %struct.vec, align 8
  %16 = alloca double, align 8
  %17 = alloca %struct.vec, align 8
  %18 = alloca double, align 8
  %19 = alloca %struct.vec, align 8
  %20 = alloca %struct.vec, align 8
  %21 = alloca double, align 8
  %22 = alloca %struct.vec, align 8
  %23 = alloca double, align 8
  %24 = alloca %struct.vec, align 8
  %25 = alloca %struct.vec, align 8
  %26 = alloca float, align 4
  %27 = alloca float, align 4
  %28 = alloca %struct.vec, align 4
  %29 = alloca %struct.vec, align 8
  %30 = alloca %struct.vec, align 8
  %31 = alloca %struct.vec, align 8
  %32 = alloca %struct.vec, align 8
  %33 = alloca double, align 8
  %34 = alloca %struct.vec, align 8
  %35 = alloca double, align 8
  %36 = alloca %struct.vec, align 8
  %37 = alloca %struct.vec, align 4
  %38 = alloca %struct.Material, align 4
  %39 = alloca %struct.vec, align 8
  %40 = alloca float, align 4
  %41 = alloca float, align 4
  %42 = alloca float, align 4
  %43 = alloca float, align 4
  %44 = alloca %struct.vec, align 8
  %45 = alloca %struct.vec, align 8
  %46 = alloca %struct.vec, align 8
  %47 = alloca %struct.vec, align 8
  %48 = alloca %struct.vec, align 8
  %49 = alloca %struct.vec, align 8
  %50 = alloca %struct.vec, align 4
  %51 = alloca %struct.vec, align 8
  %52 = alloca %struct.vec, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #9
  call void @_ZN3vecILm3EfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %7)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #9
  call void @_ZN3vecILm3EfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %8)
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %9) #9
  call void @_ZN8MaterialC2Ev(ptr noundef nonnull align 4 dereferenceable(36) %9)
  %53 = icmp ugt i64 %4, 4
  br i1 %53, label %56, label %54

54:                                               ; preds = %5
  %55 = call noundef zeroext i1 @_Z15scene_intersectRK3vecILm3EfES2_RKSt6vectorI6SphereSaIS4_EERS0_S9_R8Material(ptr noundef nonnull align 4 dereferenceable(12) %0, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef nonnull align 4 dereferenceable(12) %8, ptr noundef nonnull align 4 dereferenceable(36) %9)
  br i1 %55, label %57, label %56

56:                                               ; preds = %54, %5
  call void @_ZN3vecILm3EfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %6, float noundef 0x3FC99999A0000000, float noundef 0x3FE6666660000000, float noundef 0x3FE99999A0000000)
  %.sroa.0.0.copyload.pre = load <2 x float>, ptr %6, align 8
  %.sroa.2.0..sroa_idx.phi.trans.insert = getelementptr inbounds i8, ptr %6, i64 8
  %.sroa.2.0.copyload.pre = load float, ptr %.sroa.2.0..sroa_idx.phi.trans.insert, align 8
  br label %152

57:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #9
  %58 = call { <2 x float>, float } @_Z7reflectRK3vecILm3EfES2_(ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %8)
  %.fca.0.extract172 = extractvalue { <2 x float>, float } %58, 0
  %.fca.1.extract173 = extractvalue { <2 x float>, float } %58, 1
  store <2 x float> %.fca.0.extract172, ptr %11, align 8
  %.sroa.2175.0..sroa_idx = getelementptr inbounds i8, ptr %11, i64 8
  store float %.fca.1.extract173, ptr %.sroa.2175.0..sroa_idx, align 8
  %59 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN3vecILm3EfE9normalizeEf(ptr noundef nonnull align 4 dereferenceable(12) %11, float noundef 1.000000e+00)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %59, i64 12, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %12) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %13) #9
  %60 = load float, ptr %9, align 4, !tbaa !10
  %61 = call { <2 x float>, float } @_Z7refractRK3vecILm3EfES2_ff(ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %8, float noundef %60, float noundef 1.000000e+00)
  %.fca.0.extract168 = extractvalue { <2 x float>, float } %61, 0
  %.fca.1.extract169 = extractvalue { <2 x float>, float } %61, 1
  store <2 x float> %.fca.0.extract168, ptr %13, align 8
  %.sroa.2171.0..sroa_idx = getelementptr inbounds i8, ptr %13, i64 8
  store float %.fca.1.extract169, ptr %.sroa.2171.0..sroa_idx, align 8
  %62 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN3vecILm3EfE9normalizeEf(ptr noundef nonnull align 4 dereferenceable(12) %13, float noundef 1.000000e+00)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %12, ptr noundef nonnull align 4 dereferenceable(12) %62, i64 12, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %14) #9
  %63 = call noundef float @_ZmlILm3EfET0_RK3vecIXT_ES0_ES4_(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %8)
  %64 = fcmp olt float %63, 0.000000e+00
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %15) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %17) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #9
  %.sroa.0166.0.copyload = load <2 x float>, ptr %7, align 8
  %.sroa.2167.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 8
  %.sroa.2167.0.copyload = load float, ptr %.sroa.2167.0..sroa_idx, align 8, !tbaa !6
  br i1 %64, label %65, label %68

65:                                               ; preds = %57
  store double 1.000000e-03, ptr %16, align 8, !tbaa !14
  %66 = call { <2 x float>, float } @_ZmlILm3EfdE3vecIXT_ET0_ERKS2_RKT1_(ptr noundef nonnull align 4 dereferenceable(12) %8, ptr noundef nonnull align 8 dereferenceable(8) %16)
  %.fca.0.extract162 = extractvalue { <2 x float>, float } %66, 0
  %.fca.1.extract163 = extractvalue { <2 x float>, float } %66, 1
  store <2 x float> %.fca.0.extract162, ptr %15, align 8
  %.sroa.2165.0..sroa_idx = getelementptr inbounds i8, ptr %15, i64 8
  store float %.fca.1.extract163, ptr %.sroa.2165.0..sroa_idx, align 8
  %67 = call { <2 x float>, float } @_ZmiILm3EfE3vecIXT_ET0_ES2_RKS2_(<2 x float> %.sroa.0166.0.copyload, float %.sroa.2167.0.copyload, ptr noundef nonnull align 4 dereferenceable(12) %15)
  br label %71

68:                                               ; preds = %57
  store double 1.000000e-03, ptr %18, align 8, !tbaa !14
  %69 = call { <2 x float>, float } @_ZmlILm3EfdE3vecIXT_ET0_ERKS2_RKT1_(ptr noundef nonnull align 4 dereferenceable(12) %8, ptr noundef nonnull align 8 dereferenceable(8) %18)
  %.fca.0.extract150 = extractvalue { <2 x float>, float } %69, 0
  %.fca.1.extract151 = extractvalue { <2 x float>, float } %69, 1
  store <2 x float> %.fca.0.extract150, ptr %17, align 8
  %.sroa.2153.0..sroa_idx = getelementptr inbounds i8, ptr %17, i64 8
  store float %.fca.1.extract151, ptr %.sroa.2153.0..sroa_idx, align 8
  %70 = call { <2 x float>, float } @_ZplILm3EfE3vecIXT_ET0_ES2_RKS2_(<2 x float> %.sroa.0166.0.copyload, float %.sroa.2167.0.copyload, ptr noundef nonnull align 4 dereferenceable(12) %17)
  br label %71

71:                                               ; preds = %68, %65
  %.pn = phi { <2 x float>, float } [ %67, %65 ], [ %70, %68 ]
  %.fca.1.extract145.sink = extractvalue { <2 x float>, float } %.pn, 1
  %.fca.0.extract144.sink = extractvalue { <2 x float>, float } %.pn, 0
  store <2 x float> %.fca.0.extract144.sink, ptr %14, align 8
  %72 = getelementptr inbounds i8, ptr %14, i64 8
  store float %.fca.1.extract145.sink, ptr %72, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %17) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %15) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %19) #9
  %73 = call noundef float @_ZmlILm3EfET0_RK3vecIXT_ES0_ES4_(ptr noundef nonnull align 4 dereferenceable(12) %12, ptr noundef nonnull align 4 dereferenceable(12) %8)
  %74 = fcmp olt float %73, 0.000000e+00
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %20) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %22) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #9
  %.sroa.0142.0.copyload = load <2 x float>, ptr %7, align 8
  %.sroa.2143.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 8
  %.sroa.2143.0.copyload = load float, ptr %.sroa.2143.0..sroa_idx, align 8, !tbaa !6
  br i1 %74, label %75, label %78

75:                                               ; preds = %71
  store double 1.000000e-03, ptr %21, align 8, !tbaa !14
  %76 = call { <2 x float>, float } @_ZmlILm3EfdE3vecIXT_ET0_ERKS2_RKT1_(ptr noundef nonnull align 4 dereferenceable(12) %8, ptr noundef nonnull align 8 dereferenceable(8) %21)
  %.fca.0.extract138 = extractvalue { <2 x float>, float } %76, 0
  %.fca.1.extract139 = extractvalue { <2 x float>, float } %76, 1
  store <2 x float> %.fca.0.extract138, ptr %20, align 8
  %.sroa.2141.0..sroa_idx = getelementptr inbounds i8, ptr %20, i64 8
  store float %.fca.1.extract139, ptr %.sroa.2141.0..sroa_idx, align 8
  %77 = call { <2 x float>, float } @_ZmiILm3EfE3vecIXT_ET0_ES2_RKS2_(<2 x float> %.sroa.0142.0.copyload, float %.sroa.2143.0.copyload, ptr noundef nonnull align 4 dereferenceable(12) %20)
  br label %81

78:                                               ; preds = %71
  store double 1.000000e-03, ptr %23, align 8, !tbaa !14
  %79 = call { <2 x float>, float } @_ZmlILm3EfdE3vecIXT_ET0_ERKS2_RKT1_(ptr noundef nonnull align 4 dereferenceable(12) %8, ptr noundef nonnull align 8 dereferenceable(8) %23)
  %.fca.0.extract126 = extractvalue { <2 x float>, float } %79, 0
  %.fca.1.extract127 = extractvalue { <2 x float>, float } %79, 1
  store <2 x float> %.fca.0.extract126, ptr %22, align 8
  %.sroa.2129.0..sroa_idx = getelementptr inbounds i8, ptr %22, i64 8
  store float %.fca.1.extract127, ptr %.sroa.2129.0..sroa_idx, align 8
  %80 = call { <2 x float>, float } @_ZplILm3EfE3vecIXT_ET0_ES2_RKS2_(<2 x float> %.sroa.0142.0.copyload, float %.sroa.2143.0.copyload, ptr noundef nonnull align 4 dereferenceable(12) %22)
  br label %81

81:                                               ; preds = %78, %75
  %.pn200 = phi { <2 x float>, float } [ %77, %75 ], [ %80, %78 ]
  %.fca.1.extract121.sink = extractvalue { <2 x float>, float } %.pn200, 1
  %.fca.0.extract120.sink = extractvalue { <2 x float>, float } %.pn200, 0
  store <2 x float> %.fca.0.extract120.sink, ptr %19, align 8
  %82 = getelementptr inbounds i8, ptr %19, i64 8
  store float %.fca.1.extract121.sink, ptr %82, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %22) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %20) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %24) #9
  %83 = add nuw nsw i64 %4, 1
  %84 = call { <2 x float>, float } @_Z8cast_rayRK3vecILm3EfES2_RKSt6vectorI6SphereSaIS4_EERKS3_I5LightSaIS9_EEm(ptr noundef nonnull align 4 dereferenceable(12) %14, ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %83)
  %.fca.0.extract116 = extractvalue { <2 x float>, float } %84, 0
  %.fca.1.extract117 = extractvalue { <2 x float>, float } %84, 1
  store <2 x float> %.fca.0.extract116, ptr %24, align 8
  %.sroa.2119.0..sroa_idx = getelementptr inbounds i8, ptr %24, i64 8
  store float %.fca.1.extract117, ptr %.sroa.2119.0..sroa_idx, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %25) #9
  %85 = call { <2 x float>, float } @_Z8cast_rayRK3vecILm3EfES2_RKSt6vectorI6SphereSaIS4_EERKS3_I5LightSaIS9_EEm(ptr noundef nonnull align 4 dereferenceable(12) %19, ptr noundef nonnull align 4 dereferenceable(12) %12, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %83)
  %.fca.0.extract112 = extractvalue { <2 x float>, float } %85, 0
  %.fca.1.extract113 = extractvalue { <2 x float>, float } %85, 1
  store <2 x float> %.fca.0.extract112, ptr %25, align 8
  %.sroa.2115.0..sroa_idx = getelementptr inbounds i8, ptr %25, i64 8
  store float %.fca.1.extract113, ptr %.sroa.2115.0..sroa_idx, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %26) #9
  store float 0.000000e+00, ptr %26, align 4, !tbaa !6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %27) #9
  store float 0.000000e+00, ptr %27, align 4, !tbaa !6
  %86 = call noundef i64 @_ZNKSt6vectorI5LightSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #9
  %.not = icmp eq i64 %86, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %81
  %.sroa.2102.0..sroa_idx = getelementptr inbounds i8, ptr %29, i64 8
  %.sroa.294.0..sroa_idx = getelementptr inbounds i8, ptr %30, i64 8
  %.sroa.278.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 8
  %.sroa.276.0..sroa_idx = getelementptr inbounds i8, ptr %34, i64 8
  %.sroa.270.0..sroa_idx = getelementptr inbounds i8, ptr %31, i64 8
  %.sroa.288.0..sroa_idx = getelementptr inbounds i8, ptr %32, i64 8
  %.sroa.266.0..sroa_idx = getelementptr inbounds i8, ptr %36, i64 8
  %.sroa.262.0..sroa_idx = getelementptr inbounds i8, ptr %39, i64 8
  %.sroa.258.0..sroa_idx = getelementptr inbounds i8, ptr %46, i64 8
  %.sroa.254.0..sroa_idx = getelementptr inbounds i8, ptr %45, i64 8
  %.sroa.250.0..sroa_idx = getelementptr inbounds i8, ptr %44, i64 8
  %87 = getelementptr inbounds i8, ptr %9, i64 32
  br label %103

._crit_edge:                                      ; preds = %146, %81
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %47) #9
  %88 = getelementptr inbounds i8, ptr %9, i64 20
  %89 = call { <2 x float>, float } @_ZmlILm3EffE3vecIXT_ET0_ERKS2_RKT1_(ptr noundef nonnull align 4 dereferenceable(12) %88, ptr noundef nonnull align 4 dereferenceable(4) %26)
  %.fca.0.extract37 = extractvalue { <2 x float>, float } %89, 0
  %.fca.1.extract38 = extractvalue { <2 x float>, float } %89, 1
  store <2 x float> %.fca.0.extract37, ptr %47, align 8
  %.sroa.240.0..sroa_idx = getelementptr inbounds i8, ptr %47, i64 8
  store float %.fca.1.extract38, ptr %.sroa.240.0..sroa_idx, align 8
  %90 = getelementptr inbounds i8, ptr %9, i64 4
  %91 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3vecILm4EfEixEm(ptr noundef nonnull align 4 dereferenceable(16) %90, i64 noundef 0)
  %92 = call { <2 x float>, float } @_ZmlILm3EffE3vecIXT_ET0_ERKS2_RKT1_(ptr noundef nonnull align 4 dereferenceable(12) %47, ptr noundef nonnull align 4 dereferenceable(4) %91)
  %.fca.0.extract33 = extractvalue { <2 x float>, float } %92, 0
  %.fca.1.extract34 = extractvalue { <2 x float>, float } %92, 1
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %48) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %49) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %50) #9
  call void @_ZN3vecILm3EfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %50, float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef 1.000000e+00)
  %93 = call { <2 x float>, float } @_ZmlILm3EffE3vecIXT_ET0_ERKS2_RKT1_(ptr noundef nonnull align 4 dereferenceable(12) %50, ptr noundef nonnull align 4 dereferenceable(4) %27)
  %.fca.0.extract29 = extractvalue { <2 x float>, float } %93, 0
  %.fca.1.extract30 = extractvalue { <2 x float>, float } %93, 1
  store <2 x float> %.fca.0.extract29, ptr %49, align 8
  %.sroa.232.0..sroa_idx = getelementptr inbounds i8, ptr %49, i64 8
  store float %.fca.1.extract30, ptr %.sroa.232.0..sroa_idx, align 8
  %94 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3vecILm4EfEixEm(ptr noundef nonnull align 4 dereferenceable(16) %90, i64 noundef 1)
  %95 = call { <2 x float>, float } @_ZmlILm3EffE3vecIXT_ET0_ERKS2_RKT1_(ptr noundef nonnull align 4 dereferenceable(12) %49, ptr noundef nonnull align 4 dereferenceable(4) %94)
  %.fca.0.extract25 = extractvalue { <2 x float>, float } %95, 0
  %.fca.1.extract26 = extractvalue { <2 x float>, float } %95, 1
  store <2 x float> %.fca.0.extract25, ptr %48, align 8
  %.sroa.228.0..sroa_idx = getelementptr inbounds i8, ptr %48, i64 8
  store float %.fca.1.extract26, ptr %.sroa.228.0..sroa_idx, align 8
  %96 = call { <2 x float>, float } @_ZplILm3EfE3vecIXT_ET0_ES2_RKS2_(<2 x float> %.fca.0.extract33, float %.fca.1.extract34, ptr noundef nonnull align 4 dereferenceable(12) %48)
  %.fca.0.extract19 = extractvalue { <2 x float>, float } %96, 0
  %.fca.1.extract20 = extractvalue { <2 x float>, float } %96, 1
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %51) #9
  %97 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3vecILm4EfEixEm(ptr noundef nonnull align 4 dereferenceable(16) %90, i64 noundef 2)
  %98 = call { <2 x float>, float } @_ZmlILm3EffE3vecIXT_ET0_ERKS2_RKT1_(ptr noundef nonnull align 4 dereferenceable(12) %24, ptr noundef nonnull align 4 dereferenceable(4) %97)
  %.fca.0.extract15 = extractvalue { <2 x float>, float } %98, 0
  %.fca.1.extract16 = extractvalue { <2 x float>, float } %98, 1
  store <2 x float> %.fca.0.extract15, ptr %51, align 8
  %.sroa.218.0..sroa_idx = getelementptr inbounds i8, ptr %51, i64 8
  store float %.fca.1.extract16, ptr %.sroa.218.0..sroa_idx, align 8
  %99 = call { <2 x float>, float } @_ZplILm3EfE3vecIXT_ET0_ES2_RKS2_(<2 x float> %.fca.0.extract19, float %.fca.1.extract20, ptr noundef nonnull align 4 dereferenceable(12) %51)
  %.fca.0.extract9 = extractvalue { <2 x float>, float } %99, 0
  %.fca.1.extract10 = extractvalue { <2 x float>, float } %99, 1
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %52) #9
  %100 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3vecILm4EfEixEm(ptr noundef nonnull align 4 dereferenceable(16) %90, i64 noundef 3)
  %101 = call { <2 x float>, float } @_ZmlILm3EffE3vecIXT_ET0_ERKS2_RKT1_(ptr noundef nonnull align 4 dereferenceable(12) %25, ptr noundef nonnull align 4 dereferenceable(4) %100)
  %.fca.0.extract5 = extractvalue { <2 x float>, float } %101, 0
  %.fca.1.extract6 = extractvalue { <2 x float>, float } %101, 1
  store <2 x float> %.fca.0.extract5, ptr %52, align 8
  %.sroa.28.0..sroa_idx = getelementptr inbounds i8, ptr %52, i64 8
  store float %.fca.1.extract6, ptr %.sroa.28.0..sroa_idx, align 8
  %102 = call { <2 x float>, float } @_ZplILm3EfE3vecIXT_ET0_ES2_RKS2_(<2 x float> %.fca.0.extract9, float %.fca.1.extract10, ptr noundef nonnull align 4 dereferenceable(12) %52)
  %.fca.0.extract = extractvalue { <2 x float>, float } %102, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %102, 1
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %52) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %51) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %50) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %49) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %48) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %47) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %27) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %25) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %24) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %19) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %14) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #9
  br label %152

103:                                              ; preds = %.lr.ph, %146
  %104 = phi float [ 0.000000e+00, %.lr.ph ], [ %147, %146 ]
  %105 = phi float [ 0.000000e+00, %.lr.ph ], [ %148, %146 ]
  %.0196 = phi i64 [ 0, %.lr.ph ], [ %149, %146 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %28) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %29) #9
  %106 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI5LightSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.0196) #9
  %.sroa.0105.0.copyload = load <2 x float>, ptr %106, align 4
  %.sroa.2106.0..sroa_idx = getelementptr inbounds i8, ptr %106, i64 8
  %.sroa.2106.0.copyload = load float, ptr %.sroa.2106.0..sroa_idx, align 4, !tbaa !6
  %107 = call { <2 x float>, float } @_ZmiILm3EfE3vecIXT_ET0_ES2_RKS2_(<2 x float> %.sroa.0105.0.copyload, float %.sroa.2106.0.copyload, ptr noundef nonnull align 4 dereferenceable(12) %7)
  %.fca.0.extract99 = extractvalue { <2 x float>, float } %107, 0
  %.fca.1.extract100 = extractvalue { <2 x float>, float } %107, 1
  store <2 x float> %.fca.0.extract99, ptr %29, align 8
  store float %.fca.1.extract100, ptr %.sroa.2102.0..sroa_idx, align 8
  %108 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN3vecILm3EfE9normalizeEf(ptr noundef nonnull align 4 dereferenceable(12) %29, float noundef 1.000000e+00)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %28, ptr noundef nonnull align 4 dereferenceable(12) %108, i64 12, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %29) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %30) #9
  %109 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI5LightSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.0196) #9
  %.sroa.097.0.copyload = load <2 x float>, ptr %109, align 4
  %.sroa.298.0..sroa_idx = getelementptr inbounds i8, ptr %109, i64 8
  %.sroa.298.0.copyload = load float, ptr %.sroa.298.0..sroa_idx, align 4, !tbaa !6
  %110 = call { <2 x float>, float } @_ZmiILm3EfE3vecIXT_ET0_ES2_RKS2_(<2 x float> %.sroa.097.0.copyload, float %.sroa.298.0.copyload, ptr noundef nonnull align 4 dereferenceable(12) %7)
  %.fca.0.extract91 = extractvalue { <2 x float>, float } %110, 0
  %.fca.1.extract92 = extractvalue { <2 x float>, float } %110, 1
  store <2 x float> %.fca.0.extract91, ptr %30, align 8
  store float %.fca.1.extract92, ptr %.sroa.294.0..sroa_idx, align 8
  %111 = call noundef float @_ZN3vecILm3EfE4normEv(ptr noundef nonnull align 4 dereferenceable(12) %30)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %30) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %31) #9
  %112 = call noundef float @_ZmlILm3EfET0_RK3vecIXT_ES0_ES4_(ptr noundef nonnull align 4 dereferenceable(12) %28, ptr noundef nonnull align 4 dereferenceable(12) %8)
  %113 = fcmp olt float %112, 0.000000e+00
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %32) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %33) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %34) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %35) #9
  %.sroa.089.0.copyload = load <2 x float>, ptr %7, align 8
  %.sroa.290.0.copyload = load float, ptr %.sroa.278.0..sroa_idx, align 8, !tbaa !6
  br i1 %113, label %114, label %117

114:                                              ; preds = %103
  store double 1.000000e-03, ptr %33, align 8, !tbaa !14
  %115 = call { <2 x float>, float } @_ZmlILm3EfdE3vecIXT_ET0_ERKS2_RKT1_(ptr noundef nonnull align 4 dereferenceable(12) %8, ptr noundef nonnull align 8 dereferenceable(8) %33)
  %.fca.0.extract85 = extractvalue { <2 x float>, float } %115, 0
  %.fca.1.extract86 = extractvalue { <2 x float>, float } %115, 1
  store <2 x float> %.fca.0.extract85, ptr %32, align 8
  store float %.fca.1.extract86, ptr %.sroa.288.0..sroa_idx, align 8
  %116 = call { <2 x float>, float } @_ZmiILm3EfE3vecIXT_ET0_ES2_RKS2_(<2 x float> %.sroa.089.0.copyload, float %.sroa.290.0.copyload, ptr noundef nonnull align 4 dereferenceable(12) %32)
  br label %120

117:                                              ; preds = %103
  store double 1.000000e-03, ptr %35, align 8, !tbaa !14
  %118 = call { <2 x float>, float } @_ZmlILm3EfdE3vecIXT_ET0_ERKS2_RKT1_(ptr noundef nonnull align 4 dereferenceable(12) %8, ptr noundef nonnull align 8 dereferenceable(8) %35)
  %.fca.0.extract73 = extractvalue { <2 x float>, float } %118, 0
  %.fca.1.extract74 = extractvalue { <2 x float>, float } %118, 1
  store <2 x float> %.fca.0.extract73, ptr %34, align 8
  store float %.fca.1.extract74, ptr %.sroa.276.0..sroa_idx, align 8
  %119 = call { <2 x float>, float } @_ZplILm3EfE3vecIXT_ET0_ES2_RKS2_(<2 x float> %.sroa.089.0.copyload, float %.sroa.290.0.copyload, ptr noundef nonnull align 4 dereferenceable(12) %34)
  br label %120

120:                                              ; preds = %117, %114
  %.pn202 = phi { <2 x float>, float } [ %119, %117 ], [ %116, %114 ]
  %storemerge203 = extractvalue { <2 x float>, float } %.pn202, 0
  store <2 x float> %storemerge203, ptr %31, align 8
  %storemerge = extractvalue { <2 x float>, float } %.pn202, 1
  store float %storemerge, ptr %.sroa.270.0..sroa_idx, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %35) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %34) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %33) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %32) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %36) #9
  call void @_ZN3vecILm3EfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %36)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %37) #9
  call void @_ZN3vecILm3EfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %37)
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %38) #9
  call void @_ZN8MaterialC2Ev(ptr noundef nonnull align 4 dereferenceable(36) %38)
  %121 = call noundef zeroext i1 @_Z15scene_intersectRK3vecILm3EfES2_RKSt6vectorI6SphereSaIS4_EERS0_S9_R8Material(ptr noundef nonnull align 4 dereferenceable(12) %31, ptr noundef nonnull align 4 dereferenceable(12) %28, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(12) %36, ptr noundef nonnull align 4 dereferenceable(12) %37, ptr noundef nonnull align 4 dereferenceable(36) %38)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %39) #9
  br i1 %121, label %122, label %.critedge

122:                                              ; preds = %120
  %.sroa.065.0.copyload = load <2 x float>, ptr %36, align 8
  %.sroa.266.0.copyload = load float, ptr %.sroa.266.0..sroa_idx, align 8, !tbaa !6
  %123 = call { <2 x float>, float } @_ZmiILm3EfE3vecIXT_ET0_ES2_RKS2_(<2 x float> %.sroa.065.0.copyload, float %.sroa.266.0.copyload, ptr noundef nonnull align 4 dereferenceable(12) %31)
  %.fca.0.extract59 = extractvalue { <2 x float>, float } %123, 0
  %.fca.1.extract60 = extractvalue { <2 x float>, float } %123, 1
  store <2 x float> %.fca.0.extract59, ptr %39, align 8
  store float %.fca.1.extract60, ptr %.sroa.262.0..sroa_idx, align 8
  %124 = call noundef float @_ZN3vecILm3EfE4normEv(ptr noundef nonnull align 4 dereferenceable(12) %39)
  %125 = fcmp olt float %124, %111
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %39) #9
  br i1 %125, label %146, label %126

.critedge:                                        ; preds = %120
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %39) #9
  br label %126

126:                                              ; preds = %.critedge, %122
  %127 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI5LightSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.0196) #9
  %128 = getelementptr inbounds i8, ptr %127, i64 12
  %129 = load float, ptr %128, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %40) #9
  store float 0.000000e+00, ptr %40, align 4, !tbaa !6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %41) #9
  %130 = call noundef float @_ZmlILm3EfET0_RK3vecIXT_ES0_ES4_(ptr noundef nonnull align 4 dereferenceable(12) %28, ptr noundef nonnull align 4 dereferenceable(12) %8)
  store float %130, ptr %41, align 4, !tbaa !6
  %131 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %40, ptr noundef nonnull align 4 dereferenceable(4) %41)
  %132 = load float, ptr %131, align 4, !tbaa !6
  %133 = call float @llvm.fmuladd.f32(float %129, float %132, float %105)
  store float %133, ptr %26, align 4, !tbaa !6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %41) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %40) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %42) #9
  store float 0.000000e+00, ptr %42, align 4, !tbaa !6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %43) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %44) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %45) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %46) #9
  %134 = call { <2 x float>, float } @_ZngILm3EfE3vecIXT_ET0_ERKS2_(ptr noundef nonnull align 4 dereferenceable(12) %28)
  %.fca.0.extract55 = extractvalue { <2 x float>, float } %134, 0
  %.fca.1.extract56 = extractvalue { <2 x float>, float } %134, 1
  store <2 x float> %.fca.0.extract55, ptr %46, align 8
  store float %.fca.1.extract56, ptr %.sroa.258.0..sroa_idx, align 8
  %135 = call { <2 x float>, float } @_Z7reflectRK3vecILm3EfES2_(ptr noundef nonnull align 4 dereferenceable(12) %46, ptr noundef nonnull align 4 dereferenceable(12) %8)
  %.fca.0.extract51 = extractvalue { <2 x float>, float } %135, 0
  %.fca.1.extract52 = extractvalue { <2 x float>, float } %135, 1
  store <2 x float> %.fca.0.extract51, ptr %45, align 8
  store float %.fca.1.extract52, ptr %.sroa.254.0..sroa_idx, align 8
  %136 = call { <2 x float>, float } @_ZngILm3EfE3vecIXT_ET0_ERKS2_(ptr noundef nonnull align 4 dereferenceable(12) %45)
  %.fca.0.extract47 = extractvalue { <2 x float>, float } %136, 0
  %.fca.1.extract48 = extractvalue { <2 x float>, float } %136, 1
  store <2 x float> %.fca.0.extract47, ptr %44, align 8
  store float %.fca.1.extract48, ptr %.sroa.250.0..sroa_idx, align 8
  %137 = call noundef float @_ZmlILm3EfET0_RK3vecIXT_ES0_ES4_(ptr noundef nonnull align 4 dereferenceable(12) %44, ptr noundef nonnull align 4 dereferenceable(12) %1)
  store float %137, ptr %43, align 4, !tbaa !6
  %138 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %42, ptr noundef nonnull align 4 dereferenceable(4) %43)
  %139 = load float, ptr %138, align 4, !tbaa !6
  %140 = load float, ptr %87, align 4, !tbaa !18
  %141 = call float @powf(float noundef %139, float noundef %140) #9
  %142 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI5LightSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.0196) #9
  %143 = getelementptr inbounds i8, ptr %142, i64 12
  %144 = load float, ptr %143, align 4, !tbaa !16
  %145 = call float @llvm.fmuladd.f32(float %141, float %144, float %104)
  store float %145, ptr %27, align 4, !tbaa !6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %46) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %45) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %44) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %43) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %42) #9
  br label %146

146:                                              ; preds = %122, %126
  %147 = phi float [ %104, %122 ], [ %145, %126 ]
  %148 = phi float [ %105, %122 ], [ %133, %126 ]
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %38) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %37) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %36) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %31) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %28) #9
  %149 = add nuw i64 %.0196, 1
  %150 = call noundef i64 @_ZNKSt6vectorI5LightSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #9
  %151 = icmp ult i64 %149, %150
  br i1 %151, label %103, label %._crit_edge, !llvm.loop !19

152:                                              ; preds = %._crit_edge, %56
  %.sroa.2.0.copyload = phi float [ %.fca.1.extract, %._crit_edge ], [ %.sroa.2.0.copyload.pre, %56 ]
  %.sroa.0.0.copyload = phi <2 x float> [ %.fca.0.extract, %._crit_edge ], [ %.sroa.0.0.copyload.pre, %56 ]
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #9
  %.fca.0.insert = insertvalue { <2 x float>, float } poison, <2 x float> %.sroa.0.0.copyload, 0
  %.fca.1.insert = insertvalue { <2 x float>, float } %.fca.0.insert, float %.sroa.2.0.copyload, 1
  ret { <2 x float>, float } %.fca.1.insert
}

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZN3vecILm3EfE4normEv(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @powf(float noundef, float noundef) local_unnamed_addr #8

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{i64 0, i64 4, !6, i64 4, i64 4, !6, i64 8, i64 4, !6}
!6 = !{!7, !7, i64 0}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !7, i64 0}
!11 = !{!"_ZTS8Material", !7, i64 0, !12, i64 4, !13, i64 20, !7, i64 32}
!12 = !{!"_ZTS3vecILm4EfE", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12}
!13 = !{!"_ZTS3vecILm3EfE", !7, i64 0, !7, i64 4, !7, i64 8}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !8, i64 0}
!16 = !{!17, !7, i64 12}
!17 = !{!"_ZTS5Light", !13, i64 0, !7, i64 12}
!18 = !{!11, !7, i64 32}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MergedLoadStoreMotionPass,SROAPass,SimplifyCFGPass