; 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::SoftBodyManifold" = type { ptr, ptr, ptr }
%"class.JPH::Vec3" = type { %union.anon.0 }
%union.anon.0 = type { <4 x float> }
%"class.JPH::AABox" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"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::Vec4" = type { %union.anon }
%union.anon = type { <4 x float> }
%"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 }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i8 }
%"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"] }
%"struct.std::atomic.49" = type { i32 }
%"struct.std::atomic.11" = type { %"struct.std::__atomic_base.12" }
%"struct.std::__atomic_base.12" = type { i32 }
%"struct.JPH::SoftBodyMotionProperties::CollidingSensor" = type <{ %"class.JPH::Mat44", %"class.JPH::Array.69", %"class.JPH::BodyID", i8, [3 x i8] }>
%"class.JPH::Array.69" = type { i64, i64, ptr }
%"class.JPH::BodyID" = type { i32 }
%"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::SkinState" = type { %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"struct.JPH::PhysicsSettings" = type <{ i32, i32, i32, float, float, float, float, float, float, float, float, float, float, float, i32, i32, float, float, float, i8, i8, i8, i8, i8, i8, i8, i8 }>

; 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 nounwind uwtable
declare dso_local noundef float @_ZN3JPH6SquareIfEET_S1_(float noundef) #3

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH14SoftBodyVertex14ResetCollisionEv(ptr noundef nonnull align 16 dereferenceable(80)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH5AABox11EncapsulateENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(32), double, double) #5 align 2

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4sqrtf(float noundef) #1

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

; 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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH24SoftBodyMotionProperties19UpdateSoftBodyStateERNS_21SoftBodyUpdateContextERKNS_15PhysicsSettingsE(ptr noundef nonnull align 16 dereferenceable(372) %0, ptr noundef nonnull align 16 dereferenceable(196) %1, ptr noundef nonnull align 4 dereferenceable(83) %2) #5 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.JPH::SoftBodyManifold", align 8
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca %"class.JPH::Vec3", align 16
  %13 = alloca %"class.JPH::Vec3", align 16
  %14 = alloca %"class.JPH::AABox", align 16
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca float, align 4
  %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 float, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca %"class.JPH::Vec3", align 16
  %32 = alloca %"class.JPH::Vec3", align 16
  %33 = alloca %"class.JPH::Vec3", align 16
  %34 = alloca %"class.JPH::Vec3", align 16
  %35 = alloca %"class.JPH::Vec3", align 16
  %36 = alloca %"class.JPH::Vec3", align 16
  %37 = alloca %"class.JPH::Vec3", align 16
  %38 = alloca ptr, align 8
  %39 = alloca ptr, align 8
  %40 = alloca ptr, align 8
  %41 = alloca ptr, align 8
  %42 = alloca %"class.JPH::Vec3", align 16
  %43 = alloca ptr, align 8
  %44 = alloca ptr, align 8
  %45 = alloca ptr, align 8
  %46 = alloca ptr, align 8
  %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
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %51 = load ptr, ptr %4, align 8
  %52 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %51, i32 0, i32 14
  %53 = call noundef zeroext i1 @_ZNKSt6atomicIbE4loadESt12memory_order(ptr noundef nonnull align 1 dereferenceable(1) %52, i32 noundef 0) #10
  br i1 %53, label %54, label %99

54:                                               ; preds = %3
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = getelementptr inbounds %"class.JPH::SoftBodyUpdateContext", ptr %55, i32 0, i32 2
  %57 = load ptr, ptr %56, align 16, !tbaa !9
  %58 = icmp ne ptr %57, null
  br i1 %58, label %59, label %99

59:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #10
  %60 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %51, i32 0, i32 5
  %61 = call noundef i64 @_ZNK3JPH5ArrayINS_24SoftBodyMotionProperties15CollidingSensorENS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %60)
  %62 = trunc i64 %61 to i32
  %63 = sub nsw i32 %62, 1
  store i32 %63, ptr %7, align 4, !tbaa !20
  br label %64

64:                                               ; preds = %86, %59
  %65 = load i32, ptr %7, align 4, !tbaa !20
  %66 = icmp sge i32 %65, 0
  br i1 %66, label %68, label %67

67:                                               ; preds = %64
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #10
  br label %89

68:                                               ; preds = %64
  %69 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %51, i32 0, i32 5
  %70 = load i32, ptr %7, align 4, !tbaa !20
  %71 = sext i32 %70 to i64
  %72 = call noundef nonnull align 16 dereferenceable(93) ptr @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties15CollidingSensorENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %69, i64 noundef %71)
  %73 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::CollidingSensor", ptr %72, i32 0, i32 3
  %74 = load i8, ptr %73, align 4, !tbaa !21, !range !27, !noundef !28
  %75 = trunc i8 %74 to i1
  br i1 %75, label %85, label %76

76:                                               ; preds = %68
  %77 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %51, i32 0, i32 5
  %78 = call noundef nonnull align 16 dereferenceable(93) ptr @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties15CollidingSensorENS_12STLAllocatorIS2_EEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %77)
  %79 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %51, i32 0, i32 5
  %80 = load i32, ptr %7, align 4, !tbaa !20
  %81 = sext i32 %80 to i64
  %82 = call noundef nonnull align 16 dereferenceable(93) ptr @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties15CollidingSensorENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %79, i64 noundef %81)
  %83 = call noundef nonnull align 16 dereferenceable(93) ptr @_ZN3JPH24SoftBodyMotionProperties15CollidingSensoraSEOS1_(ptr noundef nonnull align 16 dereferenceable(93) %82, ptr noundef nonnull align 16 dereferenceable(93) %78) #10
  %84 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %51, i32 0, i32 5
  call void @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties15CollidingSensorENS_12STLAllocatorIS2_EEE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(24) %84)
  br label %85

85:                                               ; preds = %76, %68
  br label %86

86:                                               ; preds = %85
  %87 = load i32, ptr %7, align 4, !tbaa !20
  %88 = add nsw i32 %87, -1
  store i32 %88, ptr %7, align 4, !tbaa !20
  br label %64, !llvm.loop !29

89:                                               ; preds = %67
  %90 = load ptr, ptr %5, align 8, !tbaa !5
  %91 = getelementptr inbounds %"class.JPH::SoftBodyUpdateContext", ptr %90, i32 0, i32 2
  %92 = load ptr, ptr %91, align 16, !tbaa !9
  %93 = load ptr, ptr %5, align 8, !tbaa !5
  %94 = getelementptr inbounds %"class.JPH::SoftBodyUpdateContext", ptr %93, i32 0, i32 0
  %95 = load ptr, ptr %94, align 16, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #10
  call void @_ZN3JPH16SoftBodyManifoldC2EPKNS_24SoftBodyMotionPropertiesE(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef %51)
  %96 = load ptr, ptr %92, align 8, !tbaa !32
  %97 = getelementptr inbounds ptr, ptr %96, i64 3
  %98 = load ptr, ptr %97, align 8
  call void %98(ptr noundef nonnull align 8 dereferenceable(8) %92, ptr noundef nonnull align 16 dereferenceable(122) %95, ptr noundef nonnull align 8 dereferenceable(24) %8)
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #10
  br label %99

99:                                               ; preds = %89, %54, %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #10
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = getelementptr inbounds %"class.JPH::SoftBodyUpdateContext", ptr %100, i32 0, i32 7
  %102 = load float, ptr %101, align 16, !tbaa !34
  store float %102, ptr %9, align 4, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #10
  %103 = call noundef float @_ZNK3JPH16MotionProperties20GetMaxLinearVelocityEv(ptr noundef nonnull align 16 dereferenceable(182) %51)
  %104 = call noundef float @_ZN3JPH6SquareIfEET_S1_(float noundef %103)
  store float %104, ptr %10, align 4, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #10
  store float 0.000000e+00, ptr %11, align 4, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #10
  %105 = call { double, double } @_ZN3JPH4Vec35sZeroEv()
  %106 = getelementptr inbounds %"class.JPH::Vec3", ptr %12, i32 0, i32 0
  %107 = getelementptr inbounds %union.anon.0, ptr %106, i32 0, i32 0
  %108 = getelementptr inbounds { double, double }, ptr %107, i32 0, i32 0
  %109 = extractvalue { double, double } %105, 0
  store double %109, ptr %108, align 16
  %110 = getelementptr inbounds { double, double }, ptr %107, i32 0, i32 1
  %111 = extractvalue { double, double } %105, 1
  store double %111, ptr %110, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #10
  %112 = call { double, double } @_ZN3JPH4Vec35sZeroEv()
  %113 = getelementptr inbounds %"class.JPH::Vec3", ptr %13, i32 0, i32 0
  %114 = getelementptr inbounds %union.anon.0, ptr %113, i32 0, i32 0
  %115 = getelementptr inbounds { double, double }, ptr %114, i32 0, i32 0
  %116 = extractvalue { double, double } %112, 0
  store double %116, ptr %115, align 16
  %117 = getelementptr inbounds { double, double }, ptr %114, i32 0, i32 1
  %118 = extractvalue { double, double } %112, 1
  store double %118, ptr %117, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #10
  call void @_ZN3JPH5AABoxC2Ev(ptr noundef nonnull align 16 dereferenceable(32) %14)
  %119 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %51, i32 0, i32 7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %119, ptr align 16 %14, i64 32, i1 false), !tbaa.struct !36
  %120 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %51, i32 0, i32 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %120, ptr align 16 %119, i64 32, i1 false), !tbaa.struct !36
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #10
  %121 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %51, i32 0, i32 3
  store ptr %121, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #10
  %122 = load ptr, ptr %15, align 8, !tbaa !5
  %123 = call noundef ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %122)
  store ptr %123, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #10
  %124 = load ptr, ptr %15, align 8, !tbaa !5
  %125 = call noundef ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %124)
  store ptr %125, ptr %17, align 8, !tbaa !5
  br label %126

126:                                              ; preds = %226, %99
  %127 = load ptr, ptr %16, align 8, !tbaa !5
  %128 = load ptr, ptr %17, align 8, !tbaa !5
  %129 = icmp ne ptr %127, %128
  br i1 %129, label %131, label %130

130:                                              ; preds = %126
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #10
  br label %229

131:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #10
  %132 = load ptr, ptr %16, align 8, !tbaa !5
  store ptr %132, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #10
  %133 = load ptr, ptr %18, align 8, !tbaa !5
  %134 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %133, i32 0, i32 2
  %135 = call noundef float @_ZNK3JPH4Vec38LengthSqEv(ptr noundef nonnull align 16 dereferenceable(16) %134)
  store float %135, ptr %19, align 4, !tbaa !35
  %136 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %19)
  %137 = load float, ptr %136, align 4, !tbaa !35
  store float %137, ptr %11, align 4, !tbaa !35
  %138 = load float, ptr %19, align 4, !tbaa !35
  %139 = load float, ptr %10, align 4, !tbaa !35
  %140 = fcmp ogt float %138, %139
  br i1 %140, label %141, label %149

141:                                              ; preds = %131
  %142 = load float, ptr %10, align 4, !tbaa !35
  %143 = load float, ptr %19, align 4, !tbaa !35
  %144 = fdiv float %142, %143
  %145 = call noundef float @_ZSt4sqrtf(float noundef %144)
  %146 = load ptr, ptr %18, align 8, !tbaa !5
  %147 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %146, i32 0, i32 2
  %148 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3mLEf(ptr noundef nonnull align 16 dereferenceable(16) %147, float noundef %145)
  br label %149

149:                                              ; preds = %141, %131
  %150 = load ptr, ptr %18, align 8, !tbaa !5
  %151 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %150, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %20, ptr align 16 %151, i64 16, i1 false), !tbaa.struct !38
  %152 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 0
  %153 = load double, ptr %152, align 16
  %154 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 1
  %155 = load double, ptr %154, align 8
  %156 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16) %12, double %153, double %155)
  %157 = load ptr, ptr %18, align 8, !tbaa !5
  %158 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %157, i32 0, i32 1
  %159 = load ptr, ptr %18, align 8, !tbaa !5
  %160 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %159, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %22, ptr align 16 %160, i64 16, i1 false), !tbaa.struct !38
  %161 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 0
  %162 = load double, ptr %161, align 16
  %163 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 1
  %164 = load double, ptr %163, align 8
  %165 = call { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %158, double %162, double %164)
  %166 = getelementptr inbounds %"class.JPH::Vec3", ptr %21, i32 0, i32 0
  %167 = getelementptr inbounds %union.anon.0, ptr %166, i32 0, i32 0
  %168 = getelementptr inbounds { double, double }, ptr %167, i32 0, i32 0
  %169 = extractvalue { double, double } %165, 0
  store double %169, ptr %168, align 16
  %170 = getelementptr inbounds { double, double }, ptr %167, i32 0, i32 1
  %171 = extractvalue { double, double } %165, 1
  store double %171, ptr %170, align 8
  %172 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %173 = load double, ptr %172, align 16
  %174 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  %175 = load double, ptr %174, align 8
  %176 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16) %13, double %173, double %175)
  %177 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %51, i32 0, i32 7
  %178 = load ptr, ptr %18, align 8, !tbaa !5
  %179 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %178, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %23, ptr align 16 %179, i64 16, i1 false), !tbaa.struct !38
  %180 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 0
  %181 = load double, ptr %180, align 16
  %182 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 1
  %183 = load double, ptr %182, align 8
  call void @_ZN3JPH5AABox11EncapsulateENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(32) %177, double %181, double %183)
  %184 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %51, i32 0, i32 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #10
  %185 = load ptr, ptr %18, align 8, !tbaa !5
  %186 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %185, i32 0, i32 1
  %187 = load ptr, ptr %18, align 8, !tbaa !5
  %188 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %187, i32 0, i32 2
  %189 = load float, ptr %9, align 4, !tbaa !35
  %190 = call { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16) %188, float noundef %189)
  %191 = getelementptr inbounds %"class.JPH::Vec3", ptr %26, 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 %26, i32 0, i32 0
  %198 = load double, ptr %197, align 16
  %199 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 1
  %200 = load double, ptr %199, align 8
  %201 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %186, double %198, double %200)
  %202 = getelementptr inbounds %"class.JPH::Vec3", ptr %25, 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
  %208 = load ptr, ptr %5, align 8, !tbaa !5
  %209 = getelementptr inbounds %"class.JPH::SoftBodyUpdateContext", ptr %208, i32 0, i32 6
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %27, ptr align 16 %209, i64 16, i1 false), !tbaa.struct !38
  %210 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 0
  %211 = load double, ptr %210, align 16
  %212 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 1
  %213 = load double, ptr %212, align 8
  %214 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %25, double %211, double %213)
  %215 = getelementptr inbounds %"class.JPH::Vec3", ptr %24, i32 0, i32 0
  %216 = getelementptr inbounds %union.anon.0, ptr %215, i32 0, i32 0
  %217 = getelementptr inbounds { double, double }, ptr %216, i32 0, i32 0
  %218 = extractvalue { double, double } %214, 0
  store double %218, ptr %217, align 16
  %219 = getelementptr inbounds { double, double }, ptr %216, i32 0, i32 1
  %220 = extractvalue { double, double } %214, 1
  store double %220, ptr %219, align 8
  %221 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 0
  %222 = load double, ptr %221, align 16
  %223 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 1
  %224 = load double, ptr %223, align 8
  call void @_ZN3JPH5AABox11EncapsulateENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(32) %184, double %222, double %224)
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #10
  %225 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN3JPH14SoftBodyVertex14ResetCollisionEv(ptr noundef nonnull align 16 dereferenceable(80) %225)
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #10
  br label %226

226:                                              ; preds = %149
  %227 = load ptr, ptr %16, align 8, !tbaa !5
  %228 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %227, i32 1
  store ptr %228, ptr %16, align 8, !tbaa !5
  br label %126

229:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #10
  %230 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %51, i32 0, i32 3
  %231 = call noundef i64 @_ZNK3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %230)
  %232 = trunc i64 %231 to i32
  store i32 %232, ptr %29, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #10
  store i32 1, ptr %30, align 4, !tbaa !20
  %233 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %29, ptr noundef nonnull align 4 dereferenceable(4) %30)
  %234 = load i32, ptr %233, align 4, !tbaa !20
  %235 = sitofp i32 %234 to float
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #10
  store float %235, ptr %28, align 4, !tbaa !35
  %236 = load ptr, ptr %5, align 8, !tbaa !5
  %237 = getelementptr inbounds %"class.JPH::SoftBodyUpdateContext", ptr %236, i32 0, i32 4
  %238 = load float, ptr %28, align 4, !tbaa !35
  %239 = call { double, double } @_ZNK3JPH4Vec3dvEf(ptr noundef nonnull align 16 dereferenceable(16) %12, float noundef %238)
  %240 = getelementptr inbounds %"class.JPH::Vec3", ptr %32, i32 0, i32 0
  %241 = getelementptr inbounds %union.anon.0, ptr %240, i32 0, i32 0
  %242 = getelementptr inbounds { double, double }, ptr %241, i32 0, i32 0
  %243 = extractvalue { double, double } %239, 0
  store double %243, ptr %242, align 16
  %244 = getelementptr inbounds { double, double }, ptr %241, i32 0, i32 1
  %245 = extractvalue { double, double } %239, 1
  store double %245, ptr %244, align 8
  %246 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 0
  %247 = load double, ptr %246, align 16
  %248 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 1
  %249 = load double, ptr %248, align 8
  %250 = call { double, double } @_ZNK3JPH5Mat4411Multiply3x3ENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %237, double %247, double %249)
  %251 = getelementptr inbounds %"class.JPH::Vec3", ptr %31, i32 0, i32 0
  %252 = getelementptr inbounds %union.anon.0, ptr %251, i32 0, i32 0
  %253 = getelementptr inbounds { double, double }, ptr %252, i32 0, i32 0
  %254 = extractvalue { double, double } %250, 0
  store double %254, ptr %253, align 16
  %255 = getelementptr inbounds { double, double }, ptr %252, i32 0, i32 1
  %256 = extractvalue { double, double } %250, 1
  store double %256, ptr %255, align 8
  %257 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 0
  %258 = load double, ptr %257, align 16
  %259 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 1
  %260 = load double, ptr %259, align 8
  call void @_ZN3JPH16MotionProperties24SetLinearVelocityClampedENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(182) %51, double %258, double %260)
  %261 = load ptr, ptr %5, align 8, !tbaa !5
  %262 = getelementptr inbounds %"class.JPH::SoftBodyUpdateContext", ptr %261, i32 0, i32 4
  %263 = load float, ptr %28, align 4, !tbaa !35
  %264 = call { double, double } @_ZNK3JPH4Vec3dvEf(ptr noundef nonnull align 16 dereferenceable(16) %13, float noundef %263)
  %265 = getelementptr inbounds %"class.JPH::Vec3", ptr %34, i32 0, i32 0
  %266 = getelementptr inbounds %union.anon.0, ptr %265, i32 0, i32 0
  %267 = getelementptr inbounds { double, double }, ptr %266, i32 0, i32 0
  %268 = extractvalue { double, double } %264, 0
  store double %268, ptr %267, align 16
  %269 = getelementptr inbounds { double, double }, ptr %266, i32 0, i32 1
  %270 = extractvalue { double, double } %264, 1
  store double %270, ptr %269, align 8
  %271 = getelementptr inbounds { double, double }, ptr %34, i32 0, i32 0
  %272 = load double, ptr %271, align 16
  %273 = getelementptr inbounds { double, double }, ptr %34, i32 0, i32 1
  %274 = load double, ptr %273, align 8
  %275 = call { double, double } @_ZNK3JPH5Mat4411Multiply3x3ENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %262, double %272, double %274)
  %276 = getelementptr inbounds %"class.JPH::Vec3", ptr %33, i32 0, i32 0
  %277 = getelementptr inbounds %union.anon.0, ptr %276, i32 0, i32 0
  %278 = getelementptr inbounds { double, double }, ptr %277, i32 0, i32 0
  %279 = extractvalue { double, double } %275, 0
  store double %279, ptr %278, align 16
  %280 = getelementptr inbounds { double, double }, ptr %277, i32 0, i32 1
  %281 = extractvalue { double, double } %275, 1
  store double %281, ptr %280, align 8
  %282 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 0
  %283 = load double, ptr %282, align 16
  %284 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 1
  %285 = load double, ptr %284, align 8
  call void @_ZN3JPH16MotionProperties18SetAngularVelocityENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(182) %51, double %283, double %285)
  %286 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %51, i32 0, i32 13
  %287 = load i8, ptr %286, align 16, !tbaa !39, !range !27, !noundef !28
  %288 = trunc i8 %287 to i1
  br i1 %288, label %289, label %383

289:                                              ; preds = %229
  call void @llvm.lifetime.start.p0(i64 16, ptr %35) #10
  %290 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %51, i32 0, i32 7
  %291 = call { double, double } @_ZNK3JPH5AABox9GetCenterEv(ptr noundef nonnull align 16 dereferenceable(32) %290)
  %292 = getelementptr inbounds %"class.JPH::Vec3", ptr %35, i32 0, i32 0
  %293 = getelementptr inbounds %union.anon.0, ptr %292, i32 0, i32 0
  %294 = getelementptr inbounds { double, double }, ptr %293, i32 0, i32 0
  %295 = extractvalue { double, double } %291, 0
  store double %295, ptr %294, align 16
  %296 = getelementptr inbounds { double, double }, ptr %293, i32 0, i32 1
  %297 = extractvalue { double, double } %291, 1
  store double %297, ptr %296, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %36) #10
  %298 = load ptr, ptr %5, align 8, !tbaa !5
  %299 = getelementptr inbounds %"class.JPH::SoftBodyUpdateContext", ptr %298, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %37, ptr align 16 %35, i64 16, i1 false), !tbaa.struct !38
  %300 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 0
  %301 = load double, ptr %300, align 16
  %302 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 1
  %303 = load double, ptr %302, align 8
  %304 = call { double, double } @_ZNK3JPH5Mat4411Multiply3x3ENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %299, double %301, double %303)
  %305 = getelementptr inbounds %"class.JPH::Vec3", ptr %36, i32 0, i32 0
  %306 = getelementptr inbounds %union.anon.0, ptr %305, i32 0, i32 0
  %307 = getelementptr inbounds { double, double }, ptr %306, i32 0, i32 0
  %308 = extractvalue { double, double } %304, 0
  store double %308, ptr %307, align 16
  %309 = getelementptr inbounds { double, double }, ptr %306, i32 0, i32 1
  %310 = extractvalue { double, double } %304, 1
  store double %310, ptr %309, align 8
  %311 = load ptr, ptr %5, align 8, !tbaa !5
  %312 = getelementptr inbounds %"class.JPH::SoftBodyUpdateContext", ptr %311, i32 0, i32 18
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %312, ptr align 16 %36, i64 16, i1 false), !tbaa.struct !38
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #10
  %313 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %51, i32 0, i32 3
  store ptr %313, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #10
  %314 = load ptr, ptr %38, align 8, !tbaa !5
  %315 = call noundef ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %314)
  store ptr %315, ptr %39, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #10
  %316 = load ptr, ptr %38, align 8, !tbaa !5
  %317 = call noundef ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %316)
  store ptr %317, ptr %40, align 8, !tbaa !5
  br label %318

318:                                              ; preds = %332, %289
  %319 = load ptr, ptr %39, align 8, !tbaa !5
  %320 = load ptr, ptr %40, align 8, !tbaa !5
  %321 = icmp ne ptr %319, %320
  br i1 %321, label %323, label %322

322:                                              ; preds = %318
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #10
  br label %335

323:                                              ; preds = %318
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #10
  %324 = load ptr, ptr %39, align 8, !tbaa !5
  store ptr %324, ptr %41, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %42, ptr align 16 %35, i64 16, i1 false), !tbaa.struct !38
  %325 = load ptr, ptr %41, align 8, !tbaa !5
  %326 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %325, i32 0, i32 1
  %327 = getelementptr inbounds { double, double }, ptr %42, i32 0, i32 0
  %328 = load double, ptr %327, align 16
  %329 = getelementptr inbounds { double, double }, ptr %42, i32 0, i32 1
  %330 = load double, ptr %329, align 8
  %331 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3mIES0_(ptr noundef nonnull align 16 dereferenceable(16) %326, double %328, double %330)
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #10
  br label %332

332:                                              ; preds = %323
  %333 = load ptr, ptr %39, align 8, !tbaa !5
  %334 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %333, i32 1
  store ptr %334, ptr %39, align 8, !tbaa !5
  br label %318

335:                                              ; preds = %322
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #10
  %336 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %51, i32 0, i32 6
  store ptr %336, ptr %43, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #10
  %337 = load ptr, ptr %43, align 8, !tbaa !5
  %338 = call noundef ptr @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties9SkinStateENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %337)
  store ptr %338, ptr %44, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #10
  %339 = load ptr, ptr %43, align 8, !tbaa !5
  %340 = call noundef ptr @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties9SkinStateENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %339)
  store ptr %340, ptr %45, align 8, !tbaa !5
  br label %341

341:                                              ; preds = %355, %335
  %342 = load ptr, ptr %44, align 8, !tbaa !5
  %343 = load ptr, ptr %45, align 8, !tbaa !5
  %344 = icmp ne ptr %342, %343
  br i1 %344, label %346, label %345

345:                                              ; preds = %341
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #10
  br label %358

346:                                              ; preds = %341
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #10
  %347 = load ptr, ptr %44, align 8, !tbaa !5
  store ptr %347, ptr %46, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %47, ptr align 16 %35, i64 16, i1 false), !tbaa.struct !38
  %348 = load ptr, ptr %46, align 8, !tbaa !5
  %349 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::SkinState", ptr %348, i32 0, i32 1
  %350 = getelementptr inbounds { double, double }, ptr %47, i32 0, i32 0
  %351 = load double, ptr %350, align 16
  %352 = getelementptr inbounds { double, double }, ptr %47, i32 0, i32 1
  %353 = load double, ptr %352, align 8
  %354 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3mIES0_(ptr noundef nonnull align 16 dereferenceable(16) %349, double %351, double %353)
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #10
  br label %355

355:                                              ; preds = %346
  %356 = load ptr, ptr %44, align 8, !tbaa !5
  %357 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::SkinState", ptr %356, i32 1
  store ptr %357, ptr %44, align 8, !tbaa !5
  br label %341

358:                                              ; preds = %345
  %359 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %51, i32 0, i32 7
  %360 = call { double, double } @_ZNK3JPH4Vec3ngEv(ptr noundef nonnull align 16 dereferenceable(16) %35)
  %361 = getelementptr inbounds %"class.JPH::Vec3", ptr %48, i32 0, i32 0
  %362 = getelementptr inbounds %union.anon.0, ptr %361, i32 0, i32 0
  %363 = getelementptr inbounds { double, double }, ptr %362, i32 0, i32 0
  %364 = extractvalue { double, double } %360, 0
  store double %364, ptr %363, align 16
  %365 = getelementptr inbounds { double, double }, ptr %362, i32 0, i32 1
  %366 = extractvalue { double, double } %360, 1
  store double %366, ptr %365, align 8
  %367 = getelementptr inbounds { double, double }, ptr %48, i32 0, i32 0
  %368 = load double, ptr %367, align 16
  %369 = getelementptr inbounds { double, double }, ptr %48, i32 0, i32 1
  %370 = load double, ptr %369, align 8
  call void @_ZN3JPH5AABox9TranslateENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(32) %359, double %368, double %370)
  %371 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %51, i32 0, i32 8
  %372 = call { double, double } @_ZNK3JPH4Vec3ngEv(ptr noundef nonnull align 16 dereferenceable(16) %35)
  %373 = getelementptr inbounds %"class.JPH::Vec3", ptr %49, i32 0, i32 0
  %374 = getelementptr inbounds %union.anon.0, ptr %373, i32 0, i32 0
  %375 = getelementptr inbounds { double, double }, ptr %374, i32 0, i32 0
  %376 = extractvalue { double, double } %372, 0
  store double %376, ptr %375, align 16
  %377 = getelementptr inbounds { double, double }, ptr %374, i32 0, i32 1
  %378 = extractvalue { double, double } %372, 1
  store double %378, ptr %377, align 8
  %379 = getelementptr inbounds { double, double }, ptr %49, i32 0, i32 0
  %380 = load double, ptr %379, align 16
  %381 = getelementptr inbounds { double, double }, ptr %49, i32 0, i32 1
  %382 = load double, ptr %381, align 8
  call void @_ZN3JPH5AABox9TranslateENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(32) %371, double %380, double %382)
  call void @llvm.lifetime.end.p0(i64 16, ptr %35) #10
  br label %393

383:                                              ; preds = %229
  call void @llvm.lifetime.start.p0(i64 16, ptr %50) #10
  %384 = call { double, double } @_ZN3JPH4Vec35sZeroEv()
  %385 = getelementptr inbounds %"class.JPH::Vec3", ptr %50, i32 0, i32 0
  %386 = getelementptr inbounds %union.anon.0, ptr %385, i32 0, i32 0
  %387 = getelementptr inbounds { double, double }, ptr %386, i32 0, i32 0
  %388 = extractvalue { double, double } %384, 0
  store double %388, ptr %387, align 16
  %389 = getelementptr inbounds { double, double }, ptr %386, i32 0, i32 1
  %390 = extractvalue { double, double } %384, 1
  store double %390, ptr %389, align 8
  %391 = load ptr, ptr %5, align 8, !tbaa !5
  %392 = getelementptr inbounds %"class.JPH::SoftBodyUpdateContext", ptr %391, i32 0, i32 18
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %392, ptr align 16 %50, i64 16, i1 false), !tbaa.struct !38
  call void @llvm.lifetime.end.p0(i64 16, ptr %50) #10
  br label %393

393:                                              ; preds = %383, %358
  %394 = call noundef zeroext i1 @_ZNK3JPH16MotionProperties16GetAllowSleepingEv(ptr noundef nonnull align 16 dereferenceable(182) %51)
  br i1 %394, label %395, label %413

395:                                              ; preds = %393
  %396 = load float, ptr %11, align 4, !tbaa !35
  %397 = load ptr, ptr %6, align 8, !tbaa !5
  %398 = getelementptr inbounds %"struct.JPH::PhysicsSettings", ptr %397, i32 0, i32 18
  %399 = load float, ptr %398, align 4, !tbaa !57
  %400 = fcmp ogt float %396, %399
  br i1 %400, label %401, label %404

401:                                              ; preds = %395
  call void @_ZN3JPH16MotionProperties19ResetSleepTestTimerEv(ptr noundef nonnull align 16 dereferenceable(182) %51)
  %402 = load ptr, ptr %5, align 8, !tbaa !5
  %403 = getelementptr inbounds %"class.JPH::SoftBodyUpdateContext", ptr %402, i32 0, i32 19
  store i32 0, ptr %403, align 16, !tbaa !59
  br label %412

404:                                              ; preds = %395
  %405 = load float, ptr %9, align 4, !tbaa !35
  %406 = load ptr, ptr %6, align 8, !tbaa !5
  %407 = getelementptr inbounds %"struct.JPH::PhysicsSettings", ptr %406, i32 0, i32 17
  %408 = load float, ptr %407, align 4, !tbaa !60
  %409 = call noundef i32 @_ZN3JPH16MotionProperties19AccumulateSleepTimeEff(ptr noundef nonnull align 16 dereferenceable(182) %51, float noundef %405, float noundef %408)
  %410 = load ptr, ptr %5, align 8, !tbaa !5
  %411 = getelementptr inbounds %"class.JPH::SoftBodyUpdateContext", ptr %410, i32 0, i32 19
  store i32 %409, ptr %411, align 16, !tbaa !59
  br label %412

412:                                              ; preds = %404, %401
  br label %416

413:                                              ; preds = %393
  %414 = load ptr, ptr %5, align 8, !tbaa !5
  %415 = getelementptr inbounds %"class.JPH::SoftBodyUpdateContext", ptr %414, i32 0, i32 19
  store i32 0, ptr %415, align 16, !tbaa !59
  br label %416

416:                                              ; preds = %413, %412
  %417 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %51, i32 0, i32 16
  store i8 0, ptr %417, align 1, !tbaa !61
  call void @_ZN3JPH16MotionProperties10ResetForceEv(ptr noundef nonnull align 16 dereferenceable(182) %51)
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #10
  ret void
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(93) ptr @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties15CollidingSensorENS_12STLAllocatorIS2_EEE4backEv(ptr noundef nonnull align 8 dereferenceable(24)) #8 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(93) ptr @_ZN3JPH24SoftBodyMotionProperties15CollidingSensoraSEOS1_(ptr noundef nonnull align 16 dereferenceable(93), ptr noundef nonnull align 16 dereferenceable(93)) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH16SoftBodyManifoldC2EPKNS_24SoftBodyMotionPropertiesE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3JPH16MotionProperties20GetMaxLinearVelocityEv(ptr noundef nonnull align 16 dereferenceable(182)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH5AABoxC2Ev(ptr noundef nonnull align 16 dereferenceable(32)) unnamed_addr #5 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH16MotionProperties24SetLinearVelocityClampedENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(182), double, double) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH16MotionProperties18SetAngularVelocityENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(182), double, double) #5 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5AABox9TranslateENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(32), double, double) #7 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH16MotionProperties19ResetSleepTestTimerEv(ptr noundef nonnull align 16 dereferenceable(182)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN3JPH16MotionProperties19AccumulateSleepTimeEff(ptr noundef nonnull align 16 dereferenceable(182), float noundef, float noundef) #1 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH16MotionProperties10ResetForceEv(ptr noundef nonnull align 16 dereferenceable(182)) #9 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { 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 #9 = { 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 #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, !6, i64 16}
!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 = !{!18, !18, i64 0}
!21 = !{!22, !26, i64 92}
!22 = !{!"_ZTSN3JPH24SoftBodyMotionProperties15CollidingSensorE", !11, i64 0, !23, i64 64, !25, i64 88, !26, i64 92}
!23 = !{!"_ZTSN3JPH5ArrayINS_24SoftBodyMotionProperties9LeafShapeENS_12STLAllocatorIS2_EEEE", !24, i64 0, !24, i64 8, !6, i64 16}
!24 = !{!"long", !7, i64 0}
!25 = !{!"_ZTSN3JPH6BodyIDE", !18, i64 0}
!26 = !{!"bool", !7, i64 0}
!27 = !{i8 0, i8 2}
!28 = !{}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = !{!10, !6, i64 0}
!32 = !{!33, !33, i64 0}
!33 = !{!"vtable pointer", !8, i64 0}
!34 = !{!10, !13, i64 128}
!35 = !{!13, !13, i64 0}
!36 = !{i64 0, i64 16, !37, i64 16, i64 16, !37}
!37 = !{!7, !7, i64 0}
!38 = !{i64 0, i64 16, !37}
!39 = !{!40, !26, i64 368}
!40 = !{!"_ZTSN3JPH24SoftBodyMotionPropertiesE", !41, i64 0, !49, i64 184, !50, i64 192, !51, i64 216, !52, i64 240, !53, i64 264, !54, i64 288, !54, i64 320, !18, i64 352, !18, i64 356, !13, i64 360, !13, i64 364, !26, i64 368, !55, i64 369, !26, i64 370, !26, i64 371}
!41 = !{!"_ZTSN3JPH16MotionPropertiesE", !12, i64 0, !12, i64 16, !12, i64 32, !42, i64 48, !44, i64 64, !44, i64 76, !13, i64 88, !13, i64 92, !13, i64 96, !13, i64 100, !13, i64 104, !13, i64 108, !18, i64 112, !18, i64 116, !45, i64 120, !26, i64 121, !46, i64 122, !7, i64 123, !7, i64 124, !7, i64 128, !13, i64 176, !47, i64 180, !48, i64 181}
!42 = !{!"_ZTSN3JPH4QuatE", !43, i64 0}
!43 = !{!"_ZTSN3JPH4Vec4E", !7, i64 0}
!44 = !{!"_ZTSN3JPH6Float3E", !13, i64 0, !13, i64 4, !13, i64 8}
!45 = !{!"_ZTSN3JPH14EMotionQualityE", !7, i64 0}
!46 = !{!"_ZTSN3JPH12EAllowedDOFsE", !7, i64 0}
!47 = !{!"_ZTSN3JPH9EBodyTypeE", !7, i64 0}
!48 = !{!"_ZTSN3JPH11EMotionTypeE", !7, i64 0}
!49 = !{!"_ZTSN3JPH8RefConstINS_22SoftBodySharedSettingsEEE", !6, i64 0}
!50 = !{!"_ZTSN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEEE", !24, i64 0, !24, i64 8, !6, i64 16}
!51 = !{!"_ZTSN3JPH5ArrayINS_24SoftBodyMotionProperties14CollidingShapeENS_12STLAllocatorIS2_EEEE", !24, i64 0, !24, i64 8, !6, i64 16}
!52 = !{!"_ZTSN3JPH5ArrayINS_24SoftBodyMotionProperties15CollidingSensorENS_12STLAllocatorIS2_EEEE", !24, i64 0, !24, i64 8, !6, i64 16}
!53 = !{!"_ZTSN3JPH5ArrayINS_24SoftBodyMotionProperties9SkinStateENS_12STLAllocatorIS2_EEEE", !24, i64 0, !24, i64 8, !6, i64 16}
!54 = !{!"_ZTSN3JPH5AABoxE", !12, i64 0, !12, i64 16}
!55 = !{!"_ZTSSt6atomicIbE", !56, i64 0}
!56 = !{!"_ZTSSt13__atomic_baseIbE", !26, i64 0}
!57 = !{!58, !13, i64 72}
!58 = !{!"_ZTSN3JPH15PhysicsSettingsE", !18, i64 0, !18, i64 4, !18, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !13, i64 40, !13, i64 44, !13, i64 48, !13, i64 52, !18, i64 56, !18, i64 60, !13, i64 64, !13, i64 68, !13, i64 72, !26, i64 76, !26, i64 77, !26, i64 78, !26, i64 79, !26, i64 80, !26, i64 81, !26, i64 82}
!59 = !{!10, !19, i64 192}
!60 = !{!58, !13, i64 68}
!61 = !{!40, !26, i64 371}


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

; 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 nounwind uwtable
declare dso_local noundef float @_ZN3JPH6SquareIfEET_S1_(float noundef) local_unnamed_addr #3

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH14SoftBodyVertex14ResetCollisionEv(ptr noundef nonnull align 16 dereferenceable(80)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH5AABox11EncapsulateENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(32), double, double) local_unnamed_addr #5 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 #4 align 2

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4sqrtf(float noundef) local_unnamed_addr #1

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

; 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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH24SoftBodyMotionProperties19UpdateSoftBodyStateERNS_21SoftBodyUpdateContextERKNS_15PhysicsSettingsE(ptr noundef nonnull align 16 dereferenceable(372) %0, ptr noundef nonnull align 16 dereferenceable(196) %1, ptr nocapture noundef nonnull readonly align 4 dereferenceable(83) %2) local_unnamed_addr #5 align 2 {
  %4 = alloca %"class.JPH::SoftBodyManifold", align 8
  %5 = alloca float, align 4
  %6 = alloca %"class.JPH::Vec3", align 16
  %7 = alloca %"class.JPH::Vec3", align 16
  %8 = alloca %"class.JPH::AABox", align 16
  %9 = alloca float, align 4
  %10 = alloca %"class.JPH::Vec3", align 16
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"class.JPH::Vec3", align 16
  %14 = getelementptr inbounds i8, ptr %0, i64 369
  %15 = tail call noundef zeroext i1 @_ZNKSt6atomicIbE4loadESt12memory_order(ptr noundef nonnull align 1 dereferenceable(1) %14, i32 noundef 0) #10
  br i1 %15, label %16, label %40

16:                                               ; preds = %3
  %17 = getelementptr inbounds i8, ptr %1, i64 16
  %18 = load ptr, ptr %17, align 16, !tbaa !5
  %.not = icmp eq ptr %18, null
  br i1 %.not, label %40, label %19

19:                                               ; preds = %16
  %20 = getelementptr inbounds i8, ptr %0, i64 240
  %21 = tail call noundef i64 @_ZNK3JPH5ArrayINS_24SoftBodyMotionProperties15CollidingSensorENS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %20)
  %22 = trunc i64 %21 to i32
  %23 = icmp sgt i32 %22, 0
  br i1 %23, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %19
  %24 = and i64 %21, 2147483647
  br label %.lr.ph

._crit_edge:                                      ; preds = %38, %19
  %25 = load ptr, ptr %17, align 16, !tbaa !5
  %26 = load ptr, ptr %1, align 16, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #10
  call void @_ZN3JPH16SoftBodyManifoldC2EPKNS_24SoftBodyMotionPropertiesE(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull %0)
  %27 = load ptr, ptr %25, align 8, !tbaa !20
  %28 = getelementptr inbounds i8, ptr %27, i64 24
  %29 = load ptr, ptr %28, align 8
  call void %29(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 16 dereferenceable(122) %26, ptr noundef nonnull align 8 dereferenceable(24) %4)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #10
  br label %40

.lr.ph:                                           ; preds = %.lr.ph.preheader, %38
  %indvars.iv = phi i64 [ %24, %.lr.ph.preheader ], [ %indvars.iv.next, %38 ]
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %30 = tail call noundef nonnull align 16 dereferenceable(93) ptr @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties15CollidingSensorENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %indvars.iv.next)
  %31 = getelementptr inbounds i8, ptr %30, i64 92
  %32 = load i8, ptr %31, align 4, !tbaa !22, !range !28, !noundef !29
  %33 = trunc nuw i8 %32 to i1
  br i1 %33, label %38, label %34

34:                                               ; preds = %.lr.ph
  %35 = tail call noundef nonnull align 16 dereferenceable(93) ptr @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties15CollidingSensorENS_12STLAllocatorIS2_EEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %20)
  %36 = tail call noundef nonnull align 16 dereferenceable(93) ptr @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties15CollidingSensorENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %indvars.iv.next)
  %37 = tail call noundef nonnull align 16 dereferenceable(93) ptr @_ZN3JPH24SoftBodyMotionProperties15CollidingSensoraSEOS1_(ptr noundef nonnull align 16 dereferenceable(93) %36, ptr noundef nonnull align 16 dereferenceable(93) %35) #10
  tail call void @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties15CollidingSensorENS_12STLAllocatorIS2_EEE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(24) %20)
  br label %38

38:                                               ; preds = %.lr.ph, %34
  %39 = icmp ugt i64 %indvars.iv, 1
  br i1 %39, label %.lr.ph, label %._crit_edge, !llvm.loop !30

40:                                               ; preds = %._crit_edge, %16, %3
  %41 = getelementptr inbounds i8, ptr %1, i64 128
  %42 = load float, ptr %41, align 16, !tbaa !32
  %43 = call noundef float @_ZNK3JPH16MotionProperties20GetMaxLinearVelocityEv(ptr noundef nonnull align 16 dereferenceable(182) %0)
  %44 = call noundef float @_ZN3JPH6SquareIfEET_S1_(float noundef %43)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #10
  store float 0.000000e+00, ptr %5, align 4, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #10
  %45 = call { double, double } @_ZN3JPH4Vec35sZeroEv()
  %46 = extractvalue { double, double } %45, 0
  store double %46, ptr %6, align 16
  %47 = getelementptr inbounds i8, ptr %6, i64 8
  %48 = extractvalue { double, double } %45, 1
  store double %48, ptr %47, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #10
  %49 = call { double, double } @_ZN3JPH4Vec35sZeroEv()
  %50 = extractvalue { double, double } %49, 0
  store double %50, ptr %7, align 16
  %51 = getelementptr inbounds i8, ptr %7, i64 8
  %52 = extractvalue { double, double } %49, 1
  store double %52, ptr %51, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #10
  call void @_ZN3JPH5AABoxC2Ev(ptr noundef nonnull align 16 dereferenceable(32) %8)
  %53 = getelementptr inbounds i8, ptr %0, i64 288
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %53, ptr noundef nonnull align 16 dereferenceable(32) %8, i64 32, i1 false), !tbaa.struct !34
  %54 = getelementptr inbounds i8, ptr %0, i64 320
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %54, ptr noundef nonnull align 16 dereferenceable(32) %8, i64 32, i1 false)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #10
  %55 = getelementptr inbounds i8, ptr %0, i64 192
  %56 = call noundef ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %55)
  %57 = call noundef ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %55)
  %.not9297 = icmp eq ptr %56, %57
  br i1 %.not9297, label %._crit_edge101, label %.lr.ph100

.lr.ph100:                                        ; preds = %40
  %58 = getelementptr inbounds i8, ptr %10, i64 8
  %59 = getelementptr inbounds i8, ptr %1, i64 112
  %.sroa.236.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 120
  br label %81

._crit_edge101:                                   ; preds = %92, %40
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #10
  %60 = call noundef i64 @_ZNK3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %55)
  %61 = trunc i64 %60 to i32
  store i32 %61, ptr %11, align 4, !tbaa !36
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #10
  store i32 1, ptr %12, align 4, !tbaa !36
  %62 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %63 = load i32, ptr %62, align 4, !tbaa !36
  %64 = sitofp i32 %63 to float
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #10
  %65 = getelementptr inbounds i8, ptr %1, i64 32
  %66 = call { double, double } @_ZNK3JPH4Vec3dvEf(ptr noundef nonnull align 16 dereferenceable(16) %6, float noundef %64)
  %67 = extractvalue { double, double } %66, 0
  %68 = extractvalue { double, double } %66, 1
  %69 = call { double, double } @_ZNK3JPH5Mat4411Multiply3x3ENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %65, double %67, double %68)
  %70 = extractvalue { double, double } %69, 0
  %71 = extractvalue { double, double } %69, 1
  call void @_ZN3JPH16MotionProperties24SetLinearVelocityClampedENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(182) %0, double %70, double %71)
  %72 = call { double, double } @_ZNK3JPH4Vec3dvEf(ptr noundef nonnull align 16 dereferenceable(16) %7, float noundef %64)
  %73 = extractvalue { double, double } %72, 0
  %74 = extractvalue { double, double } %72, 1
  %75 = call { double, double } @_ZNK3JPH5Mat4411Multiply3x3ENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %65, double %73, double %74)
  %76 = extractvalue { double, double } %75, 0
  %77 = extractvalue { double, double } %75, 1
  call void @_ZN3JPH16MotionProperties18SetAngularVelocityENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(182) %0, double %76, double %77)
  %78 = getelementptr inbounds i8, ptr %0, i64 368
  %79 = load i8, ptr %78, align 16, !tbaa !37, !range !28, !noundef !29
  %80 = trunc nuw i8 %79 to i1
  br i1 %80, label %109, label %135

81:                                               ; preds = %.lr.ph100, %92
  %.08798 = phi ptr [ %56, %.lr.ph100 ], [ %108, %92 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #10
  %82 = getelementptr inbounds i8, ptr %.08798, i64 32
  %83 = call noundef float @_ZNK3JPH4Vec38LengthSqEv(ptr noundef nonnull align 16 dereferenceable(16) %82)
  store float %83, ptr %9, align 4, !tbaa !33
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %85 = load float, ptr %84, align 4, !tbaa !33
  store float %85, ptr %5, align 4, !tbaa !33
  %86 = load float, ptr %9, align 4, !tbaa !33
  %87 = fcmp ogt float %86, %44
  br i1 %87, label %88, label %92

88:                                               ; preds = %81
  %89 = fdiv float %44, %86
  %90 = call noundef float @_ZSt4sqrtf(float noundef %89)
  %91 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3mLEf(ptr noundef nonnull align 16 dereferenceable(16) %82, float noundef %90)
  br label %92

92:                                               ; preds = %88, %81
  %.sroa.047.0.copyload = load double, ptr %82, align 16
  %.sroa.248.0..sroa_idx = getelementptr inbounds i8, ptr %.08798, i64 40
  %.sroa.248.0.copyload = load double, ptr %.sroa.248.0..sroa_idx, align 8, !tbaa !35
  %93 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16) %6, double %.sroa.047.0.copyload, double %.sroa.248.0.copyload)
  %94 = getelementptr inbounds i8, ptr %.08798, i64 16
  %.sroa.043.0.copyload = load double, ptr %82, align 16
  %.sroa.244.0.copyload = load double, ptr %.sroa.248.0..sroa_idx, align 8, !tbaa !35
  %95 = call { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %94, double %.sroa.043.0.copyload, double %.sroa.244.0.copyload)
  %96 = extractvalue { double, double } %95, 0
  %97 = extractvalue { double, double } %95, 1
  %98 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16) %7, double %96, double %97)
  %.sroa.041.0.copyload = load double, ptr %94, align 16
  %.sroa.242.0..sroa_idx = getelementptr inbounds i8, ptr %.08798, i64 24
  %.sroa.242.0.copyload = load double, ptr %.sroa.242.0..sroa_idx, align 8, !tbaa !35
  call void @_ZN3JPH5AABox11EncapsulateENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(32) %53, double %.sroa.041.0.copyload, double %.sroa.242.0.copyload)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #10
  %99 = call { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16) %82, float noundef %42)
  %100 = extractvalue { double, double } %99, 0
  %101 = extractvalue { double, double } %99, 1
  %102 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %94, double %100, double %101)
  %103 = extractvalue { double, double } %102, 0
  store double %103, ptr %10, align 16
  %104 = extractvalue { double, double } %102, 1
  store double %104, ptr %58, align 8
  %.sroa.035.0.copyload = load double, ptr %59, align 16
  %.sroa.236.0.copyload = load double, ptr %.sroa.236.0..sroa_idx, align 8, !tbaa !35
  %105 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %10, double %.sroa.035.0.copyload, double %.sroa.236.0.copyload)
  %106 = extractvalue { double, double } %105, 0
  %107 = extractvalue { double, double } %105, 1
  call void @_ZN3JPH5AABox11EncapsulateENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(32) %54, double %106, double %107)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #10
  call void @_ZN3JPH14SoftBodyVertex14ResetCollisionEv(ptr noundef nonnull align 16 dereferenceable(80) %.08798)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #10
  %108 = getelementptr inbounds i8, ptr %.08798, i64 80
  %.not92 = icmp eq ptr %108, %57
  br i1 %.not92, label %._crit_edge101, label %81

109:                                              ; preds = %._crit_edge101
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #10
  %110 = call { double, double } @_ZNK3JPH5AABox9GetCenterEv(ptr noundef nonnull align 16 dereferenceable(32) %53)
  %111 = extractvalue { double, double } %110, 0
  store double %111, ptr %13, align 16
  %112 = getelementptr inbounds i8, ptr %13, i64 8
  %113 = extractvalue { double, double } %110, 1
  store double %113, ptr %112, align 8
  %114 = call { double, double } @_ZNK3JPH5Mat4411Multiply3x3ENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %65, double %111, double %113)
  %115 = extractvalue { double, double } %114, 0
  %116 = extractvalue { double, double } %114, 1
  %117 = getelementptr inbounds i8, ptr %1, i64 176
  store double %115, ptr %117, align 16
  %.sroa.424.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 184
  store double %116, ptr %.sroa.424.0..sroa_idx, align 8, !tbaa !35
  %118 = call noundef ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %55)
  %119 = call noundef ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %55)
  %.not93102 = icmp eq ptr %118, %119
  br i1 %.not93102, label %._crit_edge106, label %.lr.ph105

._crit_edge106:                                   ; preds = %.lr.ph105, %109
  %120 = getelementptr inbounds i8, ptr %0, i64 264
  %121 = call noundef ptr @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties9SkinStateENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %120)
  %122 = call noundef ptr @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties9SkinStateENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %120)
  %.not94107 = icmp eq ptr %121, %122
  br i1 %.not94107, label %._crit_edge111, label %.lr.ph110

.lr.ph105:                                        ; preds = %109, %.lr.ph105
  %.088103 = phi ptr [ %125, %.lr.ph105 ], [ %118, %109 ]
  %.sroa.012.0.copyload = load double, ptr %13, align 16
  %.sroa.213.0.copyload = load double, ptr %112, align 8, !tbaa !35
  %123 = getelementptr inbounds i8, ptr %.088103, i64 16
  %124 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3mIES0_(ptr noundef nonnull align 16 dereferenceable(16) %123, double %.sroa.012.0.copyload, double %.sroa.213.0.copyload)
  %125 = getelementptr inbounds i8, ptr %.088103, i64 80
  %.not93 = icmp eq ptr %125, %119
  br i1 %.not93, label %._crit_edge106, label %.lr.ph105

._crit_edge111:                                   ; preds = %.lr.ph110, %._crit_edge106
  %126 = call { double, double } @_ZNK3JPH4Vec3ngEv(ptr noundef nonnull align 16 dereferenceable(16) %13)
  %127 = extractvalue { double, double } %126, 0
  %128 = extractvalue { double, double } %126, 1
  call void @_ZN3JPH5AABox9TranslateENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(32) %53, double %127, double %128)
  %129 = call { double, double } @_ZNK3JPH4Vec3ngEv(ptr noundef nonnull align 16 dereferenceable(16) %13)
  %130 = extractvalue { double, double } %129, 0
  %131 = extractvalue { double, double } %129, 1
  call void @_ZN3JPH5AABox9TranslateENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(32) %54, double %130, double %131)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #10
  br label %140

.lr.ph110:                                        ; preds = %._crit_edge106, %.lr.ph110
  %.089108 = phi ptr [ %134, %.lr.ph110 ], [ %121, %._crit_edge106 ]
  %.sroa.04.0.copyload = load double, ptr %13, align 16
  %.sroa.25.0.copyload = load double, ptr %112, align 8, !tbaa !35
  %132 = getelementptr inbounds i8, ptr %.089108, i64 16
  %133 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3mIES0_(ptr noundef nonnull align 16 dereferenceable(16) %132, double %.sroa.04.0.copyload, double %.sroa.25.0.copyload)
  %134 = getelementptr inbounds i8, ptr %.089108, i64 48
  %.not94 = icmp eq ptr %134, %122
  br i1 %.not94, label %._crit_edge111, label %.lr.ph110

135:                                              ; preds = %._crit_edge101
  %136 = call { double, double } @_ZN3JPH4Vec35sZeroEv()
  %137 = extractvalue { double, double } %136, 0
  %138 = extractvalue { double, double } %136, 1
  %139 = getelementptr inbounds i8, ptr %1, i64 176
  store double %137, ptr %139, align 16
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 184
  store double %138, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !35
  br label %140

140:                                              ; preds = %135, %._crit_edge111
  %141 = call noundef zeroext i1 @_ZNK3JPH16MotionProperties16GetAllowSleepingEv(ptr noundef nonnull align 16 dereferenceable(182) %0)
  br i1 %141, label %142, label %152

142:                                              ; preds = %140
  %143 = load float, ptr %5, align 4, !tbaa !33
  %144 = getelementptr inbounds i8, ptr %2, i64 72
  %145 = load float, ptr %144, align 4, !tbaa !55
  %146 = fcmp ogt float %143, %145
  br i1 %146, label %147, label %148

147:                                              ; preds = %142
  call void @_ZN3JPH16MotionProperties19ResetSleepTestTimerEv(ptr noundef nonnull align 16 dereferenceable(182) %0)
  br label %152

148:                                              ; preds = %142
  %149 = getelementptr inbounds i8, ptr %2, i64 68
  %150 = load float, ptr %149, align 4, !tbaa !57
  %151 = call noundef i32 @_ZN3JPH16MotionProperties19AccumulateSleepTimeEff(ptr noundef nonnull align 16 dereferenceable(182) %0, float noundef %42, float noundef %150)
  br label %152

152:                                              ; preds = %140, %147, %148
  %.sink = phi i32 [ 0, %147 ], [ %151, %148 ], [ 0, %140 ]
  %153 = getelementptr inbounds i8, ptr %1, i64 192
  store i32 %.sink, ptr %153, align 16, !tbaa !58
  %154 = getelementptr inbounds i8, ptr %0, i64 371
  store i8 0, ptr %154, align 1, !tbaa !59
  call void @_ZN3JPH16MotionProperties10ResetForceEv(ptr noundef nonnull align 16 dereferenceable(182) %0)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #10
  ret void
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(93) ptr @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties15CollidingSensorENS_12STLAllocatorIS2_EEE4backEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #8 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(93) ptr @_ZN3JPH24SoftBodyMotionProperties15CollidingSensoraSEOS1_(ptr noundef nonnull align 16 dereferenceable(93), ptr noundef nonnull align 16 dereferenceable(93)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH16SoftBodyManifoldC2EPKNS_24SoftBodyMotionPropertiesE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3JPH16MotionProperties20GetMaxLinearVelocityEv(ptr noundef nonnull align 16 dereferenceable(182)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH5AABoxC2Ev(ptr noundef nonnull align 16 dereferenceable(32)) unnamed_addr #5 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH16MotionProperties24SetLinearVelocityClampedENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(182), double, double) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH16MotionProperties18SetAngularVelocityENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(182), double, double) local_unnamed_addr #5 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5AABox9TranslateENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(32), double, double) local_unnamed_addr #7 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH16MotionProperties19ResetSleepTestTimerEv(ptr noundef nonnull align 16 dereferenceable(182)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN3JPH16MotionProperties19AccumulateSleepTimeEff(ptr noundef nonnull align 16 dereferenceable(182), float noundef, float noundef) local_unnamed_addr #1 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH16MotionProperties10ResetForceEv(ptr noundef nonnull align 16 dereferenceable(182)) local_unnamed_addr #9 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { 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 #9 = { 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 #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, !7, i64 16}
!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 = !{!6, !7, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"vtable pointer", !9, i64 0}
!22 = !{!23, !27, i64 92}
!23 = !{!"_ZTSN3JPH24SoftBodyMotionProperties15CollidingSensorE", !10, i64 0, !24, i64 64, !26, i64 88, !27, i64 92}
!24 = !{!"_ZTSN3JPH5ArrayINS_24SoftBodyMotionProperties9LeafShapeENS_12STLAllocatorIS2_EEEE", !25, i64 0, !25, i64 8, !7, i64 16}
!25 = !{!"long", !8, i64 0}
!26 = !{!"_ZTSN3JPH6BodyIDE", !17, i64 0}
!27 = !{!"bool", !8, i64 0}
!28 = !{i8 0, i8 2}
!29 = !{}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!6, !12, i64 128}
!33 = !{!12, !12, i64 0}
!34 = !{i64 0, i64 16, !35, i64 16, i64 16, !35}
!35 = !{!8, !8, i64 0}
!36 = !{!17, !17, i64 0}
!37 = !{!38, !27, i64 368}
!38 = !{!"_ZTSN3JPH24SoftBodyMotionPropertiesE", !39, i64 0, !47, i64 184, !48, i64 192, !49, i64 216, !50, i64 240, !51, i64 264, !52, i64 288, !52, i64 320, !17, i64 352, !17, i64 356, !12, i64 360, !12, i64 364, !27, i64 368, !53, i64 369, !27, i64 370, !27, i64 371}
!39 = !{!"_ZTSN3JPH16MotionPropertiesE", !11, i64 0, !11, i64 16, !11, i64 32, !40, i64 48, !42, i64 64, !42, i64 76, !12, i64 88, !12, i64 92, !12, i64 96, !12, i64 100, !12, i64 104, !12, i64 108, !17, i64 112, !17, i64 116, !43, i64 120, !27, i64 121, !44, i64 122, !8, i64 123, !8, i64 124, !8, i64 128, !12, i64 176, !45, i64 180, !46, i64 181}
!40 = !{!"_ZTSN3JPH4QuatE", !41, i64 0}
!41 = !{!"_ZTSN3JPH4Vec4E", !8, i64 0}
!42 = !{!"_ZTSN3JPH6Float3E", !12, i64 0, !12, i64 4, !12, i64 8}
!43 = !{!"_ZTSN3JPH14EMotionQualityE", !8, i64 0}
!44 = !{!"_ZTSN3JPH12EAllowedDOFsE", !8, i64 0}
!45 = !{!"_ZTSN3JPH9EBodyTypeE", !8, i64 0}
!46 = !{!"_ZTSN3JPH11EMotionTypeE", !8, i64 0}
!47 = !{!"_ZTSN3JPH8RefConstINS_22SoftBodySharedSettingsEEE", !7, i64 0}
!48 = !{!"_ZTSN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEEE", !25, i64 0, !25, i64 8, !7, i64 16}
!49 = !{!"_ZTSN3JPH5ArrayINS_24SoftBodyMotionProperties14CollidingShapeENS_12STLAllocatorIS2_EEEE", !25, i64 0, !25, i64 8, !7, i64 16}
!50 = !{!"_ZTSN3JPH5ArrayINS_24SoftBodyMotionProperties15CollidingSensorENS_12STLAllocatorIS2_EEEE", !25, i64 0, !25, i64 8, !7, i64 16}
!51 = !{!"_ZTSN3JPH5ArrayINS_24SoftBodyMotionProperties9SkinStateENS_12STLAllocatorIS2_EEEE", !25, i64 0, !25, i64 8, !7, i64 16}
!52 = !{!"_ZTSN3JPH5AABoxE", !11, i64 0, !11, i64 16}
!53 = !{!"_ZTSSt6atomicIbE", !54, i64 0}
!54 = !{!"_ZTSSt13__atomic_baseIbE", !27, i64 0}
!55 = !{!56, !12, i64 72}
!56 = !{!"_ZTSN3JPH15PhysicsSettingsE", !17, i64 0, !17, i64 4, !17, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44, !12, i64 48, !12, i64 52, !17, i64 56, !17, i64 60, !12, i64 64, !12, i64 68, !12, i64 72, !27, i64 76, !27, i64 77, !27, i64 78, !27, i64 79, !27, i64 80, !27, i64 81, !27, i64 82}
!57 = !{!56, !12, i64 68}
!58 = !{!6, !18, i64 192}
!59 = !{!38, !27, i64 371}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass