; LLVM IR from The-Order-of-the-Simulation/Path-Tracing-Renderer :: cpu/main.ll (Z5traceRK4vec3S1_)

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

%class.vec3 = type { float, float, float }
%class.intersection = type { float, float, i8, %class.vec3, %class.material }
%class.material = type { i8, %class.vec3, float, float }

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6sphere4vec3S_S_f(ptr dead_on_unwind noalias writable sret(%class.intersection) align 4, ptr noundef, ptr noundef, ptr noundef, float noundef) #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN12intersectionC2Ev(ptr noundef nonnull align 4 dereferenceable(48)) unnamed_addr #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: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z8triple32j(i32 noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_Z11randomFloatv() #4

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

; 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 void @_Z11process_hitRK12intersectionS1_(ptr dead_on_unwind noalias writable sret(%class.intersection) align 4, ptr noundef nonnull align 4 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(48)) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5traceRK4vec3S1_(ptr dead_on_unwind noalias writable sret(%class.intersection) align 4 %0, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %2) #0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca float, align 4
  %9 = alloca i32, align 4
  %10 = alloca %class.vec3, align 4
  %11 = alloca %class.vec3, align 4
  %12 = alloca %class.vec3, align 4
  %13 = alloca %class.vec3, align 4
  %14 = alloca %class.intersection, align 4
  %15 = alloca %class.vec3, align 4
  %16 = alloca %class.vec3, align 4
  %17 = alloca %class.vec3, align 4
  %18 = alloca float, align 4
  %19 = alloca float, align 4
  %20 = alloca %class.intersection, align 4
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @_ZN12intersectionC2Ev(ptr noundef nonnull align 4 dereferenceable(48) %0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 420691337, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store float 0x41F0000000000000, ptr %8, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %21

21:                                               ; preds = %78, %3
  %22 = load i32, ptr %9, align 4, !tbaa !9
  %23 = icmp slt i32 %22, 8
  br i1 %23, label %25, label %24

24:                                               ; preds = %21
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %81

25:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 12, ptr %10) #6
  call void @_ZN4vec3C2Ev(ptr noundef nonnull align 4 dereferenceable(12) %10)
  %26 = load i32, ptr %7, align 4, !tbaa !9
  %27 = call noundef i32 @_Z8triple32j(i32 noundef %26)
  store i32 %27, ptr %7, align 4, !tbaa !9
  %28 = load i32, ptr %7, align 4, !tbaa !9
  %29 = uitofp i32 %28 to float
  %30 = fdiv float %29, 0x41F0000000000000
  %31 = getelementptr inbounds %class.vec3, ptr %10, i32 0, i32 0
  store float %30, ptr %31, align 4, !tbaa !13
  %32 = load i32, ptr %7, align 4, !tbaa !9
  %33 = call noundef i32 @_Z8triple32j(i32 noundef %32)
  store i32 %33, ptr %7, align 4, !tbaa !9
  %34 = load i32, ptr %7, align 4, !tbaa !9
  %35 = uitofp i32 %34 to float
  %36 = fdiv float %35, 0x41F0000000000000
  %37 = getelementptr inbounds %class.vec3, ptr %10, i32 0, i32 1
  store float %36, ptr %37, align 4, !tbaa !15
  %38 = load i32, ptr %7, align 4, !tbaa !9
  %39 = call noundef i32 @_Z8triple32j(i32 noundef %38)
  store i32 %39, ptr %7, align 4, !tbaa !9
  %40 = load i32, ptr %7, align 4, !tbaa !9
  %41 = uitofp i32 %40 to float
  %42 = fdiv float %41, 0x41F0000000000000
  %43 = getelementptr inbounds %class.vec3, ptr %10, i32 0, i32 2
  store float %42, ptr %43, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 12, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %13) #6
  call void @_ZN4vec3C2Ef(ptr noundef nonnull align 4 dereferenceable(12) %13, float noundef 5.000000e-01)
  call void @_ZNK4vec3miERKS_(ptr dead_on_unwind writable sret(%class.vec3) align 4 %12, ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %13)
  call void @_ZNK4vec3mlEf(ptr dead_on_unwind writable sret(%class.vec3) align 4 %11, ptr noundef nonnull align 4 dereferenceable(12) %12, float noundef 2.000000e+00)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %10, ptr align 4 %11, i64 12, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #6
  %44 = load i32, ptr %7, align 4, !tbaa !9
  %45 = call noundef i32 @_Z8triple32j(i32 noundef %44)
  store i32 %45, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 48, ptr %14) #6
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN4vec3C2ERKS_(ptr noundef nonnull align 4 dereferenceable(12) %15, ptr noundef nonnull align 4 dereferenceable(12) %46)
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN4vec3C2ERKS_(ptr noundef nonnull align 4 dereferenceable(12) %16, ptr noundef nonnull align 4 dereferenceable(12) %47)
  call void @_ZN4vec3C2ERKS_(ptr noundef nonnull align 4 dereferenceable(12) %17, ptr noundef nonnull align 4 dereferenceable(12) %10)
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %48 = load i32, ptr %7, align 4, !tbaa !9
  %49 = uitofp i32 %48 to float
  %50 = fdiv float %49, 0x41F0000000000000
  %51 = fmul float 2.500000e-01, %50
  store float %51, ptr %18, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store float 0x3FA99999A0000000, ptr %19, align 4, !tbaa !11
  %52 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %19)
  %53 = load float, ptr %52, align 4, !tbaa !11
  call void @_Z6sphere4vec3S_S_f(ptr dead_on_unwind writable sret(%class.intersection) align 4 %14, ptr noundef %15, ptr noundef %16, ptr noundef %17, float noundef %53)
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  %54 = load i32, ptr %7, align 4, !tbaa !9
  %55 = call noundef i32 @_Z8triple32j(i32 noundef %54)
  store i32 %55, ptr %7, align 4, !tbaa !9
  %56 = load i32, ptr %7, align 4, !tbaa !9
  %57 = uitofp i32 %56 to float
  %58 = fdiv float %57, 0x41F0000000000000
  %59 = getelementptr inbounds %class.intersection, ptr %14, i32 0, i32 4
  %60 = getelementptr inbounds %class.material, ptr %59, i32 0, i32 1
  %61 = getelementptr inbounds %class.vec3, ptr %60, i32 0, i32 0
  store float %58, ptr %61, align 4, !tbaa !18
  %62 = load i32, ptr %7, align 4, !tbaa !9
  %63 = call noundef i32 @_Z8triple32j(i32 noundef %62)
  store i32 %63, ptr %7, align 4, !tbaa !9
  %64 = load i32, ptr %7, align 4, !tbaa !9
  %65 = uitofp i32 %64 to float
  %66 = fdiv float %65, 0x41F0000000000000
  %67 = getelementptr inbounds %class.intersection, ptr %14, i32 0, i32 4
  %68 = getelementptr inbounds %class.material, ptr %67, i32 0, i32 1
  %69 = getelementptr inbounds %class.vec3, ptr %68, i32 0, i32 1
  store float %66, ptr %69, align 4, !tbaa !22
  %70 = load i32, ptr %7, align 4, !tbaa !9
  %71 = call noundef i32 @_Z8triple32j(i32 noundef %70)
  store i32 %71, ptr %7, align 4, !tbaa !9
  %72 = load i32, ptr %7, align 4, !tbaa !9
  %73 = uitofp i32 %72 to float
  %74 = fdiv float %73, 0x41F0000000000000
  %75 = getelementptr inbounds %class.intersection, ptr %14, i32 0, i32 4
  %76 = getelementptr inbounds %class.material, ptr %75, i32 0, i32 1
  %77 = getelementptr inbounds %class.vec3, ptr %76, i32 0, i32 2
  store float %74, ptr %77, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 48, ptr %20) #6
  call void @_Z11process_hitRK12intersectionS1_(ptr dead_on_unwind writable sret(%class.intersection) align 4 %20, ptr noundef nonnull align 4 dereferenceable(48) %0, ptr noundef nonnull align 4 dereferenceable(48) %14)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %0, ptr align 4 %20, i64 48, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.end.p0(i64 48, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #6
  br label %78

78:                                               ; preds = %25
  %79 = load i32, ptr %9, align 4, !tbaa !9
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %9, align 4, !tbaa !9
  br label %21, !llvm.loop !26

81:                                               ; preds = %24
  %82 = getelementptr inbounds %class.intersection, ptr %0, i32 0, i32 4
  %83 = getelementptr inbounds %class.material, ptr %82, i32 0, i32 0
  store i8 0, ptr %83, align 4, !tbaa !28
  %84 = call noundef float @_Z11randomFloatv()
  %85 = fcmp olt float %84, 0x3FE99999A0000000
  %86 = zext i1 %85 to i64
  %87 = select i1 %85, float 5.000000e-01, float 0.000000e+00
  %88 = getelementptr inbounds %class.intersection, ptr %0, i32 0, i32 4
  %89 = getelementptr inbounds %class.material, ptr %88, i32 0, i32 2
  store float %87, ptr %89, align 4, !tbaa !29
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  ret void
}

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress 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 = { 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 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !12, i64 0}
!14 = !{!"_ZTS4vec3", !12, i64 0, !12, i64 4, !12, i64 8}
!15 = !{!14, !12, i64 4}
!16 = !{!14, !12, i64 8}
!17 = !{i64 0, i64 4, !11, i64 4, i64 4, !11, i64 8, i64 4, !11}
!18 = !{!19, !12, i64 28}
!19 = !{!"_ZTS12intersection", !12, i64 0, !12, i64 4, !20, i64 8, !14, i64 12, !21, i64 24}
!20 = !{!"bool", !7, i64 0}
!21 = !{!"_ZTS8material", !20, i64 0, !14, i64 4, !12, i64 16, !12, i64 20}
!22 = !{!19, !12, i64 32}
!23 = !{!19, !12, i64 36}
!24 = !{i64 0, i64 4, !11, i64 4, i64 4, !11, i64 8, i64 1, !25, i64 12, i64 4, !11, i64 16, i64 4, !11, i64 20, i64 4, !11, i64 24, i64 1, !25, i64 28, i64 4, !11, i64 32, i64 4, !11, i64 36, i64 4, !11, i64 40, i64 4, !11, i64 44, i64 4, !11}
!25 = !{!20, !20, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!19, !20, i64 24}
!29 = !{!19, !12, i64 40}


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

%class.vec3 = type { float, float, float }
%class.intersection = type { float, float, i8, %class.vec3, %class.material }
%class.material = type { i8, %class.vec3, float, float }

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6sphere4vec3S_S_f(ptr dead_on_unwind noalias writable sret(%class.intersection) align 4, ptr noundef, ptr noundef, ptr noundef, float noundef) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN12intersectionC2Ev(ptr noundef nonnull align 4 dereferenceable(48)) 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 nounwind uwtable
declare dso_local noundef i32 @_Z8triple32j(i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_Z11randomFloatv() local_unnamed_addr #4

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

; 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 void @_Z11process_hitRK12intersectionS1_(ptr dead_on_unwind noalias writable sret(%class.intersection) align 4, ptr noundef nonnull align 4 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(48)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5traceRK4vec3S1_(ptr dead_on_unwind noalias nonnull writable sret(%class.intersection) align 4 %0, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %2) local_unnamed_addr #0 {
  %4 = alloca %class.vec3, align 4
  %5 = alloca %class.vec3, align 4
  %6 = alloca %class.vec3, align 4
  %7 = alloca %class.vec3, align 4
  %8 = alloca %class.intersection, align 4
  %9 = alloca %class.vec3, align 4
  %10 = alloca %class.vec3, align 4
  %11 = alloca %class.vec3, align 4
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca %class.intersection, align 4
  tail call void @_ZN12intersectionC2Ev(ptr noundef nonnull align 4 dereferenceable(48) %0)
  %15 = getelementptr inbounds i8, ptr %4, i64 4
  %16 = getelementptr inbounds i8, ptr %4, i64 8
  %17 = getelementptr inbounds i8, ptr %8, i64 28
  %18 = getelementptr inbounds i8, ptr %8, i64 32
  %19 = getelementptr inbounds i8, ptr %8, i64 36
  br label %26

20:                                               ; preds = %26
  %21 = getelementptr inbounds i8, ptr %0, i64 24
  store i8 0, ptr %21, align 4, !tbaa !5
  %22 = call noundef float @_Z11randomFloatv()
  %23 = fcmp olt float %22, 0x3FE99999A0000000
  %24 = select i1 %23, float 5.000000e-01, float 0.000000e+00
  %25 = getelementptr inbounds i8, ptr %0, i64 40
  store float %24, ptr %25, align 4, !tbaa !13
  ret void

26:                                               ; preds = %3, %26
  %.019 = phi i32 [ 0, %3 ], [ %51, %26 ]
  %.01718 = phi i32 [ 420691337, %3 ], [ %48, %26 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #6
  call void @_ZN4vec3C2Ev(ptr noundef nonnull align 4 dereferenceable(12) %4)
  %27 = call noundef i32 @_Z8triple32j(i32 noundef %.01718)
  %28 = uitofp i32 %27 to float
  %29 = fmul float %28, 0x3DF0000000000000
  store float %29, ptr %4, align 4, !tbaa !14
  %30 = call noundef i32 @_Z8triple32j(i32 noundef %27)
  %31 = uitofp i32 %30 to float
  %32 = fmul float %31, 0x3DF0000000000000
  store float %32, ptr %15, align 4, !tbaa !15
  %33 = call noundef i32 @_Z8triple32j(i32 noundef %30)
  %34 = uitofp i32 %33 to float
  %35 = fmul float %34, 0x3DF0000000000000
  store float %35, ptr %16, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #6
  call void @_ZN4vec3C2Ef(ptr noundef nonnull align 4 dereferenceable(12) %7, float noundef 5.000000e-01)
  call void @_ZNK4vec3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.vec3) align 4 %6, ptr noundef nonnull align 4 dereferenceable(12) %4, ptr noundef nonnull align 4 dereferenceable(12) %7)
  call void @_ZNK4vec3mlEf(ptr dead_on_unwind nonnull writable sret(%class.vec3) align 4 %5, ptr noundef nonnull align 4 dereferenceable(12) %6, float noundef 2.000000e+00)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %4, ptr noundef nonnull align 4 dereferenceable(12) %5, i64 12, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #6
  %36 = call noundef i32 @_Z8triple32j(i32 noundef %33)
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %8) #6
  call void @_ZN4vec3C2ERKS_(ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %1)
  call void @_ZN4vec3C2ERKS_(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %2)
  call void @_ZN4vec3C2ERKS_(ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef nonnull align 4 dereferenceable(12) %4)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #6
  %37 = uitofp i32 %36 to float
  %38 = fmul float %37, 0x3DF0000000000000
  %39 = fmul float %38, 2.500000e-01
  store float %39, ptr %12, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #6
  store float 0x3FA99999A0000000, ptr %13, align 4, !tbaa !18
  %40 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %41 = load float, ptr %40, align 4, !tbaa !18
  call void @_Z6sphere4vec3S_S_f(ptr dead_on_unwind nonnull writable sret(%class.intersection) align 4 %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11, float noundef %41)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #6
  %42 = call noundef i32 @_Z8triple32j(i32 noundef %36)
  %43 = uitofp i32 %42 to float
  %44 = fmul float %43, 0x3DF0000000000000
  store float %44, ptr %17, align 4, !tbaa !19
  %45 = call noundef i32 @_Z8triple32j(i32 noundef %42)
  %46 = uitofp i32 %45 to float
  %47 = fmul float %46, 0x3DF0000000000000
  store float %47, ptr %18, align 4, !tbaa !20
  %48 = call noundef i32 @_Z8triple32j(i32 noundef %45)
  %49 = uitofp i32 %48 to float
  %50 = fmul float %49, 0x3DF0000000000000
  store float %50, ptr %19, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %14) #6
  call void @_Z11process_hitRK12intersectionS1_(ptr dead_on_unwind nonnull writable sret(%class.intersection) align 4 %14, ptr noundef nonnull align 4 dereferenceable(48) %0, ptr noundef nonnull align 4 dereferenceable(48) %8)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(48) %0, ptr noundef nonnull align 4 dereferenceable(48) %14, i64 48, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #6
  %51 = add nuw nsw i32 %.019, 1
  %exitcond.not = icmp eq i32 %51, 8
  br i1 %exitcond.not, label %20, label %26, !llvm.loop !24
}

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress 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 = { 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 = { 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, !10, i64 24}
!6 = !{!"_ZTS12intersection", !7, i64 0, !7, i64 4, !10, i64 8, !11, i64 12, !12, i64 24}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"_ZTS4vec3", !7, i64 0, !7, i64 4, !7, i64 8}
!12 = !{!"_ZTS8material", !10, i64 0, !11, i64 4, !7, i64 16, !7, i64 20}
!13 = !{!6, !7, i64 40}
!14 = !{!11, !7, i64 0}
!15 = !{!11, !7, i64 4}
!16 = !{!11, !7, i64 8}
!17 = !{i64 0, i64 4, !18, i64 4, i64 4, !18, i64 8, i64 4, !18}
!18 = !{!7, !7, i64 0}
!19 = !{!6, !7, i64 28}
!20 = !{!6, !7, i64 32}
!21 = !{!6, !7, i64 36}
!22 = !{i64 0, i64 4, !18, i64 4, i64 4, !18, i64 8, i64 1, !23, i64 12, i64 4, !18, i64 16, i64 4, !18, i64 20, i64 4, !18, i64 24, i64 1, !23, i64 28, i64 4, !18, i64 32, i64 4, !18, i64 36, i64 4, !18, i64 40, i64 4, !18, i64 44, i64 4, !18}
!23 = !{!10, !10, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass