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

; 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::Ref" = type { ptr }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::HingeConstraintSettings" = type <{ %"class.JPH::TwoBodyConstraintSettings", i32, [4 x i8], %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", float, float, %"class.JPH::SpringSettings", float, %"class.JPH::MotorSettings", [12 x i8] }>
%"class.JPH::TwoBodyConstraintSettings" = type { %"class.JPH::ConstraintSettings" }
%"class.JPH::ConstraintSettings" = type { %"class.JPH::SerializableObject", %"class.JPH::RefTarget", i8, i32, i32, i32, float, i64 }
%"class.JPH::SerializableObject" = type { ptr }
%"class.JPH::RefTarget" = 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::HingeConstraint" = type { %"class.JPH::TwoBodyConstraint", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Quat", i8, float, float, %"class.JPH::SpringSettings", float, %"class.JPH::MotorSettings", i32, float, float, float, %"class.JPH::Vec3", %"class.JPH::PointConstraintPart", %"class.JPH::HingeRotationConstraintPart", %"class.JPH::AngleConstraintPart", %"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" }
%"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::HingeRotationConstraintPart" = type <{ %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Mat44", %"class.JPH::Mat44", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Matrix", %"class.JPH::Vector", [8 x i8] }>
%"class.JPH::Matrix" = type { [2 x %"class.JPH::Vector"] }
%"class.JPH::Vector" = type { [2 x float] }
%"class.JPH::AngleConstraintPart" = type { %"class.JPH::Vec3", %"class.JPH::Vec3", float, %"class.JPH::SpringPart", float }
%"class.JPH::SpringPart" = type { float, float }

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

declare i32 @__gxx_personality_v0(...)

; 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: mustprogress uwtable
define dso_local void @_ZNK3JPH15HingeConstraint21GetConstraintSettingsEv(ptr dead_on_unwind noalias writable sret(%"class.JPH::Ref") align 8 %0, ptr noundef nonnull align 16 dereferenceable(832) %1) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.JPH::Vec3", align 16
  %9 = alloca %"class.JPH::Vec3", align 16
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %10 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %11 = call noundef ptr @_ZN3JPH23HingeConstraintSettingsnwEm(i64 noundef 208)
  invoke void @_ZN3JPH23HingeConstraintSettingsC2Ev(ptr noundef nonnull align 16 dereferenceable(208) %11)
          to label %12 unwind label %53

12:                                               ; preds = %2
  store ptr %11, ptr %5, align 8, !tbaa !5
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZNK3JPH10Constraint20ToConstraintSettingsERNS_18ConstraintSettingsE(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(40) %13)
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = getelementptr inbounds %"class.JPH::HingeConstraintSettings", ptr %14, i32 0, i32 1
  store i32 0, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #7
  %16 = getelementptr inbounds %"class.JPH::HingeConstraint", ptr %10, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %8, ptr align 16 %16, i64 16, i1 false), !tbaa.struct !26
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = getelementptr inbounds %"class.JPH::HingeConstraintSettings", ptr %17, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %18, ptr align 16 %8, i64 16, i1 false), !tbaa.struct !26
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #7
  %19 = getelementptr inbounds %"class.JPH::HingeConstraint", ptr %10, i32 0, i32 3
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = getelementptr inbounds %"class.JPH::HingeConstraintSettings", ptr %20, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %21, ptr align 16 %19, i64 16, i1 false), !tbaa.struct !26
  %22 = getelementptr inbounds %"class.JPH::HingeConstraint", ptr %10, i32 0, i32 5
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = getelementptr inbounds %"class.JPH::HingeConstraintSettings", ptr %23, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %24, ptr align 16 %22, i64 16, i1 false), !tbaa.struct !26
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #7
  %25 = getelementptr inbounds %"class.JPH::HingeConstraint", ptr %10, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %9, ptr align 16 %25, i64 16, i1 false), !tbaa.struct !26
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %"class.JPH::HingeConstraintSettings", ptr %26, i32 0, i32 6
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %27, ptr align 16 %9, i64 16, i1 false), !tbaa.struct !26
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #7
  %28 = getelementptr inbounds %"class.JPH::HingeConstraint", ptr %10, i32 0, i32 4
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = getelementptr inbounds %"class.JPH::HingeConstraintSettings", ptr %29, i32 0, i32 7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %30, ptr align 16 %28, i64 16, i1 false), !tbaa.struct !26
  %31 = getelementptr inbounds %"class.JPH::HingeConstraint", ptr %10, i32 0, i32 6
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %"class.JPH::HingeConstraintSettings", ptr %32, i32 0, i32 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %33, ptr align 16 %31, i64 16, i1 false), !tbaa.struct !26
  %34 = getelementptr inbounds %"class.JPH::HingeConstraint", ptr %10, i32 0, i32 9
  %35 = load float, ptr %34, align 4, !tbaa !28
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = getelementptr inbounds %"class.JPH::HingeConstraintSettings", ptr %36, i32 0, i32 9
  store float %35, ptr %37, align 16, !tbaa !43
  %38 = getelementptr inbounds %"class.JPH::HingeConstraint", ptr %10, i32 0, i32 10
  %39 = load float, ptr %38, align 8, !tbaa !44
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = getelementptr inbounds %"class.JPH::HingeConstraintSettings", ptr %40, i32 0, i32 10
  store float %39, ptr %41, align 4, !tbaa !45
  %42 = getelementptr inbounds %"class.JPH::HingeConstraint", ptr %10, i32 0, i32 11
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds %"class.JPH::HingeConstraintSettings", ptr %43, i32 0, i32 11
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %44, ptr align 4 %42, i64 12, i1 false), !tbaa.struct !46
  %45 = getelementptr inbounds %"class.JPH::HingeConstraint", ptr %10, i32 0, i32 12
  %46 = load float, ptr %45, align 8, !tbaa !49
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = getelementptr inbounds %"class.JPH::HingeConstraintSettings", ptr %47, i32 0, i32 12
  store float %46, ptr %48, align 4, !tbaa !50
  %49 = getelementptr inbounds %"class.JPH::HingeConstraint", ptr %10, i32 0, i32 13
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %"class.JPH::HingeConstraintSettings", ptr %50, i32 0, i32 13
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %51, ptr align 4 %49, i64 28, i1 false), !tbaa.struct !51
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN3JPH3RefINS_18ConstraintSettingsEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %52)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  ret void

53:                                               ; preds = %2
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %6, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %7, align 4
  call void @_ZN3JPH23HingeConstraintSettingsdlEPv(ptr noundef %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %57

57:                                               ; preds = %53
  %58 = load ptr, ptr %6, align 8
  %59 = load i32, ptr %7, align 4
  %60 = insertvalue { ptr, i32 } poison, ptr %58, 0
  %61 = insertvalue { ptr, i32 } %60, i32 %59, 1
  resume { ptr, i32 } %61
}

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH23HingeConstraintSettingsnwEm(i64 noundef) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH23HingeConstraintSettingsC2Ev(ptr noundef nonnull align 16 dereferenceable(208)) unnamed_addr #4 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH23HingeConstraintSettingsdlEPv(ptr noundef) #5 align 2

declare void @_ZNK3JPH10Constraint20ToConstraintSettingsERNS_18ConstraintSettingsE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(40)) #6

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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, !21, i64 40}
!10 = !{!"_ZTSN3JPH23HingeConstraintSettingsE", !11, i64 0, !21, i64 40, !22, i64 48, !22, i64 64, !22, i64 80, !22, i64 96, !22, i64 112, !22, i64 128, !19, i64 144, !19, i64 148, !23, i64 152, !19, i64 164, !25, i64 168}
!11 = !{!"_ZTSN3JPH25TwoBodyConstraintSettingsE", !12, i64 0}
!12 = !{!"_ZTSN3JPH18ConstraintSettingsE", !13, i64 0, !14, i64 8, !18, i64 12, !17, i64 16, !17, i64 20, !17, i64 24, !19, i64 28, !20, i64 32}
!13 = !{!"_ZTSN3JPH18SerializableObjectE"}
!14 = !{!"_ZTSN3JPH9RefTargetINS_18ConstraintSettingsEEE", !15, i64 0}
!15 = !{!"_ZTSSt6atomicIjE", !16, i64 0}
!16 = !{!"_ZTSSt13__atomic_baseIjE", !17, i64 0}
!17 = !{!"int", !7, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{!"float", !7, i64 0}
!20 = !{!"long", !7, i64 0}
!21 = !{!"_ZTSN3JPH16EConstraintSpaceE", !7, i64 0}
!22 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!23 = !{!"_ZTSN3JPH14SpringSettingsE", !24, i64 0, !7, i64 4, !19, i64 8}
!24 = !{!"_ZTSN3JPH11ESpringModeE", !7, i64 0}
!25 = !{!"_ZTSN3JPH13MotorSettingsE", !23, i64 0, !19, i64 12, !19, i64 16, !19, i64 20, !19, i64 24}
!26 = !{i64 0, i64 16, !27}
!27 = !{!7, !7, i64 0}
!28 = !{!29, !19, i64 164}
!29 = !{!"_ZTSN3JPH15HingeConstraintE", !30, i64 0, !22, i64 48, !22, i64 64, !22, i64 80, !22, i64 96, !22, i64 112, !22, i64 128, !33, i64 144, !18, i64 160, !19, i64 164, !19, i64 168, !23, i64 172, !19, i64 184, !25, i64 188, !35, i64 216, !19, i64 220, !19, i64 224, !19, i64 228, !22, i64 240, !36, i64 256, !38, i64 496, !41, i64 736, !41, i64 784}
!30 = !{!"_ZTSN3JPH17TwoBodyConstraintE", !31, i64 0, !6, i64 32, !6, i64 40}
!31 = !{!"_ZTSN3JPH10ConstraintE", !32, i64 8, !17, i64 12, !17, i64 16, !7, i64 20, !7, i64 21, !18, i64 22, !20, i64 24}
!32 = !{!"_ZTSN3JPH9RefTargetINS_10ConstraintEEE", !15, i64 0}
!33 = !{!"_ZTSN3JPH4QuatE", !34, i64 0}
!34 = !{!"_ZTSN3JPH4Vec4E", !7, i64 0}
!35 = !{!"_ZTSN3JPH11EMotorStateE", !7, i64 0}
!36 = !{!"_ZTSN3JPH19PointConstraintPartE", !22, i64 0, !22, i64 16, !37, i64 32, !37, i64 96, !37, i64 160, !22, i64 224}
!37 = !{!"_ZTSN3JPH5Mat44E", !7, i64 0}
!38 = !{!"_ZTSN3JPH27HingeRotationConstraintPartE", !22, i64 0, !22, i64 16, !22, i64 32, !37, i64 48, !37, i64 112, !22, i64 176, !22, i64 192, !39, i64 208, !40, i64 224}
!39 = !{!"_ZTSN3JPH6MatrixILj2ELj2EEE", !7, i64 0}
!40 = !{!"_ZTSN3JPH6VectorILj2EEE", !7, i64 0}
!41 = !{!"_ZTSN3JPH19AngleConstraintPartE", !22, i64 0, !22, i64 16, !19, i64 32, !42, i64 36, !19, i64 44}
!42 = !{!"_ZTSN3JPH10SpringPartE", !19, i64 0, !19, i64 4}
!43 = !{!10, !19, i64 144}
!44 = !{!29, !19, i64 168}
!45 = !{!10, !19, i64 148}
!46 = !{i64 0, i64 1, !47, i64 4, i64 4, !27, i64 8, i64 4, !48}
!47 = !{!24, !24, i64 0}
!48 = !{!19, !19, i64 0}
!49 = !{!29, !19, i64 184}
!50 = !{!10, !19, i64 164}
!51 = !{i64 0, i64 1, !47, i64 4, i64 4, !27, i64 8, i64 4, !48, i64 12, i64 4, !48, i64 16, i64 4, !48, i64 20, i64 4, !48, i64 24, i64 4, !48}


; 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::Ref" = type { ptr }

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress 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) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH15HingeConstraint21GetConstraintSettingsEv(ptr dead_on_unwind noalias writable sret(%"class.JPH::Ref") align 8 %0, ptr noundef nonnull align 16 dereferenceable(832) %1) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = tail call noundef ptr @_ZN3JPH23HingeConstraintSettingsnwEm(i64 noundef 208)
  invoke void @_ZN3JPH23HingeConstraintSettingsC2Ev(ptr noundef nonnull align 16 dereferenceable(208) %3)
          to label %4 unwind label %28

4:                                                ; preds = %2
  tail call void @_ZNK3JPH10Constraint20ToConstraintSettingsERNS_18ConstraintSettingsE(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(40) %3)
  %5 = getelementptr inbounds i8, ptr %3, i64 40
  store i32 0, ptr %5, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %1, i64 48
  %.sroa.02.0.copyload = load <4 x float>, ptr %6, align 16, !tbaa !24
  %7 = getelementptr inbounds i8, ptr %3, i64 48
  store <4 x float> %.sroa.02.0.copyload, ptr %7, align 16, !tbaa !24
  %8 = getelementptr inbounds i8, ptr %1, i64 80
  %9 = getelementptr inbounds i8, ptr %3, i64 64
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %9, ptr noundef nonnull align 16 dereferenceable(16) %8, i64 16, i1 false), !tbaa.struct !25
  %10 = getelementptr inbounds i8, ptr %1, i64 112
  %11 = getelementptr inbounds i8, ptr %3, i64 80
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %11, ptr noundef nonnull align 16 dereferenceable(16) %10, i64 16, i1 false), !tbaa.struct !25
  %12 = getelementptr inbounds i8, ptr %1, i64 64
  %.sroa.0.0.copyload = load <4 x float>, ptr %12, align 16, !tbaa !24
  %13 = getelementptr inbounds i8, ptr %3, i64 96
  store <4 x float> %.sroa.0.0.copyload, ptr %13, align 16, !tbaa !24
  %14 = getelementptr inbounds i8, ptr %1, i64 96
  %15 = getelementptr inbounds i8, ptr %3, i64 112
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %15, ptr noundef nonnull align 16 dereferenceable(16) %14, i64 16, i1 false), !tbaa.struct !25
  %16 = getelementptr inbounds i8, ptr %1, i64 128
  %17 = getelementptr inbounds i8, ptr %3, i64 128
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %17, ptr noundef nonnull align 16 dereferenceable(16) %16, i64 16, i1 false), !tbaa.struct !25
  %18 = getelementptr inbounds i8, ptr %1, i64 164
  %19 = getelementptr inbounds i8, ptr %3, i64 144
  %20 = load <2 x float>, ptr %18, align 4, !tbaa !26
  store <2 x float> %20, ptr %19, align 16, !tbaa !26
  %21 = getelementptr inbounds i8, ptr %1, i64 172
  %22 = getelementptr inbounds i8, ptr %3, i64 152
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(12) %22, ptr noundef nonnull align 4 dereferenceable(12) %21, i64 12, i1 false), !tbaa.struct !27
  %23 = getelementptr inbounds i8, ptr %1, i64 184
  %24 = load float, ptr %23, align 8, !tbaa !29
  %25 = getelementptr inbounds i8, ptr %3, i64 164
  store float %24, ptr %25, align 4, !tbaa !45
  %26 = getelementptr inbounds i8, ptr %1, i64 188
  %27 = getelementptr inbounds i8, ptr %3, i64 168
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(28) %27, ptr noundef nonnull align 4 dereferenceable(28) %26, i64 28, i1 false), !tbaa.struct !46
  tail call void @_ZN3JPH3RefINS_18ConstraintSettingsEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %3)
  ret void

28:                                               ; preds = %2
  %29 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZN3JPH23HingeConstraintSettingsdlEPv(ptr noundef %3) #6
  resume { ptr, i32 } %29
}

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH23HingeConstraintSettingsnwEm(i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH23HingeConstraintSettingsC2Ev(ptr noundef nonnull align 16 dereferenceable(208)) unnamed_addr #3 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH23HingeConstraintSettingsdlEPv(ptr noundef) local_unnamed_addr #4 align 2

declare void @_ZNK3JPH10Constraint20ToConstraintSettingsERNS_18ConstraintSettingsE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH3RefINS_18ConstraintSettingsEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #3 align 2

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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" }
attributes #4 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "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, !19, i64 40}
!6 = !{!"_ZTSN3JPH23HingeConstraintSettingsE", !7, i64 0, !19, i64 40, !20, i64 48, !20, i64 64, !20, i64 80, !20, i64 96, !20, i64 112, !20, i64 128, !17, i64 144, !17, i64 148, !21, i64 152, !17, i64 164, !23, i64 168}
!7 = !{!"_ZTSN3JPH25TwoBodyConstraintSettingsE", !8, i64 0}
!8 = !{!"_ZTSN3JPH18ConstraintSettingsE", !9, i64 0, !10, i64 8, !16, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !17, i64 28, !18, i64 32}
!9 = !{!"_ZTSN3JPH18SerializableObjectE"}
!10 = !{!"_ZTSN3JPH9RefTargetINS_18ConstraintSettingsEEE", !11, i64 0}
!11 = !{!"_ZTSSt6atomicIjE", !12, i64 0}
!12 = !{!"_ZTSSt13__atomic_baseIjE", !13, i64 0}
!13 = !{!"int", !14, i64 0}
!14 = !{!"omnipotent char", !15, i64 0}
!15 = !{!"Simple C++ TBAA"}
!16 = !{!"bool", !14, i64 0}
!17 = !{!"float", !14, i64 0}
!18 = !{!"long", !14, i64 0}
!19 = !{!"_ZTSN3JPH16EConstraintSpaceE", !14, i64 0}
!20 = !{!"_ZTSN3JPH4Vec3E", !14, i64 0}
!21 = !{!"_ZTSN3JPH14SpringSettingsE", !22, i64 0, !14, i64 4, !17, i64 8}
!22 = !{!"_ZTSN3JPH11ESpringModeE", !14, i64 0}
!23 = !{!"_ZTSN3JPH13MotorSettingsE", !21, i64 0, !17, i64 12, !17, i64 16, !17, i64 20, !17, i64 24}
!24 = !{!14, !14, i64 0}
!25 = !{i64 0, i64 16, !24}
!26 = !{!17, !17, i64 0}
!27 = !{i64 0, i64 1, !28, i64 4, i64 4, !24, i64 8, i64 4, !26}
!28 = !{!22, !22, i64 0}
!29 = !{!30, !17, i64 184}
!30 = !{!"_ZTSN3JPH15HingeConstraintE", !31, i64 0, !20, i64 48, !20, i64 64, !20, i64 80, !20, i64 96, !20, i64 112, !20, i64 128, !35, i64 144, !16, i64 160, !17, i64 164, !17, i64 168, !21, i64 172, !17, i64 184, !23, i64 188, !37, i64 216, !17, i64 220, !17, i64 224, !17, i64 228, !20, i64 240, !38, i64 256, !40, i64 496, !43, i64 736, !43, i64 784}
!31 = !{!"_ZTSN3JPH17TwoBodyConstraintE", !32, i64 0, !34, i64 32, !34, i64 40}
!32 = !{!"_ZTSN3JPH10ConstraintE", !33, i64 8, !13, i64 12, !13, i64 16, !14, i64 20, !14, i64 21, !16, i64 22, !18, i64 24}
!33 = !{!"_ZTSN3JPH9RefTargetINS_10ConstraintEEE", !11, i64 0}
!34 = !{!"any pointer", !14, i64 0}
!35 = !{!"_ZTSN3JPH4QuatE", !36, i64 0}
!36 = !{!"_ZTSN3JPH4Vec4E", !14, i64 0}
!37 = !{!"_ZTSN3JPH11EMotorStateE", !14, i64 0}
!38 = !{!"_ZTSN3JPH19PointConstraintPartE", !20, i64 0, !20, i64 16, !39, i64 32, !39, i64 96, !39, i64 160, !20, i64 224}
!39 = !{!"_ZTSN3JPH5Mat44E", !14, i64 0}
!40 = !{!"_ZTSN3JPH27HingeRotationConstraintPartE", !20, i64 0, !20, i64 16, !20, i64 32, !39, i64 48, !39, i64 112, !20, i64 176, !20, i64 192, !41, i64 208, !42, i64 224}
!41 = !{!"_ZTSN3JPH6MatrixILj2ELj2EEE", !14, i64 0}
!42 = !{!"_ZTSN3JPH6VectorILj2EEE", !14, i64 0}
!43 = !{!"_ZTSN3JPH19AngleConstraintPartE", !20, i64 0, !20, i64 16, !17, i64 32, !44, i64 36, !17, i64 44}
!44 = !{!"_ZTSN3JPH10SpringPartE", !17, i64 0, !17, i64 4}
!45 = !{!6, !17, i64 164}
!46 = !{i64 0, i64 1, !28, i64 4, i64 4, !24, i64 8, i64 4, !26, i64 12, i64 4, !26, i64 16, i64 4, !26, i64 20, i64 4, !26, i64 24, i64 4, !26}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass