; LLVM IR from ysyesilyurt/ComputerGraphics :: RayTracing/Camera.ll (ZNK6Camera13getPrimaryRayEii)

; 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.Ray = type { %struct.Vector3f, %struct.Vector3f }
%struct.Vector3f = type { %union.anon, %union.anon.0, %union.anon.1 }
%union.anon = type { float }
%union.anon.0 = type { float }
%union.anon.1 = type { float }
%class.Camera = type { [32 x i8], i32, %struct.ImagePlane, %struct.Vector3f, %struct.Vector3f, %struct.Vector3f, %struct.Vector3f }
%struct.ImagePlane = type { float, float, float, float, float, i32, i32 }

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK6Camera13getPrimaryRayEii(ptr dead_on_unwind noalias writable sret(%class.Ray) align 4 %0, ptr noundef nonnull align 4 dereferenceable(112) %1, i32 noundef %2, i32 noundef %3) #1 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %struct.Vector3f, align 4
  %9 = alloca %struct.Vector3f, align 4
  %10 = alloca %struct.Vector3f, align 4
  %11 = alloca { <2 x float>, float }, align 8
  %12 = alloca { <2 x float>, float }, align 4
  %13 = alloca { <2 x float>, float }, align 8
  %14 = alloca %struct.Vector3f, align 4
  %15 = alloca %struct.Vector3f, align 4
  %16 = alloca %struct.Vector3f, align 4
  %17 = alloca { <2 x float>, float }, align 8
  %18 = alloca { <2 x float>, float }, align 4
  %19 = alloca { <2 x float>, float }, align 8
  %20 = alloca %struct.Vector3f, align 4
  %21 = alloca { <2 x float>, float }, align 8
  %22 = alloca { <2 x float>, float }, align 4
  %23 = alloca { <2 x float>, float }, align 8
  %24 = alloca float, align 4
  %25 = alloca float, align 4
  %26 = alloca %struct.Vector3f, align 4
  %27 = alloca %struct.Vector3f, align 4
  %28 = alloca %struct.Vector3f, align 4
  %29 = alloca { <2 x float>, float }, align 8
  %30 = alloca { <2 x float>, float }, align 4
  %31 = alloca { <2 x float>, float }, align 8
  %32 = alloca %struct.Vector3f, align 4
  %33 = alloca { <2 x float>, float }, align 8
  %34 = alloca { <2 x float>, float }, align 4
  %35 = alloca { <2 x float>, float }, align 8
  %36 = alloca %struct.Vector3f, align 4
  %37 = alloca %struct.Vector3f, align 4
  %38 = alloca %struct.Vector3f, align 4
  %39 = alloca { <2 x float>, float }, align 4
  %40 = alloca { <2 x float>, float }, align 8
  %41 = alloca { <2 x float>, float }, align 4
  %42 = alloca { <2 x float>, float }, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  store i32 %3, ptr %7, align 4, !tbaa !9
  %43 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr %8) #7
  %44 = getelementptr inbounds %class.Camera, ptr %43, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 4 %44, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.start.p0(i64 12, ptr %9) #7
  %45 = getelementptr inbounds %class.Camera, ptr %43, i32 0, i32 4
  %46 = getelementptr inbounds %class.Camera, ptr %43, i32 0, i32 2
  %47 = getelementptr inbounds %struct.ImagePlane, ptr %46, i32 0, i32 4
  %48 = load float, ptr %47, align 4, !tbaa !13
  %49 = call { <2 x float>, float } @_ZNK8Vector3fmlEf(ptr noundef nonnull align 4 dereferenceable(12) %45, float noundef %48)
  store { <2 x float>, float } %49, ptr %11, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %10, ptr align 8 %11, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 4 %10, i64 12, i1 false)
  %50 = getelementptr inbounds { <2 x float>, float }, ptr %12, i32 0, i32 0
  %51 = load <2 x float>, ptr %50, align 4
  %52 = getelementptr inbounds { <2 x float>, float }, ptr %12, i32 0, i32 1
  %53 = load float, ptr %52, align 4
  %54 = call { <2 x float>, float } @_ZNK8Vector3fplES_(ptr noundef nonnull align 4 dereferenceable(12) %8, <2 x float> %51, float %53)
  store { <2 x float>, float } %54, ptr %13, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %9, ptr align 8 %13, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %15) #7
  %55 = getelementptr inbounds %class.Camera, ptr %43, i32 0, i32 6
  %56 = getelementptr inbounds %class.Camera, ptr %43, i32 0, i32 2
  %57 = getelementptr inbounds %struct.ImagePlane, ptr %56, i32 0, i32 0
  %58 = load float, ptr %57, align 4, !tbaa !18
  %59 = call { <2 x float>, float } @_ZNK8Vector3fmlEf(ptr noundef nonnull align 4 dereferenceable(12) %55, float noundef %58)
  store { <2 x float>, float } %59, ptr %17, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 8 %17, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 4 %16, i64 12, i1 false)
  %60 = getelementptr inbounds { <2 x float>, float }, ptr %18, i32 0, i32 0
  %61 = load <2 x float>, ptr %60, align 4
  %62 = getelementptr inbounds { <2 x float>, float }, ptr %18, i32 0, i32 1
  %63 = load float, ptr %62, align 4
  %64 = call { <2 x float>, float } @_ZNK8Vector3fplES_(ptr noundef nonnull align 4 dereferenceable(12) %9, <2 x float> %61, float %63)
  store { <2 x float>, float } %64, ptr %19, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %15, ptr align 8 %19, i64 12, i1 false)
  %65 = getelementptr inbounds %class.Camera, ptr %43, i32 0, i32 5
  %66 = getelementptr inbounds %class.Camera, ptr %43, i32 0, i32 2
  %67 = getelementptr inbounds %struct.ImagePlane, ptr %66, i32 0, i32 3
  %68 = load float, ptr %67, align 4, !tbaa !19
  %69 = call { <2 x float>, float } @_ZNK8Vector3fmlEf(ptr noundef nonnull align 4 dereferenceable(12) %65, float noundef %68)
  store { <2 x float>, float } %69, ptr %21, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 8 %21, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 4 %20, i64 12, i1 false)
  %70 = getelementptr inbounds { <2 x float>, float }, ptr %22, i32 0, i32 0
  %71 = load <2 x float>, ptr %70, align 4
  %72 = getelementptr inbounds { <2 x float>, float }, ptr %22, i32 0, i32 1
  %73 = load float, ptr %72, align 4
  %74 = call { <2 x float>, float } @_ZNK8Vector3fplES_(ptr noundef nonnull align 4 dereferenceable(12) %15, <2 x float> %71, float %73)
  store { <2 x float>, float } %74, ptr %23, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 8 %23, i64 12, i1 false)
  call void @llvm.lifetime.end.p0(i64 12, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  %75 = getelementptr inbounds %class.Camera, ptr %43, i32 0, i32 2
  %76 = getelementptr inbounds %struct.ImagePlane, ptr %75, i32 0, i32 1
  %77 = load float, ptr %76, align 4, !tbaa !20
  %78 = getelementptr inbounds %class.Camera, ptr %43, i32 0, i32 2
  %79 = getelementptr inbounds %struct.ImagePlane, ptr %78, i32 0, i32 0
  %80 = load float, ptr %79, align 4, !tbaa !18
  %81 = fsub float %77, %80
  %82 = fpext float %81 to double
  %83 = load i32, ptr %7, align 4, !tbaa !9
  %84 = sitofp i32 %83 to double
  %85 = fadd double %84, 5.000000e-01
  %86 = fmul double %82, %85
  %87 = getelementptr inbounds %class.Camera, ptr %43, i32 0, i32 2
  %88 = getelementptr inbounds %struct.ImagePlane, ptr %87, i32 0, i32 5
  %89 = load i32, ptr %88, align 4, !tbaa !21
  %90 = sitofp i32 %89 to double
  %91 = fdiv double %86, %90
  %92 = fptrunc double %91 to float
  store float %92, ptr %24, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  %93 = getelementptr inbounds %class.Camera, ptr %43, i32 0, i32 2
  %94 = getelementptr inbounds %struct.ImagePlane, ptr %93, i32 0, i32 3
  %95 = load float, ptr %94, align 4, !tbaa !19
  %96 = getelementptr inbounds %class.Camera, ptr %43, i32 0, i32 2
  %97 = getelementptr inbounds %struct.ImagePlane, ptr %96, i32 0, i32 2
  %98 = load float, ptr %97, align 4, !tbaa !23
  %99 = fsub float %95, %98
  %100 = fpext float %99 to double
  %101 = load i32, ptr %6, align 4, !tbaa !9
  %102 = sitofp i32 %101 to double
  %103 = fadd double %102, 5.000000e-01
  %104 = fmul double %100, %103
  %105 = getelementptr inbounds %class.Camera, ptr %43, i32 0, i32 2
  %106 = getelementptr inbounds %struct.ImagePlane, ptr %105, i32 0, i32 6
  %107 = load i32, ptr %106, align 4, !tbaa !24
  %108 = sitofp i32 %107 to double
  %109 = fdiv double %104, %108
  %110 = fptrunc double %109 to float
  store float %110, ptr %25, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 12, ptr %26) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %27) #7
  %111 = getelementptr inbounds %class.Camera, ptr %43, i32 0, i32 6
  %112 = load float, ptr %24, align 4, !tbaa !22
  %113 = call { <2 x float>, float } @_ZNK8Vector3fmlEf(ptr noundef nonnull align 4 dereferenceable(12) %111, float noundef %112)
  store { <2 x float>, float } %113, ptr %29, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %28, ptr align 8 %29, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %30, ptr align 4 %28, i64 12, i1 false)
  %114 = getelementptr inbounds { <2 x float>, float }, ptr %30, i32 0, i32 0
  %115 = load <2 x float>, ptr %114, align 4
  %116 = getelementptr inbounds { <2 x float>, float }, ptr %30, i32 0, i32 1
  %117 = load float, ptr %116, align 4
  %118 = call { <2 x float>, float } @_ZNK8Vector3fplES_(ptr noundef nonnull align 4 dereferenceable(12) %14, <2 x float> %115, float %117)
  store { <2 x float>, float } %118, ptr %31, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %27, ptr align 8 %31, i64 12, i1 false)
  %119 = getelementptr inbounds %class.Camera, ptr %43, i32 0, i32 5
  %120 = load float, ptr %25, align 4, !tbaa !22
  %121 = call { <2 x float>, float } @_ZNK8Vector3fmlEf(ptr noundef nonnull align 4 dereferenceable(12) %119, float noundef %120)
  store { <2 x float>, float } %121, ptr %33, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %32, ptr align 8 %33, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %34, ptr align 4 %32, i64 12, i1 false)
  %122 = getelementptr inbounds { <2 x float>, float }, ptr %34, i32 0, i32 0
  %123 = load <2 x float>, ptr %122, align 4
  %124 = getelementptr inbounds { <2 x float>, float }, ptr %34, i32 0, i32 1
  %125 = load float, ptr %124, align 4
  %126 = call { <2 x float>, float } @_ZNK8Vector3fmiES_(ptr noundef nonnull align 4 dereferenceable(12) %27, <2 x float> %123, float %125)
  store { <2 x float>, float } %126, ptr %35, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %26, ptr align 8 %35, i64 12, i1 false)
  call void @llvm.lifetime.end.p0(i64 12, ptr %27) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %36) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %38, ptr align 4 %8, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %39, ptr align 4 %38, i64 12, i1 false)
  %127 = getelementptr inbounds { <2 x float>, float }, ptr %39, i32 0, i32 0
  %128 = load <2 x float>, ptr %127, align 4
  %129 = getelementptr inbounds { <2 x float>, float }, ptr %39, i32 0, i32 1
  %130 = load float, ptr %129, align 4
  %131 = call { <2 x float>, float } @_ZNK8Vector3fmiES_(ptr noundef nonnull align 4 dereferenceable(12) %26, <2 x float> %128, float %130)
  store { <2 x float>, float } %131, ptr %40, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %37, ptr align 8 %40, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %41, ptr align 4 %37, i64 12, i1 false)
  %132 = getelementptr inbounds { <2 x float>, float }, ptr %41, i32 0, i32 0
  %133 = load <2 x float>, ptr %132, align 4
  %134 = getelementptr inbounds { <2 x float>, float }, ptr %41, i32 0, i32 1
  %135 = load float, ptr %134, align 4
  %136 = call { <2 x float>, float } @_Z9normalize8Vector3f(<2 x float> %133, float %135)
  store { <2 x float>, float } %136, ptr %42, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %36, ptr align 8 %42, i64 12, i1 false)
  %137 = getelementptr inbounds %class.Camera, ptr %43, i32 0, i32 3
  call void @_ZN3RayC1ERK8Vector3fS2_(ptr noundef nonnull align 4 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(12) %137, ptr noundef nonnull align 4 dereferenceable(12) %36)
  call void @llvm.lifetime.end.p0(i64 12, ptr %36) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %8) #7
  ret void
}

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

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

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

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

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

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

declare void @_ZN3RayC1ERK8Vector3fS2_(ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #6

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{i64 0, i64 4, !12, i64 4, i64 4, !12, i64 8, i64 4, !12}
!12 = !{!7, !7, i64 0}
!13 = !{!14, !16, i64 52}
!14 = !{!"_ZTS6Camera", !7, i64 0, !10, i64 32, !15, i64 36, !17, i64 64, !17, i64 76, !17, i64 88, !17, i64 100}
!15 = !{!"_ZTS10ImagePlane", !16, i64 0, !16, i64 4, !16, i64 8, !16, i64 12, !16, i64 16, !10, i64 20, !10, i64 24}
!16 = !{!"float", !7, i64 0}
!17 = !{!"_ZTS8Vector3f", !7, i64 0, !7, i64 4, !7, i64 8}
!18 = !{!14, !16, i64 36}
!19 = !{!14, !16, i64 48}
!20 = !{!14, !16, i64 40}
!21 = !{!14, !10, i64 56}
!22 = !{!16, !16, i64 0}
!23 = !{!14, !16, i64 44}
!24 = !{!14, !10, i64 60}


; 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.Ray = type { %struct.Vector3f, %struct.Vector3f }
%struct.Vector3f = type { %union.anon, %union.anon.0, %union.anon.1 }
%union.anon = type { float }
%union.anon.0 = type { float }
%union.anon.1 = type { float }

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK6Camera13getPrimaryRayEii(ptr dead_on_unwind noalias writable sret(%class.Ray) align 4 %0, ptr noundef nonnull align 4 dereferenceable(112) %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #1 align 2 {
  %5 = alloca %struct.Vector3f, align 8
  %6 = alloca %struct.Vector3f, align 8
  %7 = alloca %struct.Vector3f, align 8
  %8 = alloca %struct.Vector3f, align 8
  %9 = alloca %struct.Vector3f, align 8
  %10 = alloca %struct.Vector3f, align 8
  %11 = alloca %struct.Vector3f, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #7
  %12 = getelementptr inbounds i8, ptr %1, i64 64
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %12, i64 12, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #7
  %13 = getelementptr inbounds i8, ptr %1, i64 76
  %14 = getelementptr inbounds i8, ptr %1, i64 36
  %15 = getelementptr inbounds i8, ptr %1, i64 52
  %16 = load float, ptr %15, align 4, !tbaa !9
  %17 = tail call { <2 x float>, float } @_ZNK8Vector3fmlEf(ptr noundef nonnull align 4 dereferenceable(12) %13, float noundef %16)
  %.fca.0.extract68 = extractvalue { <2 x float>, float } %17, 0
  %.fca.1.extract69 = extractvalue { <2 x float>, float } %17, 1
  %18 = call { <2 x float>, float } @_ZNK8Vector3fplES_(ptr noundef nonnull align 4 dereferenceable(12) %5, <2 x float> %.fca.0.extract68, float %.fca.1.extract69)
  %.fca.0.extract62 = extractvalue { <2 x float>, float } %18, 0
  %.fca.1.extract63 = extractvalue { <2 x float>, float } %18, 1
  store <2 x float> %.fca.0.extract62, ptr %6, align 8
  %.sroa.265.0..sroa_idx = getelementptr inbounds i8, ptr %6, i64 8
  store float %.fca.1.extract63, ptr %.sroa.265.0..sroa_idx, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #7
  %19 = getelementptr inbounds i8, ptr %1, i64 100
  %20 = load float, ptr %14, align 4, !tbaa !15
  %21 = call { <2 x float>, float } @_ZNK8Vector3fmlEf(ptr noundef nonnull align 4 dereferenceable(12) %19, float noundef %20)
  %.fca.0.extract56 = extractvalue { <2 x float>, float } %21, 0
  %.fca.1.extract57 = extractvalue { <2 x float>, float } %21, 1
  %22 = call { <2 x float>, float } @_ZNK8Vector3fplES_(ptr noundef nonnull align 4 dereferenceable(12) %6, <2 x float> %.fca.0.extract56, float %.fca.1.extract57)
  %.fca.0.extract50 = extractvalue { <2 x float>, float } %22, 0
  %.fca.1.extract51 = extractvalue { <2 x float>, float } %22, 1
  store <2 x float> %.fca.0.extract50, ptr %8, align 8
  %.sroa.253.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 8
  store float %.fca.1.extract51, ptr %.sroa.253.0..sroa_idx, align 8
  %23 = getelementptr inbounds i8, ptr %1, i64 88
  %24 = getelementptr inbounds i8, ptr %1, i64 48
  %25 = load float, ptr %24, align 4, !tbaa !16
  %26 = call { <2 x float>, float } @_ZNK8Vector3fmlEf(ptr noundef nonnull align 4 dereferenceable(12) %23, float noundef %25)
  %.fca.0.extract44 = extractvalue { <2 x float>, float } %26, 0
  %.fca.1.extract45 = extractvalue { <2 x float>, float } %26, 1
  %27 = call { <2 x float>, float } @_ZNK8Vector3fplES_(ptr noundef nonnull align 4 dereferenceable(12) %8, <2 x float> %.fca.0.extract44, float %.fca.1.extract45)
  %.fca.0.extract38 = extractvalue { <2 x float>, float } %27, 0
  %.fca.1.extract39 = extractvalue { <2 x float>, float } %27, 1
  store <2 x float> %.fca.0.extract38, ptr %7, align 8
  %.sroa.241.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 8
  store float %.fca.1.extract39, ptr %.sroa.241.0..sroa_idx, align 8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #7
  %28 = getelementptr inbounds i8, ptr %1, i64 40
  %29 = load float, ptr %28, align 4, !tbaa !17
  %30 = load float, ptr %14, align 4, !tbaa !15
  %31 = fsub float %29, %30
  %32 = fpext float %31 to double
  %33 = sitofp i32 %3 to double
  %34 = fadd double %33, 5.000000e-01
  %35 = fmul double %34, %32
  %36 = getelementptr inbounds i8, ptr %1, i64 56
  %37 = load i32, ptr %36, align 4, !tbaa !18
  %38 = sitofp i32 %37 to double
  %39 = fdiv double %35, %38
  %40 = fptrunc double %39 to float
  %41 = load float, ptr %24, align 4, !tbaa !16
  %42 = getelementptr inbounds i8, ptr %1, i64 44
  %43 = load float, ptr %42, align 4, !tbaa !19
  %44 = fsub float %41, %43
  %45 = fpext float %44 to double
  %46 = sitofp i32 %2 to double
  %47 = fadd double %46, 5.000000e-01
  %48 = fmul double %47, %45
  %49 = getelementptr inbounds i8, ptr %1, i64 60
  %50 = load i32, ptr %49, align 4, !tbaa !20
  %51 = sitofp i32 %50 to double
  %52 = fdiv double %48, %51
  %53 = fptrunc double %52 to float
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #7
  %54 = call { <2 x float>, float } @_ZNK8Vector3fmlEf(ptr noundef nonnull align 4 dereferenceable(12) %19, float noundef %40)
  %.fca.0.extract31 = extractvalue { <2 x float>, float } %54, 0
  %.fca.1.extract32 = extractvalue { <2 x float>, float } %54, 1
  %55 = call { <2 x float>, float } @_ZNK8Vector3fplES_(ptr noundef nonnull align 4 dereferenceable(12) %7, <2 x float> %.fca.0.extract31, float %.fca.1.extract32)
  %.fca.0.extract25 = extractvalue { <2 x float>, float } %55, 0
  %.fca.1.extract26 = extractvalue { <2 x float>, float } %55, 1
  store <2 x float> %.fca.0.extract25, ptr %10, align 8
  %.sroa.228.0..sroa_idx = getelementptr inbounds i8, ptr %10, i64 8
  store float %.fca.1.extract26, ptr %.sroa.228.0..sroa_idx, align 8
  %56 = call { <2 x float>, float } @_ZNK8Vector3fmlEf(ptr noundef nonnull align 4 dereferenceable(12) %23, float noundef %53)
  %.fca.0.extract19 = extractvalue { <2 x float>, float } %56, 0
  %.fca.1.extract20 = extractvalue { <2 x float>, float } %56, 1
  %57 = call { <2 x float>, float } @_ZNK8Vector3fmiES_(ptr noundef nonnull align 4 dereferenceable(12) %10, <2 x float> %.fca.0.extract19, float %.fca.1.extract20)
  %.fca.0.extract13 = extractvalue { <2 x float>, float } %57, 0
  %.fca.1.extract14 = extractvalue { <2 x float>, float } %57, 1
  store <2 x float> %.fca.0.extract13, ptr %9, align 8
  %.sroa.216.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 8
  store float %.fca.1.extract14, ptr %.sroa.216.0..sroa_idx, align 8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #7
  %.sroa.09.0.copyload = load <2 x float>, ptr %5, align 8
  %.sroa.210.0..sroa_idx = getelementptr inbounds i8, ptr %5, i64 8
  %.sroa.210.0.copyload = load float, ptr %.sroa.210.0..sroa_idx, align 8, !tbaa !6
  %58 = call { <2 x float>, float } @_ZNK8Vector3fmiES_(ptr noundef nonnull align 4 dereferenceable(12) %9, <2 x float> %.sroa.09.0.copyload, float %.sroa.210.0.copyload)
  %.fca.0.extract3 = extractvalue { <2 x float>, float } %58, 0
  %.fca.1.extract4 = extractvalue { <2 x float>, float } %58, 1
  %59 = call { <2 x float>, float } @_Z9normalize8Vector3f(<2 x float> %.fca.0.extract3, float %.fca.1.extract4)
  %.fca.0.extract = extractvalue { <2 x float>, float } %59, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %59, 1
  store <2 x float> %.fca.0.extract, ptr %11, align 8
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %11, i64 8
  store float %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 8
  call void @_ZN3RayC1ERK8Vector3fS2_(ptr noundef nonnull align 4 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(12) %12, ptr noundef nonnull align 4 dereferenceable(12) %11)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #7
  ret void
}

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

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

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

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

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

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

declare void @_ZN3RayC1ERK8Vector3fS2_(ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #6

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{i64 0, i64 4, !6, i64 4, i64 4, !6, i64 8, i64 4, !6}
!6 = !{!7, !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !13, i64 52}
!10 = !{!"_ZTS6Camera", !7, i64 0, !11, i64 32, !12, i64 36, !14, i64 64, !14, i64 76, !14, i64 88, !14, i64 100}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTS10ImagePlane", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !11, i64 20, !11, i64 24}
!13 = !{!"float", !7, i64 0}
!14 = !{!"_ZTS8Vector3f", !7, i64 0, !7, i64 4, !7, i64 8}
!15 = !{!10, !13, i64 36}
!16 = !{!10, !13, i64 48}
!17 = !{!10, !13, i64 40}
!18 = !{!10, !11, i64 56}
!19 = !{!10, !13, i64 44}
!20 = !{!10, !11, i64 60}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,TailCallElimPass