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

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH19AngleConstraintPart8IsActiveEv(ptr noundef nonnull align 16 dereferenceable(48)) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3JPH16SixDOFConstraint23SolveVelocityConstraintEf(ptr noundef nonnull align 16 dereferenceable(1856) %0, float noundef %1) unnamed_addr #4 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca float, align 4
  %5 = alloca i8, align 1
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca float, align 4
  %9 = alloca %"class.JPH::Vec3", align 16
  %10 = alloca %"class.JPH::Vec3", align 16
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca float, align 4
  %14 = alloca %"class.JPH::Vec3", align 16
  %15 = alloca %"class.JPH::Vec3", align 16
  %16 = alloca i32, align 4
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca %"struct.JPH::AssertLastParam", align 1
  %20 = alloca %"class.JPH::Vec3", align 16
  store ptr %0, ptr %3, align 8, !tbaa !5
  store float %1, ptr %4, align 4, !tbaa !9
  %21 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #5
  store i8 0, ptr %5, align 1, !tbaa !11
  %22 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %21, i32 0, i32 7
  %23 = load i8, ptr %22, align 2, !tbaa !13, !range !32, !noundef !33
  %24 = trunc i8 %23 to i1
  br i1 %24, label %25, label %124

25:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !34
  br label %26

26:                                               ; preds = %120, %25
  %27 = load i32, ptr %6, align 4, !tbaa !34
  %28 = icmp slt i32 %27, 3
  br i1 %28, label %30, label %29

29:                                               ; preds = %26
  store i32 2, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %123

30:                                               ; preds = %26
  %31 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %21, i32 0, i32 28
  %32 = load i32, ptr %6, align 4, !tbaa !34
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [3 x %"class.JPH::AxisConstraintPart"], ptr %31, i64 0, i64 %33
  %35 = call noundef zeroext i1 @_ZNK3JPH18AxisConstraintPart8IsActiveEv(ptr noundef nonnull align 4 dereferenceable(64) %34)
  br i1 %35, label %36, label %119

36:                                               ; preds = %30
  %37 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %21, i32 0, i32 16
  %38 = load i32, ptr %6, align 4, !tbaa !34
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [6 x i32], ptr %37, i64 0, i64 %39
  %41 = load i32, ptr %40, align 4, !tbaa !35
  switch i32 %41, label %118 [
    i32 0, label %42
    i32 1, label %77
    i32 2, label %77
  ]

42:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %43 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %21, i32 0, i32 15
  %44 = load i32, ptr %6, align 4, !tbaa !34
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [6 x float], ptr %43, i64 0, i64 %45
  %47 = load float, ptr %46, align 4, !tbaa !9
  %48 = load float, ptr %4, align 4, !tbaa !9
  %49 = fmul float %47, %48
  store float %49, ptr %8, align 4, !tbaa !9
  %50 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %21, i32 0, i32 28
  %51 = load i32, ptr %6, align 4, !tbaa !34
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [3 x %"class.JPH::AxisConstraintPart"], ptr %50, i64 0, i64 %52
  %54 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %21, i32 0, i32 1
  %55 = load ptr, ptr %54, align 16, !tbaa !37
  %56 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %21, i32 0, i32 2
  %57 = load ptr, ptr %56, align 8, !tbaa !38
  %58 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %21, i32 0, i32 21
  %59 = load i32, ptr %6, align 4, !tbaa !34
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [3 x %"class.JPH::Vec3"], ptr %58, i64 0, i64 %60
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %9, ptr align 16 %61, i64 16, i1 false), !tbaa.struct !39
  %62 = load float, ptr %8, align 4, !tbaa !9
  %63 = fneg float %62
  %64 = load float, ptr %8, align 4, !tbaa !9
  %65 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 0
  %66 = load double, ptr %65, align 16
  %67 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 1
  %68 = load double, ptr %67, align 8
  %69 = call noundef zeroext i1 @_ZN3JPH18AxisConstraintPart23SolveVelocityConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 4 dereferenceable(64) %53, ptr noundef nonnull align 16 dereferenceable(122) %55, ptr noundef nonnull align 16 dereferenceable(122) %57, double %66, double %68, float noundef %63, float noundef %64)
  %70 = zext i1 %69 to i32
  %71 = load i8, ptr %5, align 1, !tbaa !11, !range !32, !noundef !33
  %72 = trunc i8 %71 to i1
  %73 = zext i1 %72 to i32
  %74 = or i32 %73, %70
  %75 = icmp ne i32 %74, 0
  %76 = zext i1 %75 to i8
  store i8 %76, ptr %5, align 1, !tbaa !11
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %118

77:                                               ; preds = %36, %36
  %78 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %21, i32 0, i32 28
  %79 = load i32, ptr %6, align 4, !tbaa !34
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [3 x %"class.JPH::AxisConstraintPart"], ptr %78, i64 0, i64 %80
  %82 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %21, i32 0, i32 1
  %83 = load ptr, ptr %82, align 16, !tbaa !37
  %84 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %21, i32 0, i32 2
  %85 = load ptr, ptr %84, align 8, !tbaa !38
  %86 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %21, i32 0, i32 21
  %87 = load i32, ptr %6, align 4, !tbaa !34
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [3 x %"class.JPH::Vec3"], ptr %86, i64 0, i64 %88
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %10, ptr align 16 %89, i64 16, i1 false), !tbaa.struct !39
  %90 = load float, ptr %4, align 4, !tbaa !9
  %91 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %21, i32 0, i32 14
  %92 = load i32, ptr %6, align 4, !tbaa !34
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [6 x %"class.JPH::MotorSettings"], ptr %91, i64 0, i64 %93
  %95 = getelementptr inbounds %"class.JPH::MotorSettings", ptr %94, i32 0, i32 1
  %96 = load float, ptr %95, align 4, !tbaa !41
  %97 = fmul float %90, %96
  %98 = load float, ptr %4, align 4, !tbaa !9
  %99 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %21, i32 0, i32 14
  %100 = load i32, ptr %6, align 4, !tbaa !34
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [6 x %"class.JPH::MotorSettings"], ptr %99, i64 0, i64 %101
  %103 = getelementptr inbounds %"class.JPH::MotorSettings", ptr %102, i32 0, i32 2
  %104 = load float, ptr %103, align 4, !tbaa !45
  %105 = fmul float %98, %104
  %106 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 0
  %107 = load double, ptr %106, align 16
  %108 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 1
  %109 = load double, ptr %108, align 8
  %110 = call noundef zeroext i1 @_ZN3JPH18AxisConstraintPart23SolveVelocityConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 4 dereferenceable(64) %81, ptr noundef nonnull align 16 dereferenceable(122) %83, ptr noundef nonnull align 16 dereferenceable(122) %85, double %107, double %109, float noundef %97, float noundef %105)
  %111 = zext i1 %110 to i32
  %112 = load i8, ptr %5, align 1, !tbaa !11, !range !32, !noundef !33
  %113 = trunc i8 %112 to i1
  %114 = zext i1 %113 to i32
  %115 = or i32 %114, %111
  %116 = icmp ne i32 %115, 0
  %117 = zext i1 %116 to i8
  store i8 %117, ptr %5, align 1, !tbaa !11
  br label %118

118:                                              ; preds = %77, %42, %36
  br label %119

119:                                              ; preds = %118, %30
  br label %120

120:                                              ; preds = %119
  %121 = load i32, ptr %6, align 4, !tbaa !34
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %6, align 4, !tbaa !34
  br label %26, !llvm.loop !46

123:                                              ; preds = %29
  br label %124

124:                                              ; preds = %123, %2
  %125 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %21, i32 0, i32 8
  %126 = load i8, ptr %125, align 1, !tbaa !48, !range !32, !noundef !33
  %127 = trunc i8 %126 to i1
  br i1 %127, label %128, label %229

128:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !34
  br label %129

129:                                              ; preds = %225, %128
  %130 = load i32, ptr %11, align 4, !tbaa !34
  %131 = icmp slt i32 %130, 3
  br i1 %131, label %133, label %132

132:                                              ; preds = %129
  store i32 6, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %228

133:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %134 = load i32, ptr %11, align 4, !tbaa !34
  %135 = add nsw i32 3, %134
  store i32 %135, ptr %12, align 4, !tbaa !49
  %136 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %21, i32 0, i32 29
  %137 = load i32, ptr %11, align 4, !tbaa !34
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [3 x %"class.JPH::AngleConstraintPart"], ptr %136, i64 0, i64 %138
  %140 = call noundef zeroext i1 @_ZNK3JPH19AngleConstraintPart8IsActiveEv(ptr noundef nonnull align 16 dereferenceable(48) %139)
  br i1 %140, label %141, label %224

141:                                              ; preds = %133
  %142 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %21, i32 0, i32 16
  %143 = load i32, ptr %12, align 4, !tbaa !49
  %144 = zext i32 %143 to i64
  %145 = getelementptr inbounds [6 x i32], ptr %142, i64 0, i64 %144
  %146 = load i32, ptr %145, align 4, !tbaa !35
  switch i32 %146, label %223 [
    i32 0, label %147
    i32 1, label %182
    i32 2, label %182
  ]

147:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %148 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %21, i32 0, i32 15
  %149 = load i32, ptr %12, align 4, !tbaa !49
  %150 = zext i32 %149 to i64
  %151 = getelementptr inbounds [6 x float], ptr %148, i64 0, i64 %150
  %152 = load float, ptr %151, align 4, !tbaa !9
  %153 = load float, ptr %4, align 4, !tbaa !9
  %154 = fmul float %152, %153
  store float %154, ptr %13, align 4, !tbaa !9
  %155 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %21, i32 0, i32 29
  %156 = load i32, ptr %11, align 4, !tbaa !34
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [3 x %"class.JPH::AngleConstraintPart"], ptr %155, i64 0, i64 %157
  %159 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %21, i32 0, i32 1
  %160 = load ptr, ptr %159, align 16, !tbaa !37
  %161 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %21, i32 0, i32 2
  %162 = load ptr, ptr %161, align 8, !tbaa !38
  %163 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %21, i32 0, i32 22
  %164 = load i32, ptr %11, align 4, !tbaa !34
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [3 x %"class.JPH::Vec3"], ptr %163, i64 0, i64 %165
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %14, ptr align 16 %166, i64 16, i1 false), !tbaa.struct !39
  %167 = load float, ptr %13, align 4, !tbaa !9
  %168 = fneg float %167
  %169 = load float, ptr %13, align 4, !tbaa !9
  %170 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 0
  %171 = load double, ptr %170, align 16
  %172 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 1
  %173 = load double, ptr %172, align 8
  %174 = call noundef zeroext i1 @_ZN3JPH19AngleConstraintPart23SolveVelocityConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 16 dereferenceable(48) %158, ptr noundef nonnull align 16 dereferenceable(122) %160, ptr noundef nonnull align 16 dereferenceable(122) %162, double %171, double %173, float noundef %168, float noundef %169)
  %175 = zext i1 %174 to i32
  %176 = load i8, ptr %5, align 1, !tbaa !11, !range !32, !noundef !33
  %177 = trunc i8 %176 to i1
  %178 = zext i1 %177 to i32
  %179 = or i32 %178, %175
  %180 = icmp ne i32 %179, 0
  %181 = zext i1 %180 to i8
  store i8 %181, ptr %5, align 1, !tbaa !11
  store i32 9, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %223

182:                                              ; preds = %141, %141
  %183 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %21, i32 0, i32 29
  %184 = load i32, ptr %11, align 4, !tbaa !34
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [3 x %"class.JPH::AngleConstraintPart"], ptr %183, i64 0, i64 %185
  %187 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %21, i32 0, i32 1
  %188 = load ptr, ptr %187, align 16, !tbaa !37
  %189 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %21, i32 0, i32 2
  %190 = load ptr, ptr %189, align 8, !tbaa !38
  %191 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %21, i32 0, i32 22
  %192 = load i32, ptr %11, align 4, !tbaa !34
  %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 %15, ptr align 16 %194, i64 16, i1 false), !tbaa.struct !39
  %195 = load float, ptr %4, align 4, !tbaa !9
  %196 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %21, i32 0, i32 14
  %197 = load i32, ptr %12, align 4, !tbaa !49
  %198 = zext i32 %197 to i64
  %199 = getelementptr inbounds [6 x %"class.JPH::MotorSettings"], ptr %196, i64 0, i64 %198
  %200 = getelementptr inbounds %"class.JPH::MotorSettings", ptr %199, i32 0, i32 3
  %201 = load float, ptr %200, align 4, !tbaa !51
  %202 = fmul float %195, %201
  %203 = load float, ptr %4, align 4, !tbaa !9
  %204 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %21, i32 0, i32 14
  %205 = load i32, ptr %12, align 4, !tbaa !49
  %206 = zext i32 %205 to i64
  %207 = getelementptr inbounds [6 x %"class.JPH::MotorSettings"], ptr %204, i64 0, i64 %206
  %208 = getelementptr inbounds %"class.JPH::MotorSettings", ptr %207, i32 0, i32 4
  %209 = load float, ptr %208, align 4, !tbaa !52
  %210 = fmul float %203, %209
  %211 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 0
  %212 = load double, ptr %211, align 16
  %213 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 1
  %214 = load double, ptr %213, align 8
  %215 = call noundef zeroext i1 @_ZN3JPH19AngleConstraintPart23SolveVelocityConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 16 dereferenceable(48) %186, ptr noundef nonnull align 16 dereferenceable(122) %188, ptr noundef nonnull align 16 dereferenceable(122) %190, double %212, double %214, float noundef %202, float noundef %210)
  %216 = zext i1 %215 to i32
  %217 = load i8, ptr %5, align 1, !tbaa !11, !range !32, !noundef !33
  %218 = trunc i8 %217 to i1
  %219 = zext i1 %218 to i32
  %220 = or i32 %219, %216
  %221 = icmp ne i32 %220, 0
  %222 = zext i1 %221 to i8
  store i8 %222, ptr %5, align 1, !tbaa !11
  br label %223

223:                                              ; preds = %182, %147, %141
  br label %224

224:                                              ; preds = %223, %133
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %225

225:                                              ; preds = %224
  %226 = load i32, ptr %11, align 4, !tbaa !34
  %227 = add nsw i32 %226, 1
  store i32 %227, ptr %11, align 4, !tbaa !34
  br label %129, !llvm.loop !53

228:                                              ; preds = %132
  br label %229

229:                                              ; preds = %228, %124
  %230 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint26IsRotationFullyConstrainedEv(ptr noundef nonnull align 16 dereferenceable(1856) %21)
  br i1 %230, label %231, label %245

231:                                              ; preds = %229
  %232 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %21, i32 0, i32 27
  %233 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %21, i32 0, i32 1
  %234 = load ptr, ptr %233, align 16, !tbaa !37
  %235 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %21, i32 0, i32 2
  %236 = load ptr, ptr %235, align 8, !tbaa !38
  %237 = call noundef zeroext i1 @_ZN3JPH27RotationEulerConstraintPart23SolveVelocityConstraintERNS_4BodyES2_(ptr noundef nonnull align 16 dereferenceable(208) %232, ptr noundef nonnull align 16 dereferenceable(122) %234, ptr noundef nonnull align 16 dereferenceable(122) %236)
  %238 = zext i1 %237 to i32
  %239 = load i8, ptr %5, align 1, !tbaa !11, !range !32, !noundef !33
  %240 = trunc i8 %239 to i1
  %241 = zext i1 %240 to i32
  %242 = or i32 %241, %238
  %243 = icmp ne i32 %242, 0
  %244 = zext i1 %243 to i8
  store i8 %244, ptr %5, align 1, !tbaa !11
  br label %262

245:                                              ; preds = %229
  %246 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint21IsRotationConstrainedEv(ptr noundef nonnull align 16 dereferenceable(1856) %21)
  br i1 %246, label %247, label %261

247:                                              ; preds = %245
  %248 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %21, i32 0, i32 26
  %249 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %21, i32 0, i32 1
  %250 = load ptr, ptr %249, align 16, !tbaa !37
  %251 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %21, i32 0, i32 2
  %252 = load ptr, ptr %251, align 8, !tbaa !38
  %253 = call noundef zeroext i1 @_ZN3JPH24SwingTwistConstraintPart23SolveVelocityConstraintERNS_4BodyES2_(ptr noundef nonnull align 16 dereferenceable(272) %248, ptr noundef nonnull align 16 dereferenceable(122) %250, ptr noundef nonnull align 16 dereferenceable(122) %252)
  %254 = zext i1 %253 to i32
  %255 = load i8, ptr %5, align 1, !tbaa !11, !range !32, !noundef !33
  %256 = trunc i8 %255 to i1
  %257 = zext i1 %256 to i32
  %258 = or i32 %257, %254
  %259 = icmp ne i32 %258, 0
  %260 = zext i1 %259 to i8
  store i8 %260, ptr %5, align 1, !tbaa !11
  br label %261

261:                                              ; preds = %247, %245
  br label %262

262:                                              ; preds = %261, %231
  %263 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint29IsTranslationFullyConstrainedEv(ptr noundef nonnull align 16 dereferenceable(1856) %21)
  br i1 %263, label %264, label %278

264:                                              ; preds = %262
  %265 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %21, i32 0, i32 25
  %266 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %21, i32 0, i32 1
  %267 = load ptr, ptr %266, align 16, !tbaa !37
  %268 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %21, i32 0, i32 2
  %269 = load ptr, ptr %268, align 8, !tbaa !38
  %270 = call noundef zeroext i1 @_ZN3JPH19PointConstraintPart23SolveVelocityConstraintERNS_4BodyES2_(ptr noundef nonnull align 16 dereferenceable(240) %265, ptr noundef nonnull align 16 dereferenceable(122) %267, ptr noundef nonnull align 16 dereferenceable(122) %269)
  %271 = zext i1 %270 to i32
  %272 = load i8, ptr %5, align 1, !tbaa !11, !range !32, !noundef !33
  %273 = trunc i8 %272 to i1
  %274 = zext i1 %273 to i32
  %275 = or i32 %274, %271
  %276 = icmp ne i32 %275, 0
  %277 = zext i1 %276 to i8
  store i8 %277, ptr %5, align 1, !tbaa !11
  br label %366

278:                                              ; preds = %262
  %279 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint24IsTranslationConstrainedEv(ptr noundef nonnull align 16 dereferenceable(1856) %21)
  br i1 %279, label %280, label %365

280:                                              ; preds = %278
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !34
  br label %281

281:                                              ; preds = %361, %280
  %282 = load i32, ptr %16, align 4, !tbaa !34
  %283 = icmp slt i32 %282, 3
  br i1 %283, label %285, label %284

284:                                              ; preds = %281
  store i32 10, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %364

285:                                              ; preds = %281
  %286 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %21, i32 0, i32 24
  %287 = load i32, ptr %16, align 4, !tbaa !34
  %288 = sext i32 %287 to i64
  %289 = getelementptr inbounds [3 x %"class.JPH::AxisConstraintPart"], ptr %286, i64 0, i64 %288
  %290 = call noundef zeroext i1 @_ZNK3JPH18AxisConstraintPart8IsActiveEv(ptr noundef nonnull align 4 dereferenceable(64) %289)
  br i1 %290, label %291, label %360

291:                                              ; preds = %285
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store float 0xC7EFFFFFE0000000, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store float 0x47EFFFFFE0000000, ptr %18, align 4, !tbaa !9
  %292 = load i32, ptr %16, align 4, !tbaa !34
  %293 = add nsw i32 0, %292
  %294 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint11IsFixedAxisENS_24SixDOFConstraintSettings5EAxisE(ptr noundef nonnull align 16 dereferenceable(1856) %21, i32 noundef %293)
  br i1 %294, label %333, label %295

295:                                              ; preds = %291
  br label %296

296:                                              ; preds = %295
  %297 = load i32, ptr %16, align 4, !tbaa !34
  %298 = add nsw i32 0, %297
  %299 = call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint10IsFreeAxisENS_24SixDOFConstraintSettings5EAxisE(ptr noundef nonnull align 16 dereferenceable(1856) %21, i32 noundef %298)
  br i1 %299, label %300, label %303

300:                                              ; preds = %296
  %301 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.4, ptr noundef @.str.2, i32 noundef 685)
  br i1 %301, label %302, label %303

302:                                              ; preds = %300
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #5, !srcloc !54
  br label %303

303:                                              ; preds = %302, %300, %296
  br label %304

304:                                              ; preds = %303
  br label %305

305:                                              ; preds = %304
  %306 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %21, i32 0, i32 23
  %307 = load i32, ptr %16, align 4, !tbaa !34
  %308 = sext i32 %307 to i64
  %309 = getelementptr inbounds [3 x float], ptr %306, i64 0, i64 %308
  %310 = load float, ptr %309, align 4, !tbaa !9
  %311 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %21, i32 0, i32 11
  %312 = load i32, ptr %16, align 4, !tbaa !34
  %313 = sext i32 %312 to i64
  %314 = getelementptr inbounds [6 x float], ptr %311, i64 0, i64 %313
  %315 = load float, ptr %314, align 4, !tbaa !9
  %316 = fcmp ole float %310, %315
  br i1 %316, label %317, label %318

317:                                              ; preds = %305
  store float 0.000000e+00, ptr %17, align 4, !tbaa !9
  br label %332

318:                                              ; preds = %305
  %319 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %21, i32 0, i32 23
  %320 = load i32, ptr %16, align 4, !tbaa !34
  %321 = sext i32 %320 to i64
  %322 = getelementptr inbounds [3 x float], ptr %319, i64 0, i64 %321
  %323 = load float, ptr %322, align 4, !tbaa !9
  %324 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %21, i32 0, i32 12
  %325 = load i32, ptr %16, align 4, !tbaa !34
  %326 = sext i32 %325 to i64
  %327 = getelementptr inbounds [6 x float], ptr %324, i64 0, i64 %326
  %328 = load float, ptr %327, align 4, !tbaa !9
  %329 = fcmp oge float %323, %328
  br i1 %329, label %330, label %331

330:                                              ; preds = %318
  store float 0.000000e+00, ptr %18, align 4, !tbaa !9
  br label %331

331:                                              ; preds = %330, %318
  br label %332

332:                                              ; preds = %331, %317
  br label %333

333:                                              ; preds = %332, %291
  %334 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %21, i32 0, i32 24
  %335 = load i32, ptr %16, align 4, !tbaa !34
  %336 = sext i32 %335 to i64
  %337 = getelementptr inbounds [3 x %"class.JPH::AxisConstraintPart"], ptr %334, i64 0, i64 %336
  %338 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %21, i32 0, i32 1
  %339 = load ptr, ptr %338, align 16, !tbaa !37
  %340 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %21, i32 0, i32 2
  %341 = load ptr, ptr %340, align 8, !tbaa !38
  %342 = getelementptr inbounds %"class.JPH::SixDOFConstraint", ptr %21, i32 0, i32 21
  %343 = load i32, ptr %16, align 4, !tbaa !34
  %344 = sext i32 %343 to i64
  %345 = getelementptr inbounds [3 x %"class.JPH::Vec3"], ptr %342, i64 0, i64 %344
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %20, ptr align 16 %345, i64 16, i1 false), !tbaa.struct !39
  %346 = load float, ptr %17, align 4, !tbaa !9
  %347 = load float, ptr %18, align 4, !tbaa !9
  %348 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 0
  %349 = load double, ptr %348, align 16
  %350 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 1
  %351 = load double, ptr %350, align 8
  %352 = call noundef zeroext i1 @_ZN3JPH18AxisConstraintPart23SolveVelocityConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 4 dereferenceable(64) %337, ptr noundef nonnull align 16 dereferenceable(122) %339, ptr noundef nonnull align 16 dereferenceable(122) %341, double %349, double %351, float noundef %346, float noundef %347)
  %353 = zext i1 %352 to i32
  %354 = load i8, ptr %5, align 1, !tbaa !11, !range !32, !noundef !33
  %355 = trunc i8 %354 to i1
  %356 = zext i1 %355 to i32
  %357 = or i32 %356, %353
  %358 = icmp ne i32 %357, 0
  %359 = zext i1 %358 to i8
  store i8 %359, ptr %5, align 1, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %360

360:                                              ; preds = %333, %285
  br label %361

361:                                              ; preds = %360
  %362 = load i32, ptr %16, align 4, !tbaa !34
  %363 = add nsw i32 %362, 1
  store i32 %363, ptr %16, align 4, !tbaa !34
  br label %281, !llvm.loop !55

364:                                              ; preds = %284
  br label %365

365:                                              ; preds = %364, %278
  br label %366

366:                                              ; preds = %365, %264
  %367 = load i8, ptr %5, align 1, !tbaa !11, !range !32, !noundef !33
  %368 = trunc i8 %367 to i1
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  ret i1 %368
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH19AngleConstraintPart23SolveVelocityConstraintERNS_4BodyES2_NS_4Vec3Eff(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, float noundef) #2 align 2

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

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

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

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

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


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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3JPH16SixDOFConstraint23SolveVelocityConstraintEf(ptr noundef nonnull align 16 dereferenceable(1856) %0, float noundef %1) unnamed_addr #2 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 114
  %4 = load i8, ptr %3, align 2, !tbaa !5, !range !29, !noundef !30
  %5 = trunc nuw i8 %4 to i1
  br i1 %5, label %.preheader71, label %.loopexit72

.preheader71:                                     ; preds = %2
  %6 = getelementptr inbounds i8, ptr %0, i64 1520
  %7 = getelementptr inbounds i8, ptr %0, i64 32
  %8 = getelementptr inbounds i8, ptr %0, i64 40
  %9 = getelementptr inbounds i8, ptr %0, i64 496
  %10 = getelementptr inbounds i8, ptr %0, i64 372
  %11 = tail call noundef zeroext i1 @_ZNK3JPH18AxisConstraintPart8IsActiveEv(ptr noundef nonnull align 4 dereferenceable(64) %6)
  br i1 %11, label %12, label %32

12:                                               ; preds = %.preheader71
  %13 = getelementptr inbounds i8, ptr %0, i64 396
  %14 = load i32, ptr %13, align 4, !tbaa !31
  switch i32 %14, label %32 [
    i32 0, label %15
    i32 1, label %22
    i32 2, label %22
  ]

15:                                               ; preds = %12
  %16 = load float, ptr %10, align 4, !tbaa !33
  %17 = fmul float %16, %1
  %18 = load ptr, ptr %7, align 16, !tbaa !34
  %19 = load ptr, ptr %8, align 8, !tbaa !35
  %.sroa.032.0.copyload = load double, ptr %9, align 16
  %.sroa.233.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 504
  %.sroa.233.0.copyload = load double, ptr %.sroa.233.0..sroa_idx, align 8, !tbaa !36
  %20 = fneg float %17
  %21 = tail call noundef zeroext i1 @_ZN3JPH18AxisConstraintPart23SolveVelocityConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 4 dereferenceable(64) %6, ptr noundef nonnull align 16 dereferenceable(122) %18, ptr noundef nonnull align 16 dereferenceable(122) %19, double %.sroa.032.0.copyload, double %.sroa.233.0.copyload, float noundef %20, float noundef %17)
  br label %32

22:                                               ; preds = %12, %12
  %23 = load ptr, ptr %7, align 16, !tbaa !34
  %24 = load ptr, ptr %8, align 8, !tbaa !35
  %.sroa.030.0.copyload = load double, ptr %9, align 16
  %.sroa.231.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 504
  %.sroa.231.0.copyload = load double, ptr %.sroa.231.0..sroa_idx, align 8, !tbaa !36
  %25 = getelementptr inbounds i8, ptr %0, i64 216
  %26 = load float, ptr %25, align 8, !tbaa !37
  %27 = fmul float %26, %1
  %28 = getelementptr inbounds i8, ptr %0, i64 220
  %29 = load float, ptr %28, align 4, !tbaa !41
  %30 = fmul float %29, %1
  %31 = tail call noundef zeroext i1 @_ZN3JPH18AxisConstraintPart23SolveVelocityConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 4 dereferenceable(64) %6, ptr noundef nonnull align 16 dereferenceable(122) %23, ptr noundef nonnull align 16 dereferenceable(122) %24, double %.sroa.030.0.copyload, double %.sroa.231.0.copyload, float noundef %27, float noundef %30)
  br label %32

32:                                               ; preds = %.preheader71, %22, %15, %12
  %.1 = phi i1 [ false, %12 ], [ %31, %22 ], [ %21, %15 ], [ false, %.preheader71 ]
  %33 = getelementptr inbounds i8, ptr %0, i64 1584
  %34 = tail call noundef zeroext i1 @_ZNK3JPH18AxisConstraintPart8IsActiveEv(ptr noundef nonnull align 4 dereferenceable(64) %33)
  br i1 %34, label %35, label %60

35:                                               ; preds = %32
  %36 = getelementptr inbounds i8, ptr %0, i64 400
  %37 = load i32, ptr %36, align 16, !tbaa !31
  switch i32 %37, label %60 [
    i32 0, label %50
    i32 1, label %38
    i32 2, label %38
  ]

38:                                               ; preds = %35, %35
  %39 = load ptr, ptr %7, align 16, !tbaa !34
  %40 = load ptr, ptr %8, align 8, !tbaa !35
  %41 = getelementptr inbounds i8, ptr %0, i64 512
  %.sroa.030.0.copyload.1 = load double, ptr %41, align 16
  %.sroa.231.0..sroa_idx.1 = getelementptr inbounds i8, ptr %0, i64 520
  %.sroa.231.0.copyload.1 = load double, ptr %.sroa.231.0..sroa_idx.1, align 8, !tbaa !36
  %42 = getelementptr inbounds i8, ptr %0, i64 244
  %43 = load float, ptr %42, align 4, !tbaa !37
  %44 = fmul float %43, %1
  %45 = getelementptr inbounds i8, ptr %0, i64 248
  %46 = load float, ptr %45, align 8, !tbaa !41
  %47 = fmul float %46, %1
  %48 = tail call noundef zeroext i1 @_ZN3JPH18AxisConstraintPart23SolveVelocityConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 4 dereferenceable(64) %33, ptr noundef nonnull align 16 dereferenceable(122) %39, ptr noundef nonnull align 16 dereferenceable(122) %40, double %.sroa.030.0.copyload.1, double %.sroa.231.0.copyload.1, float noundef %44, float noundef %47)
  %49 = or i1 %.1, %48
  br label %60

50:                                               ; preds = %35
  %51 = getelementptr inbounds i8, ptr %0, i64 376
  %52 = load float, ptr %51, align 8, !tbaa !33
  %53 = fmul float %52, %1
  %54 = load ptr, ptr %7, align 16, !tbaa !34
  %55 = load ptr, ptr %8, align 8, !tbaa !35
  %56 = getelementptr inbounds i8, ptr %0, i64 512
  %.sroa.032.0.copyload.1 = load double, ptr %56, align 16
  %.sroa.233.0..sroa_idx.1 = getelementptr inbounds i8, ptr %0, i64 520
  %.sroa.233.0.copyload.1 = load double, ptr %.sroa.233.0..sroa_idx.1, align 8, !tbaa !36
  %57 = fneg float %53
  %58 = tail call noundef zeroext i1 @_ZN3JPH18AxisConstraintPart23SolveVelocityConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 4 dereferenceable(64) %33, ptr noundef nonnull align 16 dereferenceable(122) %54, ptr noundef nonnull align 16 dereferenceable(122) %55, double %.sroa.032.0.copyload.1, double %.sroa.233.0.copyload.1, float noundef %57, float noundef %53)
  %59 = or i1 %.1, %58
  br label %60

60:                                               ; preds = %50, %38, %35, %32
  %.1.1 = phi i1 [ %.1, %35 ], [ %49, %38 ], [ %59, %50 ], [ %.1, %32 ]
  %61 = getelementptr inbounds i8, ptr %0, i64 1648
  %62 = tail call noundef zeroext i1 @_ZNK3JPH18AxisConstraintPart8IsActiveEv(ptr noundef nonnull align 4 dereferenceable(64) %61)
  br i1 %62, label %63, label %.loopexit72

63:                                               ; preds = %60
  %64 = getelementptr inbounds i8, ptr %0, i64 404
  %65 = load i32, ptr %64, align 4, !tbaa !31
  switch i32 %65, label %.loopexit72 [
    i32 0, label %78
    i32 1, label %66
    i32 2, label %66
  ]

66:                                               ; preds = %63, %63
  %67 = load ptr, ptr %7, align 16, !tbaa !34
  %68 = load ptr, ptr %8, align 8, !tbaa !35
  %69 = getelementptr inbounds i8, ptr %0, i64 528
  %.sroa.030.0.copyload.2 = load double, ptr %69, align 16
  %.sroa.231.0..sroa_idx.2 = getelementptr inbounds i8, ptr %0, i64 536
  %.sroa.231.0.copyload.2 = load double, ptr %.sroa.231.0..sroa_idx.2, align 8, !tbaa !36
  %70 = getelementptr inbounds i8, ptr %0, i64 272
  %71 = load float, ptr %70, align 16, !tbaa !37
  %72 = fmul float %71, %1
  %73 = getelementptr inbounds i8, ptr %0, i64 276
  %74 = load float, ptr %73, align 4, !tbaa !41
  %75 = fmul float %74, %1
  %76 = tail call noundef zeroext i1 @_ZN3JPH18AxisConstraintPart23SolveVelocityConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 4 dereferenceable(64) %61, ptr noundef nonnull align 16 dereferenceable(122) %67, ptr noundef nonnull align 16 dereferenceable(122) %68, double %.sroa.030.0.copyload.2, double %.sroa.231.0.copyload.2, float noundef %72, float noundef %75)
  %77 = or i1 %.1.1, %76
  br label %.loopexit72

78:                                               ; preds = %63
  %79 = getelementptr inbounds i8, ptr %0, i64 380
  %80 = load float, ptr %79, align 4, !tbaa !33
  %81 = fmul float %80, %1
  %82 = load ptr, ptr %7, align 16, !tbaa !34
  %83 = load ptr, ptr %8, align 8, !tbaa !35
  %84 = getelementptr inbounds i8, ptr %0, i64 528
  %.sroa.032.0.copyload.2 = load double, ptr %84, align 16
  %.sroa.233.0..sroa_idx.2 = getelementptr inbounds i8, ptr %0, i64 536
  %.sroa.233.0.copyload.2 = load double, ptr %.sroa.233.0..sroa_idx.2, align 8, !tbaa !36
  %85 = fneg float %81
  %86 = tail call noundef zeroext i1 @_ZN3JPH18AxisConstraintPart23SolveVelocityConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 4 dereferenceable(64) %61, ptr noundef nonnull align 16 dereferenceable(122) %82, ptr noundef nonnull align 16 dereferenceable(122) %83, double %.sroa.032.0.copyload.2, double %.sroa.233.0.copyload.2, float noundef %85, float noundef %81)
  %87 = or i1 %.1.1, %86
  br label %.loopexit72

.loopexit72:                                      ; preds = %60, %63, %66, %78, %2
  %.2 = phi i1 [ false, %2 ], [ %.1.1, %63 ], [ %77, %66 ], [ %87, %78 ], [ %.1.1, %60 ]
  %88 = getelementptr inbounds i8, ptr %0, i64 115
  %89 = load i8, ptr %88, align 1, !tbaa !42, !range !29, !noundef !30
  %90 = trunc nuw i8 %89 to i1
  br i1 %90, label %.preheader69, label %.loopexit70

.preheader69:                                     ; preds = %.loopexit72
  %91 = getelementptr inbounds i8, ptr %0, i64 1712
  %92 = getelementptr inbounds i8, ptr %0, i64 32
  %93 = getelementptr inbounds i8, ptr %0, i64 40
  %94 = getelementptr inbounds i8, ptr %0, i64 544
  %95 = tail call noundef zeroext i1 @_ZNK3JPH19AngleConstraintPart8IsActiveEv(ptr noundef nonnull align 16 dereferenceable(48) %91)
  br i1 %95, label %96, label %119

96:                                               ; preds = %.preheader69
  %97 = getelementptr inbounds i8, ptr %0, i64 408
  %98 = load i32, ptr %97, align 8, !tbaa !31
  switch i32 %98, label %119 [
    i32 0, label %99
    i32 1, label %108
    i32 2, label %108
  ]

99:                                               ; preds = %96
  %100 = getelementptr inbounds i8, ptr %0, i64 384
  %101 = load float, ptr %100, align 16, !tbaa !33
  %102 = fmul float %101, %1
  %103 = load ptr, ptr %92, align 16, !tbaa !34
  %104 = load ptr, ptr %93, align 8, !tbaa !35
  %.sroa.014.0.copyload = load double, ptr %94, align 16
  %.sroa.215.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 552
  %.sroa.215.0.copyload = load double, ptr %.sroa.215.0..sroa_idx, align 8, !tbaa !36
  %105 = fneg float %102
  %106 = tail call noundef zeroext i1 @_ZN3JPH19AngleConstraintPart23SolveVelocityConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 16 dereferenceable(48) %91, ptr noundef nonnull align 16 dereferenceable(122) %103, ptr noundef nonnull align 16 dereferenceable(122) %104, double %.sroa.014.0.copyload, double %.sroa.215.0.copyload, float noundef %105, float noundef %102)
  %107 = or i1 %.2, %106
  br label %119

108:                                              ; preds = %96, %96
  %109 = load ptr, ptr %92, align 16, !tbaa !34
  %110 = load ptr, ptr %93, align 8, !tbaa !35
  %.sroa.012.0.copyload = load double, ptr %94, align 16
  %.sroa.213.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 552
  %.sroa.213.0.copyload = load double, ptr %.sroa.213.0..sroa_idx, align 8, !tbaa !36
  %111 = getelementptr inbounds i8, ptr %0, i64 308
  %112 = load float, ptr %111, align 4, !tbaa !43
  %113 = fmul float %112, %1
  %114 = getelementptr inbounds i8, ptr %0, i64 312
  %115 = load float, ptr %114, align 8, !tbaa !44
  %116 = fmul float %115, %1
  %117 = tail call noundef zeroext i1 @_ZN3JPH19AngleConstraintPart23SolveVelocityConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 16 dereferenceable(48) %91, ptr noundef nonnull align 16 dereferenceable(122) %109, ptr noundef nonnull align 16 dereferenceable(122) %110, double %.sroa.012.0.copyload, double %.sroa.213.0.copyload, float noundef %113, float noundef %116)
  %118 = or i1 %.2, %117
  br label %119

119:                                              ; preds = %96, %99, %108, %.preheader69
  %.4 = phi i1 [ %.2, %96 ], [ %118, %108 ], [ %107, %99 ], [ %.2, %.preheader69 ]
  %120 = getelementptr inbounds i8, ptr %0, i64 1760
  %121 = tail call noundef zeroext i1 @_ZNK3JPH19AngleConstraintPart8IsActiveEv(ptr noundef nonnull align 16 dereferenceable(48) %120)
  br i1 %121, label %122, label %147

122:                                              ; preds = %119
  %123 = getelementptr inbounds i8, ptr %0, i64 412
  %124 = load i32, ptr %123, align 4, !tbaa !31
  switch i32 %124, label %147 [
    i32 0, label %137
    i32 1, label %125
    i32 2, label %125
  ]

125:                                              ; preds = %122, %122
  %126 = load ptr, ptr %92, align 16, !tbaa !34
  %127 = load ptr, ptr %93, align 8, !tbaa !35
  %128 = getelementptr inbounds i8, ptr %0, i64 560
  %.sroa.012.0.copyload.1 = load double, ptr %128, align 16
  %.sroa.213.0..sroa_idx.1 = getelementptr inbounds i8, ptr %0, i64 568
  %.sroa.213.0.copyload.1 = load double, ptr %.sroa.213.0..sroa_idx.1, align 8, !tbaa !36
  %129 = getelementptr inbounds i8, ptr %0, i64 336
  %130 = load float, ptr %129, align 16, !tbaa !43
  %131 = fmul float %130, %1
  %132 = getelementptr inbounds i8, ptr %0, i64 340
  %133 = load float, ptr %132, align 4, !tbaa !44
  %134 = fmul float %133, %1
  %135 = tail call noundef zeroext i1 @_ZN3JPH19AngleConstraintPart23SolveVelocityConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 16 dereferenceable(48) %120, ptr noundef nonnull align 16 dereferenceable(122) %126, ptr noundef nonnull align 16 dereferenceable(122) %127, double %.sroa.012.0.copyload.1, double %.sroa.213.0.copyload.1, float noundef %131, float noundef %134)
  %136 = or i1 %.4, %135
  br label %147

137:                                              ; preds = %122
  %138 = getelementptr inbounds i8, ptr %0, i64 388
  %139 = load float, ptr %138, align 4, !tbaa !33
  %140 = fmul float %139, %1
  %141 = load ptr, ptr %92, align 16, !tbaa !34
  %142 = load ptr, ptr %93, align 8, !tbaa !35
  %143 = getelementptr inbounds i8, ptr %0, i64 560
  %.sroa.014.0.copyload.1 = load double, ptr %143, align 16
  %.sroa.215.0..sroa_idx.1 = getelementptr inbounds i8, ptr %0, i64 568
  %.sroa.215.0.copyload.1 = load double, ptr %.sroa.215.0..sroa_idx.1, align 8, !tbaa !36
  %144 = fneg float %140
  %145 = tail call noundef zeroext i1 @_ZN3JPH19AngleConstraintPart23SolveVelocityConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 16 dereferenceable(48) %120, ptr noundef nonnull align 16 dereferenceable(122) %141, ptr noundef nonnull align 16 dereferenceable(122) %142, double %.sroa.014.0.copyload.1, double %.sroa.215.0.copyload.1, float noundef %144, float noundef %140)
  %146 = or i1 %.4, %145
  br label %147

147:                                              ; preds = %137, %125, %122, %119
  %.4.1 = phi i1 [ %.4, %122 ], [ %136, %125 ], [ %146, %137 ], [ %.4, %119 ]
  %148 = getelementptr inbounds i8, ptr %0, i64 1808
  %149 = tail call noundef zeroext i1 @_ZNK3JPH19AngleConstraintPart8IsActiveEv(ptr noundef nonnull align 16 dereferenceable(48) %148)
  br i1 %149, label %150, label %.loopexit70

150:                                              ; preds = %147
  %151 = getelementptr inbounds i8, ptr %0, i64 416
  %152 = load i32, ptr %151, align 16, !tbaa !31
  switch i32 %152, label %.loopexit70 [
    i32 0, label %165
    i32 1, label %153
    i32 2, label %153
  ]

153:                                              ; preds = %150, %150
  %154 = load ptr, ptr %92, align 16, !tbaa !34
  %155 = load ptr, ptr %93, align 8, !tbaa !35
  %156 = getelementptr inbounds i8, ptr %0, i64 576
  %.sroa.012.0.copyload.2 = load double, ptr %156, align 16
  %.sroa.213.0..sroa_idx.2 = getelementptr inbounds i8, ptr %0, i64 584
  %.sroa.213.0.copyload.2 = load double, ptr %.sroa.213.0..sroa_idx.2, align 8, !tbaa !36
  %157 = getelementptr inbounds i8, ptr %0, i64 364
  %158 = load float, ptr %157, align 4, !tbaa !43
  %159 = fmul float %158, %1
  %160 = getelementptr inbounds i8, ptr %0, i64 368
  %161 = load float, ptr %160, align 16, !tbaa !44
  %162 = fmul float %161, %1
  %163 = tail call noundef zeroext i1 @_ZN3JPH19AngleConstraintPart23SolveVelocityConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 16 dereferenceable(48) %148, ptr noundef nonnull align 16 dereferenceable(122) %154, ptr noundef nonnull align 16 dereferenceable(122) %155, double %.sroa.012.0.copyload.2, double %.sroa.213.0.copyload.2, float noundef %159, float noundef %162)
  %164 = or i1 %.4.1, %163
  br label %.loopexit70

165:                                              ; preds = %150
  %166 = getelementptr inbounds i8, ptr %0, i64 392
  %167 = load float, ptr %166, align 8, !tbaa !33
  %168 = fmul float %167, %1
  %169 = load ptr, ptr %92, align 16, !tbaa !34
  %170 = load ptr, ptr %93, align 8, !tbaa !35
  %171 = getelementptr inbounds i8, ptr %0, i64 576
  %.sroa.014.0.copyload.2 = load double, ptr %171, align 16
  %.sroa.215.0..sroa_idx.2 = getelementptr inbounds i8, ptr %0, i64 584
  %.sroa.215.0.copyload.2 = load double, ptr %.sroa.215.0..sroa_idx.2, align 8, !tbaa !36
  %172 = fneg float %168
  %173 = tail call noundef zeroext i1 @_ZN3JPH19AngleConstraintPart23SolveVelocityConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 16 dereferenceable(48) %148, ptr noundef nonnull align 16 dereferenceable(122) %169, ptr noundef nonnull align 16 dereferenceable(122) %170, double %.sroa.014.0.copyload.2, double %.sroa.215.0.copyload.2, float noundef %172, float noundef %168)
  %174 = or i1 %.4.1, %173
  br label %.loopexit70

.loopexit70:                                      ; preds = %147, %150, %153, %165, %.loopexit72
  %.5 = phi i1 [ %.2, %.loopexit72 ], [ %.4.1, %150 ], [ %164, %153 ], [ %174, %165 ], [ %.4.1, %147 ]
  %175 = tail call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint26IsRotationFullyConstrainedEv(ptr noundef nonnull align 16 dereferenceable(1856) %0)
  br i1 %175, label %176, label %184

176:                                              ; preds = %.loopexit70
  %177 = getelementptr inbounds i8, ptr %0, i64 1312
  %178 = getelementptr inbounds i8, ptr %0, i64 32
  %179 = load ptr, ptr %178, align 16, !tbaa !34
  %180 = getelementptr inbounds i8, ptr %0, i64 40
  %181 = load ptr, ptr %180, align 8, !tbaa !35
  %182 = tail call noundef zeroext i1 @_ZN3JPH27RotationEulerConstraintPart23SolveVelocityConstraintERNS_4BodyES2_(ptr noundef nonnull align 16 dereferenceable(208) %177, ptr noundef nonnull align 16 dereferenceable(122) %179, ptr noundef nonnull align 16 dereferenceable(122) %181)
  %183 = or i1 %.5, %182
  br label %194

184:                                              ; preds = %.loopexit70
  %185 = tail call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint21IsRotationConstrainedEv(ptr noundef nonnull align 16 dereferenceable(1856) %0)
  br i1 %185, label %186, label %194

186:                                              ; preds = %184
  %187 = getelementptr inbounds i8, ptr %0, i64 1040
  %188 = getelementptr inbounds i8, ptr %0, i64 32
  %189 = load ptr, ptr %188, align 16, !tbaa !34
  %190 = getelementptr inbounds i8, ptr %0, i64 40
  %191 = load ptr, ptr %190, align 8, !tbaa !35
  %192 = tail call noundef zeroext i1 @_ZN3JPH24SwingTwistConstraintPart23SolveVelocityConstraintERNS_4BodyES2_(ptr noundef nonnull align 16 dereferenceable(272) %187, ptr noundef nonnull align 16 dereferenceable(122) %189, ptr noundef nonnull align 16 dereferenceable(122) %191)
  %193 = or i1 %.5, %192
  br label %194

194:                                              ; preds = %184, %186, %176
  %.6 = phi i1 [ %183, %176 ], [ %193, %186 ], [ %.5, %184 ]
  %195 = tail call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint29IsTranslationFullyConstrainedEv(ptr noundef nonnull align 16 dereferenceable(1856) %0)
  br i1 %195, label %196, label %204

196:                                              ; preds = %194
  %197 = getelementptr inbounds i8, ptr %0, i64 800
  %198 = getelementptr inbounds i8, ptr %0, i64 32
  %199 = load ptr, ptr %198, align 16, !tbaa !34
  %200 = getelementptr inbounds i8, ptr %0, i64 40
  %201 = load ptr, ptr %200, align 8, !tbaa !35
  %202 = tail call noundef zeroext i1 @_ZN3JPH19PointConstraintPart23SolveVelocityConstraintERNS_4BodyES2_(ptr noundef nonnull align 16 dereferenceable(240) %197, ptr noundef nonnull align 16 dereferenceable(122) %199, ptr noundef nonnull align 16 dereferenceable(122) %201)
  %203 = or i1 %.6, %202
  br label %.loopexit

204:                                              ; preds = %194
  %205 = tail call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint24IsTranslationConstrainedEv(ptr noundef nonnull align 16 dereferenceable(1856) %0)
  br i1 %205, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %204
  %206 = getelementptr inbounds i8, ptr %0, i64 604
  %207 = getelementptr inbounds i8, ptr %0, i64 592
  %208 = getelementptr inbounds i8, ptr %0, i64 120
  %209 = getelementptr inbounds i8, ptr %0, i64 144
  %210 = getelementptr inbounds i8, ptr %0, i64 32
  %211 = getelementptr inbounds i8, ptr %0, i64 40
  %212 = getelementptr inbounds i8, ptr %0, i64 496
  %213 = tail call noundef zeroext i1 @_ZNK3JPH18AxisConstraintPart8IsActiveEv(ptr noundef nonnull align 4 dereferenceable(64) %206)
  br i1 %213, label %214, label %234

214:                                              ; preds = %.preheader
  %215 = tail call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint11IsFixedAxisENS_24SixDOFConstraintSettings5EAxisE(ptr noundef nonnull align 16 dereferenceable(1856) %0, i32 noundef 0)
  br i1 %215, label %229, label %216

216:                                              ; preds = %214
  %217 = tail call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint10IsFreeAxisENS_24SixDOFConstraintSettings5EAxisE(ptr noundef nonnull align 16 dereferenceable(1856) %0, i32 noundef 0)
  br i1 %217, label %218, label %221

218:                                              ; preds = %216
  %219 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.2, i32 noundef 685)
  br i1 %219, label %220, label %221

220:                                              ; preds = %218
  tail call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #3, !srcloc !45
  br label %221

221:                                              ; preds = %220, %218, %216
  %222 = load float, ptr %207, align 16, !tbaa !33
  %223 = load float, ptr %208, align 8, !tbaa !33
  %224 = fcmp ugt float %222, %223
  br i1 %224, label %225, label %229

225:                                              ; preds = %221
  %226 = load float, ptr %209, align 16, !tbaa !33
  %227 = fcmp ult float %222, %226
  br i1 %227, label %229, label %228

228:                                              ; preds = %225
  br label %229

229:                                              ; preds = %221, %228, %225, %214
  %.065 = phi float [ 0xC7EFFFFFE0000000, %214 ], [ 0xC7EFFFFFE0000000, %228 ], [ 0xC7EFFFFFE0000000, %225 ], [ 0.000000e+00, %221 ]
  %.064 = phi float [ 0x47EFFFFFE0000000, %214 ], [ 0.000000e+00, %228 ], [ 0x47EFFFFFE0000000, %225 ], [ 0x47EFFFFFE0000000, %221 ]
  %230 = load ptr, ptr %210, align 16, !tbaa !34
  %231 = load ptr, ptr %211, align 8, !tbaa !35
  %.sroa.0.0.copyload = load double, ptr %212, align 16
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 504
  %.sroa.2.0.copyload = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !36
  %232 = tail call noundef zeroext i1 @_ZN3JPH18AxisConstraintPart23SolveVelocityConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 4 dereferenceable(64) %206, ptr noundef nonnull align 16 dereferenceable(122) %230, ptr noundef nonnull align 16 dereferenceable(122) %231, double %.sroa.0.0.copyload, double %.sroa.2.0.copyload, float noundef %.065, float noundef %.064)
  %233 = or i1 %.6, %232
  br label %234

234:                                              ; preds = %.preheader, %229
  %.8 = phi i1 [ %233, %229 ], [ %.6, %.preheader ]
  %235 = getelementptr inbounds i8, ptr %0, i64 668
  %236 = tail call noundef zeroext i1 @_ZNK3JPH18AxisConstraintPart8IsActiveEv(ptr noundef nonnull align 4 dereferenceable(64) %235)
  br i1 %236, label %237, label %261

237:                                              ; preds = %234
  %238 = tail call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint11IsFixedAxisENS_24SixDOFConstraintSettings5EAxisE(ptr noundef nonnull align 16 dereferenceable(1856) %0, i32 noundef 1)
  br i1 %238, label %255, label %239

239:                                              ; preds = %237
  %240 = tail call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint10IsFreeAxisENS_24SixDOFConstraintSettings5EAxisE(ptr noundef nonnull align 16 dereferenceable(1856) %0, i32 noundef 1)
  br i1 %240, label %241, label %244

241:                                              ; preds = %239
  %242 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.2, i32 noundef 685)
  br i1 %242, label %243, label %244

243:                                              ; preds = %241
  tail call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #3, !srcloc !45
  br label %244

244:                                              ; preds = %243, %241, %239
  %245 = getelementptr inbounds i8, ptr %0, i64 596
  %246 = load float, ptr %245, align 4, !tbaa !33
  %247 = getelementptr inbounds i8, ptr %0, i64 124
  %248 = load float, ptr %247, align 4, !tbaa !33
  %249 = fcmp ugt float %246, %248
  br i1 %249, label %250, label %255

250:                                              ; preds = %244
  %251 = getelementptr inbounds i8, ptr %0, i64 148
  %252 = load float, ptr %251, align 4, !tbaa !33
  %253 = fcmp ult float %246, %252
  br i1 %253, label %255, label %254

254:                                              ; preds = %250
  br label %255

255:                                              ; preds = %254, %250, %244, %237
  %.065.1 = phi float [ 0xC7EFFFFFE0000000, %237 ], [ 0xC7EFFFFFE0000000, %254 ], [ 0xC7EFFFFFE0000000, %250 ], [ 0.000000e+00, %244 ]
  %.064.1 = phi float [ 0x47EFFFFFE0000000, %237 ], [ 0.000000e+00, %254 ], [ 0x47EFFFFFE0000000, %250 ], [ 0x47EFFFFFE0000000, %244 ]
  %256 = load ptr, ptr %210, align 16, !tbaa !34
  %257 = load ptr, ptr %211, align 8, !tbaa !35
  %258 = getelementptr inbounds i8, ptr %0, i64 512
  %.sroa.0.0.copyload.1 = load double, ptr %258, align 16
  %.sroa.2.0..sroa_idx.1 = getelementptr inbounds i8, ptr %0, i64 520
  %.sroa.2.0.copyload.1 = load double, ptr %.sroa.2.0..sroa_idx.1, align 8, !tbaa !36
  %259 = tail call noundef zeroext i1 @_ZN3JPH18AxisConstraintPart23SolveVelocityConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 4 dereferenceable(64) %235, ptr noundef nonnull align 16 dereferenceable(122) %256, ptr noundef nonnull align 16 dereferenceable(122) %257, double %.sroa.0.0.copyload.1, double %.sroa.2.0.copyload.1, float noundef %.065.1, float noundef %.064.1)
  %260 = or i1 %.8, %259
  br label %261

261:                                              ; preds = %255, %234
  %.8.1 = phi i1 [ %260, %255 ], [ %.8, %234 ]
  %262 = getelementptr inbounds i8, ptr %0, i64 732
  %263 = tail call noundef zeroext i1 @_ZNK3JPH18AxisConstraintPart8IsActiveEv(ptr noundef nonnull align 4 dereferenceable(64) %262)
  br i1 %263, label %264, label %.loopexit

264:                                              ; preds = %261
  %265 = tail call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint11IsFixedAxisENS_24SixDOFConstraintSettings5EAxisE(ptr noundef nonnull align 16 dereferenceable(1856) %0, i32 noundef 2)
  br i1 %265, label %282, label %266

266:                                              ; preds = %264
  %267 = tail call noundef zeroext i1 @_ZNK3JPH16SixDOFConstraint10IsFreeAxisENS_24SixDOFConstraintSettings5EAxisE(ptr noundef nonnull align 16 dereferenceable(1856) %0, i32 noundef 2)
  br i1 %267, label %268, label %271

268:                                              ; preds = %266
  %269 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.2, i32 noundef 685)
  br i1 %269, label %270, label %271

270:                                              ; preds = %268
  tail call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #3, !srcloc !45
  br label %271

271:                                              ; preds = %270, %268, %266
  %272 = getelementptr inbounds i8, ptr %0, i64 600
  %273 = load float, ptr %272, align 8, !tbaa !33
  %274 = getelementptr inbounds i8, ptr %0, i64 128
  %275 = load float, ptr %274, align 16, !tbaa !33
  %276 = fcmp ugt float %273, %275
  br i1 %276, label %277, label %282

277:                                              ; preds = %271
  %278 = getelementptr inbounds i8, ptr %0, i64 152
  %279 = load float, ptr %278, align 8, !tbaa !33
  %280 = fcmp ult float %273, %279
  br i1 %280, label %282, label %281

281:                                              ; preds = %277
  br label %282

282:                                              ; preds = %281, %277, %271, %264
  %.065.2 = phi float [ 0xC7EFFFFFE0000000, %264 ], [ 0xC7EFFFFFE0000000, %281 ], [ 0xC7EFFFFFE0000000, %277 ], [ 0.000000e+00, %271 ]
  %.064.2 = phi float [ 0x47EFFFFFE0000000, %264 ], [ 0.000000e+00, %281 ], [ 0x47EFFFFFE0000000, %277 ], [ 0x47EFFFFFE0000000, %271 ]
  %283 = load ptr, ptr %210, align 16, !tbaa !34
  %284 = load ptr, ptr %211, align 8, !tbaa !35
  %285 = getelementptr inbounds i8, ptr %0, i64 528
  %.sroa.0.0.copyload.2 = load double, ptr %285, align 16
  %.sroa.2.0..sroa_idx.2 = getelementptr inbounds i8, ptr %0, i64 536
  %.sroa.2.0.copyload.2 = load double, ptr %.sroa.2.0..sroa_idx.2, align 8, !tbaa !36
  %286 = tail call noundef zeroext i1 @_ZN3JPH18AxisConstraintPart23SolveVelocityConstraintERNS_4BodyES2_NS_4Vec3Eff(ptr noundef nonnull align 4 dereferenceable(64) %262, ptr noundef nonnull align 16 dereferenceable(122) %283, ptr noundef nonnull align 16 dereferenceable(122) %284, double %.sroa.0.0.copyload.2, double %.sroa.2.0.copyload.2, float noundef %.065.2, float noundef %.064.2)
  %287 = or i1 %.8.1, %286
  br label %.loopexit

.loopexit:                                        ; preds = %261, %282, %204, %196
  %.9 = phi i1 [ %203, %196 ], [ %.6, %204 ], [ %287, %282 ], [ %.8.1, %261 ]
  ret i1 %.9
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH19AngleConstraintPart23SolveVelocityConstraintERNS_4BodyES2_NS_4Vec3Eff(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, float noundef) local_unnamed_addr #0 align 2

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

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

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

attributes #0 = { 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 #1 = { 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 #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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, !15, i64 114}
!6 = !{!"_ZTSN3JPH16SixDOFConstraintE", !7, i64 0, !18, i64 48, !18, i64 64, !19, i64 80, !19, i64 96, !13, i64 112, !13, i64 113, !15, i64 114, !15, i64 115, !13, i64 116, !15, i64 117, !13, i64 120, !13, i64 144, !13, i64 168, !13, i64 204, !13, i64 372, !13, i64 396, !18, i64 432, !18, i64 448, !18, i64 464, !19, i64 480, !13, i64 496, !13, i64 544, !13, i64 592, !13, i64 604, !21, i64 800, !23, i64 1040, !28, i64 1312, !13, i64 1520, !13, i64 1712}
!7 = !{!"_ZTSN3JPH17TwoBodyConstraintE", !8, i64 0, !17, i64 32, !17, i64 40}
!8 = !{!"_ZTSN3JPH10ConstraintE", !9, i64 8, !12, i64 12, !12, i64 16, !13, i64 20, !13, i64 21, !15, i64 22, !16, i64 24}
!9 = !{!"_ZTSN3JPH9RefTargetINS_10ConstraintEEE", !10, i64 0}
!10 = !{!"_ZTSSt6atomicIjE", !11, i64 0}
!11 = !{!"_ZTSSt13__atomic_baseIjE", !12, i64 0}
!12 = !{!"int", !13, i64 0}
!13 = !{!"omnipotent char", !14, i64 0}
!14 = !{!"Simple C++ TBAA"}
!15 = !{!"bool", !13, i64 0}
!16 = !{!"long", !13, i64 0}
!17 = !{!"any pointer", !13, i64 0}
!18 = !{!"_ZTSN3JPH4Vec3E", !13, i64 0}
!19 = !{!"_ZTSN3JPH4QuatE", !20, i64 0}
!20 = !{!"_ZTSN3JPH4Vec4E", !13, i64 0}
!21 = !{!"_ZTSN3JPH19PointConstraintPartE", !18, i64 0, !18, i64 16, !22, i64 32, !22, i64 96, !22, i64 160, !18, i64 224}
!22 = !{!"_ZTSN3JPH5Mat44E", !13, i64 0}
!23 = !{!"_ZTSN3JPH24SwingTwistConstraintPartE", !13, i64 0, !24, i64 1, !25, i64 4, !25, i64 8, !25, i64 12, !25, i64 16, !25, i64 20, !25, i64 24, !25, i64 28, !25, i64 32, !25, i64 36, !25, i64 40, !25, i64 44, !25, i64 48, !25, i64 52, !25, i64 56, !25, i64 60, !25, i64 64, !18, i64 80, !18, i64 96, !18, i64 112, !26, i64 128, !26, i64 176, !26, i64 224}
!24 = !{!"_ZTSN3JPH10ESwingTypeE", !13, i64 0}
!25 = !{!"float", !13, i64 0}
!26 = !{!"_ZTSN3JPH19AngleConstraintPartE", !18, i64 0, !18, i64 16, !25, i64 32, !27, i64 36, !25, i64 44}
!27 = !{!"_ZTSN3JPH10SpringPartE", !25, i64 0, !25, i64 4}
!28 = !{!"_ZTSN3JPH27RotationEulerConstraintPartE", !22, i64 0, !22, i64 64, !22, i64 128, !18, i64 192}
!29 = !{i8 0, i8 2}
!30 = !{}
!31 = !{!32, !32, i64 0}
!32 = !{!"_ZTSN3JPH11EMotorStateE", !13, i64 0}
!33 = !{!25, !25, i64 0}
!34 = !{!7, !17, i64 32}
!35 = !{!7, !17, i64 40}
!36 = !{!13, !13, i64 0}
!37 = !{!38, !25, i64 12}
!38 = !{!"_ZTSN3JPH13MotorSettingsE", !39, i64 0, !25, i64 12, !25, i64 16, !25, i64 20, !25, i64 24}
!39 = !{!"_ZTSN3JPH14SpringSettingsE", !40, i64 0, !13, i64 4, !25, i64 8}
!40 = !{!"_ZTSN3JPH11ESpringModeE", !13, i64 0}
!41 = !{!38, !25, i64 16}
!42 = !{!6, !15, i64 115}
!43 = !{!38, !25, i64 20}
!44 = !{!38, !25, i64 24}
!45 = !{i64 2158402504}


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