; 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::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"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::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 }
%"class.JPH::WheelSettings" = type <{ %"class.JPH::SerializableObject", %"class.JPH::RefTarget.12", [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.12" = type { %"struct.std::atomic" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"class.JPH::SpringSettings" = type { i8, %union.anon.13, float }
%union.anon.13 = 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 void @_ZN3JPH7WheelTV24CalculateAngularVelocityERKNS_17VehicleConstraintE(ptr noundef nonnull align 16 dereferenceable(420), ptr noundef nonnull align 16 dereferenceable(408)) #1 align 2

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

; 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: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH24TrackedVehicleController19SyncLeftRightTracksEv(ptr noundef nonnull align 8 dereferenceable(304)) #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH5Wheel10HasContactEv(ptr noundef nonnull align 16 dereferenceable(404)) #4 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3JPH24TrackedVehicleController38SolveLongitudinalAndLateralConstraintsEf(ptr noundef nonnull align 8 dereferenceable(304) %0, float noundef %1) unnamed_addr #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca float, align 4
  %5 = alloca i8, align 1
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca float, align 4
  %14 = alloca %"class.JPH::Vec3", align 16
  %15 = alloca %"class.JPH::Vec3", align 16
  %16 = alloca %"class.JPH::Vec3", align 16
  %17 = alloca %"class.JPH::Vec3", align 16
  %18 = alloca float, align 4
  %19 = alloca %"class.JPH::Vec3", align 16
  %20 = alloca float, align 4
  %21 = alloca float, align 4
  %22 = alloca float, align 4
  %23 = alloca float, align 4
  %24 = alloca float, align 4
  %25 = alloca float, align 4
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca float, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store float %1, ptr %4, align 4, !tbaa !9
  %32 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #8
  store i8 0, ptr %5, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %33 = getelementptr inbounds %"class.JPH::VehicleController", ptr %32, i32 0, i32 1
  %34 = load ptr, ptr %33, align 8, !tbaa !13
  %35 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH17VehicleConstraint9GetWheelsEv(ptr noundef nonnull align 16 dereferenceable(408) %34)
  store ptr %35, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = call noundef ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %36)
  store ptr %37, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = call noundef ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %38)
  store ptr %39, ptr %8, align 8, !tbaa !5
  br label %40

40:                                               ; preds = %209, %2
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  %42 = load ptr, ptr %8, align 8, !tbaa !5
  %43 = icmp ne ptr %41, %42
  br i1 %43, label %45, label %44

44:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  br label %212

45:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = load ptr, ptr %46, align 8, !tbaa !5
  store ptr %47, ptr %9, align 8, !tbaa !5
  %48 = load ptr, ptr %9, align 8, !tbaa !5
  %49 = call noundef zeroext i1 @_ZNK3JPH5Wheel10HasContactEv(ptr noundef nonnull align 16 dereferenceable(404) %48)
  br i1 %49, label %50, label %208

50:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %51 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %51, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %52 = load ptr, ptr %10, align 8, !tbaa !5
  %53 = call noundef ptr @_ZNK3JPH7WheelTV11GetSettingsEv(ptr noundef nonnull align 16 dereferenceable(420) %52)
  store ptr %53, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %54 = getelementptr inbounds %"class.JPH::TrackedVehicleController", ptr %32, i32 0, i32 7
  %55 = load ptr, ptr %10, align 8, !tbaa !5
  %56 = getelementptr inbounds %"class.JPH::WheelTV", ptr %55, i32 0, i32 1
  %57 = load i32, ptr %56, align 4, !tbaa !15
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [2 x %"class.JPH::VehicleTrack"], ptr %54, i64 0, i64 %58
  store ptr %59, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  %60 = load ptr, ptr %10, align 8, !tbaa !5
  %61 = getelementptr inbounds %"class.JPH::WheelTV", ptr %60, i32 0, i32 2
  %62 = load float, ptr %61, align 8, !tbaa !26
  %63 = load ptr, ptr %10, align 8, !tbaa !5
  %64 = call noundef float @_ZNK3JPH5Wheel19GetSuspensionLambdaEv(ptr noundef nonnull align 16 dereferenceable(404) %63)
  %65 = fmul float %62, %64
  store float %65, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #8
  %66 = getelementptr inbounds %"class.JPH::VehicleController", ptr %32, i32 0, i32 1
  %67 = load ptr, ptr %66, align 8, !tbaa !13
  %68 = call noundef ptr @_ZNK3JPH17VehicleConstraint14GetVehicleBodyEv(ptr noundef nonnull align 16 dereferenceable(408) %67)
  %69 = load ptr, ptr %10, align 8, !tbaa !5
  %70 = call { double, double } @_ZNK3JPH5Wheel18GetContactPositionEv(ptr noundef nonnull align 16 dereferenceable(404) %69)
  %71 = getelementptr inbounds %"class.JPH::Vec3", ptr %16, i32 0, i32 0
  %72 = getelementptr inbounds %union.anon, ptr %71, i32 0, i32 0
  %73 = getelementptr inbounds { double, double }, ptr %72, i32 0, i32 0
  %74 = extractvalue { double, double } %70, 0
  store double %74, ptr %73, align 16
  %75 = getelementptr inbounds { double, double }, ptr %72, i32 0, i32 1
  %76 = extractvalue { double, double } %70, 1
  store double %76, ptr %75, align 8
  %77 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 0
  %78 = load double, ptr %77, align 16
  %79 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 1
  %80 = load double, ptr %79, align 8
  %81 = call { double, double } @_ZNK3JPH4Body16GetPointVelocityENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(122) %68, double %78, double %80)
  %82 = getelementptr inbounds %"class.JPH::Vec3", ptr %15, i32 0, i32 0
  %83 = getelementptr inbounds %union.anon, ptr %82, i32 0, i32 0
  %84 = getelementptr inbounds { double, double }, ptr %83, i32 0, i32 0
  %85 = extractvalue { double, double } %81, 0
  store double %85, ptr %84, align 16
  %86 = getelementptr inbounds { double, double }, ptr %83, i32 0, i32 1
  %87 = extractvalue { double, double } %81, 1
  store double %87, ptr %86, align 8
  %88 = load ptr, ptr %10, align 8, !tbaa !5
  %89 = call { double, double } @_ZNK3JPH5Wheel23GetContactPointVelocityEv(ptr noundef nonnull align 16 dereferenceable(404) %88)
  %90 = getelementptr inbounds %"class.JPH::Vec3", ptr %17, i32 0, i32 0
  %91 = getelementptr inbounds %union.anon, ptr %90, i32 0, i32 0
  %92 = getelementptr inbounds { double, double }, ptr %91, i32 0, i32 0
  %93 = extractvalue { double, double } %89, 0
  store double %93, ptr %92, align 16
  %94 = getelementptr inbounds { double, double }, ptr %91, i32 0, i32 1
  %95 = extractvalue { double, double } %89, 1
  store double %95, ptr %94, align 8
  %96 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 0
  %97 = load double, ptr %96, align 16
  %98 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 1
  %99 = load double, ptr %98, align 8
  %100 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %15, double %97, double %99)
  %101 = getelementptr inbounds %"class.JPH::Vec3", ptr %14, i32 0, i32 0
  %102 = getelementptr inbounds %union.anon, ptr %101, i32 0, i32 0
  %103 = getelementptr inbounds { double, double }, ptr %102, i32 0, i32 0
  %104 = extractvalue { double, double } %100, 0
  store double %104, ptr %103, align 16
  %105 = getelementptr inbounds { double, double }, ptr %102, i32 0, i32 1
  %106 = extractvalue { double, double } %100, 1
  store double %106, ptr %105, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  %108 = call { double, double } @_ZNK3JPH5Wheel22GetContactLongitudinalEv(ptr noundef nonnull align 16 dereferenceable(404) %107)
  %109 = getelementptr inbounds %"class.JPH::Vec3", ptr %19, i32 0, i32 0
  %110 = getelementptr inbounds %union.anon, ptr %109, i32 0, i32 0
  %111 = getelementptr inbounds { double, double }, ptr %110, i32 0, i32 0
  %112 = extractvalue { double, double } %108, 0
  store double %112, ptr %111, align 16
  %113 = getelementptr inbounds { double, double }, ptr %110, i32 0, i32 1
  %114 = extractvalue { double, double } %108, 1
  store double %114, ptr %113, align 8
  %115 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 0
  %116 = load double, ptr %115, align 16
  %117 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 1
  %118 = load double, ptr %117, align 8
  %119 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %14, double %116, double %118)
  store float %119, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  %120 = load ptr, ptr %10, align 8, !tbaa !5
  %121 = getelementptr inbounds %"class.JPH::WheelTV", ptr %120, i32 0, i32 4
  %122 = load float, ptr %121, align 16, !tbaa !27
  %123 = fcmp une float %122, 0.000000e+00
  br i1 %123, label %124, label %150

124:                                              ; preds = %50
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  %125 = load ptr, ptr %10, align 8, !tbaa !5
  %126 = getelementptr inbounds %"class.JPH::WheelTV", ptr %125, i32 0, i32 4
  %127 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %126, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %128 = load float, ptr %127, align 4, !tbaa !9
  store float %128, ptr %22, align 4, !tbaa !9
  %129 = load float, ptr %18, align 4, !tbaa !9
  %130 = fcmp oge float %129, 0.000000e+00
  br i1 %130, label %131, label %134

131:                                              ; preds = %124
  %132 = load float, ptr %22, align 4, !tbaa !9
  %133 = fneg float %132
  store float %133, ptr %20, align 4, !tbaa !9
  store float 0.000000e+00, ptr %21, align 4, !tbaa !9
  br label %136

134:                                              ; preds = %124
  store float 0.000000e+00, ptr %20, align 4, !tbaa !9
  %135 = load float, ptr %22, align 4, !tbaa !9
  store float %135, ptr %21, align 4, !tbaa !9
  br label %136

136:                                              ; preds = %134, %131
  %137 = load ptr, ptr %10, align 8, !tbaa !5
  %138 = getelementptr inbounds %"class.JPH::VehicleController", ptr %32, i32 0, i32 1
  %139 = load ptr, ptr %138, align 8, !tbaa !13
  %140 = load float, ptr %20, align 4, !tbaa !9
  %141 = load float, ptr %21, align 4, !tbaa !9
  %142 = call noundef zeroext i1 @_ZN3JPH5Wheel31SolveLongitudinalConstraintPartERKNS_17VehicleConstraintEff(ptr noundef nonnull align 16 dereferenceable(404) %137, ptr noundef nonnull align 16 dereferenceable(408) %139, float noundef %140, float noundef %141)
  %143 = zext i1 %142 to i32
  %144 = load i8, ptr %5, align 1, !tbaa !11, !range !28, !noundef !29
  %145 = trunc i8 %144 to i1
  %146 = zext i1 %145 to i32
  %147 = or i32 %146, %143
  %148 = icmp ne i32 %147, 0
  %149 = zext i1 %148 to i8
  store i8 %149, ptr %5, align 1, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  br label %207

150:                                              ; preds = %50
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  %151 = load float, ptr %18, align 4, !tbaa !9
  %152 = load ptr, ptr %11, align 8, !tbaa !5
  %153 = getelementptr inbounds %"class.JPH::WheelSettings", ptr %152, i32 0, i32 13
  %154 = load float, ptr %153, align 8, !tbaa !30
  %155 = fdiv float %151, %154
  store float %155, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  %156 = load ptr, ptr %12, align 8, !tbaa !5
  %157 = getelementptr inbounds %"class.JPH::VehicleTrack", ptr %156, i32 0, i32 1
  %158 = load float, ptr %157, align 8, !tbaa !38
  %159 = load float, ptr %23, align 4, !tbaa !9
  %160 = fsub float %158, %159
  %161 = load ptr, ptr %12, align 8, !tbaa !5
  %162 = getelementptr inbounds %"class.JPH::VehicleTrackSettings", ptr %161, i32 0, i32 2
  %163 = load float, ptr %162, align 8, !tbaa !43
  %164 = fmul float %160, %163
  %165 = load ptr, ptr %11, align 8, !tbaa !5
  %166 = getelementptr inbounds %"class.JPH::WheelSettings", ptr %165, i32 0, i32 13
  %167 = load float, ptr %166, align 8, !tbaa !30
  %168 = fdiv float %164, %167
  store float %168, ptr %24, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  %169 = load ptr, ptr %10, align 8, !tbaa !5
  %170 = call noundef float @_ZNK3JPH5Wheel21GetLongitudinalLambdaEv(ptr noundef nonnull align 16 dereferenceable(404) %169)
  store float %170, ptr %25, align 4, !tbaa !9
  %171 = load float, ptr %25, align 4, !tbaa !9
  %172 = load float, ptr %24, align 4, !tbaa !9
  %173 = fadd float %171, %172
  %174 = load float, ptr %13, align 4, !tbaa !9
  %175 = fneg float %174
  %176 = load float, ptr %13, align 4, !tbaa !9
  %177 = call noundef float @_ZN3JPH5ClampIfEET_S1_S1_S1_(float noundef %173, float noundef %175, float noundef %176)
  store float %177, ptr %21, align 4, !tbaa !9
  store float %177, ptr %20, align 4, !tbaa !9
  %178 = load ptr, ptr %10, align 8, !tbaa !5
  %179 = getelementptr inbounds %"class.JPH::VehicleController", ptr %32, i32 0, i32 1
  %180 = load ptr, ptr %179, align 8, !tbaa !13
  %181 = load float, ptr %20, align 4, !tbaa !9
  %182 = load float, ptr %21, align 4, !tbaa !9
  %183 = call noundef zeroext i1 @_ZN3JPH5Wheel31SolveLongitudinalConstraintPartERKNS_17VehicleConstraintEff(ptr noundef nonnull align 16 dereferenceable(404) %178, ptr noundef nonnull align 16 dereferenceable(408) %180, float noundef %181, float noundef %182)
  %184 = zext i1 %183 to i32
  %185 = load i8, ptr %5, align 1, !tbaa !11, !range !28, !noundef !29
  %186 = trunc i8 %185 to i1
  %187 = zext i1 %186 to i32
  %188 = or i32 %187, %184
  %189 = icmp ne i32 %188, 0
  %190 = zext i1 %189 to i8
  store i8 %190, ptr %5, align 1, !tbaa !11
  %191 = load ptr, ptr %10, align 8, !tbaa !5
  %192 = call noundef float @_ZNK3JPH5Wheel21GetLongitudinalLambdaEv(ptr noundef nonnull align 16 dereferenceable(404) %191)
  %193 = load float, ptr %25, align 4, !tbaa !9
  %194 = fsub float %192, %193
  %195 = load ptr, ptr %11, align 8, !tbaa !5
  %196 = getelementptr inbounds %"class.JPH::WheelSettings", ptr %195, i32 0, i32 13
  %197 = load float, ptr %196, align 8, !tbaa !30
  %198 = fmul float %194, %197
  %199 = load ptr, ptr %12, align 8, !tbaa !5
  %200 = getelementptr inbounds %"class.JPH::VehicleTrackSettings", ptr %199, i32 0, i32 2
  %201 = load float, ptr %200, align 8, !tbaa !43
  %202 = fdiv float %198, %201
  %203 = load ptr, ptr %12, align 8, !tbaa !5
  %204 = getelementptr inbounds %"class.JPH::VehicleTrack", ptr %203, i32 0, i32 1
  %205 = load float, ptr %204, align 8, !tbaa !38
  %206 = fsub float %205, %202
  store float %206, ptr %204, align 8, !tbaa !38
  call void @_ZN3JPH24TrackedVehicleController19SyncLeftRightTracksEv(ptr noundef nonnull align 8 dereferenceable(304) %32)
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %207

207:                                              ; preds = %150, %136
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %208

208:                                              ; preds = %207, %45
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  br label %209

209:                                              ; preds = %208
  %210 = load ptr, ptr %7, align 8, !tbaa !5
  %211 = getelementptr inbounds ptr, ptr %210, i32 1
  store ptr %211, ptr %7, align 8, !tbaa !5
  br label %40

212:                                              ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #8
  %213 = getelementptr inbounds %"class.JPH::VehicleController", ptr %32, i32 0, i32 1
  %214 = load ptr, ptr %213, align 8, !tbaa !13
  %215 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH17VehicleConstraint9GetWheelsEv(ptr noundef nonnull align 16 dereferenceable(408) %214)
  store ptr %215, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  %216 = load ptr, ptr %26, align 8, !tbaa !5
  %217 = call noundef ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %216)
  store ptr %217, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  %218 = load ptr, ptr %26, align 8, !tbaa !5
  %219 = call noundef ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %218)
  store ptr %219, ptr %28, align 8, !tbaa !5
  br label %220

220:                                              ; preds = %256, %212
  %221 = load ptr, ptr %27, align 8, !tbaa !5
  %222 = load ptr, ptr %28, align 8, !tbaa !5
  %223 = icmp ne ptr %221, %222
  br i1 %223, label %225, label %224

224:                                              ; preds = %220
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  br label %259

225:                                              ; preds = %220
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #8
  %226 = load ptr, ptr %27, align 8, !tbaa !5
  %227 = load ptr, ptr %226, align 8, !tbaa !5
  store ptr %227, ptr %29, align 8, !tbaa !5
  %228 = load ptr, ptr %29, align 8, !tbaa !5
  %229 = call noundef zeroext i1 @_ZNK3JPH5Wheel10HasContactEv(ptr noundef nonnull align 16 dereferenceable(404) %228)
  br i1 %229, label %230, label %255

230:                                              ; preds = %225
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  %231 = load ptr, ptr %29, align 8, !tbaa !5
  store ptr %231, ptr %30, align 8, !tbaa !5
  %232 = load ptr, ptr %30, align 8, !tbaa !5
  %233 = getelementptr inbounds %"class.JPH::VehicleController", ptr %32, i32 0, i32 1
  %234 = load ptr, ptr %233, align 8, !tbaa !13
  call void @_ZN3JPH7WheelTV24CalculateAngularVelocityERKNS_17VehicleConstraintE(ptr noundef nonnull align 16 dereferenceable(420) %232, ptr noundef nonnull align 16 dereferenceable(408) %234)
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #8
  %235 = load ptr, ptr %30, align 8, !tbaa !5
  %236 = getelementptr inbounds %"class.JPH::WheelTV", ptr %235, i32 0, i32 3
  %237 = load float, ptr %236, align 4, !tbaa !44
  %238 = load ptr, ptr %30, align 8, !tbaa !5
  %239 = call noundef float @_ZNK3JPH5Wheel19GetSuspensionLambdaEv(ptr noundef nonnull align 16 dereferenceable(404) %238)
  %240 = fmul float %237, %239
  store float %240, ptr %31, align 4, !tbaa !9
  %241 = load ptr, ptr %30, align 8, !tbaa !5
  %242 = getelementptr inbounds %"class.JPH::VehicleController", ptr %32, i32 0, i32 1
  %243 = load ptr, ptr %242, align 8, !tbaa !13
  %244 = load float, ptr %31, align 4, !tbaa !9
  %245 = fneg float %244
  %246 = load float, ptr %31, align 4, !tbaa !9
  %247 = call noundef zeroext i1 @_ZN3JPH5Wheel26SolveLateralConstraintPartERKNS_17VehicleConstraintEff(ptr noundef nonnull align 16 dereferenceable(404) %241, ptr noundef nonnull align 16 dereferenceable(408) %243, float noundef %245, float noundef %246)
  %248 = zext i1 %247 to i32
  %249 = load i8, ptr %5, align 1, !tbaa !11, !range !28, !noundef !29
  %250 = trunc i8 %249 to i1
  %251 = zext i1 %250 to i32
  %252 = or i32 %251, %248
  %253 = icmp ne i32 %252, 0
  %254 = zext i1 %253 to i8
  store i8 %254, ptr %5, align 1, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  br label %255

255:                                              ; preds = %230, %225
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  br label %256

256:                                              ; preds = %255
  %257 = load ptr, ptr %27, align 8, !tbaa !5
  %258 = getelementptr inbounds ptr, ptr %257, i32 1
  store ptr %258, ptr %27, align 8, !tbaa !5
  br label %220

259:                                              ; preds = %224
  %260 = load i8, ptr %5, align 1, !tbaa !11, !range !28, !noundef !29
  %261 = trunc i8 %260 to i1
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #8
  ret i1 %261
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Body16GetPointVelocityENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(122), double, double) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH5Wheel18GetContactPositionEv(ptr noundef nonnull align 16 dereferenceable(404)) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH5Wheel23GetContactPointVelocityEv(ptr noundef nonnull align 16 dereferenceable(404)) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH5Wheel22GetContactLongitudinalEv(ptr noundef nonnull align 16 dereferenceable(404)) #1 align 2

declare noundef zeroext i1 @_ZN3JPH5Wheel31SolveLongitudinalConstraintPartERKNS_17VehicleConstraintEff(ptr noundef nonnull align 16 dereferenceable(404), ptr noundef nonnull align 16 dereferenceable(408), float noundef, float noundef) #7

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

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

declare noundef zeroext i1 @_ZN3JPH5Wheel26SolveLateralConstraintPartERKNS_17VehicleConstraintEff(ptr noundef nonnull align 16 dereferenceable(404), ptr noundef nonnull align 16 dereferenceable(408), float noundef, float noundef) #7

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 = { 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 = { 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 #4 = { 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 #5 = { 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 #6 = { 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 #7 = { "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 #8 = { 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, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !6, i64 8}
!14 = !{!"_ZTSN3JPH17VehicleControllerE", !6, i64 8}
!15 = !{!16, !20, i64 404}
!16 = !{!"_ZTSN3JPH7WheelTVE", !17, i64 0, !20, i64 404, !10, i64 408, !10, i64 412, !10, i64 416}
!17 = !{!"_ZTSN3JPH5WheelE", !18, i64 8, !19, i64 16, !21, i64 20, !6, i64 24, !10, i64 32, !22, i64 48, !22, i64 64, !22, i64 80, !22, i64 96, !22, i64 112, !10, i64 128, !10, i64 132, !10, i64 136, !10, i64 140, !10, i64 144, !23, i64 148, !23, i64 212, !23, i64 276, !23, i64 340}
!18 = !{!"_ZTSN3JPH8RefConstINS_13WheelSettingsEEE", !6, i64 0}
!19 = !{!"_ZTSN3JPH6BodyIDE", !20, i64 0}
!20 = !{!"int", !7, i64 0}
!21 = !{!"_ZTSN3JPH10SubShapeIDE", !20, i64 0}
!22 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!23 = !{!"_ZTSN3JPH18AxisConstraintPartE", !24, i64 0, !24, i64 12, !24, i64 24, !24, i64 36, !10, i64 48, !25, i64 52, !10, i64 60}
!24 = !{!"_ZTSN3JPH6Float3E", !10, i64 0, !10, i64 4, !10, i64 8}
!25 = !{!"_ZTSN3JPH10SpringPartE", !10, i64 0, !10, i64 4}
!26 = !{!16, !10, i64 408}
!27 = !{!16, !10, i64 416}
!28 = !{i8 0, i8 2}
!29 = !{}
!30 = !{!31, !10, i64 136}
!31 = !{!"_ZTSN3JPH13WheelSettingsE", !32, i64 0, !33, i64 8, !22, i64 16, !22, i64 32, !22, i64 48, !22, i64 64, !22, i64 80, !22, i64 96, !10, i64 112, !10, i64 116, !10, i64 120, !36, i64 124, !10, i64 136, !10, i64 140, !12, i64 144}
!32 = !{!"_ZTSN3JPH18SerializableObjectE"}
!33 = !{!"_ZTSN3JPH9RefTargetINS_13WheelSettingsEEE", !34, i64 0}
!34 = !{!"_ZTSSt6atomicIjE", !35, i64 0}
!35 = !{!"_ZTSSt13__atomic_baseIjE", !20, i64 0}
!36 = !{!"_ZTSN3JPH14SpringSettingsE", !37, i64 0, !7, i64 4, !10, i64 8}
!37 = !{!"_ZTSN3JPH11ESpringModeE", !7, i64 0}
!38 = !{!39, !10, i64 48}
!39 = !{!"_ZTSN3JPH12VehicleTrackE", !40, i64 0, !10, i64 48}
!40 = !{!"_ZTSN3JPH20VehicleTrackSettingsE", !20, i64 0, !41, i64 8, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44}
!41 = !{!"_ZTSN3JPH5ArrayIjNS_12STLAllocatorIjEEEE", !42, i64 0, !42, i64 8, !6, i64 16}
!42 = !{!"long", !7, i64 0}
!43 = !{!40, !10, i64 32}
!44 = !{!16, !10, i64 412}


; 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> }
%"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 uwtable
declare dso_local void @_ZN3JPH7WheelTV24CalculateAngularVelocityERKNS_17VehicleConstraintE(ptr noundef nonnull align 16 dereferenceable(420), ptr noundef nonnull align 16 dereferenceable(408)) local_unnamed_addr #1 align 2

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

; 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: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH24TrackedVehicleController19SyncLeftRightTracksEv(ptr noundef nonnull align 8 dereferenceable(304)) local_unnamed_addr #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH5Wheel10HasContactEv(ptr noundef nonnull align 16 dereferenceable(404)) local_unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3JPH24TrackedVehicleController38SolveLongitudinalAndLateralConstraintsEf(ptr noundef nonnull align 8 dereferenceable(304) %0, float noundef %1) unnamed_addr #1 align 2 {
  %3 = alloca float, align 4
  %4 = alloca %"class.JPH::Vec3", align 16
  %5 = alloca %"class.JPH::Vec3", align 16
  %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)
  %9 = tail call noundef ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
  %10 = tail call noundef ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
  %.not67 = icmp eq ptr %9, %10
  br i1 %.not67, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %2
  %11 = getelementptr inbounds i8, ptr %5, i64 8
  %12 = getelementptr inbounds i8, ptr %4, i64 8
  %13 = getelementptr inbounds i8, ptr %0, i64 192
  br label %18

._crit_edge:                                      ; preds = %86, %2
  %.0.lcssa = phi i1 [ false, %2 ], [ %.2, %86 ]
  %14 = load ptr, ptr %6, align 8, !tbaa !5
  %15 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH17VehicleConstraint9GetWheelsEv(ptr noundef nonnull align 16 dereferenceable(408) %14)
  %16 = call noundef ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %15)
  %17 = call noundef ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %15)
  %.not6670 = icmp eq ptr %16, %17
  br i1 %.not6670, label %._crit_edge75, label %.lr.ph74

18:                                               ; preds = %.lr.ph, %86
  %.069 = phi i1 [ false, %.lr.ph ], [ %.2, %86 ]
  %.06268 = phi ptr [ %9, %.lr.ph ], [ %87, %86 ]
  %19 = load ptr, ptr %.06268, align 8, !tbaa !10
  %20 = call noundef zeroext i1 @_ZNK3JPH5Wheel10HasContactEv(ptr noundef nonnull align 16 dereferenceable(404) %19)
  br i1 %20, label %21, label %86

21:                                               ; preds = %18
  %22 = call noundef ptr @_ZNK3JPH7WheelTV11GetSettingsEv(ptr noundef nonnull align 16 dereferenceable(420) %19)
  %23 = getelementptr inbounds i8, ptr %19, i64 404
  %24 = load i32, ptr %23, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  %25 = getelementptr inbounds i8, ptr %19, i64 408
  %26 = load float, ptr %25, align 8, !tbaa !23
  %27 = call noundef float @_ZNK3JPH5Wheel19GetSuspensionLambdaEv(ptr noundef nonnull align 16 dereferenceable(404) %19)
  %28 = fmul float %26, %27
  store float %28, ptr %3, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #8
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = call noundef ptr @_ZNK3JPH17VehicleConstraint14GetVehicleBodyEv(ptr noundef nonnull align 16 dereferenceable(408) %29)
  %31 = call { double, double } @_ZNK3JPH5Wheel18GetContactPositionEv(ptr noundef nonnull align 16 dereferenceable(404) %19)
  %32 = extractvalue { double, double } %31, 0
  %33 = extractvalue { double, double } %31, 1
  %34 = call { double, double } @_ZNK3JPH4Body16GetPointVelocityENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(122) %30, double %32, double %33)
  %35 = extractvalue { double, double } %34, 0
  store double %35, ptr %5, align 16
  %36 = extractvalue { double, double } %34, 1
  store double %36, ptr %11, align 8
  %37 = call { double, double } @_ZNK3JPH5Wheel23GetContactPointVelocityEv(ptr noundef nonnull align 16 dereferenceable(404) %19)
  %38 = extractvalue { double, double } %37, 0
  %39 = extractvalue { double, double } %37, 1
  %40 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %5, double %38, double %39)
  %41 = extractvalue { double, double } %40, 0
  store double %41, ptr %4, align 16
  %42 = extractvalue { double, double } %40, 1
  store double %42, ptr %12, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #8
  %43 = call { double, double } @_ZNK3JPH5Wheel22GetContactLongitudinalEv(ptr noundef nonnull align 16 dereferenceable(404) %19)
  %44 = extractvalue { double, double } %43, 0
  %45 = extractvalue { double, double } %43, 1
  %46 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %4, double %44, double %45)
  %47 = getelementptr inbounds i8, ptr %19, i64 416
  %48 = load float, ptr %47, align 16, !tbaa !25
  %49 = fcmp une float %48, 0.000000e+00
  br i1 %49, label %50, label %57

50:                                               ; preds = %21
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %47, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %52 = load float, ptr %51, align 4, !tbaa !24
  %53 = fcmp ult float %46, 0.000000e+00
  %54 = fneg float %52
  %.064 = select i1 %53, float %52, float 0.000000e+00
  %.063 = select i1 %53, float 0.000000e+00, float %54
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = call noundef zeroext i1 @_ZN3JPH5Wheel31SolveLongitudinalConstraintPartERKNS_17VehicleConstraintEff(ptr noundef nonnull align 16 dereferenceable(404) %19, ptr noundef nonnull align 16 dereferenceable(408) %55, float noundef %.063, float noundef %.064)
  br label %85

57:                                               ; preds = %21
  %58 = sext i32 %24 to i64
  %59 = getelementptr inbounds [2 x %"class.JPH::VehicleTrack"], ptr %13, i64 0, i64 %58
  %60 = getelementptr inbounds i8, ptr %22, i64 136
  %61 = load float, ptr %60, align 8, !tbaa !26
  %62 = fdiv float %46, %61
  %63 = getelementptr inbounds i8, ptr %59, i64 48
  %64 = load float, ptr %63, align 8, !tbaa !35
  %65 = fsub float %64, %62
  %66 = getelementptr inbounds i8, ptr %59, i64 32
  %67 = load float, ptr %66, align 8, !tbaa !40
  %68 = fmul float %65, %67
  %69 = fdiv float %68, %61
  %70 = call noundef float @_ZNK3JPH5Wheel21GetLongitudinalLambdaEv(ptr noundef nonnull align 16 dereferenceable(404) %19)
  %71 = fadd float %70, %69
  %72 = load float, ptr %3, align 4, !tbaa !24
  %73 = fneg float %72
  %74 = call noundef float @_ZN3JPH5ClampIfEET_S1_S1_S1_(float noundef %71, float noundef %73, float noundef %72)
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = call noundef zeroext i1 @_ZN3JPH5Wheel31SolveLongitudinalConstraintPartERKNS_17VehicleConstraintEff(ptr noundef nonnull align 16 dereferenceable(404) %19, ptr noundef nonnull align 16 dereferenceable(408) %75, float noundef %74, float noundef %74)
  %77 = call noundef float @_ZNK3JPH5Wheel21GetLongitudinalLambdaEv(ptr noundef nonnull align 16 dereferenceable(404) %19)
  %78 = fsub float %77, %70
  %79 = load float, ptr %60, align 8, !tbaa !26
  %80 = fmul float %78, %79
  %81 = load float, ptr %66, align 8, !tbaa !40
  %82 = fdiv float %80, %81
  %83 = load float, ptr %63, align 8, !tbaa !35
  %84 = fsub float %83, %82
  store float %84, ptr %63, align 8, !tbaa !35
  call void @_ZN3JPH24TrackedVehicleController19SyncLeftRightTracksEv(ptr noundef nonnull align 8 dereferenceable(304) %0)
  br label %85

85:                                               ; preds = %57, %50
  %.pn = phi i1 [ %56, %50 ], [ %76, %57 ]
  %.1 = or i1 %.069, %.pn
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  br label %86

86:                                               ; preds = %85, %18
  %.2 = phi i1 [ %.1, %85 ], [ %.069, %18 ]
  %87 = getelementptr inbounds i8, ptr %.06268, i64 8
  %.not = icmp eq ptr %87, %10
  br i1 %.not, label %._crit_edge, label %18

._crit_edge75:                                    ; preds = %100, %._crit_edge
  %.3.lcssa = phi i1 [ %.0.lcssa, %._crit_edge ], [ %.4, %100 ]
  ret i1 %.3.lcssa

.lr.ph74:                                         ; preds = %._crit_edge, %100
  %.372 = phi i1 [ %.4, %100 ], [ %.0.lcssa, %._crit_edge ]
  %.06571 = phi ptr [ %101, %100 ], [ %16, %._crit_edge ]
  %88 = load ptr, ptr %.06571, align 8, !tbaa !10
  %89 = call noundef zeroext i1 @_ZNK3JPH5Wheel10HasContactEv(ptr noundef nonnull align 16 dereferenceable(404) %88)
  br i1 %89, label %90, label %100

90:                                               ; preds = %.lr.ph74
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN3JPH7WheelTV24CalculateAngularVelocityERKNS_17VehicleConstraintE(ptr noundef nonnull align 16 dereferenceable(420) %88, ptr noundef nonnull align 16 dereferenceable(408) %91)
  %92 = getelementptr inbounds i8, ptr %88, i64 412
  %93 = load float, ptr %92, align 4, !tbaa !41
  %94 = call noundef float @_ZNK3JPH5Wheel19GetSuspensionLambdaEv(ptr noundef nonnull align 16 dereferenceable(404) %88)
  %95 = fmul float %93, %94
  %96 = load ptr, ptr %6, align 8, !tbaa !5
  %97 = fneg float %95
  %98 = call noundef zeroext i1 @_ZN3JPH5Wheel26SolveLateralConstraintPartERKNS_17VehicleConstraintEff(ptr noundef nonnull align 16 dereferenceable(404) %88, ptr noundef nonnull align 16 dereferenceable(408) %96, float noundef %97, float noundef %95)
  %99 = or i1 %.372, %98
  br label %100

100:                                              ; preds = %90, %.lr.ph74
  %.4 = phi i1 [ %99, %90 ], [ %.372, %.lr.ph74 ]
  %101 = getelementptr inbounds i8, ptr %.06571, i64 8
  %.not66 = icmp eq ptr %101, %17
  br i1 %.not66, label %._crit_edge75, label %.lr.ph74
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH5Wheel18GetContactPositionEv(ptr noundef nonnull align 16 dereferenceable(404)) local_unnamed_addr #1 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 #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH5Wheel23GetContactPointVelocityEv(ptr noundef nonnull align 16 dereferenceable(404)) local_unnamed_addr #1 align 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 #6 align 2

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

declare noundef zeroext i1 @_ZN3JPH5Wheel31SolveLongitudinalConstraintPartERKNS_17VehicleConstraintEff(ptr noundef nonnull align 16 dereferenceable(404), ptr noundef nonnull align 16 dereferenceable(408), float noundef, float noundef) local_unnamed_addr #7

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

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

declare noundef zeroext i1 @_ZN3JPH5Wheel26SolveLateralConstraintPartERKNS_17VehicleConstraintEff(ptr noundef nonnull align 16 dereferenceable(404), ptr noundef nonnull align 16 dereferenceable(408), float noundef, float noundef) local_unnamed_addr #7

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 = { 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 = { 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 #4 = { 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 #5 = { 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 #6 = { 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 #7 = { "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 #8 = { 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 = !{!7, !7, i64 0}
!11 = !{!12, !16, i64 404}
!12 = !{!"_ZTSN3JPH7WheelTVE", !13, i64 0, !16, i64 404, !18, i64 408, !18, i64 412, !18, i64 416}
!13 = !{!"_ZTSN3JPH5WheelE", !14, i64 8, !15, i64 16, !17, i64 20, !7, i64 24, !18, i64 32, !19, i64 48, !19, i64 64, !19, i64 80, !19, i64 96, !19, i64 112, !18, i64 128, !18, i64 132, !18, i64 136, !18, i64 140, !18, i64 144, !20, i64 148, !20, i64 212, !20, i64 276, !20, i64 340}
!14 = !{!"_ZTSN3JPH8RefConstINS_13WheelSettingsEEE", !7, i64 0}
!15 = !{!"_ZTSN3JPH6BodyIDE", !16, i64 0}
!16 = !{!"int", !8, i64 0}
!17 = !{!"_ZTSN3JPH10SubShapeIDE", !16, i64 0}
!18 = !{!"float", !8, i64 0}
!19 = !{!"_ZTSN3JPH4Vec3E", !8, i64 0}
!20 = !{!"_ZTSN3JPH18AxisConstraintPartE", !21, i64 0, !21, i64 12, !21, i64 24, !21, i64 36, !18, i64 48, !22, i64 52, !18, i64 60}
!21 = !{!"_ZTSN3JPH6Float3E", !18, i64 0, !18, i64 4, !18, i64 8}
!22 = !{!"_ZTSN3JPH10SpringPartE", !18, i64 0, !18, i64 4}
!23 = !{!12, !18, i64 408}
!24 = !{!18, !18, i64 0}
!25 = !{!12, !18, i64 416}
!26 = !{!27, !18, i64 136}
!27 = !{!"_ZTSN3JPH13WheelSettingsE", !28, i64 0, !29, i64 8, !19, i64 16, !19, i64 32, !19, i64 48, !19, i64 64, !19, i64 80, !19, i64 96, !18, i64 112, !18, i64 116, !18, i64 120, !32, i64 124, !18, i64 136, !18, i64 140, !34, i64 144}
!28 = !{!"_ZTSN3JPH18SerializableObjectE"}
!29 = !{!"_ZTSN3JPH9RefTargetINS_13WheelSettingsEEE", !30, i64 0}
!30 = !{!"_ZTSSt6atomicIjE", !31, i64 0}
!31 = !{!"_ZTSSt13__atomic_baseIjE", !16, i64 0}
!32 = !{!"_ZTSN3JPH14SpringSettingsE", !33, i64 0, !8, i64 4, !18, i64 8}
!33 = !{!"_ZTSN3JPH11ESpringModeE", !8, i64 0}
!34 = !{!"bool", !8, i64 0}
!35 = !{!36, !18, i64 48}
!36 = !{!"_ZTSN3JPH12VehicleTrackE", !37, i64 0, !18, i64 48}
!37 = !{!"_ZTSN3JPH20VehicleTrackSettingsE", !16, i64 0, !38, i64 8, !18, i64 32, !18, i64 36, !18, i64 40, !18, i64 44}
!38 = !{!"_ZTSN3JPH5ArrayIjNS_12STLAllocatorIjEEEE", !39, i64 0, !39, i64 8, !7, i64 16}
!39 = !{!"long", !8, i64 0}
!40 = !{!37, !18, i64 32}
!41 = !{!12, !18, i64 412}


; Effective O3 passes: AggressiveInstCombinePass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass