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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH18AxisConstraintPart10DeactivateEv(ptr noundef nonnull align 4 dereferenceable(64)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH19AngleConstraintPart10DeactivateEv(ptr noundef nonnull align 16 dereferenceable(48)) #4 align 2

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

131:                                              ; preds = %148, %2
  %132 = load i32, ptr %11, align 4, !tbaa !23
  %133 = icmp slt i32 %132, 3
  br i1 %133, label %135, label %134

134:                                              ; preds = %131
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  br label %151

135:                                              ; preds = %131
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #9
  %136 = load i32, ptr %11, align 4, !tbaa !23
  %137 = call { double, double } @_ZNK3JPH5Mat4410GetColumn3Ej(ptr noundef nonnull align 16 dereferenceable(64) %9, i32 noundef %136)
  %138 = getelementptr inbounds %"class.JPH::Vec3", ptr %12, i32 0, i32 0
  %139 = getelementptr inbounds %union.anon, ptr %138, i32 0, i32 0
  %140 = getelementptr inbounds { double, double }, ptr %139, i32 0, i32 0
  %141 = extractvalue { double, double } %137, 0
  store double %141, ptr %140, align 16
  %142 = getelementptr inbounds { double, double }, ptr %139, i32 0, i32 1
  %143 = extractvalue { double, double } %137, 1
  store double %143, ptr %142, align 8
  %144 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 21
  %145 = load i32, ptr %11, align 4, !tbaa !23
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [3 x %"class.JPH::Vec3"], ptr %144, i64 0, i64 %146
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %147, ptr align 16 %12, i64 16, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #9
  br label %148

148:                                              ; preds = %135
  %149 = load i32, ptr %11, align 4, !tbaa !23
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %11, align 4, !tbaa !23
  br label %131, !llvm.loop !24

151:                                              ; preds = %134
  %152 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint29IsTranslationFullyConstrainedEv(ptr noundef nonnull align 16 dereferenceable(1856) %93)
  br i1 %152, label %153, label %177

153:                                              ; preds = %151
  %154 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 25
  %155 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %93, i32 0, i32 1
  %156 = load ptr, ptr %155, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 64, ptr %13) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %14, ptr align 16 %5, i64 16, i1 false), !tbaa.struct !21
  %157 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 0
  %158 = load double, ptr %157, align 16
  %159 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 1
  %160 = load double, ptr %159, align 8
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %13, double %158, double %160)
  %161 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %15, ptr align 16 %161, i64 16, i1 false), !tbaa.struct !21
  %162 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %93, i32 0, i32 2
  %163 = load ptr, ptr %162, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 64, ptr %16) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %17, ptr align 16 %6, i64 16, i1 false), !tbaa.struct !21
  %164 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 0
  %165 = load double, ptr %164, align 16
  %166 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 1
  %167 = load double, ptr %166, align 8
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %16, double %165, double %167)
  %168 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %18, ptr align 16 %168, i64 16, i1 false), !tbaa.struct !21
  %169 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 0
  %170 = load double, ptr %169, align 16
  %171 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 1
  %172 = load double, ptr %171, align 8
  %173 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %174 = load double, ptr %173, align 16
  %175 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %176 = load double, ptr %175, align 8
  call void @_ZN3JPH19PointConstraintPart29CalculateConstraintPropertiesERKNS_4BodyERKNS_5Mat44ENS_4Vec3ES3_S6_S7_(ptr noundef nonnull align 16 dereferenceable(240) %154, ptr noundef nonnull align 16 dereferenceable(122) %156, ptr noundef nonnull align 16 dereferenceable(64) %13, double %170, double %172, ptr noundef nonnull align 16 dereferenceable(122) %163, ptr noundef nonnull align 16 dereferenceable(64) %16, double %174, double %176)
  call void @llvm.lifetime.end.p0(i64 64, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 64, ptr %13) #9
  br label %401

177:                                              ; preds = %151
  %178 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint24IsTranslationConstrainedEv(ptr noundef nonnull align 16 dereferenceable(1856) %93)
  br i1 %178, label %183, label %179

179:                                              ; preds = %177
  %180 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 7
  %181 = load i8, ptr %180, align 2, !tbaa !26, !range !38, !noundef !39
  %182 = trunc i8 %181 to i1
  br i1 %182, label %183, label %400

183:                                              ; preds = %179, %177
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #9
  call void @_ZNK3JPH16SixDOFConstraint31GetPositionConstraintPropertiesERNS_4Vec3ES2_S2_(ptr noundef nonnull align 16 dereferenceable(1856) %93, ptr noundef nonnull align 16 dereferenceable(16) %19, ptr noundef nonnull align 16 dereferenceable(16) %20, ptr noundef nonnull align 16 dereferenceable(16) %21)
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #9
  store i32 0, ptr %22, align 4, !tbaa !23
  br label %184

184:                                              ; preds = %396, %183
  %185 = load i32, ptr %22, align 4, !tbaa !23
  %186 = icmp slt i32 %185, 3
  br i1 %186, label %188, label %187

187:                                              ; preds = %184
  store i32 5, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #9
  br label %399

188:                                              ; preds = %184
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #9
  %189 = load i32, ptr %22, align 4, !tbaa !23
  %190 = add nsw i32 0, %189
  store i32 %190, ptr %24, align 4, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #9
  %191 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 21
  %192 = load i32, ptr %22, align 4, !tbaa !23
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [3 x %"class.JPH::Vec3"], ptr %191, i64 0, i64 %193
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %25, ptr align 16 %194, i64 16, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %27, ptr align 16 %21, i64 16, i1 false), !tbaa.struct !21
  %195 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 0
  %196 = load double, ptr %195, align 16
  %197 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 1
  %198 = load double, ptr %197, align 8
  %199 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %25, double %196, double %198)
  store float %199, ptr %26, align 4, !tbaa !9
  %200 = load float, ptr %26, align 4, !tbaa !9
  %201 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 23
  %202 = load i32, ptr %22, align 4, !tbaa !23
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds [3 x float], ptr %201, i64 0, i64 %203
  store float %200, ptr %204, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %28) #9
  store i8 0, ptr %28, align 1, !tbaa !42
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #9
  store float 0.000000e+00, ptr %29, align 4, !tbaa !9
  %205 = load i32, ptr %24, align 4, !tbaa !40
  %206 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint11IsFixedAxisENS_24SixDOFConstraintSettings5EAxisE(ptr noundef nonnull align 16 dereferenceable(1856) %93, i32 noundef %205)
  br i1 %206, label %207, label %215

207:                                              ; preds = %188
  %208 = load float, ptr %26, align 4, !tbaa !9
  %209 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 11
  %210 = load i32, ptr %22, align 4, !tbaa !23
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds [6 x float], ptr %209, i64 0, i64 %211
  %213 = load float, ptr %212, align 4, !tbaa !9
  %214 = fsub float %208, %213
  store float %214, ptr %29, align 4, !tbaa !9
  store i8 1, ptr %28, align 1, !tbaa !42
  br label %253

215:                                              ; preds = %188
  %216 = load i32, ptr %24, align 4, !tbaa !40
  %217 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint10IsFreeAxisENS_24SixDOFConstraintSettings5EAxisE(ptr noundef nonnull align 16 dereferenceable(1856) %93, i32 noundef %216)
  br i1 %217, label %252, label %218

218:                                              ; preds = %215
  %219 = load float, ptr %26, align 4, !tbaa !9
  %220 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 11
  %221 = load i32, ptr %22, align 4, !tbaa !23
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds [6 x float], ptr %220, i64 0, i64 %222
  %224 = load float, ptr %223, align 4, !tbaa !9
  %225 = fcmp ole float %219, %224
  br i1 %225, label %226, label %234

226:                                              ; preds = %218
  %227 = load float, ptr %26, align 4, !tbaa !9
  %228 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 11
  %229 = load i32, ptr %22, align 4, !tbaa !23
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds [6 x float], ptr %228, i64 0, i64 %230
  %232 = load float, ptr %231, align 4, !tbaa !9
  %233 = fsub float %227, %232
  store float %233, ptr %29, align 4, !tbaa !9
  store i8 1, ptr %28, align 1, !tbaa !42
  br label %251

234:                                              ; preds = %218
  %235 = load float, ptr %26, align 4, !tbaa !9
  %236 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 12
  %237 = load i32, ptr %22, align 4, !tbaa !23
  %238 = sext i32 %237 to i64
  %239 = getelementptr inbounds [6 x float], ptr %236, i64 0, i64 %238
  %240 = load float, ptr %239, align 4, !tbaa !9
  %241 = fcmp oge float %235, %240
  br i1 %241, label %242, label %250

242:                                              ; preds = %234
  %243 = load float, ptr %26, align 4, !tbaa !9
  %244 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 12
  %245 = load i32, ptr %22, align 4, !tbaa !23
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds [6 x float], ptr %244, i64 0, i64 %246
  %248 = load float, ptr %247, align 4, !tbaa !9
  %249 = fsub float %243, %248
  store float %249, ptr %29, align 4, !tbaa !9
  store i8 1, ptr %28, align 1, !tbaa !42
  br label %250

250:                                              ; preds = %242, %234
  br label %251

251:                                              ; preds = %250, %226
  br label %252

252:                                              ; preds = %251, %215
  br label %253

253:                                              ; preds = %252, %207
  %254 = load i8, ptr %28, align 1, !tbaa !42, !range !38, !noundef !39
  %255 = trunc i8 %254 to i1
  br i1 %255, label %256, label %283

256:                                              ; preds = %253
  %257 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 24
  %258 = load i32, ptr %22, align 4, !tbaa !23
  %259 = sext i32 %258 to i64
  %260 = getelementptr inbounds [3 x %"class.JPH::AxisConstraintPart"], ptr %257, i64 0, i64 %259
  %261 = load float, ptr %4, align 4, !tbaa !9
  %262 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %93, i32 0, i32 1
  %263 = load ptr, ptr %262, align 16, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %30, ptr align 16 %19, i64 16, i1 false), !tbaa.struct !21
  %264 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %93, i32 0, i32 2
  %265 = load ptr, ptr %264, align 8, !tbaa !20
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %31, ptr align 16 %20, i64 16, i1 false), !tbaa.struct !21
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %32, ptr align 16 %25, i64 16, i1 false), !tbaa.struct !21
  %266 = load float, ptr %29, align 4, !tbaa !9
  %267 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 13
  %268 = load i32, ptr %22, align 4, !tbaa !23
  %269 = sext i32 %268 to i64
  %270 = getelementptr inbounds [3 x %"class.JPH::SpringSettings"], ptr %267, i64 0, i64 %269
  %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
  %275 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 0
  %276 = load double, ptr %275, align 16
  %277 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 1
  %278 = load double, ptr %277, align 8
  %279 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 0
  %280 = load double, ptr %279, align 16
  %281 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 1
  %282 = load double, ptr %281, align 8
  call void @_ZN3JPH18AxisConstraintPart41CalculateConstraintPropertiesWithSettingsEfRKNS_4BodyENS_4Vec3ES3_S4_S4_ffRKNS_14SpringSettingsE(ptr noundef nonnull align 4 dereferenceable(64) %260, float noundef %261, ptr noundef nonnull align 16 dereferenceable(122) %263, double %272, double %274, ptr noundef nonnull align 16 dereferenceable(122) %265, double %276, double %278, double %280, double %282, float noundef 0.000000e+00, float noundef %266, ptr noundef nonnull align 4 dereferenceable(12) %270)
  br label %288

283:                                              ; preds = %253
  %284 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 24
  %285 = load i32, ptr %22, align 4, !tbaa !23
  %286 = sext i32 %285 to i64
  %287 = getelementptr inbounds [3 x %"class.JPH::AxisConstraintPart"], ptr %284, i64 0, i64 %286
  call void @_ZN3JPH18AxisConstraintPart10DeactivateEv(ptr noundef nonnull align 4 dereferenceable(64) %287)
  br label %288

288:                                              ; preds = %283, %256
  %289 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 16
  %290 = load i32, ptr %22, align 4, !tbaa !23
  %291 = sext i32 %290 to i64
  %292 = getelementptr inbounds [6 x i32], ptr %289, i64 0, i64 %291
  %293 = load i32, ptr %292, align 4, !tbaa !43
  switch i32 %293, label %395 [
    i32 0, label %294
    i32 1, label %324
    i32 2, label %349
  ]

294:                                              ; preds = %288
  %295 = load i32, ptr %24, align 4, !tbaa !40
  %296 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint11HasFrictionENS_24SixDOFConstraintSettings5EAxisE(ptr noundef nonnull align 16 dereferenceable(1856) %93, i32 noundef %295)
  br i1 %296, label %297, label %318

297:                                              ; preds = %294
  %298 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 28
  %299 = load i32, ptr %22, align 4, !tbaa !23
  %300 = sext i32 %299 to i64
  %301 = getelementptr inbounds [3 x %"class.JPH::AxisConstraintPart"], ptr %298, i64 0, i64 %300
  %302 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %93, i32 0, i32 1
  %303 = load ptr, ptr %302, align 16, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %33, ptr align 16 %19, i64 16, i1 false), !tbaa.struct !21
  %304 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %93, i32 0, i32 2
  %305 = load ptr, ptr %304, align 8, !tbaa !20
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %34, ptr align 16 %20, i64 16, i1 false), !tbaa.struct !21
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %35, ptr align 16 %25, i64 16, i1 false), !tbaa.struct !21
  %306 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 0
  %307 = load double, ptr %306, align 16
  %308 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 1
  %309 = load double, ptr %308, align 8
  %310 = getelementptr inbounds { double, double }, ptr %34, i32 0, i32 0
  %311 = load double, ptr %310, align 16
  %312 = getelementptr inbounds { double, double }, ptr %34, i32 0, i32 1
  %313 = load double, ptr %312, align 8
  %314 = getelementptr inbounds { double, double }, ptr %35, i32 0, i32 0
  %315 = load double, ptr %314, align 16
  %316 = getelementptr inbounds { double, double }, ptr %35, i32 0, i32 1
  %317 = load double, ptr %316, align 8
  call void @_ZN3JPH18AxisConstraintPart29CalculateConstraintPropertiesERKNS_4BodyENS_4Vec3ES3_S4_S4_f(ptr noundef nonnull align 4 dereferenceable(64) %301, ptr noundef nonnull align 16 dereferenceable(122) %303, double %307, double %309, ptr noundef nonnull align 16 dereferenceable(122) %305, double %311, double %313, double %315, double %317, float noundef 0.000000e+00)
  br label %323

318:                                              ; preds = %294
  %319 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 28
  %320 = load i32, ptr %22, align 4, !tbaa !23
  %321 = sext i32 %320 to i64
  %322 = getelementptr inbounds [3 x %"class.JPH::AxisConstraintPart"], ptr %319, i64 0, i64 %321
  call void @_ZN3JPH18AxisConstraintPart10DeactivateEv(ptr noundef nonnull align 4 dereferenceable(64) %322)
  br label %323

323:                                              ; preds = %318, %297
  br label %395

324:                                              ; preds = %288
  %325 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 28
  %326 = load i32, ptr %22, align 4, !tbaa !23
  %327 = sext i32 %326 to i64
  %328 = getelementptr inbounds [3 x %"class.JPH::AxisConstraintPart"], ptr %325, i64 0, i64 %327
  %329 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %93, i32 0, i32 1
  %330 = load ptr, ptr %329, align 16, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %36, ptr align 16 %19, i64 16, i1 false), !tbaa.struct !21
  %331 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %93, i32 0, i32 2
  %332 = load ptr, ptr %331, align 8, !tbaa !20
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %37, ptr align 16 %20, i64 16, i1 false), !tbaa.struct !21
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %38, ptr align 16 %25, i64 16, i1 false), !tbaa.struct !21
  %333 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 17
  %334 = load i32, ptr %22, align 4, !tbaa !23
  %335 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %333, i32 noundef %334)
  %336 = fneg float %335
  %337 = getelementptr inbounds { double, double }, ptr %36, i32 0, i32 0
  %338 = load double, ptr %337, align 16
  %339 = getelementptr inbounds { double, double }, ptr %36, i32 0, i32 1
  %340 = load double, ptr %339, align 8
  %341 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 0
  %342 = load double, ptr %341, align 16
  %343 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 1
  %344 = load double, ptr %343, align 8
  %345 = getelementptr inbounds { double, double }, ptr %38, i32 0, i32 0
  %346 = load double, ptr %345, align 16
  %347 = getelementptr inbounds { double, double }, ptr %38, i32 0, i32 1
  %348 = load double, ptr %347, align 8
  call void @_ZN3JPH18AxisConstraintPart29CalculateConstraintPropertiesERKNS_4BodyENS_4Vec3ES3_S4_S4_f(ptr noundef nonnull align 4 dereferenceable(64) %328, ptr noundef nonnull align 16 dereferenceable(122) %330, double %338, double %340, ptr noundef nonnull align 16 dereferenceable(122) %332, double %342, double %344, double %346, double %348, float noundef %336)
  br label %395

349:                                              ; preds = %288
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #9
  %350 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 14
  %351 = load i32, ptr %22, align 4, !tbaa !23
  %352 = sext i32 %351 to i64
  %353 = getelementptr inbounds [6 x %"class.JPH::MotorSettings"], ptr %350, i64 0, i64 %352
  %354 = getelementptr inbounds %"class.JPH::MotorSettings", ptr %353, i32 0, i32 0
  store ptr %354, ptr %39, align 8, !tbaa !5
  %355 = load ptr, ptr %39, align 8, !tbaa !5
  %356 = call noundef zeroext i1 @_ZNK3JPH14SpringSettings12HasStiffnessEv(ptr noundef nonnull align 4 dereferenceable(12) %355)
  br i1 %356, label %357, label %389

357:                                              ; preds = %349
  %358 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 28
  %359 = load i32, ptr %22, align 4, !tbaa !23
  %360 = sext i32 %359 to i64
  %361 = getelementptr inbounds [3 x %"class.JPH::AxisConstraintPart"], ptr %358, i64 0, i64 %360
  %362 = load float, ptr %4, align 4, !tbaa !9
  %363 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %93, i32 0, i32 1
  %364 = load ptr, ptr %363, align 16, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %40, ptr align 16 %19, i64 16, i1 false), !tbaa.struct !21
  %365 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %93, i32 0, i32 2
  %366 = load ptr, ptr %365, align 8, !tbaa !20
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %41, ptr align 16 %20, i64 16, i1 false), !tbaa.struct !21
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %42, ptr align 16 %25, i64 16, i1 false), !tbaa.struct !21
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %43, ptr align 16 %21, i64 16, i1 false), !tbaa.struct !21
  %367 = getelementptr inbounds { double, double }, ptr %43, i32 0, i32 0
  %368 = load double, ptr %367, align 16
  %369 = getelementptr inbounds { double, double }, ptr %43, i32 0, i32 1
  %370 = load double, ptr %369, align 8
  %371 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %25, double %368, double %370)
  %372 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 19
  %373 = load i32, ptr %22, align 4, !tbaa !23
  %374 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %372, i32 noundef %373)
  %375 = fsub float %371, %374
  %376 = load ptr, ptr %39, align 8, !tbaa !5
  %377 = getelementptr inbounds { double, double }, ptr %40, i32 0, i32 0
  %378 = load double, ptr %377, align 16
  %379 = getelementptr inbounds { double, double }, ptr %40, i32 0, i32 1
  %380 = load double, ptr %379, align 8
  %381 = getelementptr inbounds { double, double }, ptr %41, i32 0, i32 0
  %382 = load double, ptr %381, align 16
  %383 = getelementptr inbounds { double, double }, ptr %41, i32 0, i32 1
  %384 = load double, ptr %383, align 8
  %385 = getelementptr inbounds { double, double }, ptr %42, i32 0, i32 0
  %386 = load double, ptr %385, align 16
  %387 = getelementptr inbounds { double, double }, ptr %42, i32 0, i32 1
  %388 = load double, ptr %387, align 8
  call void @_ZN3JPH18AxisConstraintPart41CalculateConstraintPropertiesWithSettingsEfRKNS_4BodyENS_4Vec3ES3_S4_S4_ffRKNS_14SpringSettingsE(ptr noundef nonnull align 4 dereferenceable(64) %361, float noundef %362, ptr noundef nonnull align 16 dereferenceable(122) %364, double %378, double %380, ptr noundef nonnull align 16 dereferenceable(122) %366, double %382, double %384, double %386, double %388, float noundef 0.000000e+00, float noundef %375, ptr noundef nonnull align 4 dereferenceable(12) %376)
  br label %394

389:                                              ; preds = %349
  %390 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 28
  %391 = load i32, ptr %22, align 4, !tbaa !23
  %392 = sext i32 %391 to i64
  %393 = getelementptr inbounds [3 x %"class.JPH::AxisConstraintPart"], ptr %390, i64 0, i64 %392
  call void @_ZN3JPH18AxisConstraintPart10DeactivateEv(ptr noundef nonnull align 4 dereferenceable(64) %393)
  br label %394

394:                                              ; preds = %389, %357
  store i32 8, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #9
  br label %395

395:                                              ; preds = %394, %324, %323, %288
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  br label %396

396:                                              ; preds = %395
  %397 = load i32, ptr %22, align 4, !tbaa !23
  %398 = add nsw i32 %397, 1
  store i32 %398, ptr %22, align 4, !tbaa !23
  br label %184, !llvm.loop !45

399:                                              ; preds = %187
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #9
  br label %400

400:                                              ; preds = %399, %179
  br label %401

401:                                              ; preds = %400, %153
  %402 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint26IsRotationFullyConstrainedEv(ptr noundef nonnull align 16 dereferenceable(1856) %93)
  br i1 %402, label %403, label %437

403:                                              ; preds = %401
  %404 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 27
  %405 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %93, i32 0, i32 1
  %406 = load ptr, ptr %405, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 64, ptr %44) #9
  %407 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %93, i32 0, i32 1
  %408 = load ptr, ptr %407, align 16, !tbaa !11
  %409 = call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %408)
  %410 = getelementptr inbounds %"class.JPH::Quat", ptr %45, i32 0, i32 0
  %411 = getelementptr inbounds %"class.JPH::Vec4", ptr %410, i32 0, i32 0
  %412 = getelementptr inbounds %union.anon.4, ptr %411, i32 0, i32 0
  %413 = getelementptr inbounds { double, double }, ptr %412, i32 0, i32 0
  %414 = extractvalue { double, double } %409, 0
  store double %414, ptr %413, align 16
  %415 = getelementptr inbounds { double, double }, ptr %412, i32 0, i32 1
  %416 = extractvalue { double, double } %409, 1
  store double %416, ptr %415, align 8
  %417 = getelementptr inbounds { double, double }, ptr %45, i32 0, i32 0
  %418 = load double, ptr %417, align 16
  %419 = getelementptr inbounds { double, double }, ptr %45, i32 0, i32 1
  %420 = load double, ptr %419, align 8
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %44, double %418, double %420)
  %421 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %93, i32 0, i32 2
  %422 = load ptr, ptr %421, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 64, ptr %46) #9
  %423 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %93, i32 0, i32 2
  %424 = load ptr, ptr %423, align 8, !tbaa !20
  %425 = call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %424)
  %426 = getelementptr inbounds %"class.JPH::Quat", ptr %47, i32 0, i32 0
  %427 = getelementptr inbounds %"class.JPH::Vec4", ptr %426, i32 0, i32 0
  %428 = getelementptr inbounds %union.anon.4, ptr %427, i32 0, i32 0
  %429 = getelementptr inbounds { double, double }, ptr %428, i32 0, i32 0
  %430 = extractvalue { double, double } %425, 0
  store double %430, ptr %429, align 16
  %431 = getelementptr inbounds { double, double }, ptr %428, i32 0, i32 1
  %432 = extractvalue { double, double } %425, 1
  store double %432, ptr %431, align 8
  %433 = getelementptr inbounds { double, double }, ptr %47, i32 0, i32 0
  %434 = load double, ptr %433, align 16
  %435 = getelementptr inbounds { double, double }, ptr %47, i32 0, i32 1
  %436 = load double, ptr %435, align 8
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %46, double %434, double %436)
  call void @_ZN3JPH27RotationEulerConstraintPart29CalculateConstraintPropertiesERKNS_4BodyERKNS_5Mat44ES3_S6_(ptr noundef nonnull align 16 dereferenceable(208) %404, ptr noundef nonnull align 16 dereferenceable(122) %406, ptr noundef nonnull align 16 dereferenceable(64) %44, ptr noundef nonnull align 16 dereferenceable(122) %422, ptr noundef nonnull align 16 dereferenceable(64) %46)
  call void @llvm.lifetime.end.p0(i64 64, ptr %46) #9
  call void @llvm.lifetime.end.p0(i64 64, ptr %44) #9
  br label %871

437:                                              ; preds = %401
  %438 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint21IsRotationConstrainedEv(ptr noundef nonnull align 16 dereferenceable(1856) %93)
  br i1 %438, label %443, label %439

439:                                              ; preds = %437
  %440 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 8
  %441 = load i8, ptr %440, align 1, !tbaa !46, !range !38, !noundef !39
  %442 = trunc i8 %441 to i1
  br i1 %442, label %443, label %870

443:                                              ; preds = %439, %437
  call void @llvm.lifetime.start.p0(i64 16, ptr %48) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %49) #9
  %444 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %93, i32 0, i32 2
  %445 = load ptr, ptr %444, align 8, !tbaa !20
  %446 = call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %445)
  %447 = getelementptr inbounds %"class.JPH::Quat", ptr %49, i32 0, i32 0
  %448 = getelementptr inbounds %"class.JPH::Vec4", ptr %447, i32 0, i32 0
  %449 = getelementptr inbounds %union.anon.4, ptr %448, i32 0, i32 0
  %450 = getelementptr inbounds { double, double }, ptr %449, i32 0, i32 0
  %451 = extractvalue { double, double } %446, 0
  store double %451, ptr %450, align 16
  %452 = getelementptr inbounds { double, double }, ptr %449, i32 0, i32 1
  %453 = extractvalue { double, double } %446, 1
  store double %453, ptr %452, align 8
  %454 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %50, ptr align 16 %454, i64 16, i1 false), !tbaa.struct !21
  %455 = getelementptr inbounds { double, double }, ptr %50, i32 0, i32 0
  %456 = load double, ptr %455, align 16
  %457 = getelementptr inbounds { double, double }, ptr %50, i32 0, i32 1
  %458 = load double, ptr %457, align 8
  %459 = call { double, double } @_ZNK3JPH4QuatmlES0_(ptr noundef nonnull align 16 dereferenceable(16) %49, double %456, double %458)
  %460 = getelementptr inbounds %"class.JPH::Quat", ptr %48, i32 0, i32 0
  %461 = getelementptr inbounds %"class.JPH::Vec4", ptr %460, i32 0, i32 0
  %462 = getelementptr inbounds %union.anon.4, ptr %461, i32 0, i32 0
  %463 = getelementptr inbounds { double, double }, ptr %462, i32 0, i32 0
  %464 = extractvalue { double, double } %459, 0
  store double %464, ptr %463, align 16
  %465 = getelementptr inbounds { double, double }, ptr %462, i32 0, i32 1
  %466 = extractvalue { double, double } %459, 1
  store double %466, ptr %465, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %49) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %51) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %52) #9
  %467 = call { double, double } @_ZNK3JPH4Quat10ConjugatedEv(ptr noundef nonnull align 16 dereferenceable(16) %7)
  %468 = getelementptr inbounds %"class.JPH::Quat", ptr %52, i32 0, i32 0
  %469 = getelementptr inbounds %"class.JPH::Vec4", ptr %468, i32 0, i32 0
  %470 = getelementptr inbounds %union.anon.4, ptr %469, i32 0, i32 0
  %471 = getelementptr inbounds { double, double }, ptr %470, i32 0, i32 0
  %472 = extractvalue { double, double } %467, 0
  store double %472, ptr %471, align 16
  %473 = getelementptr inbounds { double, double }, ptr %470, i32 0, i32 1
  %474 = extractvalue { double, double } %467, 1
  store double %474, ptr %473, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %53, ptr align 16 %48, i64 16, i1 false), !tbaa.struct !21
  %475 = getelementptr inbounds { double, double }, ptr %53, i32 0, i32 0
  %476 = load double, ptr %475, align 16
  %477 = getelementptr inbounds { double, double }, ptr %53, i32 0, i32 1
  %478 = load double, ptr %477, align 8
  %479 = call { double, double } @_ZNK3JPH4QuatmlES0_(ptr noundef nonnull align 16 dereferenceable(16) %52, double %476, double %478)
  %480 = getelementptr inbounds %"class.JPH::Quat", ptr %51, i32 0, i32 0
  %481 = getelementptr inbounds %"class.JPH::Vec4", ptr %480, i32 0, i32 0
  %482 = getelementptr inbounds %union.anon.4, ptr %481, i32 0, i32 0
  %483 = getelementptr inbounds { double, double }, ptr %482, i32 0, i32 0
  %484 = extractvalue { double, double } %479, 0
  store double %484, ptr %483, align 16
  %485 = getelementptr inbounds { double, double }, ptr %482, i32 0, i32 1
  %486 = extractvalue { double, double } %479, 1
  store double %486, ptr %485, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %52) #9
  %487 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint21IsRotationConstrainedEv(ptr noundef nonnull align 16 dereferenceable(1856) %93)
  br i1 %487, label %488, label %502

488:                                              ; preds = %443
  %489 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 26
  %490 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %93, i32 0, i32 1
  %491 = load ptr, ptr %490, align 16, !tbaa !11
  %492 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %93, i32 0, i32 2
  %493 = load ptr, ptr %492, align 8, !tbaa !20
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %54, ptr align 16 %51, i64 16, i1 false), !tbaa.struct !21
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %55, ptr align 16 %7, i64 16, i1 false), !tbaa.struct !21
  %494 = getelementptr inbounds { double, double }, ptr %54, i32 0, i32 0
  %495 = load double, ptr %494, align 16
  %496 = getelementptr inbounds { double, double }, ptr %54, i32 0, i32 1
  %497 = load double, ptr %496, align 8
  %498 = getelementptr inbounds { double, double }, ptr %55, i32 0, i32 0
  %499 = load double, ptr %498, align 16
  %500 = getelementptr inbounds { double, double }, ptr %55, i32 0, i32 1
  %501 = load double, ptr %500, align 8
  call void @_ZN3JPH24SwingTwistConstraintPart29CalculateConstraintPropertiesERKNS_4BodyES3_NS_4QuatES4_(ptr noundef nonnull align 16 dereferenceable(272) %489, ptr noundef nonnull align 16 dereferenceable(122) %491, ptr noundef nonnull align 16 dereferenceable(122) %493, double %495, double %497, double %499, double %501)
  br label %504

502:                                              ; preds = %443
  %503 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 26
  call void @_ZN3JPH24SwingTwistConstraintPart10DeactivateEv(ptr noundef nonnull align 16 dereferenceable(272) %503)
  br label %504

504:                                              ; preds = %502, %488
  %505 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 8
  %506 = load i8, ptr %505, align 1, !tbaa !46, !range !38, !noundef !39
  %507 = trunc i8 %506 to i1
  br i1 %507, label %508, label %869

508:                                              ; preds = %504
  call void @llvm.lifetime.start.p0(i64 64, ptr %56) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %57, ptr align 16 %48, i64 16, i1 false), !tbaa.struct !21
  %509 = getelementptr inbounds { double, double }, ptr %57, i32 0, i32 0
  %510 = load double, ptr %509, align 16
  %511 = getelementptr inbounds { double, double }, ptr %57, i32 0, i32 1
  %512 = load double, ptr %511, align 8
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %56, double %510, double %512)
  call void @llvm.lifetime.start.p0(i64 4, ptr %58) #9
  store i32 0, ptr %58, align 4, !tbaa !23
  br label %513

513:                                              ; preds = %530, %508
  %514 = load i32, ptr %58, align 4, !tbaa !23
  %515 = icmp slt i32 %514, 3
  br i1 %515, label %517, label %516

516:                                              ; preds = %513
  store i32 9, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %58) #9
  br label %533

517:                                              ; preds = %513
  call void @llvm.lifetime.start.p0(i64 16, ptr %59) #9
  %518 = load i32, ptr %58, align 4, !tbaa !23
  %519 = call { double, double } @_ZNK3JPH5Mat4410GetColumn3Ej(ptr noundef nonnull align 16 dereferenceable(64) %56, i32 noundef %518)
  %520 = getelementptr inbounds %"class.JPH::Vec3", ptr %59, i32 0, i32 0
  %521 = getelementptr inbounds %union.anon, ptr %520, i32 0, i32 0
  %522 = getelementptr inbounds { double, double }, ptr %521, i32 0, i32 0
  %523 = extractvalue { double, double } %519, 0
  store double %523, ptr %522, align 16
  %524 = getelementptr inbounds { double, double }, ptr %521, i32 0, i32 1
  %525 = extractvalue { double, double } %519, 1
  store double %525, ptr %524, align 8
  %526 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 22
  %527 = load i32, ptr %58, align 4, !tbaa !23
  %528 = sext i32 %527 to i64
  %529 = getelementptr inbounds [3 x %"class.JPH::Vec3"], ptr %526, i64 0, i64 %528
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %529, ptr align 16 %59, i64 16, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 16, ptr %59) #9
  br label %530

530:                                              ; preds = %517
  %531 = load i32, ptr %58, align 4, !tbaa !23
  %532 = add nsw i32 %531, 1
  store i32 %532, ptr %58, align 4, !tbaa !23
  br label %513, !llvm.loop !47

533:                                              ; preds = %516
  call void @llvm.lifetime.start.p0(i64 16, ptr %60) #9
  %534 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 20
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %61, ptr align 16 %534, i64 16, i1 false), !tbaa.struct !21
  %535 = getelementptr inbounds { double, double }, ptr %61, i32 0, i32 0
  %536 = load double, ptr %535, align 16
  %537 = getelementptr inbounds { double, double }, ptr %61, i32 0, i32 1
  %538 = load double, ptr %537, align 8
  %539 = call noundef float @_ZNK3JPH4Quat3DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %51, double %536, double %538)
  %540 = fcmp ogt float %539, 0.000000e+00
  br i1 %540, label %541, label %543

541:                                              ; preds = %533
  %542 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 20
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %60, ptr align 16 %542, i64 16, i1 false), !tbaa.struct !21
  br label %553

543:                                              ; preds = %533
  %544 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 20
  %545 = call { double, double } @_ZNK3JPH4QuatngEv(ptr noundef nonnull align 16 dereferenceable(16) %544)
  %546 = getelementptr inbounds %"class.JPH::Quat", ptr %60, i32 0, i32 0
  %547 = getelementptr inbounds %"class.JPH::Vec4", ptr %546, i32 0, i32 0
  %548 = getelementptr inbounds %union.anon.4, ptr %547, i32 0, i32 0
  %549 = getelementptr inbounds { double, double }, ptr %548, i32 0, i32 0
  %550 = extractvalue { double, double } %545, 0
  store double %550, ptr %549, align 16
  %551 = getelementptr inbounds { double, double }, ptr %548, i32 0, i32 1
  %552 = extractvalue { double, double } %545, 1
  store double %552, ptr %551, align 8
  br label %553

553:                                              ; preds = %543, %541
  call void @llvm.lifetime.start.p0(i64 16, ptr %62) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %63) #9
  %554 = call { double, double } @_ZNK3JPH4Quat10ConjugatedEv(ptr noundef nonnull align 16 dereferenceable(16) %51)
  %555 = getelementptr inbounds %"class.JPH::Quat", ptr %63, i32 0, i32 0
  %556 = getelementptr inbounds %"class.JPH::Vec4", ptr %555, i32 0, i32 0
  %557 = getelementptr inbounds %union.anon.4, ptr %556, i32 0, i32 0
  %558 = getelementptr inbounds { double, double }, ptr %557, i32 0, i32 0
  %559 = extractvalue { double, double } %554, 0
  store double %559, ptr %558, align 16
  %560 = getelementptr inbounds { double, double }, ptr %557, i32 0, i32 1
  %561 = extractvalue { double, double } %554, 1
  store double %561, ptr %560, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %64, ptr align 16 %60, i64 16, i1 false), !tbaa.struct !21
  %562 = getelementptr inbounds { double, double }, ptr %64, i32 0, i32 0
  %563 = load double, ptr %562, align 16
  %564 = getelementptr inbounds { double, double }, ptr %64, i32 0, i32 1
  %565 = load double, ptr %564, align 8
  %566 = call { double, double } @_ZNK3JPH4QuatmlES0_(ptr noundef nonnull align 16 dereferenceable(16) %63, double %563, double %565)
  %567 = getelementptr inbounds %"class.JPH::Quat", ptr %62, i32 0, i32 0
  %568 = getelementptr inbounds %"class.JPH::Vec4", ptr %567, i32 0, i32 0
  %569 = getelementptr inbounds %union.anon.4, ptr %568, i32 0, i32 0
  %570 = getelementptr inbounds { double, double }, ptr %569, i32 0, i32 0
  %571 = extractvalue { double, double } %566, 0
  store double %571, ptr %570, align 16
  %572 = getelementptr inbounds { double, double }, ptr %569, i32 0, i32 1
  %573 = extractvalue { double, double } %566, 1
  store double %573, ptr %572, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %63) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %65) #9
  %574 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 9
  %575 = load i8, ptr %574, align 4, !tbaa !48
  %576 = zext i8 %575 to i32
  switch i32 %576, label %758 [
    i32 1, label %577
    i32 2, label %597
    i32 4, label %617
    i32 3, label %637
    i32 5, label %677
    i32 6, label %717
    i32 7, label %757
  ]

577:                                              ; preds = %553
  call void @llvm.lifetime.start.p0(i64 16, ptr %66) #9
  %578 = call { double, double } @_ZN3JPH4Vec36sAxisXEv()
  %579 = getelementptr inbounds %"class.JPH::Vec3", ptr %67, i32 0, i32 0
  %580 = getelementptr inbounds %union.anon, ptr %579, i32 0, i32 0
  %581 = getelementptr inbounds { double, double }, ptr %580, i32 0, i32 0
  %582 = extractvalue { double, double } %578, 0
  store double %582, ptr %581, align 16
  %583 = getelementptr inbounds { double, double }, ptr %580, i32 0, i32 1
  %584 = extractvalue { double, double } %578, 1
  store double %584, ptr %583, align 8
  %585 = getelementptr inbounds { double, double }, ptr %67, i32 0, i32 0
  %586 = load double, ptr %585, align 16
  %587 = getelementptr inbounds { double, double }, ptr %67, i32 0, i32 1
  %588 = load double, ptr %587, align 8
  %589 = call { double, double } @_ZNK3JPH4Quat8GetTwistENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(16) %62, double %586, double %588)
  %590 = getelementptr inbounds %"class.JPH::Quat", ptr %66, i32 0, i32 0
  %591 = getelementptr inbounds %"class.JPH::Vec4", ptr %590, i32 0, i32 0
  %592 = getelementptr inbounds %union.anon.4, ptr %591, i32 0, i32 0
  %593 = getelementptr inbounds { double, double }, ptr %592, i32 0, i32 0
  %594 = extractvalue { double, double } %589, 0
  store double %594, ptr %593, align 16
  %595 = getelementptr inbounds { double, double }, ptr %592, i32 0, i32 1
  %596 = extractvalue { double, double } %589, 1
  store double %596, ptr %595, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %65, ptr align 16 %66, i64 16, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 16, ptr %66) #9
  br label %759

597:                                              ; preds = %553
  call void @llvm.lifetime.start.p0(i64 16, ptr %68) #9
  %598 = call { double, double } @_ZN3JPH4Vec36sAxisYEv()
  %599 = getelementptr inbounds %"class.JPH::Vec3", ptr %69, i32 0, i32 0
  %600 = getelementptr inbounds %union.anon, ptr %599, i32 0, i32 0
  %601 = getelementptr inbounds { double, double }, ptr %600, i32 0, i32 0
  %602 = extractvalue { double, double } %598, 0
  store double %602, ptr %601, align 16
  %603 = getelementptr inbounds { double, double }, ptr %600, i32 0, i32 1
  %604 = extractvalue { double, double } %598, 1
  store double %604, ptr %603, align 8
  %605 = getelementptr inbounds { double, double }, ptr %69, i32 0, i32 0
  %606 = load double, ptr %605, align 16
  %607 = getelementptr inbounds { double, double }, ptr %69, i32 0, i32 1
  %608 = load double, ptr %607, align 8
  %609 = call { double, double } @_ZNK3JPH4Quat8GetTwistENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(16) %62, double %606, double %608)
  %610 = getelementptr inbounds %"class.JPH::Quat", ptr %68, i32 0, i32 0
  %611 = getelementptr inbounds %"class.JPH::Vec4", ptr %610, i32 0, i32 0
  %612 = getelementptr inbounds %union.anon.4, ptr %611, i32 0, i32 0
  %613 = getelementptr inbounds { double, double }, ptr %612, i32 0, i32 0
  %614 = extractvalue { double, double } %609, 0
  store double %614, ptr %613, align 16
  %615 = getelementptr inbounds { double, double }, ptr %612, i32 0, i32 1
  %616 = extractvalue { double, double } %609, 1
  store double %616, ptr %615, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %65, ptr align 16 %68, i64 16, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 16, ptr %68) #9
  br label %759

617:                                              ; preds = %553
  call void @llvm.lifetime.start.p0(i64 16, ptr %70) #9
  %618 = call { double, double } @_ZN3JPH4Vec36sAxisZEv()
  %619 = getelementptr inbounds %"class.JPH::Vec3", ptr %71, i32 0, i32 0
  %620 = getelementptr inbounds %union.anon, ptr %619, i32 0, i32 0
  %621 = getelementptr inbounds { double, double }, ptr %620, i32 0, i32 0
  %622 = extractvalue { double, double } %618, 0
  store double %622, ptr %621, align 16
  %623 = getelementptr inbounds { double, double }, ptr %620, i32 0, i32 1
  %624 = extractvalue { double, double } %618, 1
  store double %624, ptr %623, align 8
  %625 = getelementptr inbounds { double, double }, ptr %71, i32 0, i32 0
  %626 = load double, ptr %625, align 16
  %627 = getelementptr inbounds { double, double }, ptr %71, i32 0, i32 1
  %628 = load double, ptr %627, align 8
  %629 = call { double, double } @_ZNK3JPH4Quat8GetTwistENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(16) %62, double %626, double %628)
  %630 = getelementptr inbounds %"class.JPH::Quat", ptr %70, i32 0, i32 0
  %631 = getelementptr inbounds %"class.JPH::Vec4", ptr %630, i32 0, i32 0
  %632 = getelementptr inbounds %union.anon.4, ptr %631, i32 0, i32 0
  %633 = getelementptr inbounds { double, double }, ptr %632, i32 0, i32 0
  %634 = extractvalue { double, double } %629, 0
  store double %634, ptr %633, align 16
  %635 = getelementptr inbounds { double, double }, ptr %632, i32 0, i32 1
  %636 = extractvalue { double, double } %629, 1
  store double %636, ptr %635, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %65, ptr align 16 %70, i64 16, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 16, ptr %70) #9
  br label %759

637:                                              ; preds = %553
  call void @llvm.lifetime.start.p0(i64 16, ptr %72) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %74) #9
  %638 = call { double, double } @_ZN3JPH4Vec36sAxisZEv()
  %639 = getelementptr inbounds %"class.JPH::Vec3", ptr %75, i32 0, i32 0
  %640 = getelementptr inbounds %union.anon, ptr %639, i32 0, i32 0
  %641 = getelementptr inbounds { double, double }, ptr %640, i32 0, i32 0
  %642 = extractvalue { double, double } %638, 0
  store double %642, ptr %641, align 16
  %643 = getelementptr inbounds { double, double }, ptr %640, i32 0, i32 1
  %644 = extractvalue { double, double } %638, 1
  store double %644, ptr %643, align 8
  %645 = getelementptr inbounds { double, double }, ptr %75, i32 0, i32 0
  %646 = load double, ptr %645, align 16
  %647 = getelementptr inbounds { double, double }, ptr %75, i32 0, i32 1
  %648 = load double, ptr %647, align 8
  %649 = call { double, double } @_ZNK3JPH4Quat8GetTwistENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(16) %62, double %646, double %648)
  %650 = getelementptr inbounds %"class.JPH::Quat", ptr %74, i32 0, i32 0
  %651 = getelementptr inbounds %"class.JPH::Vec4", ptr %650, i32 0, i32 0
  %652 = getelementptr inbounds %union.anon.4, ptr %651, i32 0, i32 0
  %653 = getelementptr inbounds { double, double }, ptr %652, i32 0, i32 0
  %654 = extractvalue { double, double } %649, 0
  store double %654, ptr %653, align 16
  %655 = getelementptr inbounds { double, double }, ptr %652, i32 0, i32 1
  %656 = extractvalue { double, double } %649, 1
  store double %656, ptr %655, align 8
  %657 = call { double, double } @_ZNK3JPH4Quat10ConjugatedEv(ptr noundef nonnull align 16 dereferenceable(16) %74)
  %658 = getelementptr inbounds %"class.JPH::Quat", ptr %73, i32 0, i32 0
  %659 = getelementptr inbounds %"class.JPH::Vec4", ptr %658, i32 0, i32 0
  %660 = getelementptr inbounds %union.anon.4, ptr %659, i32 0, i32 0
  %661 = getelementptr inbounds { double, double }, ptr %660, i32 0, i32 0
  %662 = extractvalue { double, double } %657, 0
  store double %662, ptr %661, align 16
  %663 = getelementptr inbounds { double, double }, ptr %660, i32 0, i32 1
  %664 = extractvalue { double, double } %657, 1
  store double %664, ptr %663, align 8
  %665 = getelementptr inbounds { double, double }, ptr %73, i32 0, i32 0
  %666 = load double, ptr %665, align 16
  %667 = getelementptr inbounds { double, double }, ptr %73, i32 0, i32 1
  %668 = load double, ptr %667, align 8
  %669 = call { double, double } @_ZNK3JPH4QuatmlES0_(ptr noundef nonnull align 16 dereferenceable(16) %62, double %666, double %668)
  %670 = getelementptr inbounds %"class.JPH::Quat", ptr %72, i32 0, i32 0
  %671 = getelementptr inbounds %"class.JPH::Vec4", ptr %670, i32 0, i32 0
  %672 = getelementptr inbounds %union.anon.4, ptr %671, i32 0, i32 0
  %673 = getelementptr inbounds { double, double }, ptr %672, i32 0, i32 0
  %674 = extractvalue { double, double } %669, 0
  store double %674, ptr %673, align 16
  %675 = getelementptr inbounds { double, double }, ptr %672, i32 0, i32 1
  %676 = extractvalue { double, double } %669, 1
  store double %676, ptr %675, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %65, ptr align 16 %72, i64 16, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 16, ptr %74) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %72) #9
  br label %759

677:                                              ; preds = %553
  call void @llvm.lifetime.start.p0(i64 16, ptr %76) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %78) #9
  %678 = call { double, double } @_ZN3JPH4Vec36sAxisYEv()
  %679 = getelementptr inbounds %"class.JPH::Vec3", ptr %79, i32 0, i32 0
  %680 = getelementptr inbounds %union.anon, ptr %679, i32 0, i32 0
  %681 = getelementptr inbounds { double, double }, ptr %680, i32 0, i32 0
  %682 = extractvalue { double, double } %678, 0
  store double %682, ptr %681, align 16
  %683 = getelementptr inbounds { double, double }, ptr %680, i32 0, i32 1
  %684 = extractvalue { double, double } %678, 1
  store double %684, ptr %683, align 8
  %685 = getelementptr inbounds { double, double }, ptr %79, i32 0, i32 0
  %686 = load double, ptr %685, align 16
  %687 = getelementptr inbounds { double, double }, ptr %79, i32 0, i32 1
  %688 = load double, ptr %687, align 8
  %689 = call { double, double } @_ZNK3JPH4Quat8GetTwistENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(16) %62, double %686, double %688)
  %690 = getelementptr inbounds %"class.JPH::Quat", ptr %78, i32 0, i32 0
  %691 = getelementptr inbounds %"class.JPH::Vec4", ptr %690, i32 0, i32 0
  %692 = getelementptr inbounds %union.anon.4, ptr %691, i32 0, i32 0
  %693 = getelementptr inbounds { double, double }, ptr %692, i32 0, i32 0
  %694 = extractvalue { double, double } %689, 0
  store double %694, ptr %693, align 16
  %695 = getelementptr inbounds { double, double }, ptr %692, i32 0, i32 1
  %696 = extractvalue { double, double } %689, 1
  store double %696, ptr %695, align 8
  %697 = call { double, double } @_ZNK3JPH4Quat10ConjugatedEv(ptr noundef nonnull align 16 dereferenceable(16) %78)
  %698 = getelementptr inbounds %"class.JPH::Quat", ptr %77, i32 0, i32 0
  %699 = getelementptr inbounds %"class.JPH::Vec4", ptr %698, i32 0, i32 0
  %700 = getelementptr inbounds %union.anon.4, ptr %699, i32 0, i32 0
  %701 = getelementptr inbounds { double, double }, ptr %700, i32 0, i32 0
  %702 = extractvalue { double, double } %697, 0
  store double %702, ptr %701, align 16
  %703 = getelementptr inbounds { double, double }, ptr %700, i32 0, i32 1
  %704 = extractvalue { double, double } %697, 1
  store double %704, ptr %703, align 8
  %705 = getelementptr inbounds { double, double }, ptr %77, i32 0, i32 0
  %706 = load double, ptr %705, align 16
  %707 = getelementptr inbounds { double, double }, ptr %77, i32 0, i32 1
  %708 = load double, ptr %707, align 8
  %709 = call { double, double } @_ZNK3JPH4QuatmlES0_(ptr noundef nonnull align 16 dereferenceable(16) %62, double %706, double %708)
  %710 = getelementptr inbounds %"class.JPH::Quat", ptr %76, i32 0, i32 0
  %711 = getelementptr inbounds %"class.JPH::Vec4", ptr %710, i32 0, i32 0
  %712 = getelementptr inbounds %union.anon.4, ptr %711, i32 0, i32 0
  %713 = getelementptr inbounds { double, double }, ptr %712, i32 0, i32 0
  %714 = extractvalue { double, double } %709, 0
  store double %714, ptr %713, align 16
  %715 = getelementptr inbounds { double, double }, ptr %712, i32 0, i32 1
  %716 = extractvalue { double, double } %709, 1
  store double %716, ptr %715, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %65, ptr align 16 %76, i64 16, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 16, ptr %78) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %76) #9
  br label %759

717:                                              ; preds = %553
  call void @llvm.lifetime.start.p0(i64 16, ptr %80) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %82) #9
  %718 = call { double, double } @_ZN3JPH4Vec36sAxisXEv()
  %719 = getelementptr inbounds %"class.JPH::Vec3", ptr %83, i32 0, i32 0
  %720 = getelementptr inbounds %union.anon, ptr %719, i32 0, i32 0
  %721 = getelementptr inbounds { double, double }, ptr %720, i32 0, i32 0
  %722 = extractvalue { double, double } %718, 0
  store double %722, ptr %721, align 16
  %723 = getelementptr inbounds { double, double }, ptr %720, i32 0, i32 1
  %724 = extractvalue { double, double } %718, 1
  store double %724, ptr %723, align 8
  %725 = getelementptr inbounds { double, double }, ptr %83, i32 0, i32 0
  %726 = load double, ptr %725, align 16
  %727 = getelementptr inbounds { double, double }, ptr %83, i32 0, i32 1
  %728 = load double, ptr %727, align 8
  %729 = call { double, double } @_ZNK3JPH4Quat8GetTwistENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(16) %62, double %726, double %728)
  %730 = getelementptr inbounds %"class.JPH::Quat", ptr %82, i32 0, i32 0
  %731 = getelementptr inbounds %"class.JPH::Vec4", ptr %730, i32 0, i32 0
  %732 = getelementptr inbounds %union.anon.4, ptr %731, i32 0, i32 0
  %733 = getelementptr inbounds { double, double }, ptr %732, i32 0, i32 0
  %734 = extractvalue { double, double } %729, 0
  store double %734, ptr %733, align 16
  %735 = getelementptr inbounds { double, double }, ptr %732, i32 0, i32 1
  %736 = extractvalue { double, double } %729, 1
  store double %736, ptr %735, align 8
  %737 = call { double, double } @_ZNK3JPH4Quat10ConjugatedEv(ptr noundef nonnull align 16 dereferenceable(16) %82)
  %738 = getelementptr inbounds %"class.JPH::Quat", ptr %81, i32 0, i32 0
  %739 = getelementptr inbounds %"class.JPH::Vec4", ptr %738, i32 0, i32 0
  %740 = getelementptr inbounds %union.anon.4, ptr %739, i32 0, i32 0
  %741 = getelementptr inbounds { double, double }, ptr %740, i32 0, i32 0
  %742 = extractvalue { double, double } %737, 0
  store double %742, ptr %741, align 16
  %743 = getelementptr inbounds { double, double }, ptr %740, i32 0, i32 1
  %744 = extractvalue { double, double } %737, 1
  store double %744, ptr %743, align 8
  %745 = getelementptr inbounds { double, double }, ptr %81, i32 0, i32 0
  %746 = load double, ptr %745, align 16
  %747 = getelementptr inbounds { double, double }, ptr %81, i32 0, i32 1
  %748 = load double, ptr %747, align 8
  %749 = call { double, double } @_ZNK3JPH4QuatmlES0_(ptr noundef nonnull align 16 dereferenceable(16) %62, double %746, double %748)
  %750 = getelementptr inbounds %"class.JPH::Quat", ptr %80, i32 0, i32 0
  %751 = getelementptr inbounds %"class.JPH::Vec4", ptr %750, i32 0, i32 0
  %752 = getelementptr inbounds %union.anon.4, ptr %751, i32 0, i32 0
  %753 = getelementptr inbounds { double, double }, ptr %752, i32 0, i32 0
  %754 = extractvalue { double, double } %749, 0
  store double %754, ptr %753, align 16
  %755 = getelementptr inbounds { double, double }, ptr %752, i32 0, i32 1
  %756 = extractvalue { double, double } %749, 1
  store double %756, ptr %755, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %65, ptr align 16 %80, i64 16, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 16, ptr %82) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %80) #9
  br label %759

757:                                              ; preds = %553
  br label %758

758:                                              ; preds = %757, %553
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %65, ptr align 16 %62, i64 16, i1 false), !tbaa.struct !21
  br label %759

759:                                              ; preds = %758, %717, %677, %637, %617, %597, %577
  call void @llvm.lifetime.start.p0(i64 16, ptr %84) #9
  %760 = call { double, double } @_ZNK3JPH4Quat6GetXYZEv(ptr noundef nonnull align 16 dereferenceable(16) %65)
  %761 = getelementptr inbounds %"class.JPH::Vec3", ptr %85, i32 0, i32 0
  %762 = getelementptr inbounds %union.anon, ptr %761, i32 0, i32 0
  %763 = getelementptr inbounds { double, double }, ptr %762, i32 0, i32 0
  %764 = extractvalue { double, double } %760, 0
  store double %764, ptr %763, align 16
  %765 = getelementptr inbounds { double, double }, ptr %762, i32 0, i32 1
  %766 = extractvalue { double, double } %760, 1
  store double %766, ptr %765, align 8
  %767 = getelementptr inbounds { double, double }, ptr %85, i32 0, i32 0
  %768 = load double, ptr %767, align 16
  %769 = getelementptr inbounds { double, double }, ptr %85, i32 0, i32 1
  %770 = load double, ptr %769, align 8
  %771 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef -2.000000e+00, double %768, double %770)
  %772 = getelementptr inbounds %"class.JPH::Vec3", ptr %84, i32 0, i32 0
  %773 = getelementptr inbounds %union.anon, ptr %772, i32 0, i32 0
  %774 = getelementptr inbounds { double, double }, ptr %773, i32 0, i32 0
  %775 = extractvalue { double, double } %771, 0
  store double %775, ptr %774, align 16
  %776 = getelementptr inbounds { double, double }, ptr %773, i32 0, i32 1
  %777 = extractvalue { double, double } %771, 1
  store double %777, ptr %776, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %86) #9
  store i32 0, ptr %86, align 4, !tbaa !23
  br label %778

778:                                              ; preds = %865, %759
  %779 = load i32, ptr %86, align 4, !tbaa !23
  %780 = icmp slt i32 %779, 3
  br i1 %780, label %782, label %781

781:                                              ; preds = %778
  store i32 13, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %86) #9
  br label %868

782:                                              ; preds = %778
  call void @llvm.lifetime.start.p0(i64 4, ptr %87) #9
  %783 = load i32, ptr %86, align 4, !tbaa !23
  %784 = add nsw i32 3, %783
  store i32 %784, ptr %87, align 4, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 16, ptr %88) #9
  %785 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 22
  %786 = load i32, ptr %86, align 4, !tbaa !23
  %787 = sext i32 %786 to i64
  %788 = getelementptr inbounds [3 x %"class.JPH::Vec3"], ptr %785, i64 0, i64 %787
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %88, ptr align 16 %788, i64 16, i1 false), !tbaa.struct !21
  %789 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 16
  %790 = load i32, ptr %87, align 4, !tbaa !40
  %791 = zext i32 %790 to i64
  %792 = getelementptr inbounds [6 x i32], ptr %789, i64 0, i64 %791
  %793 = load i32, ptr %792, align 4, !tbaa !43
  switch i32 %793, label %864 [
    i32 0, label %794
    i32 1, label %816
    i32 2, label %833
  ]

794:                                              ; preds = %782
  %795 = load i32, ptr %87, align 4, !tbaa !40
  %796 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint11HasFrictionENS_24SixDOFConstraintSettings5EAxisE(ptr noundef nonnull align 16 dereferenceable(1856) %93, i32 noundef %795)
  br i1 %796, label %797, label %810

797:                                              ; preds = %794
  %798 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 29
  %799 = load i32, ptr %86, align 4, !tbaa !23
  %800 = sext i32 %799 to i64
  %801 = getelementptr inbounds [3 x %"class.JPH::AngleConstraintPart"], ptr %798, i64 0, i64 %800
  %802 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %93, i32 0, i32 1
  %803 = load ptr, ptr %802, align 16, !tbaa !11
  %804 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %93, i32 0, i32 2
  %805 = load ptr, ptr %804, align 8, !tbaa !20
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %89, ptr align 16 %88, i64 16, i1 false), !tbaa.struct !21
  %806 = getelementptr inbounds { double, double }, ptr %89, i32 0, i32 0
  %807 = load double, ptr %806, align 16
  %808 = getelementptr inbounds { double, double }, ptr %89, i32 0, i32 1
  %809 = load double, ptr %808, align 8
  call void @_ZN3JPH19AngleConstraintPart29CalculateConstraintPropertiesERKNS_4BodyES3_NS_4Vec3Ef(ptr noundef nonnull align 16 dereferenceable(48) %801, ptr noundef nonnull align 16 dereferenceable(122) %803, ptr noundef nonnull align 16 dereferenceable(122) %805, double %807, double %809, float noundef 0.000000e+00)
  br label %815

810:                                              ; preds = %794
  %811 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 29
  %812 = load i32, ptr %86, align 4, !tbaa !23
  %813 = sext i32 %812 to i64
  %814 = getelementptr inbounds [3 x %"class.JPH::AngleConstraintPart"], ptr %811, i64 0, i64 %813
  call void @_ZN3JPH19AngleConstraintPart10DeactivateEv(ptr noundef nonnull align 16 dereferenceable(48) %814)
  br label %815

815:                                              ; preds = %810, %797
  br label %864

816:                                              ; preds = %782
  %817 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 29
  %818 = load i32, ptr %86, align 4, !tbaa !23
  %819 = sext i32 %818 to i64
  %820 = getelementptr inbounds [3 x %"class.JPH::AngleConstraintPart"], ptr %817, i64 0, i64 %819
  %821 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %93, i32 0, i32 1
  %822 = load ptr, ptr %821, align 16, !tbaa !11
  %823 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %93, i32 0, i32 2
  %824 = load ptr, ptr %823, align 8, !tbaa !20
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %90, ptr align 16 %88, i64 16, i1 false), !tbaa.struct !21
  %825 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 18
  %826 = load i32, ptr %86, align 4, !tbaa !23
  %827 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %825, i32 noundef %826)
  %828 = fneg float %827
  %829 = getelementptr inbounds { double, double }, ptr %90, i32 0, i32 0
  %830 = load double, ptr %829, align 16
  %831 = getelementptr inbounds { double, double }, ptr %90, i32 0, i32 1
  %832 = load double, ptr %831, align 8
  call void @_ZN3JPH19AngleConstraintPart29CalculateConstraintPropertiesERKNS_4BodyES3_NS_4Vec3Ef(ptr noundef nonnull align 16 dereferenceable(48) %820, ptr noundef nonnull align 16 dereferenceable(122) %822, ptr noundef nonnull align 16 dereferenceable(122) %824, double %830, double %832, float noundef %828)
  br label %864

833:                                              ; preds = %782
  call void @llvm.lifetime.start.p0(i64 8, ptr %91) #9
  %834 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 14
  %835 = load i32, ptr %87, align 4, !tbaa !40
  %836 = zext i32 %835 to i64
  %837 = getelementptr inbounds [6 x %"class.JPH::MotorSettings"], ptr %834, i64 0, i64 %836
  %838 = getelementptr inbounds %"class.JPH::MotorSettings", ptr %837, i32 0, i32 0
  store ptr %838, ptr %91, align 8, !tbaa !5
  %839 = load ptr, ptr %91, align 8, !tbaa !5
  %840 = call noundef zeroext i1 @_ZNK3JPH14SpringSettings12HasStiffnessEv(ptr noundef nonnull align 4 dereferenceable(12) %839)
  br i1 %840, label %841, label %858

841:                                              ; preds = %833
  %842 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 29
  %843 = load i32, ptr %86, align 4, !tbaa !23
  %844 = sext i32 %843 to i64
  %845 = getelementptr inbounds [3 x %"class.JPH::AngleConstraintPart"], ptr %842, i64 0, i64 %844
  %846 = load float, ptr %4, align 4, !tbaa !9
  %847 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %93, i32 0, i32 1
  %848 = load ptr, ptr %847, align 16, !tbaa !11
  %849 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %93, i32 0, i32 2
  %850 = load ptr, ptr %849, align 8, !tbaa !20
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %92, ptr align 16 %88, i64 16, i1 false), !tbaa.struct !21
  %851 = load i32, ptr %86, align 4, !tbaa !23
  %852 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %84, i32 noundef %851)
  %853 = load ptr, ptr %91, align 8, !tbaa !5
  %854 = getelementptr inbounds { double, double }, ptr %92, i32 0, i32 0
  %855 = load double, ptr %854, align 16
  %856 = getelementptr inbounds { double, double }, ptr %92, i32 0, i32 1
  %857 = load double, ptr %856, align 8
  call void @_ZN3JPH19AngleConstraintPart41CalculateConstraintPropertiesWithSettingsEfRKNS_4BodyES3_NS_4Vec3EffRKNS_14SpringSettingsE(ptr noundef nonnull align 16 dereferenceable(48) %845, float noundef %846, ptr noundef nonnull align 16 dereferenceable(122) %848, ptr noundef nonnull align 16 dereferenceable(122) %850, double %855, double %857, float noundef 0.000000e+00, float noundef %852, ptr noundef nonnull align 4 dereferenceable(12) %853)
  br label %863

858:                                              ; preds = %833
  %859 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %93, i32 0, i32 29
  %860 = load i32, ptr %86, align 4, !tbaa !23
  %861 = sext i32 %860 to i64
  %862 = getelementptr inbounds [3 x %"class.JPH::AngleConstraintPart"], ptr %859, i64 0, i64 %861
  call void @_ZN3JPH19AngleConstraintPart10DeactivateEv(ptr noundef nonnull align 16 dereferenceable(48) %862)
  br label %863

863:                                              ; preds = %858, %841
  store i32 16, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %91) #9
  br label %864

864:                                              ; preds = %863, %816, %815, %782
  call void @llvm.lifetime.end.p0(i64 16, ptr %88) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %87) #9
  br label %865

865:                                              ; preds = %864
  %866 = load i32, ptr %86, align 4, !tbaa !23
  %867 = add nsw i32 %866, 1
  store i32 %867, ptr %86, align 4, !tbaa !23
  br label %778, !llvm.loop !49

868:                                              ; preds = %781
  call void @llvm.lifetime.end.p0(i64 16, ptr %84) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %65) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %62) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %60) #9
  call void @llvm.lifetime.end.p0(i64 64, ptr %56) #9
  br label %869

869:                                              ; preds = %868, %504
  call void @llvm.lifetime.end.p0(i64 16, ptr %51) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %48) #9
  br label %870

870:                                              ; preds = %869, %439
  br label %871

871:                                              ; preds = %870, %403
  call void @llvm.lifetime.end.p0(i64 64, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #9
  ret void
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH18AxisConstraintPart41CalculateConstraintPropertiesWithSettingsEfRKNS_4BodyENS_4Vec3ES3_S4_S4_ffRKNS_14SpringSettingsE(ptr noundef nonnull align 4 dereferenceable(64), float noundef, ptr noundef nonnull align 16 dereferenceable(122), double, double, ptr noundef nonnull align 16 dereferenceable(122), double, double, double, double, float noundef, float noundef, ptr noundef nonnull align 4 dereferenceable(12)) #2 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: alwaysinline mustprogress uwtable
declare dso_local noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16), i32 noundef) #3 align 2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH24SwingTwistConstraintPart29CalculateConstraintPropertiesERKNS_4BodyES3_NS_4QuatES4_(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) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH24SwingTwistConstraintPart10DeactivateEv(ptr noundef nonnull align 16 dereferenceable(272)) #7 align 2

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

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Vec36sAxisXEv() #3 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Vec36sAxisYEv() #3 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Vec36sAxisZEv() #3 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef, double, double) #8

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH19AngleConstraintPart29CalculateConstraintPropertiesERKNS_4BodyES3_NS_4Vec3Ef(ptr noundef nonnull align 16 dereferenceable(48), 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 void @_ZN3JPH19AngleConstraintPart41CalculateConstraintPropertiesWithSettingsEfRKNS_4BodyES3_NS_4Vec3EffRKNS_14SpringSettingsE(ptr noundef nonnull align 16 dereferenceable(48), float noundef, ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(122), double, double, float noundef, float noundef, ptr noundef nonnull align 4 dereferenceable(12)) #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 = { 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 #8 = { 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 #9 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !6, i64 32}
!12 = !{!"_ZTSN3JPH17TwoBodyConstraintE", !13, i64 0, !6, i64 32, !6, i64 40}
!13 = !{!"_ZTSN3JPH10ConstraintE", !14, i64 8, !17, i64 12, !17, i64 16, !7, i64 20, !7, i64 21, !18, i64 22, !19, i64 24}
!14 = !{!"_ZTSN3JPH9RefTargetINS_10ConstraintEEE", !15, i64 0}
!15 = !{!"_ZTSSt6atomicIjE", !16, i64 0}
!16 = !{!"_ZTSSt13__atomic_baseIjE", !17, i64 0}
!17 = !{!"int", !7, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = !{!12, !6, i64 40}
!21 = !{i64 0, i64 16, !22}
!22 = !{!7, !7, i64 0}
!23 = !{!17, !17, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!27, !18, i64 114}
!27 = !{!"_ZTSN3JPH16SixDOFConstraintE", !12, i64 0, !28, i64 48, !28, i64 64, !29, i64 80, !29, i64 96, !7, i64 112, !7, i64 113, !18, i64 114, !18, i64 115, !7, i64 116, !18, i64 117, !7, i64 120, !7, i64 144, !7, i64 168, !7, i64 204, !7, i64 372, !7, i64 396, !28, i64 432, !28, i64 448, !28, i64 464, !29, i64 480, !7, i64 496, !7, i64 544, !7, i64 592, !7, i64 604, !31, i64 800, !33, i64 1040, !37, i64 1312, !7, i64 1520, !7, i64 1712}
!28 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!29 = !{!"_ZTSN3JPH4QuatE", !30, i64 0}
!30 = !{!"_ZTSN3JPH4Vec4E", !7, i64 0}
!31 = !{!"_ZTSN3JPH19PointConstraintPartE", !28, i64 0, !28, i64 16, !32, i64 32, !32, i64 96, !32, i64 160, !28, i64 224}
!32 = !{!"_ZTSN3JPH5Mat44E", !7, i64 0}
!33 = !{!"_ZTSN3JPH24SwingTwistConstraintPartE", !7, i64 0, !34, i64 1, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !28, i64 80, !28, i64 96, !28, i64 112, !35, i64 128, !35, i64 176, !35, i64 224}
!34 = !{!"_ZTSN3JPH10ESwingTypeE", !7, i64 0}
!35 = !{!"_ZTSN3JPH19AngleConstraintPartE", !28, i64 0, !28, i64 16, !10, i64 32, !36, i64 36, !10, i64 44}
!36 = !{!"_ZTSN3JPH10SpringPartE", !10, i64 0, !10, i64 4}
!37 = !{!"_ZTSN3JPH27RotationEulerConstraintPartE", !32, i64 0, !32, i64 64, !32, i64 128, !28, i64 192}
!38 = !{i8 0, i8 2}
!39 = !{}
!40 = !{!41, !41, i64 0}
!41 = !{!"_ZTSN3JPH24SixDOFConstraintSettings5EAxisE", !7, i64 0}
!42 = !{!18, !18, i64 0}
!43 = !{!44, !44, i64 0}
!44 = !{!"_ZTSN3JPH11EMotorStateE", !7, i64 0}
!45 = distinct !{!45, !25}
!46 = !{!27, !18, i64 115}
!47 = distinct !{!47, !25}
!48 = !{!27, !7, i64 116}
!49 = distinct !{!49, !25}


; 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::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.4 }
%union.anon.4 = type { <4 x float> }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::AxisConstraintPart" = type { %"class.JPH::Float3", %"class.JPH::Float3", %"class.JPH::Float3", %"class.JPH::Float3", float, %"class.JPH::SpringPart", float }
%"class.JPH::Float3" = type { float, float, float }
%"class.JPH::SpringPart" = type { float, float }
%"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 }

; 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: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH18AxisConstraintPart10DeactivateEv(ptr noundef nonnull align 4 dereferenceable(64)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH19AngleConstraintPart10DeactivateEv(ptr noundef nonnull align 16 dereferenceable(48)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH16SixDOFConstraint23SetupVelocityConstraintEf(ptr noundef nonnull align 16 dereferenceable(1856) %0, float noundef %1) unnamed_addr #5 align 2 {
  %3 = alloca %"class.JPH::Quat", align 16
  %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::Vec3", 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::Mat44", align 16
  %13 = alloca %"class.JPH::Mat44", align 16
  %14 = alloca %"class.JPH::Quat", align 16
  %15 = alloca %"class.JPH::Quat", align 16
  %16 = alloca %"class.JPH::Quat", align 16
  %17 = alloca %"class.JPH::Mat44", align 16
  %18 = alloca %"class.JPH::Quat", align 16
  %19 = alloca %"class.JPH::Quat", align 16
  %20 = alloca %"class.JPH::Quat", align 16
  %21 = alloca %"class.JPH::Quat", align 16
  %22 = alloca %"class.JPH::Quat", align 16
  %23 = alloca %"class.JPH::Quat", align 16
  %24 = alloca %"class.JPH::Vec3", align 16
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #9
  %25 = getelementptr inbounds i8, ptr %0, i64 32
  %26 = load ptr, ptr %25, align 16, !tbaa !5
  %27 = tail call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %26)
  %28 = extractvalue { double, double } %27, 0
  store double %28, ptr %3, align 16
  %29 = getelementptr inbounds i8, ptr %3, i64 8
  %30 = extractvalue { double, double } %27, 1
  store double %30, ptr %29, align 8
  %31 = getelementptr inbounds i8, ptr %0, i64 40
  %32 = load ptr, ptr %31, align 8, !tbaa !17
  %33 = tail call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %32)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #9
  %34 = getelementptr inbounds i8, ptr %0, i64 80
  %.sroa.0157.0.copyload = load double, ptr %34, align 16
  %.sroa.2158.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 88
  %.sroa.2158.0.copyload = load double, ptr %.sroa.2158.0..sroa_idx, align 8, !tbaa !18
  %35 = call { double, double } @_ZNK3JPH4QuatmlES0_(ptr noundef nonnull align 16 dereferenceable(16) %3, double %.sroa.0157.0.copyload, double %.sroa.2158.0.copyload)
  %36 = extractvalue { double, double } %35, 0
  store double %36, ptr %4, align 16
  %37 = getelementptr inbounds i8, ptr %4, i64 8
  %38 = extractvalue { double, double } %35, 1
  store double %38, ptr %37, align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %5) #9
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %5, double %36, double %38)
  %39 = getelementptr inbounds i8, ptr %0, i64 496
  %40 = call { double, double } @_ZNK3JPH5Mat4410GetColumn3Ej(ptr noundef nonnull align 16 dereferenceable(64) %5, i32 noundef 0)
  %41 = extractvalue { double, double } %40, 0
  %42 = extractvalue { double, double } %40, 1
  store double %41, ptr %39, align 16
  %.sroa.4150.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 504
  store double %42, ptr %.sroa.4150.0..sroa_idx, align 8, !tbaa !18
  %43 = call { double, double } @_ZNK3JPH5Mat4410GetColumn3Ej(ptr noundef nonnull align 16 dereferenceable(64) %5, i32 noundef 1)
  %44 = extractvalue { double, double } %43, 0
  %45 = extractvalue { double, double } %43, 1
  %46 = getelementptr inbounds i8, ptr %0, i64 512
  store double %44, ptr %46, align 16
  %.sroa.4150.0..sroa_idx.1 = getelementptr inbounds i8, ptr %0, i64 520
  store double %45, ptr %.sroa.4150.0..sroa_idx.1, align 8, !tbaa !18
  %47 = call { double, double } @_ZNK3JPH5Mat4410GetColumn3Ej(ptr noundef nonnull align 16 dereferenceable(64) %5, i32 noundef 2)
  %48 = extractvalue { double, double } %47, 0
  %49 = extractvalue { double, double } %47, 1
  %50 = getelementptr inbounds i8, ptr %0, i64 528
  store double %48, ptr %50, align 16
  %.sroa.4150.0..sroa_idx.2 = getelementptr inbounds i8, ptr %0, i64 536
  store double %49, ptr %.sroa.4150.0..sroa_idx.2, align 8, !tbaa !18
  %51 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint29IsTranslationFullyConstrainedEv(ptr noundef nonnull align 16 dereferenceable(1856) %0)
  br i1 %51, label %52, label %60

52:                                               ; preds = %2
  %53 = extractvalue { double, double } %33, 1
  %54 = extractvalue { double, double } %33, 0
  %55 = getelementptr inbounds i8, ptr %0, i64 800
  %56 = load ptr, ptr %25, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %6) #9
  %.sroa.0147.0.copyload = load double, ptr %3, align 16
  %.sroa.2148.0.copyload = load double, ptr %29, align 8, !tbaa !18
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %6, double %.sroa.0147.0.copyload, double %.sroa.2148.0.copyload)
  %57 = getelementptr inbounds i8, ptr %0, i64 48
  %.sroa.0145.0.copyload = load double, ptr %57, align 16
  %.sroa.2146.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 56
  %.sroa.2146.0.copyload = load double, ptr %.sroa.2146.0..sroa_idx, align 8, !tbaa !18
  %58 = load ptr, ptr %31, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %7) #9
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %7, double %54, double %53)
  %59 = getelementptr inbounds i8, ptr %0, i64 64
  %.sroa.0141.0.copyload = load double, ptr %59, align 16
  %.sroa.2142.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 72
  %.sroa.2142.0.copyload = load double, ptr %.sroa.2142.0..sroa_idx, align 8, !tbaa !18
  call void @_ZN3JPH19PointConstraintPart29CalculateConstraintPropertiesERKNS_4BodyERKNS_5Mat44ENS_4Vec3ES3_S6_S7_(ptr noundef nonnull align 16 dereferenceable(240) %55, ptr noundef nonnull align 16 dereferenceable(122) %56, ptr noundef nonnull align 16 dereferenceable(64) %6, double %.sroa.0145.0.copyload, double %.sroa.2146.0.copyload, ptr noundef nonnull align 16 dereferenceable(122) %58, ptr noundef nonnull align 16 dereferenceable(64) %7, double %.sroa.0141.0.copyload, double %.sroa.2142.0.copyload)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #9
  br label %132

60:                                               ; preds = %2
  %61 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint24IsTranslationConstrainedEv(ptr noundef nonnull align 16 dereferenceable(1856) %0)
  br i1 %61, label %66, label %62

62:                                               ; preds = %60
  %63 = getelementptr inbounds i8, ptr %0, i64 114
  %64 = load i8, ptr %63, align 2, !tbaa !19, !range !32, !noundef !33
  %65 = trunc nuw i8 %64 to i1
  br i1 %65, label %66, label %132

66:                                               ; preds = %62, %60
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #9
  call void @_ZNK3JPH16SixDOFConstraint31GetPositionConstraintPropertiesERNS_4Vec3ES2_S2_(ptr noundef nonnull align 16 dereferenceable(1856) %0, ptr noundef nonnull align 16 dereferenceable(16) %8, ptr noundef nonnull align 16 dereferenceable(16) %9, ptr noundef nonnull align 16 dereferenceable(16) %10)
  %.sroa.2109.0..sroa_idx = getelementptr inbounds i8, ptr %10, i64 8
  %67 = getelementptr inbounds i8, ptr %0, i64 592
  %68 = getelementptr inbounds i8, ptr %0, i64 120
  %69 = getelementptr inbounds i8, ptr %0, i64 144
  %70 = getelementptr inbounds i8, ptr %0, i64 604
  %.sroa.2105.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 8
  %.sroa.2103.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 8
  %.sroa.2101.0..sroa_idx = getelementptr inbounds i8, ptr %11, i64 8
  %71 = getelementptr inbounds i8, ptr %0, i64 168
  %72 = getelementptr inbounds i8, ptr %0, i64 396
  %73 = getelementptr inbounds i8, ptr %0, i64 204
  %74 = getelementptr inbounds i8, ptr %0, i64 1520
  %75 = getelementptr inbounds i8, ptr %0, i64 464
  %76 = getelementptr inbounds i8, ptr %0, i64 432
  br label %78

77:                                               ; preds = %131
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #9
  br label %132

78:                                               ; preds = %66, %131
  %indvars.iv = phi i64 [ 0, %66 ], [ %indvars.iv.next, %131 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #9
  %79 = getelementptr inbounds [3 x %"class.JPH::Vec3"], ptr %39, i64 0, i64 %indvars.iv
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %11, ptr noundef nonnull align 16 dereferenceable(16) %79, i64 16, i1 false), !tbaa.struct !34
  %.sroa.0108.0.copyload = load double, ptr %10, align 16
  %.sroa.2109.0.copyload = load double, ptr %.sroa.2109.0..sroa_idx, align 8, !tbaa !18
  %80 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %11, double %.sroa.0108.0.copyload, double %.sroa.2109.0.copyload)
  %81 = getelementptr inbounds [3 x float], ptr %67, i64 0, i64 %indvars.iv
  store float %80, ptr %81, align 4, !tbaa !35
  %82 = trunc nuw nsw i64 %indvars.iv to i32
  %83 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint11IsFixedAxisENS_24SixDOFConstraintSettings5EAxisE(ptr noundef nonnull align 16 dereferenceable(1856) %0, i32 noundef %82)
  br i1 %83, label %84, label %87

84:                                               ; preds = %78
  %85 = getelementptr inbounds [6 x float], ptr %68, i64 0, i64 %indvars.iv
  %86 = load float, ptr %85, align 4, !tbaa !35
  br label %97

87:                                               ; preds = %78
  %88 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint10IsFreeAxisENS_24SixDOFConstraintSettings5EAxisE(ptr noundef nonnull align 16 dereferenceable(1856) %0, i32 noundef %82)
  br i1 %88, label %102, label %89

89:                                               ; preds = %87
  %90 = getelementptr inbounds [6 x float], ptr %68, i64 0, i64 %indvars.iv
  %91 = load float, ptr %90, align 4, !tbaa !35
  %92 = fcmp ugt float %80, %91
  br i1 %92, label %93, label %97

93:                                               ; preds = %89
  %94 = getelementptr inbounds [6 x float], ptr %69, i64 0, i64 %indvars.iv
  %95 = load float, ptr %94, align 4, !tbaa !35
  %96 = fcmp ult float %80, %95
  br i1 %96, label %102, label %97

97:                                               ; preds = %93, %89, %84
  %.pn = phi float [ %86, %84 ], [ %91, %89 ], [ %95, %93 ]
  %.0167.ph = fsub float %80, %.pn
  %98 = getelementptr inbounds [3 x %"class.JPH::AxisConstraintPart"], ptr %70, i64 0, i64 %indvars.iv
  %99 = load ptr, ptr %25, align 16, !tbaa !5
  %.sroa.0104.0.copyload = load double, ptr %8, align 16
  %.sroa.2105.0.copyload = load double, ptr %.sroa.2105.0..sroa_idx, align 8, !tbaa !18
  %100 = load ptr, ptr %31, align 8, !tbaa !17
  %.sroa.0102.0.copyload = load double, ptr %9, align 16
  %.sroa.2103.0.copyload = load double, ptr %.sroa.2103.0..sroa_idx, align 8, !tbaa !18
  %.sroa.0100.0.copyload = load double, ptr %11, align 16
  %.sroa.2101.0.copyload = load double, ptr %.sroa.2101.0..sroa_idx, align 8, !tbaa !18
  %101 = getelementptr inbounds [3 x %"class.JPH::SpringSettings"], ptr %71, i64 0, i64 %indvars.iv
  call void @_ZN3JPH18AxisConstraintPart41CalculateConstraintPropertiesWithSettingsEfRKNS_4BodyENS_4Vec3ES3_S4_S4_ffRKNS_14SpringSettingsE(ptr noundef nonnull align 4 dereferenceable(64) %98, float noundef %1, ptr noundef nonnull align 16 dereferenceable(122) %99, double %.sroa.0104.0.copyload, double %.sroa.2105.0.copyload, ptr noundef nonnull align 16 dereferenceable(122) %100, double %.sroa.0102.0.copyload, double %.sroa.2103.0.copyload, double %.sroa.0100.0.copyload, double %.sroa.2101.0.copyload, float noundef 0.000000e+00, float noundef %.0167.ph, ptr noundef nonnull align 4 dereferenceable(12) %101)
  br label %104

102:                                              ; preds = %93, %87
  %103 = getelementptr inbounds [3 x %"class.JPH::AxisConstraintPart"], ptr %70, i64 0, i64 %indvars.iv
  call void @_ZN3JPH18AxisConstraintPart10DeactivateEv(ptr noundef nonnull align 4 dereferenceable(64) %103)
  br label %104

104:                                              ; preds = %102, %97
  %105 = getelementptr inbounds [6 x i32], ptr %72, i64 0, i64 %indvars.iv
  %106 = load i32, ptr %105, align 4, !tbaa !36
  switch i32 %106, label %131 [
    i32 0, label %107
    i32 1, label %114
    i32 2, label %120
  ]

107:                                              ; preds = %104
  %108 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint11HasFrictionENS_24SixDOFConstraintSettings5EAxisE(ptr noundef nonnull align 16 dereferenceable(1856) %0, i32 noundef %82)
  %109 = getelementptr inbounds [3 x %"class.JPH::AxisConstraintPart"], ptr %74, i64 0, i64 %indvars.iv
  br i1 %108, label %110, label %113

110:                                              ; preds = %107
  %111 = load ptr, ptr %25, align 16, !tbaa !5
  %.sroa.098.0.copyload = load double, ptr %8, align 16
  %.sroa.299.0.copyload = load double, ptr %.sroa.2105.0..sroa_idx, align 8, !tbaa !18
  %112 = load ptr, ptr %31, align 8, !tbaa !17
  %.sroa.096.0.copyload = load double, ptr %9, align 16
  %.sroa.297.0.copyload = load double, ptr %.sroa.2103.0..sroa_idx, align 8, !tbaa !18
  %.sroa.094.0.copyload = load double, ptr %11, align 16
  %.sroa.295.0.copyload = load double, ptr %.sroa.2101.0..sroa_idx, align 8, !tbaa !18
  call void @_ZN3JPH18AxisConstraintPart29CalculateConstraintPropertiesERKNS_4BodyENS_4Vec3ES3_S4_S4_f(ptr noundef nonnull align 4 dereferenceable(64) %109, ptr noundef nonnull align 16 dereferenceable(122) %111, double %.sroa.098.0.copyload, double %.sroa.299.0.copyload, ptr noundef nonnull align 16 dereferenceable(122) %112, double %.sroa.096.0.copyload, double %.sroa.297.0.copyload, double %.sroa.094.0.copyload, double %.sroa.295.0.copyload, float noundef 0.000000e+00)
  br label %131

113:                                              ; preds = %107
  call void @_ZN3JPH18AxisConstraintPart10DeactivateEv(ptr noundef nonnull align 4 dereferenceable(64) %109)
  br label %131

114:                                              ; preds = %104
  %115 = getelementptr inbounds [3 x %"class.JPH::AxisConstraintPart"], ptr %74, i64 0, i64 %indvars.iv
  %116 = load ptr, ptr %25, align 16, !tbaa !5
  %.sroa.092.0.copyload = load double, ptr %8, align 16
  %.sroa.293.0.copyload = load double, ptr %.sroa.2105.0..sroa_idx, align 8, !tbaa !18
  %117 = load ptr, ptr %31, align 8, !tbaa !17
  %.sroa.090.0.copyload = load double, ptr %9, align 16
  %.sroa.291.0.copyload = load double, ptr %.sroa.2103.0..sroa_idx, align 8, !tbaa !18
  %.sroa.088.0.copyload = load double, ptr %11, align 16
  %.sroa.289.0.copyload = load double, ptr %.sroa.2101.0..sroa_idx, align 8, !tbaa !18
  %118 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %76, i32 noundef %82)
  %119 = fneg float %118
  call void @_ZN3JPH18AxisConstraintPart29CalculateConstraintPropertiesERKNS_4BodyENS_4Vec3ES3_S4_S4_f(ptr noundef nonnull align 4 dereferenceable(64) %115, ptr noundef nonnull align 16 dereferenceable(122) %116, double %.sroa.092.0.copyload, double %.sroa.293.0.copyload, ptr noundef nonnull align 16 dereferenceable(122) %117, double %.sroa.090.0.copyload, double %.sroa.291.0.copyload, double %.sroa.088.0.copyload, double %.sroa.289.0.copyload, float noundef %119)
  br label %131

120:                                              ; preds = %104
  %121 = getelementptr inbounds [6 x %"class.JPH::MotorSettings"], ptr %73, i64 0, i64 %indvars.iv
  %122 = call noundef zeroext i1 @_ZNK3JPH14SpringSettings12HasStiffnessEv(ptr noundef nonnull align 4 dereferenceable(12) %121)
  %123 = getelementptr inbounds [3 x %"class.JPH::AxisConstraintPart"], ptr %74, i64 0, i64 %indvars.iv
  br i1 %122, label %124, label %130

124:                                              ; preds = %120
  %125 = load ptr, ptr %25, align 16, !tbaa !5
  %.sroa.084.0.copyload = load double, ptr %8, align 16
  %.sroa.285.0.copyload = load double, ptr %.sroa.2105.0..sroa_idx, align 8, !tbaa !18
  %126 = load ptr, ptr %31, align 8, !tbaa !17
  %.sroa.082.0.copyload = load double, ptr %9, align 16
  %.sroa.283.0.copyload = load double, ptr %.sroa.2103.0..sroa_idx, align 8, !tbaa !18
  %.sroa.080.0.copyload = load double, ptr %11, align 16
  %.sroa.281.0.copyload = load double, ptr %.sroa.2101.0..sroa_idx, align 8, !tbaa !18
  %.sroa.078.0.copyload = load double, ptr %10, align 16
  %.sroa.279.0.copyload = load double, ptr %.sroa.2109.0..sroa_idx, align 8, !tbaa !18
  %127 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %11, double %.sroa.078.0.copyload, double %.sroa.279.0.copyload)
  %128 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %75, i32 noundef %82)
  %129 = fsub float %127, %128
  call void @_ZN3JPH18AxisConstraintPart41CalculateConstraintPropertiesWithSettingsEfRKNS_4BodyENS_4Vec3ES3_S4_S4_ffRKNS_14SpringSettingsE(ptr noundef nonnull align 4 dereferenceable(64) %123, float noundef %1, ptr noundef nonnull align 16 dereferenceable(122) %125, double %.sroa.084.0.copyload, double %.sroa.285.0.copyload, ptr noundef nonnull align 16 dereferenceable(122) %126, double %.sroa.082.0.copyload, double %.sroa.283.0.copyload, double %.sroa.080.0.copyload, double %.sroa.281.0.copyload, float noundef 0.000000e+00, float noundef %129, ptr noundef nonnull align 4 dereferenceable(12) %121)
  br label %131

130:                                              ; preds = %120
  call void @_ZN3JPH18AxisConstraintPart10DeactivateEv(ptr noundef nonnull align 4 dereferenceable(64) %123)
  br label %131

131:                                              ; preds = %124, %130, %110, %113, %114, %104
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 3
  br i1 %exitcond.not, label %77, label %78, !llvm.loop !38

132:                                              ; preds = %62, %77, %52
  %133 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint26IsRotationFullyConstrainedEv(ptr noundef nonnull align 16 dereferenceable(1856) %0)
  br i1 %133, label %134, label %144

134:                                              ; preds = %132
  %135 = getelementptr inbounds i8, ptr %0, i64 1312
  %136 = load ptr, ptr %25, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %12) #9
  %137 = call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %136)
  %138 = extractvalue { double, double } %137, 0
  %139 = extractvalue { double, double } %137, 1
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %12, double %138, double %139)
  %140 = load ptr, ptr %31, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %13) #9
  %141 = call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %140)
  %142 = extractvalue { double, double } %141, 0
  %143 = extractvalue { double, double } %141, 1
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %13, double %142, double %143)
  call void @_ZN3JPH27RotationEulerConstraintPart29CalculateConstraintPropertiesERKNS_4BodyERKNS_5Mat44ES3_S6_(ptr noundef nonnull align 16 dereferenceable(208) %135, ptr noundef nonnull align 16 dereferenceable(122) %136, ptr noundef nonnull align 16 dereferenceable(64) %12, ptr noundef nonnull align 16 dereferenceable(122) %140, ptr noundef nonnull align 16 dereferenceable(64) %13)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %13) #9
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %12) #9
  br label %357

144:                                              ; preds = %132
  %145 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint21IsRotationConstrainedEv(ptr noundef nonnull align 16 dereferenceable(1856) %0)
  br i1 %145, label %150, label %146

146:                                              ; preds = %144
  %147 = getelementptr inbounds i8, ptr %0, i64 115
  %148 = load i8, ptr %147, align 1, !tbaa !40, !range !32, !noundef !33
  %149 = trunc nuw i8 %148 to i1
  br i1 %149, label %150, label %357

150:                                              ; preds = %146, %144
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #9
  %151 = load ptr, ptr %31, align 8, !tbaa !17
  %152 = call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %151)
  %153 = extractvalue { double, double } %152, 0
  store double %153, ptr %14, align 16
  %154 = getelementptr inbounds i8, ptr %14, i64 8
  %155 = extractvalue { double, double } %152, 1
  store double %155, ptr %154, align 8
  %156 = getelementptr inbounds i8, ptr %0, i64 96
  %.sroa.070.0.copyload = load double, ptr %156, align 16
  %.sroa.271.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 104
  %.sroa.271.0.copyload = load double, ptr %.sroa.271.0..sroa_idx, align 8, !tbaa !18
  %157 = call { double, double } @_ZNK3JPH4QuatmlES0_(ptr noundef nonnull align 16 dereferenceable(16) %14, double %.sroa.070.0.copyload, double %.sroa.271.0.copyload)
  %158 = extractvalue { double, double } %157, 0
  %159 = extractvalue { double, double } %157, 1
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #9
  %160 = call { double, double } @_ZNK3JPH4Quat10ConjugatedEv(ptr noundef nonnull align 16 dereferenceable(16) %4)
  %161 = extractvalue { double, double } %160, 0
  store double %161, ptr %16, align 16
  %162 = getelementptr inbounds i8, ptr %16, i64 8
  %163 = extractvalue { double, double } %160, 1
  store double %163, ptr %162, align 8
  %164 = call { double, double } @_ZNK3JPH4QuatmlES0_(ptr noundef nonnull align 16 dereferenceable(16) %16, double %158, double %159)
  %165 = extractvalue { double, double } %164, 0
  store double %165, ptr %15, align 16
  %166 = getelementptr inbounds i8, ptr %15, i64 8
  %167 = extractvalue { double, double } %164, 1
  store double %167, ptr %166, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #9
  %168 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint21IsRotationConstrainedEv(ptr noundef nonnull align 16 dereferenceable(1856) %0)
  %169 = getelementptr inbounds i8, ptr %0, i64 1040
  br i1 %168, label %170, label %173

170:                                              ; preds = %150
  %171 = load ptr, ptr %25, align 16, !tbaa !5
  %172 = load ptr, ptr %31, align 8, !tbaa !17
  %.sroa.066.0.copyload = load double, ptr %15, align 16
  %.sroa.267.0.copyload = load double, ptr %166, align 8, !tbaa !18
  %.sroa.064.0.copyload = load double, ptr %4, align 16
  %.sroa.265.0.copyload = load double, ptr %37, align 8, !tbaa !18
  call void @_ZN3JPH24SwingTwistConstraintPart29CalculateConstraintPropertiesERKNS_4BodyES3_NS_4QuatES4_(ptr noundef nonnull align 16 dereferenceable(272) %169, ptr noundef nonnull align 16 dereferenceable(122) %171, ptr noundef nonnull align 16 dereferenceable(122) %172, double %.sroa.066.0.copyload, double %.sroa.267.0.copyload, double %.sroa.064.0.copyload, double %.sroa.265.0.copyload)
  br label %174

173:                                              ; preds = %150
  call void @_ZN3JPH24SwingTwistConstraintPart10DeactivateEv(ptr noundef nonnull align 16 dereferenceable(272) %169)
  br label %174

174:                                              ; preds = %173, %170
  %175 = getelementptr inbounds i8, ptr %0, i64 115
  %176 = load i8, ptr %175, align 1, !tbaa !40, !range !32, !noundef !33
  %177 = trunc nuw i8 %176 to i1
  br i1 %177, label %178, label %356

178:                                              ; preds = %174
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %17) #9
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %17, double %158, double %159)
  %179 = getelementptr inbounds i8, ptr %0, i64 544
  %180 = call { double, double } @_ZNK3JPH5Mat4410GetColumn3Ej(ptr noundef nonnull align 16 dereferenceable(64) %17, i32 noundef 0)
  %181 = extractvalue { double, double } %180, 0
  %182 = extractvalue { double, double } %180, 1
  store double %181, ptr %179, align 16
  %.sroa.457.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 552
  store double %182, ptr %.sroa.457.0..sroa_idx, align 8, !tbaa !18
  %183 = call { double, double } @_ZNK3JPH5Mat4410GetColumn3Ej(ptr noundef nonnull align 16 dereferenceable(64) %17, i32 noundef 1)
  %184 = extractvalue { double, double } %183, 0
  %185 = extractvalue { double, double } %183, 1
  %186 = getelementptr inbounds i8, ptr %0, i64 560
  store double %184, ptr %186, align 16
  %.sroa.457.0..sroa_idx.1 = getelementptr inbounds i8, ptr %0, i64 568
  store double %185, ptr %.sroa.457.0..sroa_idx.1, align 8, !tbaa !18
  %187 = call { double, double } @_ZNK3JPH5Mat4410GetColumn3Ej(ptr noundef nonnull align 16 dereferenceable(64) %17, i32 noundef 2)
  %188 = extractvalue { double, double } %187, 0
  %189 = extractvalue { double, double } %187, 1
  %190 = getelementptr inbounds i8, ptr %0, i64 576
  store double %188, ptr %190, align 16
  %.sroa.457.0..sroa_idx.2 = getelementptr inbounds i8, ptr %0, i64 584
  store double %189, ptr %.sroa.457.0..sroa_idx.2, align 8, !tbaa !18
  %191 = getelementptr inbounds i8, ptr %0, i64 480
  %.sroa.053.0.copyload = load double, ptr %191, align 16
  %.sroa.254.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 488
  %.sroa.254.0.copyload = load double, ptr %.sroa.254.0..sroa_idx, align 8, !tbaa !18
  %192 = call noundef float @_ZNK3JPH4Quat3DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %15, double %.sroa.053.0.copyload, double %.sroa.254.0.copyload)
  %193 = fcmp ogt float %192, 0.000000e+00
  br i1 %193, label %194, label %195

194:                                              ; preds = %178
  %.sroa.055.0.copyload = load double, ptr %191, align 16
  %.sroa.5.0.copyload = load double, ptr %.sroa.254.0..sroa_idx, align 8, !tbaa !18
  br label %199

195:                                              ; preds = %178
  %196 = call { double, double } @_ZNK3JPH4QuatngEv(ptr noundef nonnull align 16 dereferenceable(16) %191)
  %197 = extractvalue { double, double } %196, 0
  %198 = extractvalue { double, double } %196, 1
  br label %199

199:                                              ; preds = %195, %194
  %.sroa.055.0 = phi double [ %.sroa.055.0.copyload, %194 ], [ %197, %195 ]
  %.sroa.5.0 = phi double [ %.sroa.5.0.copyload, %194 ], [ %198, %195 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %19) #9
  %200 = call { double, double } @_ZNK3JPH4Quat10ConjugatedEv(ptr noundef nonnull align 16 dereferenceable(16) %15)
  %201 = extractvalue { double, double } %200, 0
  store double %201, ptr %19, align 16
  %202 = getelementptr inbounds i8, ptr %19, i64 8
  %203 = extractvalue { double, double } %200, 1
  store double %203, ptr %202, align 8
  %204 = call { double, double } @_ZNK3JPH4QuatmlES0_(ptr noundef nonnull align 16 dereferenceable(16) %19, double %.sroa.055.0, double %.sroa.5.0)
  %205 = extractvalue { double, double } %204, 0
  store double %205, ptr %18, align 16
  %206 = getelementptr inbounds i8, ptr %18, i64 8
  %207 = extractvalue { double, double } %204, 1
  store double %207, ptr %206, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %20) #9
  %208 = getelementptr inbounds i8, ptr %0, i64 116
  %209 = load i8, ptr %208, align 4, !tbaa !41
  switch i8 %209, label %273 [
    i8 1, label %210
    i8 2, label %217
    i8 4, label %224
    i8 3, label %231
    i8 5, label %245
    i8 6, label %259
  ]

210:                                              ; preds = %199
  %211 = call { double, double } @_ZN3JPH4Vec36sAxisXEv()
  %212 = extractvalue { double, double } %211, 0
  %213 = extractvalue { double, double } %211, 1
  %214 = call { double, double } @_ZNK3JPH4Quat8GetTwistENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(16) %18, double %212, double %213)
  %215 = extractvalue { double, double } %214, 0
  %216 = extractvalue { double, double } %214, 1
  store double %215, ptr %20, align 16
  %.sroa.450.0..sroa_idx = getelementptr inbounds i8, ptr %20, i64 8
  store double %216, ptr %.sroa.450.0..sroa_idx, align 8, !tbaa !18
  br label %274

217:                                              ; preds = %199
  %218 = call { double, double } @_ZN3JPH4Vec36sAxisYEv()
  %219 = extractvalue { double, double } %218, 0
  %220 = extractvalue { double, double } %218, 1
  %221 = call { double, double } @_ZNK3JPH4Quat8GetTwistENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(16) %18, double %219, double %220)
  %222 = extractvalue { double, double } %221, 0
  %223 = extractvalue { double, double } %221, 1
  store double %222, ptr %20, align 16
  %.sroa.446.0..sroa_idx = getelementptr inbounds i8, ptr %20, i64 8
  store double %223, ptr %.sroa.446.0..sroa_idx, align 8, !tbaa !18
  br label %274

224:                                              ; preds = %199
  %225 = call { double, double } @_ZN3JPH4Vec36sAxisZEv()
  %226 = extractvalue { double, double } %225, 0
  %227 = extractvalue { double, double } %225, 1
  %228 = call { double, double } @_ZNK3JPH4Quat8GetTwistENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(16) %18, double %226, double %227)
  %229 = extractvalue { double, double } %228, 0
  %230 = extractvalue { double, double } %228, 1
  store double %229, ptr %20, align 16
  %.sroa.442.0..sroa_idx = getelementptr inbounds i8, ptr %20, i64 8
  store double %230, ptr %.sroa.442.0..sroa_idx, align 8, !tbaa !18
  br label %274

231:                                              ; preds = %199
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %21) #9
  %232 = call { double, double } @_ZN3JPH4Vec36sAxisZEv()
  %233 = extractvalue { double, double } %232, 0
  %234 = extractvalue { double, double } %232, 1
  %235 = call { double, double } @_ZNK3JPH4Quat8GetTwistENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(16) %18, double %233, double %234)
  %236 = extractvalue { double, double } %235, 0
  store double %236, ptr %21, align 16
  %237 = getelementptr inbounds i8, ptr %21, i64 8
  %238 = extractvalue { double, double } %235, 1
  store double %238, ptr %237, align 8
  %239 = call { double, double } @_ZNK3JPH4Quat10ConjugatedEv(ptr noundef nonnull align 16 dereferenceable(16) %21)
  %240 = extractvalue { double, double } %239, 0
  %241 = extractvalue { double, double } %239, 1
  %242 = call { double, double } @_ZNK3JPH4QuatmlES0_(ptr noundef nonnull align 16 dereferenceable(16) %18, double %240, double %241)
  %243 = extractvalue { double, double } %242, 0
  %244 = extractvalue { double, double } %242, 1
  store double %243, ptr %20, align 16
  %.sroa.438.0..sroa_idx = getelementptr inbounds i8, ptr %20, i64 8
  store double %244, ptr %.sroa.438.0..sroa_idx, align 8, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) #9
  br label %274

245:                                              ; preds = %199
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %22) #9
  %246 = call { double, double } @_ZN3JPH4Vec36sAxisYEv()
  %247 = extractvalue { double, double } %246, 0
  %248 = extractvalue { double, double } %246, 1
  %249 = call { double, double } @_ZNK3JPH4Quat8GetTwistENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(16) %18, double %247, double %248)
  %250 = extractvalue { double, double } %249, 0
  store double %250, ptr %22, align 16
  %251 = getelementptr inbounds i8, ptr %22, i64 8
  %252 = extractvalue { double, double } %249, 1
  store double %252, ptr %251, align 8
  %253 = call { double, double } @_ZNK3JPH4Quat10ConjugatedEv(ptr noundef nonnull align 16 dereferenceable(16) %22)
  %254 = extractvalue { double, double } %253, 0
  %255 = extractvalue { double, double } %253, 1
  %256 = call { double, double } @_ZNK3JPH4QuatmlES0_(ptr noundef nonnull align 16 dereferenceable(16) %18, double %254, double %255)
  %257 = extractvalue { double, double } %256, 0
  %258 = extractvalue { double, double } %256, 1
  store double %257, ptr %20, align 16
  %.sroa.432.0..sroa_idx = getelementptr inbounds i8, ptr %20, i64 8
  store double %258, ptr %.sroa.432.0..sroa_idx, align 8, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #9
  br label %274

259:                                              ; preds = %199
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %23) #9
  %260 = call { double, double } @_ZN3JPH4Vec36sAxisXEv()
  %261 = extractvalue { double, double } %260, 0
  %262 = extractvalue { double, double } %260, 1
  %263 = call { double, double } @_ZNK3JPH4Quat8GetTwistENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(16) %18, double %261, double %262)
  %264 = extractvalue { double, double } %263, 0
  store double %264, ptr %23, align 16
  %265 = getelementptr inbounds i8, ptr %23, i64 8
  %266 = extractvalue { double, double } %263, 1
  store double %266, ptr %265, align 8
  %267 = call { double, double } @_ZNK3JPH4Quat10ConjugatedEv(ptr noundef nonnull align 16 dereferenceable(16) %23)
  %268 = extractvalue { double, double } %267, 0
  %269 = extractvalue { double, double } %267, 1
  %270 = call { double, double } @_ZNK3JPH4QuatmlES0_(ptr noundef nonnull align 16 dereferenceable(16) %18, double %268, double %269)
  %271 = extractvalue { double, double } %270, 0
  %272 = extractvalue { double, double } %270, 1
  store double %271, ptr %20, align 16
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %20, i64 8
  store double %272, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %23) #9
  br label %274

273:                                              ; preds = %199
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %20, ptr noundef nonnull align 16 dereferenceable(16) %18, i64 16, i1 false), !tbaa.struct !34
  br label %274

274:                                              ; preds = %273, %259, %245, %231, %224, %217, %210
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %24) #9
  %275 = call { double, double } @_ZNK3JPH4Quat6GetXYZEv(ptr noundef nonnull align 16 dereferenceable(16) %20)
  %276 = extractvalue { double, double } %275, 0
  %277 = extractvalue { double, double } %275, 1
  %278 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef -2.000000e+00, double %276, double %277)
  %279 = extractvalue { double, double } %278, 0
  store double %279, ptr %24, align 16
  %280 = getelementptr inbounds i8, ptr %24, i64 8
  %281 = extractvalue { double, double } %278, 1
  store double %281, ptr %280, align 8
  %282 = getelementptr inbounds i8, ptr %0, i64 1712
  %283 = getelementptr inbounds i8, ptr %0, i64 448
  %.sroa.06.0.copyload = load double, ptr %179, align 16
  %.sroa.6.0.copyload = load double, ptr %.sroa.457.0..sroa_idx, align 8, !tbaa !18
  %284 = getelementptr inbounds i8, ptr %0, i64 408
  %285 = load i32, ptr %284, align 8, !tbaa !36
  switch i32 %285, label %305 [
    i32 0, label %286
    i32 1, label %292
    i32 2, label %297
  ]

286:                                              ; preds = %274
  %287 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint11HasFrictionENS_24SixDOFConstraintSettings5EAxisE(ptr noundef nonnull align 16 dereferenceable(1856) %0, i32 noundef 3)
  br i1 %287, label %288, label %291

288:                                              ; preds = %286
  %289 = load ptr, ptr %25, align 16, !tbaa !5
  %290 = load ptr, ptr %31, align 8, !tbaa !17
  call void @_ZN3JPH19AngleConstraintPart29CalculateConstraintPropertiesERKNS_4BodyES3_NS_4Vec3Ef(ptr noundef nonnull align 16 dereferenceable(48) %282, ptr noundef nonnull align 16 dereferenceable(122) %289, ptr noundef nonnull align 16 dereferenceable(122) %290, double %.sroa.06.0.copyload, double %.sroa.6.0.copyload, float noundef 0.000000e+00)
  br label %305

291:                                              ; preds = %286
  call void @_ZN3JPH19AngleConstraintPart10DeactivateEv(ptr noundef nonnull align 16 dereferenceable(48) %282)
  br label %305

292:                                              ; preds = %274
  %293 = load ptr, ptr %25, align 16, !tbaa !5
  %294 = load ptr, ptr %31, align 8, !tbaa !17
  %295 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %283, i32 noundef 0)
  %296 = fneg float %295
  call void @_ZN3JPH19AngleConstraintPart29CalculateConstraintPropertiesERKNS_4BodyES3_NS_4Vec3Ef(ptr noundef nonnull align 16 dereferenceable(48) %282, ptr noundef nonnull align 16 dereferenceable(122) %293, ptr noundef nonnull align 16 dereferenceable(122) %294, double %.sroa.06.0.copyload, double %.sroa.6.0.copyload, float noundef %296)
  br label %305

297:                                              ; preds = %274
  %298 = getelementptr inbounds i8, ptr %0, i64 288
  %299 = call noundef zeroext i1 @_ZNK3JPH14SpringSettings12HasStiffnessEv(ptr noundef nonnull align 4 dereferenceable(12) %298)
  br i1 %299, label %300, label %304

300:                                              ; preds = %297
  %301 = load ptr, ptr %25, align 16, !tbaa !5
  %302 = load ptr, ptr %31, align 8, !tbaa !17
  %303 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %24, i32 noundef 0)
  call void @_ZN3JPH19AngleConstraintPart41CalculateConstraintPropertiesWithSettingsEfRKNS_4BodyES3_NS_4Vec3EffRKNS_14SpringSettingsE(ptr noundef nonnull align 16 dereferenceable(48) %282, float noundef %1, ptr noundef nonnull align 16 dereferenceable(122) %301, ptr noundef nonnull align 16 dereferenceable(122) %302, double %.sroa.06.0.copyload, double %.sroa.6.0.copyload, float noundef 0.000000e+00, float noundef %303, ptr noundef nonnull align 4 dereferenceable(12) %298)
  br label %305

304:                                              ; preds = %297
  call void @_ZN3JPH19AngleConstraintPart10DeactivateEv(ptr noundef nonnull align 16 dereferenceable(48) %282)
  br label %305

305:                                              ; preds = %300, %304, %288, %291, %292, %274
  %.sroa.06.0.copyload.1 = load double, ptr %186, align 16
  %.sroa.6.0.copyload.1 = load double, ptr %.sroa.457.0..sroa_idx.1, align 8, !tbaa !18
  %306 = getelementptr inbounds i8, ptr %0, i64 412
  %307 = load i32, ptr %306, align 4, !tbaa !36
  switch i32 %307, label %330 [
    i32 0, label %323
    i32 1, label %317
    i32 2, label %308
  ]

308:                                              ; preds = %305
  %309 = getelementptr inbounds i8, ptr %0, i64 316
  %310 = call noundef zeroext i1 @_ZNK3JPH14SpringSettings12HasStiffnessEv(ptr noundef nonnull align 4 dereferenceable(12) %309)
  %311 = getelementptr inbounds i8, ptr %0, i64 1760
  br i1 %310, label %313, label %312

312:                                              ; preds = %308
  call void @_ZN3JPH19AngleConstraintPart10DeactivateEv(ptr noundef nonnull align 16 dereferenceable(48) %311)
  br label %330

313:                                              ; preds = %308
  %314 = load ptr, ptr %25, align 16, !tbaa !5
  %315 = load ptr, ptr %31, align 8, !tbaa !17
  %316 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %24, i32 noundef 1)
  call void @_ZN3JPH19AngleConstraintPart41CalculateConstraintPropertiesWithSettingsEfRKNS_4BodyES3_NS_4Vec3EffRKNS_14SpringSettingsE(ptr noundef nonnull align 16 dereferenceable(48) %311, float noundef %1, ptr noundef nonnull align 16 dereferenceable(122) %314, ptr noundef nonnull align 16 dereferenceable(122) %315, double %.sroa.06.0.copyload.1, double %.sroa.6.0.copyload.1, float noundef 0.000000e+00, float noundef %316, ptr noundef nonnull align 4 dereferenceable(12) %309)
  br label %330

317:                                              ; preds = %305
  %318 = getelementptr inbounds i8, ptr %0, i64 1760
  %319 = load ptr, ptr %25, align 16, !tbaa !5
  %320 = load ptr, ptr %31, align 8, !tbaa !17
  %321 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %283, i32 noundef 1)
  %322 = fneg float %321
  call void @_ZN3JPH19AngleConstraintPart29CalculateConstraintPropertiesERKNS_4BodyES3_NS_4Vec3Ef(ptr noundef nonnull align 16 dereferenceable(48) %318, ptr noundef nonnull align 16 dereferenceable(122) %319, ptr noundef nonnull align 16 dereferenceable(122) %320, double %.sroa.06.0.copyload.1, double %.sroa.6.0.copyload.1, float noundef %322)
  br label %330

323:                                              ; preds = %305
  %324 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint11HasFrictionENS_24SixDOFConstraintSettings5EAxisE(ptr noundef nonnull align 16 dereferenceable(1856) %0, i32 noundef 4)
  %325 = getelementptr inbounds i8, ptr %0, i64 1760
  br i1 %324, label %327, label %326

326:                                              ; preds = %323
  call void @_ZN3JPH19AngleConstraintPart10DeactivateEv(ptr noundef nonnull align 16 dereferenceable(48) %325)
  br label %330

327:                                              ; preds = %323
  %328 = load ptr, ptr %25, align 16, !tbaa !5
  %329 = load ptr, ptr %31, align 8, !tbaa !17
  call void @_ZN3JPH19AngleConstraintPart29CalculateConstraintPropertiesERKNS_4BodyES3_NS_4Vec3Ef(ptr noundef nonnull align 16 dereferenceable(48) %325, ptr noundef nonnull align 16 dereferenceable(122) %328, ptr noundef nonnull align 16 dereferenceable(122) %329, double %.sroa.06.0.copyload.1, double %.sroa.6.0.copyload.1, float noundef 0.000000e+00)
  br label %330

330:                                              ; preds = %327, %326, %317, %313, %312, %305
  %.sroa.06.0.copyload.2 = load double, ptr %190, align 16
  %.sroa.6.0.copyload.2 = load double, ptr %.sroa.457.0..sroa_idx.2, align 8, !tbaa !18
  %331 = getelementptr inbounds i8, ptr %0, i64 416
  %332 = load i32, ptr %331, align 16, !tbaa !36
  switch i32 %332, label %355 [
    i32 0, label %348
    i32 1, label %342
    i32 2, label %333
  ]

333:                                              ; preds = %330
  %334 = getelementptr inbounds i8, ptr %0, i64 344
  %335 = call noundef zeroext i1 @_ZNK3JPH14SpringSettings12HasStiffnessEv(ptr noundef nonnull align 4 dereferenceable(12) %334)
  %336 = getelementptr inbounds i8, ptr %0, i64 1808
  br i1 %335, label %338, label %337

337:                                              ; preds = %333
  call void @_ZN3JPH19AngleConstraintPart10DeactivateEv(ptr noundef nonnull align 16 dereferenceable(48) %336)
  br label %355

338:                                              ; preds = %333
  %339 = load ptr, ptr %25, align 16, !tbaa !5
  %340 = load ptr, ptr %31, align 8, !tbaa !17
  %341 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %24, i32 noundef 2)
  call void @_ZN3JPH19AngleConstraintPart41CalculateConstraintPropertiesWithSettingsEfRKNS_4BodyES3_NS_4Vec3EffRKNS_14SpringSettingsE(ptr noundef nonnull align 16 dereferenceable(48) %336, float noundef %1, ptr noundef nonnull align 16 dereferenceable(122) %339, ptr noundef nonnull align 16 dereferenceable(122) %340, double %.sroa.06.0.copyload.2, double %.sroa.6.0.copyload.2, float noundef 0.000000e+00, float noundef %341, ptr noundef nonnull align 4 dereferenceable(12) %334)
  br label %355

342:                                              ; preds = %330
  %343 = getelementptr inbounds i8, ptr %0, i64 1808
  %344 = load ptr, ptr %25, align 16, !tbaa !5
  %345 = load ptr, ptr %31, align 8, !tbaa !17
  %346 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %283, i32 noundef 2)
  %347 = fneg float %346
  call void @_ZN3JPH19AngleConstraintPart29CalculateConstraintPropertiesERKNS_4BodyES3_NS_4Vec3Ef(ptr noundef nonnull align 16 dereferenceable(48) %343, ptr noundef nonnull align 16 dereferenceable(122) %344, ptr noundef nonnull align 16 dereferenceable(122) %345, double %.sroa.06.0.copyload.2, double %.sroa.6.0.copyload.2, float noundef %347)
  br label %355

348:                                              ; preds = %330
  %349 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint11HasFrictionENS_24SixDOFConstraintSettings5EAxisE(ptr noundef nonnull align 16 dereferenceable(1856) %0, i32 noundef 5)
  %350 = getelementptr inbounds i8, ptr %0, i64 1808
  br i1 %349, label %352, label %351

351:                                              ; preds = %348
  call void @_ZN3JPH19AngleConstraintPart10DeactivateEv(ptr noundef nonnull align 16 dereferenceable(48) %350)
  br label %355

352:                                              ; preds = %348
  %353 = load ptr, ptr %25, align 16, !tbaa !5
  %354 = load ptr, ptr %31, align 8, !tbaa !17
  call void @_ZN3JPH19AngleConstraintPart29CalculateConstraintPropertiesERKNS_4BodyES3_NS_4Vec3Ef(ptr noundef nonnull align 16 dereferenceable(48) %350, ptr noundef nonnull align 16 dereferenceable(122) %353, ptr noundef nonnull align 16 dereferenceable(122) %354, double %.sroa.06.0.copyload.2, double %.sroa.6.0.copyload.2, float noundef 0.000000e+00)
  br label %355

355:                                              ; preds = %352, %351, %342, %338, %337, %330
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %24) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #9
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %17) #9
  br label %356

356:                                              ; preds = %355, %174
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #9
  br label %357

357:                                              ; preds = %146, %356, %134
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #9
  ret void
}

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH5Mat4410GetColumn3Ej(ptr noundef nonnull align 16 dereferenceable(64), i32 noundef) local_unnamed_addr #3 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 #2 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 #2 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 #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) 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 @_ZN3JPH18AxisConstraintPart41CalculateConstraintPropertiesWithSettingsEfRKNS_4BodyENS_4Vec3ES3_S4_S4_ffRKNS_14SpringSettingsE(ptr noundef nonnull align 4 dereferenceable(64), float noundef, ptr noundef nonnull align 16 dereferenceable(122), double, double, ptr noundef nonnull align 16 dereferenceable(122), double, double, double, double, float noundef, float noundef, ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2 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 #2 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16), i32 noundef) local_unnamed_addr #3 align 2

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

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

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

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Vec36sAxisXEv() local_unnamed_addr #3 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Vec36sAxisYEv() local_unnamed_addr #3 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Vec36sAxisZEv() local_unnamed_addr #3 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef, double, double) local_unnamed_addr #8

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 #8 = { 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 #9 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !16, i64 32}
!6 = !{!"_ZTSN3JPH17TwoBodyConstraintE", !7, i64 0, !16, i64 32, !16, i64 40}
!7 = !{!"_ZTSN3JPH10ConstraintE", !8, i64 8, !11, i64 12, !11, i64 16, !12, i64 20, !12, i64 21, !14, i64 22, !15, i64 24}
!8 = !{!"_ZTSN3JPH9RefTargetINS_10ConstraintEEE", !9, i64 0}
!9 = !{!"_ZTSSt6atomicIjE", !10, i64 0}
!10 = !{!"_ZTSSt13__atomic_baseIjE", !11, i64 0}
!11 = !{!"int", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"bool", !12, i64 0}
!15 = !{!"long", !12, i64 0}
!16 = !{!"any pointer", !12, i64 0}
!17 = !{!6, !16, i64 40}
!18 = !{!12, !12, i64 0}
!19 = !{!20, !14, i64 114}
!20 = !{!"_ZTSN3JPH16SixDOFConstraintE", !6, i64 0, !21, i64 48, !21, i64 64, !22, i64 80, !22, i64 96, !12, i64 112, !12, i64 113, !14, i64 114, !14, i64 115, !12, i64 116, !14, i64 117, !12, i64 120, !12, i64 144, !12, i64 168, !12, i64 204, !12, i64 372, !12, i64 396, !21, i64 432, !21, i64 448, !21, i64 464, !22, i64 480, !12, i64 496, !12, i64 544, !12, i64 592, !12, i64 604, !24, i64 800, !26, i64 1040, !31, i64 1312, !12, i64 1520, !12, i64 1712}
!21 = !{!"_ZTSN3JPH4Vec3E", !12, i64 0}
!22 = !{!"_ZTSN3JPH4QuatE", !23, i64 0}
!23 = !{!"_ZTSN3JPH4Vec4E", !12, i64 0}
!24 = !{!"_ZTSN3JPH19PointConstraintPartE", !21, i64 0, !21, i64 16, !25, i64 32, !25, i64 96, !25, i64 160, !21, i64 224}
!25 = !{!"_ZTSN3JPH5Mat44E", !12, i64 0}
!26 = !{!"_ZTSN3JPH24SwingTwistConstraintPartE", !12, i64 0, !27, i64 1, !28, i64 4, !28, i64 8, !28, i64 12, !28, i64 16, !28, i64 20, !28, i64 24, !28, i64 28, !28, i64 32, !28, i64 36, !28, i64 40, !28, i64 44, !28, i64 48, !28, i64 52, !28, i64 56, !28, i64 60, !28, i64 64, !21, i64 80, !21, i64 96, !21, i64 112, !29, i64 128, !29, i64 176, !29, i64 224}
!27 = !{!"_ZTSN3JPH10ESwingTypeE", !12, i64 0}
!28 = !{!"float", !12, i64 0}
!29 = !{!"_ZTSN3JPH19AngleConstraintPartE", !21, i64 0, !21, i64 16, !28, i64 32, !30, i64 36, !28, i64 44}
!30 = !{!"_ZTSN3JPH10SpringPartE", !28, i64 0, !28, i64 4}
!31 = !{!"_ZTSN3JPH27RotationEulerConstraintPartE", !25, i64 0, !25, i64 64, !25, i64 128, !21, i64 192}
!32 = !{i8 0, i8 2}
!33 = !{}
!34 = !{i64 0, i64 16, !18}
!35 = !{!28, !28, i64 0}
!36 = !{!37, !37, i64 0}
!37 = !{!"_ZTSN3JPH11EMotorStateE", !12, i64 0}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.mustprogress"}
!40 = !{!20, !14, i64 115}
!41 = !{!20, !12, i64 116}


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