; LLVM IR from idmillington/cyclone-physics :: src/pfgen.ll (ZN7cyclone18ParticleFakeSpring11updateForceEPNS_8ParticleEd)

; 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::ParticleFakeSpring" = type { %"class.cyclone::ParticleForceGenerator", ptr, double, double }
%"class.cyclone::ParticleForceGenerator" = type { ptr }

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

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

declare noundef zeroext i1 @_ZNK7cyclone8Particle13hasFiniteMassEv(ptr noundef nonnull align 8 dereferenceable(144)) #1

declare void @_ZN7cyclone8Particle8addForceERKNS_7Vector3E(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 8 dereferenceable(32)) #1

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

declare noundef double @_ZNK7cyclone8Particle7getMassEv(ptr noundef nonnull align 8 dereferenceable(144)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7cyclone7Vector3C2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

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

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

declare void @_ZNK7cyclone8Particle11getPositionEPNS_7Vector3E(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef) #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7cyclone18ParticleFakeSpring11updateForceEPNS_8ParticleEd(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %1, double noundef %2) unnamed_addr #2 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca double, align 8
  %7 = alloca %"class.cyclone::Vector3", align 8
  %8 = alloca double, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.cyclone::Vector3", align 8
  %11 = alloca %"class.cyclone::Vector3", align 8
  %12 = alloca %"class.cyclone::Vector3", align 8
  %13 = alloca %"class.cyclone::Vector3", align 8
  %14 = alloca %"class.cyclone::Vector3", align 8
  %15 = alloca %"class.cyclone::Vector3", align 8
  %16 = alloca %"class.cyclone::Vector3", align 8
  %17 = alloca %"class.cyclone::Vector3", align 8
  %18 = alloca %"class.cyclone::Vector3", align 8
  %19 = alloca %"class.cyclone::Vector3", align 8
  %20 = alloca %"class.cyclone::Vector3", align 8
  %21 = alloca %"class.cyclone::Vector3", align 8
  %22 = alloca %"class.cyclone::Vector3", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store double %2, ptr %6, align 8, !tbaa !9
  %23 = load ptr, ptr %4, align 8
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = call noundef zeroext i1 @_ZNK7cyclone8Particle13hasFiniteMassEv(ptr noundef nonnull align 8 dereferenceable(144) %24)
  br i1 %25, label %27, label %26

26:                                               ; preds = %3
  br label %80

27:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #6
  call void @_ZN7cyclone7Vector3C2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7)
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZNK7cyclone8Particle11getPositionEPNS_7Vector3E(ptr noundef nonnull align 8 dereferenceable(144) %28, ptr noundef %7)
  %29 = getelementptr inbounds %"class.cyclone::ParticleFakeSpring", ptr %23, i32 0, i32 1
  %30 = load ptr, ptr %29, align 8, !tbaa !11
  call void @_ZN7cyclone7Vector3mIERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(32) %30)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %31 = getelementptr inbounds %"class.cyclone::ParticleFakeSpring", ptr %23, i32 0, i32 2
  %32 = load double, ptr %31, align 8, !tbaa !14
  %33 = getelementptr inbounds %"class.cyclone::ParticleFakeSpring", ptr %23, i32 0, i32 3
  %34 = load double, ptr %33, align 8, !tbaa !15
  %35 = getelementptr inbounds %"class.cyclone::ParticleFakeSpring", ptr %23, i32 0, i32 3
  %36 = load double, ptr %35, align 8, !tbaa !15
  %37 = fmul double %34, %36
  %38 = fneg double %37
  %39 = call double @llvm.fmuladd.f64(double 4.000000e+00, double %32, double %38)
  %40 = call double @sqrt(double noundef %39) #6
  %41 = fmul double 5.000000e-01, %40
  store double %41, ptr %8, align 8, !tbaa !9
  %42 = load double, ptr %8, align 8, !tbaa !9
  %43 = fcmp oeq double %42, 0.000000e+00
  br i1 %43, label %44, label %45

44:                                               ; preds = %27
  store i32 1, ptr %9, align 4
  br label %78

45:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #6
  %46 = getelementptr inbounds %"class.cyclone::ParticleFakeSpring", ptr %23, i32 0, i32 3
  %47 = load double, ptr %46, align 8, !tbaa !15
  %48 = load double, ptr %8, align 8, !tbaa !9
  %49 = fmul double 2.000000e+00, %48
  %50 = fdiv double %47, %49
  call void @_ZNK7cyclone7Vector3mlEd(ptr dead_on_unwind writable sret(%"class.cyclone::Vector3") align 8 %11, ptr noundef nonnull align 8 dereferenceable(32) %7, double noundef %50)
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #6
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZNK7cyclone8Particle11getVelocityEv(ptr dead_on_unwind writable sret(%"class.cyclone::Vector3") align 8 %13, ptr noundef nonnull align 8 dereferenceable(144) %51)
  %52 = load double, ptr %8, align 8, !tbaa !9
  %53 = fdiv double 1.000000e+00, %52
  call void @_ZNK7cyclone7Vector3mlEd(ptr dead_on_unwind writable sret(%"class.cyclone::Vector3") align 8 %12, ptr noundef nonnull align 8 dereferenceable(32) %13, double noundef %53)
  call void @_ZNK7cyclone7Vector3plERKS0_(ptr dead_on_unwind writable sret(%"class.cyclone::Vector3") align 8 %10, ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(32) %12)
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #6
  %54 = load double, ptr %8, align 8, !tbaa !9
  %55 = load double, ptr %6, align 8, !tbaa !9
  %56 = fmul double %54, %55
  %57 = call double @cos(double noundef %56) #6
  call void @_ZNK7cyclone7Vector3mlEd(ptr dead_on_unwind writable sret(%"class.cyclone::Vector3") align 8 %15, ptr noundef nonnull align 8 dereferenceable(32) %7, double noundef %57)
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #6
  %58 = load double, ptr %8, align 8, !tbaa !9
  %59 = load double, ptr %6, align 8, !tbaa !9
  %60 = fmul double %58, %59
  %61 = call double @sin(double noundef %60) #6
  call void @_ZNK7cyclone7Vector3mlEd(ptr dead_on_unwind writable sret(%"class.cyclone::Vector3") align 8 %16, ptr noundef nonnull align 8 dereferenceable(32) %10, double noundef %61)
  call void @_ZNK7cyclone7Vector3plERKS0_(ptr dead_on_unwind writable sret(%"class.cyclone::Vector3") align 8 %14, ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull align 8 dereferenceable(32) %16)
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #6
  %62 = load double, ptr %6, align 8, !tbaa !9
  %63 = fmul double -5.000000e-01, %62
  %64 = getelementptr inbounds %"class.cyclone::ParticleFakeSpring", ptr %23, i32 0, i32 3
  %65 = load double, ptr %64, align 8, !tbaa !15
  %66 = fmul double %63, %65
  %67 = call double @exp(double noundef %66) #6
  call void @_ZN7cyclone7Vector3mLEd(ptr noundef nonnull align 8 dereferenceable(32) %14, double noundef %67)
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #6
  call void @_ZNK7cyclone7Vector3miERKS0_(ptr dead_on_unwind writable sret(%"class.cyclone::Vector3") align 8 %19, ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(32) %7)
  %68 = load double, ptr %6, align 8, !tbaa !9
  %69 = load double, ptr %6, align 8, !tbaa !9
  %70 = fmul double %68, %69
  %71 = fdiv double 1.000000e+00, %70
  call void @_ZNK7cyclone7Vector3mlEd(ptr dead_on_unwind writable sret(%"class.cyclone::Vector3") align 8 %18, ptr noundef nonnull align 8 dereferenceable(32) %19, double noundef %71)
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #6
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZNK7cyclone8Particle11getVelocityEv(ptr dead_on_unwind writable sret(%"class.cyclone::Vector3") align 8 %21, ptr noundef nonnull align 8 dereferenceable(144) %72)
  %73 = load double, ptr %6, align 8, !tbaa !9
  %74 = fdiv double 1.000000e+00, %73
  call void @_ZNK7cyclone7Vector3mlEd(ptr dead_on_unwind writable sret(%"class.cyclone::Vector3") align 8 %20, ptr noundef nonnull align 8 dereferenceable(32) %21, double noundef %74)
  call void @_ZNK7cyclone7Vector3miERKS0_(ptr dead_on_unwind writable sret(%"class.cyclone::Vector3") align 8 %17, ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull align 8 dereferenceable(32) %20)
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #6
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %22) #6
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = call noundef double @_ZNK7cyclone8Particle7getMassEv(ptr noundef nonnull align 8 dereferenceable(144) %76)
  call void @_ZNK7cyclone7Vector3mlEd(ptr dead_on_unwind writable sret(%"class.cyclone::Vector3") align 8 %22, ptr noundef nonnull align 8 dereferenceable(32) %17, double noundef %77)
  call void @_ZN7cyclone8Particle8addForceERKNS_7Vector3E(ptr noundef nonnull align 8 dereferenceable(144) %75, ptr noundef nonnull align 8 dereferenceable(32) %22)
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #6
  store i32 0, ptr %9, align 4
  br label %78

78:                                               ; preds = %45, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #6
  %79 = load i32, ptr %9, align 4
  switch i32 %79, label %81 [
    i32 0, label %80
    i32 1, label %80
  ]

80:                                               ; preds = %78, %78, %26
  ret void

81:                                               ; preds = %78
  unreachable
}

; Function Attrs: nounwind
declare double @sqrt(double noundef) #5

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

declare void @_ZNK7cyclone8Particle11getVelocityEv(ptr dead_on_unwind writable sret(%"class.cyclone::Vector3") align 8, ptr noundef nonnull align 8 dereferenceable(144)) #1

; Function Attrs: nounwind
declare double @cos(double noundef) #5

; Function Attrs: nounwind
declare double @sin(double noundef) #5

; Function Attrs: nounwind
declare double @exp(double noundef) #5

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #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, !6, i64 8}
!12 = !{!"_ZTSN7cyclone18ParticleFakeSpringE", !13, i64 0, !6, i64 8, !10, i64 16, !10, i64 24}
!13 = !{!"_ZTSN7cyclone22ParticleForceGeneratorE"}
!14 = !{!12, !10, i64 16}
!15 = !{!12, !10, i64 24}


; 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 }

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

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

declare noundef zeroext i1 @_ZNK7cyclone8Particle13hasFiniteMassEv(ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #1

declare void @_ZN7cyclone8Particle8addForceERKNS_7Vector3E(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1

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

declare noundef double @_ZNK7cyclone8Particle7getMassEv(ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7cyclone7Vector3C2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

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

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

declare void @_ZNK7cyclone8Particle11getPositionEPNS_7Vector3E(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7cyclone18ParticleFakeSpring11updateForceEPNS_8ParticleEd(ptr nocapture noundef nonnull readonly align 8 dereferenceable(32) %0, ptr noundef nonnull %1, double noundef %2) unnamed_addr #2 align 2 {
  %4 = alloca %"class.cyclone::Vector3", align 8
  %5 = alloca %"class.cyclone::Vector3", align 8
  %6 = alloca %"class.cyclone::Vector3", align 8
  %7 = alloca %"class.cyclone::Vector3", align 8
  %8 = alloca %"class.cyclone::Vector3", align 8
  %9 = alloca %"class.cyclone::Vector3", align 8
  %10 = alloca %"class.cyclone::Vector3", align 8
  %11 = alloca %"class.cyclone::Vector3", align 8
  %12 = alloca %"class.cyclone::Vector3", align 8
  %13 = alloca %"class.cyclone::Vector3", align 8
  %14 = alloca %"class.cyclone::Vector3", align 8
  %15 = alloca %"class.cyclone::Vector3", align 8
  %16 = alloca %"class.cyclone::Vector3", align 8
  %17 = alloca %"class.cyclone::Vector3", align 8
  %18 = tail call noundef zeroext i1 @_ZNK7cyclone8Particle13hasFiniteMassEv(ptr noundef nonnull align 8 dereferenceable(144) %1)
  br i1 %18, label %19, label %49

19:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #6
  call void @_ZN7cyclone7Vector3C2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4)
  call void @_ZNK7cyclone8Particle11getPositionEPNS_7Vector3E(ptr noundef nonnull align 8 dereferenceable(144) %1, ptr noundef nonnull %4)
  %20 = getelementptr inbounds i8, ptr %0, i64 8
  %21 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN7cyclone7Vector3mIERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %21)
  %22 = getelementptr inbounds i8, ptr %0, i64 16
  %23 = load double, ptr %22, align 8, !tbaa !12
  %24 = getelementptr inbounds i8, ptr %0, i64 24
  %25 = load double, ptr %24, align 8, !tbaa !13
  %26 = fneg double %25
  %27 = fmul double %25, %26
  %28 = call double @llvm.fmuladd.f64(double %23, double 4.000000e+00, double %27)
  %29 = call double @sqrt(double noundef %28) #6
  %30 = fmul double %29, 5.000000e-01
  %31 = fcmp oeq double %30, 0.000000e+00
  br i1 %31, label %48, label %32

32:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #6
  %33 = load double, ptr %24, align 8, !tbaa !13
  %34 = fmul double %30, 2.000000e+00
  %35 = fdiv double %33, %34
  call void @_ZNK7cyclone7Vector3mlEd(ptr dead_on_unwind nonnull writable sret(%"class.cyclone::Vector3") align 8 %6, ptr noundef nonnull align 8 dereferenceable(32) %4, double noundef %35)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #6
  call void @_ZNK7cyclone8Particle11getVelocityEv(ptr dead_on_unwind nonnull writable sret(%"class.cyclone::Vector3") align 8 %8, ptr noundef nonnull align 8 dereferenceable(144) %1)
  %36 = fdiv double 1.000000e+00, %30
  call void @_ZNK7cyclone7Vector3mlEd(ptr dead_on_unwind nonnull writable sret(%"class.cyclone::Vector3") align 8 %7, ptr noundef nonnull align 8 dereferenceable(32) %8, double noundef %36)
  call void @_ZNK7cyclone7Vector3plERKS0_(ptr dead_on_unwind nonnull writable sret(%"class.cyclone::Vector3") align 8 %5, ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %7)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #6
  %37 = fmul double %30, %2
  %38 = call double @cos(double noundef %37) #6
  call void @_ZNK7cyclone7Vector3mlEd(ptr dead_on_unwind nonnull writable sret(%"class.cyclone::Vector3") align 8 %10, ptr noundef nonnull align 8 dereferenceable(32) %4, double noundef %38)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #6
  %39 = call double @sin(double noundef %37) #6
  call void @_ZNK7cyclone7Vector3mlEd(ptr dead_on_unwind nonnull writable sret(%"class.cyclone::Vector3") align 8 %11, ptr noundef nonnull align 8 dereferenceable(32) %5, double noundef %39)
  call void @_ZNK7cyclone7Vector3plERKS0_(ptr dead_on_unwind nonnull writable sret(%"class.cyclone::Vector3") align 8 %9, ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(32) %11)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  %40 = fmul double %2, -5.000000e-01
  %41 = load double, ptr %24, align 8, !tbaa !13
  %42 = fmul double %40, %41
  %43 = call double @exp(double noundef %42) #6
  call void @_ZN7cyclone7Vector3mLEd(ptr noundef nonnull align 8 dereferenceable(32) %9, double noundef %43)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #6
  call void @_ZNK7cyclone7Vector3miERKS0_(ptr dead_on_unwind nonnull writable sret(%"class.cyclone::Vector3") align 8 %14, ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(32) %4)
  %44 = fmul double %2, %2
  %45 = fdiv double 1.000000e+00, %44
  call void @_ZNK7cyclone7Vector3mlEd(ptr dead_on_unwind nonnull writable sret(%"class.cyclone::Vector3") align 8 %13, ptr noundef nonnull align 8 dereferenceable(32) %14, double noundef %45)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %16) #6
  call void @_ZNK7cyclone8Particle11getVelocityEv(ptr dead_on_unwind nonnull writable sret(%"class.cyclone::Vector3") align 8 %16, ptr noundef nonnull align 8 dereferenceable(144) %1)
  %46 = fdiv double 1.000000e+00, %2
  call void @_ZNK7cyclone7Vector3mlEd(ptr dead_on_unwind nonnull writable sret(%"class.cyclone::Vector3") align 8 %15, ptr noundef nonnull align 8 dereferenceable(32) %16, double noundef %46)
  call void @_ZNK7cyclone7Vector3miERKS0_(ptr dead_on_unwind nonnull writable sret(%"class.cyclone::Vector3") align 8 %12, ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(32) %15)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %17) #6
  %47 = call noundef double @_ZNK7cyclone8Particle7getMassEv(ptr noundef nonnull align 8 dereferenceable(144) %1)
  call void @_ZNK7cyclone7Vector3mlEd(ptr dead_on_unwind nonnull writable sret(%"class.cyclone::Vector3") align 8 %17, ptr noundef nonnull align 8 dereferenceable(32) %12, double noundef %47)
  call void @_ZN7cyclone8Particle8addForceERKNS_7Vector3E(ptr noundef nonnull align 8 dereferenceable(144) %1, ptr noundef nonnull align 8 dereferenceable(32) %17)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  br label %48

48:                                               ; preds = %19, %32
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  br label %49

49:                                               ; preds = %3, %48
  ret void
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #5

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

declare void @_ZNK7cyclone8Particle11getVelocityEv(ptr dead_on_unwind writable sret(%"class.cyclone::Vector3") align 8, ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @cos(double noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sin(double noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @exp(double noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7cyclone7Vector3miERKS0_(ptr dead_on_unwind noalias writable sret(%"class.cyclone::Vector3") align 8, ptr noundef nonnull align 8 dereferenceable(32), 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 = { "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 = { 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 #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #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, !8, i64 8}
!6 = !{!"_ZTSN7cyclone18ParticleFakeSpringE", !7, i64 0, !8, i64 8, !11, i64 16, !11, i64 24}
!7 = !{!"_ZTSN7cyclone22ParticleForceGeneratorE"}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"double", !9, i64 0}
!12 = !{!6, !11, i64 16}
!13 = !{!6, !11, i64 24}


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