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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.JPH::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::SixDOFConstraint" = type { %"class.JPH::TwoBodyConstraint", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Quat", %"class.JPH::Quat", i8, i8, i8, i8, i8, i8, [6 x float], [6 x float], [3 x %"class.JPH::SpringSettings"], [6 x %"class.JPH::MotorSettings"], [6 x float], [6 x i32], %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Quat", [3 x %"class.JPH::Vec3"], [3 x %"class.JPH::Vec3"], [3 x float], [3 x %"class.JPH::AxisConstraintPart"], %"class.JPH::PointConstraintPart", %"class.JPH::SwingTwistConstraintPart", %"class.JPH::RotationEulerConstraintPart", [3 x %"class.JPH::AxisConstraintPart"], [3 x %"class.JPH::AngleConstraintPart"] }
%"class.JPH::TwoBodyConstraint" = type { %"class.JPH::Constraint", ptr, ptr }
%"class.JPH::Constraint" = type { ptr, %"class.JPH::RefTarget.3", i32, i32, i8, i8, i8, i64 }
%"class.JPH::RefTarget.3" = type { %"struct.std::atomic" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"class.JPH::SpringSettings" = type { i8, %union.anon.2, float }
%union.anon.2 = type { float }
%"class.JPH::MotorSettings" = type { %"class.JPH::SpringSettings", float, float, float, float }
%"class.JPH::PointConstraintPart" = type { %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Mat44", %"class.JPH::Mat44", %"class.JPH::Mat44", %"class.JPH::Vec3" }
%"class.JPH::SwingTwistConstraintPart" = type { i8, i8, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::AngleConstraintPart", %"class.JPH::AngleConstraintPart", %"class.JPH::AngleConstraintPart" }
%"class.JPH::AngleConstraintPart" = type { %"class.JPH::Vec3", %"class.JPH::Vec3", float, %"class.JPH::SpringPart", float }
%"class.JPH::SpringPart" = type { float, float }
%"class.JPH::RotationEulerConstraintPart" = type { %"class.JPH::Mat44", %"class.JPH::Mat44", %"class.JPH::Mat44", %"class.JPH::Vec3" }
%"class.JPH::AxisConstraintPart" = type { %"class.JPH::Float3", %"class.JPH::Float3", %"class.JPH::Float3", %"class.JPH::Float3", float, %"class.JPH::SpringPart", float }
%"class.JPH::Float3" = type { float, float, float }

@.str.2 = external hidden unnamed_addr constant [98 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [7 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: 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: inlinehint mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122)) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH16SixDOFConstraint28GetRotationInConstraintSpaceEv(ptr noundef nonnull align 16 dereferenceable(1856)) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef) #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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint29IsTranslationFullyConstrainedEv(ptr noundef nonnull align 16 dereferenceable(1856)) #5 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint24IsTranslationConstrainedEv(ptr noundef nonnull align 16 dereferenceable(1856)) #5 align 2

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint11IsFixedAxisENS_24SixDOFConstraintSettings5EAxisE(ptr noundef nonnull align 16 dereferenceable(1856), i32 noundef) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint10IsFreeAxisENS_24SixDOFConstraintSettings5EAxisE(ptr noundef nonnull align 16 dereferenceable(1856), i32 noundef) #5 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint26IsRotationFullyConstrainedEv(ptr noundef nonnull align 16 dereferenceable(1856)) #5 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)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint21IsRotationConstrainedEv(ptr noundef nonnull align 16 dereferenceable(1856)) #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3JPH16SixDOFConstraint23SolvePositionConstraintEff(ptr noundef nonnull align 16 dereferenceable(1856) %0, float noundef %1, float noundef %2) unnamed_addr #4 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca float, align 4
  %6 = alloca float, align 4
  %7 = alloca i8, align 1
  %8 = alloca %"class.JPH::Quat", align 16
  %9 = alloca %"class.JPH::Quat", align 16
  %10 = alloca %"class.JPH::Vec3", align 16
  %11 = alloca %"class.JPH::Quat", align 16
  %12 = alloca %"class.JPH::Quat", align 16
  %13 = alloca %"class.JPH::Mat44", align 16
  %14 = alloca %"class.JPH::Quat", align 16
  %15 = alloca %"class.JPH::Mat44", align 16
  %16 = alloca %"class.JPH::Quat", align 16
  %17 = alloca %"class.JPH::Quat", align 16
  %18 = alloca %"class.JPH::Quat", align 16
  %19 = alloca %"class.JPH::Quat", align 16
  %20 = alloca %"class.JPH::Quat", align 16
  %21 = alloca %"class.JPH::Quat", align 16
  %22 = alloca %"class.JPH::Vec3", align 16
  %23 = alloca %"class.JPH::Vec3", align 16
  %24 = alloca %"class.JPH::Vec3", align 16
  %25 = alloca %"class.JPH::Mat44", align 16
  %26 = alloca %"class.JPH::Quat", align 16
  %27 = alloca %"class.JPH::Vec3", align 16
  %28 = alloca %"class.JPH::Mat44", align 16
  %29 = alloca %"class.JPH::Quat", align 16
  %30 = alloca %"class.JPH::Vec3", align 16
  %31 = alloca i32, align 4
  %32 = alloca %"class.JPH::Vec3", align 16
  %33 = alloca %"class.JPH::Vec3", align 16
  %34 = alloca %"class.JPH::Vec3", align 16
  %35 = alloca %"class.JPH::Quat", align 16
  %36 = alloca %"class.JPH::Quat", align 16
  %37 = alloca %"class.JPH::Quat", align 16
  %38 = alloca %"class.JPH::Vec3", align 16
  %39 = alloca %"class.JPH::Vec3", align 16
  %40 = alloca %"class.JPH::Vec3", align 16
  %41 = alloca %"struct.JPH::AssertLastParam", align 1
  %42 = alloca %"class.JPH::Vec3", align 16
  %43 = alloca float, align 4
  %44 = alloca i32, align 4
  %45 = alloca %"class.JPH::Vec3", align 16
  %46 = alloca float, align 4
  %47 = alloca %"class.JPH::Vec3", align 16
  %48 = alloca %"class.JPH::Vec3", align 16
  %49 = alloca %"class.JPH::Vec3", align 16
  %50 = alloca %"class.JPH::Vec3", align 16
  %51 = 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
  %52 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #8
  store i8 0, ptr %7, align 1, !tbaa !11
  %53 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint26IsRotationFullyConstrainedEv(ptr noundef nonnull align 16 dereferenceable(1856) %52)
  br i1 %53, label %54, label %159

54:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #8
  %55 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %52, i32 0, i32 3
  %56 = call { double, double } @_ZNK3JPH16SixDOFConstraint20GetRotationLimitsMinEv(ptr noundef nonnull align 16 dereferenceable(1856) %52)
  %57 = getelementptr inbounds %"class.JPH::Vec3", ptr %10, i32 0, i32 0
  %58 = getelementptr inbounds %union.anon, ptr %57, i32 0, i32 0
  %59 = getelementptr inbounds { double, double }, ptr %58, i32 0, i32 0
  %60 = extractvalue { double, double } %56, 0
  store double %60, ptr %59, align 16
  %61 = getelementptr inbounds { double, double }, ptr %58, i32 0, i32 1
  %62 = extractvalue { double, double } %56, 1
  store double %62, ptr %61, align 8
  %63 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 0
  %64 = load double, ptr %63, align 16
  %65 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 1
  %66 = load double, ptr %65, align 8
  %67 = call { double, double } @_ZN3JPH4Quat12sEulerAnglesENS_4Vec3E(double %64, double %66)
  %68 = getelementptr inbounds %"class.JPH::Quat", ptr %9, i32 0, i32 0
  %69 = getelementptr inbounds %"class.JPH::Vec4", ptr %68, i32 0, i32 0
  %70 = getelementptr inbounds %union.anon.4, ptr %69, i32 0, i32 0
  %71 = getelementptr inbounds { double, double }, ptr %70, i32 0, i32 0
  %72 = extractvalue { double, double } %67, 0
  store double %72, ptr %71, align 16
  %73 = getelementptr inbounds { double, double }, ptr %70, i32 0, i32 1
  %74 = extractvalue { double, double } %67, 1
  store double %74, ptr %73, align 8
  %75 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 0
  %76 = load double, ptr %75, align 16
  %77 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 1
  %78 = load double, ptr %77, align 8
  %79 = call { double, double } @_ZNK3JPH4QuatmlES0_(ptr noundef nonnull align 16 dereferenceable(16) %55, double %76, double %78)
  %80 = getelementptr inbounds %"class.JPH::Quat", ptr %8, i32 0, i32 0
  %81 = getelementptr inbounds %"class.JPH::Vec4", ptr %80, i32 0, i32 0
  %82 = getelementptr inbounds %union.anon.4, ptr %81, i32 0, i32 0
  %83 = getelementptr inbounds { double, double }, ptr %82, i32 0, i32 0
  %84 = extractvalue { double, double } %79, 0
  store double %84, ptr %83, align 16
  %85 = getelementptr inbounds { double, double }, ptr %82, i32 0, i32 1
  %86 = extractvalue { double, double } %79, 1
  store double %86, ptr %85, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #8
  %87 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %52, i32 0, i32 4
  %88 = call { double, double } @_ZNK3JPH4Quat10ConjugatedEv(ptr noundef nonnull align 16 dereferenceable(16) %8)
  %89 = getelementptr inbounds %"class.JPH::Quat", ptr %12, i32 0, i32 0
  %90 = getelementptr inbounds %"class.JPH::Vec4", ptr %89, i32 0, i32 0
  %91 = getelementptr inbounds %union.anon.4, ptr %90, i32 0, i32 0
  %92 = getelementptr inbounds { double, double }, ptr %91, i32 0, i32 0
  %93 = extractvalue { double, double } %88, 0
  store double %93, ptr %92, align 16
  %94 = getelementptr inbounds { double, double }, ptr %91, i32 0, i32 1
  %95 = extractvalue { double, double } %88, 1
  store double %95, ptr %94, align 8
  %96 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 0
  %97 = load double, ptr %96, align 16
  %98 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 1
  %99 = load double, ptr %98, align 8
  %100 = call { double, double } @_ZNK3JPH4QuatmlES0_(ptr noundef nonnull align 16 dereferenceable(16) %87, double %97, double %99)
  %101 = getelementptr inbounds %"class.JPH::Quat", ptr %11, i32 0, i32 0
  %102 = getelementptr inbounds %"class.JPH::Vec4", ptr %101, i32 0, i32 0
  %103 = getelementptr inbounds %union.anon.4, ptr %102, i32 0, i32 0
  %104 = getelementptr inbounds { double, double }, ptr %103, i32 0, i32 0
  %105 = extractvalue { double, double } %100, 0
  store double %105, ptr %104, align 16
  %106 = getelementptr inbounds { double, double }, ptr %103, i32 0, i32 1
  %107 = extractvalue { double, double } %100, 1
  store double %107, ptr %106, align 8
  %108 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %52, i32 0, i32 27
  %109 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %52, i32 0, i32 1
  %110 = load ptr, ptr %109, align 16, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 64, ptr %13) #8
  %111 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %52, i32 0, i32 1
  %112 = load ptr, ptr %111, align 16, !tbaa !13
  %113 = call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %112)
  %114 = getelementptr inbounds %"class.JPH::Quat", ptr %14, i32 0, i32 0
  %115 = getelementptr inbounds %"class.JPH::Vec4", ptr %114, i32 0, i32 0
  %116 = getelementptr inbounds %union.anon.4, ptr %115, i32 0, i32 0
  %117 = getelementptr inbounds { double, double }, ptr %116, i32 0, i32 0
  %118 = extractvalue { double, double } %113, 0
  store double %118, ptr %117, align 16
  %119 = getelementptr inbounds { double, double }, ptr %116, i32 0, i32 1
  %120 = extractvalue { double, double } %113, 1
  store double %120, ptr %119, align 8
  %121 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 0
  %122 = load double, ptr %121, align 16
  %123 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 1
  %124 = load double, ptr %123, align 8
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %13, double %122, double %124)
  %125 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %52, i32 0, i32 2
  %126 = load ptr, ptr %125, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 64, ptr %15) #8
  %127 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %52, i32 0, i32 2
  %128 = load ptr, ptr %127, align 8, !tbaa !21
  %129 = call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %128)
  %130 = getelementptr inbounds %"class.JPH::Quat", ptr %16, i32 0, i32 0
  %131 = getelementptr inbounds %"class.JPH::Vec4", ptr %130, i32 0, i32 0
  %132 = getelementptr inbounds %union.anon.4, ptr %131, i32 0, i32 0
  %133 = getelementptr inbounds { double, double }, ptr %132, i32 0, i32 0
  %134 = extractvalue { double, double } %129, 0
  store double %134, ptr %133, align 16
  %135 = getelementptr inbounds { double, double }, ptr %132, i32 0, i32 1
  %136 = extractvalue { double, double } %129, 1
  store double %136, ptr %135, align 8
  %137 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 0
  %138 = load double, ptr %137, align 16
  %139 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 1
  %140 = load double, ptr %139, align 8
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %15, double %138, double %140)
  call void @_ZN3JPH27RotationEulerConstraintPart29CalculateConstraintPropertiesERKNS_4BodyERKNS_5Mat44ES3_S6_(ptr noundef nonnull align 16 dereferenceable(208) %108, ptr noundef nonnull align 16 dereferenceable(122) %110, ptr noundef nonnull align 16 dereferenceable(64) %13, ptr noundef nonnull align 16 dereferenceable(122) %126, ptr noundef nonnull align 16 dereferenceable(64) %15)
  call void @llvm.lifetime.end.p0(i64 64, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr %13) #8
  %141 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %52, i32 0, i32 27
  %142 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %52, i32 0, i32 1
  %143 = load ptr, ptr %142, align 16, !tbaa !13
  %144 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %52, i32 0, i32 2
  %145 = load ptr, ptr %144, align 8, !tbaa !21
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %17, ptr align 16 %11, i64 16, i1 false), !tbaa.struct !22
  %146 = load float, ptr %6, align 4, !tbaa !9
  %147 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 0
  %148 = load double, ptr %147, align 16
  %149 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 1
  %150 = load double, ptr %149, align 8
  %151 = call noundef zeroext i1 @_ZNK3JPH27RotationEulerConstraintPart23SolvePositionConstraintERNS_4BodyES2_NS_4QuatEf(ptr noundef nonnull align 16 dereferenceable(208) %141, ptr noundef nonnull align 16 dereferenceable(122) %143, ptr noundef nonnull align 16 dereferenceable(122) %145, double %148, double %150, float noundef %146)
  %152 = zext i1 %151 to i32
  %153 = load i8, ptr %7, align 1, !tbaa !11, !range !24, !noundef !25
  %154 = trunc i8 %153 to i1
  %155 = zext i1 %154 to i32
  %156 = or i32 %155, %152
  %157 = icmp ne i32 %156, 0
  %158 = zext i1 %157 to i8
  store i8 %158, ptr %7, align 1, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #8
  br label %199

159:                                              ; preds = %3
  %160 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint21IsRotationConstrainedEv(ptr noundef nonnull align 16 dereferenceable(1856) %52)
  br i1 %160, label %161, label %198

161:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #8
  %162 = call { double, double } @_ZNK3JPH16SixDOFConstraint28GetRotationInConstraintSpaceEv(ptr noundef nonnull align 16 dereferenceable(1856) %52)
  %163 = getelementptr inbounds %"class.JPH::Quat", ptr %18, i32 0, i32 0
  %164 = getelementptr inbounds %"class.JPH::Vec4", ptr %163, i32 0, i32 0
  %165 = getelementptr inbounds %union.anon.4, ptr %164, i32 0, i32 0
  %166 = getelementptr inbounds { double, double }, ptr %165, i32 0, i32 0
  %167 = extractvalue { double, double } %162, 0
  store double %167, ptr %166, align 16
  %168 = getelementptr inbounds { double, double }, ptr %165, i32 0, i32 1
  %169 = extractvalue { double, double } %162, 1
  store double %169, ptr %168, align 8
  %170 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %52, i32 0, i32 26
  %171 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %52, i32 0, i32 1
  %172 = load ptr, ptr %171, align 16, !tbaa !13
  %173 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %52, i32 0, i32 2
  %174 = load ptr, ptr %173, align 8, !tbaa !21
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %19, ptr align 16 %18, i64 16, i1 false), !tbaa.struct !22
  %175 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %52, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %20, ptr align 16 %175, i64 16, i1 false), !tbaa.struct !22
  %176 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %52, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %21, ptr align 16 %176, i64 16, i1 false), !tbaa.struct !22
  %177 = load float, ptr %6, align 4, !tbaa !9
  %178 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 0
  %179 = load double, ptr %178, align 16
  %180 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 1
  %181 = load double, ptr %180, align 8
  %182 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 0
  %183 = load double, ptr %182, align 16
  %184 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 1
  %185 = load double, ptr %184, align 8
  %186 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %187 = load double, ptr %186, align 16
  %188 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  %189 = load double, ptr %188, align 8
  %190 = call noundef zeroext i1 @_ZNK3JPH24SwingTwistConstraintPart23SolvePositionConstraintERNS_4BodyES2_NS_4QuatES3_S3_f(ptr noundef nonnull align 16 dereferenceable(272) %170, ptr noundef nonnull align 16 dereferenceable(122) %172, ptr noundef nonnull align 16 dereferenceable(122) %174, double %179, double %181, double %183, double %185, double %187, double %189, float noundef %177)
  %191 = zext i1 %190 to i32
  %192 = load i8, ptr %7, align 1, !tbaa !11, !range !24, !noundef !25
  %193 = trunc i8 %192 to i1
  %194 = zext i1 %193 to i32
  %195 = or i32 %194, %191
  %196 = icmp ne i32 %195, 0
  %197 = zext i1 %196 to i8
  store i8 %197, ptr %7, align 1, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #8
  br label %198

198:                                              ; preds = %161, %159
  br label %199

199:                                              ; preds = %198, %54
  %200 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint29IsTranslationFullyConstrainedEv(ptr noundef nonnull align 16 dereferenceable(1856) %52)
  br i1 %200, label %201, label %289

201:                                              ; preds = %199
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #8
  %202 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %52, i32 0, i32 1
  %203 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %52, i32 0, i32 3
  %204 = call { double, double } @_ZNK3JPH16SixDOFConstraint23GetTranslationLimitsMinEv(ptr noundef nonnull align 16 dereferenceable(1856) %52)
  %205 = getelementptr inbounds %"class.JPH::Vec3", ptr %24, i32 0, i32 0
  %206 = getelementptr inbounds %union.anon, ptr %205, i32 0, i32 0
  %207 = getelementptr inbounds { double, double }, ptr %206, i32 0, i32 0
  %208 = extractvalue { double, double } %204, 0
  store double %208, ptr %207, align 16
  %209 = getelementptr inbounds { double, double }, ptr %206, i32 0, i32 1
  %210 = extractvalue { double, double } %204, 1
  store double %210, ptr %209, align 8
  %211 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 0
  %212 = load double, ptr %211, align 16
  %213 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 1
  %214 = load double, ptr %213, align 8
  %215 = call { double, double } @_ZNK3JPH4QuatmlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(16) %203, double %212, double %214)
  %216 = getelementptr inbounds %"class.JPH::Vec3", ptr %23, i32 0, i32 0
  %217 = getelementptr inbounds %union.anon, ptr %216, i32 0, i32 0
  %218 = getelementptr inbounds { double, double }, ptr %217, i32 0, i32 0
  %219 = extractvalue { double, double } %215, 0
  store double %219, ptr %218, align 16
  %220 = getelementptr inbounds { double, double }, ptr %217, i32 0, i32 1
  %221 = extractvalue { double, double } %215, 1
  store double %221, ptr %220, align 8
  %222 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 0
  %223 = load double, ptr %222, align 16
  %224 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 1
  %225 = load double, ptr %224, align 8
  %226 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %202, double %223, double %225)
  %227 = getelementptr inbounds %"class.JPH::Vec3", ptr %22, i32 0, i32 0
  %228 = getelementptr inbounds %union.anon, ptr %227, i32 0, i32 0
  %229 = getelementptr inbounds { double, double }, ptr %228, i32 0, i32 0
  %230 = extractvalue { double, double } %226, 0
  store double %230, ptr %229, align 16
  %231 = getelementptr inbounds { double, double }, ptr %228, i32 0, i32 1
  %232 = extractvalue { double, double } %226, 1
  store double %232, ptr %231, align 8
  %233 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %52, i32 0, i32 25
  %234 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %52, i32 0, i32 1
  %235 = load ptr, ptr %234, align 16, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 64, ptr %25) #8
  %236 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %52, i32 0, i32 1
  %237 = load ptr, ptr %236, align 16, !tbaa !13
  %238 = call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %237)
  %239 = getelementptr inbounds %"class.JPH::Quat", ptr %26, i32 0, i32 0
  %240 = getelementptr inbounds %"class.JPH::Vec4", ptr %239, i32 0, i32 0
  %241 = getelementptr inbounds %union.anon.4, ptr %240, i32 0, i32 0
  %242 = getelementptr inbounds { double, double }, ptr %241, i32 0, i32 0
  %243 = extractvalue { double, double } %238, 0
  store double %243, ptr %242, align 16
  %244 = getelementptr inbounds { double, double }, ptr %241, i32 0, i32 1
  %245 = extractvalue { double, double } %238, 1
  store double %245, ptr %244, align 8
  %246 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 0
  %247 = load double, ptr %246, align 16
  %248 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 1
  %249 = load double, ptr %248, align 8
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %25, double %247, double %249)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %27, ptr align 16 %22, i64 16, i1 false), !tbaa.struct !22
  %250 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %52, i32 0, i32 2
  %251 = load ptr, ptr %250, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 64, ptr %28) #8
  %252 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %52, i32 0, i32 2
  %253 = load ptr, ptr %252, align 8, !tbaa !21
  %254 = call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %253)
  %255 = getelementptr inbounds %"class.JPH::Quat", ptr %29, i32 0, i32 0
  %256 = getelementptr inbounds %"class.JPH::Vec4", ptr %255, i32 0, i32 0
  %257 = getelementptr inbounds %union.anon.4, ptr %256, i32 0, i32 0
  %258 = getelementptr inbounds { double, double }, ptr %257, i32 0, i32 0
  %259 = extractvalue { double, double } %254, 0
  store double %259, ptr %258, align 16
  %260 = getelementptr inbounds { double, double }, ptr %257, i32 0, i32 1
  %261 = extractvalue { double, double } %254, 1
  store double %261, ptr %260, align 8
  %262 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 0
  %263 = load double, ptr %262, align 16
  %264 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 1
  %265 = load double, ptr %264, align 8
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %28, double %263, double %265)
  %266 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %52, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %30, ptr align 16 %266, i64 16, i1 false), !tbaa.struct !22
  %267 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 0
  %268 = load double, ptr %267, align 16
  %269 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 1
  %270 = load double, ptr %269, align 8
  %271 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 0
  %272 = load double, ptr %271, align 16
  %273 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 1
  %274 = load double, ptr %273, align 8
  call void @_ZN3JPH19PointConstraintPart29CalculateConstraintPropertiesERKNS_4BodyERKNS_5Mat44ENS_4Vec3ES3_S6_S7_(ptr noundef nonnull align 16 dereferenceable(240) %233, ptr noundef nonnull align 16 dereferenceable(122) %235, ptr noundef nonnull align 16 dereferenceable(64) %25, double %268, double %270, ptr noundef nonnull align 16 dereferenceable(122) %251, ptr noundef nonnull align 16 dereferenceable(64) %28, double %272, double %274)
  call void @llvm.lifetime.end.p0(i64 64, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr %25) #8
  %275 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %52, i32 0, i32 25
  %276 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %52, i32 0, i32 1
  %277 = load ptr, ptr %276, align 16, !tbaa !13
  %278 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %52, i32 0, i32 2
  %279 = load ptr, ptr %278, align 8, !tbaa !21
  %280 = load float, ptr %6, align 4, !tbaa !9
  %281 = call noundef zeroext i1 @_ZNK3JPH19PointConstraintPart23SolvePositionConstraintERNS_4BodyES2_f(ptr noundef nonnull align 16 dereferenceable(240) %275, ptr noundef nonnull align 16 dereferenceable(122) %277, ptr noundef nonnull align 16 dereferenceable(122) %279, float noundef %280)
  %282 = zext i1 %281 to i32
  %283 = load i8, ptr %7, align 1, !tbaa !11, !range !24, !noundef !25
  %284 = trunc i8 %283 to i1
  %285 = zext i1 %284 to i32
  %286 = or i32 %285, %282
  %287 = icmp ne i32 %286, 0
  %288 = zext i1 %287 to i8
  store i8 %288, ptr %7, align 1, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #8
  br label %475

289:                                              ; preds = %199
  %290 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint24IsTranslationConstrainedEv(ptr noundef nonnull align 16 dereferenceable(1856) %52)
  br i1 %290, label %291, label %474

291:                                              ; preds = %289
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #8
  store i32 0, ptr %31, align 4, !tbaa !26
  br label %292

292:                                              ; preds = %470, %291
  %293 = load i32, ptr %31, align 4, !tbaa !26
  %294 = icmp slt i32 %293, 3
  br i1 %294, label %296, label %295

295:                                              ; preds = %292
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  br label %473

296:                                              ; preds = %292
  %297 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %52, i32 0, i32 13
  %298 = load i32, ptr %31, align 4, !tbaa !26
  %299 = sext i32 %298 to i64
  %300 = getelementptr inbounds [3 x %"class.JPH::SpringSettings"], ptr %297, i64 0, i64 %299
  %301 = getelementptr inbounds %"class.JPH::SpringSettings", ptr %300, i32 0, i32 1
  %302 = load float, ptr %301, align 4, !tbaa !23
  %303 = fcmp ole float %302, 0.000000e+00
  br i1 %303, label %304, label %469

304:                                              ; preds = %296
  call void @llvm.lifetime.start.p0(i64 16, ptr %32) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %33) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %34) #8
  call void @_ZNK3JPH16SixDOFConstraint31GetPositionConstraintPropertiesERNS_4Vec3ES2_S2_(ptr noundef nonnull align 16 dereferenceable(1856) %52, ptr noundef nonnull align 16 dereferenceable(16) %32, ptr noundef nonnull align 16 dereferenceable(16) %33, ptr noundef nonnull align 16 dereferenceable(16) %34)
  call void @llvm.lifetime.start.p0(i64 16, ptr %35) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %36) #8
  %305 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %52, i32 0, i32 1
  %306 = load ptr, ptr %305, align 16, !tbaa !13
  %307 = call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %306)
  %308 = getelementptr inbounds %"class.JPH::Quat", ptr %36, i32 0, i32 0
  %309 = getelementptr inbounds %"class.JPH::Vec4", ptr %308, i32 0, i32 0
  %310 = getelementptr inbounds %union.anon.4, ptr %309, i32 0, i32 0
  %311 = getelementptr inbounds { double, double }, ptr %310, i32 0, i32 0
  %312 = extractvalue { double, double } %307, 0
  store double %312, ptr %311, align 16
  %313 = getelementptr inbounds { double, double }, ptr %310, i32 0, i32 1
  %314 = extractvalue { double, double } %307, 1
  store double %314, ptr %313, align 8
  %315 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %52, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %37, ptr align 16 %315, i64 16, i1 false), !tbaa.struct !22
  %316 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 0
  %317 = load double, ptr %316, align 16
  %318 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 1
  %319 = load double, ptr %318, align 8
  %320 = call { double, double } @_ZNK3JPH4QuatmlES0_(ptr noundef nonnull align 16 dereferenceable(16) %36, double %317, double %319)
  %321 = getelementptr inbounds %"class.JPH::Quat", ptr %35, i32 0, i32 0
  %322 = getelementptr inbounds %"class.JPH::Vec4", ptr %321, i32 0, i32 0
  %323 = getelementptr inbounds %union.anon.4, ptr %322, i32 0, i32 0
  %324 = getelementptr inbounds { double, double }, ptr %323, i32 0, i32 0
  %325 = extractvalue { double, double } %320, 0
  store double %325, ptr %324, align 16
  %326 = getelementptr inbounds { double, double }, ptr %323, i32 0, i32 1
  %327 = extractvalue { double, double } %320, 1
  store double %327, ptr %326, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %38) #8
  %328 = load i32, ptr %31, align 4, !tbaa !26
  switch i32 %328, label %345 [
    i32 0, label %329
    i32 1, label %337
  ]

329:                                              ; preds = %304
  call void @llvm.lifetime.start.p0(i64 16, ptr %39) #8
  %330 = call { double, double } @_ZNK3JPH4Quat11RotateAxisXEv(ptr noundef nonnull align 16 dereferenceable(16) %35)
  %331 = getelementptr inbounds %"class.JPH::Vec3", ptr %39, i32 0, i32 0
  %332 = getelementptr inbounds %union.anon, ptr %331, i32 0, i32 0
  %333 = getelementptr inbounds { double, double }, ptr %332, i32 0, i32 0
  %334 = extractvalue { double, double } %330, 0
  store double %334, ptr %333, align 16
  %335 = getelementptr inbounds { double, double }, ptr %332, i32 0, i32 1
  %336 = extractvalue { double, double } %330, 1
  store double %336, ptr %335, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %38, ptr align 16 %39, i64 16, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 16, ptr %39) #8
  br label %362

337:                                              ; preds = %304
  call void @llvm.lifetime.start.p0(i64 16, ptr %40) #8
  %338 = call { double, double } @_ZNK3JPH4Quat11RotateAxisYEv(ptr noundef nonnull align 16 dereferenceable(16) %35)
  %339 = getelementptr inbounds %"class.JPH::Vec3", ptr %40, i32 0, i32 0
  %340 = getelementptr inbounds %union.anon, ptr %339, i32 0, i32 0
  %341 = getelementptr inbounds { double, double }, ptr %340, i32 0, i32 0
  %342 = extractvalue { double, double } %338, 0
  store double %342, ptr %341, align 16
  %343 = getelementptr inbounds { double, double }, ptr %340, i32 0, i32 1
  %344 = extractvalue { double, double } %338, 1
  store double %344, ptr %343, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %38, ptr align 16 %40, i64 16, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 16, ptr %40) #8
  br label %362

345:                                              ; preds = %304
  br label %346

346:                                              ; preds = %345
  %347 = load i32, ptr %31, align 4, !tbaa !26
  %348 = icmp eq i32 %347, 2
  br i1 %348, label %352, label %349

349:                                              ; preds = %346
  %350 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.5, ptr noundef @.str.2, i32 noundef 753)
  br i1 %350, label %351, label %352

351:                                              ; preds = %349
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #8, !srcloc !27
  br label %352

352:                                              ; preds = %351, %349, %346
  br label %353

353:                                              ; preds = %352
  br label %354

354:                                              ; preds = %353
  call void @llvm.lifetime.start.p0(i64 16, ptr %42) #8
  %355 = call { double, double } @_ZNK3JPH4Quat11RotateAxisZEv(ptr noundef nonnull align 16 dereferenceable(16) %35)
  %356 = getelementptr inbounds %"class.JPH::Vec3", ptr %42, i32 0, i32 0
  %357 = getelementptr inbounds %union.anon, ptr %356, i32 0, i32 0
  %358 = getelementptr inbounds { double, double }, ptr %357, i32 0, i32 0
  %359 = extractvalue { double, double } %355, 0
  store double %359, ptr %358, align 16
  %360 = getelementptr inbounds { double, double }, ptr %357, i32 0, i32 1
  %361 = extractvalue { double, double } %355, 1
  store double %361, ptr %360, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %38, ptr align 16 %42, i64 16, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 16, ptr %42) #8
  br label %362

362:                                              ; preds = %354, %337, %329
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #8
  store float 0.000000e+00, ptr %43, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #8
  %363 = load i32, ptr %31, align 4, !tbaa !26
  %364 = add nsw i32 0, %363
  store i32 %364, ptr %44, align 4, !tbaa !28
  %365 = load i32, ptr %44, align 4, !tbaa !28
  %366 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint11IsFixedAxisENS_24SixDOFConstraintSettings5EAxisE(ptr noundef nonnull align 16 dereferenceable(1856) %52, i32 noundef %365)
  br i1 %366, label %367, label %379

367:                                              ; preds = %362
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %45, ptr align 16 %38, i64 16, i1 false), !tbaa.struct !22
  %368 = getelementptr inbounds { double, double }, ptr %45, i32 0, i32 0
  %369 = load double, ptr %368, align 16
  %370 = getelementptr inbounds { double, double }, ptr %45, i32 0, i32 1
  %371 = load double, ptr %370, align 8
  %372 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %34, double %369, double %371)
  %373 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %52, i32 0, i32 11
  %374 = load i32, ptr %44, align 4, !tbaa !28
  %375 = zext i32 %374 to i64
  %376 = getelementptr inbounds [6 x float], ptr %373, i64 0, i64 %375
  %377 = load float, ptr %376, align 4, !tbaa !9
  %378 = fsub float %372, %377
  store float %378, ptr %43, align 4, !tbaa !9
  br label %422

379:                                              ; preds = %362
  %380 = load i32, ptr %44, align 4, !tbaa !28
  %381 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint10IsFreeAxisENS_24SixDOFConstraintSettings5EAxisE(ptr noundef nonnull align 16 dereferenceable(1856) %52, i32 noundef %380)
  br i1 %381, label %421, label %382

382:                                              ; preds = %379
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %47, ptr align 16 %38, i64 16, i1 false), !tbaa.struct !22
  %383 = getelementptr inbounds { double, double }, ptr %47, i32 0, i32 0
  %384 = load double, ptr %383, align 16
  %385 = getelementptr inbounds { double, double }, ptr %47, i32 0, i32 1
  %386 = load double, ptr %385, align 8
  %387 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %34, double %384, double %386)
  store float %387, ptr %46, align 4, !tbaa !9
  %388 = load float, ptr %46, align 4, !tbaa !9
  %389 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %52, i32 0, i32 11
  %390 = load i32, ptr %44, align 4, !tbaa !28
  %391 = zext i32 %390 to i64
  %392 = getelementptr inbounds [6 x float], ptr %389, i64 0, i64 %391
  %393 = load float, ptr %392, align 4, !tbaa !9
  %394 = fcmp ole float %388, %393
  br i1 %394, label %395, label %403

395:                                              ; preds = %382
  %396 = load float, ptr %46, align 4, !tbaa !9
  %397 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %52, i32 0, i32 11
  %398 = load i32, ptr %44, align 4, !tbaa !28
  %399 = zext i32 %398 to i64
  %400 = getelementptr inbounds [6 x float], ptr %397, i64 0, i64 %399
  %401 = load float, ptr %400, align 4, !tbaa !9
  %402 = fsub float %396, %401
  store float %402, ptr %43, align 4, !tbaa !9
  br label %420

403:                                              ; preds = %382
  %404 = load float, ptr %46, align 4, !tbaa !9
  %405 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %52, i32 0, i32 12
  %406 = load i32, ptr %44, align 4, !tbaa !28
  %407 = zext i32 %406 to i64
  %408 = getelementptr inbounds [6 x float], ptr %405, i64 0, i64 %407
  %409 = load float, ptr %408, align 4, !tbaa !9
  %410 = fcmp oge float %404, %409
  br i1 %410, label %411, label %419

411:                                              ; preds = %403
  %412 = load float, ptr %46, align 4, !tbaa !9
  %413 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %52, i32 0, i32 12
  %414 = load i32, ptr %44, align 4, !tbaa !28
  %415 = zext i32 %414 to i64
  %416 = getelementptr inbounds [6 x float], ptr %413, i64 0, i64 %415
  %417 = load float, ptr %416, align 4, !tbaa !9
  %418 = fsub float %412, %417
  store float %418, ptr %43, align 4, !tbaa !9
  br label %419

419:                                              ; preds = %411, %403
  br label %420

420:                                              ; preds = %419, %395
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #8
  br label %421

421:                                              ; preds = %420, %379
  br label %422

422:                                              ; preds = %421, %367
  %423 = load float, ptr %43, align 4, !tbaa !9
  %424 = fcmp une float %423, 0.000000e+00
  br i1 %424, label %425, label %468

425:                                              ; preds = %422
  %426 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %52, i32 0, i32 24
  %427 = load i32, ptr %31, align 4, !tbaa !26
  %428 = sext i32 %427 to i64
  %429 = getelementptr inbounds [3 x %"class.JPH::AxisConstraintPart"], ptr %426, i64 0, i64 %428
  %430 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %52, i32 0, i32 1
  %431 = load ptr, ptr %430, align 16, !tbaa !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %48, ptr align 16 %32, i64 16, i1 false), !tbaa.struct !22
  %432 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %52, i32 0, i32 2
  %433 = load ptr, ptr %432, align 8, !tbaa !21
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %49, ptr align 16 %33, i64 16, i1 false), !tbaa.struct !22
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %50, ptr align 16 %38, i64 16, i1 false), !tbaa.struct !22
  %434 = getelementptr inbounds { double, double }, ptr %48, i32 0, i32 0
  %435 = load double, ptr %434, align 16
  %436 = getelementptr inbounds { double, double }, ptr %48, i32 0, i32 1
  %437 = load double, ptr %436, align 8
  %438 = getelementptr inbounds { double, double }, ptr %49, i32 0, i32 0
  %439 = load double, ptr %438, align 16
  %440 = getelementptr inbounds { double, double }, ptr %49, i32 0, i32 1
  %441 = load double, ptr %440, align 8
  %442 = getelementptr inbounds { double, double }, ptr %50, i32 0, i32 0
  %443 = load double, ptr %442, align 16
  %444 = getelementptr inbounds { double, double }, ptr %50, i32 0, i32 1
  %445 = load double, ptr %444, align 8
  call void @_ZN3JPH18AxisConstraintPart29CalculateConstraintPropertiesERKNS_4BodyENS_4Vec3ES3_S4_S4_f(ptr noundef nonnull align 4 dereferenceable(64) %429, ptr noundef nonnull align 16 dereferenceable(122) %431, double %435, double %437, ptr noundef nonnull align 16 dereferenceable(122) %433, double %439, double %441, double %443, double %445, float noundef 0.000000e+00)
  %446 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %52, i32 0, i32 24
  %447 = load i32, ptr %31, align 4, !tbaa !26
  %448 = sext i32 %447 to i64
  %449 = getelementptr inbounds [3 x %"class.JPH::AxisConstraintPart"], ptr %446, i64 0, i64 %448
  %450 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %52, i32 0, i32 1
  %451 = load ptr, ptr %450, align 16, !tbaa !13
  %452 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %52, i32 0, i32 2
  %453 = load ptr, ptr %452, align 8, !tbaa !21
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %51, ptr align 16 %38, i64 16, i1 false), !tbaa.struct !22
  %454 = load float, ptr %43, align 4, !tbaa !9
  %455 = load float, ptr %6, align 4, !tbaa !9
  %456 = getelementptr inbounds { double, double }, ptr %51, i32 0, i32 0
  %457 = load double, ptr %456, align 16
  %458 = getelementptr inbounds { double, double }, ptr %51, i32 0, i32 1
  %459 = load double, ptr %458, align 8
  %460 = call noundef zeroext i1 @_ZNK3JPH18AxisConstraintPart23SolvePositionConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 4 dereferenceable(64) %449, ptr noundef nonnull align 16 dereferenceable(122) %451, ptr noundef nonnull align 16 dereferenceable(122) %453, double %457, double %459, float noundef %454, float noundef %455)
  %461 = zext i1 %460 to i32
  %462 = load i8, ptr %7, align 1, !tbaa !11, !range !24, !noundef !25
  %463 = trunc i8 %462 to i1
  %464 = zext i1 %463 to i32
  %465 = or i32 %464, %461
  %466 = icmp ne i32 %465, 0
  %467 = zext i1 %466 to i8
  store i8 %467, ptr %7, align 1, !tbaa !11
  br label %468

468:                                              ; preds = %425, %422
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %38) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #8
  br label %469

469:                                              ; preds = %468, %296
  br label %470

470:                                              ; preds = %469
  %471 = load i32, ptr %31, align 4, !tbaa !26
  %472 = add nsw i32 %471, 1
  store i32 %472, ptr %31, align 4, !tbaa !26
  br label %292, !llvm.loop !30

473:                                              ; preds = %295
  br label %474

474:                                              ; preds = %473, %289
  br label %475

475:                                              ; preds = %474, %201
  %476 = load i8, ptr %7, align 1, !tbaa !11, !range !24, !noundef !25
  %477 = trunc i8 %476 to i1
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #8
  ret i1 %477
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Quat12sEulerAnglesENS_4Vec3E(double, double) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH16SixDOFConstraint20GetRotationLimitsMinEv(ptr noundef nonnull align 16 dereferenceable(1856)) #4 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) #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH16SixDOFConstraint23GetTranslationLimitsMinEv(ptr noundef nonnull align 16 dereferenceable(1856)) #4 align 2

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

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Quat11RotateAxisZEv(ptr noundef nonnull align 16 dereferenceable(16)) #3 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) #2 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 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 = { 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 = { 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 #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, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !6, i64 32}
!14 = !{!"_ZTSN3JPH17TwoBodyConstraintE", !15, i64 0, !6, i64 32, !6, i64 40}
!15 = !{!"_ZTSN3JPH10ConstraintE", !16, i64 8, !19, i64 12, !19, i64 16, !7, i64 20, !7, i64 21, !12, i64 22, !20, i64 24}
!16 = !{!"_ZTSN3JPH9RefTargetINS_10ConstraintEEE", !17, i64 0}
!17 = !{!"_ZTSSt6atomicIjE", !18, i64 0}
!18 = !{!"_ZTSSt13__atomic_baseIjE", !19, i64 0}
!19 = !{!"int", !7, i64 0}
!20 = !{!"long", !7, i64 0}
!21 = !{!14, !6, i64 40}
!22 = !{i64 0, i64 16, !23}
!23 = !{!7, !7, i64 0}
!24 = !{i8 0, i8 2}
!25 = !{}
!26 = !{!19, !19, i64 0}
!27 = !{i64 2158402822}
!28 = !{!29, !29, i64 0}
!29 = !{!"_ZTSN3JPH24SixDOFConstraintSettings5EAxisE", !7, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}


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

; 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 { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH16SixDOFConstraint28GetRotationInConstraintSpaceEv(ptr noundef nonnull align 16 dereferenceable(1856)) 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 #2 align 2

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

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

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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint11IsFixedAxisENS_24SixDOFConstraintSettings5EAxisE(ptr noundef nonnull align 16 dereferenceable(1856), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint10IsFreeAxisENS_24SixDOFConstraintSettings5EAxisE(ptr noundef nonnull align 16 dereferenceable(1856), i32 noundef) local_unnamed_addr #4 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint26IsRotationFullyConstrainedEv(ptr noundef nonnull align 16 dereferenceable(1856)) 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 @_ZNK3JPH16SixDOFConstraint21IsRotationConstrainedEv(ptr noundef nonnull align 16 dereferenceable(1856)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3JPH16SixDOFConstraint23SolvePositionConstraintEff(ptr noundef nonnull align 16 dereferenceable(1856) %0, float noundef %1, float noundef %2) unnamed_addr #3 align 2 {
  %4 = alloca %"class.JPH::Quat", 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::Vec3", align 16
  %10 = alloca %"class.JPH::Vec3", align 16
  %11 = alloca %"class.JPH::Vec3", align 16
  %12 = alloca %"class.JPH::Quat", align 16
  %13 = alloca %"class.JPH::Quat", align 16
  %14 = tail call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint26IsRotationFullyConstrainedEv(ptr noundef nonnull align 16 dereferenceable(1856) %0)
  br i1 %14, label %15, label %48

15:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #7
  %16 = getelementptr inbounds i8, ptr %0, i64 80
  %17 = tail call { double, double } @_ZNK3JPH16SixDOFConstraint20GetRotationLimitsMinEv(ptr noundef nonnull align 16 dereferenceable(1856) %0)
  %18 = extractvalue { double, double } %17, 0
  %19 = extractvalue { double, double } %17, 1
  %20 = tail call { double, double } @_ZN3JPH4Quat12sEulerAnglesENS_4Vec3E(double %18, double %19)
  %21 = extractvalue { double, double } %20, 0
  %22 = extractvalue { double, double } %20, 1
  %23 = tail call { double, double } @_ZNK3JPH4QuatmlES0_(ptr noundef nonnull align 16 dereferenceable(16) %16, double %21, double %22)
  %24 = extractvalue { double, double } %23, 0
  store double %24, ptr %4, align 16
  %25 = getelementptr inbounds i8, ptr %4, i64 8
  %26 = extractvalue { double, double } %23, 1
  store double %26, ptr %25, align 8
  %27 = getelementptr inbounds i8, ptr %0, i64 96
  %28 = call { double, double } @_ZNK3JPH4Quat10ConjugatedEv(ptr noundef nonnull align 16 dereferenceable(16) %4)
  %29 = extractvalue { double, double } %28, 0
  %30 = extractvalue { double, double } %28, 1
  %31 = call { double, double } @_ZNK3JPH4QuatmlES0_(ptr noundef nonnull align 16 dereferenceable(16) %27, double %29, double %30)
  %32 = extractvalue { double, double } %31, 0
  %33 = extractvalue { double, double } %31, 1
  %34 = getelementptr inbounds i8, ptr %0, i64 1312
  %35 = getelementptr inbounds i8, ptr %0, i64 32
  %36 = load ptr, ptr %35, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %5) #7
  %37 = call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %36)
  %38 = extractvalue { double, double } %37, 0
  %39 = extractvalue { double, double } %37, 1
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %5, double %38, double %39)
  %40 = getelementptr inbounds i8, ptr %0, i64 40
  %41 = load ptr, ptr %40, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %6) #7
  %42 = call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %41)
  %43 = extractvalue { double, double } %42, 0
  %44 = extractvalue { double, double } %42, 1
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %6, double %43, double %44)
  call void @_ZN3JPH27RotationEulerConstraintPart29CalculateConstraintPropertiesERKNS_4BodyERKNS_5Mat44ES3_S6_(ptr noundef nonnull align 16 dereferenceable(208) %34, ptr noundef nonnull align 16 dereferenceable(122) %36, ptr noundef nonnull align 16 dereferenceable(64) %5, ptr noundef nonnull align 16 dereferenceable(122) %41, ptr noundef nonnull align 16 dereferenceable(64) %6)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %5) #7
  %45 = load ptr, ptr %35, align 16, !tbaa !5
  %46 = load ptr, ptr %40, align 8, !tbaa !17
  %47 = call noundef zeroext i1 @_ZNK3JPH27RotationEulerConstraintPart23SolvePositionConstraintERNS_4BodyES2_NS_4QuatEf(ptr noundef nonnull align 16 dereferenceable(208) %34, ptr noundef nonnull align 16 dereferenceable(122) %45, ptr noundef nonnull align 16 dereferenceable(122) %46, double %32, double %33, float noundef %2)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  br label %62

48:                                               ; preds = %3
  %49 = tail call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint21IsRotationConstrainedEv(ptr noundef nonnull align 16 dereferenceable(1856) %0)
  br i1 %49, label %50, label %62

50:                                               ; preds = %48
  %51 = tail call { double, double } @_ZNK3JPH16SixDOFConstraint28GetRotationInConstraintSpaceEv(ptr noundef nonnull align 16 dereferenceable(1856) %0)
  %52 = extractvalue { double, double } %51, 0
  %53 = extractvalue { double, double } %51, 1
  %54 = getelementptr inbounds i8, ptr %0, i64 1040
  %55 = getelementptr inbounds i8, ptr %0, i64 32
  %56 = load ptr, ptr %55, align 16, !tbaa !5
  %57 = getelementptr inbounds i8, ptr %0, i64 40
  %58 = load ptr, ptr %57, align 8, !tbaa !17
  %59 = getelementptr inbounds i8, ptr %0, i64 80
  %.sroa.054.0.copyload = load double, ptr %59, align 16
  %.sroa.255.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 88
  %.sroa.255.0.copyload = load double, ptr %.sroa.255.0..sroa_idx, align 8, !tbaa !18
  %60 = getelementptr inbounds i8, ptr %0, i64 96
  %.sroa.052.0.copyload = load double, ptr %60, align 16
  %.sroa.253.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 104
  %.sroa.253.0.copyload = load double, ptr %.sroa.253.0..sroa_idx, align 8, !tbaa !18
  %61 = tail call noundef zeroext i1 @_ZNK3JPH24SwingTwistConstraintPart23SolvePositionConstraintERNS_4BodyES2_NS_4QuatES3_S3_f(ptr noundef nonnull align 16 dereferenceable(272) %54, ptr noundef nonnull align 16 dereferenceable(122) %56, ptr noundef nonnull align 16 dereferenceable(122) %58, double %52, double %53, double %.sroa.054.0.copyload, double %.sroa.255.0.copyload, double %.sroa.052.0.copyload, double %.sroa.253.0.copyload, float noundef %2)
  br label %62

62:                                               ; preds = %48, %50, %15
  %.0.shrunk = phi i1 [ %47, %15 ], [ %61, %50 ], [ false, %48 ]
  %63 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint29IsTranslationFullyConstrainedEv(ptr noundef nonnull align 16 dereferenceable(1856) %0)
  br i1 %63, label %64, label %92

64:                                               ; preds = %62
  %65 = getelementptr inbounds i8, ptr %0, i64 48
  %66 = getelementptr inbounds i8, ptr %0, i64 80
  %67 = call { double, double } @_ZNK3JPH16SixDOFConstraint23GetTranslationLimitsMinEv(ptr noundef nonnull align 16 dereferenceable(1856) %0)
  %68 = extractvalue { double, double } %67, 0
  %69 = extractvalue { double, double } %67, 1
  %70 = call { double, double } @_ZNK3JPH4QuatmlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(16) %66, double %68, double %69)
  %71 = extractvalue { double, double } %70, 0
  %72 = extractvalue { double, double } %70, 1
  %73 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %65, double %71, double %72)
  %74 = extractvalue { double, double } %73, 0
  %75 = extractvalue { double, double } %73, 1
  %76 = getelementptr inbounds i8, ptr %0, i64 800
  %77 = getelementptr inbounds i8, ptr %0, i64 32
  %78 = load ptr, ptr %77, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %7) #7
  %79 = call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %78)
  %80 = extractvalue { double, double } %79, 0
  %81 = extractvalue { double, double } %79, 1
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %7, double %80, double %81)
  %82 = getelementptr inbounds i8, ptr %0, i64 40
  %83 = load ptr, ptr %82, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8) #7
  %84 = call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %83)
  %85 = extractvalue { double, double } %84, 0
  %86 = extractvalue { double, double } %84, 1
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %8, double %85, double %86)
  %87 = getelementptr inbounds i8, ptr %0, i64 64
  %.sroa.038.0.copyload = load double, ptr %87, align 16
  %.sroa.239.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 72
  %.sroa.239.0.copyload = load double, ptr %.sroa.239.0..sroa_idx, align 8, !tbaa !18
  call void @_ZN3JPH19PointConstraintPart29CalculateConstraintPropertiesERKNS_4BodyERKNS_5Mat44ENS_4Vec3ES3_S6_S7_(ptr noundef nonnull align 16 dereferenceable(240) %76, ptr noundef nonnull align 16 dereferenceable(122) %78, ptr noundef nonnull align 16 dereferenceable(64) %7, double %74, double %75, ptr noundef nonnull align 16 dereferenceable(122) %83, ptr noundef nonnull align 16 dereferenceable(64) %8, double %.sroa.038.0.copyload, double %.sroa.239.0.copyload)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #7
  %88 = load ptr, ptr %77, align 16, !tbaa !5
  %89 = load ptr, ptr %82, align 8, !tbaa !17
  %90 = call noundef zeroext i1 @_ZNK3JPH19PointConstraintPart23SolvePositionConstraintERNS_4BodyES2_f(ptr noundef nonnull align 16 dereferenceable(240) %76, ptr noundef nonnull align 16 dereferenceable(122) %88, ptr noundef nonnull align 16 dereferenceable(122) %89, float noundef %2)
  %91 = or i1 %.0.shrunk, %90
  br label %.loopexit

92:                                               ; preds = %62
  %93 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint24IsTranslationConstrainedEv(ptr noundef nonnull align 16 dereferenceable(1856) %0)
  br i1 %93, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %92
  %94 = getelementptr inbounds i8, ptr %0, i64 32
  %95 = getelementptr inbounds i8, ptr %13, i64 8
  %96 = getelementptr inbounds i8, ptr %0, i64 80
  %.sroa.229.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 88
  %97 = getelementptr inbounds i8, ptr %12, i64 8
  %98 = getelementptr inbounds i8, ptr %0, i64 120
  %99 = getelementptr inbounds i8, ptr %0, i64 144
  %100 = getelementptr inbounds i8, ptr %0, i64 604
  %.sroa.26.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 8
  %101 = getelementptr inbounds i8, ptr %0, i64 40
  %.sroa.24.0..sroa_idx = getelementptr inbounds i8, ptr %10, i64 8
  %102 = getelementptr inbounds i8, ptr %0, i64 172
  %103 = load float, ptr %102, align 4, !tbaa !18
  %104 = fcmp ugt float %103, 0.000000e+00
  br i1 %104, label %141, label %105

105:                                              ; preds = %.preheader
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #7
  call void @_ZNK3JPH16SixDOFConstraint31GetPositionConstraintPropertiesERNS_4Vec3ES2_S2_(ptr noundef nonnull align 16 dereferenceable(1856) %0, ptr noundef nonnull align 16 dereferenceable(16) %9, ptr noundef nonnull align 16 dereferenceable(16) %10, ptr noundef nonnull align 16 dereferenceable(16) %11)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #7
  %106 = load ptr, ptr %94, align 16, !tbaa !5
  %107 = call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %106)
  %108 = extractvalue { double, double } %107, 0
  store double %108, ptr %13, align 16
  %109 = extractvalue { double, double } %107, 1
  store double %109, ptr %95, align 8
  %.sroa.028.0.copyload = load double, ptr %96, align 16
  %.sroa.229.0.copyload = load double, ptr %.sroa.229.0..sroa_idx, align 8, !tbaa !18
  %110 = call { double, double } @_ZNK3JPH4QuatmlES0_(ptr noundef nonnull align 16 dereferenceable(16) %13, double %.sroa.028.0.copyload, double %.sroa.229.0.copyload)
  %111 = extractvalue { double, double } %110, 0
  store double %111, ptr %12, align 16
  %112 = extractvalue { double, double } %110, 1
  store double %112, ptr %97, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #7
  %113 = call { double, double } @_ZNK3JPH4Quat11RotateAxisXEv(ptr noundef nonnull align 16 dereferenceable(16) %12)
  %.sroa.9.0 = extractvalue { double, double } %113, 1
  %.sroa.027.0 = extractvalue { double, double } %113, 0
  %114 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint11IsFixedAxisENS_24SixDOFConstraintSettings5EAxisE(ptr noundef nonnull align 16 dereferenceable(1856) %0, i32 noundef 0)
  br i1 %114, label %115, label %119

115:                                              ; preds = %105
  %116 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %11, double %.sroa.027.0, double %.sroa.9.0)
  %117 = load float, ptr %98, align 8, !tbaa !19
  %118 = fsub float %116, %117
  br label %132

119:                                              ; preds = %105
  %120 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint10IsFreeAxisENS_24SixDOFConstraintSettings5EAxisE(ptr noundef nonnull align 16 dereferenceable(1856) %0, i32 noundef 0)
  br i1 %120, label %.thread, label %121

121:                                              ; preds = %119
  %122 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %11, double %.sroa.027.0, double %.sroa.9.0)
  %123 = load float, ptr %98, align 8, !tbaa !19
  %124 = fcmp ugt float %122, %123
  br i1 %124, label %127, label %125

125:                                              ; preds = %121
  %126 = fsub float %122, %123
  br label %132

127:                                              ; preds = %121
  %128 = load float, ptr %99, align 16, !tbaa !19
  %129 = fcmp ult float %122, %128
  br i1 %129, label %.thread, label %130

130:                                              ; preds = %127
  %131 = fsub float %122, %128
  br label %132

132:                                              ; preds = %125, %130, %115
  %.186 = phi float [ %118, %115 ], [ %126, %125 ], [ %131, %130 ]
  %133 = fcmp une float %.186, 0.000000e+00
  br i1 %133, label %134, label %.thread

134:                                              ; preds = %132
  %135 = load ptr, ptr %94, align 16, !tbaa !5
  %.sroa.05.0.copyload = load double, ptr %9, align 16
  %.sroa.26.0.copyload = load double, ptr %.sroa.26.0..sroa_idx, align 8, !tbaa !18
  %136 = load ptr, ptr %101, align 8, !tbaa !17
  %.sroa.03.0.copyload = load double, ptr %10, align 16
  %.sroa.24.0.copyload = load double, ptr %.sroa.24.0..sroa_idx, align 8, !tbaa !18
  call void @_ZN3JPH18AxisConstraintPart29CalculateConstraintPropertiesERKNS_4BodyENS_4Vec3ES3_S4_S4_f(ptr noundef nonnull align 4 dereferenceable(64) %100, ptr noundef nonnull align 16 dereferenceable(122) %135, double %.sroa.05.0.copyload, double %.sroa.26.0.copyload, ptr noundef nonnull align 16 dereferenceable(122) %136, double %.sroa.03.0.copyload, double %.sroa.24.0.copyload, double %.sroa.027.0, double %.sroa.9.0, float noundef 0.000000e+00)
  %137 = load ptr, ptr %94, align 16, !tbaa !5
  %138 = load ptr, ptr %101, align 8, !tbaa !17
  %139 = call noundef zeroext i1 @_ZNK3JPH18AxisConstraintPart23SolvePositionConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 4 dereferenceable(64) %100, ptr noundef nonnull align 16 dereferenceable(122) %137, ptr noundef nonnull align 16 dereferenceable(122) %138, double %.sroa.027.0, double %.sroa.9.0, float noundef %.186, float noundef %2)
  %140 = or i1 %.0.shrunk, %139
  br label %.thread

.thread:                                          ; preds = %127, %119, %134, %132
  %.2 = phi i1 [ %140, %134 ], [ %.0.shrunk, %132 ], [ %.0.shrunk, %119 ], [ %.0.shrunk, %127 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #7
  br label %141

141:                                              ; preds = %.preheader, %.thread
  %.3 = phi i1 [ %.2, %.thread ], [ %.0.shrunk, %.preheader ]
  %142 = getelementptr inbounds i8, ptr %0, i64 184
  %143 = load float, ptr %142, align 8, !tbaa !18
  %144 = fcmp ugt float %143, 0.000000e+00
  br i1 %144, label %185, label %145

145:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #7
  call void @_ZNK3JPH16SixDOFConstraint31GetPositionConstraintPropertiesERNS_4Vec3ES2_S2_(ptr noundef nonnull align 16 dereferenceable(1856) %0, ptr noundef nonnull align 16 dereferenceable(16) %9, ptr noundef nonnull align 16 dereferenceable(16) %10, ptr noundef nonnull align 16 dereferenceable(16) %11)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #7
  %146 = load ptr, ptr %94, align 16, !tbaa !5
  %147 = call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %146)
  %148 = extractvalue { double, double } %147, 0
  store double %148, ptr %13, align 16
  %149 = extractvalue { double, double } %147, 1
  store double %149, ptr %95, align 8
  %.sroa.028.0.copyload.1 = load double, ptr %96, align 16
  %.sroa.229.0.copyload.1 = load double, ptr %.sroa.229.0..sroa_idx, align 8, !tbaa !18
  %150 = call { double, double } @_ZNK3JPH4QuatmlES0_(ptr noundef nonnull align 16 dereferenceable(16) %13, double %.sroa.028.0.copyload.1, double %.sroa.229.0.copyload.1)
  %151 = extractvalue { double, double } %150, 0
  store double %151, ptr %12, align 16
  %152 = extractvalue { double, double } %150, 1
  store double %152, ptr %97, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #7
  %153 = call { double, double } @_ZNK3JPH4Quat11RotateAxisYEv(ptr noundef nonnull align 16 dereferenceable(16) %12)
  %.sroa.9.0.1 = extractvalue { double, double } %153, 1
  %.sroa.027.0.1 = extractvalue { double, double } %153, 0
  %154 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint11IsFixedAxisENS_24SixDOFConstraintSettings5EAxisE(ptr noundef nonnull align 16 dereferenceable(1856) %0, i32 noundef 1)
  br i1 %154, label %170, label %155

155:                                              ; preds = %145
  %156 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint10IsFreeAxisENS_24SixDOFConstraintSettings5EAxisE(ptr noundef nonnull align 16 dereferenceable(1856) %0, i32 noundef 1)
  br i1 %156, label %.thread.1, label %157

157:                                              ; preds = %155
  %158 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %11, double %.sroa.027.0.1, double %.sroa.9.0.1)
  %159 = getelementptr inbounds i8, ptr %0, i64 124
  %160 = load float, ptr %159, align 4, !tbaa !19
  %161 = fcmp ugt float %158, %160
  br i1 %161, label %164, label %162

162:                                              ; preds = %157
  %163 = fsub float %158, %160
  br label %175

164:                                              ; preds = %157
  %165 = getelementptr inbounds i8, ptr %0, i64 148
  %166 = load float, ptr %165, align 4, !tbaa !19
  %167 = fcmp ult float %158, %166
  br i1 %167, label %.thread.1, label %168

168:                                              ; preds = %164
  %169 = fsub float %158, %166
  br label %175

170:                                              ; preds = %145
  %171 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %11, double %.sroa.027.0.1, double %.sroa.9.0.1)
  %172 = getelementptr inbounds i8, ptr %0, i64 124
  %173 = load float, ptr %172, align 4, !tbaa !19
  %174 = fsub float %171, %173
  br label %175

175:                                              ; preds = %170, %168, %162
  %.186.1 = phi float [ %174, %170 ], [ %163, %162 ], [ %169, %168 ]
  %176 = fcmp une float %.186.1, 0.000000e+00
  br i1 %176, label %177, label %.thread.1

177:                                              ; preds = %175
  %178 = getelementptr inbounds i8, ptr %0, i64 668
  %179 = load ptr, ptr %94, align 16, !tbaa !5
  %.sroa.05.0.copyload.1 = load double, ptr %9, align 16
  %.sroa.26.0.copyload.1 = load double, ptr %.sroa.26.0..sroa_idx, align 8, !tbaa !18
  %180 = load ptr, ptr %101, align 8, !tbaa !17
  %.sroa.03.0.copyload.1 = load double, ptr %10, align 16
  %.sroa.24.0.copyload.1 = load double, ptr %.sroa.24.0..sroa_idx, align 8, !tbaa !18
  call void @_ZN3JPH18AxisConstraintPart29CalculateConstraintPropertiesERKNS_4BodyENS_4Vec3ES3_S4_S4_f(ptr noundef nonnull align 4 dereferenceable(64) %178, ptr noundef nonnull align 16 dereferenceable(122) %179, double %.sroa.05.0.copyload.1, double %.sroa.26.0.copyload.1, ptr noundef nonnull align 16 dereferenceable(122) %180, double %.sroa.03.0.copyload.1, double %.sroa.24.0.copyload.1, double %.sroa.027.0.1, double %.sroa.9.0.1, float noundef 0.000000e+00)
  %181 = load ptr, ptr %94, align 16, !tbaa !5
  %182 = load ptr, ptr %101, align 8, !tbaa !17
  %183 = call noundef zeroext i1 @_ZNK3JPH18AxisConstraintPart23SolvePositionConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 4 dereferenceable(64) %178, ptr noundef nonnull align 16 dereferenceable(122) %181, ptr noundef nonnull align 16 dereferenceable(122) %182, double %.sroa.027.0.1, double %.sroa.9.0.1, float noundef %.186.1, float noundef %2)
  %184 = or i1 %.3, %183
  br label %.thread.1

.thread.1:                                        ; preds = %177, %175, %164, %155
  %.2.1 = phi i1 [ %184, %177 ], [ %.3, %175 ], [ %.3, %155 ], [ %.3, %164 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #7
  br label %185

185:                                              ; preds = %.thread.1, %141
  %.3.1 = phi i1 [ %.2.1, %.thread.1 ], [ %.3, %141 ]
  %186 = getelementptr inbounds i8, ptr %0, i64 196
  %187 = load float, ptr %186, align 4, !tbaa !18
  %188 = fcmp ugt float %187, 0.000000e+00
  br i1 %188, label %.loopexit, label %189

189:                                              ; preds = %185
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #7
  call void @_ZNK3JPH16SixDOFConstraint31GetPositionConstraintPropertiesERNS_4Vec3ES2_S2_(ptr noundef nonnull align 16 dereferenceable(1856) %0, ptr noundef nonnull align 16 dereferenceable(16) %9, ptr noundef nonnull align 16 dereferenceable(16) %10, ptr noundef nonnull align 16 dereferenceable(16) %11)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #7
  %190 = load ptr, ptr %94, align 16, !tbaa !5
  %191 = call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %190)
  %192 = extractvalue { double, double } %191, 0
  store double %192, ptr %13, align 16
  %193 = extractvalue { double, double } %191, 1
  store double %193, ptr %95, align 8
  %.sroa.028.0.copyload.2 = load double, ptr %96, align 16
  %.sroa.229.0.copyload.2 = load double, ptr %.sroa.229.0..sroa_idx, align 8, !tbaa !18
  %194 = call { double, double } @_ZNK3JPH4QuatmlES0_(ptr noundef nonnull align 16 dereferenceable(16) %13, double %.sroa.028.0.copyload.2, double %.sroa.229.0.copyload.2)
  %195 = extractvalue { double, double } %194, 0
  store double %195, ptr %12, align 16
  %196 = extractvalue { double, double } %194, 1
  store double %196, ptr %97, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #7
  %197 = call { double, double } @_ZNK3JPH4Quat11RotateAxisZEv(ptr noundef nonnull align 16 dereferenceable(16) %12)
  %.sroa.9.0.2 = extractvalue { double, double } %197, 1
  %.sroa.027.0.2 = extractvalue { double, double } %197, 0
  %198 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint11IsFixedAxisENS_24SixDOFConstraintSettings5EAxisE(ptr noundef nonnull align 16 dereferenceable(1856) %0, i32 noundef 2)
  br i1 %198, label %214, label %199

199:                                              ; preds = %189
  %200 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint10IsFreeAxisENS_24SixDOFConstraintSettings5EAxisE(ptr noundef nonnull align 16 dereferenceable(1856) %0, i32 noundef 2)
  br i1 %200, label %.thread.2, label %201

201:                                              ; preds = %199
  %202 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %11, double %.sroa.027.0.2, double %.sroa.9.0.2)
  %203 = getelementptr inbounds i8, ptr %0, i64 128
  %204 = load float, ptr %203, align 16, !tbaa !19
  %205 = fcmp ugt float %202, %204
  br i1 %205, label %208, label %206

206:                                              ; preds = %201
  %207 = fsub float %202, %204
  br label %219

208:                                              ; preds = %201
  %209 = getelementptr inbounds i8, ptr %0, i64 152
  %210 = load float, ptr %209, align 8, !tbaa !19
  %211 = fcmp ult float %202, %210
  br i1 %211, label %.thread.2, label %212

212:                                              ; preds = %208
  %213 = fsub float %202, %210
  br label %219

214:                                              ; preds = %189
  %215 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %11, double %.sroa.027.0.2, double %.sroa.9.0.2)
  %216 = getelementptr inbounds i8, ptr %0, i64 128
  %217 = load float, ptr %216, align 16, !tbaa !19
  %218 = fsub float %215, %217
  br label %219

219:                                              ; preds = %214, %212, %206
  %.186.2 = phi float [ %218, %214 ], [ %207, %206 ], [ %213, %212 ]
  %220 = fcmp une float %.186.2, 0.000000e+00
  br i1 %220, label %221, label %.thread.2

221:                                              ; preds = %219
  %222 = getelementptr inbounds i8, ptr %0, i64 732
  %223 = load ptr, ptr %94, align 16, !tbaa !5
  %.sroa.05.0.copyload.2 = load double, ptr %9, align 16
  %.sroa.26.0.copyload.2 = load double, ptr %.sroa.26.0..sroa_idx, align 8, !tbaa !18
  %224 = load ptr, ptr %101, align 8, !tbaa !17
  %.sroa.03.0.copyload.2 = load double, ptr %10, align 16
  %.sroa.24.0.copyload.2 = load double, ptr %.sroa.24.0..sroa_idx, align 8, !tbaa !18
  call void @_ZN3JPH18AxisConstraintPart29CalculateConstraintPropertiesERKNS_4BodyENS_4Vec3ES3_S4_S4_f(ptr noundef nonnull align 4 dereferenceable(64) %222, ptr noundef nonnull align 16 dereferenceable(122) %223, double %.sroa.05.0.copyload.2, double %.sroa.26.0.copyload.2, ptr noundef nonnull align 16 dereferenceable(122) %224, double %.sroa.03.0.copyload.2, double %.sroa.24.0.copyload.2, double %.sroa.027.0.2, double %.sroa.9.0.2, float noundef 0.000000e+00)
  %225 = load ptr, ptr %94, align 16, !tbaa !5
  %226 = load ptr, ptr %101, align 8, !tbaa !17
  %227 = call noundef zeroext i1 @_ZNK3JPH18AxisConstraintPart23SolvePositionConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 4 dereferenceable(64) %222, ptr noundef nonnull align 16 dereferenceable(122) %225, ptr noundef nonnull align 16 dereferenceable(122) %226, double %.sroa.027.0.2, double %.sroa.9.0.2, float noundef %.186.2, float noundef %2)
  %228 = or i1 %.3.1, %227
  br label %.thread.2

.thread.2:                                        ; preds = %221, %219, %208, %199
  %.2.2 = phi i1 [ %228, %221 ], [ %.3.1, %219 ], [ %.3.1, %199 ], [ %.3.1, %208 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #7
  br label %.loopexit

.loopexit:                                        ; preds = %185, %.thread.2, %92, %64
  %.4 = phi i1 [ %91, %64 ], [ %.0.shrunk, %92 ], [ %.2.2, %.thread.2 ], [ %.3.1, %185 ]
  ret i1 %.4
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Quat12sEulerAnglesENS_4Vec3E(double, double) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH16SixDOFConstraint20GetRotationLimitsMinEv(ptr noundef nonnull align 16 dereferenceable(1856)) local_unnamed_addr #3 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 @_ZNK3JPH24SwingTwistConstraintPart23SolvePositionConstraintERNS_4BodyES2_NS_4QuatES3_S3_f(ptr noundef nonnull align 16 dereferenceable(272), 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 #1 align 2

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

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

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

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

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Quat11RotateAxisZEv(ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #2 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 = { 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 = { 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 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 = { 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 = { 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 #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, !20, i64 0}
!20 = !{!"float", !12, i64 0}


; Effective O3 passes: AggressiveInstCombinePass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass