; LLVM IR from jrouwe/JoltPhysics :: Jolt/Physics/Collision/Shape (ConvexHullShape)

; 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.6 }
%union.anon.6 = type { <4 x float> }
%"class.JPH::ConvexHullShape" = type <{ %"class.JPH::ConvexShape.base", [4 x i8], %"class.JPH::Vec3", %"class.JPH::Mat44", %"class.JPH::AABox", %"class.JPH::Array.8", %"class.JPH::Array.11", %"class.JPH::Array.14", %"class.JPH::Array.17", float, float, float, [4 x i8] }>
%"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.5", [4 x i8], i64, i8, i8 }>
%"class.JPH::RefTarget.5" = 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::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.7 }
%union.anon.7 = type { <4 x float> }
%"class.JPH::AABox" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"class.JPH::Array.8" = type { i64, i64, ptr }
%"class.JPH::Array.11" = type { i64, i64, ptr }
%"class.JPH::Array.14" = type { i64, i64, ptr }
%"class.JPH::Array.17" = type { i64, i64, ptr }
%"struct.JPH::RayCastT" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"struct.JPH::ConvexHullShape::Face" = type { i16, i16 }
%"struct.JPH::ConvexHullShape::Point" = type { %"class.JPH::Vec3", i32, [3 x i32] }
%"class.JPH::Plane" = type { %"class.JPH::Vec4" }

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK3JPH15ConvexHullShape13CastRayHelperERKNS_7RayCastERfS4_(ptr noundef nonnull align 16 dereferenceable(272) %0, ptr noundef nonnull align 16 dereferenceable(32) %1, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3) #4 align 2 {
  %5 = alloca i1, align 1
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"class.JPH::Vec3", align 16
  %12 = alloca float, align 4
  %13 = alloca %"class.JPH::Vec3", align 16
  %14 = alloca float, align 4
  %15 = alloca %"class.JPH::Vec3", align 16
  %16 = alloca float, align 4
  %17 = alloca i32, align 4
  %18 = alloca %"class.JPH::Vec3", align 16
  %19 = alloca %"class.JPH::Vec3", align 16
  %20 = alloca %"class.JPH::Vec3", align 16
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca %"class.JPH::Vec3", align 16
  %25 = alloca ptr, align 8
  %26 = alloca %"class.JPH::Vec3", align 16
  %27 = alloca %"class.JPH::Vec3", align 16
  %28 = alloca %"class.JPH::Vec3", align 16
  %29 = alloca %"class.JPH::Vec3", align 16
  %30 = alloca %"class.JPH::Vec3", align 16
  %31 = alloca %"class.JPH::Vec3", align 16
  %32 = alloca %"class.JPH::Vec3", align 16
  %33 = alloca i32, align 4
  %34 = alloca i8, align 1
  %35 = alloca float, align 4
  %36 = alloca float, align 4
  %37 = alloca ptr, align 8
  %38 = alloca ptr, align 8
  %39 = alloca ptr, align 8
  %40 = alloca ptr, align 8
  %41 = alloca %"class.JPH::Vec3", align 16
  %42 = alloca float, align 4
  %43 = alloca %"class.JPH::Vec3", align 16
  %44 = alloca i8, align 1
  %45 = alloca float, align 4
  %46 = alloca %"class.JPH::Vec3", align 16
  %47 = alloca float, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  %48 = load ptr, ptr %6, align 8
  %49 = getelementptr inbounds %"class.JPH::ConvexHullShape", ptr %48, i32 0, i32 6
  %50 = call noundef i64 @_ZNK3JPH5ArrayINS_15ConvexHullShape4FaceENS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %49)
  %51 = icmp eq i64 %50, 2
  br i1 %51, label %52, label %222

52:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %53 = getelementptr inbounds %"class.JPH::ConvexHullShape", ptr %48, i32 0, i32 7
  %54 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZNK3JPH5ArrayINS_5PlaneENS_12STLAllocatorIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %53)
  store ptr %54, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #7
  %55 = load ptr, ptr %10, align 8, !tbaa !5
  %56 = call { double, double } @_ZNK3JPH5Plane9GetNormalEv(ptr noundef nonnull align 16 dereferenceable(16) %55)
  %57 = getelementptr inbounds %"class.JPH::Vec3", ptr %11, i32 0, i32 0
  %58 = getelementptr inbounds %union.anon.6, ptr %57, i32 0, i32 0
  %59 = getelementptr inbounds { double, double }, ptr %58, i32 0, i32 0
  %60 = extractvalue { double, double } %56, 0
  store double %60, ptr %59, align 16
  %61 = getelementptr inbounds { double, double }, ptr %58, i32 0, i32 1
  %62 = extractvalue { double, double } %56, 1
  store double %62, ptr %61, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  %64 = getelementptr inbounds %"struct.JPH::RayCastT", ptr %63, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %13, ptr align 16 %11, i64 16, i1 false), !tbaa.struct !9
  %65 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 0
  %66 = load double, ptr %65, align 16
  %67 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 1
  %68 = load double, ptr %67, align 8
  %69 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %64, double %66, double %68)
  store float %69, ptr %12, align 4, !tbaa !11
  %70 = load float, ptr %12, align 4, !tbaa !11
  %71 = call noundef float @_ZSt3absf(float noundef %70)
  %72 = fcmp oge float %71, 0x3D71979980000000
  br i1 %72, label %73, label %218

73:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  %75 = getelementptr inbounds %"struct.JPH::RayCastT", ptr %74, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %15, ptr align 16 %11, i64 16, i1 false), !tbaa.struct !9
  %76 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 0
  %77 = load double, ptr %76, align 16
  %78 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 1
  %79 = load double, ptr %78, align 8
  %80 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %75, double %77, double %79)
  %81 = load ptr, ptr %10, align 8, !tbaa !5
  %82 = call noundef float @_ZNK3JPH5Plane11GetConstantEv(ptr noundef nonnull align 16 dereferenceable(16) %81)
  %83 = fadd float %80, %82
  store float %83, ptr %14, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %84 = load float, ptr %14, align 4, !tbaa !11
  %85 = fneg float %84
  %86 = load float, ptr %12, align 4, !tbaa !11
  %87 = fdiv float %85, %86
  store float %87, ptr %16, align 4, !tbaa !11
  %88 = load float, ptr %16, align 4, !tbaa !11
  %89 = fcmp olt float %88, 0.000000e+00
  br i1 %89, label %93, label %90

90:                                               ; preds = %73
  %91 = load float, ptr %16, align 4, !tbaa !11
  %92 = fcmp ogt float %91, 1.000000e+00
  br i1 %92, label %93, label %96

93:                                               ; preds = %90, %73
  %94 = load ptr, ptr %8, align 8, !tbaa !5
  store float 0.000000e+00, ptr %94, align 4, !tbaa !11
  %95 = load ptr, ptr %9, align 8, !tbaa !5
  store float 0x3FF0000020000000, ptr %95, align 4, !tbaa !11
  store i1 false, ptr %5, align 1
  store i32 1, ptr %17, align 4
  br label %217

96:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #7
  %97 = load ptr, ptr %7, align 8, !tbaa !5
  %98 = getelementptr inbounds %"struct.JPH::RayCastT", ptr %97, i32 0, i32 0
  %99 = load float, ptr %16, align 4, !tbaa !11
  %100 = load ptr, ptr %7, align 8, !tbaa !5
  %101 = getelementptr inbounds %"struct.JPH::RayCastT", ptr %100, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %20, ptr align 16 %101, i64 16, i1 false), !tbaa.struct !9
  %102 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 0
  %103 = load double, ptr %102, align 16
  %104 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 1
  %105 = load double, ptr %104, align 8
  %106 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %99, double %103, double %105)
  %107 = getelementptr inbounds %"class.JPH::Vec3", ptr %19, i32 0, i32 0
  %108 = getelementptr inbounds %union.anon.6, ptr %107, i32 0, i32 0
  %109 = getelementptr inbounds { double, double }, ptr %108, i32 0, i32 0
  %110 = extractvalue { double, double } %106, 0
  store double %110, ptr %109, align 16
  %111 = getelementptr inbounds { double, double }, ptr %108, i32 0, i32 1
  %112 = extractvalue { double, double } %106, 1
  store double %112, ptr %111, align 8
  %113 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 0
  %114 = load double, ptr %113, align 16
  %115 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 1
  %116 = load double, ptr %115, align 8
  %117 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %98, double %114, double %116)
  %118 = getelementptr inbounds %"class.JPH::Vec3", ptr %18, i32 0, i32 0
  %119 = getelementptr inbounds %union.anon.6, ptr %118, i32 0, i32 0
  %120 = getelementptr inbounds { double, double }, ptr %119, i32 0, i32 0
  %121 = extractvalue { double, double } %117, 0
  store double %121, ptr %120, align 16
  %122 = getelementptr inbounds { double, double }, ptr %119, i32 0, i32 1
  %123 = extractvalue { double, double } %117, 1
  store double %123, ptr %122, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %124 = getelementptr inbounds %"class.JPH::ConvexHullShape", ptr %48, i32 0, i32 6
  %125 = call noundef nonnull align 2 dereferenceable(4) ptr @_ZNK3JPH5ArrayINS_15ConvexHullShape4FaceENS_12STLAllocatorIS2_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %124)
  store ptr %125, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %126 = getelementptr inbounds %"class.JPH::ConvexHullShape", ptr %48, i32 0, i32 8
  %127 = call noundef ptr @_ZNK3JPH5ArrayIhNS_12STLAllocatorIhEEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %126)
  %128 = load ptr, ptr %21, align 8, !tbaa !5
  %129 = getelementptr inbounds %"struct.JPH::ConvexHullShape::Face", ptr %128, i32 0, i32 0
  %130 = load i16, ptr %129, align 2, !tbaa !13
  %131 = zext i16 %130 to i32
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds i8, ptr %127, i64 %132
  store ptr %133, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %134 = load ptr, ptr %22, align 8, !tbaa !5
  %135 = load ptr, ptr %21, align 8, !tbaa !5
  %136 = getelementptr inbounds %"struct.JPH::ConvexHullShape::Face", ptr %135, i32 0, i32 1
  %137 = load i16, ptr %136, align 2, !tbaa !16
  %138 = zext i16 %137 to i32
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds i8, ptr %134, i64 %139
  store ptr %140, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #7
  %141 = getelementptr inbounds %"class.JPH::ConvexHullShape", ptr %48, i32 0, i32 5
  %142 = load ptr, ptr %23, align 8, !tbaa !5
  %143 = load i8, ptr %142, align 1, !tbaa !10
  %144 = zext i8 %143 to i64
  %145 = call noundef nonnull align 16 dereferenceable(32) ptr @_ZNK3JPH5ArrayINS_15ConvexHullShape5PointENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %141, i64 noundef %144)
  %146 = getelementptr inbounds %"struct.JPH::ConvexHullShape::Point", ptr %145, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %24, ptr align 16 %146, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %147 = load ptr, ptr %22, align 8, !tbaa !5
  store ptr %147, ptr %25, align 8, !tbaa !5
  br label %148

148:                                              ; preds = %206, %96
  %149 = load ptr, ptr %25, align 8, !tbaa !5
  %150 = load ptr, ptr %23, align 8, !tbaa !5
  %151 = icmp ult ptr %149, %150
  br i1 %151, label %153, label %152

152:                                              ; preds = %148
  store i32 2, ptr %17, align 4
  br label %209

153:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #7
  %154 = getelementptr inbounds %"class.JPH::ConvexHullShape", ptr %48, i32 0, i32 5
  %155 = load ptr, ptr %25, align 8, !tbaa !5
  %156 = load i8, ptr %155, align 1, !tbaa !10
  %157 = zext i8 %156 to i64
  %158 = call noundef nonnull align 16 dereferenceable(32) ptr @_ZNK3JPH5ArrayINS_15ConvexHullShape5PointENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %154, i64 noundef %157)
  %159 = getelementptr inbounds %"struct.JPH::ConvexHullShape::Point", ptr %158, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %26, ptr align 16 %159, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %29, ptr align 16 %24, i64 16, i1 false), !tbaa.struct !9
  %160 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 0
  %161 = load double, ptr %160, align 16
  %162 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 1
  %163 = load double, ptr %162, align 8
  %164 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %26, double %161, double %163)
  %165 = getelementptr inbounds %"class.JPH::Vec3", ptr %28, i32 0, i32 0
  %166 = getelementptr inbounds %union.anon.6, ptr %165, i32 0, i32 0
  %167 = getelementptr inbounds { double, double }, ptr %166, i32 0, i32 0
  %168 = extractvalue { double, double } %164, 0
  store double %168, ptr %167, align 16
  %169 = getelementptr inbounds { double, double }, ptr %166, i32 0, i32 1
  %170 = extractvalue { double, double } %164, 1
  store double %170, ptr %169, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %31, ptr align 16 %24, i64 16, i1 false), !tbaa.struct !9
  %171 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 0
  %172 = load double, ptr %171, align 16
  %173 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 1
  %174 = load double, ptr %173, align 8
  %175 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %18, double %172, double %174)
  %176 = getelementptr inbounds %"class.JPH::Vec3", ptr %30, i32 0, i32 0
  %177 = getelementptr inbounds %union.anon.6, ptr %176, i32 0, i32 0
  %178 = getelementptr inbounds { double, double }, ptr %177, i32 0, i32 0
  %179 = extractvalue { double, double } %175, 0
  store double %179, ptr %178, align 16
  %180 = getelementptr inbounds { double, double }, ptr %177, i32 0, i32 1
  %181 = extractvalue { double, double } %175, 1
  store double %181, ptr %180, align 8
  %182 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 0
  %183 = load double, ptr %182, align 16
  %184 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 1
  %185 = load double, ptr %184, align 8
  %186 = call { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %28, double %183, double %185)
  %187 = getelementptr inbounds %"class.JPH::Vec3", ptr %27, i32 0, i32 0
  %188 = getelementptr inbounds %union.anon.6, ptr %187, i32 0, i32 0
  %189 = getelementptr inbounds { double, double }, ptr %188, i32 0, i32 0
  %190 = extractvalue { double, double } %186, 0
  store double %190, ptr %189, align 16
  %191 = getelementptr inbounds { double, double }, ptr %188, i32 0, i32 1
  %192 = extractvalue { double, double } %186, 1
  store double %192, ptr %191, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %32, ptr align 16 %11, i64 16, i1 false), !tbaa.struct !9
  %193 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 0
  %194 = load double, ptr %193, align 16
  %195 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 1
  %196 = load double, ptr %195, align 8
  %197 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %27, double %194, double %196)
  %198 = fcmp olt float %197, 0.000000e+00
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #7
  br i1 %198, label %199, label %202

199:                                              ; preds = %153
  %200 = load ptr, ptr %8, align 8, !tbaa !5
  store float 0.000000e+00, ptr %200, align 4, !tbaa !11
  %201 = load ptr, ptr %9, align 8, !tbaa !5
  store float 0x3FF0000020000000, ptr %201, align 4, !tbaa !11
  store i1 false, ptr %5, align 1
  store i32 1, ptr %17, align 4
  br label %203

202:                                              ; preds = %153
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %24, ptr align 16 %26, i64 16, i1 false), !tbaa.struct !9
  store i32 0, ptr %17, align 4
  br label %203

203:                                              ; preds = %202, %199
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #7
  %204 = load i32, ptr %17, align 4
  switch i32 %204, label %209 [
    i32 0, label %205
  ]

205:                                              ; preds = %203
  br label %206

206:                                              ; preds = %205
  %207 = load ptr, ptr %25, align 8, !tbaa !5
  %208 = getelementptr inbounds i8, ptr %207, i32 1
  store ptr %208, ptr %25, align 8, !tbaa !5
  br label %148, !llvm.loop !17

209:                                              ; preds = %203, %152
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  %210 = load i32, ptr %17, align 4
  switch i32 %210, label %216 [
    i32 2, label %211
  ]

211:                                              ; preds = %209
  %212 = load float, ptr %16, align 4, !tbaa !11
  %213 = load ptr, ptr %8, align 8, !tbaa !5
  store float %212, ptr %213, align 4, !tbaa !11
  %214 = load float, ptr %16, align 4, !tbaa !11
  %215 = load ptr, ptr %9, align 8, !tbaa !5
  store float %214, ptr %215, align 4, !tbaa !11
  store i1 true, ptr %5, align 1
  store i32 1, ptr %17, align 4
  br label %216

216:                                              ; preds = %211, %209
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #7
  br label %217

217:                                              ; preds = %216, %93
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %221

218:                                              ; preds = %52
  %219 = load ptr, ptr %8, align 8, !tbaa !5
  store float 0.000000e+00, ptr %219, align 4, !tbaa !11
  %220 = load ptr, ptr %9, align 8, !tbaa !5
  store float 0x3FF0000020000000, ptr %220, align 4, !tbaa !11
  store i1 false, ptr %5, align 1
  store i32 1, ptr %17, align 4
  br label %221

221:                                              ; preds = %218, %217
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %333

222:                                              ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #7
  store i32 0, ptr %33, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 1, ptr %34) #7
  store i8 1, ptr %34, align 1, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #7
  store float 0.000000e+00, ptr %35, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #7
  store float 0x3FF0000020000000, ptr %36, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #7
  %223 = getelementptr inbounds %"class.JPH::ConvexHullShape", ptr %48, i32 0, i32 7
  store ptr %223, ptr %37, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #7
  %224 = load ptr, ptr %37, align 8, !tbaa !5
  %225 = call noundef ptr @_ZNK3JPH5ArrayINS_5PlaneENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %224)
  store ptr %225, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #7
  %226 = load ptr, ptr %37, align 8, !tbaa !5
  %227 = call noundef ptr @_ZNK3JPH5ArrayINS_5PlaneENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %226)
  store ptr %227, ptr %39, align 8, !tbaa !5
  br label %228

228:                                              ; preds = %306, %222
  %229 = load ptr, ptr %38, align 8, !tbaa !5
  %230 = load ptr, ptr %39, align 8, !tbaa !5
  %231 = icmp ne ptr %229, %230
  br i1 %231, label %233, label %232

232:                                              ; preds = %228
  store i32 5, ptr %17, align 4
  br label %309

233:                                              ; preds = %228
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #7
  %234 = load ptr, ptr %38, align 8, !tbaa !5
  store ptr %234, ptr %40, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %41) #7
  %235 = load ptr, ptr %40, align 8, !tbaa !5
  %236 = call { double, double } @_ZNK3JPH5Plane9GetNormalEv(ptr noundef nonnull align 16 dereferenceable(16) %235)
  %237 = getelementptr inbounds %"class.JPH::Vec3", ptr %41, i32 0, i32 0
  %238 = getelementptr inbounds %union.anon.6, ptr %237, i32 0, i32 0
  %239 = getelementptr inbounds { double, double }, ptr %238, i32 0, i32 0
  %240 = extractvalue { double, double } %236, 0
  store double %240, ptr %239, align 16
  %241 = getelementptr inbounds { double, double }, ptr %238, i32 0, i32 1
  %242 = extractvalue { double, double } %236, 1
  store double %242, ptr %241, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #7
  %243 = load ptr, ptr %7, align 8, !tbaa !5
  %244 = getelementptr inbounds %"struct.JPH::RayCastT", ptr %243, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %43, ptr align 16 %41, i64 16, i1 false), !tbaa.struct !9
  %245 = getelementptr inbounds { double, double }, ptr %43, i32 0, i32 0
  %246 = load double, ptr %245, align 16
  %247 = getelementptr inbounds { double, double }, ptr %43, i32 0, i32 1
  %248 = load double, ptr %247, align 8
  %249 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %244, double %246, double %248)
  %250 = load ptr, ptr %40, align 8, !tbaa !5
  %251 = call noundef float @_ZNK3JPH5Plane11GetConstantEv(ptr noundef nonnull align 16 dereferenceable(16) %250)
  %252 = fadd float %249, %251
  store float %252, ptr %42, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %44) #7
  %253 = load float, ptr %42, align 4, !tbaa !11
  %254 = fcmp ogt float %253, 0.000000e+00
  %255 = zext i1 %254 to i8
  store i8 %255, ptr %44, align 1, !tbaa !21
  %256 = load i8, ptr %44, align 1, !tbaa !21, !range !23, !noundef !24
  %257 = trunc i8 %256 to i1
  %258 = xor i1 %257, true
  %259 = zext i1 %258 to i32
  %260 = load i8, ptr %34, align 1, !tbaa !21, !range !23, !noundef !24
  %261 = trunc i8 %260 to i1
  %262 = zext i1 %261 to i32
  %263 = and i32 %262, %259
  %264 = icmp ne i32 %263, 0
  %265 = zext i1 %264 to i8
  store i8 %265, ptr %34, align 1, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #7
  %266 = load ptr, ptr %7, align 8, !tbaa !5
  %267 = getelementptr inbounds %"struct.JPH::RayCastT", ptr %266, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %46, ptr align 16 %41, i64 16, i1 false), !tbaa.struct !9
  %268 = getelementptr inbounds { double, double }, ptr %46, i32 0, i32 0
  %269 = load double, ptr %268, align 16
  %270 = getelementptr inbounds { double, double }, ptr %46, i32 0, i32 1
  %271 = load double, ptr %270, align 8
  %272 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %267, double %269, double %271)
  store float %272, ptr %45, align 4, !tbaa !11
  %273 = load float, ptr %45, align 4, !tbaa !11
  %274 = call noundef float @_ZSt3absf(float noundef %273)
  %275 = fcmp oge float %274, 0x3D71979980000000
  br i1 %275, label %276, label %294

276:                                              ; preds = %233
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #7
  %277 = load float, ptr %42, align 4, !tbaa !11
  %278 = fneg float %277
  %279 = load float, ptr %45, align 4, !tbaa !11
  %280 = fdiv float %278, %279
  store float %280, ptr %47, align 4, !tbaa !11
  %281 = load float, ptr %45, align 4, !tbaa !11
  %282 = fcmp olt float %281, 0.000000e+00
  br i1 %282, label %283, label %288

283:                                              ; preds = %276
  %284 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %47, ptr noundef nonnull align 4 dereferenceable(4) %35)
  %285 = load float, ptr %284, align 4, !tbaa !11
  store float %285, ptr %35, align 4, !tbaa !11
  %286 = load i32, ptr %33, align 4, !tbaa !19
  %287 = or i32 %286, 1
  store i32 %287, ptr %33, align 4, !tbaa !19
  br label %293

288:                                              ; preds = %276
  %289 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %47, ptr noundef nonnull align 4 dereferenceable(4) %36)
  %290 = load float, ptr %289, align 4, !tbaa !11
  store float %290, ptr %36, align 4, !tbaa !11
  %291 = load i32, ptr %33, align 4, !tbaa !19
  %292 = or i32 %291, 2
  store i32 %292, ptr %33, align 4, !tbaa !19
  br label %293

293:                                              ; preds = %288, %283
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #7
  br label %299

294:                                              ; preds = %233
  %295 = load i8, ptr %44, align 1, !tbaa !21, !range !23, !noundef !24
  %296 = trunc i8 %295 to i1
  br i1 %296, label %297, label %298

297:                                              ; preds = %294
  store i1 false, ptr %5, align 1
  store i32 1, ptr %17, align 4
  br label %300

298:                                              ; preds = %294
  br label %299

299:                                              ; preds = %298, %293
  store i32 0, ptr %17, align 4
  br label %300

300:                                              ; preds = %299, %297
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %44) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %41) #7
  %301 = load i32, ptr %17, align 4
  switch i32 %301, label %303 [
    i32 0, label %302
  ]

302:                                              ; preds = %300
  store i32 0, ptr %17, align 4
  br label %303

303:                                              ; preds = %302, %300
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #7
  %304 = load i32, ptr %17, align 4
  switch i32 %304, label %309 [
    i32 0, label %305
  ]

305:                                              ; preds = %303
  br label %306

306:                                              ; preds = %305
  %307 = load ptr, ptr %38, align 8, !tbaa !5
  %308 = getelementptr inbounds %"class.JPH::Plane", ptr %307, i32 1
  store ptr %308, ptr %38, align 8, !tbaa !5
  br label %228

309:                                              ; preds = %303, %232
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #7
  %310 = load i32, ptr %17, align 4
  switch i32 %310, label %332 [
    i32 5, label %311
  ]

311:                                              ; preds = %309
  %312 = load i32, ptr %33, align 4, !tbaa !19
  %313 = icmp eq i32 %312, 3
  br i1 %313, label %314, label %327

314:                                              ; preds = %311
  %315 = load float, ptr %35, align 4, !tbaa !11
  %316 = load ptr, ptr %8, align 8, !tbaa !5
  store float %315, ptr %316, align 4, !tbaa !11
  %317 = load float, ptr %36, align 4, !tbaa !11
  %318 = load ptr, ptr %9, align 8, !tbaa !5
  store float %317, ptr %318, align 4, !tbaa !11
  %319 = load float, ptr %35, align 4, !tbaa !11
  %320 = load float, ptr %36, align 4, !tbaa !11
  %321 = fcmp ole float %319, %320
  br i1 %321, label %322, label %325

322:                                              ; preds = %314
  %323 = load float, ptr %36, align 4, !tbaa !11
  %324 = fcmp oge float %323, 0.000000e+00
  br label %325

325:                                              ; preds = %322, %314
  %326 = phi i1 [ false, %314 ], [ %324, %322 ]
  store i1 %326, ptr %5, align 1
  store i32 1, ptr %17, align 4
  br label %332

327:                                              ; preds = %311
  %328 = load ptr, ptr %8, align 8, !tbaa !5
  store float 0.000000e+00, ptr %328, align 4, !tbaa !11
  %329 = load ptr, ptr %9, align 8, !tbaa !5
  store float 0x3FF0000020000000, ptr %329, align 4, !tbaa !11
  %330 = load i8, ptr %34, align 1, !tbaa !21, !range !23, !noundef !24
  %331 = trunc i8 %330 to i1
  store i1 %331, ptr %5, align 1
  store i32 1, ptr %17, align 4
  br label %332

332:                                              ; preds = %327, %325, %309
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #7
  br label %333

333:                                              ; preds = %332, %221
  %334 = load i1, ptr %5, align 1
  ret i1 %334
}

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #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 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 = { 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 = !{i64 0, i64 16, !10}
!10 = !{!7, !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !15, i64 0}
!14 = !{!"_ZTSN3JPH15ConvexHullShape4FaceE", !15, i64 0, !15, i64 2}
!15 = !{!"short", !7, i64 0}
!16 = !{!14, !15, i64 2}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!20, !20, i64 0}
!20 = !{!"int", !7, i64 0}
!21 = !{!22, !22, i64 0}
!22 = !{!"bool", !7, i64 0}
!23 = !{i8 0, i8 2}
!24 = !{}


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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK3JPH15ConvexHullShape13CastRayHelperERKNS_7RayCastERfS4_(ptr noundef nonnull align 16 dereferenceable(272) %0, ptr noundef nonnull align 16 dereferenceable(32) %1, ptr nocapture noundef nonnull writeonly align 4 dereferenceable(4) %2, ptr nocapture noundef nonnull writeonly align 4 dereferenceable(4) %3) local_unnamed_addr #4 align 2 {
  %5 = alloca %"class.JPH::Vec3", align 16
  %6 = alloca %"class.JPH::Vec3", align 16
  %7 = alloca %"class.JPH::Vec3", align 16
  %8 = alloca %"class.JPH::Vec3", align 16
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = getelementptr inbounds i8, ptr %0, i64 184
  %13 = tail call noundef i64 @_ZNK3JPH5ArrayINS_15ConvexHullShape4FaceENS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  %14 = icmp eq i64 %13, 2
  br i1 %14, label %15, label %83

15:                                               ; preds = %4
  %16 = getelementptr inbounds i8, ptr %0, i64 208
  %17 = tail call noundef nonnull align 16 dereferenceable(16) ptr @_ZNK3JPH5ArrayINS_5PlaneENS_12STLAllocatorIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %16)
  %18 = tail call { double, double } @_ZNK3JPH5Plane9GetNormalEv(ptr noundef nonnull align 16 dereferenceable(16) %17)
  %19 = extractvalue { double, double } %18, 0
  %20 = extractvalue { double, double } %18, 1
  %21 = getelementptr inbounds i8, ptr %1, i64 16
  %22 = tail call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %21, double %19, double %20)
  %23 = tail call noundef float @_ZSt3absf(float noundef %22)
  %24 = fcmp ult float %23, 0x3D71979980000000
  br i1 %24, label %82, label %25

25:                                               ; preds = %15
  %26 = tail call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %1, double %19, double %20)
  %27 = tail call noundef float @_ZNK3JPH5Plane11GetConstantEv(ptr noundef nonnull align 16 dereferenceable(16) %17)
  %28 = fadd float %26, %27
  %29 = fneg float %28
  %30 = fdiv float %29, %22
  %31 = fcmp olt float %30, 0.000000e+00
  %32 = fcmp ogt float %30, 1.000000e+00
  %or.cond = or i1 %31, %32
  br i1 %or.cond, label %33, label %34

33:                                               ; preds = %25
  store float 0.000000e+00, ptr %2, align 4, !tbaa !5
  store float 0x3FF0000020000000, ptr %3, align 4, !tbaa !5
  br label %122

34:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #7
  %.sroa.048.0.copyload = load double, ptr %21, align 16
  %.sroa.249.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 24
  %.sroa.249.0.copyload = load double, ptr %.sroa.249.0..sroa_idx, align 8, !tbaa !9
  %35 = tail call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %30, double %.sroa.048.0.copyload, double %.sroa.249.0.copyload)
  %36 = extractvalue { double, double } %35, 0
  %37 = extractvalue { double, double } %35, 1
  %38 = tail call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %1, double %36, double %37)
  %39 = extractvalue { double, double } %38, 0
  store double %39, ptr %5, align 16
  %40 = getelementptr inbounds i8, ptr %5, i64 8
  %41 = extractvalue { double, double } %38, 1
  store double %41, ptr %40, align 8
  %42 = tail call noundef nonnull align 2 dereferenceable(4) ptr @_ZNK3JPH5ArrayINS_15ConvexHullShape4FaceENS_12STLAllocatorIS2_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  %43 = getelementptr inbounds i8, ptr %0, i64 232
  %44 = tail call noundef ptr @_ZNK3JPH5ArrayIhNS_12STLAllocatorIhEEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %43)
  %45 = load i16, ptr %42, align 2, !tbaa !10
  %46 = zext i16 %45 to i64
  %47 = getelementptr inbounds i8, ptr %44, i64 %46
  %48 = getelementptr inbounds i8, ptr %42, i64 2
  %49 = load i16, ptr %48, align 2, !tbaa !13
  %50 = zext i16 %49 to i64
  %51 = getelementptr inbounds i8, ptr %47, i64 %50
  %52 = getelementptr inbounds i8, ptr %0, i64 160
  %53 = load i8, ptr %51, align 1, !tbaa !9
  %54 = zext i8 %53 to i64
  %55 = tail call noundef nonnull align 16 dereferenceable(32) ptr @_ZNK3JPH5ArrayINS_15ConvexHullShape5PointENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef %54)
  %.not107130 = icmp eq i16 %49, 0
  br i1 %.not107130, label %.critedge, label %.lr.ph136

.lr.ph136:                                        ; preds = %34
  %56 = load <2 x double>, ptr %55, align 16
  %57 = getelementptr inbounds i8, ptr %8, i64 8
  %58 = getelementptr inbounds i8, ptr %7, i64 8
  br label %59

59:                                               ; preds = %.lr.ph136, %77
  %.097131 = phi ptr [ %47, %.lr.ph136 ], [ %79, %77 ]
  %60 = phi <2 x double> [ %56, %.lr.ph136 ], [ %78, %77 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  %61 = load i8, ptr %.097131, align 1, !tbaa !9
  %62 = zext i8 %61 to i64
  %63 = call noundef nonnull align 16 dereferenceable(32) ptr @_ZNK3JPH5ArrayINS_15ConvexHullShape5PointENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef %62)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %6, ptr noundef nonnull align 16 dereferenceable(16) %63, i64 16, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #7
  %64 = extractelement <2 x double> %60, i64 0
  %65 = extractelement <2 x double> %60, i64 1
  %66 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %6, double %64, double %65)
  %67 = extractvalue { double, double } %66, 0
  store double %67, ptr %8, align 16
  %68 = extractvalue { double, double } %66, 1
  store double %68, ptr %57, align 8
  %69 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %5, double %64, double %65)
  %70 = extractvalue { double, double } %69, 0
  %71 = extractvalue { double, double } %69, 1
  %72 = call { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %8, double %70, double %71)
  %73 = extractvalue { double, double } %72, 0
  store double %73, ptr %7, align 16
  %74 = extractvalue { double, double } %72, 1
  store double %74, ptr %58, align 8
  %75 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %7, double %19, double %20)
  %76 = fcmp uge float %75, 0.000000e+00
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  br i1 %76, label %77, label %80

77:                                               ; preds = %59
  %78 = load <2 x double>, ptr %6, align 16
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  %79 = getelementptr inbounds i8, ptr %.097131, i64 1
  %.not107.not = icmp ult ptr %79, %51
  br i1 %.not107.not, label %59, label %.critedge, !llvm.loop !15

80:                                               ; preds = %59
  store float 0.000000e+00, ptr %2, align 4, !tbaa !5
  store float 0x3FF0000020000000, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  br label %81

.critedge:                                        ; preds = %77, %34
  store float %30, ptr %2, align 4, !tbaa !5
  store float %30, ptr %3, align 4, !tbaa !5
  br label %81

81:                                               ; preds = %80, %.critedge
  %.not107122 = phi i1 [ false, %80 ], [ true, %.critedge ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  br label %122

82:                                               ; preds = %15
  store float 0.000000e+00, ptr %2, align 4, !tbaa !5
  store float 0x3FF0000020000000, ptr %3, align 4, !tbaa !5
  br label %122

83:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  store float 0.000000e+00, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #7
  store float 0x3FF0000020000000, ptr %10, align 4, !tbaa !5
  %84 = getelementptr inbounds i8, ptr %0, i64 208
  %85 = tail call noundef ptr @_ZNK3JPH5ArrayINS_5PlaneENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %84)
  %86 = tail call noundef ptr @_ZNK3JPH5ArrayINS_5PlaneENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %84)
  %.not125 = icmp eq ptr %85, %86
  br i1 %.not125, label %._crit_edge.thread, label %.lr.ph

.lr.ph:                                           ; preds = %83
  %87 = getelementptr inbounds i8, ptr %1, i64 16
  br label %88

88:                                               ; preds = %.lr.ph, %113
  %.098128 = phi i32 [ 0, %.lr.ph ], [ %.3101.ph, %113 ]
  %.0103127 = phi i1 [ true, %.lr.ph ], [ %96, %113 ]
  %.0105126 = phi ptr [ %85, %.lr.ph ], [ %114, %113 ]
  %89 = call { double, double } @_ZNK3JPH5Plane9GetNormalEv(ptr noundef nonnull align 16 dereferenceable(16) %.0105126)
  %90 = extractvalue { double, double } %89, 0
  %91 = extractvalue { double, double } %89, 1
  %92 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %1, double %90, double %91)
  %93 = call noundef float @_ZNK3JPH5Plane11GetConstantEv(ptr noundef nonnull align 16 dereferenceable(16) %.0105126)
  %94 = fadd float %92, %93
  %95 = fcmp ule float %94, 0.000000e+00
  %96 = select i1 %95, i1 %.0103127, i1 false
  %97 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %87, double %90, double %91)
  %98 = call noundef float @_ZSt3absf(float noundef %97)
  %99 = fcmp ult float %98, 0x3D71979980000000
  br i1 %99, label %112, label %100

100:                                              ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #7
  %101 = fneg float %94
  %102 = fdiv float %101, %97
  store float %102, ptr %11, align 4, !tbaa !5
  %103 = fcmp olt float %97, 0.000000e+00
  br i1 %103, label %104, label %107

104:                                              ; preds = %100
  %105 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %106 = load float, ptr %105, align 4, !tbaa !5
  store float %106, ptr %9, align 4, !tbaa !5
  br label %110

107:                                              ; preds = %100
  %108 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %109 = load float, ptr %108, align 4, !tbaa !5
  store float %109, ptr %10, align 4, !tbaa !5
  br label %110

110:                                              ; preds = %107, %104
  %.sink = phi i32 [ 2, %107 ], [ 1, %104 ]
  %111 = or i32 %.098128, %.sink
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  br label %113

112:                                              ; preds = %88
  br i1 %95, label %113, label %.loopexit

113:                                              ; preds = %112, %110
  %.3101.ph = phi i32 [ %111, %110 ], [ %.098128, %112 ]
  %114 = getelementptr inbounds i8, ptr %.0105126, i64 16
  %.not = icmp eq ptr %114, %86
  br i1 %.not, label %._crit_edge, label %88

._crit_edge:                                      ; preds = %113
  %115 = icmp eq i32 %.3101.ph, 3
  br i1 %115, label %116, label %._crit_edge.thread

116:                                              ; preds = %._crit_edge
  %117 = load float, ptr %9, align 4, !tbaa !5
  store float %117, ptr %2, align 4, !tbaa !5
  %118 = load float, ptr %10, align 4
  store float %118, ptr %3, align 4, !tbaa !5
  %119 = fcmp ole float %117, %118
  %120 = fcmp oge float %118, 0.000000e+00
  %121 = and i1 %119, %120
  br label %.loopexit

._crit_edge.thread:                               ; preds = %83, %._crit_edge
  %.0103.lcssa143 = phi i1 [ %96, %._crit_edge ], [ true, %83 ]
  store float 0.000000e+00, ptr %2, align 4, !tbaa !5
  store float 0x3FF0000020000000, ptr %3, align 4, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %112, %._crit_edge.thread, %116
  %.9 = phi i1 [ %121, %116 ], [ %.0103.lcssa143, %._crit_edge.thread ], [ false, %112 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  br label %122

122:                                              ; preds = %82, %81, %33, %.loopexit
  %.10 = phi i1 [ %.9, %.loopexit ], [ false, %82 ], [ false, %33 ], [ %.not107122, %81 ]
  ret i1 %.10
}

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

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

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #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 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 = { 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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !12, i64 0}
!11 = !{!"_ZTSN3JPH15ConvexHullShape4FaceE", !12, i64 0, !12, i64 2}
!12 = !{!"short", !7, i64 0}
!13 = !{!11, !12, i64 2}
!14 = !{i64 0, i64 16, !9}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass