; LLVM IR from ThePhysicsGuys/Physics3D :: tests/rotationTests.ll (Z26rotationQuaternionNegativev)

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

@.str.3 = 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: 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: mustprogress uwtable
declare dso_local void @_ZNK21TolerantAssertBuilderIdEltIN3P3D6VectorIdLm3EEEEE22TolerantAssertComparerIT_dERKS6_(ptr dead_on_unwind noalias writable sret(%class.TolerantAssertComparer.0) align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK22TolerantAssertComparerIN3P3D6VectorIdLm3EEEdEeqIS2_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(24)) #2 align 2

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

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

declare ptr @__cxa_allocate_exception(i64)

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

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)) #5 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK22TolerantAssertComparerIN3P3D6MatrixIdLm3ELm3EEEdEeqIS2_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(72)) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z26rotationQuaternionNegativev() #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca double, align 8
  %2 = alloca i32, align 4
  %3 = alloca double, align 8
  %4 = alloca double, align 8
  %5 = alloca %"class.P3D::QuaternionRotationTemplate", align 8
  %6 = alloca %"struct.P3D::Quaternion", align 8
  %7 = alloca %"struct.P3D::Quaternion", align 8
  %8 = alloca %"class.P3D::QuaternionRotationTemplate", align 8
  %9 = alloca %"class.P3D::QuaternionRotationTemplate", align 8
  %10 = alloca %class.TolerantAssertComparer, align 8
  %11 = alloca %class.TolerantAssertComparer.0, align 8
  %12 = alloca %struct.TolerantAssertBuilder, align 8
  %13 = alloca %"struct.P3D::Vector", align 8
  %14 = alloca %"struct.P3D::Vector", align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca %class.TolerantAssertComparer, align 8
  %18 = alloca %class.TolerantAssertComparer.7, align 8
  %19 = alloca %struct.TolerantAssertBuilder, align 8
  %20 = alloca %"class.P3D::Matrix", align 8
  %21 = alloca %"class.P3D::Matrix", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #6
  store double -1.550000e+00, ptr %1, align 8, !tbaa !5
  br label %22

22:                                               ; preds = %95, %0
  %23 = load double, ptr %1, align 8, !tbaa !5
  %24 = fcmp olt double %23, 1.550000e+00
  br i1 %24, label %26, label %25

25:                                               ; preds = %22
  store i32 2, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #6
  br label %98

26:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  store double -1.550000e+00, ptr %3, align 8, !tbaa !5
  br label %27

27:                                               ; preds = %91, %26
  %28 = load double, ptr %3, align 8, !tbaa !5
  %29 = fcmp olt double %28, 1.550000e+00
  br i1 %29, label %31, label %30

30:                                               ; preds = %27
  store i32 5, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  br label %94

31:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  store double -1.550000e+00, ptr %4, align 8, !tbaa !5
  br label %32

32:                                               ; preds = %86, %31
  %33 = load double, ptr %4, align 8, !tbaa !5
  %34 = fcmp olt double %33, 1.550000e+00
  br i1 %34, label %36, label %35

35:                                               ; preds = %32
  store i32 8, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  br label %90

36:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 32, ptr %5) #6
  %37 = load double, ptr %1, align 8, !tbaa !5
  %38 = load double, ptr %3, align 8, !tbaa !5
  %39 = load double, ptr %4, align 8, !tbaa !5
  call void @_ZN3P3D26QuaternionRotationTemplateIdE15fromEulerAnglesEddd(ptr dead_on_unwind writable sret(%"class.P3D::QuaternionRotationTemplate") align 8 %5, double noundef %37, double noundef %38, double noundef %39)
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #6
  call void @_ZNK3P3D26QuaternionRotationTemplateIdE20asRotationQuaternionEv(ptr dead_on_unwind writable sret(%"struct.P3D::Quaternion") align 8 %6, ptr noundef nonnull align 8 dereferenceable(32) %5)
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #6
  call void @_ZN3P3DngIdEENS_10QuaternionIT_EERKS3_(ptr dead_on_unwind writable sret(%"struct.P3D::Quaternion") align 8 %7, ptr noundef nonnull align 8 dereferenceable(32) %6)
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #6
  call void @_ZN3P3D26QuaternionRotationTemplateIdE22fromRotationQuaternionERKNS_10QuaternionIdEE(ptr dead_on_unwind writable sret(%"class.P3D::QuaternionRotationTemplate") align 8 %8, ptr noundef nonnull align 8 dereferenceable(32) %6)
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #6
  call void @_ZN3P3D26QuaternionRotationTemplateIdE22fromRotationQuaternionERKNS_10QuaternionIdEE(ptr dead_on_unwind writable sret(%"class.P3D::QuaternionRotationTemplate") align 8 %9, ptr noundef nonnull align 8 dereferenceable(32) %7)
  br label %40

40:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #6
  call void @_ZN21TolerantAssertBuilderIdEC2Eid(ptr noundef nonnull align 8 dereferenceable(16) %12, i32 noundef 152, double noundef 1.000000e-08)
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #6
  call void @_ZNK3P3D26QuaternionRotationTemplateIdE16asRotationVectorEv(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %13, ptr noundef nonnull align 8 dereferenceable(32) %8)
  call void @_ZNK21TolerantAssertBuilderIdEltIN3P3D6VectorIdLm3EEEEE22TolerantAssertComparerIT_dERKS6_(ptr dead_on_unwind writable sret(%class.TolerantAssertComparer.0) align 8 %11, ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(24) %13)
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #6
  call void @_ZNK3P3D26QuaternionRotationTemplateIdE16asRotationVectorEv(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %14, ptr noundef nonnull align 8 dereferenceable(32) %9)
  call void @_ZNK22TolerantAssertComparerIN3P3D6VectorIdLm3EEEdEeqIS2_EES_IbdERKT_(ptr dead_on_unwind writable sret(%class.TolerantAssertComparer) align 8 %10, ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %14)
  %41 = getelementptr inbounds %class.TolerantAssertComparer, ptr %10, i32 0, i32 1
  %42 = load ptr, ptr %41, align 8, !tbaa !9
  %43 = load i8, ptr %42, align 1, !tbaa !13, !range !15, !noundef !16
  %44 = trunc i8 %43 to i1
  %45 = xor i1 %44, true
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #6
  br i1 %45, label %46, label %59

46:                                               ; preds = %40
  %47 = call ptr @_ZTW15__testInterface()
  %48 = getelementptr inbounds %class.TestInterface, ptr %47, i32 0, i32 1
  %49 = load i8, ptr %48, align 8, !tbaa !17, !range !15, !noundef !16
  %50 = trunc i8 %49 to i1
  br i1 %50, label %51, label %52

51:                                               ; preds = %46
  br label %52

52:                                               ; preds = %51, %46
  %53 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %53, i32 noundef 152, ptr noundef @.str.3)
          to label %54 unwind label %55

54:                                               ; preds = %52
  call void @__cxa_throw(ptr %53, ptr @_ZTI14AssertionError, ptr null) #7
  unreachable

55:                                               ; preds = %52
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %15, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %16, align 4
  call void @__cxa_free_exception(ptr %53) #6
  br label %89

59:                                               ; preds = %40
  %60 = call ptr @_ZTW15__testInterface()
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %60)
  br label %61

61:                                               ; preds = %59
  br label %62

62:                                               ; preds = %61
  br label %63

63:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #6
  call void @_ZN21TolerantAssertBuilderIdEC2Eid(ptr noundef nonnull align 8 dereferenceable(16) %19, i32 noundef 153, double noundef 1.000000e-08)
  call void @llvm.lifetime.start.p0(i64 72, ptr %20) #6
  call void @_ZNK3P3D26QuaternionRotationTemplateIdE16asRotationMatrixEv(ptr dead_on_unwind writable sret(%"class.P3D::Matrix") align 8 %20, ptr noundef nonnull align 8 dereferenceable(32) %8)
  call void @_ZNK21TolerantAssertBuilderIdEltIN3P3D6MatrixIdLm3ELm3EEEEE22TolerantAssertComparerIT_dERKS6_(ptr dead_on_unwind writable sret(%class.TolerantAssertComparer.7) align 8 %18, ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 8 dereferenceable(72) %20)
  call void @llvm.lifetime.start.p0(i64 72, ptr %21) #6
  call void @_ZNK3P3D26QuaternionRotationTemplateIdE16asRotationMatrixEv(ptr dead_on_unwind writable sret(%"class.P3D::Matrix") align 8 %21, ptr noundef nonnull align 8 dereferenceable(32) %9)
  call void @_ZNK22TolerantAssertComparerIN3P3D6MatrixIdLm3ELm3EEEdEeqIS2_EES_IbdERKT_(ptr dead_on_unwind writable sret(%class.TolerantAssertComparer) align 8 %17, ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 8 dereferenceable(72) %21)
  %64 = getelementptr inbounds %class.TolerantAssertComparer, ptr %17, i32 0, i32 1
  %65 = load ptr, ptr %64, align 8, !tbaa !9
  %66 = load i8, ptr %65, align 1, !tbaa !13, !range !15, !noundef !16
  %67 = trunc i8 %66 to i1
  %68 = xor i1 %67, true
  call void @llvm.lifetime.end.p0(i64 72, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #6
  br i1 %68, label %69, label %82

69:                                               ; preds = %63
  %70 = call ptr @_ZTW15__testInterface()
  %71 = getelementptr inbounds %class.TestInterface, ptr %70, i32 0, i32 1
  %72 = load i8, ptr %71, align 8, !tbaa !17, !range !15, !noundef !16
  %73 = trunc i8 %72 to i1
  br i1 %73, label %74, label %75

74:                                               ; preds = %69
  br label %75

75:                                               ; preds = %74, %69
  %76 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %76, i32 noundef 153, ptr noundef @.str.3)
          to label %77 unwind label %78

77:                                               ; preds = %75
  call void @__cxa_throw(ptr %76, ptr @_ZTI14AssertionError, ptr null) #7
  unreachable

78:                                               ; preds = %75
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %15, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %16, align 4
  call void @__cxa_free_exception(ptr %76) #6
  br label %89

82:                                               ; preds = %63
  %83 = call ptr @_ZTW15__testInterface()
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %83)
  br label %84

84:                                               ; preds = %82
  br label %85

85:                                               ; preds = %84
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #6
  br label %86

86:                                               ; preds = %85
  %87 = load double, ptr %4, align 8, !tbaa !5
  %88 = fadd double %87, 1.000000e-01
  store double %88, ptr %4, align 8, !tbaa !5
  br label %32, !llvm.loop !20

89:                                               ; preds = %78, %55
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #6
  br label %99

90:                                               ; preds = %35
  br label %91

91:                                               ; preds = %90
  %92 = load double, ptr %3, align 8, !tbaa !5
  %93 = fadd double %92, 1.000000e-01
  store double %93, ptr %3, align 8, !tbaa !5
  br label %27, !llvm.loop !22

94:                                               ; preds = %30
  br label %95

95:                                               ; preds = %94
  %96 = load double, ptr %1, align 8, !tbaa !5
  %97 = fadd double %96, 1.000000e-01
  store double %97, ptr %1, align 8, !tbaa !5
  br label %22, !llvm.loop !23

98:                                               ; preds = %25
  ret void

99:                                               ; preds = %89
  %100 = load ptr, ptr %15, align 8
  %101 = load i32, ptr %16, align 4
  %102 = insertvalue { ptr, i32 } poison, ptr %100, 0
  %103 = insertvalue { ptr, i32 } %102, i32 %101, 1
  resume { ptr, i32 } %103
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D26QuaternionRotationTemplateIdE15fromEulerAnglesEddd(ptr dead_on_unwind noalias writable sret(%"class.P3D::QuaternionRotationTemplate") align 8, double noundef, double noundef, double noundef) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D26QuaternionRotationTemplateIdE22fromRotationQuaternionERKNS_10QuaternionIdEE(ptr dead_on_unwind noalias writable sret(%"class.P3D::QuaternionRotationTemplate") align 8, ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3P3D26QuaternionRotationTemplateIdE16asRotationMatrixEv(ptr dead_on_unwind noalias writable sret(%"class.P3D::Matrix") align 8, ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

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 = { 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 = { 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 #4 = { "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 }
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, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !12, i64 8}
!10 = !{!"_ZTS22TolerantAssertComparerIbdE", !11, i64 0, !12, i64 8, !6, i64 16}
!11 = !{!"int", !7, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!18, !14, i64 8}
!18 = !{!"_ZTS13TestInterface", !19, i64 0, !14, i64 8}
!19 = !{!"long", !7, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = distinct !{!23, !21}


; 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.TolerantAssertComparer.0 = type { i32, ptr, double }
%class.TolerantAssertComparer = type { i32, ptr, double }
%class.TolerantAssertComparer.7 = type { i32, ptr, double }
%"class.P3D::QuaternionRotationTemplate" = type { %"struct.P3D::Quaternion" }
%"struct.P3D::Quaternion" = type { double, %union.anon.8 }
%union.anon.8 = type { %struct.anon.9 }
%struct.anon.9 = type { double, double, double }
%struct.TolerantAssertBuilder = type { i32, double }
%"struct.P3D::Vector" = type { %union.anon }
%union.anon = type { [3 x double] }
%"class.P3D::Matrix" = type { [9 x double] }

@.str.3 = 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 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: mustprogress uwtable
declare dso_local void @_ZNK21TolerantAssertBuilderIdEltIN3P3D6VectorIdLm3EEEEE22TolerantAssertComparerIT_dERKS6_(ptr dead_on_unwind noalias writable sret(%class.TolerantAssertComparer.0) align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK22TolerantAssertComparerIN3P3D6VectorIdLm3EEEdEeqIS2_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(24)) local_unnamed_addr #2 align 2

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

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

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 #4

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 #5 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK22TolerantAssertComparerIN3P3D6MatrixIdLm3ELm3EEEdEeqIS2_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(72)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z26rotationQuaternionNegativev() local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.P3D::QuaternionRotationTemplate", align 8
  %2 = alloca %"struct.P3D::Quaternion", align 8
  %3 = alloca %"struct.P3D::Quaternion", align 8
  %4 = alloca %"class.P3D::QuaternionRotationTemplate", align 8
  %5 = alloca %"class.P3D::QuaternionRotationTemplate", align 8
  %6 = alloca %class.TolerantAssertComparer, align 8
  %7 = alloca %class.TolerantAssertComparer.0, align 8
  %8 = alloca %struct.TolerantAssertBuilder, align 8
  %9 = alloca %"struct.P3D::Vector", align 8
  %10 = alloca %"struct.P3D::Vector", align 8
  %11 = alloca %class.TolerantAssertComparer, align 8
  %12 = alloca %class.TolerantAssertComparer.7, align 8
  %13 = alloca %struct.TolerantAssertBuilder, align 8
  %14 = alloca %"class.P3D::Matrix", align 8
  %15 = alloca %"class.P3D::Matrix", align 8
  %16 = getelementptr inbounds i8, ptr %6, i64 8
  %17 = getelementptr inbounds i8, ptr %11, i64 8
  br label %.preheader15

.preheader15:                                     ; preds = %0, %19
  %.01318 = phi double [ -1.550000e+00, %0 ], [ %20, %19 ]
  br label %.preheader

18:                                               ; preds = %19
  ret void

.preheader:                                       ; preds = %.preheader15, %22
  %.01217 = phi double [ -1.550000e+00, %.preheader15 ], [ %23, %22 ]
  br label %25

19:                                               ; preds = %22
  %20 = fadd double %.01318, 1.000000e-01
  %21 = fcmp olt double %20, 1.550000e+00
  br i1 %21, label %.preheader15, label %18, !llvm.loop !5

22:                                               ; preds = %45
  %23 = fadd double %.01217, 1.000000e-01
  %24 = fcmp olt double %23, 1.550000e+00
  br i1 %24, label %.preheader, label %19, !llvm.loop !7

25:                                               ; preds = %.preheader, %45
  %.01116 = phi double [ -1.550000e+00, %.preheader ], [ %46, %45 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #6
  call void @_ZN3P3D26QuaternionRotationTemplateIdE15fromEulerAnglesEddd(ptr dead_on_unwind nonnull writable sret(%"class.P3D::QuaternionRotationTemplate") align 8 %1, double noundef %.01318, double noundef %.01217, double noundef %.01116)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #6
  call void @_ZNK3P3D26QuaternionRotationTemplateIdE20asRotationQuaternionEv(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Quaternion") align 8 %2, ptr noundef nonnull align 8 dereferenceable(32) %1)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #6
  call void @_ZN3P3DngIdEENS_10QuaternionIT_EERKS3_(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Quaternion") align 8 %3, ptr noundef nonnull align 8 dereferenceable(32) %2)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #6
  call void @_ZN3P3D26QuaternionRotationTemplateIdE22fromRotationQuaternionERKNS_10QuaternionIdEE(ptr dead_on_unwind nonnull writable sret(%"class.P3D::QuaternionRotationTemplate") align 8 %4, ptr noundef nonnull align 8 dereferenceable(32) %2)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  call void @_ZN3P3D26QuaternionRotationTemplateIdE22fromRotationQuaternionERKNS_10QuaternionIdEE(ptr dead_on_unwind nonnull writable sret(%"class.P3D::QuaternionRotationTemplate") align 8 %5, ptr noundef nonnull align 8 dereferenceable(32) %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #6
  call void @_ZN21TolerantAssertBuilderIdEC2Eid(ptr noundef nonnull align 8 dereferenceable(16) %8, i32 noundef 152, double noundef 1.000000e-08)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #6
  call void @_ZNK3P3D26QuaternionRotationTemplateIdE16asRotationVectorEv(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %9, ptr noundef nonnull align 8 dereferenceable(32) %4)
  call void @_ZNK21TolerantAssertBuilderIdEltIN3P3D6VectorIdLm3EEEEE22TolerantAssertComparerIT_dERKS6_(ptr dead_on_unwind nonnull writable sret(%class.TolerantAssertComparer.0) align 8 %7, ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(24) %9)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #6
  call void @_ZNK3P3D26QuaternionRotationTemplateIdE16asRotationVectorEv(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %10, ptr noundef nonnull align 8 dereferenceable(32) %5)
  call void @_ZNK22TolerantAssertComparerIN3P3D6VectorIdLm3EEEdEeqIS2_EES_IbdERKT_(ptr dead_on_unwind nonnull writable sret(%class.TolerantAssertComparer) align 8 %6, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %10)
  %26 = load ptr, ptr %16, align 8, !tbaa !8
  %27 = load i8, ptr %26, align 1, !tbaa !15, !range !17, !noundef !18
  %28 = trunc nuw i8 %27 to i1
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  %29 = call ptr @_ZTW15__testInterface()
  br i1 %28, label %35, label %30

30:                                               ; preds = %25
  %31 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %31, i32 noundef 152, ptr noundef nonnull @.str.3)
          to label %32 unwind label %33

32:                                               ; preds = %30
  call void @__cxa_throw(ptr nonnull %31, ptr nonnull @_ZTI14AssertionError, ptr null) #7
  unreachable

33:                                               ; preds = %30
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %48

35:                                               ; preds = %25
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %29)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #6
  call void @_ZN21TolerantAssertBuilderIdEC2Eid(ptr noundef nonnull align 8 dereferenceable(16) %13, i32 noundef 153, double noundef 1.000000e-08)
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %14) #6
  call void @_ZNK3P3D26QuaternionRotationTemplateIdE16asRotationMatrixEv(ptr dead_on_unwind nonnull writable sret(%"class.P3D::Matrix") align 8 %14, ptr noundef nonnull align 8 dereferenceable(32) %4)
  call void @_ZNK21TolerantAssertBuilderIdEltIN3P3D6MatrixIdLm3ELm3EEEEE22TolerantAssertComparerIT_dERKS6_(ptr dead_on_unwind nonnull writable sret(%class.TolerantAssertComparer.7) align 8 %12, ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(72) %14)
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %15) #6
  call void @_ZNK3P3D26QuaternionRotationTemplateIdE16asRotationMatrixEv(ptr dead_on_unwind nonnull writable sret(%"class.P3D::Matrix") align 8 %15, ptr noundef nonnull align 8 dereferenceable(32) %5)
  call void @_ZNK22TolerantAssertComparerIN3P3D6MatrixIdLm3ELm3EEEdEeqIS2_EES_IbdERKT_(ptr dead_on_unwind nonnull writable sret(%class.TolerantAssertComparer) align 8 %11, ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(72) %15)
  %36 = load ptr, ptr %17, align 8, !tbaa !8
  %37 = load i8, ptr %36, align 1, !tbaa !15, !range !17, !noundef !18
  %38 = trunc nuw i8 %37 to i1
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #6
  %39 = call ptr @_ZTW15__testInterface()
  br i1 %38, label %45, label %40

40:                                               ; preds = %35
  %41 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %41, i32 noundef 153, ptr noundef nonnull @.str.3)
          to label %42 unwind label %43

42:                                               ; preds = %40
  call void @__cxa_throw(ptr nonnull %41, ptr nonnull @_ZTI14AssertionError, ptr null) #7
  unreachable

43:                                               ; preds = %40
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %48

45:                                               ; preds = %35
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %39)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #6
  %46 = fadd double %.01116, 1.000000e-01
  %47 = fcmp olt double %46, 1.550000e+00
  br i1 %47, label %25, label %22, !llvm.loop !19

48:                                               ; preds = %43, %33
  %.sink = phi ptr [ %41, %43 ], [ %31, %33 ]
  %.pn = phi { ptr, i32 } [ %44, %43 ], [ %34, %33 ]
  call void @__cxa_free_exception(ptr %.sink) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D26QuaternionRotationTemplateIdE15fromEulerAnglesEddd(ptr dead_on_unwind noalias writable sret(%"class.P3D::QuaternionRotationTemplate") align 8, double noundef, double noundef, double noundef) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D26QuaternionRotationTemplateIdE22fromRotationQuaternionERKNS_10QuaternionIdEE(ptr dead_on_unwind noalias writable sret(%"class.P3D::QuaternionRotationTemplate") align 8, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3P3D26QuaternionRotationTemplateIdE16asRotationMatrixEv(ptr dead_on_unwind noalias writable sret(%"class.P3D::Matrix") align 8, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

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 = { 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 = { 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 #4 = { "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 }
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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}
!8 = !{!9, !13, i64 8}
!9 = !{!"_ZTS22TolerantAssertComparerIbdE", !10, i64 0, !13, i64 8, !14, i64 16}
!10 = !{!"int", !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C++ TBAA"}
!13 = !{!"any pointer", !11, i64 0}
!14 = !{!"double", !11, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"bool", !11, i64 0}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = distinct !{!19, !6}


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