; LLVM IR from idmillington/cyclone-physics :: src/body.ll (ZN7cyclone9RigidBody9integrateEd)

; 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.cyclone::Vector3" = type { double, double, double, double }
%"class.cyclone::RigidBody" = type { double, %"class.cyclone::Matrix3", double, double, %"class.cyclone::Vector3", %"class.cyclone::Quaternion", %"class.cyclone::Vector3", %"class.cyclone::Vector3", %"class.cyclone::Matrix3", double, i8, i8, %"class.cyclone::Matrix4", %"class.cyclone::Vector3", %"class.cyclone::Vector3", %"class.cyclone::Vector3", %"class.cyclone::Vector3" }
%"class.cyclone::Quaternion" = type { %union.anon }
%union.anon = type { %struct.anon }
%struct.anon = type { double, double, double, double }
%"class.cyclone::Matrix3" = type { [9 x double] }
%"class.cyclone::Matrix4" = type { [12 x double] }

@_ZN7cyclone12sleepEpsilonE = external global double, align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7cyclone9RigidBody20calculateDerivedDataEv(ptr noundef nonnull align 8 dereferenceable(536)) #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7cyclone9RigidBody9integrateEd(ptr noundef nonnull align 8 dereferenceable(536) %0, double noundef %1) #0 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca double, align 8
  %5 = alloca %"class.cyclone::Vector3", align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store double %1, ptr %4, align 8, !tbaa !9
  %8 = load ptr, ptr %3, align 8
  %9 = getelementptr inbounds %"class.cyclone::RigidBody", ptr %8, i32 0, i32 10
  %10 = load i8, ptr %9, align 8, !tbaa !11, !range !18, !noundef !19
  %11 = trunc i8 %10 to i1
  br i1 %11, label %13, label %12

12:                                               ; preds = %2
  br label %83

13:                                               ; preds = %2
  %14 = getelementptr inbounds %"class.cyclone::RigidBody", ptr %8, i32 0, i32 15
  %15 = getelementptr inbounds %"class.cyclone::RigidBody", ptr %8, i32 0, i32 16
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %15, ptr align 8 %14, i64 32, i1 false), !tbaa.struct !20
  %16 = getelementptr inbounds %"class.cyclone::RigidBody", ptr %8, i32 0, i32 16
  %17 = getelementptr inbounds %"class.cyclone::RigidBody", ptr %8, i32 0, i32 13
  %18 = getelementptr inbounds %"class.cyclone::RigidBody", ptr %8, i32 0, i32 0
  %19 = load double, ptr %18, align 8, !tbaa !21
  call void @_ZN7cyclone7Vector315addScaledVectorERKS0_d(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(32) %17, double noundef %19)
  call void @llvm.lifetime.start.p0(i64 32, ptr %5) #6
  %20 = getelementptr inbounds %"class.cyclone::RigidBody", ptr %8, i32 0, i32 8
  %21 = getelementptr inbounds %"class.cyclone::RigidBody", ptr %8, i32 0, i32 14
  call void @_ZNK7cyclone7Matrix39transformERKNS_7Vector3E(ptr dead_on_unwind writable sret(%"class.cyclone::Vector3") align 8 %5, ptr noundef nonnull align 8 dereferenceable(72) %20, ptr noundef nonnull align 8 dereferenceable(32) %21)
  %22 = getelementptr inbounds %"class.cyclone::RigidBody", ptr %8, i32 0, i32 6
  %23 = getelementptr inbounds %"class.cyclone::RigidBody", ptr %8, i32 0, i32 16
  %24 = load double, ptr %4, align 8, !tbaa !9
  call void @_ZN7cyclone7Vector315addScaledVectorERKS0_d(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef nonnull align 8 dereferenceable(32) %23, double noundef %24)
  %25 = getelementptr inbounds %"class.cyclone::RigidBody", ptr %8, i32 0, i32 7
  %26 = load double, ptr %4, align 8, !tbaa !9
  call void @_ZN7cyclone7Vector315addScaledVectorERKS0_d(ptr noundef nonnull align 8 dereferenceable(32) %25, ptr noundef nonnull align 8 dereferenceable(32) %5, double noundef %26)
  %27 = getelementptr inbounds %"class.cyclone::RigidBody", ptr %8, i32 0, i32 2
  %28 = load double, ptr %27, align 8, !tbaa !22
  %29 = load double, ptr %4, align 8, !tbaa !9
  %30 = call double @pow(double noundef %28, double noundef %29) #6
  %31 = getelementptr inbounds %"class.cyclone::RigidBody", ptr %8, i32 0, i32 6
  call void @_ZN7cyclone7Vector3mLEd(ptr noundef nonnull align 8 dereferenceable(32) %31, double noundef %30)
  %32 = getelementptr inbounds %"class.cyclone::RigidBody", ptr %8, i32 0, i32 3
  %33 = load double, ptr %32, align 8, !tbaa !23
  %34 = load double, ptr %4, align 8, !tbaa !9
  %35 = call double @pow(double noundef %33, double noundef %34) #6
  %36 = getelementptr inbounds %"class.cyclone::RigidBody", ptr %8, i32 0, i32 7
  call void @_ZN7cyclone7Vector3mLEd(ptr noundef nonnull align 8 dereferenceable(32) %36, double noundef %35)
  %37 = getelementptr inbounds %"class.cyclone::RigidBody", ptr %8, i32 0, i32 4
  %38 = getelementptr inbounds %"class.cyclone::RigidBody", ptr %8, i32 0, i32 6
  %39 = load double, ptr %4, align 8, !tbaa !9
  call void @_ZN7cyclone7Vector315addScaledVectorERKS0_d(ptr noundef nonnull align 8 dereferenceable(32) %37, ptr noundef nonnull align 8 dereferenceable(32) %38, double noundef %39)
  %40 = getelementptr inbounds %"class.cyclone::RigidBody", ptr %8, i32 0, i32 5
  %41 = getelementptr inbounds %"class.cyclone::RigidBody", ptr %8, i32 0, i32 7
  %42 = load double, ptr %4, align 8, !tbaa !9
  call void @_ZN7cyclone10Quaternion15addScaledVectorERKNS_7Vector3Ed(ptr noundef nonnull align 8 dereferenceable(32) %40, ptr noundef nonnull align 8 dereferenceable(32) %41, double noundef %42)
  call void @_ZN7cyclone9RigidBody20calculateDerivedDataEv(ptr noundef nonnull align 8 dereferenceable(536) %8)
  call void @_ZN7cyclone9RigidBody17clearAccumulatorsEv(ptr noundef nonnull align 8 dereferenceable(536) %8)
  %43 = getelementptr inbounds %"class.cyclone::RigidBody", ptr %8, i32 0, i32 11
  %44 = load i8, ptr %43, align 1, !tbaa !24, !range !18, !noundef !19
  %45 = trunc i8 %44 to i1
  br i1 %45, label %46, label %82

46:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %47 = getelementptr inbounds %"class.cyclone::RigidBody", ptr %8, i32 0, i32 6
  %48 = getelementptr inbounds %"class.cyclone::RigidBody", ptr %8, i32 0, i32 6
  %49 = call noundef double @_ZNK7cyclone7Vector313scalarProductERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %47, ptr noundef nonnull align 8 dereferenceable(32) %48)
  %50 = getelementptr inbounds %"class.cyclone::RigidBody", ptr %8, i32 0, i32 7
  %51 = getelementptr inbounds %"class.cyclone::RigidBody", ptr %8, i32 0, i32 7
  %52 = call noundef double @_ZNK7cyclone7Vector313scalarProductERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %50, ptr noundef nonnull align 8 dereferenceable(32) %51)
  %53 = fadd double %49, %52
  store double %53, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %54 = load double, ptr %4, align 8, !tbaa !9
  %55 = call double @pow(double noundef 5.000000e-01, double noundef %54) #6
  store double %55, ptr %7, align 8, !tbaa !9
  %56 = load double, ptr %7, align 8, !tbaa !9
  %57 = getelementptr inbounds %"class.cyclone::RigidBody", ptr %8, i32 0, i32 9
  %58 = load double, ptr %57, align 8, !tbaa !25
  %59 = load double, ptr %7, align 8, !tbaa !9
  %60 = fsub double 1.000000e+00, %59
  %61 = load double, ptr %6, align 8, !tbaa !9
  %62 = fmul double %60, %61
  %63 = call double @llvm.fmuladd.f64(double %56, double %58, double %62)
  %64 = getelementptr inbounds %"class.cyclone::RigidBody", ptr %8, i32 0, i32 9
  store double %63, ptr %64, align 8, !tbaa !25
  %65 = getelementptr inbounds %"class.cyclone::RigidBody", ptr %8, i32 0, i32 9
  %66 = load double, ptr %65, align 8, !tbaa !25
  %67 = load double, ptr @_ZN7cyclone12sleepEpsilonE, align 8, !tbaa !9
  %68 = fcmp olt double %66, %67
  br i1 %68, label %69, label %70

69:                                               ; preds = %46
  call void @_ZN7cyclone9RigidBody8setAwakeEb(ptr noundef nonnull align 8 dereferenceable(536) %8, i1 noundef zeroext false)
  br label %81

70:                                               ; preds = %46
  %71 = getelementptr inbounds %"class.cyclone::RigidBody", ptr %8, i32 0, i32 9
  %72 = load double, ptr %71, align 8, !tbaa !25
  %73 = load double, ptr @_ZN7cyclone12sleepEpsilonE, align 8, !tbaa !9
  %74 = fmul double 1.000000e+01, %73
  %75 = fcmp ogt double %72, %74
  br i1 %75, label %76, label %80

76:                                               ; preds = %70
  %77 = load double, ptr @_ZN7cyclone12sleepEpsilonE, align 8, !tbaa !9
  %78 = fmul double 1.000000e+01, %77
  %79 = getelementptr inbounds %"class.cyclone::RigidBody", ptr %8, i32 0, i32 9
  store double %78, ptr %79, align 8, !tbaa !25
  br label %80

80:                                               ; preds = %76, %70
  br label %81

81:                                               ; preds = %80, %69
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %82

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

83:                                               ; preds = %82, %12
  ret void
}

; 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 @_ZN7cyclone7Vector315addScaledVectorERKS0_d(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), double noundef) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7cyclone7Matrix39transformERKNS_7Vector3E(ptr dead_on_unwind noalias writable sret(%"class.cyclone::Vector3") align 8, ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

; Function Attrs: nounwind
declare double @pow(double noundef, double noundef) #4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7cyclone10Quaternion15addScaledVectorERKNS_7Vector3Ed(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), double noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7cyclone9RigidBody17clearAccumulatorsEv(ptr noundef nonnull align 8 dereferenceable(536)) #0 align 2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7cyclone9RigidBody8setAwakeEb(ptr noundef nonnull align 8 dereferenceable(536), i1 noundef zeroext) #0 align 2

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

attributes #0 = { 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 #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !16, i64 304}
!12 = !{!"_ZTSN7cyclone9RigidBodyE", !10, i64 0, !13, i64 8, !10, i64 80, !10, i64 88, !14, i64 96, !15, i64 128, !14, i64 160, !14, i64 192, !13, i64 224, !10, i64 296, !16, i64 304, !16, i64 305, !17, i64 312, !14, i64 408, !14, i64 440, !14, i64 472, !14, i64 504}
!13 = !{!"_ZTSN7cyclone7Matrix3E", !7, i64 0}
!14 = !{!"_ZTSN7cyclone7Vector3E", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24}
!15 = !{!"_ZTSN7cyclone10QuaternionE", !7, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = !{!"_ZTSN7cyclone7Matrix4E", !7, i64 0}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = !{i64 0, i64 8, !9, i64 8, i64 8, !9, i64 16, i64 8, !9, i64 24, i64 8, !9}
!21 = !{!12, !10, i64 0}
!22 = !{!12, !10, i64 80}
!23 = !{!12, !10, i64 88}
!24 = !{!12, !16, i64 305}
!25 = !{!12, !10, i64 296}


; 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.cyclone::Vector3" = type { double, double, double, double }

@_ZN7cyclone12sleepEpsilonE = external local_unnamed_addr global double, align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7cyclone9RigidBody20calculateDerivedDataEv(ptr noundef nonnull align 8 dereferenceable(536)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7cyclone9RigidBody9integrateEd(ptr noundef nonnull align 8 dereferenceable(536) %0, double noundef %1) local_unnamed_addr #0 align 2 {
  %3 = alloca %"class.cyclone::Vector3", align 8
  %4 = getelementptr inbounds i8, ptr %0, i64 304
  %5 = load i8, ptr %4, align 8, !tbaa !5, !range !15, !noundef !16
  %6 = trunc nuw i8 %5 to i1
  br i1 %6, label %7, label %44

7:                                                ; preds = %2
  %8 = getelementptr inbounds i8, ptr %0, i64 472
  %9 = getelementptr inbounds i8, ptr %0, i64 504
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(32) %8, i64 32, i1 false), !tbaa.struct !17
  %10 = getelementptr inbounds i8, ptr %0, i64 408
  %11 = load double, ptr %0, align 8, !tbaa !19
  tail call void @_ZN7cyclone7Vector315addScaledVectorERKS0_d(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(32) %10, double noundef %11)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #6
  %12 = getelementptr inbounds i8, ptr %0, i64 224
  %13 = getelementptr inbounds i8, ptr %0, i64 440
  call void @_ZNK7cyclone7Matrix39transformERKNS_7Vector3E(ptr dead_on_unwind nonnull writable sret(%"class.cyclone::Vector3") align 8 %3, ptr noundef nonnull align 8 dereferenceable(72) %12, ptr noundef nonnull align 8 dereferenceable(32) %13)
  %14 = getelementptr inbounds i8, ptr %0, i64 160
  call void @_ZN7cyclone7Vector315addScaledVectorERKS0_d(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(32) %9, double noundef %1)
  %15 = getelementptr inbounds i8, ptr %0, i64 192
  call void @_ZN7cyclone7Vector315addScaledVectorERKS0_d(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull align 8 dereferenceable(32) %3, double noundef %1)
  %16 = getelementptr inbounds i8, ptr %0, i64 80
  %17 = load double, ptr %16, align 8, !tbaa !20
  %18 = call double @pow(double noundef %17, double noundef %1) #6
  call void @_ZN7cyclone7Vector3mLEd(ptr noundef nonnull align 8 dereferenceable(32) %14, double noundef %18)
  %19 = getelementptr inbounds i8, ptr %0, i64 88
  %20 = load double, ptr %19, align 8, !tbaa !21
  %21 = call double @pow(double noundef %20, double noundef %1) #6
  call void @_ZN7cyclone7Vector3mLEd(ptr noundef nonnull align 8 dereferenceable(32) %15, double noundef %21)
  %22 = getelementptr inbounds i8, ptr %0, i64 96
  call void @_ZN7cyclone7Vector315addScaledVectorERKS0_d(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef nonnull align 8 dereferenceable(32) %14, double noundef %1)
  %23 = getelementptr inbounds i8, ptr %0, i64 128
  call void @_ZN7cyclone10Quaternion15addScaledVectorERKNS_7Vector3Ed(ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef nonnull align 8 dereferenceable(32) %15, double noundef %1)
  call void @_ZN7cyclone9RigidBody20calculateDerivedDataEv(ptr noundef nonnull align 8 dereferenceable(536) %0)
  call void @_ZN7cyclone9RigidBody17clearAccumulatorsEv(ptr noundef nonnull align 8 dereferenceable(536) %0)
  %24 = getelementptr inbounds i8, ptr %0, i64 305
  %25 = load i8, ptr %24, align 1, !tbaa !22, !range !15, !noundef !16
  %26 = trunc nuw i8 %25 to i1
  br i1 %26, label %27, label %43

27:                                               ; preds = %7
  %28 = call noundef double @_ZNK7cyclone7Vector313scalarProductERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(32) %14)
  %29 = call noundef double @_ZNK7cyclone7Vector313scalarProductERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull align 8 dereferenceable(32) %15)
  %30 = fadd double %28, %29
  %mul = fneg double %1
  %exp2 = call double @exp2(double %mul)
  %31 = getelementptr inbounds i8, ptr %0, i64 296
  %32 = load double, ptr %31, align 8, !tbaa !23
  %33 = fsub double 1.000000e+00, %exp2
  %34 = fmul double %30, %33
  %35 = call double @llvm.fmuladd.f64(double %exp2, double %32, double %34)
  store double %35, ptr %31, align 8, !tbaa !23
  %36 = load double, ptr @_ZN7cyclone12sleepEpsilonE, align 8, !tbaa !18
  %37 = fcmp olt double %35, %36
  br i1 %37, label %38, label %39

38:                                               ; preds = %27
  call void @_ZN7cyclone9RigidBody8setAwakeEb(ptr noundef nonnull align 8 dereferenceable(536) %0, i1 noundef zeroext false)
  br label %43

39:                                               ; preds = %27
  %40 = fmul double %36, 1.000000e+01
  %41 = fcmp ogt double %35, %40
  br i1 %41, label %42, label %43

42:                                               ; preds = %39
  store double %40, ptr %31, align 8, !tbaa !23
  br label %43

43:                                               ; preds = %38, %42, %39, %7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  br label %44

44:                                               ; preds = %2, %43
  ret void
}

; Function Attrs: mustprogress 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 @_ZN7cyclone7Vector315addScaledVectorERKS0_d(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), double noundef) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7cyclone7Matrix39transformERKNS_7Vector3E(ptr dead_on_unwind noalias writable sret(%"class.cyclone::Vector3") align 8, ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @pow(double noundef, double noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7cyclone10Quaternion15addScaledVectorERKNS_7Vector3Ed(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), double noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7cyclone9RigidBody17clearAccumulatorsEv(ptr noundef nonnull align 8 dereferenceable(536)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK7cyclone7Vector313scalarProductERKS0_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7cyclone9RigidBody8setAwakeEb(ptr noundef nonnull align 8 dereferenceable(536), i1 noundef zeroext) local_unnamed_addr #0 align 2

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

declare double @exp2(double) local_unnamed_addr

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !13, i64 304}
!6 = !{!"_ZTSN7cyclone9RigidBodyE", !7, i64 0, !10, i64 8, !7, i64 80, !7, i64 88, !11, i64 96, !12, i64 128, !11, i64 160, !11, i64 192, !10, i64 224, !7, i64 296, !13, i64 304, !13, i64 305, !14, i64 312, !11, i64 408, !11, i64 440, !11, i64 472, !11, i64 504}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN7cyclone7Matrix3E", !8, i64 0}
!11 = !{!"_ZTSN7cyclone7Vector3E", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}
!12 = !{!"_ZTSN7cyclone10QuaternionE", !8, i64 0}
!13 = !{!"bool", !8, i64 0}
!14 = !{!"_ZTSN7cyclone7Matrix4E", !8, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{i64 0, i64 8, !18, i64 8, i64 8, !18, i64 16, i64 8, !18, i64 24, i64 8, !18}
!18 = !{!7, !7, i64 0}
!19 = !{!6, !7, i64 0}
!20 = !{!6, !7, i64 80}
!21 = !{!6, !7, i64 88}
!22 = !{!6, !13, i64 305}
!23 = !{!6, !7, i64 296}


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