; LLVM IR from siconos/siconos :: externals/lbl/metis4/kwayvolrefine.ll_ (ProjectVolKWayPartition)

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

%struct.graphdef = type { ptr, ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, ptr, ptr }
%struct.vrinfodef = type { i32, i32, i32, i32, i32, ptr }
%struct.controldef = type { i32, i32, i32, i32, i32, i32, float, i32, i32, i32, i32, %struct.workspacedef, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double }
%struct.workspacedef = type { ptr, i32, i32, ptr, ptr, i32, ptr, ptr }
%struct.vedegreedef = type { i32, i32, i32, i32 }

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

; Function Attrs: nounwind uwtable
define dso_local void @__ProjectVolKWayPartition(ptr noundef %0, ptr noundef %1, i32 noundef %2) #1 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %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 ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #4
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.graphdef, ptr %29, i32 0, i32 27
  %31 = load ptr, ptr %30, align 8, !tbaa !11
  store ptr %31, ptr %23, align 8, !tbaa !5
  %32 = load ptr, ptr %23, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.graphdef, ptr %32, i32 0, i32 14
  %34 = load ptr, ptr %33, align 8, !tbaa !13
  store ptr %34, ptr %22, align 8, !tbaa !5
  %35 = load ptr, ptr %23, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.graphdef, ptr %35, i32 0, i32 22
  %37 = load ptr, ptr %36, align 8, !tbaa !14
  store ptr %37, ptr %24, align 8, !tbaa !5
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.graphdef, ptr %38, i32 0, i32 2
  %40 = load i32, ptr %39, align 8, !tbaa !15
  store i32 %40, ptr %10, align 4, !tbaa !9
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.graphdef, ptr %41, i32 0, i32 11
  %43 = load ptr, ptr %42, align 8, !tbaa !16
  store ptr %43, ptr %20, align 8, !tbaa !5
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.graphdef, ptr %44, i32 0, i32 4
  %46 = load ptr, ptr %45, align 8, !tbaa !17
  store ptr %46, ptr %16, align 8, !tbaa !5
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.graphdef, ptr %47, i32 0, i32 7
  %49 = load ptr, ptr %48, align 8, !tbaa !18
  store ptr %49, ptr %17, align 8, !tbaa !5
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.graphdef, ptr %50, i32 0, i32 8
  %52 = load ptr, ptr %51, align 8, !tbaa !19
  store ptr %52, ptr %18, align 8, !tbaa !5
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.graphdef, ptr %53, i32 0, i32 9
  %55 = load ptr, ptr %54, align 8, !tbaa !20
  store ptr %55, ptr %19, align 8, !tbaa !5
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = load ptr, ptr %5, align 8, !tbaa !5
  %58 = load i32, ptr %6, align 4, !tbaa !9
  call void @__AllocateVolKWayPartitionMemory(ptr noundef %56, ptr noundef %57, i32 noundef %58)
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.graphdef, ptr %59, i32 0, i32 14
  %61 = load ptr, ptr %60, align 8, !tbaa !13
  store ptr %61, ptr %21, align 8, !tbaa !5
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.graphdef, ptr %62, i32 0, i32 22
  %64 = load ptr, ptr %63, align 8, !tbaa !14
  store ptr %64, ptr %25, align 8, !tbaa !5
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %65

65:                                               ; preds = %94, %3
  %66 = load i32, ptr %7, align 4, !tbaa !9
  %67 = load i32, ptr %10, align 4, !tbaa !9
  %68 = icmp slt i32 %66, %67
  br i1 %68, label %69, label %97

69:                                               ; preds = %65
  %70 = load ptr, ptr %20, align 8, !tbaa !5
  %71 = load i32, ptr %7, align 4, !tbaa !9
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds i32, ptr %70, i64 %72
  %74 = load i32, ptr %73, align 4, !tbaa !9
  store i32 %74, ptr %9, align 4, !tbaa !9
  %75 = load ptr, ptr %22, align 8, !tbaa !5
  %76 = load i32, ptr %9, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds i32, ptr %75, i64 %77
  %79 = load i32, ptr %78, align 4, !tbaa !9
  %80 = load ptr, ptr %21, align 8, !tbaa !5
  %81 = load i32, ptr %7, align 4, !tbaa !9
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds i32, ptr %80, i64 %82
  store i32 %79, ptr %83, align 4, !tbaa !9
  %84 = load ptr, ptr %24, align 8, !tbaa !5
  %85 = load i32, ptr %9, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds %struct.vrinfodef, ptr %84, i64 %86
  %88 = getelementptr inbounds %struct.vrinfodef, ptr %87, i32 0, i32 1
  %89 = load i32, ptr %88, align 4, !tbaa !21
  %90 = load ptr, ptr %20, align 8, !tbaa !5
  %91 = load i32, ptr %7, align 4, !tbaa !9
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds i32, ptr %90, i64 %92
  store i32 %89, ptr %93, align 4, !tbaa !9
  br label %94

94:                                               ; preds = %69
  %95 = load i32, ptr %7, align 4, !tbaa !9
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %7, align 4, !tbaa !9
  br label %65, !llvm.loop !23

97:                                               ; preds = %65
  %98 = load i32, ptr %6, align 4, !tbaa !9
  %99 = load ptr, ptr %4, align 8, !tbaa !5
  %100 = load i32, ptr %6, align 4, !tbaa !9
  %101 = call ptr @__idxwspacemalloc(ptr noundef %99, i32 noundef %100)
  %102 = call ptr @__idxset(i32 noundef %98, i32 noundef -1, ptr noundef %101)
  store ptr %102, ptr %28, align 8, !tbaa !5
  %103 = load ptr, ptr %4, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.controldef, ptr %103, i32 0, i32 11
  %105 = getelementptr inbounds %struct.workspacedef, ptr %104, i32 0, i32 5
  store i32 0, ptr %105, align 8, !tbaa !25
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %106

106:                                              ; preds = %332, %97
  %107 = load i32, ptr %7, align 4, !tbaa !9
  %108 = load i32, ptr %10, align 4, !tbaa !9
  %109 = icmp slt i32 %107, %108
  br i1 %109, label %110, label %335

110:                                              ; preds = %106
  %111 = load ptr, ptr %21, align 8, !tbaa !5
  %112 = load i32, ptr %7, align 4, !tbaa !9
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds i32, ptr %111, i64 %113
  %115 = load i32, ptr %114, align 4, !tbaa !9
  store i32 %115, ptr %11, align 4, !tbaa !9
  %116 = load ptr, ptr %25, align 8, !tbaa !5
  %117 = load i32, ptr %7, align 4, !tbaa !9
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds %struct.vrinfodef, ptr %116, i64 %118
  store ptr %119, ptr %26, align 8, !tbaa !5
  %120 = load ptr, ptr %26, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.vrinfodef, ptr %120, i32 0, i32 4
  store i32 0, ptr %121, align 8, !tbaa !30
  %122 = load ptr, ptr %26, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.vrinfodef, ptr %122, i32 0, i32 2
  store i32 0, ptr %123, align 8, !tbaa !31
  %124 = load ptr, ptr %26, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.vrinfodef, ptr %124, i32 0, i32 1
  store i32 0, ptr %125, align 4, !tbaa !21
  %126 = load ptr, ptr %26, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.vrinfodef, ptr %126, i32 0, i32 0
  store i32 0, ptr %127, align 8, !tbaa !32
  %128 = load ptr, ptr %26, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.vrinfodef, ptr %128, i32 0, i32 5
  store ptr null, ptr %129, align 8, !tbaa !33
  %130 = load ptr, ptr %19, align 8, !tbaa !5
  %131 = load i32, ptr %7, align 4, !tbaa !9
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds i32, ptr %130, i64 %132
  %134 = load i32, ptr %133, align 4, !tbaa !9
  %135 = load ptr, ptr %26, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.vrinfodef, ptr %135, i32 0, i32 0
  store i32 %134, ptr %136, align 8, !tbaa !32
  %137 = load ptr, ptr %16, align 8, !tbaa !5
  %138 = load i32, ptr %7, align 4, !tbaa !9
  %139 = add nsw i32 %138, 1
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds i32, ptr %137, i64 %140
  %142 = load i32, ptr %141, align 4, !tbaa !9
  %143 = load ptr, ptr %16, align 8, !tbaa !5
  %144 = load i32, ptr %7, align 4, !tbaa !9
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds i32, ptr %143, i64 %145
  %147 = load i32, ptr %146, align 4, !tbaa !9
  %148 = sub nsw i32 %142, %147
  %149 = load ptr, ptr %26, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.vrinfodef, ptr %149, i32 0, i32 2
  store i32 %148, ptr %150, align 8, !tbaa !31
  %151 = load ptr, ptr %20, align 8, !tbaa !5
  %152 = load i32, ptr %7, align 4, !tbaa !9
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds i32, ptr %151, i64 %153
  %155 = load i32, ptr %154, align 4, !tbaa !9
  %156 = icmp sgt i32 %155, 0
  br i1 %156, label %157, label %331

157:                                              ; preds = %110
  %158 = load ptr, ptr %16, align 8, !tbaa !5
  %159 = load i32, ptr %7, align 4, !tbaa !9
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds i32, ptr %158, i64 %160
  %162 = load i32, ptr %161, align 4, !tbaa !9
  store i32 %162, ptr %13, align 4, !tbaa !9
  %163 = load ptr, ptr %16, align 8, !tbaa !5
  %164 = load i32, ptr %7, align 4, !tbaa !9
  %165 = add nsw i32 %164, 1
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds i32, ptr %163, i64 %166
  %168 = load i32, ptr %167, align 4, !tbaa !9
  store i32 %168, ptr %14, align 4, !tbaa !9
  %169 = load ptr, ptr %4, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.controldef, ptr %169, i32 0, i32 11
  %171 = getelementptr inbounds %struct.workspacedef, ptr %170, i32 0, i32 4
  %172 = load ptr, ptr %171, align 8, !tbaa !34
  %173 = load ptr, ptr %4, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.controldef, ptr %173, i32 0, i32 11
  %175 = getelementptr inbounds %struct.workspacedef, ptr %174, i32 0, i32 5
  %176 = load i32, ptr %175, align 8, !tbaa !25
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds %struct.vedegreedef, ptr %172, i64 %177
  %179 = load ptr, ptr %26, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.vrinfodef, ptr %179, i32 0, i32 5
  store ptr %178, ptr %180, align 8, !tbaa !33
  store ptr %178, ptr %27, align 8, !tbaa !5
  %181 = load i32, ptr %14, align 4, !tbaa !9
  %182 = load i32, ptr %13, align 4, !tbaa !9
  %183 = sub nsw i32 %181, %182
  %184 = load ptr, ptr %4, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.controldef, ptr %184, i32 0, i32 11
  %186 = getelementptr inbounds %struct.workspacedef, ptr %185, i32 0, i32 5
  %187 = load i32, ptr %186, align 8, !tbaa !25
  %188 = add nsw i32 %187, %183
  store i32 %188, ptr %186, align 8, !tbaa !25
  store i32 0, ptr %15, align 4, !tbaa !9
  %189 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %189, ptr %8, align 4, !tbaa !9
  br label %190

190:                                              ; preds = %282, %157
  %191 = load i32, ptr %8, align 4, !tbaa !9
  %192 = load i32, ptr %14, align 4, !tbaa !9
  %193 = icmp slt i32 %191, %192
  br i1 %193, label %194, label %285

194:                                              ; preds = %190
  %195 = load ptr, ptr %21, align 8, !tbaa !5
  %196 = load ptr, ptr %17, align 8, !tbaa !5
  %197 = load i32, ptr %8, align 4, !tbaa !9
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds i32, ptr %196, i64 %198
  %200 = load i32, ptr %199, align 4, !tbaa !9
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds i32, ptr %195, i64 %201
  %203 = load i32, ptr %202, align 4, !tbaa !9
  store i32 %203, ptr %12, align 4, !tbaa !9
  %204 = load i32, ptr %11, align 4, !tbaa !9
  %205 = load i32, ptr %12, align 4, !tbaa !9
  %206 = icmp ne i32 %204, %205
  br i1 %206, label %207, label %281

207:                                              ; preds = %194
  %208 = load ptr, ptr %18, align 8, !tbaa !5
  %209 = load i32, ptr %8, align 4, !tbaa !9
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds i32, ptr %208, i64 %210
  %212 = load i32, ptr %211, align 4, !tbaa !9
  %213 = load ptr, ptr %26, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.vrinfodef, ptr %213, i32 0, i32 1
  %215 = load i32, ptr %214, align 4, !tbaa !21
  %216 = add nsw i32 %215, %212
  store i32 %216, ptr %214, align 4, !tbaa !21
  %217 = load ptr, ptr %26, align 8, !tbaa !5
  %218 = getelementptr inbounds %struct.vrinfodef, ptr %217, i32 0, i32 2
  %219 = load i32, ptr %218, align 8, !tbaa !31
  %220 = add nsw i32 %219, -1
  store i32 %220, ptr %218, align 8, !tbaa !31
  %221 = load ptr, ptr %28, align 8, !tbaa !5
  %222 = load i32, ptr %12, align 4, !tbaa !9
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds i32, ptr %221, i64 %223
  %225 = load i32, ptr %224, align 4, !tbaa !9
  store i32 %225, ptr %9, align 4, !tbaa !9
  %226 = icmp eq i32 %225, -1
  br i1 %226, label %227, label %260

227:                                              ; preds = %207
  %228 = load i32, ptr %15, align 4, !tbaa !9
  %229 = load ptr, ptr %28, align 8, !tbaa !5
  %230 = load i32, ptr %12, align 4, !tbaa !9
  %231 = sext i32 %230 to i64
  %232 = getelementptr inbounds i32, ptr %229, i64 %231
  store i32 %228, ptr %232, align 4, !tbaa !9
  %233 = load ptr, ptr %27, align 8, !tbaa !5
  %234 = load i32, ptr %15, align 4, !tbaa !9
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds %struct.vedegreedef, ptr %233, i64 %235
  %237 = getelementptr inbounds %struct.vedegreedef, ptr %236, i32 0, i32 3
  store i32 0, ptr %237, align 4, !tbaa !35
  %238 = load i32, ptr %12, align 4, !tbaa !9
  %239 = load ptr, ptr %27, align 8, !tbaa !5
  %240 = load i32, ptr %15, align 4, !tbaa !9
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds %struct.vedegreedef, ptr %239, i64 %241
  %243 = getelementptr inbounds %struct.vedegreedef, ptr %242, i32 0, i32 0
  store i32 %238, ptr %243, align 4, !tbaa !37
  %244 = load ptr, ptr %18, align 8, !tbaa !5
  %245 = load i32, ptr %8, align 4, !tbaa !9
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds i32, ptr %244, i64 %246
  %248 = load i32, ptr %247, align 4, !tbaa !9
  %249 = load ptr, ptr %27, align 8, !tbaa !5
  %250 = load i32, ptr %15, align 4, !tbaa !9
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds %struct.vedegreedef, ptr %249, i64 %251
  %253 = getelementptr inbounds %struct.vedegreedef, ptr %252, i32 0, i32 1
  store i32 %248, ptr %253, align 4, !tbaa !38
  %254 = load ptr, ptr %27, align 8, !tbaa !5
  %255 = load i32, ptr %15, align 4, !tbaa !9
  %256 = add nsw i32 %255, 1
  store i32 %256, ptr %15, align 4, !tbaa !9
  %257 = sext i32 %255 to i64
  %258 = getelementptr inbounds %struct.vedegreedef, ptr %254, i64 %257
  %259 = getelementptr inbounds %struct.vedegreedef, ptr %258, i32 0, i32 2
  store i32 1, ptr %259, align 4, !tbaa !39
  br label %280

260:                                              ; preds = %207
  %261 = load ptr, ptr %18, align 8, !tbaa !5
  %262 = load i32, ptr %8, align 4, !tbaa !9
  %263 = sext i32 %262 to i64
  %264 = getelementptr inbounds i32, ptr %261, i64 %263
  %265 = load i32, ptr %264, align 4, !tbaa !9
  %266 = load ptr, ptr %27, align 8, !tbaa !5
  %267 = load i32, ptr %9, align 4, !tbaa !9
  %268 = sext i32 %267 to i64
  %269 = getelementptr inbounds %struct.vedegreedef, ptr %266, i64 %268
  %270 = getelementptr inbounds %struct.vedegreedef, ptr %269, i32 0, i32 1
  %271 = load i32, ptr %270, align 4, !tbaa !38
  %272 = add nsw i32 %271, %265
  store i32 %272, ptr %270, align 4, !tbaa !38
  %273 = load ptr, ptr %27, align 8, !tbaa !5
  %274 = load i32, ptr %9, align 4, !tbaa !9
  %275 = sext i32 %274 to i64
  %276 = getelementptr inbounds %struct.vedegreedef, ptr %273, i64 %275
  %277 = getelementptr inbounds %struct.vedegreedef, ptr %276, i32 0, i32 2
  %278 = load i32, ptr %277, align 4, !tbaa !39
  %279 = add nsw i32 %278, 1
  store i32 %279, ptr %277, align 4, !tbaa !39
  br label %280

280:                                              ; preds = %260, %227
  br label %281

281:                                              ; preds = %280, %194
  br label %282

282:                                              ; preds = %281
  %283 = load i32, ptr %8, align 4, !tbaa !9
  %284 = add nsw i32 %283, 1
  store i32 %284, ptr %8, align 4, !tbaa !9
  br label %190, !llvm.loop !40

285:                                              ; preds = %190
  %286 = load ptr, ptr %26, align 8, !tbaa !5
  %287 = getelementptr inbounds %struct.vrinfodef, ptr %286, i32 0, i32 1
  %288 = load i32, ptr %287, align 4, !tbaa !21
  %289 = load ptr, ptr %26, align 8, !tbaa !5
  %290 = getelementptr inbounds %struct.vrinfodef, ptr %289, i32 0, i32 0
  %291 = load i32, ptr %290, align 8, !tbaa !32
  %292 = sub nsw i32 %291, %288
  store i32 %292, ptr %290, align 8, !tbaa !32
  %293 = load ptr, ptr %26, align 8, !tbaa !5
  %294 = getelementptr inbounds %struct.vrinfodef, ptr %293, i32 0, i32 1
  %295 = load i32, ptr %294, align 4, !tbaa !21
  %296 = icmp eq i32 %295, 0
  br i1 %296, label %297, label %308

297:                                              ; preds = %285
  %298 = load ptr, ptr %26, align 8, !tbaa !5
  %299 = getelementptr inbounds %struct.vrinfodef, ptr %298, i32 0, i32 5
  store ptr null, ptr %299, align 8, !tbaa !33
  %300 = load i32, ptr %14, align 4, !tbaa !9
  %301 = load i32, ptr %13, align 4, !tbaa !9
  %302 = sub nsw i32 %300, %301
  %303 = load ptr, ptr %4, align 8, !tbaa !5
  %304 = getelementptr inbounds %struct.controldef, ptr %303, i32 0, i32 11
  %305 = getelementptr inbounds %struct.workspacedef, ptr %304, i32 0, i32 5
  %306 = load i32, ptr %305, align 8, !tbaa !25
  %307 = sub nsw i32 %306, %302
  store i32 %307, ptr %305, align 8, !tbaa !25
  br label %330

308:                                              ; preds = %285
  %309 = load i32, ptr %15, align 4, !tbaa !9
  %310 = load ptr, ptr %26, align 8, !tbaa !5
  %311 = getelementptr inbounds %struct.vrinfodef, ptr %310, i32 0, i32 4
  store i32 %309, ptr %311, align 8, !tbaa !30
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %312

312:                                              ; preds = %326, %308
  %313 = load i32, ptr %8, align 4, !tbaa !9
  %314 = load i32, ptr %15, align 4, !tbaa !9
  %315 = icmp slt i32 %313, %314
  br i1 %315, label %316, label %329

316:                                              ; preds = %312
  %317 = load ptr, ptr %28, align 8, !tbaa !5
  %318 = load ptr, ptr %27, align 8, !tbaa !5
  %319 = load i32, ptr %8, align 4, !tbaa !9
  %320 = sext i32 %319 to i64
  %321 = getelementptr inbounds %struct.vedegreedef, ptr %318, i64 %320
  %322 = getelementptr inbounds %struct.vedegreedef, ptr %321, i32 0, i32 0
  %323 = load i32, ptr %322, align 4, !tbaa !37
  %324 = sext i32 %323 to i64
  %325 = getelementptr inbounds i32, ptr %317, i64 %324
  store i32 -1, ptr %325, align 4, !tbaa !9
  br label %326

326:                                              ; preds = %316
  %327 = load i32, ptr %8, align 4, !tbaa !9
  %328 = add nsw i32 %327, 1
  store i32 %328, ptr %8, align 4, !tbaa !9
  br label %312, !llvm.loop !41

329:                                              ; preds = %312
  br label %330

330:                                              ; preds = %329, %297
  br label %331

331:                                              ; preds = %330, %110
  br label %332

332:                                              ; preds = %331
  %333 = load i32, ptr %7, align 4, !tbaa !9
  %334 = add nsw i32 %333, 1
  store i32 %334, ptr %7, align 4, !tbaa !9
  br label %106, !llvm.loop !42

335:                                              ; preds = %106
  %336 = load ptr, ptr %4, align 8, !tbaa !5
  %337 = load ptr, ptr %5, align 8, !tbaa !5
  %338 = load i32, ptr %6, align 4, !tbaa !9
  call void @__ComputeKWayVolGains(ptr noundef %336, ptr noundef %337, i32 noundef %338)
  %339 = load ptr, ptr %5, align 8, !tbaa !5
  %340 = getelementptr inbounds %struct.graphdef, ptr %339, i32 0, i32 15
  %341 = load ptr, ptr %340, align 8, !tbaa !43
  %342 = load ptr, ptr %23, align 8, !tbaa !5
  %343 = getelementptr inbounds %struct.graphdef, ptr %342, i32 0, i32 15
  %344 = load ptr, ptr %343, align 8, !tbaa !43
  %345 = load i32, ptr %6, align 4, !tbaa !9
  %346 = sext i32 %345 to i64
  %347 = mul i64 4, %346
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %341, ptr align 1 %344, i64 %347, i1 false)
  %348 = load ptr, ptr %23, align 8, !tbaa !5
  %349 = getelementptr inbounds %struct.graphdef, ptr %348, i32 0, i32 12
  %350 = load i32, ptr %349, align 8, !tbaa !44
  %351 = load ptr, ptr %5, align 8, !tbaa !5
  %352 = getelementptr inbounds %struct.graphdef, ptr %351, i32 0, i32 12
  store i32 %350, ptr %352, align 8, !tbaa !44
  %353 = load ptr, ptr %5, align 8, !tbaa !5
  %354 = getelementptr inbounds %struct.graphdef, ptr %353, i32 0, i32 27
  %355 = load ptr, ptr %354, align 8, !tbaa !11
  call void @__FreeGraph(ptr noundef %355)
  %356 = load ptr, ptr %5, align 8, !tbaa !5
  %357 = getelementptr inbounds %struct.graphdef, ptr %356, i32 0, i32 27
  store ptr null, ptr %357, align 8, !tbaa !11
  %358 = load ptr, ptr %4, align 8, !tbaa !5
  %359 = load i32, ptr %6, align 4, !tbaa !9
  call void @__idxwspacefree(ptr noundef %358, i32 noundef %359)
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  ret void
}

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

; Function Attrs: nounwind uwtable
declare dso_local void @__AllocateVolKWayPartitionMemory(ptr noundef, ptr noundef, i32 noundef) #1

declare ptr @__idxset(i32 noundef, i32 noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @__ComputeKWayVolGains(ptr noundef, ptr noundef, i32 noundef) #1

declare ptr @__idxwspacemalloc(ptr noundef, i32 noundef) #2

declare void @__idxwspacefree(ptr noundef, i32 noundef) #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) #3

declare void @__FreeGraph(ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 200}
!12 = !{!"graphdef", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !10, i64 88, !10, i64 92, !6, i64 96, !6, i64 104, !10, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !10, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208}
!13 = !{!12, !6, i64 96}
!14 = !{!12, !6, i64 160}
!15 = !{!12, !10, i64 16}
!16 = !{!12, !6, i64 80}
!17 = !{!12, !6, i64 24}
!18 = !{!12, !6, i64 48}
!19 = !{!12, !6, i64 56}
!20 = !{!12, !6, i64 64}
!21 = !{!22, !10, i64 4}
!22 = !{!"vrinfodef", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !6, i64 24}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!26, !10, i64 80}
!26 = !{!"controldef", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !27, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !28, i64 48, !29, i64 104, !29, i64 112, !29, i64 120, !29, i64 128, !29, i64 136, !29, i64 144, !29, i64 152, !29, i64 160, !29, i64 168, !29, i64 176, !29, i64 184, !29, i64 192, !29, i64 200, !29, i64 208, !29, i64 216, !29, i64 224}
!27 = !{!"float", !7, i64 0}
!28 = !{!"workspacedef", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16, !6, i64 24, !10, i64 32, !6, i64 40, !6, i64 48}
!29 = !{!"double", !7, i64 0}
!30 = !{!22, !10, i64 16}
!31 = !{!22, !10, i64 8}
!32 = !{!22, !10, i64 0}
!33 = !{!22, !6, i64 24}
!34 = !{!26, !6, i64 72}
!35 = !{!36, !10, i64 12}
!36 = !{!"vedegreedef", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12}
!37 = !{!36, !10, i64 0}
!38 = !{!36, !10, i64 4}
!39 = !{!36, !10, i64 8}
!40 = distinct !{!40, !24}
!41 = distinct !{!41, !24}
!42 = distinct !{!42, !24}
!43 = !{!12, !6, i64 104}
!44 = !{!12, !10, i64 88}


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

%struct.vrinfodef = type { i32, i32, i32, i32, i32, ptr }
%struct.vedegreedef = type { i32, i32, i32, i32 }

; Function Attrs: nounwind uwtable
define dso_local void @__ProjectVolKWayPartition(ptr noundef %0, ptr noundef %1, i32 noundef %2) local_unnamed_addr #0 {
  %4 = getelementptr inbounds i8, ptr %1, i64 200
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %5, i64 96
  %7 = load ptr, ptr %6, align 8, !tbaa !11
  %8 = getelementptr inbounds i8, ptr %5, i64 160
  %9 = load ptr, ptr %8, align 8, !tbaa !12
  %10 = getelementptr inbounds i8, ptr %1, i64 16
  %11 = load i32, ptr %10, align 8, !tbaa !13
  %12 = getelementptr inbounds i8, ptr %1, i64 80
  %13 = load ptr, ptr %12, align 8, !tbaa !14
  %14 = getelementptr inbounds i8, ptr %1, i64 24
  %15 = load ptr, ptr %14, align 8, !tbaa !15
  %16 = getelementptr inbounds i8, ptr %1, i64 48
  %17 = load ptr, ptr %16, align 8, !tbaa !16
  %18 = getelementptr inbounds i8, ptr %1, i64 56
  %19 = load ptr, ptr %18, align 8, !tbaa !17
  %20 = getelementptr inbounds i8, ptr %1, i64 64
  %21 = load ptr, ptr %20, align 8, !tbaa !18
  tail call void @__AllocateVolKWayPartitionMemory(ptr noundef %0, ptr noundef %1, i32 noundef %2)
  %22 = getelementptr inbounds i8, ptr %1, i64 96
  %23 = load ptr, ptr %22, align 8, !tbaa !11
  %24 = getelementptr inbounds i8, ptr %1, i64 160
  %25 = load ptr, ptr %24, align 8, !tbaa !12
  %26 = icmp sgt i32 %11, 0
  br i1 %26, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %3
  %wide.trip.count = zext nneg i32 %11 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %27 = icmp eq i32 %11, 1
  br i1 %27, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader.new ], [ %indvars.iv.next.1, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.1, %.lr.ph ]
  %28 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv
  %29 = load i32, ptr %28, align 4, !tbaa !19
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds i32, ptr %7, i64 %30
  %32 = load i32, ptr %31, align 4, !tbaa !19
  %33 = getelementptr inbounds i32, ptr %23, i64 %indvars.iv
  store i32 %32, ptr %33, align 4, !tbaa !19
  %34 = getelementptr inbounds %struct.vrinfodef, ptr %9, i64 %30, i32 1
  %35 = load i32, ptr %34, align 4, !tbaa !20
  store i32 %35, ptr %28, align 4, !tbaa !19
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %36 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv.next
  %37 = load i32, ptr %36, align 4, !tbaa !19
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds i32, ptr %7, i64 %38
  %40 = load i32, ptr %39, align 4, !tbaa !19
  %41 = getelementptr inbounds i32, ptr %23, i64 %indvars.iv.next
  store i32 %40, ptr %41, align 4, !tbaa !19
  %42 = getelementptr inbounds %struct.vrinfodef, ptr %9, i64 %38, i32 1
  %43 = load i32, ptr %42, align 4, !tbaa !20
  store i32 %43, ptr %36, align 4, !tbaa !19
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !22

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph, %.lr.ph.preheader
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next.1, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge.loopexit.unr-lcssa
  %44 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv.unr
  %45 = load i32, ptr %44, align 4, !tbaa !19
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds i32, ptr %7, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !19
  %49 = getelementptr inbounds i32, ptr %23, i64 %indvars.iv.unr
  store i32 %48, ptr %49, align 4, !tbaa !19
  %50 = getelementptr inbounds %struct.vrinfodef, ptr %9, i64 %46, i32 1
  %51 = load i32, ptr %50, align 4, !tbaa !20
  store i32 %51, ptr %44, align 4, !tbaa !19
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph.epil, %._crit_edge.loopexit.unr-lcssa, %3
  %52 = tail call ptr @__idxwspacemalloc(ptr noundef %0, i32 noundef %2) #3
  %53 = tail call ptr @__idxset(i32 noundef %2, i32 noundef -1, ptr noundef %52) #3
  %54 = getelementptr inbounds i8, ptr %0, i64 80
  store i32 0, ptr %54, align 8, !tbaa !24
  br i1 %26, label %.lr.ph142, label %._crit_edge143

.lr.ph142:                                        ; preds = %._crit_edge
  %55 = getelementptr inbounds i8, ptr %0, i64 72
  %wide.trip.count158 = zext nneg i32 %11 to i64
  br label %56

56:                                               ; preds = %.lr.ph142, %.loopexit
  %indvars.iv155 = phi i64 [ 0, %.lr.ph142 ], [ %indvars.iv.next156, %.loopexit ]
  %57 = getelementptr inbounds i32, ptr %23, i64 %indvars.iv155
  %58 = load i32, ptr %57, align 4, !tbaa !19
  %59 = getelementptr inbounds %struct.vrinfodef, ptr %25, i64 %indvars.iv155
  %60 = getelementptr inbounds i8, ptr %59, i64 16
  store i32 0, ptr %60, align 8, !tbaa !29
  %61 = getelementptr inbounds i8, ptr %59, i64 8
  store i32 0, ptr %61, align 8, !tbaa !30
  %62 = getelementptr inbounds i8, ptr %59, i64 4
  store i32 0, ptr %62, align 4, !tbaa !20
  store i32 0, ptr %59, align 8, !tbaa !31
  %63 = getelementptr inbounds i8, ptr %59, i64 24
  store ptr null, ptr %63, align 8, !tbaa !32
  %64 = getelementptr inbounds i32, ptr %21, i64 %indvars.iv155
  %65 = load i32, ptr %64, align 4, !tbaa !19
  store i32 %65, ptr %59, align 8, !tbaa !31
  %indvars.iv.next156 = add nuw nsw i64 %indvars.iv155, 1
  %66 = getelementptr inbounds i32, ptr %15, i64 %indvars.iv.next156
  %67 = load i32, ptr %66, align 4, !tbaa !19
  %68 = getelementptr inbounds i32, ptr %15, i64 %indvars.iv155
  %69 = load i32, ptr %68, align 4, !tbaa !19
  %70 = sub nsw i32 %67, %69
  store i32 %70, ptr %61, align 8, !tbaa !30
  %71 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv155
  %72 = load i32, ptr %71, align 4, !tbaa !19
  %73 = icmp sgt i32 %72, 0
  br i1 %73, label %74, label %.loopexit

74:                                               ; preds = %56
  %75 = load i32, ptr %68, align 4, !tbaa !19
  %76 = load i32, ptr %66, align 4, !tbaa !19
  %77 = load ptr, ptr %55, align 8, !tbaa !33
  %78 = load i32, ptr %54, align 8, !tbaa !24
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds %struct.vedegreedef, ptr %77, i64 %79
  store ptr %80, ptr %63, align 8, !tbaa !32
  %81 = sub nsw i32 %76, %75
  %82 = add nsw i32 %78, %81
  store i32 %82, ptr %54, align 8, !tbaa !24
  %83 = icmp slt i32 %75, %76
  br i1 %83, label %.lr.ph135.preheader, label %._crit_edge136.thread

._crit_edge136.thread:                            ; preds = %74
  store i32 %65, ptr %59, align 8, !tbaa !31
  br label %118

.lr.ph135.preheader:                              ; preds = %74
  %84 = sext i32 %75 to i64
  %wide.trip.count148 = sext i32 %76 to i64
  br label %.lr.ph135

.lr.ph135:                                        ; preds = %.lr.ph135.preheader, %115
  %indvars.iv145 = phi i64 [ %84, %.lr.ph135.preheader ], [ %indvars.iv.next146, %115 ]
  %.0126132 = phi i32 [ 0, %.lr.ph135.preheader ], [ %.1127, %115 ]
  %85 = getelementptr inbounds i32, ptr %17, i64 %indvars.iv145
  %86 = load i32, ptr %85, align 4, !tbaa !19
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds i32, ptr %23, i64 %87
  %89 = load i32, ptr %88, align 4, !tbaa !19
  %.not = icmp eq i32 %58, %89
  br i1 %.not, label %115, label %90

90:                                               ; preds = %.lr.ph135
  %91 = getelementptr inbounds i32, ptr %19, i64 %indvars.iv145
  %92 = load i32, ptr %91, align 4, !tbaa !19
  %93 = load <2 x i32>, ptr %62, align 4, !tbaa !19
  %94 = insertelement <2 x i32> <i32 poison, i32 -1>, i32 %92, i64 0
  %95 = add nsw <2 x i32> %93, %94
  store <2 x i32> %95, ptr %62, align 4, !tbaa !19
  %96 = sext i32 %89 to i64
  %97 = getelementptr inbounds i32, ptr %53, i64 %96
  %98 = load i32, ptr %97, align 4, !tbaa !19
  %99 = icmp eq i32 %98, -1
  br i1 %99, label %100, label %108

100:                                              ; preds = %90
  store i32 %.0126132, ptr %97, align 4, !tbaa !19
  %101 = sext i32 %.0126132 to i64
  %102 = getelementptr inbounds %struct.vedegreedef, ptr %80, i64 %101
  %103 = getelementptr inbounds i8, ptr %102, i64 12
  store i32 0, ptr %103, align 4, !tbaa !34
  store i32 %89, ptr %102, align 4, !tbaa !36
  %104 = load i32, ptr %91, align 4, !tbaa !19
  %105 = getelementptr inbounds i8, ptr %102, i64 4
  store i32 %104, ptr %105, align 4, !tbaa !37
  %106 = add nsw i32 %.0126132, 1
  %107 = getelementptr inbounds i8, ptr %102, i64 8
  store i32 1, ptr %107, align 4, !tbaa !38
  br label %115

108:                                              ; preds = %90
  %109 = load i32, ptr %91, align 4, !tbaa !19
  %110 = sext i32 %98 to i64
  %111 = getelementptr inbounds %struct.vedegreedef, ptr %80, i64 %110, i32 1
  %112 = load <2 x i32>, ptr %111, align 4, !tbaa !19
  %113 = insertelement <2 x i32> <i32 poison, i32 1>, i32 %109, i64 0
  %114 = add nsw <2 x i32> %112, %113
  store <2 x i32> %114, ptr %111, align 4, !tbaa !19
  br label %115

115:                                              ; preds = %.lr.ph135, %108, %100
  %.1127 = phi i32 [ %106, %100 ], [ %.0126132, %108 ], [ %.0126132, %.lr.ph135 ]
  %indvars.iv.next146 = add nsw i64 %indvars.iv145, 1
  %exitcond149.not = icmp eq i64 %indvars.iv.next146, %wide.trip.count148
  br i1 %exitcond149.not, label %._crit_edge136, label %.lr.ph135, !llvm.loop !39

._crit_edge136:                                   ; preds = %115
  %.pre = load i32, ptr %62, align 4, !tbaa !20
  %.pre160 = load i32, ptr %59, align 8, !tbaa !31
  %116 = sub nsw i32 %.pre160, %.pre
  store i32 %116, ptr %59, align 8, !tbaa !31
  %117 = icmp eq i32 %.pre, 0
  br i1 %117, label %118, label %121

118:                                              ; preds = %._crit_edge136.thread, %._crit_edge136
  store ptr null, ptr %63, align 8, !tbaa !32
  %119 = load i32, ptr %54, align 8, !tbaa !24
  %120 = sub nsw i32 %119, %81
  store i32 %120, ptr %54, align 8, !tbaa !24
  br label %.loopexit

121:                                              ; preds = %._crit_edge136
  store i32 %.1127, ptr %60, align 8, !tbaa !29
  %122 = icmp sgt i32 %.1127, 0
  br i1 %122, label %.lr.ph139.preheader, label %.loopexit

.lr.ph139.preheader:                              ; preds = %121
  %wide.trip.count153 = zext nneg i32 %.1127 to i64
  %xtraiter162 = and i64 %wide.trip.count153, 3
  %123 = icmp ult i32 %.1127, 4
  br i1 %123, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph139.preheader.new

.lr.ph139.preheader.new:                          ; preds = %.lr.ph139.preheader
  %unroll_iter164 = and i64 %wide.trip.count153, 2147483644
  br label %.lr.ph139

.lr.ph139:                                        ; preds = %.lr.ph139, %.lr.ph139.preheader.new
  %indvars.iv150 = phi i64 [ 0, %.lr.ph139.preheader.new ], [ %indvars.iv.next151.3, %.lr.ph139 ]
  %niter165 = phi i64 [ 0, %.lr.ph139.preheader.new ], [ %niter165.next.3, %.lr.ph139 ]
  %124 = getelementptr inbounds %struct.vedegreedef, ptr %80, i64 %indvars.iv150
  %125 = load i32, ptr %124, align 4, !tbaa !36
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds i32, ptr %53, i64 %126
  store i32 -1, ptr %127, align 4, !tbaa !19
  %indvars.iv.next151 = or disjoint i64 %indvars.iv150, 1
  %128 = getelementptr inbounds %struct.vedegreedef, ptr %80, i64 %indvars.iv.next151
  %129 = load i32, ptr %128, align 4, !tbaa !36
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds i32, ptr %53, i64 %130
  store i32 -1, ptr %131, align 4, !tbaa !19
  %indvars.iv.next151.1 = or disjoint i64 %indvars.iv150, 2
  %132 = getelementptr inbounds %struct.vedegreedef, ptr %80, i64 %indvars.iv.next151.1
  %133 = load i32, ptr %132, align 4, !tbaa !36
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds i32, ptr %53, i64 %134
  store i32 -1, ptr %135, align 4, !tbaa !19
  %indvars.iv.next151.2 = or disjoint i64 %indvars.iv150, 3
  %136 = getelementptr inbounds %struct.vedegreedef, ptr %80, i64 %indvars.iv.next151.2
  %137 = load i32, ptr %136, align 4, !tbaa !36
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds i32, ptr %53, i64 %138
  store i32 -1, ptr %139, align 4, !tbaa !19
  %indvars.iv.next151.3 = add nuw nsw i64 %indvars.iv150, 4
  %niter165.next.3 = add i64 %niter165, 4
  %niter165.ncmp.3 = icmp eq i64 %niter165.next.3, %unroll_iter164
  br i1 %niter165.ncmp.3, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph139, !llvm.loop !40

.loopexit.loopexit.unr-lcssa:                     ; preds = %.lr.ph139, %.lr.ph139.preheader
  %indvars.iv150.unr = phi i64 [ 0, %.lr.ph139.preheader ], [ %indvars.iv.next151.3, %.lr.ph139 ]
  %lcmp.mod163.not = icmp eq i64 %xtraiter162, 0
  br i1 %lcmp.mod163.not, label %.loopexit, label %.lr.ph139.epil

.lr.ph139.epil:                                   ; preds = %.loopexit.loopexit.unr-lcssa, %.lr.ph139.epil
  %indvars.iv150.epil = phi i64 [ %indvars.iv.next151.epil, %.lr.ph139.epil ], [ %indvars.iv150.unr, %.loopexit.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph139.epil ], [ 0, %.loopexit.loopexit.unr-lcssa ]
  %140 = getelementptr inbounds %struct.vedegreedef, ptr %80, i64 %indvars.iv150.epil
  %141 = load i32, ptr %140, align 4, !tbaa !36
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds i32, ptr %53, i64 %142
  store i32 -1, ptr %143, align 4, !tbaa !19
  %indvars.iv.next151.epil = add nuw nsw i64 %indvars.iv150.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter162
  br i1 %epil.iter.cmp.not, label %.loopexit, label %.lr.ph139.epil, !llvm.loop !41

.loopexit:                                        ; preds = %.loopexit.loopexit.unr-lcssa, %.lr.ph139.epil, %121, %56, %118
  %exitcond159.not = icmp eq i64 %indvars.iv.next156, %wide.trip.count158
  br i1 %exitcond159.not, label %._crit_edge143, label %56, !llvm.loop !43

._crit_edge143:                                   ; preds = %.loopexit, %._crit_edge
  tail call void @__ComputeKWayVolGains(ptr noundef %0, ptr noundef %1, i32 noundef %2)
  %144 = getelementptr inbounds i8, ptr %1, i64 104
  %145 = load ptr, ptr %144, align 8, !tbaa !44
  %146 = getelementptr inbounds i8, ptr %5, i64 104
  %147 = load ptr, ptr %146, align 8, !tbaa !44
  %148 = sext i32 %2 to i64
  %149 = shl nsw i64 %148, 2
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %145, ptr align 1 %147, i64 %149, i1 false)
  %150 = getelementptr inbounds i8, ptr %5, i64 88
  %151 = load i32, ptr %150, align 8, !tbaa !45
  %152 = getelementptr inbounds i8, ptr %1, i64 88
  store i32 %151, ptr %152, align 8, !tbaa !45
  %153 = load ptr, ptr %4, align 8, !tbaa !5
  tail call void @__FreeGraph(ptr noundef %153) #3
  store ptr null, ptr %4, align 8, !tbaa !5
  tail call void @__idxwspacefree(ptr noundef %0, i32 noundef %2) #3
  ret void
}

; Function Attrs: nounwind uwtable
declare dso_local void @__AllocateVolKWayPartitionMemory(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare ptr @__idxset(i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @__ComputeKWayVolGains(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare ptr @__idxwspacemalloc(ptr noundef, i32 noundef) local_unnamed_addr #1

declare void @__idxwspacefree(ptr noundef, i32 noundef) local_unnamed_addr #1

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

declare void @__FreeGraph(ptr noundef) local_unnamed_addr #1

attributes #0 = { 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 #1 = { "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 nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 200}
!6 = !{!"graphdef", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !10, i64 88, !10, i64 92, !7, i64 96, !7, i64 104, !10, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !10, i64 176, !7, i64 184, !7, i64 192, !7, i64 200, !7, i64 208}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !7, i64 96}
!12 = !{!6, !7, i64 160}
!13 = !{!6, !10, i64 16}
!14 = !{!6, !7, i64 80}
!15 = !{!6, !7, i64 24}
!16 = !{!6, !7, i64 48}
!17 = !{!6, !7, i64 56}
!18 = !{!6, !7, i64 64}
!19 = !{!10, !10, i64 0}
!20 = !{!21, !10, i64 4}
!21 = !{!"vrinfodef", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !7, i64 24}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!25, !10, i64 80}
!25 = !{!"controldef", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !26, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !27, i64 48, !28, i64 104, !28, i64 112, !28, i64 120, !28, i64 128, !28, i64 136, !28, i64 144, !28, i64 152, !28, i64 160, !28, i64 168, !28, i64 176, !28, i64 184, !28, i64 192, !28, i64 200, !28, i64 208, !28, i64 216, !28, i64 224}
!26 = !{!"float", !8, i64 0}
!27 = !{!"workspacedef", !7, i64 0, !10, i64 8, !10, i64 12, !7, i64 16, !7, i64 24, !10, i64 32, !7, i64 40, !7, i64 48}
!28 = !{!"double", !8, i64 0}
!29 = !{!21, !10, i64 16}
!30 = !{!21, !10, i64 8}
!31 = !{!21, !10, i64 0}
!32 = !{!21, !7, i64 24}
!33 = !{!25, !7, i64 72}
!34 = !{!35, !10, i64 12}
!35 = !{!"vedegreedef", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12}
!36 = !{!35, !10, i64 0}
!37 = !{!35, !10, i64 4}
!38 = !{!35, !10, i64 8}
!39 = distinct !{!39, !23}
!40 = distinct !{!40, !23}
!41 = distinct !{!41, !42}
!42 = !{!"llvm.loop.unroll.disable"}
!43 = distinct !{!43, !23}
!44 = !{!6, !7, i64 104}
!45 = !{!6, !10, i64 88}


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