; LLVM IR from zig-gamedev/zphysics :: libs/Jolt/TriangleSplitter (TriangleSplitterFixedLeafSize)

; 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"

%"struct.JPH::AssertLastParam" = type { i8 }
%"class.JPH::AABox" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::Array.6" = type { i64, i64, ptr }
%"class.JPH::STLAllocator.7" = type { i8 }
%"struct.JPH::TriangleSplitter::Range" = type { i32, i32 }
%"class.JPH::TriangleSplitterFixedLeafSize" = type { %"class.JPH::TriangleSplitter", i32, i32, 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 }
%"struct.JPH::TriangleSplitterFixedLeafSize::Bin" = type <{ %"class.JPH::AABox", float, i32, [8 x i8], %"class.JPH::AABox", %"class.JPH::AABox", i32, i32, [8 x i8] }>

@.str.1 = external hidden unnamed_addr constant [115 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [70 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH29TriangleSplitterFixedLeafSize19GetCentroidForGroupEj(ptr noundef nonnull align 8 dereferenceable(88), i32 noundef) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef) #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 @_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: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3JPH29TriangleSplitterFixedLeafSize5SplitERKNS_16TriangleSplitter5RangeERS2_S5_(ptr noundef nonnull align 8 dereferenceable(88) %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 personality ptr @__gxx_personality_v0 {
  %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 %"struct.JPH::AssertLastParam", align 1
  %11 = alloca %"struct.JPH::AssertLastParam", align 1
  %12 = alloca %"class.JPH::AABox", align 16
  %13 = alloca i32, align 4
  %14 = alloca %"class.JPH::Vec3", align 16
  %15 = alloca float, align 4
  %16 = alloca i32, align 4
  %17 = alloca float, align 4
  %18 = alloca i32, align 4
  %19 = alloca %"class.JPH::Array.6", align 8
  %20 = alloca %"class.JPH::STLAllocator.7", align 1
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca float, align 4
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca float, align 4
  %27 = alloca i32, align 4
  %28 = alloca ptr, align 8
  %29 = alloca i32, align 4
  %30 = alloca float, align 4
  %31 = alloca %"class.JPH::Vec3", align 16
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca ptr, align 8
  %36 = alloca i32, align 4
  %37 = alloca %"class.JPH::AABox", align 16
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  %40 = alloca ptr, align 8
  %41 = alloca i32, align 4
  %42 = alloca ptr, align 8
  %43 = alloca i32, align 4
  %44 = alloca ptr, align 8
  %45 = alloca float, align 4
  %46 = alloca i32, align 4
  %47 = alloca i32, align 4
  %48 = alloca %"class.JPH::Vec3", align 16
  %49 = alloca %"class.JPH::Vec3", align 16
  %50 = alloca i32, align 4
  %51 = alloca %"struct.JPH::AssertLastParam", align 1
  %52 = alloca %"struct.JPH::TriangleSplitter::Range", align 4
  %53 = alloca %"struct.JPH::TriangleSplitter::Range", align 4
  %54 = alloca %"struct.JPH::AssertLastParam", align 1
  %55 = alloca %"struct.JPH::AssertLastParam", align 1
  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
  %56 = load ptr, ptr %6, align 8
  br label %57

57:                                               ; preds = %4
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = call noundef i32 @_ZNK3JPH16TriangleSplitter5Range5CountEv(ptr noundef nonnull align 4 dereferenceable(8) %58)
  %60 = getelementptr inbounds %"class.JPH::TriangleSplitterFixedLeafSize", ptr %56, i32 0, i32 1
  %61 = load i32, ptr %60, align 8, !tbaa !9
  %62 = icmp ugt i32 %59, %61
  br i1 %62, label %66, label %63

63:                                               ; preds = %57
  %64 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 43)
  br i1 %64, label %65, label %66

65:                                               ; preds = %63
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #8, !srcloc !16
  br label %66

66:                                               ; preds = %65, %63, %57
  br label %67

67:                                               ; preds = %66
  br label %68

68:                                               ; preds = %67
  %69 = load ptr, ptr %7, align 8, !tbaa !5
  %70 = call noundef i32 @_ZNK3JPH16TriangleSplitter5Range5CountEv(ptr noundef nonnull align 4 dereferenceable(8) %69)
  %71 = getelementptr inbounds %"class.JPH::TriangleSplitterFixedLeafSize", ptr %56, i32 0, i32 1
  %72 = load i32, ptr %71, align 8, !tbaa !9
  %73 = urem i32 %70, %72
  %74 = icmp eq i32 %73, 0
  br i1 %74, label %78, label %75

75:                                               ; preds = %68
  %76 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 44)
  br i1 %76, label %77, label %78

77:                                               ; preds = %75
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #8, !srcloc !17
  br label %78

78:                                               ; preds = %77, %75, %68
  br label %79

79:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #8
  call void @_ZN3JPH5AABoxC2Ev(ptr noundef nonnull align 16 dereferenceable(32) %12)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  %80 = load ptr, ptr %7, align 8, !tbaa !5
  %81 = getelementptr inbounds %"struct.JPH::TriangleSplitter::Range", ptr %80, i32 0, i32 0
  %82 = load i32, ptr %81, align 4, !tbaa !18
  store i32 %82, ptr %13, align 4, !tbaa !20
  br label %83

83:                                               ; preds = %103, %79
  %84 = load i32, ptr %13, align 4, !tbaa !20
  %85 = load ptr, ptr %7, align 8, !tbaa !5
  %86 = getelementptr inbounds %"struct.JPH::TriangleSplitter::Range", ptr %85, i32 0, i32 1
  %87 = load i32, ptr %86, align 4, !tbaa !21
  %88 = icmp ult i32 %84, %87
  br i1 %88, label %90, label %89

89:                                               ; preds = %83
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %108

90:                                               ; preds = %83
  %91 = load i32, ptr %13, align 4, !tbaa !20
  %92 = call { double, double } @_ZN3JPH29TriangleSplitterFixedLeafSize19GetCentroidForGroupEj(ptr noundef nonnull align 8 dereferenceable(88) %56, i32 noundef %91)
  %93 = getelementptr inbounds %"class.JPH::Vec3", ptr %14, i32 0, i32 0
  %94 = getelementptr inbounds %union.anon, ptr %93, i32 0, i32 0
  %95 = getelementptr inbounds { double, double }, ptr %94, i32 0, i32 0
  %96 = extractvalue { double, double } %92, 0
  store double %96, ptr %95, align 16
  %97 = getelementptr inbounds { double, double }, ptr %94, i32 0, i32 1
  %98 = extractvalue { double, double } %92, 1
  store double %98, ptr %97, align 8
  %99 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 0
  %100 = load double, ptr %99, align 16
  %101 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 1
  %102 = load double, ptr %101, align 8
  call void @_ZN3JPH5AABox11EncapsulateENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(32) %12, double %100, double %102)
  br label %103

103:                                              ; preds = %90
  %104 = getelementptr inbounds %"class.JPH::TriangleSplitterFixedLeafSize", ptr %56, i32 0, i32 1
  %105 = load i32, ptr %104, align 8, !tbaa !9
  %106 = load i32, ptr %13, align 4, !tbaa !20
  %107 = add i32 %106, %105
  store i32 %107, ptr %13, align 4, !tbaa !20
  br label %83, !llvm.loop !22

108:                                              ; preds = %89
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  store float 0x47EFFFFFE0000000, ptr %15, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 -1, ptr %16, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  store float 0.000000e+00, ptr %17, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %109 = load ptr, ptr %7, align 8, !tbaa !5
  %110 = call noundef i32 @_ZNK3JPH16TriangleSplitter5Range5CountEv(ptr noundef nonnull align 4 dereferenceable(8) %109)
  %111 = getelementptr inbounds %"class.JPH::TriangleSplitterFixedLeafSize", ptr %56, i32 0, i32 4
  %112 = load i32, ptr %111, align 4, !tbaa !26
  %113 = udiv i32 %110, %112
  %114 = getelementptr inbounds %"class.JPH::TriangleSplitterFixedLeafSize", ptr %56, i32 0, i32 2
  %115 = load i32, ptr %114, align 4, !tbaa !27
  %116 = getelementptr inbounds %"class.JPH::TriangleSplitterFixedLeafSize", ptr %56, i32 0, i32 3
  %117 = load i32, ptr %116, align 8, !tbaa !28
  %118 = call noundef i32 @_ZN3JPH5ClampIjEET_S1_S1_S1_(i32 noundef %113, i32 noundef %115, i32 noundef %117)
  store i32 %118, ptr %18, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #8
  %119 = load i32, ptr %18, align 4, !tbaa !20
  %120 = zext i32 %119 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #8
  call void @_ZN3JPH5ArrayINS_29TriangleSplitterFixedLeafSize3BinENS_12STLAllocatorIS2_EEEC2EmRKS4_(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %120, ptr noundef nonnull align 1 dereferenceable(1) %20)
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  store i32 0, ptr %21, align 4, !tbaa !20
  br label %121

121:                                              ; preds = %410, %108
  %122 = load i32, ptr %21, align 4, !tbaa !20
  %123 = icmp ult i32 %122, 3
  br i1 %123, label %125, label %124

124:                                              ; preds = %121
  store i32 9, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %417

125:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  %126 = getelementptr inbounds %"class.JPH::AABox", ptr %12, i32 0, i32 0
  %127 = load i32, ptr %21, align 4, !tbaa !20
  %128 = invoke noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %126, i32 noundef %127)
          to label %129 unwind label %139

129:                                              ; preds = %125
  store float %128, ptr %23, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  %130 = getelementptr inbounds %"class.JPH::AABox", ptr %12, i32 0, i32 1
  %131 = load i32, ptr %21, align 4, !tbaa !20
  %132 = invoke noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %130, i32 noundef %131)
          to label %133 unwind label %143

133:                                              ; preds = %129
  %134 = load float, ptr %23, align 4, !tbaa !24
  %135 = fsub float %132, %134
  store float %135, ptr %26, align 4, !tbaa !24
  %136 = load float, ptr %26, align 4, !tbaa !24
  %137 = fcmp olt float %136, 0x3EE4F8B580000000
  br i1 %137, label %138, label %147

138:                                              ; preds = %133
  store i32 11, ptr %22, align 4
  br label %407

139:                                              ; preds = %125
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %24, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %25, align 4
  br label %416

143:                                              ; preds = %129
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %24, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %25, align 4
  br label %415

147:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #8
  store i32 0, ptr %27, align 4, !tbaa !20
  br label %148

148:                                              ; preds = %175, %147
  %149 = load i32, ptr %27, align 4, !tbaa !20
  %150 = load i32, ptr %18, align 4, !tbaa !20
  %151 = icmp ult i32 %149, %150
  br i1 %151, label %153, label %152

152:                                              ; preds = %148
  store i32 12, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  br label %182

153:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  %154 = load i32, ptr %27, align 4, !tbaa !20
  %155 = zext i32 %154 to i64
  %156 = invoke noundef nonnull align 16 dereferenceable(120) ptr @_ZN3JPH5ArrayINS_29TriangleSplitterFixedLeafSize3BinENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %155)
          to label %157 unwind label %178

157:                                              ; preds = %153
  store ptr %156, ptr %28, align 8, !tbaa !5
  %158 = load ptr, ptr %28, align 8, !tbaa !5
  %159 = getelementptr inbounds %"struct.JPH::TriangleSplitterFixedLeafSize::Bin", ptr %158, i32 0, i32 0
  invoke void @_ZN3JPH5AABox8SetEmptyEv(ptr noundef nonnull align 16 dereferenceable(32) %159)
          to label %160 unwind label %178

160:                                              ; preds = %157
  %161 = load float, ptr %23, align 4, !tbaa !24
  %162 = load float, ptr %26, align 4, !tbaa !24
  %163 = load i32, ptr %27, align 4, !tbaa !20
  %164 = add i32 %163, 1
  %165 = uitofp i32 %164 to float
  %166 = fmul float %162, %165
  %167 = load i32, ptr %18, align 4, !tbaa !20
  %168 = uitofp i32 %167 to float
  %169 = fdiv float %166, %168
  %170 = fadd float %161, %169
  %171 = load ptr, ptr %28, align 8, !tbaa !5
  %172 = getelementptr inbounds %"struct.JPH::TriangleSplitterFixedLeafSize::Bin", ptr %171, i32 0, i32 1
  store float %170, ptr %172, align 16, !tbaa !29
  %173 = load ptr, ptr %28, align 8, !tbaa !5
  %174 = getelementptr inbounds %"struct.JPH::TriangleSplitterFixedLeafSize::Bin", ptr %173, i32 0, i32 2
  store i32 0, ptr %174, align 4, !tbaa !33
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  br label %175

175:                                              ; preds = %160
  %176 = load i32, ptr %27, align 4, !tbaa !20
  %177 = add i32 %176, 1
  store i32 %177, ptr %27, align 4, !tbaa !20
  br label %148, !llvm.loop !34

178:                                              ; preds = %157, %153
  %179 = landingpad { ptr, i32 }
          cleanup
  %180 = extractvalue { ptr, i32 } %179, 0
  store ptr %180, ptr %24, align 8
  %181 = extractvalue { ptr, i32 } %179, 1
  store i32 %181, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  br label %415

182:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  %183 = load ptr, ptr %7, align 8, !tbaa !5
  %184 = getelementptr inbounds %"struct.JPH::TriangleSplitter::Range", ptr %183, i32 0, i32 0
  %185 = load i32, ptr %184, align 4, !tbaa !18
  store i32 %185, ptr %29, align 4, !tbaa !20
  br label %186

186:                                              ; preds = %274, %182
  %187 = load i32, ptr %29, align 4, !tbaa !20
  %188 = load ptr, ptr %7, align 8, !tbaa !5
  %189 = getelementptr inbounds %"struct.JPH::TriangleSplitter::Range", ptr %188, i32 0, i32 1
  %190 = load i32, ptr %189, align 4, !tbaa !21
  %191 = icmp ult i32 %187, %190
  br i1 %191, label %193, label %192

192:                                              ; preds = %186
  store i32 15, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  br label %282

193:                                              ; preds = %186
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %31) #8
  %194 = load i32, ptr %29, align 4, !tbaa !20
  %195 = invoke { double, double } @_ZN3JPH29TriangleSplitterFixedLeafSize19GetCentroidForGroupEj(ptr noundef nonnull align 8 dereferenceable(88) %56, i32 noundef %194)
          to label %196 unwind label %230

196:                                              ; preds = %193
  %197 = getelementptr inbounds %"class.JPH::Vec3", ptr %31, i32 0, i32 0
  %198 = getelementptr inbounds %union.anon, ptr %197, i32 0, i32 0
  %199 = getelementptr inbounds { double, double }, ptr %198, i32 0, i32 0
  %200 = extractvalue { double, double } %195, 0
  store double %200, ptr %199, align 16
  %201 = getelementptr inbounds { double, double }, ptr %198, i32 0, i32 1
  %202 = extractvalue { double, double } %195, 1
  store double %202, ptr %201, align 8
  %203 = load i32, ptr %21, align 4, !tbaa !20
  %204 = invoke noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %31, i32 noundef %203)
          to label %205 unwind label %230

205:                                              ; preds = %196
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #8
  store float %204, ptr %30, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #8
  %206 = load float, ptr %30, align 4, !tbaa !24
  %207 = load float, ptr %23, align 4, !tbaa !24
  %208 = fsub float %206, %207
  %209 = load float, ptr %26, align 4, !tbaa !24
  %210 = fdiv float %208, %209
  %211 = load i32, ptr %18, align 4, !tbaa !20
  %212 = uitofp i32 %211 to float
  %213 = fmul float %210, %212
  %214 = fptoui float %213 to i32
  store i32 %214, ptr %33, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #8
  %215 = load i32, ptr %18, align 4, !tbaa !20
  %216 = sub i32 %215, 1
  store i32 %216, ptr %34, align 4, !tbaa !20
  %217 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %33, ptr noundef nonnull align 4 dereferenceable(4) %34)
          to label %218 unwind label %234

218:                                              ; preds = %205
  %219 = load i32, ptr %217, align 4, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  store i32 %219, ptr %32, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #8
  %220 = load i32, ptr %32, align 4, !tbaa !20
  %221 = zext i32 %220 to i64
  %222 = invoke noundef nonnull align 16 dereferenceable(120) ptr @_ZN3JPH5ArrayINS_29TriangleSplitterFixedLeafSize3BinENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %221)
          to label %223 unwind label %238

223:                                              ; preds = %218
  store ptr %222, ptr %35, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #8
  store i32 0, ptr %36, align 4, !tbaa !20
  br label %224

224:                                              ; preds = %253, %223
  %225 = load i32, ptr %36, align 4, !tbaa !20
  %226 = getelementptr inbounds %"class.JPH::TriangleSplitterFixedLeafSize", ptr %56, i32 0, i32 1
  %227 = load i32, ptr %226, align 8, !tbaa !9
  %228 = icmp ult i32 %225, %227
  br i1 %228, label %242, label %229

229:                                              ; preds = %224
  store i32 18, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #8
  br label %260

230:                                              ; preds = %196, %193
  %231 = landingpad { ptr, i32 }
          cleanup
  %232 = extractvalue { ptr, i32 } %231, 0
  store ptr %232, ptr %24, align 8
  %233 = extractvalue { ptr, i32 } %231, 1
  store i32 %233, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #8
  br label %281

234:                                              ; preds = %205
  %235 = landingpad { ptr, i32 }
          cleanup
  %236 = extractvalue { ptr, i32 } %235, 0
  store ptr %236, ptr %24, align 8
  %237 = extractvalue { ptr, i32 } %235, 1
  store i32 %237, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  br label %280

238:                                              ; preds = %260, %218
  %239 = landingpad { ptr, i32 }
          cleanup
  %240 = extractvalue { ptr, i32 } %239, 0
  store ptr %240, ptr %24, align 8
  %241 = extractvalue { ptr, i32 } %239, 1
  store i32 %241, ptr %25, align 4
  br label %279

242:                                              ; preds = %224
  %243 = load ptr, ptr %35, align 8, !tbaa !5
  %244 = getelementptr inbounds %"struct.JPH::TriangleSplitterFixedLeafSize::Bin", ptr %243, i32 0, i32 0
  %245 = getelementptr inbounds %"class.JPH::TriangleSplitter", ptr %56, i32 0, i32 1
  %246 = load ptr, ptr %245, align 8, !tbaa !35
  %247 = load i32, ptr %29, align 4, !tbaa !20
  %248 = load i32, ptr %36, align 4, !tbaa !20
  %249 = add i32 %247, %248
  %250 = invoke noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3JPH16TriangleSplitter11GetTriangleEj(ptr noundef nonnull align 8 dereferenceable(72) %56, i32 noundef %249)
          to label %251 unwind label %256

251:                                              ; preds = %242
  invoke void @_ZN3JPH5AABox11EncapsulateERKNS_5ArrayINS_6Float3ENS_12STLAllocatorIS2_EEEERKNS_15IndexedTriangleE(ptr noundef nonnull align 16 dereferenceable(32) %244, ptr noundef nonnull align 8 dereferenceable(24) %246, ptr noundef nonnull align 4 dereferenceable(16) %250)
          to label %252 unwind label %256

252:                                              ; preds = %251
  br label %253

253:                                              ; preds = %252
  %254 = load i32, ptr %36, align 4, !tbaa !20
  %255 = add i32 %254, 1
  store i32 %255, ptr %36, align 4, !tbaa !20
  br label %224, !llvm.loop !36

256:                                              ; preds = %251, %242
  %257 = landingpad { ptr, i32 }
          cleanup
  %258 = extractvalue { ptr, i32 } %257, 0
  store ptr %258, ptr %24, align 8
  %259 = extractvalue { ptr, i32 } %257, 1
  store i32 %259, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #8
  br label %279

260:                                              ; preds = %229
  %261 = load ptr, ptr %35, align 8, !tbaa !5
  %262 = getelementptr inbounds %"struct.JPH::TriangleSplitterFixedLeafSize::Bin", ptr %261, i32 0, i32 1
  %263 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %262, ptr noundef nonnull align 4 dereferenceable(4) %30)
          to label %264 unwind label %238

264:                                              ; preds = %260
  %265 = load float, ptr %263, align 4, !tbaa !24
  %266 = load ptr, ptr %35, align 8, !tbaa !5
  %267 = getelementptr inbounds %"struct.JPH::TriangleSplitterFixedLeafSize::Bin", ptr %266, i32 0, i32 1
  store float %265, ptr %267, align 16, !tbaa !29
  %268 = getelementptr inbounds %"class.JPH::TriangleSplitterFixedLeafSize", ptr %56, i32 0, i32 1
  %269 = load i32, ptr %268, align 8, !tbaa !9
  %270 = load ptr, ptr %35, align 8, !tbaa !5
  %271 = getelementptr inbounds %"struct.JPH::TriangleSplitterFixedLeafSize::Bin", ptr %270, i32 0, i32 2
  %272 = load i32, ptr %271, align 4, !tbaa !33
  %273 = add i32 %272, %269
  store i32 %273, ptr %271, align 4, !tbaa !33
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  br label %274

274:                                              ; preds = %264
  %275 = getelementptr inbounds %"class.JPH::TriangleSplitterFixedLeafSize", ptr %56, i32 0, i32 1
  %276 = load i32, ptr %275, align 8, !tbaa !9
  %277 = load i32, ptr %29, align 4, !tbaa !20
  %278 = add i32 %277, %276
  store i32 %278, ptr %29, align 4, !tbaa !20
  br label %186, !llvm.loop !37

279:                                              ; preds = %256, %238
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #8
  br label %280

280:                                              ; preds = %279, %234
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  br label %281

281:                                              ; preds = %280, %230
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  br label %415

282:                                              ; preds = %192
  call void @llvm.lifetime.start.p0(i64 32, ptr %37) #8
  invoke void @_ZN3JPH5AABoxC2Ev(ptr noundef nonnull align 16 dereferenceable(32) %37)
          to label %283 unwind label %289

283:                                              ; preds = %282
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #8
  store i32 0, ptr %38, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #8
  store i32 0, ptr %39, align 4, !tbaa !20
  br label %284

284:                                              ; preds = %311, %283
  %285 = load i32, ptr %39, align 4, !tbaa !20
  %286 = load i32, ptr %18, align 4, !tbaa !20
  %287 = icmp ult i32 %285, %286
  br i1 %287, label %293, label %288

288:                                              ; preds = %284
  store i32 21, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #8
  br label %318

289:                                              ; preds = %282
  %290 = landingpad { ptr, i32 }
          cleanup
  %291 = extractvalue { ptr, i32 } %290, 0
  store ptr %291, ptr %24, align 8
  %292 = extractvalue { ptr, i32 } %290, 1
  store i32 %292, ptr %25, align 4
  br label %414

293:                                              ; preds = %284
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #8
  %294 = load i32, ptr %39, align 4, !tbaa !20
  %295 = zext i32 %294 to i64
  %296 = invoke noundef nonnull align 16 dereferenceable(120) ptr @_ZN3JPH5ArrayINS_29TriangleSplitterFixedLeafSize3BinENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %295)
          to label %297 unwind label %314

297:                                              ; preds = %293
  store ptr %296, ptr %40, align 8, !tbaa !5
  %298 = load ptr, ptr %40, align 8, !tbaa !5
  %299 = getelementptr inbounds %"struct.JPH::TriangleSplitterFixedLeafSize::Bin", ptr %298, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %299, ptr align 16 %37, i64 32, i1 false), !tbaa.struct !38
  %300 = load i32, ptr %38, align 4, !tbaa !20
  %301 = load ptr, ptr %40, align 8, !tbaa !5
  %302 = getelementptr inbounds %"struct.JPH::TriangleSplitterFixedLeafSize::Bin", ptr %301, i32 0, i32 6
  store i32 %300, ptr %302, align 16, !tbaa !40
  %303 = load ptr, ptr %40, align 8, !tbaa !5
  %304 = getelementptr inbounds %"struct.JPH::TriangleSplitterFixedLeafSize::Bin", ptr %303, i32 0, i32 0
  invoke void @_ZN3JPH5AABox11EncapsulateERKS0_(ptr noundef nonnull align 16 dereferenceable(32) %37, ptr noundef nonnull align 16 dereferenceable(32) %304)
          to label %305 unwind label %314

305:                                              ; preds = %297
  %306 = load ptr, ptr %40, align 8, !tbaa !5
  %307 = getelementptr inbounds %"struct.JPH::TriangleSplitterFixedLeafSize::Bin", ptr %306, i32 0, i32 2
  %308 = load i32, ptr %307, align 4, !tbaa !33
  %309 = load i32, ptr %38, align 4, !tbaa !20
  %310 = add i32 %309, %308
  store i32 %310, ptr %38, align 4, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #8
  br label %311

311:                                              ; preds = %305
  %312 = load i32, ptr %39, align 4, !tbaa !20
  %313 = add i32 %312, 1
  store i32 %313, ptr %39, align 4, !tbaa !20
  br label %284, !llvm.loop !41

314:                                              ; preds = %297, %293
  %315 = landingpad { ptr, i32 }
          cleanup
  %316 = extractvalue { ptr, i32 } %315, 0
  store ptr %316, ptr %24, align 8
  %317 = extractvalue { ptr, i32 } %315, 1
  store i32 %317, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #8
  br label %413

318:                                              ; preds = %288
  invoke void @_ZN3JPH5AABox8SetEmptyEv(ptr noundef nonnull align 16 dereferenceable(32) %37)
          to label %319 unwind label %326

319:                                              ; preds = %318
  store i32 0, ptr %38, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #8
  %320 = load i32, ptr %18, align 4, !tbaa !20
  %321 = sub i32 %320, 1
  store i32 %321, ptr %41, align 4, !tbaa !20
  br label %322

322:                                              ; preds = %348, %319
  %323 = load i32, ptr %41, align 4, !tbaa !20
  %324 = icmp sge i32 %323, 0
  br i1 %324, label %330, label %325

325:                                              ; preds = %322
  store i32 24, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #8
  br label %355

326:                                              ; preds = %318
  %327 = landingpad { ptr, i32 }
          cleanup
  %328 = extractvalue { ptr, i32 } %327, 0
  store ptr %328, ptr %24, align 8
  %329 = extractvalue { ptr, i32 } %327, 1
  store i32 %329, ptr %25, align 4
  br label %413

330:                                              ; preds = %322
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #8
  %331 = load i32, ptr %41, align 4, !tbaa !20
  %332 = sext i32 %331 to i64
  %333 = invoke noundef nonnull align 16 dereferenceable(120) ptr @_ZN3JPH5ArrayINS_29TriangleSplitterFixedLeafSize3BinENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %332)
          to label %334 unwind label %351

334:                                              ; preds = %330
  store ptr %333, ptr %42, align 8, !tbaa !5
  %335 = load ptr, ptr %42, align 8, !tbaa !5
  %336 = getelementptr inbounds %"struct.JPH::TriangleSplitterFixedLeafSize::Bin", ptr %335, i32 0, i32 0
  invoke void @_ZN3JPH5AABox11EncapsulateERKS0_(ptr noundef nonnull align 16 dereferenceable(32) %37, ptr noundef nonnull align 16 dereferenceable(32) %336)
          to label %337 unwind label %351

337:                                              ; preds = %334
  %338 = load ptr, ptr %42, align 8, !tbaa !5
  %339 = getelementptr inbounds %"struct.JPH::TriangleSplitterFixedLeafSize::Bin", ptr %338, i32 0, i32 2
  %340 = load i32, ptr %339, align 4, !tbaa !33
  %341 = load i32, ptr %38, align 4, !tbaa !20
  %342 = add i32 %341, %340
  store i32 %342, ptr %38, align 4, !tbaa !20
  %343 = load ptr, ptr %42, align 8, !tbaa !5
  %344 = getelementptr inbounds %"struct.JPH::TriangleSplitterFixedLeafSize::Bin", ptr %343, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %344, ptr align 16 %37, i64 32, i1 false), !tbaa.struct !38
  %345 = load i32, ptr %38, align 4, !tbaa !20
  %346 = load ptr, ptr %42, align 8, !tbaa !5
  %347 = getelementptr inbounds %"struct.JPH::TriangleSplitterFixedLeafSize::Bin", ptr %346, i32 0, i32 7
  store i32 %345, ptr %347, align 4, !tbaa !42
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #8
  br label %348

348:                                              ; preds = %337
  %349 = load i32, ptr %41, align 4, !tbaa !20
  %350 = add nsw i32 %349, -1
  store i32 %350, ptr %41, align 4, !tbaa !20
  br label %322, !llvm.loop !43

351:                                              ; preds = %334, %330
  %352 = landingpad { ptr, i32 }
          cleanup
  %353 = extractvalue { ptr, i32 } %352, 0
  store ptr %353, ptr %24, align 8
  %354 = extractvalue { ptr, i32 } %352, 1
  store i32 %354, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #8
  br label %413

355:                                              ; preds = %325
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #8
  store i32 1, ptr %43, align 4, !tbaa !20
  br label %356

356:                                              ; preds = %402, %355
  %357 = load i32, ptr %43, align 4, !tbaa !20
  %358 = load i32, ptr %18, align 4, !tbaa !20
  %359 = icmp ult i32 %357, %358
  br i1 %359, label %361, label %360

360:                                              ; preds = %356
  store i32 27, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #8
  br label %406

361:                                              ; preds = %356
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #8
  %362 = load i32, ptr %43, align 4, !tbaa !20
  %363 = zext i32 %362 to i64
  %364 = invoke noundef nonnull align 16 dereferenceable(120) ptr @_ZN3JPH5ArrayINS_29TriangleSplitterFixedLeafSize3BinENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %363)
          to label %365 unwind label %393

365:                                              ; preds = %361
  store ptr %364, ptr %44, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #8
  %366 = load ptr, ptr %44, align 8, !tbaa !5
  %367 = getelementptr inbounds %"struct.JPH::TriangleSplitterFixedLeafSize::Bin", ptr %366, i32 0, i32 4
  %368 = invoke noundef float @_ZNK3JPH5AABox14GetSurfaceAreaEv(ptr noundef nonnull align 16 dereferenceable(32) %367)
          to label %369 unwind label %397

369:                                              ; preds = %365
  %370 = load ptr, ptr %44, align 8, !tbaa !5
  %371 = getelementptr inbounds %"struct.JPH::TriangleSplitterFixedLeafSize::Bin", ptr %370, i32 0, i32 6
  %372 = load i32, ptr %371, align 16, !tbaa !40
  %373 = uitofp i32 %372 to float
  %374 = load ptr, ptr %44, align 8, !tbaa !5
  %375 = getelementptr inbounds %"struct.JPH::TriangleSplitterFixedLeafSize::Bin", ptr %374, i32 0, i32 5
  %376 = invoke noundef float @_ZNK3JPH5AABox14GetSurfaceAreaEv(ptr noundef nonnull align 16 dereferenceable(32) %375)
          to label %377 unwind label %397

377:                                              ; preds = %369
  %378 = load ptr, ptr %44, align 8, !tbaa !5
  %379 = getelementptr inbounds %"struct.JPH::TriangleSplitterFixedLeafSize::Bin", ptr %378, i32 0, i32 7
  %380 = load i32, ptr %379, align 4, !tbaa !42
  %381 = uitofp i32 %380 to float
  %382 = fmul float %376, %381
  %383 = call float @llvm.fmuladd.f32(float %368, float %373, float %382)
  store float %383, ptr %45, align 4, !tbaa !24
  %384 = load float, ptr %45, align 4, !tbaa !24
  %385 = load float, ptr %15, align 4, !tbaa !24
  %386 = fcmp olt float %384, %385
  br i1 %386, label %387, label %401

387:                                              ; preds = %377
  %388 = load float, ptr %45, align 4, !tbaa !24
  store float %388, ptr %15, align 4, !tbaa !24
  %389 = load i32, ptr %21, align 4, !tbaa !20
  store i32 %389, ptr %16, align 4, !tbaa !20
  %390 = load ptr, ptr %44, align 8, !tbaa !5
  %391 = getelementptr inbounds %"struct.JPH::TriangleSplitterFixedLeafSize::Bin", ptr %390, i32 0, i32 1
  %392 = load float, ptr %391, align 16, !tbaa !29
  store float %392, ptr %17, align 4, !tbaa !24
  br label %401

393:                                              ; preds = %361
  %394 = landingpad { ptr, i32 }
          cleanup
  %395 = extractvalue { ptr, i32 } %394, 0
  store ptr %395, ptr %24, align 8
  %396 = extractvalue { ptr, i32 } %394, 1
  store i32 %396, ptr %25, align 4
  br label %405

397:                                              ; preds = %369, %365
  %398 = landingpad { ptr, i32 }
          cleanup
  %399 = extractvalue { ptr, i32 } %398, 0
  store ptr %399, ptr %24, align 8
  %400 = extractvalue { ptr, i32 } %398, 1
  store i32 %400, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #8
  br label %405

401:                                              ; preds = %387, %377
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #8
  br label %402

402:                                              ; preds = %401
  %403 = load i32, ptr %43, align 4, !tbaa !20
  %404 = add i32 %403, 1
  store i32 %404, ptr %43, align 4, !tbaa !20
  br label %356, !llvm.loop !44

405:                                              ; preds = %397, %393
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #8
  br label %413

406:                                              ; preds = %360
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %37) #8
  store i32 0, ptr %22, align 4
  br label %407

407:                                              ; preds = %406, %138
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  %408 = load i32, ptr %22, align 4
  switch i32 %408, label %662 [
    i32 0, label %409
    i32 11, label %410
  ]

409:                                              ; preds = %407
  br label %410

410:                                              ; preds = %409, %407
  %411 = load i32, ptr %21, align 4, !tbaa !20
  %412 = add i32 %411, 1
  store i32 %412, ptr %21, align 4, !tbaa !20
  br label %121, !llvm.loop !45

413:                                              ; preds = %405, %351, %326, %314
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #8
  br label %414

414:                                              ; preds = %413, %289
  call void @llvm.lifetime.end.p0(i64 32, ptr %37) #8
  br label %415

415:                                              ; preds = %414, %281, %178, %143
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  br label %416

416:                                              ; preds = %415, %139
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %656

417:                                              ; preds = %124
  %418 = load i32, ptr %16, align 4, !tbaa !20
  %419 = icmp eq i32 %418, -1
  br i1 %419, label %420, label %421

420:                                              ; preds = %417
  store i1 false, ptr %5, align 1
  store i32 1, ptr %22, align 4
  br label %654

421:                                              ; preds = %417
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #8
  %422 = load ptr, ptr %7, align 8, !tbaa !5
  %423 = getelementptr inbounds %"struct.JPH::TriangleSplitter::Range", ptr %422, i32 0, i32 0
  %424 = load i32, ptr %423, align 4, !tbaa !18
  store i32 %424, ptr %46, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #8
  %425 = load ptr, ptr %7, align 8, !tbaa !5
  %426 = getelementptr inbounds %"struct.JPH::TriangleSplitter::Range", ptr %425, i32 0, i32 1
  %427 = load i32, ptr %426, align 4, !tbaa !21
  store i32 %427, ptr %47, align 4, !tbaa !20
  br label %428

428:                                              ; preds = %542, %421
  %429 = load i32, ptr %46, align 4, !tbaa !20
  %430 = load i32, ptr %47, align 4, !tbaa !20
  %431 = icmp ult i32 %429, %430
  br i1 %431, label %432, label %543

432:                                              ; preds = %428
  br label %433

433:                                              ; preds = %454, %432
  %434 = load i32, ptr %46, align 4, !tbaa !20
  %435 = load i32, ptr %47, align 4, !tbaa !20
  %436 = icmp ult i32 %434, %435
  call void @llvm.lifetime.start.p0(i64 16, ptr %48) #8
  br i1 %436, label %437, label %452

437:                                              ; preds = %433
  %438 = load i32, ptr %46, align 4, !tbaa !20
  %439 = invoke { double, double } @_ZN3JPH29TriangleSplitterFixedLeafSize19GetCentroidForGroupEj(ptr noundef nonnull align 8 dereferenceable(88) %56, i32 noundef %438)
          to label %440 unwind label %459

440:                                              ; preds = %437
  %441 = getelementptr inbounds %"class.JPH::Vec3", ptr %48, i32 0, i32 0
  %442 = getelementptr inbounds %union.anon, ptr %441, i32 0, i32 0
  %443 = getelementptr inbounds { double, double }, ptr %442, i32 0, i32 0
  %444 = extractvalue { double, double } %439, 0
  store double %444, ptr %443, align 16
  %445 = getelementptr inbounds { double, double }, ptr %442, i32 0, i32 1
  %446 = extractvalue { double, double } %439, 1
  store double %446, ptr %445, align 8
  %447 = load i32, ptr %16, align 4, !tbaa !20
  %448 = invoke noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %48, i32 noundef %447)
          to label %449 unwind label %459

449:                                              ; preds = %440
  %450 = load float, ptr %17, align 4, !tbaa !24
  %451 = fcmp olt float %448, %450
  br label %452

452:                                              ; preds = %449, %433
  %453 = phi i1 [ false, %433 ], [ %451, %449 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %48) #8
  br i1 %453, label %454, label %463

454:                                              ; preds = %452
  %455 = getelementptr inbounds %"class.JPH::TriangleSplitterFixedLeafSize", ptr %56, i32 0, i32 1
  %456 = load i32, ptr %455, align 8, !tbaa !9
  %457 = load i32, ptr %46, align 4, !tbaa !20
  %458 = add i32 %457, %456
  store i32 %458, ptr %46, align 4, !tbaa !20
  br label %433, !llvm.loop !46

459:                                              ; preds = %440, %437
  %460 = landingpad { ptr, i32 }
          cleanup
  %461 = extractvalue { ptr, i32 } %460, 0
  store ptr %461, ptr %24, align 8
  %462 = extractvalue { ptr, i32 } %460, 1
  store i32 %462, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %48) #8
  br label %653

463:                                              ; preds = %452
  br label %464

464:                                              ; preds = %488, %463
  %465 = load i32, ptr %46, align 4, !tbaa !20
  %466 = load i32, ptr %47, align 4, !tbaa !20
  %467 = icmp ult i32 %465, %466
  call void @llvm.lifetime.start.p0(i64 16, ptr %49) #8
  br i1 %467, label %468, label %486

468:                                              ; preds = %464
  %469 = load i32, ptr %47, align 4, !tbaa !20
  %470 = getelementptr inbounds %"class.JPH::TriangleSplitterFixedLeafSize", ptr %56, i32 0, i32 1
  %471 = load i32, ptr %470, align 8, !tbaa !9
  %472 = sub i32 %469, %471
  %473 = invoke { double, double } @_ZN3JPH29TriangleSplitterFixedLeafSize19GetCentroidForGroupEj(ptr noundef nonnull align 8 dereferenceable(88) %56, i32 noundef %472)
          to label %474 unwind label %493

474:                                              ; preds = %468
  %475 = getelementptr inbounds %"class.JPH::Vec3", ptr %49, i32 0, i32 0
  %476 = getelementptr inbounds %union.anon, ptr %475, i32 0, i32 0
  %477 = getelementptr inbounds { double, double }, ptr %476, i32 0, i32 0
  %478 = extractvalue { double, double } %473, 0
  store double %478, ptr %477, align 16
  %479 = getelementptr inbounds { double, double }, ptr %476, i32 0, i32 1
  %480 = extractvalue { double, double } %473, 1
  store double %480, ptr %479, align 8
  %481 = load i32, ptr %16, align 4, !tbaa !20
  %482 = invoke noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %49, i32 noundef %481)
          to label %483 unwind label %493

483:                                              ; preds = %474
  %484 = load float, ptr %17, align 4, !tbaa !24
  %485 = fcmp oge float %482, %484
  br label %486

486:                                              ; preds = %483, %464
  %487 = phi i1 [ false, %464 ], [ %485, %483 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %49) #8
  br i1 %487, label %488, label %497

488:                                              ; preds = %486
  %489 = getelementptr inbounds %"class.JPH::TriangleSplitterFixedLeafSize", ptr %56, i32 0, i32 1
  %490 = load i32, ptr %489, align 8, !tbaa !9
  %491 = load i32, ptr %47, align 4, !tbaa !20
  %492 = sub i32 %491, %490
  store i32 %492, ptr %47, align 4, !tbaa !20
  br label %464, !llvm.loop !47

493:                                              ; preds = %474, %468
  %494 = landingpad { ptr, i32 }
          cleanup
  %495 = extractvalue { ptr, i32 } %494, 0
  store ptr %495, ptr %24, align 8
  %496 = extractvalue { ptr, i32 } %494, 1
  store i32 %496, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %49) #8
  br label %653

497:                                              ; preds = %486
  %498 = load i32, ptr %46, align 4, !tbaa !20
  %499 = load i32, ptr %47, align 4, !tbaa !20
  %500 = icmp ult i32 %498, %499
  br i1 %500, label %501, label %542

501:                                              ; preds = %497
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #8
  store i32 0, ptr %50, align 4, !tbaa !20
  br label %502

502:                                              ; preds = %526, %501
  %503 = load i32, ptr %50, align 4, !tbaa !20
  %504 = getelementptr inbounds %"class.JPH::TriangleSplitterFixedLeafSize", ptr %56, i32 0, i32 1
  %505 = load i32, ptr %504, align 8, !tbaa !9
  %506 = icmp ult i32 %503, %505
  br i1 %506, label %508, label %507

507:                                              ; preds = %502
  store i32 36, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #8
  br label %533

508:                                              ; preds = %502
  %509 = getelementptr inbounds %"class.JPH::TriangleSplitter", ptr %56, i32 0, i32 4
  %510 = load i32, ptr %46, align 4, !tbaa !20
  %511 = load i32, ptr %50, align 4, !tbaa !20
  %512 = add i32 %510, %511
  %513 = zext i32 %512 to i64
  %514 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %509, i64 noundef %513)
          to label %515 unwind label %529

515:                                              ; preds = %508
  %516 = getelementptr inbounds %"class.JPH::TriangleSplitter", ptr %56, i32 0, i32 4
  %517 = load i32, ptr %47, align 4, !tbaa !20
  %518 = getelementptr inbounds %"class.JPH::TriangleSplitterFixedLeafSize", ptr %56, i32 0, i32 1
  %519 = load i32, ptr %518, align 8, !tbaa !9
  %520 = sub i32 %517, %519
  %521 = load i32, ptr %50, align 4, !tbaa !20
  %522 = add i32 %520, %521
  %523 = zext i32 %522 to i64
  %524 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %516, i64 noundef %523)
          to label %525 unwind label %529

525:                                              ; preds = %515
  call void @_ZSt4swapIjENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %514, ptr noundef nonnull align 4 dereferenceable(4) %524) #8
  br label %526

526:                                              ; preds = %525
  %527 = load i32, ptr %50, align 4, !tbaa !20
  %528 = add i32 %527, 1
  store i32 %528, ptr %50, align 4, !tbaa !20
  br label %502, !llvm.loop !48

529:                                              ; preds = %515, %508
  %530 = landingpad { ptr, i32 }
          cleanup
  %531 = extractvalue { ptr, i32 } %530, 0
  store ptr %531, ptr %24, align 8
  %532 = extractvalue { ptr, i32 } %530, 1
  store i32 %532, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #8
  br label %653

533:                                              ; preds = %507
  %534 = getelementptr inbounds %"class.JPH::TriangleSplitterFixedLeafSize", ptr %56, i32 0, i32 1
  %535 = load i32, ptr %534, align 8, !tbaa !9
  %536 = load i32, ptr %46, align 4, !tbaa !20
  %537 = add i32 %536, %535
  store i32 %537, ptr %46, align 4, !tbaa !20
  %538 = getelementptr inbounds %"class.JPH::TriangleSplitterFixedLeafSize", ptr %56, i32 0, i32 1
  %539 = load i32, ptr %538, align 8, !tbaa !9
  %540 = load i32, ptr %47, align 4, !tbaa !20
  %541 = sub i32 %540, %539
  store i32 %541, ptr %47, align 4, !tbaa !20
  br label %542

542:                                              ; preds = %533, %497
  br label %428, !llvm.loop !49

543:                                              ; preds = %428
  br label %544

544:                                              ; preds = %543
  %545 = load i32, ptr %46, align 4, !tbaa !20
  %546 = load i32, ptr %47, align 4, !tbaa !20
  %547 = icmp eq i32 %545, %546
  br i1 %547, label %556, label %548

548:                                              ; preds = %544
  %549 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 157)
          to label %550 unwind label %552

550:                                              ; preds = %548
  br i1 %549, label %551, label %556

551:                                              ; preds = %550
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #8, !srcloc !50
  br label %556

552:                                              ; preds = %646, %638, %630, %615, %570, %548
  %553 = landingpad { ptr, i32 }
          cleanup
  %554 = extractvalue { ptr, i32 } %553, 0
  store ptr %554, ptr %24, align 8
  %555 = extractvalue { ptr, i32 } %553, 1
  store i32 %555, ptr %25, align 4
  br label %653

556:                                              ; preds = %551, %550, %544
  br label %557

557:                                              ; preds = %556
  br label %558

558:                                              ; preds = %557
  %559 = load i32, ptr %46, align 4, !tbaa !20
  %560 = load ptr, ptr %7, align 8, !tbaa !5
  %561 = getelementptr inbounds %"struct.JPH::TriangleSplitter::Range", ptr %560, i32 0, i32 0
  %562 = load i32, ptr %561, align 4, !tbaa !18
  %563 = icmp eq i32 %559, %562
  br i1 %563, label %570, label %564

564:                                              ; preds = %558
  %565 = load i32, ptr %46, align 4, !tbaa !20
  %566 = load ptr, ptr %7, align 8, !tbaa !5
  %567 = getelementptr inbounds %"struct.JPH::TriangleSplitter::Range", ptr %566, i32 0, i32 1
  %568 = load i32, ptr %567, align 4, !tbaa !21
  %569 = icmp eq i32 %565, %568
  br i1 %569, label %570, label %586

570:                                              ; preds = %564, %558
  %571 = load ptr, ptr %7, align 8, !tbaa !5
  %572 = getelementptr inbounds %"struct.JPH::TriangleSplitter::Range", ptr %571, i32 0, i32 0
  %573 = load i32, ptr %572, align 4, !tbaa !18
  %574 = load ptr, ptr %7, align 8, !tbaa !5
  %575 = invoke noundef i32 @_ZNK3JPH16TriangleSplitter5Range5CountEv(ptr noundef nonnull align 4 dereferenceable(8) %574)
          to label %576 unwind label %552

576:                                              ; preds = %570
  %577 = getelementptr inbounds %"class.JPH::TriangleSplitterFixedLeafSize", ptr %56, i32 0, i32 1
  %578 = load i32, ptr %577, align 8, !tbaa !9
  %579 = udiv i32 %575, %578
  %580 = add i32 %579, 1
  %581 = udiv i32 %580, 2
  %582 = getelementptr inbounds %"class.JPH::TriangleSplitterFixedLeafSize", ptr %56, i32 0, i32 1
  %583 = load i32, ptr %582, align 8, !tbaa !9
  %584 = mul i32 %581, %583
  %585 = add i32 %573, %584
  store i32 %585, ptr %46, align 4, !tbaa !20
  br label %586

586:                                              ; preds = %576, %564
  call void @llvm.lifetime.start.p0(i64 8, ptr %52) #8
  %587 = load ptr, ptr %7, align 8, !tbaa !5
  %588 = getelementptr inbounds %"struct.JPH::TriangleSplitter::Range", ptr %587, i32 0, i32 0
  %589 = load i32, ptr %588, align 4, !tbaa !18
  %590 = load i32, ptr %46, align 4, !tbaa !20
  invoke void @_ZN3JPH16TriangleSplitter5RangeC2Ejj(ptr noundef nonnull align 4 dereferenceable(8) %52, i32 noundef %589, i32 noundef %590)
          to label %591 unwind label %619

591:                                              ; preds = %586
  %592 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %592, ptr align 4 %52, i64 8, i1 false), !tbaa.struct !51
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #8
  %593 = load i32, ptr %46, align 4, !tbaa !20
  %594 = load ptr, ptr %7, align 8, !tbaa !5
  %595 = getelementptr inbounds %"struct.JPH::TriangleSplitter::Range", ptr %594, i32 0, i32 1
  %596 = load i32, ptr %595, align 4, !tbaa !21
  invoke void @_ZN3JPH16TriangleSplitter5RangeC2Ejj(ptr noundef nonnull align 4 dereferenceable(8) %53, i32 noundef %593, i32 noundef %596)
          to label %597 unwind label %623

597:                                              ; preds = %591
  %598 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %598, ptr align 4 %53, i64 8, i1 false), !tbaa.struct !51
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #8
  br label %599

599:                                              ; preds = %597
  %600 = load ptr, ptr %8, align 8, !tbaa !5
  %601 = getelementptr inbounds %"struct.JPH::TriangleSplitter::Range", ptr %600, i32 0, i32 1
  %602 = load i32, ptr %601, align 4, !tbaa !21
  %603 = load ptr, ptr %8, align 8, !tbaa !5
  %604 = getelementptr inbounds %"struct.JPH::TriangleSplitter::Range", ptr %603, i32 0, i32 0
  %605 = load i32, ptr %604, align 4, !tbaa !18
  %606 = icmp ugt i32 %602, %605
  br i1 %606, label %607, label %615

607:                                              ; preds = %599
  %608 = load ptr, ptr %9, align 8, !tbaa !5
  %609 = getelementptr inbounds %"struct.JPH::TriangleSplitter::Range", ptr %608, i32 0, i32 1
  %610 = load i32, ptr %609, align 4, !tbaa !21
  %611 = load ptr, ptr %9, align 8, !tbaa !5
  %612 = getelementptr inbounds %"struct.JPH::TriangleSplitter::Range", ptr %611, i32 0, i32 0
  %613 = load i32, ptr %612, align 4, !tbaa !18
  %614 = icmp ugt i32 %610, %613
  br i1 %614, label %627, label %615

615:                                              ; preds = %607, %599
  %616 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 165)
          to label %617 unwind label %552

617:                                              ; preds = %615
  br i1 %616, label %618, label %627

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

619:                                              ; preds = %586
  %620 = landingpad { ptr, i32 }
          cleanup
  %621 = extractvalue { ptr, i32 } %620, 0
  store ptr %621, ptr %24, align 8
  %622 = extractvalue { ptr, i32 } %620, 1
  store i32 %622, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #8
  br label %653

623:                                              ; preds = %591
  %624 = landingpad { ptr, i32 }
          cleanup
  %625 = extractvalue { ptr, i32 } %624, 0
  store ptr %625, ptr %24, align 8
  %626 = extractvalue { ptr, i32 } %624, 1
  store i32 %626, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #8
  br label %653

627:                                              ; preds = %618, %617, %607
  br label %628

628:                                              ; preds = %627
  br label %629

629:                                              ; preds = %628
  br label %630

630:                                              ; preds = %629
  %631 = load ptr, ptr %8, align 8, !tbaa !5
  %632 = invoke noundef i32 @_ZNK3JPH16TriangleSplitter5Range5CountEv(ptr noundef nonnull align 4 dereferenceable(8) %631)
          to label %633 unwind label %552

633:                                              ; preds = %630
  %634 = getelementptr inbounds %"class.JPH::TriangleSplitterFixedLeafSize", ptr %56, i32 0, i32 1
  %635 = load i32, ptr %634, align 8, !tbaa !9
  %636 = urem i32 %632, %635
  %637 = icmp eq i32 %636, 0
  br i1 %637, label %638, label %646

638:                                              ; preds = %633
  %639 = load ptr, ptr %9, align 8, !tbaa !5
  %640 = invoke noundef i32 @_ZNK3JPH16TriangleSplitter5Range5CountEv(ptr noundef nonnull align 4 dereferenceable(8) %639)
          to label %641 unwind label %552

641:                                              ; preds = %638
  %642 = getelementptr inbounds %"class.JPH::TriangleSplitterFixedLeafSize", ptr %56, i32 0, i32 1
  %643 = load i32, ptr %642, align 8, !tbaa !9
  %644 = urem i32 %640, %643
  %645 = icmp eq i32 %644, 0
  br i1 %645, label %650, label %646

646:                                              ; preds = %641, %633
  %647 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 166)
          to label %648 unwind label %552

648:                                              ; preds = %646
  br i1 %647, label %649, label %650

649:                                              ; preds = %648
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #8, !srcloc !53
  br label %650

650:                                              ; preds = %649, %648, %641
  br label %651

651:                                              ; preds = %650
  br label %652

652:                                              ; preds = %651
  store i1 true, ptr %5, align 1
  store i32 1, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #8
  br label %654

653:                                              ; preds = %623, %619, %552, %529, %493, %459
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #8
  br label %656

654:                                              ; preds = %652, %420
  call void @_ZN3JPH5ArrayINS_29TriangleSplitterFixedLeafSize3BinENS_12STLAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #8
  %655 = load i1, ptr %5, align 1
  ret i1 %655

656:                                              ; preds = %653, %416
  call void @_ZN3JPH5ArrayINS_29TriangleSplitterFixedLeafSize3BinENS_12STLAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #8
  br label %657

657:                                              ; preds = %656
  %658 = load ptr, ptr %24, align 8
  %659 = load i32, ptr %25, align 4
  %660 = insertvalue { ptr, i32 } poison, ptr %658, 0
  %661 = insertvalue { ptr, i32 } %660, i32 %659, 1
  resume { ptr, i32 } %661

662:                                              ; preds = %407
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3JPH16TriangleSplitter5Range5CountEv(ptr noundef nonnull align 4 dereferenceable(8)) #3 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 noundef i32 @_ZN3JPH5ClampIjEET_S1_S1_S1_(i32 noundef, i32 noundef, i32 noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayINS_29TriangleSplitterFixedLeafSize3BinENS_12STLAllocatorIS2_EEEC2EmRKS4_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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_29TriangleSplitterFixedLeafSize3BinENS_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: 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)) #5

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

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

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

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

; 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: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH16TriangleSplitter5RangeC2Ejj(ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, i32 noundef) unnamed_addr #3 align 2

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !15, i64 72}
!10 = !{!"_ZTSN3JPH29TriangleSplitterFixedLeafSizeE", !11, i64 0, !15, i64 72, !15, i64 76, !15, i64 80, !15, i64 84}
!11 = !{!"_ZTSN3JPH16TriangleSplitterE", !6, i64 8, !6, i64 16, !12, i64 24, !14, i64 48}
!12 = !{!"_ZTSN3JPH5ArrayINS_6Float3ENS_12STLAllocatorIS1_EEEE", !13, i64 0, !13, i64 8, !6, i64 16}
!13 = !{!"long", !7, i64 0}
!14 = !{!"_ZTSN3JPH5ArrayIjNS_12STLAllocatorIjEEEE", !13, i64 0, !13, i64 8, !6, i64 16}
!15 = !{!"int", !7, i64 0}
!16 = !{i64 2156885474}
!17 = !{i64 2156885868}
!18 = !{!19, !15, i64 0}
!19 = !{!"_ZTSN3JPH16TriangleSplitter5RangeE", !15, i64 0, !15, i64 4}
!20 = !{!15, !15, i64 0}
!21 = !{!19, !15, i64 4}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!25, !25, i64 0}
!25 = !{!"float", !7, i64 0}
!26 = !{!10, !15, i64 84}
!27 = !{!10, !15, i64 76}
!28 = !{!10, !15, i64 80}
!29 = !{!30, !25, i64 32}
!30 = !{!"_ZTSN3JPH29TriangleSplitterFixedLeafSize3BinE", !31, i64 0, !25, i64 32, !15, i64 36, !31, i64 48, !31, i64 80, !15, i64 112, !15, i64 116}
!31 = !{!"_ZTSN3JPH5AABoxE", !32, i64 0, !32, i64 16}
!32 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!33 = !{!30, !15, i64 36}
!34 = distinct !{!34, !23}
!35 = !{!11, !6, i64 8}
!36 = distinct !{!36, !23}
!37 = distinct !{!37, !23}
!38 = !{i64 0, i64 16, !39, i64 16, i64 16, !39}
!39 = !{!7, !7, i64 0}
!40 = !{!30, !15, i64 112}
!41 = distinct !{!41, !23}
!42 = !{!30, !15, i64 116}
!43 = distinct !{!43, !23}
!44 = distinct !{!44, !23}
!45 = distinct !{!45, !23}
!46 = distinct !{!46, !23}
!47 = distinct !{!47, !23}
!48 = distinct !{!48, !23}
!49 = distinct !{!49, !23}
!50 = !{i64 2156886243}
!51 = !{i64 0, i64 4, !20, i64 4, i64 4, !20}
!52 = !{i64 2156886694}
!53 = !{i64 2156887155}


; 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::Array.6" = type { i64, i64, ptr }
%"class.JPH::STLAllocator.7" = type { i8 }
%"struct.JPH::TriangleSplitter::Range" = type { i32, i32 }

@.str.1 = external hidden unnamed_addr constant [115 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [70 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH29TriangleSplitterFixedLeafSize19GetCentroidForGroupEj(ptr noundef nonnull align 8 dereferenceable(88), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #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 @_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: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3JPH29TriangleSplitterFixedLeafSize5SplitERKNS_16TriangleSplitter5RangeERS2_S5_(ptr noundef nonnull align 8 dereferenceable(88) %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 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.JPH::AABox", align 16
  %6 = alloca %"class.JPH::Array.6", align 8
  %7 = alloca %"class.JPH::STLAllocator.7", align 1
  %8 = alloca float, align 4
  %9 = alloca %"class.JPH::Vec3", align 16
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"class.JPH::AABox", align 16
  %13 = alloca %"class.JPH::Vec3", align 16
  %14 = alloca %"class.JPH::Vec3", align 16
  %15 = alloca %"struct.JPH::TriangleSplitter::Range", align 8
  %16 = alloca %"struct.JPH::TriangleSplitter::Range", align 8
  %17 = tail call noundef i32 @_ZNK3JPH16TriangleSplitter5Range5CountEv(ptr noundef nonnull align 4 dereferenceable(8) %1)
  %18 = getelementptr inbounds i8, ptr %0, i64 72
  %19 = load i32, ptr %18, align 8, !tbaa !5
  %20 = icmp ugt i32 %17, %19
  br i1 %20, label %24, label %21

21:                                               ; preds = %4
  %22 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 43)
  br i1 %22, label %23, label %24

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

24:                                               ; preds = %23, %21, %4
  %25 = tail call noundef i32 @_ZNK3JPH16TriangleSplitter5Range5CountEv(ptr noundef nonnull align 4 dereferenceable(8) %1)
  %26 = load i32, ptr %18, align 8, !tbaa !5
  %27 = urem i32 %25, %26
  %28 = icmp eq i32 %27, 0
  br i1 %28, label %32, label %29

29:                                               ; preds = %24
  %30 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 44)
  br i1 %30, label %31, label %32

31:                                               ; preds = %29
  tail call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #8, !srcloc !16
  br label %32

32:                                               ; preds = %24, %29, %31
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #8
  call void @_ZN3JPH5AABoxC2Ev(ptr noundef nonnull align 16 dereferenceable(32) %5)
  %33 = load i32, ptr %1, align 4, !tbaa !17
  %34 = getelementptr inbounds i8, ptr %1, i64 4
  %35 = load i32, ptr %34, align 4, !tbaa !19
  %36 = icmp ult i32 %33, %35
  br i1 %36, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %32
  %37 = call noundef i32 @_ZNK3JPH16TriangleSplitter5Range5CountEv(ptr noundef nonnull align 4 dereferenceable(8) %1)
  %38 = getelementptr inbounds i8, ptr %0, i64 84
  %39 = load i32, ptr %38, align 4, !tbaa !20
  %40 = udiv i32 %37, %39
  %41 = getelementptr inbounds i8, ptr %0, i64 76
  %42 = load i32, ptr %41, align 4, !tbaa !21
  %43 = getelementptr inbounds i8, ptr %0, i64 80
  %44 = load i32, ptr %43, align 8, !tbaa !22
  %45 = call noundef i32 @_ZN3JPH5ClampIjEET_S1_S1_S1_(i32 noundef %40, i32 noundef %42, i32 noundef %44)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #8
  %46 = zext i32 %45 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #8
  call void @_ZN3JPH5ArrayINS_29TriangleSplitterFixedLeafSize3BinENS_12STLAllocatorIS2_EEEC2EmRKS4_(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %46, ptr noundef nonnull align 1 dereferenceable(1) %7)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #8
  %47 = getelementptr inbounds i8, ptr %5, i64 16
  %.not = icmp eq i32 %45, 0
  %48 = uitofp i32 %45 to float
  %49 = getelementptr inbounds i8, ptr %9, i64 8
  %50 = add i32 %45, -1
  %51 = getelementptr inbounds i8, ptr %0, i64 8
  %52 = icmp sgt i32 %50, -1
  %53 = icmp ugt i32 %45, 1
  %54 = zext i32 %50 to i64
  br label %64

.lr.ph:                                           ; preds = %32, %.lr.ph
  %.0135238 = phi i32 [ %59, %.lr.ph ], [ %33, %32 ]
  %55 = call { double, double } @_ZN3JPH29TriangleSplitterFixedLeafSize19GetCentroidForGroupEj(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef %.0135238)
  %56 = extractvalue { double, double } %55, 0
  %57 = extractvalue { double, double } %55, 1
  call void @_ZN3JPH5AABox11EncapsulateENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(32) %5, double %56, double %57)
  %58 = load i32, ptr %18, align 8, !tbaa !5
  %59 = add i32 %58, %.0135238
  %60 = load i32, ptr %34, align 4, !tbaa !19
  %61 = icmp ult i32 %59, %60
  br i1 %61, label %.lr.ph, label %._crit_edge, !llvm.loop !23

62:                                               ; preds = %178
  %63 = icmp ne i32 %.3145, -1
  br i1 %63, label %181, label %289

64:                                               ; preds = %._crit_edge, %178
  %.0137269 = phi float [ 0x47EFFFFFE0000000, %._crit_edge ], [ %.3140, %178 ]
  %.0142268 = phi i32 [ -1, %._crit_edge ], [ %.3145, %178 ]
  %.0150267 = phi float [ 0.000000e+00, %._crit_edge ], [ %.3153, %178 ]
  %.0154265 = phi i32 [ 0, %._crit_edge ], [ %179, %178 ]
  %65 = invoke noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %5, i32 noundef %.0154265)
          to label %66 unwind label %71

66:                                               ; preds = %64
  %67 = invoke noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %47, i32 noundef %.0154265)
          to label %68 unwind label %73

68:                                               ; preds = %66
  %69 = fsub float %67, %65
  %70 = fcmp olt float %69, 0x3EE4F8B580000000
  br i1 %70, label %178, label %.preheader194

.preheader194:                                    ; preds = %68
  br i1 %.not, label %._crit_edge241, label %.lr.ph240

71:                                               ; preds = %64
  %72 = landingpad { ptr, i32 }
          cleanup
  br label %290

73:                                               ; preds = %66
  %74 = landingpad { ptr, i32 }
          cleanup
  br label %290

._crit_edge241:                                   ; preds = %80, %.preheader194
  %75 = load i32, ptr %1, align 4, !tbaa !17
  %76 = load i32, ptr %34, align 4, !tbaa !19
  %77 = icmp ult i32 %75, %76
  br i1 %77, label %.lr.ph247, label %._crit_edge248

.lr.ph240:                                        ; preds = %.preheader194, %80
  %indvars.iv = phi i64 [ %indvars.iv.next, %80 ], [ 0, %.preheader194 ]
  %78 = invoke noundef nonnull align 16 dereferenceable(120) ptr @_ZN3JPH5ArrayINS_29TriangleSplitterFixedLeafSize3BinENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv)
          to label %79 unwind label %88

79:                                               ; preds = %.lr.ph240
  invoke void @_ZN3JPH5AABox8SetEmptyEv(ptr noundef nonnull align 16 dereferenceable(32) %78)
          to label %80 unwind label %88

80:                                               ; preds = %79
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %81 = trunc nuw i64 %indvars.iv.next to i32
  %82 = uitofp i32 %81 to float
  %83 = fmul float %69, %82
  %84 = fdiv float %83, %48
  %85 = fadd float %65, %84
  %86 = getelementptr inbounds i8, ptr %78, i64 32
  store float %85, ptr %86, align 16, !tbaa !25
  %87 = getelementptr inbounds i8, ptr %78, i64 36
  store i32 0, ptr %87, align 4, !tbaa !30
  %exitcond.not = icmp eq i64 %indvars.iv.next, %46
  br i1 %exitcond.not, label %._crit_edge241, label %.lr.ph240, !llvm.loop !31

88:                                               ; preds = %79, %.lr.ph240
  %89 = landingpad { ptr, i32 }
          cleanup
  br label %290

._crit_edge248:                                   ; preds = %._crit_edge244, %._crit_edge241
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #8
  invoke void @_ZN3JPH5AABoxC2Ev(ptr noundef nonnull align 16 dereferenceable(32) %12)
          to label %.preheader193 unwind label %130

.preheader193:                                    ; preds = %._crit_edge248
  br i1 %.not, label %._crit_edge252, label %.lr.ph251

.lr.ph247:                                        ; preds = %._crit_edge241, %._crit_edge244
  %.0155245 = phi i32 [ %112, %._crit_edge244 ], [ %75, %._crit_edge241 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #8
  %90 = invoke { double, double } @_ZN3JPH29TriangleSplitterFixedLeafSize19GetCentroidForGroupEj(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef %.0155245)
          to label %91 unwind label %115

91:                                               ; preds = %.lr.ph247
  %92 = extractvalue { double, double } %90, 0
  store double %92, ptr %9, align 16
  %93 = extractvalue { double, double } %90, 1
  store double %93, ptr %49, align 8
  %94 = invoke noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %9, i32 noundef %.0154265)
          to label %95 unwind label %115

95:                                               ; preds = %91
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #8
  store float %94, ptr %8, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #8
  %96 = fsub float %94, %65
  %97 = fdiv float %96, %69
  %98 = fmul float %97, %48
  %99 = fptoui float %98 to i32
  store i32 %99, ptr %10, align 4, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  store i32 %50, ptr %11, align 4, !tbaa !33
  %100 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %101 = load i32, ptr %100, align 4, !tbaa !33
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  %102 = zext i32 %101 to i64
  %103 = invoke noundef nonnull align 16 dereferenceable(120) ptr @_ZN3JPH5ArrayINS_29TriangleSplitterFixedLeafSize3BinENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %102)
          to label %.preheader190 unwind label %117

.preheader190:                                    ; preds = %95
  %104 = load i32, ptr %18, align 8, !tbaa !5
  %.not285 = icmp eq i32 %104, 0
  br i1 %.not285, label %._crit_edge244, label %.lr.ph243

._crit_edge244:                                   ; preds = %123, %.preheader190
  %105 = getelementptr inbounds i8, ptr %103, i64 32
  %106 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %105, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %107 = load float, ptr %106, align 4, !tbaa !32
  store float %107, ptr %105, align 16, !tbaa !25
  %108 = load i32, ptr %18, align 8, !tbaa !5
  %109 = getelementptr inbounds i8, ptr %103, i64 36
  %110 = load i32, ptr %109, align 4, !tbaa !30
  %111 = add i32 %110, %108
  store i32 %111, ptr %109, align 4, !tbaa !30
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  %112 = add i32 %108, %.0155245
  %113 = load i32, ptr %34, align 4, !tbaa !19
  %114 = icmp ult i32 %112, %113
  br i1 %114, label %.lr.ph247, label %._crit_edge248, !llvm.loop !34

115:                                              ; preds = %91, %.lr.ph247
  %116 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #8
  br label %129

117:                                              ; preds = %95
  %118 = landingpad { ptr, i32 }
          cleanup
  br label %129

.lr.ph243:                                        ; preds = %.preheader190, %123
  %.0149242 = phi i32 [ %124, %123 ], [ 0, %.preheader190 ]
  %119 = load ptr, ptr %51, align 8, !tbaa !35
  %120 = add i32 %.0149242, %.0155245
  %121 = invoke noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3JPH16TriangleSplitter11GetTriangleEj(ptr noundef nonnull align 8 dereferenceable(72) %0, i32 noundef %120)
          to label %122 unwind label %127

122:                                              ; preds = %.lr.ph243
  invoke void @_ZN3JPH5AABox11EncapsulateERKNS_5ArrayINS_6Float3ENS_12STLAllocatorIS2_EEEERKNS_15IndexedTriangleE(ptr noundef nonnull align 16 dereferenceable(32) %103, ptr noundef nonnull align 8 dereferenceable(24) %119, ptr noundef nonnull align 4 dereferenceable(16) %121)
          to label %123 unwind label %127

123:                                              ; preds = %122
  %124 = add nuw i32 %.0149242, 1
  %125 = load i32, ptr %18, align 8, !tbaa !5
  %126 = icmp ult i32 %124, %125
  br i1 %126, label %.lr.ph243, label %._crit_edge244, !llvm.loop !36

127:                                              ; preds = %122, %.lr.ph243
  %128 = landingpad { ptr, i32 }
          cleanup
  br label %129

129:                                              ; preds = %117, %127, %115
  %.pn181.pn = phi { ptr, i32 } [ %116, %115 ], [ %128, %127 ], [ %118, %117 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  br label %290

._crit_edge252:                                   ; preds = %136, %.preheader193
  invoke void @_ZN3JPH5AABox8SetEmptyEv(ptr noundef nonnull align 16 dereferenceable(32) %12)
          to label %.preheader192 unwind label %142

.preheader192:                                    ; preds = %._crit_edge252
  br i1 %52, label %.lr.ph256, label %.preheader191

130:                                              ; preds = %._crit_edge248
  %131 = landingpad { ptr, i32 }
          cleanup
  br label %180

.lr.ph251:                                        ; preds = %.preheader193, %136
  %indvars.iv295 = phi i64 [ %indvars.iv.next296, %136 ], [ 0, %.preheader193 ]
  %.0147249 = phi i32 [ %139, %136 ], [ 0, %.preheader193 ]
  %132 = invoke noundef nonnull align 16 dereferenceable(120) ptr @_ZN3JPH5ArrayINS_29TriangleSplitterFixedLeafSize3BinENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv295)
          to label %133 unwind label %140

133:                                              ; preds = %.lr.ph251
  %134 = getelementptr inbounds i8, ptr %132, i64 48
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %134, ptr noundef nonnull align 16 dereferenceable(32) %12, i64 32, i1 false), !tbaa.struct !37
  %135 = getelementptr inbounds i8, ptr %132, i64 112
  store i32 %.0147249, ptr %135, align 16, !tbaa !39
  invoke void @_ZN3JPH5AABox11EncapsulateERKS0_(ptr noundef nonnull align 16 dereferenceable(32) %12, ptr noundef nonnull align 16 dereferenceable(32) %132)
          to label %136 unwind label %140

136:                                              ; preds = %133
  %137 = getelementptr inbounds i8, ptr %132, i64 36
  %138 = load i32, ptr %137, align 4, !tbaa !30
  %139 = add i32 %138, %.0147249
  %indvars.iv.next296 = add nuw nsw i64 %indvars.iv295, 1
  %exitcond299.not = icmp eq i64 %indvars.iv.next296, %46
  br i1 %exitcond299.not, label %._crit_edge252, label %.lr.ph251, !llvm.loop !40

140:                                              ; preds = %133, %.lr.ph251
  %141 = landingpad { ptr, i32 }
          cleanup
  br label %180

.preheader191:                                    ; preds = %146, %.preheader192
  br i1 %53, label %.lr.ph261, label %._crit_edge262

142:                                              ; preds = %._crit_edge252
  %143 = landingpad { ptr, i32 }
          cleanup
  br label %180

.lr.ph256:                                        ; preds = %.preheader192, %146
  %indvars.iv300 = phi i64 [ %indvars.iv.next301, %146 ], [ %54, %.preheader192 ]
  %.1148254 = phi i32 [ %149, %146 ], [ 0, %.preheader192 ]
  %144 = invoke noundef nonnull align 16 dereferenceable(120) ptr @_ZN3JPH5ArrayINS_29TriangleSplitterFixedLeafSize3BinENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv300)
          to label %145 unwind label %153

145:                                              ; preds = %.lr.ph256
  invoke void @_ZN3JPH5AABox11EncapsulateERKS0_(ptr noundef nonnull align 16 dereferenceable(32) %12, ptr noundef nonnull align 16 dereferenceable(32) %144)
          to label %146 unwind label %153

146:                                              ; preds = %145
  %147 = getelementptr inbounds i8, ptr %144, i64 36
  %148 = load i32, ptr %147, align 4, !tbaa !30
  %149 = add i32 %148, %.1148254
  %150 = getelementptr inbounds i8, ptr %144, i64 80
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %150, ptr noundef nonnull align 16 dereferenceable(32) %12, i64 32, i1 false), !tbaa.struct !37
  %151 = getelementptr inbounds i8, ptr %144, i64 116
  store i32 %149, ptr %151, align 4, !tbaa !41
  %indvars.iv.next301 = add nsw i64 %indvars.iv300, -1
  %152 = icmp sgt i64 %indvars.iv300, 0
  br i1 %152, label %.lr.ph256, label %.preheader191, !llvm.loop !42

153:                                              ; preds = %145, %.lr.ph256
  %154 = landingpad { ptr, i32 }
          cleanup
  br label %180

._crit_edge262:                                   ; preds = %164, %.preheader191
  %.1151.lcssa = phi float [ %.0150267, %.preheader191 ], [ %.2152, %164 ]
  %.1143.lcssa = phi i32 [ %.0142268, %.preheader191 ], [ %.2144, %164 ]
  %.1138.lcssa = phi float [ %.0137269, %.preheader191 ], [ %.2139, %164 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #8
  br label %178

.lr.ph261:                                        ; preds = %.preheader191, %164
  %indvars.iv303 = phi i64 [ %indvars.iv.next304, %164 ], [ 1, %.preheader191 ]
  %.1138259 = phi float [ %.2139, %164 ], [ %.0137269, %.preheader191 ]
  %.1143258 = phi i32 [ %.2144, %164 ], [ %.0142268, %.preheader191 ]
  %.1151257 = phi float [ %.2152, %164 ], [ %.0150267, %.preheader191 ]
  %155 = invoke noundef nonnull align 16 dereferenceable(120) ptr @_ZN3JPH5ArrayINS_29TriangleSplitterFixedLeafSize3BinENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv303)
          to label %156 unwind label %174

156:                                              ; preds = %.lr.ph261
  %157 = getelementptr inbounds i8, ptr %155, i64 48
  %158 = invoke noundef float @_ZNK3JPH5AABox14GetSurfaceAreaEv(ptr noundef nonnull align 16 dereferenceable(32) %157)
          to label %159 unwind label %176

159:                                              ; preds = %156
  %160 = getelementptr inbounds i8, ptr %155, i64 112
  %161 = load i32, ptr %160, align 16, !tbaa !39
  %162 = getelementptr inbounds i8, ptr %155, i64 80
  %163 = invoke noundef float @_ZNK3JPH5AABox14GetSurfaceAreaEv(ptr noundef nonnull align 16 dereferenceable(32) %162)
          to label %164 unwind label %176

164:                                              ; preds = %159
  %165 = uitofp i32 %161 to float
  %166 = getelementptr inbounds i8, ptr %155, i64 116
  %167 = load i32, ptr %166, align 4, !tbaa !41
  %168 = uitofp i32 %167 to float
  %169 = fmul float %163, %168
  %170 = call float @llvm.fmuladd.f32(float %158, float %165, float %169)
  %171 = fcmp olt float %170, %.1138259
  %172 = getelementptr inbounds i8, ptr %155, i64 32
  %173 = load float, ptr %172, align 16
  %.2152 = select i1 %171, float %173, float %.1151257
  %.2144 = select i1 %171, i32 %.0154265, i32 %.1143258
  %.2139 = select i1 %171, float %170, float %.1138259
  %indvars.iv.next304 = add nuw nsw i64 %indvars.iv303, 1
  %exitcond307.not = icmp eq i64 %indvars.iv.next304, %46
  br i1 %exitcond307.not, label %._crit_edge262, label %.lr.ph261, !llvm.loop !43

174:                                              ; preds = %.lr.ph261
  %175 = landingpad { ptr, i32 }
          cleanup
  br label %180

176:                                              ; preds = %159, %156
  %177 = landingpad { ptr, i32 }
          cleanup
  br label %180

178:                                              ; preds = %68, %._crit_edge262
  %.3153 = phi float [ %.1151.lcssa, %._crit_edge262 ], [ %.0150267, %68 ]
  %.3145 = phi i32 [ %.1143.lcssa, %._crit_edge262 ], [ %.0142268, %68 ]
  %.3140 = phi float [ %.1138.lcssa, %._crit_edge262 ], [ %.0137269, %68 ]
  %179 = add nuw nsw i32 %.0154265, 1
  %exitcond308.not = icmp eq i32 %179, 3
  br i1 %exitcond308.not, label %62, label %64, !llvm.loop !44

180:                                              ; preds = %140, %142, %153, %176, %174, %130
  %.pn178.pn = phi { ptr, i32 } [ %131, %130 ], [ %141, %140 ], [ %154, %153 ], [ %143, %142 ], [ %177, %176 ], [ %175, %174 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #8
  br label %290

181:                                              ; preds = %62
  %182 = load i32, ptr %1, align 4, !tbaa !17
  %183 = load i32, ptr %34, align 4, !tbaa !19
  %184 = icmp ult i32 %182, %183
  br i1 %184, label %.preheader189.lr.ph, label %._crit_edge281

.preheader189.lr.ph:                              ; preds = %181
  %185 = getelementptr inbounds i8, ptr %13, i64 8
  %186 = getelementptr inbounds i8, ptr %14, i64 8
  %187 = getelementptr inbounds i8, ptr %0, i64 48
  br label %.preheader189

.preheader189:                                    ; preds = %.preheader189.lr.ph, %236
  %.0130280 = phi i32 [ %183, %.preheader189.lr.ph ], [ %.2, %236 ]
  %.0131279 = phi i32 [ %182, %.preheader189.lr.ph ], [ %.2133, %236 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #8
  br label %188

188:                                              ; preds = %.preheader189, %196
  %.1132270 = phi i32 [ %.0131279, %.preheader189 ], [ %198, %196 ]
  %189 = invoke { double, double } @_ZN3JPH29TriangleSplitterFixedLeafSize19GetCentroidForGroupEj(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef %.1132270)
          to label %190 unwind label %200

190:                                              ; preds = %188
  %191 = extractvalue { double, double } %189, 0
  store double %191, ptr %13, align 16
  %192 = extractvalue { double, double } %189, 1
  store double %192, ptr %185, align 8
  %193 = invoke noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %13, i32 noundef %.3145)
          to label %194 unwind label %200

194:                                              ; preds = %190
  %195 = fcmp olt float %193, %.3153
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #8
  br i1 %195, label %196, label %.loopexit

196:                                              ; preds = %194
  %197 = load i32, ptr %18, align 8, !tbaa !5
  %198 = add i32 %197, %.1132270
  %199 = icmp ult i32 %198, %.0130280
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #8
  br i1 %199, label %188, label %.critedge, !llvm.loop !45

200:                                              ; preds = %190, %188
  %201 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #8
  br label %290

.critedge:                                        ; preds = %196
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #8
  br label %.loopexit

.loopexit:                                        ; preds = %194, %.critedge
  %.1132197 = phi i32 [ %198, %.critedge ], [ %.1132270, %194 ]
  %202 = icmp ult i32 %.1132197, %.0130280
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #8
  br i1 %202, label %.lr.ph273.preheader, label %.thread

.lr.ph273.preheader:                              ; preds = %.loopexit
  %.pre = load i32, ptr %18, align 8, !tbaa !5
  br label %.lr.ph273

.lr.ph273:                                        ; preds = %.lr.ph273.preheader, %213
  %203 = phi i32 [ %212, %213 ], [ %.pre, %.lr.ph273.preheader ]
  %.1271 = phi i32 [ %214, %213 ], [ %.0130280, %.lr.ph273.preheader ]
  %204 = sub i32 %.1271, %203
  %205 = invoke { double, double } @_ZN3JPH29TriangleSplitterFixedLeafSize19GetCentroidForGroupEj(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef %204)
          to label %206 unwind label %216

206:                                              ; preds = %.lr.ph273
  %207 = extractvalue { double, double } %205, 0
  store double %207, ptr %14, align 16
  %208 = extractvalue { double, double } %205, 1
  store double %208, ptr %186, align 8
  %209 = invoke noundef float @_ZNK3JPH4Vec3ixEj(ptr noundef nonnull align 16 dereferenceable(16) %14, i32 noundef %.3145)
          to label %210 unwind label %216

210:                                              ; preds = %206
  %211 = fcmp ult float %209, %.3153
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #8
  %212 = load i32, ptr %18, align 8, !tbaa !5
  br i1 %211, label %.preheader, label %213

.preheader:                                       ; preds = %210
  %.not286 = icmp eq i32 %212, 0
  br i1 %.not286, label %._crit_edge277, label %.lr.ph276

213:                                              ; preds = %210
  %214 = sub i32 %.1271, %212
  %215 = icmp ult i32 %.1132197, %214
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #8
  br i1 %215, label %.lr.ph273, label %.thread, !llvm.loop !46

216:                                              ; preds = %206, %.lr.ph273
  %217 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #8
  br label %290

.thread:                                          ; preds = %213, %.loopexit
  %.1.lcssa = phi i32 [ %.0130280, %.loopexit ], [ %214, %213 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #8
  br label %236

._crit_edge277:                                   ; preds = %230, %.preheader
  %.lcssa = phi i32 [ 0, %.preheader ], [ %231, %230 ]
  %218 = add i32 %.lcssa, %.1132197
  %219 = sub i32 %.1271, %.lcssa
  br label %236

.lr.ph276:                                        ; preds = %.preheader, %230
  %indvars.iv309 = phi i64 [ %indvars.iv.next310, %230 ], [ 0, %.preheader ]
  %220 = trunc nuw i64 %indvars.iv309 to i32
  %221 = add i32 %.1132197, %220
  %222 = zext i32 %221 to i64
  %223 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %187, i64 noundef %222)
          to label %224 unwind label %234

224:                                              ; preds = %.lr.ph276
  %225 = load i32, ptr %18, align 8, !tbaa !5
  %226 = add i32 %.1271, %220
  %227 = sub i32 %226, %225
  %228 = zext i32 %227 to i64
  %229 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %187, i64 noundef %228)
          to label %230 unwind label %234

230:                                              ; preds = %224
  call void @_ZSt4swapIjENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %223, ptr noundef nonnull align 4 dereferenceable(4) %229) #8
  %indvars.iv.next310 = add nuw nsw i64 %indvars.iv309, 1
  %231 = load i32, ptr %18, align 8, !tbaa !5
  %232 = zext i32 %231 to i64
  %233 = icmp ult i64 %indvars.iv.next310, %232
  br i1 %233, label %.lr.ph276, label %._crit_edge277, !llvm.loop !47

234:                                              ; preds = %224, %.lr.ph276
  %235 = landingpad { ptr, i32 }
          cleanup
  br label %290

236:                                              ; preds = %.thread, %._crit_edge277
  %.2133 = phi i32 [ %218, %._crit_edge277 ], [ %.1132197, %.thread ]
  %.2 = phi i32 [ %219, %._crit_edge277 ], [ %.1.lcssa, %.thread ]
  %237 = icmp ult i32 %.2133, %.2
  br i1 %237, label %.preheader189, label %._crit_edge281, !llvm.loop !48

._crit_edge281:                                   ; preds = %236, %181
  %.0131.lcssa = phi i32 [ %182, %181 ], [ %.2133, %236 ]
  %.0130.lcssa = phi i32 [ %183, %181 ], [ %.2, %236 ]
  %238 = icmp eq i32 %.0131.lcssa, %.0130.lcssa
  br i1 %238, label %245, label %239

239:                                              ; preds = %._crit_edge281
  %240 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 157)
          to label %241 unwind label %243

241:                                              ; preds = %239
  br i1 %240, label %242, label %245

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

243:                                              ; preds = %285, %271, %239
  %244 = landingpad { ptr, i32 }
          cleanup
  br label %290

245:                                              ; preds = %242, %241, %._crit_edge281
  %246 = load i32, ptr %1, align 4, !tbaa !17
  %247 = icmp eq i32 %.0131.lcssa, %246
  %248 = load i32, ptr %34, align 4
  %249 = icmp eq i32 %.0131.lcssa, %248
  %or.cond = select i1 %247, i1 true, i1 %249
  br i1 %or.cond, label %250, label %258

250:                                              ; preds = %245
  %251 = call noundef i32 @_ZNK3JPH16TriangleSplitter5Range5CountEv(ptr noundef nonnull align 4 dereferenceable(8) %1)
  %252 = load i32, ptr %18, align 8, !tbaa !5
  %253 = udiv i32 %251, %252
  %254 = add i32 %253, 1
  %255 = lshr i32 %254, 1
  %256 = mul i32 %255, %252
  %257 = add i32 %256, %246
  %.pre312 = load i32, ptr %1, align 4, !tbaa !17
  br label %258

258:                                              ; preds = %245, %250
  %259 = phi i32 [ %.pre312, %250 ], [ %246, %245 ]
  %.3 = phi i32 [ %257, %250 ], [ %.0131.lcssa, %245 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #8
  call void @_ZN3JPH16TriangleSplitter5RangeC2Ejj(ptr noundef nonnull align 4 dereferenceable(8) %15, i32 noundef %259, i32 noundef %.3)
  %260 = load i64, ptr %15, align 8
  store i64 %260, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #8
  %261 = load i32, ptr %34, align 4, !tbaa !19
  call void @_ZN3JPH16TriangleSplitter5RangeC2Ejj(ptr noundef nonnull align 4 dereferenceable(8) %16, i32 noundef %.3, i32 noundef %261)
  %262 = load i64, ptr %16, align 8
  store i64 %262, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #8
  %263 = getelementptr inbounds i8, ptr %2, i64 4
  %264 = load i32, ptr %263, align 4, !tbaa !19
  %265 = load i32, ptr %2, align 4, !tbaa !17
  %266 = icmp ugt i32 %264, %265
  %267 = trunc i64 %262 to i32
  %268 = lshr i64 %262, 32
  %269 = trunc nuw i64 %268 to i32
  %270 = icmp ugt i32 %269, %267
  %or.cond323 = select i1 %266, i1 %270, i1 false
  br i1 %or.cond323, label %275, label %271

271:                                              ; preds = %258
  %272 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 165)
          to label %273 unwind label %243

273:                                              ; preds = %271
  br i1 %272, label %274, label %275

274:                                              ; preds = %273
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #8, !srcloc !50
  br label %275

275:                                              ; preds = %258, %273, %274
  %276 = call noundef i32 @_ZNK3JPH16TriangleSplitter5Range5CountEv(ptr noundef nonnull align 4 dereferenceable(8) %2)
  %277 = load i32, ptr %18, align 8, !tbaa !5
  %278 = urem i32 %276, %277
  %279 = icmp eq i32 %278, 0
  br i1 %279, label %280, label %285

280:                                              ; preds = %275
  %281 = call noundef i32 @_ZNK3JPH16TriangleSplitter5Range5CountEv(ptr noundef nonnull align 4 dereferenceable(8) %3)
  %282 = load i32, ptr %18, align 8, !tbaa !5
  %283 = urem i32 %281, %282
  %284 = icmp eq i32 %283, 0
  br i1 %284, label %289, label %285

285:                                              ; preds = %280, %275
  %286 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 166)
          to label %287 unwind label %243

287:                                              ; preds = %285
  br i1 %286, label %288, label %289

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

289:                                              ; preds = %280, %287, %288, %62
  call void @_ZN3JPH5ArrayINS_29TriangleSplitterFixedLeafSize3BinENS_12STLAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #8
  ret i1 %63

290:                                              ; preds = %200, %216, %234, %243, %71, %180, %129, %88, %73
  %.pn184.pn.pn = phi { ptr, i32 } [ %72, %71 ], [ %89, %88 ], [ %.pn181.pn, %129 ], [ %.pn178.pn, %180 ], [ %74, %73 ], [ %235, %234 ], [ %217, %216 ], [ %201, %200 ], [ %244, %243 ]
  call void @_ZN3JPH5ArrayINS_29TriangleSplitterFixedLeafSize3BinENS_12STLAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #8
  resume { ptr, i32 } %.pn184.pn.pn
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayINS_29TriangleSplitterFixedLeafSize3BinENS_12STLAllocatorIS2_EEEC2EmRKS4_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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_29TriangleSplitterFixedLeafSize3BinENS_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: 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 #5

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

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

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

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

; 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: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH16TriangleSplitter5RangeC2Ejj(ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, i32 noundef) unnamed_addr #3 align 2

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !14, i64 72}
!6 = !{!"_ZTSN3JPH29TriangleSplitterFixedLeafSizeE", !7, i64 0, !14, i64 72, !14, i64 76, !14, i64 80, !14, i64 84}
!7 = !{!"_ZTSN3JPH16TriangleSplitterE", !8, i64 8, !8, i64 16, !11, i64 24, !13, i64 48}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTSN3JPH5ArrayINS_6Float3ENS_12STLAllocatorIS1_EEEE", !12, i64 0, !12, i64 8, !8, i64 16}
!12 = !{!"long", !9, i64 0}
!13 = !{!"_ZTSN3JPH5ArrayIjNS_12STLAllocatorIjEEEE", !12, i64 0, !12, i64 8, !8, i64 16}
!14 = !{!"int", !9, i64 0}
!15 = !{i64 2156885474}
!16 = !{i64 2156885868}
!17 = !{!18, !14, i64 0}
!18 = !{!"_ZTSN3JPH16TriangleSplitter5RangeE", !14, i64 0, !14, i64 4}
!19 = !{!18, !14, i64 4}
!20 = !{!6, !14, i64 84}
!21 = !{!6, !14, i64 76}
!22 = !{!6, !14, i64 80}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!26, !29, i64 32}
!26 = !{!"_ZTSN3JPH29TriangleSplitterFixedLeafSize3BinE", !27, i64 0, !29, i64 32, !14, i64 36, !27, i64 48, !27, i64 80, !14, i64 112, !14, i64 116}
!27 = !{!"_ZTSN3JPH5AABoxE", !28, i64 0, !28, i64 16}
!28 = !{!"_ZTSN3JPH4Vec3E", !9, i64 0}
!29 = !{!"float", !9, i64 0}
!30 = !{!26, !14, i64 36}
!31 = distinct !{!31, !24}
!32 = !{!29, !29, i64 0}
!33 = !{!14, !14, i64 0}
!34 = distinct !{!34, !24}
!35 = !{!7, !8, i64 8}
!36 = distinct !{!36, !24}
!37 = !{i64 0, i64 16, !38, i64 16, i64 16, !38}
!38 = !{!9, !9, i64 0}
!39 = !{!26, !14, i64 112}
!40 = distinct !{!40, !24}
!41 = !{!26, !14, i64 116}
!42 = distinct !{!42, !24}
!43 = distinct !{!43, !24}
!44 = distinct !{!44, !24}
!45 = distinct !{!45, !24}
!46 = distinct !{!46, !24}
!47 = distinct !{!47, !24}
!48 = distinct !{!48, !24}
!49 = !{i64 2156886243}
!50 = !{i64 2156886694}
!51 = !{i64 2156887155}


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