; LLVM IR from jrouwe/JoltPhysics :: Jolt/Geometry (ConvexHullBuilder)

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

%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::Array.14" = type { i64, i64, ptr }
%"struct.JPH::AssertLastParam" = type { i8 }
%"class.JPH::Array.2" = type { i64, i64, ptr }
%"class.JPH::ConvexHullBuilder" = type { ptr, %"class.JPH::Array.2", %"class.JPH::Array.5" }
%"class.JPH::Array.5" = type { i64, i64, ptr }
%"class.JPH::ConvexHullBuilder::FullEdge" = type { ptr, i32, i32 }
%"class.JPH::ConvexHullBuilder::Face" = type <{ %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Array", ptr, float, i8, [11 x i8] }>
%"class.JPH::Array" = type { i64, i64, ptr }
%"class.JPH::ConvexHullBuilder::Edge" = type <{ ptr, ptr, ptr, i32, [4 x i8] }>

@.str.1 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [25 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

declare i32 @__gxx_personality_v0(...)

; 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: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH17ConvexHullBuilder14CreateTriangleEiii(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef, i32 noundef, i32 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH17ConvexHullBuilder9sLinkFaceEPNS0_4EdgeES2_(ptr noundef, ptr noundef) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH17ConvexHullBuilder8AddPointEPNS0_4FaceEifRNS_5ArrayIS2_NS_12STLAllocatorIS2_EEEE(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef %1, i32 noundef %2, float noundef %3, ptr noundef nonnull align 8 dereferenceable(24) %4) #3 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca float, align 4
  %10 = alloca ptr, align 8
  %11 = alloca %"class.JPH::Vec3", align 16
  %12 = alloca %"class.JPH::Array.14", align 8
  %13 = alloca %"class.JPH::Vec3", align 16
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca %"struct.JPH::AssertLastParam", align 1
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca %"struct.JPH::AssertLastParam", align 1
  %22 = alloca ptr, align 8
  %23 = alloca i64, align 8
  %24 = alloca %"class.JPH::Array.2", align 8
  %25 = alloca ptr, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i32 %2, ptr %8, align 4, !tbaa !9
  store float %3, ptr %9, align 4, !tbaa !11
  store ptr %4, ptr %10, align 8, !tbaa !5
  %26 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #6
  %27 = getelementptr inbounds %"class.JPH::ConvexHullBuilder", ptr %26, i32 0, i32 0
  %28 = load ptr, ptr %27, align 8, !tbaa !13
  %29 = load i32, ptr %8, align 4, !tbaa !9
  %30 = sext i32 %29 to i64
  %31 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZNK3JPH5ArrayINS_4Vec3ENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %30)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %11, ptr align 16 %31, i64 16, i1 false), !tbaa.struct !18
  call void @_ZNK3JPH17ConvexHullBuilder13ValidateFacesEv(ptr noundef nonnull align 8 dereferenceable(56) %26)
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #6
  call void @_ZN3JPH5ArrayINS_17ConvexHullBuilder8FullEdgeENS_12STLAllocatorIS2_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %13, ptr align 16 %11, i64 16, i1 false), !tbaa.struct !18
  %33 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 0
  %34 = load double, ptr %33, align 16
  %35 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 1
  %36 = load double, ptr %35, align 8
  invoke void @_ZNK3JPH17ConvexHullBuilder8FindEdgeEPNS0_4FaceENS_4Vec3ERNS_5ArrayINS0_8FullEdgeENS_12STLAllocatorIS5_EEEE(ptr noundef nonnull align 8 dereferenceable(56) %26, ptr noundef %32, double %34, double %36, ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %37 unwind label %46

37:                                               ; preds = %5
  br label %38

38:                                               ; preds = %37
  %39 = invoke noundef i64 @_ZNK3JPH5ArrayINS_17ConvexHullBuilder8FullEdgeENS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %40 unwind label %46

40:                                               ; preds = %38
  %41 = icmp uge i64 %39, 3
  br i1 %41, label %50, label %42

42:                                               ; preds = %40
  %43 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.9, ptr noundef @.str.1, i32 noundef 641)
          to label %44 unwind label %46

44:                                               ; preds = %42
  br i1 %43, label %45, label %50

45:                                               ; preds = %44
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #6, !srcloc !20
  br label %50

46:                                               ; preds = %55, %52, %42, %38, %5
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %14, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %15, align 4
  br label %218

50:                                               ; preds = %45, %44, %40
  br label %51

51:                                               ; preds = %50
  br label %52

52:                                               ; preds = %51
  %53 = load ptr, ptr %10, align 8, !tbaa !5
  %54 = invoke noundef i64 @_ZNK3JPH5ArrayINS_17ConvexHullBuilder8FullEdgeENS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %55 unwind label %46

55:                                               ; preds = %52
  invoke void @_ZN3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef %54)
          to label %56 unwind label %46

56:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  store ptr %12, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %57 = load ptr, ptr %17, align 8, !tbaa !5
  %58 = invoke noundef ptr @_ZN3JPH5ArrayINS_17ConvexHullBuilder8FullEdgeENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %57)
          to label %59 unwind label %68

59:                                               ; preds = %56
  store ptr %58, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %60 = load ptr, ptr %17, align 8, !tbaa !5
  %61 = invoke noundef ptr @_ZN3JPH5ArrayINS_17ConvexHullBuilder8FullEdgeENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %60)
          to label %62 unwind label %72

62:                                               ; preds = %59
  store ptr %61, ptr %19, align 8, !tbaa !5
  br label %63

63:                                               ; preds = %108, %62
  %64 = load ptr, ptr %18, align 8, !tbaa !5
  %65 = load ptr, ptr %19, align 8, !tbaa !5
  %66 = icmp ne ptr %64, %65
  br i1 %66, label %76, label %67

67:                                               ; preds = %63
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %118

68:                                               ; preds = %56
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %14, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %15, align 4
  br label %117

72:                                               ; preds = %59
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %14, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %15, align 4
  br label %116

76:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %77 = load ptr, ptr %18, align 8, !tbaa !5
  store ptr %77, ptr %20, align 8, !tbaa !5
  br label %78

78:                                               ; preds = %76
  %79 = load ptr, ptr %20, align 8, !tbaa !5
  %80 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::FullEdge", ptr %79, i32 0, i32 1
  %81 = load i32, ptr %80, align 8, !tbaa !21
  %82 = load ptr, ptr %20, align 8, !tbaa !5
  %83 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::FullEdge", ptr %82, i32 0, i32 2
  %84 = load i32, ptr %83, align 4, !tbaa !23
  %85 = icmp ne i32 %81, %84
  br i1 %85, label %94, label %86

86:                                               ; preds = %78
  %87 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.10, ptr noundef @.str.1, i32 noundef 647)
          to label %88 unwind label %90

88:                                               ; preds = %86
  br i1 %87, label %89, label %94

89:                                               ; preds = %88
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #6, !srcloc !24
  br label %94

90:                                               ; preds = %86
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %14, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %15, align 4
  br label %115

94:                                               ; preds = %89, %88, %78
  br label %95

95:                                               ; preds = %94
  br label %96

96:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %97 = load ptr, ptr %20, align 8, !tbaa !5
  %98 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::FullEdge", ptr %97, i32 0, i32 1
  %99 = load i32, ptr %98, align 8, !tbaa !21
  %100 = load ptr, ptr %20, align 8, !tbaa !5
  %101 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::FullEdge", ptr %100, i32 0, i32 2
  %102 = load i32, ptr %101, align 4, !tbaa !23
  %103 = load i32, ptr %8, align 4, !tbaa !9
  %104 = invoke noundef ptr @_ZN3JPH17ConvexHullBuilder14CreateTriangleEiii(ptr noundef nonnull align 8 dereferenceable(56) %26, i32 noundef %99, i32 noundef %102, i32 noundef %103)
          to label %105 unwind label %111

105:                                              ; preds = %96
  store ptr %104, ptr %22, align 8, !tbaa !5
  %106 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZN3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %106, ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %107 unwind label %111

107:                                              ; preds = %105
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %108

108:                                              ; preds = %107
  %109 = load ptr, ptr %18, align 8, !tbaa !5
  %110 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::FullEdge", ptr %109, i32 1
  store ptr %110, ptr %18, align 8, !tbaa !5
  br label %63

111:                                              ; preds = %105, %96
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %14, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %115

115:                                              ; preds = %111, %90
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %116

116:                                              ; preds = %115, %72
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %117

117:                                              ; preds = %116, %68
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %218

118:                                              ; preds = %67
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  store i64 0, ptr %23, align 8, !tbaa !25
  br label %119

119:                                              ; preds = %170, %118
  %120 = load i64, ptr %23, align 8, !tbaa !25
  %121 = load ptr, ptr %10, align 8, !tbaa !5
  %122 = invoke noundef i64 @_ZNK3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %121)
          to label %123 unwind label %126

123:                                              ; preds = %119
  %124 = icmp ult i64 %120, %122
  br i1 %124, label %130, label %125

125:                                              ; preds = %123
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  br label %173

126:                                              ; preds = %161, %158, %147, %143, %140, %134, %130, %119
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %14, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  br label %218

130:                                              ; preds = %123
  %131 = load ptr, ptr %10, align 8, !tbaa !5
  %132 = load i64, ptr %23, align 8, !tbaa !25
  %133 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %131, i64 noundef %132)
          to label %134 unwind label %126

134:                                              ; preds = %130
  %135 = load ptr, ptr %133, align 8, !tbaa !5
  %136 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::Face", ptr %135, i32 0, i32 3
  %137 = load ptr, ptr %136, align 8, !tbaa !26
  %138 = load i64, ptr %23, align 8, !tbaa !25
  %139 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN3JPH5ArrayINS_17ConvexHullBuilder8FullEdgeENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %138)
          to label %140 unwind label %126

140:                                              ; preds = %134
  %141 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::FullEdge", ptr %139, i32 0, i32 0
  %142 = load ptr, ptr %141, align 8, !tbaa !31
  invoke void @_ZN3JPH17ConvexHullBuilder9sLinkFaceEPNS0_4EdgeES2_(ptr noundef %137, ptr noundef %142)
          to label %143 unwind label %126

143:                                              ; preds = %140
  %144 = load ptr, ptr %10, align 8, !tbaa !5
  %145 = load i64, ptr %23, align 8, !tbaa !25
  %146 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %144, i64 noundef %145)
          to label %147 unwind label %126

147:                                              ; preds = %143
  %148 = load ptr, ptr %146, align 8, !tbaa !5
  %149 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::Face", ptr %148, i32 0, i32 3
  %150 = load ptr, ptr %149, align 8, !tbaa !26
  %151 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::Edge", ptr %150, i32 0, i32 1
  %152 = load ptr, ptr %151, align 8, !tbaa !32
  %153 = load ptr, ptr %10, align 8, !tbaa !5
  %154 = load i64, ptr %23, align 8, !tbaa !25
  %155 = add i64 %154, 1
  %156 = load ptr, ptr %10, align 8, !tbaa !5
  %157 = invoke noundef i64 @_ZNK3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %156)
          to label %158 unwind label %126

158:                                              ; preds = %147
  %159 = urem i64 %155, %157
  %160 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %153, i64 noundef %159)
          to label %161 unwind label %126

161:                                              ; preds = %158
  %162 = load ptr, ptr %160, align 8, !tbaa !5
  %163 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::Face", ptr %162, i32 0, i32 3
  %164 = load ptr, ptr %163, align 8, !tbaa !26
  %165 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::Edge", ptr %164, i32 0, i32 1
  %166 = load ptr, ptr %165, align 8, !tbaa !32
  %167 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::Edge", ptr %166, i32 0, i32 1
  %168 = load ptr, ptr %167, align 8, !tbaa !32
  invoke void @_ZN3JPH17ConvexHullBuilder9sLinkFaceEPNS0_4EdgeES2_(ptr noundef %152, ptr noundef %168)
          to label %169 unwind label %126

169:                                              ; preds = %161
  br label %170

170:                                              ; preds = %169
  %171 = load i64, ptr %23, align 8, !tbaa !25
  %172 = add i64 %171, 1
  store i64 %172, ptr %23, align 8, !tbaa !25
  br label %119, !llvm.loop !34

173:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 24, ptr %24) #6
  %174 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZN3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEEC2ERKS6_(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(24) %174)
          to label %175 unwind label %200

175:                                              ; preds = %173
  br label %176

176:                                              ; preds = %213, %175
  %177 = invoke noundef zeroext i1 @_ZNK3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %24)
          to label %178 unwind label %204

178:                                              ; preds = %176
  %179 = xor i1 %177, true
  br i1 %179, label %180, label %214

180:                                              ; preds = %178
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  %181 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %24)
          to label %182 unwind label %208

182:                                              ; preds = %180
  %183 = load ptr, ptr %181, align 8, !tbaa !5
  store ptr %183, ptr %25, align 8, !tbaa !5
  invoke void @_ZN3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(24) %24)
          to label %184 unwind label %208

184:                                              ; preds = %182
  %185 = load ptr, ptr %25, align 8, !tbaa !5
  %186 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::Face", ptr %185, i32 0, i32 5
  %187 = load i8, ptr %186, align 4, !tbaa !36, !range !37, !noundef !38
  %188 = trunc i8 %187 to i1
  br i1 %188, label %213, label %189

189:                                              ; preds = %184
  %190 = load ptr, ptr %25, align 8, !tbaa !5
  invoke void @_ZN3JPH17ConvexHullBuilder19MergeDegenerateFaceEPNS0_4FaceERNS_5ArrayIS2_NS_12STLAllocatorIS2_EEEE(ptr noundef nonnull align 8 dereferenceable(56) %26, ptr noundef %190, ptr noundef nonnull align 8 dereferenceable(24) %24)
          to label %191 unwind label %208

191:                                              ; preds = %189
  %192 = load ptr, ptr %25, align 8, !tbaa !5
  %193 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::Face", ptr %192, i32 0, i32 5
  %194 = load i8, ptr %193, align 4, !tbaa !36, !range !37, !noundef !38
  %195 = trunc i8 %194 to i1
  br i1 %195, label %212, label %196

196:                                              ; preds = %191
  %197 = load ptr, ptr %25, align 8, !tbaa !5
  %198 = load float, ptr %9, align 4, !tbaa !11
  invoke void @_ZN3JPH17ConvexHullBuilder27MergeCoplanarOrConcaveFacesEPNS0_4FaceEfRNS_5ArrayIS2_NS_12STLAllocatorIS2_EEEE(ptr noundef nonnull align 8 dereferenceable(56) %26, ptr noundef %197, float noundef %198, ptr noundef nonnull align 8 dereferenceable(24) %24)
          to label %199 unwind label %208

199:                                              ; preds = %196
  br label %212

200:                                              ; preds = %173
  %201 = landingpad { ptr, i32 }
          cleanup
  %202 = extractvalue { ptr, i32 } %201, 0
  store ptr %202, ptr %14, align 8
  %203 = extractvalue { ptr, i32 } %201, 1
  store i32 %203, ptr %15, align 4
  br label %217

204:                                              ; preds = %214, %176
  %205 = landingpad { ptr, i32 }
          cleanup
  %206 = extractvalue { ptr, i32 } %205, 0
  store ptr %206, ptr %14, align 8
  %207 = extractvalue { ptr, i32 } %205, 1
  store i32 %207, ptr %15, align 4
  br label %216

208:                                              ; preds = %196, %189, %182, %180
  %209 = landingpad { ptr, i32 }
          cleanup
  %210 = extractvalue { ptr, i32 } %209, 0
  store ptr %210, ptr %14, align 8
  %211 = extractvalue { ptr, i32 } %209, 1
  store i32 %211, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  br label %216

212:                                              ; preds = %199, %191
  br label %213

213:                                              ; preds = %212, %184
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  br label %176, !llvm.loop !39

214:                                              ; preds = %178
  invoke void @_ZNK3JPH17ConvexHullBuilder13ValidateFacesEv(ptr noundef nonnull align 8 dereferenceable(56) %26)
          to label %215 unwind label %204

215:                                              ; preds = %214
  call void @_ZN3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #6
  call void @_ZN3JPH5ArrayINS_17ConvexHullBuilder8FullEdgeENS_12STLAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #6
  ret void

216:                                              ; preds = %208, %204
  call void @_ZN3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #6
  br label %217

217:                                              ; preds = %216, %200
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #6
  br label %218

218:                                              ; preds = %217, %126, %117, %46
  call void @_ZN3JPH5ArrayINS_17ConvexHullBuilder8FullEdgeENS_12STLAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #6
  br label %219

219:                                              ; preds = %218
  %220 = load ptr, ptr %14, align 8
  %221 = load i32, ptr %15, align 4
  %222 = insertvalue { ptr, i32 } poison, ptr %220, 0
  %223 = insertvalue { ptr, i32 } %222, i32 %221, 1
  resume { ptr, i32 } %223
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3JPH17ConvexHullBuilder13ValidateFacesEv(ptr noundef nonnull align 8 dereferenceable(56)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayINS_17ConvexHullBuilder8FullEdgeENS_12STLAllocatorIS2_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3JPH17ConvexHullBuilder8FindEdgeEPNS0_4FaceENS_4Vec3ERNS_5ArrayINS0_8FullEdgeENS_12STLAllocatorIS5_EEEE(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef, double, double, ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEEC2ERKS6_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH17ConvexHullBuilder19MergeDegenerateFaceEPNS0_4FaceERNS_5ArrayIS2_NS_12STLAllocatorIS2_EEEE(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef, ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH17ConvexHullBuilder27MergeCoplanarOrConcaveFacesEPNS0_4FaceEfRNS_5ArrayIS2_NS_12STLAllocatorIS2_EEEE(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef, float noundef, ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTSN3JPH17ConvexHullBuilderE", !6, i64 0, !15, i64 8, !17, i64 32}
!15 = !{!"_ZTSN3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEEE", !16, i64 0, !16, i64 8, !6, i64 16}
!16 = !{!"long", !7, i64 0}
!17 = !{!"_ZTSN3JPH5ArrayINS_17ConvexHullBuilder8CoplanarENS_12STLAllocatorIS2_EEEE", !16, i64 0, !16, i64 8, !6, i64 16}
!18 = !{i64 0, i64 16, !19}
!19 = !{!7, !7, i64 0}
!20 = !{i64 2157045333}
!21 = !{!22, !10, i64 8}
!22 = !{!"_ZTSN3JPH17ConvexHullBuilder8FullEdgeE", !6, i64 0, !10, i64 8, !10, i64 12}
!23 = !{!22, !10, i64 12}
!24 = !{i64 2157045677}
!25 = !{!16, !16, i64 0}
!26 = !{!27, !6, i64 56}
!27 = !{!"_ZTSN3JPH17ConvexHullBuilder4FaceE", !28, i64 0, !28, i64 16, !29, i64 32, !6, i64 56, !12, i64 64, !30, i64 68}
!28 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!29 = !{!"_ZTSN3JPH5ArrayIiNS_12STLAllocatorIiEEEE", !16, i64 0, !16, i64 8, !6, i64 16}
!30 = !{!"bool", !7, i64 0}
!31 = !{!22, !6, i64 0}
!32 = !{!33, !6, i64 8}
!33 = !{!"_ZTSN3JPH17ConvexHullBuilder4EdgeE", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = !{!27, !30, i64 68}
!37 = !{i8 0, i8 2}
!38 = !{}
!39 = distinct !{!39, !35}


; 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::Array.14" = type { i64, i64, ptr }
%"class.JPH::Array.2" = type { i64, i64, ptr }

@.str.1 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [25 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

declare i32 @__gxx_personality_v0(...)

; 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 uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH17ConvexHullBuilder14CreateTriangleEiii(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH17ConvexHullBuilder9sLinkFaceEPNS0_4EdgeES2_(ptr noundef, ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH17ConvexHullBuilder8AddPointEPNS0_4FaceEifRNS_5ArrayIS2_NS_12STLAllocatorIS2_EEEE(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef %1, i32 noundef %2, float noundef %3, ptr noundef nonnull align 8 dereferenceable(24) %4) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"class.JPH::Array.14", align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.JPH::Array.2", align 8
  %9 = load ptr, ptr %0, align 8, !tbaa !5
  %10 = sext i32 %2 to i64
  %11 = tail call noundef nonnull align 16 dereferenceable(16) ptr @_ZNK3JPH5ArrayINS_4Vec3ENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %10)
  %.sroa.021.0.copyload = load double, ptr %11, align 16
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %11, i64 8
  %.sroa.5.0.copyload = load double, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !13
  tail call void @_ZNK3JPH17ConvexHullBuilder13ValidateFacesEv(ptr noundef nonnull align 8 dereferenceable(56) %0)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #5
  call void @_ZN3JPH5ArrayINS_17ConvexHullBuilder8FullEdgeENS_12STLAllocatorIS2_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  invoke void @_ZNK3JPH17ConvexHullBuilder8FindEdgeEPNS0_4FaceENS_4Vec3ERNS_5ArrayINS0_8FullEdgeENS_12STLAllocatorIS5_EEEE(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef %1, double %.sroa.021.0.copyload, double %.sroa.5.0.copyload, ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %12 unwind label %19

12:                                               ; preds = %5
  %13 = call noundef i64 @_ZNK3JPH5ArrayINS_17ConvexHullBuilder8FullEdgeENS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
  %14 = icmp ugt i64 %13, 2
  br i1 %14, label %21, label %15

15:                                               ; preds = %12
  %16 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.1, i32 noundef 641)
          to label %17 unwind label %19

17:                                               ; preds = %15
  br i1 %16, label %18, label %21

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

19:                                               ; preds = %21, %15, %5
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %103

21:                                               ; preds = %18, %17, %12
  %22 = call noundef i64 @_ZNK3JPH5ArrayINS_17ConvexHullBuilder8FullEdgeENS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
  invoke void @_ZN3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %22)
          to label %23 unwind label %19

23:                                               ; preds = %21
  %24 = call noundef ptr @_ZN3JPH5ArrayINS_17ConvexHullBuilder8FullEdgeENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
  %25 = call noundef ptr @_ZN3JPH5ArrayINS_17ConvexHullBuilder8FullEdgeENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
  %.not48 = icmp eq ptr %24, %25
  br i1 %.not48, label %.preheader47.preheader, label %.lr.ph

.preheader47.preheader:                           ; preds = %41, %23
  br label %.preheader47

.lr.ph:                                           ; preds = %23, %41
  %.04049 = phi ptr [ %42, %41 ], [ %24, %23 ]
  %26 = getelementptr inbounds i8, ptr %.04049, i64 8
  %27 = load i32, ptr %26, align 8, !tbaa !15
  %28 = getelementptr inbounds i8, ptr %.04049, i64 12
  %29 = load i32, ptr %28, align 4, !tbaa !18
  %.not43 = icmp eq i32 %27, %29
  br i1 %.not43, label %30, label %36

30:                                               ; preds = %.lr.ph
  %31 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.1, i32 noundef 647)
          to label %32 unwind label %34

32:                                               ; preds = %30
  br i1 %31, label %33, label %36

33:                                               ; preds = %32
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #5, !srcloc !19
  br label %36

34:                                               ; preds = %30
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %103

36:                                               ; preds = %33, %32, %.lr.ph
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %37 = load i32, ptr %26, align 8, !tbaa !15
  %38 = load i32, ptr %28, align 4, !tbaa !18
  %39 = invoke noundef ptr @_ZN3JPH17ConvexHullBuilder14CreateTriangleEiii(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef %37, i32 noundef %38, i32 noundef %2)
          to label %40 unwind label %43

40:                                               ; preds = %36
  store ptr %39, ptr %7, align 8, !tbaa !20
  invoke void @_ZN3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %41 unwind label %43

41:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  %42 = getelementptr inbounds i8, ptr %.04049, i64 16
  %.not = icmp eq ptr %42, %25
  br i1 %.not, label %.preheader47.preheader, label %.lr.ph

43:                                               ; preds = %40, %36
  %44 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  br label %103

.preheader47:                                     ; preds = %.preheader47.preheader, %72
  %.035 = phi i64 [ %68, %72 ], [ 0, %.preheader47.preheader ]
  %45 = call noundef i64 @_ZNK3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %46 = icmp ult i64 %.035, %45
  br i1 %46, label %51, label %47

47:                                               ; preds = %.preheader47
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #5
  invoke void @_ZN3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEEC2ERKS6_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %.preheader unwind label %92

.preheader:                                       ; preds = %47
  %48 = call noundef zeroext i1 @_ZNK3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
  br i1 %48, label %._crit_edge, label %.lr.ph50

49:                                               ; preds = %72, %62, %60, %58, %53, %51
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %103

51:                                               ; preds = %.preheader47
  %52 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.035)
          to label %53 unwind label %49

53:                                               ; preds = %51
  %54 = load ptr, ptr %52, align 8, !tbaa !20
  %55 = getelementptr inbounds i8, ptr %54, i64 56
  %56 = load ptr, ptr %55, align 8, !tbaa !21
  %57 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN3JPH5ArrayINS_17ConvexHullBuilder8FullEdgeENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %.035)
          to label %58 unwind label %49

58:                                               ; preds = %53
  %59 = load ptr, ptr %57, align 8, !tbaa !27
  invoke void @_ZN3JPH17ConvexHullBuilder9sLinkFaceEPNS0_4EdgeES2_(ptr noundef %56, ptr noundef %59)
          to label %60 unwind label %49

60:                                               ; preds = %58
  %61 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.035)
          to label %62 unwind label %49

62:                                               ; preds = %60
  %63 = load ptr, ptr %61, align 8, !tbaa !20
  %64 = getelementptr inbounds i8, ptr %63, i64 56
  %65 = load ptr, ptr %64, align 8, !tbaa !21
  %66 = getelementptr inbounds i8, ptr %65, i64 8
  %67 = load ptr, ptr %66, align 8, !tbaa !28
  %68 = add nuw i64 %.035, 1
  %69 = call noundef i64 @_ZNK3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %70 = urem i64 %68, %69
  %71 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %70)
          to label %72 unwind label %49

72:                                               ; preds = %62
  %73 = load ptr, ptr %71, align 8, !tbaa !20
  %74 = getelementptr inbounds i8, ptr %73, i64 56
  %75 = load ptr, ptr %74, align 8, !tbaa !21
  %76 = getelementptr inbounds i8, ptr %75, i64 8
  %77 = load ptr, ptr %76, align 8, !tbaa !28
  %78 = getelementptr inbounds i8, ptr %77, i64 8
  %79 = load ptr, ptr %78, align 8, !tbaa !28
  invoke void @_ZN3JPH17ConvexHullBuilder9sLinkFaceEPNS0_4EdgeES2_(ptr noundef %67, ptr noundef %79)
          to label %.preheader47 unwind label %49, !llvm.loop !30

.lr.ph50:                                         ; preds = %.preheader, %98
  %80 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %81 unwind label %96

81:                                               ; preds = %.lr.ph50
  %82 = load ptr, ptr %80, align 8, !tbaa !20
  invoke void @_ZN3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %83 unwind label %96

83:                                               ; preds = %81
  %84 = getelementptr inbounds i8, ptr %82, i64 68
  %85 = load i8, ptr %84, align 4, !tbaa !32, !range !33, !noundef !34
  %86 = trunc nuw i8 %85 to i1
  br i1 %86, label %98, label %87

87:                                               ; preds = %83
  invoke void @_ZN3JPH17ConvexHullBuilder19MergeDegenerateFaceEPNS0_4FaceERNS_5ArrayIS2_NS_12STLAllocatorIS2_EEEE(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull %82, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %88 unwind label %96

88:                                               ; preds = %87
  %89 = load i8, ptr %84, align 4, !tbaa !32, !range !33, !noundef !34
  %90 = trunc nuw i8 %89 to i1
  br i1 %90, label %98, label %91

91:                                               ; preds = %88
  invoke void @_ZN3JPH17ConvexHullBuilder27MergeCoplanarOrConcaveFacesEPNS0_4FaceEfRNS_5ArrayIS2_NS_12STLAllocatorIS2_EEEE(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull %82, float noundef %3, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %98 unwind label %96

92:                                               ; preds = %47
  %93 = landingpad { ptr, i32 }
          cleanup
  br label %102

94:                                               ; preds = %._crit_edge
  %95 = landingpad { ptr, i32 }
          cleanup
  br label %101

96:                                               ; preds = %91, %87, %81, %.lr.ph50
  %97 = landingpad { ptr, i32 }
          cleanup
  br label %101

98:                                               ; preds = %88, %91, %83
  %99 = call noundef zeroext i1 @_ZNK3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
  br i1 %99, label %._crit_edge, label %.lr.ph50, !llvm.loop !35

._crit_edge:                                      ; preds = %98, %.preheader
  invoke void @_ZNK3JPH17ConvexHullBuilder13ValidateFacesEv(ptr noundef nonnull align 8 dereferenceable(56) %0)
          to label %100 unwind label %94

100:                                              ; preds = %._crit_edge
  call void @_ZN3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  call void @_ZN3JPH5ArrayINS_17ConvexHullBuilder8FullEdgeENS_12STLAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  ret void

101:                                              ; preds = %96, %94
  %.pn = phi { ptr, i32 } [ %97, %96 ], [ %95, %94 ]
  call void @_ZN3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  br label %102

102:                                              ; preds = %101, %92
  %.pn.pn = phi { ptr, i32 } [ %.pn, %101 ], [ %93, %92 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  br label %103

103:                                              ; preds = %34, %43, %102, %49, %19
  %.pn44.pn = phi { ptr, i32 } [ %50, %49 ], [ %.pn.pn, %102 ], [ %20, %19 ], [ %44, %43 ], [ %35, %34 ]
  call void @_ZN3JPH5ArrayINS_17ConvexHullBuilder8FullEdgeENS_12STLAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  resume { ptr, i32 } %.pn44.pn
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3JPH17ConvexHullBuilder13ValidateFacesEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3JPH17ConvexHullBuilder8FindEdgeEPNS0_4FaceENS_4Vec3ERNS_5ArrayINS0_8FullEdgeENS_12STLAllocatorIS5_EEEE(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef, double, double, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEEC2ERKS6_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH17ConvexHullBuilder19MergeDegenerateFaceEPNS0_4FaceERNS_5ArrayIS2_NS_12STLAllocatorIS2_EEEE(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH17ConvexHullBuilder27MergeCoplanarOrConcaveFacesEPNS0_4FaceEfRNS_5ArrayIS2_NS_12STLAllocatorIS2_EEEE(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef, float noundef, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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, !7, i64 0}
!6 = !{!"_ZTSN3JPH17ConvexHullBuilderE", !7, i64 0, !10, i64 8, !12, i64 32}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEEE", !11, i64 0, !11, i64 8, !7, i64 16}
!11 = !{!"long", !8, i64 0}
!12 = !{!"_ZTSN3JPH5ArrayINS_17ConvexHullBuilder8CoplanarENS_12STLAllocatorIS2_EEEE", !11, i64 0, !11, i64 8, !7, i64 16}
!13 = !{!8, !8, i64 0}
!14 = !{i64 2157045333}
!15 = !{!16, !17, i64 8}
!16 = !{!"_ZTSN3JPH17ConvexHullBuilder8FullEdgeE", !7, i64 0, !17, i64 8, !17, i64 12}
!17 = !{!"int", !8, i64 0}
!18 = !{!16, !17, i64 12}
!19 = !{i64 2157045677}
!20 = !{!7, !7, i64 0}
!21 = !{!22, !7, i64 56}
!22 = !{!"_ZTSN3JPH17ConvexHullBuilder4FaceE", !23, i64 0, !23, i64 16, !24, i64 32, !7, i64 56, !25, i64 64, !26, i64 68}
!23 = !{!"_ZTSN3JPH4Vec3E", !8, i64 0}
!24 = !{!"_ZTSN3JPH5ArrayIiNS_12STLAllocatorIiEEEE", !11, i64 0, !11, i64 8, !7, i64 16}
!25 = !{!"float", !8, i64 0}
!26 = !{!"bool", !8, i64 0}
!27 = !{!16, !7, i64 0}
!28 = !{!29, !7, i64 8}
!29 = !{!"_ZTSN3JPH17ConvexHullBuilder4EdgeE", !7, i64 0, !7, i64 8, !7, i64 16, !17, i64 24}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!22, !26, i64 68}
!33 = !{i8 0, i8 2}
!34 = !{}
!35 = distinct !{!35, !31}


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