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

; 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> }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.4 }
%union.anon.4 = type { <4 x float> }
%"class.JPH::DistanceConstraint" = type <{ %"class.JPH::TwoBodyConstraint", %"class.JPH::Vec3", %"class.JPH::Vec3", float, float, %"class.JPH::SpringSettings", [12 x i8], %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", float, float, %"class.JPH::AxisConstraintPart", [8 x i8] }>
%"class.JPH::TwoBodyConstraint" = type { %"class.JPH::Constraint", ptr, ptr }
%"class.JPH::Constraint" = type { ptr, %"class.JPH::RefTarget.3", i32, i32, i8, i8, i8, i64 }
%"class.JPH::RefTarget.3" = type { %"struct.std::atomic" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"class.JPH::SpringSettings" = type { i8, %union.anon.2, float }
%union.anon.2 = type { 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::DistanceConstraintSettings" = type <{ %"class.JPH::TwoBodyConstraintSettings", i32, [4 x i8], %"class.JPH::Vec3", %"class.JPH::Vec3", float, float, %"class.JPH::SpringSettings", [12 x i8] }>
%"class.JPH::TwoBodyConstraintSettings" = type { %"class.JPH::ConstraintSettings" }
%"class.JPH::ConstraintSettings" = type { %"class.JPH::SerializableObject", %"class.JPH::RefTarget", i8, i32, i32, i32, float, i64 }
%"class.JPH::SerializableObject" = type { ptr }
%"class.JPH::RefTarget" = type { %"struct.std::atomic" }

@_ZTVN3JPH18DistanceConstraintE = external dso_local unnamed_addr constant { [20 x ptr] }, align 8

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH18DistanceConstraintC2ERNS_4BodyES2_RKNS_26DistanceConstraintSettingsE(ptr noundef nonnull align 16 dereferenceable(240) %0, ptr noundef nonnull align 16 dereferenceable(122) %1, ptr noundef nonnull align 16 dereferenceable(122) %2, ptr noundef nonnull align 16 dereferenceable(112) %3) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.JPH::Vec3", align 16
  %10 = alloca %"class.JPH::Mat44", align 16
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.JPH::Vec3", align 16
  %14 = alloca %"class.JPH::Vec3", align 16
  %15 = alloca %"class.JPH::Mat44", align 16
  %16 = alloca %"class.JPH::Vec3", align 16
  %17 = alloca %"class.JPH::Vec3", align 16
  %18 = alloca %"class.JPH::Vec3", align 16
  %19 = alloca %"class.JPH::Vec3", align 16
  %20 = alloca %"class.JPH::Mat44", align 16
  %21 = alloca %"class.JPH::Vec3", align 16
  %22 = alloca %"class.JPH::Vec3", align 16
  %23 = alloca %"class.JPH::Mat44", align 16
  %24 = alloca %"class.JPH::Vec3", align 16
  %25 = alloca float, align 4
  %26 = alloca %"class.JPH::Vec3", align 16
  %27 = alloca %"class.JPH::Vec3", align 16
  %28 = alloca float, align 4
  %29 = alloca float, align 4
  %30 = alloca %"class.JPH::Vec3", align 16
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %31 = load ptr, ptr %5, align 8
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN3JPH17TwoBodyConstraintC2ERNS_4BodyES2_RKNS_25TwoBodyConstraintSettingsE(ptr noundef nonnull align 8 dereferenceable(48) %31, ptr noundef nonnull align 16 dereferenceable(122) %32, ptr noundef nonnull align 16 dereferenceable(122) %33, ptr noundef nonnull align 8 dereferenceable(40) %34)
  store ptr getelementptr inbounds inrange(-16, 144) ({ [20 x ptr] }, ptr @_ZTVN3JPH18DistanceConstraintE, i32 0, i32 0, i32 2), ptr %31, align 16, !tbaa !9
  %35 = getelementptr inbounds %"class.JPH::DistanceConstraint", ptr %31, i32 0, i32 1
  %36 = getelementptr inbounds %"class.JPH::DistanceConstraint", ptr %31, i32 0, i32 2
  %37 = getelementptr inbounds %"class.JPH::DistanceConstraint", ptr %31, i32 0, i32 3
  %38 = load ptr, ptr %8, align 8, !tbaa !5
  %39 = getelementptr inbounds %"class.JPH::DistanceConstraintSettings", ptr %38, i32 0, i32 5
  %40 = load float, ptr %39, align 16, !tbaa !11
  store float %40, ptr %37, align 16, !tbaa !27
  %41 = getelementptr inbounds %"class.JPH::DistanceConstraint", ptr %31, i32 0, i32 4
  %42 = load ptr, ptr %8, align 8, !tbaa !5
  %43 = getelementptr inbounds %"class.JPH::DistanceConstraintSettings", ptr %42, i32 0, i32 6
  %44 = load float, ptr %43, align 4, !tbaa !35
  store float %44, ptr %41, align 4, !tbaa !36
  %45 = getelementptr inbounds %"class.JPH::DistanceConstraint", ptr %31, i32 0, i32 5
  call void @_ZN3JPH14SpringSettingsC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %45) #8
  %46 = getelementptr inbounds %"class.JPH::DistanceConstraint", ptr %31, i32 0, i32 7
  %47 = getelementptr inbounds %"class.JPH::DistanceConstraint", ptr %31, i32 0, i32 8
  %48 = getelementptr inbounds %"class.JPH::DistanceConstraint", ptr %31, i32 0, i32 9
  %49 = getelementptr inbounds %"class.JPH::DistanceConstraint", ptr %31, i32 0, i32 12
  call void @_ZN3JPH18AxisConstraintPartC2Ev(ptr noundef nonnull align 4 dereferenceable(64) %49) #8
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  %51 = getelementptr inbounds %"class.JPH::DistanceConstraintSettings", ptr %50, i32 0, i32 1
  %52 = load i32, ptr %51, align 8, !tbaa !37
  %53 = icmp eq i32 %52, 1
  br i1 %53, label %54, label %103

54:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #8
  call void @llvm.lifetime.start.p0(i64 64, ptr %10) #8
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZNK3JPH4Body31GetInverseCenterOfMassTransformEv(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %10, ptr noundef nonnull align 16 dereferenceable(122) %55)
          to label %56 unwind label %95

56:                                               ; preds = %54
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = getelementptr inbounds %"class.JPH::DistanceConstraintSettings", ptr %57, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %13, ptr align 16 %58, i64 16, i1 false), !tbaa.struct !38
  %59 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 0
  %60 = load double, ptr %59, align 16
  %61 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 1
  %62 = load double, ptr %61, align 8
  %63 = invoke { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %10, double %60, double %62)
          to label %64 unwind label %95

64:                                               ; preds = %56
  %65 = getelementptr inbounds %"class.JPH::Vec3", ptr %9, i32 0, i32 0
  %66 = getelementptr inbounds %union.anon, ptr %65, i32 0, i32 0
  %67 = getelementptr inbounds { double, double }, ptr %66, i32 0, i32 0
  %68 = extractvalue { double, double } %63, 0
  store double %68, ptr %67, align 16
  %69 = getelementptr inbounds { double, double }, ptr %66, i32 0, i32 1
  %70 = extractvalue { double, double } %63, 1
  store double %70, ptr %69, align 8
  %71 = getelementptr inbounds %"class.JPH::DistanceConstraint", ptr %31, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %71, ptr align 16 %9, i64 16, i1 false), !tbaa.struct !38
  call void @llvm.lifetime.end.p0(i64 64, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #8
  call void @llvm.lifetime.start.p0(i64 64, ptr %15) #8
  %72 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZNK3JPH4Body31GetInverseCenterOfMassTransformEv(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %15, ptr noundef nonnull align 16 dereferenceable(122) %72)
          to label %73 unwind label %99

73:                                               ; preds = %64
  %74 = load ptr, ptr %8, align 8, !tbaa !5
  %75 = getelementptr inbounds %"class.JPH::DistanceConstraintSettings", ptr %74, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %16, ptr align 16 %75, i64 16, i1 false), !tbaa.struct !38
  %76 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 0
  %77 = load double, ptr %76, align 16
  %78 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 1
  %79 = load double, ptr %78, align 8
  %80 = invoke { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %15, double %77, double %79)
          to label %81 unwind label %99

81:                                               ; preds = %73
  %82 = getelementptr inbounds %"class.JPH::Vec3", ptr %14, i32 0, i32 0
  %83 = getelementptr inbounds %union.anon, ptr %82, i32 0, i32 0
  %84 = getelementptr inbounds { double, double }, ptr %83, i32 0, i32 0
  %85 = extractvalue { double, double } %80, 0
  store double %85, ptr %84, align 16
  %86 = getelementptr inbounds { double, double }, ptr %83, i32 0, i32 1
  %87 = extractvalue { double, double } %80, 1
  store double %87, ptr %86, align 8
  %88 = getelementptr inbounds %"class.JPH::DistanceConstraint", ptr %31, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %88, ptr align 16 %14, i64 16, i1 false), !tbaa.struct !38
  call void @llvm.lifetime.end.p0(i64 64, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #8
  %89 = load ptr, ptr %8, align 8, !tbaa !5
  %90 = getelementptr inbounds %"class.JPH::DistanceConstraintSettings", ptr %89, i32 0, i32 3
  %91 = getelementptr inbounds %"class.JPH::DistanceConstraint", ptr %31, i32 0, i32 7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %91, ptr align 16 %90, i64 16, i1 false), !tbaa.struct !38
  %92 = load ptr, ptr %8, align 8, !tbaa !5
  %93 = getelementptr inbounds %"class.JPH::DistanceConstraintSettings", ptr %92, i32 0, i32 4
  %94 = getelementptr inbounds %"class.JPH::DistanceConstraint", ptr %31, i32 0, i32 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %94, ptr align 16 %93, i64 16, i1 false), !tbaa.struct !38
  br label %152

95:                                               ; preds = %56, %54
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %11, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 64, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #8
  br label %235

99:                                               ; preds = %73, %64
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %11, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 64, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #8
  br label %235

103:                                              ; preds = %4
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #8
  %104 = load ptr, ptr %8, align 8, !tbaa !5
  %105 = getelementptr inbounds %"class.JPH::DistanceConstraintSettings", ptr %104, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %17, ptr align 16 %105, i64 16, i1 false), !tbaa.struct !38
  %106 = getelementptr inbounds %"class.JPH::DistanceConstraint", ptr %31, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %106, ptr align 16 %17, i64 16, i1 false), !tbaa.struct !38
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #8
  %107 = load ptr, ptr %8, align 8, !tbaa !5
  %108 = getelementptr inbounds %"class.JPH::DistanceConstraintSettings", ptr %107, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %18, ptr align 16 %108, i64 16, i1 false), !tbaa.struct !38
  %109 = getelementptr inbounds %"class.JPH::DistanceConstraint", ptr %31, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %109, ptr align 16 %18, i64 16, i1 false), !tbaa.struct !38
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #8
  call void @llvm.lifetime.start.p0(i64 64, ptr %20) #8
  %110 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZNK3JPH4Body24GetCenterOfMassTransformEv(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %20, ptr noundef nonnull align 16 dereferenceable(122) %110)
          to label %111 unwind label %144

111:                                              ; preds = %103
  %112 = load ptr, ptr %8, align 8, !tbaa !5
  %113 = getelementptr inbounds %"class.JPH::DistanceConstraintSettings", ptr %112, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %21, ptr align 16 %113, i64 16, i1 false), !tbaa.struct !38
  %114 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %115 = load double, ptr %114, align 16
  %116 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  %117 = load double, ptr %116, align 8
  %118 = invoke { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %20, double %115, double %117)
          to label %119 unwind label %144

119:                                              ; preds = %111
  %120 = getelementptr inbounds %"class.JPH::Vec3", ptr %19, i32 0, i32 0
  %121 = getelementptr inbounds %union.anon, ptr %120, i32 0, i32 0
  %122 = getelementptr inbounds { double, double }, ptr %121, i32 0, i32 0
  %123 = extractvalue { double, double } %118, 0
  store double %123, ptr %122, align 16
  %124 = getelementptr inbounds { double, double }, ptr %121, i32 0, i32 1
  %125 = extractvalue { double, double } %118, 1
  store double %125, ptr %124, align 8
  %126 = getelementptr inbounds %"class.JPH::DistanceConstraint", ptr %31, i32 0, i32 7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %126, ptr align 16 %19, i64 16, i1 false), !tbaa.struct !38
  call void @llvm.lifetime.end.p0(i64 64, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #8
  call void @llvm.lifetime.start.p0(i64 64, ptr %23) #8
  %127 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZNK3JPH4Body24GetCenterOfMassTransformEv(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %23, ptr noundef nonnull align 16 dereferenceable(122) %127)
          to label %128 unwind label %148

128:                                              ; preds = %119
  %129 = load ptr, ptr %8, align 8, !tbaa !5
  %130 = getelementptr inbounds %"class.JPH::DistanceConstraintSettings", ptr %129, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %24, ptr align 16 %130, i64 16, i1 false), !tbaa.struct !38
  %131 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 0
  %132 = load double, ptr %131, align 16
  %133 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 1
  %134 = load double, ptr %133, align 8
  %135 = invoke { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %23, double %132, double %134)
          to label %136 unwind label %148

136:                                              ; preds = %128
  %137 = getelementptr inbounds %"class.JPH::Vec3", ptr %22, i32 0, i32 0
  %138 = getelementptr inbounds %union.anon, ptr %137, i32 0, i32 0
  %139 = getelementptr inbounds { double, double }, ptr %138, i32 0, i32 0
  %140 = extractvalue { double, double } %135, 0
  store double %140, ptr %139, align 16
  %141 = getelementptr inbounds { double, double }, ptr %138, i32 0, i32 1
  %142 = extractvalue { double, double } %135, 1
  store double %142, ptr %141, align 8
  %143 = getelementptr inbounds %"class.JPH::DistanceConstraint", ptr %31, i32 0, i32 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %143, ptr align 16 %22, i64 16, i1 false), !tbaa.struct !38
  call void @llvm.lifetime.end.p0(i64 64, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #8
  br label %152

144:                                              ; preds = %111, %103
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %11, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 64, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #8
  br label %235

148:                                              ; preds = %128, %119
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %11, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 64, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #8
  br label %235

152:                                              ; preds = %136, %81
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #8
  %153 = getelementptr inbounds %"class.JPH::DistanceConstraint", ptr %31, i32 0, i32 8
  %154 = getelementptr inbounds %"class.JPH::DistanceConstraint", ptr %31, i32 0, i32 7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %27, ptr align 16 %154, i64 16, i1 false), !tbaa.struct !38
  %155 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 0
  %156 = load double, ptr %155, align 16
  %157 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 1
  %158 = load double, ptr %157, align 8
  %159 = invoke { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %153, double %156, double %158)
          to label %160 unwind label %178

160:                                              ; preds = %152
  %161 = getelementptr inbounds %"class.JPH::Vec3", ptr %26, i32 0, i32 0
  %162 = getelementptr inbounds %union.anon, ptr %161, i32 0, i32 0
  %163 = getelementptr inbounds { double, double }, ptr %162, i32 0, i32 0
  %164 = extractvalue { double, double } %159, 0
  store double %164, ptr %163, align 16
  %165 = getelementptr inbounds { double, double }, ptr %162, i32 0, i32 1
  %166 = extractvalue { double, double } %159, 1
  store double %166, ptr %165, align 8
  %167 = invoke noundef float @_ZNK3JPH4Vec36LengthEv(ptr noundef nonnull align 16 dereferenceable(16) %26)
          to label %168 unwind label %178

168:                                              ; preds = %160
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #8
  store float %167, ptr %25, align 4, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  %169 = getelementptr inbounds %"class.JPH::DistanceConstraint", ptr %31, i32 0, i32 3
  %170 = load float, ptr %169, align 16, !tbaa !27
  %171 = fcmp olt float %170, 0.000000e+00
  br i1 %171, label %172, label %182

172:                                              ; preds = %168
  %173 = getelementptr inbounds %"class.JPH::DistanceConstraint", ptr %31, i32 0, i32 4
  %174 = load float, ptr %173, align 4, !tbaa !36
  %175 = fcmp olt float %174, 0.000000e+00
  br i1 %175, label %176, label %182

176:                                              ; preds = %172
  %177 = load float, ptr %25, align 4, !tbaa !40
  store float %177, ptr %29, align 4, !tbaa !40
  store float %177, ptr %28, align 4, !tbaa !40
  br label %213

178:                                              ; preds = %160, %152
  %179 = landingpad { ptr, i32 }
          cleanup
  %180 = extractvalue { ptr, i32 } %179, 0
  store ptr %180, ptr %11, align 8
  %181 = extractvalue { ptr, i32 } %179, 1
  store i32 %181, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #8
  br label %234

182:                                              ; preds = %172, %168
  %183 = getelementptr inbounds %"class.JPH::DistanceConstraint", ptr %31, i32 0, i32 3
  %184 = load float, ptr %183, align 16, !tbaa !27
  %185 = fcmp olt float %184, 0.000000e+00
  br i1 %185, label %186, label %191

186:                                              ; preds = %182
  %187 = getelementptr inbounds %"class.JPH::DistanceConstraint", ptr %31, i32 0, i32 4
  %188 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %25, ptr noundef nonnull align 4 dereferenceable(4) %187)
          to label %189 unwind label %209

189:                                              ; preds = %186
  %190 = load float, ptr %188, align 4, !tbaa !40
  br label %194

191:                                              ; preds = %182
  %192 = getelementptr inbounds %"class.JPH::DistanceConstraint", ptr %31, i32 0, i32 3
  %193 = load float, ptr %192, align 16, !tbaa !27
  br label %194

194:                                              ; preds = %191, %189
  %195 = phi float [ %190, %189 ], [ %193, %191 ]
  store float %195, ptr %28, align 4, !tbaa !40
  %196 = getelementptr inbounds %"class.JPH::DistanceConstraint", ptr %31, i32 0, i32 4
  %197 = load float, ptr %196, align 4, !tbaa !36
  %198 = fcmp olt float %197, 0.000000e+00
  br i1 %198, label %199, label %204

199:                                              ; preds = %194
  %200 = getelementptr inbounds %"class.JPH::DistanceConstraint", ptr %31, i32 0, i32 3
  %201 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %25, ptr noundef nonnull align 4 dereferenceable(4) %200)
          to label %202 unwind label %209

202:                                              ; preds = %199
  %203 = load float, ptr %201, align 4, !tbaa !40
  br label %207

204:                                              ; preds = %194
  %205 = getelementptr inbounds %"class.JPH::DistanceConstraint", ptr %31, i32 0, i32 4
  %206 = load float, ptr %205, align 4, !tbaa !36
  br label %207

207:                                              ; preds = %204, %202
  %208 = phi float [ %203, %202 ], [ %206, %204 ]
  store float %208, ptr %29, align 4, !tbaa !40
  br label %213

209:                                              ; preds = %218, %213, %199, %186
  %210 = landingpad { ptr, i32 }
          cleanup
  %211 = extractvalue { ptr, i32 } %210, 0
  store ptr %211, ptr %11, align 8
  %212 = extractvalue { ptr, i32 } %210, 1
  store i32 %212, ptr %12, align 4
  br label %233

213:                                              ; preds = %207, %176
  %214 = load float, ptr %28, align 4, !tbaa !40
  %215 = load float, ptr %29, align 4, !tbaa !40
  invoke void @_ZN3JPH18DistanceConstraint11SetDistanceEff(ptr noundef nonnull align 16 dereferenceable(240) %31, float noundef %214, float noundef %215)
          to label %216 unwind label %209

216:                                              ; preds = %213
  call void @llvm.lifetime.start.p0(i64 16, ptr %30) #8
  %217 = invoke { double, double } @_ZN3JPH4Vec36sAxisYEv()
          to label %218 unwind label %229

218:                                              ; preds = %216
  %219 = getelementptr inbounds %"class.JPH::Vec3", ptr %30, i32 0, i32 0
  %220 = getelementptr inbounds %union.anon, ptr %219, i32 0, i32 0
  %221 = getelementptr inbounds { double, double }, ptr %220, i32 0, i32 0
  %222 = extractvalue { double, double } %217, 0
  store double %222, ptr %221, align 16
  %223 = getelementptr inbounds { double, double }, ptr %220, i32 0, i32 1
  %224 = extractvalue { double, double } %217, 1
  store double %224, ptr %223, align 8
  %225 = getelementptr inbounds %"class.JPH::DistanceConstraint", ptr %31, i32 0, i32 9
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %225, ptr align 16 %30, i64 16, i1 false), !tbaa.struct !38
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #8
  %226 = load ptr, ptr %8, align 8, !tbaa !5
  %227 = getelementptr inbounds %"class.JPH::DistanceConstraintSettings", ptr %226, i32 0, i32 7
  invoke void @_ZN3JPH18DistanceConstraint23SetLimitsSpringSettingsERKNS_14SpringSettingsE(ptr noundef nonnull align 16 dereferenceable(240) %31, ptr noundef nonnull align 4 dereferenceable(12) %227)
          to label %228 unwind label %209

228:                                              ; preds = %218
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  ret void

229:                                              ; preds = %216
  %230 = landingpad { ptr, i32 }
          cleanup
  %231 = extractvalue { ptr, i32 } %230, 0
  store ptr %231, ptr %11, align 8
  %232 = extractvalue { ptr, i32 } %230, 1
  store i32 %232, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #8
  br label %233

233:                                              ; preds = %229, %209
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  br label %234

234:                                              ; preds = %233, %178
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  br label %235

235:                                              ; preds = %234, %148, %144, %99, %95
  call void @_ZN3JPH10ConstraintD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %31) #8
  br label %236

236:                                              ; preds = %235
  %237 = load ptr, ptr %11, align 8
  %238 = load i32, ptr %12, align 4
  %239 = insertvalue { ptr, i32 } poison, ptr %237, 0
  %240 = insertvalue { ptr, i32 } %239, i32 %238, 1
  resume { ptr, i32 } %240
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH17TwoBodyConstraintC2ERNS_4BodyES2_RKNS_25TwoBodyConstraintSettingsE(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH14SpringSettingsC2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK3JPH4Body31GetInverseCenterOfMassTransformEv(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, ptr noundef nonnull align 16 dereferenceable(122)) #4 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK3JPH4Body24GetCenterOfMassTransformEv(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, ptr noundef nonnull align 16 dereferenceable(122)) #4 align 2

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef float @_ZNK3JPH4Vec36LengthEv(ptr noundef nonnull align 16 dereferenceable(16)) #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH18DistanceConstraint11SetDistanceEff(ptr noundef nonnull align 16 dereferenceable(240), float noundef, float noundef) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH18DistanceConstraint23SetLimitsSpringSettingsERKNS_14SpringSettingsE(ptr noundef nonnull align 16 dereferenceable(240), ptr noundef nonnull align 4 dereferenceable(12)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH10ConstraintD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !21, i64 80}
!12 = !{!"_ZTSN3JPH26DistanceConstraintSettingsE", !13, i64 0, !23, i64 40, !24, i64 48, !24, i64 64, !21, i64 80, !21, i64 84, !25, i64 88}
!13 = !{!"_ZTSN3JPH25TwoBodyConstraintSettingsE", !14, i64 0}
!14 = !{!"_ZTSN3JPH18ConstraintSettingsE", !15, i64 0, !16, i64 8, !20, i64 12, !19, i64 16, !19, i64 20, !19, i64 24, !21, i64 28, !22, i64 32}
!15 = !{!"_ZTSN3JPH18SerializableObjectE"}
!16 = !{!"_ZTSN3JPH9RefTargetINS_18ConstraintSettingsEEE", !17, i64 0}
!17 = !{!"_ZTSSt6atomicIjE", !18, i64 0}
!18 = !{!"_ZTSSt13__atomic_baseIjE", !19, i64 0}
!19 = !{!"int", !7, i64 0}
!20 = !{!"bool", !7, i64 0}
!21 = !{!"float", !7, i64 0}
!22 = !{!"long", !7, i64 0}
!23 = !{!"_ZTSN3JPH16EConstraintSpaceE", !7, i64 0}
!24 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!25 = !{!"_ZTSN3JPH14SpringSettingsE", !26, i64 0, !7, i64 4, !21, i64 8}
!26 = !{!"_ZTSN3JPH11ESpringModeE", !7, i64 0}
!27 = !{!28, !21, i64 80}
!28 = !{!"_ZTSN3JPH18DistanceConstraintE", !29, i64 0, !24, i64 48, !24, i64 64, !21, i64 80, !21, i64 84, !25, i64 88, !24, i64 112, !24, i64 128, !24, i64 144, !21, i64 160, !21, i64 164, !32, i64 168}
!29 = !{!"_ZTSN3JPH17TwoBodyConstraintE", !30, i64 0, !6, i64 32, !6, i64 40}
!30 = !{!"_ZTSN3JPH10ConstraintE", !31, i64 8, !19, i64 12, !19, i64 16, !7, i64 20, !7, i64 21, !20, i64 22, !22, i64 24}
!31 = !{!"_ZTSN3JPH9RefTargetINS_10ConstraintEEE", !17, i64 0}
!32 = !{!"_ZTSN3JPH18AxisConstraintPartE", !33, i64 0, !33, i64 12, !33, i64 24, !33, i64 36, !21, i64 48, !34, i64 52, !21, i64 60}
!33 = !{!"_ZTSN3JPH6Float3E", !21, i64 0, !21, i64 4, !21, i64 8}
!34 = !{!"_ZTSN3JPH10SpringPartE", !21, i64 0, !21, i64 4}
!35 = !{!12, !21, i64 84}
!36 = !{!28, !21, i64 84}
!37 = !{!12, !23, i64 40}
!38 = !{i64 0, i64 16, !39}
!39 = !{!7, !7, i64 0}
!40 = !{!21, !21, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.4 }
%union.anon.4 = type { <4 x float> }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }

@_ZTVN3JPH18DistanceConstraintE = external dso_local unnamed_addr constant { [20 x ptr] }, align 8

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH18DistanceConstraintC2ERNS_4BodyES2_RKNS_26DistanceConstraintSettingsE(ptr noundef nonnull align 16 dereferenceable(240) %0, ptr noundef nonnull align 16 dereferenceable(122) %1, ptr noundef nonnull align 16 dereferenceable(122) %2, ptr noundef nonnull align 16 dereferenceable(112) %3) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.JPH::Mat44", align 16
  %6 = alloca %"class.JPH::Mat44", align 16
  %7 = alloca %"class.JPH::Mat44", align 16
  %8 = alloca %"class.JPH::Mat44", align 16
  %9 = alloca float, align 4
  %10 = alloca %"class.JPH::Vec3", align 16
  tail call void @_ZN3JPH17TwoBodyConstraintC2ERNS_4BodyES2_RKNS_25TwoBodyConstraintSettingsE(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 16 dereferenceable(122) %1, ptr noundef nonnull align 16 dereferenceable(122) %2, ptr noundef nonnull align 8 dereferenceable(40) %3)
  store ptr getelementptr inbounds inrange(-16, 144) (i8, ptr @_ZTVN3JPH18DistanceConstraintE, i64 16), ptr %0, align 16, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %0, i64 80
  %12 = getelementptr inbounds i8, ptr %3, i64 80
  %13 = getelementptr inbounds i8, ptr %0, i64 84
  %14 = load <2 x float>, ptr %12, align 16, !tbaa !8
  store <2 x float> %14, ptr %11, align 16, !tbaa !8
  %15 = getelementptr inbounds i8, ptr %0, i64 88
  tail call void @_ZN3JPH14SpringSettingsC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %15) #8
  %16 = getelementptr inbounds i8, ptr %0, i64 168
  tail call void @_ZN3JPH18AxisConstraintPartC2Ev(ptr noundef nonnull align 4 dereferenceable(64) %16) #8
  %17 = getelementptr inbounds i8, ptr %3, i64 40
  %18 = load i32, ptr %17, align 8, !tbaa !11
  %19 = icmp eq i32 %18, 1
  br i1 %19, label %20, label %41

20:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %5) #8
  invoke void @_ZNK3JPH4Body31GetInverseCenterOfMassTransformEv(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %5, ptr noundef nonnull align 16 dereferenceable(122) %1)
          to label %21 unwind label %37

21:                                               ; preds = %20
  %22 = getelementptr inbounds i8, ptr %3, i64 48
  %.sroa.019.0.copyload = load double, ptr %22, align 16
  %.sroa.220.0..sroa_idx = getelementptr inbounds i8, ptr %3, i64 56
  %.sroa.220.0.copyload = load double, ptr %.sroa.220.0..sroa_idx, align 8, !tbaa !26
  %23 = invoke { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %5, double %.sroa.019.0.copyload, double %.sroa.220.0.copyload)
          to label %24 unwind label %37

24:                                               ; preds = %21
  %25 = extractvalue { double, double } %23, 0
  %26 = extractvalue { double, double } %23, 1
  %27 = getelementptr inbounds i8, ptr %0, i64 48
  store double %25, ptr %27, align 16
  %.sroa.523.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 56
  store double %26, ptr %.sroa.523.0..sroa_idx, align 8, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %6) #8
  invoke void @_ZNK3JPH4Body31GetInverseCenterOfMassTransformEv(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %6, ptr noundef nonnull align 16 dereferenceable(122) %2)
          to label %28 unwind label %39

28:                                               ; preds = %24
  %29 = getelementptr inbounds i8, ptr %3, i64 64
  %.sroa.015.0.copyload = load double, ptr %29, align 16
  %.sroa.216.0..sroa_idx = getelementptr inbounds i8, ptr %3, i64 72
  %.sroa.216.0.copyload = load double, ptr %.sroa.216.0..sroa_idx, align 8, !tbaa !26
  %30 = invoke { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %6, double %.sroa.015.0.copyload, double %.sroa.216.0.copyload)
          to label %31 unwind label %39

31:                                               ; preds = %28
  %32 = extractvalue { double, double } %30, 0
  %33 = extractvalue { double, double } %30, 1
  %34 = getelementptr inbounds i8, ptr %0, i64 64
  store double %32, ptr %34, align 16
  %.sroa.518.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 72
  store double %33, ptr %.sroa.518.0..sroa_idx, align 8, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #8
  %35 = getelementptr inbounds i8, ptr %0, i64 112
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %35, ptr noundef nonnull align 16 dereferenceable(16) %22, i64 16, i1 false), !tbaa.struct !27
  %36 = getelementptr inbounds i8, ptr %0, i64 128
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %36, ptr noundef nonnull align 16 dereferenceable(16) %29, i64 16, i1 false), !tbaa.struct !27
  br label %62

37:                                               ; preds = %21, %20
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %5) #8
  br label %102

39:                                               ; preds = %28, %24
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #8
  br label %102

41:                                               ; preds = %4
  %42 = getelementptr inbounds i8, ptr %3, i64 48
  %.sroa.013.0.copyload = load <4 x float>, ptr %42, align 16, !tbaa !26
  %43 = getelementptr inbounds i8, ptr %0, i64 48
  store <4 x float> %.sroa.013.0.copyload, ptr %43, align 16, !tbaa !26
  %44 = getelementptr inbounds i8, ptr %3, i64 64
  %.sroa.011.0.copyload = load <4 x float>, ptr %44, align 16, !tbaa !26
  %45 = getelementptr inbounds i8, ptr %0, i64 64
  store <4 x float> %.sroa.011.0.copyload, ptr %45, align 16, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %7) #8
  invoke void @_ZNK3JPH4Body24GetCenterOfMassTransformEv(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %7, ptr noundef nonnull align 16 dereferenceable(122) %1)
          to label %46 unwind label %58

46:                                               ; preds = %41
  %.sroa.07.0.copyload = load double, ptr %42, align 16
  %.sroa.28.0..sroa_idx = getelementptr inbounds i8, ptr %3, i64 56
  %.sroa.28.0.copyload = load double, ptr %.sroa.28.0..sroa_idx, align 8, !tbaa !26
  %47 = invoke { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %7, double %.sroa.07.0.copyload, double %.sroa.28.0.copyload)
          to label %48 unwind label %58

48:                                               ; preds = %46
  %49 = extractvalue { double, double } %47, 0
  %50 = extractvalue { double, double } %47, 1
  %51 = getelementptr inbounds i8, ptr %0, i64 112
  store double %49, ptr %51, align 16
  %.sroa.510.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 120
  store double %50, ptr %.sroa.510.0..sroa_idx, align 8, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8) #8
  invoke void @_ZNK3JPH4Body24GetCenterOfMassTransformEv(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %8, ptr noundef nonnull align 16 dereferenceable(122) %2)
          to label %52 unwind label %60

52:                                               ; preds = %48
  %.sroa.03.0.copyload = load double, ptr %44, align 16
  %.sroa.24.0..sroa_idx = getelementptr inbounds i8, ptr %3, i64 72
  %.sroa.24.0.copyload = load double, ptr %.sroa.24.0..sroa_idx, align 8, !tbaa !26
  %53 = invoke { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %8, double %.sroa.03.0.copyload, double %.sroa.24.0.copyload)
          to label %54 unwind label %60

54:                                               ; preds = %52
  %55 = extractvalue { double, double } %53, 0
  %56 = extractvalue { double, double } %53, 1
  %57 = getelementptr inbounds i8, ptr %0, i64 128
  store double %55, ptr %57, align 16
  %.sroa.56.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 136
  store double %56, ptr %.sroa.56.0..sroa_idx, align 8, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #8
  br label %62

58:                                               ; preds = %46, %41
  %59 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #8
  br label %102

60:                                               ; preds = %52, %48
  %61 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #8
  br label %102

62:                                               ; preds = %54, %31
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #8
  %63 = getelementptr inbounds i8, ptr %0, i64 128
  %64 = getelementptr inbounds i8, ptr %0, i64 112
  %.sroa.02.0.copyload = load double, ptr %64, align 16
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 120
  %.sroa.2.0.copyload = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !26
  %65 = invoke { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %63, double %.sroa.02.0.copyload, double %.sroa.2.0.copyload)
          to label %66 unwind label %76

66:                                               ; preds = %62
  %67 = extractvalue { double, double } %65, 0
  store double %67, ptr %10, align 16
  %68 = getelementptr inbounds i8, ptr %10, i64 8
  %69 = extractvalue { double, double } %65, 1
  store double %69, ptr %68, align 8
  %70 = invoke noundef float @_ZNK3JPH4Vec36LengthEv(ptr noundef nonnull align 16 dereferenceable(16) %10)
          to label %71 unwind label %76

71:                                               ; preds = %66
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #8
  store float %70, ptr %9, align 4, !tbaa !8
  %72 = load float, ptr %11, align 16, !tbaa !28
  %73 = fcmp olt float %72, 0.000000e+00
  %74 = load float, ptr %13, align 4
  %75 = fcmp olt float %74, 0.000000e+00
  %or.cond = select i1 %73, i1 %75, i1 false
  br i1 %or.cond, label %91, label %78

76:                                               ; preds = %66, %62
  %77 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #8
  br label %101

78:                                               ; preds = %71
  br i1 %73, label %79, label %82

79:                                               ; preds = %78
  %80 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %81 = load float, ptr %80, align 4, !tbaa !8
  %.pr = load float, ptr %13, align 4, !tbaa !37
  br label %82

82:                                               ; preds = %78, %79
  %83 = phi float [ %74, %78 ], [ %.pr, %79 ]
  %84 = phi float [ %72, %78 ], [ %81, %79 ]
  %85 = fcmp olt float %83, 0.000000e+00
  br i1 %85, label %86, label %91

86:                                               ; preds = %82
  %87 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %88 = load float, ptr %87, align 4, !tbaa !8
  br label %91

89:                                               ; preds = %91
  %90 = landingpad { ptr, i32 }
          cleanup
  br label %101

91:                                               ; preds = %86, %82, %71
  %.048 = phi float [ %70, %71 ], [ %84, %82 ], [ %84, %86 ]
  %.047 = phi float [ %70, %71 ], [ %83, %82 ], [ %88, %86 ]
  invoke void @_ZN3JPH18DistanceConstraint11SetDistanceEff(ptr noundef nonnull align 16 dereferenceable(240) %0, float noundef %.048, float noundef %.047)
          to label %92 unwind label %89

92:                                               ; preds = %91
  %93 = invoke { double, double } @_ZN3JPH4Vec36sAxisYEv()
          to label %94 unwind label %99

94:                                               ; preds = %92
  %95 = extractvalue { double, double } %93, 0
  %96 = extractvalue { double, double } %93, 1
  %97 = getelementptr inbounds i8, ptr %0, i64 144
  store double %95, ptr %97, align 16
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 152
  store double %96, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !26
  %98 = getelementptr inbounds i8, ptr %3, i64 88
  call void @_ZN3JPH18DistanceConstraint23SetLimitsSpringSettingsERKNS_14SpringSettingsE(ptr noundef nonnull align 16 dereferenceable(240) %0, ptr noundef nonnull align 4 dereferenceable(12) %98)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  ret void

99:                                               ; preds = %92
  %100 = landingpad { ptr, i32 }
          cleanup
  br label %101

101:                                              ; preds = %89, %99, %76
  %.pn.pn = phi { ptr, i32 } [ %77, %76 ], [ %100, %99 ], [ %90, %89 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  br label %102

102:                                              ; preds = %101, %60, %58, %39, %37
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %101 ], [ %40, %39 ], [ %38, %37 ], [ %61, %60 ], [ %59, %58 ]
  call void @_ZN3JPH10ConstraintD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #8
  resume { ptr, i32 } %.pn.pn.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH17TwoBodyConstraintC2ERNS_4BodyES2_RKNS_25TwoBodyConstraintSettingsE(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH14SpringSettingsC2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK3JPH4Body31GetInverseCenterOfMassTransformEv(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, ptr noundef nonnull align 16 dereferenceable(122)) local_unnamed_addr #4 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK3JPH4Body24GetCenterOfMassTransformEv(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, ptr noundef nonnull align 16 dereferenceable(122)) local_unnamed_addr #4 align 2

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef float @_ZNK3JPH4Vec36LengthEv(ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH18DistanceConstraint11SetDistanceEff(ptr noundef nonnull align 16 dereferenceable(240), float noundef, float noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH18DistanceConstraint23SetLimitsSpringSettingsERKNS_14SpringSettingsE(ptr noundef nonnull align 16 dereferenceable(240), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH10ConstraintD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"float", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !22, i64 40}
!12 = !{!"_ZTSN3JPH26DistanceConstraintSettingsE", !13, i64 0, !22, i64 40, !23, i64 48, !23, i64 64, !9, i64 80, !9, i64 84, !24, i64 88}
!13 = !{!"_ZTSN3JPH25TwoBodyConstraintSettingsE", !14, i64 0}
!14 = !{!"_ZTSN3JPH18ConstraintSettingsE", !15, i64 0, !16, i64 8, !20, i64 12, !19, i64 16, !19, i64 20, !19, i64 24, !9, i64 28, !21, i64 32}
!15 = !{!"_ZTSN3JPH18SerializableObjectE"}
!16 = !{!"_ZTSN3JPH9RefTargetINS_18ConstraintSettingsEEE", !17, i64 0}
!17 = !{!"_ZTSSt6atomicIjE", !18, i64 0}
!18 = !{!"_ZTSSt13__atomic_baseIjE", !19, i64 0}
!19 = !{!"int", !10, i64 0}
!20 = !{!"bool", !10, i64 0}
!21 = !{!"long", !10, i64 0}
!22 = !{!"_ZTSN3JPH16EConstraintSpaceE", !10, i64 0}
!23 = !{!"_ZTSN3JPH4Vec3E", !10, i64 0}
!24 = !{!"_ZTSN3JPH14SpringSettingsE", !25, i64 0, !10, i64 4, !9, i64 8}
!25 = !{!"_ZTSN3JPH11ESpringModeE", !10, i64 0}
!26 = !{!10, !10, i64 0}
!27 = !{i64 0, i64 16, !26}
!28 = !{!29, !9, i64 80}
!29 = !{!"_ZTSN3JPH18DistanceConstraintE", !30, i64 0, !23, i64 48, !23, i64 64, !9, i64 80, !9, i64 84, !24, i64 88, !23, i64 112, !23, i64 128, !23, i64 144, !9, i64 160, !9, i64 164, !34, i64 168}
!30 = !{!"_ZTSN3JPH17TwoBodyConstraintE", !31, i64 0, !33, i64 32, !33, i64 40}
!31 = !{!"_ZTSN3JPH10ConstraintE", !32, i64 8, !19, i64 12, !19, i64 16, !10, i64 20, !10, i64 21, !20, i64 22, !21, i64 24}
!32 = !{!"_ZTSN3JPH9RefTargetINS_10ConstraintEEE", !17, i64 0}
!33 = !{!"any pointer", !10, i64 0}
!34 = !{!"_ZTSN3JPH18AxisConstraintPartE", !35, i64 0, !35, i64 12, !35, i64 24, !35, i64 36, !9, i64 48, !36, i64 52, !9, i64 60}
!35 = !{!"_ZTSN3JPH6Float3E", !9, i64 0, !9, i64 4, !9, i64 8}
!36 = !{!"_ZTSN3JPH10SpringPartE", !9, i64 0, !9, i64 4}
!37 = !{!29, !9, i64 84}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass