; LLVM IR from zig-gamedev/zphysics :: libs/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> }
%"struct.JPH::TriangleSplitter::Range" = type { i32, i32 }
%"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 }
%"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 %"class.JPH::AABox", align 16
  %11 = alloca i32, align 4
  %12 = alloca %"class.JPH::Vec3", align 16
  %13 = alloca float, align 4
  %14 = alloca i32, align 4
  %15 = alloca float, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca float, align 4
  %20 = alloca float, align 4
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca float, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca ptr, align 8
  %29 = alloca %"class.JPH::AABox", align 16
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca ptr, align 8
  %33 = alloca i32, align 4
  %34 = alloca ptr, align 8
  %35 = alloca i32, align 4
  %36 = alloca ptr, align 8
  %37 = 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
  %38 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #10
  call void @_ZN3JPH5AABoxC2Ev(ptr noundef nonnull align 16 dereferenceable(32) %10)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #10
  %39 = load ptr, ptr %7, align 8, !tbaa !5
  %40 = getelementptr inbounds %"struct.JPH::TriangleSplitter::Range", ptr %39, i32 0, i32 0
  %41 = load i32, ptr %40, align 4, !tbaa !9
  store i32 %41, ptr %11, align 4, !tbaa !12
  br label %42

42:                                               ; preds = %62, %4
  %43 = load i32, ptr %11, align 4, !tbaa !12
  %44 = load ptr, ptr %7, align 8, !tbaa !5
  %45 = getelementptr inbounds %"struct.JPH::TriangleSplitter::Range", ptr %44, i32 0, i32 1
  %46 = load i32, ptr %45, align 4, !tbaa !13
  %47 = icmp ult i32 %43, %46
  br i1 %47, label %49, label %48

48:                                               ; preds = %42
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #10
  br label %65

49:                                               ; preds = %42
  %50 = getelementptr inbounds %"class.JPH::TriangleSplitter", ptr %38, i32 0, i32 3
  %51 = getelementptr inbounds %"class.JPH::TriangleSplitter", ptr %38, i32 0, i32 4
  %52 = load i32, ptr %11, align 4, !tbaa !12
  %53 = zext i32 %52 to i64
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %51, i64 noundef %53)
  %55 = load i32, ptr %54, align 4, !tbaa !12
  %56 = zext i32 %55 to i64
  %57 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN3JPH5ArrayINS_6Float3ENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %50, i64 noundef %56)
  call void @_ZN3JPH4Vec3C2ERKNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16) %12, ptr noundef nonnull align 4 dereferenceable(12) %57)
  %58 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 0
  %59 = load double, ptr %58, align 16
  %60 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 1
  %61 = load double, ptr %60, align 8
  call void @_ZN3JPH5AABox11EncapsulateENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(32) %10, double %59, double %61)
  br label %62

62:                                               ; preds = %49
  %63 = load i32, ptr %11, align 4, !tbaa !12
  %64 = add i32 %63, 1
  store i32 %64, ptr %11, align 4, !tbaa !12
  br label %42, !llvm.loop !14

65:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #10
  store float 0x47EFFFFFE0000000, ptr %13, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #10
  store i32 -1, ptr %14, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #10
  store float 0.000000e+00, ptr %15, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #10
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = call noundef i32 @_ZNK3JPH16TriangleSplitter5Range5CountEv(ptr noundef nonnull align 4 dereferenceable(8) %66)
  %68 = getelementptr inbounds %"class.JPH::TriangleSplitterBinning", ptr %38, i32 0, i32 3
  %69 = load i32, ptr %68, align 8, !tbaa !18
  %70 = udiv i32 %67, %69
  %71 = getelementptr inbounds %"class.JPH::TriangleSplitterBinning", ptr %38, i32 0, i32 1
  %72 = load i32, ptr %71, align 8, !tbaa !25
  %73 = getelementptr inbounds %"class.JPH::TriangleSplitterBinning", ptr %38, i32 0, i32 2
  %74 = load i32, ptr %73, align 4, !tbaa !26
  %75 = call noundef i32 @_ZN3JPH5ClampIjEET_S1_S1_S1_(i32 noundef %70, i32 noundef %72, i32 noundef %74)
  store i32 %75, ptr %16, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #10
  store i32 0, ptr %17, align 4, !tbaa !12
  br label %76

76:                                               ; preds = %277, %65
  %77 = load i32, ptr %17, align 4, !tbaa !12
  %78 = icmp ult i32 %77, 3
  br i1 %78, label %80, label %79

79:                                               ; preds = %76
  store i32 5, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #10
  br label %280

80:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #10
  %81 = getelementptr inbounds %"class.JPH::AABox", ptr %10, i32 0, i32 0
  %82 = load i32, ptr %17, align 4, !tbaa !12
  %83 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %81, i32 noundef %82)
  store float %83, ptr %19, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #10
  %84 = getelementptr inbounds %"class.JPH::AABox", ptr %10, i32 0, i32 1
  %85 = load i32, ptr %17, align 4, !tbaa !12
  %86 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %84, i32 noundef %85)
  %87 = load float, ptr %19, align 4, !tbaa !16
  %88 = fsub float %86, %87
  store float %88, ptr %20, align 4, !tbaa !16
  %89 = load float, ptr %20, align 4, !tbaa !16
  %90 = fcmp olt float %89, 0x3EE4F8B580000000
  br i1 %90, label %91, label %92

91:                                               ; preds = %80
  store i32 7, ptr %18, align 4
  br label %274

92:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #10
  store i32 0, ptr %21, align 4, !tbaa !12
  br label %93

93:                                               ; preds = %119, %92
  %94 = load i32, ptr %21, align 4, !tbaa !12
  %95 = load i32, ptr %16, align 4, !tbaa !12
  %96 = icmp ult i32 %94, %95
  br i1 %96, label %98, label %97

97:                                               ; preds = %93
  store i32 8, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #10
  br label %122

98:                                               ; preds = %93
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #10
  %99 = getelementptr inbounds %"class.JPH::TriangleSplitterBinning", ptr %38, i32 0, i32 4
  %100 = load i32, ptr %21, align 4, !tbaa !12
  %101 = zext i32 %100 to i64
  %102 = call noundef nonnull align 16 dereferenceable(120) ptr @_ZN3JPH5ArrayINS_23TriangleSplitterBinning3BinENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %99, i64 noundef %101)
  store ptr %102, ptr %22, align 8, !tbaa !5
  %103 = load ptr, ptr %22, align 8, !tbaa !5
  %104 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %103, i32 0, i32 0
  call void @_ZN3JPH5AABox8SetEmptyEv(ptr noundef nonnull align 16 dereferenceable(32) %104)
  %105 = load float, ptr %19, align 4, !tbaa !16
  %106 = load float, ptr %20, align 4, !tbaa !16
  %107 = load i32, ptr %21, align 4, !tbaa !12
  %108 = add i32 %107, 1
  %109 = uitofp i32 %108 to float
  %110 = fmul float %106, %109
  %111 = load i32, ptr %16, align 4, !tbaa !12
  %112 = uitofp i32 %111 to float
  %113 = fdiv float %110, %112
  %114 = fadd float %105, %113
  %115 = load ptr, ptr %22, align 8, !tbaa !5
  %116 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %115, i32 0, i32 1
  store float %114, ptr %116, align 16, !tbaa !27
  %117 = load ptr, ptr %22, align 8, !tbaa !5
  %118 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %117, i32 0, i32 2
  store i32 0, ptr %118, align 4, !tbaa !31
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #10
  br label %119

119:                                              ; preds = %98
  %120 = load i32, ptr %21, align 4, !tbaa !12
  %121 = add i32 %120, 1
  store i32 %121, ptr %21, align 4, !tbaa !12
  br label %93, !llvm.loop !32

122:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #10
  %123 = load ptr, ptr %7, align 8, !tbaa !5
  %124 = getelementptr inbounds %"struct.JPH::TriangleSplitter::Range", ptr %123, i32 0, i32 0
  %125 = load i32, ptr %124, align 4, !tbaa !9
  store i32 %125, ptr %23, align 4, !tbaa !12
  br label %126

126:                                              ; preds = %177, %122
  %127 = load i32, ptr %23, align 4, !tbaa !12
  %128 = load ptr, ptr %7, align 8, !tbaa !5
  %129 = getelementptr inbounds %"struct.JPH::TriangleSplitter::Range", ptr %128, i32 0, i32 1
  %130 = load i32, ptr %129, align 4, !tbaa !13
  %131 = icmp ult i32 %127, %130
  br i1 %131, label %133, label %132

132:                                              ; preds = %126
  store i32 11, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #10
  br label %180

133:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #10
  %134 = getelementptr inbounds %"class.JPH::TriangleSplitter", ptr %38, i32 0, i32 3
  %135 = getelementptr inbounds %"class.JPH::TriangleSplitter", ptr %38, i32 0, i32 4
  %136 = load i32, ptr %23, align 4, !tbaa !12
  %137 = zext i32 %136 to i64
  %138 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %135, i64 noundef %137)
  %139 = load i32, ptr %138, align 4, !tbaa !12
  %140 = zext i32 %139 to i64
  %141 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN3JPH5ArrayINS_6Float3ENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %134, i64 noundef %140)
  %142 = load i32, ptr %17, align 4, !tbaa !12
  %143 = call noundef float @_ZNK3JPH6Float3ixEi(ptr noundef nonnull align 4 dereferenceable(12) %141, i32 noundef %142)
  store float %143, ptr %24, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #10
  %144 = load float, ptr %24, align 4, !tbaa !16
  %145 = load float, ptr %19, align 4, !tbaa !16
  %146 = fsub float %144, %145
  %147 = load float, ptr %20, align 4, !tbaa !16
  %148 = fdiv float %146, %147
  %149 = load i32, ptr %16, align 4, !tbaa !12
  %150 = uitofp i32 %149 to float
  %151 = fmul float %148, %150
  %152 = fptoui float %151 to i32
  store i32 %152, ptr %26, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #10
  %153 = load i32, ptr %16, align 4, !tbaa !12
  %154 = sub i32 %153, 1
  store i32 %154, ptr %27, align 4, !tbaa !12
  %155 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef nonnull align 4 dereferenceable(4) %27)
  %156 = load i32, ptr %155, align 4, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #10
  store i32 %156, ptr %25, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #10
  %157 = getelementptr inbounds %"class.JPH::TriangleSplitterBinning", ptr %38, i32 0, i32 4
  %158 = load i32, ptr %25, align 4, !tbaa !12
  %159 = zext i32 %158 to i64
  %160 = call noundef nonnull align 16 dereferenceable(120) ptr @_ZN3JPH5ArrayINS_23TriangleSplitterBinning3BinENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %157, i64 noundef %159)
  store ptr %160, ptr %28, align 8, !tbaa !5
  %161 = load ptr, ptr %28, align 8, !tbaa !5
  %162 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %161, i32 0, i32 0
  %163 = getelementptr inbounds %"class.JPH::TriangleSplitter", ptr %38, i32 0, i32 1
  %164 = load ptr, ptr %163, align 8, !tbaa !33
  %165 = load i32, ptr %23, align 4, !tbaa !12
  %166 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3JPH16TriangleSplitter11GetTriangleEj(ptr noundef nonnull align 8 dereferenceable(72) %38, i32 noundef %165)
  call void @_ZN3JPH5AABox11EncapsulateERKNS_5ArrayINS_6Float3ENS_12STLAllocatorIS2_EEEERKNS_15IndexedTriangleE(ptr noundef nonnull align 16 dereferenceable(32) %162, ptr noundef nonnull align 8 dereferenceable(24) %164, ptr noundef nonnull align 4 dereferenceable(16) %166)
  %167 = load ptr, ptr %28, align 8, !tbaa !5
  %168 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %167, i32 0, i32 1
  %169 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %168, ptr noundef nonnull align 4 dereferenceable(4) %24)
  %170 = load float, ptr %169, align 4, !tbaa !16
  %171 = load ptr, ptr %28, align 8, !tbaa !5
  %172 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %171, i32 0, i32 1
  store float %170, ptr %172, align 16, !tbaa !27
  %173 = load ptr, ptr %28, align 8, !tbaa !5
  %174 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %173, i32 0, i32 2
  %175 = load i32, ptr %174, align 4, !tbaa !31
  %176 = add i32 %175, 1
  store i32 %176, ptr %174, align 4, !tbaa !31
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #10
  br label %177

177:                                              ; preds = %133
  %178 = load i32, ptr %23, align 4, !tbaa !12
  %179 = add i32 %178, 1
  store i32 %179, ptr %23, align 4, !tbaa !12
  br label %126, !llvm.loop !34

180:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 32, ptr %29) #10
  call void @_ZN3JPH5AABoxC2Ev(ptr noundef nonnull align 16 dereferenceable(32) %29)
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #10
  store i32 0, ptr %30, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #10
  store i32 0, ptr %31, align 4, !tbaa !12
  br label %181

181:                                              ; preds = %203, %180
  %182 = load i32, ptr %31, align 4, !tbaa !12
  %183 = load i32, ptr %16, align 4, !tbaa !12
  %184 = icmp ult i32 %182, %183
  br i1 %184, label %186, label %185

185:                                              ; preds = %181
  store i32 14, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #10
  br label %206

186:                                              ; preds = %181
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #10
  %187 = getelementptr inbounds %"class.JPH::TriangleSplitterBinning", ptr %38, i32 0, i32 4
  %188 = load i32, ptr %31, align 4, !tbaa !12
  %189 = zext i32 %188 to i64
  %190 = call noundef nonnull align 16 dereferenceable(120) ptr @_ZN3JPH5ArrayINS_23TriangleSplitterBinning3BinENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %187, i64 noundef %189)
  store ptr %190, ptr %32, align 8, !tbaa !5
  %191 = load ptr, ptr %32, align 8, !tbaa !5
  %192 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %191, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %192, ptr align 16 %29, i64 32, i1 false), !tbaa.struct !35
  %193 = load i32, ptr %30, align 4, !tbaa !12
  %194 = load ptr, ptr %32, align 8, !tbaa !5
  %195 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %194, i32 0, i32 6
  store i32 %193, ptr %195, align 16, !tbaa !37
  %196 = load ptr, ptr %32, align 8, !tbaa !5
  %197 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %196, i32 0, i32 0
  call void @_ZN3JPH5AABox11EncapsulateERKS0_(ptr noundef nonnull align 16 dereferenceable(32) %29, ptr noundef nonnull align 16 dereferenceable(32) %197)
  %198 = load ptr, ptr %32, align 8, !tbaa !5
  %199 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %198, i32 0, i32 2
  %200 = load i32, ptr %199, align 4, !tbaa !31
  %201 = load i32, ptr %30, align 4, !tbaa !12
  %202 = add i32 %201, %200
  store i32 %202, ptr %30, align 4, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #10
  br label %203

203:                                              ; preds = %186
  %204 = load i32, ptr %31, align 4, !tbaa !12
  %205 = add i32 %204, 1
  store i32 %205, ptr %31, align 4, !tbaa !12
  br label %181, !llvm.loop !38

206:                                              ; preds = %185
  call void @_ZN3JPH5AABox8SetEmptyEv(ptr noundef nonnull align 16 dereferenceable(32) %29)
  store i32 0, ptr %30, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #10
  %207 = load i32, ptr %16, align 4, !tbaa !12
  %208 = sub i32 %207, 1
  store i32 %208, ptr %33, align 4, !tbaa !12
  br label %209

209:                                              ; preds = %230, %206
  %210 = load i32, ptr %33, align 4, !tbaa !12
  %211 = icmp sge i32 %210, 0
  br i1 %211, label %213, label %212

212:                                              ; preds = %209
  store i32 17, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #10
  br label %233

213:                                              ; preds = %209
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #10
  %214 = getelementptr inbounds %"class.JPH::TriangleSplitterBinning", ptr %38, i32 0, i32 4
  %215 = load i32, ptr %33, align 4, !tbaa !12
  %216 = sext i32 %215 to i64
  %217 = call noundef nonnull align 16 dereferenceable(120) ptr @_ZN3JPH5ArrayINS_23TriangleSplitterBinning3BinENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %214, i64 noundef %216)
  store ptr %217, ptr %34, align 8, !tbaa !5
  %218 = load ptr, ptr %34, align 8, !tbaa !5
  %219 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %218, i32 0, i32 0
  call void @_ZN3JPH5AABox11EncapsulateERKS0_(ptr noundef nonnull align 16 dereferenceable(32) %29, ptr noundef nonnull align 16 dereferenceable(32) %219)
  %220 = load ptr, ptr %34, align 8, !tbaa !5
  %221 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %220, i32 0, i32 2
  %222 = load i32, ptr %221, align 4, !tbaa !31
  %223 = load i32, ptr %30, align 4, !tbaa !12
  %224 = add i32 %223, %222
  store i32 %224, ptr %30, align 4, !tbaa !12
  %225 = load ptr, ptr %34, align 8, !tbaa !5
  %226 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %225, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %226, ptr align 16 %29, i64 32, i1 false), !tbaa.struct !35
  %227 = load i32, ptr %30, align 4, !tbaa !12
  %228 = load ptr, ptr %34, align 8, !tbaa !5
  %229 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %228, i32 0, i32 7
  store i32 %227, ptr %229, align 4, !tbaa !39
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #10
  br label %230

230:                                              ; preds = %213
  %231 = load i32, ptr %33, align 4, !tbaa !12
  %232 = add nsw i32 %231, -1
  store i32 %232, ptr %33, align 4, !tbaa !12
  br label %209, !llvm.loop !40

233:                                              ; preds = %212
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #10
  store i32 1, ptr %35, align 4, !tbaa !12
  br label %234

234:                                              ; preds = %270, %233
  %235 = load i32, ptr %35, align 4, !tbaa !12
  %236 = load i32, ptr %16, align 4, !tbaa !12
  %237 = icmp ult i32 %235, %236
  br i1 %237, label %239, label %238

238:                                              ; preds = %234
  store i32 20, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #10
  br label %273

239:                                              ; preds = %234
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #10
  %240 = getelementptr inbounds %"class.JPH::TriangleSplitterBinning", ptr %38, i32 0, i32 4
  %241 = load i32, ptr %35, align 4, !tbaa !12
  %242 = zext i32 %241 to i64
  %243 = call noundef nonnull align 16 dereferenceable(120) ptr @_ZN3JPH5ArrayINS_23TriangleSplitterBinning3BinENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %240, i64 noundef %242)
  store ptr %243, ptr %36, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #10
  %244 = load ptr, ptr %36, align 8, !tbaa !5
  %245 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %244, i32 0, i32 4
  %246 = call noundef float @_ZNK3JPH5AABox14GetSurfaceAreaEv(ptr noundef nonnull align 16 dereferenceable(32) %245)
  %247 = load ptr, ptr %36, align 8, !tbaa !5
  %248 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %247, i32 0, i32 6
  %249 = load i32, ptr %248, align 16, !tbaa !37
  %250 = uitofp i32 %249 to float
  %251 = load ptr, ptr %36, align 8, !tbaa !5
  %252 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %251, i32 0, i32 5
  %253 = call noundef float @_ZNK3JPH5AABox14GetSurfaceAreaEv(ptr noundef nonnull align 16 dereferenceable(32) %252)
  %254 = load ptr, ptr %36, align 8, !tbaa !5
  %255 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %254, i32 0, i32 7
  %256 = load i32, ptr %255, align 4, !tbaa !39
  %257 = uitofp i32 %256 to float
  %258 = fmul float %253, %257
  %259 = call float @llvm.fmuladd.f32(float %246, float %250, float %258)
  store float %259, ptr %37, align 4, !tbaa !16
  %260 = load float, ptr %37, align 4, !tbaa !16
  %261 = load float, ptr %13, align 4, !tbaa !16
  %262 = fcmp olt float %260, %261
  br i1 %262, label %263, label %269

263:                                              ; preds = %239
  %264 = load float, ptr %37, align 4, !tbaa !16
  store float %264, ptr %13, align 4, !tbaa !16
  %265 = load i32, ptr %17, align 4, !tbaa !12
  store i32 %265, ptr %14, align 4, !tbaa !12
  %266 = load ptr, ptr %36, align 8, !tbaa !5
  %267 = getelementptr inbounds %"struct.JPH::TriangleSplitterBinning::Bin", ptr %266, i32 0, i32 1
  %268 = load float, ptr %267, align 16, !tbaa !27
  store float %268, ptr %15, align 4, !tbaa !16
  br label %269

269:                                              ; preds = %263, %239
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #10
  br label %270

270:                                              ; preds = %269
  %271 = load i32, ptr %35, align 4, !tbaa !12
  %272 = add i32 %271, 1
  store i32 %272, ptr %35, align 4, !tbaa !12
  br label %234, !llvm.loop !41

273:                                              ; preds = %238
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %29) #10
  store i32 0, ptr %18, align 4
  br label %274

274:                                              ; preds = %273, %91
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #10
  %275 = load i32, ptr %18, align 4
  switch i32 %275, label %293 [
    i32 0, label %276
    i32 7, label %277
  ]

276:                                              ; preds = %274
  br label %277

277:                                              ; preds = %276, %274
  %278 = load i32, ptr %17, align 4, !tbaa !12
  %279 = add i32 %278, 1
  store i32 %279, ptr %17, align 4, !tbaa !12
  br label %76, !llvm.loop !42

280:                                              ; preds = %79
  %281 = load i32, ptr %14, align 4, !tbaa !12
  %282 = icmp eq i32 %281, -1
  br i1 %282, label %283, label %284

283:                                              ; preds = %280
  store i1 false, ptr %5, align 1
  store i32 1, ptr %18, align 4
  br label %291

284:                                              ; preds = %280
  %285 = load ptr, ptr %7, align 8, !tbaa !5
  %286 = load i32, ptr %14, align 4, !tbaa !12
  %287 = load float, ptr %15, align 4, !tbaa !16
  %288 = load ptr, ptr %8, align 8, !tbaa !5
  %289 = load ptr, ptr %9, align 8, !tbaa !5
  %290 = call noundef zeroext i1 @_ZN3JPH16TriangleSplitter13SplitInternalERKNS0_5RangeEjfRS1_S4_(ptr noundef nonnull align 8 dereferenceable(72) %38, ptr noundef nonnull align 4 dereferenceable(8) %285, i32 noundef %286, float noundef %287, ptr noundef nonnull align 4 dereferenceable(8) %288, ptr noundef nonnull align 4 dereferenceable(8) %289)
  store i1 %290, ptr %5, align 1
  store i32 1, ptr %18, align 4
  br label %291

291:                                              ; preds = %284, %283
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #10
  %292 = load i1, ptr %5, align 1
  ret i1 %292

293:                                              ; preds = %274
  unreachable
}

; 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: 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) #2 align 2

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

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16), i32 noundef) #4 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) #2 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 noundef float @_ZNK3JPH6Float3ixEi(ptr noundef nonnull align 4 dereferenceable(12), i32 noundef) #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3JPH16TriangleSplitter11GetTriangleEj(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef) #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)) #6

; 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) #7

; 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: 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) #8

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)) #9

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

; 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 float, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"class.JPH::AABox", align 16
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #10
  call void @_ZN3JPH5AABoxC2Ev(ptr noundef nonnull align 16 dereferenceable(32) %5)
  %11 = load i32, ptr %1, align 4, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %1, i64 4
  %13 = load i32, ptr %12, align 4, !tbaa !10
  %14 = icmp ult i32 %11, %13
  br i1 %14, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %4
  %15 = getelementptr inbounds i8, ptr %0, i64 24
  %16 = getelementptr inbounds i8, ptr %0, i64 48
  %17 = getelementptr inbounds i8, ptr %6, i64 8
  %18 = zext i32 %11 to i64
  br label %38

._crit_edge:                                      ; preds = %38, %4
  %19 = call noundef i32 @_ZNK3JPH16TriangleSplitter5Range5CountEv(ptr noundef nonnull align 4 dereferenceable(8) %1)
  %20 = getelementptr inbounds i8, ptr %0, i64 80
  %21 = load i32, ptr %20, align 8, !tbaa !11
  %22 = udiv i32 %19, %21
  %23 = getelementptr inbounds i8, ptr %0, i64 72
  %24 = load i32, ptr %23, align 8, !tbaa !19
  %25 = getelementptr inbounds i8, ptr %0, i64 76
  %26 = load i32, ptr %25, align 4, !tbaa !20
  %27 = call noundef i32 @_ZN3JPH5ClampIjEET_S1_S1_S1_(i32 noundef %22, i32 noundef %24, i32 noundef %26)
  %28 = getelementptr inbounds i8, ptr %5, i64 16
  %.not = icmp eq i32 %27, 0
  %29 = getelementptr inbounds i8, ptr %0, i64 88
  %30 = uitofp i32 %27 to float
  %31 = getelementptr inbounds i8, ptr %0, i64 24
  %32 = getelementptr inbounds i8, ptr %0, i64 48
  %33 = add i32 %27, -1
  %34 = getelementptr inbounds i8, ptr %0, i64 8
  %35 = icmp sgt i32 %33, -1
  %36 = icmp ugt i32 %27, 1
  %37 = zext i32 %33 to i64
  %wide.trip.count = zext i32 %27 to i64
  %wide.trip.count144 = zext i32 %27 to i64
  %wide.trip.count152 = zext i32 %27 to i64
  br label %50

38:                                               ; preds = %.lr.ph, %38
  %indvars.iv = phi i64 [ %18, %.lr.ph ], [ %indvars.iv.next, %38 ]
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %indvars.iv)
  %40 = load i32, ptr %39, align 4, !tbaa !21
  %41 = zext i32 %40 to i64
  %42 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN3JPH5ArrayINS_6Float3ENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %41)
  call void @_ZN3JPH4Vec3C2ERKNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16) %6, ptr noundef nonnull align 4 dereferenceable(12) %42)
  %43 = load double, ptr %6, align 16
  %44 = load double, ptr %17, align 8
  call void @_ZN3JPH5AABox11EncapsulateENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(32) %5, double %43, double %44)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %45 = load i32, ptr %12, align 4, !tbaa !10
  %46 = zext i32 %45 to i64
  %47 = icmp ult i64 %indvars.iv.next, %46
  br i1 %47, label %38, label %._crit_edge, !llvm.loop !22

48:                                               ; preds = %121
  %49 = icmp eq i32 %.386, -1
  br i1 %49, label %125, label %123

50:                                               ; preds = %._crit_edge, %121
  %.081132 = phi float [ 0x47EFFFFFE0000000, %._crit_edge ], [ %.3, %121 ]
  %.083131 = phi i32 [ -1, %._crit_edge ], [ %.386, %121 ]
  %.090130 = phi float [ 0.000000e+00, %._crit_edge ], [ %.393, %121 ]
  %.094128 = phi i32 [ 0, %._crit_edge ], [ %122, %121 ]
  %51 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %5, i32 noundef %.094128)
  %52 = call noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %28, i32 noundef %.094128)
  %53 = fsub float %52, %51
  %54 = fcmp olt float %53, 0x3EE4F8B580000000
  br i1 %54, label %121, label %.preheader101

.preheader101:                                    ; preds = %50
  br i1 %.not, label %._crit_edge105, label %.lr.ph104

._crit_edge105:                                   ; preds = %.lr.ph104, %.preheader101
  %55 = load i32, ptr %1, align 4, !tbaa !5
  %56 = load i32, ptr %12, align 4, !tbaa !10
  %57 = icmp ult i32 %55, %56
  br i1 %57, label %.lr.ph108.preheader, label %._crit_edge109

.lr.ph108.preheader:                              ; preds = %._crit_edge105
  %58 = zext i32 %55 to i64
  br label %.lr.ph108

.lr.ph104:                                        ; preds = %.preheader101, %.lr.ph104
  %indvars.iv135 = phi i64 [ %indvars.iv.next136, %.lr.ph104 ], [ 0, %.preheader101 ]
  %59 = call noundef nonnull align 16 dereferenceable(120) ptr @_ZN3JPH5ArrayINS_23TriangleSplitterBinning3BinENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %indvars.iv135)
  call void @_ZN3JPH5AABox8SetEmptyEv(ptr noundef nonnull align 16 dereferenceable(32) %59)
  %indvars.iv.next136 = add nuw nsw i64 %indvars.iv135, 1
  %60 = trunc nuw i64 %indvars.iv.next136 to i32
  %61 = uitofp i32 %60 to float
  %62 = fmul float %53, %61
  %63 = fdiv float %62, %30
  %64 = fadd float %51, %63
  %65 = getelementptr inbounds i8, ptr %59, i64 32
  store float %64, ptr %65, align 16, !tbaa !24
  %66 = getelementptr inbounds i8, ptr %59, i64 36
  store i32 0, ptr %66, align 4, !tbaa !29
  %exitcond.not = icmp eq i64 %indvars.iv.next136, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge105, label %.lr.ph104, !llvm.loop !30

._crit_edge109:                                   ; preds = %.lr.ph108, %._crit_edge105
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #10
  call void @_ZN3JPH5AABoxC2Ev(ptr noundef nonnull align 16 dereferenceable(32) %10)
  br i1 %.not, label %.preheader.thread, label %.lr.ph113

.preheader.thread:                                ; preds = %._crit_edge109
  call void @_ZN3JPH5AABox8SetEmptyEv(ptr noundef nonnull align 16 dereferenceable(32) %10)
  br label %._crit_edge125

.lr.ph108:                                        ; preds = %.lr.ph108.preheader, %.lr.ph108
  %indvars.iv138 = phi i64 [ %58, %.lr.ph108.preheader ], [ %indvars.iv.next139, %.lr.ph108 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #10
  %67 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef %indvars.iv138)
  %68 = load i32, ptr %67, align 4, !tbaa !21
  %69 = zext i32 %68 to i64
  %70 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN3JPH5ArrayINS_6Float3ENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %31, i64 noundef %69)
  %71 = call noundef float @_ZNK3JPH6Float3ixEi(ptr noundef nonnull align 4 dereferenceable(12) %70, i32 noundef %.094128)
  store float %71, ptr %7, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #10
  %72 = fsub float %71, %51
  %73 = fdiv float %72, %53
  %74 = fmul float %73, %30
  %75 = fptoui float %74 to i32
  store i32 %75, ptr %8, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #10
  store i32 %33, ptr %9, align 4, !tbaa !21
  %76 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %77 = load i32, ptr %76, align 4, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #10
  %78 = zext i32 %77 to i64
  %79 = call noundef nonnull align 16 dereferenceable(120) ptr @_ZN3JPH5ArrayINS_23TriangleSplitterBinning3BinENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %78)
  %80 = load ptr, ptr %34, align 8, !tbaa !32
  %81 = trunc nuw i64 %indvars.iv138 to i32
  %82 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3JPH16TriangleSplitter11GetTriangleEj(ptr noundef nonnull align 8 dereferenceable(72) %0, i32 noundef %81)
  call void @_ZN3JPH5AABox11EncapsulateERKNS_5ArrayINS_6Float3ENS_12STLAllocatorIS2_EEEERKNS_15IndexedTriangleE(ptr noundef nonnull align 16 dereferenceable(32) %79, ptr noundef nonnull align 8 dereferenceable(24) %80, ptr noundef nonnull align 4 dereferenceable(16) %82)
  %83 = getelementptr inbounds i8, ptr %79, i64 32
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %83, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %85 = load float, ptr %84, align 4, !tbaa !31
  store float %85, ptr %83, align 16, !tbaa !24
  %86 = getelementptr inbounds i8, ptr %79, i64 36
  %87 = load i32, ptr %86, align 4, !tbaa !29
  %88 = add i32 %87, 1
  store i32 %88, ptr %86, align 4, !tbaa !29
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #10
  %indvars.iv.next139 = add nuw nsw i64 %indvars.iv138, 1
  %89 = load i32, ptr %12, align 4, !tbaa !10
  %90 = zext i32 %89 to i64
  %91 = icmp ult i64 %indvars.iv.next139, %90
  br i1 %91, label %.lr.ph108, label %._crit_edge109, !llvm.loop !33

._crit_edge114:                                   ; preds = %.lr.ph113
  call void @_ZN3JPH5AABox8SetEmptyEv(ptr noundef nonnull align 16 dereferenceable(32) %10)
  br i1 %35, label %.lr.ph119, label %.preheader

.lr.ph113:                                        ; preds = %._crit_edge109, %.lr.ph113
  %indvars.iv141 = phi i64 [ %indvars.iv.next142, %.lr.ph113 ], [ 0, %._crit_edge109 ]
  %.088110 = phi i32 [ %97, %.lr.ph113 ], [ 0, %._crit_edge109 ]
  %92 = call noundef nonnull align 16 dereferenceable(120) ptr @_ZN3JPH5ArrayINS_23TriangleSplitterBinning3BinENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %indvars.iv141)
  %93 = getelementptr inbounds i8, ptr %92, i64 48
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %93, ptr noundef nonnull align 16 dereferenceable(32) %10, i64 32, i1 false), !tbaa.struct !34
  %94 = getelementptr inbounds i8, ptr %92, i64 112
  store i32 %.088110, ptr %94, align 16, !tbaa !36
  call void @_ZN3JPH5AABox11EncapsulateERKS0_(ptr noundef nonnull align 16 dereferenceable(32) %10, ptr noundef nonnull align 16 dereferenceable(32) %92)
  %95 = getelementptr inbounds i8, ptr %92, i64 36
  %96 = load i32, ptr %95, align 4, !tbaa !29
  %97 = add i32 %96, %.088110
  %indvars.iv.next142 = add nuw nsw i64 %indvars.iv141, 1
  %exitcond145.not = icmp eq i64 %indvars.iv.next142, %wide.trip.count144
  br i1 %exitcond145.not, label %._crit_edge114, label %.lr.ph113, !llvm.loop !37

.preheader:                                       ; preds = %.lr.ph119, %._crit_edge114
  br i1 %36, label %.lr.ph124, label %._crit_edge125

.lr.ph119:                                        ; preds = %._crit_edge114, %.lr.ph119
  %indvars.iv146 = phi i64 [ %indvars.iv.next147, %.lr.ph119 ], [ %37, %._crit_edge114 ]
  %.189116 = phi i32 [ %101, %.lr.ph119 ], [ 0, %._crit_edge114 ]
  %98 = call noundef nonnull align 16 dereferenceable(120) ptr @_ZN3JPH5ArrayINS_23TriangleSplitterBinning3BinENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %indvars.iv146)
  call void @_ZN3JPH5AABox11EncapsulateERKS0_(ptr noundef nonnull align 16 dereferenceable(32) %10, ptr noundef nonnull align 16 dereferenceable(32) %98)
  %99 = getelementptr inbounds i8, ptr %98, i64 36
  %100 = load i32, ptr %99, align 4, !tbaa !29
  %101 = add i32 %100, %.189116
  %102 = getelementptr inbounds i8, ptr %98, i64 80
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %102, ptr noundef nonnull align 16 dereferenceable(32) %10, i64 32, i1 false), !tbaa.struct !34
  %103 = getelementptr inbounds i8, ptr %98, i64 116
  store i32 %101, ptr %103, align 4, !tbaa !38
  %indvars.iv.next147 = add nsw i64 %indvars.iv146, -1
  %104 = icmp sgt i64 %indvars.iv146, 0
  br i1 %104, label %.lr.ph119, label %.preheader, !llvm.loop !39

._crit_edge125:                                   ; preds = %.lr.ph124, %.preheader.thread, %.preheader
  %.191.lcssa = phi float [ %.090130, %.preheader ], [ %.090130, %.preheader.thread ], [ %.292, %.lr.ph124 ]
  %.184.lcssa = phi i32 [ %.083131, %.preheader ], [ %.083131, %.preheader.thread ], [ %.285, %.lr.ph124 ]
  %.1.lcssa = phi float [ %.081132, %.preheader ], [ %.081132, %.preheader.thread ], [ %.2, %.lr.ph124 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #10
  br label %121

.lr.ph124:                                        ; preds = %.preheader, %.lr.ph124
  %indvars.iv149 = phi i64 [ %indvars.iv.next150, %.lr.ph124 ], [ 1, %.preheader ]
  %.1122 = phi float [ %.2, %.lr.ph124 ], [ %.081132, %.preheader ]
  %.184121 = phi i32 [ %.285, %.lr.ph124 ], [ %.083131, %.preheader ]
  %.191120 = phi float [ %.292, %.lr.ph124 ], [ %.090130, %.preheader ]
  %105 = call noundef nonnull align 16 dereferenceable(120) ptr @_ZN3JPH5ArrayINS_23TriangleSplitterBinning3BinENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %indvars.iv149)
  %106 = getelementptr inbounds i8, ptr %105, i64 48
  %107 = call noundef float @_ZNK3JPH5AABox14GetSurfaceAreaEv(ptr noundef nonnull align 16 dereferenceable(32) %106)
  %108 = getelementptr inbounds i8, ptr %105, i64 112
  %109 = load i32, ptr %108, align 16, !tbaa !36
  %110 = uitofp i32 %109 to float
  %111 = getelementptr inbounds i8, ptr %105, i64 80
  %112 = call noundef float @_ZNK3JPH5AABox14GetSurfaceAreaEv(ptr noundef nonnull align 16 dereferenceable(32) %111)
  %113 = getelementptr inbounds i8, ptr %105, i64 116
  %114 = load i32, ptr %113, align 4, !tbaa !38
  %115 = uitofp i32 %114 to float
  %116 = fmul float %112, %115
  %117 = call float @llvm.fmuladd.f32(float %107, float %110, float %116)
  %118 = fcmp olt float %117, %.1122
  %119 = getelementptr inbounds i8, ptr %105, i64 32
  %120 = load float, ptr %119, align 16
  %.292 = select i1 %118, float %120, float %.191120
  %.285 = select i1 %118, i32 %.094128, i32 %.184121
  %.2 = select i1 %118, float %117, float %.1122
  %indvars.iv.next150 = add nuw nsw i64 %indvars.iv149, 1
  %exitcond153.not = icmp eq i64 %indvars.iv.next150, %wide.trip.count152
  br i1 %exitcond153.not, label %._crit_edge125, label %.lr.ph124, !llvm.loop !40

121:                                              ; preds = %50, %._crit_edge125
  %.393 = phi float [ %.191.lcssa, %._crit_edge125 ], [ %.090130, %50 ]
  %.386 = phi i32 [ %.184.lcssa, %._crit_edge125 ], [ %.083131, %50 ]
  %.3 = phi float [ %.1.lcssa, %._crit_edge125 ], [ %.081132, %50 ]
  %122 = add nuw nsw i32 %.094128, 1
  %exitcond154.not = icmp eq i32 %122, 3
  br i1 %exitcond154.not, label %48, label %50, !llvm.loop !41

123:                                              ; preds = %48
  %124 = 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 %.386, float noundef %.393, ptr noundef nonnull align 4 dereferenceable(8) %2, ptr noundef nonnull align 4 dereferenceable(8) %3)
  br label %125

125:                                              ; preds = %48, %123
  %.0 = phi i1 [ %124, %123 ], [ false, %48 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #10
  ret i1 %.0
}

; 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: 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 #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3JPH16TriangleSplitter5Range5CountEv(ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #5 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 #4 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 #2 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 noundef float @_ZNK3JPH6Float3ixEi(ptr noundef nonnull align 4 dereferenceable(12), i32 noundef) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3JPH16TriangleSplitter11GetTriangleEj(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef) 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 #6

; 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) #7

; 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: 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) #8

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 #9

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


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