; LLVM IR from idmillington/cyclone-physics :: src (collide_fine)

; 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 }
%"struct.cyclone::CollisionData" = type { ptr, ptr, i32, i32, double, double, double }
%"class.cyclone::CollisionPlane" = type { %"class.cyclone::Vector3", double }
%"class.cyclone::CollisionSphere" = type { %"class.cyclone::CollisionPrimitive", double }
%"class.cyclone::CollisionPrimitive" = type { ptr, %"class.cyclone::Matrix4", %"class.cyclone::Matrix4" }
%"class.cyclone::Matrix4" = type { [12 x double] }
%"class.cyclone::Contact" = type { [2 x ptr], double, double, %"class.cyclone::Vector3", %"class.cyclone::Vector3", double, %"class.cyclone::Matrix3", %"class.cyclone::Vector3", double, [2 x %"class.cyclone::Vector3"] }
%"class.cyclone::Matrix3" = type { [9 x double] }

; 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7cyclone17CollisionDetector18sphereAndTruePlaneERKNS_15CollisionSphereERKNS_14CollisionPlaneEPNS_13CollisionDataE(ptr noundef nonnull align 8 dereferenceable(208) %0, ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef %2) #3 align 2 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.cyclone::Vector3", align 8
  %9 = alloca double, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.cyclone::Vector3", align 8
  %12 = alloca double, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"class.cyclone::Vector3", align 8
  %15 = alloca %"class.cyclone::Vector3", align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %16 = load ptr, ptr %7, align 8, !tbaa !5
  %17 = getelementptr inbounds %"struct.cyclone::CollisionData", ptr %16, i32 0, i32 2
  %18 = load i32, ptr %17, align 8, !tbaa !9
  %19 = icmp sle i32 %18, 0
  br i1 %19, label %20, label %21

20:                                               ; preds = %3
  store i32 0, ptr %4, align 4
  br label %83

21:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #5
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZNK7cyclone18CollisionPrimitive7getAxisEj(ptr dead_on_unwind writable sret(%"class.cyclone::Vector3") align 8 %8, ptr noundef nonnull align 8 dereferenceable(200) %22, i32 noundef 3)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = getelementptr inbounds %"class.cyclone::CollisionPlane", ptr %23, i32 0, i32 0
  %25 = call noundef double @_ZNK7cyclone7Vector3mlERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %24, ptr noundef nonnull align 8 dereferenceable(32) %8)
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = getelementptr inbounds %"class.cyclone::CollisionPlane", ptr %26, i32 0, i32 1
  %28 = load double, ptr %27, align 8, !tbaa !13
  %29 = fsub double %25, %28
  store double %29, ptr %9, align 8, !tbaa !16
  %30 = load double, ptr %9, align 8, !tbaa !16
  %31 = load double, ptr %9, align 8, !tbaa !16
  %32 = fmul double %30, %31
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = getelementptr inbounds %"class.cyclone::CollisionSphere", ptr %33, i32 0, i32 1
  %35 = load double, ptr %34, align 8, !tbaa !17
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = getelementptr inbounds %"class.cyclone::CollisionSphere", ptr %36, i32 0, i32 1
  %38 = load double, ptr %37, align 8, !tbaa !17
  %39 = fmul double %35, %38
  %40 = fcmp ogt double %32, %39
  br i1 %40, label %41, label %42

41:                                               ; preds = %21
  store i32 0, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %82

42:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #5
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  %44 = getelementptr inbounds %"class.cyclone::CollisionPlane", ptr %43, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %11, ptr align 8 %44, i64 32, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %45 = load double, ptr %9, align 8, !tbaa !16
  %46 = fneg double %45
  store double %46, ptr %12, align 8, !tbaa !16
  %47 = load double, ptr %9, align 8, !tbaa !16
  %48 = fcmp olt double %47, 0.000000e+00
  br i1 %48, label %49, label %52

49:                                               ; preds = %42
  call void @_ZN7cyclone7Vector3mLEd(ptr noundef nonnull align 8 dereferenceable(32) %11, double noundef -1.000000e+00)
  %50 = load double, ptr %12, align 8, !tbaa !16
  %51 = fneg double %50
  store double %51, ptr %12, align 8, !tbaa !16
  br label %52

52:                                               ; preds = %49, %42
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = getelementptr inbounds %"class.cyclone::CollisionSphere", ptr %53, i32 0, i32 1
  %55 = load double, ptr %54, align 8, !tbaa !17
  %56 = load double, ptr %12, align 8, !tbaa !16
  %57 = fadd double %56, %55
  store double %57, ptr %12, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.cyclone::CollisionData", ptr %58, i32 0, i32 1
  %60 = load ptr, ptr %59, align 8, !tbaa !22
  store ptr %60, ptr %13, align 8, !tbaa !5
  %61 = load ptr, ptr %13, align 8, !tbaa !5
  %62 = getelementptr inbounds %"class.cyclone::Contact", ptr %61, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %62, ptr align 8 %11, i64 32, i1 false), !tbaa.struct !21
  %63 = load double, ptr %12, align 8, !tbaa !16
  %64 = load ptr, ptr %13, align 8, !tbaa !5
  %65 = getelementptr inbounds %"class.cyclone::Contact", ptr %64, i32 0, i32 5
  store double %63, ptr %65, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #5
  %66 = load ptr, ptr %6, align 8, !tbaa !5
  %67 = getelementptr inbounds %"class.cyclone::CollisionPlane", ptr %66, i32 0, i32 0
  %68 = load double, ptr %9, align 8, !tbaa !16
  call void @_ZNK7cyclone7Vector3mlEd(ptr dead_on_unwind writable sret(%"class.cyclone::Vector3") align 8 %15, ptr noundef nonnull align 8 dereferenceable(32) %67, double noundef %68)
  call void @_ZNK7cyclone7Vector3miERKS0_(ptr dead_on_unwind writable sret(%"class.cyclone::Vector3") align 8 %14, ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %15)
  %69 = load ptr, ptr %13, align 8, !tbaa !5
  %70 = getelementptr inbounds %"class.cyclone::Contact", ptr %69, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %70, ptr align 8 %14, i64 32, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #5
  %71 = load ptr, ptr %13, align 8, !tbaa !5
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = getelementptr inbounds %"class.cyclone::CollisionPrimitive", ptr %72, i32 0, i32 0
  %74 = load ptr, ptr %73, align 8, !tbaa !26
  %75 = load ptr, ptr %7, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.cyclone::CollisionData", ptr %75, i32 0, i32 4
  %77 = load double, ptr %76, align 8, !tbaa !27
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  %79 = getelementptr inbounds %"struct.cyclone::CollisionData", ptr %78, i32 0, i32 5
  %80 = load double, ptr %79, align 8, !tbaa !28
  call void @_ZN7cyclone7Contact11setBodyDataEPNS_9RigidBodyES2_dd(ptr noundef nonnull align 8 dereferenceable(280) %71, ptr noundef %74, ptr noundef null, double noundef %77, double noundef %80)
  %81 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN7cyclone13CollisionData11addContactsEj(ptr noundef nonnull align 8 dereferenceable(48) %81, i32 noundef 1)
  store i32 1, ptr %4, align 4
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #5
  br label %82

82:                                               ; preds = %52, %41
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #5
  br label %83

83:                                               ; preds = %82, %20
  %84 = load i32, ptr %4, align 4
  ret i32 %84
}

; 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 @_ZNK7cyclone7Vector3mlEd(ptr dead_on_unwind noalias writable sret(%"class.cyclone::Vector3") align 8, ptr noundef nonnull align 8 dereferenceable(32), double noundef) #3 align 2

declare void @_ZN7cyclone7Contact11setBodyDataEPNS_9RigidBodyES2_dd(ptr noundef nonnull align 8 dereferenceable(280), ptr noundef, ptr noundef, double noundef, double noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7cyclone13CollisionData11addContactsEj(ptr noundef nonnull align 8 dereferenceable(48), i32 noundef) #2 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 = { 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 #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 = { 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, !11, i64 16}
!10 = !{!"_ZTSN7cyclone13CollisionDataE", !6, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !12, i64 24, !12, i64 32, !12, i64 40}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !12, i64 32}
!14 = !{!"_ZTSN7cyclone14CollisionPlaneE", !15, i64 0, !12, i64 32}
!15 = !{!"_ZTSN7cyclone7Vector3E", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24}
!16 = !{!12, !12, i64 0}
!17 = !{!18, !12, i64 200}
!18 = !{!"_ZTSN7cyclone15CollisionSphereE", !19, i64 0, !12, i64 200}
!19 = !{!"_ZTSN7cyclone18CollisionPrimitiveE", !6, i64 0, !20, i64 8, !20, i64 104}
!20 = !{!"_ZTSN7cyclone7Matrix4E", !7, i64 0}
!21 = !{i64 0, i64 8, !16, i64 8, i64 8, !16, i64 16, i64 8, !16, i64 24, i64 8, !16}
!22 = !{!10, !6, i64 8}
!23 = !{!24, !12, i64 96}
!24 = !{!"_ZTSN7cyclone7ContactE", !7, i64 0, !12, i64 16, !12, i64 24, !15, i64 32, !15, i64 64, !12, i64 96, !25, i64 104, !15, i64 176, !12, i64 208, !7, i64 216}
!25 = !{!"_ZTSN7cyclone7Matrix3E", !7, i64 0}
!26 = !{!19, !6, i64 0}
!27 = !{!10, !12, i64 24}
!28 = !{!10, !12, i64 32}


; 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 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

; 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 #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 2) i32 @_ZN7cyclone17CollisionDetector18sphereAndTruePlaneERKNS_15CollisionSphereERKNS_14CollisionPlaneEPNS_13CollisionDataE(ptr noundef nonnull align 8 dereferenceable(208) %0, ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef %2) local_unnamed_addr #3 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 = getelementptr inbounds i8, ptr %2, i64 16
  %9 = load i32, ptr %8, align 8, !tbaa !5
  %10 = icmp slt i32 %9, 1
  br i1 %10, label %39, label %11

11:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #5
  call void @_ZNK7cyclone18CollisionPrimitive7getAxisEj(ptr dead_on_unwind nonnull writable sret(%"class.cyclone::Vector3") align 8 %4, ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef 3)
  %12 = call noundef double @_ZNK7cyclone7Vector3mlERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %4)
  %13 = getelementptr inbounds i8, ptr %1, i64 32
  %14 = load double, ptr %13, align 8, !tbaa !12
  %15 = fsub double %12, %14
  %16 = fmul double %15, %15
  %17 = getelementptr inbounds i8, ptr %0, i64 200
  %18 = load double, ptr %17, align 8, !tbaa !15
  %19 = fmul double %18, %18
  %20 = fcmp ogt double %16, %19
  br i1 %20, label %38, label %21

21:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %1, i64 32, i1 false), !tbaa.struct !19
  %22 = fneg double %15
  %23 = fcmp olt double %15, 0.000000e+00
  br i1 %23, label %24, label %25

24:                                               ; preds = %21
  call void @_ZN7cyclone7Vector3mLEd(ptr noundef nonnull align 8 dereferenceable(32) %5, double noundef -1.000000e+00)
  %.pre = load double, ptr %17, align 8, !tbaa !15
  br label %25

25:                                               ; preds = %24, %21
  %26 = phi double [ %.pre, %24 ], [ %18, %21 ]
  %.026 = phi double [ %15, %24 ], [ %22, %21 ]
  %27 = fadd double %.026, %26
  %28 = getelementptr inbounds i8, ptr %2, i64 8
  %29 = load ptr, ptr %28, align 8, !tbaa !21
  %30 = getelementptr inbounds i8, ptr %29, i64 64
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %30, ptr noundef nonnull align 8 dereferenceable(32) %5, i64 32, i1 false), !tbaa.struct !19
  %31 = getelementptr inbounds i8, ptr %29, i64 96
  store double %27, ptr %31, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #5
  call void @_ZNK7cyclone7Vector3mlEd(ptr dead_on_unwind nonnull writable sret(%"class.cyclone::Vector3") align 8 %7, ptr noundef nonnull align 8 dereferenceable(32) %1, double noundef %15)
  call void @_ZNK7cyclone7Vector3miERKS0_(ptr dead_on_unwind nonnull writable sret(%"class.cyclone::Vector3") align 8 %6, ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %7)
  %32 = getelementptr inbounds i8, ptr %29, i64 32
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %32, ptr noundef nonnull align 8 dereferenceable(32) %6, i64 32, i1 false), !tbaa.struct !19
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  %33 = load ptr, ptr %0, align 8, !tbaa !25
  %34 = getelementptr inbounds i8, ptr %2, i64 24
  %35 = load double, ptr %34, align 8, !tbaa !26
  %36 = getelementptr inbounds i8, ptr %2, i64 32
  %37 = load double, ptr %36, align 8, !tbaa !27
  call void @_ZN7cyclone7Contact11setBodyDataEPNS_9RigidBodyES2_dd(ptr noundef nonnull align 8 dereferenceable(280) %29, ptr noundef %33, ptr noundef null, double noundef %35, double noundef %37)
  call void @_ZN7cyclone13CollisionData11addContactsEj(ptr noundef nonnull align 8 dereferenceable(48) %2, i32 noundef 1)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #5
  br label %38

38:                                               ; preds = %11, %25
  %.0 = phi i32 [ 1, %25 ], [ 0, %11 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  br label %39

39:                                               ; preds = %3, %38
  %.1 = phi i32 [ %.0, %38 ], [ 0, %3 ]
  ret i32 %.1
}

; 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 @_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 #3 align 2

declare void @_ZN7cyclone7Contact11setBodyDataEPNS_9RigidBodyES2_dd(ptr noundef nonnull align 8 dereferenceable(280), ptr noundef, ptr noundef, double noundef, double noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7cyclone13CollisionData11addContactsEj(ptr noundef nonnull align 8 dereferenceable(48), i32 noundef) local_unnamed_addr #2 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 = { "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 = { 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, !10, i64 16}
!6 = !{!"_ZTSN7cyclone13CollisionDataE", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !11, i64 24, !11, i64 32, !11, i64 40}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = !{!13, !11, i64 32}
!13 = !{!"_ZTSN7cyclone14CollisionPlaneE", !14, i64 0, !11, i64 32}
!14 = !{!"_ZTSN7cyclone7Vector3E", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!15 = !{!16, !11, i64 200}
!16 = !{!"_ZTSN7cyclone15CollisionSphereE", !17, i64 0, !11, i64 200}
!17 = !{!"_ZTSN7cyclone18CollisionPrimitiveE", !7, i64 0, !18, i64 8, !18, i64 104}
!18 = !{!"_ZTSN7cyclone7Matrix4E", !8, i64 0}
!19 = !{i64 0, i64 8, !20, i64 8, i64 8, !20, i64 16, i64 8, !20, i64 24, i64 8, !20}
!20 = !{!11, !11, i64 0}
!21 = !{!6, !7, i64 8}
!22 = !{!23, !11, i64 96}
!23 = !{!"_ZTSN7cyclone7ContactE", !8, i64 0, !11, i64 16, !11, i64 24, !14, i64 32, !14, i64 64, !11, i64 96, !24, i64 104, !14, i64 176, !11, i64 208, !8, i64 216}
!24 = !{!"_ZTSN7cyclone7Matrix3E", !8, i64 0}
!25 = !{!17, !7, i64 0}
!26 = !{!6, !11, i64 24}
!27 = !{!6, !11, i64 32}


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