; LLVM IR from zig-gamedev/zphysics :: libs/Jolt/TriangleGrouper (TriangleGrouperClosestCentroid)

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

%"class.JPH::Array.0" = type { i64, i64, ptr }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%class.anon = type { ptr, ptr }
%class.anon.9 = type { ptr, ptr }

; 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
define dso_local void @_ZN3JPH30TriangleGrouperClosestCentroid5GroupERKNS_5ArrayINS_6Float3ENS_12STLAllocatorIS2_EEEERKNS1_INS_15IndexedTriangleENS3_IS8_EEEEiRNS1_IjNS3_IjEEEE(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %3, ptr noundef nonnull align 8 dereferenceable(24) %4) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"class.JPH::Array.0", align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %"class.JPH::Vec3", align 16
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca float, align 4
  %27 = alloca ptr, align 8
  %28 = alloca float, align 4
  %29 = alloca %"class.JPH::Vec3", align 16
  %30 = alloca %class.anon, align 8
  %31 = alloca float, align 4
  %32 = alloca %"class.JPH::Vec3", align 16
  %33 = alloca %"class.JPH::Vec3", align 16
  %34 = alloca ptr, align 8
  %35 = alloca float, align 4
  %36 = alloca %"class.JPH::Vec3", align 16
  %37 = alloca %"class.JPH::Vec3", align 16
  %38 = alloca i32, align 4
  %39 = alloca ptr, align 8
  %40 = alloca %class.anon.9, align 8
  %41 = alloca %"class.JPH::Vec3", align 16
  %42 = alloca %"class.JPH::Vec3", align 16
  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 i32 %3, ptr %9, align 4, !tbaa !9
  store ptr %4, ptr %10, align 8, !tbaa !5
  %43 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = call noundef i64 @_ZNK3JPH5ArrayINS_15IndexedTriangleENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %44)
  %46 = trunc i64 %45 to i32
  store i32 %46, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  %47 = load i32, ptr %11, align 4, !tbaa !9
  %48 = load i32, ptr %9, align 4, !tbaa !9
  %49 = add i32 %47, %48
  %50 = sub i32 %49, 1
  %51 = load i32, ptr %9, align 4, !tbaa !9
  %52 = udiv i32 %50, %51
  store i32 %52, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #8
  call void @_ZN3JPH5ArrayINS_4Vec3ENS_12STLAllocatorIS1_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  %53 = load i32, ptr %11, align 4, !tbaa !9
  %54 = zext i32 %53 to i64
  invoke void @_ZN3JPH5ArrayINS_4Vec3ENS_12STLAllocatorIS1_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %54)
          to label %55 unwind label %65

55:                                               ; preds = %5
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  %57 = load i32, ptr %11, align 4, !tbaa !9
  %58 = zext i32 %57 to i64
  invoke void @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %56, i64 noundef %58)
          to label %59 unwind label %65

59:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %60

60:                                               ; preds = %94, %59
  %61 = load i32, ptr %16, align 4, !tbaa !9
  %62 = load i32, ptr %11, align 4, !tbaa !9
  %63 = icmp ult i32 %61, %62
  br i1 %63, label %69, label %64

64:                                               ; preds = %60
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %106

65:                                               ; preds = %55, %5
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %14, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %15, align 4
  br label %324

69:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #8
  %70 = load ptr, ptr %8, align 8, !tbaa !5
  %71 = load i32, ptr %16, align 4, !tbaa !9
  %72 = zext i32 %71 to i64
  %73 = invoke noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3JPH5ArrayINS_15IndexedTriangleENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %70, i64 noundef %72)
          to label %74 unwind label %97

74:                                               ; preds = %69
  %75 = load ptr, ptr %7, align 8, !tbaa !5
  %76 = invoke { double, double } @_ZNK3JPH25IndexedTriangleNoMaterial11GetCentroidERKNS_5ArrayINS_6Float3ENS_12STLAllocatorIS2_EEEE(ptr noundef nonnull align 4 dereferenceable(12) %73, ptr noundef nonnull align 8 dereferenceable(24) %75)
          to label %77 unwind label %97

77:                                               ; preds = %74
  %78 = getelementptr inbounds %"class.JPH::Vec3", ptr %17, i32 0, i32 0
  %79 = getelementptr inbounds %union.anon, ptr %78, i32 0, i32 0
  %80 = getelementptr inbounds { double, double }, ptr %79, i32 0, i32 0
  %81 = extractvalue { double, double } %76, 0
  store double %81, ptr %80, align 16
  %82 = getelementptr inbounds { double, double }, ptr %79, i32 0, i32 1
  %83 = extractvalue { double, double } %76, 1
  store double %83, ptr %82, align 8
  %84 = load i32, ptr %16, align 4, !tbaa !9
  %85 = zext i32 %84 to i64
  %86 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH5ArrayINS_4Vec3ENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %85)
          to label %87 unwind label %97

87:                                               ; preds = %77
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %86, ptr align 16 %17, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #8
  %88 = load i32, ptr %16, align 4, !tbaa !9
  %89 = load ptr, ptr %10, align 8, !tbaa !5
  %90 = load i32, ptr %16, align 4, !tbaa !9
  %91 = zext i32 %90 to i64
  %92 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %89, i64 noundef %91)
          to label %93 unwind label %101

93:                                               ; preds = %87
  store i32 %88, ptr %92, align 4, !tbaa !9
  br label %94

94:                                               ; preds = %93
  %95 = load i32, ptr %16, align 4, !tbaa !9
  %96 = add i32 %95, 1
  store i32 %96, ptr %16, align 4, !tbaa !9
  br label %60, !llvm.loop !13

97:                                               ; preds = %77, %74, %69
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %14, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #8
  br label %105

101:                                              ; preds = %87
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %14, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %15, align 4
  br label %105

105:                                              ; preds = %101, %97
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %324

106:                                              ; preds = %64
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  %108 = invoke noundef ptr @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %107)
          to label %109 unwind label %116

109:                                              ; preds = %106
  store ptr %108, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %110

110:                                              ; preds = %315, %109
  %111 = load i32, ptr %19, align 4, !tbaa !9
  %112 = load i32, ptr %12, align 4, !tbaa !9
  %113 = sub i32 %112, 1
  %114 = icmp ult i32 %111, %113
  br i1 %114, label %120, label %115

115:                                              ; preds = %110
  store i32 5, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %322

116:                                              ; preds = %106
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %14, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %15, align 4
  br label %323

120:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %121 = load ptr, ptr %10, align 8, !tbaa !5
  %122 = invoke noundef ptr @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %121)
          to label %123 unwind label %151

123:                                              ; preds = %120
  %124 = load i32, ptr %19, align 4, !tbaa !9
  %125 = load i32, ptr %9, align 4, !tbaa !9
  %126 = mul i32 %124, %125
  %127 = zext i32 %126 to i64
  %128 = getelementptr inbounds i32, ptr %122, i64 %127
  store ptr %128, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %129 = load ptr, ptr %21, align 8, !tbaa !5
  %130 = load i32, ptr %9, align 4, !tbaa !9
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds i32, ptr %129, i64 %131
  store ptr %132, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %133 = load ptr, ptr %21, align 8, !tbaa !5
  %134 = getelementptr inbounds i32, ptr %133, i64 1
  store ptr %134, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  %135 = load ptr, ptr %22, align 8, !tbaa !5
  %136 = getelementptr inbounds i32, ptr %135, i64 -1
  store ptr %136, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  %137 = load ptr, ptr %21, align 8, !tbaa !5
  store ptr %137, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  %138 = load ptr, ptr %25, align 8, !tbaa !5
  %139 = load i32, ptr %138, align 4, !tbaa !9
  %140 = zext i32 %139 to i64
  %141 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH5ArrayINS_4Vec3ENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %140)
          to label %142 unwind label %155

142:                                              ; preds = %123
  %143 = invoke noundef float @_ZNK3JPH4Vec34GetXEv(ptr noundef nonnull align 16 dereferenceable(16) %141)
          to label %144 unwind label %155

144:                                              ; preds = %142
  store float %143, ptr %26, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  %145 = load ptr, ptr %21, align 8, !tbaa !5
  store ptr %145, ptr %27, align 8, !tbaa !5
  br label %146

146:                                              ; preds = %178, %144
  %147 = load ptr, ptr %27, align 8, !tbaa !5
  %148 = load ptr, ptr %18, align 8, !tbaa !5
  %149 = icmp ne ptr %147, %148
  br i1 %149, label %159, label %150

150:                                              ; preds = %146
  store i32 8, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  br label %181

151:                                              ; preds = %120
  %152 = landingpad { ptr, i32 }
          cleanup
  %153 = extractvalue { ptr, i32 } %152, 0
  store ptr %153, ptr %14, align 8
  %154 = extractvalue { ptr, i32 } %152, 1
  store i32 %154, ptr %15, align 4
  br label %321

155:                                              ; preds = %142, %123
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %14, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %15, align 4
  br label %320

159:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #8
  %160 = load ptr, ptr %27, align 8, !tbaa !5
  %161 = load i32, ptr %160, align 4, !tbaa !9
  %162 = zext i32 %161 to i64
  %163 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH5ArrayINS_4Vec3ENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %162)
          to label %164 unwind label %173

164:                                              ; preds = %159
  %165 = invoke noundef float @_ZNK3JPH4Vec34GetXEv(ptr noundef nonnull align 16 dereferenceable(16) %163)
          to label %166 unwind label %173

166:                                              ; preds = %164
  store float %165, ptr %28, align 4, !tbaa !15
  %167 = load float, ptr %28, align 4, !tbaa !15
  %168 = load float, ptr %26, align 4, !tbaa !15
  %169 = fcmp olt float %167, %168
  br i1 %169, label %170, label %177

170:                                              ; preds = %166
  %171 = load ptr, ptr %27, align 8, !tbaa !5
  store ptr %171, ptr %25, align 8, !tbaa !5
  %172 = load float, ptr %28, align 4, !tbaa !15
  store float %172, ptr %26, align 4, !tbaa !15
  br label %177

173:                                              ; preds = %164, %159
  %174 = landingpad { ptr, i32 }
          cleanup
  %175 = extractvalue { ptr, i32 } %174, 0
  store ptr %175, ptr %14, align 8
  %176 = extractvalue { ptr, i32 } %174, 1
  store i32 %176, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  br label %320

177:                                              ; preds = %170, %166
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  br label %178

178:                                              ; preds = %177
  %179 = load ptr, ptr %27, align 8, !tbaa !5
  %180 = getelementptr inbounds i32, ptr %179, i32 1
  store ptr %180, ptr %27, align 8, !tbaa !5
  br label %146, !llvm.loop !17

181:                                              ; preds = %150
  %182 = load ptr, ptr %21, align 8, !tbaa !5
  %183 = load ptr, ptr %25, align 8, !tbaa !5
  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) %182, ptr noundef nonnull align 4 dereferenceable(4) %183) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #8
  %184 = load ptr, ptr %21, align 8, !tbaa !5
  %185 = load i32, ptr %184, align 4, !tbaa !9
  %186 = zext i32 %185 to i64
  %187 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH5ArrayINS_4Vec3ENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %186)
          to label %188 unwind label %223

188:                                              ; preds = %181
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %29, ptr align 16 %187, i64 16, i1 false), !tbaa.struct !11
  %189 = load ptr, ptr %23, align 8, !tbaa !5
  %190 = load ptr, ptr %22, align 8, !tbaa !5
  %191 = getelementptr inbounds %class.anon, ptr %30, i32 0, i32 0
  store ptr %29, ptr %191, align 8, !tbaa !5
  %192 = getelementptr inbounds %class.anon, ptr %30, i32 0, i32 1
  store ptr %13, ptr %192, align 8, !tbaa !5
  %193 = getelementptr inbounds { ptr, ptr }, ptr %30, i32 0, i32 0
  %194 = load ptr, ptr %193, align 8
  %195 = getelementptr inbounds { ptr, ptr }, ptr %30, i32 0, i32 1
  %196 = load ptr, ptr %195, align 8
  invoke void @"_ZN3JPH9QuickSortIPjZNS_30TriangleGrouperClosestCentroid5GroupERKNS_5ArrayINS_6Float3ENS_12STLAllocatorIS4_EEEERKNS3_INS_15IndexedTriangleENS5_ISA_EEEEiRNS3_IjNS5_IjEEEEE3$_0EEvT_SJ_T0_"(ptr noundef %189, ptr noundef %190, ptr %194, ptr %196)
          to label %197 unwind label %223

197:                                              ; preds = %188
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %32) #8
  %198 = load ptr, ptr %24, align 8, !tbaa !5
  %199 = load i32, ptr %198, align 4, !tbaa !9
  %200 = zext i32 %199 to i64
  %201 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH5ArrayINS_4Vec3ENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %200)
          to label %202 unwind label %227

202:                                              ; preds = %197
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %33, ptr align 16 %29, i64 16, i1 false), !tbaa.struct !11
  %203 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 0
  %204 = load double, ptr %203, align 16
  %205 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 1
  %206 = load double, ptr %205, align 8
  %207 = invoke { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %201, double %204, double %206)
          to label %208 unwind label %227

208:                                              ; preds = %202
  %209 = getelementptr inbounds %"class.JPH::Vec3", ptr %32, i32 0, i32 0
  %210 = getelementptr inbounds %union.anon, ptr %209, i32 0, i32 0
  %211 = getelementptr inbounds { double, double }, ptr %210, i32 0, i32 0
  %212 = extractvalue { double, double } %207, 0
  store double %212, ptr %211, align 16
  %213 = getelementptr inbounds { double, double }, ptr %210, i32 0, i32 1
  %214 = extractvalue { double, double } %207, 1
  store double %214, ptr %213, align 8
  %215 = invoke noundef float @_ZNK3JPH4Vec38LengthSqEv(ptr noundef nonnull align 16 dereferenceable(16) %32)
          to label %216 unwind label %227

216:                                              ; preds = %208
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #8
  store float %215, ptr %31, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #8
  %217 = load ptr, ptr %22, align 8, !tbaa !5
  store ptr %217, ptr %34, align 8, !tbaa !5
  br label %218

218:                                              ; preds = %310, %216
  %219 = load ptr, ptr %34, align 8, !tbaa !5
  %220 = load ptr, ptr %18, align 8, !tbaa !5
  %221 = icmp ne ptr %219, %220
  br i1 %221, label %231, label %222

222:                                              ; preds = %218
  store i32 11, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  br label %314

223:                                              ; preds = %188, %181
  %224 = landingpad { ptr, i32 }
          cleanup
  %225 = extractvalue { ptr, i32 } %224, 0
  store ptr %225, ptr %14, align 8
  %226 = extractvalue { ptr, i32 } %224, 1
  store i32 %226, ptr %15, align 4
  br label %319

227:                                              ; preds = %208, %202, %197
  %228 = landingpad { ptr, i32 }
          cleanup
  %229 = extractvalue { ptr, i32 } %228, 0
  store ptr %229, ptr %14, align 8
  %230 = extractvalue { ptr, i32 } %228, 1
  store i32 %230, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #8
  br label %318

231:                                              ; preds = %218
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %36) #8
  %232 = load ptr, ptr %34, align 8, !tbaa !5
  %233 = load i32, ptr %232, align 4, !tbaa !9
  %234 = zext i32 %233 to i64
  %235 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH5ArrayINS_4Vec3ENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %234)
          to label %236 unwind label %296

236:                                              ; preds = %231
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %37, ptr align 16 %29, i64 16, i1 false), !tbaa.struct !11
  %237 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 0
  %238 = load double, ptr %237, align 16
  %239 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 1
  %240 = load double, ptr %239, align 8
  %241 = invoke { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %235, double %238, double %240)
          to label %242 unwind label %296

242:                                              ; preds = %236
  %243 = getelementptr inbounds %"class.JPH::Vec3", ptr %36, i32 0, i32 0
  %244 = getelementptr inbounds %union.anon, ptr %243, i32 0, i32 0
  %245 = getelementptr inbounds { double, double }, ptr %244, i32 0, i32 0
  %246 = extractvalue { double, double } %241, 0
  store double %246, ptr %245, align 16
  %247 = getelementptr inbounds { double, double }, ptr %244, i32 0, i32 1
  %248 = extractvalue { double, double } %241, 1
  store double %248, ptr %247, align 8
  %249 = invoke noundef float @_ZNK3JPH4Vec38LengthSqEv(ptr noundef nonnull align 16 dereferenceable(16) %36)
          to label %250 unwind label %296

250:                                              ; preds = %242
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #8
  store float %249, ptr %35, align 4, !tbaa !15
  %251 = load float, ptr %35, align 4, !tbaa !15
  %252 = load float, ptr %31, align 4, !tbaa !15
  %253 = fcmp olt float %251, %252
  br i1 %253, label %254, label %309

254:                                              ; preds = %250
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #8
  %255 = load ptr, ptr %34, align 8, !tbaa !5
  %256 = load i32, ptr %255, align 4, !tbaa !9
  store i32 %256, ptr %38, align 4, !tbaa !9
  %257 = load ptr, ptr %24, align 8, !tbaa !5
  %258 = load i32, ptr %257, align 4, !tbaa !9
  %259 = load ptr, ptr %34, align 8, !tbaa !5
  store i32 %258, ptr %259, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #8
  %260 = load ptr, ptr %23, align 8, !tbaa !5
  %261 = load ptr, ptr %22, align 8, !tbaa !5
  %262 = getelementptr inbounds %class.anon.9, ptr %40, i32 0, i32 0
  store ptr %29, ptr %262, align 8, !tbaa !5
  %263 = getelementptr inbounds %class.anon.9, ptr %40, i32 0, i32 1
  store ptr %13, ptr %263, align 8, !tbaa !5
  %264 = getelementptr inbounds { ptr, ptr }, ptr %40, i32 0, i32 0
  %265 = load ptr, ptr %264, align 8
  %266 = getelementptr inbounds { ptr, ptr }, ptr %40, i32 0, i32 1
  %267 = load ptr, ptr %266, align 8
  %268 = invoke noundef ptr @"_ZSt11upper_boundIPjfZN3JPH30TriangleGrouperClosestCentroid5GroupERKNS1_5ArrayINS1_6Float3ENS1_12STLAllocatorIS4_EEEERKNS3_INS1_15IndexedTriangleENS5_ISA_EEEEiRNS3_IjNS5_IjEEEEE3$_1ET_SJ_SJ_RKT0_T1_"(ptr noundef %260, ptr noundef %261, ptr noundef nonnull align 4 dereferenceable(4) %35, ptr %265, ptr %267)
          to label %269 unwind label %300

269:                                              ; preds = %254
  store ptr %268, ptr %39, align 8, !tbaa !5
  %270 = load ptr, ptr %39, align 8, !tbaa !5
  %271 = load ptr, ptr %24, align 8, !tbaa !5
  %272 = load ptr, ptr %22, align 8, !tbaa !5
  %273 = invoke noundef ptr @_ZSt13copy_backwardIPjS0_ET0_T_S2_S1_(ptr noundef %270, ptr noundef %271, ptr noundef %272)
          to label %274 unwind label %300

274:                                              ; preds = %269
  %275 = load i32, ptr %38, align 4, !tbaa !9
  %276 = load ptr, ptr %39, align 8, !tbaa !5
  store i32 %275, ptr %276, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %41) #8
  %277 = load ptr, ptr %24, align 8, !tbaa !5
  %278 = load i32, ptr %277, align 4, !tbaa !9
  %279 = zext i32 %278 to i64
  %280 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH5ArrayINS_4Vec3ENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %279)
          to label %281 unwind label %304

281:                                              ; preds = %274
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %42, ptr align 16 %29, i64 16, i1 false), !tbaa.struct !11
  %282 = getelementptr inbounds { double, double }, ptr %42, i32 0, i32 0
  %283 = load double, ptr %282, align 16
  %284 = getelementptr inbounds { double, double }, ptr %42, i32 0, i32 1
  %285 = load double, ptr %284, align 8
  %286 = invoke { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %280, double %283, double %285)
          to label %287 unwind label %304

287:                                              ; preds = %281
  %288 = getelementptr inbounds %"class.JPH::Vec3", ptr %41, i32 0, i32 0
  %289 = getelementptr inbounds %union.anon, ptr %288, i32 0, i32 0
  %290 = getelementptr inbounds { double, double }, ptr %289, i32 0, i32 0
  %291 = extractvalue { double, double } %286, 0
  store double %291, ptr %290, align 16
  %292 = getelementptr inbounds { double, double }, ptr %289, i32 0, i32 1
  %293 = extractvalue { double, double } %286, 1
  store double %293, ptr %292, align 8
  %294 = invoke noundef float @_ZNK3JPH4Vec38LengthSqEv(ptr noundef nonnull align 16 dereferenceable(16) %41)
          to label %295 unwind label %304

295:                                              ; preds = %287
  store float %294, ptr %31, align 4, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 16, ptr %41) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #8
  br label %309

296:                                              ; preds = %242, %236, %231
  %297 = landingpad { ptr, i32 }
          cleanup
  %298 = extractvalue { ptr, i32 } %297, 0
  store ptr %298, ptr %14, align 8
  %299 = extractvalue { ptr, i32 } %297, 1
  store i32 %299, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #8
  br label %313

300:                                              ; preds = %269, %254
  %301 = landingpad { ptr, i32 }
          cleanup
  %302 = extractvalue { ptr, i32 } %301, 0
  store ptr %302, ptr %14, align 8
  %303 = extractvalue { ptr, i32 } %301, 1
  store i32 %303, ptr %15, align 4
  br label %308

304:                                              ; preds = %287, %281, %274
  %305 = landingpad { ptr, i32 }
          cleanup
  %306 = extractvalue { ptr, i32 } %305, 0
  store ptr %306, ptr %14, align 8
  %307 = extractvalue { ptr, i32 } %305, 1
  store i32 %307, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %41) #8
  br label %308

308:                                              ; preds = %304, %300
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #8
  br label %313

309:                                              ; preds = %295, %250
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  br label %310

310:                                              ; preds = %309
  %311 = load ptr, ptr %34, align 8, !tbaa !5
  %312 = getelementptr inbounds i32, ptr %311, i32 1
  store ptr %312, ptr %34, align 8, !tbaa !5
  br label %218, !llvm.loop !18

313:                                              ; preds = %308, %296
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  br label %318

314:                                              ; preds = %222
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  br label %315

315:                                              ; preds = %314
  %316 = load i32, ptr %19, align 4, !tbaa !9
  %317 = add i32 %316, 1
  store i32 %317, ptr %19, align 4, !tbaa !9
  br label %110, !llvm.loop !19

318:                                              ; preds = %313, %227
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  br label %319

319:                                              ; preds = %318, %223
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #8
  br label %320

320:                                              ; preds = %319, %173, %155
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %321

321:                                              ; preds = %320, %151
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %323

322:                                              ; preds = %115
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @_ZN3JPH5ArrayINS_4Vec3ENS_12STLAllocatorIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  ret void

323:                                              ; preds = %321, %116
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  br label %324

324:                                              ; preds = %323, %105, %65
  call void @_ZN3JPH5ArrayINS_4Vec3ENS_12STLAllocatorIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %325

325:                                              ; preds = %324
  %326 = load ptr, ptr %14, align 8
  %327 = load i32, ptr %15, align 4
  %328 = insertvalue { ptr, i32 } poison, ptr %326, 0
  %329 = insertvalue { ptr, i32 } %328, i32 %327, 1
  resume { ptr, i32 } %329
}

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH25IndexedTriangleNoMaterial11GetCentroidERKNS_5ArrayINS_6Float3ENS_12STLAllocatorIS2_EEEE(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZN3JPH9QuickSortIPjZNS_30TriangleGrouperClosestCentroid5GroupERKNS_5ArrayINS_6Float3ENS_12STLAllocatorIS4_EEEERKNS3_INS_15IndexedTriangleENS5_ISA_EEEEiRNS3_IjNS5_IjEEEEE3$_0EEvT_SJ_T0_"(ptr noundef, ptr noundef, ptr, ptr) #4

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef ptr @"_ZSt11upper_boundIPjfZN3JPH30TriangleGrouperClosestCentroid5GroupERKNS1_5ArrayINS1_6Float3ENS1_12STLAllocatorIS4_EEEERKNS3_INS1_15IndexedTriangleENS5_ISA_EEEEiRNS3_IjNS5_IjEEEEE3$_1ET_SJ_SJ_RKT0_T1_"(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr, ptr) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt13copy_backwardIPjS0_ET0_T_S2_S1_(ptr noundef, ptr noundef, ptr noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayINS_4Vec3ENS_12STLAllocatorIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="128" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{i64 0, i64 16, !12}
!12 = !{!7, !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !16, i64 0}
!16 = !{!"float", !7, i64 0}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.JPH::Array.0" = type { i64, i64, ptr }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }

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

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
define dso_local void @_ZN3JPH30TriangleGrouperClosestCentroid5GroupERKNS_5ArrayINS_6Float3ENS_12STLAllocatorIS2_EEEERKNS1_INS_15IndexedTriangleENS3_IS8_EEEEiRNS1_IjNS3_IjEEEE(ptr nocapture noundef nonnull readnone align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %3, ptr noundef nonnull align 8 dereferenceable(24) %4) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"class.JPH::Array.0", align 8
  %7 = alloca %"class.JPH::Vec3", align 16
  %8 = alloca %"class.JPH::Vec3", align 16
  %9 = alloca float, align 4
  %10 = alloca %"class.JPH::Vec3", align 16
  %11 = alloca %"class.JPH::Vec3", align 16
  %12 = tail call noundef i64 @_ZNK3JPH5ArrayINS_15IndexedTriangleENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %13 = trunc i64 %12 to i32
  %14 = add i32 %3, -1
  %15 = add i32 %14, %13
  %16 = udiv i32 %15, %3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #8
  call void @_ZN3JPH5ArrayINS_4Vec3ENS_12STLAllocatorIS1_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  %17 = and i64 %12, 4294967295
  invoke void @_ZN3JPH5ArrayINS_4Vec3ENS_12STLAllocatorIS1_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %17)
          to label %18 unwind label %26

18:                                               ; preds = %5
  invoke void @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %17)
          to label %.preheader102 unwind label %26

.preheader102:                                    ; preds = %18
  %.not121 = icmp eq i32 %13, 0
  br i1 %.not121, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.preheader102
  %wide.trip.count = and i64 %12, 4294967295
  br label %.lr.ph

._crit_edge:                                      ; preds = %37, %.preheader102
  %19 = call noundef ptr @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %20 = add i32 %16, -1
  %.not122 = icmp eq i32 %20, 0
  br i1 %.not122, label %._crit_edge120, label %.lr.ph119

.lr.ph119:                                        ; preds = %._crit_edge
  %21 = sext i32 %3 to i64
  %.sroa.212.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 8
  %22 = getelementptr inbounds i8, ptr %8, i64 8
  %23 = getelementptr inbounds i8, ptr %10, i64 8
  %24 = getelementptr inbounds i8, ptr %11, i64 8
  %25 = zext i32 %20 to i64
  br label %43

26:                                               ; preds = %18, %5
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %124

.lr.ph:                                           ; preds = %.lr.ph.preheader, %37
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %37 ]
  %28 = invoke noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3JPH5ArrayINS_15IndexedTriangleENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv)
          to label %29 unwind label %39

29:                                               ; preds = %.lr.ph
  %30 = invoke { double, double } @_ZNK3JPH25IndexedTriangleNoMaterial11GetCentroidERKNS_5ArrayINS_6Float3ENS_12STLAllocatorIS2_EEEE(ptr noundef nonnull align 4 dereferenceable(12) %28, ptr noundef nonnull align 8 dereferenceable(24) %1)
          to label %31 unwind label %39

31:                                               ; preds = %29
  %32 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH5ArrayINS_4Vec3ENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv)
          to label %33 unwind label %39

33:                                               ; preds = %31
  %34 = extractvalue { double, double } %30, 1
  %35 = extractvalue { double, double } %30, 0
  store double %35, ptr %32, align 16
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %32, i64 8
  store double %34, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !5
  %36 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv)
          to label %37 unwind label %41

37:                                               ; preds = %33
  %38 = trunc nuw i64 %indvars.iv to i32
  store i32 %38, ptr %36, align 4, !tbaa !8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !10

39:                                               ; preds = %31, %29, %.lr.ph
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %124

41:                                               ; preds = %33
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %124

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

43:                                               ; preds = %.lr.ph119, %._crit_edge116
  %indvars.iv124 = phi i64 [ 0, %.lr.ph119 ], [ %indvars.iv.next125, %._crit_edge116 ]
  %44 = call noundef ptr @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %45 = trunc nuw i64 %indvars.iv124 to i32
  %46 = mul i32 %45, %3
  %47 = zext i32 %46 to i64
  %48 = getelementptr inbounds i32, ptr %44, i64 %47
  %49 = getelementptr inbounds i32, ptr %48, i64 %21
  %50 = getelementptr inbounds i8, ptr %48, i64 4
  %51 = getelementptr inbounds i8, ptr %49, i64 -4
  %52 = load i32, ptr %48, align 4, !tbaa !8
  %53 = zext i32 %52 to i64
  %54 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH5ArrayINS_4Vec3ENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %53)
          to label %55 unwind label %60

55:                                               ; preds = %43
  %56 = invoke noundef float @_ZNK3JPH4Vec34GetXEv(ptr noundef nonnull align 16 dereferenceable(16) %54)
          to label %.preheader unwind label %60

.preheader:                                       ; preds = %55
  %.not105 = icmp eq ptr %48, %19
  br i1 %.not105, label %._crit_edge110, label %.lr.ph109

._crit_edge110:                                   ; preds = %67, %.preheader
  %.082.lcssa = phi ptr [ %48, %.preheader ], [ %.183, %67 ]
  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) %48, ptr noundef nonnull align 4 dereferenceable(4) %.082.lcssa) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #8
  %57 = load i32, ptr %48, align 4, !tbaa !8
  %58 = zext i32 %57 to i64
  %59 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH5ArrayINS_4Vec3ENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %58)
          to label %72 unwind label %84

60:                                               ; preds = %55, %43
  %61 = landingpad { ptr, i32 }
          cleanup
  br label %124

.lr.ph109:                                        ; preds = %.preheader, %67
  %.082108 = phi ptr [ %.183, %67 ], [ %48, %.preheader ]
  %.084107 = phi float [ %.185, %67 ], [ %56, %.preheader ]
  %.086106 = phi ptr [ %69, %67 ], [ %48, %.preheader ]
  %62 = load i32, ptr %.086106, align 4, !tbaa !8
  %63 = zext i32 %62 to i64
  %64 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH5ArrayINS_4Vec3ENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %63)
          to label %65 unwind label %70

65:                                               ; preds = %.lr.ph109
  %66 = invoke noundef float @_ZNK3JPH4Vec34GetXEv(ptr noundef nonnull align 16 dereferenceable(16) %64)
          to label %67 unwind label %70

67:                                               ; preds = %65
  %68 = fcmp olt float %66, %.084107
  %.185 = select i1 %68, float %66, float %.084107
  %.183 = select i1 %68, ptr %.086106, ptr %.082108
  %69 = getelementptr inbounds i8, ptr %.086106, i64 4
  %.not = icmp eq ptr %69, %19
  br i1 %.not, label %._crit_edge110, label %.lr.ph109, !llvm.loop !12

70:                                               ; preds = %65, %.lr.ph109
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %124

72:                                               ; preds = %._crit_edge110
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %7, ptr noundef nonnull align 16 dereferenceable(16) %59, i64 16, i1 false), !tbaa.struct !13
  invoke void @"_ZN3JPH9QuickSortIPjZNS_30TriangleGrouperClosestCentroid5GroupERKNS_5ArrayINS_6Float3ENS_12STLAllocatorIS4_EEEERKNS3_INS_15IndexedTriangleENS5_ISA_EEEEiRNS3_IjNS5_IjEEEEE3$_0EEvT_SJ_T0_"(ptr noundef nonnull %50, ptr noundef nonnull %49, ptr nonnull %7, ptr nonnull %6)
          to label %73 unwind label %84

73:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #8
  %74 = load i32, ptr %51, align 4, !tbaa !8
  %75 = zext i32 %74 to i64
  %76 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH5ArrayINS_4Vec3ENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %75)
          to label %77 unwind label %86

77:                                               ; preds = %73
  %.sroa.011.0.copyload = load double, ptr %7, align 16
  %.sroa.212.0.copyload = load double, ptr %.sroa.212.0..sroa_idx, align 8, !tbaa !5
  %78 = invoke { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %76, double %.sroa.011.0.copyload, double %.sroa.212.0.copyload)
          to label %79 unwind label %86

79:                                               ; preds = %77
  %80 = extractvalue { double, double } %78, 0
  store double %80, ptr %8, align 16
  %81 = extractvalue { double, double } %78, 1
  store double %81, ptr %22, align 8
  %82 = call noundef float @_ZNK3JPH4Vec38LengthSqEv(ptr noundef nonnull align 16 dereferenceable(16) %8)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #8
  %.not92111 = icmp eq ptr %49, %19
  br i1 %.not92111, label %._crit_edge116, label %.lr.ph115

._crit_edge116:                                   ; preds = %120, %79
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #8
  %indvars.iv.next125 = add nuw nsw i64 %indvars.iv124, 1
  %83 = icmp ult i64 %indvars.iv.next125, %25
  br i1 %83, label %43, label %._crit_edge120, !llvm.loop !14

84:                                               ; preds = %72, %._crit_edge110
  %85 = landingpad { ptr, i32 }
          cleanup
  br label %123

86:                                               ; preds = %77, %73
  %87 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #8
  br label %123

.lr.ph115:                                        ; preds = %79, %120
  %.087113 = phi ptr [ %121, %120 ], [ %49, %79 ]
  %.088112 = phi float [ %.189, %120 ], [ %82, %79 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #8
  %88 = load i32, ptr %.087113, align 4, !tbaa !8
  %89 = zext i32 %88 to i64
  %90 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH5ArrayINS_4Vec3ENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %89)
          to label %91 unwind label %114

91:                                               ; preds = %.lr.ph115
  %.sroa.04.0.copyload = load double, ptr %7, align 16
  %.sroa.25.0.copyload = load double, ptr %.sroa.212.0..sroa_idx, align 8, !tbaa !5
  %92 = invoke { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %90, double %.sroa.04.0.copyload, double %.sroa.25.0.copyload)
          to label %93 unwind label %114

93:                                               ; preds = %91
  %94 = extractvalue { double, double } %92, 0
  store double %94, ptr %10, align 16
  %95 = extractvalue { double, double } %92, 1
  store double %95, ptr %23, align 8
  %96 = call noundef float @_ZNK3JPH4Vec38LengthSqEv(ptr noundef nonnull align 16 dereferenceable(16) %10)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #8
  store float %96, ptr %9, align 4, !tbaa !15
  %97 = fcmp olt float %96, %.088112
  br i1 %97, label %98, label %120

98:                                               ; preds = %93
  %99 = load i32, ptr %.087113, align 4, !tbaa !8
  %100 = load i32, ptr %51, align 4, !tbaa !8
  store i32 %100, ptr %.087113, align 4, !tbaa !8
  %101 = invoke noundef ptr @"_ZSt11upper_boundIPjfZN3JPH30TriangleGrouperClosestCentroid5GroupERKNS1_5ArrayINS1_6Float3ENS1_12STLAllocatorIS4_EEEERKNS3_INS1_15IndexedTriangleENS5_ISA_EEEEiRNS3_IjNS5_IjEEEEE3$_1ET_SJ_SJ_RKT0_T1_"(ptr noundef nonnull %50, ptr noundef nonnull %49, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr nonnull %7, ptr nonnull %6)
          to label %102 unwind label %116

102:                                              ; preds = %98
  %103 = invoke noundef ptr @_ZSt13copy_backwardIPjS0_ET0_T_S2_S1_(ptr noundef %101, ptr noundef nonnull %51, ptr noundef nonnull %49)
          to label %104 unwind label %116

104:                                              ; preds = %102
  store i32 %99, ptr %101, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #8
  %105 = load i32, ptr %51, align 4, !tbaa !8
  %106 = zext i32 %105 to i64
  %107 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH5ArrayINS_4Vec3ENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %106)
          to label %108 unwind label %118

108:                                              ; preds = %104
  %.sroa.0.0.copyload = load double, ptr %7, align 16
  %.sroa.2.0.copyload = load double, ptr %.sroa.212.0..sroa_idx, align 8, !tbaa !5
  %109 = invoke { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %107, double %.sroa.0.0.copyload, double %.sroa.2.0.copyload)
          to label %110 unwind label %118

110:                                              ; preds = %108
  %111 = extractvalue { double, double } %109, 0
  store double %111, ptr %11, align 16
  %112 = extractvalue { double, double } %109, 1
  store double %112, ptr %24, align 8
  %113 = call noundef float @_ZNK3JPH4Vec38LengthSqEv(ptr noundef nonnull align 16 dereferenceable(16) %11)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #8
  br label %120

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

116:                                              ; preds = %102, %98
  %117 = landingpad { ptr, i32 }
          cleanup
  br label %122

118:                                              ; preds = %108, %104
  %119 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #8
  br label %122

120:                                              ; preds = %110, %93
  %.189 = phi float [ %113, %110 ], [ %.088112, %93 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  %121 = getelementptr inbounds i8, ptr %.087113, i64 4
  %.not92 = icmp eq ptr %121, %19
  br i1 %.not92, label %._crit_edge116, label %.lr.ph115, !llvm.loop !17

122:                                              ; preds = %116, %118, %114
  %.pn.pn = phi { ptr, i32 } [ %115, %114 ], [ %119, %118 ], [ %117, %116 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  br label %123

123:                                              ; preds = %86, %122, %84
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %85, %84 ], [ %.pn.pn, %122 ], [ %87, %86 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #8
  br label %124

124:                                              ; preds = %60, %70, %123, %39, %41, %26
  %.pn99.pn = phi { ptr, i32 } [ %27, %26 ], [ %42, %41 ], [ %40, %39 ], [ %71, %70 ], [ %.pn.pn.pn.pn, %123 ], [ %61, %60 ]
  call void @_ZN3JPH5ArrayINS_4Vec3ENS_12STLAllocatorIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #8
  resume { ptr, i32 } %.pn99.pn
}

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH25IndexedTriangleNoMaterial11GetCentroidERKNS_5ArrayINS_6Float3ENS_12STLAllocatorIS2_EEEE(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZN3JPH9QuickSortIPjZNS_30TriangleGrouperClosestCentroid5GroupERKNS_5ArrayINS_6Float3ENS_12STLAllocatorIS4_EEEERKNS3_INS_15IndexedTriangleENS5_ISA_EEEEiRNS3_IjNS5_IjEEEEE3$_0EEvT_SJ_T0_"(ptr noundef, ptr noundef, ptr, ptr) local_unnamed_addr #4

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef ptr @"_ZSt11upper_boundIPjfZN3JPH30TriangleGrouperClosestCentroid5GroupERKNS1_5ArrayINS1_6Float3ENS1_12STLAllocatorIS4_EEEERKNS3_INS1_15IndexedTriangleENS5_ISA_EEEEiRNS3_IjNS5_IjEEEEE3$_1ET_SJ_SJ_RKT0_T1_"(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr, ptr) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt13copy_backwardIPjS0_ET0_T_S2_S1_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayINS_4Vec3ENS_12STLAllocatorIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="128" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = !{i64 0, i64 16, !5}
!14 = distinct !{!14, !11}
!15 = !{!16, !16, i64 0}
!16 = !{!"float", !6, i64 0}
!17 = distinct !{!17, !11}


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