; LLVM IR from jrouwe/JoltPhysics :: Jolt/Physics/Vehicle (VehicleCollisionTester)

; 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.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::VehicleCollisionTesterCastSphere" = type <{ %"class.JPH::VehicleCollisionTester.base", [2 x i8], float, %"class.JPH::Vec3", float, [12 x i8] }>
%"class.JPH::VehicleCollisionTester.base" = type <{ ptr, %"class.JPH::RefTarget", [4 x i8], ptr, ptr, ptr, i16 }>
%"class.JPH::RefTarget" = type { %"struct.std::atomic" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"class.JPH::WheelSettings" = type <{ %"class.JPH::SerializableObject", %"class.JPH::RefTarget.25", [4 x i8], %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", float, float, float, %"class.JPH::SpringSettings", float, float, i8, [15 x i8] }>
%"class.JPH::SerializableObject" = type { ptr }
%"class.JPH::RefTarget.25" = type { %"struct.std::atomic" }
%"class.JPH::SpringSettings" = type { i8, %union.anon.26, float }
%union.anon.26 = type { float }

; 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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK3JPH17VehicleConstraint8GetWheelEj(ptr noundef nonnull align 16 dereferenceable(408), i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK3JPH5Wheel11GetSettingsEv(ptr noundef nonnull align 16 dereferenceable(404)) #1 align 2

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef, double, double) #3

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) #4 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) #3 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) #3 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef float @_ZN3JPH5ClampIfEET_S1_S1_S1_(float noundef, float noundef, float noundef) #5

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH32VehicleCollisionTesterCastSphere24PredictContactPropertiesERNS_13PhysicsSystemERKNS_17VehicleConstraintEjNS_4Vec3ES6_RKNS_6BodyIDERPNS_4BodyERNS_10SubShapeIDERS6_SF_Rf(ptr noundef nonnull align 16 dereferenceable(68) %0, ptr noundef nonnull align 16 dereferenceable(1172) %1, ptr noundef nonnull align 16 dereferenceable(408) %2, i32 noundef %3, double %4, double %5, double %6, double %7, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 16 dereferenceable(16) %11, ptr noundef nonnull align 16 dereferenceable(16) %12, ptr noundef nonnull align 4 dereferenceable(4) %13) unnamed_addr #1 align 2 {
  %15 = alloca %"class.JPH::Vec3", align 16
  %16 = alloca %"class.JPH::Vec3", align 16
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca float, align 4
  %29 = alloca %"class.JPH::Vec3", align 16
  %30 = alloca float, align 4
  %31 = alloca %"class.JPH::Vec3", align 16
  %32 = alloca %"class.JPH::Vec3", align 16
  %33 = alloca %"class.JPH::Vec3", align 16
  %34 = alloca float, align 4
  %35 = alloca %"class.JPH::Vec3", align 16
  %36 = alloca %"class.JPH::Vec3", align 16
  %37 = alloca %"class.JPH::Vec3", align 16
  %38 = alloca %"class.JPH::Vec3", align 16
  %39 = alloca %"class.JPH::Vec3", align 16
  %40 = alloca %"class.JPH::Vec3", align 16
  %41 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 0
  store double %4, ptr %41, align 16
  %42 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 1
  store double %5, ptr %42, align 8
  %43 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 0
  store double %6, ptr %43, align 16
  %44 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 1
  store double %7, ptr %44, align 8
  store ptr %0, ptr %17, align 8, !tbaa !5
  store ptr %1, ptr %18, align 8, !tbaa !5
  store ptr %2, ptr %19, align 8, !tbaa !5
  store i32 %3, ptr %20, align 4, !tbaa !9
  store ptr %8, ptr %21, align 8, !tbaa !5
  store ptr %9, ptr %22, align 8, !tbaa !5
  store ptr %10, ptr %23, align 8, !tbaa !5
  store ptr %11, ptr %24, align 8, !tbaa !5
  store ptr %12, ptr %25, align 8, !tbaa !5
  store ptr %13, ptr %26, align 8, !tbaa !5
  %45 = load ptr, ptr %17, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  %46 = load ptr, ptr %19, align 8, !tbaa !5
  %47 = load i32, ptr %20, align 4, !tbaa !9
  %48 = call noundef ptr @_ZNK3JPH17VehicleConstraint8GetWheelEj(ptr noundef nonnull align 16 dereferenceable(408) %46, i32 noundef %47)
  %49 = call noundef ptr @_ZNK3JPH5Wheel11GetSettingsEv(ptr noundef nonnull align 16 dereferenceable(404) %48)
  store ptr %49, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #6
  %50 = load ptr, ptr %25, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %29, ptr align 16 %50, i64 16, i1 false), !tbaa.struct !11
  %51 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 0
  %52 = load double, ptr %51, align 16
  %53 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 1
  %54 = load double, ptr %53, align 8
  %55 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %16, double %52, double %54)
  store float %55, ptr %28, align 4, !tbaa !13
  %56 = load float, ptr %28, align 4, !tbaa !13
  %57 = fcmp olt float %56, 0xBEB0C6F7A0000000
  br i1 %57, label %58, label %145

58:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %31) #6
  %59 = load ptr, ptr %24, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %32, ptr align 16 %15, i64 16, i1 false), !tbaa.struct !11
  %60 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 0
  %61 = load double, ptr %60, align 16
  %62 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 1
  %63 = load double, ptr %62, align 8
  %64 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %59, double %61, double %63)
  %65 = getelementptr inbounds %"class.JPH::Vec3", ptr %31, i32 0, i32 0
  %66 = getelementptr inbounds %union.anon, ptr %65, i32 0, i32 0
  %67 = getelementptr inbounds { double, double }, ptr %66, i32 0, i32 0
  %68 = extractvalue { double, double } %64, 0
  store double %68, ptr %67, align 16
  %69 = getelementptr inbounds { double, double }, ptr %66, i32 0, i32 1
  %70 = extractvalue { double, double } %64, 1
  store double %70, ptr %69, align 8
  %71 = load ptr, ptr %25, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %33, ptr align 16 %71, i64 16, i1 false), !tbaa.struct !11
  %72 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 0
  %73 = load double, ptr %72, align 16
  %74 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 1
  %75 = load double, ptr %74, align 8
  %76 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %31, double %73, double %75)
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #6
  store float %76, ptr %30, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #6
  %77 = getelementptr inbounds %"class.JPH::VehicleCollisionTesterCastSphere", ptr %45, i32 0, i32 2
  %78 = load float, ptr %77, align 4, !tbaa !15
  %79 = load float, ptr %30, align 4, !tbaa !13
  %80 = fadd float %78, %79
  %81 = load float, ptr %28, align 4, !tbaa !13
  %82 = fdiv float %80, %81
  store float %82, ptr %34, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 16, ptr %35) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %36) #6
  %83 = load float, ptr %34, align 4, !tbaa !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %38, ptr align 16 %16, i64 16, i1 false), !tbaa.struct !11
  %84 = getelementptr inbounds { double, double }, ptr %38, i32 0, i32 0
  %85 = load double, ptr %84, align 16
  %86 = getelementptr inbounds { double, double }, ptr %38, i32 0, i32 1
  %87 = load double, ptr %86, align 8
  %88 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %83, double %85, double %87)
  %89 = getelementptr inbounds %"class.JPH::Vec3", ptr %37, i32 0, i32 0
  %90 = getelementptr inbounds %union.anon, ptr %89, i32 0, i32 0
  %91 = getelementptr inbounds { double, double }, ptr %90, i32 0, i32 0
  %92 = extractvalue { double, double } %88, 0
  store double %92, ptr %91, align 16
  %93 = getelementptr inbounds { double, double }, ptr %90, i32 0, i32 1
  %94 = extractvalue { double, double } %88, 1
  store double %94, ptr %93, align 8
  %95 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 0
  %96 = load double, ptr %95, align 16
  %97 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 1
  %98 = load double, ptr %97, align 8
  %99 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %15, double %96, double %98)
  %100 = getelementptr inbounds %"class.JPH::Vec3", ptr %36, i32 0, i32 0
  %101 = getelementptr inbounds %union.anon, ptr %100, i32 0, i32 0
  %102 = getelementptr inbounds { double, double }, ptr %101, i32 0, i32 0
  %103 = extractvalue { double, double } %99, 0
  store double %103, ptr %102, align 16
  %104 = getelementptr inbounds { double, double }, ptr %101, i32 0, i32 1
  %105 = extractvalue { double, double } %99, 1
  store double %105, ptr %104, align 8
  %106 = getelementptr inbounds %"class.JPH::VehicleCollisionTesterCastSphere", ptr %45, i32 0, i32 2
  %107 = load float, ptr %106, align 4, !tbaa !15
  %108 = load ptr, ptr %25, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %40, ptr align 16 %108, i64 16, i1 false), !tbaa.struct !11
  %109 = getelementptr inbounds { double, double }, ptr %40, i32 0, i32 0
  %110 = load double, ptr %109, align 16
  %111 = getelementptr inbounds { double, double }, ptr %40, i32 0, i32 1
  %112 = load double, ptr %111, align 8
  %113 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %107, double %110, double %112)
  %114 = getelementptr inbounds %"class.JPH::Vec3", ptr %39, i32 0, i32 0
  %115 = getelementptr inbounds %union.anon, ptr %114, i32 0, i32 0
  %116 = getelementptr inbounds { double, double }, ptr %115, i32 0, i32 0
  %117 = extractvalue { double, double } %113, 0
  store double %117, ptr %116, align 16
  %118 = getelementptr inbounds { double, double }, ptr %115, i32 0, i32 1
  %119 = extractvalue { double, double } %113, 1
  store double %119, ptr %118, align 8
  %120 = getelementptr inbounds { double, double }, ptr %39, i32 0, i32 0
  %121 = load double, ptr %120, align 16
  %122 = getelementptr inbounds { double, double }, ptr %39, i32 0, i32 1
  %123 = load double, ptr %122, align 8
  %124 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %36, double %121, double %123)
  %125 = getelementptr inbounds %"class.JPH::Vec3", ptr %35, i32 0, i32 0
  %126 = getelementptr inbounds %union.anon, ptr %125, i32 0, i32 0
  %127 = getelementptr inbounds { double, double }, ptr %126, i32 0, i32 0
  %128 = extractvalue { double, double } %124, 0
  store double %128, ptr %127, align 16
  %129 = getelementptr inbounds { double, double }, ptr %126, i32 0, i32 1
  %130 = extractvalue { double, double } %124, 1
  store double %130, ptr %129, align 8
  %131 = load ptr, ptr %24, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %131, ptr align 16 %35, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %35) #6
  %132 = load float, ptr %34, align 4, !tbaa !13
  %133 = getelementptr inbounds %"class.JPH::VehicleCollisionTesterCastSphere", ptr %45, i32 0, i32 2
  %134 = load float, ptr %133, align 4, !tbaa !15
  %135 = fadd float %132, %134
  %136 = load ptr, ptr %27, align 8, !tbaa !5
  %137 = getelementptr inbounds %"class.JPH::WheelSettings", ptr %136, i32 0, i32 13
  %138 = load float, ptr %137, align 8, !tbaa !23
  %139 = fsub float %135, %138
  %140 = load ptr, ptr %27, align 8, !tbaa !5
  %141 = getelementptr inbounds %"class.JPH::WheelSettings", ptr %140, i32 0, i32 10
  %142 = load float, ptr %141, align 4, !tbaa !30
  %143 = call noundef float @_ZN3JPH5ClampIfEET_S1_S1_S1_(float noundef %139, float noundef 0.000000e+00, float noundef %142)
  %144 = load ptr, ptr %26, align 8, !tbaa !5
  store float %143, ptr %144, align 4, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %150

145:                                              ; preds = %14
  %146 = load ptr, ptr %27, align 8, !tbaa !5
  %147 = getelementptr inbounds %"class.JPH::WheelSettings", ptr %146, i32 0, i32 10
  %148 = load float, ptr %147, align 4, !tbaa !30
  %149 = load ptr, ptr %26, align 8, !tbaa !5
  store float %148, ptr %149, align 4, !tbaa !13
  br label %150

150:                                              ; preds = %145, %58
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="128" "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 = { alwaysinline 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 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

!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 = !{!"int", !7, i64 0}
!11 = !{i64 0, i64 16, !12}
!12 = !{!7, !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = !{!16, !14, i64 44}
!16 = !{!"_ZTSN3JPH32VehicleCollisionTesterCastSphereE", !17, i64 0, !14, i64 44, !22, i64 48, !14, i64 64}
!17 = !{!"_ZTSN3JPH22VehicleCollisionTesterE", !18, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !21, i64 40}
!18 = !{!"_ZTSN3JPH9RefTargetINS_22VehicleCollisionTesterEEE", !19, i64 0}
!19 = !{!"_ZTSSt6atomicIjE", !20, i64 0}
!20 = !{!"_ZTSSt13__atomic_baseIjE", !10, i64 0}
!21 = !{!"short", !7, i64 0}
!22 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!23 = !{!24, !14, i64 136}
!24 = !{!"_ZTSN3JPH13WheelSettingsE", !25, i64 0, !26, i64 8, !22, i64 16, !22, i64 32, !22, i64 48, !22, i64 64, !22, i64 80, !22, i64 96, !14, i64 112, !14, i64 116, !14, i64 120, !27, i64 124, !14, i64 136, !14, i64 140, !29, i64 144}
!25 = !{!"_ZTSN3JPH18SerializableObjectE"}
!26 = !{!"_ZTSN3JPH9RefTargetINS_13WheelSettingsEEE", !19, i64 0}
!27 = !{!"_ZTSN3JPH14SpringSettingsE", !28, i64 0, !7, i64 4, !14, i64 8}
!28 = !{!"_ZTSN3JPH11ESpringModeE", !7, i64 0}
!29 = !{!"bool", !7, i64 0}
!30 = !{!24, !14, i64 116}


; 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.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }

; 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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK3JPH17VehicleConstraint8GetWheelEj(ptr noundef nonnull align 16 dereferenceable(408), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK3JPH5Wheel11GetSettingsEv(ptr noundef nonnull align 16 dereferenceable(404)) local_unnamed_addr #1 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef, double, double) local_unnamed_addr #2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) local_unnamed_addr #3 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) local_unnamed_addr #2 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) local_unnamed_addr #2 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef float @_ZN3JPH5ClampIfEET_S1_S1_S1_(float noundef, float noundef, float noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH32VehicleCollisionTesterCastSphere24PredictContactPropertiesERNS_13PhysicsSystemERKNS_17VehicleConstraintEjNS_4Vec3ES6_RKNS_6BodyIDERPNS_4BodyERNS_10SubShapeIDERS6_SF_Rf(ptr nocapture noundef nonnull readonly align 16 dereferenceable(68) %0, ptr nocapture noundef nonnull readnone align 16 dereferenceable(1172) %1, ptr noundef nonnull align 16 dereferenceable(408) %2, i32 noundef %3, double %4, double %5, double %6, double %7, ptr nocapture noundef nonnull readnone align 4 dereferenceable(4) %8, ptr nocapture noundef nonnull readnone align 8 dereferenceable(8) %9, ptr nocapture noundef nonnull readnone align 4 dereferenceable(4) %10, ptr noundef nonnull align 16 dereferenceable(16) %11, ptr nocapture noundef nonnull readonly align 16 dereferenceable(16) %12, ptr nocapture noundef nonnull writeonly align 4 dereferenceable(4) %13) unnamed_addr #1 align 2 {
  %15 = alloca %"class.JPH::Vec3", align 16
  %16 = alloca %"class.JPH::Vec3", align 16
  %17 = alloca %"class.JPH::Vec3", align 16
  %18 = alloca %"class.JPH::Vec3", align 16
  store double %4, ptr %15, align 16
  %19 = getelementptr inbounds i8, ptr %15, i64 8
  store double %5, ptr %19, align 8
  store double %6, ptr %16, align 16
  %20 = getelementptr inbounds i8, ptr %16, i64 8
  store double %7, ptr %20, align 8
  %21 = tail call noundef ptr @_ZNK3JPH17VehicleConstraint8GetWheelEj(ptr noundef nonnull align 16 dereferenceable(408) %2, i32 noundef %3)
  %22 = tail call noundef ptr @_ZNK3JPH5Wheel11GetSettingsEv(ptr noundef nonnull align 16 dereferenceable(404) %21)
  %.sroa.014.0.copyload = load double, ptr %12, align 16
  %.sroa.215.0..sroa_idx = getelementptr inbounds i8, ptr %12, i64 8
  %.sroa.215.0.copyload = load double, ptr %.sroa.215.0..sroa_idx, align 8, !tbaa !5
  %23 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %16, double %.sroa.014.0.copyload, double %.sroa.215.0.copyload)
  %24 = fcmp olt float %23, 0xBEB0C6F7A0000000
  br i1 %24, label %25, label %57

25:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #5
  %26 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %11, double %4, double %5)
  %27 = extractvalue { double, double } %26, 0
  store double %27, ptr %17, align 16
  %28 = getelementptr inbounds i8, ptr %17, i64 8
  %29 = extractvalue { double, double } %26, 1
  store double %29, ptr %28, align 8
  %.sroa.09.0.copyload = load double, ptr %12, align 16
  %.sroa.210.0.copyload = load double, ptr %.sroa.215.0..sroa_idx, align 8, !tbaa !5
  %30 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %17, double %.sroa.09.0.copyload, double %.sroa.210.0.copyload)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #5
  %31 = getelementptr inbounds i8, ptr %0, i64 44
  %32 = load float, ptr %31, align 4, !tbaa !8
  %33 = fadd float %30, %32
  %34 = fdiv float %33, %23
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) #5
  %.sroa.03.0.copyload = load double, ptr %16, align 16
  %.sroa.24.0.copyload = load double, ptr %20, align 8, !tbaa !5
  %35 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %34, double %.sroa.03.0.copyload, double %.sroa.24.0.copyload)
  %36 = extractvalue { double, double } %35, 0
  %37 = extractvalue { double, double } %35, 1
  %38 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %15, double %36, double %37)
  %39 = extractvalue { double, double } %38, 0
  store double %39, ptr %18, align 16
  %40 = getelementptr inbounds i8, ptr %18, i64 8
  %41 = extractvalue { double, double } %38, 1
  store double %41, ptr %40, align 8
  %42 = load float, ptr %31, align 4, !tbaa !8
  %.sroa.0.0.copyload = load double, ptr %12, align 16
  %.sroa.2.0.copyload = load double, ptr %.sroa.215.0..sroa_idx, align 8, !tbaa !5
  %43 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %42, double %.sroa.0.0.copyload, double %.sroa.2.0.copyload)
  %44 = extractvalue { double, double } %43, 0
  %45 = extractvalue { double, double } %43, 1
  %46 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %18, double %44, double %45)
  %47 = extractvalue { double, double } %46, 0
  %48 = extractvalue { double, double } %46, 1
  store double %47, ptr %11, align 16
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %11, i64 8
  store double %48, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #5
  %49 = load float, ptr %31, align 4, !tbaa !8
  %50 = fadd float %34, %49
  %51 = getelementptr inbounds i8, ptr %22, i64 136
  %52 = load float, ptr %51, align 8, !tbaa !19
  %53 = fsub float %50, %52
  %54 = getelementptr inbounds i8, ptr %22, i64 116
  %55 = load float, ptr %54, align 4, !tbaa !26
  %56 = call noundef float @_ZN3JPH5ClampIfEET_S1_S1_S1_(float noundef %53, float noundef 0.000000e+00, float noundef %55)
  br label %60

57:                                               ; preds = %14
  %58 = getelementptr inbounds i8, ptr %22, i64 116
  %59 = load float, ptr %58, align 4, !tbaa !26
  br label %60

60:                                               ; preds = %57, %25
  %storemerge = phi float [ %59, %57 ], [ %56, %25 ]
  store float %storemerge, ptr %13, align 4, !tbaa !27
  ret void
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="128" "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 = { alwaysinline 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 = { alwaysinline 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 #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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !17, i64 44}
!9 = !{!"_ZTSN3JPH32VehicleCollisionTesterCastSphereE", !10, i64 0, !17, i64 44, !18, i64 48, !17, i64 64}
!10 = !{!"_ZTSN3JPH22VehicleCollisionTesterE", !11, i64 8, !15, i64 16, !15, i64 24, !15, i64 32, !16, i64 40}
!11 = !{!"_ZTSN3JPH9RefTargetINS_22VehicleCollisionTesterEEE", !12, i64 0}
!12 = !{!"_ZTSSt6atomicIjE", !13, i64 0}
!13 = !{!"_ZTSSt13__atomic_baseIjE", !14, i64 0}
!14 = !{!"int", !6, i64 0}
!15 = !{!"any pointer", !6, i64 0}
!16 = !{!"short", !6, i64 0}
!17 = !{!"float", !6, i64 0}
!18 = !{!"_ZTSN3JPH4Vec3E", !6, i64 0}
!19 = !{!20, !17, i64 136}
!20 = !{!"_ZTSN3JPH13WheelSettingsE", !21, i64 0, !22, i64 8, !18, i64 16, !18, i64 32, !18, i64 48, !18, i64 64, !18, i64 80, !18, i64 96, !17, i64 112, !17, i64 116, !17, i64 120, !23, i64 124, !17, i64 136, !17, i64 140, !25, i64 144}
!21 = !{!"_ZTSN3JPH18SerializableObjectE"}
!22 = !{!"_ZTSN3JPH9RefTargetINS_13WheelSettingsEEE", !12, i64 0}
!23 = !{!"_ZTSN3JPH14SpringSettingsE", !24, i64 0, !6, i64 4, !17, i64 8}
!24 = !{!"_ZTSN3JPH11ESpringModeE", !6, i64 0}
!25 = !{!"bool", !6, i64 0}
!26 = !{!20, !17, i64 116}
!27 = !{!17, !17, i64 0}


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