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

; 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::WheeledVehicleController" = type { %"class.JPH::VehicleController", float, float, float, float, %"class.JPH::VehicleEngine", %"class.JPH::VehicleTransmission", %"class.JPH::Array.5", float, float, %"class.std::function.29" }
%"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::Array.5" = type { i64, i64, ptr }
%"class.std::function.29" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"class.JPH::WheelWV" = type { %"class.JPH::Wheel.base", float, float, float, float, float, [8 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 }
%"class.JPH::WheelSettingsWV" = type { %"class.JPH::WheelSettings.base", float, float, float, %"class.JPH::LinearCurve", %"class.JPH::LinearCurve", float, float, [8 x i8] }
%"class.JPH::WheelSettings.base" = 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 }>

; 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 @_ZNK3JPH7WheelWV11GetSettingsEv(ptr noundef nonnull align 16 dereferenceable(424)) #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) #3 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3JPH5Wheel18GetAngularVelocityEv(ptr noundef nonnull align 16 dereferenceable(404)) #2 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #6 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #6 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)) #6

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3JPH24WheeledVehicleController38SolveLongitudinalAndLateralConstraintsEf(ptr noundef nonnull align 8 dereferenceable(256) %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 i32, align 4
  %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 ptr, align 8
  %14 = alloca float, align 4
  %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
  %19 = alloca float, align 4
  %20 = alloca %"class.JPH::Vec3", align 16
  %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 float, align 4
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca float, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store float %1, ptr %4, align 4, !tbaa !9
  %33 = 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
  %34 = getelementptr inbounds %"class.JPH::VehicleController", ptr %33, i32 0, i32 1
  %35 = load ptr, ptr %34, align 8, !tbaa !13
  %36 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH17VehicleConstraint9GetWheelsEv(ptr noundef nonnull align 16 dereferenceable(408) %35)
  %37 = call noundef i64 @_ZNK3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %36)
  %38 = mul i64 %37, 4
  %39 = alloca i8, i64 %38, align 16
  store ptr %39, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store i32 0, ptr %7, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %40 = getelementptr inbounds %"class.JPH::VehicleController", ptr %33, i32 0, i32 1
  %41 = load ptr, ptr %40, align 8, !tbaa !13
  %42 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH17VehicleConstraint9GetWheelsEv(ptr noundef nonnull align 16 dereferenceable(408) %41)
  store ptr %42, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  %44 = call noundef ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %43)
  store ptr %44, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = call noundef ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %45)
  store ptr %46, ptr %10, align 8, !tbaa !5
  br label %47

47:                                               ; preds = %226, %2
  %48 = load ptr, ptr %9, align 8, !tbaa !5
  %49 = load ptr, ptr %10, align 8, !tbaa !5
  %50 = icmp ne ptr %48, %49
  br i1 %50, label %52, label %51

51:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  br label %229

52:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %53 = load ptr, ptr %9, align 8, !tbaa !5
  %54 = load ptr, ptr %53, align 8, !tbaa !5
  store ptr %54, ptr %11, align 8, !tbaa !5
  %55 = load ptr, ptr %11, align 8, !tbaa !5
  %56 = call noundef zeroext i1 @_ZNK3JPH5Wheel10HasContactEv(ptr noundef nonnull align 16 dereferenceable(404) %55)
  br i1 %56, label %57, label %223

57:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %58 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %58, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %59 = load ptr, ptr %12, align 8, !tbaa !5
  %60 = call noundef ptr @_ZNK3JPH7WheelWV11GetSettingsEv(ptr noundef nonnull align 16 dereferenceable(424) %59)
  store ptr %60, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  %61 = getelementptr inbounds %"class.JPH::WheeledVehicleController", ptr %33, i32 0, i32 10
  %62 = load i32, ptr %7, align 4, !tbaa !15
  %63 = load ptr, ptr %6, align 8, !tbaa !5
  %64 = load i32, ptr %7, align 4, !tbaa !15
  %65 = zext i32 %64 to i64
  %66 = getelementptr inbounds float, ptr %63, i64 %65
  %67 = load ptr, ptr %12, align 8, !tbaa !5
  %68 = call noundef float @_ZNK3JPH5Wheel19GetSuspensionLambdaEv(ptr noundef nonnull align 16 dereferenceable(404) %67)
  %69 = load ptr, ptr %12, align 8, !tbaa !5
  %70 = getelementptr inbounds %"class.JPH::WheelWV", ptr %69, i32 0, i32 3
  %71 = load float, ptr %70, align 4, !tbaa !17
  %72 = load ptr, ptr %12, align 8, !tbaa !5
  %73 = getelementptr inbounds %"class.JPH::WheelWV", ptr %72, i32 0, i32 4
  %74 = load float, ptr %73, align 16, !tbaa !27
  %75 = load ptr, ptr %12, align 8, !tbaa !5
  %76 = getelementptr inbounds %"class.JPH::WheelWV", ptr %75, i32 0, i32 1
  %77 = load float, ptr %76, align 4, !tbaa !28
  %78 = load ptr, ptr %12, align 8, !tbaa !5
  %79 = getelementptr inbounds %"class.JPH::WheelWV", ptr %78, i32 0, i32 2
  %80 = load float, ptr %79, align 8, !tbaa !29
  %81 = load float, ptr %4, align 4, !tbaa !9
  call void @_ZNKSt8functionIFvjRfS0_ffffffEEclEjS0_S0_ffffff(ptr noundef nonnull align 8 dereferenceable(32) %61, i32 noundef %62, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %66, float noundef %68, float noundef %71, float noundef %74, float noundef %77, float noundef %80, float noundef %81)
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #8
  %82 = getelementptr inbounds %"class.JPH::VehicleController", ptr %33, i32 0, i32 1
  %83 = load ptr, ptr %82, align 8, !tbaa !13
  %84 = call noundef ptr @_ZNK3JPH17VehicleConstraint14GetVehicleBodyEv(ptr noundef nonnull align 16 dereferenceable(408) %83)
  %85 = load ptr, ptr %12, align 8, !tbaa !5
  %86 = call { double, double } @_ZNK3JPH5Wheel18GetContactPositionEv(ptr noundef nonnull align 16 dereferenceable(404) %85)
  %87 = getelementptr inbounds %"class.JPH::Vec3", ptr %17, i32 0, i32 0
  %88 = getelementptr inbounds %union.anon, ptr %87, i32 0, i32 0
  %89 = getelementptr inbounds { double, double }, ptr %88, i32 0, i32 0
  %90 = extractvalue { double, double } %86, 0
  store double %90, ptr %89, align 16
  %91 = getelementptr inbounds { double, double }, ptr %88, i32 0, i32 1
  %92 = extractvalue { double, double } %86, 1
  store double %92, ptr %91, align 8
  %93 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 0
  %94 = load double, ptr %93, align 16
  %95 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 1
  %96 = load double, ptr %95, align 8
  %97 = call { double, double } @_ZNK3JPH4Body16GetPointVelocityENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(122) %84, double %94, double %96)
  %98 = getelementptr inbounds %"class.JPH::Vec3", ptr %16, i32 0, i32 0
  %99 = getelementptr inbounds %union.anon, ptr %98, i32 0, i32 0
  %100 = getelementptr inbounds { double, double }, ptr %99, i32 0, i32 0
  %101 = extractvalue { double, double } %97, 0
  store double %101, ptr %100, align 16
  %102 = getelementptr inbounds { double, double }, ptr %99, i32 0, i32 1
  %103 = extractvalue { double, double } %97, 1
  store double %103, ptr %102, align 8
  %104 = load ptr, ptr %12, align 8, !tbaa !5
  %105 = call { double, double } @_ZNK3JPH5Wheel23GetContactPointVelocityEv(ptr noundef nonnull align 16 dereferenceable(404) %104)
  %106 = getelementptr inbounds %"class.JPH::Vec3", ptr %18, i32 0, i32 0
  %107 = getelementptr inbounds %union.anon, ptr %106, i32 0, i32 0
  %108 = getelementptr inbounds { double, double }, ptr %107, i32 0, i32 0
  %109 = extractvalue { double, double } %105, 0
  store double %109, ptr %108, align 16
  %110 = getelementptr inbounds { double, double }, ptr %107, i32 0, i32 1
  %111 = extractvalue { double, double } %105, 1
  store double %111, ptr %110, align 8
  %112 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %113 = load double, ptr %112, align 16
  %114 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %115 = load double, ptr %114, align 8
  %116 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %16, double %113, double %115)
  %117 = getelementptr inbounds %"class.JPH::Vec3", ptr %15, i32 0, i32 0
  %118 = getelementptr inbounds %union.anon, ptr %117, i32 0, i32 0
  %119 = getelementptr inbounds { double, double }, ptr %118, i32 0, i32 0
  %120 = extractvalue { double, double } %116, 0
  store double %120, ptr %119, align 16
  %121 = getelementptr inbounds { double, double }, ptr %118, i32 0, i32 1
  %122 = extractvalue { double, double } %116, 1
  store double %122, ptr %121, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  %123 = load ptr, ptr %12, align 8, !tbaa !5
  %124 = call { double, double } @_ZNK3JPH5Wheel22GetContactLongitudinalEv(ptr noundef nonnull align 16 dereferenceable(404) %123)
  %125 = getelementptr inbounds %"class.JPH::Vec3", ptr %20, 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 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 0
  %132 = load double, ptr %131, align 16
  %133 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 1
  %134 = load double, ptr %133, align 8
  %135 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %15, double %132, double %134)
  store float %135, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  %136 = load ptr, ptr %12, align 8, !tbaa !5
  %137 = getelementptr inbounds %"class.JPH::WheelWV", ptr %136, i32 0, i32 5
  %138 = load float, ptr %137, align 4, !tbaa !30
  %139 = fcmp une float %138, 0.000000e+00
  br i1 %139, label %140, label %166

140:                                              ; preds = %57
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  %141 = load ptr, ptr %12, align 8, !tbaa !5
  %142 = getelementptr inbounds %"class.JPH::WheelWV", ptr %141, i32 0, i32 5
  %143 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %142, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %144 = load float, ptr %143, align 4, !tbaa !9
  store float %144, ptr %23, align 4, !tbaa !9
  %145 = load float, ptr %19, align 4, !tbaa !9
  %146 = fcmp oge float %145, 0.000000e+00
  br i1 %146, label %147, label %150

147:                                              ; preds = %140
  %148 = load float, ptr %23, align 4, !tbaa !9
  %149 = fneg float %148
  store float %149, ptr %21, align 4, !tbaa !9
  store float 0.000000e+00, ptr %22, align 4, !tbaa !9
  br label %152

150:                                              ; preds = %140
  store float 0.000000e+00, ptr %21, align 4, !tbaa !9
  %151 = load float, ptr %23, align 4, !tbaa !9
  store float %151, ptr %22, align 4, !tbaa !9
  br label %152

152:                                              ; preds = %150, %147
  %153 = load ptr, ptr %12, align 8, !tbaa !5
  %154 = getelementptr inbounds %"class.JPH::VehicleController", ptr %33, i32 0, i32 1
  %155 = load ptr, ptr %154, align 8, !tbaa !13
  %156 = load float, ptr %21, align 4, !tbaa !9
  %157 = load float, ptr %22, align 4, !tbaa !9
  %158 = call noundef zeroext i1 @_ZN3JPH5Wheel31SolveLongitudinalConstraintPartERKNS_17VehicleConstraintEff(ptr noundef nonnull align 16 dereferenceable(404) %153, ptr noundef nonnull align 16 dereferenceable(408) %155, float noundef %156, float noundef %157)
  %159 = zext i1 %158 to i32
  %160 = load i8, ptr %5, align 1, !tbaa !11, !range !31, !noundef !32
  %161 = trunc i8 %160 to i1
  %162 = zext i1 %161 to i32
  %163 = or i32 %162, %159
  %164 = icmp ne i32 %163, 0
  %165 = zext i1 %164 to i8
  store i8 %165, ptr %5, align 1, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %222

166:                                              ; preds = %57
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  %167 = load float, ptr %19, align 4, !tbaa !9
  %168 = load ptr, ptr %13, align 8, !tbaa !5
  %169 = getelementptr inbounds %"class.JPH::WheelSettings", ptr %168, i32 0, i32 13
  %170 = load float, ptr %169, align 8, !tbaa !33
  %171 = fdiv float %167, %170
  store float %171, ptr %24, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  %172 = load ptr, ptr %12, align 8, !tbaa !5
  %173 = call noundef float @_ZNK3JPH5Wheel18GetAngularVelocityEv(ptr noundef nonnull align 16 dereferenceable(404) %172)
  %174 = load float, ptr %24, align 4, !tbaa !9
  %175 = fsub float %173, %174
  %176 = load ptr, ptr %13, align 8, !tbaa !5
  %177 = getelementptr inbounds %"class.JPH::WheelSettingsWV", ptr %176, i32 0, i32 1
  %178 = load float, ptr %177, align 4, !tbaa !41
  %179 = fmul float %175, %178
  %180 = load ptr, ptr %13, align 8, !tbaa !5
  %181 = getelementptr inbounds %"class.JPH::WheelSettings", ptr %180, i32 0, i32 13
  %182 = load float, ptr %181, align 8, !tbaa !33
  %183 = fdiv float %179, %182
  store float %183, ptr %25, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  %184 = load ptr, ptr %12, align 8, !tbaa !5
  %185 = call noundef float @_ZNK3JPH5Wheel21GetLongitudinalLambdaEv(ptr noundef nonnull align 16 dereferenceable(404) %184)
  store float %185, ptr %26, align 4, !tbaa !9
  %186 = load float, ptr %26, align 4, !tbaa !9
  %187 = load float, ptr %25, align 4, !tbaa !9
  %188 = fadd float %186, %187
  %189 = load float, ptr %14, align 4, !tbaa !9
  %190 = fneg float %189
  %191 = load float, ptr %14, align 4, !tbaa !9
  %192 = call noundef float @_ZN3JPH5ClampIfEET_S1_S1_S1_(float noundef %188, float noundef %190, float noundef %191)
  store float %192, ptr %22, align 4, !tbaa !9
  store float %192, ptr %21, align 4, !tbaa !9
  %193 = load ptr, ptr %12, align 8, !tbaa !5
  %194 = getelementptr inbounds %"class.JPH::VehicleController", ptr %33, i32 0, i32 1
  %195 = load ptr, ptr %194, align 8, !tbaa !13
  %196 = load float, ptr %21, align 4, !tbaa !9
  %197 = load float, ptr %22, align 4, !tbaa !9
  %198 = call noundef zeroext i1 @_ZN3JPH5Wheel31SolveLongitudinalConstraintPartERKNS_17VehicleConstraintEff(ptr noundef nonnull align 16 dereferenceable(404) %193, ptr noundef nonnull align 16 dereferenceable(408) %195, float noundef %196, float noundef %197)
  %199 = zext i1 %198 to i32
  %200 = load i8, ptr %5, align 1, !tbaa !11, !range !31, !noundef !32
  %201 = trunc i8 %200 to i1
  %202 = zext i1 %201 to i32
  %203 = or i32 %202, %199
  %204 = icmp ne i32 %203, 0
  %205 = zext i1 %204 to i8
  store i8 %205, ptr %5, align 1, !tbaa !11
  %206 = load ptr, ptr %12, align 8, !tbaa !5
  %207 = load ptr, ptr %12, align 8, !tbaa !5
  %208 = call noundef float @_ZNK3JPH5Wheel18GetAngularVelocityEv(ptr noundef nonnull align 16 dereferenceable(404) %207)
  %209 = load ptr, ptr %12, align 8, !tbaa !5
  %210 = call noundef float @_ZNK3JPH5Wheel21GetLongitudinalLambdaEv(ptr noundef nonnull align 16 dereferenceable(404) %209)
  %211 = load float, ptr %26, align 4, !tbaa !9
  %212 = fsub float %210, %211
  %213 = load ptr, ptr %13, align 8, !tbaa !5
  %214 = getelementptr inbounds %"class.JPH::WheelSettings", ptr %213, i32 0, i32 13
  %215 = load float, ptr %214, align 8, !tbaa !33
  %216 = fmul float %212, %215
  %217 = load ptr, ptr %13, align 8, !tbaa !5
  %218 = getelementptr inbounds %"class.JPH::WheelSettingsWV", ptr %217, i32 0, i32 1
  %219 = load float, ptr %218, align 4, !tbaa !41
  %220 = fdiv float %216, %219
  %221 = fsub float %208, %220
  call void @_ZN3JPH5Wheel18SetAngularVelocityEf(ptr noundef nonnull align 16 dereferenceable(404) %206, float noundef %221)
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  br label %222

222:                                              ; preds = %166, %152
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %223

223:                                              ; preds = %222, %52
  %224 = load i32, ptr %7, align 4, !tbaa !15
  %225 = add i32 %224, 1
  store i32 %225, ptr %7, align 4, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  br label %226

226:                                              ; preds = %223
  %227 = load ptr, ptr %9, align 8, !tbaa !5
  %228 = getelementptr inbounds ptr, ptr %227, i32 1
  store ptr %228, ptr %9, align 8, !tbaa !5
  br label %47

229:                                              ; preds = %51
  store i32 0, ptr %7, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  %230 = getelementptr inbounds %"class.JPH::VehicleController", ptr %33, i32 0, i32 1
  %231 = load ptr, ptr %230, align 8, !tbaa !13
  %232 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH17VehicleConstraint9GetWheelsEv(ptr noundef nonnull align 16 dereferenceable(408) %231)
  store ptr %232, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  %233 = load ptr, ptr %27, align 8, !tbaa !5
  %234 = call noundef ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %233)
  store ptr %234, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #8
  %235 = load ptr, ptr %27, align 8, !tbaa !5
  %236 = call noundef ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %235)
  store ptr %236, ptr %29, align 8, !tbaa !5
  br label %237

237:                                              ; preds = %271, %229
  %238 = load ptr, ptr %28, align 8, !tbaa !5
  %239 = load ptr, ptr %29, align 8, !tbaa !5
  %240 = icmp ne ptr %238, %239
  br i1 %240, label %242, label %241

241:                                              ; preds = %237
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  br label %274

242:                                              ; preds = %237
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  %243 = load ptr, ptr %28, align 8, !tbaa !5
  %244 = load ptr, ptr %243, align 8, !tbaa !5
  store ptr %244, ptr %30, align 8, !tbaa !5
  %245 = load ptr, ptr %30, align 8, !tbaa !5
  %246 = call noundef zeroext i1 @_ZNK3JPH5Wheel10HasContactEv(ptr noundef nonnull align 16 dereferenceable(404) %245)
  br i1 %246, label %247, label %268

247:                                              ; preds = %242
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #8
  %248 = load ptr, ptr %30, align 8, !tbaa !5
  store ptr %248, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #8
  %249 = load ptr, ptr %6, align 8, !tbaa !5
  %250 = load i32, ptr %7, align 4, !tbaa !15
  %251 = zext i32 %250 to i64
  %252 = getelementptr inbounds float, ptr %249, i64 %251
  %253 = load float, ptr %252, align 4, !tbaa !9
  store float %253, ptr %32, align 4, !tbaa !9
  %254 = load ptr, ptr %31, align 8, !tbaa !5
  %255 = getelementptr inbounds %"class.JPH::VehicleController", ptr %33, i32 0, i32 1
  %256 = load ptr, ptr %255, align 8, !tbaa !13
  %257 = load float, ptr %32, align 4, !tbaa !9
  %258 = fneg float %257
  %259 = load float, ptr %32, align 4, !tbaa !9
  %260 = call noundef zeroext i1 @_ZN3JPH5Wheel26SolveLateralConstraintPartERKNS_17VehicleConstraintEff(ptr noundef nonnull align 16 dereferenceable(404) %254, ptr noundef nonnull align 16 dereferenceable(408) %256, float noundef %258, float noundef %259)
  %261 = zext i1 %260 to i32
  %262 = load i8, ptr %5, align 1, !tbaa !11, !range !31, !noundef !32
  %263 = trunc i8 %262 to i1
  %264 = zext i1 %263 to i32
  %265 = or i32 %264, %261
  %266 = icmp ne i32 %265, 0
  %267 = zext i1 %266 to i8
  store i8 %267, ptr %5, align 1, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  br label %268

268:                                              ; preds = %247, %242
  %269 = load i32, ptr %7, align 4, !tbaa !15
  %270 = add i32 %269, 1
  store i32 %270, ptr %7, align 4, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  br label %271

271:                                              ; preds = %268
  %272 = load ptr, ptr %28, align 8, !tbaa !5
  %273 = getelementptr inbounds ptr, ptr %272, i32 1
  store ptr %273, ptr %28, align 8, !tbaa !5
  br label %237

274:                                              ; preds = %241
  %275 = load i8, ptr %5, align 1, !tbaa !11, !range !31, !noundef !32
  %276 = trunc i8 %275 to i1
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #8
  ret i1 %276
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNKSt8functionIFvjRfS0_ffffffEEclEjS0_S0_ffffff(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), float noundef, float noundef, float noundef, float noundef, float noundef, float noundef) #1 align 2

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

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

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

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 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"="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 #5 = { 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 #6 = { 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 #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, !16, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!18, !10, i64 412}
!18 = !{!"_ZTSN3JPH7WheelWVE", !19, i64 0, !10, i64 404, !10, i64 408, !10, i64 412, !10, i64 416, !10, i64 420}
!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 = !{!18, !10, i64 416}
!28 = !{!18, !10, i64 404}
!29 = !{!18, !10, i64 408}
!30 = !{!18, !10, i64 420}
!31 = !{i8 0, i8 2}
!32 = !{}
!33 = !{!34, !10, i64 136}
!34 = !{!"_ZTSN3JPH13WheelSettingsE", !35, i64 0, !36, i64 8, !23, i64 16, !23, i64 32, !23, i64 48, !23, i64 64, !23, i64 80, !23, i64 96, !10, i64 112, !10, i64 116, !10, i64 120, !39, i64 124, !10, i64 136, !10, i64 140, !12, i64 144}
!35 = !{!"_ZTSN3JPH18SerializableObjectE"}
!36 = !{!"_ZTSN3JPH9RefTargetINS_13WheelSettingsEEE", !37, i64 0}
!37 = !{!"_ZTSSt6atomicIjE", !38, i64 0}
!38 = !{!"_ZTSSt13__atomic_baseIjE", !16, i64 0}
!39 = !{!"_ZTSN3JPH14SpringSettingsE", !40, i64 0, !7, i64 4, !10, i64 8}
!40 = !{!"_ZTSN3JPH11ESpringModeE", !7, i64 0}
!41 = !{!42, !10, i64 148}
!42 = !{!"_ZTSN3JPH15WheelSettingsWVE", !34, i64 0, !10, i64 148, !10, i64 152, !10, i64 156, !43, i64 160, !43, i64 184, !10, i64 208, !10, i64 212}
!43 = !{!"_ZTSN3JPH11LinearCurveE", !44, i64 0}
!44 = !{!"_ZTSN3JPH5ArrayINS_11LinearCurve5PointENS_12STLAllocatorIS2_EEEE", !45, i64 0, !45, i64 8, !6, i64 16}
!45 = !{!"long", !7, i64 0}


; 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 @_ZNK3JPH7WheelWV11GetSettingsEv(ptr noundef nonnull align 16 dereferenceable(424)) 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 #3 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 #4 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 #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3JPH5Wheel18GetAngularVelocityEv(ptr noundef nonnull align 16 dereferenceable(404)) local_unnamed_addr #2 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #6 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 #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #6 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 #6

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3JPH24WheeledVehicleController38SolveLongitudinalAndLateralConstraintsEf(ptr noundef nonnull align 8 dereferenceable(256) %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 i64 @_ZNK3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
  %10 = shl i64 %9, 2
  %11 = alloca i8, i64 %10, align 16
  %12 = load ptr, ptr %6, align 8, !tbaa !5
  %13 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH17VehicleConstraint9GetWheelsEv(ptr noundef nonnull align 16 dereferenceable(408) %12)
  %14 = tail call noundef ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %13)
  %15 = tail call noundef ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %13)
  %.not77 = icmp eq ptr %14, %15
  br i1 %.not77, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %2
  %16 = getelementptr inbounds i8, ptr %0, i64 224
  %17 = getelementptr inbounds i8, ptr %5, i64 8
  %18 = getelementptr inbounds i8, ptr %4, i64 8
  br label %23

._crit_edge:                                      ; preds = %94, %2
  %.0.lcssa = phi i1 [ false, %2 ], [ %.2, %94 ]
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH17VehicleConstraint9GetWheelsEv(ptr noundef nonnull align 16 dereferenceable(408) %19)
  %21 = call noundef ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %20)
  %22 = call noundef ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %20)
  %.not7681 = icmp eq ptr %21, %22
  br i1 %.not7681, label %._crit_edge87, label %.lr.ph86

23:                                               ; preds = %.lr.ph, %94
  %.080 = phi i1 [ false, %.lr.ph ], [ %.2, %94 ]
  %.07079 = phi i32 [ 0, %.lr.ph ], [ %95, %94 ]
  %.07278 = phi ptr [ %14, %.lr.ph ], [ %96, %94 ]
  %24 = load ptr, ptr %.07278, align 8, !tbaa !10
  %25 = call noundef zeroext i1 @_ZNK3JPH5Wheel10HasContactEv(ptr noundef nonnull align 16 dereferenceable(404) %24)
  br i1 %25, label %26, label %94

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

60:                                               ; preds = %26
  %61 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %57, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %62 = load float, ptr %61, align 4, !tbaa !27
  %63 = fcmp ult float %56, 0.000000e+00
  %64 = fneg float %62
  %.075 = select i1 %63, float %62, float 0.000000e+00
  %.073 = select i1 %63, float 0.000000e+00, float %64
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = call noundef zeroext i1 @_ZN3JPH5Wheel31SolveLongitudinalConstraintPartERKNS_17VehicleConstraintEff(ptr noundef nonnull align 16 dereferenceable(404) %24, ptr noundef nonnull align 16 dereferenceable(408) %65, float noundef %.073, float noundef %.075)
  br label %93

67:                                               ; preds = %26
  %68 = getelementptr inbounds i8, ptr %27, i64 136
  %69 = load float, ptr %68, align 8, !tbaa !28
  %70 = fdiv float %56, %69
  %71 = call noundef float @_ZNK3JPH5Wheel18GetAngularVelocityEv(ptr noundef nonnull align 16 dereferenceable(404) %24)
  %72 = fsub float %71, %70
  %73 = getelementptr inbounds i8, ptr %27, i64 148
  %74 = load float, ptr %73, align 4, !tbaa !37
  %75 = fmul float %72, %74
  %76 = load float, ptr %68, align 8, !tbaa !28
  %77 = fdiv float %75, %76
  %78 = call noundef float @_ZNK3JPH5Wheel21GetLongitudinalLambdaEv(ptr noundef nonnull align 16 dereferenceable(404) %24)
  %79 = fadd float %78, %77
  %80 = load float, ptr %3, align 4, !tbaa !27
  %81 = fneg float %80
  %82 = call noundef float @_ZN3JPH5ClampIfEET_S1_S1_S1_(float noundef %79, float noundef %81, float noundef %80)
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  %84 = call noundef zeroext i1 @_ZN3JPH5Wheel31SolveLongitudinalConstraintPartERKNS_17VehicleConstraintEff(ptr noundef nonnull align 16 dereferenceable(404) %24, ptr noundef nonnull align 16 dereferenceable(408) %83, float noundef %82, float noundef %82)
  %85 = call noundef float @_ZNK3JPH5Wheel18GetAngularVelocityEv(ptr noundef nonnull align 16 dereferenceable(404) %24)
  %86 = call noundef float @_ZNK3JPH5Wheel21GetLongitudinalLambdaEv(ptr noundef nonnull align 16 dereferenceable(404) %24)
  %87 = fsub float %86, %78
  %88 = load float, ptr %68, align 8, !tbaa !28
  %89 = fmul float %87, %88
  %90 = load float, ptr %73, align 4, !tbaa !37
  %91 = fdiv float %89, %90
  %92 = fsub float %85, %91
  call void @_ZN3JPH5Wheel18SetAngularVelocityEf(ptr noundef nonnull align 16 dereferenceable(404) %24, float noundef %92)
  br label %93

93:                                               ; preds = %67, %60
  %.pn = phi i1 [ %66, %60 ], [ %84, %67 ]
  %.1 = or i1 %.080, %.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 %94

94:                                               ; preds = %93, %23
  %.2 = phi i1 [ %.1, %93 ], [ %.080, %23 ]
  %95 = add i32 %.07079, 1
  %96 = getelementptr inbounds i8, ptr %.07278, i64 8
  %.not = icmp eq ptr %96, %15
  br i1 %.not, label %._crit_edge, label %23

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

.lr.ph86:                                         ; preds = %._crit_edge, %107
  %.384 = phi i1 [ %.4, %107 ], [ %.0.lcssa, %._crit_edge ]
  %.17183 = phi i32 [ %108, %107 ], [ 0, %._crit_edge ]
  %.07482 = phi ptr [ %109, %107 ], [ %21, %._crit_edge ]
  %97 = load ptr, ptr %.07482, align 8, !tbaa !10
  %98 = call noundef zeroext i1 @_ZNK3JPH5Wheel10HasContactEv(ptr noundef nonnull align 16 dereferenceable(404) %97)
  br i1 %98, label %99, label %107

99:                                               ; preds = %.lr.ph86
  %100 = zext i32 %.17183 to i64
  %101 = getelementptr inbounds float, ptr %11, i64 %100
  %102 = load float, ptr %101, align 4, !tbaa !27
  %103 = load ptr, ptr %6, align 8, !tbaa !5
  %104 = fneg float %102
  %105 = call noundef zeroext i1 @_ZN3JPH5Wheel26SolveLateralConstraintPartERKNS_17VehicleConstraintEff(ptr noundef nonnull align 16 dereferenceable(404) %97, ptr noundef nonnull align 16 dereferenceable(408) %103, float noundef %104, float noundef %102)
  %106 = or i1 %.384, %105
  br label %107

107:                                              ; preds = %99, %.lr.ph86
  %.4 = phi i1 [ %106, %99 ], [ %.384, %.lr.ph86 ]
  %108 = add i32 %.17183, 1
  %109 = getelementptr inbounds i8, ptr %.07482, i64 8
  %.not76 = icmp eq ptr %109, %22
  br i1 %.not76, label %._crit_edge87, label %.lr.ph86
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNKSt8functionIFvjRfS0_ffffffEEclEjS0_S0_ffffff(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), float noundef, float noundef, float noundef, float noundef, float noundef, float noundef) local_unnamed_addr #1 align 2

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

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 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"="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 #5 = { 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 #6 = { 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 #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, !18, i64 412}
!12 = !{!"_ZTSN3JPH7WheelWVE", !13, i64 0, !18, i64 404, !18, i64 408, !18, i64 412, !18, i64 416, !18, i64 420}
!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 416}
!24 = !{!12, !18, i64 404}
!25 = !{!12, !18, i64 408}
!26 = !{!12, !18, i64 420}
!27 = !{!18, !18, i64 0}
!28 = !{!29, !18, i64 136}
!29 = !{!"_ZTSN3JPH13WheelSettingsE", !30, i64 0, !31, 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, !34, i64 124, !18, i64 136, !18, i64 140, !36, i64 144}
!30 = !{!"_ZTSN3JPH18SerializableObjectE"}
!31 = !{!"_ZTSN3JPH9RefTargetINS_13WheelSettingsEEE", !32, i64 0}
!32 = !{!"_ZTSSt6atomicIjE", !33, i64 0}
!33 = !{!"_ZTSSt13__atomic_baseIjE", !16, i64 0}
!34 = !{!"_ZTSN3JPH14SpringSettingsE", !35, i64 0, !8, i64 4, !18, i64 8}
!35 = !{!"_ZTSN3JPH11ESpringModeE", !8, i64 0}
!36 = !{!"bool", !8, i64 0}
!37 = !{!38, !18, i64 148}
!38 = !{!"_ZTSN3JPH15WheelSettingsWVE", !29, i64 0, !18, i64 148, !18, i64 152, !18, i64 156, !39, i64 160, !39, i64 184, !18, i64 208, !18, i64 212}
!39 = !{!"_ZTSN3JPH11LinearCurveE", !40, i64 0}
!40 = !{!"_ZTSN3JPH5ArrayINS_11LinearCurve5PointENS_12STLAllocatorIS2_EEEE", !41, i64 0, !41, i64 8, !7, i64 16}
!41 = !{!"long", !8, i64 0}


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