; LLVM IR from zig-gamedev/zphysics :: libs/Jolt/Physics/Collision/Shape (CylinderShape)

; 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.3 }
%union.anon.3 = type { <4 x float> }
%"struct.JPH::AssertLastParam" = type { i8 }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.9 }
%union.anon.9 = type { <4 x float> }
%"class.JPH::Plane" = type { %"class.JPH::Vec4" }
%"class.JPH::CylinderShape" = type { %"class.JPH::ConvexShape.base", float, float, float }
%"class.JPH::ConvexShape.base" = type <{ %"class.JPH::Shape.base", [6 x i8], %"class.JPH::RefConst", float }>
%"class.JPH::Shape.base" = type <{ ptr, %"class.JPH::RefTarget.7", [4 x i8], i64, i8, i8 }>
%"class.JPH::RefTarget.7" = type { %"struct.std::atomic" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"class.JPH::RefConst" = type { ptr }
%"class.JPH::SoftBodyVertex" = type { %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Plane", i32, i8, float, float }

@.str.7 = external hidden unnamed_addr constant [106 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [22 x i8], align 1

; 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: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16), float noundef, float noundef, float noundef) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH13CylinderShape12IsValidScaleENS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(56), double, double) unnamed_addr #3 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) #4

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH13CylinderShape23CollideSoftBodyVerticesERKNS_5Mat44ENS_4Vec3EPNS_14SoftBodyVertexEjfS4_i(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 16 dereferenceable(64) %1, double %2, double %3, ptr noundef %4, i32 noundef %5, float noundef %6, double %7, double %8, i32 noundef %9) unnamed_addr #3 align 2 {
  %11 = alloca %"class.JPH::Vec3", align 16
  %12 = alloca %"class.JPH::Vec3", align 16
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca float, align 4
  %18 = alloca i32, align 4
  %19 = alloca %"class.JPH::Vec3", align 16
  %20 = alloca %"struct.JPH::AssertLastParam", align 1
  %21 = alloca %"class.JPH::Mat44", align 16
  %22 = alloca %"class.JPH::Vec3", align 16
  %23 = alloca float, align 4
  %24 = alloca float, align 4
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca %"class.JPH::Vec3", align 16
  %28 = alloca %"class.JPH::Vec3", align 16
  %29 = alloca %"class.JPH::Vec3", align 16
  %30 = alloca float, align 4
  %31 = alloca float, align 4
  %32 = alloca float, align 4
  %33 = alloca %"class.JPH::Vec3", align 16
  %34 = alloca %"class.JPH::Vec3", align 16
  %35 = alloca %"class.JPH::Vec3", align 16
  %36 = alloca %"class.JPH::Vec3", align 16
  %37 = alloca %"class.JPH::Vec3", align 16
  %38 = alloca %"class.JPH::Vec3", align 16
  %39 = alloca %"class.JPH::Vec3", align 16
  %40 = alloca %"class.JPH::Vec3", align 16
  %41 = alloca %"class.JPH::Vec3", align 16
  %42 = alloca %"class.JPH::Vec3", align 16
  %43 = alloca %"class.JPH::Vec3", align 16
  %44 = alloca %"class.JPH::Vec3", align 16
  %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::Plane", align 16
  %49 = alloca %"class.JPH::Vec3", align 16
  %50 = alloca %"class.JPH::Vec3", align 16
  %51 = alloca float, align 4
  %52 = alloca %"class.JPH::Vec3", align 16
  %53 = alloca %"class.JPH::Plane", align 16
  %54 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 0
  store double %2, ptr %54, align 16
  %55 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 1
  store double %3, ptr %55, align 8
  %56 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 0
  store double %7, ptr %56, align 16
  %57 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 1
  store double %8, ptr %57, align 8
  store ptr %0, ptr %13, align 8, !tbaa !5
  store ptr %1, ptr %14, align 8, !tbaa !5
  store ptr %4, ptr %15, align 8, !tbaa !5
  store i32 %5, ptr %16, align 4, !tbaa !9
  store float %6, ptr %17, align 4, !tbaa !11
  store i32 %9, ptr %18, align 4, !tbaa !9
  %58 = load ptr, ptr %13, align 8
  br label %59

59:                                               ; preds = %10
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %19, ptr align 16 %11, i64 16, i1 false), !tbaa.struct !13
  %60 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 0
  %61 = load double, ptr %60, align 16
  %62 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 1
  %63 = load double, ptr %62, align 8
  %64 = call noundef zeroext i1 @_ZNK3JPH13CylinderShape12IsValidScaleENS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(56) %58, double %61, double %63)
  br i1 %64, label %68, label %65

65:                                               ; preds = %59
  %66 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.10, ptr noundef @.str.7, i32 noundef 306)
  br i1 %66, label %67, label %68

67:                                               ; preds = %65
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #8, !srcloc !15
  br label %68

68:                                               ; preds = %67, %65, %59
  br label %69

69:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 64, ptr %21) #8
  %70 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZNK3JPH5Mat4427InversedRotationTranslationEv(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %21, ptr noundef nonnull align 16 dereferenceable(64) %70)
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #8
  %71 = call { double, double } @_ZNK3JPH4Vec33AbsEv(ptr noundef nonnull align 16 dereferenceable(16) %11)
  %72 = getelementptr inbounds %"class.JPH::Vec3", ptr %22, i32 0, i32 0
  %73 = getelementptr inbounds %union.anon.3, ptr %72, i32 0, i32 0
  %74 = getelementptr inbounds { double, double }, ptr %73, i32 0, i32 0
  %75 = extractvalue { double, double } %71, 0
  store double %75, ptr %74, align 16
  %76 = getelementptr inbounds { double, double }, ptr %73, i32 0, i32 1
  %77 = extractvalue { double, double } %71, 1
  store double %77, ptr %76, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  %78 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %22)
  %79 = getelementptr inbounds %"class.JPH::CylinderShape", ptr %58, i32 0, i32 1
  %80 = load float, ptr %79, align 4, !tbaa !16
  %81 = fmul float %78, %80
  store float %81, ptr %23, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  %82 = call noundef float @_ZNK3JPH4Vec34GetXEv(ptr noundef nonnull align 16 dereferenceable(16) %22)
  %83 = getelementptr inbounds %"class.JPH::CylinderShape", ptr %58, i32 0, i32 2
  %84 = load float, ptr %83, align 8, !tbaa !27
  %85 = fmul float %82, %84
  store float %85, ptr %24, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  %86 = load ptr, ptr %15, align 8, !tbaa !5
  store ptr %86, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #8
  %87 = load ptr, ptr %15, align 8, !tbaa !5
  %88 = load i32, ptr %16, align 4, !tbaa !9
  %89 = zext i32 %88 to i64
  %90 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %87, i64 %89
  store ptr %90, ptr %26, align 8, !tbaa !5
  br label %91

91:                                               ; preds = %284, %69
  %92 = load ptr, ptr %25, align 8, !tbaa !5
  %93 = load ptr, ptr %26, align 8, !tbaa !5
  %94 = icmp ult ptr %92, %93
  br i1 %94, label %96, label %95

95:                                               ; preds = %91
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  br label %287

96:                                               ; preds = %91
  %97 = load ptr, ptr %25, align 8, !tbaa !5
  %98 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %97, i32 0, i32 7
  %99 = load float, ptr %98, align 4, !tbaa !28
  %100 = fcmp ogt float %99, 0.000000e+00
  br i1 %100, label %101, label %283

101:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #8
  %102 = load ptr, ptr %25, align 8, !tbaa !5
  %103 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %102, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %28, ptr align 16 %103, i64 16, i1 false), !tbaa.struct !13
  %104 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 0
  %105 = load double, ptr %104, align 16
  %106 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 1
  %107 = load double, ptr %106, align 8
  %108 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %21, double %105, double %107)
  %109 = getelementptr inbounds %"class.JPH::Vec3", ptr %27, i32 0, i32 0
  %110 = getelementptr inbounds %union.anon.3, ptr %109, i32 0, i32 0
  %111 = getelementptr inbounds { double, double }, ptr %110, i32 0, i32 0
  %112 = extractvalue { double, double } %108, 0
  store double %112, ptr %111, align 16
  %113 = getelementptr inbounds { double, double }, ptr %110, i32 0, i32 1
  %114 = extractvalue { double, double } %108, 1
  store double %114, ptr %113, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %29, ptr align 16 %27, i64 16, i1 false), !tbaa.struct !13
  call void @_ZN3JPH4Vec34SetYEf(ptr noundef nonnull align 16 dereferenceable(16) %29, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #8
  %115 = call noundef float @_ZNK3JPH4Vec36LengthEv(ptr noundef nonnull align 16 dereferenceable(16) %29)
  store float %115, ptr %30, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #8
  %116 = load float, ptr %24, align 4, !tbaa !11
  %117 = load float, ptr %30, align 4, !tbaa !11
  %118 = fsub float %116, %117
  store float %118, ptr %31, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #8
  %119 = load float, ptr %23, align 4, !tbaa !11
  %120 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %27)
  %121 = call noundef float @_ZSt3absf(float noundef %120)
  %122 = fsub float %119, %121
  store float %122, ptr %32, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %33) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %34) #8
  %123 = load float, ptr %31, align 4, !tbaa !11
  %124 = fcmp olt float %123, 0.000000e+00
  br i1 %124, label %125, label %183

125:                                              ; preds = %101
  %126 = load float, ptr %32, align 4, !tbaa !11
  %127 = fcmp olt float %126, 0.000000e+00
  br i1 %127, label %128, label %183

128:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 16, ptr %35) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %36) #8
  %129 = load float, ptr %24, align 4, !tbaa !11
  %130 = load float, ptr %30, align 4, !tbaa !11
  %131 = fdiv float %129, %130
  %132 = call { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16) %29, float noundef %131)
  %133 = getelementptr inbounds %"class.JPH::Vec3", ptr %36, i32 0, i32 0
  %134 = getelementptr inbounds %union.anon.3, ptr %133, i32 0, i32 0
  %135 = getelementptr inbounds { double, double }, ptr %134, i32 0, i32 0
  %136 = extractvalue { double, double } %132, 0
  store double %136, ptr %135, align 16
  %137 = getelementptr inbounds { double, double }, ptr %134, i32 0, i32 1
  %138 = extractvalue { double, double } %132, 1
  store double %138, ptr %137, align 8
  %139 = load float, ptr %23, align 4, !tbaa !11
  %140 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %27)
  %141 = call noundef float @_ZN3JPH4SignIfEET_S1_(float noundef %140)
  %142 = fmul float %139, %141
  call void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %37, float noundef 0.000000e+00, float noundef %142, float noundef 0.000000e+00)
  %143 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 0
  %144 = load double, ptr %143, align 16
  %145 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 1
  %146 = load double, ptr %145, align 8
  %147 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %36, double %144, double %146)
  %148 = getelementptr inbounds %"class.JPH::Vec3", ptr %35, i32 0, i32 0
  %149 = getelementptr inbounds %union.anon.3, ptr %148, i32 0, i32 0
  %150 = getelementptr inbounds { double, double }, ptr %149, i32 0, i32 0
  %151 = extractvalue { double, double } %147, 0
  store double %151, ptr %150, align 16
  %152 = getelementptr inbounds { double, double }, ptr %149, i32 0, i32 1
  %153 = extractvalue { double, double } %147, 1
  store double %153, ptr %152, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %33, ptr align 16 %35, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %35) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %38) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %39) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %40, ptr align 16 %33, i64 16, i1 false), !tbaa.struct !13
  %154 = getelementptr inbounds { double, double }, ptr %40, i32 0, i32 0
  %155 = load double, ptr %154, align 16
  %156 = getelementptr inbounds { double, double }, ptr %40, i32 0, i32 1
  %157 = load double, ptr %156, align 8
  %158 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %27, double %155, double %157)
  %159 = getelementptr inbounds %"class.JPH::Vec3", ptr %39, i32 0, i32 0
  %160 = getelementptr inbounds %union.anon.3, ptr %159, i32 0, i32 0
  %161 = getelementptr inbounds { double, double }, ptr %160, i32 0, i32 0
  %162 = extractvalue { double, double } %158, 0
  store double %162, ptr %161, align 16
  %163 = getelementptr inbounds { double, double }, ptr %160, i32 0, i32 1
  %164 = extractvalue { double, double } %158, 1
  store double %164, ptr %163, align 8
  %165 = call { double, double } @_ZN3JPH4Vec36sAxisYEv()
  %166 = getelementptr inbounds %"class.JPH::Vec3", ptr %41, i32 0, i32 0
  %167 = getelementptr inbounds %union.anon.3, ptr %166, i32 0, i32 0
  %168 = getelementptr inbounds { double, double }, ptr %167, i32 0, i32 0
  %169 = extractvalue { double, double } %165, 0
  store double %169, ptr %168, align 16
  %170 = getelementptr inbounds { double, double }, ptr %167, i32 0, i32 1
  %171 = extractvalue { double, double } %165, 1
  store double %171, ptr %170, align 8
  %172 = getelementptr inbounds { double, double }, ptr %41, i32 0, i32 0
  %173 = load double, ptr %172, align 16
  %174 = getelementptr inbounds { double, double }, ptr %41, i32 0, i32 1
  %175 = load double, ptr %174, align 8
  %176 = call { double, double } @_ZNK3JPH4Vec312NormalizedOrES0_(ptr noundef nonnull align 16 dereferenceable(16) %39, double %173, double %175)
  %177 = getelementptr inbounds %"class.JPH::Vec3", ptr %38, i32 0, i32 0
  %178 = getelementptr inbounds %union.anon.3, ptr %177, i32 0, i32 0
  %179 = getelementptr inbounds { double, double }, ptr %178, i32 0, i32 0
  %180 = extractvalue { double, double } %176, 0
  store double %180, ptr %179, align 16
  %181 = getelementptr inbounds { double, double }, ptr %178, i32 0, i32 1
  %182 = extractvalue { double, double } %176, 1
  store double %182, ptr %181, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %34, ptr align 16 %38, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 16, ptr %39) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %38) #8
  br label %236

183:                                              ; preds = %125, %101
  %184 = load float, ptr %31, align 4, !tbaa !11
  %185 = load float, ptr %32, align 4, !tbaa !11
  %186 = fcmp olt float %184, %185
  br i1 %186, label %187, label %220

187:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 16, ptr %42) #8
  %188 = load float, ptr %30, align 4, !tbaa !11
  %189 = fcmp ogt float %188, 0.000000e+00
  br i1 %189, label %190, label %199

190:                                              ; preds = %187
  %191 = load float, ptr %30, align 4, !tbaa !11
  %192 = call { double, double } @_ZNK3JPH4Vec3dvEf(ptr noundef nonnull align 16 dereferenceable(16) %29, float noundef %191)
  %193 = getelementptr inbounds %"class.JPH::Vec3", ptr %42, i32 0, i32 0
  %194 = getelementptr inbounds %union.anon.3, ptr %193, i32 0, i32 0
  %195 = getelementptr inbounds { double, double }, ptr %194, i32 0, i32 0
  %196 = extractvalue { double, double } %192, 0
  store double %196, ptr %195, align 16
  %197 = getelementptr inbounds { double, double }, ptr %194, i32 0, i32 1
  %198 = extractvalue { double, double } %192, 1
  store double %198, ptr %197, align 8
  br label %207

199:                                              ; preds = %187
  %200 = call { double, double } @_ZN3JPH4Vec36sAxisXEv()
  %201 = getelementptr inbounds %"class.JPH::Vec3", ptr %42, i32 0, i32 0
  %202 = getelementptr inbounds %union.anon.3, ptr %201, i32 0, i32 0
  %203 = getelementptr inbounds { double, double }, ptr %202, i32 0, i32 0
  %204 = extractvalue { double, double } %200, 0
  store double %204, ptr %203, align 16
  %205 = getelementptr inbounds { double, double }, ptr %202, i32 0, i32 1
  %206 = extractvalue { double, double } %200, 1
  store double %206, ptr %205, align 8
  br label %207

207:                                              ; preds = %199, %190
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %34, ptr align 16 %42, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 16, ptr %42) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %43) #8
  %208 = load float, ptr %24, align 4, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %44, ptr align 16 %34, i64 16, i1 false), !tbaa.struct !13
  %209 = getelementptr inbounds { double, double }, ptr %44, i32 0, i32 0
  %210 = load double, ptr %209, align 16
  %211 = getelementptr inbounds { double, double }, ptr %44, i32 0, i32 1
  %212 = load double, ptr %211, align 8
  %213 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %208, double %210, double %212)
  %214 = getelementptr inbounds %"class.JPH::Vec3", ptr %43, i32 0, i32 0
  %215 = getelementptr inbounds %union.anon.3, ptr %214, i32 0, i32 0
  %216 = getelementptr inbounds { double, double }, ptr %215, i32 0, i32 0
  %217 = extractvalue { double, double } %213, 0
  store double %217, ptr %216, align 16
  %218 = getelementptr inbounds { double, double }, ptr %215, i32 0, i32 1
  %219 = extractvalue { double, double } %213, 1
  store double %219, ptr %218, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %33, ptr align 16 %43, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 16, ptr %43) #8
  br label %235

220:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 16, ptr %45) #8
  %221 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %27)
  %222 = call noundef float @_ZN3JPH4SignIfEET_S1_(float noundef %221)
  call void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %45, float noundef 0.000000e+00, float noundef %222, float noundef 0.000000e+00)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %34, ptr align 16 %45, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 16, ptr %45) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %46) #8
  %223 = load float, ptr %23, align 4, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %47, ptr align 16 %34, i64 16, i1 false), !tbaa.struct !13
  %224 = getelementptr inbounds { double, double }, ptr %47, i32 0, i32 0
  %225 = load double, ptr %224, align 16
  %226 = getelementptr inbounds { double, double }, ptr %47, i32 0, i32 1
  %227 = load double, ptr %226, align 8
  %228 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %223, double %225, double %227)
  %229 = getelementptr inbounds %"class.JPH::Vec3", ptr %46, i32 0, i32 0
  %230 = getelementptr inbounds %union.anon.3, ptr %229, i32 0, i32 0
  %231 = getelementptr inbounds { double, double }, ptr %230, i32 0, i32 0
  %232 = extractvalue { double, double } %228, 0
  store double %232, ptr %231, align 16
  %233 = getelementptr inbounds { double, double }, ptr %230, i32 0, i32 1
  %234 = extractvalue { double, double } %228, 1
  store double %234, ptr %233, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %33, ptr align 16 %46, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 16, ptr %46) #8
  br label %235

235:                                              ; preds = %220, %207
  br label %236

236:                                              ; preds = %235, %128
  call void @llvm.lifetime.start.p0(i64 16, ptr %48) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %49, ptr align 16 %33, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %50, ptr align 16 %34, i64 16, i1 false), !tbaa.struct !13
  %237 = getelementptr inbounds { double, double }, ptr %49, i32 0, i32 0
  %238 = load double, ptr %237, align 16
  %239 = getelementptr inbounds { double, double }, ptr %49, i32 0, i32 1
  %240 = load double, ptr %239, align 8
  %241 = getelementptr inbounds { double, double }, ptr %50, i32 0, i32 0
  %242 = load double, ptr %241, align 16
  %243 = getelementptr inbounds { double, double }, ptr %50, i32 0, i32 1
  %244 = load double, ptr %243, align 8
  %245 = call { double, double } @_ZN3JPH5Plane19sFromPointAndNormalENS_4Vec3ES1_(double %238, double %240, double %242, double %244)
  %246 = getelementptr inbounds %"class.JPH::Plane", ptr %48, i32 0, i32 0
  %247 = getelementptr inbounds %"class.JPH::Vec4", ptr %246, i32 0, i32 0
  %248 = getelementptr inbounds %union.anon.9, ptr %247, i32 0, i32 0
  %249 = getelementptr inbounds { double, double }, ptr %248, i32 0, i32 0
  %250 = extractvalue { double, double } %245, 0
  store double %250, ptr %249, align 16
  %251 = getelementptr inbounds { double, double }, ptr %248, i32 0, i32 1
  %252 = extractvalue { double, double } %245, 1
  store double %252, ptr %251, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %51) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %52, ptr align 16 %27, i64 16, i1 false), !tbaa.struct !13
  %253 = getelementptr inbounds { double, double }, ptr %52, i32 0, i32 0
  %254 = load double, ptr %253, align 16
  %255 = getelementptr inbounds { double, double }, ptr %52, i32 0, i32 1
  %256 = load double, ptr %255, align 8
  %257 = call noundef float @_ZNK3JPH5Plane14SignedDistanceENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(16) %48, double %254, double %256)
  %258 = fneg float %257
  store float %258, ptr %51, align 4, !tbaa !11
  %259 = load float, ptr %51, align 4, !tbaa !11
  %260 = load ptr, ptr %25, align 8, !tbaa !5
  %261 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %260, i32 0, i32 6
  %262 = load float, ptr %261, align 8, !tbaa !34
  %263 = fcmp ogt float %259, %262
  br i1 %263, label %264, label %282

264:                                              ; preds = %236
  %265 = load float, ptr %51, align 4, !tbaa !11
  %266 = load ptr, ptr %25, align 8, !tbaa !5
  %267 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %266, i32 0, i32 6
  store float %265, ptr %267, align 8, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 16, ptr %53) #8
  %268 = load ptr, ptr %14, align 8, !tbaa !5
  %269 = call { double, double } @_ZNK3JPH5Plane14GetTransformedERKNS_5Mat44E(ptr noundef nonnull align 16 dereferenceable(16) %48, ptr noundef nonnull align 16 dereferenceable(64) %268)
  %270 = getelementptr inbounds %"class.JPH::Plane", ptr %53, i32 0, i32 0
  %271 = getelementptr inbounds %"class.JPH::Vec4", ptr %270, i32 0, i32 0
  %272 = getelementptr inbounds %union.anon.9, ptr %271, i32 0, i32 0
  %273 = getelementptr inbounds { double, double }, ptr %272, i32 0, i32 0
  %274 = extractvalue { double, double } %269, 0
  store double %274, ptr %273, align 16
  %275 = getelementptr inbounds { double, double }, ptr %272, i32 0, i32 1
  %276 = extractvalue { double, double } %269, 1
  store double %276, ptr %275, align 8
  %277 = load ptr, ptr %25, align 8, !tbaa !5
  %278 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %277, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %278, ptr align 16 %53, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 16, ptr %53) #8
  %279 = load i32, ptr %18, align 4, !tbaa !9
  %280 = load ptr, ptr %25, align 8, !tbaa !5
  %281 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %280, i32 0, i32 4
  store i32 %279, ptr %281, align 16, !tbaa !35
  br label %282

282:                                              ; preds = %264, %236
  call void @llvm.lifetime.end.p0(i64 4, ptr %51) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %48) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #8
  br label %283

283:                                              ; preds = %282, %96
  br label %284

284:                                              ; preds = %283
  %285 = load ptr, ptr %25, align 8, !tbaa !5
  %286 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %285, i32 1
  store ptr %286, ptr %25, align 8, !tbaa !5
  br label %91, !llvm.loop !36

287:                                              ; preds = %95
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr %21) #8
  ret void
}

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZNK3JPH5Mat4427InversedRotationTranslationEv(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, ptr noundef nonnull align 16 dereferenceable(64)) #7 align 2

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

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

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

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

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

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

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

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{i64 0, i64 16, !14}
!14 = !{!7, !7, i64 0}
!15 = !{i64 2157741606}
!16 = !{!17, !12, i64 44}
!17 = !{!"_ZTSN3JPH13CylinderShapeE", !18, i64 0, !12, i64 44, !12, i64 48, !12, i64 52}
!18 = !{!"_ZTSN3JPH11ConvexShapeE", !19, i64 0, !26, i64 32, !12, i64 40}
!19 = !{!"_ZTSN3JPH5ShapeE", !20, i64 8, !23, i64 16, !24, i64 24, !25, i64 25}
!20 = !{!"_ZTSN3JPH9RefTargetINS_5ShapeEEE", !21, i64 0}
!21 = !{!"_ZTSSt6atomicIjE", !22, i64 0}
!22 = !{!"_ZTSSt13__atomic_baseIjE", !10, i64 0}
!23 = !{!"long", !7, i64 0}
!24 = !{!"_ZTSN3JPH10EShapeTypeE", !7, i64 0}
!25 = !{!"_ZTSN3JPH13EShapeSubTypeE", !7, i64 0}
!26 = !{!"_ZTSN3JPH8RefConstINS_15PhysicsMaterialEEE", !6, i64 0}
!27 = !{!17, !12, i64 48}
!28 = !{!29, !12, i64 76}
!29 = !{!"_ZTSN3JPH14SoftBodyVertexE", !30, i64 0, !30, i64 16, !30, i64 32, !31, i64 48, !10, i64 64, !33, i64 68, !12, i64 72, !12, i64 76}
!30 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!31 = !{!"_ZTSN3JPH5PlaneE", !32, i64 0}
!32 = !{!"_ZTSN3JPH4Vec4E", !7, i64 0}
!33 = !{!"bool", !7, i64 0}
!34 = !{!29, !12, i64 72}
!35 = !{!29, !10, i64 64}
!36 = distinct !{!36, !37}
!37 = !{!"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.3 }
%union.anon.3 = type { <4 x float> }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.9 }
%union.anon.9 = type { <4 x float> }
%"class.JPH::Plane" = type { %"class.JPH::Vec4" }
%"class.JPH::SoftBodyVertex" = type { %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Plane", i32, i8, float, float }

@.str.7 = external hidden unnamed_addr constant [106 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [22 x i8], align 1

; 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: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16), float noundef, float noundef, float noundef) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH13CylinderShape12IsValidScaleENS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(56), double, double) unnamed_addr #3 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) #4

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH13CylinderShape23CollideSoftBodyVerticesERKNS_5Mat44ENS_4Vec3EPNS_14SoftBodyVertexEjfS4_i(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 16 dereferenceable(64) %1, double %2, double %3, ptr noundef %4, i32 noundef %5, float noundef %6, double %7, double %8, i32 noundef %9) unnamed_addr #3 align 2 {
  %11 = alloca %"class.JPH::Vec3", align 16
  %12 = alloca %"class.JPH::Mat44", 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::Plane", align 16
  store double %2, ptr %11, align 16
  %21 = getelementptr inbounds i8, ptr %11, i64 8
  store double %3, ptr %21, align 8
  %22 = tail call noundef zeroext i1 @_ZNK3JPH13CylinderShape12IsValidScaleENS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(56) %0, double %2, double %3)
  br i1 %22, label %26, label %23

23:                                               ; preds = %10
  %24 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.7, i32 noundef 306)
  br i1 %24, label %25, label %26

25:                                               ; preds = %23
  tail call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #8, !srcloc !5
  br label %26

26:                                               ; preds = %10, %23, %25
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %12) #8
  call void @_ZNK3JPH5Mat4427InversedRotationTranslationEv(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %12, ptr noundef nonnull align 16 dereferenceable(64) %1)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #8
  %27 = call { double, double } @_ZNK3JPH4Vec33AbsEv(ptr noundef nonnull align 16 dereferenceable(16) %11)
  %28 = extractvalue { double, double } %27, 0
  store double %28, ptr %13, align 16
  %29 = getelementptr inbounds i8, ptr %13, i64 8
  %30 = extractvalue { double, double } %27, 1
  store double %30, ptr %29, align 8
  %31 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %13)
  %32 = getelementptr inbounds i8, ptr %0, i64 44
  %33 = load float, ptr %32, align 4, !tbaa !6
  %34 = fmul float %31, %33
  %35 = call noundef float @_ZNK3JPH4Vec34GetXEv(ptr noundef nonnull align 16 dereferenceable(16) %13)
  %36 = getelementptr inbounds i8, ptr %0, i64 48
  %37 = load float, ptr %36, align 8, !tbaa !22
  %38 = fmul float %35, %37
  %39 = zext i32 %5 to i64
  %40 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %4, i64 %39
  %.not = icmp eq i32 %5, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %26
  %41 = getelementptr inbounds i8, ptr %14, i64 8
  %.sroa.8.0..sroa_idx = getelementptr inbounds i8, ptr %19, i64 8
  %42 = getelementptr inbounds i8, ptr %16, i64 8
  %43 = getelementptr inbounds i8, ptr %17, i64 8
  %44 = getelementptr inbounds i8, ptr %18, i64 8
  %45 = getelementptr inbounds i8, ptr %20, i64 8
  br label %46

._crit_edge:                                      ; preds = %118, %26
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %12) #8
  ret void

46:                                               ; preds = %.lr.ph, %118
  %.064 = phi ptr [ %4, %.lr.ph ], [ %119, %118 ]
  %47 = getelementptr inbounds i8, ptr %.064, i64 76
  %48 = load float, ptr %47, align 4, !tbaa !23
  %49 = fcmp ogt float %48, 0.000000e+00
  br i1 %49, label %50, label %118

50:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #8
  %51 = getelementptr inbounds i8, ptr %.064, i64 16
  %.sroa.035.0.copyload = load double, ptr %51, align 16
  %.sroa.236.0..sroa_idx = getelementptr inbounds i8, ptr %.064, i64 24
  %.sroa.236.0.copyload = load double, ptr %.sroa.236.0..sroa_idx, align 8, !tbaa !29
  %52 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %12, double %.sroa.035.0.copyload, double %.sroa.236.0.copyload)
  %53 = extractvalue { double, double } %52, 0
  store double %53, ptr %14, align 16
  %54 = extractvalue { double, double } %52, 1
  store double %54, ptr %41, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %15, ptr noundef nonnull align 16 dereferenceable(16) %14, i64 16, i1 false), !tbaa.struct !30
  call void @_ZN3JPH4Vec34SetYEf(ptr noundef nonnull align 16 dereferenceable(16) %15, float noundef 0.000000e+00)
  %55 = call noundef float @_ZNK3JPH4Vec36LengthEv(ptr noundef nonnull align 16 dereferenceable(16) %15)
  %56 = fsub float %38, %55
  %57 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %14)
  %58 = call noundef float @_ZSt3absf(float noundef %57)
  %59 = fsub float %34, %58
  %60 = fcmp olt float %56, 0.000000e+00
  %61 = fcmp olt float %59, 0.000000e+00
  %or.cond = select i1 %60, i1 %61, i1 false
  br i1 %or.cond, label %62, label %84

62:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #8
  %63 = fdiv float %38, %55
  %64 = call { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16) %15, float noundef %63)
  %65 = extractvalue { double, double } %64, 0
  store double %65, ptr %16, align 16
  %66 = extractvalue { double, double } %64, 1
  store double %66, ptr %42, align 8
  %67 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %14)
  %68 = call noundef float @_ZN3JPH4SignIfEET_S1_(float noundef %67)
  %69 = fmul float %34, %68
  call void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %17, float noundef 0.000000e+00, float noundef %69, float noundef 0.000000e+00)
  %70 = load double, ptr %17, align 16
  %71 = load double, ptr %43, align 8
  %72 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %16, double %70, double %71)
  %73 = extractvalue { double, double } %72, 0
  %74 = extractvalue { double, double } %72, 1
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) #8
  %75 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %14, double %73, double %74)
  %76 = extractvalue { double, double } %75, 0
  store double %76, ptr %18, align 16
  %77 = extractvalue { double, double } %75, 1
  store double %77, ptr %44, align 8
  %78 = call { double, double } @_ZN3JPH4Vec36sAxisYEv()
  %79 = extractvalue { double, double } %78, 0
  %80 = extractvalue { double, double } %78, 1
  %81 = call { double, double } @_ZNK3JPH4Vec312NormalizedOrES0_(ptr noundef nonnull align 16 dereferenceable(16) %18, double %79, double %80)
  %82 = extractvalue { double, double } %81, 0
  %83 = extractvalue { double, double } %81, 1
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #8
  br label %102

84:                                               ; preds = %50
  %85 = fcmp olt float %56, %59
  br i1 %85, label %86, label %96

86:                                               ; preds = %84
  %87 = fcmp ogt float %55, 0.000000e+00
  br i1 %87, label %88, label %90

88:                                               ; preds = %86
  %89 = call { double, double } @_ZNK3JPH4Vec3dvEf(ptr noundef nonnull align 16 dereferenceable(16) %15, float noundef %55)
  br label %92

90:                                               ; preds = %86
  %91 = call { double, double } @_ZN3JPH4Vec36sAxisXEv()
  br label %92

92:                                               ; preds = %90, %88
  %.pn = phi { double, double } [ %89, %88 ], [ %91, %90 ]
  %.sroa.5.0 = extractvalue { double, double } %.pn, 1
  %.sroa.016.0 = extractvalue { double, double } %.pn, 0
  %93 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %38, double %.sroa.016.0, double %.sroa.5.0)
  %94 = extractvalue { double, double } %93, 0
  %95 = extractvalue { double, double } %93, 1
  br label %102

96:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %19) #8
  %97 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %14)
  %98 = call noundef float @_ZN3JPH4SignIfEET_S1_(float noundef %97)
  call void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %19, float noundef 0.000000e+00, float noundef %98, float noundef 0.000000e+00)
  %.sroa.025.0.copyload = load double, ptr %19, align 16
  %.sroa.8.0.copyload = load double, ptr %.sroa.8.0..sroa_idx, align 8, !tbaa !29
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #8
  %99 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %34, double %.sroa.025.0.copyload, double %.sroa.8.0.copyload)
  %100 = extractvalue { double, double } %99, 0
  %101 = extractvalue { double, double } %99, 1
  br label %102

102:                                              ; preds = %92, %96, %62
  %.sroa.025.0 = phi double [ %82, %62 ], [ %.sroa.016.0, %92 ], [ %.sroa.025.0.copyload, %96 ]
  %.sroa.8.0 = phi double [ %83, %62 ], [ %.sroa.5.0, %92 ], [ %.sroa.8.0.copyload, %96 ]
  %.sroa.026.0 = phi double [ %73, %62 ], [ %94, %92 ], [ %100, %96 ]
  %.sroa.7.0 = phi double [ %74, %62 ], [ %95, %92 ], [ %101, %96 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %20) #8
  %103 = call { double, double } @_ZN3JPH5Plane19sFromPointAndNormalENS_4Vec3ES1_(double %.sroa.026.0, double %.sroa.7.0, double %.sroa.025.0, double %.sroa.8.0)
  %104 = extractvalue { double, double } %103, 0
  store double %104, ptr %20, align 16
  %105 = extractvalue { double, double } %103, 1
  store double %105, ptr %45, align 8
  %.sroa.02.0.copyload = load double, ptr %14, align 16
  %.sroa.2.0.copyload = load double, ptr %41, align 8, !tbaa !29
  %106 = call noundef float @_ZNK3JPH5Plane14SignedDistanceENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(16) %20, double %.sroa.02.0.copyload, double %.sroa.2.0.copyload)
  %107 = fneg float %106
  %108 = getelementptr inbounds i8, ptr %.064, i64 72
  %109 = load float, ptr %108, align 8, !tbaa !31
  %110 = fcmp olt float %109, %107
  br i1 %110, label %111, label %117

111:                                              ; preds = %102
  store float %107, ptr %108, align 8, !tbaa !31
  %112 = call { double, double } @_ZNK3JPH5Plane14GetTransformedERKNS_5Mat44E(ptr noundef nonnull align 16 dereferenceable(16) %20, ptr noundef nonnull align 16 dereferenceable(64) %1)
  %113 = extractvalue { double, double } %112, 0
  %114 = extractvalue { double, double } %112, 1
  %115 = getelementptr inbounds i8, ptr %.064, i64 48
  store double %113, ptr %115, align 16
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %.064, i64 56
  store double %114, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !29
  %116 = getelementptr inbounds i8, ptr %.064, i64 64
  store i32 %9, ptr %116, align 16, !tbaa !32
  br label %117

117:                                              ; preds = %111, %102
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #8
  br label %118

118:                                              ; preds = %46, %117
  %119 = getelementptr inbounds i8, ptr %.064, i64 80
  %120 = icmp ult ptr %119, %40
  br i1 %120, label %46, label %._crit_edge, !llvm.loop !33
}

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

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

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

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec312NormalizedOrES0_(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 } @_ZN3JPH4Vec36sAxisXEv() local_unnamed_addr #7 align 2

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{i64 2157741606}
!6 = !{!7, !21, i64 44}
!7 = !{!"_ZTSN3JPH13CylinderShapeE", !8, i64 0, !21, i64 44, !21, i64 48, !21, i64 52}
!8 = !{!"_ZTSN3JPH11ConvexShapeE", !9, i64 0, !19, i64 32, !21, i64 40}
!9 = !{!"_ZTSN3JPH5ShapeE", !10, i64 8, !16, i64 16, !17, i64 24, !18, i64 25}
!10 = !{!"_ZTSN3JPH9RefTargetINS_5ShapeEEE", !11, i64 0}
!11 = !{!"_ZTSSt6atomicIjE", !12, i64 0}
!12 = !{!"_ZTSSt13__atomic_baseIjE", !13, i64 0}
!13 = !{!"int", !14, i64 0}
!14 = !{!"omnipotent char", !15, i64 0}
!15 = !{!"Simple C++ TBAA"}
!16 = !{!"long", !14, i64 0}
!17 = !{!"_ZTSN3JPH10EShapeTypeE", !14, i64 0}
!18 = !{!"_ZTSN3JPH13EShapeSubTypeE", !14, i64 0}
!19 = !{!"_ZTSN3JPH8RefConstINS_15PhysicsMaterialEEE", !20, i64 0}
!20 = !{!"any pointer", !14, i64 0}
!21 = !{!"float", !14, i64 0}
!22 = !{!7, !21, i64 48}
!23 = !{!24, !21, i64 76}
!24 = !{!"_ZTSN3JPH14SoftBodyVertexE", !25, i64 0, !25, i64 16, !25, i64 32, !26, i64 48, !13, i64 64, !28, i64 68, !21, i64 72, !21, i64 76}
!25 = !{!"_ZTSN3JPH4Vec3E", !14, i64 0}
!26 = !{!"_ZTSN3JPH5PlaneE", !27, i64 0}
!27 = !{!"_ZTSN3JPH4Vec4E", !14, i64 0}
!28 = !{!"bool", !14, i64 0}
!29 = !{!14, !14, i64 0}
!30 = !{i64 0, i64 16, !29}
!31 = !{!24, !21, i64 72}
!32 = !{!24, !13, i64 64}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}


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