; 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> }
%"struct.JPH::AssertLastParam" = type { i8 }
%"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::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::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::ConvexHullShape::Face" = type { i16, i16 }
%"struct.JPH::ConvexHullShape::Point" = type { %"class.JPH::Vec3", i32, [3 x i32] }

@.str.4 = external hidden unnamed_addr constant [101 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [20 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: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH10SubShapeID7IsEmptyEv(ptr noundef nonnull align 4 dereferenceable(4)) #6 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH15ConvexHullShape17GetSupportingFaceERKNS_10SubShapeIDENS_4Vec3ES4_RKNS_5Mat44ERNS_11StaticArrayIS4_Lj32EEE(ptr noundef nonnull align 16 dereferenceable(272) %0, ptr noundef nonnull align 4 dereferenceable(4) %1, double %2, double %3, double %4, double %5, ptr noundef nonnull align 16 dereferenceable(64) %6, ptr noundef nonnull align 16 dereferenceable(528) %7) unnamed_addr #2 align 2 {
  %9 = alloca %"class.JPH::Vec3", align 16
  %10 = alloca %"class.JPH::Vec3", align 16
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca %"struct.JPH::AssertLastParam", align 1
  %16 = alloca %"class.JPH::Vec3", align 16
  %17 = alloca %"class.JPH::Vec3", align 16
  %18 = alloca %"class.JPH::Vec3", align 16
  %19 = alloca float, align 4
  %20 = alloca %"class.JPH::Vec3", align 16
  %21 = alloca i32, align 4
  %22 = alloca i64, align 8
  %23 = alloca %"class.JPH::Vec3", align 16
  %24 = alloca %"class.JPH::Vec3", align 16
  %25 = alloca float, align 4
  %26 = alloca %"class.JPH::Vec3", align 16
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca %"class.JPH::Mat44", align 16
  %33 = alloca %"class.JPH::Vec3", align 16
  %34 = alloca %"class.JPH::Vec3", align 16
  %35 = alloca ptr, align 8
  %36 = alloca %"class.JPH::Vec3", align 16
  %37 = alloca %"class.JPH::Vec3", align 16
  %38 = alloca ptr, align 8
  %39 = alloca %"class.JPH::Vec3", align 16
  %40 = alloca %"class.JPH::Vec3", align 16
  %41 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 0
  store double %2, ptr %41, align 16
  %42 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 1
  store double %3, ptr %42, align 8
  %43 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 0
  store double %4, ptr %43, align 16
  %44 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 1
  store double %5, ptr %44, align 8
  store ptr %0, ptr %11, align 8, !tbaa !5
  store ptr %1, ptr %12, align 8, !tbaa !5
  store ptr %6, ptr %13, align 8, !tbaa !5
  store ptr %7, ptr %14, align 8, !tbaa !5
  %45 = load ptr, ptr %11, align 8
  br label %46

46:                                               ; preds = %8
  %47 = load ptr, ptr %12, align 8, !tbaa !5
  %48 = call noundef zeroext i1 @_ZNK3JPH10SubShapeID7IsEmptyEv(ptr noundef nonnull align 4 dereferenceable(4) %47)
  br i1 %48, label %52, label %49

49:                                               ; preds = %46
  %50 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef @.str.11, ptr noundef @.str.4, i32 noundef 676, ptr noundef @.str.12)
  br i1 %50, label %51, label %52

51:                                               ; preds = %49
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #9, !srcloc !9
  br label %52

52:                                               ; preds = %51, %49, %46
  br label %53

53:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #9
  %54 = call { double, double } @_ZNK3JPH4Vec310ReciprocalEv(ptr noundef nonnull align 16 dereferenceable(16) %10)
  %55 = getelementptr inbounds %"class.JPH::Vec3", ptr %16, i32 0, i32 0
  %56 = getelementptr inbounds %union.anon.6, ptr %55, i32 0, i32 0
  %57 = getelementptr inbounds { double, double }, ptr %56, i32 0, i32 0
  %58 = extractvalue { double, double } %54, 0
  store double %58, ptr %57, align 16
  %59 = getelementptr inbounds { double, double }, ptr %56, i32 0, i32 1
  %60 = extractvalue { double, double } %54, 1
  store double %60, ptr %59, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #9
  %61 = getelementptr inbounds %"class.JPH::ConvexHullShape", ptr %45, i32 0, i32 7
  %62 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZNK3JPH5ArrayINS_5PlaneENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %61, i64 noundef 0)
  %63 = call { double, double } @_ZNK3JPH5Plane9GetNormalEv(ptr noundef nonnull align 16 dereferenceable(16) %62)
  %64 = getelementptr inbounds %"class.JPH::Vec3", ptr %18, i32 0, i32 0
  %65 = getelementptr inbounds %union.anon.6, ptr %64, i32 0, i32 0
  %66 = getelementptr inbounds { double, double }, ptr %65, i32 0, i32 0
  %67 = extractvalue { double, double } %63, 0
  store double %67, ptr %66, align 16
  %68 = getelementptr inbounds { double, double }, ptr %65, i32 0, i32 1
  %69 = extractvalue { double, double } %63, 1
  store double %69, ptr %68, align 8
  %70 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %71 = load double, ptr %70, align 16
  %72 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %73 = load double, ptr %72, align 8
  %74 = call { double, double } @_ZNK3JPH4Vec3mlES0_(ptr noundef nonnull align 16 dereferenceable(16) %16, double %71, double %73)
  %75 = getelementptr inbounds %"class.JPH::Vec3", ptr %17, i32 0, i32 0
  %76 = getelementptr inbounds %union.anon.6, ptr %75, i32 0, i32 0
  %77 = getelementptr inbounds { double, double }, ptr %76, i32 0, i32 0
  %78 = extractvalue { double, double } %74, 0
  store double %78, ptr %77, align 16
  %79 = getelementptr inbounds { double, double }, ptr %76, i32 0, i32 1
  %80 = extractvalue { double, double } %74, 1
  store double %80, ptr %79, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %20, ptr align 16 %9, i64 16, i1 false), !tbaa.struct !10
  %81 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 0
  %82 = load double, ptr %81, align 16
  %83 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 1
  %84 = load double, ptr %83, align 8
  %85 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %17, double %82, double %84)
  %86 = call noundef float @_ZNK3JPH4Vec36LengthEv(ptr noundef nonnull align 16 dereferenceable(16) %17)
  %87 = fdiv float %85, %86
  store float %87, ptr %19, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #9
  store i32 0, ptr %21, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #9
  store i64 1, ptr %22, align 8, !tbaa !16
  br label %88

88:                                               ; preds = %131, %53
  %89 = load i64, ptr %22, align 8, !tbaa !16
  %90 = getelementptr inbounds %"class.JPH::ConvexHullShape", ptr %45, i32 0, i32 7
  %91 = call noundef i64 @_ZNK3JPH5ArrayINS_5PlaneENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %90)
  %92 = icmp ult i64 %89, %91
  br i1 %92, label %94, label %93

93:                                               ; preds = %88
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  br label %134

94:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #9
  %95 = getelementptr inbounds %"class.JPH::ConvexHullShape", ptr %45, i32 0, i32 7
  %96 = load i64, ptr %22, align 8, !tbaa !16
  %97 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZNK3JPH5ArrayINS_5PlaneENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %95, i64 noundef %96)
  %98 = call { double, double } @_ZNK3JPH5Plane9GetNormalEv(ptr noundef nonnull align 16 dereferenceable(16) %97)
  %99 = getelementptr inbounds %"class.JPH::Vec3", ptr %24, i32 0, i32 0
  %100 = getelementptr inbounds %union.anon.6, ptr %99, i32 0, i32 0
  %101 = getelementptr inbounds { double, double }, ptr %100, i32 0, i32 0
  %102 = extractvalue { double, double } %98, 0
  store double %102, ptr %101, align 16
  %103 = getelementptr inbounds { double, double }, ptr %100, i32 0, i32 1
  %104 = extractvalue { double, double } %98, 1
  store double %104, ptr %103, align 8
  %105 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 0
  %106 = load double, ptr %105, align 16
  %107 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 1
  %108 = load double, ptr %107, align 8
  %109 = call { double, double } @_ZNK3JPH4Vec3mlES0_(ptr noundef nonnull align 16 dereferenceable(16) %16, double %106, double %108)
  %110 = getelementptr inbounds %"class.JPH::Vec3", ptr %23, i32 0, i32 0
  %111 = getelementptr inbounds %union.anon.6, ptr %110, i32 0, i32 0
  %112 = getelementptr inbounds { double, double }, ptr %111, i32 0, i32 0
  %113 = extractvalue { double, double } %109, 0
  store double %113, ptr %112, align 16
  %114 = getelementptr inbounds { double, double }, ptr %111, i32 0, i32 1
  %115 = extractvalue { double, double } %109, 1
  store double %115, ptr %114, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %26, ptr align 16 %9, i64 16, i1 false), !tbaa.struct !10
  %116 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 0
  %117 = load double, ptr %116, align 16
  %118 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 1
  %119 = load double, ptr %118, align 8
  %120 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %23, double %117, double %119)
  %121 = call noundef float @_ZNK3JPH4Vec36LengthEv(ptr noundef nonnull align 16 dereferenceable(16) %23)
  %122 = fdiv float %120, %121
  store float %122, ptr %25, align 4, !tbaa !12
  %123 = load float, ptr %25, align 4, !tbaa !12
  %124 = load float, ptr %19, align 4, !tbaa !12
  %125 = fcmp olt float %123, %124
  br i1 %125, label %126, label %130

126:                                              ; preds = %94
  %127 = load float, ptr %25, align 4, !tbaa !12
  store float %127, ptr %19, align 4, !tbaa !12
  %128 = load i64, ptr %22, align 8, !tbaa !16
  %129 = trunc i64 %128 to i32
  store i32 %129, ptr %21, align 4, !tbaa !14
  br label %130

130:                                              ; preds = %126, %94
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #9
  br label %131

131:                                              ; preds = %130
  %132 = load i64, ptr %22, align 8, !tbaa !16
  %133 = add i64 %132, 1
  store i64 %133, ptr %22, align 8, !tbaa !16
  br label %88, !llvm.loop !18

134:                                              ; preds = %93
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #9
  %135 = getelementptr inbounds %"class.JPH::ConvexHullShape", ptr %45, i32 0, i32 6
  %136 = load i32, ptr %21, align 4, !tbaa !14
  %137 = sext i32 %136 to i64
  %138 = call noundef nonnull align 2 dereferenceable(4) ptr @_ZNK3JPH5ArrayINS_15ConvexHullShape4FaceENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %135, i64 noundef %137)
  store ptr %138, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #9
  %139 = getelementptr inbounds %"class.JPH::ConvexHullShape", ptr %45, i32 0, i32 8
  %140 = call noundef ptr @_ZNK3JPH5ArrayIhNS_12STLAllocatorIhEEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %139)
  %141 = load ptr, ptr %27, align 8, !tbaa !5
  %142 = getelementptr inbounds %"struct.JPH::ConvexHullShape::Face", ptr %141, i32 0, i32 0
  %143 = load i16, ptr %142, align 2, !tbaa !20
  %144 = zext i16 %143 to i32
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds i8, ptr %140, i64 %145
  store ptr %146, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #9
  %147 = load ptr, ptr %28, align 8, !tbaa !5
  %148 = load ptr, ptr %27, align 8, !tbaa !5
  %149 = getelementptr inbounds %"struct.JPH::ConvexHullShape::Face", ptr %148, i32 0, i32 1
  %150 = load i16, ptr %149, align 2, !tbaa !23
  %151 = zext i16 %150 to i32
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds i8, ptr %147, i64 %152
  store ptr %153, ptr %29, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #9
  %154 = load ptr, ptr %14, align 8, !tbaa !5
  %155 = call noundef i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj32EE8capacityEv(ptr noundef nonnull align 16 dereferenceable(528) %154)
  %156 = udiv i32 %155, 2
  store i32 %156, ptr %30, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #9
  %157 = load ptr, ptr %27, align 8, !tbaa !5
  %158 = getelementptr inbounds %"struct.JPH::ConvexHullShape::Face", ptr %157, i32 0, i32 1
  %159 = load i16, ptr %158, align 2, !tbaa !23
  %160 = zext i16 %159 to i32
  %161 = load i32, ptr %30, align 4, !tbaa !14
  %162 = add nsw i32 %160, %161
  %163 = load i32, ptr %30, align 4, !tbaa !14
  %164 = sdiv i32 %162, %163
  store i32 %164, ptr %31, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 64, ptr %32) #9
  %165 = load ptr, ptr %13, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %33, ptr align 16 %10, i64 16, i1 false), !tbaa.struct !10
  %166 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 0
  %167 = load double, ptr %166, align 16
  %168 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 1
  %169 = load double, ptr %168, align 8
  call void @_ZNK3JPH5Mat449PreScaledENS_4Vec3E(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %32, ptr noundef nonnull align 16 dereferenceable(64) %165, double %167, double %169)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %34, ptr align 16 %10, i64 16, i1 false), !tbaa.struct !10
  %170 = getelementptr inbounds { double, double }, ptr %34, i32 0, i32 0
  %171 = load double, ptr %170, align 16
  %172 = getelementptr inbounds { double, double }, ptr %34, i32 0, i32 1
  %173 = load double, ptr %172, align 8
  %174 = call noundef zeroext i1 @_ZN3JPH12ScaleHelpers11IsInsideOutENS_4Vec3E(double %171, double %173)
  br i1 %174, label %175, label %209

175:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #9
  %176 = load ptr, ptr %29, align 8, !tbaa !5
  %177 = getelementptr inbounds i8, ptr %176, i64 -1
  store ptr %177, ptr %35, align 8, !tbaa !5
  br label %178

178:                                              ; preds = %202, %175
  %179 = load ptr, ptr %35, align 8, !tbaa !5
  %180 = load ptr, ptr %28, align 8, !tbaa !5
  %181 = icmp uge ptr %179, %180
  br i1 %181, label %183, label %182

182:                                              ; preds = %178
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #9
  br label %208

183:                                              ; preds = %178
  %184 = load ptr, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %36) #9
  %185 = getelementptr inbounds %"class.JPH::ConvexHullShape", ptr %45, i32 0, i32 5
  %186 = load ptr, ptr %35, align 8, !tbaa !5
  %187 = load i8, ptr %186, align 1, !tbaa !11
  %188 = zext i8 %187 to i64
  %189 = call noundef nonnull align 16 dereferenceable(32) ptr @_ZNK3JPH5ArrayINS_15ConvexHullShape5PointENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %185, i64 noundef %188)
  %190 = getelementptr inbounds %"struct.JPH::ConvexHullShape::Point", ptr %189, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %37, ptr align 16 %190, i64 16, i1 false), !tbaa.struct !10
  %191 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 0
  %192 = load double, ptr %191, align 16
  %193 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 1
  %194 = load double, ptr %193, align 8
  %195 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %32, double %192, double %194)
  %196 = getelementptr inbounds %"class.JPH::Vec3", ptr %36, i32 0, i32 0
  %197 = getelementptr inbounds %union.anon.6, ptr %196, i32 0, i32 0
  %198 = getelementptr inbounds { double, double }, ptr %197, i32 0, i32 0
  %199 = extractvalue { double, double } %195, 0
  store double %199, ptr %198, align 16
  %200 = getelementptr inbounds { double, double }, ptr %197, i32 0, i32 1
  %201 = extractvalue { double, double } %195, 1
  store double %201, ptr %200, align 8
  call void @_ZN3JPH11StaticArrayINS_4Vec3ELj32EE9push_backERKS1_(ptr noundef nonnull align 16 dereferenceable(528) %184, ptr noundef nonnull align 16 dereferenceable(16) %36)
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #9
  br label %202

202:                                              ; preds = %183
  %203 = load i32, ptr %31, align 4, !tbaa !14
  %204 = load ptr, ptr %35, align 8, !tbaa !5
  %205 = sext i32 %203 to i64
  %206 = sub i64 0, %205
  %207 = getelementptr inbounds i8, ptr %204, i64 %206
  store ptr %207, ptr %35, align 8, !tbaa !5
  br label %178, !llvm.loop !24

208:                                              ; preds = %182
  br label %241

209:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #9
  %210 = load ptr, ptr %28, align 8, !tbaa !5
  store ptr %210, ptr %38, align 8, !tbaa !5
  br label %211

211:                                              ; preds = %235, %209
  %212 = load ptr, ptr %38, align 8, !tbaa !5
  %213 = load ptr, ptr %29, align 8, !tbaa !5
  %214 = icmp ult ptr %212, %213
  br i1 %214, label %216, label %215

215:                                              ; preds = %211
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #9
  br label %240

216:                                              ; preds = %211
  %217 = load ptr, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %39) #9
  %218 = getelementptr inbounds %"class.JPH::ConvexHullShape", ptr %45, i32 0, i32 5
  %219 = load ptr, ptr %38, align 8, !tbaa !5
  %220 = load i8, ptr %219, align 1, !tbaa !11
  %221 = zext i8 %220 to i64
  %222 = call noundef nonnull align 16 dereferenceable(32) ptr @_ZNK3JPH5ArrayINS_15ConvexHullShape5PointENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %218, i64 noundef %221)
  %223 = getelementptr inbounds %"struct.JPH::ConvexHullShape::Point", ptr %222, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %40, ptr align 16 %223, i64 16, i1 false), !tbaa.struct !10
  %224 = getelementptr inbounds { double, double }, ptr %40, i32 0, i32 0
  %225 = load double, ptr %224, align 16
  %226 = getelementptr inbounds { double, double }, ptr %40, i32 0, i32 1
  %227 = load double, ptr %226, align 8
  %228 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %32, double %225, double %227)
  %229 = getelementptr inbounds %"class.JPH::Vec3", ptr %39, i32 0, i32 0
  %230 = getelementptr inbounds %union.anon.6, 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 @_ZN3JPH11StaticArrayINS_4Vec3ELj32EE9push_backERKS1_(ptr noundef nonnull align 16 dereferenceable(528) %217, ptr noundef nonnull align 16 dereferenceable(16) %39)
  call void @llvm.lifetime.end.p0(i64 16, ptr %39) #9
  br label %235

235:                                              ; preds = %216
  %236 = load i32, ptr %31, align 4, !tbaa !14
  %237 = load ptr, ptr %38, align 8, !tbaa !5
  %238 = sext i32 %236 to i64
  %239 = getelementptr inbounds i8, ptr %237, i64 %238
  store ptr %239, ptr %38, align 8, !tbaa !5
  br label %211, !llvm.loop !25

240:                                              ; preds = %215
  br label %241

241:                                              ; preds = %240, %208
  call void @llvm.lifetime.end.p0(i64 64, ptr %32) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #9
  ret void
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 2 dereferenceable(4) ptr @_ZNK3JPH5ArrayINS_15ConvexHullShape4FaceENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #7 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj32EE8capacityEv(ptr noundef nonnull align 16 dereferenceable(528)) #8 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH12ScaleHelpers11IsInsideOutENS_4Vec3E(double, double) #7

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH11StaticArrayINS_4Vec3ELj32EE9push_backERKS1_(ptr noundef nonnull align 16 dereferenceable(528), ptr noundef nonnull align 16 dereferenceable(16)) #2 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) #7 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i64 2158010758}
!10 = !{i64 0, i64 16, !11}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!21, !22, i64 0}
!21 = !{!"_ZTSN3JPH15ConvexHullShape4FaceE", !22, i64 0, !22, i64 2}
!22 = !{!"short", !7, i64 0}
!23 = !{!21, !22, i64 2}
!24 = distinct !{!24, !19}
!25 = distinct !{!25, !19}


; 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> }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.7 }
%union.anon.7 = type { <4 x float> }

@.str.4 = external hidden unnamed_addr constant [101 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [20 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: mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH5Plane9GetNormalEv(ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #1 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH10SubShapeID7IsEmptyEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH15ConvexHullShape17GetSupportingFaceERKNS_10SubShapeIDENS_4Vec3ES4_RKNS_5Mat44ERNS_11StaticArrayIS4_Lj32EEE(ptr noundef nonnull align 16 dereferenceable(272) %0, ptr noundef nonnull align 4 dereferenceable(4) %1, double %2, double %3, double %4, double %5, ptr noundef nonnull align 16 dereferenceable(64) %6, ptr noundef nonnull align 16 dereferenceable(528) %7) unnamed_addr #1 align 2 {
  %9 = alloca %"class.JPH::Vec3", align 16
  %10 = alloca %"class.JPH::Vec3", align 16
  %11 = alloca %"class.JPH::Vec3", align 16
  %12 = alloca %"class.JPH::Vec3", align 16
  %13 = alloca %"class.JPH::Mat44", align 16
  %14 = alloca %"class.JPH::Vec3", align 16
  %15 = alloca %"class.JPH::Vec3", align 16
  store double %4, ptr %9, align 16
  %16 = getelementptr inbounds i8, ptr %9, i64 8
  store double %5, ptr %16, align 8
  %17 = tail call noundef zeroext i1 @_ZNK3JPH10SubShapeID7IsEmptyEv(ptr noundef nonnull align 4 dereferenceable(4) %1)
  br i1 %17, label %21, label %18

18:                                               ; preds = %8
  %19 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.4, i32 noundef 676, ptr noundef nonnull @.str.12)
  br i1 %19, label %20, label %21

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

21:                                               ; preds = %8, %18, %20
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #8
  %22 = call { double, double } @_ZNK3JPH4Vec310ReciprocalEv(ptr noundef nonnull align 16 dereferenceable(16) %9)
  %23 = extractvalue { double, double } %22, 0
  store double %23, ptr %10, align 16
  %24 = getelementptr inbounds i8, ptr %10, i64 8
  %25 = extractvalue { double, double } %22, 1
  store double %25, ptr %24, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #8
  %26 = getelementptr inbounds i8, ptr %0, i64 208
  %27 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZNK3JPH5ArrayINS_5PlaneENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef 0)
  %28 = call { double, double } @_ZNK3JPH5Plane9GetNormalEv(ptr noundef nonnull align 16 dereferenceable(16) %27)
  %29 = extractvalue { double, double } %28, 0
  %30 = extractvalue { double, double } %28, 1
  %31 = call { double, double } @_ZNK3JPH4Vec3mlES0_(ptr noundef nonnull align 16 dereferenceable(16) %10, double %29, double %30)
  %32 = extractvalue { double, double } %31, 0
  store double %32, ptr %11, align 16
  %33 = getelementptr inbounds i8, ptr %11, i64 8
  %34 = extractvalue { double, double } %31, 1
  store double %34, ptr %33, align 8
  %35 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %11, double %2, double %3)
  %36 = call noundef float @_ZNK3JPH4Vec36LengthEv(ptr noundef nonnull align 16 dereferenceable(16) %11)
  %37 = call noundef i64 @_ZNK3JPH5ArrayINS_5PlaneENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %26)
  %38 = icmp ugt i64 %37, 1
  br i1 %38, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %21
  %39 = fdiv float %35, %36
  %40 = getelementptr inbounds i8, ptr %12, i64 8
  br label %63

._crit_edge.loopexit:                             ; preds = %63
  %41 = sext i32 %.147 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %21
  %.046.lcssa = phi i64 [ 0, %21 ], [ %41, %._crit_edge.loopexit ]
  %42 = getelementptr inbounds i8, ptr %0, i64 184
  %43 = call noundef nonnull align 2 dereferenceable(4) ptr @_ZNK3JPH5ArrayINS_15ConvexHullShape4FaceENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %42, i64 noundef %.046.lcssa)
  %44 = getelementptr inbounds i8, ptr %0, i64 232
  %45 = call noundef ptr @_ZNK3JPH5ArrayIhNS_12STLAllocatorIhEEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %44)
  %46 = load i16, ptr %43, align 2, !tbaa !6
  %47 = zext i16 %46 to i64
  %48 = getelementptr inbounds i8, ptr %45, i64 %47
  %49 = getelementptr inbounds i8, ptr %43, i64 2
  %50 = load i16, ptr %49, align 2, !tbaa !11
  %51 = zext i16 %50 to i64
  %52 = getelementptr inbounds i8, ptr %48, i64 %51
  %53 = call noundef i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj32EE8capacityEv(ptr noundef nonnull align 16 dereferenceable(528) %7)
  %54 = lshr i32 %53, 1
  %55 = load i16, ptr %49, align 2, !tbaa !11
  %56 = zext i16 %55 to i32
  %57 = add nuw nsw i32 %54, %56
  %58 = udiv i32 %57, %54
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %13) #8
  %.sroa.010.0.copyload = load double, ptr %9, align 16
  %.sroa.211.0.copyload = load double, ptr %16, align 8, !tbaa !12
  call void @_ZNK3JPH5Mat449PreScaledENS_4Vec3E(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %13, ptr noundef nonnull align 16 dereferenceable(64) %6, double %.sroa.010.0.copyload, double %.sroa.211.0.copyload)
  %.sroa.08.0.copyload = load double, ptr %9, align 16
  %.sroa.29.0.copyload = load double, ptr %16, align 8, !tbaa !12
  %59 = call noundef zeroext i1 @_ZN3JPH12ScaleHelpers11IsInsideOutENS_4Vec3E(double %.sroa.08.0.copyload, double %.sroa.29.0.copyload)
  br i1 %59, label %79, label %.preheader

.preheader:                                       ; preds = %._crit_edge
  %.not62 = icmp eq i16 %50, 0
  br i1 %.not62, label %.loopexit, label %.lr.ph57

.lr.ph57:                                         ; preds = %.preheader
  %60 = getelementptr inbounds i8, ptr %0, i64 160
  %61 = getelementptr inbounds i8, ptr %15, i64 8
  %62 = zext nneg i32 %58 to i64
  br label %93

63:                                               ; preds = %.lr.ph, %63
  %.055 = phi float [ %39, %.lr.ph ], [ %.1, %63 ]
  %.04654 = phi i32 [ 0, %.lr.ph ], [ %.147, %63 ]
  %.04953 = phi i64 [ 1, %.lr.ph ], [ %76, %63 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #8
  %64 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZNK3JPH5ArrayINS_5PlaneENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %.04953)
  %65 = call { double, double } @_ZNK3JPH5Plane9GetNormalEv(ptr noundef nonnull align 16 dereferenceable(16) %64)
  %66 = extractvalue { double, double } %65, 0
  %67 = extractvalue { double, double } %65, 1
  %68 = call { double, double } @_ZNK3JPH4Vec3mlES0_(ptr noundef nonnull align 16 dereferenceable(16) %10, double %66, double %67)
  %69 = extractvalue { double, double } %68, 0
  store double %69, ptr %12, align 16
  %70 = extractvalue { double, double } %68, 1
  store double %70, ptr %40, align 8
  %71 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %12, double %2, double %3)
  %72 = call noundef float @_ZNK3JPH4Vec36LengthEv(ptr noundef nonnull align 16 dereferenceable(16) %12)
  %73 = fdiv float %71, %72
  %74 = fcmp olt float %73, %.055
  %75 = trunc i64 %.04953 to i32
  %.147 = select i1 %74, i32 %75, i32 %.04654
  %.1 = select i1 %74, float %73, float %.055
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #8
  %76 = add nuw i64 %.04953, 1
  %77 = call noundef i64 @_ZNK3JPH5ArrayINS_5PlaneENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %26)
  %78 = icmp ult i64 %76, %77
  br i1 %78, label %63, label %._crit_edge.loopexit, !llvm.loop !13

79:                                               ; preds = %._crit_edge
  %80 = getelementptr inbounds i8, ptr %52, i64 -1
  %.not58 = icmp ult ptr %80, %48
  br i1 %.not58, label %.loopexit, label %.lr.ph61

.lr.ph61:                                         ; preds = %79
  %81 = getelementptr inbounds i8, ptr %0, i64 160
  %82 = getelementptr inbounds i8, ptr %14, i64 8
  %83 = zext nneg i32 %58 to i64
  %84 = sub nsw i64 0, %83
  br label %85

85:                                               ; preds = %.lr.ph61, %85
  %.05059 = phi ptr [ %80, %.lr.ph61 ], [ %92, %85 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #8
  %86 = load i8, ptr %.05059, align 1, !tbaa !12
  %87 = zext i8 %86 to i64
  %88 = call noundef nonnull align 16 dereferenceable(32) ptr @_ZNK3JPH5ArrayINS_15ConvexHullShape5PointENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef %87)
  %.sroa.03.0.copyload = load double, ptr %88, align 16
  %.sroa.24.0..sroa_idx = getelementptr inbounds i8, ptr %88, i64 8
  %.sroa.24.0.copyload = load double, ptr %.sroa.24.0..sroa_idx, align 8, !tbaa !12
  %89 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %13, double %.sroa.03.0.copyload, double %.sroa.24.0.copyload)
  %90 = extractvalue { double, double } %89, 0
  store double %90, ptr %14, align 16
  %91 = extractvalue { double, double } %89, 1
  store double %91, ptr %82, align 8
  call void @_ZN3JPH11StaticArrayINS_4Vec3ELj32EE9push_backERKS1_(ptr noundef nonnull align 16 dereferenceable(528) %7, ptr noundef nonnull align 16 dereferenceable(16) %14)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #8
  %92 = getelementptr inbounds i8, ptr %.05059, i64 %84
  %.not = icmp ult ptr %92, %48
  br i1 %.not, label %.loopexit, label %85, !llvm.loop !15

93:                                               ; preds = %.lr.ph57, %93
  %.04856 = phi ptr [ %48, %.lr.ph57 ], [ %100, %93 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #8
  %94 = load i8, ptr %.04856, align 1, !tbaa !12
  %95 = zext i8 %94 to i64
  %96 = call noundef nonnull align 16 dereferenceable(32) ptr @_ZNK3JPH5ArrayINS_15ConvexHullShape5PointENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %60, i64 noundef %95)
  %.sroa.0.0.copyload = load double, ptr %96, align 16
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %96, i64 8
  %.sroa.2.0.copyload = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !12
  %97 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %13, double %.sroa.0.0.copyload, double %.sroa.2.0.copyload)
  %98 = extractvalue { double, double } %97, 0
  store double %98, ptr %15, align 16
  %99 = extractvalue { double, double } %97, 1
  store double %99, ptr %61, align 8
  call void @_ZN3JPH11StaticArrayINS_4Vec3ELj32EE9push_backERKS1_(ptr noundef nonnull align 16 dereferenceable(528) %7, ptr noundef nonnull align 16 dereferenceable(16) %15)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #8
  %100 = getelementptr inbounds i8, ptr %.04856, i64 %62
  %101 = icmp ult ptr %100, %52
  br i1 %101, label %93, label %.loopexit, !llvm.loop !16

.loopexit:                                        ; preds = %93, %85, %.preheader, %79
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #8
  ret void
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj32EE8capacityEv(ptr noundef nonnull align 16 dereferenceable(528)) local_unnamed_addr #7 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH12ScaleHelpers11IsInsideOutENS_4Vec3E(double, double) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH11StaticArrayINS_4Vec3ELj32EE9push_backERKS1_(ptr noundef nonnull align 16 dereferenceable(528), ptr noundef nonnull align 16 dereferenceable(16)) 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

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


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