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

; 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::Body" = type <{ %"class.JPH::Vec3", %"class.JPH::Quat", %"class.JPH::AABox", %"class.JPH::RefConst.20", ptr, i64, %"class.JPH::CollisionGroup", float, float, %"class.JPH::BodyID", i16, i8, %"class.JPH::BroadPhaseLayer", i8, %"struct.std::atomic.22", [6 x i8] }>
%"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.19 }
%union.anon.19 = type { <4 x float> }
%"class.JPH::AABox" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"class.JPH::RefConst.20" = type { ptr }
%"class.JPH::CollisionGroup" = type { %"class.JPH::RefConst.21", i32, i32 }
%"class.JPH::RefConst.21" = type { ptr }
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::BroadPhaseLayer" = type { i8 }
%"struct.std::atomic.22" = type { %"struct.std::__atomic_base.23" }
%"struct.std::__atomic_base.23" = type { i8 }
%"class.JPH::VehicleConstraint" = type <{ %"class.JPH::Constraint", %"class.JPH::PhysicsStepListener", i8, [7 x i8], %"class.JPH::Vec3", ptr, [8 x i8], %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Array.14", %"class.JPH::Array.2", ptr, i8, [3 x i8], i32, i32, i32, float, float, %"class.JPH::Vec3", %"class.JPH::AngleConstraintPart", %"class.JPH::RefConst", %"class.std::function", %"class.std::function.17", %"class.std::function.17", %"class.std::function.17", [8 x i8] }>
%"class.JPH::Constraint" = type { ptr, %"class.JPH::RefTarget.13", i32, i32, i8, i8, i8, i64 }
%"class.JPH::RefTarget.13" = type { %"struct.std::atomic" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"class.JPH::PhysicsStepListener" = type { ptr }
%"class.JPH::Array.14" = type { i64, i64, ptr }
%"class.JPH::Array.2" = type { i64, i64, ptr }
%"class.JPH::AngleConstraintPart" = type { %"class.JPH::Vec3", %"class.JPH::Vec3", float, %"class.JPH::SpringPart", float }
%"class.JPH::SpringPart" = type { float, float }
%"class.JPH::RefConst" = type { 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 } }
%"class.std::function.17" = type { %"class.std::_Function_base", ptr }
%"class.JPH::Wheel" = type <{ ptr, %"class.JPH::RefConst.26", %"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", [12 x i8] }>
%"class.JPH::RefConst.26" = type { ptr }
%"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 }

@_ZN3JPH4Body13sFixedToWorldE = external global %"class.JPH::Body", align 16

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

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

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

20:                                               ; preds = %91, %2
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  %22 = load ptr, ptr %8, align 8, !tbaa !5
  %23 = icmp ne ptr %21, %22
  br i1 %23, label %25, label %24

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

25:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %26 = load ptr, ptr %7, align 8, !tbaa !5
  %27 = load ptr, ptr %26, align 8, !tbaa !5
  store ptr %27, ptr %9, align 8, !tbaa !5
  %28 = load ptr, ptr %9, align 8, !tbaa !5
  %29 = getelementptr inbounds %"class.JPH::Wheel", ptr %28, i32 0, i32 4
  %30 = load ptr, ptr %29, align 8, !tbaa !13
  %31 = icmp ne ptr %30, null
  br i1 %31, label %32, label %90

32:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #6
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  %34 = getelementptr inbounds %"class.JPH::Wheel", ptr %33, i32 0, i32 9
  %35 = call { double, double } @_ZNK3JPH4Vec3ngEv(ptr noundef nonnull align 16 dereferenceable(16) %34)
  %36 = getelementptr inbounds %"class.JPH::Vec3", ptr %10, i32 0, i32 0
  %37 = getelementptr inbounds %union.anon, ptr %36, i32 0, i32 0
  %38 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 0
  %39 = extractvalue { double, double } %35, 0
  store double %39, ptr %38, align 16
  %40 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 1
  %41 = extractvalue { double, double } %35, 1
  store double %41, ptr %40, align 8
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = getelementptr inbounds %"class.JPH::Wheel", ptr %42, i32 0, i32 17
  %44 = call noundef zeroext i1 @_ZNK3JPH18AxisConstraintPart8IsActiveEv(ptr noundef nonnull align 4 dereferenceable(64) %43)
  br i1 %44, label %45, label %65

45:                                               ; preds = %32
  %46 = load ptr, ptr %9, align 8, !tbaa !5
  %47 = getelementptr inbounds %"class.JPH::Wheel", ptr %46, i32 0, i32 17
  %48 = getelementptr inbounds %"class.JPH::VehicleConstraint", ptr %14, i32 0, i32 5
  %49 = load ptr, ptr %48, align 16, !tbaa !23
  %50 = load ptr, ptr %9, align 8, !tbaa !5
  %51 = getelementptr inbounds %"class.JPH::Wheel", ptr %50, i32 0, i32 4
  %52 = load ptr, ptr %51, align 8, !tbaa !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %11, ptr align 16 %10, i64 16, i1 false), !tbaa.struct !38
  %53 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 0
  %54 = load double, ptr %53, align 16
  %55 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 1
  %56 = load double, ptr %55, align 8
  %57 = call noundef zeroext i1 @_ZN3JPH18AxisConstraintPart23SolveVelocityConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 4 dereferenceable(64) %47, ptr noundef nonnull align 16 dereferenceable(122) %49, ptr noundef nonnull align 16 dereferenceable(122) %52, double %54, double %56, float noundef 0.000000e+00, float noundef 0x47EFFFFFE0000000)
  %58 = zext i1 %57 to i32
  %59 = load i8, ptr %5, align 1, !tbaa !11, !range !40, !noundef !41
  %60 = trunc i8 %59 to i1
  %61 = zext i1 %60 to i32
  %62 = or i32 %61, %58
  %63 = icmp ne i32 %62, 0
  %64 = zext i1 %63 to i8
  store i8 %64, ptr %5, align 1, !tbaa !11
  br label %65

65:                                               ; preds = %45, %32
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  %67 = getelementptr inbounds %"class.JPH::Wheel", ptr %66, i32 0, i32 18
  %68 = call noundef zeroext i1 @_ZNK3JPH18AxisConstraintPart8IsActiveEv(ptr noundef nonnull align 4 dereferenceable(64) %67)
  br i1 %68, label %69, label %89

69:                                               ; preds = %65
  %70 = load ptr, ptr %9, align 8, !tbaa !5
  %71 = getelementptr inbounds %"class.JPH::Wheel", ptr %70, i32 0, i32 18
  %72 = getelementptr inbounds %"class.JPH::VehicleConstraint", ptr %14, i32 0, i32 5
  %73 = load ptr, ptr %72, align 16, !tbaa !23
  %74 = load ptr, ptr %9, align 8, !tbaa !5
  %75 = getelementptr inbounds %"class.JPH::Wheel", ptr %74, i32 0, i32 4
  %76 = load ptr, ptr %75, align 8, !tbaa !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %12, ptr align 16 %10, i64 16, i1 false), !tbaa.struct !38
  %77 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 0
  %78 = load double, ptr %77, align 16
  %79 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 1
  %80 = load double, ptr %79, align 8
  %81 = call noundef zeroext i1 @_ZN3JPH18AxisConstraintPart23SolveVelocityConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 4 dereferenceable(64) %71, ptr noundef nonnull align 16 dereferenceable(122) %73, ptr noundef nonnull align 16 dereferenceable(122) %76, double %78, double %80, float noundef 0.000000e+00, float noundef 0x47EFFFFFE0000000)
  %82 = zext i1 %81 to i32
  %83 = load i8, ptr %5, align 1, !tbaa !11, !range !40, !noundef !41
  %84 = trunc i8 %83 to i1
  %85 = zext i1 %84 to i32
  %86 = or i32 %85, %82
  %87 = icmp ne i32 %86, 0
  %88 = zext i1 %87 to i8
  store i8 %88, ptr %5, align 1, !tbaa !11
  br label %89

89:                                               ; preds = %69, %65
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #6
  br label %90

90:                                               ; preds = %89, %25
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %91

91:                                               ; preds = %90
  %92 = load ptr, ptr %7, align 8, !tbaa !5
  %93 = getelementptr inbounds ptr, ptr %92, i32 1
  store ptr %93, ptr %7, align 8, !tbaa !5
  br label %20

94:                                               ; preds = %24
  %95 = getelementptr inbounds %"class.JPH::VehicleConstraint", ptr %14, i32 0, i32 12
  %96 = load ptr, ptr %95, align 16, !tbaa !42
  %97 = load float, ptr %4, align 4, !tbaa !9
  %98 = load ptr, ptr %96, align 8, !tbaa !43
  %99 = getelementptr inbounds ptr, ptr %98, i64 6
  %100 = load ptr, ptr %99, align 8
  %101 = call noundef zeroext i1 %100(ptr noundef nonnull align 8 dereferenceable(16) %96, float noundef %97)
  %102 = zext i1 %101 to i32
  %103 = load i8, ptr %5, align 1, !tbaa !11, !range !40, !noundef !41
  %104 = trunc i8 %103 to i1
  %105 = zext i1 %104 to i32
  %106 = or i32 %105, %102
  %107 = icmp ne i32 %106, 0
  %108 = zext i1 %107 to i8
  store i8 %108, ptr %5, align 1, !tbaa !11
  %109 = getelementptr inbounds %"class.JPH::VehicleConstraint", ptr %14, i32 0, i32 21
  %110 = call noundef zeroext i1 @_ZNK3JPH19AngleConstraintPart8IsActiveEv(ptr noundef nonnull align 16 dereferenceable(48) %109)
  br i1 %110, label %111, label %128

111:                                              ; preds = %94
  %112 = getelementptr inbounds %"class.JPH::VehicleConstraint", ptr %14, i32 0, i32 21
  %113 = getelementptr inbounds %"class.JPH::VehicleConstraint", ptr %14, i32 0, i32 5
  %114 = load ptr, ptr %113, align 16, !tbaa !23
  %115 = getelementptr inbounds %"class.JPH::VehicleConstraint", ptr %14, i32 0, i32 20
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %13, ptr align 16 %115, i64 16, i1 false), !tbaa.struct !38
  %116 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 0
  %117 = load double, ptr %116, align 16
  %118 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 1
  %119 = load double, ptr %118, align 8
  %120 = call noundef zeroext i1 @_ZN3JPH19AngleConstraintPart23SolveVelocityConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 16 dereferenceable(48) %112, ptr noundef nonnull align 16 dereferenceable(122) %114, ptr noundef nonnull align 16 dereferenceable(122) @_ZN3JPH4Body13sFixedToWorldE, double %117, double %119, float noundef 0.000000e+00, float noundef 0x47EFFFFFE0000000)
  %121 = zext i1 %120 to i32
  %122 = load i8, ptr %5, align 1, !tbaa !11, !range !40, !noundef !41
  %123 = trunc i8 %122 to i1
  %124 = zext i1 %123 to i32
  %125 = or i32 %124, %121
  %126 = icmp ne i32 %125, 0
  %127 = zext i1 %126 to i8
  store i8 %127, ptr %5, align 1, !tbaa !11
  br label %128

128:                                              ; preds = %111, %94
  %129 = load i8, ptr %5, align 1, !tbaa !11, !range !40, !noundef !41
  %130 = trunc i8 %129 to i1
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #6
  ret i1 %130
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH18AxisConstraintPart8IsActiveEv(ptr noundef nonnull align 4 dereferenceable(64)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH18AxisConstraintPart23SolveVelocityConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 4 dereferenceable(64), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(122), double, double, float noundef, float noundef) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH19AngleConstraintPart8IsActiveEv(ptr noundef nonnull align 16 dereferenceable(48)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH19AngleConstraintPart23SolveVelocityConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 16 dereferenceable(48), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(122), double, double, float noundef, float noundef) #5 align 2

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !6, i64 24}
!14 = !{!"_ZTSN3JPH5WheelE", !15, i64 8, !16, i64 16, !18, i64 20, !6, i64 24, !10, i64 32, !19, i64 48, !19, i64 64, !19, i64 80, !19, i64 96, !19, i64 112, !10, i64 128, !10, i64 132, !10, i64 136, !10, i64 140, !10, i64 144, !20, i64 148, !20, i64 212, !20, i64 276, !20, i64 340}
!15 = !{!"_ZTSN3JPH8RefConstINS_13WheelSettingsEEE", !6, i64 0}
!16 = !{!"_ZTSN3JPH6BodyIDE", !17, i64 0}
!17 = !{!"int", !7, i64 0}
!18 = !{!"_ZTSN3JPH10SubShapeIDE", !17, i64 0}
!19 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!20 = !{!"_ZTSN3JPH18AxisConstraintPartE", !21, i64 0, !21, i64 12, !21, i64 24, !21, i64 36, !10, i64 48, !22, i64 52, !10, i64 60}
!21 = !{!"_ZTSN3JPH6Float3E", !10, i64 0, !10, i64 4, !10, i64 8}
!22 = !{!"_ZTSN3JPH10SpringPartE", !10, i64 0, !10, i64 4}
!23 = !{!24, !6, i64 64}
!24 = !{!"_ZTSN3JPH17VehicleConstraintE", !25, i64 0, !30, i64 32, !12, i64 40, !19, i64 48, !6, i64 64, !19, i64 80, !19, i64 96, !19, i64 112, !31, i64 128, !32, i64 152, !6, i64 176, !12, i64 184, !17, i64 188, !17, i64 192, !17, i64 196, !10, i64 200, !10, i64 204, !19, i64 208, !33, i64 224, !34, i64 272, !35, i64 280, !37, i64 312, !37, i64 344, !37, i64 376}
!25 = !{!"_ZTSN3JPH10ConstraintE", !26, i64 8, !17, i64 12, !17, i64 16, !7, i64 20, !7, i64 21, !12, i64 22, !29, i64 24}
!26 = !{!"_ZTSN3JPH9RefTargetINS_10ConstraintEEE", !27, i64 0}
!27 = !{!"_ZTSSt6atomicIjE", !28, i64 0}
!28 = !{!"_ZTSSt13__atomic_baseIjE", !17, i64 0}
!29 = !{!"long", !7, i64 0}
!30 = !{!"_ZTSN3JPH19PhysicsStepListenerE"}
!31 = !{!"_ZTSN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEEE", !29, i64 0, !29, i64 8, !6, i64 16}
!32 = !{!"_ZTSN3JPH5ArrayINS_18VehicleAntiRollBarENS_12STLAllocatorIS1_EEEE", !29, i64 0, !29, i64 8, !6, i64 16}
!33 = !{!"_ZTSN3JPH19AngleConstraintPartE", !19, i64 0, !19, i64 16, !10, i64 32, !22, i64 36, !10, i64 44}
!34 = !{!"_ZTSN3JPH8RefConstINS_22VehicleCollisionTesterEEE", !6, i64 0}
!35 = !{!"_ZTSSt8functionIFvjRfS0_RKN3JPH4BodyERKNS1_10SubShapeIDEEE", !36, i64 0, !6, i64 24}
!36 = !{!"_ZTSSt14_Function_base", !7, i64 0, !6, i64 16}
!37 = !{!"_ZTSSt8functionIFvRN3JPH17VehicleConstraintERKNS0_26PhysicsStepListenerContextEEE", !36, i64 0, !6, i64 24}
!38 = !{i64 0, i64 16, !39}
!39 = !{!7, !7, i64 0}
!40 = !{i8 0, i8 2}
!41 = !{}
!42 = !{!24, !6, i64 176}
!43 = !{!44, !44, i64 0}
!44 = !{!"vtable pointer", !8, 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::Body" = type <{ %"class.JPH::Vec3", %"class.JPH::Quat", %"class.JPH::AABox", %"class.JPH::RefConst.20", ptr, i64, %"class.JPH::CollisionGroup", float, float, %"class.JPH::BodyID", i16, i8, %"class.JPH::BroadPhaseLayer", i8, %"struct.std::atomic.22", [6 x i8] }>
%"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.19 }
%union.anon.19 = type { <4 x float> }
%"class.JPH::AABox" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"class.JPH::RefConst.20" = type { ptr }
%"class.JPH::CollisionGroup" = type { %"class.JPH::RefConst.21", i32, i32 }
%"class.JPH::RefConst.21" = type { ptr }
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::BroadPhaseLayer" = type { i8 }
%"struct.std::atomic.22" = type { %"struct.std::__atomic_base.23" }
%"struct.std::__atomic_base.23" = type { i8 }

@_ZN3JPH4Body13sFixedToWorldE = external global %"class.JPH::Body", align 16

; 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 #0 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 #0 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: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3JPH17VehicleConstraint23SolveVelocityConstraintEf(ptr noundef nonnull align 16 dereferenceable(408) %0, float noundef %1) unnamed_addr #2 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 128
  %4 = tail call noundef ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3)
  %5 = tail call noundef ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3)
  %.not27 = icmp eq ptr %4, %5
  br i1 %.not27, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %2
  %6 = getelementptr inbounds i8, ptr %0, i64 64
  br label %16

._crit_edge:                                      ; preds = %40, %2
  %.0.lcssa = phi i1 [ false, %2 ], [ %.3, %40 ]
  %7 = getelementptr inbounds i8, ptr %0, i64 176
  %8 = load ptr, ptr %7, align 16, !tbaa !5
  %9 = load ptr, ptr %8, align 8, !tbaa !28
  %10 = getelementptr inbounds i8, ptr %9, i64 48
  %11 = load ptr, ptr %10, align 8
  %12 = tail call noundef zeroext i1 %11(ptr noundef nonnull align 8 dereferenceable(16) %8, float noundef %1)
  %13 = or i1 %.0.lcssa, %12
  %14 = getelementptr inbounds i8, ptr %0, i64 224
  %15 = tail call noundef zeroext i1 @_ZNK3JPH19AngleConstraintPart8IsActiveEv(ptr noundef nonnull align 16 dereferenceable(48) %14)
  br i1 %15, label %42, label %48

16:                                               ; preds = %.lr.ph, %40
  %.029 = phi i1 [ false, %.lr.ph ], [ %.3, %40 ]
  %.02528 = phi ptr [ %4, %.lr.ph ], [ %41, %40 ]
  %17 = load ptr, ptr %.02528, align 8, !tbaa !30
  %18 = getelementptr inbounds i8, ptr %17, i64 24
  %19 = load ptr, ptr %18, align 8, !tbaa !31
  %.not26 = icmp eq ptr %19, null
  br i1 %.not26, label %40, label %20

20:                                               ; preds = %16
  %21 = getelementptr inbounds i8, ptr %17, i64 80
  %22 = tail call { double, double } @_ZNK3JPH4Vec3ngEv(ptr noundef nonnull align 16 dereferenceable(16) %21)
  %23 = extractvalue { double, double } %22, 0
  %24 = extractvalue { double, double } %22, 1
  %25 = getelementptr inbounds i8, ptr %17, i64 148
  %26 = tail call noundef zeroext i1 @_ZNK3JPH18AxisConstraintPart8IsActiveEv(ptr noundef nonnull align 4 dereferenceable(64) %25)
  br i1 %26, label %27, label %32

27:                                               ; preds = %20
  %28 = load ptr, ptr %6, align 16, !tbaa !38
  %29 = load ptr, ptr %18, align 8, !tbaa !31
  %30 = tail call noundef zeroext i1 @_ZN3JPH18AxisConstraintPart23SolveVelocityConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 4 dereferenceable(64) %25, ptr noundef nonnull align 16 dereferenceable(122) %28, ptr noundef nonnull align 16 dereferenceable(122) %29, double %23, double %24, float noundef 0.000000e+00, float noundef 0x47EFFFFFE0000000)
  %31 = or i1 %.029, %30
  br label %32

32:                                               ; preds = %27, %20
  %.1 = phi i1 [ %31, %27 ], [ %.029, %20 ]
  %33 = getelementptr inbounds i8, ptr %17, i64 212
  %34 = tail call noundef zeroext i1 @_ZNK3JPH18AxisConstraintPart8IsActiveEv(ptr noundef nonnull align 4 dereferenceable(64) %33)
  br i1 %34, label %35, label %40

35:                                               ; preds = %32
  %36 = load ptr, ptr %6, align 16, !tbaa !38
  %37 = load ptr, ptr %18, align 8, !tbaa !31
  %38 = tail call noundef zeroext i1 @_ZN3JPH18AxisConstraintPart23SolveVelocityConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 4 dereferenceable(64) %33, ptr noundef nonnull align 16 dereferenceable(122) %36, ptr noundef nonnull align 16 dereferenceable(122) %37, double %23, double %24, float noundef 0.000000e+00, float noundef 0x47EFFFFFE0000000)
  %39 = or i1 %.1, %38
  br label %40

40:                                               ; preds = %32, %35, %16
  %.3 = phi i1 [ %.029, %16 ], [ %39, %35 ], [ %.1, %32 ]
  %41 = getelementptr inbounds i8, ptr %.02528, i64 8
  %.not = icmp eq ptr %41, %5
  br i1 %.not, label %._crit_edge, label %16

42:                                               ; preds = %._crit_edge
  %43 = getelementptr inbounds i8, ptr %0, i64 64
  %44 = load ptr, ptr %43, align 16, !tbaa !38
  %45 = getelementptr inbounds i8, ptr %0, i64 208
  %.sroa.0.0.copyload = load double, ptr %45, align 16
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 216
  %.sroa.2.0.copyload = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !39
  %46 = tail call noundef zeroext i1 @_ZN3JPH19AngleConstraintPart23SolveVelocityConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 16 dereferenceable(48) %14, ptr noundef nonnull align 16 dereferenceable(122) %44, ptr noundef nonnull align 16 dereferenceable(122) @_ZN3JPH4Body13sFixedToWorldE, double %.sroa.0.0.copyload, double %.sroa.2.0.copyload, float noundef 0.000000e+00, float noundef 0x47EFFFFFE0000000)
  %47 = or i1 %13, %46
  br label %48

48:                                               ; preds = %42, %._crit_edge
  %.4 = phi i1 [ %47, %42 ], [ %13, %._crit_edge ]
  ret i1 %.4
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH18AxisConstraintPart8IsActiveEv(ptr noundef nonnull align 4 dereferenceable(64)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH18AxisConstraintPart23SolveVelocityConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 4 dereferenceable(64), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(122), double, double, float noundef, float noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH19AngleConstraintPart8IsActiveEv(ptr noundef nonnull align 16 dereferenceable(48)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH19AngleConstraintPart23SolveVelocityConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 16 dereferenceable(48), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(122), double, double, float noundef, float noundef) local_unnamed_addr #3 align 2

attributes #0 = { 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 #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 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" }

!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, !18, i64 176}
!6 = !{!"_ZTSN3JPH17VehicleConstraintE", !7, i64 0, !16, i64 32, !14, i64 40, !17, i64 48, !18, i64 64, !17, i64 80, !17, i64 96, !17, i64 112, !19, i64 128, !20, i64 152, !18, i64 176, !14, i64 184, !11, i64 188, !11, i64 192, !11, i64 196, !21, i64 200, !21, i64 204, !17, i64 208, !22, i64 224, !24, i64 272, !25, i64 280, !27, i64 312, !27, i64 344, !27, i64 376}
!7 = !{!"_ZTSN3JPH10ConstraintE", !8, i64 8, !11, i64 12, !11, i64 16, !12, i64 20, !12, i64 21, !14, i64 22, !15, i64 24}
!8 = !{!"_ZTSN3JPH9RefTargetINS_10ConstraintEEE", !9, i64 0}
!9 = !{!"_ZTSSt6atomicIjE", !10, i64 0}
!10 = !{!"_ZTSSt13__atomic_baseIjE", !11, i64 0}
!11 = !{!"int", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"bool", !12, i64 0}
!15 = !{!"long", !12, i64 0}
!16 = !{!"_ZTSN3JPH19PhysicsStepListenerE"}
!17 = !{!"_ZTSN3JPH4Vec3E", !12, i64 0}
!18 = !{!"any pointer", !12, i64 0}
!19 = !{!"_ZTSN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEEE", !15, i64 0, !15, i64 8, !18, i64 16}
!20 = !{!"_ZTSN3JPH5ArrayINS_18VehicleAntiRollBarENS_12STLAllocatorIS1_EEEE", !15, i64 0, !15, i64 8, !18, i64 16}
!21 = !{!"float", !12, i64 0}
!22 = !{!"_ZTSN3JPH19AngleConstraintPartE", !17, i64 0, !17, i64 16, !21, i64 32, !23, i64 36, !21, i64 44}
!23 = !{!"_ZTSN3JPH10SpringPartE", !21, i64 0, !21, i64 4}
!24 = !{!"_ZTSN3JPH8RefConstINS_22VehicleCollisionTesterEEE", !18, i64 0}
!25 = !{!"_ZTSSt8functionIFvjRfS0_RKN3JPH4BodyERKNS1_10SubShapeIDEEE", !26, i64 0, !18, i64 24}
!26 = !{!"_ZTSSt14_Function_base", !12, i64 0, !18, i64 16}
!27 = !{!"_ZTSSt8functionIFvRN3JPH17VehicleConstraintERKNS0_26PhysicsStepListenerContextEEE", !26, i64 0, !18, i64 24}
!28 = !{!29, !29, i64 0}
!29 = !{!"vtable pointer", !13, i64 0}
!30 = !{!18, !18, i64 0}
!31 = !{!32, !18, i64 24}
!32 = !{!"_ZTSN3JPH5WheelE", !33, i64 8, !34, i64 16, !35, i64 20, !18, i64 24, !21, i64 32, !17, i64 48, !17, i64 64, !17, i64 80, !17, i64 96, !17, i64 112, !21, i64 128, !21, i64 132, !21, i64 136, !21, i64 140, !21, i64 144, !36, i64 148, !36, i64 212, !36, i64 276, !36, i64 340}
!33 = !{!"_ZTSN3JPH8RefConstINS_13WheelSettingsEEE", !18, i64 0}
!34 = !{!"_ZTSN3JPH6BodyIDE", !11, i64 0}
!35 = !{!"_ZTSN3JPH10SubShapeIDE", !11, i64 0}
!36 = !{!"_ZTSN3JPH18AxisConstraintPartE", !37, i64 0, !37, i64 12, !37, i64 24, !37, i64 36, !21, i64 48, !23, i64 52, !21, i64 60}
!37 = !{!"_ZTSN3JPH6Float3E", !21, i64 0, !21, i64 4, !21, i64 8}
!38 = !{!6, !18, i64 64}
!39 = !{!12, !12, i64 0}


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