; LLVM IR from zeux/meshoptimizer :: src (partition)

; 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.meshopt_Allocator = type { [24 x ptr], i64 }
%"struct.meshopt::ClusterAdjacency" = type { ptr, ptr, ptr }
%"struct.meshopt::GroupOrder" = type { i32, i32 }
%"struct.meshopt::ClusterGroup" = type { i32, i32, i32, i32 }

@.str = external hidden unnamed_addr constant [26 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [70 x i8], align 1
@__PRETTY_FUNCTION__.meshopt_partitionClusters = external hidden unnamed_addr constant [125 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [28 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local i64 @meshopt_partitionClusters(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, i64 noundef %4, i64 noundef %5, i64 noundef %6) #0 personality ptr @__gxx_personality_v0 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca %class.meshopt_Allocator, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca i64, align 8
  %23 = alloca %"struct.meshopt::ClusterAdjacency", align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca %"struct.meshopt::GroupOrder", align 4
  %29 = alloca %"struct.meshopt::GroupOrder", align 4
  %30 = alloca %"struct.meshopt::GroupOrder", align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca %"struct.meshopt::GroupOrder", align 4
  %38 = alloca i64, align 8
  %39 = alloca i64, align 8
  %40 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store i64 %2, ptr %10, align 8, !tbaa !9
  store ptr %3, ptr %11, align 8, !tbaa !5
  store i64 %4, ptr %12, align 8, !tbaa !9
  store i64 %5, ptr %13, align 8, !tbaa !9
  store i64 %6, ptr %14, align 8, !tbaa !9
  %41 = load i64, ptr %14, align 8, !tbaa !9
  %42 = icmp ugt i64 %41, 0
  br i1 %42, label %43, label %44

43:                                               ; preds = %7
  br label %46

44:                                               ; preds = %7
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 311, ptr noundef @__PRETTY_FUNCTION__.meshopt_partitionClusters) #6
  unreachable

45:                                               ; No predecessors!
  br label %46

46:                                               ; preds = %45, %43
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %47 = load i64, ptr %14, align 8, !tbaa !9
  %48 = load i64, ptr %14, align 8, !tbaa !9
  %49 = mul i64 %48, 3
  %50 = udiv i64 %49, 8
  %51 = add i64 %47, %50
  store i64 %51, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 200, ptr %16) #7
  call void @_ZN17meshopt_AllocatorC2Ev(ptr noundef nonnull align 8 dereferenceable(200) %16)
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %52 = load i64, ptr %13, align 8, !tbaa !9
  %53 = invoke noundef ptr @_ZN17meshopt_Allocator8allocateIhEEPT_m(ptr noundef nonnull align 8 dereferenceable(200) %16, i64 noundef %52)
          to label %54 unwind label %66

54:                                               ; preds = %46
  store ptr %53, ptr %17, align 8, !tbaa !5
  %55 = load ptr, ptr %17, align 8, !tbaa !5
  %56 = load i64, ptr %13, align 8, !tbaa !9
  call void @llvm.memset.p0.i64(ptr align 1 %55, i8 0, i64 %56, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %57 = load i64, ptr %12, align 8, !tbaa !9
  %58 = add i64 %57, 1
  %59 = invoke noundef ptr @_ZN17meshopt_Allocator8allocateIjEEPT_m(ptr noundef nonnull align 8 dereferenceable(200) %16, i64 noundef %58)
          to label %60 unwind label %70

60:                                               ; preds = %54
  store ptr %59, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  store i32 0, ptr %21, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  store i64 0, ptr %22, align 8, !tbaa !9
  br label %61

61:                                               ; preds = %94, %60
  %62 = load i64, ptr %22, align 8, !tbaa !9
  %63 = load i64, ptr %12, align 8, !tbaa !9
  %64 = icmp ult i64 %62, %63
  br i1 %64, label %74, label %65

65:                                               ; preds = %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %97

66:                                               ; preds = %46
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %18, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %19, align 4
  br label %490

70:                                               ; preds = %54
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %18, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %19, align 4
  br label %489

74:                                               ; preds = %61
  %75 = load ptr, ptr %11, align 8, !tbaa !5
  %76 = load i64, ptr %22, align 8, !tbaa !9
  %77 = getelementptr inbounds i32, ptr %75, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !11
  %79 = icmp ugt i32 %78, 0
  br i1 %79, label %80, label %81

80:                                               ; preds = %74
  br label %83

81:                                               ; preds = %74
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 326, ptr noundef @__PRETTY_FUNCTION__.meshopt_partitionClusters) #6
  unreachable

82:                                               ; No predecessors!
  br label %83

83:                                               ; preds = %82, %80
  %84 = load i32, ptr %21, align 4, !tbaa !11
  %85 = load ptr, ptr %20, align 8, !tbaa !5
  %86 = load i64, ptr %22, align 8, !tbaa !9
  %87 = getelementptr inbounds i32, ptr %85, i64 %86
  store i32 %84, ptr %87, align 4, !tbaa !11
  %88 = load ptr, ptr %11, align 8, !tbaa !5
  %89 = load i64, ptr %22, align 8, !tbaa !9
  %90 = getelementptr inbounds i32, ptr %88, i64 %89
  %91 = load i32, ptr %90, align 4, !tbaa !11
  %92 = load i32, ptr %21, align 4, !tbaa !11
  %93 = add i32 %92, %91
  store i32 %93, ptr %21, align 4, !tbaa !11
  br label %94

94:                                               ; preds = %83
  %95 = load i64, ptr %22, align 8, !tbaa !9
  %96 = add i64 %95, 1
  store i64 %96, ptr %22, align 8, !tbaa !9
  br label %61, !llvm.loop !13

97:                                               ; preds = %65
  %98 = load i32, ptr %21, align 4, !tbaa !11
  %99 = zext i32 %98 to i64
  %100 = load i64, ptr %10, align 8, !tbaa !9
  %101 = icmp eq i64 %99, %100
  br i1 %101, label %102, label %103

102:                                              ; preds = %97
  br label %105

103:                                              ; preds = %97
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 332, ptr noundef @__PRETTY_FUNCTION__.meshopt_partitionClusters) #6
  unreachable

104:                                              ; No predecessors!
  br label %105

105:                                              ; preds = %104, %102
  %106 = load i64, ptr %10, align 8, !tbaa !9
  %107 = trunc i64 %106 to i32
  %108 = load ptr, ptr %20, align 8, !tbaa !5
  %109 = load i64, ptr %12, align 8, !tbaa !9
  %110 = getelementptr inbounds i32, ptr %108, i64 %109
  store i32 %107, ptr %110, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr %23) #7
  call void @llvm.memset.p0.i64(ptr align 8 %23, i8 0, i64 24, i1 false)
  %111 = load ptr, ptr %9, align 8, !tbaa !5
  %112 = load ptr, ptr %20, align 8, !tbaa !5
  %113 = load i64, ptr %12, align 8, !tbaa !9
  %114 = load ptr, ptr %17, align 8, !tbaa !5
  %115 = load i64, ptr %13, align 8, !tbaa !9
  invoke void @_ZN7meshoptL21buildClusterAdjacencyERNS_16ClusterAdjacencyEPKjS3_mPhmR17meshopt_Allocator(ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef %111, ptr noundef %112, i64 noundef %113, ptr noundef %114, i64 noundef %115, ptr noundef nonnull align 8 dereferenceable(200) %16)
          to label %116 unwind label %128

116:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %117 = load i64, ptr %12, align 8, !tbaa !9
  %118 = invoke noundef ptr @_ZN17meshopt_Allocator8allocateIN7meshopt12ClusterGroupEEEPT_m(ptr noundef nonnull align 8 dereferenceable(200) %16, i64 noundef %117)
          to label %119 unwind label %132

119:                                              ; preds = %116
  store ptr %118, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %120 = load i64, ptr %12, align 8, !tbaa !9
  %121 = invoke noundef ptr @_ZN17meshopt_Allocator8allocateIN7meshopt10GroupOrderEEEPT_m(ptr noundef nonnull align 8 dereferenceable(200) %16, i64 noundef %120)
          to label %122 unwind label %136

122:                                              ; preds = %119
  store ptr %121, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  store i64 0, ptr %26, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  store i64 0, ptr %27, align 8, !tbaa !9
  br label %123

123:                                              ; preds = %181, %122
  %124 = load i64, ptr %27, align 8, !tbaa !9
  %125 = load i64, ptr %12, align 8, !tbaa !9
  %126 = icmp ult i64 %124, %125
  br i1 %126, label %140, label %127

127:                                              ; preds = %123
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  br label %193

128:                                              ; preds = %105
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %18, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %19, align 4
  br label %488

132:                                              ; preds = %116
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %18, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %19, align 4
  br label %487

136:                                              ; preds = %119
  %137 = landingpad { ptr, i32 }
          cleanup
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %18, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %19, align 4
  br label %486

140:                                              ; preds = %123
  %141 = load i64, ptr %27, align 8, !tbaa !9
  %142 = trunc i64 %141 to i32
  %143 = load ptr, ptr %24, align 8, !tbaa !5
  %144 = load i64, ptr %27, align 8, !tbaa !9
  %145 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %143, i64 %144
  %146 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %145, i32 0, i32 0
  store i32 %142, ptr %146, align 4, !tbaa !15
  %147 = load ptr, ptr %24, align 8, !tbaa !5
  %148 = load i64, ptr %27, align 8, !tbaa !9
  %149 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %147, i64 %148
  %150 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %149, i32 0, i32 1
  store i32 -1, ptr %150, align 4, !tbaa !17
  %151 = load ptr, ptr %24, align 8, !tbaa !5
  %152 = load i64, ptr %27, align 8, !tbaa !9
  %153 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %151, i64 %152
  %154 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %153, i32 0, i32 2
  store i32 1, ptr %154, align 4, !tbaa !18
  %155 = load ptr, ptr %24, align 8, !tbaa !5
  %156 = load i64, ptr %27, align 8, !tbaa !9
  %157 = trunc i64 %156 to i32
  %158 = load ptr, ptr %9, align 8, !tbaa !5
  %159 = load ptr, ptr %20, align 8, !tbaa !5
  %160 = load ptr, ptr %17, align 8, !tbaa !5
  %161 = invoke noundef i32 @_ZN7meshoptL10countTotalEPKNS_12ClusterGroupEiPKjS4_Ph(ptr noundef %155, i32 noundef %157, ptr noundef %158, ptr noundef %159, ptr noundef %160)
          to label %162 unwind label %184

162:                                              ; preds = %140
  %163 = load ptr, ptr %24, align 8, !tbaa !5
  %164 = load i64, ptr %27, align 8, !tbaa !9
  %165 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %163, i64 %164
  %166 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %165, i32 0, i32 3
  store i32 %161, ptr %166, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  call void @llvm.memset.p0.i64(ptr align 4 %28, i8 0, i64 8, i1 false)
  %167 = load i64, ptr %27, align 8, !tbaa !9
  %168 = trunc i64 %167 to i32
  %169 = getelementptr inbounds %"struct.meshopt::GroupOrder", ptr %28, i32 0, i32 0
  store i32 %168, ptr %169, align 4, !tbaa !20
  %170 = load ptr, ptr %24, align 8, !tbaa !5
  %171 = load i64, ptr %27, align 8, !tbaa !9
  %172 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %170, i64 %171
  %173 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %172, i32 0, i32 3
  %174 = load i32, ptr %173, align 4, !tbaa !19
  %175 = getelementptr inbounds %"struct.meshopt::GroupOrder", ptr %28, i32 0, i32 1
  store i32 %174, ptr %175, align 4, !tbaa !22
  %176 = load ptr, ptr %25, align 8, !tbaa !5
  %177 = load i64, ptr %26, align 8, !tbaa !9
  %178 = add i64 %177, 1
  store i64 %178, ptr %26, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %29, ptr align 4 %28, i64 8, i1 false), !tbaa.struct !23
  %179 = load i64, ptr %29, align 4
  invoke void @_ZN7meshoptL8heapPushEPNS_10GroupOrderEmS0_(ptr noundef %176, i64 noundef %177, i64 %179)
          to label %180 unwind label %188

180:                                              ; preds = %162
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  br label %181

181:                                              ; preds = %180
  %182 = load i64, ptr %27, align 8, !tbaa !9
  %183 = add i64 %182, 1
  store i64 %183, ptr %27, align 8, !tbaa !9
  br label %123, !llvm.loop !24

184:                                              ; preds = %140
  %185 = landingpad { ptr, i32 }
          cleanup
  %186 = extractvalue { ptr, i32 } %185, 0
  store ptr %186, ptr %18, align 8
  %187 = extractvalue { ptr, i32 } %185, 1
  store i32 %187, ptr %19, align 4
  br label %192

188:                                              ; preds = %162
  %189 = landingpad { ptr, i32 }
          cleanup
  %190 = extractvalue { ptr, i32 } %189, 0
  store ptr %190, ptr %18, align 8
  %191 = extractvalue { ptr, i32 } %189, 1
  store i32 %191, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  br label %192

192:                                              ; preds = %188, %184
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  br label %485

193:                                              ; preds = %127
  br label %194

194:                                              ; preds = %432, %430, %193
  %195 = load i64, ptr %26, align 8, !tbaa !9
  %196 = icmp ne i64 %195, 0
  br i1 %196, label %197, label %435

197:                                              ; preds = %194
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #7
  %198 = load ptr, ptr %25, align 8, !tbaa !5
  %199 = load i64, ptr %26, align 8, !tbaa !9
  %200 = add i64 %199, -1
  store i64 %200, ptr %26, align 8, !tbaa !9
  %201 = invoke i64 @_ZN7meshoptL7heapPopEPNS_10GroupOrderEm(ptr noundef %198, i64 noundef %199)
          to label %202 unwind label %212

202:                                              ; preds = %197
  store i64 %201, ptr %30, align 4
  %203 = load ptr, ptr %24, align 8, !tbaa !5
  %204 = getelementptr inbounds %"struct.meshopt::GroupOrder", ptr %30, i32 0, i32 0
  %205 = load i32, ptr %204, align 4, !tbaa !20
  %206 = zext i32 %205 to i64
  %207 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %203, i64 %206
  %208 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %207, i32 0, i32 2
  %209 = load i32, ptr %208, align 4, !tbaa !18
  %210 = icmp eq i32 %209, 0
  br i1 %210, label %211, label %216

211:                                              ; preds = %202
  store i32 8, ptr %31, align 4
  br label %430, !llvm.loop !25

212:                                              ; preds = %197
  %213 = landingpad { ptr, i32 }
          cleanup
  %214 = extractvalue { ptr, i32 } %213, 0
  store ptr %214, ptr %18, align 8
  %215 = extractvalue { ptr, i32 } %213, 1
  store i32 %215, ptr %19, align 4
  br label %434

216:                                              ; preds = %202
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #7
  %217 = getelementptr inbounds %"struct.meshopt::GroupOrder", ptr %30, i32 0, i32 0
  %218 = load i32, ptr %217, align 4, !tbaa !20
  store i32 %218, ptr %32, align 4, !tbaa !11
  br label %219

219:                                              ; preds = %242, %216
  %220 = load i32, ptr %32, align 4, !tbaa !11
  %221 = icmp sge i32 %220, 0
  br i1 %221, label %223, label %222

222:                                              ; preds = %219
  store i32 10, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  br label %249

223:                                              ; preds = %219
  %224 = load ptr, ptr %24, align 8, !tbaa !5
  %225 = load i32, ptr %32, align 4, !tbaa !11
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %224, i64 %226
  %228 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %227, i32 0, i32 0
  %229 = load i32, ptr %228, align 4, !tbaa !15
  %230 = getelementptr inbounds %"struct.meshopt::GroupOrder", ptr %30, i32 0, i32 0
  %231 = load i32, ptr %230, align 4, !tbaa !20
  %232 = icmp eq i32 %229, %231
  br i1 %232, label %233, label %234

233:                                              ; preds = %223
  br label %236

234:                                              ; preds = %223
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 371, ptr noundef @__PRETTY_FUNCTION__.meshopt_partitionClusters) #6
  unreachable

235:                                              ; No predecessors!
  br label %236

236:                                              ; preds = %235, %233
  %237 = load ptr, ptr %24, align 8, !tbaa !5
  %238 = load i32, ptr %32, align 4, !tbaa !11
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %237, i64 %239
  %241 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %240, i32 0, i32 0
  store i32 -1, ptr %241, align 4, !tbaa !15
  br label %242

242:                                              ; preds = %236
  %243 = load ptr, ptr %24, align 8, !tbaa !5
  %244 = load i32, ptr %32, align 4, !tbaa !11
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %243, i64 %245
  %247 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %246, i32 0, i32 1
  %248 = load i32, ptr %247, align 4, !tbaa !17
  store i32 %248, ptr %32, align 4, !tbaa !11
  br label %219, !llvm.loop !26

249:                                              ; preds = %222
  %250 = load ptr, ptr %24, align 8, !tbaa !5
  %251 = getelementptr inbounds %"struct.meshopt::GroupOrder", ptr %30, i32 0, i32 0
  %252 = load i32, ptr %251, align 4, !tbaa !20
  %253 = zext i32 %252 to i64
  %254 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %250, i64 %253
  %255 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %254, i32 0, i32 2
  %256 = load i32, ptr %255, align 4, !tbaa !18
  %257 = zext i32 %256 to i64
  %258 = load i64, ptr %14, align 8, !tbaa !9
  %259 = icmp uge i64 %257, %258
  br i1 %259, label %260, label %261

260:                                              ; preds = %249
  store i32 8, ptr %31, align 4
  br label %430, !llvm.loop !25

261:                                              ; preds = %249
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #7
  %262 = load ptr, ptr %24, align 8, !tbaa !5
  %263 = getelementptr inbounds %"struct.meshopt::GroupOrder", ptr %30, i32 0, i32 0
  %264 = load i32, ptr %263, align 4, !tbaa !20
  %265 = load i64, ptr %15, align 8, !tbaa !9
  %266 = invoke noundef i32 @_ZN7meshoptL16pickGroupToMergeEPKNS_12ClusterGroupEiRKNS_16ClusterAdjacencyEm(ptr noundef %262, i32 noundef %264, ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %265)
          to label %267 unwind label %271

267:                                              ; preds = %261
  store i32 %266, ptr %33, align 4, !tbaa !11
  %268 = load i32, ptr %33, align 4, !tbaa !11
  %269 = icmp eq i32 %268, -1
  br i1 %269, label %270, label %275

270:                                              ; preds = %267
  store i32 8, ptr %31, align 4
  br label %429, !llvm.loop !25

271:                                              ; preds = %261
  %272 = landingpad { ptr, i32 }
          cleanup
  %273 = extractvalue { ptr, i32 } %272, 0
  store ptr %273, ptr %18, align 8
  %274 = extractvalue { ptr, i32 } %272, 1
  store i32 %274, ptr %19, align 4
  br label %433

275:                                              ; preds = %267
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #7
  %276 = load ptr, ptr %24, align 8, !tbaa !5
  %277 = getelementptr inbounds %"struct.meshopt::GroupOrder", ptr %30, i32 0, i32 0
  %278 = load i32, ptr %277, align 4, !tbaa !20
  %279 = load i32, ptr %33, align 4, !tbaa !11
  %280 = invoke noundef i32 @_ZN7meshoptL11countSharedEPKNS_12ClusterGroupEiiRKNS_16ClusterAdjacencyE(ptr noundef %276, i32 noundef %278, i32 noundef %279, ptr noundef nonnull align 8 dereferenceable(24) %23)
          to label %281 unwind label %291

281:                                              ; preds = %275
  store i32 %280, ptr %34, align 4, !tbaa !11
  %282 = load ptr, ptr %24, align 8, !tbaa !5
  %283 = load i32, ptr %33, align 4, !tbaa !11
  %284 = sext i32 %283 to i64
  %285 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %282, i64 %284
  %286 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %285, i32 0, i32 2
  %287 = load i32, ptr %286, align 4, !tbaa !18
  %288 = icmp ugt i32 %287, 0
  br i1 %288, label %289, label %290

289:                                              ; preds = %281
  br label %296

290:                                              ; preds = %281
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 389, ptr noundef @__PRETTY_FUNCTION__.meshopt_partitionClusters) #6
  unreachable

291:                                              ; preds = %415, %275
  %292 = landingpad { ptr, i32 }
          cleanup
  %293 = extractvalue { ptr, i32 } %292, 0
  store ptr %293, ptr %18, align 8
  %294 = extractvalue { ptr, i32 } %292, 1
  store i32 %294, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #7
  br label %433

295:                                              ; No predecessors!
  br label %296

296:                                              ; preds = %295, %289
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #7
  %297 = getelementptr inbounds %"struct.meshopt::GroupOrder", ptr %30, i32 0, i32 0
  %298 = load i32, ptr %297, align 4, !tbaa !20
  store i32 %298, ptr %35, align 4, !tbaa !11
  br label %299

299:                                              ; preds = %319, %296
  %300 = load i32, ptr %35, align 4, !tbaa !11
  %301 = icmp sge i32 %300, 0
  br i1 %301, label %303, label %302

302:                                              ; preds = %299
  store i32 13, ptr %31, align 4
  br label %326

303:                                              ; preds = %299
  %304 = load ptr, ptr %24, align 8, !tbaa !5
  %305 = load i32, ptr %35, align 4, !tbaa !11
  %306 = sext i32 %305 to i64
  %307 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %304, i64 %306
  %308 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %307, i32 0, i32 1
  %309 = load i32, ptr %308, align 4, !tbaa !17
  %310 = icmp slt i32 %309, 0
  br i1 %310, label %311, label %318

311:                                              ; preds = %303
  %312 = load i32, ptr %33, align 4, !tbaa !11
  %313 = load ptr, ptr %24, align 8, !tbaa !5
  %314 = load i32, ptr %35, align 4, !tbaa !11
  %315 = sext i32 %314 to i64
  %316 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %313, i64 %315
  %317 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %316, i32 0, i32 1
  store i32 %312, ptr %317, align 4, !tbaa !17
  store i32 13, ptr %31, align 4
  br label %326

318:                                              ; preds = %303
  br label %319

319:                                              ; preds = %318
  %320 = load ptr, ptr %24, align 8, !tbaa !5
  %321 = load i32, ptr %35, align 4, !tbaa !11
  %322 = sext i32 %321 to i64
  %323 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %320, i64 %322
  %324 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %323, i32 0, i32 1
  %325 = load i32, ptr %324, align 4, !tbaa !17
  store i32 %325, ptr %35, align 4, !tbaa !11
  br label %299, !llvm.loop !27

326:                                              ; preds = %311, %302
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #7
  br label %327

327:                                              ; preds = %326
  %328 = load ptr, ptr %24, align 8, !tbaa !5
  %329 = load i32, ptr %33, align 4, !tbaa !11
  %330 = sext i32 %329 to i64
  %331 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %328, i64 %330
  %332 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %331, i32 0, i32 2
  %333 = load i32, ptr %332, align 4, !tbaa !18
  %334 = load ptr, ptr %24, align 8, !tbaa !5
  %335 = getelementptr inbounds %"struct.meshopt::GroupOrder", ptr %30, i32 0, i32 0
  %336 = load i32, ptr %335, align 4, !tbaa !20
  %337 = zext i32 %336 to i64
  %338 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %334, i64 %337
  %339 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %338, i32 0, i32 2
  %340 = load i32, ptr %339, align 4, !tbaa !18
  %341 = add i32 %340, %333
  store i32 %341, ptr %339, align 4, !tbaa !18
  %342 = load ptr, ptr %24, align 8, !tbaa !5
  %343 = load i32, ptr %33, align 4, !tbaa !11
  %344 = sext i32 %343 to i64
  %345 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %342, i64 %344
  %346 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %345, i32 0, i32 3
  %347 = load i32, ptr %346, align 4, !tbaa !19
  %348 = load ptr, ptr %24, align 8, !tbaa !5
  %349 = getelementptr inbounds %"struct.meshopt::GroupOrder", ptr %30, i32 0, i32 0
  %350 = load i32, ptr %349, align 4, !tbaa !20
  %351 = zext i32 %350 to i64
  %352 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %348, i64 %351
  %353 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %352, i32 0, i32 3
  %354 = load i32, ptr %353, align 4, !tbaa !19
  %355 = add i32 %354, %347
  store i32 %355, ptr %353, align 4, !tbaa !19
  %356 = load ptr, ptr %24, align 8, !tbaa !5
  %357 = getelementptr inbounds %"struct.meshopt::GroupOrder", ptr %30, i32 0, i32 0
  %358 = load i32, ptr %357, align 4, !tbaa !20
  %359 = zext i32 %358 to i64
  %360 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %356, i64 %359
  %361 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %360, i32 0, i32 3
  %362 = load i32, ptr %361, align 4, !tbaa !19
  %363 = load i32, ptr %34, align 4, !tbaa !11
  %364 = icmp ugt i32 %362, %363
  br i1 %364, label %365, label %375

365:                                              ; preds = %327
  %366 = load ptr, ptr %24, align 8, !tbaa !5
  %367 = getelementptr inbounds %"struct.meshopt::GroupOrder", ptr %30, i32 0, i32 0
  %368 = load i32, ptr %367, align 4, !tbaa !20
  %369 = zext i32 %368 to i64
  %370 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %366, i64 %369
  %371 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %370, i32 0, i32 3
  %372 = load i32, ptr %371, align 4, !tbaa !19
  %373 = load i32, ptr %34, align 4, !tbaa !11
  %374 = sub i32 %372, %373
  br label %376

375:                                              ; preds = %327
  br label %376

376:                                              ; preds = %375, %365
  %377 = phi i32 [ %374, %365 ], [ 1, %375 ]
  %378 = load ptr, ptr %24, align 8, !tbaa !5
  %379 = getelementptr inbounds %"struct.meshopt::GroupOrder", ptr %30, i32 0, i32 0
  %380 = load i32, ptr %379, align 4, !tbaa !20
  %381 = zext i32 %380 to i64
  %382 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %378, i64 %381
  %383 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %382, i32 0, i32 3
  store i32 %377, ptr %383, align 4, !tbaa !19
  %384 = load ptr, ptr %24, align 8, !tbaa !5
  %385 = load i32, ptr %33, align 4, !tbaa !11
  %386 = sext i32 %385 to i64
  %387 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %384, i64 %386
  %388 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %387, i32 0, i32 2
  store i32 0, ptr %388, align 4, !tbaa !18
  %389 = load ptr, ptr %24, align 8, !tbaa !5
  %390 = load i32, ptr %33, align 4, !tbaa !11
  %391 = sext i32 %390 to i64
  %392 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %389, i64 %391
  %393 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %392, i32 0, i32 3
  store i32 0, ptr %393, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #7
  %394 = getelementptr inbounds %"struct.meshopt::GroupOrder", ptr %30, i32 0, i32 0
  %395 = load i32, ptr %394, align 4, !tbaa !20
  store i32 %395, ptr %36, align 4, !tbaa !11
  br label %396

396:                                              ; preds = %408, %376
  %397 = load i32, ptr %36, align 4, !tbaa !11
  %398 = icmp sge i32 %397, 0
  br i1 %398, label %400, label %399

399:                                              ; preds = %396
  store i32 16, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #7
  br label %415

400:                                              ; preds = %396
  %401 = getelementptr inbounds %"struct.meshopt::GroupOrder", ptr %30, i32 0, i32 0
  %402 = load i32, ptr %401, align 4, !tbaa !20
  %403 = load ptr, ptr %24, align 8, !tbaa !5
  %404 = load i32, ptr %36, align 4, !tbaa !11
  %405 = sext i32 %404 to i64
  %406 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %403, i64 %405
  %407 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %406, i32 0, i32 0
  store i32 %402, ptr %407, align 4, !tbaa !15
  br label %408

408:                                              ; preds = %400
  %409 = load ptr, ptr %24, align 8, !tbaa !5
  %410 = load i32, ptr %36, align 4, !tbaa !11
  %411 = sext i32 %410 to i64
  %412 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %409, i64 %411
  %413 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %412, i32 0, i32 1
  %414 = load i32, ptr %413, align 4, !tbaa !17
  store i32 %414, ptr %36, align 4, !tbaa !11
  br label %396, !llvm.loop !28

415:                                              ; preds = %399
  %416 = load ptr, ptr %24, align 8, !tbaa !5
  %417 = getelementptr inbounds %"struct.meshopt::GroupOrder", ptr %30, i32 0, i32 0
  %418 = load i32, ptr %417, align 4, !tbaa !20
  %419 = zext i32 %418 to i64
  %420 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %416, i64 %419
  %421 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %420, i32 0, i32 3
  %422 = load i32, ptr %421, align 4, !tbaa !19
  %423 = getelementptr inbounds %"struct.meshopt::GroupOrder", ptr %30, i32 0, i32 1
  store i32 %422, ptr %423, align 4, !tbaa !22
  %424 = load ptr, ptr %25, align 8, !tbaa !5
  %425 = load i64, ptr %26, align 8, !tbaa !9
  %426 = add i64 %425, 1
  store i64 %426, ptr %26, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %37, ptr align 4 %30, i64 8, i1 false), !tbaa.struct !23
  %427 = load i64, ptr %37, align 4
  invoke void @_ZN7meshoptL8heapPushEPNS_10GroupOrderEmS0_(ptr noundef %424, i64 noundef %425, i64 %427)
          to label %428 unwind label %291

428:                                              ; preds = %415
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #7
  store i32 0, ptr %31, align 4
  br label %429

429:                                              ; preds = %428, %270
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #7
  br label %430

430:                                              ; preds = %429, %260, %211
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  %431 = load i32, ptr %31, align 4
  switch i32 %431, label %496 [
    i32 0, label %432
    i32 8, label %194
  ]

432:                                              ; preds = %430
  br label %194, !llvm.loop !25

433:                                              ; preds = %291, %271
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #7
  br label %434

434:                                              ; preds = %433, %212
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  br label %485

435:                                              ; preds = %194
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #7
  store i64 0, ptr %38, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #7
  store i64 0, ptr %39, align 8, !tbaa !9
  br label %436

436:                                              ; preds = %473, %435
  %437 = load i64, ptr %39, align 8, !tbaa !9
  %438 = load i64, ptr %12, align 8, !tbaa !9
  %439 = icmp ult i64 %437, %438
  br i1 %439, label %441, label %440

440:                                              ; preds = %436
  store i32 19, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #7
  br label %476

441:                                              ; preds = %436
  %442 = load ptr, ptr %24, align 8, !tbaa !5
  %443 = load i64, ptr %39, align 8, !tbaa !9
  %444 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %442, i64 %443
  %445 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %444, i32 0, i32 2
  %446 = load i32, ptr %445, align 4, !tbaa !18
  %447 = icmp eq i32 %446, 0
  br i1 %447, label %448, label %449

448:                                              ; preds = %441
  br label %473

449:                                              ; preds = %441
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #7
  %450 = load i64, ptr %39, align 8, !tbaa !9
  %451 = trunc i64 %450 to i32
  store i32 %451, ptr %40, align 4, !tbaa !11
  br label %452

452:                                              ; preds = %463, %449
  %453 = load i32, ptr %40, align 4, !tbaa !11
  %454 = icmp sge i32 %453, 0
  br i1 %454, label %456, label %455

455:                                              ; preds = %452
  store i32 22, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #7
  br label %470

456:                                              ; preds = %452
  %457 = load i64, ptr %38, align 8, !tbaa !9
  %458 = trunc i64 %457 to i32
  %459 = load ptr, ptr %8, align 8, !tbaa !5
  %460 = load i32, ptr %40, align 4, !tbaa !11
  %461 = sext i32 %460 to i64
  %462 = getelementptr inbounds i32, ptr %459, i64 %461
  store i32 %458, ptr %462, align 4, !tbaa !11
  br label %463

463:                                              ; preds = %456
  %464 = load ptr, ptr %24, align 8, !tbaa !5
  %465 = load i32, ptr %40, align 4, !tbaa !11
  %466 = sext i32 %465 to i64
  %467 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %464, i64 %466
  %468 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %467, i32 0, i32 1
  %469 = load i32, ptr %468, align 4, !tbaa !17
  store i32 %469, ptr %40, align 4, !tbaa !11
  br label %452, !llvm.loop !29

470:                                              ; preds = %455
  %471 = load i64, ptr %38, align 8, !tbaa !9
  %472 = add i64 %471, 1
  store i64 %472, ptr %38, align 8, !tbaa !9
  br label %473

473:                                              ; preds = %470, %448
  %474 = load i64, ptr %39, align 8, !tbaa !9
  %475 = add i64 %474, 1
  store i64 %475, ptr %39, align 8, !tbaa !9
  br label %436, !llvm.loop !30

476:                                              ; preds = %440
  %477 = load i64, ptr %38, align 8, !tbaa !9
  %478 = load i64, ptr %12, align 8, !tbaa !9
  %479 = icmp ule i64 %477, %478
  br i1 %479, label %480, label %481

480:                                              ; preds = %476
  br label %483

481:                                              ; preds = %476
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 427, ptr noundef @__PRETTY_FUNCTION__.meshopt_partitionClusters) #6
  unreachable

482:                                              ; No predecessors!
  br label %483

483:                                              ; preds = %482, %480
  %484 = load i64, ptr %38, align 8, !tbaa !9
  store i32 1, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @_ZN17meshopt_AllocatorD2Ev(ptr noundef nonnull align 8 dereferenceable(200) %16) #7
  call void @llvm.lifetime.end.p0(i64 200, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  ret i64 %484

485:                                              ; preds = %434, %192
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  br label %486

486:                                              ; preds = %485, %136
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  br label %487

487:                                              ; preds = %486, %132
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br label %488

488:                                              ; preds = %487, %128
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %489

489:                                              ; preds = %488, %70
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %490

490:                                              ; preds = %489, %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @_ZN17meshopt_AllocatorD2Ev(ptr noundef nonnull align 8 dereferenceable(200) %16) #7
  call void @llvm.lifetime.end.p0(i64 200, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %491

491:                                              ; preds = %490
  %492 = load ptr, ptr %18, align 8
  %493 = load i32, ptr %19, align 4
  %494 = insertvalue { ptr, i32 } poison, ptr %492, 0
  %495 = insertvalue { ptr, i32 } %494, i32 %493, 1
  resume { ptr, i32 } %495

496:                                              ; preds = %430
  unreachable
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN17meshopt_Allocator8allocateIhEEPT_m(ptr noundef nonnull align 8 dereferenceable(200), i64 noundef) #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN17meshopt_Allocator8allocateIjEEPT_m(ptr noundef nonnull align 8 dereferenceable(200), i64 noundef) #0 align 2

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN7meshoptL21buildClusterAdjacencyERNS_16ClusterAdjacencyEPKjS3_mPhmR17meshopt_Allocator(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(200)) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN17meshopt_Allocator8allocateIN7meshopt12ClusterGroupEEEPT_m(ptr noundef nonnull align 8 dereferenceable(200), i64 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN17meshopt_Allocator8allocateIN7meshopt10GroupOrderEEEPT_m(ptr noundef nonnull align 8 dereferenceable(200), i64 noundef) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN7meshoptL10countTotalEPKNS_12ClusterGroupEiPKjS4_Ph(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN7meshoptL8heapPushEPNS_10GroupOrderEmS0_(ptr noundef, i64 noundef, i64) #3

; 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: mustprogress nounwind uwtable
declare hidden i64 @_ZN7meshoptL7heapPopEPNS_10GroupOrderEm(ptr noundef, i64 noundef) #3

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZN7meshoptL16pickGroupToMergeEPKNS_12ClusterGroupEiRKNS_16ClusterAdjacencyEm(ptr noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN7meshoptL11countSharedEPKNS_12ClusterGroupEiiRKNS_16ClusterAdjacencyE(ptr noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(24)) #3

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

attributes #0 = { 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 #1 = { noreturn nounwind "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { noreturn nounwind }
attributes #7 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !12, i64 0}
!16 = !{!"_ZTSN7meshopt12ClusterGroupE", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12}
!17 = !{!16, !12, i64 4}
!18 = !{!16, !12, i64 8}
!19 = !{!16, !12, i64 12}
!20 = !{!21, !12, i64 0}
!21 = !{!"_ZTSN7meshopt10GroupOrderE", !12, i64 0, !12, i64 4}
!22 = !{!21, !12, i64 4}
!23 = !{i64 0, i64 4, !11, i64 4, i64 4, !11}
!24 = distinct !{!24, !14}
!25 = distinct !{!25, !14}
!26 = distinct !{!26, !14}
!27 = distinct !{!27, !14}
!28 = distinct !{!28, !14}
!29 = distinct !{!29, !14}
!30 = distinct !{!30, !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.meshopt_Allocator = type { [24 x ptr], i64 }
%"struct.meshopt::ClusterAdjacency" = type { ptr, ptr, ptr }
%"struct.meshopt::ClusterGroup" = type { i32, i32, i32, i32 }

@.str = external hidden unnamed_addr constant [26 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [70 x i8], align 1
@__PRETTY_FUNCTION__.meshopt_partitionClusters = external hidden unnamed_addr constant [125 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [28 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local i64 @meshopt_partitionClusters(ptr nocapture noundef writeonly %0, ptr noundef %1, i64 noundef %2, ptr nocapture noundef readonly %3, i64 noundef %4, i64 noundef %5, i64 noundef %6) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %8 = alloca %class.meshopt_Allocator, align 8
  %9 = alloca %"struct.meshopt::ClusterAdjacency", align 8
  %.not = icmp eq i64 %6, 0
  br i1 %.not, label %10, label %11

10:                                               ; preds = %7
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 311, ptr noundef nonnull @__PRETTY_FUNCTION__.meshopt_partitionClusters) #5
  unreachable

11:                                               ; preds = %7
  %12 = mul i64 %6, 3
  %13 = lshr i64 %12, 3
  %14 = add i64 %13, %6
  call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %8) #6
  call void @_ZN17meshopt_AllocatorC2Ev(ptr noundef nonnull align 8 dereferenceable(200) %8)
  %15 = invoke noundef ptr @_ZN17meshopt_Allocator8allocateIhEEPT_m(ptr noundef nonnull align 8 dereferenceable(200) %8, i64 noundef %5)
          to label %16 unwind label %21

16:                                               ; preds = %11
  call void @llvm.memset.p0.i64(ptr align 1 %15, i8 0, i64 %5, i1 false)
  %17 = add i64 %4, 1
  %18 = invoke noundef ptr @_ZN17meshopt_Allocator8allocateIjEEPT_m(ptr noundef nonnull align 8 dereferenceable(200) %8, i64 noundef %17)
          to label %.preheader177 unwind label %23

.preheader177:                                    ; preds = %16
  %.not204 = icmp eq i64 %4, 0
  br i1 %.not204, label %._crit_edge, label %.lr.ph

._crit_edge.loopexit:                             ; preds = %28
  %19 = zext i32 %31 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader177
  %.0148.lcssa = phi i64 [ 0, %.preheader177 ], [ %19, %._crit_edge.loopexit ]
  %20 = icmp eq i64 %.0148.lcssa, %2
  br i1 %20, label %34, label %33

21:                                               ; preds = %11
  %22 = landingpad { ptr, i32 }
          cleanup
  br label %126

23:                                               ; preds = %16
  %24 = landingpad { ptr, i32 }
          cleanup
  br label %126

.lr.ph:                                           ; preds = %.preheader177, %28
  %.0148180 = phi i32 [ %31, %28 ], [ 0, %.preheader177 ]
  %.0150179 = phi i64 [ %32, %28 ], [ 0, %.preheader177 ]
  %25 = getelementptr inbounds i32, ptr %3, i64 %.0150179
  %26 = load i32, ptr %25, align 4, !tbaa !5
  %.not172 = icmp eq i32 %26, 0
  br i1 %.not172, label %27, label %28

27:                                               ; preds = %.lr.ph
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 326, ptr noundef nonnull @__PRETTY_FUNCTION__.meshopt_partitionClusters) #5
  unreachable

28:                                               ; preds = %.lr.ph
  %29 = getelementptr inbounds i32, ptr %18, i64 %.0150179
  store i32 %.0148180, ptr %29, align 4, !tbaa !5
  %30 = load i32, ptr %25, align 4, !tbaa !5
  %31 = add i32 %30, %.0148180
  %32 = add nuw i64 %.0150179, 1
  %exitcond.not = icmp eq i64 %32, %4
  br i1 %exitcond.not, label %._crit_edge.loopexit, label %.lr.ph, !llvm.loop !9

33:                                               ; preds = %._crit_edge
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 332, ptr noundef nonnull @__PRETTY_FUNCTION__.meshopt_partitionClusters) #5
  unreachable

34:                                               ; preds = %._crit_edge
  %35 = trunc nuw i64 %2 to i32
  %36 = getelementptr inbounds i32, ptr %18, i64 %4
  store i32 %35, ptr %36, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %9, i8 0, i64 24, i1 false)
  invoke void @_ZN7meshoptL21buildClusterAdjacencyERNS_16ClusterAdjacencyEPKjS3_mPhmR17meshopt_Allocator(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef %1, ptr noundef nonnull %18, i64 noundef %4, ptr noundef %15, i64 noundef %5, ptr noundef nonnull align 8 dereferenceable(200) %8)
          to label %37 unwind label %41

37:                                               ; preds = %34
  %38 = invoke noundef ptr @_ZN17meshopt_Allocator8allocateIN7meshopt12ClusterGroupEEEPT_m(ptr noundef nonnull align 8 dereferenceable(200) %8, i64 noundef %4)
          to label %39 unwind label %43

39:                                               ; preds = %37
  %40 = invoke noundef ptr @_ZN17meshopt_Allocator8allocateIN7meshopt10GroupOrderEEEPT_m(ptr noundef nonnull align 8 dereferenceable(200) %8, i64 noundef %4)
          to label %.preheader176 unwind label %45

.preheader176:                                    ; preds = %39
  br i1 %.not204, label %._crit_edge202.thread, label %.lr.ph183

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

43:                                               ; preds = %37
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %125

45:                                               ; preds = %39
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %125

.lr.ph183:                                        ; preds = %.preheader176, %.lr.ph183
  %.0151182 = phi i64 [ %53, %.lr.ph183 ], [ 0, %.preheader176 ]
  %47 = trunc i64 %.0151182 to i32
  %48 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %38, i64 %.0151182
  store i32 %47, ptr %48, align 4, !tbaa !11
  %49 = getelementptr inbounds i8, ptr %48, i64 4
  store i32 -1, ptr %49, align 4, !tbaa !13
  %50 = getelementptr inbounds i8, ptr %48, i64 8
  store i32 1, ptr %50, align 4, !tbaa !14
  %51 = call noundef i32 @_ZN7meshoptL10countTotalEPKNS_12ClusterGroupEiPKjS4_Ph(ptr noundef %38, i32 noundef %47, ptr noundef %1, ptr noundef %18, ptr noundef %15)
  %52 = getelementptr inbounds i8, ptr %48, i64 12
  store i32 %51, ptr %52, align 4, !tbaa !15
  %53 = add nuw i64 %.0151182, 1
  %.sroa.5.0.insert.ext = zext i32 %51 to i64
  %.sroa.5.0.insert.shift = shl nuw i64 %.sroa.5.0.insert.ext, 32
  %.sroa.048.0.insert.ext = and i64 %.0151182, 4294967295
  %.sroa.048.0.insert.insert = or disjoint i64 %.sroa.5.0.insert.shift, %.sroa.048.0.insert.ext
  call void @_ZN7meshoptL8heapPushEPNS_10GroupOrderEmS0_(ptr noundef %40, i64 noundef %.0151182, i64 %.sroa.048.0.insert.insert)
  %exitcond209.not = icmp eq i64 %53, %4
  br i1 %exitcond209.not, label %.lr.ph194, label %.lr.ph183, !llvm.loop !16

.preheader:                                       ; preds = %107
  br i1 %.not204, label %._crit_edge202.thread, label %.lr.ph201

.lr.ph194:                                        ; preds = %.lr.ph183, %107
  %.1152193 = phi i64 [ %.3154, %107 ], [ %4, %.lr.ph183 ]
  %54 = add i64 %.1152193, -1
  %55 = call i64 @_ZN7meshoptL7heapPopEPNS_10GroupOrderEm(ptr noundef %40, i64 noundef %.1152193)
  %.sroa.032.0.extract.trunc = trunc i64 %55 to i32
  %56 = and i64 %55, 4294967295
  %57 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %38, i64 %56
  %58 = getelementptr inbounds i8, ptr %57, i64 8
  %59 = load i32, ptr %58, align 4, !tbaa !14
  %60 = icmp eq i32 %59, 0
  br i1 %60, label %107, label %.preheader174, !llvm.loop !17

.preheader174:                                    ; preds = %.lr.ph194
  %61 = icmp sgt i32 %.sroa.032.0.extract.trunc, -1
  br i1 %61, label %.lr.ph186, label %._crit_edge187

._crit_edge187:                                   ; preds = %68, %.preheader174
  %62 = zext i32 %59 to i64
  %.not165 = icmp ult i64 %62, %6
  br i1 %.not165, label %72, label %107, !llvm.loop !17

.lr.ph186:                                        ; preds = %.preheader174, %68
  %.0149185 = phi i32 [ %70, %68 ], [ %.sroa.032.0.extract.trunc, %.preheader174 ]
  %63 = zext nneg i32 %.0149185 to i64
  %64 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %38, i64 %63
  %65 = load i32, ptr %64, align 4, !tbaa !11
  %66 = icmp eq i32 %65, %.sroa.032.0.extract.trunc
  br i1 %66, label %68, label %67

67:                                               ; preds = %.lr.ph186
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 371, ptr noundef nonnull @__PRETTY_FUNCTION__.meshopt_partitionClusters) #5
  unreachable

68:                                               ; preds = %.lr.ph186
  store i32 -1, ptr %64, align 4, !tbaa !11
  %69 = getelementptr inbounds i8, ptr %64, i64 4
  %70 = load i32, ptr %69, align 4, !tbaa !13
  %71 = icmp sgt i32 %70, -1
  br i1 %71, label %.lr.ph186, label %._crit_edge187, !llvm.loop !18

72:                                               ; preds = %._crit_edge187
  %73 = invoke noundef i32 @_ZN7meshoptL16pickGroupToMergeEPKNS_12ClusterGroupEiRKNS_16ClusterAdjacencyEm(ptr noundef nonnull %38, i32 noundef %.sroa.032.0.extract.trunc, ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %14)
          to label %74 unwind label %76

74:                                               ; preds = %72
  %75 = icmp eq i32 %73, -1
  br i1 %75, label %107, label %78, !llvm.loop !17

76:                                               ; preds = %72
  %77 = landingpad { ptr, i32 }
          cleanup
  br label %125

78:                                               ; preds = %74
  %79 = call noundef i32 @_ZN7meshoptL11countSharedEPKNS_12ClusterGroupEiiRKNS_16ClusterAdjacencyE(ptr noundef nonnull %38, i32 noundef %.sroa.032.0.extract.trunc, i32 noundef %73, ptr noundef nonnull align 8 dereferenceable(24) %9)
  %80 = sext i32 %73 to i64
  %81 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %38, i64 %80
  %82 = getelementptr inbounds i8, ptr %81, i64 8
  %83 = load i32, ptr %82, align 4, !tbaa !14
  %.not171 = icmp eq i32 %83, 0
  br i1 %.not171, label %84, label %.preheader173

84:                                               ; preds = %78
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 389, ptr noundef nonnull @__PRETTY_FUNCTION__.meshopt_partitionClusters) #5
  unreachable

.preheader173:                                    ; preds = %78, %86
  %.0142 = phi i32 [ %89, %86 ], [ %.sroa.032.0.extract.trunc, %78 ]
  %85 = icmp sgt i32 %.0142, -1
  br i1 %85, label %86, label %.loopexit

86:                                               ; preds = %.preheader173
  %87 = zext nneg i32 %.0142 to i64
  %88 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %38, i64 %87, i32 1
  %89 = load i32, ptr %88, align 4, !tbaa !13
  %90 = icmp slt i32 %89, 0
  br i1 %90, label %91, label %.preheader173, !llvm.loop !19

91:                                               ; preds = %86
  store i32 %73, ptr %88, align 4, !tbaa !13
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader173, %91
  %92 = load i32, ptr %58, align 4, !tbaa !14
  %93 = add i32 %92, %83
  store i32 %93, ptr %58, align 4, !tbaa !14
  %94 = getelementptr inbounds i8, ptr %81, i64 12
  %95 = load i32, ptr %94, align 4, !tbaa !15
  %96 = getelementptr inbounds i8, ptr %57, i64 12
  %97 = load i32, ptr %96, align 4, !tbaa !15
  %98 = add i32 %97, %95
  %99 = icmp ugt i32 %98, %79
  %100 = sub i32 %98, %79
  %spec.select = select i1 %99, i32 %100, i32 1
  store i32 %spec.select, ptr %96, align 4, !tbaa !15
  store i32 0, ptr %82, align 4, !tbaa !14
  store i32 0, ptr %94, align 4, !tbaa !15
  br i1 %61, label %.lr.ph190, label %._crit_edge191

._crit_edge191:                                   ; preds = %.lr.ph190, %.loopexit
  %101 = load i32, ptr %96, align 4, !tbaa !15
  %.sroa.20.0.insert.ext = zext i32 %101 to i64
  %.sroa.20.0.insert.shift = shl nuw i64 %.sroa.20.0.insert.ext, 32
  %.sroa.032.0.insert.insert = or disjoint i64 %.sroa.20.0.insert.shift, %56
  call void @_ZN7meshoptL8heapPushEPNS_10GroupOrderEmS0_(ptr noundef %40, i64 noundef %54, i64 %.sroa.032.0.insert.insert)
  br label %107

.lr.ph190:                                        ; preds = %.loopexit, %.lr.ph190
  %.0141188 = phi i32 [ %105, %.lr.ph190 ], [ %.sroa.032.0.extract.trunc, %.loopexit ]
  %102 = zext nneg i32 %.0141188 to i64
  %103 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %38, i64 %102
  store i32 %.sroa.032.0.extract.trunc, ptr %103, align 4, !tbaa !11
  %104 = getelementptr inbounds i8, ptr %103, i64 4
  %105 = load i32, ptr %104, align 4, !tbaa !13
  %106 = icmp sgt i32 %105, -1
  br i1 %106, label %.lr.ph190, label %._crit_edge191, !llvm.loop !20

107:                                              ; preds = %._crit_edge191, %74, %._crit_edge187, %.lr.ph194
  %.3154 = phi i64 [ %54, %.lr.ph194 ], [ %54, %._crit_edge187 ], [ %.1152193, %._crit_edge191 ], [ %54, %74 ]
  %.not163 = icmp eq i64 %.3154, 0
  br i1 %.not163, label %.preheader, label %.lr.ph194

._crit_edge202:                                   ; preds = %122
  %.not164 = icmp ugt i64 %.1, %4
  br i1 %.not164, label %124, label %._crit_edge202.thread

.lr.ph201:                                        ; preds = %.preheader, %122
  %.0137200 = phi i64 [ %123, %122 ], [ 0, %.preheader ]
  %.0138199 = phi i64 [ %.1, %122 ], [ 0, %.preheader ]
  %108 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %38, i64 %.0137200, i32 2
  %109 = load i32, ptr %108, align 4, !tbaa !14
  %110 = icmp eq i32 %109, 0
  br i1 %110, label %122, label %111

111:                                              ; preds = %.lr.ph201
  %112 = trunc i64 %.0137200 to i32
  %113 = icmp sgt i32 %112, -1
  br i1 %113, label %.lr.ph197, label %._crit_edge198

.lr.ph197:                                        ; preds = %111
  %114 = trunc i64 %.0138199 to i32
  br label %116

._crit_edge198:                                   ; preds = %116, %111
  %115 = add i64 %.0138199, 1
  br label %122

116:                                              ; preds = %.lr.ph197, %116
  %.0195 = phi i32 [ %112, %.lr.ph197 ], [ %120, %116 ]
  %117 = zext nneg i32 %.0195 to i64
  %118 = getelementptr inbounds i32, ptr %0, i64 %117
  store i32 %114, ptr %118, align 4, !tbaa !5
  %119 = getelementptr inbounds %"struct.meshopt::ClusterGroup", ptr %38, i64 %117, i32 1
  %120 = load i32, ptr %119, align 4, !tbaa !13
  %121 = icmp sgt i32 %120, -1
  br i1 %121, label %116, label %._crit_edge198, !llvm.loop !21

122:                                              ; preds = %.lr.ph201, %._crit_edge198
  %.1 = phi i64 [ %.0138199, %.lr.ph201 ], [ %115, %._crit_edge198 ]
  %123 = add nuw i64 %.0137200, 1
  %exitcond210.not = icmp eq i64 %123, %4
  br i1 %exitcond210.not, label %._crit_edge202, label %.lr.ph201, !llvm.loop !22

124:                                              ; preds = %._crit_edge202
  call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 427, ptr noundef nonnull @__PRETTY_FUNCTION__.meshopt_partitionClusters) #5
  unreachable

._crit_edge202.thread:                            ; preds = %.preheader176, %.preheader, %._crit_edge202
  %.0138.lcssa217 = phi i64 [ %.1, %._crit_edge202 ], [ 0, %.preheader ], [ 0, %.preheader176 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #6
  call void @_ZN17meshopt_AllocatorD2Ev(ptr noundef nonnull align 8 dereferenceable(200) %8) #6
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %8) #6
  ret i64 %.0138.lcssa217

125:                                              ; preds = %43, %76, %45, %41
  %.pn.pn.pn = phi { ptr, i32 } [ %42, %41 ], [ %44, %43 ], [ %77, %76 ], [ %46, %45 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #6
  br label %126

126:                                              ; preds = %23, %125, %21
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %22, %21 ], [ %.pn.pn.pn, %125 ], [ %24, %23 ]
  call void @_ZN17meshopt_AllocatorD2Ev(ptr noundef nonnull align 8 dereferenceable(200) %8) #6
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %8) #6
  resume { ptr, i32 } %.pn.pn.pn.pn.pn
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN17meshopt_Allocator8allocateIhEEPT_m(ptr noundef nonnull align 8 dereferenceable(200), i64 noundef) local_unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN17meshopt_Allocator8allocateIjEEPT_m(ptr noundef nonnull align 8 dereferenceable(200), i64 noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN7meshoptL21buildClusterAdjacencyERNS_16ClusterAdjacencyEPKjS3_mPhmR17meshopt_Allocator(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(200)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN17meshopt_Allocator8allocateIN7meshopt12ClusterGroupEEEPT_m(ptr noundef nonnull align 8 dereferenceable(200), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN17meshopt_Allocator8allocateIN7meshopt10GroupOrderEEEPT_m(ptr noundef nonnull align 8 dereferenceable(200), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN7meshoptL10countTotalEPKNS_12ClusterGroupEiPKjS4_Ph(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN7meshoptL8heapPushEPNS_10GroupOrderEmS0_(ptr noundef, i64 noundef, i64) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden i64 @_ZN7meshoptL7heapPopEPNS_10GroupOrderEm(ptr noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZN7meshoptL16pickGroupToMergeEPKNS_12ClusterGroupEiRKNS_16ClusterAdjacencyEm(ptr noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN7meshoptL11countSharedEPKNS_12ClusterGroupEiiRKNS_16ClusterAdjacencyE(ptr noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTSN7meshopt12ClusterGroupE", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!13 = !{!12, !6, i64 4}
!14 = !{!12, !6, i64 8}
!15 = !{!12, !6, i64 12}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}


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