; LLVM IR from jrouwe/JoltPhysics :: Jolt/Physics/Constraints (SixDOFConstraint)

; 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::SixDOFConstraint" = type { %"class.JPH::TwoBodyConstraint", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Quat", %"class.JPH::Quat", i8, i8, i8, i8, i8, i8, [6 x float], [6 x float], [3 x %"class.JPH::SpringSettings"], [6 x %"class.JPH::MotorSettings"], [6 x float], [6 x i32], %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Quat", [3 x %"class.JPH::Vec3"], [3 x %"class.JPH::Vec3"], [3 x float], [3 x %"class.JPH::AxisConstraintPart"], %"class.JPH::PointConstraintPart", %"class.JPH::SwingTwistConstraintPart", %"class.JPH::RotationEulerConstraintPart", [3 x %"class.JPH::AxisConstraintPart"], [3 x %"class.JPH::AngleConstraintPart"] }
%"class.JPH::TwoBodyConstraint" = type { %"class.JPH::Constraint", ptr, ptr }
%"class.JPH::Constraint" = type { ptr, %"class.JPH::RefTarget.3", i32, i32, i8, i8, i8, i64 }
%"class.JPH::RefTarget.3" = type { %"struct.std::atomic" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"class.JPH::SpringSettings" = type { i8, %union.anon.2, float }
%union.anon.2 = type { float }
%"class.JPH::MotorSettings" = type { %"class.JPH::SpringSettings", float, float, float, float }
%"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.4 }
%union.anon.4 = type { <4 x float> }
%"class.JPH::PointConstraintPart" = type { %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Mat44", %"class.JPH::Mat44", %"class.JPH::Mat44", %"class.JPH::Vec3" }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::SwingTwistConstraintPart" = type { i8, i8, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::AngleConstraintPart", %"class.JPH::AngleConstraintPart", %"class.JPH::AngleConstraintPart" }
%"class.JPH::AngleConstraintPart" = type { %"class.JPH::Vec3", %"class.JPH::Vec3", float, %"class.JPH::SpringPart", float }
%"class.JPH::SpringPart" = type { float, float }
%"class.JPH::RotationEulerConstraintPart" = type { %"class.JPH::Mat44", %"class.JPH::Mat44", %"class.JPH::Mat44", %"class.JPH::Vec3" }
%"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 @_ZN3JPH16SixDOFConstraint27CacheTranslationMotorActiveEv(ptr noundef nonnull align 16 dereferenceable(1856)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH16SixDOFConstraint24CacheRotationMotorActiveEv(ptr noundef nonnull align 16 dereferenceable(1856)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH16SixDOFConstraint32CacheRotationPositionMotorActiveEv(ptr noundef nonnull align 16 dereferenceable(1856)) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH16SixDOFConstraint12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 16 dereferenceable(1856) %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
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %17 = load ptr, ptr %3, align 8
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN3JPH10Constraint12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(18) %18)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %19 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %17, i32 0, i32 24
  store ptr %19, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = getelementptr inbounds [3 x %"class.JPH::AxisConstraintPart"], ptr %20, i64 0, i64 0
  store ptr %21, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = getelementptr inbounds [3 x %"class.JPH::AxisConstraintPart"], ptr %22, i64 0, i64 0
  %24 = getelementptr inbounds %"class.JPH::AxisConstraintPart", ptr %23, i64 3
  store ptr %24, ptr %7, align 8, !tbaa !5
  br label %25

25:                                               ; preds = %34, %2
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = icmp ne ptr %26, %27
  br i1 %28, label %30, label %29

29:                                               ; preds = %25
  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 %37

30:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %31, ptr %8, align 8, !tbaa !5
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN3JPH18AxisConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 4 dereferenceable(64) %32, ptr noundef nonnull align 8 dereferenceable(18) %33)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %34

34:                                               ; preds = %30
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = getelementptr inbounds %"class.JPH::AxisConstraintPart", ptr %35, i32 1
  store ptr %36, ptr %6, align 8, !tbaa !5
  br label %25

37:                                               ; preds = %29
  %38 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %17, i32 0, i32 25
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN3JPH19PointConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 16 dereferenceable(240) %38, ptr noundef nonnull align 8 dereferenceable(18) %39)
  %40 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %17, i32 0, i32 26
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN3JPH24SwingTwistConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 16 dereferenceable(272) %40, ptr noundef nonnull align 8 dereferenceable(18) %41)
  %42 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %17, i32 0, i32 27
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN3JPH27RotationEulerConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 16 dereferenceable(208) %42, ptr noundef nonnull align 8 dereferenceable(18) %43)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %44 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %17, i32 0, i32 28
  store ptr %44, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %45 = load ptr, ptr %9, align 8, !tbaa !5
  %46 = getelementptr inbounds [3 x %"class.JPH::AxisConstraintPart"], ptr %45, i64 0, i64 0
  store ptr %46, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = getelementptr inbounds [3 x %"class.JPH::AxisConstraintPart"], ptr %47, i64 0, i64 0
  %49 = getelementptr inbounds %"class.JPH::AxisConstraintPart", ptr %48, i64 3
  store ptr %49, ptr %11, align 8, !tbaa !5
  br label %50

50:                                               ; preds = %59, %37
  %51 = load ptr, ptr %10, align 8, !tbaa !5
  %52 = load ptr, ptr %11, align 8, !tbaa !5
  %53 = icmp ne ptr %51, %52
  br i1 %53, label %55, label %54

54:                                               ; preds = %50
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %62

55:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %56, ptr %12, align 8, !tbaa !5
  %57 = load ptr, ptr %12, align 8, !tbaa !5
  %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)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %59

59:                                               ; preds = %55
  %60 = load ptr, ptr %10, align 8, !tbaa !5
  %61 = getelementptr inbounds %"class.JPH::AxisConstraintPart", ptr %60, i32 1
  store ptr %61, ptr %10, align 8, !tbaa !5
  br label %50

62:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %63 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %17, i32 0, i32 29
  store ptr %63, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %64 = load ptr, ptr %13, align 8, !tbaa !5
  %65 = getelementptr inbounds [3 x %"class.JPH::AngleConstraintPart"], ptr %64, i64 0, i64 0
  store ptr %65, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %66 = load ptr, ptr %13, align 8, !tbaa !5
  %67 = getelementptr inbounds [3 x %"class.JPH::AngleConstraintPart"], ptr %66, i64 0, i64 0
  %68 = getelementptr inbounds %"class.JPH::AngleConstraintPart", ptr %67, i64 3
  store ptr %68, ptr %15, align 8, !tbaa !5
  br label %69

69:                                               ; preds = %78, %62
  %70 = load ptr, ptr %14, align 8, !tbaa !5
  %71 = load ptr, ptr %15, align 8, !tbaa !5
  %72 = icmp ne ptr %70, %71
  br i1 %72, label %74, label %73

73:                                               ; preds = %69
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %81

74:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %75 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %75, ptr %16, align 8, !tbaa !5
  %76 = load ptr, ptr %16, align 8, !tbaa !5
  %77 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN3JPH19AngleConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 16 dereferenceable(48) %76, ptr noundef nonnull align 8 dereferenceable(18) %77)
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %78

78:                                               ; preds = %74
  %79 = load ptr, ptr %14, align 8, !tbaa !5
  %80 = getelementptr inbounds %"class.JPH::AngleConstraintPart", ptr %79, i32 1
  store ptr %80, ptr %14, align 8, !tbaa !5
  br label %69

81:                                               ; preds = %73
  %82 = load ptr, ptr %4, align 8, !tbaa !5
  %83 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %17, i32 0, i32 16
  call void @_ZN3JPH8StreamIn4ReadIA6_NS_11EMotorStateETnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS5_(ptr noundef nonnull align 8 dereferenceable(8) %82, ptr noundef nonnull align 4 dereferenceable(24) %83)
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %17, i32 0, i32 17
  call void @_ZN3JPH8StreamIn4ReadERNS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(8) %84, ptr noundef nonnull align 16 dereferenceable(16) %85)
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %17, i32 0, i32 18
  call void @_ZN3JPH8StreamIn4ReadERNS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(8) %86, ptr noundef nonnull align 16 dereferenceable(16) %87)
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %17, i32 0, i32 19
  call void @_ZN3JPH8StreamIn4ReadERNS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(8) %88, ptr noundef nonnull align 16 dereferenceable(16) %89)
  %90 = load ptr, ptr %4, align 8, !tbaa !5
  %91 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %17, i32 0, i32 20
  call void @_ZN3JPH8StreamIn4ReadINS_4QuatETnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS4_(ptr noundef nonnull align 8 dereferenceable(8) %90, ptr noundef nonnull align 16 dereferenceable(16) %91)
  call void @_ZN3JPH16SixDOFConstraint27CacheTranslationMotorActiveEv(ptr noundef nonnull align 16 dereferenceable(1856) %17)
  call void @_ZN3JPH16SixDOFConstraint24CacheRotationMotorActiveEv(ptr noundef nonnull align 16 dereferenceable(1856) %17)
  call void @_ZN3JPH16SixDOFConstraint32CacheRotationPositionMotorActiveEv(ptr noundef nonnull align 16 dereferenceable(1856) %17)
  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 @_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 @_ZN3JPH19PointConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 16 dereferenceable(240), ptr noundef nonnull align 8 dereferenceable(18)) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH27RotationEulerConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 16 dereferenceable(208), 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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH8StreamIn4ReadINS_4QuatETnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS4_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 16 dereferenceable(16)) #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 = { 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"}


; 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 @_ZN3JPH16SixDOFConstraint27CacheTranslationMotorActiveEv(ptr noundef nonnull align 16 dereferenceable(1856)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH16SixDOFConstraint24CacheRotationMotorActiveEv(ptr noundef nonnull align 16 dereferenceable(1856)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH16SixDOFConstraint32CacheRotationPositionMotorActiveEv(ptr noundef nonnull align 16 dereferenceable(1856)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH16SixDOFConstraint12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 16 dereferenceable(1856) %0, ptr noundef nonnull align 8 dereferenceable(18) %1) unnamed_addr #1 align 2 {
.preheader.preheader:
  tail call void @_ZN3JPH10Constraint12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(18) %1)
  %.0.ptr = getelementptr inbounds i8, ptr %0, i64 604
  tail call void @_ZN3JPH18AxisConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 4 dereferenceable(64) %.0.ptr, ptr noundef nonnull align 8 dereferenceable(18) %1)
  %.0.ptr.1 = getelementptr inbounds i8, ptr %0, i64 668
  tail call void @_ZN3JPH18AxisConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 4 dereferenceable(64) %.0.ptr.1, ptr noundef nonnull align 8 dereferenceable(18) %1)
  %.0.ptr.2 = getelementptr inbounds i8, ptr %0, i64 732
  tail call void @_ZN3JPH18AxisConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 4 dereferenceable(64) %.0.ptr.2, ptr noundef nonnull align 8 dereferenceable(18) %1)
  %2 = getelementptr inbounds i8, ptr %0, i64 800
  tail call void @_ZN3JPH19PointConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 16 dereferenceable(240) %2, ptr noundef nonnull align 8 dereferenceable(18) %1)
  %3 = getelementptr inbounds i8, ptr %0, i64 1040
  tail call void @_ZN3JPH24SwingTwistConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 16 dereferenceable(272) %3, ptr noundef nonnull align 8 dereferenceable(18) %1)
  %4 = getelementptr inbounds i8, ptr %0, i64 1312
  tail call void @_ZN3JPH27RotationEulerConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 16 dereferenceable(208) %4, ptr noundef nonnull align 8 dereferenceable(18) %1)
  %.034.ptr = getelementptr inbounds i8, ptr %0, i64 1520
  tail call void @_ZN3JPH18AxisConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 4 dereferenceable(64) %.034.ptr, ptr noundef nonnull align 8 dereferenceable(18) %1)
  %.034.ptr.1 = getelementptr inbounds i8, ptr %0, i64 1584
  tail call void @_ZN3JPH18AxisConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 4 dereferenceable(64) %.034.ptr.1, ptr noundef nonnull align 8 dereferenceable(18) %1)
  %.034.ptr.2 = getelementptr inbounds i8, ptr %0, i64 1648
  tail call void @_ZN3JPH18AxisConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 4 dereferenceable(64) %.034.ptr.2, ptr noundef nonnull align 8 dereferenceable(18) %1)
  %.035.ptr = getelementptr inbounds i8, ptr %0, i64 1712
  tail call void @_ZN3JPH19AngleConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 16 dereferenceable(48) %.035.ptr, ptr noundef nonnull align 8 dereferenceable(18) %1)
  %.035.ptr.1 = getelementptr inbounds i8, ptr %0, i64 1760
  tail call void @_ZN3JPH19AngleConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 16 dereferenceable(48) %.035.ptr.1, ptr noundef nonnull align 8 dereferenceable(18) %1)
  %.035.ptr.2 = getelementptr inbounds i8, ptr %0, i64 1808
  tail call void @_ZN3JPH19AngleConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 16 dereferenceable(48) %.035.ptr.2, ptr noundef nonnull align 8 dereferenceable(18) %1)
  %5 = getelementptr inbounds i8, ptr %0, i64 396
  tail call void @_ZN3JPH8StreamIn4ReadIA6_NS_11EMotorStateETnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS5_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(24) %5)
  %6 = getelementptr inbounds i8, ptr %0, i64 432
  tail call void @_ZN3JPH8StreamIn4ReadERNS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 16 dereferenceable(16) %6)
  %7 = getelementptr inbounds i8, ptr %0, i64 448
  tail call void @_ZN3JPH8StreamIn4ReadERNS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 16 dereferenceable(16) %7)
  %8 = getelementptr inbounds i8, ptr %0, i64 464
  tail call void @_ZN3JPH8StreamIn4ReadERNS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 16 dereferenceable(16) %8)
  %9 = getelementptr inbounds i8, ptr %0, i64 480
  tail call void @_ZN3JPH8StreamIn4ReadINS_4QuatETnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS4_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 16 dereferenceable(16) %9)
  tail call void @_ZN3JPH16SixDOFConstraint27CacheTranslationMotorActiveEv(ptr noundef nonnull align 16 dereferenceable(1856) %0)
  tail call void @_ZN3JPH16SixDOFConstraint24CacheRotationMotorActiveEv(ptr noundef nonnull align 16 dereferenceable(1856) %0)
  tail call void @_ZN3JPH16SixDOFConstraint32CacheRotationPositionMotorActiveEv(ptr noundef nonnull align 16 dereferenceable(1856) %0)
  ret void
}

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 @_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 @_ZN3JPH19PointConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 16 dereferenceable(240), ptr noundef nonnull align 8 dereferenceable(18)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH27RotationEulerConstraintPart12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 16 dereferenceable(208), 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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH8StreamIn4ReadINS_4QuatETnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS4_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 16 dereferenceable(16)) 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 = { 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)"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,LoopSimplifyPass,SROAPass,SimplifyCFGPass,TailCallElimPass