; 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 }
%"struct.JPH::SoftBodySharedSettings::DihedralBend" = type { [4 x i32], float, float }
%"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" }

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

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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZN3JPH6SquareIfEET_S1_(float noundef) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #3

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH24SoftBodyMotionProperties28ApplyDihedralBendConstraintsERKNS_21SoftBodyUpdateContextEjj(ptr noundef nonnull align 16 dereferenceable(372) %0, ptr noundef nonnull align 16 dereferenceable(196) %1, i32 noundef %2, i32 noundef %3) #7 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca float, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca %"class.JPH::Vec3", align 16
  %18 = alloca %"class.JPH::Vec3", align 16
  %19 = alloca %"class.JPH::Vec3", align 16
  %20 = alloca %"class.JPH::Vec3", align 16
  %21 = alloca %"class.JPH::Vec3", align 16
  %22 = alloca %"class.JPH::Vec3", align 16
  %23 = alloca float, align 4
  %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 %"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 float, align 4
  %36 = alloca float, align 4
  %37 = alloca float, align 4
  %38 = alloca float, align 4
  %39 = alloca %"class.JPH::Vec3", align 16
  %40 = alloca %"class.JPH::Vec3", align 16
  %41 = alloca %"class.JPH::Vec3", align 16
  %42 = alloca float, align 4
  %43 = alloca %"class.JPH::Vec3", align 16
  %44 = alloca float, align 4
  %45 = alloca %"class.JPH::Vec3", align 16
  %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 %"class.JPH::Vec3", align 16
  %62 = alloca float, align 4
  %63 = alloca float, align 4
  %64 = alloca float, align 4
  %65 = alloca float, align 4
  %66 = alloca float, align 4
  %67 = alloca float, align 4
  %68 = alloca %"class.JPH::Vec3", align 16
  %69 = alloca %"class.JPH::Vec3", align 16
  %70 = alloca %"class.JPH::Vec3", align 16
  %71 = alloca %"class.JPH::Vec3", align 16
  %72 = alloca %"class.JPH::Vec3", align 16
  %73 = alloca %"class.JPH::Vec3", align 16
  %74 = alloca %"class.JPH::Vec3", align 16
  %75 = alloca %"class.JPH::Vec3", align 16
  %76 = alloca %"class.JPH::Vec3", align 16
  %77 = alloca %"class.JPH::Vec3", align 16
  %78 = alloca %"class.JPH::Vec3", align 16
  %79 = alloca %"class.JPH::Vec3", align 16
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !9
  %80 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #10
  %81 = load ptr, ptr %6, align 8, !tbaa !5
  %82 = getelementptr inbounds %"class.JPH::SoftBodyUpdateContext", ptr %81, i32 0, i32 8
  %83 = load float, ptr %82, align 4, !tbaa !11
  %84 = call noundef float @_ZN3JPH6SquareIfEET_S1_(float noundef %83)
  %85 = fdiv float 1.000000e+00, %84
  store float %85, ptr %9, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #10
  %86 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %80, i32 0, i32 2
  %87 = call noundef ptr @_ZNK3JPH8RefConstINS_22SoftBodySharedSettingsEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %86)
  %88 = getelementptr inbounds %"class.JPH::SoftBodySharedSettings", ptr %87, i32 0, i32 4
  %89 = call noundef ptr @_ZNK3JPH5ArrayINS_22SoftBodySharedSettings12DihedralBendENS_12STLAllocatorIS2_EEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %88)
  %90 = load i32, ptr %7, align 4, !tbaa !9
  %91 = zext i32 %90 to i64
  %92 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::DihedralBend", ptr %89, i64 %91
  store ptr %92, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #10
  %93 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %80, i32 0, i32 2
  %94 = call noundef ptr @_ZNK3JPH8RefConstINS_22SoftBodySharedSettingsEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %93)
  %95 = getelementptr inbounds %"class.JPH::SoftBodySharedSettings", ptr %94, i32 0, i32 4
  %96 = call noundef ptr @_ZNK3JPH5ArrayINS_22SoftBodySharedSettings12DihedralBendENS_12STLAllocatorIS2_EEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %95)
  %97 = load i32, ptr %8, align 4, !tbaa !9
  %98 = zext i32 %97 to i64
  %99 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::DihedralBend", ptr %96, i64 %98
  store ptr %99, ptr %11, align 8, !tbaa !5
  br label %100

100:                                              ; preds = %536, %4
  %101 = load ptr, ptr %10, align 8, !tbaa !5
  %102 = load ptr, ptr %11, align 8, !tbaa !5
  %103 = icmp ult ptr %101, %102
  br i1 %103, label %105, label %104

104:                                              ; preds = %100
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #10
  br label %539

105:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #10
  %106 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %80, i32 0, i32 3
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  %108 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::DihedralBend", ptr %107, i32 0, i32 0
  %109 = getelementptr inbounds [4 x i32], ptr %108, i64 0, i64 0
  %110 = load i32, ptr %109, align 4, !tbaa !9
  %111 = zext i32 %110 to i64
  %112 = call noundef nonnull align 16 dereferenceable(80) ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %106, i64 noundef %111)
  store ptr %112, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #10
  %113 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %80, i32 0, i32 3
  %114 = load ptr, ptr %10, align 8, !tbaa !5
  %115 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::DihedralBend", ptr %114, i32 0, i32 0
  %116 = getelementptr inbounds [4 x i32], ptr %115, i64 0, i64 1
  %117 = load i32, ptr %116, align 4, !tbaa !9
  %118 = zext i32 %117 to i64
  %119 = call noundef nonnull align 16 dereferenceable(80) ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %113, i64 noundef %118)
  store ptr %119, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #10
  %120 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %80, i32 0, i32 3
  %121 = load ptr, ptr %10, align 8, !tbaa !5
  %122 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::DihedralBend", ptr %121, i32 0, i32 0
  %123 = getelementptr inbounds [4 x i32], ptr %122, i64 0, i64 2
  %124 = load i32, ptr %123, align 4, !tbaa !9
  %125 = zext i32 %124 to i64
  %126 = call noundef nonnull align 16 dereferenceable(80) ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %120, i64 noundef %125)
  store ptr %126, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #10
  %127 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %80, i32 0, i32 3
  %128 = load ptr, ptr %10, align 8, !tbaa !5
  %129 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::DihedralBend", ptr %128, i32 0, i32 0
  %130 = getelementptr inbounds [4 x i32], ptr %129, i64 0, i64 3
  %131 = load i32, ptr %130, align 4, !tbaa !9
  %132 = zext i32 %131 to i64
  %133 = call noundef nonnull align 16 dereferenceable(80) ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %127, i64 noundef %132)
  store ptr %133, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #10
  %134 = load ptr, ptr %13, align 8, !tbaa !5
  %135 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %134, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %17, ptr align 16 %135, i64 16, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #10
  %136 = load ptr, ptr %14, align 8, !tbaa !5
  %137 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %136, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %18, ptr align 16 %137, i64 16, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #10
  %138 = load ptr, ptr %15, align 8, !tbaa !5
  %139 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %138, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %19, ptr align 16 %139, i64 16, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #10
  %140 = load ptr, ptr %16, align 8, !tbaa !5
  %141 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %140, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %20, ptr align 16 %141, i64 16, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %22, ptr align 16 %17, i64 16, i1 false), !tbaa.struct !22
  %142 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 0
  %143 = load double, ptr %142, align 16
  %144 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 1
  %145 = load double, ptr %144, align 8
  %146 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %18, double %143, double %145)
  %147 = getelementptr inbounds %"class.JPH::Vec3", ptr %21, i32 0, i32 0
  %148 = getelementptr inbounds %union.anon.0, ptr %147, i32 0, i32 0
  %149 = getelementptr inbounds { double, double }, ptr %148, i32 0, i32 0
  %150 = extractvalue { double, double } %146, 0
  store double %150, ptr %149, align 16
  %151 = getelementptr inbounds { double, double }, ptr %148, i32 0, i32 1
  %152 = extractvalue { double, double } %146, 1
  store double %152, ptr %151, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #10
  %153 = call noundef float @_ZNK3JPH4Vec36LengthEv(ptr noundef nonnull align 16 dereferenceable(16) %21)
  store float %153, ptr %23, align 4, !tbaa !21
  %154 = load float, ptr %23, align 4, !tbaa !21
  %155 = fcmp olt float %154, 0x3EB0C6F7A0000000
  br i1 %155, label %156, label %157

156:                                              ; preds = %105
  store i32 4, ptr %12, align 4
  br label %533

157:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %25, ptr align 16 %18, i64 16, i1 false), !tbaa.struct !22
  %158 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 0
  %159 = load double, ptr %158, align 16
  %160 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 1
  %161 = load double, ptr %160, align 8
  %162 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %19, double %159, double %161)
  %163 = getelementptr inbounds %"class.JPH::Vec3", ptr %24, i32 0, i32 0
  %164 = getelementptr inbounds %union.anon.0, ptr %163, i32 0, i32 0
  %165 = getelementptr inbounds { double, double }, ptr %164, i32 0, i32 0
  %166 = extractvalue { double, double } %162, 0
  store double %166, ptr %165, align 16
  %167 = getelementptr inbounds { double, double }, ptr %164, i32 0, i32 1
  %168 = extractvalue { double, double } %162, 1
  store double %168, ptr %167, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %27, ptr align 16 %18, i64 16, i1 false), !tbaa.struct !22
  %169 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 0
  %170 = load double, ptr %169, align 16
  %171 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 1
  %172 = load double, ptr %171, align 8
  %173 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %20, double %170, double %172)
  %174 = getelementptr inbounds %"class.JPH::Vec3", ptr %26, i32 0, i32 0
  %175 = getelementptr inbounds %union.anon.0, ptr %174, i32 0, i32 0
  %176 = getelementptr inbounds { double, double }, ptr %175, i32 0, i32 0
  %177 = extractvalue { double, double } %173, 0
  store double %177, ptr %176, align 16
  %178 = getelementptr inbounds { double, double }, ptr %175, i32 0, i32 1
  %179 = extractvalue { double, double } %173, 1
  store double %179, ptr %178, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #10
  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 %17, i64 16, i1 false), !tbaa.struct !22
  %180 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 0
  %181 = load double, ptr %180, align 16
  %182 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 1
  %183 = load double, ptr %182, align 8
  %184 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %19, double %181, double %183)
  %185 = getelementptr inbounds %"class.JPH::Vec3", ptr %29, i32 0, i32 0
  %186 = getelementptr inbounds %union.anon.0, ptr %185, i32 0, i32 0
  %187 = getelementptr inbounds { double, double }, ptr %186, i32 0, i32 0
  %188 = extractvalue { double, double } %184, 0
  store double %188, ptr %187, align 16
  %189 = getelementptr inbounds { double, double }, ptr %186, i32 0, i32 1
  %190 = extractvalue { double, double } %184, 1
  store double %190, ptr %189, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %31, ptr align 16 %24, i64 16, i1 false), !tbaa.struct !22
  %191 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 0
  %192 = load double, ptr %191, align 16
  %193 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 1
  %194 = load double, ptr %193, align 8
  %195 = call { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %29, double %192, double %194)
  %196 = getelementptr inbounds %"class.JPH::Vec3", ptr %28, i32 0, i32 0
  %197 = getelementptr inbounds %union.anon.0, ptr %196, i32 0, i32 0
  %198 = getelementptr inbounds { double, double }, ptr %197, i32 0, i32 0
  %199 = extractvalue { double, double } %195, 0
  store double %199, ptr %198, align 16
  %200 = getelementptr inbounds { double, double }, ptr %197, i32 0, i32 1
  %201 = extractvalue { double, double } %195, 1
  store double %201, ptr %200, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr %32) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %34, ptr align 16 %17, i64 16, i1 false), !tbaa.struct !22
  %202 = getelementptr inbounds { double, double }, ptr %34, i32 0, i32 0
  %203 = load double, ptr %202, align 16
  %204 = getelementptr inbounds { double, double }, ptr %34, i32 0, i32 1
  %205 = load double, ptr %204, align 8
  %206 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %20, double %203, double %205)
  %207 = getelementptr inbounds %"class.JPH::Vec3", ptr %33, i32 0, i32 0
  %208 = getelementptr inbounds %union.anon.0, ptr %207, i32 0, i32 0
  %209 = getelementptr inbounds { double, double }, ptr %208, i32 0, i32 0
  %210 = extractvalue { double, double } %206, 0
  store double %210, ptr %209, align 16
  %211 = getelementptr inbounds { double, double }, ptr %208, i32 0, i32 1
  %212 = extractvalue { double, double } %206, 1
  store double %212, ptr %211, align 8
  %213 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 0
  %214 = load double, ptr %213, align 16
  %215 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 1
  %216 = load double, ptr %215, align 8
  %217 = call { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %26, double %214, double %216)
  %218 = getelementptr inbounds %"class.JPH::Vec3", ptr %32, i32 0, i32 0
  %219 = getelementptr inbounds %union.anon.0, ptr %218, i32 0, i32 0
  %220 = getelementptr inbounds { double, double }, ptr %219, i32 0, i32 0
  %221 = extractvalue { double, double } %217, 0
  store double %221, ptr %220, align 16
  %222 = getelementptr inbounds { double, double }, ptr %219, i32 0, i32 1
  %223 = extractvalue { double, double } %217, 1
  store double %223, ptr %222, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #10
  %224 = call noundef float @_ZNK3JPH4Vec38LengthSqEv(ptr noundef nonnull align 16 dereferenceable(16) %28)
  store float %224, ptr %35, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #10
  %225 = call noundef float @_ZNK3JPH4Vec38LengthSqEv(ptr noundef nonnull align 16 dereferenceable(16) %32)
  store float %225, ptr %36, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #10
  %226 = load float, ptr %35, align 4, !tbaa !21
  %227 = load float, ptr %36, align 4, !tbaa !21
  %228 = fmul float %226, %227
  store float %228, ptr %37, align 4, !tbaa !21
  %229 = load float, ptr %37, align 4, !tbaa !21
  %230 = fcmp olt float %229, 0x3AF357C2A0000000
  br i1 %230, label %231, label %232

231:                                              ; preds = %157
  store i32 4, ptr %12, align 4
  br label %532

232:                                              ; preds = %157
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr %39) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %40, ptr align 16 %28, i64 16, i1 false), !tbaa.struct !22
  %233 = getelementptr inbounds { double, double }, ptr %40, i32 0, i32 0
  %234 = load double, ptr %233, align 16
  %235 = getelementptr inbounds { double, double }, ptr %40, i32 0, i32 1
  %236 = load double, ptr %235, align 8
  %237 = call { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %32, double %234, double %236)
  %238 = getelementptr inbounds %"class.JPH::Vec3", ptr %39, i32 0, i32 0
  %239 = getelementptr inbounds %union.anon.0, ptr %238, i32 0, i32 0
  %240 = getelementptr inbounds { double, double }, ptr %239, i32 0, i32 0
  %241 = extractvalue { double, double } %237, 0
  store double %241, ptr %240, align 16
  %242 = getelementptr inbounds { double, double }, ptr %239, i32 0, i32 1
  %243 = extractvalue { double, double } %237, 1
  store double %243, ptr %242, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %41, ptr align 16 %21, i64 16, i1 false), !tbaa.struct !22
  %244 = getelementptr inbounds { double, double }, ptr %41, i32 0, i32 0
  %245 = load double, ptr %244, align 16
  %246 = getelementptr inbounds { double, double }, ptr %41, i32 0, i32 1
  %247 = load double, ptr %246, align 8
  %248 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %39, double %245, double %247)
  %249 = call noundef float @_ZN3JPH4SignIfEET_S1_(float noundef %248)
  call void @llvm.lifetime.end.p0(i64 16, ptr %39) #10
  store float %249, ptr %38, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %43, ptr align 16 %32, i64 16, i1 false), !tbaa.struct !22
  %250 = getelementptr inbounds { double, double }, ptr %43, i32 0, i32 0
  %251 = load double, ptr %250, align 16
  %252 = getelementptr inbounds { double, double }, ptr %43, i32 0, i32 1
  %253 = load double, ptr %252, align 8
  %254 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %28, double %251, double %253)
  %255 = load float, ptr %37, align 4, !tbaa !21
  %256 = call noundef float @_ZSt4sqrtf(float noundef %255)
  %257 = fdiv float %254, %256
  store float %257, ptr %42, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #10
  %258 = load float, ptr %38, align 4, !tbaa !21
  %259 = load float, ptr %42, align 4, !tbaa !21
  %260 = call noundef float @_ZN3JPH15ACosApproximateEf(float noundef %259)
  %261 = load ptr, ptr %10, align 8, !tbaa !5
  %262 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::DihedralBend", ptr %261, i32 0, i32 2
  %263 = load float, ptr %262, align 4, !tbaa !24
  %264 = fneg float %263
  %265 = call float @llvm.fmuladd.f32(float %258, float %260, float %264)
  store float %265, ptr %44, align 4, !tbaa !21
  %266 = load float, ptr %44, align 4, !tbaa !21
  %267 = fcmp ogt float %266, 0x400921FB60000000
  br i1 %267, label %268, label %271

268:                                              ; preds = %232
  %269 = load float, ptr %44, align 4, !tbaa !21
  %270 = fsub float %269, 0x401921FB60000000
  store float %270, ptr %44, align 4, !tbaa !21
  br label %278

271:                                              ; preds = %232
  %272 = load float, ptr %44, align 4, !tbaa !21
  %273 = fcmp olt float %272, 0xC00921FB60000000
  br i1 %273, label %274, label %277

274:                                              ; preds = %271
  %275 = load float, ptr %44, align 4, !tbaa !21
  %276 = fadd float %275, 0x401921FB60000000
  store float %276, ptr %44, align 4, !tbaa !21
  br label %277

277:                                              ; preds = %274, %271
  br label %278

278:                                              ; preds = %277, %268
  %279 = load float, ptr %35, align 4, !tbaa !21
  %280 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3dVEf(ptr noundef nonnull align 16 dereferenceable(16) %28, float noundef %279)
  %281 = load float, ptr %36, align 4, !tbaa !21
  %282 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3dVEf(ptr noundef nonnull align 16 dereferenceable(16) %32, float noundef %281)
  call void @llvm.lifetime.start.p0(i64 16, ptr %45) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr %46) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr %47) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %48, ptr align 16 %21, i64 16, i1 false), !tbaa.struct !22
  %283 = getelementptr inbounds { double, double }, ptr %48, i32 0, i32 0
  %284 = load double, ptr %283, align 16
  %285 = getelementptr inbounds { double, double }, ptr %48, i32 0, i32 1
  %286 = load double, ptr %285, align 8
  %287 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %24, double %284, double %286)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %49, ptr align 16 %28, i64 16, i1 false), !tbaa.struct !22
  %288 = getelementptr inbounds { double, double }, ptr %49, i32 0, i32 0
  %289 = load double, ptr %288, align 16
  %290 = getelementptr inbounds { double, double }, ptr %49, i32 0, i32 1
  %291 = load double, ptr %290, align 8
  %292 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %287, double %289, double %291)
  %293 = getelementptr inbounds %"class.JPH::Vec3", ptr %47, i32 0, i32 0
  %294 = getelementptr inbounds %union.anon.0, ptr %293, i32 0, i32 0
  %295 = getelementptr inbounds { double, double }, ptr %294, i32 0, i32 0
  %296 = extractvalue { double, double } %292, 0
  store double %296, ptr %295, align 16
  %297 = getelementptr inbounds { double, double }, ptr %294, i32 0, i32 1
  %298 = extractvalue { double, double } %292, 1
  store double %298, ptr %297, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %51, ptr align 16 %21, i64 16, i1 false), !tbaa.struct !22
  %299 = getelementptr inbounds { double, double }, ptr %51, i32 0, i32 0
  %300 = load double, ptr %299, align 16
  %301 = getelementptr inbounds { double, double }, ptr %51, i32 0, i32 1
  %302 = load double, ptr %301, align 8
  %303 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %26, double %300, double %302)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %52, ptr align 16 %32, i64 16, i1 false), !tbaa.struct !22
  %304 = getelementptr inbounds { double, double }, ptr %52, i32 0, i32 0
  %305 = load double, ptr %304, align 16
  %306 = getelementptr inbounds { double, double }, ptr %52, i32 0, i32 1
  %307 = load double, ptr %306, align 8
  %308 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %303, double %305, double %307)
  %309 = getelementptr inbounds %"class.JPH::Vec3", ptr %50, i32 0, i32 0
  %310 = getelementptr inbounds %union.anon.0, ptr %309, i32 0, i32 0
  %311 = getelementptr inbounds { double, double }, ptr %310, i32 0, i32 0
  %312 = extractvalue { double, double } %308, 0
  store double %312, ptr %311, align 16
  %313 = getelementptr inbounds { double, double }, ptr %310, i32 0, i32 1
  %314 = extractvalue { double, double } %308, 1
  store double %314, ptr %313, align 8
  %315 = getelementptr inbounds { double, double }, ptr %50, i32 0, i32 0
  %316 = load double, ptr %315, align 16
  %317 = getelementptr inbounds { double, double }, ptr %50, i32 0, i32 1
  %318 = load double, ptr %317, align 8
  %319 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %47, double %316, double %318)
  %320 = getelementptr inbounds %"class.JPH::Vec3", ptr %46, i32 0, i32 0
  %321 = getelementptr inbounds %union.anon.0, ptr %320, i32 0, i32 0
  %322 = getelementptr inbounds { double, double }, ptr %321, i32 0, i32 0
  %323 = extractvalue { double, double } %319, 0
  store double %323, ptr %322, align 16
  %324 = getelementptr inbounds { double, double }, ptr %321, i32 0, i32 1
  %325 = extractvalue { double, double } %319, 1
  store double %325, ptr %324, align 8
  %326 = load float, ptr %23, align 4, !tbaa !21
  %327 = call { double, double } @_ZNK3JPH4Vec3dvEf(ptr noundef nonnull align 16 dereferenceable(16) %46, float noundef %326)
  %328 = getelementptr inbounds %"class.JPH::Vec3", ptr %45, i32 0, i32 0
  %329 = getelementptr inbounds %union.anon.0, ptr %328, i32 0, i32 0
  %330 = getelementptr inbounds { double, double }, ptr %329, i32 0, i32 0
  %331 = extractvalue { double, double } %327, 0
  store double %331, ptr %330, align 16
  %332 = getelementptr inbounds { double, double }, ptr %329, i32 0, i32 1
  %333 = extractvalue { double, double } %327, 1
  store double %333, ptr %332, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %47) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %46) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr %53) #10
  %334 = load float, ptr %23, align 4, !tbaa !21
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %54, ptr align 16 %28, i64 16, i1 false), !tbaa.struct !22
  %335 = getelementptr inbounds { double, double }, ptr %54, i32 0, i32 0
  %336 = load double, ptr %335, align 16
  %337 = getelementptr inbounds { double, double }, ptr %54, i32 0, i32 1
  %338 = load double, ptr %337, align 8
  %339 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %334, double %336, double %338)
  %340 = getelementptr inbounds %"class.JPH::Vec3", ptr %53, i32 0, i32 0
  %341 = getelementptr inbounds %union.anon.0, ptr %340, i32 0, i32 0
  %342 = getelementptr inbounds { double, double }, ptr %341, i32 0, i32 0
  %343 = extractvalue { double, double } %339, 0
  store double %343, ptr %342, align 16
  %344 = getelementptr inbounds { double, double }, ptr %341, i32 0, i32 1
  %345 = extractvalue { double, double } %339, 1
  store double %345, ptr %344, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %55) #10
  %346 = load float, ptr %23, align 4, !tbaa !21
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %56, ptr align 16 %32, i64 16, i1 false), !tbaa.struct !22
  %347 = getelementptr inbounds { double, double }, ptr %56, i32 0, i32 0
  %348 = load double, ptr %347, align 16
  %349 = getelementptr inbounds { double, double }, ptr %56, i32 0, i32 1
  %350 = load double, ptr %349, align 8
  %351 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %346, double %348, double %350)
  %352 = getelementptr inbounds %"class.JPH::Vec3", ptr %55, i32 0, i32 0
  %353 = getelementptr inbounds %union.anon.0, ptr %352, i32 0, i32 0
  %354 = getelementptr inbounds { double, double }, ptr %353, i32 0, i32 0
  %355 = extractvalue { double, double } %351, 0
  store double %355, ptr %354, align 16
  %356 = getelementptr inbounds { double, double }, ptr %353, i32 0, i32 1
  %357 = extractvalue { double, double } %351, 1
  store double %357, ptr %356, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %57) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr %58) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr %59) #10
  %358 = call { double, double } @_ZNK3JPH4Vec3ngEv(ptr noundef nonnull align 16 dereferenceable(16) %45)
  %359 = getelementptr inbounds %"class.JPH::Vec3", ptr %59, i32 0, i32 0
  %360 = getelementptr inbounds %union.anon.0, ptr %359, i32 0, i32 0
  %361 = getelementptr inbounds { double, double }, ptr %360, i32 0, i32 0
  %362 = extractvalue { double, double } %358, 0
  store double %362, ptr %361, align 16
  %363 = getelementptr inbounds { double, double }, ptr %360, i32 0, i32 1
  %364 = extractvalue { double, double } %358, 1
  store double %364, ptr %363, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %60, ptr align 16 %53, i64 16, i1 false), !tbaa.struct !22
  %365 = getelementptr inbounds { double, double }, ptr %60, i32 0, i32 0
  %366 = load double, ptr %365, align 16
  %367 = getelementptr inbounds { double, double }, ptr %60, i32 0, i32 1
  %368 = load double, ptr %367, align 8
  %369 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %59, double %366, double %368)
  %370 = getelementptr inbounds %"class.JPH::Vec3", ptr %58, i32 0, i32 0
  %371 = getelementptr inbounds %union.anon.0, ptr %370, i32 0, i32 0
  %372 = getelementptr inbounds { double, double }, ptr %371, i32 0, i32 0
  %373 = extractvalue { double, double } %369, 0
  store double %373, ptr %372, align 16
  %374 = getelementptr inbounds { double, double }, ptr %371, i32 0, i32 1
  %375 = extractvalue { double, double } %369, 1
  store double %375, ptr %374, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %61, ptr align 16 %55, i64 16, i1 false), !tbaa.struct !22
  %376 = getelementptr inbounds { double, double }, ptr %61, i32 0, i32 0
  %377 = load double, ptr %376, align 16
  %378 = getelementptr inbounds { double, double }, ptr %61, i32 0, i32 1
  %379 = load double, ptr %378, align 8
  %380 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %58, double %377, double %379)
  %381 = getelementptr inbounds %"class.JPH::Vec3", ptr %57, i32 0, i32 0
  %382 = getelementptr inbounds %union.anon.0, ptr %381, i32 0, i32 0
  %383 = getelementptr inbounds { double, double }, ptr %382, i32 0, i32 0
  %384 = extractvalue { double, double } %380, 0
  store double %384, ptr %383, align 16
  %385 = getelementptr inbounds { double, double }, ptr %382, i32 0, i32 1
  %386 = extractvalue { double, double } %380, 1
  store double %386, ptr %385, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %59) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %58) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %62) #10
  %387 = load ptr, ptr %13, align 8, !tbaa !5
  %388 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %387, i32 0, i32 7
  %389 = load float, ptr %388, align 4, !tbaa !26
  store float %389, ptr %62, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %63) #10
  %390 = load ptr, ptr %14, align 8, !tbaa !5
  %391 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %390, i32 0, i32 7
  %392 = load float, ptr %391, align 4, !tbaa !26
  store float %392, ptr %63, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %64) #10
  %393 = load ptr, ptr %15, align 8, !tbaa !5
  %394 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %393, i32 0, i32 7
  %395 = load float, ptr %394, align 4, !tbaa !26
  store float %395, ptr %64, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %65) #10
  %396 = load ptr, ptr %16, align 8, !tbaa !5
  %397 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %396, i32 0, i32 7
  %398 = load float, ptr %397, align 4, !tbaa !26
  store float %398, ptr %65, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %66) #10
  %399 = load float, ptr %62, align 4, !tbaa !21
  %400 = call noundef float @_ZNK3JPH4Vec38LengthSqEv(ptr noundef nonnull align 16 dereferenceable(16) %45)
  %401 = load float, ptr %63, align 4, !tbaa !21
  %402 = call noundef float @_ZNK3JPH4Vec38LengthSqEv(ptr noundef nonnull align 16 dereferenceable(16) %57)
  %403 = fmul float %401, %402
  %404 = call float @llvm.fmuladd.f32(float %399, float %400, float %403)
  %405 = load float, ptr %64, align 4, !tbaa !21
  %406 = call noundef float @_ZNK3JPH4Vec38LengthSqEv(ptr noundef nonnull align 16 dereferenceable(16) %53)
  %407 = call float @llvm.fmuladd.f32(float %405, float %406, float %404)
  %408 = load float, ptr %65, align 4, !tbaa !21
  %409 = call noundef float @_ZNK3JPH4Vec38LengthSqEv(ptr noundef nonnull align 16 dereferenceable(16) %55)
  %410 = call float @llvm.fmuladd.f32(float %408, float %409, float %407)
  %411 = load ptr, ptr %10, align 8, !tbaa !5
  %412 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::DihedralBend", ptr %411, i32 0, i32 1
  %413 = load float, ptr %412, align 4, !tbaa !31
  %414 = load float, ptr %9, align 4, !tbaa !21
  %415 = call float @llvm.fmuladd.f32(float %413, float %414, float %410)
  store float %415, ptr %66, align 4, !tbaa !21
  %416 = load float, ptr %66, align 4, !tbaa !21
  %417 = fcmp olt float %416, 0x3D71979980000000
  br i1 %417, label %418, label %419

418:                                              ; preds = %278
  store i32 4, ptr %12, align 4
  br label %531

419:                                              ; preds = %278
  call void @llvm.lifetime.start.p0(i64 4, ptr %67) #10
  %420 = load float, ptr %44, align 4, !tbaa !21
  %421 = load float, ptr %66, align 4, !tbaa !21
  %422 = fdiv float %420, %421
  store float %422, ptr %67, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 16, ptr %68) #10
  %423 = load float, ptr %67, align 4, !tbaa !21
  %424 = load float, ptr %62, align 4, !tbaa !21
  %425 = fmul float %423, %424
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %70, ptr align 16 %45, i64 16, i1 false), !tbaa.struct !22
  %426 = getelementptr inbounds { double, double }, ptr %70, i32 0, i32 0
  %427 = load double, ptr %426, align 16
  %428 = getelementptr inbounds { double, double }, ptr %70, i32 0, i32 1
  %429 = load double, ptr %428, align 8
  %430 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %425, double %427, double %429)
  %431 = getelementptr inbounds %"class.JPH::Vec3", ptr %69, i32 0, i32 0
  %432 = getelementptr inbounds %union.anon.0, ptr %431, i32 0, i32 0
  %433 = getelementptr inbounds { double, double }, ptr %432, i32 0, i32 0
  %434 = extractvalue { double, double } %430, 0
  store double %434, ptr %433, align 16
  %435 = getelementptr inbounds { double, double }, ptr %432, i32 0, i32 1
  %436 = extractvalue { double, double } %430, 1
  store double %436, ptr %435, align 8
  %437 = getelementptr inbounds { double, double }, ptr %69, i32 0, i32 0
  %438 = load double, ptr %437, align 16
  %439 = getelementptr inbounds { double, double }, ptr %69, i32 0, i32 1
  %440 = load double, ptr %439, align 8
  %441 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %17, double %438, double %440)
  %442 = getelementptr inbounds %"class.JPH::Vec3", ptr %68, i32 0, i32 0
  %443 = getelementptr inbounds %union.anon.0, ptr %442, i32 0, i32 0
  %444 = getelementptr inbounds { double, double }, ptr %443, i32 0, i32 0
  %445 = extractvalue { double, double } %441, 0
  store double %445, ptr %444, align 16
  %446 = getelementptr inbounds { double, double }, ptr %443, i32 0, i32 1
  %447 = extractvalue { double, double } %441, 1
  store double %447, ptr %446, align 8
  %448 = load ptr, ptr %13, align 8, !tbaa !5
  %449 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %448, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %449, ptr align 16 %68, i64 16, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 16, ptr %68) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr %71) #10
  %450 = load float, ptr %67, align 4, !tbaa !21
  %451 = load float, ptr %63, align 4, !tbaa !21
  %452 = fmul float %450, %451
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %73, ptr align 16 %57, i64 16, i1 false), !tbaa.struct !22
  %453 = getelementptr inbounds { double, double }, ptr %73, i32 0, i32 0
  %454 = load double, ptr %453, align 16
  %455 = getelementptr inbounds { double, double }, ptr %73, i32 0, i32 1
  %456 = load double, ptr %455, align 8
  %457 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %452, double %454, double %456)
  %458 = getelementptr inbounds %"class.JPH::Vec3", ptr %72, i32 0, i32 0
  %459 = getelementptr inbounds %union.anon.0, ptr %458, i32 0, i32 0
  %460 = getelementptr inbounds { double, double }, ptr %459, i32 0, i32 0
  %461 = extractvalue { double, double } %457, 0
  store double %461, ptr %460, align 16
  %462 = getelementptr inbounds { double, double }, ptr %459, i32 0, i32 1
  %463 = extractvalue { double, double } %457, 1
  store double %463, ptr %462, align 8
  %464 = getelementptr inbounds { double, double }, ptr %72, i32 0, i32 0
  %465 = load double, ptr %464, align 16
  %466 = getelementptr inbounds { double, double }, ptr %72, i32 0, i32 1
  %467 = load double, ptr %466, align 8
  %468 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %18, double %465, double %467)
  %469 = getelementptr inbounds %"class.JPH::Vec3", ptr %71, i32 0, i32 0
  %470 = getelementptr inbounds %union.anon.0, ptr %469, i32 0, i32 0
  %471 = getelementptr inbounds { double, double }, ptr %470, i32 0, i32 0
  %472 = extractvalue { double, double } %468, 0
  store double %472, ptr %471, align 16
  %473 = getelementptr inbounds { double, double }, ptr %470, i32 0, i32 1
  %474 = extractvalue { double, double } %468, 1
  store double %474, ptr %473, align 8
  %475 = load ptr, ptr %14, align 8, !tbaa !5
  %476 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %475, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %476, ptr align 16 %71, i64 16, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 16, ptr %71) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr %74) #10
  %477 = load float, ptr %67, align 4, !tbaa !21
  %478 = load float, ptr %64, align 4, !tbaa !21
  %479 = fmul float %477, %478
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %76, ptr align 16 %53, i64 16, i1 false), !tbaa.struct !22
  %480 = getelementptr inbounds { double, double }, ptr %76, i32 0, i32 0
  %481 = load double, ptr %480, align 16
  %482 = getelementptr inbounds { double, double }, ptr %76, i32 0, i32 1
  %483 = load double, ptr %482, align 8
  %484 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %479, double %481, double %483)
  %485 = getelementptr inbounds %"class.JPH::Vec3", ptr %75, i32 0, i32 0
  %486 = getelementptr inbounds %union.anon.0, ptr %485, i32 0, i32 0
  %487 = getelementptr inbounds { double, double }, ptr %486, i32 0, i32 0
  %488 = extractvalue { double, double } %484, 0
  store double %488, ptr %487, align 16
  %489 = getelementptr inbounds { double, double }, ptr %486, i32 0, i32 1
  %490 = extractvalue { double, double } %484, 1
  store double %490, ptr %489, align 8
  %491 = getelementptr inbounds { double, double }, ptr %75, i32 0, i32 0
  %492 = load double, ptr %491, align 16
  %493 = getelementptr inbounds { double, double }, ptr %75, i32 0, i32 1
  %494 = load double, ptr %493, align 8
  %495 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %19, double %492, double %494)
  %496 = getelementptr inbounds %"class.JPH::Vec3", ptr %74, i32 0, i32 0
  %497 = getelementptr inbounds %union.anon.0, ptr %496, i32 0, i32 0
  %498 = getelementptr inbounds { double, double }, ptr %497, i32 0, i32 0
  %499 = extractvalue { double, double } %495, 0
  store double %499, ptr %498, align 16
  %500 = getelementptr inbounds { double, double }, ptr %497, i32 0, i32 1
  %501 = extractvalue { double, double } %495, 1
  store double %501, ptr %500, align 8
  %502 = load ptr, ptr %15, align 8, !tbaa !5
  %503 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %502, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %503, ptr align 16 %74, i64 16, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 16, ptr %74) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr %77) #10
  %504 = load float, ptr %67, align 4, !tbaa !21
  %505 = load float, ptr %65, align 4, !tbaa !21
  %506 = fmul float %504, %505
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %79, ptr align 16 %55, i64 16, i1 false), !tbaa.struct !22
  %507 = getelementptr inbounds { double, double }, ptr %79, i32 0, i32 0
  %508 = load double, ptr %507, align 16
  %509 = getelementptr inbounds { double, double }, ptr %79, i32 0, i32 1
  %510 = load double, ptr %509, align 8
  %511 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %506, double %508, double %510)
  %512 = getelementptr inbounds %"class.JPH::Vec3", ptr %78, i32 0, i32 0
  %513 = getelementptr inbounds %union.anon.0, ptr %512, i32 0, i32 0
  %514 = getelementptr inbounds { double, double }, ptr %513, i32 0, i32 0
  %515 = extractvalue { double, double } %511, 0
  store double %515, ptr %514, align 16
  %516 = getelementptr inbounds { double, double }, ptr %513, i32 0, i32 1
  %517 = extractvalue { double, double } %511, 1
  store double %517, ptr %516, align 8
  %518 = getelementptr inbounds { double, double }, ptr %78, i32 0, i32 0
  %519 = load double, ptr %518, align 16
  %520 = getelementptr inbounds { double, double }, ptr %78, i32 0, i32 1
  %521 = load double, ptr %520, align 8
  %522 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %20, double %519, double %521)
  %523 = getelementptr inbounds %"class.JPH::Vec3", ptr %77, i32 0, i32 0
  %524 = getelementptr inbounds %union.anon.0, ptr %523, i32 0, i32 0
  %525 = getelementptr inbounds { double, double }, ptr %524, i32 0, i32 0
  %526 = extractvalue { double, double } %522, 0
  store double %526, ptr %525, align 16
  %527 = getelementptr inbounds { double, double }, ptr %524, i32 0, i32 1
  %528 = extractvalue { double, double } %522, 1
  store double %528, ptr %527, align 8
  %529 = load ptr, ptr %16, align 8, !tbaa !5
  %530 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %529, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %530, ptr align 16 %77, i64 16, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 16, ptr %77) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %67) #10
  store i32 0, ptr %12, align 4
  br label %531

531:                                              ; preds = %419, %418
  call void @llvm.lifetime.end.p0(i64 4, ptr %66) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %65) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %64) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %63) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %62) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %57) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %55) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %53) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %45) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #10
  br label %532

532:                                              ; preds = %531, %231
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #10
  br label %533

533:                                              ; preds = %532, %156
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 16, 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
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #10
  %534 = load i32, ptr %12, align 4
  switch i32 %534, label %540 [
    i32 0, label %535
    i32 4, label %536
  ]

535:                                              ; preds = %533
  br label %536

536:                                              ; preds = %535, %533
  %537 = load ptr, ptr %10, align 8, !tbaa !5
  %538 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::DihedralBend", ptr %537, i32 1
  store ptr %538, ptr %10, align 8, !tbaa !5
  br label %100, !llvm.loop !32

539:                                              ; preds = %104
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #10
  ret void

540:                                              ; preds = %533
  unreachable
}

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

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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZN3JPH4SignIfEET_S1_(float noundef) #2

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef float @_ZN3JPH15ACosApproximateEf(float noundef) #8

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { 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 #7 = { 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 = { 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 #9 = { 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 #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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !15, i64 132}
!12 = !{!"_ZTSN3JPH21SoftBodyUpdateContextE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !13, i64 32, !14, i64 96, !14, i64 112, !15, i64 128, !15, i64 132, !16, i64 136, !18, i64 140, !18, i64 144, !18, i64 148, !18, i64 152, !18, i64 156, !18, i64 160, !18, i64 164, !14, i64 176, !20, i64 192}
!13 = !{!"_ZTSN3JPH5Mat44E", !7, i64 0}
!14 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = !{!"_ZTSSt6atomicIN3JPH21SoftBodyUpdateContext6EStateEE", !17, i64 0}
!17 = !{!"_ZTSN3JPH21SoftBodyUpdateContext6EStateE", !7, i64 0}
!18 = !{!"_ZTSSt6atomicIjE", !19, i64 0}
!19 = !{!"_ZTSSt13__atomic_baseIjE", !10, i64 0}
!20 = !{!"_ZTSN3JPH9ECanSleepE", !7, i64 0}
!21 = !{!15, !15, i64 0}
!22 = !{i64 0, i64 16, !23}
!23 = !{!7, !7, i64 0}
!24 = !{!25, !15, i64 20}
!25 = !{!"_ZTSN3JPH22SoftBodySharedSettings12DihedralBendE", !7, i64 0, !15, i64 16, !15, i64 20}
!26 = !{!27, !15, i64 76}
!27 = !{!"_ZTSN3JPH14SoftBodyVertexE", !14, i64 0, !14, i64 16, !14, i64 32, !28, i64 48, !10, i64 64, !30, i64 68, !15, i64 72, !15, i64 76}
!28 = !{!"_ZTSN3JPH5PlaneE", !29, i64 0}
!29 = !{!"_ZTSN3JPH4Vec4E", !7, i64 0}
!30 = !{!"bool", !7, i64 0}
!31 = !{!25, !15, i64 16}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}


; 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> }
%"struct.JPH::SoftBodySharedSettings::DihedralBend" = type { [4 x i32], float, float }

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

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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZN3JPH6SquareIfEET_S1_(float noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(80) ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) 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 #6 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 #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH24SoftBodyMotionProperties28ApplyDihedralBendConstraintsERKNS_21SoftBodyUpdateContextEjj(ptr noundef nonnull align 16 dereferenceable(372) %0, ptr nocapture noundef nonnull readonly align 16 dereferenceable(196) %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #7 align 2 {
  %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 %"class.JPH::Vec3", align 16
  %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 %"class.JPH::Vec3", align 16
  %17 = alloca %"class.JPH::Vec3", align 16
  %18 = alloca %"class.JPH::Vec3", align 16
  %19 = alloca %"class.JPH::Vec3", align 16
  %20 = alloca %"class.JPH::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 = getelementptr inbounds i8, ptr %1, i64 132
  %25 = load float, ptr %24, align 4, !tbaa !5
  %26 = tail call noundef float @_ZN3JPH6SquareIfEET_S1_(float noundef %25)
  %27 = fdiv float 1.000000e+00, %26
  %28 = getelementptr inbounds i8, ptr %0, i64 184
  %29 = tail call noundef ptr @_ZNK3JPH8RefConstINS_22SoftBodySharedSettingsEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %28)
  %30 = getelementptr inbounds i8, ptr %29, i64 80
  %31 = tail call noundef ptr @_ZNK3JPH5ArrayINS_22SoftBodySharedSettings12DihedralBendENS_12STLAllocatorIS2_EEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %30)
  %32 = zext i32 %2 to i64
  %33 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::DihedralBend", ptr %31, i64 %32
  %34 = tail call noundef ptr @_ZNK3JPH8RefConstINS_22SoftBodySharedSettingsEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %28)
  %35 = getelementptr inbounds i8, ptr %34, i64 80
  %36 = tail call noundef ptr @_ZNK3JPH5ArrayINS_22SoftBodySharedSettings12DihedralBendENS_12STLAllocatorIS2_EEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %35)
  %37 = zext i32 %3 to i64
  %38 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::DihedralBend", ptr %36, i64 %37
  %39 = icmp ult ptr %33, %38
  br i1 %39, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %4
  %40 = getelementptr inbounds i8, ptr %0, i64 192
  %.sroa.289.0..sroa_idx = getelementptr inbounds i8, ptr %5, i64 8
  %41 = getelementptr inbounds i8, ptr %9, i64 8
  %.sroa.283.0..sroa_idx = getelementptr inbounds i8, ptr %6, i64 8
  %42 = getelementptr inbounds i8, ptr %10, i64 8
  %43 = getelementptr inbounds i8, ptr %11, i64 8
  %44 = getelementptr inbounds i8, ptr %13, i64 8
  %45 = getelementptr inbounds i8, ptr %12, i64 8
  %46 = getelementptr inbounds i8, ptr %14, i64 8
  %47 = getelementptr inbounds i8, ptr %15, i64 8
  %48 = getelementptr inbounds i8, ptr %18, i64 8
  %49 = getelementptr inbounds i8, ptr %17, i64 8
  %50 = getelementptr inbounds i8, ptr %16, i64 8
  %51 = getelementptr inbounds i8, ptr %19, i64 8
  %52 = getelementptr inbounds i8, ptr %20, i64 8
  %53 = getelementptr inbounds i8, ptr %23, i64 8
  %54 = getelementptr inbounds i8, ptr %22, i64 8
  %55 = getelementptr inbounds i8, ptr %21, i64 8
  br label %56

._crit_edge:                                      ; preds = %209, %4
  ret void

56:                                               ; preds = %.lr.ph, %209
  %.0120 = phi ptr [ %33, %.lr.ph ], [ %210, %209 ]
  %57 = load i32, ptr %.0120, align 4, !tbaa !19
  %58 = zext i32 %57 to i64
  %59 = call noundef nonnull align 16 dereferenceable(80) ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %58)
  %60 = getelementptr inbounds i8, ptr %.0120, i64 4
  %61 = load i32, ptr %60, align 4, !tbaa !19
  %62 = zext i32 %61 to i64
  %63 = call noundef nonnull align 16 dereferenceable(80) ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %62)
  %64 = getelementptr inbounds i8, ptr %.0120, i64 8
  %65 = load i32, ptr %64, align 4, !tbaa !19
  %66 = zext i32 %65 to i64
  %67 = call noundef nonnull align 16 dereferenceable(80) ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %66)
  %68 = getelementptr inbounds i8, ptr %.0120, i64 12
  %69 = load i32, ptr %68, align 4, !tbaa !19
  %70 = zext i32 %69 to i64
  %71 = call noundef nonnull align 16 dereferenceable(80) ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %70)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #10
  %72 = getelementptr inbounds i8, ptr %59, i64 16
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %5, ptr noundef nonnull align 16 dereferenceable(16) %72, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #10
  %73 = getelementptr inbounds i8, ptr %63, i64 16
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %6, ptr noundef nonnull align 16 dereferenceable(16) %73, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #10
  %74 = getelementptr inbounds i8, ptr %67, i64 16
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %7, ptr noundef nonnull align 16 dereferenceable(16) %74, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #10
  %75 = getelementptr inbounds i8, ptr %71, i64 16
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %8, ptr noundef nonnull align 16 dereferenceable(16) %75, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #10
  %.sroa.088.0.copyload = load double, ptr %5, align 16
  %.sroa.289.0.copyload = load double, ptr %.sroa.289.0..sroa_idx, align 8, !tbaa !21
  %76 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %6, double %.sroa.088.0.copyload, double %.sroa.289.0.copyload)
  %77 = extractvalue { double, double } %76, 0
  store double %77, ptr %9, align 16
  %78 = extractvalue { double, double } %76, 1
  store double %78, ptr %41, align 8
  %79 = call noundef float @_ZNK3JPH4Vec36LengthEv(ptr noundef nonnull align 16 dereferenceable(16) %9)
  %80 = fcmp olt float %79, 0x3EB0C6F7A0000000
  br i1 %80, label %209, label %81

81:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #10
  %.sroa.082.0.copyload = load double, ptr %6, align 16
  %.sroa.283.0.copyload = load double, ptr %.sroa.283.0..sroa_idx, align 8, !tbaa !21
  %82 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %7, double %.sroa.082.0.copyload, double %.sroa.283.0.copyload)
  %83 = extractvalue { double, double } %82, 0
  store double %83, ptr %10, align 16
  %84 = extractvalue { double, double } %82, 1
  store double %84, ptr %42, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #10
  %.sroa.080.0.copyload = load double, ptr %6, align 16
  %.sroa.281.0.copyload = load double, ptr %.sroa.283.0..sroa_idx, align 8, !tbaa !21
  %85 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %8, double %.sroa.080.0.copyload, double %.sroa.281.0.copyload)
  %86 = extractvalue { double, double } %85, 0
  store double %86, ptr %11, align 16
  %87 = extractvalue { double, double } %85, 1
  store double %87, ptr %43, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #10
  %.sroa.078.0.copyload = load double, ptr %5, align 16
  %.sroa.279.0.copyload = load double, ptr %.sroa.289.0..sroa_idx, align 8, !tbaa !21
  %88 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %7, double %.sroa.078.0.copyload, double %.sroa.279.0.copyload)
  %89 = extractvalue { double, double } %88, 0
  store double %89, ptr %13, align 16
  %90 = extractvalue { double, double } %88, 1
  store double %90, ptr %44, align 8
  %.sroa.076.0.copyload = load double, ptr %10, align 16
  %.sroa.277.0.copyload = load double, ptr %42, align 8, !tbaa !21
  %91 = call { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %13, double %.sroa.076.0.copyload, double %.sroa.277.0.copyload)
  %92 = extractvalue { double, double } %91, 0
  store double %92, ptr %12, align 16
  %93 = extractvalue { double, double } %91, 1
  store double %93, ptr %45, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #10
  %.sroa.072.0.copyload = load double, ptr %5, align 16
  %.sroa.273.0.copyload = load double, ptr %.sroa.289.0..sroa_idx, align 8, !tbaa !21
  %94 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %8, double %.sroa.072.0.copyload, double %.sroa.273.0.copyload)
  %95 = extractvalue { double, double } %94, 0
  %96 = extractvalue { double, double } %94, 1
  %97 = call { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %11, double %95, double %96)
  %98 = extractvalue { double, double } %97, 0
  store double %98, ptr %14, align 16
  %99 = extractvalue { double, double } %97, 1
  store double %99, ptr %46, align 8
  %100 = call noundef float @_ZNK3JPH4Vec38LengthSqEv(ptr noundef nonnull align 16 dereferenceable(16) %12)
  %101 = call noundef float @_ZNK3JPH4Vec38LengthSqEv(ptr noundef nonnull align 16 dereferenceable(16) %14)
  %102 = fmul float %100, %101
  %103 = fcmp olt float %102, 0x3AF357C2A0000000
  br i1 %103, label %208, label %104

104:                                              ; preds = %81
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #10
  %.sroa.063.0.copyload = load double, ptr %12, align 16
  %.sroa.264.0.copyload = load double, ptr %45, align 8, !tbaa !21
  %105 = call { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %14, double %.sroa.063.0.copyload, double %.sroa.264.0.copyload)
  %106 = extractvalue { double, double } %105, 0
  store double %106, ptr %15, align 16
  %107 = extractvalue { double, double } %105, 1
  store double %107, ptr %47, align 8
  %.sroa.061.0.copyload = load double, ptr %9, align 16
  %.sroa.262.0.copyload = load double, ptr %41, align 8, !tbaa !21
  %108 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %15, double %.sroa.061.0.copyload, double %.sroa.262.0.copyload)
  %109 = call noundef float @_ZN3JPH4SignIfEET_S1_(float noundef %108)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #10
  %.sroa.058.0.copyload = load double, ptr %14, align 16
  %.sroa.259.0.copyload = load double, ptr %46, align 8, !tbaa !21
  %110 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %12, double %.sroa.058.0.copyload, double %.sroa.259.0.copyload)
  %111 = call noundef float @_ZSt4sqrtf(float noundef %102)
  %112 = fdiv float %110, %111
  %113 = call noundef float @_ZN3JPH15ACosApproximateEf(float noundef %112)
  %114 = getelementptr inbounds i8, ptr %.0120, i64 20
  %115 = load float, ptr %114, align 4, !tbaa !22
  %116 = fneg float %115
  %117 = call float @llvm.fmuladd.f32(float %109, float %113, float %116)
  %118 = fcmp ogt float %117, 0x400921FB60000000
  br i1 %118, label %119, label %121

119:                                              ; preds = %104
  %120 = fadd float %117, 0xC01921FB60000000
  br label %125

121:                                              ; preds = %104
  %122 = fcmp olt float %117, 0xC00921FB60000000
  br i1 %122, label %123, label %125

123:                                              ; preds = %121
  %124 = fadd float %117, 0x401921FB60000000
  br label %125

125:                                              ; preds = %121, %123, %119
  %.0115 = phi float [ %120, %119 ], [ %124, %123 ], [ %117, %121 ]
  %126 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3dVEf(ptr noundef nonnull align 16 dereferenceable(16) %12, float noundef %100)
  %127 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3dVEf(ptr noundef nonnull align 16 dereferenceable(16) %14, float noundef %101)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) #10
  %.sroa.051.0.copyload = load double, ptr %9, align 16
  %.sroa.252.0.copyload = load double, ptr %41, align 8, !tbaa !21
  %128 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %10, double %.sroa.051.0.copyload, double %.sroa.252.0.copyload)
  %.sroa.049.0.copyload = load double, ptr %12, align 16
  %.sroa.250.0.copyload = load double, ptr %45, align 8, !tbaa !21
  %129 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %128, double %.sroa.049.0.copyload, double %.sroa.250.0.copyload)
  %130 = extractvalue { double, double } %129, 0
  store double %130, ptr %18, align 16
  %131 = extractvalue { double, double } %129, 1
  store double %131, ptr %48, align 8
  %.sroa.045.0.copyload = load double, ptr %9, align 16
  %.sroa.246.0.copyload = load double, ptr %41, align 8, !tbaa !21
  %132 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %11, double %.sroa.045.0.copyload, double %.sroa.246.0.copyload)
  %.sroa.043.0.copyload = load double, ptr %14, align 16
  %.sroa.244.0.copyload = load double, ptr %46, align 8, !tbaa !21
  %133 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %132, double %.sroa.043.0.copyload, double %.sroa.244.0.copyload)
  %134 = extractvalue { double, double } %133, 0
  %135 = extractvalue { double, double } %133, 1
  %136 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %18, double %134, double %135)
  %137 = extractvalue { double, double } %136, 0
  store double %137, ptr %17, align 16
  %138 = extractvalue { double, double } %136, 1
  store double %138, ptr %49, align 8
  %139 = call { double, double } @_ZNK3JPH4Vec3dvEf(ptr noundef nonnull align 16 dereferenceable(16) %17, float noundef %79)
  %140 = extractvalue { double, double } %139, 0
  store double %140, ptr %16, align 16
  %141 = extractvalue { double, double } %139, 1
  store double %141, ptr %50, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %19) #10
  %.sroa.041.0.copyload = load double, ptr %12, align 16
  %.sroa.242.0.copyload = load double, ptr %45, align 8, !tbaa !21
  %142 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %79, double %.sroa.041.0.copyload, double %.sroa.242.0.copyload)
  %143 = extractvalue { double, double } %142, 0
  store double %143, ptr %19, align 16
  %144 = extractvalue { double, double } %142, 1
  store double %144, ptr %51, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %20) #10
  %.sroa.039.0.copyload = load double, ptr %14, align 16
  %.sroa.240.0.copyload = load double, ptr %46, align 8, !tbaa !21
  %145 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %79, double %.sroa.039.0.copyload, double %.sroa.240.0.copyload)
  %146 = extractvalue { double, double } %145, 0
  store double %146, ptr %20, align 16
  %147 = extractvalue { double, double } %145, 1
  store double %147, ptr %52, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %21) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %22) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %23) #10
  %148 = call { double, double } @_ZNK3JPH4Vec3ngEv(ptr noundef nonnull align 16 dereferenceable(16) %16)
  %149 = extractvalue { double, double } %148, 0
  store double %149, ptr %23, align 16
  %150 = extractvalue { double, double } %148, 1
  store double %150, ptr %53, align 8
  %.sroa.037.0.copyload = load double, ptr %19, align 16
  %.sroa.238.0.copyload = load double, ptr %51, align 8, !tbaa !21
  %151 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %23, double %.sroa.037.0.copyload, double %.sroa.238.0.copyload)
  %152 = extractvalue { double, double } %151, 0
  store double %152, ptr %22, align 16
  %153 = extractvalue { double, double } %151, 1
  store double %153, ptr %54, align 8
  %.sroa.035.0.copyload = load double, ptr %20, align 16
  %.sroa.236.0.copyload = load double, ptr %52, align 8, !tbaa !21
  %154 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %22, double %.sroa.035.0.copyload, double %.sroa.236.0.copyload)
  %155 = extractvalue { double, double } %154, 0
  store double %155, ptr %21, align 16
  %156 = extractvalue { double, double } %154, 1
  store double %156, ptr %55, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %23) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #10
  %157 = getelementptr inbounds i8, ptr %59, i64 76
  %158 = load float, ptr %157, align 4, !tbaa !24
  %159 = getelementptr inbounds i8, ptr %63, i64 76
  %160 = load float, ptr %159, align 4, !tbaa !24
  %161 = getelementptr inbounds i8, ptr %67, i64 76
  %162 = load float, ptr %161, align 4, !tbaa !24
  %163 = getelementptr inbounds i8, ptr %71, i64 76
  %164 = load float, ptr %163, align 4, !tbaa !24
  %165 = call noundef float @_ZNK3JPH4Vec38LengthSqEv(ptr noundef nonnull align 16 dereferenceable(16) %16)
  %166 = call noundef float @_ZNK3JPH4Vec38LengthSqEv(ptr noundef nonnull align 16 dereferenceable(16) %21)
  %167 = fmul float %160, %166
  %168 = call float @llvm.fmuladd.f32(float %158, float %165, float %167)
  %169 = call noundef float @_ZNK3JPH4Vec38LengthSqEv(ptr noundef nonnull align 16 dereferenceable(16) %19)
  %170 = call float @llvm.fmuladd.f32(float %162, float %169, float %168)
  %171 = call noundef float @_ZNK3JPH4Vec38LengthSqEv(ptr noundef nonnull align 16 dereferenceable(16) %20)
  %172 = call float @llvm.fmuladd.f32(float %164, float %171, float %170)
  %173 = getelementptr inbounds i8, ptr %.0120, i64 16
  %174 = load float, ptr %173, align 4, !tbaa !29
  %175 = call float @llvm.fmuladd.f32(float %174, float %27, float %172)
  %176 = fcmp olt float %175, 0x3D71979980000000
  br i1 %176, label %207, label %177

177:                                              ; preds = %125
  %178 = fdiv float %.0115, %175
  %179 = fmul float %158, %178
  %.sroa.016.0.copyload = load double, ptr %16, align 16
  %.sroa.217.0.copyload = load double, ptr %50, align 8, !tbaa !21
  %180 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %179, double %.sroa.016.0.copyload, double %.sroa.217.0.copyload)
  %181 = extractvalue { double, double } %180, 0
  %182 = extractvalue { double, double } %180, 1
  %183 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %5, double %181, double %182)
  %184 = extractvalue { double, double } %183, 0
  %185 = extractvalue { double, double } %183, 1
  store double %184, ptr %72, align 16
  %.sroa.421.0..sroa_idx = getelementptr inbounds i8, ptr %59, i64 24
  store double %185, ptr %.sroa.421.0..sroa_idx, align 8, !tbaa !21
  %186 = fmul float %160, %178
  %.sroa.010.0.copyload = load double, ptr %21, align 16
  %.sroa.211.0.copyload = load double, ptr %55, align 8, !tbaa !21
  %187 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %186, double %.sroa.010.0.copyload, double %.sroa.211.0.copyload)
  %188 = extractvalue { double, double } %187, 0
  %189 = extractvalue { double, double } %187, 1
  %190 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %6, double %188, double %189)
  %191 = extractvalue { double, double } %190, 0
  %192 = extractvalue { double, double } %190, 1
  store double %191, ptr %73, align 16
  %.sroa.415.0..sroa_idx = getelementptr inbounds i8, ptr %63, i64 24
  store double %192, ptr %.sroa.415.0..sroa_idx, align 8, !tbaa !21
  %193 = fmul float %162, %178
  %.sroa.04.0.copyload = load double, ptr %19, align 16
  %.sroa.25.0.copyload = load double, ptr %51, align 8, !tbaa !21
  %194 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %193, double %.sroa.04.0.copyload, double %.sroa.25.0.copyload)
  %195 = extractvalue { double, double } %194, 0
  %196 = extractvalue { double, double } %194, 1
  %197 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %7, double %195, double %196)
  %198 = extractvalue { double, double } %197, 0
  %199 = extractvalue { double, double } %197, 1
  store double %198, ptr %74, align 16
  %.sroa.49.0..sroa_idx = getelementptr inbounds i8, ptr %67, i64 24
  store double %199, ptr %.sroa.49.0..sroa_idx, align 8, !tbaa !21
  %200 = fmul float %164, %178
  %.sroa.0.0.copyload = load double, ptr %20, align 16
  %.sroa.2.0.copyload = load double, ptr %52, align 8, !tbaa !21
  %201 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %200, double %.sroa.0.0.copyload, double %.sroa.2.0.copyload)
  %202 = extractvalue { double, double } %201, 0
  %203 = extractvalue { double, double } %201, 1
  %204 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %8, double %202, double %203)
  %205 = extractvalue { double, double } %204, 0
  %206 = extractvalue { double, double } %204, 1
  store double %205, ptr %75, align 16
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %71, i64 24
  store double %206, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !21
  br label %207

207:                                              ; preds = %125, %177
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #10
  br label %208

208:                                              ; preds = %81, %207
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #10
  br label %209

209:                                              ; preds = %56, %208
  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
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #10
  %210 = getelementptr inbounds i8, ptr %.0120, i64 24
  %211 = icmp ult ptr %210, %38
  br i1 %211, label %56, label %._crit_edge, !llvm.loop !30
}

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

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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZN3JPH4SignIfEET_S1_(float noundef) local_unnamed_addr #2

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef float @_ZN3JPH15ACosApproximateEf(float noundef) local_unnamed_addr #8

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { 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 #7 = { 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 = { 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 #9 = { 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 #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 = !{!17, !17, i64 0}
!20 = !{i64 0, i64 16, !21}
!21 = !{!8, !8, i64 0}
!22 = !{!23, !12, i64 20}
!23 = !{!"_ZTSN3JPH22SoftBodySharedSettings12DihedralBendE", !8, i64 0, !12, i64 16, !12, i64 20}
!24 = !{!25, !12, i64 76}
!25 = !{!"_ZTSN3JPH14SoftBodyVertexE", !11, i64 0, !11, i64 16, !11, i64 32, !26, i64 48, !17, i64 64, !28, i64 68, !12, i64 72, !12, i64 76}
!26 = !{!"_ZTSN3JPH5PlaneE", !27, i64 0}
!27 = !{!"_ZTSN3JPH4Vec4E", !8, i64 0}
!28 = !{!"bool", !8, i64 0}
!29 = !{!23, !12, i64 16}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}


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