; 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 void @_ZN3JPH17VehicleConstraint27WarmStartVelocityConstraintEf(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 ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.JPH::Vec3", align 16
  %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 8, ptr %5) #6
  %15 = getelementptr inbounds %"class.JPH::VehicleConstraint", ptr %14, i32 0, i32 10
  store ptr %15, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = call noundef ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %16)
  store ptr %17, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = call noundef ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %18)
  store ptr %19, ptr %7, align 8, !tbaa !5
  br label %20

20:                                               ; preds = %108, %2
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = load ptr, ptr %7, 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 %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %111

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

32:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #6
  %33 = load ptr, ptr %8, 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 %9, 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 %8, align 8, !tbaa !5
  %43 = getelementptr inbounds %"class.JPH::Wheel", ptr %42, i32 0, i32 17
  %44 = getelementptr inbounds %"class.JPH::VehicleConstraint", ptr %14, i32 0, i32 5
  %45 = load ptr, ptr %44, align 16, !tbaa !21
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = getelementptr inbounds %"class.JPH::Wheel", ptr %46, i32 0, i32 4
  %48 = load ptr, ptr %47, align 8, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %10, ptr align 16 %9, i64 16, i1 false), !tbaa.struct !37
  %49 = load float, ptr %4, align 4, !tbaa !9
  %50 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 0
  %51 = load double, ptr %50, align 16
  %52 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 1
  %53 = load double, ptr %52, align 8
  call void @_ZN3JPH18AxisConstraintPart9WarmStartERNS_4BodyES2_NS_4Vec3Ef(ptr noundef nonnull align 4 dereferenceable(64) %43, ptr noundef nonnull align 16 dereferenceable(122) %45, ptr noundef nonnull align 16 dereferenceable(122) %48, double %51, double %53, float noundef %49)
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  %55 = getelementptr inbounds %"class.JPH::Wheel", ptr %54, i32 0, i32 18
  %56 = getelementptr inbounds %"class.JPH::VehicleConstraint", ptr %14, i32 0, i32 5
  %57 = load ptr, ptr %56, align 16, !tbaa !21
  %58 = load ptr, ptr %8, align 8, !tbaa !5
  %59 = getelementptr inbounds %"class.JPH::Wheel", ptr %58, i32 0, i32 4
  %60 = load ptr, ptr %59, align 8, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %11, ptr align 16 %9, i64 16, i1 false), !tbaa.struct !37
  %61 = load float, ptr %4, align 4, !tbaa !9
  %62 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 0
  %63 = load double, ptr %62, align 16
  %64 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 1
  %65 = load double, ptr %64, align 8
  call void @_ZN3JPH18AxisConstraintPart9WarmStartERNS_4BodyES2_NS_4Vec3Ef(ptr noundef nonnull align 4 dereferenceable(64) %55, ptr noundef nonnull align 16 dereferenceable(122) %57, ptr noundef nonnull align 16 dereferenceable(122) %60, double %63, double %65, float noundef %61)
  %66 = load ptr, ptr %8, align 8, !tbaa !5
  %67 = getelementptr inbounds %"class.JPH::Wheel", ptr %66, i32 0, i32 19
  %68 = getelementptr inbounds %"class.JPH::VehicleConstraint", ptr %14, i32 0, i32 5
  %69 = load ptr, ptr %68, align 16, !tbaa !21
  %70 = load ptr, ptr %8, align 8, !tbaa !5
  %71 = getelementptr inbounds %"class.JPH::Wheel", ptr %70, i32 0, i32 4
  %72 = load ptr, ptr %71, align 8, !tbaa !11
  %73 = load ptr, ptr %8, align 8, !tbaa !5
  %74 = getelementptr inbounds %"class.JPH::Wheel", ptr %73, i32 0, i32 10
  %75 = call { double, double } @_ZNK3JPH4Vec3ngEv(ptr noundef nonnull align 16 dereferenceable(16) %74)
  %76 = getelementptr inbounds %"class.JPH::Vec3", ptr %12, i32 0, i32 0
  %77 = getelementptr inbounds %union.anon, ptr %76, i32 0, i32 0
  %78 = getelementptr inbounds { double, double }, ptr %77, i32 0, i32 0
  %79 = extractvalue { double, double } %75, 0
  store double %79, ptr %78, align 16
  %80 = getelementptr inbounds { double, double }, ptr %77, i32 0, i32 1
  %81 = extractvalue { double, double } %75, 1
  store double %81, ptr %80, align 8
  %82 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 0
  %83 = load double, ptr %82, align 16
  %84 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 1
  %85 = load double, ptr %84, align 8
  call void @_ZN3JPH18AxisConstraintPart9WarmStartERNS_4BodyES2_NS_4Vec3Ef(ptr noundef nonnull align 4 dereferenceable(64) %67, ptr noundef nonnull align 16 dereferenceable(122) %69, ptr noundef nonnull align 16 dereferenceable(122) %72, double %83, double %85, float noundef 0.000000e+00)
  %86 = load ptr, ptr %8, align 8, !tbaa !5
  %87 = getelementptr inbounds %"class.JPH::Wheel", ptr %86, i32 0, i32 20
  %88 = getelementptr inbounds %"class.JPH::VehicleConstraint", ptr %14, i32 0, i32 5
  %89 = load ptr, ptr %88, align 16, !tbaa !21
  %90 = load ptr, ptr %8, align 8, !tbaa !5
  %91 = getelementptr inbounds %"class.JPH::Wheel", ptr %90, i32 0, i32 4
  %92 = load ptr, ptr %91, align 8, !tbaa !11
  %93 = load ptr, ptr %8, align 8, !tbaa !5
  %94 = getelementptr inbounds %"class.JPH::Wheel", ptr %93, i32 0, i32 11
  %95 = call { double, double } @_ZNK3JPH4Vec3ngEv(ptr noundef nonnull align 16 dereferenceable(16) %94)
  %96 = getelementptr inbounds %"class.JPH::Vec3", ptr %13, i32 0, i32 0
  %97 = getelementptr inbounds %union.anon, ptr %96, i32 0, i32 0
  %98 = getelementptr inbounds { double, double }, ptr %97, i32 0, i32 0
  %99 = extractvalue { double, double } %95, 0
  store double %99, ptr %98, align 16
  %100 = getelementptr inbounds { double, double }, ptr %97, i32 0, i32 1
  %101 = extractvalue { double, double } %95, 1
  store double %101, ptr %100, align 8
  %102 = load float, ptr %4, align 4, !tbaa !9
  %103 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 0
  %104 = load double, ptr %103, align 16
  %105 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 1
  %106 = load double, ptr %105, align 8
  call void @_ZN3JPH18AxisConstraintPart9WarmStartERNS_4BodyES2_NS_4Vec3Ef(ptr noundef nonnull align 4 dereferenceable(64) %87, ptr noundef nonnull align 16 dereferenceable(122) %89, ptr noundef nonnull align 16 dereferenceable(122) %92, double %104, double %106, float noundef %102)
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  br label %107

107:                                              ; preds = %32, %25
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %108

108:                                              ; preds = %107
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  %110 = getelementptr inbounds ptr, ptr %109, i32 1
  store ptr %110, ptr %6, align 8, !tbaa !5
  br label %20

111:                                              ; preds = %24
  %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 !21
  %115 = load float, ptr %4, align 4, !tbaa !9
  call void @_ZN3JPH19AngleConstraintPart9WarmStartERNS_4BodyES2_f(ptr noundef nonnull align 16 dereferenceable(48) %112, ptr noundef nonnull align 16 dereferenceable(122) %114, ptr noundef nonnull align 16 dereferenceable(122) @_ZN3JPH4Body13sFixedToWorldE, float noundef %115)
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH18AxisConstraintPart9WarmStartERNS_4BodyES2_NS_4Vec3Ef(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) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH19AngleConstraintPart9WarmStartERNS_4BodyES2_f(ptr noundef nonnull align 16 dereferenceable(48), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(122), 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, !6, i64 24}
!12 = !{!"_ZTSN3JPH5WheelE", !13, i64 8, !14, i64 16, !16, i64 20, !6, i64 24, !10, i64 32, !17, i64 48, !17, i64 64, !17, i64 80, !17, i64 96, !17, i64 112, !10, i64 128, !10, i64 132, !10, i64 136, !10, i64 140, !10, i64 144, !18, i64 148, !18, i64 212, !18, i64 276, !18, i64 340}
!13 = !{!"_ZTSN3JPH8RefConstINS_13WheelSettingsEEE", !6, i64 0}
!14 = !{!"_ZTSN3JPH6BodyIDE", !15, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTSN3JPH10SubShapeIDE", !15, i64 0}
!17 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!18 = !{!"_ZTSN3JPH18AxisConstraintPartE", !19, i64 0, !19, i64 12, !19, i64 24, !19, i64 36, !10, i64 48, !20, i64 52, !10, i64 60}
!19 = !{!"_ZTSN3JPH6Float3E", !10, i64 0, !10, i64 4, !10, i64 8}
!20 = !{!"_ZTSN3JPH10SpringPartE", !10, i64 0, !10, i64 4}
!21 = !{!22, !6, i64 64}
!22 = !{!"_ZTSN3JPH17VehicleConstraintE", !23, i64 0, !29, i64 32, !27, i64 40, !17, i64 48, !6, i64 64, !17, i64 80, !17, i64 96, !17, i64 112, !30, i64 128, !31, i64 152, !6, i64 176, !27, i64 184, !15, i64 188, !15, i64 192, !15, i64 196, !10, i64 200, !10, i64 204, !17, i64 208, !32, i64 224, !33, i64 272, !34, i64 280, !36, i64 312, !36, i64 344, !36, i64 376}
!23 = !{!"_ZTSN3JPH10ConstraintE", !24, i64 8, !15, i64 12, !15, i64 16, !7, i64 20, !7, i64 21, !27, i64 22, !28, i64 24}
!24 = !{!"_ZTSN3JPH9RefTargetINS_10ConstraintEEE", !25, i64 0}
!25 = !{!"_ZTSSt6atomicIjE", !26, i64 0}
!26 = !{!"_ZTSSt13__atomic_baseIjE", !15, i64 0}
!27 = !{!"bool", !7, i64 0}
!28 = !{!"long", !7, i64 0}
!29 = !{!"_ZTSN3JPH19PhysicsStepListenerE"}
!30 = !{!"_ZTSN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEEE", !28, i64 0, !28, i64 8, !6, i64 16}
!31 = !{!"_ZTSN3JPH5ArrayINS_18VehicleAntiRollBarENS_12STLAllocatorIS1_EEEE", !28, i64 0, !28, i64 8, !6, i64 16}
!32 = !{!"_ZTSN3JPH19AngleConstraintPartE", !17, i64 0, !17, i64 16, !10, i64 32, !20, i64 36, !10, i64 44}
!33 = !{!"_ZTSN3JPH8RefConstINS_22VehicleCollisionTesterEEE", !6, i64 0}
!34 = !{!"_ZTSSt8functionIFvjRfS0_RKN3JPH4BodyERKNS1_10SubShapeIDEEE", !35, i64 0, !6, i64 24}
!35 = !{!"_ZTSSt14_Function_base", !7, i64 0, !6, i64 16}
!36 = !{!"_ZTSSt8functionIFvRN3JPH17VehicleConstraintERKNS0_26PhysicsStepListenerContextEEE", !35, i64 0, !6, i64 24}
!37 = !{i64 0, i64 16, !38}
!38 = !{!7, !7, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.JPH::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 void @_ZN3JPH17VehicleConstraint27WarmStartVelocityConstraintEf(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)
  %.not31 = icmp eq ptr %4, %5
  br i1 %.not31, label %._crit_edge, label %.lr.ph

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

._crit_edge:                                      ; preds = %39, %2
  %7 = getelementptr inbounds i8, ptr %0, i64 224
  %8 = getelementptr inbounds i8, ptr %0, i64 64
  %9 = load ptr, ptr %8, align 16, !tbaa !5
  tail call void @_ZN3JPH19AngleConstraintPart9WarmStartERNS_4BodyES2_f(ptr noundef nonnull align 16 dereferenceable(48) %7, ptr noundef nonnull align 16 dereferenceable(122) %9, ptr noundef nonnull align 16 dereferenceable(122) @_ZN3JPH4Body13sFixedToWorldE, float noundef %1)
  ret void

10:                                               ; preds = %.lr.ph, %39
  %.032 = phi ptr [ %4, %.lr.ph ], [ %40, %39 ]
  %11 = load ptr, ptr %.032, align 8, !tbaa !28
  %12 = getelementptr inbounds i8, ptr %11, i64 24
  %13 = load ptr, ptr %12, align 8, !tbaa !29
  %.not30 = icmp eq ptr %13, null
  br i1 %.not30, label %39, label %14

14:                                               ; preds = %10
  %15 = getelementptr inbounds i8, ptr %11, i64 80
  %16 = tail call { double, double } @_ZNK3JPH4Vec3ngEv(ptr noundef nonnull align 16 dereferenceable(16) %15)
  %17 = extractvalue { double, double } %16, 0
  %18 = extractvalue { double, double } %16, 1
  %19 = getelementptr inbounds i8, ptr %11, i64 148
  %20 = load ptr, ptr %6, align 16, !tbaa !5
  %21 = load ptr, ptr %12, align 8, !tbaa !29
  tail call void @_ZN3JPH18AxisConstraintPart9WarmStartERNS_4BodyES2_NS_4Vec3Ef(ptr noundef nonnull align 4 dereferenceable(64) %19, ptr noundef nonnull align 16 dereferenceable(122) %20, ptr noundef nonnull align 16 dereferenceable(122) %21, double %17, double %18, float noundef %1)
  %22 = getelementptr inbounds i8, ptr %11, i64 212
  %23 = load ptr, ptr %6, align 16, !tbaa !5
  %24 = load ptr, ptr %12, align 8, !tbaa !29
  tail call void @_ZN3JPH18AxisConstraintPart9WarmStartERNS_4BodyES2_NS_4Vec3Ef(ptr noundef nonnull align 4 dereferenceable(64) %22, ptr noundef nonnull align 16 dereferenceable(122) %23, ptr noundef nonnull align 16 dereferenceable(122) %24, double %17, double %18, float noundef %1)
  %25 = getelementptr inbounds i8, ptr %11, i64 276
  %26 = load ptr, ptr %6, align 16, !tbaa !5
  %27 = load ptr, ptr %12, align 8, !tbaa !29
  %28 = getelementptr inbounds i8, ptr %11, i64 96
  %29 = tail call { double, double } @_ZNK3JPH4Vec3ngEv(ptr noundef nonnull align 16 dereferenceable(16) %28)
  %30 = extractvalue { double, double } %29, 0
  %31 = extractvalue { double, double } %29, 1
  tail call void @_ZN3JPH18AxisConstraintPart9WarmStartERNS_4BodyES2_NS_4Vec3Ef(ptr noundef nonnull align 4 dereferenceable(64) %25, ptr noundef nonnull align 16 dereferenceable(122) %26, ptr noundef nonnull align 16 dereferenceable(122) %27, double %30, double %31, float noundef 0.000000e+00)
  %32 = getelementptr inbounds i8, ptr %11, i64 340
  %33 = load ptr, ptr %6, align 16, !tbaa !5
  %34 = load ptr, ptr %12, align 8, !tbaa !29
  %35 = getelementptr inbounds i8, ptr %11, i64 112
  %36 = tail call { double, double } @_ZNK3JPH4Vec3ngEv(ptr noundef nonnull align 16 dereferenceable(16) %35)
  %37 = extractvalue { double, double } %36, 0
  %38 = extractvalue { double, double } %36, 1
  tail call void @_ZN3JPH18AxisConstraintPart9WarmStartERNS_4BodyES2_NS_4Vec3Ef(ptr noundef nonnull align 4 dereferenceable(64) %32, ptr noundef nonnull align 16 dereferenceable(122) %33, ptr noundef nonnull align 16 dereferenceable(122) %34, double %37, double %38, float noundef %1)
  br label %39

39:                                               ; preds = %14, %10
  %40 = getelementptr inbounds i8, ptr %.032, i64 8
  %.not = icmp eq ptr %40, %5
  br i1 %.not, label %._crit_edge, label %10
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH18AxisConstraintPart9WarmStartERNS_4BodyES2_NS_4Vec3Ef(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) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH19AngleConstraintPart9WarmStartERNS_4BodyES2_f(ptr noundef nonnull align 16 dereferenceable(48), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(122), 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 64}
!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 = !{!18, !18, i64 0}
!29 = !{!30, !18, i64 24}
!30 = !{!"_ZTSN3JPH5WheelE", !31, i64 8, !32, i64 16, !33, 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, !34, i64 148, !34, i64 212, !34, i64 276, !34, i64 340}
!31 = !{!"_ZTSN3JPH8RefConstINS_13WheelSettingsEEE", !18, i64 0}
!32 = !{!"_ZTSN3JPH6BodyIDE", !11, i64 0}
!33 = !{!"_ZTSN3JPH10SubShapeIDE", !11, i64 0}
!34 = !{!"_ZTSN3JPH18AxisConstraintPartE", !35, i64 0, !35, i64 12, !35, i64 24, !35, i64 36, !21, i64 48, !23, i64 52, !21, i64 60}
!35 = !{!"_ZTSN3JPH6Float3E", !21, i64 0, !21, i64 4, !21, i64 8}


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