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

; 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::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.40 }
%union.anon.40 = type { <4 x float> }
%"class.JPH::MotorcycleController" = type <{ %"class.JPH::WheeledVehicleController", i8, i8, [2 x i8], float, float, float, float, float, float, [4 x i8], %"class.JPH::Vec3", float, float, [8 x i8] }>
%"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" }
%"class.JPH::VehicleController" = type { ptr, ptr }
%"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" = 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 } }

; 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: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Vec35sZeroEv() #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: 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: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

; 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 { double, double } @_ZNK3JPH17VehicleConstraint15GetLocalForwardEv(ptr noundef nonnull align 16 dereferenceable(408)) #2 align 2

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

; 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 } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122)) #6 align 2

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

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

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

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

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

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

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef float @_ZN3JPH4ACosEf(float noundef) #7

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { double, double } @_ZNK3JPH17VehicleConstraint10GetLocalUpEv(ptr noundef nonnull align 16 dereferenceable(408)) #2 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #10

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3JPH20MotorcycleController38SolveLongitudinalAndLateralConstraintsEf(ptr noundef nonnull align 16 dereferenceable(312) %0, float noundef %1) unnamed_addr #8 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca float, align 4
  %5 = alloca i8, align 1
  %6 = alloca i8, align 1
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"class.JPH::Vec3", align 16
  %15 = alloca %"class.JPH::Quat", align 16
  %16 = alloca %"class.JPH::Vec3", align 16
  %17 = alloca %"class.JPH::Vec3", align 16
  %18 = alloca %"class.JPH::Quat", align 16
  %19 = alloca %"class.JPH::Vec3", align 16
  %20 = alloca float, align 4
  %21 = alloca %"class.JPH::Vec3", align 16
  %22 = alloca %"class.JPH::Vec3", align 16
  %23 = alloca %"class.JPH::Vec3", align 16
  %24 = alloca %"class.JPH::Vec3", align 16
  %25 = alloca float, align 4
  %26 = alloca %"class.JPH::Vec3", align 16
  %27 = alloca %"class.JPH::Vec3", align 16
  %28 = alloca float, align 4
  %29 = alloca %"class.JPH::Vec3", align 16
  %30 = alloca float, align 4
  %31 = alloca %"class.JPH::Vec3", align 16
  %32 = alloca %"class.JPH::Vec3", align 16
  %33 = alloca %"class.JPH::Vec3", align 16
  %34 = alloca %"class.JPH::Vec3", align 16
  %35 = alloca %"class.JPH::Vec3", align 16
  %36 = alloca %"class.JPH::Vec3", align 16
  %37 = alloca float, align 4
  %38 = alloca ptr, align 8
  %39 = alloca ptr, align 8
  %40 = alloca ptr, align 8
  %41 = alloca ptr, align 8
  %42 = alloca ptr, align 8
  %43 = alloca float, align 4
  %44 = alloca %"class.JPH::Vec3", align 16
  %45 = alloca %"class.JPH::Vec3", align 16
  %46 = alloca %"class.JPH::Vec3", align 16
  %47 = alloca %"class.JPH::Vec3", align 16
  %48 = alloca %"class.JPH::Vec3", align 16
  %49 = alloca %"class.JPH::Vec3", align 16
  %50 = alloca %"class.JPH::Vec3", align 16
  %51 = alloca %"class.JPH::Vec3", align 16
  %52 = alloca %"class.JPH::Vec3", align 16
  %53 = alloca float, align 4
  %54 = alloca float, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store float %1, ptr %4, align 4, !tbaa !9
  %55 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #12
  %56 = load float, ptr %4, align 4, !tbaa !9
  %57 = call noundef zeroext i1 @_ZN3JPH24WheeledVehicleController38SolveLongitudinalAndLateralConstraintsEf(ptr noundef nonnull align 8 dereferenceable(256) %55, float noundef %56)
  %58 = zext i1 %57 to i8
  store i8 %58, ptr %5, align 1, !tbaa !11
  %59 = getelementptr inbounds %"class.JPH::MotorcycleController", ptr %55, i32 0, i32 1
  %60 = load i8, ptr %59, align 16, !tbaa !13, !range !31, !noundef !32
  %61 = trunc i8 %60 to i1
  br i1 %61, label %62, label %397

62:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #12
  store i8 1, ptr %6, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #12
  %63 = getelementptr inbounds %"class.JPH::VehicleController", ptr %55, i32 0, i32 1
  %64 = load ptr, ptr %63, align 8, !tbaa !33
  %65 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH17VehicleConstraint9GetWheelsEv(ptr noundef nonnull align 16 dereferenceable(408) %64)
  store ptr %65, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #12
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = call noundef ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %66)
  store ptr %67, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #12
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = call noundef ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %68)
  store ptr %69, ptr %9, align 8, !tbaa !5
  br label %70

70:                                               ; preds = %89, %62
  %71 = load ptr, ptr %8, align 8, !tbaa !5
  %72 = load ptr, ptr %9, align 8, !tbaa !5
  %73 = icmp ne ptr %71, %72
  br i1 %73, label %75, label %74

74:                                               ; preds = %70
  store i32 2, ptr %10, align 4
  br label %92

75:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #12
  %76 = load ptr, ptr %8, align 8, !tbaa !5
  %77 = load ptr, ptr %76, align 8, !tbaa !5
  store ptr %77, ptr %11, align 8, !tbaa !5
  %78 = load ptr, ptr %11, align 8, !tbaa !5
  %79 = call noundef zeroext i1 @_ZNK3JPH5Wheel10HasContactEv(ptr noundef nonnull align 16 dereferenceable(404) %78)
  br i1 %79, label %80, label %84

80:                                               ; preds = %75
  %81 = load ptr, ptr %11, align 8, !tbaa !5
  %82 = call noundef float @_ZNK3JPH5Wheel19GetSuspensionLambdaEv(ptr noundef nonnull align 16 dereferenceable(404) %81)
  %83 = fcmp ole float %82, 0.000000e+00
  br i1 %83, label %84, label %85

84:                                               ; preds = %80, %75
  store i8 0, ptr %6, align 1, !tbaa !11
  store i32 2, ptr %10, align 4
  br label %86

85:                                               ; preds = %80
  store i32 0, ptr %10, align 4
  br label %86

86:                                               ; preds = %85, %84
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #12
  %87 = load i32, ptr %10, align 4
  switch i32 %87, label %92 [
    i32 0, label %88
  ]

88:                                               ; preds = %86
  br label %89

89:                                               ; preds = %88
  %90 = load ptr, ptr %8, align 8, !tbaa !5
  %91 = getelementptr inbounds ptr, ptr %90, i32 1
  store ptr %91, ptr %8, align 8, !tbaa !5
  br label %70

92:                                               ; preds = %86, %74
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #12
  br label %93

93:                                               ; preds = %92
  %94 = load i8, ptr %6, align 1, !tbaa !11, !range !31, !noundef !32
  %95 = trunc i8 %94 to i1
  br i1 %95, label %96, label %385

96:                                               ; preds = %93
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #12
  %97 = getelementptr inbounds %"class.JPH::VehicleController", ptr %55, i32 0, i32 1
  %98 = load ptr, ptr %97, align 8, !tbaa !33
  %99 = call noundef ptr @_ZNK3JPH17VehicleConstraint14GetVehicleBodyEv(ptr noundef nonnull align 16 dereferenceable(408) %98)
  store ptr %99, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #12
  %100 = load ptr, ptr %12, align 8, !tbaa !5
  %101 = call noundef ptr @_ZN3JPH4Body19GetMotionPropertiesEv(ptr noundef nonnull align 16 dereferenceable(122) %100)
  store ptr %101, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #12
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #12
  %102 = load ptr, ptr %12, align 8, !tbaa !5
  %103 = call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %102)
  %104 = getelementptr inbounds %"class.JPH::Quat", ptr %15, i32 0, i32 0
  %105 = getelementptr inbounds %"class.JPH::Vec4", ptr %104, i32 0, i32 0
  %106 = getelementptr inbounds %union.anon.40, ptr %105, i32 0, i32 0
  %107 = getelementptr inbounds { double, double }, ptr %106, i32 0, i32 0
  %108 = extractvalue { double, double } %103, 0
  store double %108, ptr %107, align 16
  %109 = getelementptr inbounds { double, double }, ptr %106, i32 0, i32 1
  %110 = extractvalue { double, double } %103, 1
  store double %110, ptr %109, align 8
  %111 = getelementptr inbounds %"class.JPH::VehicleController", ptr %55, i32 0, i32 1
  %112 = load ptr, ptr %111, align 8, !tbaa !33
  %113 = call { double, double } @_ZNK3JPH17VehicleConstraint15GetLocalForwardEv(ptr noundef nonnull align 16 dereferenceable(408) %112)
  %114 = getelementptr inbounds %"class.JPH::Vec3", ptr %16, i32 0, i32 0
  %115 = getelementptr inbounds %union.anon, ptr %114, i32 0, i32 0
  %116 = getelementptr inbounds { double, double }, ptr %115, i32 0, i32 0
  %117 = extractvalue { double, double } %113, 0
  store double %117, ptr %116, align 16
  %118 = getelementptr inbounds { double, double }, ptr %115, i32 0, i32 1
  %119 = extractvalue { double, double } %113, 1
  store double %119, ptr %118, align 8
  %120 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 0
  %121 = load double, ptr %120, align 16
  %122 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 1
  %123 = load double, ptr %122, align 8
  %124 = call { double, double } @_ZNK3JPH4QuatmlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(16) %15, double %121, double %123)
  %125 = getelementptr inbounds %"class.JPH::Vec3", ptr %14, 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
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #12
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #12
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #12
  %131 = load ptr, ptr %12, align 8, !tbaa !5
  %132 = call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %131)
  %133 = getelementptr inbounds %"class.JPH::Quat", ptr %18, i32 0, i32 0
  %134 = getelementptr inbounds %"class.JPH::Vec4", ptr %133, i32 0, i32 0
  %135 = getelementptr inbounds %union.anon.40, ptr %134, i32 0, i32 0
  %136 = getelementptr inbounds { double, double }, ptr %135, i32 0, i32 0
  %137 = extractvalue { double, double } %132, 0
  store double %137, ptr %136, align 16
  %138 = getelementptr inbounds { double, double }, ptr %135, i32 0, i32 1
  %139 = extractvalue { double, double } %132, 1
  store double %139, ptr %138, align 8
  %140 = getelementptr inbounds %"class.JPH::VehicleController", ptr %55, i32 0, i32 1
  %141 = load ptr, ptr %140, align 8, !tbaa !33
  %142 = call { double, double } @_ZNK3JPH17VehicleConstraint10GetLocalUpEv(ptr noundef nonnull align 16 dereferenceable(408) %141)
  %143 = getelementptr inbounds %"class.JPH::Vec3", ptr %19, i32 0, i32 0
  %144 = getelementptr inbounds %union.anon, ptr %143, i32 0, i32 0
  %145 = getelementptr inbounds { double, double }, ptr %144, i32 0, i32 0
  %146 = extractvalue { double, double } %142, 0
  store double %146, ptr %145, align 16
  %147 = getelementptr inbounds { double, double }, ptr %144, i32 0, i32 1
  %148 = extractvalue { double, double } %142, 1
  store double %148, ptr %147, align 8
  %149 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 0
  %150 = load double, ptr %149, align 16
  %151 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 1
  %152 = load double, ptr %151, align 8
  %153 = call { double, double } @_ZNK3JPH4QuatmlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(16) %18, double %150, double %152)
  %154 = getelementptr inbounds %"class.JPH::Vec3", ptr %17, i32 0, i32 0
  %155 = getelementptr inbounds %union.anon, ptr %154, i32 0, i32 0
  %156 = getelementptr inbounds { double, double }, ptr %155, i32 0, i32 0
  %157 = extractvalue { double, double } %153, 0
  store double %157, ptr %156, align 16
  %158 = getelementptr inbounds { double, double }, ptr %155, i32 0, i32 1
  %159 = extractvalue { double, double } %153, 1
  store double %159, ptr %158, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #12
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #12
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #12
  %160 = getelementptr inbounds %"class.JPH::MotorcycleController", ptr %55, i32 0, i32 11
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %22, ptr align 16 %17, i64 16, i1 false), !tbaa.struct !34
  %161 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 0
  %162 = load double, ptr %161, align 16
  %163 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 1
  %164 = load double, ptr %163, align 8
  %165 = call { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %160, double %162, double %164)
  %166 = getelementptr inbounds %"class.JPH::Vec3", ptr %21, i32 0, i32 0
  %167 = getelementptr inbounds %union.anon, ptr %166, i32 0, i32 0
  %168 = getelementptr inbounds { double, double }, ptr %167, i32 0, i32 0
  %169 = extractvalue { double, double } %165, 0
  store double %169, ptr %168, align 16
  %170 = getelementptr inbounds { double, double }, ptr %167, i32 0, i32 1
  %171 = extractvalue { double, double } %165, 1
  store double %171, ptr %170, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %23, ptr align 16 %14, i64 16, i1 false), !tbaa.struct !34
  %172 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 0
  %173 = load double, ptr %172, align 16
  %174 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 1
  %175 = load double, ptr %174, align 8
  %176 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %21, double %173, double %175)
  %177 = call noundef float @_ZN3JPH4SignIfEET_S1_(float noundef %176)
  %178 = fneg float %177
  %179 = getelementptr inbounds %"class.JPH::MotorcycleController", ptr %55, i32 0, i32 11
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %24, ptr align 16 %17, i64 16, i1 false), !tbaa.struct !34
  %180 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 0
  %181 = load double, ptr %180, align 16
  %182 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 1
  %183 = load double, ptr %182, align 8
  %184 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %179, double %181, double %183)
  %185 = call noundef float @_ZN3JPH4ACosEf(float noundef %184)
  %186 = fmul float %178, %185
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #12
  store float %186, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #12
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #12
  %187 = load ptr, ptr %12, align 8, !tbaa !5
  %188 = call { double, double } @_ZNK3JPH4Body18GetAngularVelocityEv(ptr noundef nonnull align 16 dereferenceable(122) %187)
  %189 = getelementptr inbounds %"class.JPH::Vec3", ptr %26, i32 0, i32 0
  %190 = getelementptr inbounds %union.anon, ptr %189, i32 0, i32 0
  %191 = getelementptr inbounds { double, double }, ptr %190, i32 0, i32 0
  %192 = extractvalue { double, double } %188, 0
  store double %192, ptr %191, align 16
  %193 = getelementptr inbounds { double, double }, ptr %190, i32 0, i32 1
  %194 = extractvalue { double, double } %188, 1
  store double %194, ptr %193, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %27, ptr align 16 %14, i64 16, i1 false), !tbaa.struct !34
  %195 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 0
  %196 = load double, ptr %195, align 16
  %197 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 1
  %198 = load double, ptr %197, align 8
  %199 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %26, double %196, double %198)
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #12
  store float %199, ptr %25, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #12
  %200 = getelementptr inbounds %"class.JPH::MotorcycleController", ptr %55, i32 0, i32 5
  %201 = load float, ptr %200, align 8, !tbaa !36
  %202 = load float, ptr %20, align 4, !tbaa !9
  %203 = getelementptr inbounds %"class.JPH::MotorcycleController", ptr %55, i32 0, i32 6
  %204 = load float, ptr %203, align 4, !tbaa !37
  %205 = load float, ptr %25, align 4, !tbaa !9
  %206 = fmul float %204, %205
  %207 = fneg float %206
  %208 = call float @llvm.fmuladd.f32(float %201, float %202, float %207)
  %209 = getelementptr inbounds %"class.JPH::MotorcycleController", ptr %55, i32 0, i32 7
  %210 = load float, ptr %209, align 16, !tbaa !38
  %211 = getelementptr inbounds %"class.JPH::MotorcycleController", ptr %55, i32 0, i32 12
  %212 = load float, ptr %211, align 16, !tbaa !39
  %213 = call float @llvm.fmuladd.f32(float %210, float %212, float %208)
  %214 = load float, ptr %4, align 4, !tbaa !9
  %215 = fmul float %213, %214
  store float %215, ptr %28, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #12
  %216 = load ptr, ptr %13, align 8, !tbaa !5
  %217 = call { double, double } @_ZNK3JPH16MotionProperties18GetAngularVelocityEv(ptr noundef nonnull align 16 dereferenceable(182) %216)
  %218 = getelementptr inbounds %"class.JPH::Vec3", ptr %29, i32 0, i32 0
  %219 = getelementptr inbounds %union.anon, ptr %218, i32 0, i32 0
  %220 = getelementptr inbounds { double, double }, ptr %219, i32 0, i32 0
  %221 = extractvalue { double, double } %217, 0
  store double %221, ptr %220, align 16
  %222 = getelementptr inbounds { double, double }, ptr %219, i32 0, i32 1
  %223 = extractvalue { double, double } %217, 1
  store double %223, ptr %222, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #12
  %224 = load float, ptr %28, align 4, !tbaa !9
  %225 = getelementptr inbounds %"class.JPH::MotorcycleController", ptr %55, i32 0, i32 13
  %226 = load float, ptr %225, align 4, !tbaa !40
  %227 = fsub float %224, %226
  store float %227, ptr %30, align 4, !tbaa !9
  %228 = load ptr, ptr %12, align 8, !tbaa !5
  %229 = load float, ptr %30, align 4, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %32, ptr align 16 %14, i64 16, i1 false), !tbaa.struct !34
  %230 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 0
  %231 = load double, ptr %230, align 16
  %232 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 1
  %233 = load double, ptr %232, align 8
  %234 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %229, double %231, double %233)
  %235 = getelementptr inbounds %"class.JPH::Vec3", ptr %31, i32 0, i32 0
  %236 = getelementptr inbounds %union.anon, ptr %235, i32 0, i32 0
  %237 = getelementptr inbounds { double, double }, ptr %236, i32 0, i32 0
  %238 = extractvalue { double, double } %234, 0
  store double %238, ptr %237, align 16
  %239 = getelementptr inbounds { double, double }, ptr %236, i32 0, i32 1
  %240 = extractvalue { double, double } %234, 1
  store double %240, ptr %239, align 8
  %241 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 0
  %242 = load double, ptr %241, align 16
  %243 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 1
  %244 = load double, ptr %243, align 8
  call void @_ZN3JPH4Body17AddAngularImpulseENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(122) %228, double %242, double %244)
  %245 = load float, ptr %28, align 4, !tbaa !9
  %246 = getelementptr inbounds %"class.JPH::MotorcycleController", ptr %55, i32 0, i32 13
  store float %245, ptr %246, align 4, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 16, ptr %33) #12
  call void @llvm.lifetime.start.p0(i64 16, ptr %34) #12
  %247 = load ptr, ptr %13, align 8, !tbaa !5
  %248 = call { double, double } @_ZNK3JPH16MotionProperties18GetAngularVelocityEv(ptr noundef nonnull align 16 dereferenceable(182) %247)
  %249 = getelementptr inbounds %"class.JPH::Vec3", ptr %34, i32 0, i32 0
  %250 = getelementptr inbounds %union.anon, ptr %249, i32 0, i32 0
  %251 = getelementptr inbounds { double, double }, ptr %250, i32 0, i32 0
  %252 = extractvalue { double, double } %248, 0
  store double %252, ptr %251, align 16
  %253 = getelementptr inbounds { double, double }, ptr %250, i32 0, i32 1
  %254 = extractvalue { double, double } %248, 1
  store double %254, ptr %253, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %35, ptr align 16 %29, i64 16, i1 false), !tbaa.struct !34
  %255 = getelementptr inbounds { double, double }, ptr %35, i32 0, i32 0
  %256 = load double, ptr %255, align 16
  %257 = getelementptr inbounds { double, double }, ptr %35, i32 0, i32 1
  %258 = load double, ptr %257, align 8
  %259 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %34, double %256, double %258)
  %260 = getelementptr inbounds %"class.JPH::Vec3", ptr %33, i32 0, i32 0
  %261 = getelementptr inbounds %union.anon, ptr %260, i32 0, i32 0
  %262 = getelementptr inbounds { double, double }, ptr %261, i32 0, i32 0
  %263 = extractvalue { double, double } %259, 0
  store double %263, ptr %262, align 16
  %264 = getelementptr inbounds { double, double }, ptr %261, i32 0, i32 1
  %265 = extractvalue { double, double } %259, 1
  store double %265, ptr %264, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %34) #12
  call void @llvm.lifetime.start.p0(i64 16, ptr %36) #12
  %266 = call { double, double } @_ZN3JPH4Vec35sZeroEv()
  %267 = getelementptr inbounds %"class.JPH::Vec3", ptr %36, i32 0, i32 0
  %268 = getelementptr inbounds %union.anon, ptr %267, i32 0, i32 0
  %269 = getelementptr inbounds { double, double }, ptr %268, i32 0, i32 0
  %270 = extractvalue { double, double } %266, 0
  store double %270, ptr %269, align 16
  %271 = getelementptr inbounds { double, double }, ptr %268, i32 0, i32 1
  %272 = extractvalue { double, double } %266, 1
  store double %272, ptr %271, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #12
  store float 0.000000e+00, ptr %37, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #12
  %273 = getelementptr inbounds %"class.JPH::VehicleController", ptr %55, i32 0, i32 1
  %274 = load ptr, ptr %273, align 8, !tbaa !33
  %275 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH17VehicleConstraint9GetWheelsEv(ptr noundef nonnull align 16 dereferenceable(408) %274)
  store ptr %275, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #12
  %276 = load ptr, ptr %38, align 8, !tbaa !5
  %277 = call noundef ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %276)
  store ptr %277, ptr %39, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #12
  %278 = load ptr, ptr %38, align 8, !tbaa !5
  %279 = call noundef ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %278)
  store ptr %279, ptr %40, align 8, !tbaa !5
  br label %280

280:                                              ; preds = %349, %96
  %281 = load ptr, ptr %39, align 8, !tbaa !5
  %282 = load ptr, ptr %40, align 8, !tbaa !5
  %283 = icmp ne ptr %281, %282
  br i1 %283, label %285, label %284

284:                                              ; preds = %280
  store i32 4, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #12
  br label %352

285:                                              ; preds = %280
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #12
  %286 = load ptr, ptr %39, align 8, !tbaa !5
  %287 = load ptr, ptr %286, align 8, !tbaa !5
  store ptr %287, ptr %41, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #12
  %288 = load ptr, ptr %41, align 8, !tbaa !5
  store ptr %288, ptr %42, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #12
  %289 = load ptr, ptr %42, align 8, !tbaa !5
  %290 = call noundef float @_ZNK3JPH5Wheel19GetSuspensionLambdaEv(ptr noundef nonnull align 16 dereferenceable(404) %289)
  store float %290, ptr %43, align 4, !tbaa !9
  %291 = load float, ptr %43, align 4, !tbaa !9
  %292 = load float, ptr %37, align 4, !tbaa !9
  %293 = fadd float %292, %291
  store float %293, ptr %37, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %44) #12
  call void @llvm.lifetime.start.p0(i64 16, ptr %45) #12
  %294 = load ptr, ptr %42, align 8, !tbaa !5
  %295 = call { double, double } @_ZNK3JPH5Wheel18GetContactPositionEv(ptr noundef nonnull align 16 dereferenceable(404) %294)
  %296 = getelementptr inbounds %"class.JPH::Vec3", ptr %45, i32 0, i32 0
  %297 = getelementptr inbounds %union.anon, ptr %296, i32 0, i32 0
  %298 = getelementptr inbounds { double, double }, ptr %297, i32 0, i32 0
  %299 = extractvalue { double, double } %295, 0
  store double %299, ptr %298, align 16
  %300 = getelementptr inbounds { double, double }, ptr %297, i32 0, i32 1
  %301 = extractvalue { double, double } %295, 1
  store double %301, ptr %300, align 8
  %302 = load ptr, ptr %12, align 8, !tbaa !5
  %303 = call { double, double } @_ZNK3JPH4Body23GetCenterOfMassPositionEv(ptr noundef nonnull align 16 dereferenceable(122) %302)
  %304 = getelementptr inbounds %"class.JPH::Vec3", ptr %46, i32 0, i32 0
  %305 = getelementptr inbounds %union.anon, ptr %304, i32 0, i32 0
  %306 = getelementptr inbounds { double, double }, ptr %305, i32 0, i32 0
  %307 = extractvalue { double, double } %303, 0
  store double %307, ptr %306, align 16
  %308 = getelementptr inbounds { double, double }, ptr %305, i32 0, i32 1
  %309 = extractvalue { double, double } %303, 1
  store double %309, ptr %308, align 8
  %310 = getelementptr inbounds { double, double }, ptr %46, i32 0, i32 0
  %311 = load double, ptr %310, align 16
  %312 = getelementptr inbounds { double, double }, ptr %46, i32 0, i32 1
  %313 = load double, ptr %312, align 8
  %314 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %45, double %311, double %313)
  %315 = getelementptr inbounds %"class.JPH::Vec3", ptr %44, i32 0, i32 0
  %316 = getelementptr inbounds %union.anon, ptr %315, i32 0, i32 0
  %317 = getelementptr inbounds { double, double }, ptr %316, i32 0, i32 0
  %318 = extractvalue { double, double } %314, 0
  store double %318, ptr %317, align 16
  %319 = getelementptr inbounds { double, double }, ptr %316, i32 0, i32 1
  %320 = extractvalue { double, double } %314, 1
  store double %320, ptr %319, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %45) #12
  %321 = load float, ptr %43, align 4, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %49, ptr align 16 %44, i64 16, i1 false), !tbaa.struct !34
  %322 = getelementptr inbounds { double, double }, ptr %49, i32 0, i32 0
  %323 = load double, ptr %322, align 16
  %324 = getelementptr inbounds { double, double }, ptr %49, i32 0, i32 1
  %325 = load double, ptr %324, align 8
  %326 = call { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %33, double %323, double %325)
  %327 = getelementptr inbounds %"class.JPH::Vec3", ptr %48, i32 0, i32 0
  %328 = getelementptr inbounds %union.anon, ptr %327, i32 0, i32 0
  %329 = getelementptr inbounds { double, double }, ptr %328, i32 0, i32 0
  %330 = extractvalue { double, double } %326, 0
  store double %330, ptr %329, align 16
  %331 = getelementptr inbounds { double, double }, ptr %328, i32 0, i32 1
  %332 = extractvalue { double, double } %326, 1
  store double %332, ptr %331, align 8
  %333 = getelementptr inbounds { double, double }, ptr %48, i32 0, i32 0
  %334 = load double, ptr %333, align 16
  %335 = getelementptr inbounds { double, double }, ptr %48, i32 0, i32 1
  %336 = load double, ptr %335, align 8
  %337 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %321, double %334, double %336)
  %338 = getelementptr inbounds %"class.JPH::Vec3", ptr %47, i32 0, i32 0
  %339 = getelementptr inbounds %union.anon, ptr %338, i32 0, i32 0
  %340 = getelementptr inbounds { double, double }, ptr %339, i32 0, i32 0
  %341 = extractvalue { double, double } %337, 0
  store double %341, ptr %340, align 16
  %342 = getelementptr inbounds { double, double }, ptr %339, i32 0, i32 1
  %343 = extractvalue { double, double } %337, 1
  store double %343, ptr %342, align 8
  %344 = getelementptr inbounds { double, double }, ptr %47, i32 0, i32 0
  %345 = load double, ptr %344, align 16
  %346 = getelementptr inbounds { double, double }, ptr %47, i32 0, i32 1
  %347 = load double, ptr %346, align 8
  %348 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16) %36, double %345, double %347)
  call void @llvm.lifetime.end.p0(i64 16, ptr %44) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #12
  br label %349

349:                                              ; preds = %285
  %350 = load ptr, ptr %39, align 8, !tbaa !5
  %351 = getelementptr inbounds ptr, ptr %350, i32 1
  store ptr %351, ptr %39, align 8, !tbaa !5
  br label %280

352:                                              ; preds = %284
  call void @llvm.lifetime.start.p0(i64 16, ptr %50) #12
  call void @llvm.lifetime.start.p0(i64 16, ptr %51) #12
  %353 = call { double, double } @_ZNK3JPH4Vec3ngEv(ptr noundef nonnull align 16 dereferenceable(16) %36)
  %354 = getelementptr inbounds %"class.JPH::Vec3", ptr %51, i32 0, i32 0
  %355 = getelementptr inbounds %union.anon, ptr %354, i32 0, i32 0
  %356 = getelementptr inbounds { double, double }, ptr %355, i32 0, i32 0
  %357 = extractvalue { double, double } %353, 0
  store double %357, ptr %356, align 16
  %358 = getelementptr inbounds { double, double }, ptr %355, i32 0, i32 1
  %359 = extractvalue { double, double } %353, 1
  store double %359, ptr %358, align 8
  %360 = load float, ptr %37, align 4, !tbaa !9
  %361 = load ptr, ptr %13, align 8, !tbaa !5
  %362 = call noundef float @_ZNK3JPH16MotionProperties14GetInverseMassEv(ptr noundef nonnull align 16 dereferenceable(182) %361)
  %363 = fmul float %360, %362
  %364 = call { double, double } @_ZNK3JPH4Vec3dvEf(ptr noundef nonnull align 16 dereferenceable(16) %51, float noundef %363)
  %365 = getelementptr inbounds %"class.JPH::Vec3", ptr %50, i32 0, i32 0
  %366 = getelementptr inbounds %union.anon, ptr %365, i32 0, i32 0
  %367 = getelementptr inbounds { double, double }, ptr %366, i32 0, i32 0
  %368 = extractvalue { double, double } %364, 0
  store double %368, ptr %367, align 16
  %369 = getelementptr inbounds { double, double }, ptr %366, i32 0, i32 1
  %370 = extractvalue { double, double } %364, 1
  store double %370, ptr %369, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %51) #12
  %371 = load ptr, ptr %12, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %52, ptr align 16 %50, i64 16, i1 false), !tbaa.struct !34
  %372 = getelementptr inbounds { double, double }, ptr %52, i32 0, i32 0
  %373 = load double, ptr %372, align 16
  %374 = getelementptr inbounds { double, double }, ptr %52, i32 0, i32 1
  %375 = load double, ptr %374, align 8
  call void @_ZN3JPH4Body10AddImpulseENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(122) %371, double %373, double %375)
  %376 = load float, ptr %30, align 4, !tbaa !9
  %377 = fcmp une float %376, 0.000000e+00
  %378 = zext i1 %377 to i32
  %379 = load i8, ptr %5, align 1, !tbaa !11, !range !31, !noundef !32
  %380 = trunc i8 %379 to i1
  %381 = zext i1 %380 to i32
  %382 = or i32 %381, %378
  %383 = icmp ne i32 %382, 0
  %384 = zext i1 %383 to i8
  store i8 %384, ptr %5, align 1, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %50) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %33) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #12
  br label %396

385:                                              ; preds = %93
  call void @llvm.lifetime.start.p0(i64 4, ptr %53) #12
  store float 0.000000e+00, ptr %53, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %54) #12
  %386 = getelementptr inbounds %"class.JPH::MotorcycleController", ptr %55, i32 0, i32 8
  %387 = load float, ptr %386, align 4, !tbaa !41
  %388 = load float, ptr %4, align 4, !tbaa !9
  %389 = fneg float %387
  %390 = call float @llvm.fmuladd.f32(float %389, float %388, float 1.000000e+00)
  store float %390, ptr %54, align 4, !tbaa !9
  %391 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %53, ptr noundef nonnull align 4 dereferenceable(4) %54)
  %392 = load float, ptr %391, align 4, !tbaa !9
  %393 = getelementptr inbounds %"class.JPH::MotorcycleController", ptr %55, i32 0, i32 12
  %394 = load float, ptr %393, align 16, !tbaa !39
  %395 = fmul float %394, %392
  store float %395, ptr %393, align 16, !tbaa !39
  call void @llvm.lifetime.end.p0(i64 4, ptr %54) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %53) #12
  br label %396

396:                                              ; preds = %385, %352
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #12
  br label %397

397:                                              ; preds = %396, %2
  %398 = load i8, ptr %5, align 1, !tbaa !11, !range !31, !noundef !32
  %399 = trunc i8 %398 to i1
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #12
  ret i1 %399
}

declare noundef zeroext i1 @_ZN3JPH24WheeledVehicleController38SolveLongitudinalAndLateralConstraintsEf(ptr noundef nonnull align 8 dereferenceable(256), float noundef) unnamed_addr #11

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH4Body19GetMotionPropertiesEv(ptr noundef nonnull align 16 dereferenceable(122)) #8 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH4Body17AddAngularImpulseENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(122), double, double) #6 align 2

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef float @_ZNK3JPH16MotionProperties14GetInverseMassEv(ptr noundef nonnull align 16 dereferenceable(182)) #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH4Body10AddImpulseENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(122), double, double) #6 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 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 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { 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 #9 = { alwaysinline mustprogress nounwind 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 #10 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #11 = { "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 #12 = { 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, !12, i64 256}
!14 = !{!"_ZTSN3JPH20MotorcycleControllerE", !15, i64 0, !12, i64 256, !12, i64 257, !10, i64 260, !10, i64 264, !10, i64 268, !10, i64 272, !10, i64 276, !10, i64 280, !30, i64 288, !10, i64 304, !10, i64 308}
!15 = !{!"_ZTSN3JPH24WheeledVehicleControllerE", !16, i64 0, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !17, i64 32, !22, i64 88, !27, i64 192, !10, i64 216, !10, i64 220, !28, i64 224}
!16 = !{!"_ZTSN3JPH17VehicleControllerE", !6, i64 8}
!17 = !{!"_ZTSN3JPH13VehicleEngineE", !18, i64 0, !10, i64 48}
!18 = !{!"_ZTSN3JPH21VehicleEngineSettingsE", !10, i64 0, !10, i64 4, !10, i64 8, !19, i64 16, !10, i64 40, !10, i64 44}
!19 = !{!"_ZTSN3JPH11LinearCurveE", !20, i64 0}
!20 = !{!"_ZTSN3JPH5ArrayINS_11LinearCurve5PointENS_12STLAllocatorIS2_EEEE", !21, i64 0, !21, i64 8, !6, i64 16}
!21 = !{!"long", !7, i64 0}
!22 = !{!"_ZTSN3JPH19VehicleTransmissionE", !23, i64 0, !26, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96}
!23 = !{!"_ZTSN3JPH27VehicleTransmissionSettingsE", !24, i64 0, !25, i64 8, !25, i64 32, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76}
!24 = !{!"_ZTSN3JPH17ETransmissionModeE", !7, i64 0}
!25 = !{!"_ZTSN3JPH5ArrayIfNS_12STLAllocatorIfEEEE", !21, i64 0, !21, i64 8, !6, i64 16}
!26 = !{!"int", !7, i64 0}
!27 = !{!"_ZTSN3JPH5ArrayINS_27VehicleDifferentialSettingsENS_12STLAllocatorIS1_EEEE", !21, i64 0, !21, i64 8, !6, i64 16}
!28 = !{!"_ZTSSt8functionIFvjRfS0_ffffffEE", !29, i64 0, !6, i64 24}
!29 = !{!"_ZTSSt14_Function_base", !7, i64 0, !6, i64 16}
!30 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!31 = !{i8 0, i8 2}
!32 = !{}
!33 = !{!16, !6, i64 8}
!34 = !{i64 0, i64 16, !35}
!35 = !{!7, !7, i64 0}
!36 = !{!14, !10, i64 264}
!37 = !{!14, !10, i64 268}
!38 = !{!14, !10, i64 272}
!39 = !{!14, !10, i64 304}
!40 = !{!14, !10, i64 308}
!41 = !{!14, !10, i64 276}


; 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::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.40 }
%union.anon.40 = type { <4 x float> }
%"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: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Vec35sZeroEv() 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: 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: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) local_unnamed_addr #4 align 2

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

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

; 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 } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122)) local_unnamed_addr #5 align 2

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #9

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3JPH20MotorcycleController38SolveLongitudinalAndLateralConstraintsEf(ptr noundef nonnull align 16 dereferenceable(312) %0, float noundef %1) unnamed_addr #7 align 2 {
  %3 = alloca %"class.JPH::Quat", align 16
  %4 = alloca %"class.JPH::Quat", align 16
  %5 = alloca %"class.JPH::Vec3", align 16
  %6 = alloca %"class.JPH::Vec3", align 16
  %7 = alloca %"class.JPH::Vec3", align 16
  %8 = alloca %"class.JPH::Vec3", align 16
  %9 = alloca %"class.JPH::Vec3", align 16
  %10 = alloca %"class.JPH::Vec3", align 16
  %11 = alloca %"class.JPH::Vec3", align 16
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = tail call noundef zeroext i1 @_ZN3JPH24WheeledVehicleController38SolveLongitudinalAndLateralConstraintsEf(ptr noundef nonnull align 8 dereferenceable(256) %0, float noundef %1)
  %15 = getelementptr inbounds i8, ptr %0, i64 256
  %16 = load i8, ptr %15, align 16, !tbaa !5, !range !28, !noundef !29
  %17 = trunc nuw i8 %16 to i1
  br i1 %17, label %18, label %152

18:                                               ; preds = %2
  %19 = getelementptr inbounds i8, ptr %0, i64 8
  %20 = load ptr, ptr %19, align 8, !tbaa !30
  %21 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH17VehicleConstraint9GetWheelsEv(ptr noundef nonnull align 16 dereferenceable(408) %20)
  %22 = tail call noundef ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %21)
  %23 = tail call noundef ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %21)
  %.not88 = icmp eq ptr %22, %23
  br i1 %.not88, label %._crit_edge, label %.lr.ph

24:                                               ; preds = %28
  %25 = getelementptr inbounds i8, ptr %.07989, i64 8
  %.not = icmp eq ptr %25, %23
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %18, %24
  %.07989 = phi ptr [ %25, %24 ], [ %22, %18 ]
  %26 = load ptr, ptr %.07989, align 8, !tbaa !31
  %27 = tail call noundef zeroext i1 @_ZNK3JPH5Wheel10HasContactEv(ptr noundef nonnull align 16 dereferenceable(404) %26)
  br i1 %27, label %28, label %.thread86

28:                                               ; preds = %.lr.ph
  %29 = tail call noundef float @_ZNK3JPH5Wheel19GetSuspensionLambdaEv(ptr noundef nonnull align 16 dereferenceable(404) %26)
  %30 = fcmp ugt float %29, 0.000000e+00
  br i1 %30, label %24, label %.thread86

._crit_edge:                                      ; preds = %24, %18
  %31 = load ptr, ptr %19, align 8, !tbaa !30
  %32 = tail call noundef ptr @_ZNK3JPH17VehicleConstraint14GetVehicleBodyEv(ptr noundef nonnull align 16 dereferenceable(408) %31)
  %33 = tail call noundef ptr @_ZN3JPH4Body19GetMotionPropertiesEv(ptr noundef nonnull align 16 dereferenceable(122) %32)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #11
  %34 = tail call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %32)
  %35 = extractvalue { double, double } %34, 0
  store double %35, ptr %3, align 16
  %36 = getelementptr inbounds i8, ptr %3, i64 8
  %37 = extractvalue { double, double } %34, 1
  store double %37, ptr %36, align 8
  %38 = load ptr, ptr %19, align 8, !tbaa !30
  %39 = tail call { double, double } @_ZNK3JPH17VehicleConstraint15GetLocalForwardEv(ptr noundef nonnull align 16 dereferenceable(408) %38)
  %40 = extractvalue { double, double } %39, 0
  %41 = extractvalue { double, double } %39, 1
  %42 = call { double, double } @_ZNK3JPH4QuatmlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(16) %3, double %40, double %41)
  %43 = extractvalue { double, double } %42, 0
  %44 = extractvalue { double, double } %42, 1
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #11
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #11
  %45 = call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %32)
  %46 = extractvalue { double, double } %45, 0
  store double %46, ptr %4, align 16
  %47 = getelementptr inbounds i8, ptr %4, i64 8
  %48 = extractvalue { double, double } %45, 1
  store double %48, ptr %47, align 8
  %49 = load ptr, ptr %19, align 8, !tbaa !30
  %50 = call { double, double } @_ZNK3JPH17VehicleConstraint10GetLocalUpEv(ptr noundef nonnull align 16 dereferenceable(408) %49)
  %51 = extractvalue { double, double } %50, 0
  %52 = extractvalue { double, double } %50, 1
  %53 = call { double, double } @_ZNK3JPH4QuatmlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(16) %4, double %51, double %52)
  %54 = extractvalue { double, double } %53, 0
  %55 = extractvalue { double, double } %53, 1
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #11
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #11
  %56 = getelementptr inbounds i8, ptr %0, i64 288
  %57 = call { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %56, double %54, double %55)
  %58 = extractvalue { double, double } %57, 0
  store double %58, ptr %5, align 16
  %59 = getelementptr inbounds i8, ptr %5, i64 8
  %60 = extractvalue { double, double } %57, 1
  store double %60, ptr %59, align 8
  %61 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %5, double %43, double %44)
  %62 = call noundef float @_ZN3JPH4SignIfEET_S1_(float noundef %61)
  %63 = fneg float %62
  %64 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %56, double %54, double %55)
  %65 = call noundef float @_ZN3JPH4ACosEf(float noundef %64)
  %66 = fmul float %65, %63
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #11
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #11
  %67 = call { double, double } @_ZNK3JPH4Body18GetAngularVelocityEv(ptr noundef nonnull align 16 dereferenceable(122) %32)
  %68 = extractvalue { double, double } %67, 0
  store double %68, ptr %6, align 16
  %69 = getelementptr inbounds i8, ptr %6, i64 8
  %70 = extractvalue { double, double } %67, 1
  store double %70, ptr %69, align 8
  %71 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %6, double %43, double %44)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #11
  %72 = getelementptr inbounds i8, ptr %0, i64 264
  %73 = load float, ptr %72, align 8, !tbaa !32
  %74 = getelementptr inbounds i8, ptr %0, i64 268
  %75 = load float, ptr %74, align 4, !tbaa !33
  %76 = fneg float %75
  %77 = fmul float %71, %76
  %78 = call float @llvm.fmuladd.f32(float %73, float %66, float %77)
  %79 = getelementptr inbounds i8, ptr %0, i64 272
  %80 = load float, ptr %79, align 16, !tbaa !34
  %81 = getelementptr inbounds i8, ptr %0, i64 304
  %82 = load float, ptr %81, align 16, !tbaa !35
  %83 = call float @llvm.fmuladd.f32(float %80, float %82, float %78)
  %84 = fmul float %83, %1
  %85 = call { double, double } @_ZNK3JPH16MotionProperties18GetAngularVelocityEv(ptr noundef nonnull align 16 dereferenceable(182) %33)
  %86 = extractvalue { double, double } %85, 0
  %87 = extractvalue { double, double } %85, 1
  %88 = getelementptr inbounds i8, ptr %0, i64 308
  %89 = load float, ptr %88, align 4, !tbaa !36
  %90 = fsub float %84, %89
  %91 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %90, double %43, double %44)
  %92 = extractvalue { double, double } %91, 0
  %93 = extractvalue { double, double } %91, 1
  call void @_ZN3JPH4Body17AddAngularImpulseENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(122) %32, double %92, double %93)
  store float %84, ptr %88, align 4, !tbaa !36
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #11
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #11
  %94 = call { double, double } @_ZNK3JPH16MotionProperties18GetAngularVelocityEv(ptr noundef nonnull align 16 dereferenceable(182) %33)
  %95 = extractvalue { double, double } %94, 0
  store double %95, ptr %8, align 16
  %96 = getelementptr inbounds i8, ptr %8, i64 8
  %97 = extractvalue { double, double } %94, 1
  store double %97, ptr %96, align 8
  %98 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %8, double %86, double %87)
  %99 = extractvalue { double, double } %98, 0
  store double %99, ptr %7, align 16
  %100 = getelementptr inbounds i8, ptr %7, i64 8
  %101 = extractvalue { double, double } %98, 1
  store double %101, ptr %100, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #11
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #11
  %102 = call { double, double } @_ZN3JPH4Vec35sZeroEv()
  %103 = extractvalue { double, double } %102, 0
  store double %103, ptr %9, align 16
  %104 = getelementptr inbounds i8, ptr %9, i64 8
  %105 = extractvalue { double, double } %102, 1
  store double %105, ptr %104, align 8
  %106 = load ptr, ptr %19, align 8, !tbaa !30
  %107 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH17VehicleConstraint9GetWheelsEv(ptr noundef nonnull align 16 dereferenceable(408) %106)
  %108 = call noundef ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %107)
  %109 = call noundef ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %107)
  %.not8390 = icmp eq ptr %108, %109
  br i1 %.not8390, label %._crit_edge95, label %.lr.ph94

.lr.ph94:                                         ; preds = %._crit_edge
  %110 = getelementptr inbounds i8, ptr %10, i64 8
  br label %122

._crit_edge95:                                    ; preds = %122, %._crit_edge
  %.081.lcssa = phi float [ 0.000000e+00, %._crit_edge ], [ %125, %122 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #11
  %111 = call { double, double } @_ZNK3JPH4Vec3ngEv(ptr noundef nonnull align 16 dereferenceable(16) %9)
  %112 = extractvalue { double, double } %111, 0
  store double %112, ptr %11, align 16
  %113 = getelementptr inbounds i8, ptr %11, i64 8
  %114 = extractvalue { double, double } %111, 1
  store double %114, ptr %113, align 8
  %115 = call noundef float @_ZNK3JPH16MotionProperties14GetInverseMassEv(ptr noundef nonnull align 16 dereferenceable(182) %33)
  %116 = fmul float %.081.lcssa, %115
  %117 = call { double, double } @_ZNK3JPH4Vec3dvEf(ptr noundef nonnull align 16 dereferenceable(16) %11, float noundef %116)
  %118 = extractvalue { double, double } %117, 0
  %119 = extractvalue { double, double } %117, 1
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #11
  call void @_ZN3JPH4Body10AddImpulseENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(122) %32, double %118, double %119)
  %120 = fcmp une float %90, 0.000000e+00
  %121 = or i1 %14, %120
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #11
  br label %152

122:                                              ; preds = %.lr.ph94, %122
  %.08192 = phi float [ 0.000000e+00, %.lr.ph94 ], [ %125, %122 ]
  %.08291 = phi ptr [ %108, %.lr.ph94 ], [ %142, %122 ]
  %123 = load ptr, ptr %.08291, align 8, !tbaa !31
  %124 = call noundef float @_ZNK3JPH5Wheel19GetSuspensionLambdaEv(ptr noundef nonnull align 16 dereferenceable(404) %123)
  %125 = fadd float %.08192, %124
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #11
  %126 = call { double, double } @_ZNK3JPH5Wheel18GetContactPositionEv(ptr noundef nonnull align 16 dereferenceable(404) %123)
  %127 = extractvalue { double, double } %126, 0
  store double %127, ptr %10, align 16
  %128 = extractvalue { double, double } %126, 1
  store double %128, ptr %110, align 8
  %129 = call { double, double } @_ZNK3JPH4Body23GetCenterOfMassPositionEv(ptr noundef nonnull align 16 dereferenceable(122) %32)
  %130 = extractvalue { double, double } %129, 0
  %131 = extractvalue { double, double } %129, 1
  %132 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %10, double %130, double %131)
  %133 = extractvalue { double, double } %132, 0
  %134 = extractvalue { double, double } %132, 1
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #11
  %135 = call { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %7, double %133, double %134)
  %136 = extractvalue { double, double } %135, 0
  %137 = extractvalue { double, double } %135, 1
  %138 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %124, double %136, double %137)
  %139 = extractvalue { double, double } %138, 0
  %140 = extractvalue { double, double } %138, 1
  %141 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16) %9, double %139, double %140)
  %142 = getelementptr inbounds i8, ptr %.08291, i64 8
  %.not83 = icmp eq ptr %142, %109
  br i1 %.not83, label %._crit_edge95, label %122

.thread86:                                        ; preds = %28, %.lr.ph
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #11
  store float 0.000000e+00, ptr %12, align 4, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #11
  %143 = getelementptr inbounds i8, ptr %0, i64 276
  %144 = load float, ptr %143, align 4, !tbaa !38
  %145 = fneg float %144
  %146 = tail call float @llvm.fmuladd.f32(float %145, float %1, float 1.000000e+00)
  store float %146, ptr %13, align 4, !tbaa !37
  %147 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %148 = load float, ptr %147, align 4, !tbaa !37
  %149 = getelementptr inbounds i8, ptr %0, i64 304
  %150 = load float, ptr %149, align 16, !tbaa !35
  %151 = fmul float %148, %150
  store float %151, ptr %149, align 16, !tbaa !35
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #11
  br label %152

152:                                              ; preds = %._crit_edge95, %.thread86, %2
  %.1 = phi i1 [ %14, %2 ], [ %121, %._crit_edge95 ], [ %14, %.thread86 ]
  ret i1 %.1
}

declare noundef zeroext i1 @_ZN3JPH24WheeledVehicleController38SolveLongitudinalAndLateralConstraintsEf(ptr noundef nonnull align 8 dereferenceable(256), float noundef) unnamed_addr #10

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH4Body19GetMotionPropertiesEv(ptr noundef nonnull align 16 dereferenceable(122)) local_unnamed_addr #7 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH4Body17AddAngularImpulseENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(122), double, double) local_unnamed_addr #5 align 2

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef float @_ZNK3JPH16MotionProperties14GetInverseMassEv(ptr noundef nonnull align 16 dereferenceable(182)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH4Body10AddImpulseENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(122), double, double) local_unnamed_addr #5 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 #8 = { alwaysinline mustprogress nounwind 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 #9 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #10 = { "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 #11 = { 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, !26, i64 256}
!6 = !{!"_ZTSN3JPH20MotorcycleControllerE", !7, i64 0, !26, i64 256, !26, i64 257, !12, i64 260, !12, i64 264, !12, i64 268, !12, i64 272, !12, i64 276, !12, i64 280, !27, i64 288, !12, i64 304, !12, i64 308}
!7 = !{!"_ZTSN3JPH24WheeledVehicleControllerE", !8, i64 0, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !13, i64 32, !18, i64 88, !23, i64 192, !12, i64 216, !12, i64 220, !24, i64 224}
!8 = !{!"_ZTSN3JPH17VehicleControllerE", !9, i64 8}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"float", !10, i64 0}
!13 = !{!"_ZTSN3JPH13VehicleEngineE", !14, i64 0, !12, i64 48}
!14 = !{!"_ZTSN3JPH21VehicleEngineSettingsE", !12, i64 0, !12, i64 4, !12, i64 8, !15, i64 16, !12, i64 40, !12, i64 44}
!15 = !{!"_ZTSN3JPH11LinearCurveE", !16, i64 0}
!16 = !{!"_ZTSN3JPH5ArrayINS_11LinearCurve5PointENS_12STLAllocatorIS2_EEEE", !17, i64 0, !17, i64 8, !9, i64 16}
!17 = !{!"long", !10, i64 0}
!18 = !{!"_ZTSN3JPH19VehicleTransmissionE", !19, i64 0, !22, i64 80, !12, i64 84, !12, i64 88, !12, i64 92, !12, i64 96}
!19 = !{!"_ZTSN3JPH27VehicleTransmissionSettingsE", !20, i64 0, !21, i64 8, !21, i64 32, !12, i64 56, !12, i64 60, !12, i64 64, !12, i64 68, !12, i64 72, !12, i64 76}
!20 = !{!"_ZTSN3JPH17ETransmissionModeE", !10, i64 0}
!21 = !{!"_ZTSN3JPH5ArrayIfNS_12STLAllocatorIfEEEE", !17, i64 0, !17, i64 8, !9, i64 16}
!22 = !{!"int", !10, i64 0}
!23 = !{!"_ZTSN3JPH5ArrayINS_27VehicleDifferentialSettingsENS_12STLAllocatorIS1_EEEE", !17, i64 0, !17, i64 8, !9, i64 16}
!24 = !{!"_ZTSSt8functionIFvjRfS0_ffffffEE", !25, i64 0, !9, i64 24}
!25 = !{!"_ZTSSt14_Function_base", !10, i64 0, !9, i64 16}
!26 = !{!"bool", !10, i64 0}
!27 = !{!"_ZTSN3JPH4Vec3E", !10, i64 0}
!28 = !{i8 0, i8 2}
!29 = !{}
!30 = !{!8, !9, i64 8}
!31 = !{!9, !9, i64 0}
!32 = !{!6, !12, i64 264}
!33 = !{!6, !12, i64 268}
!34 = !{!6, !12, i64 272}
!35 = !{!6, !12, i64 304}
!36 = !{!6, !12, i64 308}
!37 = !{!12, !12, i64 0}
!38 = !{!6, !12, i64 276}


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