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

; 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::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.4 }
%union.anon.4 = type { <4 x float> }
%"class.JPH::Ref" = type { ptr }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::SliderConstraintSettings" = type <{ %"class.JPH::TwoBodyConstraintSettings", i32, i8, [3 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::SliderConstraint" = type { %"class.JPH::TwoBodyConstraint", %"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, %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", float, [12 x i8], %"class.JPH::DualAxisConstraintPart", %"class.JPH::RotationEulerConstraintPart", %"class.JPH::AxisConstraintPart", %"class.JPH::AxisConstraintPart" }
%"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::DualAxisConstraintPart" = type <{ %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"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::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 }
%"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: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH5Mat4411Multiply3x3ENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64), double, double) #2 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, double, double) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH16SliderConstraint21GetConstraintSettingsEv(ptr dead_on_unwind noalias writable sret(%"class.JPH::Ref") align 8 %0, ptr noundef nonnull align 16 dereferenceable(832) %1) unnamed_addr #4 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
  %10 = alloca %"class.JPH::Mat44", align 16
  %11 = alloca %"class.JPH::Quat", align 16
  %12 = alloca %"class.JPH::Vec3", align 16
  %13 = alloca %"class.JPH::Vec3", align 16
  %14 = alloca %"class.JPH::Vec3", align 16
  %15 = alloca %"class.JPH::Vec3", align 16
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %16 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  %17 = call noundef ptr @_ZN3JPH24SliderConstraintSettingsnwEm(i64 noundef 208)
  invoke void @_ZN3JPH24SliderConstraintSettingsC2Ev(ptr noundef nonnull align 16 dereferenceable(208) %17)
          to label %18 unwind label %86

18:                                               ; preds = %2
  store ptr %17, ptr %5, align 8, !tbaa !5
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZNK3JPH10Constraint20ToConstraintSettingsERNS_18ConstraintSettingsE(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(40) %19)
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = getelementptr inbounds %"class.JPH::SliderConstraintSettings", ptr %20, i32 0, i32 1
  store i32 0, ptr %21, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #8
  %22 = getelementptr inbounds %"class.JPH::SliderConstraint", ptr %16, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %8, ptr align 16 %22, i64 16, i1 false), !tbaa.struct !26
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = getelementptr inbounds %"class.JPH::SliderConstraintSettings", ptr %23, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %24, ptr align 16 %8, i64 16, i1 false), !tbaa.struct !26
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #8
  %25 = getelementptr inbounds %"class.JPH::SliderConstraint", ptr %16, i32 0, i32 3
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %"class.JPH::SliderConstraintSettings", ptr %26, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %27, ptr align 16 %25, i64 16, i1 false), !tbaa.struct !26
  %28 = getelementptr inbounds %"class.JPH::SliderConstraint", ptr %16, i32 0, i32 4
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = getelementptr inbounds %"class.JPH::SliderConstraintSettings", ptr %29, i32 0, i32 6
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %30, ptr align 16 %28, i64 16, i1 false), !tbaa.struct !26
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #8
  %31 = getelementptr inbounds %"class.JPH::SliderConstraint", ptr %16, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %9, ptr align 16 %31, i64 16, i1 false), !tbaa.struct !26
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %"class.JPH::SliderConstraintSettings", ptr %32, i32 0, i32 7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %33, ptr align 16 %9, i64 16, i1 false), !tbaa.struct !26
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #8
  call void @llvm.lifetime.start.p0(i64 64, ptr %10) #8
  %34 = getelementptr inbounds %"class.JPH::SliderConstraint", ptr %16, i32 0, i32 6
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %11, ptr align 16 %34, i64 16, i1 false), !tbaa.struct !26
  %35 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 0
  %36 = load double, ptr %35, align 16
  %37 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 1
  %38 = load double, ptr %37, align 8
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %10, double %36, double %38)
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #8
  %39 = getelementptr inbounds %"class.JPH::SliderConstraint", ptr %16, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %13, ptr align 16 %39, i64 16, i1 false), !tbaa.struct !26
  %40 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 0
  %41 = load double, ptr %40, align 16
  %42 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 1
  %43 = load double, ptr %42, align 8
  %44 = call { double, double } @_ZNK3JPH5Mat4411Multiply3x3ENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %10, double %41, double %43)
  %45 = getelementptr inbounds %"class.JPH::Vec3", ptr %12, i32 0, i32 0
  %46 = getelementptr inbounds %union.anon, ptr %45, i32 0, i32 0
  %47 = getelementptr inbounds { double, double }, ptr %46, i32 0, i32 0
  %48 = extractvalue { double, double } %44, 0
  store double %48, ptr %47, align 16
  %49 = getelementptr inbounds { double, double }, ptr %46, i32 0, i32 1
  %50 = extractvalue { double, double } %44, 1
  store double %50, ptr %49, align 8
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = getelementptr inbounds %"class.JPH::SliderConstraintSettings", ptr %51, i32 0, i32 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %52, ptr align 16 %12, i64 16, i1 false), !tbaa.struct !26
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #8
  %53 = getelementptr inbounds %"class.JPH::SliderConstraint", ptr %16, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %15, ptr align 16 %53, i64 16, i1 false), !tbaa.struct !26
  %54 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 0
  %55 = load double, ptr %54, align 16
  %56 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 1
  %57 = load double, ptr %56, align 8
  %58 = call { double, double } @_ZNK3JPH5Mat4411Multiply3x3ENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %10, double %55, double %57)
  %59 = getelementptr inbounds %"class.JPH::Vec3", ptr %14, i32 0, i32 0
  %60 = getelementptr inbounds %union.anon, ptr %59, i32 0, i32 0
  %61 = getelementptr inbounds { double, double }, ptr %60, i32 0, i32 0
  %62 = extractvalue { double, double } %58, 0
  store double %62, ptr %61, align 16
  %63 = getelementptr inbounds { double, double }, ptr %60, i32 0, i32 1
  %64 = extractvalue { double, double } %58, 1
  store double %64, ptr %63, align 8
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = getelementptr inbounds %"class.JPH::SliderConstraintSettings", ptr %65, i32 0, i32 9
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %66, ptr align 16 %14, i64 16, i1 false), !tbaa.struct !26
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #8
  %67 = getelementptr inbounds %"class.JPH::SliderConstraint", ptr %16, i32 0, i32 8
  %68 = load float, ptr %67, align 4, !tbaa !28
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = getelementptr inbounds %"class.JPH::SliderConstraintSettings", ptr %69, i32 0, i32 10
  store float %68, ptr %70, align 16, !tbaa !44
  %71 = getelementptr inbounds %"class.JPH::SliderConstraint", ptr %16, i32 0, i32 9
  %72 = load float, ptr %71, align 8, !tbaa !45
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  %74 = getelementptr inbounds %"class.JPH::SliderConstraintSettings", ptr %73, i32 0, i32 11
  store float %72, ptr %74, align 4, !tbaa !46
  %75 = getelementptr inbounds %"class.JPH::SliderConstraint", ptr %16, i32 0, i32 10
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = getelementptr inbounds %"class.JPH::SliderConstraintSettings", ptr %76, i32 0, i32 12
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %77, ptr align 4 %75, i64 12, i1 false), !tbaa.struct !47
  %78 = getelementptr inbounds %"class.JPH::SliderConstraint", ptr %16, i32 0, i32 11
  %79 = load float, ptr %78, align 8, !tbaa !50
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  %81 = getelementptr inbounds %"class.JPH::SliderConstraintSettings", ptr %80, i32 0, i32 13
  store float %79, ptr %81, align 4, !tbaa !51
  %82 = getelementptr inbounds %"class.JPH::SliderConstraint", ptr %16, i32 0, i32 12
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  %84 = getelementptr inbounds %"class.JPH::SliderConstraintSettings", ptr %83, i32 0, i32 14
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %84, ptr align 4 %82, i64 28, i1 false), !tbaa.struct !52
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN3JPH3RefINS_18ConstraintSettingsEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %85)
  call void @llvm.lifetime.end.p0(i64 64, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  ret void

86:                                               ; preds = %2
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %6, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %7, align 4
  call void @_ZN3JPH24SliderConstraintSettingsdlEPv(ptr noundef %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  br label %90

90:                                               ; preds = %86
  %91 = load ptr, ptr %6, align 8
  %92 = load i32, ptr %7, align 4
  %93 = insertvalue { ptr, i32 } poison, ptr %91, 0
  %94 = insertvalue { ptr, i32 } %93, i32 %92, 1
  resume { ptr, i32 } %94
}

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { 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 = { 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 #7 = { "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 #8 = { 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 = !{!"_ZTSN3JPH24SliderConstraintSettingsE", !11, i64 0, !21, i64 40, !18, i64 44, !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 148}
!29 = !{!"_ZTSN3JPH16SliderConstraintE", !30, i64 0, !22, i64 48, !22, i64 64, !22, i64 80, !22, i64 96, !22, i64 112, !33, i64 128, !18, i64 144, !19, i64 148, !19, i64 152, !23, i64 156, !19, i64 168, !25, i64 172, !35, i64 200, !19, i64 204, !19, i64 208, !22, i64 224, !22, i64 240, !22, i64 256, !22, i64 272, !22, i64 288, !22, i64 304, !19, i64 320, !36, i64 336, !39, i64 496, !41, i64 704, !41, i64 768}
!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 = !{!"_ZTSN3JPH22DualAxisConstraintPartE", !22, i64 0, !22, i64 16, !22, i64 32, !22, i64 48, !22, i64 64, !22, i64 80, !22, i64 96, !22, i64 112, !37, i64 128, !38, i64 144}
!37 = !{!"_ZTSN3JPH6MatrixILj2ELj2EEE", !7, i64 0}
!38 = !{!"_ZTSN3JPH6VectorILj2EEE", !7, i64 0}
!39 = !{!"_ZTSN3JPH27RotationEulerConstraintPartE", !40, i64 0, !40, i64 64, !40, i64 128, !22, i64 192}
!40 = !{!"_ZTSN3JPH5Mat44E", !7, i64 0}
!41 = !{!"_ZTSN3JPH18AxisConstraintPartE", !42, i64 0, !42, i64 12, !42, i64 24, !42, i64 36, !19, i64 48, !43, i64 52, !19, i64 60}
!42 = !{!"_ZTSN3JPH6Float3E", !19, i64 0, !19, i64 4, !19, i64 8}
!43 = !{!"_ZTSN3JPH10SpringPartE", !19, i64 0, !19, i64 4}
!44 = !{!10, !19, i64 144}
!45 = !{!29, !19, i64 152}
!46 = !{!10, !19, i64 148}
!47 = !{i64 0, i64 1, !48, i64 4, i64 4, !27, i64 8, i64 4, !49}
!48 = !{!24, !24, i64 0}
!49 = !{!19, !19, i64 0}
!50 = !{!29, !19, i64 168}
!51 = !{!10, !19, i64 164}
!52 = !{i64 0, i64 1, !48, i64 4, i64 4, !27, i64 8, i64 4, !49, i64 12, i64 4, !49, i64 16, i64 4, !49, i64 20, i64 4, !49, i64 24, i64 4, !49}


; 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::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.4 }
%union.anon.4 = type { <4 x float> }
%"class.JPH::Ref" = type { ptr }

; Function Attrs: mustprogress 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; 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) #1

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, double, double) local_unnamed_addr #3 align 2

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

5:                                                ; preds = %2
  tail call void @_ZNK3JPH10Constraint20ToConstraintSettingsERNS_18ConstraintSettingsE(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(40) %4)
  %6 = getelementptr inbounds i8, ptr %4, i64 40
  store i32 0, ptr %6, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %1, i64 48
  %.sroa.010.0.copyload = load <4 x float>, ptr %7, align 16, !tbaa !24
  %8 = getelementptr inbounds i8, ptr %4, i64 48
  store <4 x float> %.sroa.010.0.copyload, ptr %8, align 16, !tbaa !24
  %9 = getelementptr inbounds i8, ptr %1, i64 80
  %10 = getelementptr inbounds i8, ptr %4, i64 64
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %10, ptr noundef nonnull align 16 dereferenceable(16) %9, i64 16, i1 false), !tbaa.struct !25
  %11 = getelementptr inbounds i8, ptr %1, i64 96
  %12 = getelementptr inbounds i8, ptr %4, i64 80
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %12, ptr noundef nonnull align 16 dereferenceable(16) %11, i64 16, i1 false), !tbaa.struct !25
  %13 = getelementptr inbounds i8, ptr %1, i64 64
  %.sroa.08.0.copyload = load <4 x float>, ptr %13, align 16, !tbaa !24
  %14 = getelementptr inbounds i8, ptr %4, i64 96
  store <4 x float> %.sroa.08.0.copyload, ptr %14, align 16, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %3) #8
  %15 = getelementptr inbounds i8, ptr %1, i64 128
  %.sroa.06.0.copyload = load double, ptr %15, align 16
  %.sroa.27.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 136
  %.sroa.27.0.copyload = load double, ptr %.sroa.27.0..sroa_idx, align 8, !tbaa !24
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %3, double %.sroa.06.0.copyload, double %.sroa.27.0.copyload)
  %.sroa.02.0.copyload = load double, ptr %9, align 16
  %.sroa.23.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 88
  %.sroa.23.0.copyload = load double, ptr %.sroa.23.0..sroa_idx, align 8, !tbaa !24
  %16 = call { double, double } @_ZNK3JPH5Mat4411Multiply3x3ENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %3, double %.sroa.02.0.copyload, double %.sroa.23.0.copyload)
  %17 = extractvalue { double, double } %16, 0
  %18 = extractvalue { double, double } %16, 1
  %19 = getelementptr inbounds i8, ptr %4, i64 112
  store double %17, ptr %19, align 16
  %.sroa.45.0..sroa_idx = getelementptr inbounds i8, ptr %4, i64 120
  store double %18, ptr %.sroa.45.0..sroa_idx, align 8, !tbaa !24
  %.sroa.0.0.copyload = load double, ptr %11, align 16
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 104
  %.sroa.2.0.copyload = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !24
  %20 = call { double, double } @_ZNK3JPH5Mat4411Multiply3x3ENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %3, double %.sroa.0.0.copyload, double %.sroa.2.0.copyload)
  %21 = extractvalue { double, double } %20, 0
  %22 = extractvalue { double, double } %20, 1
  %23 = getelementptr inbounds i8, ptr %4, i64 128
  store double %21, ptr %23, align 16
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %4, i64 136
  store double %22, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !24
  %24 = getelementptr inbounds i8, ptr %1, i64 148
  %25 = getelementptr inbounds i8, ptr %4, i64 144
  %26 = load <2 x float>, ptr %24, align 4, !tbaa !26
  store <2 x float> %26, ptr %25, align 16, !tbaa !26
  %27 = getelementptr inbounds i8, ptr %1, i64 156
  %28 = getelementptr inbounds i8, ptr %4, i64 152
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(12) %28, ptr noundef nonnull align 4 dereferenceable(12) %27, i64 12, i1 false), !tbaa.struct !27
  %29 = getelementptr inbounds i8, ptr %1, i64 168
  %30 = load float, ptr %29, align 8, !tbaa !29
  %31 = getelementptr inbounds i8, ptr %4, i64 164
  store float %30, ptr %31, align 4, !tbaa !46
  %32 = getelementptr inbounds i8, ptr %1, i64 172
  %33 = getelementptr inbounds i8, ptr %4, i64 168
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(28) %33, ptr noundef nonnull align 4 dereferenceable(28) %32, i64 28, i1 false), !tbaa.struct !47
  call void @_ZN3JPH3RefINS_18ConstraintSettingsEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %4)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #8
  ret void

34:                                               ; preds = %2
  %35 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZN3JPH24SliderConstraintSettingsdlEPv(ptr noundef %4) #8
  resume { ptr, i32 } %35
}

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

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { 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 = { 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 #7 = { "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 #8 = { 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 = !{!"_ZTSN3JPH24SliderConstraintSettingsE", !7, i64 0, !19, i64 40, !16, i64 44, !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 168}
!30 = !{!"_ZTSN3JPH16SliderConstraintE", !31, i64 0, !20, i64 48, !20, i64 64, !20, i64 80, !20, i64 96, !20, i64 112, !35, i64 128, !16, i64 144, !17, i64 148, !17, i64 152, !21, i64 156, !17, i64 168, !23, i64 172, !37, i64 200, !17, i64 204, !17, i64 208, !20, i64 224, !20, i64 240, !20, i64 256, !20, i64 272, !20, i64 288, !20, i64 304, !17, i64 320, !38, i64 336, !41, i64 496, !43, i64 704, !43, i64 768}
!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 = !{!"_ZTSN3JPH22DualAxisConstraintPartE", !20, i64 0, !20, i64 16, !20, i64 32, !20, i64 48, !20, i64 64, !20, i64 80, !20, i64 96, !20, i64 112, !39, i64 128, !40, i64 144}
!39 = !{!"_ZTSN3JPH6MatrixILj2ELj2EEE", !14, i64 0}
!40 = !{!"_ZTSN3JPH6VectorILj2EEE", !14, i64 0}
!41 = !{!"_ZTSN3JPH27RotationEulerConstraintPartE", !42, i64 0, !42, i64 64, !42, i64 128, !20, i64 192}
!42 = !{!"_ZTSN3JPH5Mat44E", !14, i64 0}
!43 = !{!"_ZTSN3JPH18AxisConstraintPartE", !44, i64 0, !44, i64 12, !44, i64 24, !44, i64 36, !17, i64 48, !45, i64 52, !17, i64 60}
!44 = !{!"_ZTSN3JPH6Float3E", !17, i64 0, !17, i64 4, !17, i64 8}
!45 = !{!"_ZTSN3JPH10SpringPartE", !17, i64 0, !17, i64 4}
!46 = !{!6, !17, i64 164}
!47 = !{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