; LLVM IR from ThePhysicsGuys/Physics3D :: tests/motionTests.ll (Z37testExtendingRelativeMotionVecCorrectv)

; 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.1 = type { i32, ptr, double }
%"struct.P3D::Motion" = type { %"struct.P3D::TranslationalMotion", %"struct.P3D::RotationalMotion" }
%"struct.P3D::TranslationalMotion" = type { %"struct.P3D::TaylorExpansion" }
%"struct.P3D::TaylorExpansion" = type { %"struct.P3D::Derivatives" }
%"struct.P3D::Derivatives" = type { [2 x %"struct.P3D::Vector"] }
%"struct.P3D::Vector" = type { %union.anon }
%union.anon = type { [3 x double] }
%"struct.P3D::RotationalMotion" = type { %"struct.P3D::TaylorExpansion" }
%class.TolerantAssertComparer = type { i32, ptr, double }
%"struct.P3D::RelativeMotion" = type { %"struct.P3D::Motion", %"struct.P3D::CFrameTemplate" }
%"struct.P3D::CFrameTemplate" = type { %"struct.P3D::Vector", %"class.P3D::MatrixRotationTemplate" }
%"class.P3D::MatrixRotationTemplate" = type { %"class.P3D::Matrix" }
%"class.P3D::Matrix" = type { [9 x double] }
%struct.TolerantAssertBuilder = type { i32, 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: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN21TolerantAssertBuilderIdEC2Eid(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, double noundef) unnamed_addr #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 @_ZNK21TolerantAssertBuilderIdEltIN3P3D6MotionEEE22TolerantAssertComparerIT_dERKS5_(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(96)) #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK3P3D6Motion16getMotionOfPointENS_6VectorIdLm3EEE(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Motion") align 8, ptr noundef nonnull align 8 dereferenceable(96), ptr noundef byval(%"struct.P3D::Vector") align 8) #7 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3P3D26createRandomRelativeMotionEv(ptr dead_on_unwind noalias writable sret(%"struct.P3D::RelativeMotion") align 8) #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D23createRandomNonzeroVec3Ev(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector") align 8) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK3P3D14RelativeMotion11extendBeginERKNS_6VectorIdLm3EEE(ptr dead_on_unwind noalias writable sret(%"struct.P3D::RelativeMotion") align 8, ptr noundef nonnull align 8 dereferenceable(192), ptr noundef nonnull align 8 dereferenceable(24)) #7 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z37testExtendingRelativeMotionVecCorrectv() #6 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"struct.P3D::RelativeMotion", align 8
  %2 = alloca %"struct.P3D::Motion", align 8
  %3 = alloca %"struct.P3D::Vector", align 8
  %4 = alloca %"struct.P3D::Vector", align 8
  %5 = alloca %"struct.P3D::Motion", align 8
  %6 = alloca %"struct.P3D::Vector", align 8
  %7 = alloca %"struct.P3D::Motion", align 8
  %8 = alloca %"struct.P3D::Motion", align 8
  %9 = alloca %"struct.P3D::Vector", align 8
  %10 = alloca %"struct.P3D::RelativeMotion", align 8
  %11 = alloca %class.TolerantAssertComparer, align 8
  %12 = alloca %class.TolerantAssertComparer.1, align 8
  %13 = alloca %struct.TolerantAssertBuilder, align 8
  %14 = alloca %"struct.P3D::Motion", align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 192, ptr %1) #8
  call void @_ZN3P3D26createRandomRelativeMotionEv(ptr dead_on_unwind writable sret(%"struct.P3D::RelativeMotion") align 8 %1)
  call void @llvm.lifetime.start.p0(i64 96, ptr %2) #8
  call void @_ZN3P3D18createRandomMotionEv(ptr dead_on_unwind writable sret(%"struct.P3D::Motion") align 8 %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #8
  call void @_ZN3P3D23createRandomNonzeroVec3Ev(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #8
  call void @_ZN3P3D23createRandomNonzeroVec3Ev(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %4)
  call void @llvm.lifetime.start.p0(i64 96, ptr %5) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %6, ptr align 8 %3, i64 24, i1 false), !tbaa.struct !5
  call void @_ZNK3P3D6Motion16getMotionOfPointENS_6VectorIdLm3EEE(ptr dead_on_unwind writable sret(%"struct.P3D::Motion") align 8 %5, ptr noundef nonnull align 8 dereferenceable(96) %2, ptr noundef byval(%"struct.P3D::Vector") align 8 %6)
  call void @llvm.lifetime.start.p0(i64 96, ptr %7) #8
  call void @llvm.lifetime.start.p0(i64 96, ptr %8) #8
  %17 = getelementptr inbounds %"struct.P3D::RelativeMotion", ptr %1, i32 0, i32 1
  call void @_ZNK3P3D14CFrameTemplateIdE11getPositionEv(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %9, ptr noundef nonnull align 8 dereferenceable(96) %17)
  call void @_ZNK3P3D6Motion16getMotionOfPointENS_6VectorIdLm3EEE(ptr dead_on_unwind writable sret(%"struct.P3D::Motion") align 8 %8, ptr noundef nonnull align 8 dereferenceable(96) %5, ptr noundef byval(%"struct.P3D::Vector") align 8 %9)
  %18 = getelementptr inbounds %"struct.P3D::RelativeMotion", ptr %1, i32 0, i32 0
  call void @_ZNK3P3D6Motion17addRelativeMotionERKS0_(ptr dead_on_unwind writable sret(%"struct.P3D::Motion") align 8 %7, ptr noundef nonnull align 8 dereferenceable(96) %8, ptr noundef nonnull align 8 dereferenceable(96) %18)
  call void @llvm.lifetime.end.p0(i64 96, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 192, ptr %10) #8
  call void @_ZNK3P3D14RelativeMotion11extendBeginERKNS_6VectorIdLm3EEE(ptr dead_on_unwind writable sret(%"struct.P3D::RelativeMotion") align 8 %10, ptr noundef nonnull align 8 dereferenceable(192) %1, ptr noundef nonnull align 8 dereferenceable(24) %3)
  br label %19

19:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #8
  call void @_ZN21TolerantAssertBuilderIdEC2Eid(ptr noundef nonnull align 8 dereferenceable(16) %13, i32 noundef 144, double noundef 5.000000e-03)
  call void @_ZNK21TolerantAssertBuilderIdEltIN3P3D6MotionEEE22TolerantAssertComparerIT_dERKS5_(ptr dead_on_unwind writable sret(%class.TolerantAssertComparer.1) align 8 %12, ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(96) %7)
  call void @llvm.lifetime.start.p0(i64 96, ptr %14) #8
  call void @_ZNK3P3D14RelativeMotion7applyToERKNS_6MotionE(ptr dead_on_unwind writable sret(%"struct.P3D::Motion") align 8 %14, ptr noundef nonnull align 8 dereferenceable(192) %10, ptr noundef nonnull align 8 dereferenceable(96) %2)
  call void @_ZNK22TolerantAssertComparerIN3P3D6MotionEdEeqIS1_EES_IbdERKT_(ptr dead_on_unwind writable sret(%class.TolerantAssertComparer) align 8 %11, ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(96) %14)
  %20 = getelementptr inbounds %class.TolerantAssertComparer, ptr %11, i32 0, i32 1
  %21 = load ptr, ptr %20, align 8, !tbaa !9
  %22 = load i8, ptr %21, align 1, !tbaa !14, !range !16, !noundef !17
  %23 = trunc i8 %22 to i1
  %24 = xor i1 %23, true
  call void @llvm.lifetime.end.p0(i64 96, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #8
  br i1 %24, label %25, label %38

25:                                               ; preds = %19
  %26 = call ptr @_ZTW15__testInterface()
  %27 = getelementptr inbounds %class.TestInterface, ptr %26, i32 0, i32 1
  %28 = load i8, ptr %27, align 8, !tbaa !18, !range !16, !noundef !17
  %29 = trunc i8 %28 to i1
  br i1 %29, label %30, label %31

30:                                               ; preds = %25
  br label %31

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

33:                                               ; preds = %31
  call void @__cxa_throw(ptr %32, ptr @_ZTI14AssertionError, ptr null) #9
  unreachable

34:                                               ; preds = %31
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %15, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %16, align 4
  call void @__cxa_free_exception(ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 192, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 96, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 96, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 96, ptr %2) #8
  call void @llvm.lifetime.end.p0(i64 192, ptr %1) #8
  br label %42

38:                                               ; preds = %19
  %39 = call ptr @_ZTW15__testInterface()
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %39)
  br label %40

40:                                               ; preds = %38
  br label %41

41:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 192, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 96, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 96, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 96, ptr %2) #8
  call void @llvm.lifetime.end.p0(i64 192, ptr %1) #8
  ret void

42:                                               ; preds = %34
  %43 = load ptr, ptr %15, align 8
  %44 = load i32, ptr %16, align 4
  %45 = insertvalue { ptr, i32 } poison, ptr %43, 0
  %46 = insertvalue { ptr, i32 } %45, i32 %44, 1
  resume { ptr, i32 } %46
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3P3D18createRandomMotionEv(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Motion") align 8) #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK3P3D6Motion17addRelativeMotionERKS0_(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Motion") align 8, ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(96)) #7 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK3P3D14RelativeMotion7applyToERKNS_6MotionE(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Motion") align 8, ptr noundef nonnull align 8 dereferenceable(192), ptr noundef nonnull align 8 dereferenceable(96)) #7 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { 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 #7 = { inlinehint 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 #8 = { nounwind }
attributes #9 = { 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 = !{i64 0, i64 24, !6}
!6 = !{!7, !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, !13, i64 16}
!11 = !{!"int", !7, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = !{!19, !15, i64 8}
!19 = !{!"_ZTS13TestInterface", !20, i64 0, !15, i64 8}
!20 = !{!"long", !7, 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"

%class.TolerantAssertComparer.1 = type { i32, ptr, double }
%"struct.P3D::Motion" = type { %"struct.P3D::TranslationalMotion", %"struct.P3D::RotationalMotion" }
%"struct.P3D::TranslationalMotion" = type { %"struct.P3D::TaylorExpansion" }
%"struct.P3D::TaylorExpansion" = type { %"struct.P3D::Derivatives" }
%"struct.P3D::Derivatives" = type { [2 x %"struct.P3D::Vector"] }
%"struct.P3D::Vector" = type { %union.anon }
%union.anon = type { [3 x double] }
%"struct.P3D::RotationalMotion" = type { %"struct.P3D::TaylorExpansion" }
%class.TolerantAssertComparer = type { i32, ptr, double }
%"struct.P3D::RelativeMotion" = type { %"struct.P3D::Motion", %"struct.P3D::CFrameTemplate" }
%"struct.P3D::CFrameTemplate" = type { %"struct.P3D::Vector", %"class.P3D::MatrixRotationTemplate" }
%"class.P3D::MatrixRotationTemplate" = type { %"class.P3D::Matrix" }
%"class.P3D::Matrix" = type { [9 x double] }
%struct.TolerantAssertBuilder = type { i32, 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 @_ZNK21TolerantAssertBuilderIdEltIN3P3D6MotionEEE22TolerantAssertComparerIT_dERKS5_(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(96)) local_unnamed_addr #5 align 2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3P3D26createRandomRelativeMotionEv(ptr dead_on_unwind noalias writable sret(%"struct.P3D::RelativeMotion") align 8) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D23createRandomNonzeroVec3Ev(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector") align 8) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK3P3D14RelativeMotion11extendBeginERKNS_6VectorIdLm3EEE(ptr dead_on_unwind noalias writable sret(%"struct.P3D::RelativeMotion") align 8, ptr noundef nonnull align 8 dereferenceable(192), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z37testExtendingRelativeMotionVecCorrectv() local_unnamed_addr #5 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"struct.P3D::RelativeMotion", align 8
  %2 = alloca %"struct.P3D::Motion", align 8
  %3 = alloca %"struct.P3D::Vector", align 8
  %4 = alloca %"struct.P3D::Vector", align 8
  %5 = alloca %"struct.P3D::Motion", align 8
  %6 = alloca %"struct.P3D::Motion", align 8
  %7 = alloca %"struct.P3D::Motion", align 8
  %8 = alloca %"struct.P3D::Vector", align 8
  %9 = alloca %"struct.P3D::RelativeMotion", align 8
  %10 = alloca %class.TolerantAssertComparer, align 8
  %11 = alloca %class.TolerantAssertComparer.1, align 8
  %12 = alloca %struct.TolerantAssertBuilder, align 8
  %13 = alloca %"struct.P3D::Motion", align 8
  call void @llvm.lifetime.start.p0(i64 192, ptr nonnull %1) #7
  call void @_ZN3P3D26createRandomRelativeMotionEv(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::RelativeMotion") align 8 %1)
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %2) #7
  call void @_ZN3P3D18createRandomMotionEv(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Motion") align 8 %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #7
  call void @_ZN3P3D23createRandomNonzeroVec3Ev(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #7
  call void @_ZN3P3D23createRandomNonzeroVec3Ev(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %4)
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %5) #7
  call void @_ZNK3P3D6Motion16getMotionOfPointENS_6VectorIdLm3EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Motion") align 8 %5, ptr noundef nonnull align 8 dereferenceable(96) %2, ptr noundef nonnull byval(%"struct.P3D::Vector") align 8 %3)
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %7) #7
  %14 = getelementptr inbounds i8, ptr %1, i64 96
  call void @_ZNK3P3D14CFrameTemplateIdE11getPositionEv(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %8, ptr noundef nonnull align 8 dereferenceable(96) %14)
  call void @_ZNK3P3D6Motion16getMotionOfPointENS_6VectorIdLm3EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Motion") align 8 %7, ptr noundef nonnull align 8 dereferenceable(96) %5, ptr noundef nonnull byval(%"struct.P3D::Vector") align 8 %8)
  call void @_ZNK3P3D6Motion17addRelativeMotionERKS0_(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Motion") align 8 %6, ptr noundef nonnull align 8 dereferenceable(96) %7, ptr noundef nonnull align 8 dereferenceable(96) %1)
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 192, ptr nonnull %9) #7
  call void @_ZNK3P3D14RelativeMotion11extendBeginERKNS_6VectorIdLm3EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::RelativeMotion") align 8 %9, ptr noundef nonnull align 8 dereferenceable(192) %1, ptr noundef nonnull align 8 dereferenceable(24) %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #7
  call void @_ZN21TolerantAssertBuilderIdEC2Eid(ptr noundef nonnull align 8 dereferenceable(16) %12, i32 noundef 144, double noundef 5.000000e-03)
  call void @_ZNK21TolerantAssertBuilderIdEltIN3P3D6MotionEEE22TolerantAssertComparerIT_dERKS5_(ptr dead_on_unwind nonnull writable sret(%class.TolerantAssertComparer.1) align 8 %11, ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(96) %6)
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %13) #7
  call void @_ZNK3P3D14RelativeMotion7applyToERKNS_6MotionE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Motion") align 8 %13, ptr noundef nonnull align 8 dereferenceable(192) %9, ptr noundef nonnull align 8 dereferenceable(96) %2)
  call void @_ZNK22TolerantAssertComparerIN3P3D6MotionEdEeqIS1_EES_IbdERKT_(ptr dead_on_unwind nonnull writable sret(%class.TolerantAssertComparer) align 8 %10, ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(96) %13)
  %15 = getelementptr inbounds i8, ptr %10, i64 8
  %16 = load ptr, ptr %15, align 8, !tbaa !5
  %17 = load i8, ptr %16, align 1, !tbaa !12, !range !14, !noundef !15
  %18 = trunc nuw i8 %17 to i1
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #7
  %19 = call ptr @_ZTW15__testInterface()
  br i1 %18, label %25, label %20

20:                                               ; preds = %0
  %21 = call ptr @__cxa_allocate_exception(i64 16) #7
  invoke void @_ZN14AssertionErrorC1EiPKc(ptr noundef nonnull align 8 dereferenceable(12) %21, i32 noundef 144, ptr noundef nonnull @.str.3)
          to label %22 unwind label %23

22:                                               ; preds = %20
  call void @__cxa_throw(ptr nonnull %21, ptr nonnull @_ZTI14AssertionError, ptr null) #8
  unreachable

23:                                               ; preds = %20
  %24 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 192, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 192, ptr nonnull %1) #7
  resume { ptr, i32 } %24

25:                                               ; preds = %0
  call void @_ZN13TestInterface10markAssertEv(ptr noundef nonnull align 8 dereferenceable(9) %19)
  call void @llvm.lifetime.end.p0(i64 192, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 192, ptr nonnull %1) #7
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3P3D18createRandomMotionEv(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Motion") align 8) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK3P3D6Motion17addRelativeMotionERKS0_(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Motion") align 8, ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK3P3D14RelativeMotion7applyToERKNS_6MotionE(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Motion") align 8, ptr noundef nonnull align 8 dereferenceable(192), ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #6 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 = { inlinehint 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 #7 = { nounwind }
attributes #8 = { 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: DSEPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,SROAPass,SimplifyCFGPass