; 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::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"struct.JPH::AssertLastParam" = type { i8 }
%"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::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::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::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 }

@.str.2 = external hidden unnamed_addr constant [98 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [17 x i8], align 1

; 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: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef) #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH16SliderConstraint14CalculateR1R2UERKNS_5Mat44ES3_(ptr noundef nonnull align 16 dereferenceable(832), ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 16 dereferenceable(64)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH16SliderConstraint37CalculatePositionConstraintPropertiesERKNS_5Mat44ES3_(ptr noundef nonnull align 16 dereferenceable(832), ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 16 dereferenceable(64)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH16SliderConstraint31CalculateSlidingAxisAndPositionERKNS_5Mat44E(ptr noundef nonnull align 16 dereferenceable(832), ptr noundef nonnull align 16 dereferenceable(64)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH16SliderConstraint43CalculatePositionLimitsConstraintPropertiesEf(ptr noundef nonnull align 16 dereferenceable(832), float noundef) #3 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) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH27RotationEulerConstraintPart29CalculateConstraintPropertiesERKNS_4BodyERKNS_5Mat44ES3_S6_(ptr noundef nonnull align 16 dereferenceable(208), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(64)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH18AxisConstraintPart8IsActiveEv(ptr noundef nonnull align 4 dereferenceable(64)) #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3JPH16SliderConstraint23SolvePositionConstraintEff(ptr noundef nonnull align 16 dereferenceable(832) %0, float noundef %1, float noundef %2) unnamed_addr #3 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca float, align 4
  %6 = alloca float, align 4
  %7 = alloca %"class.JPH::Mat44", align 16
  %8 = alloca %"class.JPH::Quat", align 16
  %9 = alloca %"class.JPH::Mat44", align 16
  %10 = alloca %"class.JPH::Quat", align 16
  %11 = alloca i8, align 1
  %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::Mat44", align 16
  %16 = alloca %"class.JPH::Quat", align 16
  %17 = alloca %"class.JPH::Mat44", align 16
  %18 = alloca %"class.JPH::Quat", align 16
  %19 = alloca i8, align 1
  %20 = alloca %"class.JPH::Quat", align 16
  %21 = alloca i8, align 1
  %22 = alloca %"class.JPH::Mat44", align 16
  %23 = alloca %"class.JPH::Quat", align 16
  %24 = alloca %"class.JPH::Mat44", align 16
  %25 = alloca %"class.JPH::Quat", align 16
  %26 = alloca %"class.JPH::Vec3", align 16
  %27 = alloca %"struct.JPH::AssertLastParam", align 1
  %28 = alloca %"class.JPH::Vec3", align 16
  store ptr %0, ptr %4, align 8, !tbaa !5
  store float %1, ptr %5, align 4, !tbaa !9
  store float %2, ptr %6, align 4, !tbaa !9
  %29 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr %7) #7
  %30 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %29, i32 0, i32 1
  %31 = load ptr, ptr %30, align 16, !tbaa !11
  %32 = call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %31)
  %33 = getelementptr inbounds %"class.JPH::Quat", ptr %8, i32 0, i32 0
  %34 = getelementptr inbounds %"class.JPH::Vec4", ptr %33, i32 0, i32 0
  %35 = getelementptr inbounds %union.anon.4, ptr %34, i32 0, i32 0
  %36 = getelementptr inbounds { double, double }, ptr %35, i32 0, i32 0
  %37 = extractvalue { double, double } %32, 0
  store double %37, ptr %36, align 16
  %38 = getelementptr inbounds { double, double }, ptr %35, i32 0, i32 1
  %39 = extractvalue { double, double } %32, 1
  store double %39, ptr %38, align 8
  %40 = getelementptr inbounds { double, double }, ptr %8, i32 0, i32 0
  %41 = load double, ptr %40, align 16
  %42 = getelementptr inbounds { double, double }, ptr %8, i32 0, i32 1
  %43 = load double, ptr %42, align 8
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %7, double %41, double %43)
  call void @llvm.lifetime.start.p0(i64 64, ptr %9) #7
  %44 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %29, i32 0, i32 2
  %45 = load ptr, ptr %44, align 8, !tbaa !20
  %46 = call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %45)
  %47 = getelementptr inbounds %"class.JPH::Quat", ptr %10, i32 0, i32 0
  %48 = getelementptr inbounds %"class.JPH::Vec4", ptr %47, i32 0, i32 0
  %49 = getelementptr inbounds %union.anon.4, ptr %48, i32 0, i32 0
  %50 = getelementptr inbounds { double, double }, ptr %49, i32 0, i32 0
  %51 = extractvalue { double, double } %46, 0
  store double %51, ptr %50, align 16
  %52 = getelementptr inbounds { double, double }, ptr %49, i32 0, i32 1
  %53 = extractvalue { double, double } %46, 1
  store double %53, ptr %52, align 8
  %54 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 0
  %55 = load double, ptr %54, align 16
  %56 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 1
  %57 = load double, ptr %56, align 8
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %9, double %55, double %57)
  call void @_ZN3JPH16SliderConstraint14CalculateR1R2UERKNS_5Mat44ES3_(ptr noundef nonnull align 16 dereferenceable(832) %29, ptr noundef nonnull align 16 dereferenceable(64) %7, ptr noundef nonnull align 16 dereferenceable(64) %9)
  call void @_ZN3JPH16SliderConstraint37CalculatePositionConstraintPropertiesERKNS_5Mat44ES3_(ptr noundef nonnull align 16 dereferenceable(832) %29, ptr noundef nonnull align 16 dereferenceable(64) %7, ptr noundef nonnull align 16 dereferenceable(64) %9)
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #7
  %58 = getelementptr inbounds %"class.JPH::SliderConstraint", ptr %29, i32 0, i32 24
  %59 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %29, i32 0, i32 1
  %60 = load ptr, ptr %59, align 16, !tbaa !11
  %61 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %29, i32 0, i32 2
  %62 = load ptr, ptr %61, align 8, !tbaa !20
  %63 = getelementptr inbounds %"class.JPH::SliderConstraint", ptr %29, i32 0, i32 18
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %12, ptr align 16 %63, i64 16, i1 false), !tbaa.struct !21
  %64 = getelementptr inbounds %"class.JPH::SliderConstraint", ptr %29, i32 0, i32 20
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %13, ptr align 16 %64, i64 16, i1 false), !tbaa.struct !21
  %65 = getelementptr inbounds %"class.JPH::SliderConstraint", ptr %29, i32 0, i32 21
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %14, ptr align 16 %65, i64 16, i1 false), !tbaa.struct !21
  %66 = load float, ptr %6, align 4, !tbaa !9
  %67 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 0
  %68 = load double, ptr %67, align 16
  %69 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 1
  %70 = load double, ptr %69, align 8
  %71 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 0
  %72 = load double, ptr %71, align 16
  %73 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 1
  %74 = load double, ptr %73, align 8
  %75 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 0
  %76 = load double, ptr %75, align 16
  %77 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 1
  %78 = load double, ptr %77, align 8
  %79 = call noundef zeroext i1 @_ZNK3JPH22DualAxisConstraintPart23SolvePositionConstraintERNS_4BodyES2_NS_4Vec3ES3_S3_f(ptr noundef nonnull align 16 dereferenceable(152) %58, ptr noundef nonnull align 16 dereferenceable(122) %60, ptr noundef nonnull align 16 dereferenceable(122) %62, double %68, double %70, double %72, double %74, double %76, double %78, float noundef %66)
  %80 = zext i1 %79 to i8
  store i8 %80, ptr %11, align 1, !tbaa !23
  %81 = getelementptr inbounds %"class.JPH::SliderConstraint", ptr %29, i32 0, i32 25
  %82 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %29, i32 0, i32 1
  %83 = load ptr, ptr %82, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 64, ptr %15) #7
  %84 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %29, i32 0, i32 1
  %85 = load ptr, ptr %84, align 16, !tbaa !11
  %86 = call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %85)
  %87 = getelementptr inbounds %"class.JPH::Quat", ptr %16, i32 0, i32 0
  %88 = getelementptr inbounds %"class.JPH::Vec4", ptr %87, i32 0, i32 0
  %89 = getelementptr inbounds %union.anon.4, ptr %88, i32 0, i32 0
  %90 = getelementptr inbounds { double, double }, ptr %89, i32 0, i32 0
  %91 = extractvalue { double, double } %86, 0
  store double %91, ptr %90, align 16
  %92 = getelementptr inbounds { double, double }, ptr %89, i32 0, i32 1
  %93 = extractvalue { double, double } %86, 1
  store double %93, ptr %92, align 8
  %94 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 0
  %95 = load double, ptr %94, align 16
  %96 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 1
  %97 = load double, ptr %96, align 8
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %15, double %95, double %97)
  %98 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %29, i32 0, i32 2
  %99 = load ptr, ptr %98, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 64, ptr %17) #7
  %100 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %29, i32 0, i32 2
  %101 = load ptr, ptr %100, align 8, !tbaa !20
  %102 = call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %101)
  %103 = getelementptr inbounds %"class.JPH::Quat", ptr %18, i32 0, i32 0
  %104 = getelementptr inbounds %"class.JPH::Vec4", ptr %103, i32 0, i32 0
  %105 = getelementptr inbounds %union.anon.4, ptr %104, i32 0, i32 0
  %106 = getelementptr inbounds { double, double }, ptr %105, i32 0, i32 0
  %107 = extractvalue { double, double } %102, 0
  store double %107, ptr %106, align 16
  %108 = getelementptr inbounds { double, double }, ptr %105, i32 0, i32 1
  %109 = extractvalue { double, double } %102, 1
  store double %109, ptr %108, align 8
  %110 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %111 = load double, ptr %110, align 16
  %112 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %113 = load double, ptr %112, align 8
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %17, double %111, double %113)
  call void @_ZN3JPH27RotationEulerConstraintPart29CalculateConstraintPropertiesERKNS_4BodyERKNS_5Mat44ES3_S6_(ptr noundef nonnull align 16 dereferenceable(208) %81, ptr noundef nonnull align 16 dereferenceable(122) %83, ptr noundef nonnull align 16 dereferenceable(64) %15, ptr noundef nonnull align 16 dereferenceable(122) %99, ptr noundef nonnull align 16 dereferenceable(64) %17)
  call void @llvm.lifetime.end.p0(i64 64, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #7
  %114 = getelementptr inbounds %"class.JPH::SliderConstraint", ptr %29, i32 0, i32 25
  %115 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %29, i32 0, i32 1
  %116 = load ptr, ptr %115, align 16, !tbaa !11
  %117 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %29, i32 0, i32 2
  %118 = load ptr, ptr %117, align 8, !tbaa !20
  %119 = getelementptr inbounds %"class.JPH::SliderConstraint", ptr %29, i32 0, i32 6
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %20, ptr align 16 %119, i64 16, i1 false), !tbaa.struct !21
  %120 = load float, ptr %6, align 4, !tbaa !9
  %121 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 0
  %122 = load double, ptr %121, align 16
  %123 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 1
  %124 = load double, ptr %123, align 8
  %125 = call noundef zeroext i1 @_ZNK3JPH27RotationEulerConstraintPart23SolvePositionConstraintERNS_4BodyES2_NS_4QuatEf(ptr noundef nonnull align 16 dereferenceable(208) %114, ptr noundef nonnull align 16 dereferenceable(122) %116, ptr noundef nonnull align 16 dereferenceable(122) %118, double %122, double %124, float noundef %120)
  %126 = zext i1 %125 to i8
  store i8 %126, ptr %19, align 1, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #7
  store i8 0, ptr %21, align 1, !tbaa !23
  %127 = getelementptr inbounds %"class.JPH::SliderConstraint", ptr %29, i32 0, i32 7
  %128 = load i8, ptr %127, align 16, !tbaa !24, !range !41, !noundef !42
  %129 = trunc i8 %128 to i1
  br i1 %129, label %130, label %225

130:                                              ; preds = %3
  %131 = getelementptr inbounds %"class.JPH::SliderConstraint", ptr %29, i32 0, i32 10
  %132 = getelementptr inbounds %"class.JPH::SpringSettings", ptr %131, i32 0, i32 1
  %133 = load float, ptr %132, align 4, !tbaa !22
  %134 = fcmp ole float %133, 0.000000e+00
  br i1 %134, label %135, label %225

135:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 64, ptr %22) #7
  %136 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %29, i32 0, i32 1
  %137 = load ptr, ptr %136, align 16, !tbaa !11
  %138 = call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %137)
  %139 = getelementptr inbounds %"class.JPH::Quat", ptr %23, i32 0, i32 0
  %140 = getelementptr inbounds %"class.JPH::Vec4", ptr %139, i32 0, i32 0
  %141 = getelementptr inbounds %union.anon.4, ptr %140, i32 0, i32 0
  %142 = getelementptr inbounds { double, double }, ptr %141, i32 0, i32 0
  %143 = extractvalue { double, double } %138, 0
  store double %143, ptr %142, align 16
  %144 = getelementptr inbounds { double, double }, ptr %141, i32 0, i32 1
  %145 = extractvalue { double, double } %138, 1
  store double %145, ptr %144, align 8
  %146 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 0
  %147 = load double, ptr %146, align 16
  %148 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 1
  %149 = load double, ptr %148, align 8
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %22, double %147, double %149)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %7, ptr align 16 %22, i64 64, i1 false), !tbaa.struct !43
  call void @llvm.lifetime.end.p0(i64 64, ptr %22) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr %24) #7
  %150 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %29, i32 0, i32 2
  %151 = load ptr, ptr %150, align 8, !tbaa !20
  %152 = call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %151)
  %153 = getelementptr inbounds %"class.JPH::Quat", ptr %25, i32 0, i32 0
  %154 = getelementptr inbounds %"class.JPH::Vec4", ptr %153, i32 0, i32 0
  %155 = getelementptr inbounds %union.anon.4, ptr %154, i32 0, i32 0
  %156 = getelementptr inbounds { double, double }, ptr %155, i32 0, i32 0
  %157 = extractvalue { double, double } %152, 0
  store double %157, ptr %156, align 16
  %158 = getelementptr inbounds { double, double }, ptr %155, i32 0, i32 1
  %159 = extractvalue { double, double } %152, 1
  store double %159, ptr %158, align 8
  %160 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 0
  %161 = load double, ptr %160, align 16
  %162 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 1
  %163 = load double, ptr %162, align 8
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %24, double %161, double %163)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %9, ptr align 16 %24, i64 64, i1 false), !tbaa.struct !43
  call void @llvm.lifetime.end.p0(i64 64, ptr %24) #7
  call void @_ZN3JPH16SliderConstraint14CalculateR1R2UERKNS_5Mat44ES3_(ptr noundef nonnull align 16 dereferenceable(832) %29, ptr noundef nonnull align 16 dereferenceable(64) %7, ptr noundef nonnull align 16 dereferenceable(64) %9)
  call void @_ZN3JPH16SliderConstraint31CalculateSlidingAxisAndPositionERKNS_5Mat44E(ptr noundef nonnull align 16 dereferenceable(832) %29, ptr noundef nonnull align 16 dereferenceable(64) %7)
  %164 = load float, ptr %5, align 4, !tbaa !9
  call void @_ZN3JPH16SliderConstraint43CalculatePositionLimitsConstraintPropertiesEf(ptr noundef nonnull align 16 dereferenceable(832) %29, float noundef %164)
  %165 = getelementptr inbounds %"class.JPH::SliderConstraint", ptr %29, i32 0, i32 26
  %166 = call noundef zeroext i1 @_ZNK3JPH18AxisConstraintPart8IsActiveEv(ptr noundef nonnull align 4 dereferenceable(64) %165)
  br i1 %166, label %167, label %224

167:                                              ; preds = %135
  %168 = getelementptr inbounds %"class.JPH::SliderConstraint", ptr %29, i32 0, i32 22
  %169 = load float, ptr %168, align 16, !tbaa !44
  %170 = getelementptr inbounds %"class.JPH::SliderConstraint", ptr %29, i32 0, i32 8
  %171 = load float, ptr %170, align 4, !tbaa !45
  %172 = fcmp ole float %169, %171
  br i1 %172, label %173, label %192

173:                                              ; preds = %167
  %174 = getelementptr inbounds %"class.JPH::SliderConstraint", ptr %29, i32 0, i32 26
  %175 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %29, i32 0, i32 1
  %176 = load ptr, ptr %175, align 16, !tbaa !11
  %177 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %29, i32 0, i32 2
  %178 = load ptr, ptr %177, align 8, !tbaa !20
  %179 = getelementptr inbounds %"class.JPH::SliderConstraint", ptr %29, i32 0, i32 19
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %26, ptr align 16 %179, i64 16, i1 false), !tbaa.struct !21
  %180 = getelementptr inbounds %"class.JPH::SliderConstraint", ptr %29, i32 0, i32 22
  %181 = load float, ptr %180, align 16, !tbaa !44
  %182 = getelementptr inbounds %"class.JPH::SliderConstraint", ptr %29, i32 0, i32 8
  %183 = load float, ptr %182, align 4, !tbaa !45
  %184 = fsub float %181, %183
  %185 = load float, ptr %6, align 4, !tbaa !9
  %186 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 0
  %187 = load double, ptr %186, align 16
  %188 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 1
  %189 = load double, ptr %188, align 8
  %190 = call noundef zeroext i1 @_ZNK3JPH18AxisConstraintPart23SolvePositionConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 4 dereferenceable(64) %174, ptr noundef nonnull align 16 dereferenceable(122) %176, ptr noundef nonnull align 16 dereferenceable(122) %178, double %187, double %189, float noundef %184, float noundef %185)
  %191 = zext i1 %190 to i8
  store i8 %191, ptr %21, align 1, !tbaa !23
  br label %223

192:                                              ; preds = %167
  br label %193

193:                                              ; preds = %192
  %194 = getelementptr inbounds %"class.JPH::SliderConstraint", ptr %29, i32 0, i32 22
  %195 = load float, ptr %194, align 16, !tbaa !44
  %196 = getelementptr inbounds %"class.JPH::SliderConstraint", ptr %29, i32 0, i32 9
  %197 = load float, ptr %196, align 8, !tbaa !46
  %198 = fcmp oge float %195, %197
  br i1 %198, label %202, label %199

199:                                              ; preds = %193
  %200 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.7, ptr noundef @.str.2, i32 noundef 371)
  br i1 %200, label %201, label %202

201:                                              ; preds = %199
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #7, !srcloc !47
  br label %202

202:                                              ; preds = %201, %199, %193
  br label %203

203:                                              ; preds = %202
  br label %204

204:                                              ; preds = %203
  %205 = getelementptr inbounds %"class.JPH::SliderConstraint", ptr %29, i32 0, i32 26
  %206 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %29, i32 0, i32 1
  %207 = load ptr, ptr %206, align 16, !tbaa !11
  %208 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %29, i32 0, i32 2
  %209 = load ptr, ptr %208, align 8, !tbaa !20
  %210 = getelementptr inbounds %"class.JPH::SliderConstraint", ptr %29, i32 0, i32 19
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %28, ptr align 16 %210, i64 16, i1 false), !tbaa.struct !21
  %211 = getelementptr inbounds %"class.JPH::SliderConstraint", ptr %29, i32 0, i32 22
  %212 = load float, ptr %211, align 16, !tbaa !44
  %213 = getelementptr inbounds %"class.JPH::SliderConstraint", ptr %29, i32 0, i32 9
  %214 = load float, ptr %213, align 8, !tbaa !46
  %215 = fsub float %212, %214
  %216 = load float, ptr %6, align 4, !tbaa !9
  %217 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 0
  %218 = load double, ptr %217, align 16
  %219 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 1
  %220 = load double, ptr %219, align 8
  %221 = call noundef zeroext i1 @_ZNK3JPH18AxisConstraintPart23SolvePositionConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 4 dereferenceable(64) %205, ptr noundef nonnull align 16 dereferenceable(122) %207, ptr noundef nonnull align 16 dereferenceable(122) %209, double %218, double %220, float noundef %215, float noundef %216)
  %222 = zext i1 %221 to i8
  store i8 %222, ptr %21, align 1, !tbaa !23
  br label %223

223:                                              ; preds = %204, %173
  br label %224

224:                                              ; preds = %223, %135
  br label %225

225:                                              ; preds = %224, %130, %3
  %226 = load i8, ptr %11, align 1, !tbaa !23, !range !41, !noundef !42
  %227 = trunc i8 %226 to i1
  br i1 %227, label %234, label %228

228:                                              ; preds = %225
  %229 = load i8, ptr %19, align 1, !tbaa !23, !range !41, !noundef !42
  %230 = trunc i8 %229 to i1
  br i1 %230, label %234, label %231

231:                                              ; preds = %228
  %232 = load i8, ptr %21, align 1, !tbaa !23, !range !41, !noundef !42
  %233 = trunc i8 %232 to i1
  br label %234

234:                                              ; preds = %231, %228, %225
  %235 = phi i1 [ true, %228 ], [ true, %225 ], [ %233, %231 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %7) #7
  ret i1 %235
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH22DualAxisConstraintPart23SolvePositionConstraintERNS_4BodyES2_NS_4Vec3ES3_S3_f(ptr noundef nonnull align 16 dereferenceable(152), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(122), double, double, double, double, double, double, float noundef) #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH27RotationEulerConstraintPart23SolvePositionConstraintERNS_4BodyES2_NS_4QuatEf(ptr noundef nonnull align 16 dereferenceable(208), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(122), double, double, float noundef) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH18AxisConstraintPart23SolvePositionConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 4 dereferenceable(64), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(122), double, double, float noundef, float noundef) #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 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 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="64" "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, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !6, i64 32}
!12 = !{!"_ZTSN3JPH17TwoBodyConstraintE", !13, i64 0, !6, i64 32, !6, i64 40}
!13 = !{!"_ZTSN3JPH10ConstraintE", !14, i64 8, !17, i64 12, !17, i64 16, !7, i64 20, !7, i64 21, !18, i64 22, !19, i64 24}
!14 = !{!"_ZTSN3JPH9RefTargetINS_10ConstraintEEE", !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 = !{!"long", !7, i64 0}
!20 = !{!12, !6, i64 40}
!21 = !{i64 0, i64 16, !22}
!22 = !{!7, !7, i64 0}
!23 = !{!18, !18, i64 0}
!24 = !{!25, !18, i64 144}
!25 = !{!"_ZTSN3JPH16SliderConstraintE", !12, i64 0, !26, i64 48, !26, i64 64, !26, i64 80, !26, i64 96, !26, i64 112, !27, i64 128, !18, i64 144, !10, i64 148, !10, i64 152, !29, i64 156, !10, i64 168, !31, i64 172, !32, i64 200, !10, i64 204, !10, i64 208, !26, i64 224, !26, i64 240, !26, i64 256, !26, i64 272, !26, i64 288, !26, i64 304, !10, i64 320, !33, i64 336, !36, i64 496, !38, i64 704, !38, i64 768}
!26 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!27 = !{!"_ZTSN3JPH4QuatE", !28, i64 0}
!28 = !{!"_ZTSN3JPH4Vec4E", !7, i64 0}
!29 = !{!"_ZTSN3JPH14SpringSettingsE", !30, i64 0, !7, i64 4, !10, i64 8}
!30 = !{!"_ZTSN3JPH11ESpringModeE", !7, i64 0}
!31 = !{!"_ZTSN3JPH13MotorSettingsE", !29, i64 0, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24}
!32 = !{!"_ZTSN3JPH11EMotorStateE", !7, i64 0}
!33 = !{!"_ZTSN3JPH22DualAxisConstraintPartE", !26, i64 0, !26, i64 16, !26, i64 32, !26, i64 48, !26, i64 64, !26, i64 80, !26, i64 96, !26, i64 112, !34, i64 128, !35, i64 144}
!34 = !{!"_ZTSN3JPH6MatrixILj2ELj2EEE", !7, i64 0}
!35 = !{!"_ZTSN3JPH6VectorILj2EEE", !7, i64 0}
!36 = !{!"_ZTSN3JPH27RotationEulerConstraintPartE", !37, i64 0, !37, i64 64, !37, i64 128, !26, i64 192}
!37 = !{!"_ZTSN3JPH5Mat44E", !7, i64 0}
!38 = !{!"_ZTSN3JPH18AxisConstraintPartE", !39, i64 0, !39, i64 12, !39, i64 24, !39, i64 36, !10, i64 48, !40, i64 52, !10, i64 60}
!39 = !{!"_ZTSN3JPH6Float3E", !10, i64 0, !10, i64 4, !10, i64 8}
!40 = !{!"_ZTSN3JPH10SpringPartE", !10, i64 0, !10, i64 4}
!41 = !{i8 0, i8 2}
!42 = !{}
!43 = !{i64 0, i64 64, !22}
!44 = !{!25, !10, i64 320}
!45 = !{!25, !10, i64 148}
!46 = !{!25, !10, i64 152}
!47 = !{i64 2158335550}


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

@.str.2 = external hidden unnamed_addr constant [98 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [17 x i8], align 1

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH16SliderConstraint14CalculateR1R2UERKNS_5Mat44ES3_(ptr noundef nonnull align 16 dereferenceable(832), ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 16 dereferenceable(64)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH16SliderConstraint37CalculatePositionConstraintPropertiesERKNS_5Mat44ES3_(ptr noundef nonnull align 16 dereferenceable(832), ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 16 dereferenceable(64)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH16SliderConstraint31CalculateSlidingAxisAndPositionERKNS_5Mat44E(ptr noundef nonnull align 16 dereferenceable(832), ptr noundef nonnull align 16 dereferenceable(64)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH16SliderConstraint43CalculatePositionLimitsConstraintPropertiesEf(ptr noundef nonnull align 16 dereferenceable(832), float noundef) local_unnamed_addr #3 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 #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH27RotationEulerConstraintPart29CalculateConstraintPropertiesERKNS_4BodyERKNS_5Mat44ES3_S6_(ptr noundef nonnull align 16 dereferenceable(208), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(64)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH18AxisConstraintPart8IsActiveEv(ptr noundef nonnull align 4 dereferenceable(64)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3JPH16SliderConstraint23SolvePositionConstraintEff(ptr noundef nonnull align 16 dereferenceable(832) %0, float noundef %1, float noundef %2) unnamed_addr #3 align 2 {
  %4 = alloca %"class.JPH::Mat44", align 16
  %5 = alloca %"class.JPH::Mat44", align 16
  %6 = alloca %"class.JPH::Mat44", align 16
  %7 = alloca %"class.JPH::Mat44", align 16
  %8 = alloca %"class.JPH::Mat44", align 16
  %9 = alloca %"class.JPH::Mat44", align 16
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %4) #7
  %10 = getelementptr inbounds i8, ptr %0, i64 32
  %11 = load ptr, ptr %10, align 16, !tbaa !5
  %12 = tail call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %11)
  %13 = extractvalue { double, double } %12, 0
  %14 = extractvalue { double, double } %12, 1
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %4, double %13, double %14)
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %5) #7
  %15 = getelementptr inbounds i8, ptr %0, i64 40
  %16 = load ptr, ptr %15, align 8, !tbaa !17
  %17 = call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %16)
  %18 = extractvalue { double, double } %17, 0
  %19 = extractvalue { double, double } %17, 1
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %5, double %18, double %19)
  call void @_ZN3JPH16SliderConstraint14CalculateR1R2UERKNS_5Mat44ES3_(ptr noundef nonnull align 16 dereferenceable(832) %0, ptr noundef nonnull align 16 dereferenceable(64) %4, ptr noundef nonnull align 16 dereferenceable(64) %5)
  call void @_ZN3JPH16SliderConstraint37CalculatePositionConstraintPropertiesERKNS_5Mat44ES3_(ptr noundef nonnull align 16 dereferenceable(832) %0, ptr noundef nonnull align 16 dereferenceable(64) %4, ptr noundef nonnull align 16 dereferenceable(64) %5)
  %20 = getelementptr inbounds i8, ptr %0, i64 336
  %21 = load ptr, ptr %10, align 16, !tbaa !5
  %22 = load ptr, ptr %15, align 8, !tbaa !17
  %23 = getelementptr inbounds i8, ptr %0, i64 256
  %.sroa.018.0.copyload = load double, ptr %23, align 16
  %.sroa.219.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 264
  %.sroa.219.0.copyload = load double, ptr %.sroa.219.0..sroa_idx, align 8, !tbaa !18
  %24 = getelementptr inbounds i8, ptr %0, i64 288
  %.sroa.016.0.copyload = load double, ptr %24, align 16
  %.sroa.217.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 296
  %.sroa.217.0.copyload = load double, ptr %.sroa.217.0..sroa_idx, align 8, !tbaa !18
  %25 = getelementptr inbounds i8, ptr %0, i64 304
  %.sroa.014.0.copyload = load double, ptr %25, align 16
  %.sroa.215.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 312
  %.sroa.215.0.copyload = load double, ptr %.sroa.215.0..sroa_idx, align 8, !tbaa !18
  %26 = call noundef zeroext i1 @_ZNK3JPH22DualAxisConstraintPart23SolvePositionConstraintERNS_4BodyES2_NS_4Vec3ES3_S3_f(ptr noundef nonnull align 16 dereferenceable(152) %20, ptr noundef nonnull align 16 dereferenceable(122) %21, ptr noundef nonnull align 16 dereferenceable(122) %22, double %.sroa.018.0.copyload, double %.sroa.219.0.copyload, double %.sroa.016.0.copyload, double %.sroa.217.0.copyload, double %.sroa.014.0.copyload, double %.sroa.215.0.copyload, float noundef %2)
  %27 = getelementptr inbounds i8, ptr %0, i64 496
  %28 = load ptr, ptr %10, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %6) #7
  %29 = call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %28)
  %30 = extractvalue { double, double } %29, 0
  %31 = extractvalue { double, double } %29, 1
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %6, double %30, double %31)
  %32 = load ptr, ptr %15, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %7) #7
  %33 = call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %32)
  %34 = extractvalue { double, double } %33, 0
  %35 = extractvalue { double, double } %33, 1
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %7, double %34, double %35)
  call void @_ZN3JPH27RotationEulerConstraintPart29CalculateConstraintPropertiesERKNS_4BodyERKNS_5Mat44ES3_S6_(ptr noundef nonnull align 16 dereferenceable(208) %27, ptr noundef nonnull align 16 dereferenceable(122) %28, ptr noundef nonnull align 16 dereferenceable(64) %6, ptr noundef nonnull align 16 dereferenceable(122) %32, ptr noundef nonnull align 16 dereferenceable(64) %7)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #7
  %36 = load ptr, ptr %10, align 16, !tbaa !5
  %37 = load ptr, ptr %15, align 8, !tbaa !17
  %38 = getelementptr inbounds i8, ptr %0, i64 128
  %.sroa.07.0.copyload = load double, ptr %38, align 16
  %.sroa.28.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 136
  %.sroa.28.0.copyload = load double, ptr %.sroa.28.0..sroa_idx, align 8, !tbaa !18
  %39 = call noundef zeroext i1 @_ZNK3JPH27RotationEulerConstraintPart23SolvePositionConstraintERNS_4BodyES2_NS_4QuatEf(ptr noundef nonnull align 16 dereferenceable(208) %27, ptr noundef nonnull align 16 dereferenceable(122) %36, ptr noundef nonnull align 16 dereferenceable(122) %37, double %.sroa.07.0.copyload, double %.sroa.28.0.copyload, float noundef %2)
  %40 = getelementptr inbounds i8, ptr %0, i64 144
  %41 = load i8, ptr %40, align 16, !tbaa !19, !range !37, !noundef !38
  %42 = trunc nuw i8 %41 to i1
  %43 = getelementptr inbounds i8, ptr %0, i64 160
  %44 = load float, ptr %43, align 16
  %45 = fcmp ole float %44, 0.000000e+00
  %or.cond.not = select i1 %42, i1 %45, i1 false
  br i1 %or.cond.not, label %46, label %84

46:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8) #7
  %47 = load ptr, ptr %10, align 16, !tbaa !5
  %48 = call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %47)
  %49 = extractvalue { double, double } %48, 0
  %50 = extractvalue { double, double } %48, 1
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %8, double %49, double %50)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(64) %4, ptr noundef nonnull align 16 dereferenceable(64) %8, i64 64, i1 false), !tbaa.struct !39
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #7
  %51 = load ptr, ptr %15, align 8, !tbaa !17
  %52 = call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %51)
  %53 = extractvalue { double, double } %52, 0
  %54 = extractvalue { double, double } %52, 1
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %9, double %53, double %54)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(64) %5, ptr noundef nonnull align 16 dereferenceable(64) %9, i64 64, i1 false), !tbaa.struct !39
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #7
  call void @_ZN3JPH16SliderConstraint14CalculateR1R2UERKNS_5Mat44ES3_(ptr noundef nonnull align 16 dereferenceable(832) %0, ptr noundef nonnull align 16 dereferenceable(64) %4, ptr noundef nonnull align 16 dereferenceable(64) %5)
  call void @_ZN3JPH16SliderConstraint31CalculateSlidingAxisAndPositionERKNS_5Mat44E(ptr noundef nonnull align 16 dereferenceable(832) %0, ptr noundef nonnull align 16 dereferenceable(64) %4)
  call void @_ZN3JPH16SliderConstraint43CalculatePositionLimitsConstraintPropertiesEf(ptr noundef nonnull align 16 dereferenceable(832) %0, float noundef %1)
  %55 = getelementptr inbounds i8, ptr %0, i64 704
  %56 = call noundef zeroext i1 @_ZNK3JPH18AxisConstraintPart8IsActiveEv(ptr noundef nonnull align 4 dereferenceable(64) %55)
  br i1 %56, label %57, label %84

57:                                               ; preds = %46
  %58 = getelementptr inbounds i8, ptr %0, i64 320
  %59 = load float, ptr %58, align 16, !tbaa !40
  %60 = getelementptr inbounds i8, ptr %0, i64 148
  %61 = load float, ptr %60, align 4, !tbaa !41
  %62 = fcmp ugt float %59, %61
  br i1 %62, label %69, label %63

63:                                               ; preds = %57
  %64 = load ptr, ptr %10, align 16, !tbaa !5
  %65 = load ptr, ptr %15, align 8, !tbaa !17
  %66 = getelementptr inbounds i8, ptr %0, i64 272
  %.sroa.01.0.copyload = load double, ptr %66, align 16
  %.sroa.22.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 280
  %.sroa.22.0.copyload = load double, ptr %.sroa.22.0..sroa_idx, align 8, !tbaa !18
  %67 = fsub float %59, %61
  %68 = call noundef zeroext i1 @_ZNK3JPH18AxisConstraintPart23SolvePositionConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 4 dereferenceable(64) %55, ptr noundef nonnull align 16 dereferenceable(122) %64, ptr noundef nonnull align 16 dereferenceable(122) %65, double %.sroa.01.0.copyload, double %.sroa.22.0.copyload, float noundef %67, float noundef %2)
  br label %84

69:                                               ; preds = %57
  %70 = getelementptr inbounds i8, ptr %0, i64 152
  %71 = load float, ptr %70, align 8, !tbaa !42
  %72 = fcmp ult float %59, %71
  br i1 %72, label %73, label %76

73:                                               ; preds = %69
  %74 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.2, i32 noundef 371)
  br i1 %74, label %75, label %76

75:                                               ; preds = %73
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #7, !srcloc !43
  br label %76

76:                                               ; preds = %75, %73, %69
  %77 = load ptr, ptr %10, align 16, !tbaa !5
  %78 = load ptr, ptr %15, align 8, !tbaa !17
  %79 = getelementptr inbounds i8, ptr %0, i64 272
  %.sroa.0.0.copyload = load double, ptr %79, align 16
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 280
  %.sroa.2.0.copyload = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !18
  %80 = load float, ptr %58, align 16, !tbaa !40
  %81 = load float, ptr %70, align 8, !tbaa !42
  %82 = fsub float %80, %81
  %83 = call noundef zeroext i1 @_ZNK3JPH18AxisConstraintPart23SolvePositionConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 4 dereferenceable(64) %55, ptr noundef nonnull align 16 dereferenceable(122) %77, ptr noundef nonnull align 16 dereferenceable(122) %78, double %.sroa.0.0.copyload, double %.sroa.2.0.copyload, float noundef %82, float noundef %2)
  br label %84

84:                                               ; preds = %46, %76, %63, %3
  %.0.shrunk = phi i1 [ %68, %63 ], [ %83, %76 ], [ false, %46 ], [ false, %3 ]
  br i1 %26, label %86, label %85

85:                                               ; preds = %84
  %spec.select = or i1 %39, %.0.shrunk
  br label %86

86:                                               ; preds = %85, %84
  %87 = phi i1 [ true, %84 ], [ %spec.select, %85 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %4) #7
  ret i1 %87
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH22DualAxisConstraintPart23SolvePositionConstraintERNS_4BodyES2_NS_4Vec3ES3_S3_f(ptr noundef nonnull align 16 dereferenceable(152), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(122), double, double, double, double, double, double, float noundef) local_unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH27RotationEulerConstraintPart23SolvePositionConstraintERNS_4BodyES2_NS_4QuatEf(ptr noundef nonnull align 16 dereferenceable(208), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(122), double, double, float noundef) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH18AxisConstraintPart23SolvePositionConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 4 dereferenceable(64), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(122), double, double, float noundef, float noundef) local_unnamed_addr #1 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 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 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="64" "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, !16, i64 32}
!6 = !{!"_ZTSN3JPH17TwoBodyConstraintE", !7, i64 0, !16, i64 32, !16, i64 40}
!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 = !{!"any pointer", !12, i64 0}
!17 = !{!6, !16, i64 40}
!18 = !{!12, !12, i64 0}
!19 = !{!20, !14, i64 144}
!20 = !{!"_ZTSN3JPH16SliderConstraintE", !6, i64 0, !21, i64 48, !21, i64 64, !21, i64 80, !21, i64 96, !21, i64 112, !22, i64 128, !14, i64 144, !24, i64 148, !24, i64 152, !25, i64 156, !24, i64 168, !27, i64 172, !28, i64 200, !24, i64 204, !24, i64 208, !21, i64 224, !21, i64 240, !21, i64 256, !21, i64 272, !21, i64 288, !21, i64 304, !24, i64 320, !29, i64 336, !32, i64 496, !34, i64 704, !34, i64 768}
!21 = !{!"_ZTSN3JPH4Vec3E", !12, i64 0}
!22 = !{!"_ZTSN3JPH4QuatE", !23, i64 0}
!23 = !{!"_ZTSN3JPH4Vec4E", !12, i64 0}
!24 = !{!"float", !12, i64 0}
!25 = !{!"_ZTSN3JPH14SpringSettingsE", !26, i64 0, !12, i64 4, !24, i64 8}
!26 = !{!"_ZTSN3JPH11ESpringModeE", !12, i64 0}
!27 = !{!"_ZTSN3JPH13MotorSettingsE", !25, i64 0, !24, i64 12, !24, i64 16, !24, i64 20, !24, i64 24}
!28 = !{!"_ZTSN3JPH11EMotorStateE", !12, i64 0}
!29 = !{!"_ZTSN3JPH22DualAxisConstraintPartE", !21, i64 0, !21, i64 16, !21, i64 32, !21, i64 48, !21, i64 64, !21, i64 80, !21, i64 96, !21, i64 112, !30, i64 128, !31, i64 144}
!30 = !{!"_ZTSN3JPH6MatrixILj2ELj2EEE", !12, i64 0}
!31 = !{!"_ZTSN3JPH6VectorILj2EEE", !12, i64 0}
!32 = !{!"_ZTSN3JPH27RotationEulerConstraintPartE", !33, i64 0, !33, i64 64, !33, i64 128, !21, i64 192}
!33 = !{!"_ZTSN3JPH5Mat44E", !12, i64 0}
!34 = !{!"_ZTSN3JPH18AxisConstraintPartE", !35, i64 0, !35, i64 12, !35, i64 24, !35, i64 36, !24, i64 48, !36, i64 52, !24, i64 60}
!35 = !{!"_ZTSN3JPH6Float3E", !24, i64 0, !24, i64 4, !24, i64 8}
!36 = !{!"_ZTSN3JPH10SpringPartE", !24, i64 0, !24, i64 4}
!37 = !{i8 0, i8 2}
!38 = !{}
!39 = !{i64 0, i64 64, !18}
!40 = !{!20, !24, i64 320}
!41 = !{!20, !24, i64 148}
!42 = !{!20, !24, i64 152}
!43 = !{i64 2158335550}


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