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

; 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.P3D::MatrixRotationTemplate" = type { %"class.P3D::Matrix" }
%"class.P3D::Matrix" = type { [9 x double] }
%class.TolerantAssertComparer.1 = type { i32, ptr, double }
%class.TolerantAssertComparer = type { i32, ptr, double }
%struct.TolerantAssertBuilder = type { i32, double }
%class.TolerantAssertComparer.7 = type { i32, ptr, 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: 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() #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 uwtable
declare dso_local void @_ZN3P3D22MatrixRotationTemplateIdE15fromEulerAnglesEddd(ptr dead_on_unwind noalias writable sret(%"class.P3D::MatrixRotationTemplate") align 8, double noundef, double noundef, double noundef) #5 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z14rotationMatrixv() #5 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::Matrix", align 8
  %6 = alloca %"class.P3D::MatrixRotationTemplate", align 8
  %7 = alloca %class.TolerantAssertComparer, align 8
  %8 = alloca %class.TolerantAssertComparer.1, align 8
  %9 = alloca %struct.TolerantAssertBuilder, align 8
  %10 = alloca %"class.P3D::MatrixRotationTemplate", align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %class.TolerantAssertComparer, align 8
  %14 = alloca %class.TolerantAssertComparer.7, align 8
  %15 = alloca %struct.TolerantAssertBuilder, align 8
  %16 = 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 %17

17:                                               ; preds = %93, %0
  %18 = load double, ptr %1, align 8, !tbaa !5
  %19 = fcmp olt double %18, 1.550000e+00
  br i1 %19, label %21, label %20

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

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

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

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

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

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

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

31:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 72, ptr %5) #6
  %32 = load double, ptr %1, align 8, !tbaa !5
  %33 = load double, ptr %3, align 8, !tbaa !5
  %34 = load double, ptr %4, align 8, !tbaa !5
  call void @_ZN3P3D29rotationMatrixfromEulerAnglesIdEENS_6MatrixIT_Lm3ELm3EEES2_S2_S2_(ptr dead_on_unwind writable sret(%"class.P3D::Matrix") align 8 %5, double noundef %32, double noundef %33, double noundef %34)
  call void @llvm.lifetime.start.p0(i64 72, ptr %6) #6
  %35 = load double, ptr %1, align 8, !tbaa !5
  %36 = load double, ptr %3, align 8, !tbaa !5
  %37 = load double, ptr %4, align 8, !tbaa !5
  call void @_ZN3P3D22MatrixRotationTemplateIdE15fromEulerAnglesEddd(ptr dead_on_unwind writable sret(%"class.P3D::MatrixRotationTemplate") align 8 %6, double noundef %35, double noundef %36, double noundef %37)
  br label %38

38:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #6
  call void @_ZN21TolerantAssertBuilderIdEC2Eid(ptr noundef nonnull align 8 dereferenceable(16) %9, i32 noundef 138, double noundef 1.000000e-08)
  call void @_ZNK21TolerantAssertBuilderIdEltIN3P3D22MatrixRotationTemplateIdEEEE22TolerantAssertComparerIT_dERKS6_(ptr dead_on_unwind writable sret(%class.TolerantAssertComparer.1) align 8 %8, ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(72) %6)
  call void @llvm.lifetime.start.p0(i64 72, ptr %10) #6
  call void @_ZN3P3D22MatrixRotationTemplateIdE18fromRotationMatrixERKNS_6MatrixIdLm3ELm3EEE(ptr dead_on_unwind writable sret(%"class.P3D::MatrixRotationTemplate") align 8 %10, ptr noundef nonnull align 8 dereferenceable(72) %5)
  call void @_ZNK22TolerantAssertComparerIN3P3D22MatrixRotationTemplateIdEEdEeqIS2_EES_IbdERKT_(ptr dead_on_unwind writable sret(%class.TolerantAssertComparer) align 8 %7, ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(72) %10)
  %39 = getelementptr inbounds %class.TolerantAssertComparer, ptr %7, i32 0, i32 1
  %40 = load ptr, ptr %39, align 8, !tbaa !9
  %41 = load i8, ptr %40, align 1, !tbaa !13, !range !15, !noundef !16
  %42 = trunc i8 %41 to i1
  %43 = xor i1 %42, true
  call void @llvm.lifetime.end.p0(i64 72, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #6
  br i1 %43, label %44, label %57

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

49:                                               ; preds = %44
  br label %50

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

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

53:                                               ; preds = %50
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %11, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %12, align 4
  call void @__cxa_free_exception(ptr %51) #6
  br label %87

57:                                               ; preds = %38
  %58 = call ptr @_ZTW15__testInterface()
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %58)
  br label %59

59:                                               ; preds = %57
  br label %60

60:                                               ; preds = %59
  br label %61

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

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

72:                                               ; preds = %67
  br label %73

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

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

76:                                               ; preds = %73
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %11, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %12, align 4
  call void @__cxa_free_exception(ptr %74) #6
  br label %87

80:                                               ; preds = %61
  %81 = call ptr @_ZTW15__testInterface()
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %81)
  br label %82

82:                                               ; preds = %80
  br label %83

83:                                               ; preds = %82
  call void @llvm.lifetime.end.p0(i64 72, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %5) #6
  br label %84

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

87:                                               ; preds = %76, %53
  call void @llvm.lifetime.end.p0(i64 72, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 72, 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 %97

88:                                               ; preds = %30
  br label %89

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

92:                                               ; preds = %25
  br label %93

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

96:                                               ; preds = %20
  ret void

97:                                               ; preds = %87
  %98 = load ptr, ptr %11, align 8
  %99 = load i32, ptr %12, align 4
  %100 = insertvalue { ptr, i32 } poison, ptr %98, 0
  %101 = insertvalue { ptr, i32 } %100, i32 %99, 1
  resume { ptr, i32 } %101
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D22MatrixRotationTemplateIdE18fromRotationMatrixERKNS_6MatrixIdLm3ELm3EEE(ptr dead_on_unwind noalias writable sret(%"class.P3D::MatrixRotationTemplate") align 8, ptr noundef nonnull align 8 dereferenceable(72)) #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)) #5 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)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3P3D22MatrixRotationTemplateIdE16asRotationMatrixEv(ptr dead_on_unwind noalias writable sret(%"class.P3D::Matrix") align 8, ptr noundef nonnull align 8 dereferenceable(72)) #1 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 = { 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, !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.P3D::MatrixRotationTemplate" = type { %"class.P3D::Matrix" }
%"class.P3D::Matrix" = type { [9 x double] }
%class.TolerantAssertComparer.1 = type { i32, ptr, double }
%class.TolerantAssertComparer = type { i32, ptr, double }
%struct.TolerantAssertBuilder = type { i32, double }
%class.TolerantAssertComparer.7 = type { i32, ptr, 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 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 #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 uwtable
declare dso_local void @_ZN3P3D22MatrixRotationTemplateIdE15fromEulerAnglesEddd(ptr dead_on_unwind noalias writable sret(%"class.P3D::MatrixRotationTemplate") align 8, double noundef, double noundef, double noundef) local_unnamed_addr #5 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK22TolerantAssertComparerIN3P3D22MatrixRotationTemplateIdEEdEeqIS2_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 #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z14rotationMatrixv() local_unnamed_addr #5 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.P3D::Matrix", align 8
  %2 = alloca %"class.P3D::MatrixRotationTemplate", align 8
  %3 = alloca %class.TolerantAssertComparer, align 8
  %4 = alloca %class.TolerantAssertComparer.1, align 8
  %5 = alloca %struct.TolerantAssertBuilder, align 8
  %6 = alloca %"class.P3D::MatrixRotationTemplate", align 8
  %7 = alloca %class.TolerantAssertComparer, align 8
  %8 = alloca %class.TolerantAssertComparer.7, align 8
  %9 = alloca %struct.TolerantAssertBuilder, align 8
  %10 = alloca %"class.P3D::Matrix", align 8
  %11 = getelementptr inbounds i8, ptr %3, i64 8
  %12 = getelementptr inbounds i8, ptr %7, i64 8
  br label %.preheader18

.preheader18:                                     ; preds = %0, %14
  %.01621 = phi double [ -1.550000e+00, %0 ], [ %15, %14 ]
  br label %.preheader

13:                                               ; preds = %14
  ret void

.preheader:                                       ; preds = %.preheader18, %17
  %.01520 = phi double [ -1.550000e+00, %.preheader18 ], [ %18, %17 ]
  br label %20

14:                                               ; preds = %17
  %15 = fadd double %.01621, 1.000000e-01
  %16 = fcmp olt double %15, 1.550000e+00
  br i1 %16, label %.preheader18, label %13, !llvm.loop !5

17:                                               ; preds = %40
  %18 = fadd double %.01520, 1.000000e-01
  %19 = fcmp olt double %18, 1.550000e+00
  br i1 %19, label %.preheader, label %14, !llvm.loop !7

20:                                               ; preds = %.preheader, %40
  %.01419 = phi double [ -1.550000e+00, %.preheader ], [ %41, %40 ]
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %1) #6
  call void @_ZN3P3D29rotationMatrixfromEulerAnglesIdEENS_6MatrixIT_Lm3ELm3EEES2_S2_S2_(ptr dead_on_unwind nonnull writable sret(%"class.P3D::Matrix") align 8 %1, double noundef %.01621, double noundef %.01520, double noundef %.01419)
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %2) #6
  call void @_ZN3P3D22MatrixRotationTemplateIdE15fromEulerAnglesEddd(ptr dead_on_unwind nonnull writable sret(%"class.P3D::MatrixRotationTemplate") align 8 %2, double noundef %.01621, double noundef %.01520, double noundef %.01419)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  call void @_ZN21TolerantAssertBuilderIdEC2Eid(ptr noundef nonnull align 8 dereferenceable(16) %5, i32 noundef 138, double noundef 1.000000e-08)
  call void @_ZNK21TolerantAssertBuilderIdEltIN3P3D22MatrixRotationTemplateIdEEEE22TolerantAssertComparerIT_dERKS6_(ptr dead_on_unwind nonnull writable sret(%class.TolerantAssertComparer.1) align 8 %4, ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(72) %2)
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %6) #6
  call void @_ZN3P3D22MatrixRotationTemplateIdE18fromRotationMatrixERKNS_6MatrixIdLm3ELm3EEE(ptr dead_on_unwind nonnull writable sret(%"class.P3D::MatrixRotationTemplate") align 8 %6, ptr noundef nonnull align 8 dereferenceable(72) %1)
  call void @_ZNK22TolerantAssertComparerIN3P3D22MatrixRotationTemplateIdEEdEeqIS2_EES_IbdERKT_(ptr dead_on_unwind nonnull writable sret(%class.TolerantAssertComparer) align 8 %3, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(72) %6)
  %21 = load ptr, ptr %11, align 8, !tbaa !8
  %22 = load i8, ptr %21, align 1, !tbaa !15, !range !17, !noundef !18
  %23 = trunc nuw i8 %22 to i1
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  %24 = call ptr @_ZTW15__testInterface()
  br i1 %23, label %30, label %25

25:                                               ; preds = %20
  %26 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %26, i32 noundef 138, ptr noundef nonnull @.str.3)
          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 %43

30:                                               ; preds = %20
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %24)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #6
  call void @_ZN21TolerantAssertBuilderIdEC2Eid(ptr noundef nonnull align 8 dereferenceable(16) %9, i32 noundef 139, double noundef 1.000000e-08)
  call void @_ZNK21TolerantAssertBuilderIdEltIN3P3D6MatrixIdLm3ELm3EEEEE22TolerantAssertComparerIT_dERKS6_(ptr dead_on_unwind nonnull writable sret(%class.TolerantAssertComparer.7) align 8 %8, ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(72) %1)
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %10) #6
  call void @_ZNK3P3D22MatrixRotationTemplateIdE16asRotationMatrixEv(ptr dead_on_unwind nonnull writable sret(%"class.P3D::Matrix") align 8 %10, ptr noundef nonnull align 8 dereferenceable(72) %2)
  call void @_ZNK22TolerantAssertComparerIN3P3D6MatrixIdLm3ELm3EEEdEeqIS2_EES_IbdERKT_(ptr dead_on_unwind nonnull writable sret(%class.TolerantAssertComparer) align 8 %7, ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(72) %10)
  %31 = load ptr, ptr %12, align 8, !tbaa !8
  %32 = load i8, ptr %31, align 1, !tbaa !15, !range !17, !noundef !18
  %33 = trunc nuw i8 %32 to i1
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  %34 = call ptr @_ZTW15__testInterface()
  br i1 %33, label %40, label %35

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

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

38:                                               ; preds = %35
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %43

40:                                               ; preds = %30
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %34)
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %1) #6
  %41 = fadd double %.01419, 1.000000e-01
  %42 = fcmp olt double %41, 1.550000e+00
  br i1 %42, label %20, label %17, !llvm.loop !19

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D22MatrixRotationTemplateIdE18fromRotationMatrixERKNS_6MatrixIdLm3ELm3EEE(ptr dead_on_unwind noalias writable sret(%"class.P3D::MatrixRotationTemplate") align 8, ptr noundef nonnull align 8 dereferenceable(72)) 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 #5 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 #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3P3D22MatrixRotationTemplateIdE16asRotationMatrixEv(ptr dead_on_unwind noalias writable sret(%"class.P3D::Matrix") align 8, ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #1 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 = { 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 = 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