; 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::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::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"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::BodyID" = type { i32 }
%"class.JPH::SubShapeID" = type { i32 }
%"class.JPH::AxisConstraintPart" = type { %"class.JPH::Float3", %"class.JPH::Float3", %"class.JPH::Float3", %"class.JPH::Float3", float, %"class.JPH::SpringPart", float }
%"class.JPH::Float3" = type { float, float, float }

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH8StreamIn4ReadERNS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 16 dereferenceable(16)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH8StreamIn4ReadIfTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #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: mustprogress uwtable
define dso_local void @_ZN3JPH17VehicleConstraint12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 16 dereferenceable(408) %0, ptr noundef nonnull align 8 dereferenceable(18) %1) unnamed_addr #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %9 = load ptr, ptr %3, align 8
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN3JPH10Constraint12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(18) %10)
  %11 = getelementptr inbounds %"class.JPH::VehicleConstraint", ptr %9, i32 0, i32 12
  %12 = load ptr, ptr %11, align 16, !tbaa !9
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = load ptr, ptr %12, align 8, !tbaa !29
  %15 = getelementptr inbounds ptr, ptr %14, i64 8
  %16 = load ptr, ptr %15, align 8
  call void %16(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(18) %13)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %17 = getelementptr inbounds %"class.JPH::VehicleConstraint", ptr %9, i32 0, i32 10
  store ptr %17, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = call noundef ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %18)
  store ptr %19, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = call noundef ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %20)
  store ptr %21, ptr %7, align 8, !tbaa !5
  br label %22

22:                                               ; preds = %65, %2
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = icmp ne ptr %23, %24
  br i1 %25, label %27, label %26

26:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  br label %68

27:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  %29 = load ptr, ptr %28, align 8, !tbaa !5
  store ptr %29, ptr %8, align 8, !tbaa !5
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  %32 = getelementptr inbounds %"class.JPH::Wheel", ptr %31, i32 0, i32 15
  call void @_ZN3JPH8StreamIn4ReadIfTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 4 dereferenceable(4) %32)
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  %35 = getelementptr inbounds %"class.JPH::Wheel", ptr %34, i32 0, i32 16
  call void @_ZN3JPH8StreamIn4ReadIfTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull align 4 dereferenceable(4) %35)
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  %38 = getelementptr inbounds %"class.JPH::Wheel", ptr %37, i32 0, i32 2
  call void @_ZN3JPH8StreamIn4ReadINS_6BodyIDETnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS4_(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull align 4 dereferenceable(4) %38)
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = load ptr, ptr %8, align 8, !tbaa !5
  %41 = getelementptr inbounds %"class.JPH::Wheel", ptr %40, i32 0, i32 7
  call void @_ZN3JPH8StreamIn4ReadERNS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef nonnull align 16 dereferenceable(16) %41)
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  %44 = getelementptr inbounds %"class.JPH::Wheel", ptr %43, i32 0, i32 9
  call void @_ZN3JPH8StreamIn4ReadERNS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef nonnull align 16 dereferenceable(16) %44)
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = getelementptr inbounds %"class.JPH::Wheel", ptr %46, i32 0, i32 11
  call void @_ZN3JPH8StreamIn4ReadERNS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef nonnull align 16 dereferenceable(16) %47)
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  %50 = getelementptr inbounds %"class.JPH::Wheel", ptr %49, i32 0, i32 5
  call void @_ZN3JPH8StreamIn4ReadIfTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %48, ptr noundef nonnull align 4 dereferenceable(4) %50)
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  %52 = getelementptr inbounds %"class.JPH::Wheel", ptr %51, i32 0, i32 4
  store ptr null, ptr %52, align 8, !tbaa !31
  %53 = load ptr, ptr %8, align 8, !tbaa !5
  %54 = getelementptr inbounds %"class.JPH::Wheel", ptr %53, i32 0, i32 17
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN3JPH18AxisConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 4 dereferenceable(64) %54, ptr noundef nonnull align 8 dereferenceable(18) %55)
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  %57 = getelementptr inbounds %"class.JPH::Wheel", ptr %56, i32 0, i32 18
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN3JPH18AxisConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 4 dereferenceable(64) %57, ptr noundef nonnull align 8 dereferenceable(18) %58)
  %59 = load ptr, ptr %8, align 8, !tbaa !5
  %60 = getelementptr inbounds %"class.JPH::Wheel", ptr %59, i32 0, i32 19
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN3JPH18AxisConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 4 dereferenceable(64) %60, ptr noundef nonnull align 8 dereferenceable(18) %61)
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  %63 = getelementptr inbounds %"class.JPH::Wheel", ptr %62, i32 0, i32 20
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN3JPH18AxisConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 4 dereferenceable(64) %63, ptr noundef nonnull align 8 dereferenceable(18) %64)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %65

65:                                               ; preds = %27
  %66 = load ptr, ptr %6, align 8, !tbaa !5
  %67 = getelementptr inbounds ptr, ptr %66, i32 1
  store ptr %67, ptr %6, align 8, !tbaa !5
  br label %22

68:                                               ; preds = %26
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = getelementptr inbounds %"class.JPH::VehicleConstraint", ptr %9, i32 0, i32 20
  call void @_ZN3JPH8StreamIn4ReadERNS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(8) %69, ptr noundef nonnull align 16 dereferenceable(16) %70)
  %71 = getelementptr inbounds %"class.JPH::VehicleConstraint", ptr %9, i32 0, i32 21
  %72 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN3JPH19AngleConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 16 dereferenceable(48) %71, ptr noundef nonnull align 8 dereferenceable(18) %72)
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = getelementptr inbounds %"class.JPH::VehicleConstraint", ptr %9, i32 0, i32 17
  call void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %73, ptr noundef nonnull align 4 dereferenceable(4) %74)
  ret void
}

declare void @_ZN3JPH10Constraint12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(18)) unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH8StreamIn4ReadINS_6BodyIDETnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS4_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH18AxisConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 4 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(18)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH19AngleConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 16 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(18)) #2 align 2

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


; 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"

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH8StreamIn4ReadERNS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 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 #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)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH17VehicleConstraint12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 16 dereferenceable(408) %0, ptr noundef nonnull align 8 dereferenceable(18) %1) unnamed_addr #1 align 2 {
  tail call void @_ZN3JPH10Constraint12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(18) %1)
  %3 = getelementptr inbounds i8, ptr %0, i64 176
  %4 = load ptr, ptr %3, align 16, !tbaa !5
  %5 = load ptr, ptr %4, align 8, !tbaa !28
  %6 = getelementptr inbounds i8, ptr %5, i64 64
  %7 = load ptr, ptr %6, align 8
  tail call void %7(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(18) %1)
  %8 = getelementptr inbounds i8, ptr %0, i64 128
  %9 = tail call noundef ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
  %10 = tail call noundef ptr @_ZN3JPH5ArrayIPNS_5WheelENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
  %.not35 = icmp eq ptr %9, %10
  br i1 %.not35, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %2
  %11 = getelementptr inbounds i8, ptr %0, i64 208
  tail call void @_ZN3JPH8StreamIn4ReadERNS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 16 dereferenceable(16) %11)
  %12 = getelementptr inbounds i8, ptr %0, i64 224
  tail call void @_ZN3JPH19AngleConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 16 dereferenceable(48) %12, ptr noundef nonnull align 8 dereferenceable(18) %1)
  %13 = getelementptr inbounds i8, ptr %0, i64 196
  tail call void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %13)
  ret void

.lr.ph:                                           ; preds = %2, %.lr.ph
  %.036 = phi ptr [ %27, %.lr.ph ], [ %9, %2 ]
  %14 = load ptr, ptr %.036, align 8, !tbaa !30
  %15 = getelementptr inbounds i8, ptr %14, i64 140
  tail call void @_ZN3JPH8StreamIn4ReadIfTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %16 = getelementptr inbounds i8, ptr %14, i64 144
  tail call void @_ZN3JPH8StreamIn4ReadIfTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %16)
  %17 = getelementptr inbounds i8, ptr %14, i64 16
  tail call void @_ZN3JPH8StreamIn4ReadINS_6BodyIDETnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS4_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %17)
  %18 = getelementptr inbounds i8, ptr %14, i64 48
  tail call void @_ZN3JPH8StreamIn4ReadERNS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 16 dereferenceable(16) %18)
  %19 = getelementptr inbounds i8, ptr %14, i64 80
  tail call void @_ZN3JPH8StreamIn4ReadERNS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 16 dereferenceable(16) %19)
  %20 = getelementptr inbounds i8, ptr %14, i64 112
  tail call void @_ZN3JPH8StreamIn4ReadERNS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 16 dereferenceable(16) %20)
  %21 = getelementptr inbounds i8, ptr %14, i64 32
  tail call void @_ZN3JPH8StreamIn4ReadIfTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %21)
  %22 = getelementptr inbounds i8, ptr %14, i64 24
  store ptr null, ptr %22, align 8, !tbaa !31
  %23 = getelementptr inbounds i8, ptr %14, i64 148
  tail call void @_ZN3JPH18AxisConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 4 dereferenceable(64) %23, ptr noundef nonnull align 8 dereferenceable(18) %1)
  %24 = getelementptr inbounds i8, ptr %14, i64 212
  tail call void @_ZN3JPH18AxisConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 4 dereferenceable(64) %24, ptr noundef nonnull align 8 dereferenceable(18) %1)
  %25 = getelementptr inbounds i8, ptr %14, i64 276
  tail call void @_ZN3JPH18AxisConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 4 dereferenceable(64) %25, ptr noundef nonnull align 8 dereferenceable(18) %1)
  %26 = getelementptr inbounds i8, ptr %14, i64 340
  tail call void @_ZN3JPH18AxisConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 4 dereferenceable(64) %26, ptr noundef nonnull align 8 dereferenceable(18) %1)
  %27 = getelementptr inbounds i8, ptr %.036, i64 8
  %.not = icmp eq ptr %27, %10
  br i1 %.not, label %._crit_edge, label %.lr.ph
}

declare void @_ZN3JPH10Constraint12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(18)) unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH18AxisConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 4 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(18)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH19AngleConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 16 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(18)) local_unnamed_addr #1 align 2

attributes #0 = { 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 #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { "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}


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