; LLVM IR from aap/librw :: tools/playground/camera.ll (ZN6Camera5orbitEff)

; 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.rw::V3d" = type { float, float, float }
%"struct.rw::Quat" = type { float, float, float, float }
%class.Camera = type { ptr, %"struct.rw::V3d", %"struct.rw::V3d", %"struct.rw::V3d", %"struct.rw::V3d", float, float, float, float }

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

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

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

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

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

declare { <2 x float>, float } @_ZN2rw5crossERKNS_3V3dES2_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #3

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Camera5orbitEff(ptr noundef nonnull align 8 dereferenceable(72) %0, float noundef %1, float noundef %2) #4 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca float, align 4
  %6 = alloca float, align 4
  %7 = alloca %"struct.rw::V3d", align 4
  %8 = alloca { <2 x float>, float }, align 8
  %9 = alloca %"struct.rw::Quat", align 4
  %10 = alloca %"struct.rw::V3d", align 4
  %11 = alloca { <2 x float>, float }, align 8
  %12 = alloca %"struct.rw::V3d", align 4
  %13 = alloca { <2 x float>, float }, align 8
  %14 = alloca %"struct.rw::V3d", align 4
  %15 = alloca { <2 x float>, float }, align 8
  %16 = alloca %"struct.rw::V3d", align 4
  %17 = alloca %"struct.rw::V3d", align 4
  %18 = alloca { <2 x float>, float }, align 8
  %19 = alloca { <2 x float>, float }, align 8
  %20 = alloca %"struct.rw::Quat", align 4
  %21 = alloca %"struct.rw::V3d", align 4
  %22 = alloca { <2 x float>, float }, align 8
  %23 = alloca %"struct.rw::V3d", align 4
  %24 = alloca %"struct.rw::V3d", align 4
  %25 = alloca { <2 x float>, float }, align 8
  %26 = alloca { <2 x float>, float }, align 8
  %27 = alloca %"struct.rw::V3d", align 4
  %28 = alloca { <2 x float>, float }, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store float %1, ptr %5, align 4, !tbaa !9
  store float %2, ptr %6, align 4, !tbaa !9
  %29 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr %7) #6
  %30 = getelementptr inbounds %class.Camera, ptr %29, i32 0, i32 2
  %31 = getelementptr inbounds %class.Camera, ptr %29, i32 0, i32 1
  %32 = call { <2 x float>, float } @_ZN2rw3subERKNS_3V3dES2_(ptr noundef nonnull align 4 dereferenceable(12) %30, ptr noundef nonnull align 4 dereferenceable(12) %31)
  store { <2 x float>, float } %32, ptr %8, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %7, ptr align 8 %8, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #6
  %33 = load float, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 12, ptr %10) #6
  %34 = call { <2 x float>, float } @_ZN2rw7makeV3dEfff(float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 1.000000e+00)
  store { <2 x float>, float } %34, ptr %11, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %10, ptr align 8 %11, i64 12, i1 false)
  %35 = call { <2 x float>, <2 x float> } @_ZN2rw4Quat8rotationEfRKNS_3V3dE(float noundef %33, ptr noundef nonnull align 4 dereferenceable(12) %10)
  %36 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 0
  %37 = extractvalue { <2 x float>, <2 x float> } %35, 0
  store <2 x float> %37, ptr %36, align 4
  %38 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 1
  %39 = extractvalue { <2 x float>, <2 x float> } %35, 1
  store <2 x float> %39, ptr %38, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #6
  %40 = call { <2 x float>, float } @_ZN2rw6rotateERKNS_3V3dERKNS_4QuatE(ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef nonnull align 4 dereferenceable(16) %9)
  store { <2 x float>, float } %40, ptr %13, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 8 %13, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %7, ptr align 4 %12, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %14) #6
  %41 = getelementptr inbounds %class.Camera, ptr %29, i32 0, i32 4
  %42 = call { <2 x float>, float } @_ZN2rw6rotateERKNS_3V3dERKNS_4QuatE(ptr noundef nonnull align 4 dereferenceable(12) %41, ptr noundef nonnull align 4 dereferenceable(16) %9)
  store { <2 x float>, float } %42, ptr %15, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 8 %15, i64 12, i1 false)
  %43 = getelementptr inbounds %class.Camera, ptr %29, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %43, ptr align 4 %14, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 12, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %17) #6
  %44 = getelementptr inbounds %class.Camera, ptr %29, i32 0, i32 4
  %45 = call { <2 x float>, float } @_ZN2rw5crossERKNS_3V3dES2_(ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef nonnull align 4 dereferenceable(12) %44)
  store { <2 x float>, float } %45, ptr %18, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %17, ptr align 8 %18, i64 12, i1 false)
  %46 = call { <2 x float>, float } @_ZN2rw9normalizeERKNS_3V3dE(ptr noundef nonnull align 4 dereferenceable(12) %17)
  store { <2 x float>, float } %46, ptr %19, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 8 %19, i64 12, i1 false)
  call void @llvm.lifetime.end.p0(i64 12, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #6
  %47 = load float, ptr %6, align 4, !tbaa !9
  %48 = fneg float %47
  %49 = call { <2 x float>, <2 x float> } @_ZN2rw4Quat8rotationEfRKNS_3V3dE(float noundef %48, ptr noundef nonnull align 4 dereferenceable(12) %16)
  %50 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %20, i32 0, i32 0
  %51 = extractvalue { <2 x float>, <2 x float> } %49, 0
  store <2 x float> %51, ptr %50, align 4
  %52 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %20, i32 0, i32 1
  %53 = extractvalue { <2 x float>, <2 x float> } %49, 1
  store <2 x float> %53, ptr %52, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %9, ptr align 4 %20, i64 16, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %21) #6
  %54 = call { <2 x float>, float } @_ZN2rw6rotateERKNS_3V3dERKNS_4QuatE(ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef nonnull align 4 dereferenceable(16) %9)
  store { <2 x float>, float } %54, ptr %22, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 8 %22, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %7, ptr align 4 %21, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 12, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %23) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %24) #6
  %55 = call { <2 x float>, float } @_ZN2rw5crossERKNS_3V3dES2_(ptr noundef nonnull align 4 dereferenceable(12) %16, ptr noundef nonnull align 4 dereferenceable(12) %7)
  store { <2 x float>, float } %55, ptr %25, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %24, ptr align 8 %25, i64 12, i1 false)
  %56 = call { <2 x float>, float } @_ZN2rw9normalizeERKNS_3V3dE(ptr noundef nonnull align 4 dereferenceable(12) %24)
  store { <2 x float>, float } %56, ptr %26, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %23, ptr align 8 %26, i64 12, i1 false)
  %57 = getelementptr inbounds %class.Camera, ptr %29, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %57, ptr align 4 %23, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %23) #6
  %58 = getelementptr inbounds %class.Camera, ptr %29, i32 0, i32 4
  %59 = getelementptr inbounds %"struct.rw::V3d", ptr %58, i32 0, i32 2
  %60 = load float, ptr %59, align 4, !tbaa !13
  %61 = fpext float %60 to double
  %62 = fcmp oge double %61, 0.000000e+00
  br i1 %62, label %63, label %66

63:                                               ; preds = %3
  %64 = getelementptr inbounds %class.Camera, ptr %29, i32 0, i32 3
  %65 = getelementptr inbounds %"struct.rw::V3d", ptr %64, i32 0, i32 2
  store float 1.000000e+00, ptr %65, align 8, !tbaa !16
  br label %69

66:                                               ; preds = %3
  %67 = getelementptr inbounds %class.Camera, ptr %29, i32 0, i32 3
  %68 = getelementptr inbounds %"struct.rw::V3d", ptr %67, i32 0, i32 2
  store float -1.000000e+00, ptr %68, align 8, !tbaa !16
  br label %69

69:                                               ; preds = %66, %63
  call void @llvm.lifetime.start.p0(i64 12, ptr %27) #6
  %70 = getelementptr inbounds %class.Camera, ptr %29, i32 0, i32 2
  %71 = call { <2 x float>, float } @_ZN2rw3subERKNS_3V3dES2_(ptr noundef nonnull align 4 dereferenceable(12) %70, ptr noundef nonnull align 4 dereferenceable(12) %7)
  store { <2 x float>, float } %71, ptr %28, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %27, ptr align 8 %28, i64 12, i1 false)
  %72 = getelementptr inbounds %class.Camera, ptr %29, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %72, ptr align 4 %27, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 12, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %7) #6
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "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 uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = !{!"float", !7, i64 0}
!11 = !{i64 0, i64 4, !9, i64 4, i64 4, !9, i64 8, i64 4, !9}
!12 = !{i64 0, i64 4, !9, i64 4, i64 4, !9, i64 8, i64 4, !9, i64 12, i64 4, !9}
!13 = !{!14, !10, i64 52}
!14 = !{!"_ZTS6Camera", !6, i64 0, !15, i64 8, !15, i64 20, !15, i64 32, !15, i64 44, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68}
!15 = !{!"_ZTSN2rw3V3dE", !10, i64 0, !10, i64 4, !10, i64 8}
!16 = !{!14, !10, 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"

%"struct.rw::V3d" = type { float, float, float }
%"struct.rw::Quat" = type { float, float, float, float }

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

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

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

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

declare { <2 x float>, float } @_ZN2rw5crossERKNS_3V3dES2_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Camera5orbitEff(ptr noundef nonnull align 8 dereferenceable(72) %0, float noundef %1, float noundef %2) local_unnamed_addr #3 align 2 {
  %4 = alloca %"struct.rw::V3d", align 8
  %5 = alloca %"struct.rw::Quat", align 8
  %6 = alloca %"struct.rw::V3d", align 8
  %7 = alloca %"struct.rw::V3d", align 8
  %8 = alloca %"struct.rw::V3d", align 8
  %9 = alloca %"struct.rw::V3d", align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #5
  %10 = getelementptr inbounds i8, ptr %0, i64 20
  %11 = getelementptr inbounds i8, ptr %0, i64 8
  %12 = tail call { <2 x float>, float } @_ZN2rw3subERKNS_3V3dES2_(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %11)
  %.fca.0.extract44 = extractvalue { <2 x float>, float } %12, 0
  %.fca.1.extract45 = extractvalue { <2 x float>, float } %12, 1
  store <2 x float> %.fca.0.extract44, ptr %4, align 8
  %.sroa.247.0..sroa_idx = getelementptr inbounds i8, ptr %4, i64 8
  store float %.fca.1.extract45, ptr %.sroa.247.0..sroa_idx, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #5
  %13 = tail call { <2 x float>, float } @_ZN2rw7makeV3dEfff(float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 1.000000e+00)
  %.fca.0.extract40 = extractvalue { <2 x float>, float } %13, 0
  %.fca.1.extract41 = extractvalue { <2 x float>, float } %13, 1
  store <2 x float> %.fca.0.extract40, ptr %6, align 8
  %.sroa.243.0..sroa_idx = getelementptr inbounds i8, ptr %6, i64 8
  store float %.fca.1.extract41, ptr %.sroa.243.0..sroa_idx, align 8
  %14 = call { <2 x float>, <2 x float> } @_ZN2rw4Quat8rotationEfRKNS_3V3dE(float noundef %1, ptr noundef nonnull align 4 dereferenceable(12) %6)
  %15 = extractvalue { <2 x float>, <2 x float> } %14, 0
  store <2 x float> %15, ptr %5, align 8
  %16 = getelementptr inbounds i8, ptr %5, i64 8
  %17 = extractvalue { <2 x float>, <2 x float> } %14, 1
  store <2 x float> %17, ptr %16, align 8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #5
  %18 = call { <2 x float>, float } @_ZN2rw6rotateERKNS_3V3dERKNS_4QuatE(ptr noundef nonnull align 4 dereferenceable(12) %4, ptr noundef nonnull align 4 dereferenceable(16) %5)
  %.fca.0.extract34 = extractvalue { <2 x float>, float } %18, 0
  %.fca.1.extract35 = extractvalue { <2 x float>, float } %18, 1
  store <2 x float> %.fca.0.extract34, ptr %4, align 8
  store float %.fca.1.extract35, ptr %.sroa.247.0..sroa_idx, align 8, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %0, i64 44
  %20 = call { <2 x float>, float } @_ZN2rw6rotateERKNS_3V3dERKNS_4QuatE(ptr noundef nonnull align 4 dereferenceable(12) %19, ptr noundef nonnull align 4 dereferenceable(16) %5)
  %.fca.0.extract28 = extractvalue { <2 x float>, float } %20, 0
  %.fca.1.extract29 = extractvalue { <2 x float>, float } %20, 1
  store <2 x float> %.fca.0.extract28, ptr %19, align 4
  %.sroa.433.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 52
  store float %.fca.1.extract29, ptr %.sroa.433.0..sroa_idx, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #5
  %21 = call { <2 x float>, float } @_ZN2rw5crossERKNS_3V3dES2_(ptr noundef nonnull align 4 dereferenceable(12) %4, ptr noundef nonnull align 4 dereferenceable(12) %19)
  %.fca.0.extract24 = extractvalue { <2 x float>, float } %21, 0
  %.fca.1.extract25 = extractvalue { <2 x float>, float } %21, 1
  store <2 x float> %.fca.0.extract24, ptr %8, align 8
  %.sroa.227.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 8
  store float %.fca.1.extract25, ptr %.sroa.227.0..sroa_idx, align 8
  %22 = call { <2 x float>, float } @_ZN2rw9normalizeERKNS_3V3dE(ptr noundef nonnull align 4 dereferenceable(12) %8)
  %.fca.0.extract20 = extractvalue { <2 x float>, float } %22, 0
  %.fca.1.extract21 = extractvalue { <2 x float>, float } %22, 1
  store <2 x float> %.fca.0.extract20, ptr %7, align 8
  %.sroa.223.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 8
  store float %.fca.1.extract21, ptr %.sroa.223.0..sroa_idx, align 8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #5
  %23 = fneg float %2
  %24 = call { <2 x float>, <2 x float> } @_ZN2rw4Quat8rotationEfRKNS_3V3dE(float noundef %23, ptr noundef nonnull align 4 dereferenceable(12) %7)
  %25 = extractvalue { <2 x float>, <2 x float> } %24, 0
  %26 = extractvalue { <2 x float>, <2 x float> } %24, 1
  store <2 x float> %25, ptr %5, align 8
  store <2 x float> %26, ptr %16, align 8
  %27 = call { <2 x float>, float } @_ZN2rw6rotateERKNS_3V3dERKNS_4QuatE(ptr noundef nonnull align 4 dereferenceable(12) %4, ptr noundef nonnull align 4 dereferenceable(16) %5)
  %.fca.0.extract12 = extractvalue { <2 x float>, float } %27, 0
  %.fca.1.extract13 = extractvalue { <2 x float>, float } %27, 1
  store <2 x float> %.fca.0.extract12, ptr %4, align 8
  store float %.fca.1.extract13, ptr %.sroa.247.0..sroa_idx, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #5
  %28 = call { <2 x float>, float } @_ZN2rw5crossERKNS_3V3dES2_(ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef nonnull align 4 dereferenceable(12) %4)
  %.fca.0.extract6 = extractvalue { <2 x float>, float } %28, 0
  %.fca.1.extract7 = extractvalue { <2 x float>, float } %28, 1
  store <2 x float> %.fca.0.extract6, ptr %9, align 8
  %.sroa.29.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 8
  store float %.fca.1.extract7, ptr %.sroa.29.0..sroa_idx, align 8
  %29 = call { <2 x float>, float } @_ZN2rw9normalizeERKNS_3V3dE(ptr noundef nonnull align 4 dereferenceable(12) %9)
  %.fca.0.extract2 = extractvalue { <2 x float>, float } %29, 0
  %.fca.1.extract3 = extractvalue { <2 x float>, float } %29, 1
  store <2 x float> %.fca.0.extract2, ptr %19, align 4
  store float %.fca.1.extract3, ptr %.sroa.433.0..sroa_idx, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #5
  %30 = fcmp ult float %.fca.1.extract3, 0.000000e+00
  %.sink = select i1 %30, float -1.000000e+00, float 1.000000e+00
  %31 = getelementptr inbounds i8, ptr %0, i64 40
  store float %.sink, ptr %31, align 8
  %32 = call { <2 x float>, float } @_ZN2rw3subERKNS_3V3dES2_(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %4)
  %.fca.0.extract = extractvalue { <2 x float>, float } %32, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %32, 1
  store <2 x float> %.fca.0.extract, ptr %11, align 8
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 16
  store float %.fca.1.extract, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #5
  ret void
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "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 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 = { 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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


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