; LLVM IR from ThePhysicsGuys/Physics3D :: tests/mathTests.ll (Z27quaternionRotationShorthandv)

; 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.P3D::Quaternion" = type { double, %union.anon.41 }
%union.anon.41 = type { %struct.anon.42 }
%struct.anon.42 = type { double, double, double }
%"struct.P3D::Vector" = type { %union.anon.16 }
%union.anon.16 = type { [3 x double] }
%class.TolerantAssertComparer = type { i32, ptr, double }
%class.TolerantAssertComparer.43 = type { i32, ptr, double }
%struct.TolerantAssertBuilder = type { i32, double }
%class.TestInterface = type <{ i64, i8, [7 x i8] }>

@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@_ZTI14AssertionError = external dso_local constant { ptr, ptr }, align 8

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN21TolerantAssertBuilderIdEC2Eid(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, double noundef) unnamed_addr #1 align 2

; Function Attrs: uwtable
declare hidden noundef ptr @_ZTW15__testInterface() #2

declare ptr @__cxa_allocate_exception(i64)

declare void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12), i32 noundef, ptr noundef) unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

declare void @__cxa_free_exception(ptr)

declare void @__cxa_throw(ptr, ptr, ptr)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D6VectorIdLm3EEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24), double noundef, double noundef, double noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D10QuaternionIdEC2Edddd(ptr noundef nonnull align 8 dereferenceable(32), double noundef, double noundef, double noundef, double noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3DmlIdEENS_10QuaternionIT_EERKS3_S5_(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Quaternion") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3DmlIdEENS_10QuaternionIT_EERKS3_RKNS_6VectorIS2_Lm3EEE(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Quaternion") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24)) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D4conjIdEENS_10QuaternionIT_EERKS3_(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Quaternion") align 8, ptr noundef nonnull align 8 dereferenceable(32)) #5

; Function Attrs: mustprogress uwtable
define dso_local void @_Z27quaternionRotationShorthandv() #5 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"struct.P3D::Vector", align 8
  %2 = alloca %"struct.P3D::Quaternion", align 8
  %3 = alloca %"struct.P3D::Quaternion", align 8
  %4 = alloca %class.TolerantAssertComparer, align 8
  %5 = alloca %class.TolerantAssertComparer.43, align 8
  %6 = alloca %struct.TolerantAssertBuilder, align 8
  %7 = alloca %"struct.P3D::Quaternion", align 8
  %8 = alloca %"struct.P3D::Vector", align 8
  %9 = alloca %"struct.P3D::Quaternion", align 8
  %10 = alloca %"struct.P3D::Quaternion", align 8
  %11 = alloca %"struct.P3D::Quaternion", align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %class.TolerantAssertComparer, align 8
  %15 = alloca %class.TolerantAssertComparer.43, align 8
  %16 = alloca %struct.TolerantAssertBuilder, align 8
  %17 = alloca %"struct.P3D::Quaternion", align 8
  %18 = alloca %"struct.P3D::Vector", align 8
  %19 = alloca %"struct.P3D::Quaternion", align 8
  %20 = alloca %"struct.P3D::Quaternion", align 8
  %21 = alloca %"struct.P3D::Quaternion", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %1) #6
  call void @_ZN3P3D6VectorIdLm3EEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %1, double noundef 0x3FE6666666666666, double noundef 1.000000e+00, double noundef 3.000000e-01) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %3) #6
  call void @_ZN3P3D10QuaternionIdEC2Edddd(ptr noundef nonnull align 8 dereferenceable(32) %3, double noundef 8.000000e-01, double noundef 4.000000e-01, double noundef 3.000000e-01, double noundef -4.000000e-01)
  call void @_ZN3P3D9normalizeIdEENS_10QuaternionIT_EERKS3_(ptr dead_on_unwind writable sret(%"struct.P3D::Quaternion") align 8 %2, ptr noundef nonnull align 8 dereferenceable(32) %3)
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #6
  br label %22

22:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #6
  call void @_ZN21TolerantAssertBuilderIdEC2Eid(ptr noundef nonnull align 8 dereferenceable(16) %6, i32 noundef 404, double noundef 1.000000e-08)
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #6
  call void @_ZN3P3D26mulQuaternionLeftRightConjIdEENS_6VectorIT_Lm3EEERKNS_10QuaternionIS2_EERKS3_(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %8, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(24) %1)
  call void @_ZN3P3D10QuaternionIdEC2EdNS_6VectorIdLm3EEE(ptr noundef nonnull align 8 dereferenceable(32) %7, double noundef 0.000000e+00, ptr noundef byval(%"struct.P3D::Vector") align 8 %8)
  call void @_ZNK21TolerantAssertBuilderIdEltIN3P3D10QuaternionIdEEEE22TolerantAssertComparerIT_dERKS6_(ptr dead_on_unwind writable sret(%class.TolerantAssertComparer.43) align 8 %5, ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(32) %7)
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #6
  call void @_ZN3P3DmlIdEENS_10QuaternionIT_EERKS3_RKNS_6VectorIS2_Lm3EEE(ptr dead_on_unwind writable sret(%"struct.P3D::Quaternion") align 8 %10, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(24) %1)
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #6
  call void @_ZN3P3D4conjIdEENS_10QuaternionIT_EERKS3_(ptr dead_on_unwind writable sret(%"struct.P3D::Quaternion") align 8 %11, ptr noundef nonnull align 8 dereferenceable(32) %2)
  call void @_ZN3P3DmlIdEENS_10QuaternionIT_EERKS3_S5_(ptr dead_on_unwind writable sret(%"struct.P3D::Quaternion") align 8 %9, ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(32) %11)
  call void @_ZNK22TolerantAssertComparerIN3P3D10QuaternionIdEEdEeqIS2_EES_IbdERKT_(ptr dead_on_unwind writable sret(%class.TolerantAssertComparer) align 8 %4, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(32) %9)
  %23 = getelementptr inbounds %class.TolerantAssertComparer, ptr %4, i32 0, i32 1
  %24 = load ptr, ptr %23, align 8, !tbaa !5
  %25 = load i8, ptr %24, align 1, !tbaa !12, !range !14, !noundef !15
  %26 = trunc i8 %25 to i1
  %27 = xor i1 %26, true
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #6
  br i1 %27, label %28, label %41

28:                                               ; preds = %22
  %29 = call ptr @_ZTW15__testInterface()
  %30 = getelementptr inbounds %class.TestInterface, ptr %29, i32 0, i32 1
  %31 = load i8, ptr %30, align 8, !tbaa !16, !range !14, !noundef !15
  %32 = trunc i8 %31 to i1
  br i1 %32, label %33, label %34

33:                                               ; preds = %28
  br label %34

34:                                               ; preds = %33, %28
  %35 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %35, i32 noundef 404, ptr noundef @.str.4)
          to label %36 unwind label %37

36:                                               ; preds = %34
  call void @__cxa_throw(ptr %35, ptr @_ZTI14AssertionError, ptr null) #7
  unreachable

37:                                               ; preds = %34
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %12, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %13, align 4
  call void @__cxa_free_exception(ptr %35) #6
  br label %68

41:                                               ; preds = %22
  %42 = call ptr @_ZTW15__testInterface()
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %42)
  br label %43

43:                                               ; preds = %41
  br label %44

44:                                               ; preds = %43
  br label %45

45:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #6
  call void @_ZN21TolerantAssertBuilderIdEC2Eid(ptr noundef nonnull align 8 dereferenceable(16) %16, i32 noundef 405, double noundef 1.000000e-08)
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #6
  call void @_ZN3P3D26mulQuaternionLeftConjRightIdEENS_6VectorIT_Lm3EEERKNS_10QuaternionIS2_EERKS3_(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %18, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(24) %1)
  call void @_ZN3P3D10QuaternionIdEC2EdNS_6VectorIdLm3EEE(ptr noundef nonnull align 8 dereferenceable(32) %17, double noundef 0.000000e+00, ptr noundef byval(%"struct.P3D::Vector") align 8 %18)
  call void @_ZNK21TolerantAssertBuilderIdEltIN3P3D10QuaternionIdEEEE22TolerantAssertComparerIT_dERKS6_(ptr dead_on_unwind writable sret(%class.TolerantAssertComparer.43) align 8 %15, ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(32) %17)
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #6
  call void @_ZN3P3D4conjIdEENS_10QuaternionIT_EERKS3_(ptr dead_on_unwind writable sret(%"struct.P3D::Quaternion") align 8 %21, ptr noundef nonnull align 8 dereferenceable(32) %2)
  call void @_ZN3P3DmlIdEENS_10QuaternionIT_EERKS3_RKNS_6VectorIS2_Lm3EEE(ptr dead_on_unwind writable sret(%"struct.P3D::Quaternion") align 8 %20, ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull align 8 dereferenceable(24) %1)
  call void @_ZN3P3DmlIdEENS_10QuaternionIT_EERKS3_S5_(ptr dead_on_unwind writable sret(%"struct.P3D::Quaternion") align 8 %19, ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull align 8 dereferenceable(32) %2)
  call void @_ZNK22TolerantAssertComparerIN3P3D10QuaternionIdEEdEeqIS2_EES_IbdERKT_(ptr dead_on_unwind writable sret(%class.TolerantAssertComparer) align 8 %14, ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(32) %19)
  %46 = getelementptr inbounds %class.TolerantAssertComparer, ptr %14, i32 0, i32 1
  %47 = load ptr, ptr %46, align 8, !tbaa !5
  %48 = load i8, ptr %47, align 1, !tbaa !12, !range !14, !noundef !15
  %49 = trunc i8 %48 to i1
  %50 = xor i1 %49, true
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  br i1 %50, label %51, label %64

51:                                               ; preds = %45
  %52 = call ptr @_ZTW15__testInterface()
  %53 = getelementptr inbounds %class.TestInterface, ptr %52, i32 0, i32 1
  %54 = load i8, ptr %53, align 8, !tbaa !16, !range !14, !noundef !15
  %55 = trunc i8 %54 to i1
  br i1 %55, label %56, label %57

56:                                               ; preds = %51
  br label %57

57:                                               ; preds = %56, %51
  %58 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %58, i32 noundef 405, ptr noundef @.str.4)
          to label %59 unwind label %60

59:                                               ; preds = %57
  call void @__cxa_throw(ptr %58, ptr @_ZTI14AssertionError, ptr null) #7
  unreachable

60:                                               ; preds = %57
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %12, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %13, align 4
  call void @__cxa_free_exception(ptr %58) #6
  br label %68

64:                                               ; preds = %45
  %65 = call ptr @_ZTW15__testInterface()
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %65)
  br label %66

66:                                               ; preds = %64
  br label %67

67:                                               ; preds = %66
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %1) #6
  ret void

68:                                               ; preds = %60, %37
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %1) #6
  br label %69

69:                                               ; preds = %68
  %70 = load ptr, ptr %12, align 8
  %71 = load i32, ptr %13, align 4
  %72 = insertvalue { ptr, i32 } poison, ptr %70, 0
  %73 = insertvalue { ptr, i32 } %72, i32 %71, 1
  resume { ptr, i32 } %73
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D9normalizeIdEENS_10QuaternionIT_EERKS3_(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Quaternion") align 8, ptr noundef nonnull align 8 dereferenceable(32)) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK21TolerantAssertBuilderIdEltIN3P3D10QuaternionIdEEEE22TolerantAssertComparerIT_dERKS6_(ptr dead_on_unwind noalias writable sret(%class.TolerantAssertComparer.43) align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D26mulQuaternionLeftRightConjIdEENS_6VectorIT_Lm3EEERKNS_10QuaternionIS2_EERKS3_(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D10QuaternionIdEC2EdNS_6VectorIdLm3EEE(ptr noundef nonnull align 8 dereferenceable(32), double noundef, ptr noundef byval(%"struct.P3D::Vector") align 8) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK22TolerantAssertComparerIN3P3D10QuaternionIdEEdEeqIS2_EES_IbdERKT_(ptr dead_on_unwind noalias writable sret(%class.TolerantAssertComparer) align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(32)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D26mulQuaternionLeftConjRightIdEENS_6VectorIT_Lm3EEERKNS_10QuaternionIS2_EERKS3_(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24)) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { uwtable "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 = { "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 = { 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 #6 = { nounwind }
attributes #7 = { noreturn }

!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 8}
!6 = !{!"_ZTS22TolerantAssertComparerIbdE", !7, i64 0, !10, i64 8, !11, i64 16}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"bool", !8, i64 0}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = !{!17, !13, i64 8}
!17 = !{!"_ZTS13TestInterface", !18, i64 0, !13, i64 8}
!18 = !{!"long", !8, i64 0}


; 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.P3D::Quaternion" = type { double, %union.anon.41 }
%union.anon.41 = type { %struct.anon.42 }
%struct.anon.42 = type { double, double, double }
%"struct.P3D::Vector" = type { %union.anon.16 }
%union.anon.16 = type { [3 x double] }
%class.TolerantAssertComparer = type { i32, ptr, double }
%class.TolerantAssertComparer.43 = type { i32, ptr, double }
%struct.TolerantAssertBuilder = type { i32, double }

@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@_ZTI14AssertionError = external dso_local constant { ptr, ptr }, align 8

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN21TolerantAssertBuilderIdEC2Eid(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, double noundef) unnamed_addr #1 align 2

; Function Attrs: uwtable
declare hidden noundef ptr @_ZTW15__testInterface() local_unnamed_addr #2

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12), i32 noundef, ptr noundef) unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

declare void @__cxa_free_exception(ptr) local_unnamed_addr

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D6VectorIdLm3EEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24), double noundef, double noundef, double noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D10QuaternionIdEC2Edddd(ptr noundef nonnull align 8 dereferenceable(32), double noundef, double noundef, double noundef, double noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3DmlIdEENS_10QuaternionIT_EERKS3_S5_(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Quaternion") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3DmlIdEENS_10QuaternionIT_EERKS3_RKNS_6VectorIS2_Lm3EEE(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Quaternion") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D4conjIdEENS_10QuaternionIT_EERKS3_(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Quaternion") align 8, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
define dso_local void @_Z27quaternionRotationShorthandv() local_unnamed_addr #5 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"struct.P3D::Vector", align 8
  %2 = alloca %"struct.P3D::Quaternion", align 8
  %3 = alloca %"struct.P3D::Quaternion", align 8
  %4 = alloca %class.TolerantAssertComparer, align 8
  %5 = alloca %class.TolerantAssertComparer.43, align 8
  %6 = alloca %struct.TolerantAssertBuilder, align 8
  %7 = alloca %"struct.P3D::Quaternion", align 8
  %8 = alloca %"struct.P3D::Vector", align 8
  %9 = alloca %"struct.P3D::Quaternion", align 8
  %10 = alloca %"struct.P3D::Quaternion", align 8
  %11 = alloca %"struct.P3D::Quaternion", align 8
  %12 = alloca %class.TolerantAssertComparer, align 8
  %13 = alloca %class.TolerantAssertComparer.43, align 8
  %14 = alloca %struct.TolerantAssertBuilder, align 8
  %15 = alloca %"struct.P3D::Quaternion", align 8
  %16 = alloca %"struct.P3D::Vector", align 8
  %17 = alloca %"struct.P3D::Quaternion", align 8
  %18 = alloca %"struct.P3D::Quaternion", align 8
  %19 = alloca %"struct.P3D::Quaternion", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #6
  call void @_ZN3P3D6VectorIdLm3EEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %1, double noundef 0x3FE6666666666666, double noundef 1.000000e+00, double noundef 3.000000e-01) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #6
  call void @_ZN3P3D10QuaternionIdEC2Edddd(ptr noundef nonnull align 8 dereferenceable(32) %3, double noundef 8.000000e-01, double noundef 4.000000e-01, double noundef 3.000000e-01, double noundef -4.000000e-01)
  call void @_ZN3P3D9normalizeIdEENS_10QuaternionIT_EERKS3_(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Quaternion") align 8 %2, ptr noundef nonnull align 8 dereferenceable(32) %3)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #6
  call void @_ZN21TolerantAssertBuilderIdEC2Eid(ptr noundef nonnull align 8 dereferenceable(16) %6, i32 noundef 404, double noundef 1.000000e-08)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #6
  call void @_ZN3P3D26mulQuaternionLeftRightConjIdEENS_6VectorIT_Lm3EEERKNS_10QuaternionIS2_EERKS3_(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %8, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(24) %1)
  call void @_ZN3P3D10QuaternionIdEC2EdNS_6VectorIdLm3EEE(ptr noundef nonnull align 8 dereferenceable(32) %7, double noundef 0.000000e+00, ptr noundef nonnull byval(%"struct.P3D::Vector") align 8 %8)
  call void @_ZNK21TolerantAssertBuilderIdEltIN3P3D10QuaternionIdEEEE22TolerantAssertComparerIT_dERKS6_(ptr dead_on_unwind nonnull writable sret(%class.TolerantAssertComparer.43) align 8 %5, ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(32) %7)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #6
  call void @_ZN3P3DmlIdEENS_10QuaternionIT_EERKS3_RKNS_6VectorIS2_Lm3EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Quaternion") align 8 %10, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(24) %1)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #6
  call void @_ZN3P3D4conjIdEENS_10QuaternionIT_EERKS3_(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Quaternion") align 8 %11, ptr noundef nonnull align 8 dereferenceable(32) %2)
  call void @_ZN3P3DmlIdEENS_10QuaternionIT_EERKS3_S5_(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Quaternion") align 8 %9, ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(32) %11)
  call void @_ZNK22TolerantAssertComparerIN3P3D10QuaternionIdEEdEeqIS2_EES_IbdERKT_(ptr dead_on_unwind nonnull writable sret(%class.TolerantAssertComparer) align 8 %4, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(32) %9)
  %20 = getelementptr inbounds i8, ptr %4, i64 8
  %21 = load ptr, ptr %20, align 8, !tbaa !5
  %22 = load i8, ptr %21, align 1, !tbaa !12, !range !14, !noundef !15
  %23 = trunc nuw i8 %22 to i1
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  %24 = call ptr @_ZTW15__testInterface()
  br i1 %23, label %30, label %25

25:                                               ; preds = %0
  %26 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %26, i32 noundef 404, ptr noundef nonnull @.str.4)
          to label %27 unwind label %28

27:                                               ; preds = %25
  call void @__cxa_throw(ptr nonnull %26, ptr nonnull @_ZTI14AssertionError, ptr null) #7
  unreachable

28:                                               ; preds = %25
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %42

30:                                               ; preds = %0
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %24)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #6
  call void @_ZN21TolerantAssertBuilderIdEC2Eid(ptr noundef nonnull align 8 dereferenceable(16) %14, i32 noundef 405, double noundef 1.000000e-08)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #6
  call void @_ZN3P3D26mulQuaternionLeftConjRightIdEENS_6VectorIT_Lm3EEERKNS_10QuaternionIS2_EERKS3_(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %16, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(24) %1)
  call void @_ZN3P3D10QuaternionIdEC2EdNS_6VectorIdLm3EEE(ptr noundef nonnull align 8 dereferenceable(32) %15, double noundef 0.000000e+00, ptr noundef nonnull byval(%"struct.P3D::Vector") align 8 %16)
  call void @_ZNK21TolerantAssertBuilderIdEltIN3P3D10QuaternionIdEEEE22TolerantAssertComparerIT_dERKS6_(ptr dead_on_unwind nonnull writable sret(%class.TolerantAssertComparer.43) align 8 %13, ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(32) %15)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %17) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %18) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %19) #6
  call void @_ZN3P3D4conjIdEENS_10QuaternionIT_EERKS3_(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Quaternion") align 8 %19, ptr noundef nonnull align 8 dereferenceable(32) %2)
  call void @_ZN3P3DmlIdEENS_10QuaternionIT_EERKS3_RKNS_6VectorIS2_Lm3EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Quaternion") align 8 %18, ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(24) %1)
  call void @_ZN3P3DmlIdEENS_10QuaternionIT_EERKS3_S5_(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Quaternion") align 8 %17, ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull align 8 dereferenceable(32) %2)
  call void @_ZNK22TolerantAssertComparerIN3P3D10QuaternionIdEEdEeqIS2_EES_IbdERKT_(ptr dead_on_unwind nonnull writable sret(%class.TolerantAssertComparer) align 8 %12, ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(32) %17)
  %31 = getelementptr inbounds i8, ptr %12, i64 8
  %32 = load ptr, ptr %31, align 8, !tbaa !5
  %33 = load i8, ptr %32, align 1, !tbaa !12, !range !14, !noundef !15
  %34 = trunc nuw i8 %33 to i1
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %18) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #6
  %35 = call ptr @_ZTW15__testInterface()
  br i1 %34, label %41, label %36

36:                                               ; preds = %30
  %37 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %37, i32 noundef 405, ptr noundef nonnull @.str.4)
          to label %38 unwind label %39

38:                                               ; preds = %36
  call void @__cxa_throw(ptr nonnull %37, ptr nonnull @_ZTI14AssertionError, ptr null) #7
  unreachable

39:                                               ; preds = %36
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %42

41:                                               ; preds = %30
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %35)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #6
  ret void

42:                                               ; preds = %39, %28
  %.sink = phi ptr [ %37, %39 ], [ %26, %28 ]
  %.pn = phi { ptr, i32 } [ %40, %39 ], [ %29, %28 ]
  call void @__cxa_free_exception(ptr %.sink) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D9normalizeIdEENS_10QuaternionIT_EERKS3_(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Quaternion") align 8, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK21TolerantAssertBuilderIdEltIN3P3D10QuaternionIdEEEE22TolerantAssertComparerIT_dERKS6_(ptr dead_on_unwind noalias writable sret(%class.TolerantAssertComparer.43) align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D26mulQuaternionLeftRightConjIdEENS_6VectorIT_Lm3EEERKNS_10QuaternionIS2_EERKS3_(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D10QuaternionIdEC2EdNS_6VectorIdLm3EEE(ptr noundef nonnull align 8 dereferenceable(32), double noundef, ptr noundef byval(%"struct.P3D::Vector") align 8) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK22TolerantAssertComparerIN3P3D10QuaternionIdEEdEeqIS2_EES_IbdERKT_(ptr dead_on_unwind noalias writable sret(%class.TolerantAssertComparer) align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D26mulQuaternionLeftConjRightIdEENS_6VectorIT_Lm3EEERKNS_10QuaternionIS2_EERKS3_(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { uwtable "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 = { "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 = { 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 #6 = { nounwind }
attributes #7 = { noreturn }

!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 8}
!6 = !{!"_ZTS22TolerantAssertComparerIbdE", !7, i64 0, !10, i64 8, !11, i64 16}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"bool", !8, i64 0}
!14 = !{i8 0, i8 2}
!15 = !{}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass