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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::RayCastResult" = type { %"class.JPH::BroadPhaseCastResult", %"class.JPH::SubShapeID" }
%"class.JPH::BroadPhaseCastResult" = type { %"class.JPH::BodyID", float }
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::SubShapeID" = type { i32 }
%"class.JPH::SubShapeIDCreator" = type { %"class.JPH::SubShapeID", i32 }
%"class.JPH::SoftBodyShape" = type { %"class.JPH::Shape.base", ptr }
%"class.JPH::Shape.base" = type <{ ptr, %"class.JPH::RefTarget", [4 x i8], i64, i8, i8 }>
%"class.JPH::RefTarget" = type { %"struct.std::atomic" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"struct.JPH::SoftBodySharedSettings::Face" = type { [3 x i32], 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" }
%"class.JPH::Vec4" = type { %union.anon.0 }
%union.anon.0 = type { <4 x float> }
%"class.JPH::RayCastSettings" = type { i8, i8, i8 }
%"struct.JPH::RayCastT" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }

; 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: mustprogress uwtable
declare dso_local noundef i32 @_ZNK3JPH13SoftBodyShape17GetSubShapeIDBitsEv(ptr noundef nonnull align 8 dereferenceable(40)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3JPH24SoftBodyMotionProperties8GetFacesEv(ptr noundef nonnull align 16 dereferenceable(372)) #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: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3JPH24SoftBodyMotionProperties11GetVerticesEv(ptr noundef nonnull align 16 dereferenceable(372)) #3 align 2

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

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef float @_ZN3JPH11RayTriangleENS_4Vec3ES0_S0_S0_S0_(double, double, double, double, double, double, double, double, ptr noundef byval(%"class.JPH::Vec3") align 16) #6

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZNK3JPH17SubShapeIDCreator6PushIDEjj(ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, i32 noundef) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH13SoftBodyShape7CastRayERKNS_7RayCastERKNS_15RayCastSettingsERKNS_17SubShapeIDCreatorERNS_18CollisionCollectorINS_13RayCastResultENS_31CollisionCollectorTraitsCastRayEEERKNS_11ShapeFilterE(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 16 dereferenceable(32) %1, ptr noundef nonnull align 1 dereferenceable(3) %2, ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(12) %5) unnamed_addr #1 align 2 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca %"class.JPH::Vec3", align 16
  %21 = alloca %"class.JPH::Vec3", align 16
  %22 = alloca %"class.JPH::Vec3", align 16
  %23 = alloca %"class.JPH::Vec3", align 16
  %24 = alloca %"class.JPH::Vec3", align 16
  %25 = alloca %"class.JPH::Vec3", align 16
  %26 = alloca %"class.JPH::Vec3", align 16
  %27 = alloca %"class.JPH::Vec3", align 16
  %28 = alloca %"class.JPH::Vec3", align 16
  %29 = alloca float, align 4
  %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 %"class.JPH::RayCastResult", align 4
  %36 = alloca %"class.JPH::BodyID", align 4
  %37 = alloca %"class.JPH::SubShapeIDCreator", align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  %38 = load ptr, ptr %7, align 8
  %39 = load ptr, ptr %12, align 8, !tbaa !5
  %40 = load ptr, ptr %10, align 8, !tbaa !5
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH17SubShapeIDCreator5GetIDEv(ptr noundef nonnull align 4 dereferenceable(8) %40)
  %42 = load ptr, ptr %39, align 8, !tbaa !9
  %43 = getelementptr inbounds ptr, ptr %42, i64 2
  %44 = load ptr, ptr %43, align 8
  %45 = call noundef zeroext i1 %44(ptr noundef nonnull align 8 dereferenceable(12) %39, ptr noundef %38, ptr noundef nonnull align 4 dereferenceable(4) %41)
  br i1 %45, label %47, label %46

46:                                               ; preds = %6
  br label %203

47:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  %48 = call noundef i32 @_ZNK3JPH13SoftBodyShape17GetSubShapeIDBitsEv(ptr noundef nonnull align 8 dereferenceable(40) %38)
  store i32 %48, ptr %13, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #9
  %49 = getelementptr inbounds %"class.JPH::SoftBodyShape", ptr %38, i32 0, i32 1
  %50 = load ptr, ptr %49, align 8, !tbaa !13
  %51 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3JPH24SoftBodyMotionProperties11GetVerticesEv(ptr noundef nonnull align 16 dereferenceable(372) %50)
  store ptr %51, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #9
  %52 = getelementptr inbounds %"class.JPH::SoftBodyShape", ptr %38, i32 0, i32 1
  %53 = load ptr, ptr %52, align 8, !tbaa !13
  %54 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3JPH24SoftBodyMotionProperties8GetFacesEv(ptr noundef nonnull align 16 dereferenceable(372) %53)
  store ptr %54, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #9
  %55 = load ptr, ptr %15, align 8, !tbaa !5
  %56 = call noundef ptr @_ZNK3JPH5ArrayINS_22SoftBodySharedSettings4FaceENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %55)
  store ptr %56, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #9
  %57 = load ptr, ptr %15, align 8, !tbaa !5
  %58 = call noundef ptr @_ZNK3JPH5ArrayINS_22SoftBodySharedSettings4FaceENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %57)
  store ptr %58, ptr %17, align 8, !tbaa !5
  br label %59

59:                                               ; preds = %199, %47
  %60 = load ptr, ptr %16, align 8, !tbaa !5
  %61 = load ptr, ptr %17, align 8, !tbaa !5
  %62 = icmp ne ptr %60, %61
  br i1 %62, label %64, label %63

63:                                               ; preds = %59
  store i32 2, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  br label %202

64:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #9
  %65 = load ptr, ptr %16, align 8, !tbaa !5
  store ptr %65, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #9
  %66 = load ptr, ptr %14, align 8, !tbaa !5
  %67 = load ptr, ptr %19, align 8, !tbaa !5
  %68 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::Face", ptr %67, i32 0, i32 0
  %69 = getelementptr inbounds [3 x i32], ptr %68, i64 0, i64 0
  %70 = load i32, ptr %69, align 4, !tbaa !11
  %71 = zext i32 %70 to i64
  %72 = call noundef nonnull align 16 dereferenceable(80) ptr @_ZNK3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %66, i64 noundef %71)
  %73 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %72, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %20, ptr align 16 %73, i64 16, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #9
  %74 = load ptr, ptr %14, align 8, !tbaa !5
  %75 = load ptr, ptr %19, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::Face", ptr %75, i32 0, i32 0
  %77 = getelementptr inbounds [3 x i32], ptr %76, i64 0, i64 1
  %78 = load i32, ptr %77, align 4, !tbaa !11
  %79 = zext i32 %78 to i64
  %80 = call noundef nonnull align 16 dereferenceable(80) ptr @_ZNK3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %74, i64 noundef %79)
  %81 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %80, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %21, ptr align 16 %81, i64 16, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #9
  %82 = load ptr, ptr %14, align 8, !tbaa !5
  %83 = load ptr, ptr %19, align 8, !tbaa !5
  %84 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::Face", ptr %83, i32 0, i32 0
  %85 = getelementptr inbounds [3 x i32], ptr %84, i64 0, i64 2
  %86 = load i32, ptr %85, align 4, !tbaa !11
  %87 = zext i32 %86 to i64
  %88 = call noundef nonnull align 16 dereferenceable(80) ptr @_ZNK3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %82, i64 noundef %87)
  %89 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %88, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %22, ptr align 16 %89, i64 16, i1 false), !tbaa.struct !22
  %90 = load ptr, ptr %9, align 8, !tbaa !5
  %91 = getelementptr inbounds %"class.JPH::RayCastSettings", ptr %90, i32 0, i32 0
  %92 = load i8, ptr %91, align 1, !tbaa !24
  %93 = icmp eq i8 %92, 0
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #9
  br i1 %93, label %94, label %136

94:                                               ; preds = %64
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %25, ptr align 16 %20, i64 16, i1 false), !tbaa.struct !22
  %95 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 0
  %96 = load double, ptr %95, align 16
  %97 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 1
  %98 = load double, ptr %97, align 8
  %99 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %21, double %96, double %98)
  %100 = getelementptr inbounds %"class.JPH::Vec3", ptr %24, i32 0, i32 0
  %101 = getelementptr inbounds %union.anon, ptr %100, i32 0, i32 0
  %102 = getelementptr inbounds { double, double }, ptr %101, i32 0, i32 0
  %103 = extractvalue { double, double } %99, 0
  store double %103, ptr %102, align 16
  %104 = getelementptr inbounds { double, double }, ptr %101, i32 0, i32 1
  %105 = extractvalue { double, double } %99, 1
  store double %105, ptr %104, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %27, ptr align 16 %20, i64 16, i1 false), !tbaa.struct !22
  %106 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 0
  %107 = load double, ptr %106, align 16
  %108 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 1
  %109 = load double, ptr %108, align 8
  %110 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %22, double %107, double %109)
  %111 = getelementptr inbounds %"class.JPH::Vec3", ptr %26, i32 0, i32 0
  %112 = getelementptr inbounds %union.anon, ptr %111, i32 0, i32 0
  %113 = getelementptr inbounds { double, double }, ptr %112, i32 0, i32 0
  %114 = extractvalue { double, double } %110, 0
  store double %114, ptr %113, align 16
  %115 = getelementptr inbounds { double, double }, ptr %112, i32 0, i32 1
  %116 = extractvalue { double, double } %110, 1
  store double %116, ptr %115, align 8
  %117 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 0
  %118 = load double, ptr %117, align 16
  %119 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 1
  %120 = load double, ptr %119, align 8
  %121 = call { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %24, double %118, double %120)
  %122 = getelementptr inbounds %"class.JPH::Vec3", ptr %23, i32 0, i32 0
  %123 = getelementptr inbounds %union.anon, ptr %122, i32 0, i32 0
  %124 = getelementptr inbounds { double, double }, ptr %123, i32 0, i32 0
  %125 = extractvalue { double, double } %121, 0
  store double %125, ptr %124, align 16
  %126 = getelementptr inbounds { double, double }, ptr %123, i32 0, i32 1
  %127 = extractvalue { double, double } %121, 1
  store double %127, ptr %126, align 8
  %128 = load ptr, ptr %8, align 8, !tbaa !5
  %129 = getelementptr inbounds %"struct.JPH::RayCastT", ptr %128, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %28, ptr align 16 %129, i64 16, i1 false), !tbaa.struct !22
  %130 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 0
  %131 = load double, ptr %130, align 16
  %132 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 1
  %133 = load double, ptr %132, align 8
  %134 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %23, double %131, double %133)
  %135 = fcmp ogt float %134, 0.000000e+00
  br label %136

136:                                              ; preds = %94, %64
  %137 = phi i1 [ false, %64 ], [ %135, %94 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #9
  br i1 %137, label %138, label %139

138:                                              ; preds = %136
  store i32 3, ptr %18, align 4
  br label %193

139:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #9
  %140 = load ptr, ptr %8, align 8, !tbaa !5
  %141 = getelementptr inbounds %"struct.JPH::RayCastT", ptr %140, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %30, ptr align 16 %141, i64 16, i1 false), !tbaa.struct !22
  %142 = load ptr, ptr %8, align 8, !tbaa !5
  %143 = getelementptr inbounds %"struct.JPH::RayCastT", ptr %142, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %31, ptr align 16 %143, i64 16, i1 false), !tbaa.struct !22
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %32, ptr align 16 %20, i64 16, i1 false), !tbaa.struct !22
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %33, ptr align 16 %21, i64 16, i1 false), !tbaa.struct !22
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %34, ptr align 16 %22, i64 16, i1 false), !tbaa.struct !22
  %144 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 0
  %145 = load double, ptr %144, align 16
  %146 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 1
  %147 = load double, ptr %146, align 8
  %148 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 0
  %149 = load double, ptr %148, align 16
  %150 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 1
  %151 = load double, ptr %150, align 8
  %152 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 0
  %153 = load double, ptr %152, align 16
  %154 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 1
  %155 = load double, ptr %154, align 8
  %156 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 0
  %157 = load double, ptr %156, align 16
  %158 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 1
  %159 = load double, ptr %158, align 8
  %160 = call noundef float @_ZN3JPH11RayTriangleENS_4Vec3ES0_S0_S0_S0_(double %145, double %147, double %149, double %151, double %153, double %155, double %157, double %159, ptr noundef byval(%"class.JPH::Vec3") align 16 %34)
  store float %160, ptr %29, align 4, !tbaa !28
  %161 = load float, ptr %29, align 4, !tbaa !28
  %162 = load ptr, ptr %11, align 8, !tbaa !5
  %163 = call noundef float @_ZNK3JPH18CollisionCollectorINS_13RayCastResultENS_31CollisionCollectorTraitsCastRayEE19GetEarlyOutFractionEv(ptr noundef nonnull align 8 dereferenceable(24) %162)
  %164 = fcmp olt float %161, %163
  br i1 %164, label %165, label %192

165:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 12, ptr %35) #9
  call void @_ZN3JPH13RayCastResultC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %35)
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #9
  %166 = load ptr, ptr %11, align 8, !tbaa !5
  %167 = call noundef ptr @_ZNK3JPH18CollisionCollectorINS_13RayCastResultENS_31CollisionCollectorTraitsCastRayEE10GetContextEv(ptr noundef nonnull align 8 dereferenceable(24) %166)
  %168 = call i32 @_ZN3JPH16TransformedShape10sGetBodyIDEPKS0_(ptr noundef %167)
  %169 = getelementptr inbounds %"class.JPH::BodyID", ptr %36, i32 0, i32 0
  store i32 %168, ptr %169, align 4
  %170 = getelementptr inbounds %"class.JPH::BroadPhaseCastResult", ptr %35, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %170, ptr align 4 %36, i64 4, i1 false), !tbaa.struct !30
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #9
  %171 = load float, ptr %29, align 4, !tbaa !28
  %172 = getelementptr inbounds %"class.JPH::BroadPhaseCastResult", ptr %35, i32 0, i32 1
  store float %171, ptr %172, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #9
  %173 = load ptr, ptr %10, align 8, !tbaa !5
  %174 = load ptr, ptr %19, align 8, !tbaa !5
  %175 = getelementptr inbounds %"class.JPH::SoftBodyShape", ptr %38, i32 0, i32 1
  %176 = load ptr, ptr %175, align 8, !tbaa !13
  %177 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3JPH24SoftBodyMotionProperties8GetFacesEv(ptr noundef nonnull align 16 dereferenceable(372) %176)
  %178 = call noundef ptr @_ZNK3JPH5ArrayINS_22SoftBodySharedSettings4FaceENS_12STLAllocatorIS2_EEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %177)
  %179 = ptrtoint ptr %174 to i64
  %180 = ptrtoint ptr %178 to i64
  %181 = sub i64 %179, %180
  %182 = sdiv exact i64 %181, 16
  %183 = trunc i64 %182 to i32
  %184 = load i32, ptr %13, align 4, !tbaa !11
  %185 = call i64 @_ZNK3JPH17SubShapeIDCreator6PushIDEjj(ptr noundef nonnull align 4 dereferenceable(8) %173, i32 noundef %183, i32 noundef %184)
  store i64 %185, ptr %37, align 4
  %186 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH17SubShapeIDCreator5GetIDEv(ptr noundef nonnull align 4 dereferenceable(8) %37)
  %187 = getelementptr inbounds %"class.JPH::RayCastResult", ptr %35, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %187, ptr align 4 %186, i64 4, i1 false), !tbaa.struct !30
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #9
  %188 = load ptr, ptr %11, align 8, !tbaa !5
  %189 = load ptr, ptr %188, align 8, !tbaa !9
  %190 = getelementptr inbounds ptr, ptr %189, i64 6
  %191 = load ptr, ptr %190, align 8
  call void %191(ptr noundef nonnull align 8 dereferenceable(24) %188, ptr noundef nonnull align 4 dereferenceable(12) %35)
  call void @llvm.lifetime.end.p0(i64 12, ptr %35) #9
  br label %192

192:                                              ; preds = %165, %139
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #9
  store i32 0, ptr %18, align 4
  br label %193

193:                                              ; preds = %192, %138
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #9
  %194 = load i32, ptr %18, align 4
  switch i32 %194, label %196 [
    i32 0, label %195
  ]

195:                                              ; preds = %193
  store i32 0, ptr %18, align 4
  br label %196

196:                                              ; preds = %195, %193
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  %197 = load i32, ptr %18, align 4
  switch i32 %197, label %204 [
    i32 0, label %198
    i32 3, label %199
  ]

198:                                              ; preds = %196
  br label %199

199:                                              ; preds = %198, %196
  %200 = load ptr, ptr %16, align 8, !tbaa !5
  %201 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::Face", ptr %200, i32 1
  store ptr %201, ptr %16, align 8, !tbaa !5
  br label %59

202:                                              ; preds = %63
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  br label %203

203:                                              ; preds = %202, %46
  ret void

204:                                              ; preds = %196
  unreachable
}

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZN3JPH16TransformedShape10sGetBodyIDEPKS0_(ptr noundef) #5 align 2

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !6, i64 32}
!14 = !{!"_ZTSN3JPH13SoftBodyShapeE", !15, i64 0, !6, i64 32}
!15 = !{!"_ZTSN3JPH5ShapeE", !16, i64 8, !19, i64 16, !20, i64 24, !21, i64 25}
!16 = !{!"_ZTSN3JPH9RefTargetINS_5ShapeEEE", !17, i64 0}
!17 = !{!"_ZTSSt6atomicIjE", !18, i64 0}
!18 = !{!"_ZTSSt13__atomic_baseIjE", !12, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = !{!"_ZTSN3JPH10EShapeTypeE", !7, i64 0}
!21 = !{!"_ZTSN3JPH13EShapeSubTypeE", !7, i64 0}
!22 = !{i64 0, i64 16, !23}
!23 = !{!7, !7, i64 0}
!24 = !{!25, !26, i64 0}
!25 = !{!"_ZTSN3JPH15RayCastSettingsE", !26, i64 0, !26, i64 1, !27, i64 2}
!26 = !{!"_ZTSN3JPH13EBackFaceModeE", !7, i64 0}
!27 = !{!"bool", !7, i64 0}
!28 = !{!29, !29, i64 0}
!29 = !{!"float", !7, i64 0}
!30 = !{i64 0, i64 4, !11}
!31 = !{!32, !29, i64 4}
!32 = !{!"_ZTSN3JPH20BroadPhaseCastResultE", !33, i64 0, !29, i64 4}
!33 = !{!"_ZTSN3JPH6BodyIDE", !12, i64 0}


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

%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::RayCastResult" = type { %"class.JPH::BroadPhaseCastResult", %"class.JPH::SubShapeID" }
%"class.JPH::BroadPhaseCastResult" = type { %"class.JPH::BodyID", float }
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::SubShapeID" = type { i32 }
%"class.JPH::SubShapeIDCreator" = type { %"class.JPH::SubShapeID", i32 }

; 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 uwtable
declare dso_local noundef i32 @_ZNK3JPH13SoftBodyShape17GetSubShapeIDBitsEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3JPH24SoftBodyMotionProperties8GetFacesEv(ptr noundef nonnull align 16 dereferenceable(372)) 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: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3JPH24SoftBodyMotionProperties11GetVerticesEv(ptr noundef nonnull align 16 dereferenceable(372)) local_unnamed_addr #3 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(80) ptr @_ZNK3JPH5ArrayINS_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 noundef float @_ZN3JPH11RayTriangleENS_4Vec3ES0_S0_S0_S0_(double, double, double, double, double, double, double, double, ptr noundef byval(%"class.JPH::Vec3") align 16) local_unnamed_addr #6

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZNK3JPH17SubShapeIDCreator6PushIDEjj(ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, i32 noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH13SoftBodyShape7CastRayERKNS_7RayCastERKNS_15RayCastSettingsERKNS_17SubShapeIDCreatorERNS_18CollisionCollectorINS_13RayCastResultENS_31CollisionCollectorTraitsCastRayEEERKNS_11ShapeFilterE(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr nocapture noundef nonnull readonly align 16 dereferenceable(32) %1, ptr nocapture noundef nonnull readonly align 1 dereferenceable(3) %2, ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(12) %5) unnamed_addr #1 align 2 {
  %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::RayCastResult", align 4
  %12 = alloca %"class.JPH::SubShapeIDCreator", align 8
  %13 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH17SubShapeIDCreator5GetIDEv(ptr noundef nonnull align 4 dereferenceable(8) %3)
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %14, i64 16
  %16 = load ptr, ptr %15, align 8
  %17 = tail call noundef zeroext i1 %16(ptr noundef nonnull align 8 dereferenceable(12) %5, ptr noundef nonnull %0, ptr noundef nonnull align 4 dereferenceable(4) %13)
  br i1 %17, label %18, label %.loopexit

18:                                               ; preds = %6
  %19 = tail call noundef i32 @_ZNK3JPH13SoftBodyShape17GetSubShapeIDBitsEv(ptr noundef nonnull align 8 dereferenceable(40) %0)
  %20 = getelementptr inbounds i8, ptr %0, i64 32
  %21 = load ptr, ptr %20, align 8, !tbaa !8
  %22 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3JPH24SoftBodyMotionProperties11GetVerticesEv(ptr noundef nonnull align 16 dereferenceable(372) %21)
  %23 = load ptr, ptr %20, align 8, !tbaa !8
  %24 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3JPH24SoftBodyMotionProperties8GetFacesEv(ptr noundef nonnull align 16 dereferenceable(372) %23)
  %25 = tail call noundef ptr @_ZNK3JPH5ArrayINS_22SoftBodySharedSettings4FaceENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %24)
  %26 = tail call noundef ptr @_ZNK3JPH5ArrayINS_22SoftBodySharedSettings4FaceENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %24)
  %.not45 = icmp eq ptr %25, %26
  br i1 %.not45, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %18
  %27 = getelementptr inbounds i8, ptr %10, i64 8
  %28 = getelementptr inbounds i8, ptr %9, i64 8
  %29 = getelementptr inbounds i8, ptr %1, i64 16
  %.sroa.210.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 24
  %.sroa.27.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 8
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 8
  %30 = getelementptr inbounds i8, ptr %11, i64 4
  %31 = getelementptr inbounds i8, ptr %11, i64 8
  br label %32

32:                                               ; preds = %.lr.ph, %82
  %.046 = phi ptr [ %25, %.lr.ph ], [ %83, %82 ]
  %33 = load i32, ptr %.046, align 4, !tbaa !20
  %34 = zext i32 %33 to i64
  %35 = call noundef nonnull align 16 dereferenceable(80) ptr @_ZNK3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %34)
  %36 = getelementptr inbounds i8, ptr %35, i64 16
  %.sroa.017.0.copyload = load double, ptr %36, align 16
  %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %35, i64 24
  %.sroa.6.0.copyload = load double, ptr %.sroa.6.0..sroa_idx, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #9
  %37 = getelementptr inbounds i8, ptr %.046, i64 4
  %38 = load i32, ptr %37, align 4, !tbaa !20
  %39 = zext i32 %38 to i64
  %40 = call noundef nonnull align 16 dereferenceable(80) ptr @_ZNK3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %39)
  %41 = getelementptr inbounds i8, ptr %40, i64 16
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %7, ptr noundef nonnull align 16 dereferenceable(16) %41, i64 16, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #9
  %42 = getelementptr inbounds i8, ptr %.046, i64 8
  %43 = load i32, ptr %42, align 4, !tbaa !20
  %44 = zext i32 %43 to i64
  %45 = call noundef nonnull align 16 dereferenceable(80) ptr @_ZNK3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %44)
  %46 = getelementptr inbounds i8, ptr %45, i64 16
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %8, ptr noundef nonnull align 16 dereferenceable(16) %46, i64 16, i1 false), !tbaa.struct !22
  %47 = load i8, ptr %2, align 1, !tbaa !23
  %48 = icmp eq i8 %47, 0
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #9
  br i1 %48, label %49, label %.critedge

49:                                               ; preds = %32
  %50 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %7, double %.sroa.017.0.copyload, double %.sroa.6.0.copyload)
  %51 = extractvalue { double, double } %50, 0
  store double %51, ptr %10, align 16
  %52 = extractvalue { double, double } %50, 1
  store double %52, ptr %27, align 8
  %53 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %8, double %.sroa.017.0.copyload, double %.sroa.6.0.copyload)
  %54 = extractvalue { double, double } %53, 0
  %55 = extractvalue { double, double } %53, 1
  %56 = call { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %10, double %54, double %55)
  %57 = extractvalue { double, double } %56, 0
  store double %57, ptr %9, align 16
  %58 = extractvalue { double, double } %56, 1
  store double %58, ptr %28, align 8
  %.sroa.09.0.copyload = load double, ptr %29, align 16
  %.sroa.210.0.copyload = load double, ptr %.sroa.210.0..sroa_idx, align 8, !tbaa !21
  %59 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %9, double %.sroa.09.0.copyload, double %.sroa.210.0.copyload)
  %60 = fcmp ogt float %59, 0.000000e+00
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #9
  br i1 %60, label %82, label %61

.critedge:                                        ; preds = %32
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #9
  br label %61

61:                                               ; preds = %.critedge, %49
  %.sroa.06.0.copyload = load double, ptr %1, align 16
  %.sroa.27.0.copyload = load double, ptr %.sroa.27.0..sroa_idx, align 8, !tbaa !21
  %.sroa.04.0.copyload = load double, ptr %29, align 16
  %.sroa.25.0.copyload = load double, ptr %.sroa.210.0..sroa_idx, align 8, !tbaa !21
  %.sroa.01.0.copyload = load double, ptr %7, align 16
  %.sroa.2.0.copyload = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !21
  %62 = call noundef float @_ZN3JPH11RayTriangleENS_4Vec3ES0_S0_S0_S0_(double %.sroa.06.0.copyload, double %.sroa.27.0.copyload, double %.sroa.04.0.copyload, double %.sroa.25.0.copyload, double %.sroa.017.0.copyload, double %.sroa.6.0.copyload, double %.sroa.01.0.copyload, double %.sroa.2.0.copyload, ptr noundef nonnull byval(%"class.JPH::Vec3") align 16 %8)
  %63 = call noundef float @_ZNK3JPH18CollisionCollectorINS_13RayCastResultENS_31CollisionCollectorTraitsCastRayEE19GetEarlyOutFractionEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %64 = fcmp olt float %62, %63
  br i1 %64, label %65, label %82

65:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #9
  call void @_ZN3JPH13RayCastResultC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %11)
  %66 = call noundef ptr @_ZNK3JPH18CollisionCollectorINS_13RayCastResultENS_31CollisionCollectorTraitsCastRayEE10GetContextEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %67 = call i32 @_ZN3JPH16TransformedShape10sGetBodyIDEPKS0_(ptr noundef %66)
  store i32 %67, ptr %11, align 4, !tbaa !20
  store float %62, ptr %30, align 4, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #9
  %68 = load ptr, ptr %20, align 8, !tbaa !8
  %69 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3JPH24SoftBodyMotionProperties8GetFacesEv(ptr noundef nonnull align 16 dereferenceable(372) %68)
  %70 = call noundef ptr @_ZNK3JPH5ArrayINS_22SoftBodySharedSettings4FaceENS_12STLAllocatorIS2_EEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %69)
  %71 = ptrtoint ptr %.046 to i64
  %72 = ptrtoint ptr %70 to i64
  %73 = sub i64 %71, %72
  %74 = lshr exact i64 %73, 4
  %75 = trunc i64 %74 to i32
  %76 = call i64 @_ZNK3JPH17SubShapeIDCreator6PushIDEjj(ptr noundef nonnull align 4 dereferenceable(8) %3, i32 noundef %75, i32 noundef %19)
  store i64 %76, ptr %12, align 8
  %77 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH17SubShapeIDCreator5GetIDEv(ptr noundef nonnull align 4 dereferenceable(8) %12)
  %78 = load i32, ptr %77, align 4, !tbaa !20
  store i32 %78, ptr %31, align 4, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #9
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = getelementptr inbounds i8, ptr %79, i64 48
  %81 = load ptr, ptr %80, align 8
  call void %81(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(12) %11)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #9
  br label %82

82:                                               ; preds = %61, %65, %49
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #9
  %83 = getelementptr inbounds i8, ptr %.046, i64 16
  %.not = icmp eq ptr %83, %26
  br i1 %.not, label %.loopexit, label %32

.loopexit:                                        ; preds = %82, %18, %6
  ret void
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZN3JPH16TransformedShape10sGetBodyIDEPKS0_(ptr noundef) local_unnamed_addr #5 align 2

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !19, i64 32}
!9 = !{!"_ZTSN3JPH13SoftBodyShapeE", !10, i64 0, !19, i64 32}
!10 = !{!"_ZTSN3JPH5ShapeE", !11, i64 8, !16, i64 16, !17, i64 24, !18, i64 25}
!11 = !{!"_ZTSN3JPH9RefTargetINS_5ShapeEEE", !12, i64 0}
!12 = !{!"_ZTSSt6atomicIjE", !13, i64 0}
!13 = !{!"_ZTSSt13__atomic_baseIjE", !14, i64 0}
!14 = !{!"int", !15, i64 0}
!15 = !{!"omnipotent char", !7, i64 0}
!16 = !{!"long", !15, i64 0}
!17 = !{!"_ZTSN3JPH10EShapeTypeE", !15, i64 0}
!18 = !{!"_ZTSN3JPH13EShapeSubTypeE", !15, i64 0}
!19 = !{!"any pointer", !15, i64 0}
!20 = !{!14, !14, i64 0}
!21 = !{!15, !15, i64 0}
!22 = !{i64 0, i64 16, !21}
!23 = !{!24, !25, i64 0}
!24 = !{!"_ZTSN3JPH15RayCastSettingsE", !25, i64 0, !25, i64 1, !26, i64 2}
!25 = !{!"_ZTSN3JPH13EBackFaceModeE", !15, i64 0}
!26 = !{!"bool", !15, i64 0}
!27 = !{!28, !30, i64 4}
!28 = !{!"_ZTSN3JPH20BroadPhaseCastResultE", !29, i64 0, !30, i64 4}
!29 = !{!"_ZTSN3JPH6BodyIDE", !14, i64 0}
!30 = !{!"float", !15, i64 0}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass