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

; 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::VehicleController" = type { ptr, ptr }
%"class.JPH::TrackedVehicleController" = type { %"class.JPH::VehicleController", float, float, float, float, %"class.JPH::VehicleEngine", %"class.JPH::VehicleTransmission", [2 x %"class.JPH::VehicleTrack"] }
%"class.JPH::VehicleEngine" = type <{ %"class.JPH::VehicleEngineSettings", float, [4 x i8] }>
%"class.JPH::VehicleEngineSettings" = type { float, float, float, %"class.JPH::LinearCurve", float, float }
%"class.JPH::LinearCurve" = type { %"class.JPH::Array" }
%"class.JPH::Array" = type { i64, i64, ptr }
%"class.JPH::VehicleTransmission" = type <{ %"class.JPH::VehicleTransmissionSettings", i32, float, float, float, float, [4 x i8] }>
%"class.JPH::VehicleTransmissionSettings" = type { i8, %"class.JPH::Array.2", %"class.JPH::Array.2", float, float, float, float, float, float }
%"class.JPH::Array.2" = type { i64, i64, ptr }
%"class.JPH::VehicleTrack" = type <{ %"class.JPH::VehicleTrackSettings", float, [4 x i8] }>
%"class.JPH::VehicleTrackSettings" = type { i32, %"class.JPH::Array.5", float, float, float, float }
%"class.JPH::Array.5" = type { i64, i64, ptr }
%"class.JPH::WheelTV" = type { %"class.JPH::Wheel.base", i32, float, float, float, [12 x i8] }
%"class.JPH::Wheel.base" = type <{ ptr, %"class.JPH::RefConst", %"class.JPH::BodyID", %"class.JPH::SubShapeID", ptr, float, [12 x i8], %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", float, float, float, float, float, %"class.JPH::AxisConstraintPart", %"class.JPH::AxisConstraintPart", %"class.JPH::AxisConstraintPart", %"class.JPH::AxisConstraintPart" }>
%"class.JPH::RefConst" = type { ptr }
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::SubShapeID" = type { i32 }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::AxisConstraintPart" = type { %"class.JPH::Float3", %"class.JPH::Float3", %"class.JPH::Float3", %"class.JPH::Float3", float, %"class.JPH::SpringPart", float }
%"class.JPH::Float3" = type { float, float, float }
%"class.JPH::SpringPart" = type { float, 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZSt4sizeIN3JPH12VehicleTrackELm2EEmRAT0__KT_(ptr noundef nonnull align 8 dereferenceable(112)) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH24TrackedVehicleController10PreCollideEfRNS_13PhysicsSystemE(ptr noundef nonnull align 8 dereferenceable(304) %0, float noundef %1, ptr noundef nonnull align 16 dereferenceable(1172) %2) unnamed_addr #3 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca float, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca float, align 4
  %19 = alloca float, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store float %1, ptr %5, align 4, !tbaa !9
  store ptr %2, ptr %6, align 8, !tbaa !5
  %20 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %21 = getelementptr inbounds %"class.JPH::VehicleController", ptr %20, i32 0, i32 1
  %22 = load ptr, ptr %21, align 8, !tbaa !11
  %23 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH17VehicleConstraint9GetWheelsEv(ptr noundef nonnull align 16 dereferenceable(408) %22)
  store ptr %23, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store i64 0, ptr %8, align 8, !tbaa !13
  br label %24

24:                                               ; preds = %59, %3
  %25 = load i64, ptr %8, align 8, !tbaa !13
  %26 = getelementptr inbounds %"class.JPH::TrackedVehicleController", ptr %20, i32 0, i32 7
  %27 = call noundef i64 @_ZSt4sizeIN3JPH12VehicleTrackELm2EEmRAT0__KT_(ptr noundef nonnull align 8 dereferenceable(112) %26) #6
  %28 = icmp ult i64 %25, %27
  br i1 %28, label %30, label %29

29:                                               ; preds = %24
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %62

30:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %31 = getelementptr inbounds %"class.JPH::TrackedVehicleController", ptr %20, i32 0, i32 7
  %32 = load i64, ptr %8, align 8, !tbaa !13
  %33 = getelementptr inbounds [2 x %"class.JPH::VehicleTrack"], ptr %31, i64 0, i64 %32
  %34 = getelementptr inbounds %"class.JPH::VehicleTrackSettings", ptr %33, i32 0, i32 1
  store ptr %34, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %35 = load ptr, ptr %10, align 8, !tbaa !5
  %36 = call noundef ptr @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %35)
  store ptr %36, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %37 = load ptr, ptr %10, align 8, !tbaa !5
  %38 = call noundef ptr @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %37)
  store ptr %38, ptr %12, align 8, !tbaa !5
  br label %39

39:                                               ; preds = %55, %30
  %40 = load ptr, ptr %11, align 8, !tbaa !5
  %41 = load ptr, ptr %12, align 8, !tbaa !5
  %42 = icmp ne ptr %40, %41
  br i1 %42, label %44, label %43

43:                                               ; preds = %39
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %58

44:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %45 = load ptr, ptr %11, align 8, !tbaa !5
  %46 = load i32, ptr %45, align 4, !tbaa !15
  store i32 %46, ptr %13, align 4, !tbaa !15
  %47 = load i64, ptr %8, align 8, !tbaa !13
  %48 = trunc i64 %47 to i32
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = load i32, ptr %13, align 4, !tbaa !15
  %51 = zext i32 %50 to i64
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef %51)
  %53 = load ptr, ptr %52, align 8, !tbaa !5
  %54 = getelementptr inbounds %"class.JPH::WheelTV", ptr %53, i32 0, i32 1
  store i32 %48, ptr %54, align 4, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %55

55:                                               ; preds = %44
  %56 = load ptr, ptr %11, align 8, !tbaa !5
  %57 = getelementptr inbounds i32, ptr %56, i32 1
  store ptr %57, ptr %11, align 8, !tbaa !5
  br label %39

58:                                               ; preds = %43
  br label %59

59:                                               ; preds = %58
  %60 = load i64, ptr %8, align 8, !tbaa !13
  %61 = add i64 %60, 1
  store i64 %61, ptr %8, align 8, !tbaa !13
  br label %24, !llvm.loop !27

62:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %63 = getelementptr inbounds %"class.JPH::TrackedVehicleController", ptr %20, i32 0, i32 7
  store ptr %63, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %64 = load ptr, ptr %14, align 8, !tbaa !5
  %65 = getelementptr inbounds [2 x %"class.JPH::VehicleTrack"], ptr %64, i64 0, i64 0
  store ptr %65, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %66 = load ptr, ptr %14, align 8, !tbaa !5
  %67 = getelementptr inbounds [2 x %"class.JPH::VehicleTrack"], ptr %66, i64 0, i64 0
  %68 = getelementptr inbounds %"class.JPH::VehicleTrack", ptr %67, i64 2
  store ptr %68, ptr %16, align 8, !tbaa !5
  br label %69

69:                                               ; preds = %88, %62
  %70 = load ptr, ptr %15, align 8, !tbaa !5
  %71 = load ptr, ptr %16, align 8, !tbaa !5
  %72 = icmp ne ptr %70, %71
  br i1 %72, label %74, label %73

73:                                               ; preds = %69
  store i32 7, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %91

74:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %75 = load ptr, ptr %15, align 8, !tbaa !5
  store ptr %75, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store float 0.000000e+00, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %76 = load ptr, ptr %17, align 8, !tbaa !5
  %77 = getelementptr inbounds %"class.JPH::VehicleTrackSettings", ptr %76, i32 0, i32 3
  %78 = load float, ptr %77, align 4, !tbaa !29
  %79 = load float, ptr %5, align 4, !tbaa !9
  %80 = fneg float %78
  %81 = call float @llvm.fmuladd.f32(float %80, float %79, float 1.000000e+00)
  store float %81, ptr %19, align 4, !tbaa !9
  %82 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %19)
  %83 = load float, ptr %82, align 4, !tbaa !9
  %84 = load ptr, ptr %17, align 8, !tbaa !5
  %85 = getelementptr inbounds %"class.JPH::VehicleTrack", ptr %84, i32 0, i32 1
  %86 = load float, ptr %85, align 8, !tbaa !32
  %87 = fmul float %86, %83
  store float %87, ptr %85, align 8, !tbaa !32
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %88

88:                                               ; preds = %74
  %89 = load ptr, ptr %15, align 8, !tbaa !5
  %90 = getelementptr inbounds %"class.JPH::VehicleTrack", ptr %89, i32 1
  store ptr %90, ptr %15, align 8, !tbaa !5
  br label %69

91:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH17VehicleConstraint9GetWheelsEv(ptr noundef nonnull align 16 dereferenceable(408)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = !{!"float", !7, i64 0}
!11 = !{!12, !6, i64 8}
!12 = !{!"_ZTSN3JPH17VehicleControllerE", !6, i64 8}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!18, !16, i64 404}
!18 = !{!"_ZTSN3JPH7WheelTVE", !19, i64 0, !16, i64 404, !10, i64 408, !10, i64 412, !10, i64 416}
!19 = !{!"_ZTSN3JPH5WheelE", !20, i64 8, !21, i64 16, !22, i64 20, !6, i64 24, !10, i64 32, !23, i64 48, !23, i64 64, !23, i64 80, !23, i64 96, !23, i64 112, !10, i64 128, !10, i64 132, !10, i64 136, !10, i64 140, !10, i64 144, !24, i64 148, !24, i64 212, !24, i64 276, !24, i64 340}
!20 = !{!"_ZTSN3JPH8RefConstINS_13WheelSettingsEEE", !6, i64 0}
!21 = !{!"_ZTSN3JPH6BodyIDE", !16, i64 0}
!22 = !{!"_ZTSN3JPH10SubShapeIDE", !16, i64 0}
!23 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!24 = !{!"_ZTSN3JPH18AxisConstraintPartE", !25, i64 0, !25, i64 12, !25, i64 24, !25, i64 36, !10, i64 48, !26, i64 52, !10, i64 60}
!25 = !{!"_ZTSN3JPH6Float3E", !10, i64 0, !10, i64 4, !10, i64 8}
!26 = !{!"_ZTSN3JPH10SpringPartE", !10, i64 0, !10, i64 4}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!30, !10, i64 36}
!30 = !{!"_ZTSN3JPH20VehicleTrackSettingsE", !16, i64 0, !31, i64 8, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44}
!31 = !{!"_ZTSN3JPH5ArrayIjNS_12STLAllocatorIjEEEE", !14, i64 0, !14, i64 8, !6, i64 16}
!32 = !{!33, !10, i64 48}
!33 = !{!"_ZTSN3JPH12VehicleTrackE", !30, i64 0, !10, i64 48}


; 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::VehicleTrack" = type <{ %"class.JPH::VehicleTrackSettings", float, [4 x i8] }>
%"class.JPH::VehicleTrackSettings" = type { i32, %"class.JPH::Array.5", float, float, float, float }
%"class.JPH::Array.5" = type { i64, i64, ptr }

; 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 nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZSt4sizeIN3JPH12VehicleTrackELm2EEmRAT0__KT_(ptr noundef nonnull align 8 dereferenceable(112)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH24TrackedVehicleController10PreCollideEfRNS_13PhysicsSystemE(ptr noundef nonnull align 8 dereferenceable(304) %0, float noundef %1, ptr nocapture noundef nonnull readnone align 16 dereferenceable(1172) %2) unnamed_addr #3 align 2 {
  %4 = alloca float, align 4
  %5 = alloca float, align 4
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  %7 = load ptr, ptr %6, align 8, !tbaa !5
  %8 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH17VehicleConstraint9GetWheelsEv(ptr noundef nonnull align 16 dereferenceable(408) %7)
  %.ptr23 = getelementptr inbounds i8, ptr %0, i64 192
  %9 = tail call noundef i64 @_ZSt4sizeIN3JPH12VehicleTrackELm2EEmRAT0__KT_(ptr noundef nonnull align 8 dereferenceable(112) %.ptr23) #6
  %.not31 = icmp eq i64 %9, 0
  br i1 %.not31, label %.preheader, label %.lr.ph29

.preheader:                                       ; preds = %._crit_edge, %3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  store float 0.000000e+00, ptr %4, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  %10 = getelementptr inbounds i8, ptr %0, i64 228
  %11 = load float, ptr %10, align 4, !tbaa !12
  %12 = fneg float %11
  %13 = tail call float @llvm.fmuladd.f32(float %12, float %1, float 1.000000e+00)
  store float %13, ptr %5, align 4, !tbaa !10
  %14 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %15 = load float, ptr %14, align 4, !tbaa !10
  %16 = getelementptr inbounds i8, ptr %0, i64 240
  %17 = load float, ptr %16, align 8, !tbaa !17
  %18 = fmul float %15, %17
  store float %18, ptr %16, align 8, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  store float 0.000000e+00, ptr %4, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  %19 = getelementptr inbounds i8, ptr %0, i64 284
  %20 = load float, ptr %19, align 4, !tbaa !12
  %21 = fneg float %20
  %22 = call float @llvm.fmuladd.f32(float %21, float %1, float 1.000000e+00)
  store float %22, ptr %5, align 4, !tbaa !10
  %23 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %24 = load float, ptr %23, align 4, !tbaa !10
  %25 = getelementptr inbounds i8, ptr %0, i64 296
  %26 = load float, ptr %25, align 8, !tbaa !17
  %27 = fmul float %24, %26
  store float %27, ptr %25, align 8, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  ret void

.lr.ph29:                                         ; preds = %3, %._crit_edge
  %.027 = phi i64 [ %32, %._crit_edge ], [ 0, %3 ]
  %28 = getelementptr inbounds [2 x %"class.JPH::VehicleTrack"], ptr %.ptr23, i64 0, i64 %.027, i32 0, i32 1
  %29 = tail call noundef ptr @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %28)
  %30 = tail call noundef ptr @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %28)
  %.not2425 = icmp eq ptr %29, %30
  br i1 %.not2425, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph29
  %31 = trunc i64 %.027 to i32
  br label %35

._crit_edge:                                      ; preds = %35, %.lr.ph29
  %32 = add nuw i64 %.027, 1
  %33 = tail call noundef i64 @_ZSt4sizeIN3JPH12VehicleTrackELm2EEmRAT0__KT_(ptr noundef nonnull align 8 dereferenceable(112) %.ptr23) #6
  %34 = icmp ult i64 %32, %33
  br i1 %34, label %.lr.ph29, label %.preheader, !llvm.loop !19

35:                                               ; preds = %.lr.ph, %35
  %.02226 = phi ptr [ %29, %.lr.ph ], [ %41, %35 ]
  %36 = load i32, ptr %.02226, align 4, !tbaa !21
  %37 = zext i32 %36 to i64
  %38 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %37)
  %39 = load ptr, ptr %38, align 8, !tbaa !22
  %40 = getelementptr inbounds i8, ptr %39, i64 404
  store i32 %31, ptr %40, align 4, !tbaa !23
  %41 = getelementptr inbounds i8, ptr %.02226, i64 4
  %.not24 = icmp eq ptr %41, %30
  br i1 %.not24, label %._crit_edge, label %35
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH17VehicleConstraint9GetWheelsEv(ptr noundef nonnull align 16 dereferenceable(408)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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, !7, i64 8}
!6 = !{!"_ZTSN3JPH17VehicleControllerE", !7, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !11, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!13, !11, i64 36}
!13 = !{!"_ZTSN3JPH20VehicleTrackSettingsE", !14, i64 0, !15, i64 8, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44}
!14 = !{!"int", !8, i64 0}
!15 = !{!"_ZTSN3JPH5ArrayIjNS_12STLAllocatorIjEEEE", !16, i64 0, !16, i64 8, !7, i64 16}
!16 = !{!"long", !8, i64 0}
!17 = !{!18, !11, i64 48}
!18 = !{!"_ZTSN3JPH12VehicleTrackE", !13, i64 0, !11, i64 48}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!14, !14, i64 0}
!22 = !{!7, !7, i64 0}
!23 = !{!24, !14, i64 404}
!24 = !{!"_ZTSN3JPH7WheelTVE", !25, i64 0, !14, i64 404, !11, i64 408, !11, i64 412, !11, i64 416}
!25 = !{!"_ZTSN3JPH5WheelE", !26, i64 8, !27, i64 16, !28, i64 20, !7, i64 24, !11, i64 32, !29, i64 48, !29, i64 64, !29, i64 80, !29, i64 96, !29, i64 112, !11, i64 128, !11, i64 132, !11, i64 136, !11, i64 140, !11, i64 144, !30, i64 148, !30, i64 212, !30, i64 276, !30, i64 340}
!26 = !{!"_ZTSN3JPH8RefConstINS_13WheelSettingsEEE", !7, i64 0}
!27 = !{!"_ZTSN3JPH6BodyIDE", !14, i64 0}
!28 = !{!"_ZTSN3JPH10SubShapeIDE", !14, i64 0}
!29 = !{!"_ZTSN3JPH4Vec3E", !8, i64 0}
!30 = !{!"_ZTSN3JPH18AxisConstraintPartE", !31, i64 0, !31, i64 12, !31, i64 24, !31, i64 36, !11, i64 48, !32, i64 52, !11, i64 60}
!31 = !{!"_ZTSN3JPH6Float3E", !11, i64 0, !11, i64 4, !11, i64 8}
!32 = !{!"_ZTSN3JPH10SpringPartE", !11, i64 0, !11, i64 4}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass