; LLVM IR from jrouwe/JoltPhysics :: Jolt/Physics/SoftBody (SoftBodyMotionProperties)

; 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.0 }
%union.anon.0 = type { <4 x float> }
%"class.JPH::SoftBodyUpdateContext" = type <{ ptr, ptr, ptr, ptr, %"class.JPH::Mat44", %"class.JPH::Vec3", %"class.JPH::Vec3", float, float, %"struct.std::atomic.49", %"struct.std::atomic.11", %"struct.std::atomic.11", %"struct.std::atomic.11", %"struct.std::atomic.11", %"struct.std::atomic.11", %"struct.std::atomic.11", %"struct.std::atomic.11", [8 x i8], %"class.JPH::Vec3", i32, [12 x i8] }>
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon }
%union.anon = type { <4 x float> }
%"struct.std::atomic.49" = type { i32 }
%"struct.std::atomic.11" = type { %"struct.std::__atomic_base.12" }
%"struct.std::__atomic_base.12" = type { i32 }
%"class.JPH::SoftBodyMotionProperties" = type <{ %"class.JPH::MotionProperties.base", [2 x i8], %"class.JPH::RefConst", %"class.JPH::Array", %"class.JPH::Array.1", %"class.JPH::Array.4", %"class.JPH::Array.7", %"class.JPH::AABox", %"class.JPH::AABox", i32, i32, float, float, i8, %"struct.std::atomic", i8, i8, [12 x i8] }>
%"class.JPH::MotionProperties.base" = type <{ %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Quat", %"class.JPH::Float3", %"class.JPH::Float3", float, float, float, float, float, float, i32, i32, i8, i8, i8, i8, i8, [3 x i8], [3 x %"class.JPH::Sphere"], float, i8, i8 }>
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Float3" = type { float, float, float }
%"class.JPH::Sphere" = type { %"class.JPH::Float3", float }
%"class.JPH::RefConst" = type { ptr }
%"class.JPH::Array" = type { i64, i64, ptr }
%"class.JPH::Array.1" = type { i64, i64, ptr }
%"class.JPH::Array.4" = type { i64, i64, ptr }
%"class.JPH::Array.7" = type { i64, i64, ptr }
%"class.JPH::AABox" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i8 }
%"class.JPH::SoftBodySharedSettings" = type { %"class.JPH::RefTarget", %"class.JPH::Array.13", %"class.JPH::Array.16", %"class.JPH::Array.19", %"class.JPH::Array.22", %"class.JPH::Array.25", %"class.JPH::Array.28", %"class.JPH::Array.31", %"class.JPH::Array.34", %"class.JPH::Array.37", float, %"class.JPH::Array.40", %"class.JPH::Array.43", %"class.JPH::Array.46" }
%"class.JPH::RefTarget" = type { %"struct.std::atomic.11" }
%"class.JPH::Array.13" = type { i64, i64, ptr }
%"class.JPH::Array.16" = type { i64, i64, ptr }
%"class.JPH::Array.19" = type { i64, i64, ptr }
%"class.JPH::Array.22" = type { i64, i64, ptr }
%"class.JPH::Array.25" = type { i64, i64, ptr }
%"class.JPH::Array.28" = type { i64, i64, ptr }
%"class.JPH::Array.31" = type { i64, i64, ptr }
%"class.JPH::Array.34" = type { i64, i64, ptr }
%"class.JPH::Array.37" = type { i64, i64, ptr }
%"class.JPH::Array.40" = type { i64, i64, ptr }
%"class.JPH::Array.43" = type { i64, i64, ptr }
%"class.JPH::Array.46" = type { i64, i64, ptr }
%"class.JPH::SoftBodyVertex" = type { %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Plane", i32, i8, float, float }
%"class.JPH::Plane" = type { %"class.JPH::Vec4" }
%"struct.JPH::SoftBodyMotionProperties::CollidingShape" = type { %"class.JPH::Mat44", %"class.JPH::Array.69", %"class.JPH::BodyID", i8, float, float, float, float, i8, %"class.JPH::Mat44", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"class.JPH::Array.69" = type { i64, i64, ptr }
%"class.JPH::BodyID" = type { i32 }

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 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) #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK3JPH8RefConstINS_22SoftBodySharedSettingsEEptEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6atomicIbE5storeEbSt12memory_order(ptr noundef nonnull align 1 dereferenceable(1), i1 noundef zeroext, i32 noundef) #5 align 2

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

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

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec3dvEf(ptr noundef nonnull align 16 dereferenceable(16), float noundef) #3 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: mustprogress uwtable
define dso_local void @_ZN3JPH24SoftBodyMotionProperties44ApplyCollisionConstraintsAndUpdateVelocitiesERKNS_21SoftBodyUpdateContextE(ptr noundef nonnull align 16 dereferenceable(372) %0, ptr noundef nonnull align 16 dereferenceable(196) %1) #8 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca float, align 4
  %6 = alloca float, align 4
  %7 = alloca float, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"class.JPH::Vec3", align 16
  %13 = alloca %"class.JPH::Vec3", align 16
  %14 = alloca %"class.JPH::Vec3", align 16
  %15 = alloca %"class.JPH::Vec3", align 16
  %16 = alloca float, align 4
  %17 = alloca %"class.JPH::Vec3", align 16
  %18 = alloca ptr, align 8
  %19 = alloca %"class.JPH::Vec3", align 16
  %20 = alloca %"class.JPH::Vec3", align 16
  %21 = alloca %"class.JPH::Vec3", align 16
  %22 = alloca %"class.JPH::Vec3", align 16
  %23 = alloca %"class.JPH::Vec3", align 16
  %24 = alloca %"class.JPH::Vec3", align 16
  %25 = alloca %"class.JPH::Vec3", align 16
  %26 = alloca %"class.JPH::Vec3", align 16
  %27 = alloca %"class.JPH::Vec3", align 16
  %28 = alloca %"class.JPH::Vec3", align 16
  %29 = alloca %"class.JPH::Vec3", align 16
  %30 = alloca %"class.JPH::Vec3", align 16
  %31 = alloca float, align 4
  %32 = alloca float, align 4
  %33 = alloca %"class.JPH::Vec3", align 16
  %34 = alloca %"class.JPH::Vec3", align 16
  %35 = alloca float, align 4
  %36 = alloca %"class.JPH::Vec3", align 16
  %37 = alloca %"class.JPH::Vec3", align 16
  %38 = alloca float, align 4
  %39 = alloca %"class.JPH::Vec3", align 16
  %40 = alloca %"class.JPH::Vec3", align 16
  %41 = alloca float, align 4
  %42 = alloca float, align 4
  %43 = alloca %"class.JPH::Vec3", align 16
  %44 = alloca %"class.JPH::Vec3", align 16
  %45 = alloca float, align 4
  %46 = alloca %"class.JPH::Vec3", align 16
  %47 = alloca %"class.JPH::Vec3", align 16
  %48 = alloca %"class.JPH::Vec3", align 16
  %49 = alloca %"class.JPH::Vec3", align 16
  %50 = alloca %"class.JPH::Vec3", align 16
  %51 = alloca %"class.JPH::Vec3", align 16
  %52 = alloca %"class.JPH::Vec3", align 16
  %53 = alloca %"class.JPH::Vec3", align 16
  %54 = alloca %"class.JPH::Vec3", align 16
  %55 = alloca %"class.JPH::Vec3", align 16
  %56 = alloca %"class.JPH::Vec3", align 16
  %57 = alloca %"class.JPH::Vec3", align 16
  %58 = alloca %"class.JPH::Vec3", align 16
  %59 = alloca %"class.JPH::Vec3", align 16
  %60 = alloca %"class.JPH::Vec3", align 16
  %61 = alloca float, align 4
  %62 = alloca %"class.JPH::Vec3", align 16
  %63 = alloca float, align 4
  %64 = alloca float, align 4
  %65 = alloca %"class.JPH::Vec3", align 16
  %66 = alloca float, align 4
  %67 = alloca %"class.JPH::Vec3", align 16
  %68 = alloca %"class.JPH::Vec3", align 16
  %69 = alloca %"class.JPH::Vec3", align 16
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %70 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #10
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = getelementptr inbounds %"class.JPH::SoftBodyUpdateContext", ptr %71, i32 0, i32 8
  %73 = load float, ptr %72, align 4, !tbaa !9
  store float %73, ptr %5, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #10
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = getelementptr inbounds %"class.JPH::SoftBodyUpdateContext", ptr %74, i32 0, i32 5
  %76 = call noundef float @_ZNK3JPH4Vec36LengthEv(ptr noundef nonnull align 16 dereferenceable(16) %75)
  %77 = fmul float -2.000000e+00, %76
  %78 = load float, ptr %5, align 4, !tbaa !20
  %79 = fmul float %77, %78
  store float %79, ptr %6, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #10
  %80 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %70, i32 0, i32 2
  %81 = call noundef ptr @_ZNK3JPH8RefConstINS_22SoftBodySharedSettingsEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %80)
  %82 = getelementptr inbounds %"class.JPH::SoftBodySharedSettings", ptr %81, i32 0, i32 10
  %83 = load float, ptr %82, align 8, !tbaa !21
  store float %83, ptr %7, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #10
  %84 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %70, i32 0, i32 3
  store ptr %84, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #10
  %85 = load ptr, ptr %8, align 8, !tbaa !5
  %86 = call noundef ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %85)
  store ptr %86, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #10
  %87 = load ptr, ptr %8, align 8, !tbaa !5
  %88 = call noundef ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %87)
  store ptr %88, ptr %10, align 8, !tbaa !5
  br label %89

89:                                               ; preds = %562, %2
  %90 = load ptr, ptr %9, align 8, !tbaa !5
  %91 = load ptr, ptr %10, align 8, !tbaa !5
  %92 = icmp ne ptr %90, %91
  br i1 %92, label %94, label %93

93:                                               ; preds = %89
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #10
  br label %565

94:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #10
  %95 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %95, ptr %11, align 8, !tbaa !5
  %96 = load ptr, ptr %11, align 8, !tbaa !5
  %97 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %96, i32 0, i32 7
  %98 = load float, ptr %97, align 4, !tbaa !37
  %99 = fcmp ogt float %98, 0.000000e+00
  br i1 %99, label %100, label %561

100:                                              ; preds = %94
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #10
  %101 = load ptr, ptr %11, align 8, !tbaa !5
  %102 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %101, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %12, ptr align 16 %102, i64 16, i1 false), !tbaa.struct !42
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #10
  %103 = load ptr, ptr %11, align 8, !tbaa !5
  %104 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %103, i32 0, i32 1
  %105 = load ptr, ptr %11, align 8, !tbaa !5
  %106 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %105, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %15, ptr align 16 %106, i64 16, i1 false), !tbaa.struct !42
  %107 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 0
  %108 = load double, ptr %107, align 16
  %109 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 1
  %110 = load double, ptr %109, align 8
  %111 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %104, double %108, double %110)
  %112 = getelementptr inbounds %"class.JPH::Vec3", ptr %14, i32 0, i32 0
  %113 = getelementptr inbounds %union.anon.0, ptr %112, i32 0, i32 0
  %114 = getelementptr inbounds { double, double }, ptr %113, i32 0, i32 0
  %115 = extractvalue { double, double } %111, 0
  store double %115, ptr %114, align 16
  %116 = getelementptr inbounds { double, double }, ptr %113, i32 0, i32 1
  %117 = extractvalue { double, double } %111, 1
  store double %117, ptr %116, align 8
  %118 = load float, ptr %5, align 4, !tbaa !20
  %119 = call { double, double } @_ZNK3JPH4Vec3dvEf(ptr noundef nonnull align 16 dereferenceable(16) %14, float noundef %118)
  %120 = getelementptr inbounds %"class.JPH::Vec3", ptr %13, i32 0, i32 0
  %121 = getelementptr inbounds %union.anon.0, ptr %120, i32 0, i32 0
  %122 = getelementptr inbounds { double, double }, ptr %121, i32 0, i32 0
  %123 = extractvalue { double, double } %119, 0
  store double %123, ptr %122, align 16
  %124 = getelementptr inbounds { double, double }, ptr %121, i32 0, i32 1
  %125 = extractvalue { double, double } %119, 1
  store double %125, ptr %124, align 8
  %126 = load ptr, ptr %11, align 8, !tbaa !5
  %127 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %126, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %127, ptr align 16 %13, i64 16, i1 false), !tbaa.struct !42
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #10
  %128 = load ptr, ptr %11, align 8, !tbaa !5
  %129 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %128, i32 0, i32 4
  %130 = load i32, ptr %129, align 16, !tbaa !44
  %131 = icmp sge i32 %130, 0
  br i1 %131, label %132, label %560

132:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #10
  %133 = load ptr, ptr %11, align 8, !tbaa !5
  %134 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %133, i32 0, i32 3
  %135 = load ptr, ptr %11, align 8, !tbaa !5
  %136 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %135, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %17, ptr align 16 %136, i64 16, i1 false), !tbaa.struct !42
  %137 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 0
  %138 = load double, ptr %137, align 16
  %139 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 1
  %140 = load double, ptr %139, align 8
  %141 = call noundef float @_ZNK3JPH5Plane14SignedDistanceENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(16) %134, double %138, double %140)
  %142 = fneg float %141
  %143 = load float, ptr %7, align 4, !tbaa !20
  %144 = fadd float %142, %143
  store float %144, ptr %16, align 4, !tbaa !20
  %145 = load float, ptr %16, align 4, !tbaa !20
  %146 = fcmp ogt float %145, 0.000000e+00
  br i1 %146, label %147, label %559

147:                                              ; preds = %132
  %148 = load ptr, ptr %11, align 8, !tbaa !5
  %149 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %148, i32 0, i32 5
  store i8 1, ptr %149, align 4, !tbaa !45
  %150 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %70, i32 0, i32 14
  call void @_ZNSt6atomicIbE5storeEbSt12memory_order(ptr noundef nonnull align 1 dereferenceable(1) %150, i1 noundef zeroext true, i32 noundef 0) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #10
  %151 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %70, i32 0, i32 4
  %152 = load ptr, ptr %11, align 8, !tbaa !5
  %153 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %152, i32 0, i32 4
  %154 = load i32, ptr %153, align 16, !tbaa !44
  %155 = sext i32 %154 to i64
  %156 = call noundef nonnull align 16 dereferenceable(256) ptr @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties14CollidingShapeENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %151, i64 noundef %155)
  store ptr %156, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #10
  %157 = load ptr, ptr %11, align 8, !tbaa !5
  %158 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %157, i32 0, i32 3
  %159 = call { double, double } @_ZNK3JPH5Plane9GetNormalEv(ptr noundef nonnull align 16 dereferenceable(16) %158)
  %160 = getelementptr inbounds %"class.JPH::Vec3", ptr %19, i32 0, i32 0
  %161 = getelementptr inbounds %union.anon.0, ptr %160, i32 0, i32 0
  %162 = getelementptr inbounds { double, double }, ptr %161, i32 0, i32 0
  %163 = extractvalue { double, double } %159, 0
  store double %163, ptr %162, align 16
  %164 = getelementptr inbounds { double, double }, ptr %161, i32 0, i32 1
  %165 = extractvalue { double, double } %159, 1
  store double %165, ptr %164, align 8
  %166 = load float, ptr %16, align 4, !tbaa !20
  %167 = call { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16) %19, float noundef %166)
  %168 = getelementptr inbounds %"class.JPH::Vec3", ptr %20, i32 0, i32 0
  %169 = getelementptr inbounds %union.anon.0, ptr %168, i32 0, i32 0
  %170 = getelementptr inbounds { double, double }, ptr %169, i32 0, i32 0
  %171 = extractvalue { double, double } %167, 0
  store double %171, ptr %170, align 16
  %172 = getelementptr inbounds { double, double }, ptr %169, i32 0, i32 1
  %173 = extractvalue { double, double } %167, 1
  store double %173, ptr %172, align 8
  %174 = load ptr, ptr %11, align 8, !tbaa !5
  %175 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %174, i32 0, i32 1
  %176 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 0
  %177 = load double, ptr %176, align 16
  %178 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 1
  %179 = load double, ptr %178, align 8
  %180 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16) %175, double %177, double %179)
  %181 = load ptr, ptr %18, align 8, !tbaa !5
  %182 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::CollidingShape", ptr %181, i32 0, i32 3
  %183 = load i8, ptr %182, align 4, !tbaa !46
  %184 = icmp eq i8 %183, 2
  br i1 %184, label %185, label %454

185:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #10
  %186 = load ptr, ptr %11, align 8, !tbaa !5
  %187 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %186, i32 0, i32 1
  %188 = load ptr, ptr %18, align 8, !tbaa !5
  %189 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::CollidingShape", ptr %188, i32 0, i32 0
  %190 = call { double, double } @_ZNK3JPH5Mat4414GetTranslationEv(ptr noundef nonnull align 16 dereferenceable(64) %189)
  %191 = getelementptr inbounds %"class.JPH::Vec3", ptr %22, i32 0, i32 0
  %192 = getelementptr inbounds %union.anon.0, ptr %191, i32 0, i32 0
  %193 = getelementptr inbounds { double, double }, ptr %192, i32 0, i32 0
  %194 = extractvalue { double, double } %190, 0
  store double %194, ptr %193, align 16
  %195 = getelementptr inbounds { double, double }, ptr %192, i32 0, i32 1
  %196 = extractvalue { double, double } %190, 1
  store double %196, ptr %195, align 8
  %197 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 0
  %198 = load double, ptr %197, align 16
  %199 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 1
  %200 = load double, ptr %199, align 8
  %201 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %187, double %198, double %200)
  %202 = getelementptr inbounds %"class.JPH::Vec3", ptr %21, i32 0, i32 0
  %203 = getelementptr inbounds %union.anon.0, ptr %202, i32 0, i32 0
  %204 = getelementptr inbounds { double, double }, ptr %203, i32 0, i32 0
  %205 = extractvalue { double, double } %201, 0
  store double %205, ptr %204, align 16
  %206 = getelementptr inbounds { double, double }, ptr %203, i32 0, i32 1
  %207 = extractvalue { double, double } %201, 1
  store double %207, ptr %206, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #10
  %208 = load ptr, ptr %18, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %24, ptr align 16 %21, i64 16, i1 false), !tbaa.struct !42
  %209 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 0
  %210 = load double, ptr %209, align 16
  %211 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 1
  %212 = load double, ptr %211, align 8
  %213 = call { double, double } @_ZNK3JPH24SoftBodyMotionProperties14CollidingShape16GetPointVelocityENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(256) %208, double %210, double %212)
  %214 = getelementptr inbounds %"class.JPH::Vec3", ptr %23, i32 0, i32 0
  %215 = getelementptr inbounds %union.anon.0, ptr %214, i32 0, i32 0
  %216 = getelementptr inbounds { double, double }, ptr %215, i32 0, i32 0
  %217 = extractvalue { double, double } %213, 0
  store double %217, ptr %216, align 16
  %218 = getelementptr inbounds { double, double }, ptr %215, i32 0, i32 1
  %219 = extractvalue { double, double } %213, 1
  store double %219, ptr %218, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #10
  %220 = load ptr, ptr %11, align 8, !tbaa !5
  %221 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %220, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %26, ptr align 16 %23, i64 16, i1 false), !tbaa.struct !42
  %222 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 0
  %223 = load double, ptr %222, align 16
  %224 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 1
  %225 = load double, ptr %224, align 8
  %226 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %221, double %223, double %225)
  %227 = getelementptr inbounds %"class.JPH::Vec3", ptr %25, i32 0, i32 0
  %228 = getelementptr inbounds %union.anon.0, ptr %227, i32 0, i32 0
  %229 = getelementptr inbounds { double, double }, ptr %228, i32 0, i32 0
  %230 = extractvalue { double, double } %226, 0
  store double %230, ptr %229, align 16
  %231 = getelementptr inbounds { double, double }, ptr %228, i32 0, i32 1
  %232 = extractvalue { double, double } %226, 1
  store double %232, ptr %231, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %28, ptr align 16 %25, i64 16, i1 false), !tbaa.struct !42
  %233 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 0
  %234 = load double, ptr %233, align 16
  %235 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 1
  %236 = load double, ptr %235, align 8
  %237 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %19, double %234, double %236)
  %238 = call { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16) %19, float noundef %237)
  %239 = getelementptr inbounds %"class.JPH::Vec3", ptr %27, i32 0, i32 0
  %240 = getelementptr inbounds %union.anon.0, ptr %239, i32 0, i32 0
  %241 = getelementptr inbounds { double, double }, ptr %240, i32 0, i32 0
  %242 = extractvalue { double, double } %238, 0
  store double %242, ptr %241, align 16
  %243 = getelementptr inbounds { double, double }, ptr %240, i32 0, i32 1
  %244 = extractvalue { double, double } %238, 1
  store double %244, ptr %243, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %30, ptr align 16 %27, i64 16, i1 false), !tbaa.struct !42
  %245 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 0
  %246 = load double, ptr %245, align 16
  %247 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 1
  %248 = load double, ptr %247, align 8
  %249 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %25, double %246, double %248)
  %250 = getelementptr inbounds %"class.JPH::Vec3", ptr %29, i32 0, i32 0
  %251 = getelementptr inbounds %union.anon.0, ptr %250, i32 0, i32 0
  %252 = getelementptr inbounds { double, double }, ptr %251, i32 0, i32 0
  %253 = extractvalue { double, double } %249, 0
  store double %253, ptr %252, align 16
  %254 = getelementptr inbounds { double, double }, ptr %251, i32 0, i32 1
  %255 = extractvalue { double, double } %249, 1
  store double %255, ptr %254, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #10
  %256 = call noundef float @_ZNK3JPH4Vec36LengthEv(ptr noundef nonnull align 16 dereferenceable(16) %29)
  store float %256, ptr %31, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #10
  %257 = load ptr, ptr %18, align 8, !tbaa !5
  %258 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::CollidingShape", ptr %257, i32 0, i32 7
  %259 = load float, ptr %258, align 4, !tbaa !51
  %260 = load ptr, ptr %11, align 8, !tbaa !5
  %261 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %260, i32 0, i32 7
  %262 = load float, ptr %261, align 4, !tbaa !37
  %263 = fmul float %259, %262
  store float %263, ptr %32, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 16, ptr %33) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %34, ptr align 16 %19, i64 16, i1 false), !tbaa.struct !42
  %264 = getelementptr inbounds { double, double }, ptr %34, i32 0, i32 0
  %265 = load double, ptr %264, align 16
  %266 = getelementptr inbounds { double, double }, ptr %34, i32 0, i32 1
  %267 = load double, ptr %266, align 8
  %268 = call { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %21, double %265, double %267)
  %269 = getelementptr inbounds %"class.JPH::Vec3", ptr %33, i32 0, i32 0
  %270 = getelementptr inbounds %union.anon.0, ptr %269, i32 0, i32 0
  %271 = getelementptr inbounds { double, double }, ptr %270, i32 0, i32 0
  %272 = extractvalue { double, double } %268, 0
  store double %272, ptr %271, align 16
  %273 = getelementptr inbounds { double, double }, ptr %270, i32 0, i32 1
  %274 = extractvalue { double, double } %268, 1
  store double %274, ptr %273, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #10
  %275 = load ptr, ptr %18, align 8, !tbaa !5
  %276 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::CollidingShape", ptr %275, i32 0, i32 4
  %277 = load float, ptr %276, align 16, !tbaa !52
  %278 = load ptr, ptr %18, align 8, !tbaa !5
  %279 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::CollidingShape", ptr %278, i32 0, i32 9
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %37, ptr align 16 %33, i64 16, i1 false), !tbaa.struct !42
  %280 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 0
  %281 = load double, ptr %280, align 16
  %282 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 1
  %283 = load double, ptr %282, align 8
  %284 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %279, double %281, double %283)
  %285 = getelementptr inbounds %"class.JPH::Vec3", ptr %36, i32 0, i32 0
  %286 = getelementptr inbounds %union.anon.0, ptr %285, i32 0, i32 0
  %287 = getelementptr inbounds { double, double }, ptr %286, i32 0, i32 0
  %288 = extractvalue { double, double } %284, 0
  store double %288, ptr %287, align 16
  %289 = getelementptr inbounds { double, double }, ptr %286, i32 0, i32 1
  %290 = extractvalue { double, double } %284, 1
  store double %290, ptr %289, align 8
  %291 = getelementptr inbounds { double, double }, ptr %36, i32 0, i32 0
  %292 = load double, ptr %291, align 16
  %293 = getelementptr inbounds { double, double }, ptr %36, i32 0, i32 1
  %294 = load double, ptr %293, align 8
  %295 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %33, double %292, double %294)
  %296 = fadd float %277, %295
  store float %296, ptr %35, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #10
  %297 = load float, ptr %32, align 4, !tbaa !20
  %298 = load float, ptr %35, align 4, !tbaa !20
  %299 = fadd float %297, %298
  store float %299, ptr %38, align 4, !tbaa !20
  %300 = load float, ptr %38, align 4, !tbaa !20
  %301 = fcmp ogt float %300, 0.000000e+00
  br i1 %301, label %302, label %453

302:                                              ; preds = %185
  call void @llvm.lifetime.start.p0(i64 16, ptr %39) #10
  %303 = load float, ptr %31, align 4, !tbaa !20
  %304 = fcmp ogt float %303, 0.000000e+00
  br i1 %304, label %305, label %324

305:                                              ; preds = %302
  call void @llvm.lifetime.start.p0(i64 16, ptr %40) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #10
  %306 = load ptr, ptr %18, align 8, !tbaa !5
  %307 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::CollidingShape", ptr %306, i32 0, i32 5
  %308 = load float, ptr %307, align 4, !tbaa !53
  %309 = load float, ptr %16, align 4, !tbaa !20
  %310 = fmul float %308, %309
  %311 = load float, ptr %31, align 4, !tbaa !20
  %312 = load float, ptr %5, align 4, !tbaa !20
  %313 = fmul float %311, %312
  %314 = fdiv float %310, %313
  store float %314, ptr %41, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #10
  store float 1.000000e+00, ptr %42, align 4, !tbaa !20
  %315 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %41, ptr noundef nonnull align 4 dereferenceable(4) %42)
  %316 = load float, ptr %315, align 4, !tbaa !20
  %317 = call { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16) %29, float noundef %316)
  %318 = getelementptr inbounds %"class.JPH::Vec3", ptr %40, i32 0, i32 0
  %319 = getelementptr inbounds %union.anon.0, ptr %318, i32 0, i32 0
  %320 = getelementptr inbounds { double, double }, ptr %319, i32 0, i32 0
  %321 = extractvalue { double, double } %317, 0
  store double %321, ptr %320, align 16
  %322 = getelementptr inbounds { double, double }, ptr %319, i32 0, i32 1
  %323 = extractvalue { double, double } %317, 1
  store double %323, ptr %322, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %39, ptr align 16 %40, i64 16, i1 false), !tbaa.struct !42
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %40) #10
  br label %332

324:                                              ; preds = %302
  call void @llvm.lifetime.start.p0(i64 16, ptr %43) #10
  %325 = call { double, double } @_ZN3JPH4Vec35sZeroEv()
  %326 = getelementptr inbounds %"class.JPH::Vec3", ptr %43, i32 0, i32 0
  %327 = getelementptr inbounds %union.anon.0, ptr %326, i32 0, i32 0
  %328 = getelementptr inbounds { double, double }, ptr %327, i32 0, i32 0
  %329 = extractvalue { double, double } %325, 0
  store double %329, ptr %328, align 16
  %330 = getelementptr inbounds { double, double }, ptr %327, i32 0, i32 1
  %331 = extractvalue { double, double } %325, 1
  store double %331, ptr %330, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %39, ptr align 16 %43, i64 16, i1 false), !tbaa.struct !42
  call void @llvm.lifetime.end.p0(i64 16, ptr %43) #10
  br label %332

332:                                              ; preds = %324, %305
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %44, ptr align 16 %27, i64 16, i1 false), !tbaa.struct !42
  %333 = getelementptr inbounds { double, double }, ptr %44, i32 0, i32 0
  %334 = load double, ptr %333, align 16
  %335 = getelementptr inbounds { double, double }, ptr %44, i32 0, i32 1
  %336 = load double, ptr %335, align 8
  %337 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16) %39, double %334, double %336)
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr %46) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %47, ptr align 16 %23, i64 16, i1 false), !tbaa.struct !42
  %338 = getelementptr inbounds { double, double }, ptr %47, i32 0, i32 0
  %339 = load double, ptr %338, align 16
  %340 = getelementptr inbounds { double, double }, ptr %47, i32 0, i32 1
  %341 = load double, ptr %340, align 8
  %342 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %12, double %339, double %341)
  %343 = getelementptr inbounds %"class.JPH::Vec3", ptr %46, i32 0, i32 0
  %344 = getelementptr inbounds %union.anon.0, ptr %343, i32 0, i32 0
  %345 = getelementptr inbounds { double, double }, ptr %344, i32 0, i32 0
  %346 = extractvalue { double, double } %342, 0
  store double %346, ptr %345, align 16
  %347 = getelementptr inbounds { double, double }, ptr %344, i32 0, i32 1
  %348 = extractvalue { double, double } %342, 1
  store double %348, ptr %347, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %48, ptr align 16 %19, i64 16, i1 false), !tbaa.struct !42
  %349 = getelementptr inbounds { double, double }, ptr %48, i32 0, i32 0
  %350 = load double, ptr %349, align 16
  %351 = getelementptr inbounds { double, double }, ptr %48, i32 0, i32 1
  %352 = load double, ptr %351, align 8
  %353 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %46, double %350, double %352)
  call void @llvm.lifetime.end.p0(i64 16, ptr %46) #10
  store float %353, ptr %45, align 4, !tbaa !20
  %354 = load float, ptr %45, align 4, !tbaa !20
  %355 = load float, ptr %6, align 4, !tbaa !20
  %356 = fcmp olt float %354, %355
  br i1 %356, label %357, label %379

357:                                              ; preds = %332
  %358 = load ptr, ptr %18, align 8, !tbaa !5
  %359 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::CollidingShape", ptr %358, i32 0, i32 6
  %360 = load float, ptr %359, align 8, !tbaa !54
  %361 = load float, ptr %45, align 4, !tbaa !20
  %362 = fmul float %360, %361
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %50, ptr align 16 %19, i64 16, i1 false), !tbaa.struct !42
  %363 = getelementptr inbounds { double, double }, ptr %50, i32 0, i32 0
  %364 = load double, ptr %363, align 16
  %365 = getelementptr inbounds { double, double }, ptr %50, i32 0, i32 1
  %366 = load double, ptr %365, align 8
  %367 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %362, double %364, double %366)
  %368 = getelementptr inbounds %"class.JPH::Vec3", ptr %49, i32 0, i32 0
  %369 = getelementptr inbounds %union.anon.0, ptr %368, i32 0, i32 0
  %370 = getelementptr inbounds { double, double }, ptr %369, i32 0, i32 0
  %371 = extractvalue { double, double } %367, 0
  store double %371, ptr %370, align 16
  %372 = getelementptr inbounds { double, double }, ptr %369, i32 0, i32 1
  %373 = extractvalue { double, double } %367, 1
  store double %373, ptr %372, align 8
  %374 = getelementptr inbounds { double, double }, ptr %49, i32 0, i32 0
  %375 = load double, ptr %374, align 16
  %376 = getelementptr inbounds { double, double }, ptr %49, i32 0, i32 1
  %377 = load double, ptr %376, align 8
  %378 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16) %39, double %375, double %377)
  br label %379

379:                                              ; preds = %357, %332
  call void @llvm.lifetime.start.p0(i64 16, ptr %51) #10
  %380 = load float, ptr %38, align 4, !tbaa !20
  %381 = call { double, double } @_ZNK3JPH4Vec3dvEf(ptr noundef nonnull align 16 dereferenceable(16) %39, float noundef %380)
  %382 = getelementptr inbounds %"class.JPH::Vec3", ptr %51, i32 0, i32 0
  %383 = getelementptr inbounds %union.anon.0, ptr %382, i32 0, i32 0
  %384 = getelementptr inbounds { double, double }, ptr %383, i32 0, i32 0
  %385 = extractvalue { double, double } %381, 0
  store double %385, ptr %384, align 16
  %386 = getelementptr inbounds { double, double }, ptr %383, i32 0, i32 1
  %387 = extractvalue { double, double } %381, 1
  store double %387, ptr %386, align 8
  %388 = load float, ptr %32, align 4, !tbaa !20
  %389 = call { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16) %51, float noundef %388)
  %390 = getelementptr inbounds %"class.JPH::Vec3", ptr %52, i32 0, i32 0
  %391 = getelementptr inbounds %union.anon.0, ptr %390, i32 0, i32 0
  %392 = getelementptr inbounds { double, double }, ptr %391, i32 0, i32 0
  %393 = extractvalue { double, double } %389, 0
  store double %393, ptr %392, align 16
  %394 = getelementptr inbounds { double, double }, ptr %391, i32 0, i32 1
  %395 = extractvalue { double, double } %389, 1
  store double %395, ptr %394, align 8
  %396 = load ptr, ptr %11, align 8, !tbaa !5
  %397 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %396, i32 0, i32 2
  %398 = getelementptr inbounds { double, double }, ptr %52, i32 0, i32 0
  %399 = load double, ptr %398, align 16
  %400 = getelementptr inbounds { double, double }, ptr %52, i32 0, i32 1
  %401 = load double, ptr %400, align 8
  %402 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3mIES0_(ptr noundef nonnull align 16 dereferenceable(16) %397, double %399, double %401)
  %403 = load ptr, ptr %18, align 8, !tbaa !5
  %404 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::CollidingShape", ptr %403, i32 0, i32 4
  %405 = load float, ptr %404, align 16, !tbaa !52
  %406 = call { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16) %51, float noundef %405)
  %407 = getelementptr inbounds %"class.JPH::Vec3", ptr %53, i32 0, i32 0
  %408 = getelementptr inbounds %union.anon.0, ptr %407, i32 0, i32 0
  %409 = getelementptr inbounds { double, double }, ptr %408, i32 0, i32 0
  %410 = extractvalue { double, double } %406, 0
  store double %410, ptr %409, align 16
  %411 = getelementptr inbounds { double, double }, ptr %408, i32 0, i32 1
  %412 = extractvalue { double, double } %406, 1
  store double %412, ptr %411, align 8
  %413 = load ptr, ptr %18, align 8, !tbaa !5
  %414 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::CollidingShape", ptr %413, i32 0, i32 10
  %415 = getelementptr inbounds { double, double }, ptr %53, i32 0, i32 0
  %416 = load double, ptr %415, align 16
  %417 = getelementptr inbounds { double, double }, ptr %53, i32 0, i32 1
  %418 = load double, ptr %417, align 8
  %419 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16) %414, double %416, double %418)
  %420 = load ptr, ptr %18, align 8, !tbaa !5
  %421 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::CollidingShape", ptr %420, i32 0, i32 9
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %56, ptr align 16 %51, i64 16, i1 false), !tbaa.struct !42
  %422 = getelementptr inbounds { double, double }, ptr %56, i32 0, i32 0
  %423 = load double, ptr %422, align 16
  %424 = getelementptr inbounds { double, double }, ptr %56, i32 0, i32 1
  %425 = load double, ptr %424, align 8
  %426 = call { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %21, double %423, double %425)
  %427 = getelementptr inbounds %"class.JPH::Vec3", ptr %55, i32 0, i32 0
  %428 = getelementptr inbounds %union.anon.0, ptr %427, i32 0, i32 0
  %429 = getelementptr inbounds { double, double }, ptr %428, i32 0, i32 0
  %430 = extractvalue { double, double } %426, 0
  store double %430, ptr %429, align 16
  %431 = getelementptr inbounds { double, double }, ptr %428, i32 0, i32 1
  %432 = extractvalue { double, double } %426, 1
  store double %432, ptr %431, align 8
  %433 = getelementptr inbounds { double, double }, ptr %55, i32 0, i32 0
  %434 = load double, ptr %433, align 16
  %435 = getelementptr inbounds { double, double }, ptr %55, i32 0, i32 1
  %436 = load double, ptr %435, align 8
  %437 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %421, double %434, double %436)
  %438 = getelementptr inbounds %"class.JPH::Vec3", ptr %54, i32 0, i32 0
  %439 = getelementptr inbounds %union.anon.0, ptr %438, i32 0, i32 0
  %440 = getelementptr inbounds { double, double }, ptr %439, i32 0, i32 0
  %441 = extractvalue { double, double } %437, 0
  store double %441, ptr %440, align 16
  %442 = getelementptr inbounds { double, double }, ptr %439, i32 0, i32 1
  %443 = extractvalue { double, double } %437, 1
  store double %443, ptr %442, align 8
  %444 = load ptr, ptr %18, align 8, !tbaa !5
  %445 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::CollidingShape", ptr %444, i32 0, i32 11
  %446 = getelementptr inbounds { double, double }, ptr %54, i32 0, i32 0
  %447 = load double, ptr %446, align 16
  %448 = getelementptr inbounds { double, double }, ptr %54, i32 0, i32 1
  %449 = load double, ptr %448, align 8
  %450 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16) %445, double %447, double %449)
  %451 = load ptr, ptr %18, align 8, !tbaa !5
  %452 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::CollidingShape", ptr %451, i32 0, i32 8
  store i8 1, ptr %452, align 16, !tbaa !55
  call void @llvm.lifetime.end.p0(i64 16, ptr %51) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %39) #10
  br label %453

453:                                              ; preds = %379, %185
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %33) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #10
  br label %558

454:                                              ; preds = %147
  %455 = load ptr, ptr %18, align 8, !tbaa !5
  %456 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::CollidingShape", ptr %455, i32 0, i32 7
  %457 = load float, ptr %456, align 4, !tbaa !51
  %458 = fcmp ogt float %457, 0.000000e+00
  br i1 %458, label %459, label %557

459:                                              ; preds = %454
  call void @llvm.lifetime.start.p0(i64 16, ptr %57) #10
  %460 = load ptr, ptr %11, align 8, !tbaa !5
  %461 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %460, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %58, ptr align 16 %461, i64 16, i1 false), !tbaa.struct !42
  %462 = getelementptr inbounds { double, double }, ptr %58, i32 0, i32 0
  %463 = load double, ptr %462, align 16
  %464 = getelementptr inbounds { double, double }, ptr %58, i32 0, i32 1
  %465 = load double, ptr %464, align 8
  %466 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %19, double %463, double %465)
  %467 = call { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16) %19, float noundef %466)
  %468 = getelementptr inbounds %"class.JPH::Vec3", ptr %57, i32 0, i32 0
  %469 = getelementptr inbounds %union.anon.0, ptr %468, i32 0, i32 0
  %470 = getelementptr inbounds { double, double }, ptr %469, i32 0, i32 0
  %471 = extractvalue { double, double } %467, 0
  store double %471, ptr %470, align 16
  %472 = getelementptr inbounds { double, double }, ptr %469, i32 0, i32 1
  %473 = extractvalue { double, double } %467, 1
  store double %473, ptr %472, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %59) #10
  %474 = load ptr, ptr %11, align 8, !tbaa !5
  %475 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %474, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %60, ptr align 16 %57, i64 16, i1 false), !tbaa.struct !42
  %476 = getelementptr inbounds { double, double }, ptr %60, i32 0, i32 0
  %477 = load double, ptr %476, align 16
  %478 = getelementptr inbounds { double, double }, ptr %60, i32 0, i32 1
  %479 = load double, ptr %478, align 8
  %480 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %475, double %477, double %479)
  %481 = getelementptr inbounds %"class.JPH::Vec3", ptr %59, i32 0, i32 0
  %482 = getelementptr inbounds %union.anon.0, ptr %481, i32 0, i32 0
  %483 = getelementptr inbounds { double, double }, ptr %482, i32 0, i32 0
  %484 = extractvalue { double, double } %480, 0
  store double %484, ptr %483, align 16
  %485 = getelementptr inbounds { double, double }, ptr %482, i32 0, i32 1
  %486 = extractvalue { double, double } %480, 1
  store double %486, ptr %485, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %61) #10
  %487 = call noundef float @_ZNK3JPH4Vec36LengthEv(ptr noundef nonnull align 16 dereferenceable(16) %59)
  store float %487, ptr %61, align 4, !tbaa !20
  %488 = load float, ptr %61, align 4, !tbaa !20
  %489 = fcmp ogt float %488, 0.000000e+00
  br i1 %489, label %490, label %516

490:                                              ; preds = %459
  call void @llvm.lifetime.start.p0(i64 4, ptr %63) #10
  %491 = load ptr, ptr %18, align 8, !tbaa !5
  %492 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::CollidingShape", ptr %491, i32 0, i32 5
  %493 = load float, ptr %492, align 4, !tbaa !53
  %494 = load float, ptr %16, align 4, !tbaa !20
  %495 = fmul float %493, %494
  %496 = load float, ptr %61, align 4, !tbaa !20
  %497 = load float, ptr %5, align 4, !tbaa !20
  %498 = fmul float %496, %497
  %499 = fdiv float %495, %498
  store float %499, ptr %63, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %64) #10
  store float 1.000000e+00, ptr %64, align 4, !tbaa !20
  %500 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %63, ptr noundef nonnull align 4 dereferenceable(4) %64)
  %501 = load float, ptr %500, align 4, !tbaa !20
  %502 = call { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16) %59, float noundef %501)
  %503 = getelementptr inbounds %"class.JPH::Vec3", ptr %62, i32 0, i32 0
  %504 = getelementptr inbounds %union.anon.0, ptr %503, i32 0, i32 0
  %505 = getelementptr inbounds { double, double }, ptr %504, i32 0, i32 0
  %506 = extractvalue { double, double } %502, 0
  store double %506, ptr %505, align 16
  %507 = getelementptr inbounds { double, double }, ptr %504, i32 0, i32 1
  %508 = extractvalue { double, double } %502, 1
  store double %508, ptr %507, align 8
  %509 = load ptr, ptr %11, align 8, !tbaa !5
  %510 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %509, i32 0, i32 2
  %511 = getelementptr inbounds { double, double }, ptr %62, i32 0, i32 0
  %512 = load double, ptr %511, align 16
  %513 = getelementptr inbounds { double, double }, ptr %62, i32 0, i32 1
  %514 = load double, ptr %513, align 8
  %515 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3mIES0_(ptr noundef nonnull align 16 dereferenceable(16) %510, double %512, double %514)
  call void @llvm.lifetime.end.p0(i64 4, ptr %64) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %63) #10
  br label %516

516:                                              ; preds = %490, %459
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %65, ptr align 16 %57, i64 16, i1 false), !tbaa.struct !42
  %517 = load ptr, ptr %11, align 8, !tbaa !5
  %518 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %517, i32 0, i32 2
  %519 = getelementptr inbounds { double, double }, ptr %65, i32 0, i32 0
  %520 = load double, ptr %519, align 16
  %521 = getelementptr inbounds { double, double }, ptr %65, i32 0, i32 1
  %522 = load double, ptr %521, align 8
  %523 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3mIES0_(ptr noundef nonnull align 16 dereferenceable(16) %518, double %520, double %522)
  call void @llvm.lifetime.start.p0(i64 4, ptr %66) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %67, ptr align 16 %19, i64 16, i1 false), !tbaa.struct !42
  %524 = getelementptr inbounds { double, double }, ptr %67, i32 0, i32 0
  %525 = load double, ptr %524, align 16
  %526 = getelementptr inbounds { double, double }, ptr %67, i32 0, i32 1
  %527 = load double, ptr %526, align 8
  %528 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %12, double %525, double %527)
  store float %528, ptr %66, align 4, !tbaa !20
  %529 = load float, ptr %66, align 4, !tbaa !20
  %530 = load float, ptr %6, align 4, !tbaa !20
  %531 = fcmp olt float %529, %530
  br i1 %531, label %532, label %556

532:                                              ; preds = %516
  %533 = load ptr, ptr %18, align 8, !tbaa !5
  %534 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::CollidingShape", ptr %533, i32 0, i32 6
  %535 = load float, ptr %534, align 8, !tbaa !54
  %536 = load float, ptr %66, align 4, !tbaa !20
  %537 = fmul float %535, %536
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %69, ptr align 16 %19, i64 16, i1 false), !tbaa.struct !42
  %538 = getelementptr inbounds { double, double }, ptr %69, i32 0, i32 0
  %539 = load double, ptr %538, align 16
  %540 = getelementptr inbounds { double, double }, ptr %69, i32 0, i32 1
  %541 = load double, ptr %540, align 8
  %542 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %537, double %539, double %541)
  %543 = getelementptr inbounds %"class.JPH::Vec3", ptr %68, i32 0, i32 0
  %544 = getelementptr inbounds %union.anon.0, ptr %543, i32 0, i32 0
  %545 = getelementptr inbounds { double, double }, ptr %544, i32 0, i32 0
  %546 = extractvalue { double, double } %542, 0
  store double %546, ptr %545, align 16
  %547 = getelementptr inbounds { double, double }, ptr %544, i32 0, i32 1
  %548 = extractvalue { double, double } %542, 1
  store double %548, ptr %547, align 8
  %549 = load ptr, ptr %11, align 8, !tbaa !5
  %550 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %549, i32 0, i32 2
  %551 = getelementptr inbounds { double, double }, ptr %68, i32 0, i32 0
  %552 = load double, ptr %551, align 16
  %553 = getelementptr inbounds { double, double }, ptr %68, i32 0, i32 1
  %554 = load double, ptr %553, align 8
  %555 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3mIES0_(ptr noundef nonnull align 16 dereferenceable(16) %550, double %552, double %554)
  br label %556

556:                                              ; preds = %532, %516
  call void @llvm.lifetime.end.p0(i64 4, ptr %66) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %61) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %59) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %57) #10
  br label %557

557:                                              ; preds = %556, %454
  br label %558

558:                                              ; preds = %557, %453
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #10
  br label %559

559:                                              ; preds = %558, %132
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #10
  br label %560

560:                                              ; preds = %559, %100
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #10
  br label %561

561:                                              ; preds = %560, %94
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #10
  br label %562

562:                                              ; preds = %561
  %563 = load ptr, ptr %9, align 8, !tbaa !5
  %564 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %563, i32 1
  store ptr %564, ptr %9, align 8, !tbaa !5
  br label %89

565:                                              ; preds = %93
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #10
  ret void
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(256) ptr @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties14CollidingShapeENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #9 align 2

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="128" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 = { 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 #9 = { 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 #10 = { 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, !13, i64 132}
!10 = !{!"_ZTSN3JPH21SoftBodyUpdateContextE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !11, i64 32, !12, i64 96, !12, i64 112, !13, i64 128, !13, i64 132, !14, i64 136, !16, i64 140, !16, i64 144, !16, i64 148, !16, i64 152, !16, i64 156, !16, i64 160, !16, i64 164, !12, i64 176, !19, i64 192}
!11 = !{!"_ZTSN3JPH5Mat44E", !7, i64 0}
!12 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = !{!"_ZTSSt6atomicIN3JPH21SoftBodyUpdateContext6EStateEE", !15, i64 0}
!15 = !{!"_ZTSN3JPH21SoftBodyUpdateContext6EStateE", !7, i64 0}
!16 = !{!"_ZTSSt6atomicIjE", !17, i64 0}
!17 = !{!"_ZTSSt13__atomic_baseIjE", !18, i64 0}
!18 = !{!"int", !7, i64 0}
!19 = !{!"_ZTSN3JPH9ECanSleepE", !7, i64 0}
!20 = !{!13, !13, i64 0}
!21 = !{!22, !13, i64 224}
!22 = !{!"_ZTSN3JPH22SoftBodySharedSettingsE", !23, i64 0, !24, i64 8, !26, i64 32, !27, i64 56, !28, i64 80, !29, i64 104, !30, i64 128, !31, i64 152, !32, i64 176, !33, i64 200, !13, i64 224, !34, i64 232, !35, i64 256, !36, i64 280}
!23 = !{!"_ZTSN3JPH9RefTargetINS_22SoftBodySharedSettingsEEE", !16, i64 0}
!24 = !{!"_ZTSN3JPH5ArrayINS_22SoftBodySharedSettings6VertexENS_12STLAllocatorIS2_EEEE", !25, i64 0, !25, i64 8, !6, i64 16}
!25 = !{!"long", !7, i64 0}
!26 = !{!"_ZTSN3JPH5ArrayINS_22SoftBodySharedSettings4FaceENS_12STLAllocatorIS2_EEEE", !25, i64 0, !25, i64 8, !6, i64 16}
!27 = !{!"_ZTSN3JPH5ArrayINS_22SoftBodySharedSettings4EdgeENS_12STLAllocatorIS2_EEEE", !25, i64 0, !25, i64 8, !6, i64 16}
!28 = !{!"_ZTSN3JPH5ArrayINS_22SoftBodySharedSettings12DihedralBendENS_12STLAllocatorIS2_EEEE", !25, i64 0, !25, i64 8, !6, i64 16}
!29 = !{!"_ZTSN3JPH5ArrayINS_22SoftBodySharedSettings6VolumeENS_12STLAllocatorIS2_EEEE", !25, i64 0, !25, i64 8, !6, i64 16}
!30 = !{!"_ZTSN3JPH5ArrayINS_22SoftBodySharedSettings7SkinnedENS_12STLAllocatorIS2_EEEE", !25, i64 0, !25, i64 8, !6, i64 16}
!31 = !{!"_ZTSN3JPH5ArrayINS_22SoftBodySharedSettings7InvBindENS_12STLAllocatorIS2_EEEE", !25, i64 0, !25, i64 8, !6, i64 16}
!32 = !{!"_ZTSN3JPH5ArrayINS_22SoftBodySharedSettings3LRAENS_12STLAllocatorIS2_EEEE", !25, i64 0, !25, i64 8, !6, i64 16}
!33 = !{!"_ZTSN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEEE", !25, i64 0, !25, i64 8, !6, i64 16}
!34 = !{!"_ZTSN3JPH5ArrayINS_22SoftBodySharedSettings16ClosestKinematicENS_12STLAllocatorIS2_EEEE", !25, i64 0, !25, i64 8, !6, i64 16}
!35 = !{!"_ZTSN3JPH5ArrayINS_22SoftBodySharedSettings11UpdateGroupENS_12STLAllocatorIS2_EEEE", !25, i64 0, !25, i64 8, !6, i64 16}
!36 = !{!"_ZTSN3JPH5ArrayIjNS_12STLAllocatorIjEEEE", !25, i64 0, !25, i64 8, !6, i64 16}
!37 = !{!38, !13, i64 76}
!38 = !{!"_ZTSN3JPH14SoftBodyVertexE", !12, i64 0, !12, i64 16, !12, i64 32, !39, i64 48, !18, i64 64, !41, i64 68, !13, i64 72, !13, i64 76}
!39 = !{!"_ZTSN3JPH5PlaneE", !40, i64 0}
!40 = !{!"_ZTSN3JPH4Vec4E", !7, i64 0}
!41 = !{!"bool", !7, i64 0}
!42 = !{i64 0, i64 16, !43}
!43 = !{!7, !7, i64 0}
!44 = !{!38, !18, i64 64}
!45 = !{!38, !41, i64 68}
!46 = !{!47, !50, i64 92}
!47 = !{!"_ZTSN3JPH24SoftBodyMotionProperties14CollidingShapeE", !11, i64 0, !48, i64 64, !49, i64 88, !50, i64 92, !13, i64 96, !13, i64 100, !13, i64 104, !13, i64 108, !41, i64 112, !11, i64 128, !12, i64 192, !12, i64 208, !12, i64 224, !12, i64 240}
!48 = !{!"_ZTSN3JPH5ArrayINS_24SoftBodyMotionProperties9LeafShapeENS_12STLAllocatorIS2_EEEE", !25, i64 0, !25, i64 8, !6, i64 16}
!49 = !{!"_ZTSN3JPH6BodyIDE", !18, i64 0}
!50 = !{!"_ZTSN3JPH11EMotionTypeE", !7, i64 0}
!51 = !{!47, !13, i64 108}
!52 = !{!47, !13, i64 96}
!53 = !{!47, !13, i64 100}
!54 = !{!47, !13, i64 104}
!55 = !{!47, !41, i64 112}


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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 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) #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK3JPH8RefConstINS_22SoftBodySharedSettingsEEptEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 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 #3 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6atomicIbE5storeEbSt12memory_order(ptr noundef nonnull align 1 dereferenceable(1), i1 noundef zeroext, i32 noundef) local_unnamed_addr #5 align 2

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

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

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec3dvEf(ptr noundef nonnull align 16 dereferenceable(16), float noundef) local_unnamed_addr #3 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: mustprogress uwtable
define dso_local void @_ZN3JPH24SoftBodyMotionProperties44ApplyCollisionConstraintsAndUpdateVelocitiesERKNS_21SoftBodyUpdateContextE(ptr noundef nonnull align 16 dereferenceable(372) %0, ptr noundef nonnull align 16 dereferenceable(196) %1) local_unnamed_addr #8 align 2 {
  %3 = alloca %"class.JPH::Vec3", align 16
  %4 = alloca %"class.JPH::Vec3", align 16
  %5 = alloca %"class.JPH::Vec3", align 16
  %6 = alloca %"class.JPH::Vec3", align 16
  %7 = alloca %"class.JPH::Vec3", align 16
  %8 = alloca %"class.JPH::Vec3", align 16
  %9 = alloca %"class.JPH::Vec3", align 16
  %10 = alloca %"class.JPH::Vec3", align 16
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca %"class.JPH::Vec3", align 16
  %14 = alloca %"class.JPH::Vec3", align 16
  %15 = alloca %"class.JPH::Vec3", align 16
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  %18 = getelementptr inbounds i8, ptr %1, i64 132
  %19 = load float, ptr %18, align 4, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %1, i64 96
  %21 = tail call noundef float @_ZNK3JPH4Vec36LengthEv(ptr noundef nonnull align 16 dereferenceable(16) %20)
  %22 = fmul float %21, -2.000000e+00
  %23 = fmul float %19, %22
  %24 = getelementptr inbounds i8, ptr %0, i64 184
  %25 = tail call noundef ptr @_ZNK3JPH8RefConstINS_22SoftBodySharedSettingsEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24)
  %26 = getelementptr inbounds i8, ptr %25, i64 224
  %27 = load float, ptr %26, align 8, !tbaa !19
  %28 = getelementptr inbounds i8, ptr %0, i64 192
  %29 = tail call noundef ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %28)
  %30 = tail call noundef ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %28)
  %.not140 = icmp eq ptr %29, %30
  br i1 %.not140, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %2
  %31 = getelementptr inbounds i8, ptr %4, i64 8
  %32 = getelementptr inbounds i8, ptr %0, i64 369
  %33 = getelementptr inbounds i8, ptr %0, i64 216
  %34 = getelementptr inbounds i8, ptr %5, i64 8
  %35 = getelementptr inbounds i8, ptr %15, i64 8
  %36 = getelementptr inbounds i8, ptr %6, i64 8
  %37 = getelementptr inbounds i8, ptr %7, i64 8
  %38 = getelementptr inbounds i8, ptr %8, i64 8
  %39 = getelementptr inbounds i8, ptr %9, i64 8
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %10, i64 8
  %40 = getelementptr inbounds i8, ptr %13, i64 8
  %41 = getelementptr inbounds i8, ptr %14, i64 8
  br label %42

._crit_edge:                                      ; preds = %213, %2
  ret void

42:                                               ; preds = %.lr.ph, %213
  %.0141 = phi ptr [ %29, %.lr.ph ], [ %214, %213 ]
  %43 = getelementptr inbounds i8, ptr %.0141, i64 76
  %44 = load float, ptr %43, align 4, !tbaa !35
  %45 = fcmp ogt float %44, 0.000000e+00
  br i1 %45, label %46, label %213

46:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #10
  %47 = getelementptr inbounds i8, ptr %.0141, i64 32
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %3, ptr noundef nonnull align 16 dereferenceable(16) %47, i64 16, i1 false), !tbaa.struct !40
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #10
  %48 = getelementptr inbounds i8, ptr %.0141, i64 16
  %.sroa.093.0.copyload = load double, ptr %.0141, align 16
  %.sroa.294.0..sroa_idx = getelementptr inbounds i8, ptr %.0141, i64 8
  %.sroa.294.0.copyload = load double, ptr %.sroa.294.0..sroa_idx, align 8, !tbaa !41
  %49 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %48, double %.sroa.093.0.copyload, double %.sroa.294.0.copyload)
  %50 = extractvalue { double, double } %49, 0
  store double %50, ptr %4, align 16
  %51 = extractvalue { double, double } %49, 1
  store double %51, ptr %31, align 8
  %52 = call { double, double } @_ZNK3JPH4Vec3dvEf(ptr noundef nonnull align 16 dereferenceable(16) %4, float noundef %19)
  %53 = extractvalue { double, double } %52, 0
  %54 = extractvalue { double, double } %52, 1
  store double %53, ptr %47, align 16
  %.sroa.496.0..sroa_idx = getelementptr inbounds i8, ptr %.0141, i64 40
  store double %54, ptr %.sroa.496.0..sroa_idx, align 8, !tbaa !41
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #10
  %55 = getelementptr inbounds i8, ptr %.0141, i64 64
  %56 = load i32, ptr %55, align 16, !tbaa !42
  %57 = icmp sgt i32 %56, -1
  br i1 %57, label %58, label %212

58:                                               ; preds = %46
  %59 = getelementptr inbounds i8, ptr %.0141, i64 48
  %.sroa.087.0.copyload = load double, ptr %48, align 16
  %.sroa.288.0..sroa_idx = getelementptr inbounds i8, ptr %.0141, i64 24
  %.sroa.288.0.copyload = load double, ptr %.sroa.288.0..sroa_idx, align 8, !tbaa !41
  %60 = call noundef float @_ZNK3JPH5Plane14SignedDistanceENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(16) %59, double %.sroa.087.0.copyload, double %.sroa.288.0.copyload)
  %61 = fsub float %27, %60
  %62 = fcmp ogt float %61, 0.000000e+00
  br i1 %62, label %63, label %212

63:                                               ; preds = %58
  %64 = getelementptr inbounds i8, ptr %.0141, i64 68
  store i8 1, ptr %64, align 4, !tbaa !43
  call void @_ZNSt6atomicIbE5storeEbSt12memory_order(ptr noundef nonnull align 1 dereferenceable(1) %32, i1 noundef zeroext true, i32 noundef 0) #10
  %65 = load i32, ptr %55, align 16, !tbaa !42
  %66 = sext i32 %65 to i64
  %67 = call noundef nonnull align 16 dereferenceable(256) ptr @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties14CollidingShapeENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %33, i64 noundef %66)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #10
  %68 = call { double, double } @_ZNK3JPH5Plane9GetNormalEv(ptr noundef nonnull align 16 dereferenceable(16) %59)
  %69 = extractvalue { double, double } %68, 0
  store double %69, ptr %5, align 16
  %70 = extractvalue { double, double } %68, 1
  store double %70, ptr %34, align 8
  %71 = call { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16) %5, float noundef %61)
  %72 = extractvalue { double, double } %71, 0
  %73 = extractvalue { double, double } %71, 1
  %74 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16) %48, double %72, double %73)
  %75 = getelementptr inbounds i8, ptr %67, i64 92
  %76 = load i8, ptr %75, align 4, !tbaa !44
  %77 = icmp eq i8 %76, 2
  br i1 %77, label %78, label %172

78:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #10
  %79 = call { double, double } @_ZNK3JPH5Mat4414GetTranslationEv(ptr noundef nonnull align 16 dereferenceable(64) %67)
  %80 = extractvalue { double, double } %79, 0
  %81 = extractvalue { double, double } %79, 1
  %82 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %48, double %80, double %81)
  %83 = extractvalue { double, double } %82, 0
  store double %83, ptr %6, align 16
  %84 = extractvalue { double, double } %82, 1
  store double %84, ptr %36, align 8
  %85 = call { double, double } @_ZNK3JPH24SoftBodyMotionProperties14CollidingShape16GetPointVelocityENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(256) %67, double %83, double %84)
  %86 = extractvalue { double, double } %85, 0
  %87 = extractvalue { double, double } %85, 1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #10
  %88 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %47, double %86, double %87)
  %89 = extractvalue { double, double } %88, 0
  store double %89, ptr %7, align 16
  %90 = extractvalue { double, double } %88, 1
  store double %90, ptr %37, align 8
  %91 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %5, double %89, double %90)
  %92 = call { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16) %5, float noundef %91)
  %93 = extractvalue { double, double } %92, 0
  %94 = extractvalue { double, double } %92, 1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #10
  %95 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %7, double %93, double %94)
  %96 = extractvalue { double, double } %95, 0
  store double %96, ptr %8, align 16
  %97 = extractvalue { double, double } %95, 1
  store double %97, ptr %38, align 8
  %98 = call noundef float @_ZNK3JPH4Vec36LengthEv(ptr noundef nonnull align 16 dereferenceable(16) %8)
  %99 = getelementptr inbounds i8, ptr %67, i64 108
  %100 = load float, ptr %99, align 4, !tbaa !49
  %101 = load float, ptr %43, align 4, !tbaa !35
  %102 = fmul float %100, %101
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #10
  %.sroa.049.0.copyload = load double, ptr %5, align 16
  %.sroa.250.0.copyload = load double, ptr %34, align 8, !tbaa !41
  %103 = call { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %6, double %.sroa.049.0.copyload, double %.sroa.250.0.copyload)
  %104 = extractvalue { double, double } %103, 0
  store double %104, ptr %9, align 16
  %105 = extractvalue { double, double } %103, 1
  store double %105, ptr %39, align 8
  %106 = getelementptr inbounds i8, ptr %67, i64 96
  %107 = load float, ptr %106, align 16, !tbaa !50
  %108 = getelementptr inbounds i8, ptr %67, i64 128
  %109 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %108, double %104, double %105)
  %110 = extractvalue { double, double } %109, 0
  %111 = extractvalue { double, double } %109, 1
  %112 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %9, double %110, double %111)
  %113 = fadd float %107, %112
  %114 = fadd float %102, %113
  %115 = fcmp ogt float %114, 0.000000e+00
  br i1 %115, label %116, label %171

116:                                              ; preds = %78
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #10
  %117 = fcmp ogt float %98, 0.000000e+00
  br i1 %117, label %118, label %129

118:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #10
  %119 = getelementptr inbounds i8, ptr %67, i64 100
  %120 = load float, ptr %119, align 4, !tbaa !51
  %121 = fmul float %61, %120
  %122 = fmul float %19, %98
  %123 = fdiv float %121, %122
  store float %123, ptr %11, align 4, !tbaa !52
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #10
  store float 1.000000e+00, ptr %12, align 4, !tbaa !52
  %124 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %125 = load float, ptr %124, align 4, !tbaa !52
  %126 = call { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16) %8, float noundef %125)
  %127 = extractvalue { double, double } %126, 0
  %128 = extractvalue { double, double } %126, 1
  store double %127, ptr %10, align 16
  store double %128, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !41
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #10
  br label %133

129:                                              ; preds = %116
  %130 = call { double, double } @_ZN3JPH4Vec35sZeroEv()
  %131 = extractvalue { double, double } %130, 0
  %132 = extractvalue { double, double } %130, 1
  store double %131, ptr %10, align 16
  store double %132, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !41
  br label %133

133:                                              ; preds = %129, %118
  %134 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16) %10, double %93, double %94)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #10
  %135 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %3, double %86, double %87)
  %136 = extractvalue { double, double } %135, 0
  store double %136, ptr %13, align 16
  %137 = extractvalue { double, double } %135, 1
  store double %137, ptr %40, align 8
  %.sroa.031.0.copyload = load double, ptr %5, align 16
  %.sroa.232.0.copyload = load double, ptr %34, align 8, !tbaa !41
  %138 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %13, double %.sroa.031.0.copyload, double %.sroa.232.0.copyload)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #10
  %139 = fcmp olt float %138, %23
  br i1 %139, label %140, label %148

140:                                              ; preds = %133
  %141 = getelementptr inbounds i8, ptr %67, i64 104
  %142 = load float, ptr %141, align 8, !tbaa !53
  %143 = fmul float %138, %142
  %.sroa.027.0.copyload = load double, ptr %5, align 16
  %.sroa.228.0.copyload = load double, ptr %34, align 8, !tbaa !41
  %144 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %143, double %.sroa.027.0.copyload, double %.sroa.228.0.copyload)
  %145 = extractvalue { double, double } %144, 0
  %146 = extractvalue { double, double } %144, 1
  %147 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16) %10, double %145, double %146)
  br label %148

148:                                              ; preds = %140, %133
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #10
  %149 = call { double, double } @_ZNK3JPH4Vec3dvEf(ptr noundef nonnull align 16 dereferenceable(16) %10, float noundef %114)
  %150 = extractvalue { double, double } %149, 0
  store double %150, ptr %14, align 16
  %151 = extractvalue { double, double } %149, 1
  store double %151, ptr %41, align 8
  %152 = call { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16) %14, float noundef %102)
  %153 = extractvalue { double, double } %152, 0
  %154 = extractvalue { double, double } %152, 1
  %155 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3mIES0_(ptr noundef nonnull align 16 dereferenceable(16) %47, double %153, double %154)
  %156 = load float, ptr %106, align 16, !tbaa !50
  %157 = call { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16) %14, float noundef %156)
  %158 = extractvalue { double, double } %157, 0
  %159 = extractvalue { double, double } %157, 1
  %160 = getelementptr inbounds i8, ptr %67, i64 192
  %161 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16) %160, double %158, double %159)
  %.sroa.017.0.copyload = load double, ptr %14, align 16
  %.sroa.218.0.copyload = load double, ptr %41, align 8, !tbaa !41
  %162 = call { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %6, double %.sroa.017.0.copyload, double %.sroa.218.0.copyload)
  %163 = extractvalue { double, double } %162, 0
  %164 = extractvalue { double, double } %162, 1
  %165 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %108, double %163, double %164)
  %166 = extractvalue { double, double } %165, 0
  %167 = extractvalue { double, double } %165, 1
  %168 = getelementptr inbounds i8, ptr %67, i64 208
  %169 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16) %168, double %166, double %167)
  %170 = getelementptr inbounds i8, ptr %67, i64 112
  store i8 1, ptr %170, align 16, !tbaa !54
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #10
  br label %171

171:                                              ; preds = %148, %78
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #10
  br label %211

172:                                              ; preds = %63
  %173 = getelementptr inbounds i8, ptr %67, i64 108
  %174 = load float, ptr %173, align 4, !tbaa !49
  %175 = fcmp ogt float %174, 0.000000e+00
  br i1 %175, label %176, label %211

176:                                              ; preds = %172
  %.sroa.014.0.copyload = load double, ptr %47, align 16
  %.sroa.215.0.copyload = load double, ptr %.sroa.496.0..sroa_idx, align 8, !tbaa !41
  %177 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %5, double %.sroa.014.0.copyload, double %.sroa.215.0.copyload)
  %178 = call { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16) %5, float noundef %177)
  %179 = extractvalue { double, double } %178, 0
  %180 = extractvalue { double, double } %178, 1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #10
  %181 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %47, double %179, double %180)
  %182 = extractvalue { double, double } %181, 0
  store double %182, ptr %15, align 16
  %183 = extractvalue { double, double } %181, 1
  store double %183, ptr %35, align 8
  %184 = call noundef float @_ZNK3JPH4Vec36LengthEv(ptr noundef nonnull align 16 dereferenceable(16) %15)
  %185 = fcmp ogt float %184, 0.000000e+00
  br i1 %185, label %186, label %198

186:                                              ; preds = %176
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #10
  %187 = getelementptr inbounds i8, ptr %67, i64 100
  %188 = load float, ptr %187, align 4, !tbaa !51
  %189 = fmul float %61, %188
  %190 = fmul float %19, %184
  %191 = fdiv float %189, %190
  store float %191, ptr %16, align 4, !tbaa !52
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #10
  store float 1.000000e+00, ptr %17, align 4, !tbaa !52
  %192 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %17)
  %193 = load float, ptr %192, align 4, !tbaa !52
  %194 = call { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16) %15, float noundef %193)
  %195 = extractvalue { double, double } %194, 0
  %196 = extractvalue { double, double } %194, 1
  %197 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3mIES0_(ptr noundef nonnull align 16 dereferenceable(16) %47, double %195, double %196)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #10
  br label %198

198:                                              ; preds = %186, %176
  %199 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3mIES0_(ptr noundef nonnull align 16 dereferenceable(16) %47, double %179, double %180)
  %.sroa.03.0.copyload = load double, ptr %5, align 16
  %.sroa.24.0.copyload = load double, ptr %34, align 8, !tbaa !41
  %200 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %3, double %.sroa.03.0.copyload, double %.sroa.24.0.copyload)
  %201 = fcmp olt float %200, %23
  br i1 %201, label %202, label %210

202:                                              ; preds = %198
  %203 = getelementptr inbounds i8, ptr %67, i64 104
  %204 = load float, ptr %203, align 8, !tbaa !53
  %205 = fmul float %200, %204
  %.sroa.0.0.copyload = load double, ptr %5, align 16
  %.sroa.2.0.copyload = load double, ptr %34, align 8, !tbaa !41
  %206 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %205, double %.sroa.0.0.copyload, double %.sroa.2.0.copyload)
  %207 = extractvalue { double, double } %206, 0
  %208 = extractvalue { double, double } %206, 1
  %209 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3mIES0_(ptr noundef nonnull align 16 dereferenceable(16) %47, double %207, double %208)
  br label %210

210:                                              ; preds = %202, %198
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #10
  br label %211

211:                                              ; preds = %172, %210, %171
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #10
  br label %212

212:                                              ; preds = %58, %211, %46
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #10
  br label %213

213:                                              ; preds = %212, %42
  %214 = getelementptr inbounds i8, ptr %.0141, i64 80
  %.not = icmp eq ptr %214, %30
  br i1 %.not, label %._crit_edge, label %42
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(256) ptr @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties14CollidingShapeENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #9 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH24SoftBodyMotionProperties14CollidingShape16GetPointVelocityENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(256), double, double) local_unnamed_addr #8 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 #1

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="128" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 = { 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 #9 = { 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 #10 = { 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, !12, i64 132}
!6 = !{!"_ZTSN3JPH21SoftBodyUpdateContextE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !11, i64 96, !11, i64 112, !12, i64 128, !12, i64 132, !13, i64 136, !15, i64 140, !15, i64 144, !15, i64 148, !15, i64 152, !15, i64 156, !15, i64 160, !15, i64 164, !11, i64 176, !18, i64 192}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN3JPH5Mat44E", !8, i64 0}
!11 = !{!"_ZTSN3JPH4Vec3E", !8, i64 0}
!12 = !{!"float", !8, i64 0}
!13 = !{!"_ZTSSt6atomicIN3JPH21SoftBodyUpdateContext6EStateEE", !14, i64 0}
!14 = !{!"_ZTSN3JPH21SoftBodyUpdateContext6EStateE", !8, i64 0}
!15 = !{!"_ZTSSt6atomicIjE", !16, i64 0}
!16 = !{!"_ZTSSt13__atomic_baseIjE", !17, i64 0}
!17 = !{!"int", !8, i64 0}
!18 = !{!"_ZTSN3JPH9ECanSleepE", !8, i64 0}
!19 = !{!20, !12, i64 224}
!20 = !{!"_ZTSN3JPH22SoftBodySharedSettingsE", !21, i64 0, !22, i64 8, !24, i64 32, !25, i64 56, !26, i64 80, !27, i64 104, !28, i64 128, !29, i64 152, !30, i64 176, !31, i64 200, !12, i64 224, !32, i64 232, !33, i64 256, !34, i64 280}
!21 = !{!"_ZTSN3JPH9RefTargetINS_22SoftBodySharedSettingsEEE", !15, i64 0}
!22 = !{!"_ZTSN3JPH5ArrayINS_22SoftBodySharedSettings6VertexENS_12STLAllocatorIS2_EEEE", !23, i64 0, !23, i64 8, !7, i64 16}
!23 = !{!"long", !8, i64 0}
!24 = !{!"_ZTSN3JPH5ArrayINS_22SoftBodySharedSettings4FaceENS_12STLAllocatorIS2_EEEE", !23, i64 0, !23, i64 8, !7, i64 16}
!25 = !{!"_ZTSN3JPH5ArrayINS_22SoftBodySharedSettings4EdgeENS_12STLAllocatorIS2_EEEE", !23, i64 0, !23, i64 8, !7, i64 16}
!26 = !{!"_ZTSN3JPH5ArrayINS_22SoftBodySharedSettings12DihedralBendENS_12STLAllocatorIS2_EEEE", !23, i64 0, !23, i64 8, !7, i64 16}
!27 = !{!"_ZTSN3JPH5ArrayINS_22SoftBodySharedSettings6VolumeENS_12STLAllocatorIS2_EEEE", !23, i64 0, !23, i64 8, !7, i64 16}
!28 = !{!"_ZTSN3JPH5ArrayINS_22SoftBodySharedSettings7SkinnedENS_12STLAllocatorIS2_EEEE", !23, i64 0, !23, i64 8, !7, i64 16}
!29 = !{!"_ZTSN3JPH5ArrayINS_22SoftBodySharedSettings7InvBindENS_12STLAllocatorIS2_EEEE", !23, i64 0, !23, i64 8, !7, i64 16}
!30 = !{!"_ZTSN3JPH5ArrayINS_22SoftBodySharedSettings3LRAENS_12STLAllocatorIS2_EEEE", !23, i64 0, !23, i64 8, !7, i64 16}
!31 = !{!"_ZTSN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEEE", !23, i64 0, !23, i64 8, !7, i64 16}
!32 = !{!"_ZTSN3JPH5ArrayINS_22SoftBodySharedSettings16ClosestKinematicENS_12STLAllocatorIS2_EEEE", !23, i64 0, !23, i64 8, !7, i64 16}
!33 = !{!"_ZTSN3JPH5ArrayINS_22SoftBodySharedSettings11UpdateGroupENS_12STLAllocatorIS2_EEEE", !23, i64 0, !23, i64 8, !7, i64 16}
!34 = !{!"_ZTSN3JPH5ArrayIjNS_12STLAllocatorIjEEEE", !23, i64 0, !23, i64 8, !7, i64 16}
!35 = !{!36, !12, i64 76}
!36 = !{!"_ZTSN3JPH14SoftBodyVertexE", !11, i64 0, !11, i64 16, !11, i64 32, !37, i64 48, !17, i64 64, !39, i64 68, !12, i64 72, !12, i64 76}
!37 = !{!"_ZTSN3JPH5PlaneE", !38, i64 0}
!38 = !{!"_ZTSN3JPH4Vec4E", !8, i64 0}
!39 = !{!"bool", !8, i64 0}
!40 = !{i64 0, i64 16, !41}
!41 = !{!8, !8, i64 0}
!42 = !{!36, !17, i64 64}
!43 = !{!36, !39, i64 68}
!44 = !{!45, !48, i64 92}
!45 = !{!"_ZTSN3JPH24SoftBodyMotionProperties14CollidingShapeE", !10, i64 0, !46, i64 64, !47, i64 88, !48, i64 92, !12, i64 96, !12, i64 100, !12, i64 104, !12, i64 108, !39, i64 112, !10, i64 128, !11, i64 192, !11, i64 208, !11, i64 224, !11, i64 240}
!46 = !{!"_ZTSN3JPH5ArrayINS_24SoftBodyMotionProperties9LeafShapeENS_12STLAllocatorIS2_EEEE", !23, i64 0, !23, i64 8, !7, i64 16}
!47 = !{!"_ZTSN3JPH6BodyIDE", !17, i64 0}
!48 = !{!"_ZTSN3JPH11EMotionTypeE", !8, i64 0}
!49 = !{!45, !12, i64 108}
!50 = !{!45, !12, i64 96}
!51 = !{!45, !12, i64 100}
!52 = !{!12, !12, i64 0}
!53 = !{!45, !12, i64 104}
!54 = !{!45, !39, i64 112}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass