; LLVM IR from jrouwe/JoltPhysics :: Jolt/TriangleSplitter (TriangleSplitterBinning)

; 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::AABox" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::UVec4" = type { %union.anon.9 }
%union.anon.9 = type { <2 x i64> }
%"class.JPH::TriangleSplitter" = type { ptr, ptr, ptr, %"class.JPH::Array", %"class.JPH::Array.0" }
%"class.JPH::Array" = type { i64, i64, ptr }
%"class.JPH::Array.0" = type { i64, i64, ptr }
%"struct.JPH::TriangleSplitter::Range" = type { i32, i32 }
%"class.JPH::TriangleSplitterBinning" = type { %"class.JPH::TriangleSplitter", i32, i32, i32, %"class.JPH::Array.3" }
%"class.JPH::Array.3" = type { i64, i64, ptr }
%"struct.JPH::TriangleSplitterBinning::Bin" = type <{ %"class.JPH::AABox", float, i32, [8 x i8], %"class.JPH::AABox", %"class.JPH::AABox", i32, i32, [8 x i8] }>

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3JPH23TriangleSplitterBinning5SplitERKNS_16TriangleSplitter5RangeERS2_S5_(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull align 4 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(8) %2, ptr noundef nonnull align 4 dereferenceable(8) %3) unnamed_addr #1 align 2 {
  %5 = alloca i1, align 1
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"class.JPH::AABox", align 16
  %13 = alloca ptr, align 8
  %14 = alloca %"class.JPH::Vec3", align 16
  %15 = alloca float, align 4
  %16 = alloca %"class.JPH::Vec3", align 16
  %17 = alloca %"class.JPH::Vec3", align 16
  %18 = alloca %"class.JPH::Vec3", align 16
  %19 = alloca %"class.JPH::Vec3", align 16
  %20 = alloca %"class.JPH::Vec3", align 16
  %21 = alloca float, align 4
  %22 = alloca i32, align 4
  %23 = alloca float, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca float, align 4
  %28 = alloca float, align 4
  %29 = alloca ptr, align 8
  %30 = alloca i32, align 4
  %31 = alloca ptr, align 8
  %32 = alloca ptr, align 8
  %33 = alloca %"class.JPH::Vec3", align 16
  %34 = alloca %"class.JPH::AABox", align 16
  %35 = alloca %"class.JPH::Vec3", align 16
  %36 = alloca %"class.JPH::Vec3", align 16
  %37 = alloca %"class.JPH::Vec3", align 16
  %38 = alloca %"class.JPH::Vec3", align 16
  %39 = alloca %"class.JPH::Vec3", align 16
  %40 = alloca %"class.JPH::UVec4", align 16
  %41 = alloca %"class.JPH::UVec4", align 16
  %42 = alloca %"class.JPH::UVec4", align 16
  %43 = alloca i32, align 4
  %44 = alloca ptr, align 8
  %45 = alloca float, align 4
  %46 = alloca i32, align 4
  %47 = alloca ptr, align 8
  %48 = alloca %"class.JPH::AABox", align 16
  %49 = alloca i32, align 4
  %50 = alloca i32, align 4
  %51 = alloca ptr, align 8
  %52 = alloca i32, align 4
  %53 = alloca ptr, align 8
  %54 = alloca i32, align 4
  %55 = alloca ptr, align 8
  %56 = alloca float, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  %57 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #11
  %58 = getelementptr inbounds %"class.JPH::TriangleSplitter", ptr %57, i32 0, i32 4
  %59 = call noundef ptr @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %58)
  %60 = load ptr, ptr %7, align 8, !tbaa !5
  %61 = getelementptr inbounds %"struct.JPH::TriangleSplitter::Range", ptr %60, i32 0, i32 0
  %62 = load i32, ptr %61, align 4, !tbaa !9
  %63 = zext i32 %62 to i64
  %64 = getelementptr inbounds i32, ptr %59, i64 %63
  store ptr %64, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #11
  %65 = getelementptr inbounds %"class.JPH::TriangleSplitter", ptr %57, i32 0, i32 4
  %66 = call noundef ptr @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %65)
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = getelementptr inbounds %"struct.JPH::TriangleSplitter::Range", ptr %67, i32 0, i32 1
  %69 = load i32, ptr %68, align 4, !tbaa !12
  %70 = zext i32 %69 to i64
  %71 = getelementptr inbounds i32, ptr %66, i64 %70
  store ptr %71, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #11
  call void @_ZN3JPH5AABoxC2Ev(ptr noundef nonnull align 16 dereferenceable(32) %12)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #11
  %72 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %72, ptr %13, align 8, !tbaa !5
  br label %73

73:                                               ; preds = %95, %4
  %74 = load ptr, ptr %13, align 8, !tbaa !5
  %75 = load ptr, ptr %11, align 8, !tbaa !5
  %76 = icmp ult ptr %74, %75
  br i1 %76, label %78, label %77

77:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #11
  br label %98

78:                                               ; preds = %73
  %79 = getelementptr inbounds %"class.JPH::TriangleSplitter", ptr %57, i32 0, i32 3
  %80 = load ptr, ptr %13, align 8, !tbaa !5
  %81 = load i32, ptr %80, align 4, !tbaa !13
  %82 = zext i32 %81 to i64
  %83 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN3JPH5ArrayINS_6Float3ENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %79, i64 noundef %82)
  %84 = call { double, double } @_ZN3JPH4Vec317sLoadFloat3UnsafeERKNS_6Float3E(ptr noundef nonnull align 4 dereferenceable(12) %83)
  %85 = getelementptr inbounds %"class.JPH::Vec3", ptr %14, i32 0, i32 0
  %86 = getelementptr inbounds %union.anon, ptr %85, i32 0, i32 0
  %87 = getelementptr inbounds { double, double }, ptr %86, i32 0, i32 0
  %88 = extractvalue { double, double } %84, 0
  store double %88, ptr %87, align 16
  %89 = getelementptr inbounds { double, double }, ptr %86, i32 0, i32 1
  %90 = extractvalue { double, double } %84, 1
  store double %90, ptr %89, align 8
  %91 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 0
  %92 = load double, ptr %91, align 16
  %93 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 1
  %94 = load double, ptr %93, align 8
  call void @_ZN3JPH5AABox11EncapsulateENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(32) %12, double %92, double %94)
  br label %95

95:                                               ; preds = %78
  %96 = load ptr, ptr %13, align 8, !tbaa !5
  %97 = getelementptr inbounds i32, ptr %96, i32 1
  store ptr %97, ptr %13, align 8, !tbaa !5
  br label %73, !llvm.loop !14

98:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #11
  store float 0x3EE4F8B580000000, ptr %15, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #11
  %99 = getelementptr inbounds %"class.JPH::AABox", ptr %12, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %16, ptr align 16 %99, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #11
  %100 = getelementptr inbounds %"class.JPH::AABox", ptr %12, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %19, ptr align 16 %16, i64 16, i1 false), !tbaa.struct !18
  %101 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 0
  %102 = load double, ptr %101, align 16
  %103 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 1
  %104 = load double, ptr %103, align 8
  %105 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %100, double %102, double %104)
  %106 = getelementptr inbounds %"class.JPH::Vec3", ptr %18, i32 0, i32 0
  %107 = getelementptr inbounds %union.anon, ptr %106, i32 0, i32 0
  %108 = getelementptr inbounds { double, double }, ptr %107, i32 0, i32 0
  %109 = extractvalue { double, double } %105, 0
  store double %109, ptr %108, align 16
  %110 = getelementptr inbounds { double, double }, ptr %107, i32 0, i32 1
  %111 = extractvalue { double, double } %105, 1
  store double %111, ptr %110, align 8
  %112 = call { double, double } @_ZN3JPH4Vec310sReplicateEf(float noundef 0x3EE4F8B580000000)
  %113 = getelementptr inbounds %"class.JPH::Vec3", ptr %20, i32 0, i32 0
  %114 = getelementptr inbounds %union.anon, ptr %113, i32 0, i32 0
  %115 = getelementptr inbounds { double, double }, ptr %114, i32 0, i32 0
  %116 = extractvalue { double, double } %112, 0
  store double %116, ptr %115, align 16
  %117 = getelementptr inbounds { double, double }, ptr %114, i32 0, i32 1
  %118 = extractvalue { double, double } %112, 1
  store double %118, ptr %117, align 8
  %119 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %120 = load double, ptr %119, align 16
  %121 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %122 = load double, ptr %121, align 8
  %123 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 0
  %124 = load double, ptr %123, align 16
  %125 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 1
  %126 = load double, ptr %125, align 8
  %127 = call { double, double } @_ZN3JPH4Vec34sMaxES0_S0_(double %120, double %122, double %124, double %126)
  %128 = getelementptr inbounds %"class.JPH::Vec3", ptr %17, i32 0, i32 0
  %129 = getelementptr inbounds %union.anon, ptr %128, i32 0, i32 0
  %130 = getelementptr inbounds { double, double }, ptr %129, i32 0, i32 0
  %131 = extractvalue { double, double } %127, 0
  store double %131, ptr %130, align 16
  %132 = getelementptr inbounds { double, double }, ptr %129, i32 0, i32 1
  %133 = extractvalue { double, double } %127, 1
  store double %133, ptr %132, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #11
  store float 0x47EFFFFFE0000000, ptr %21, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #11
  store i32 -1, ptr %22, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #11
  store float 0.000000e+00, ptr %23, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #11
  %134 = load ptr, ptr %7, align 8, !tbaa !5
  %135 = call noundef i32 @_ZNK3JPH16TriangleSplitter5Range5CountEv(ptr noundef nonnull align 4 dereferenceable(8) %134)
  %136 = getelementptr inbounds %"class.JPH::TriangleSplitterBinning", ptr %57, i32 0, i32 3
  %137 = load i32, ptr %136, align 8, !tbaa !20
  %138 = udiv i32 %135, %137
  %139 = getelementptr inbounds %"class.JPH::TriangleSplitterBinning", ptr %57, i32 0, i32 1
  %140 = load i32, ptr %139, align 8, !tbaa !27
  %141 = getelementptr inbounds %"class.JPH::TriangleSplitterBinning", ptr %57, i32 0, i32 2
  %142 = load i32, ptr %141, align 4, !tbaa !28
  %143 = call noundef i32 @_ZN3JPH5ClampIjEET_S1_S1_S1_(i32 noundef %138, i32 noundef %140, i32 noundef %142)
  store i32 %143, ptr %24, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #11
  store i32 0, ptr %25, align 4, !tbaa !13
  br label %144

144:                                              ; preds = %189, %98
  %145 = load i32, ptr %25, align 4, !tbaa !13
  %146 = icmp ult i32 %145, 3
  br i1 %146, label %148, label %147

147:                                              ; preds = %144
  store i32 5, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #11
  br label %192

148:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #11
  %149 = load i32, ptr %25, align 4, !tbaa !13
  %150 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %16, i32 noundef %149)
  store float %150, ptr %27, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #11
  %151 = load i32, ptr %25, align 4, !tbaa !13
  %152 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %17, i32 noundef %151)
  store float %152, ptr %28, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #11
  %153 = getelementptr inbounds %"class.JPH::TriangleSplitterBinning", ptr %57, i32 0, i32 4
  %154 = load i32, ptr %24, align 4, !tbaa !13
  %155 = load i32, ptr %25, align 4, !tbaa !13
  %156 = mul i32 %154, %155
  %157 = zext i32 %156 to i64
  %158 = call noundef nonnull align 16 dereferenceable(120) ptr @_ZN3JPH5ArrayINS_23TriangleSplitterBinning3BinENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %153, i64 noundef %157)
  store ptr %158, ptr %29, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #11
  store i32 0, ptr %30, align 4, !tbaa !13
  br label %159

159:                                              ; preds = %185, %148
  %160 = load i32, ptr %30, align 4, !tbaa !13
  %161 = load i32, ptr %24, align 4, !tbaa !13
  %162 = icmp ult i32 %160, %161
  br i1 %162, label %164, label %163

163:                                              ; preds = %159
  store i32 8, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #11
  br label %188

164:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #11
  %165 = load ptr, ptr %29, align 8, !tbaa !5
  %166 = load i32, ptr %30, align 4, !tbaa !13
  %167 = zext i32 %166 to i64
  %168 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %165, i64 %167
  store ptr %168, ptr %31, align 8, !tbaa !5
  %169 = load ptr, ptr %31, align 8, !tbaa !5
  %170 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %169, i32 0, i32 0
  call void @_ZN3JPH5AABox8SetEmptyEv(ptr noundef nonnull align 16 dereferenceable(32) %170)
  %171 = load float, ptr %27, align 4, !tbaa !16
  %172 = load float, ptr %28, align 4, !tbaa !16
  %173 = load i32, ptr %30, align 4, !tbaa !13
  %174 = add i32 %173, 1
  %175 = uitofp i32 %174 to float
  %176 = fmul float %172, %175
  %177 = load i32, ptr %24, align 4, !tbaa !13
  %178 = uitofp i32 %177 to float
  %179 = fdiv float %176, %178
  %180 = fadd float %171, %179
  %181 = load ptr, ptr %31, align 8, !tbaa !5
  %182 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %181, i32 0, i32 1
  store float %180, ptr %182, align 16, !tbaa !29
  %183 = load ptr, ptr %31, align 8, !tbaa !5
  %184 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %183, i32 0, i32 2
  store i32 0, ptr %184, align 4, !tbaa !33
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #11
  br label %185

185:                                              ; preds = %164
  %186 = load i32, ptr %30, align 4, !tbaa !13
  %187 = add i32 %186, 1
  store i32 %187, ptr %30, align 4, !tbaa !13
  br label %159, !llvm.loop !34

188:                                              ; preds = %163
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #11
  br label %189

189:                                              ; preds = %188
  %190 = load i32, ptr %25, align 4, !tbaa !13
  %191 = add i32 %190, 1
  store i32 %191, ptr %25, align 4, !tbaa !13
  br label %144, !llvm.loop !35

192:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #11
  %193 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %193, ptr %32, align 8, !tbaa !5
  br label %194

194:                                              ; preds = %315, %192
  %195 = load ptr, ptr %32, align 8, !tbaa !5
  %196 = load ptr, ptr %11, align 8, !tbaa !5
  %197 = icmp ult ptr %195, %196
  br i1 %197, label %199, label %198

198:                                              ; preds = %194
  store i32 11, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #11
  br label %318

199:                                              ; preds = %194
  call void @llvm.lifetime.start.p0(i64 16, ptr %33) #11
  %200 = getelementptr inbounds %"class.JPH::TriangleSplitter", ptr %57, i32 0, i32 3
  %201 = load ptr, ptr %32, align 8, !tbaa !5
  %202 = load i32, ptr %201, align 4, !tbaa !13
  %203 = zext i32 %202 to i64
  %204 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN3JPH5ArrayINS_6Float3ENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %200, i64 noundef %203)
  %205 = call { double, double } @_ZN3JPH4Vec317sLoadFloat3UnsafeERKNS_6Float3E(ptr noundef nonnull align 4 dereferenceable(12) %204)
  %206 = getelementptr inbounds %"class.JPH::Vec3", ptr %33, i32 0, i32 0
  %207 = getelementptr inbounds %union.anon, ptr %206, i32 0, i32 0
  %208 = getelementptr inbounds { double, double }, ptr %207, i32 0, i32 0
  %209 = extractvalue { double, double } %205, 0
  store double %209, ptr %208, align 16
  %210 = getelementptr inbounds { double, double }, ptr %207, i32 0, i32 1
  %211 = extractvalue { double, double } %205, 1
  store double %211, ptr %210, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %34) #11
  %212 = getelementptr inbounds %"class.JPH::TriangleSplitter", ptr %57, i32 0, i32 1
  %213 = load ptr, ptr %212, align 8, !tbaa !36
  %214 = getelementptr inbounds %"class.JPH::TriangleSplitter", ptr %57, i32 0, i32 2
  %215 = load ptr, ptr %214, align 8, !tbaa !37
  %216 = load ptr, ptr %32, align 8, !tbaa !5
  %217 = load i32, ptr %216, align 4, !tbaa !13
  %218 = zext i32 %217 to i64
  %219 = call noundef nonnull align 4 dereferenceable(20) ptr @_ZNK3JPH5ArrayINS_15IndexedTriangleENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %215, i64 noundef %218)
  call void @_ZN3JPH5AABox13sFromTriangleERKNS_5ArrayINS_6Float3ENS_12STLAllocatorIS2_EEEERKNS_15IndexedTriangleE(ptr dead_on_unwind writable sret(%"class.JPH::AABox") align 16 %34, ptr noundef nonnull align 8 dereferenceable(24) %213, ptr noundef nonnull align 4 dereferenceable(20) %219)
  call void @llvm.lifetime.start.p0(i64 16, ptr %35) #11
  call void @llvm.lifetime.start.p0(i64 16, ptr %36) #11
  call void @llvm.lifetime.start.p0(i64 16, ptr %37) #11
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %38, ptr align 16 %16, i64 16, i1 false), !tbaa.struct !18
  %220 = getelementptr inbounds { double, double }, ptr %38, i32 0, i32 0
  %221 = load double, ptr %220, align 16
  %222 = getelementptr inbounds { double, double }, ptr %38, i32 0, i32 1
  %223 = load double, ptr %222, align 8
  %224 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %33, double %221, double %223)
  %225 = getelementptr inbounds %"class.JPH::Vec3", ptr %37, i32 0, i32 0
  %226 = getelementptr inbounds %union.anon, ptr %225, i32 0, i32 0
  %227 = getelementptr inbounds { double, double }, ptr %226, i32 0, i32 0
  %228 = extractvalue { double, double } %224, 0
  store double %228, ptr %227, align 16
  %229 = getelementptr inbounds { double, double }, ptr %226, i32 0, i32 1
  %230 = extractvalue { double, double } %224, 1
  store double %230, ptr %229, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %39, ptr align 16 %17, i64 16, i1 false), !tbaa.struct !18
  %231 = getelementptr inbounds { double, double }, ptr %39, i32 0, i32 0
  %232 = load double, ptr %231, align 16
  %233 = getelementptr inbounds { double, double }, ptr %39, i32 0, i32 1
  %234 = load double, ptr %233, align 8
  %235 = call { double, double } @_ZNK3JPH4Vec3dvES0_(ptr noundef nonnull align 16 dereferenceable(16) %37, double %232, double %234)
  %236 = getelementptr inbounds %"class.JPH::Vec3", ptr %36, i32 0, i32 0
  %237 = getelementptr inbounds %union.anon, ptr %236, i32 0, i32 0
  %238 = getelementptr inbounds { double, double }, ptr %237, i32 0, i32 0
  %239 = extractvalue { double, double } %235, 0
  store double %239, ptr %238, align 16
  %240 = getelementptr inbounds { double, double }, ptr %237, i32 0, i32 1
  %241 = extractvalue { double, double } %235, 1
  store double %241, ptr %240, align 8
  %242 = load i32, ptr %24, align 4, !tbaa !13
  %243 = uitofp i32 %242 to float
  %244 = call { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16) %36, float noundef %243)
  %245 = getelementptr inbounds %"class.JPH::Vec3", ptr %35, i32 0, i32 0
  %246 = getelementptr inbounds %union.anon, ptr %245, i32 0, i32 0
  %247 = getelementptr inbounds { double, double }, ptr %246, i32 0, i32 0
  %248 = extractvalue { double, double } %244, 0
  store double %248, ptr %247, align 16
  %249 = getelementptr inbounds { double, double }, ptr %246, i32 0, i32 1
  %250 = extractvalue { double, double } %244, 1
  store double %250, ptr %249, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %37) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #11
  call void @llvm.lifetime.start.p0(i64 16, ptr %40) #11
  %251 = call { i64, i64 } @_ZNK3JPH4Vec35ToIntEv(ptr noundef nonnull align 16 dereferenceable(16) %35)
  %252 = getelementptr inbounds %"class.JPH::UVec4", ptr %41, i32 0, i32 0
  %253 = getelementptr inbounds %union.anon.9, ptr %252, i32 0, i32 0
  %254 = getelementptr inbounds { i64, i64 }, ptr %253, i32 0, i32 0
  %255 = extractvalue { i64, i64 } %251, 0
  store i64 %255, ptr %254, align 16
  %256 = getelementptr inbounds { i64, i64 }, ptr %253, i32 0, i32 1
  %257 = extractvalue { i64, i64 } %251, 1
  store i64 %257, ptr %256, align 8
  %258 = load i32, ptr %24, align 4, !tbaa !13
  %259 = sub i32 %258, 1
  %260 = call { i64, i64 } @_ZN3JPH5UVec410sReplicateEj(i32 noundef %259)
  %261 = getelementptr inbounds %"class.JPH::UVec4", ptr %42, i32 0, i32 0
  %262 = getelementptr inbounds %union.anon.9, ptr %261, i32 0, i32 0
  %263 = getelementptr inbounds { i64, i64 }, ptr %262, i32 0, i32 0
  %264 = extractvalue { i64, i64 } %260, 0
  store i64 %264, ptr %263, align 16
  %265 = getelementptr inbounds { i64, i64 }, ptr %262, i32 0, i32 1
  %266 = extractvalue { i64, i64 } %260, 1
  store i64 %266, ptr %265, align 8
  %267 = getelementptr inbounds { i64, i64 }, ptr %41, i32 0, i32 0
  %268 = load i64, ptr %267, align 16
  %269 = getelementptr inbounds { i64, i64 }, ptr %41, i32 0, i32 1
  %270 = load i64, ptr %269, align 8
  %271 = getelementptr inbounds { i64, i64 }, ptr %42, i32 0, i32 0
  %272 = load i64, ptr %271, align 16
  %273 = getelementptr inbounds { i64, i64 }, ptr %42, i32 0, i32 1
  %274 = load i64, ptr %273, align 8
  %275 = call { i64, i64 } @_ZN3JPH5UVec44sMinES0_S0_(i64 %268, i64 %270, i64 %272, i64 %274)
  %276 = getelementptr inbounds %"class.JPH::UVec4", ptr %40, i32 0, i32 0
  %277 = getelementptr inbounds %union.anon.9, ptr %276, i32 0, i32 0
  %278 = getelementptr inbounds { i64, i64 }, ptr %277, i32 0, i32 0
  %279 = extractvalue { i64, i64 } %275, 0
  store i64 %279, ptr %278, align 16
  %280 = getelementptr inbounds { i64, i64 }, ptr %277, i32 0, i32 1
  %281 = extractvalue { i64, i64 } %275, 1
  store i64 %281, ptr %280, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #11
  store i32 0, ptr %43, align 4, !tbaa !13
  br label %282

282:                                              ; preds = %311, %199
  %283 = load i32, ptr %43, align 4, !tbaa !13
  %284 = icmp ult i32 %283, 3
  br i1 %284, label %286, label %285

285:                                              ; preds = %282
  store i32 14, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #11
  br label %314

286:                                              ; preds = %282
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #11
  %287 = getelementptr inbounds %"class.JPH::TriangleSplitterBinning", ptr %57, i32 0, i32 4
  %288 = load i32, ptr %24, align 4, !tbaa !13
  %289 = load i32, ptr %43, align 4, !tbaa !13
  %290 = mul i32 %288, %289
  %291 = load i32, ptr %43, align 4, !tbaa !13
  %292 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH5UVec4ixEj(ptr noundef nonnull align 16 dereferenceable(16) %40, i32 noundef %291)
  %293 = load i32, ptr %292, align 4, !tbaa !13
  %294 = add i32 %290, %293
  %295 = zext i32 %294 to i64
  %296 = call noundef nonnull align 16 dereferenceable(120) ptr @_ZN3JPH5ArrayINS_23TriangleSplitterBinning3BinENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %287, i64 noundef %295)
  store ptr %296, ptr %44, align 8, !tbaa !5
  %297 = load ptr, ptr %44, align 8, !tbaa !5
  %298 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %297, i32 0, i32 0
  call void @_ZN3JPH5AABox11EncapsulateERKS0_(ptr noundef nonnull align 16 dereferenceable(32) %298, ptr noundef nonnull align 16 dereferenceable(32) %34)
  %299 = load ptr, ptr %44, align 8, !tbaa !5
  %300 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %299, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #11
  %301 = load i32, ptr %43, align 4, !tbaa !13
  %302 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %33, i32 noundef %301)
  store float %302, ptr %45, align 4, !tbaa !16
  %303 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %300, ptr noundef nonnull align 4 dereferenceable(4) %45)
  %304 = load float, ptr %303, align 4, !tbaa !16
  %305 = load ptr, ptr %44, align 8, !tbaa !5
  %306 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %305, i32 0, i32 1
  store float %304, ptr %306, align 16, !tbaa !29
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #11
  %307 = load ptr, ptr %44, align 8, !tbaa !5
  %308 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %307, i32 0, i32 2
  %309 = load i32, ptr %308, align 4, !tbaa !33
  %310 = add i32 %309, 1
  store i32 %310, ptr %308, align 4, !tbaa !33
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #11
  br label %311

311:                                              ; preds = %286
  %312 = load i32, ptr %43, align 4, !tbaa !13
  %313 = add i32 %312, 1
  store i32 %313, ptr %43, align 4, !tbaa !13
  br label %282, !llvm.loop !38

314:                                              ; preds = %285
  call void @llvm.lifetime.end.p0(i64 16, ptr %40) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %35) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr %34) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %33) #11
  br label %315

315:                                              ; preds = %314
  %316 = load ptr, ptr %32, align 8, !tbaa !5
  %317 = getelementptr inbounds i32, ptr %316, i32 1
  store ptr %317, ptr %32, align 8, !tbaa !5
  br label %194, !llvm.loop !39

318:                                              ; preds = %198
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #11
  store i32 0, ptr %46, align 4, !tbaa !13
  br label %319

319:                                              ; preds = %428, %318
  %320 = load i32, ptr %46, align 4, !tbaa !13
  %321 = icmp ult i32 %320, 3
  br i1 %321, label %323, label %322

322:                                              ; preds = %319
  store i32 17, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #11
  br label %431

323:                                              ; preds = %319
  %324 = load i32, ptr %46, align 4, !tbaa !13
  %325 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %17, i32 noundef %324)
  %326 = fcmp ole float %325, 0x3EE4F8B580000000
  br i1 %326, label %327, label %328

327:                                              ; preds = %323
  br label %428

328:                                              ; preds = %323
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #11
  %329 = getelementptr inbounds %"class.JPH::TriangleSplitterBinning", ptr %57, i32 0, i32 4
  %330 = load i32, ptr %24, align 4, !tbaa !13
  %331 = load i32, ptr %46, align 4, !tbaa !13
  %332 = mul i32 %330, %331
  %333 = zext i32 %332 to i64
  %334 = call noundef nonnull align 16 dereferenceable(120) ptr @_ZN3JPH5ArrayINS_23TriangleSplitterBinning3BinENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %329, i64 noundef %333)
  store ptr %334, ptr %47, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %48) #11
  call void @_ZN3JPH5AABoxC2Ev(ptr noundef nonnull align 16 dereferenceable(32) %48)
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #11
  store i32 0, ptr %49, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #11
  store i32 0, ptr %50, align 4, !tbaa !13
  br label %335

335:                                              ; preds = %357, %328
  %336 = load i32, ptr %50, align 4, !tbaa !13
  %337 = load i32, ptr %24, align 4, !tbaa !13
  %338 = icmp ult i32 %336, %337
  br i1 %338, label %340, label %339

339:                                              ; preds = %335
  store i32 20, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #11
  br label %360

340:                                              ; preds = %335
  call void @llvm.lifetime.start.p0(i64 8, ptr %51) #11
  %341 = load ptr, ptr %47, align 8, !tbaa !5
  %342 = load i32, ptr %50, align 4, !tbaa !13
  %343 = zext i32 %342 to i64
  %344 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %341, i64 %343
  store ptr %344, ptr %51, align 8, !tbaa !5
  %345 = load ptr, ptr %51, align 8, !tbaa !5
  %346 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %345, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %346, ptr align 16 %48, i64 32, i1 false), !tbaa.struct !40
  %347 = load i32, ptr %49, align 4, !tbaa !13
  %348 = load ptr, ptr %51, align 8, !tbaa !5
  %349 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %348, i32 0, i32 6
  store i32 %347, ptr %349, align 16, !tbaa !41
  %350 = load ptr, ptr %51, align 8, !tbaa !5
  %351 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %350, i32 0, i32 0
  call void @_ZN3JPH5AABox11EncapsulateERKS0_(ptr noundef nonnull align 16 dereferenceable(32) %48, ptr noundef nonnull align 16 dereferenceable(32) %351)
  %352 = load ptr, ptr %51, align 8, !tbaa !5
  %353 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %352, i32 0, i32 2
  %354 = load i32, ptr %353, align 4, !tbaa !33
  %355 = load i32, ptr %49, align 4, !tbaa !13
  %356 = add i32 %355, %354
  store i32 %356, ptr %49, align 4, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #11
  br label %357

357:                                              ; preds = %340
  %358 = load i32, ptr %50, align 4, !tbaa !13
  %359 = add i32 %358, 1
  store i32 %359, ptr %50, align 4, !tbaa !13
  br label %335, !llvm.loop !42

360:                                              ; preds = %339
  call void @_ZN3JPH5AABox8SetEmptyEv(ptr noundef nonnull align 16 dereferenceable(32) %48)
  store i32 0, ptr %49, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %52) #11
  %361 = load i32, ptr %24, align 4, !tbaa !13
  %362 = sub i32 %361, 1
  store i32 %362, ptr %52, align 4, !tbaa !13
  br label %363

363:                                              ; preds = %384, %360
  %364 = load i32, ptr %52, align 4, !tbaa !13
  %365 = icmp sge i32 %364, 0
  br i1 %365, label %367, label %366

366:                                              ; preds = %363
  store i32 23, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %52) #11
  br label %387

367:                                              ; preds = %363
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #11
  %368 = load ptr, ptr %47, align 8, !tbaa !5
  %369 = load i32, ptr %52, align 4, !tbaa !13
  %370 = sext i32 %369 to i64
  %371 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %368, i64 %370
  store ptr %371, ptr %53, align 8, !tbaa !5
  %372 = load ptr, ptr %53, align 8, !tbaa !5
  %373 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %372, i32 0, i32 0
  call void @_ZN3JPH5AABox11EncapsulateERKS0_(ptr noundef nonnull align 16 dereferenceable(32) %48, ptr noundef nonnull align 16 dereferenceable(32) %373)
  %374 = load ptr, ptr %53, align 8, !tbaa !5
  %375 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %374, i32 0, i32 2
  %376 = load i32, ptr %375, align 4, !tbaa !33
  %377 = load i32, ptr %49, align 4, !tbaa !13
  %378 = add i32 %377, %376
  store i32 %378, ptr %49, align 4, !tbaa !13
  %379 = load ptr, ptr %53, align 8, !tbaa !5
  %380 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %379, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %380, ptr align 16 %48, i64 32, i1 false), !tbaa.struct !40
  %381 = load i32, ptr %49, align 4, !tbaa !13
  %382 = load ptr, ptr %53, align 8, !tbaa !5
  %383 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %382, i32 0, i32 7
  store i32 %381, ptr %383, align 4, !tbaa !43
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #11
  br label %384

384:                                              ; preds = %367
  %385 = load i32, ptr %52, align 4, !tbaa !13
  %386 = add nsw i32 %385, -1
  store i32 %386, ptr %52, align 4, !tbaa !13
  br label %363, !llvm.loop !44

387:                                              ; preds = %366
  call void @llvm.lifetime.start.p0(i64 4, ptr %54) #11
  store i32 1, ptr %54, align 4, !tbaa !13
  br label %388

388:                                              ; preds = %424, %387
  %389 = load i32, ptr %54, align 4, !tbaa !13
  %390 = load i32, ptr %24, align 4, !tbaa !13
  %391 = icmp ult i32 %389, %390
  br i1 %391, label %393, label %392

392:                                              ; preds = %388
  store i32 26, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %54) #11
  br label %427

393:                                              ; preds = %388
  call void @llvm.lifetime.start.p0(i64 8, ptr %55) #11
  %394 = load ptr, ptr %47, align 8, !tbaa !5
  %395 = load i32, ptr %54, align 4, !tbaa !13
  %396 = zext i32 %395 to i64
  %397 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %394, i64 %396
  store ptr %397, ptr %55, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %56) #11
  %398 = load ptr, ptr %55, align 8, !tbaa !5
  %399 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %398, i32 0, i32 4
  %400 = call noundef float @_ZNK3JPH5AABox14GetSurfaceAreaEv(ptr noundef nonnull align 16 dereferenceable(32) %399)
  %401 = load ptr, ptr %55, align 8, !tbaa !5
  %402 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %401, i32 0, i32 6
  %403 = load i32, ptr %402, align 16, !tbaa !41
  %404 = uitofp i32 %403 to float
  %405 = load ptr, ptr %55, align 8, !tbaa !5
  %406 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %405, i32 0, i32 5
  %407 = call noundef float @_ZNK3JPH5AABox14GetSurfaceAreaEv(ptr noundef nonnull align 16 dereferenceable(32) %406)
  %408 = load ptr, ptr %55, align 8, !tbaa !5
  %409 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %408, i32 0, i32 7
  %410 = load i32, ptr %409, align 4, !tbaa !43
  %411 = uitofp i32 %410 to float
  %412 = fmul float %407, %411
  %413 = call float @llvm.fmuladd.f32(float %400, float %404, float %412)
  store float %413, ptr %56, align 4, !tbaa !16
  %414 = load float, ptr %56, align 4, !tbaa !16
  %415 = load float, ptr %21, align 4, !tbaa !16
  %416 = fcmp olt float %414, %415
  br i1 %416, label %417, label %423

417:                                              ; preds = %393
  %418 = load float, ptr %56, align 4, !tbaa !16
  store float %418, ptr %21, align 4, !tbaa !16
  %419 = load i32, ptr %46, align 4, !tbaa !13
  store i32 %419, ptr %22, align 4, !tbaa !13
  %420 = load ptr, ptr %55, align 8, !tbaa !5
  %421 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %420, i32 0, i32 1
  %422 = load float, ptr %421, align 16, !tbaa !29
  store float %422, ptr %23, align 4, !tbaa !16
  br label %423

423:                                              ; preds = %417, %393
  call void @llvm.lifetime.end.p0(i64 4, ptr %56) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #11
  br label %424

424:                                              ; preds = %423
  %425 = load i32, ptr %54, align 4, !tbaa !13
  %426 = add i32 %425, 1
  store i32 %426, ptr %54, align 4, !tbaa !13
  br label %388, !llvm.loop !45

427:                                              ; preds = %392
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr %48) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #11
  br label %428

428:                                              ; preds = %427, %327
  %429 = load i32, ptr %46, align 4, !tbaa !13
  %430 = add i32 %429, 1
  store i32 %430, ptr %46, align 4, !tbaa !13
  br label %319, !llvm.loop !46

431:                                              ; preds = %322
  %432 = load i32, ptr %22, align 4, !tbaa !13
  %433 = icmp eq i32 %432, -1
  br i1 %433, label %434, label %435

434:                                              ; preds = %431
  store i1 false, ptr %5, align 1
  store i32 1, ptr %26, align 4
  br label %442

435:                                              ; preds = %431
  %436 = load ptr, ptr %7, align 8, !tbaa !5
  %437 = load i32, ptr %22, align 4, !tbaa !13
  %438 = load float, ptr %23, align 4, !tbaa !16
  %439 = load ptr, ptr %8, align 8, !tbaa !5
  %440 = load ptr, ptr %9, align 8, !tbaa !5
  %441 = call noundef zeroext i1 @_ZN3JPH16TriangleSplitter13SplitInternalERKNS0_5RangeEjfRS1_S4_(ptr noundef nonnull align 8 dereferenceable(72) %57, ptr noundef nonnull align 4 dereferenceable(8) %436, i32 noundef %437, float noundef %438, ptr noundef nonnull align 4 dereferenceable(8) %439, ptr noundef nonnull align 4 dereferenceable(8) %440)
  store i1 %441, ptr %5, align 1
  store i32 1, ptr %26, align 4
  br label %442

442:                                              ; preds = %435, %434
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #11
  %443 = load i1, ptr %5, align 1
  ret i1 %443
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH5AABoxC2Ev(ptr noundef nonnull align 16 dereferenceable(32)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH5AABox11EncapsulateENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(32), double, double) #1 align 2

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

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

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef i32 @_ZN3JPH5ClampIjEET_S1_S1_S1_(i32 noundef, i32 noundef, i32 noundef) #6

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16), i32 noundef) #6 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH5AABox8SetEmptyEv(ptr noundef nonnull align 16 dereferenceable(32)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH5AABox13sFromTriangleERKNS_5ArrayINS_6Float3ENS_12STLAllocatorIS2_EEEERKNS_15IndexedTriangleE(ptr dead_on_unwind noalias writable sret(%"class.JPH::AABox") align 16, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(20)) #1 align 2

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

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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local { i64, i64 } @_ZN3JPH5UVec44sMinES0_S0_(i64, i64, i64, i64) #8 align 2

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { i64, i64 } @_ZN3JPH5UVec410sReplicateEj(i32 noundef) #3 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH5UVec4ixEj(ptr noundef nonnull align 16 dereferenceable(16), i32 noundef) #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH5AABox11EncapsulateERKS0_(ptr noundef nonnull align 16 dereferenceable(32), ptr noundef nonnull align 16 dereferenceable(32)) #1 align 2

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #9

declare noundef zeroext i1 @_ZN3JPH16TriangleSplitter13SplitInternalERKNS0_5RangeEjfRS1_S4_(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, float noundef, ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #10

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #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 = { 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #10 = { "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 #11 = { 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, !11, i64 0}
!10 = !{!"_ZTSN3JPH16TriangleSplitter5RangeE", !11, i64 0, !11, i64 4}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 4}
!13 = !{!11, !11, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!17, !17, i64 0}
!17 = !{!"float", !7, i64 0}
!18 = !{i64 0, i64 16, !19}
!19 = !{!7, !7, i64 0}
!20 = !{!21, !11, i64 80}
!21 = !{!"_ZTSN3JPH23TriangleSplitterBinningE", !22, i64 0, !11, i64 72, !11, i64 76, !11, i64 80, !26, i64 88}
!22 = !{!"_ZTSN3JPH16TriangleSplitterE", !6, i64 8, !6, i64 16, !23, i64 24, !25, i64 48}
!23 = !{!"_ZTSN3JPH5ArrayINS_6Float3ENS_12STLAllocatorIS1_EEEE", !24, i64 0, !24, i64 8, !6, i64 16}
!24 = !{!"long", !7, i64 0}
!25 = !{!"_ZTSN3JPH5ArrayIjNS_12STLAllocatorIjEEEE", !24, i64 0, !24, i64 8, !6, i64 16}
!26 = !{!"_ZTSN3JPH5ArrayINS_23TriangleSplitterBinning3BinENS_12STLAllocatorIS2_EEEE", !24, i64 0, !24, i64 8, !6, i64 16}
!27 = !{!21, !11, i64 72}
!28 = !{!21, !11, i64 76}
!29 = !{!30, !17, i64 32}
!30 = !{!"_ZTSN3JPH23TriangleSplitterBinning3BinE", !31, i64 0, !17, i64 32, !11, i64 36, !31, i64 48, !31, i64 80, !11, i64 112, !11, i64 116}
!31 = !{!"_ZTSN3JPH5AABoxE", !32, i64 0, !32, i64 16}
!32 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!33 = !{!30, !11, i64 36}
!34 = distinct !{!34, !15}
!35 = distinct !{!35, !15}
!36 = !{!22, !6, i64 8}
!37 = !{!22, !6, i64 16}
!38 = distinct !{!38, !15}
!39 = distinct !{!39, !15}
!40 = !{i64 0, i64 16, !19, i64 16, i64 16, !19}
!41 = !{!30, !11, i64 112}
!42 = distinct !{!42, !15}
!43 = !{!30, !11, i64 116}
!44 = distinct !{!44, !15}
!45 = distinct !{!45, !15}
!46 = distinct !{!46, !15}


; 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::AABox" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::UVec4" = type { %union.anon.9 }
%union.anon.9 = type { <2 x i64> }
%"struct.JPH::TriangleSplitterBinning::Bin" = type <{ %"class.JPH::AABox", float, i32, [8 x i8], %"class.JPH::AABox", %"class.JPH::AABox", i32, i32, [8 x i8] }>

; 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
define dso_local noundef zeroext i1 @_ZN3JPH23TriangleSplitterBinning5SplitERKNS_16TriangleSplitter5RangeERS2_S5_(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull align 4 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(8) %2, ptr noundef nonnull align 4 dereferenceable(8) %3) unnamed_addr #1 align 2 {
  %5 = alloca %"class.JPH::AABox", align 16
  %6 = alloca %"class.JPH::Vec3", align 16
  %7 = alloca %"class.JPH::Vec3", align 16
  %8 = alloca %"class.JPH::Vec3", align 16
  %9 = alloca %"class.JPH::AABox", 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::UVec4", align 16
  %14 = alloca float, align 4
  %15 = alloca %"class.JPH::AABox", align 16
  %16 = getelementptr inbounds i8, ptr %0, i64 48
  %17 = tail call noundef ptr @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %16)
  %18 = load i32, ptr %1, align 4, !tbaa !5
  %19 = zext i32 %18 to i64
  %20 = getelementptr inbounds i32, ptr %17, i64 %19
  %21 = tail call noundef ptr @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %16)
  %22 = getelementptr inbounds i8, ptr %1, i64 4
  %23 = load i32, ptr %22, align 4, !tbaa !10
  %24 = zext i32 %23 to i64
  %25 = getelementptr inbounds i32, ptr %21, i64 %24
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #11
  call void @_ZN3JPH5AABoxC2Ev(ptr noundef nonnull align 16 dereferenceable(32) %5)
  %26 = icmp ult ptr %20, %25
  br i1 %26, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %4
  %27 = getelementptr inbounds i8, ptr %0, i64 24
  br label %94

._crit_edge:                                      ; preds = %94, %4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #11
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %6, ptr noundef nonnull align 16 dereferenceable(16) %5, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #11
  %28 = getelementptr inbounds i8, ptr %5, i64 16
  %.sroa.085.0.copyload = load double, ptr %6, align 16
  %.sroa.286.0..sroa_idx = getelementptr inbounds i8, ptr %6, i64 8
  %.sroa.286.0.copyload = load double, ptr %.sroa.286.0..sroa_idx, align 8, !tbaa !12
  %29 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %28, double %.sroa.085.0.copyload, double %.sroa.286.0.copyload)
  %30 = extractvalue { double, double } %29, 0
  %31 = extractvalue { double, double } %29, 1
  %32 = call { double, double } @_ZN3JPH4Vec310sReplicateEf(float noundef 0x3EE4F8B580000000)
  %33 = extractvalue { double, double } %32, 0
  %34 = extractvalue { double, double } %32, 1
  %35 = call { double, double } @_ZN3JPH4Vec34sMaxES0_S0_(double %30, double %31, double %33, double %34)
  %36 = extractvalue { double, double } %35, 0
  store double %36, ptr %7, align 16
  %37 = getelementptr inbounds i8, ptr %7, i64 8
  %38 = extractvalue { double, double } %35, 1
  store double %38, ptr %37, align 8
  %39 = call noundef i32 @_ZNK3JPH16TriangleSplitter5Range5CountEv(ptr noundef nonnull align 4 dereferenceable(8) %1)
  %40 = getelementptr inbounds i8, ptr %0, i64 80
  %41 = load i32, ptr %40, align 8, !tbaa !13
  %42 = udiv i32 %39, %41
  %43 = getelementptr inbounds i8, ptr %0, i64 72
  %44 = load i32, ptr %43, align 8, !tbaa !21
  %45 = getelementptr inbounds i8, ptr %0, i64 76
  %46 = load i32, ptr %45, align 4, !tbaa !22
  %47 = call noundef i32 @_ZN3JPH5ClampIjEET_S1_S1_S1_(i32 noundef %42, i32 noundef %44, i32 noundef %46)
  %48 = getelementptr inbounds i8, ptr %0, i64 88
  %.not = icmp eq i32 %47, 0
  %49 = uitofp i32 %47 to float
  %50 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %6, i32 noundef 0)
  %51 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %7, i32 noundef 0)
  %52 = call noundef nonnull align 16 dereferenceable(120) ptr @_ZN3JPH5ArrayINS_23TriangleSplitterBinning3BinENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef 0)
  br i1 %.not, label %.split.preheader, label %.lr.ph135.us.preheader

.lr.ph135.us.preheader:                           ; preds = %._crit_edge
  %wide.trip.count = zext i32 %47 to i64
  br label %59

.split.preheader:                                 ; preds = %._crit_edge
  %53 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %6, i32 noundef 1)
  %54 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %7, i32 noundef 1)
  %55 = call noundef nonnull align 16 dereferenceable(120) ptr @_ZN3JPH5ArrayINS_23TriangleSplitterBinning3BinENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef 0)
  %56 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %6, i32 noundef 2)
  %57 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %7, i32 noundef 2)
  %58 = call noundef nonnull align 16 dereferenceable(120) ptr @_ZN3JPH5ArrayINS_23TriangleSplitterBinning3BinENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef 0)
  br label %.preheader131

59:                                               ; preds = %.lr.ph135.us.preheader, %59
  %indvars.iv = phi i64 [ 0, %.lr.ph135.us.preheader ], [ %indvars.iv.next, %59 ]
  %60 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %52, i64 %indvars.iv
  call void @_ZN3JPH5AABox8SetEmptyEv(ptr noundef nonnull align 16 dereferenceable(32) %60)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %61 = trunc nuw i64 %indvars.iv.next to i32
  %62 = uitofp i32 %61 to float
  %63 = fmul float %51, %62
  %64 = fdiv float %63, %49
  %65 = fadd float %50, %64
  %66 = getelementptr inbounds i8, ptr %60, i64 32
  store float %65, ptr %66, align 16, !tbaa !23
  %67 = getelementptr inbounds i8, ptr %60, i64 36
  store i32 0, ptr %67, align 4, !tbaa !28
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge136.us, label %59, !llvm.loop !29

._crit_edge136.us:                                ; preds = %59
  %68 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %6, i32 noundef 1)
  %69 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %7, i32 noundef 1)
  %70 = call noundef nonnull align 16 dereferenceable(120) ptr @_ZN3JPH5ArrayINS_23TriangleSplitterBinning3BinENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef %wide.trip.count)
  br label %71

71:                                               ; preds = %71, %._crit_edge136.us
  %indvars.iv.1 = phi i64 [ 0, %._crit_edge136.us ], [ %indvars.iv.next.1, %71 ]
  %72 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %70, i64 %indvars.iv.1
  call void @_ZN3JPH5AABox8SetEmptyEv(ptr noundef nonnull align 16 dereferenceable(32) %72)
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv.1, 1
  %73 = trunc nuw i64 %indvars.iv.next.1 to i32
  %74 = uitofp i32 %73 to float
  %75 = fmul float %69, %74
  %76 = fdiv float %75, %49
  %77 = fadd float %68, %76
  %78 = getelementptr inbounds i8, ptr %72, i64 32
  store float %77, ptr %78, align 16, !tbaa !23
  %79 = getelementptr inbounds i8, ptr %72, i64 36
  store i32 0, ptr %79, align 4, !tbaa !28
  %exitcond.1.not = icmp eq i64 %indvars.iv.next.1, %wide.trip.count
  br i1 %exitcond.1.not, label %._crit_edge136.us.1, label %71, !llvm.loop !29

._crit_edge136.us.1:                              ; preds = %71
  %80 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %6, i32 noundef 2)
  %81 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %7, i32 noundef 2)
  %82 = shl i32 %47, 1
  %83 = zext i32 %82 to i64
  %84 = call noundef nonnull align 16 dereferenceable(120) ptr @_ZN3JPH5ArrayINS_23TriangleSplitterBinning3BinENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef %83)
  br label %85

85:                                               ; preds = %85, %._crit_edge136.us.1
  %indvars.iv.2 = phi i64 [ 0, %._crit_edge136.us.1 ], [ %indvars.iv.next.2, %85 ]
  %86 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %84, i64 %indvars.iv.2
  call void @_ZN3JPH5AABox8SetEmptyEv(ptr noundef nonnull align 16 dereferenceable(32) %86)
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv.2, 1
  %87 = trunc nuw i64 %indvars.iv.next.2 to i32
  %88 = uitofp i32 %87 to float
  %89 = fmul float %81, %88
  %90 = fdiv float %89, %49
  %91 = fadd float %80, %90
  %92 = getelementptr inbounds i8, ptr %86, i64 32
  store float %91, ptr %92, align 16, !tbaa !23
  %93 = getelementptr inbounds i8, ptr %86, i64 36
  store i32 0, ptr %93, align 4, !tbaa !28
  %exitcond.2.not = icmp eq i64 %indvars.iv.next.2, %wide.trip.count
  br i1 %exitcond.2.not, label %.preheader131, label %85, !llvm.loop !29

94:                                               ; preds = %.lr.ph, %94
  %.0106132 = phi ptr [ %20, %.lr.ph ], [ %101, %94 ]
  %95 = load i32, ptr %.0106132, align 4, !tbaa !31
  %96 = zext i32 %95 to i64
  %97 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN3JPH5ArrayINS_6Float3ENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef %96)
  %98 = call { double, double } @_ZN3JPH4Vec317sLoadFloat3UnsafeERKNS_6Float3E(ptr noundef nonnull align 4 dereferenceable(12) %97)
  %99 = extractvalue { double, double } %98, 0
  %100 = extractvalue { double, double } %98, 1
  call void @_ZN3JPH5AABox11EncapsulateENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(32) %5, double %99, double %100)
  %101 = getelementptr inbounds i8, ptr %.0106132, i64 4
  %102 = icmp ult ptr %101, %25
  br i1 %102, label %94, label %._crit_edge, !llvm.loop !32

.preheader131:                                    ; preds = %85, %.split.preheader
  br i1 %26, label %.lr.ph140, label %.preheader131..preheader130_crit_edge

.preheader131..preheader130_crit_edge:            ; preds = %.preheader131
  %.pre = add i32 %47, -1
  br label %.preheader130

.lr.ph140:                                        ; preds = %.preheader131
  %103 = getelementptr inbounds i8, ptr %0, i64 24
  %104 = getelementptr inbounds i8, ptr %8, i64 8
  %105 = getelementptr inbounds i8, ptr %0, i64 8
  %106 = getelementptr inbounds i8, ptr %0, i64 16
  %107 = getelementptr inbounds i8, ptr %12, i64 8
  %108 = getelementptr inbounds i8, ptr %11, i64 8
  %109 = getelementptr inbounds i8, ptr %10, i64 8
  %110 = add i32 %47, -1
  %111 = getelementptr inbounds i8, ptr %13, i64 8
  %112 = shl i32 %47, 1
  br label %118

.preheader130:                                    ; preds = %118, %.preheader131..preheader130_crit_edge
  %.0109146.pre-phi = phi i32 [ %.pre, %.preheader131..preheader130_crit_edge ], [ %110, %118 ]
  %113 = icmp sgt i32 %.0109146.pre-phi, -1
  %114 = icmp ugt i32 %47, 1
  %115 = zext i32 %.0109146.pre-phi to i64
  %116 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %7, i32 noundef 0)
  %117 = fcmp ugt float %116, 0x3EE4F8B580000000
  br i1 %117, label %185, label %218

118:                                              ; preds = %.lr.ph140, %118
  %.0125139 = phi ptr [ %20, %.lr.ph140 ], [ %183, %118 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #11
  %119 = load i32, ptr %.0125139, align 4, !tbaa !31
  %120 = zext i32 %119 to i64
  %121 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN3JPH5ArrayINS_6Float3ENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %103, i64 noundef %120)
  %122 = call { double, double } @_ZN3JPH4Vec317sLoadFloat3UnsafeERKNS_6Float3E(ptr noundef nonnull align 4 dereferenceable(12) %121)
  %123 = extractvalue { double, double } %122, 0
  store double %123, ptr %8, align 16
  %124 = extractvalue { double, double } %122, 1
  store double %124, ptr %104, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #11
  %125 = load ptr, ptr %105, align 8, !tbaa !33
  %126 = load ptr, ptr %106, align 8, !tbaa !34
  %127 = load i32, ptr %.0125139, align 4, !tbaa !31
  %128 = zext i32 %127 to i64
  %129 = call noundef nonnull align 4 dereferenceable(20) ptr @_ZNK3JPH5ArrayINS_15IndexedTriangleENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %126, i64 noundef %128)
  call void @_ZN3JPH5AABox13sFromTriangleERKNS_5ArrayINS_6Float3ENS_12STLAllocatorIS2_EEEERKNS_15IndexedTriangleE(ptr dead_on_unwind nonnull writable sret(%"class.JPH::AABox") align 16 %9, ptr noundef nonnull align 8 dereferenceable(24) %125, ptr noundef nonnull align 4 dereferenceable(20) %129)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #11
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #11
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #11
  %.sroa.048.0.copyload = load double, ptr %6, align 16
  %.sroa.249.0.copyload = load double, ptr %.sroa.286.0..sroa_idx, align 8, !tbaa !12
  %130 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %8, double %.sroa.048.0.copyload, double %.sroa.249.0.copyload)
  %131 = extractvalue { double, double } %130, 0
  store double %131, ptr %12, align 16
  %132 = extractvalue { double, double } %130, 1
  store double %132, ptr %107, align 8
  %.sroa.046.0.copyload = load double, ptr %7, align 16
  %.sroa.247.0.copyload = load double, ptr %37, align 8, !tbaa !12
  %133 = call { double, double } @_ZNK3JPH4Vec3dvES0_(ptr noundef nonnull align 16 dereferenceable(16) %12, double %.sroa.046.0.copyload, double %.sroa.247.0.copyload)
  %134 = extractvalue { double, double } %133, 0
  store double %134, ptr %11, align 16
  %135 = extractvalue { double, double } %133, 1
  store double %135, ptr %108, align 8
  %136 = call { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16) %11, float noundef %49)
  %137 = extractvalue { double, double } %136, 0
  store double %137, ptr %10, align 16
  %138 = extractvalue { double, double } %136, 1
  store double %138, ptr %109, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #11
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #11
  %139 = call { i64, i64 } @_ZNK3JPH4Vec35ToIntEv(ptr noundef nonnull align 16 dereferenceable(16) %10)
  %140 = extractvalue { i64, i64 } %139, 0
  %141 = extractvalue { i64, i64 } %139, 1
  %142 = call { i64, i64 } @_ZN3JPH5UVec410sReplicateEj(i32 noundef %110)
  %143 = extractvalue { i64, i64 } %142, 0
  %144 = extractvalue { i64, i64 } %142, 1
  %145 = call { i64, i64 } @_ZN3JPH5UVec44sMinES0_S0_(i64 %140, i64 %141, i64 %143, i64 %144)
  %146 = extractvalue { i64, i64 } %145, 0
  store i64 %146, ptr %13, align 16
  %147 = extractvalue { i64, i64 } %145, 1
  store i64 %147, ptr %111, align 8
  %148 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH5UVec4ixEj(ptr noundef nonnull align 16 dereferenceable(16) %13, i32 noundef 0)
  %149 = load i32, ptr %148, align 4, !tbaa !31
  %150 = zext i32 %149 to i64
  %151 = call noundef nonnull align 16 dereferenceable(120) ptr @_ZN3JPH5ArrayINS_23TriangleSplitterBinning3BinENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef %150)
  call void @_ZN3JPH5AABox11EncapsulateERKS0_(ptr noundef nonnull align 16 dereferenceable(32) %151, ptr noundef nonnull align 16 dereferenceable(32) %9)
  %152 = getelementptr inbounds i8, ptr %151, i64 32
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #11
  %153 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %8, i32 noundef 0)
  store float %153, ptr %14, align 4, !tbaa !35
  %154 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %152, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %155 = load float, ptr %154, align 4, !tbaa !35
  store float %155, ptr %152, align 16, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #11
  %156 = getelementptr inbounds i8, ptr %151, i64 36
  %157 = load i32, ptr %156, align 4, !tbaa !28
  %158 = add i32 %157, 1
  store i32 %158, ptr %156, align 4, !tbaa !28
  %159 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH5UVec4ixEj(ptr noundef nonnull align 16 dereferenceable(16) %13, i32 noundef 1)
  %160 = load i32, ptr %159, align 4, !tbaa !31
  %161 = add i32 %160, %47
  %162 = zext i32 %161 to i64
  %163 = call noundef nonnull align 16 dereferenceable(120) ptr @_ZN3JPH5ArrayINS_23TriangleSplitterBinning3BinENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef %162)
  call void @_ZN3JPH5AABox11EncapsulateERKS0_(ptr noundef nonnull align 16 dereferenceable(32) %163, ptr noundef nonnull align 16 dereferenceable(32) %9)
  %164 = getelementptr inbounds i8, ptr %163, i64 32
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #11
  %165 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %8, i32 noundef 1)
  store float %165, ptr %14, align 4, !tbaa !35
  %166 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %164, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %167 = load float, ptr %166, align 4, !tbaa !35
  store float %167, ptr %164, align 16, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #11
  %168 = getelementptr inbounds i8, ptr %163, i64 36
  %169 = load i32, ptr %168, align 4, !tbaa !28
  %170 = add i32 %169, 1
  store i32 %170, ptr %168, align 4, !tbaa !28
  %171 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH5UVec4ixEj(ptr noundef nonnull align 16 dereferenceable(16) %13, i32 noundef 2)
  %172 = load i32, ptr %171, align 4, !tbaa !31
  %173 = add i32 %172, %112
  %174 = zext i32 %173 to i64
  %175 = call noundef nonnull align 16 dereferenceable(120) ptr @_ZN3JPH5ArrayINS_23TriangleSplitterBinning3BinENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef %174)
  call void @_ZN3JPH5AABox11EncapsulateERKS0_(ptr noundef nonnull align 16 dereferenceable(32) %175, ptr noundef nonnull align 16 dereferenceable(32) %9)
  %176 = getelementptr inbounds i8, ptr %175, i64 32
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #11
  %177 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %8, i32 noundef 2)
  store float %177, ptr %14, align 4, !tbaa !35
  %178 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %176, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %179 = load float, ptr %178, align 4, !tbaa !35
  store float %179, ptr %176, align 16, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #11
  %180 = getelementptr inbounds i8, ptr %175, i64 36
  %181 = load i32, ptr %180, align 4, !tbaa !28
  %182 = add i32 %181, 1
  store i32 %182, ptr %180, align 4, !tbaa !28
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #11
  %183 = getelementptr inbounds i8, ptr %.0125139, i64 4
  %184 = icmp ult ptr %183, %25
  br i1 %184, label %118, label %.preheader130, !llvm.loop !36

185:                                              ; preds = %.preheader130
  %186 = call noundef nonnull align 16 dereferenceable(120) ptr @_ZN3JPH5ArrayINS_23TriangleSplitterBinning3BinENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef 0)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #11
  call void @_ZN3JPH5AABoxC2Ev(ptr noundef nonnull align 16 dereferenceable(32) %15)
  br i1 %.not, label %._crit_edge145, label %.lr.ph144.preheader

.lr.ph144.preheader:                              ; preds = %185
  %wide.trip.count178 = zext i32 %47 to i64
  br label %.lr.ph144

._crit_edge145:                                   ; preds = %.lr.ph144, %185
  call void @_ZN3JPH5AABox8SetEmptyEv(ptr noundef nonnull align 16 dereferenceable(32) %15)
  br i1 %113, label %.lr.ph150, label %.preheader

.lr.ph144:                                        ; preds = %.lr.ph144.preheader, %.lr.ph144
  %indvars.iv175 = phi i64 [ 0, %.lr.ph144.preheader ], [ %indvars.iv.next176, %.lr.ph144 ]
  %.0115141 = phi i32 [ 0, %.lr.ph144.preheader ], [ %192, %.lr.ph144 ]
  %187 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %186, i64 %indvars.iv175
  %188 = getelementptr inbounds i8, ptr %187, i64 48
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %188, ptr noundef nonnull align 16 dereferenceable(32) %15, i64 32, i1 false), !tbaa.struct !37
  %189 = getelementptr inbounds i8, ptr %187, i64 112
  store i32 %.0115141, ptr %189, align 16, !tbaa !38
  call void @_ZN3JPH5AABox11EncapsulateERKS0_(ptr noundef nonnull align 16 dereferenceable(32) %15, ptr noundef nonnull align 16 dereferenceable(32) %187)
  %190 = getelementptr inbounds i8, ptr %187, i64 36
  %191 = load i32, ptr %190, align 4, !tbaa !28
  %192 = add i32 %191, %.0115141
  %indvars.iv.next176 = add nuw nsw i64 %indvars.iv175, 1
  %exitcond179.not = icmp eq i64 %indvars.iv.next176, %wide.trip.count178
  br i1 %exitcond179.not, label %._crit_edge145, label %.lr.ph144, !llvm.loop !39

.preheader:                                       ; preds = %.lr.ph150, %._crit_edge145
  br i1 %114, label %.lr.ph155.preheader, label %._crit_edge156

.lr.ph155.preheader:                              ; preds = %.preheader
  %wide.trip.count186 = zext i32 %47 to i64
  br label %.lr.ph155

.lr.ph150:                                        ; preds = %._crit_edge145, %.lr.ph150
  %indvars.iv180 = phi i64 [ %indvars.iv.next181, %.lr.ph150 ], [ %115, %._crit_edge145 ]
  %.1116147 = phi i32 [ %196, %.lr.ph150 ], [ 0, %._crit_edge145 ]
  %193 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %186, i64 %indvars.iv180
  call void @_ZN3JPH5AABox11EncapsulateERKS0_(ptr noundef nonnull align 16 dereferenceable(32) %15, ptr noundef nonnull align 16 dereferenceable(32) %193)
  %194 = getelementptr inbounds i8, ptr %193, i64 36
  %195 = load i32, ptr %194, align 4, !tbaa !28
  %196 = add i32 %195, %.1116147
  %197 = getelementptr inbounds i8, ptr %193, i64 80
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %197, ptr noundef nonnull align 16 dereferenceable(32) %15, i64 32, i1 false), !tbaa.struct !37
  %198 = getelementptr inbounds i8, ptr %193, i64 116
  store i32 %196, ptr %198, align 4, !tbaa !40
  %indvars.iv.next181 = add nsw i64 %indvars.iv180, -1
  %199 = icmp sgt i64 %indvars.iv180, 0
  br i1 %199, label %.lr.ph150, label %.preheader, !llvm.loop !41

._crit_edge156:                                   ; preds = %217, %.preheader
  %.1118.lcssa = phi float [ 0.000000e+00, %.preheader ], [ %.2119, %217 ]
  %.1111.lcssa = phi i32 [ -1, %.preheader ], [ %.2112, %217 ]
  %.1.lcssa = phi float [ 0x47EFFFFFE0000000, %.preheader ], [ %.2, %217 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #11
  br label %218

.lr.ph155:                                        ; preds = %.lr.ph155.preheader, %217
  %indvars.iv183 = phi i64 [ 1, %.lr.ph155.preheader ], [ %indvars.iv.next184, %217 ]
  %.1153 = phi float [ 0x47EFFFFFE0000000, %.lr.ph155.preheader ], [ %.2, %217 ]
  %.1111152 = phi i32 [ -1, %.lr.ph155.preheader ], [ %.2112, %217 ]
  %.1118151 = phi float [ 0.000000e+00, %.lr.ph155.preheader ], [ %.2119, %217 ]
  %200 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %186, i64 %indvars.iv183
  %201 = getelementptr inbounds i8, ptr %200, i64 48
  %202 = call noundef float @_ZNK3JPH5AABox14GetSurfaceAreaEv(ptr noundef nonnull align 16 dereferenceable(32) %201)
  %203 = getelementptr inbounds i8, ptr %200, i64 112
  %204 = load i32, ptr %203, align 16, !tbaa !38
  %205 = uitofp i32 %204 to float
  %206 = getelementptr inbounds i8, ptr %200, i64 80
  %207 = call noundef float @_ZNK3JPH5AABox14GetSurfaceAreaEv(ptr noundef nonnull align 16 dereferenceable(32) %206)
  %208 = getelementptr inbounds i8, ptr %200, i64 116
  %209 = load i32, ptr %208, align 4, !tbaa !40
  %210 = uitofp i32 %209 to float
  %211 = fmul float %207, %210
  %212 = call float @llvm.fmuladd.f32(float %202, float %205, float %211)
  %213 = fcmp olt float %212, %.1153
  br i1 %213, label %214, label %217

214:                                              ; preds = %.lr.ph155
  %215 = getelementptr inbounds i8, ptr %200, i64 32
  %216 = load float, ptr %215, align 16, !tbaa !23
  br label %217

217:                                              ; preds = %214, %.lr.ph155
  %.2119 = phi float [ %216, %214 ], [ %.1118151, %.lr.ph155 ]
  %.2112 = phi i32 [ 0, %214 ], [ %.1111152, %.lr.ph155 ]
  %.2 = phi float [ %212, %214 ], [ %.1153, %.lr.ph155 ]
  %indvars.iv.next184 = add nuw nsw i64 %indvars.iv183, 1
  %exitcond187.not = icmp eq i64 %indvars.iv.next184, %wide.trip.count186
  br i1 %exitcond187.not, label %._crit_edge156, label %.lr.ph155, !llvm.loop !42

218:                                              ; preds = %.preheader130, %._crit_edge156
  %.3120 = phi float [ 0.000000e+00, %.preheader130 ], [ %.1118.lcssa, %._crit_edge156 ]
  %.3113 = phi i32 [ -1, %.preheader130 ], [ %.1111.lcssa, %._crit_edge156 ]
  %.3 = phi float [ 0x47EFFFFFE0000000, %.preheader130 ], [ %.1.lcssa, %._crit_edge156 ]
  %219 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %7, i32 noundef 1)
  %220 = fcmp ugt float %219, 0x3EE4F8B580000000
  br i1 %220, label %221, label %255

221:                                              ; preds = %218
  %222 = zext i32 %47 to i64
  %223 = call noundef nonnull align 16 dereferenceable(120) ptr @_ZN3JPH5ArrayINS_23TriangleSplitterBinning3BinENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef %222)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #11
  call void @_ZN3JPH5AABoxC2Ev(ptr noundef nonnull align 16 dereferenceable(32) %15)
  br i1 %.not, label %._crit_edge145.1, label %.lr.ph144.1

.lr.ph144.1:                                      ; preds = %221, %.lr.ph144.1
  %indvars.iv175.1 = phi i64 [ %indvars.iv.next176.1, %.lr.ph144.1 ], [ 0, %221 ]
  %.0115141.1 = phi i32 [ %229, %.lr.ph144.1 ], [ 0, %221 ]
  %224 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %223, i64 %indvars.iv175.1
  %225 = getelementptr inbounds i8, ptr %224, i64 48
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %225, ptr noundef nonnull align 16 dereferenceable(32) %15, i64 32, i1 false), !tbaa.struct !37
  %226 = getelementptr inbounds i8, ptr %224, i64 112
  store i32 %.0115141.1, ptr %226, align 16, !tbaa !38
  call void @_ZN3JPH5AABox11EncapsulateERKS0_(ptr noundef nonnull align 16 dereferenceable(32) %15, ptr noundef nonnull align 16 dereferenceable(32) %224)
  %227 = getelementptr inbounds i8, ptr %224, i64 36
  %228 = load i32, ptr %227, align 4, !tbaa !28
  %229 = add i32 %228, %.0115141.1
  %indvars.iv.next176.1 = add nuw nsw i64 %indvars.iv175.1, 1
  %exitcond179.1.not = icmp eq i64 %indvars.iv.next176.1, %222
  br i1 %exitcond179.1.not, label %._crit_edge145.1, label %.lr.ph144.1, !llvm.loop !39

._crit_edge145.1:                                 ; preds = %.lr.ph144.1, %221
  call void @_ZN3JPH5AABox8SetEmptyEv(ptr noundef nonnull align 16 dereferenceable(32) %15)
  br i1 %113, label %.lr.ph150.1, label %.preheader.1

.lr.ph150.1:                                      ; preds = %._crit_edge145.1, %.lr.ph150.1
  %indvars.iv180.1 = phi i64 [ %indvars.iv.next181.1, %.lr.ph150.1 ], [ %115, %._crit_edge145.1 ]
  %.1116147.1 = phi i32 [ %233, %.lr.ph150.1 ], [ 0, %._crit_edge145.1 ]
  %230 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %223, i64 %indvars.iv180.1
  call void @_ZN3JPH5AABox11EncapsulateERKS0_(ptr noundef nonnull align 16 dereferenceable(32) %15, ptr noundef nonnull align 16 dereferenceable(32) %230)
  %231 = getelementptr inbounds i8, ptr %230, i64 36
  %232 = load i32, ptr %231, align 4, !tbaa !28
  %233 = add i32 %232, %.1116147.1
  %234 = getelementptr inbounds i8, ptr %230, i64 80
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %234, ptr noundef nonnull align 16 dereferenceable(32) %15, i64 32, i1 false), !tbaa.struct !37
  %235 = getelementptr inbounds i8, ptr %230, i64 116
  store i32 %233, ptr %235, align 4, !tbaa !40
  %indvars.iv.next181.1 = add nsw i64 %indvars.iv180.1, -1
  %236 = icmp sgt i64 %indvars.iv180.1, 0
  br i1 %236, label %.lr.ph150.1, label %.preheader.1, !llvm.loop !41

.preheader.1:                                     ; preds = %.lr.ph150.1, %._crit_edge145.1
  br i1 %114, label %.lr.ph155.1, label %._crit_edge156.1

.lr.ph155.1:                                      ; preds = %.preheader.1, %254
  %indvars.iv183.1 = phi i64 [ %indvars.iv.next184.1, %254 ], [ 1, %.preheader.1 ]
  %.1153.1 = phi float [ %.2.1, %254 ], [ %.3, %.preheader.1 ]
  %.1111152.1 = phi i32 [ %.2112.1, %254 ], [ %.3113, %.preheader.1 ]
  %.1118151.1 = phi float [ %.2119.1, %254 ], [ %.3120, %.preheader.1 ]
  %237 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %223, i64 %indvars.iv183.1
  %238 = getelementptr inbounds i8, ptr %237, i64 48
  %239 = call noundef float @_ZNK3JPH5AABox14GetSurfaceAreaEv(ptr noundef nonnull align 16 dereferenceable(32) %238)
  %240 = getelementptr inbounds i8, ptr %237, i64 112
  %241 = load i32, ptr %240, align 16, !tbaa !38
  %242 = uitofp i32 %241 to float
  %243 = getelementptr inbounds i8, ptr %237, i64 80
  %244 = call noundef float @_ZNK3JPH5AABox14GetSurfaceAreaEv(ptr noundef nonnull align 16 dereferenceable(32) %243)
  %245 = getelementptr inbounds i8, ptr %237, i64 116
  %246 = load i32, ptr %245, align 4, !tbaa !40
  %247 = uitofp i32 %246 to float
  %248 = fmul float %244, %247
  %249 = call float @llvm.fmuladd.f32(float %239, float %242, float %248)
  %250 = fcmp olt float %249, %.1153.1
  br i1 %250, label %251, label %254

251:                                              ; preds = %.lr.ph155.1
  %252 = getelementptr inbounds i8, ptr %237, i64 32
  %253 = load float, ptr %252, align 16, !tbaa !23
  br label %254

254:                                              ; preds = %251, %.lr.ph155.1
  %.2119.1 = phi float [ %253, %251 ], [ %.1118151.1, %.lr.ph155.1 ]
  %.2112.1 = phi i32 [ 1, %251 ], [ %.1111152.1, %.lr.ph155.1 ]
  %.2.1 = phi float [ %249, %251 ], [ %.1153.1, %.lr.ph155.1 ]
  %indvars.iv.next184.1 = add nuw nsw i64 %indvars.iv183.1, 1
  %exitcond187.1.not = icmp eq i64 %indvars.iv.next184.1, %222
  br i1 %exitcond187.1.not, label %._crit_edge156.1, label %.lr.ph155.1, !llvm.loop !42

._crit_edge156.1:                                 ; preds = %254, %.preheader.1
  %.1118.lcssa.1 = phi float [ %.3120, %.preheader.1 ], [ %.2119.1, %254 ]
  %.1111.lcssa.1 = phi i32 [ %.3113, %.preheader.1 ], [ %.2112.1, %254 ]
  %.1.lcssa.1 = phi float [ %.3, %.preheader.1 ], [ %.2.1, %254 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #11
  br label %255

255:                                              ; preds = %._crit_edge156.1, %218
  %.3120.1 = phi float [ %.3120, %218 ], [ %.1118.lcssa.1, %._crit_edge156.1 ]
  %.3113.1 = phi i32 [ %.3113, %218 ], [ %.1111.lcssa.1, %._crit_edge156.1 ]
  %.3.1 = phi float [ %.3, %218 ], [ %.1.lcssa.1, %._crit_edge156.1 ]
  %256 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %7, i32 noundef 2)
  %257 = fcmp ugt float %256, 0x3EE4F8B580000000
  br i1 %257, label %258, label %293

258:                                              ; preds = %255
  %259 = shl i32 %47, 1
  %260 = zext i32 %259 to i64
  %261 = call noundef nonnull align 16 dereferenceable(120) ptr @_ZN3JPH5ArrayINS_23TriangleSplitterBinning3BinENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef %260)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #11
  call void @_ZN3JPH5AABoxC2Ev(ptr noundef nonnull align 16 dereferenceable(32) %15)
  br i1 %.not, label %._crit_edge145.2, label %.lr.ph144.preheader.2

.lr.ph144.preheader.2:                            ; preds = %258
  %wide.trip.count178.2 = zext i32 %47 to i64
  br label %.lr.ph144.2

.lr.ph144.2:                                      ; preds = %.lr.ph144.2, %.lr.ph144.preheader.2
  %indvars.iv175.2 = phi i64 [ 0, %.lr.ph144.preheader.2 ], [ %indvars.iv.next176.2, %.lr.ph144.2 ]
  %.0115141.2 = phi i32 [ 0, %.lr.ph144.preheader.2 ], [ %267, %.lr.ph144.2 ]
  %262 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %261, i64 %indvars.iv175.2
  %263 = getelementptr inbounds i8, ptr %262, i64 48
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %263, ptr noundef nonnull align 16 dereferenceable(32) %15, i64 32, i1 false), !tbaa.struct !37
  %264 = getelementptr inbounds i8, ptr %262, i64 112
  store i32 %.0115141.2, ptr %264, align 16, !tbaa !38
  call void @_ZN3JPH5AABox11EncapsulateERKS0_(ptr noundef nonnull align 16 dereferenceable(32) %15, ptr noundef nonnull align 16 dereferenceable(32) %262)
  %265 = getelementptr inbounds i8, ptr %262, i64 36
  %266 = load i32, ptr %265, align 4, !tbaa !28
  %267 = add i32 %266, %.0115141.2
  %indvars.iv.next176.2 = add nuw nsw i64 %indvars.iv175.2, 1
  %exitcond179.2.not = icmp eq i64 %indvars.iv.next176.2, %wide.trip.count178.2
  br i1 %exitcond179.2.not, label %._crit_edge145.2, label %.lr.ph144.2, !llvm.loop !39

._crit_edge145.2:                                 ; preds = %.lr.ph144.2, %258
  call void @_ZN3JPH5AABox8SetEmptyEv(ptr noundef nonnull align 16 dereferenceable(32) %15)
  br i1 %113, label %.lr.ph150.2, label %.preheader.2

.lr.ph150.2:                                      ; preds = %._crit_edge145.2, %.lr.ph150.2
  %indvars.iv180.2 = phi i64 [ %indvars.iv.next181.2, %.lr.ph150.2 ], [ %115, %._crit_edge145.2 ]
  %.1116147.2 = phi i32 [ %271, %.lr.ph150.2 ], [ 0, %._crit_edge145.2 ]
  %268 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %261, i64 %indvars.iv180.2
  call void @_ZN3JPH5AABox11EncapsulateERKS0_(ptr noundef nonnull align 16 dereferenceable(32) %15, ptr noundef nonnull align 16 dereferenceable(32) %268)
  %269 = getelementptr inbounds i8, ptr %268, i64 36
  %270 = load i32, ptr %269, align 4, !tbaa !28
  %271 = add i32 %270, %.1116147.2
  %272 = getelementptr inbounds i8, ptr %268, i64 80
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %272, ptr noundef nonnull align 16 dereferenceable(32) %15, i64 32, i1 false), !tbaa.struct !37
  %273 = getelementptr inbounds i8, ptr %268, i64 116
  store i32 %271, ptr %273, align 4, !tbaa !40
  %indvars.iv.next181.2 = add nsw i64 %indvars.iv180.2, -1
  %274 = icmp sgt i64 %indvars.iv180.2, 0
  br i1 %274, label %.lr.ph150.2, label %.preheader.2, !llvm.loop !41

.preheader.2:                                     ; preds = %.lr.ph150.2, %._crit_edge145.2
  br i1 %114, label %.lr.ph155.preheader.2, label %._crit_edge156.2

.lr.ph155.preheader.2:                            ; preds = %.preheader.2
  %wide.trip.count186.2 = zext i32 %47 to i64
  br label %.lr.ph155.2

.lr.ph155.2:                                      ; preds = %292, %.lr.ph155.preheader.2
  %indvars.iv183.2 = phi i64 [ 1, %.lr.ph155.preheader.2 ], [ %indvars.iv.next184.2, %292 ]
  %.1153.2 = phi float [ %.3.1, %.lr.ph155.preheader.2 ], [ %.2.2, %292 ]
  %.1111152.2 = phi i32 [ %.3113.1, %.lr.ph155.preheader.2 ], [ %.2112.2, %292 ]
  %.1118151.2 = phi float [ %.3120.1, %.lr.ph155.preheader.2 ], [ %.2119.2, %292 ]
  %275 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %261, i64 %indvars.iv183.2
  %276 = getelementptr inbounds i8, ptr %275, i64 48
  %277 = call noundef float @_ZNK3JPH5AABox14GetSurfaceAreaEv(ptr noundef nonnull align 16 dereferenceable(32) %276)
  %278 = getelementptr inbounds i8, ptr %275, i64 112
  %279 = load i32, ptr %278, align 16, !tbaa !38
  %280 = uitofp i32 %279 to float
  %281 = getelementptr inbounds i8, ptr %275, i64 80
  %282 = call noundef float @_ZNK3JPH5AABox14GetSurfaceAreaEv(ptr noundef nonnull align 16 dereferenceable(32) %281)
  %283 = getelementptr inbounds i8, ptr %275, i64 116
  %284 = load i32, ptr %283, align 4, !tbaa !40
  %285 = uitofp i32 %284 to float
  %286 = fmul float %282, %285
  %287 = call float @llvm.fmuladd.f32(float %277, float %280, float %286)
  %288 = fcmp olt float %287, %.1153.2
  br i1 %288, label %289, label %292

289:                                              ; preds = %.lr.ph155.2
  %290 = getelementptr inbounds i8, ptr %275, i64 32
  %291 = load float, ptr %290, align 16, !tbaa !23
  br label %292

292:                                              ; preds = %289, %.lr.ph155.2
  %.2119.2 = phi float [ %291, %289 ], [ %.1118151.2, %.lr.ph155.2 ]
  %.2112.2 = phi i32 [ 2, %289 ], [ %.1111152.2, %.lr.ph155.2 ]
  %.2.2 = phi float [ %287, %289 ], [ %.1153.2, %.lr.ph155.2 ]
  %indvars.iv.next184.2 = add nuw nsw i64 %indvars.iv183.2, 1
  %exitcond187.2.not = icmp eq i64 %indvars.iv.next184.2, %wide.trip.count186.2
  br i1 %exitcond187.2.not, label %._crit_edge156.2, label %.lr.ph155.2, !llvm.loop !42

._crit_edge156.2:                                 ; preds = %292, %.preheader.2
  %.1118.lcssa.2 = phi float [ %.3120.1, %.preheader.2 ], [ %.2119.2, %292 ]
  %.1111.lcssa.2 = phi i32 [ %.3113.1, %.preheader.2 ], [ %.2112.2, %292 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #11
  br label %293

293:                                              ; preds = %._crit_edge156.2, %255
  %.3120.2 = phi float [ %.3120.1, %255 ], [ %.1118.lcssa.2, %._crit_edge156.2 ]
  %.3113.2 = phi i32 [ %.3113.1, %255 ], [ %.1111.lcssa.2, %._crit_edge156.2 ]
  %294 = icmp eq i32 %.3113.2, -1
  br i1 %294, label %297, label %295

295:                                              ; preds = %293
  %296 = call noundef zeroext i1 @_ZN3JPH16TriangleSplitter13SplitInternalERKNS0_5RangeEjfRS1_S4_(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 4 dereferenceable(8) %1, i32 noundef %.3113.2, float noundef %.3120.2, ptr noundef nonnull align 4 dereferenceable(8) %2, ptr noundef nonnull align 4 dereferenceable(8) %3)
  br label %297

297:                                              ; preds = %293, %295
  %.0 = phi i1 [ %296, %295 ], [ false, %293 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #11
  ret i1 %.0
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH5AABoxC2Ev(ptr noundef nonnull align 16 dereferenceable(32)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH5AABox11EncapsulateENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(32), double, double) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

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

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef i32 @_ZN3JPH5ClampIjEET_S1_S1_S1_(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #6

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16), i32 noundef) local_unnamed_addr #6 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH5AABox8SetEmptyEv(ptr noundef nonnull align 16 dereferenceable(32)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH5AABox13sFromTriangleERKNS_5ArrayINS_6Float3ENS_12STLAllocatorIS2_EEEERKNS_15IndexedTriangleE(ptr dead_on_unwind noalias writable sret(%"class.JPH::AABox") align 16, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(20)) local_unnamed_addr #1 align 2

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

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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local { i64, i64 } @_ZN3JPH5UVec44sMinES0_S0_(i64, i64, i64, i64) local_unnamed_addr #8 align 2

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { i64, i64 } @_ZN3JPH5UVec410sReplicateEj(i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH5UVec4ixEj(ptr noundef nonnull align 16 dereferenceable(16), i32 noundef) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH5AABox11EncapsulateERKS0_(ptr noundef nonnull align 16 dereferenceable(32), ptr noundef nonnull align 16 dereferenceable(32)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #9

declare noundef zeroext i1 @_ZN3JPH16TriangleSplitter13SplitInternalERKNS0_5RangeEjfRS1_S4_(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, float noundef, ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #10

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 = { 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 #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 = { 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 #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #10 = { "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 #11 = { 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 = !{!"_ZTSN3JPH16TriangleSplitter5RangeE", !7, i64 0, !7, i64 4}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!6, !7, i64 4}
!11 = !{i64 0, i64 16, !12}
!12 = !{!8, !8, i64 0}
!13 = !{!14, !7, i64 80}
!14 = !{!"_ZTSN3JPH23TriangleSplitterBinningE", !15, i64 0, !7, i64 72, !7, i64 76, !7, i64 80, !20, i64 88}
!15 = !{!"_ZTSN3JPH16TriangleSplitterE", !16, i64 8, !16, i64 16, !17, i64 24, !19, i64 48}
!16 = !{!"any pointer", !8, i64 0}
!17 = !{!"_ZTSN3JPH5ArrayINS_6Float3ENS_12STLAllocatorIS1_EEEE", !18, i64 0, !18, i64 8, !16, i64 16}
!18 = !{!"long", !8, i64 0}
!19 = !{!"_ZTSN3JPH5ArrayIjNS_12STLAllocatorIjEEEE", !18, i64 0, !18, i64 8, !16, i64 16}
!20 = !{!"_ZTSN3JPH5ArrayINS_23TriangleSplitterBinning3BinENS_12STLAllocatorIS2_EEEE", !18, i64 0, !18, i64 8, !16, i64 16}
!21 = !{!14, !7, i64 72}
!22 = !{!14, !7, i64 76}
!23 = !{!24, !27, i64 32}
!24 = !{!"_ZTSN3JPH23TriangleSplitterBinning3BinE", !25, i64 0, !27, i64 32, !7, i64 36, !25, i64 48, !25, i64 80, !7, i64 112, !7, i64 116}
!25 = !{!"_ZTSN3JPH5AABoxE", !26, i64 0, !26, i64 16}
!26 = !{!"_ZTSN3JPH4Vec3E", !8, i64 0}
!27 = !{!"float", !8, i64 0}
!28 = !{!24, !7, i64 36}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = !{!7, !7, i64 0}
!32 = distinct !{!32, !30}
!33 = !{!15, !16, i64 8}
!34 = !{!15, !16, i64 16}
!35 = !{!27, !27, i64 0}
!36 = distinct !{!36, !30}
!37 = !{i64 0, i64 16, !12, i64 16, i64 16, !12}
!38 = !{!24, !7, i64 112}
!39 = distinct !{!39, !30}
!40 = !{!24, !7, i64 116}
!41 = distinct !{!41, !30}
!42 = distinct !{!42, !30}


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