; LLVM IR from siconos/siconos :: externals/lbl/metis4/kwayrefine.ll_ (ProjectKWayPartition)

; 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.rinfodef = type { 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.edegreedef = type { 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 @__ProjectKWayPartition(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 i32, align 4
  %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
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = 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 4, 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
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #4
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.graphdef, ptr %32, i32 0, i32 27
  %34 = load ptr, ptr %33, align 8, !tbaa !11
  store ptr %34, ptr %26, align 8, !tbaa !5
  %35 = load ptr, ptr %26, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.graphdef, ptr %35, i32 0, i32 14
  %37 = load ptr, ptr %36, align 8, !tbaa !13
  store ptr %37, ptr %25, align 8, !tbaa !5
  %38 = load ptr, ptr %26, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.graphdef, ptr %38, i32 0, i32 21
  %40 = load ptr, ptr %39, align 8, !tbaa !14
  store ptr %40, ptr %27, align 8, !tbaa !5
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.graphdef, ptr %41, i32 0, i32 2
  %43 = load i32, ptr %42, align 8, !tbaa !15
  store i32 %43, ptr %10, align 4, !tbaa !9
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.graphdef, ptr %44, i32 0, i32 11
  %46 = load ptr, ptr %45, align 8, !tbaa !16
  store ptr %46, ptr %21, align 8, !tbaa !5
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.graphdef, ptr %47, i32 0, i32 4
  %49 = load ptr, ptr %48, align 8, !tbaa !17
  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 7
  %52 = load ptr, ptr %51, align 8, !tbaa !18
  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 8
  %55 = load ptr, ptr %54, align 8, !tbaa !19
  store ptr %55, ptr %19, align 8, !tbaa !5
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.graphdef, ptr %56, i32 0, i32 9
  %58 = load ptr, ptr %57, align 8, !tbaa !20
  store ptr %58, ptr %20, align 8, !tbaa !5
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = load i32, ptr %6, align 4, !tbaa !9
  call void @__AllocateKWayPartitionMemory(ptr noundef %59, ptr noundef %60, i32 noundef %61)
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.graphdef, ptr %62, i32 0, i32 14
  %64 = load ptr, ptr %63, align 8, !tbaa !13
  store ptr %64, ptr %22, align 8, !tbaa !5
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.graphdef, ptr %65, i32 0, i32 21
  %67 = load ptr, ptr %66, align 8, !tbaa !14
  store ptr %67, ptr %28, align 8, !tbaa !5
  %68 = load ptr, ptr %5, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.graphdef, ptr %68, i32 0, i32 18
  %70 = load ptr, ptr %69, align 8, !tbaa !21
  store ptr %70, ptr %24, align 8, !tbaa !5
  %71 = load i32, ptr %10, align 4, !tbaa !9
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.graphdef, ptr %72, i32 0, i32 17
  %74 = load ptr, ptr %73, align 8, !tbaa !22
  %75 = call ptr @__idxset(i32 noundef %71, i32 noundef -1, ptr noundef %74)
  store ptr %75, ptr %23, align 8, !tbaa !5
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %76

76:                                               ; preds = %105, %3
  %77 = load i32, ptr %7, align 4, !tbaa !9
  %78 = load i32, ptr %10, align 4, !tbaa !9
  %79 = icmp slt i32 %77, %78
  br i1 %79, label %80, label %108

80:                                               ; preds = %76
  %81 = load ptr, ptr %21, align 8, !tbaa !5
  %82 = load i32, ptr %7, align 4, !tbaa !9
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds i32, ptr %81, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !9
  store i32 %85, ptr %9, align 4, !tbaa !9
  %86 = load ptr, ptr %25, align 8, !tbaa !5
  %87 = load i32, ptr %9, align 4, !tbaa !9
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds i32, ptr %86, i64 %88
  %90 = load i32, ptr %89, align 4, !tbaa !9
  %91 = load ptr, ptr %22, align 8, !tbaa !5
  %92 = load i32, ptr %7, align 4, !tbaa !9
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds i32, ptr %91, i64 %93
  store i32 %90, ptr %94, align 4, !tbaa !9
  %95 = load ptr, ptr %27, align 8, !tbaa !5
  %96 = load i32, ptr %9, align 4, !tbaa !9
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds %struct.rinfodef, ptr %95, i64 %97
  %99 = getelementptr inbounds %struct.rinfodef, ptr %98, i32 0, i32 1
  %100 = load i32, ptr %99, align 4, !tbaa !23
  %101 = load ptr, ptr %21, align 8, !tbaa !5
  %102 = load i32, ptr %7, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds i32, ptr %101, i64 %103
  store i32 %100, ptr %104, align 4, !tbaa !9
  br label %105

105:                                              ; preds = %80
  %106 = load i32, ptr %7, align 4, !tbaa !9
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %7, align 4, !tbaa !9
  br label %76, !llvm.loop !25

108:                                              ; preds = %76
  %109 = load i32, ptr %6, align 4, !tbaa !9
  %110 = load ptr, ptr %4, align 8, !tbaa !5
  %111 = load i32, ptr %6, align 4, !tbaa !9
  %112 = call ptr @__idxwspacemalloc(ptr noundef %110, i32 noundef %111)
  %113 = call ptr @__idxset(i32 noundef %109, i32 noundef -1, ptr noundef %112)
  store ptr %113, ptr %31, align 8, !tbaa !5
  %114 = load ptr, ptr %4, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.controldef, ptr %114, i32 0, i32 11
  %116 = getelementptr inbounds %struct.workspacedef, ptr %115, i32 0, i32 5
  store i32 0, ptr %116, align 8, !tbaa !27
  store i32 0, ptr %11, align 4, !tbaa !9
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %117

117:                                              ; preds = %330, %108
  %118 = load i32, ptr %7, align 4, !tbaa !9
  %119 = load i32, ptr %10, align 4, !tbaa !9
  %120 = icmp slt i32 %118, %119
  br i1 %120, label %121, label %333

121:                                              ; preds = %117
  %122 = load ptr, ptr %22, align 8, !tbaa !5
  %123 = load i32, ptr %7, align 4, !tbaa !9
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds i32, ptr %122, i64 %124
  %126 = load i32, ptr %125, align 4, !tbaa !9
  store i32 %126, ptr %12, align 4, !tbaa !9
  %127 = load ptr, ptr %28, align 8, !tbaa !5
  %128 = load i32, ptr %7, align 4, !tbaa !9
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds %struct.rinfodef, ptr %127, i64 %129
  store ptr %130, ptr %29, align 8, !tbaa !5
  %131 = load ptr, ptr %29, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.rinfodef, ptr %131, i32 0, i32 2
  store i32 0, ptr %132, align 8, !tbaa !32
  %133 = load ptr, ptr %29, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.rinfodef, ptr %133, i32 0, i32 1
  store i32 0, ptr %134, align 4, !tbaa !23
  %135 = load ptr, ptr %29, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.rinfodef, ptr %135, i32 0, i32 0
  store i32 0, ptr %136, align 8, !tbaa !33
  %137 = load ptr, ptr %29, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.rinfodef, ptr %137, i32 0, i32 3
  store ptr null, ptr %138, align 8, !tbaa !34
  %139 = load ptr, ptr %20, align 8, !tbaa !5
  %140 = load i32, ptr %7, align 4, !tbaa !9
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds i32, ptr %139, i64 %141
  %143 = load i32, ptr %142, align 4, !tbaa !9
  %144 = load ptr, ptr %29, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.rinfodef, ptr %144, i32 0, i32 0
  store i32 %143, ptr %145, align 8, !tbaa !33
  %146 = load ptr, ptr %21, align 8, !tbaa !5
  %147 = load i32, ptr %7, align 4, !tbaa !9
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds i32, ptr %146, i64 %148
  %150 = load i32, ptr %149, align 4, !tbaa !9
  %151 = icmp sgt i32 %150, 0
  br i1 %151, label %152, label %329

152:                                              ; preds = %121
  %153 = load ptr, ptr %17, align 8, !tbaa !5
  %154 = load i32, ptr %7, align 4, !tbaa !9
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds i32, ptr %153, i64 %155
  %157 = load i32, ptr %156, align 4, !tbaa !9
  store i32 %157, ptr %14, align 4, !tbaa !9
  %158 = load ptr, ptr %17, align 8, !tbaa !5
  %159 = load i32, ptr %7, align 4, !tbaa !9
  %160 = add nsw i32 %159, 1
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds i32, ptr %158, i64 %161
  %163 = load i32, ptr %162, align 4, !tbaa !9
  store i32 %163, ptr %15, align 4, !tbaa !9
  %164 = load ptr, ptr %4, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.controldef, ptr %164, i32 0, i32 11
  %166 = getelementptr inbounds %struct.workspacedef, ptr %165, i32 0, i32 3
  %167 = load ptr, ptr %166, align 8, !tbaa !35
  %168 = load ptr, ptr %4, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.controldef, ptr %168, i32 0, i32 11
  %170 = getelementptr inbounds %struct.workspacedef, ptr %169, i32 0, i32 5
  %171 = load i32, ptr %170, align 8, !tbaa !27
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds %struct.edegreedef, ptr %167, i64 %172
  %174 = load ptr, ptr %29, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.rinfodef, ptr %174, i32 0, i32 3
  store ptr %173, ptr %175, align 8, !tbaa !34
  store ptr %173, ptr %30, align 8, !tbaa !5
  %176 = load i32, ptr %15, align 4, !tbaa !9
  %177 = load i32, ptr %14, align 4, !tbaa !9
  %178 = sub nsw i32 %176, %177
  %179 = load ptr, ptr %4, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.controldef, ptr %179, i32 0, i32 11
  %181 = getelementptr inbounds %struct.workspacedef, ptr %180, i32 0, i32 5
  %182 = load i32, ptr %181, align 8, !tbaa !27
  %183 = add nsw i32 %182, %178
  store i32 %183, ptr %181, align 8, !tbaa !27
  store i32 0, ptr %16, align 4, !tbaa !9
  %184 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %184, ptr %8, align 4, !tbaa !9
  br label %185

185:                                              ; preds = %256, %152
  %186 = load i32, ptr %8, align 4, !tbaa !9
  %187 = load i32, ptr %15, align 4, !tbaa !9
  %188 = icmp slt i32 %186, %187
  br i1 %188, label %189, label %259

189:                                              ; preds = %185
  %190 = load ptr, ptr %22, align 8, !tbaa !5
  %191 = load ptr, ptr %18, align 8, !tbaa !5
  %192 = load i32, ptr %8, align 4, !tbaa !9
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds i32, ptr %191, i64 %193
  %195 = load i32, ptr %194, align 4, !tbaa !9
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds i32, ptr %190, i64 %196
  %198 = load i32, ptr %197, align 4, !tbaa !9
  store i32 %198, ptr %13, align 4, !tbaa !9
  %199 = load i32, ptr %12, align 4, !tbaa !9
  %200 = load i32, ptr %13, align 4, !tbaa !9
  %201 = icmp ne i32 %199, %200
  br i1 %201, label %202, label %255

202:                                              ; preds = %189
  %203 = load ptr, ptr %19, align 8, !tbaa !5
  %204 = load i32, ptr %8, align 4, !tbaa !9
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds i32, ptr %203, i64 %205
  %207 = load i32, ptr %206, align 4, !tbaa !9
  %208 = load ptr, ptr %29, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.rinfodef, ptr %208, i32 0, i32 1
  %210 = load i32, ptr %209, align 4, !tbaa !23
  %211 = add nsw i32 %210, %207
  store i32 %211, ptr %209, align 4, !tbaa !23
  %212 = load ptr, ptr %31, align 8, !tbaa !5
  %213 = load i32, ptr %13, align 4, !tbaa !9
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds i32, ptr %212, i64 %214
  %216 = load i32, ptr %215, align 4, !tbaa !9
  store i32 %216, ptr %9, align 4, !tbaa !9
  %217 = icmp eq i32 %216, -1
  br i1 %217, label %218, label %241

218:                                              ; preds = %202
  %219 = load i32, ptr %16, align 4, !tbaa !9
  %220 = load ptr, ptr %31, align 8, !tbaa !5
  %221 = load i32, ptr %13, align 4, !tbaa !9
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds i32, ptr %220, i64 %222
  store i32 %219, ptr %223, align 4, !tbaa !9
  %224 = load i32, ptr %13, align 4, !tbaa !9
  %225 = load ptr, ptr %30, align 8, !tbaa !5
  %226 = load i32, ptr %16, align 4, !tbaa !9
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds %struct.edegreedef, ptr %225, i64 %227
  %229 = getelementptr inbounds %struct.edegreedef, ptr %228, i32 0, i32 0
  store i32 %224, ptr %229, align 4, !tbaa !36
  %230 = load ptr, ptr %19, align 8, !tbaa !5
  %231 = load i32, ptr %8, align 4, !tbaa !9
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds i32, ptr %230, i64 %232
  %234 = load i32, ptr %233, align 4, !tbaa !9
  %235 = load ptr, ptr %30, align 8, !tbaa !5
  %236 = load i32, ptr %16, align 4, !tbaa !9
  %237 = add nsw i32 %236, 1
  store i32 %237, ptr %16, align 4, !tbaa !9
  %238 = sext i32 %236 to i64
  %239 = getelementptr inbounds %struct.edegreedef, ptr %235, i64 %238
  %240 = getelementptr inbounds %struct.edegreedef, ptr %239, i32 0, i32 1
  store i32 %234, ptr %240, align 4, !tbaa !38
  br label %254

241:                                              ; preds = %202
  %242 = load ptr, ptr %19, align 8, !tbaa !5
  %243 = load i32, ptr %8, align 4, !tbaa !9
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds i32, ptr %242, i64 %244
  %246 = load i32, ptr %245, align 4, !tbaa !9
  %247 = load ptr, ptr %30, align 8, !tbaa !5
  %248 = load i32, ptr %9, align 4, !tbaa !9
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds %struct.edegreedef, ptr %247, i64 %249
  %251 = getelementptr inbounds %struct.edegreedef, ptr %250, i32 0, i32 1
  %252 = load i32, ptr %251, align 4, !tbaa !38
  %253 = add nsw i32 %252, %246
  store i32 %253, ptr %251, align 4, !tbaa !38
  br label %254

254:                                              ; preds = %241, %218
  br label %255

255:                                              ; preds = %254, %189
  br label %256

256:                                              ; preds = %255
  %257 = load i32, ptr %8, align 4, !tbaa !9
  %258 = add nsw i32 %257, 1
  store i32 %258, ptr %8, align 4, !tbaa !9
  br label %185, !llvm.loop !39

259:                                              ; preds = %185
  %260 = load ptr, ptr %29, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct.rinfodef, ptr %260, i32 0, i32 1
  %262 = load i32, ptr %261, align 4, !tbaa !23
  %263 = load ptr, ptr %29, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.rinfodef, ptr %263, i32 0, i32 0
  %265 = load i32, ptr %264, align 8, !tbaa !33
  %266 = sub nsw i32 %265, %262
  store i32 %266, ptr %264, align 8, !tbaa !33
  %267 = load ptr, ptr %29, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct.rinfodef, ptr %267, i32 0, i32 1
  %269 = load i32, ptr %268, align 4, !tbaa !23
  %270 = icmp eq i32 %269, 0
  br i1 %270, label %271, label %282

271:                                              ; preds = %259
  %272 = load ptr, ptr %29, align 8, !tbaa !5
  %273 = getelementptr inbounds %struct.rinfodef, ptr %272, i32 0, i32 3
  store ptr null, ptr %273, align 8, !tbaa !34
  %274 = load i32, ptr %15, align 4, !tbaa !9
  %275 = load i32, ptr %14, align 4, !tbaa !9
  %276 = sub nsw i32 %274, %275
  %277 = load ptr, ptr %4, align 8, !tbaa !5
  %278 = getelementptr inbounds %struct.controldef, ptr %277, i32 0, i32 11
  %279 = getelementptr inbounds %struct.workspacedef, ptr %278, i32 0, i32 5
  %280 = load i32, ptr %279, align 8, !tbaa !27
  %281 = sub nsw i32 %280, %276
  store i32 %281, ptr %279, align 8, !tbaa !27
  br label %328

282:                                              ; preds = %259
  %283 = load ptr, ptr %29, align 8, !tbaa !5
  %284 = getelementptr inbounds %struct.rinfodef, ptr %283, i32 0, i32 1
  %285 = load i32, ptr %284, align 4, !tbaa !23
  %286 = load ptr, ptr %29, align 8, !tbaa !5
  %287 = getelementptr inbounds %struct.rinfodef, ptr %286, i32 0, i32 0
  %288 = load i32, ptr %287, align 8, !tbaa !33
  %289 = sub nsw i32 %285, %288
  %290 = icmp sge i32 %289, 0
  br i1 %290, label %291, label %306

291:                                              ; preds = %282
  br label %292

292:                                              ; preds = %291
  %293 = load i32, ptr %7, align 4, !tbaa !9
  %294 = load ptr, ptr %24, align 8, !tbaa !5
  %295 = load i32, ptr %11, align 4, !tbaa !9
  %296 = sext i32 %295 to i64
  %297 = getelementptr inbounds i32, ptr %294, i64 %296
  store i32 %293, ptr %297, align 4, !tbaa !9
  %298 = load i32, ptr %11, align 4, !tbaa !9
  %299 = add nsw i32 %298, 1
  store i32 %299, ptr %11, align 4, !tbaa !9
  %300 = load ptr, ptr %23, align 8, !tbaa !5
  %301 = load i32, ptr %7, align 4, !tbaa !9
  %302 = sext i32 %301 to i64
  %303 = getelementptr inbounds i32, ptr %300, i64 %302
  store i32 %298, ptr %303, align 4, !tbaa !9
  br label %304

304:                                              ; preds = %292
  br label %305

305:                                              ; preds = %304
  br label %306

306:                                              ; preds = %305, %282
  %307 = load i32, ptr %16, align 4, !tbaa !9
  %308 = load ptr, ptr %29, align 8, !tbaa !5
  %309 = getelementptr inbounds %struct.rinfodef, ptr %308, i32 0, i32 2
  store i32 %307, ptr %309, align 8, !tbaa !32
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %310

310:                                              ; preds = %324, %306
  %311 = load i32, ptr %8, align 4, !tbaa !9
  %312 = load i32, ptr %16, align 4, !tbaa !9
  %313 = icmp slt i32 %311, %312
  br i1 %313, label %314, label %327

314:                                              ; preds = %310
  %315 = load ptr, ptr %31, align 8, !tbaa !5
  %316 = load ptr, ptr %30, align 8, !tbaa !5
  %317 = load i32, ptr %8, align 4, !tbaa !9
  %318 = sext i32 %317 to i64
  %319 = getelementptr inbounds %struct.edegreedef, ptr %316, i64 %318
  %320 = getelementptr inbounds %struct.edegreedef, ptr %319, i32 0, i32 0
  %321 = load i32, ptr %320, align 4, !tbaa !36
  %322 = sext i32 %321 to i64
  %323 = getelementptr inbounds i32, ptr %315, i64 %322
  store i32 -1, ptr %323, align 4, !tbaa !9
  br label %324

324:                                              ; preds = %314
  %325 = load i32, ptr %8, align 4, !tbaa !9
  %326 = add nsw i32 %325, 1
  store i32 %326, ptr %8, align 4, !tbaa !9
  br label %310, !llvm.loop !40

327:                                              ; preds = %310
  br label %328

328:                                              ; preds = %327, %271
  br label %329

329:                                              ; preds = %328, %121
  br label %330

330:                                              ; preds = %329
  %331 = load i32, ptr %7, align 4, !tbaa !9
  %332 = add nsw i32 %331, 1
  store i32 %332, ptr %7, align 4, !tbaa !9
  br label %117, !llvm.loop !41

333:                                              ; preds = %117
  %334 = load ptr, ptr %5, align 8, !tbaa !5
  %335 = getelementptr inbounds %struct.graphdef, ptr %334, i32 0, i32 15
  %336 = load ptr, ptr %335, align 8, !tbaa !42
  %337 = load ptr, ptr %26, align 8, !tbaa !5
  %338 = getelementptr inbounds %struct.graphdef, ptr %337, i32 0, i32 15
  %339 = load ptr, ptr %338, align 8, !tbaa !42
  %340 = load i32, ptr %6, align 4, !tbaa !9
  %341 = sext i32 %340 to i64
  %342 = mul i64 4, %341
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %336, ptr align 1 %339, i64 %342, i1 false)
  %343 = load ptr, ptr %26, align 8, !tbaa !5
  %344 = getelementptr inbounds %struct.graphdef, ptr %343, i32 0, i32 12
  %345 = load i32, ptr %344, align 8, !tbaa !43
  %346 = load ptr, ptr %5, align 8, !tbaa !5
  %347 = getelementptr inbounds %struct.graphdef, ptr %346, i32 0, i32 12
  store i32 %345, ptr %347, align 8, !tbaa !43
  %348 = load i32, ptr %11, align 4, !tbaa !9
  %349 = load ptr, ptr %5, align 8, !tbaa !5
  %350 = getelementptr inbounds %struct.graphdef, ptr %349, i32 0, i32 16
  store i32 %348, ptr %350, align 8, !tbaa !44
  %351 = load ptr, ptr %5, align 8, !tbaa !5
  %352 = getelementptr inbounds %struct.graphdef, ptr %351, i32 0, i32 27
  %353 = load ptr, ptr %352, align 8, !tbaa !11
  call void @__FreeGraph(ptr noundef %353)
  %354 = load ptr, ptr %5, align 8, !tbaa !5
  %355 = getelementptr inbounds %struct.graphdef, ptr %354, i32 0, i32 27
  store ptr null, ptr %355, align 8, !tbaa !11
  %356 = load ptr, ptr %4, align 8, !tbaa !5
  %357 = load i32, ptr %6, align 4, !tbaa !9
  call void @__idxwspacefree(ptr noundef %356, i32 noundef %357)
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #4
  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 4, 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 @__AllocateKWayPartitionMemory(ptr noundef, ptr noundef, i32 noundef) #1

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

declare ptr @__idxwspacemalloc(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

declare void @__idxwspacefree(ptr noundef, i32 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 152}
!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 = !{!12, !6, i64 128}
!22 = !{!12, !6, i64 120}
!23 = !{!24, !10, i64 4}
!24 = !{!"rinfodef", !10, i64 0, !10, i64 4, !10, i64 8, !6, i64 16}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!28, !10, i64 80}
!28 = !{!"controldef", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !29, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !30, i64 48, !31, i64 104, !31, i64 112, !31, i64 120, !31, i64 128, !31, i64 136, !31, i64 144, !31, i64 152, !31, i64 160, !31, i64 168, !31, i64 176, !31, i64 184, !31, i64 192, !31, i64 200, !31, i64 208, !31, i64 216, !31, i64 224}
!29 = !{!"float", !7, i64 0}
!30 = !{!"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}
!31 = !{!"double", !7, i64 0}
!32 = !{!24, !10, i64 8}
!33 = !{!24, !10, i64 0}
!34 = !{!24, !6, i64 16}
!35 = !{!28, !6, i64 64}
!36 = !{!37, !10, i64 0}
!37 = !{!"edegreedef", !10, i64 0, !10, i64 4}
!38 = !{!37, !10, i64 4}
!39 = distinct !{!39, !26}
!40 = distinct !{!40, !26}
!41 = distinct !{!41, !26}
!42 = !{!12, !6, i64 104}
!43 = !{!12, !10, i64 88}
!44 = !{!12, !10, i64 112}


; 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.rinfodef = type { i32, i32, i32, ptr }
%struct.edegreedef = type { i32, i32 }

; Function Attrs: nounwind uwtable
define dso_local void @__ProjectKWayPartition(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 152
  %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 @__AllocateKWayPartitionMemory(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 152
  %25 = load ptr, ptr %24, align 8, !tbaa !12
  %26 = getelementptr inbounds i8, ptr %1, i64 128
  %27 = load ptr, ptr %26, align 8, !tbaa !19
  %28 = getelementptr inbounds i8, ptr %1, i64 120
  %29 = load ptr, ptr %28, align 8, !tbaa !20
  %30 = tail call ptr @__idxset(i32 noundef %11, i32 noundef -1, ptr noundef %29) #3
  %31 = icmp sgt i32 %11, 0
  br i1 %31, 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
  %32 = icmp eq i32 %11, 1
  br i1 %32, 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 ]
  %33 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv
  %34 = load i32, ptr %33, align 4, !tbaa !21
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds i32, ptr %7, i64 %35
  %37 = load i32, ptr %36, align 4, !tbaa !21
  %38 = getelementptr inbounds i32, ptr %23, i64 %indvars.iv
  store i32 %37, ptr %38, align 4, !tbaa !21
  %39 = getelementptr inbounds %struct.rinfodef, ptr %9, i64 %35, i32 1
  %40 = load i32, ptr %39, align 4, !tbaa !22
  store i32 %40, ptr %33, align 4, !tbaa !21
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %41 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv.next
  %42 = load i32, ptr %41, align 4, !tbaa !21
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds i32, ptr %7, i64 %43
  %45 = load i32, ptr %44, align 4, !tbaa !21
  %46 = getelementptr inbounds i32, ptr %23, i64 %indvars.iv.next
  store i32 %45, ptr %46, align 4, !tbaa !21
  %47 = getelementptr inbounds %struct.rinfodef, ptr %9, i64 %43, i32 1
  %48 = load i32, ptr %47, align 4, !tbaa !22
  store i32 %48, ptr %41, align 4, !tbaa !21
  %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 !24

._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
  %49 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv.unr
  %50 = load i32, ptr %49, align 4, !tbaa !21
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds i32, ptr %7, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !21
  %54 = getelementptr inbounds i32, ptr %23, i64 %indvars.iv.unr
  store i32 %53, ptr %54, align 4, !tbaa !21
  %55 = getelementptr inbounds %struct.rinfodef, ptr %9, i64 %51, i32 1
  %56 = load i32, ptr %55, align 4, !tbaa !22
  store i32 %56, ptr %49, align 4, !tbaa !21
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph.epil, %._crit_edge.loopexit.unr-lcssa, %3
  %57 = tail call ptr @__idxwspacemalloc(ptr noundef %0, i32 noundef %2) #3
  %58 = tail call ptr @__idxset(i32 noundef %2, i32 noundef -1, ptr noundef %57) #3
  %59 = getelementptr inbounds i8, ptr %0, i64 80
  store i32 0, ptr %59, align 8, !tbaa !26
  br i1 %31, label %.lr.ph145, label %._crit_edge146

.lr.ph145:                                        ; preds = %._crit_edge
  %60 = getelementptr inbounds i8, ptr %0, i64 64
  %wide.trip.count162 = zext nneg i32 %11 to i64
  br label %61

61:                                               ; preds = %.lr.ph145, %.loopexit
  %indvars.iv159 = phi i64 [ 0, %.lr.ph145 ], [ %indvars.iv.next160, %.loopexit ]
  %.0123141 = phi i32 [ 0, %.lr.ph145 ], [ %.2, %.loopexit ]
  %62 = getelementptr inbounds i32, ptr %23, i64 %indvars.iv159
  %63 = load i32, ptr %62, align 4, !tbaa !21
  %64 = getelementptr inbounds %struct.rinfodef, ptr %25, i64 %indvars.iv159
  %65 = getelementptr inbounds i8, ptr %64, i64 8
  store i32 0, ptr %65, align 8, !tbaa !31
  %66 = getelementptr inbounds i8, ptr %64, i64 4
  store i32 0, ptr %66, align 4, !tbaa !22
  store i32 0, ptr %64, align 8, !tbaa !32
  %67 = getelementptr inbounds i8, ptr %64, i64 16
  store ptr null, ptr %67, align 8, !tbaa !33
  %68 = getelementptr inbounds i32, ptr %21, i64 %indvars.iv159
  %69 = load i32, ptr %68, align 4, !tbaa !21
  store i32 %69, ptr %64, align 8, !tbaa !32
  %70 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv159
  %71 = load i32, ptr %70, align 4, !tbaa !21
  %72 = icmp sgt i32 %71, 0
  br i1 %72, label %73, label %.loopexit

73:                                               ; preds = %61
  %74 = getelementptr inbounds i32, ptr %15, i64 %indvars.iv159
  %75 = load i32, ptr %74, align 4, !tbaa !21
  %76 = getelementptr inbounds i8, ptr %74, i64 4
  %77 = load i32, ptr %76, align 4, !tbaa !21
  %78 = load ptr, ptr %60, align 8, !tbaa !34
  %79 = load i32, ptr %59, align 8, !tbaa !26
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds %struct.edegreedef, ptr %78, i64 %80
  store ptr %81, ptr %67, align 8, !tbaa !33
  %82 = sub nsw i32 %77, %75
  %83 = add nsw i32 %79, %82
  store i32 %83, ptr %59, align 8, !tbaa !26
  %84 = icmp slt i32 %75, %77
  br i1 %84, label %.lr.ph136.preheader, label %._crit_edge137.thread

._crit_edge137.thread:                            ; preds = %73
  store i32 %69, ptr %64, align 8, !tbaa !32
  br label %115

.lr.ph136.preheader:                              ; preds = %73
  %85 = sext i32 %75 to i64
  %wide.trip.count152 = sext i32 %77 to i64
  br label %.lr.ph136

.lr.ph136:                                        ; preds = %.lr.ph136.preheader, %112
  %indvars.iv149 = phi i64 [ %85, %.lr.ph136.preheader ], [ %indvars.iv.next150, %112 ]
  %.0125133 = phi i32 [ 0, %.lr.ph136.preheader ], [ %.1126, %112 ]
  %86 = getelementptr inbounds i32, ptr %17, i64 %indvars.iv149
  %87 = load i32, ptr %86, align 4, !tbaa !21
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds i32, ptr %23, i64 %88
  %90 = load i32, ptr %89, align 4, !tbaa !21
  %.not131 = icmp eq i32 %63, %90
  br i1 %.not131, label %112, label %91

91:                                               ; preds = %.lr.ph136
  %92 = getelementptr inbounds i32, ptr %19, i64 %indvars.iv149
  %93 = load i32, ptr %92, align 4, !tbaa !21
  %94 = load i32, ptr %66, align 4, !tbaa !22
  %95 = add nsw i32 %94, %93
  store i32 %95, ptr %66, align 4, !tbaa !22
  %96 = sext i32 %90 to i64
  %97 = getelementptr inbounds i32, ptr %58, i64 %96
  %98 = load i32, ptr %97, align 4, !tbaa !21
  %99 = icmp eq i32 %98, -1
  br i1 %99, label %100, label %106

100:                                              ; preds = %91
  store i32 %.0125133, ptr %97, align 4, !tbaa !21
  %101 = sext i32 %.0125133 to i64
  %102 = getelementptr inbounds %struct.edegreedef, ptr %81, i64 %101
  store i32 %90, ptr %102, align 4, !tbaa !35
  %103 = load i32, ptr %92, align 4, !tbaa !21
  %104 = add nsw i32 %.0125133, 1
  %105 = getelementptr inbounds i8, ptr %102, i64 4
  store i32 %103, ptr %105, align 4, !tbaa !37
  br label %112

106:                                              ; preds = %91
  %107 = load i32, ptr %92, align 4, !tbaa !21
  %108 = sext i32 %98 to i64
  %109 = getelementptr inbounds %struct.edegreedef, ptr %81, i64 %108, i32 1
  %110 = load i32, ptr %109, align 4, !tbaa !37
  %111 = add nsw i32 %110, %107
  store i32 %111, ptr %109, align 4, !tbaa !37
  br label %112

112:                                              ; preds = %.lr.ph136, %106, %100
  %.1126 = phi i32 [ %104, %100 ], [ %.0125133, %106 ], [ %.0125133, %.lr.ph136 ]
  %indvars.iv.next150 = add nsw i64 %indvars.iv149, 1
  %exitcond153.not = icmp eq i64 %indvars.iv.next150, %wide.trip.count152
  br i1 %exitcond153.not, label %._crit_edge137, label %.lr.ph136, !llvm.loop !38

._crit_edge137:                                   ; preds = %112
  %.pre = load i32, ptr %66, align 4, !tbaa !22
  %.pre164 = load i32, ptr %64, align 8, !tbaa !32
  %113 = sub nsw i32 %.pre164, %.pre
  store i32 %113, ptr %64, align 8, !tbaa !32
  %114 = icmp eq i32 %.pre, 0
  br i1 %114, label %115, label %118

115:                                              ; preds = %._crit_edge137.thread, %._crit_edge137
  store ptr null, ptr %67, align 8, !tbaa !33
  %116 = load i32, ptr %59, align 8, !tbaa !26
  %117 = sub nsw i32 %116, %82
  store i32 %117, ptr %59, align 8, !tbaa !26
  br label %.loopexit

118:                                              ; preds = %._crit_edge137
  %.not = icmp slt i32 %.pre, %113
  br i1 %.not, label %125, label %119

119:                                              ; preds = %118
  %120 = sext i32 %.0123141 to i64
  %121 = getelementptr inbounds i32, ptr %27, i64 %120
  %122 = trunc nuw nsw i64 %indvars.iv159 to i32
  store i32 %122, ptr %121, align 4, !tbaa !21
  %123 = add nsw i32 %.0123141, 1
  %124 = getelementptr inbounds i32, ptr %30, i64 %indvars.iv159
  store i32 %.0123141, ptr %124, align 4, !tbaa !21
  br label %125

125:                                              ; preds = %119, %118
  %.1124 = phi i32 [ %123, %119 ], [ %.0123141, %118 ]
  store i32 %.1126, ptr %65, align 8, !tbaa !31
  %126 = icmp sgt i32 %.1126, 0
  br i1 %126, label %.lr.ph140.preheader, label %.loopexit

.lr.ph140.preheader:                              ; preds = %125
  %wide.trip.count157 = zext nneg i32 %.1126 to i64
  %xtraiter166 = and i64 %wide.trip.count157, 3
  %127 = icmp ult i32 %.1126, 4
  br i1 %127, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph140.preheader.new

.lr.ph140.preheader.new:                          ; preds = %.lr.ph140.preheader
  %unroll_iter168 = and i64 %wide.trip.count157, 2147483644
  br label %.lr.ph140

.lr.ph140:                                        ; preds = %.lr.ph140, %.lr.ph140.preheader.new
  %indvars.iv154 = phi i64 [ 0, %.lr.ph140.preheader.new ], [ %indvars.iv.next155.3, %.lr.ph140 ]
  %niter169 = phi i64 [ 0, %.lr.ph140.preheader.new ], [ %niter169.next.3, %.lr.ph140 ]
  %128 = getelementptr inbounds %struct.edegreedef, ptr %81, i64 %indvars.iv154
  %129 = load i32, ptr %128, align 4, !tbaa !35
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds i32, ptr %58, i64 %130
  store i32 -1, ptr %131, align 4, !tbaa !21
  %indvars.iv.next155 = or disjoint i64 %indvars.iv154, 1
  %132 = getelementptr inbounds %struct.edegreedef, ptr %81, i64 %indvars.iv.next155
  %133 = load i32, ptr %132, align 4, !tbaa !35
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds i32, ptr %58, i64 %134
  store i32 -1, ptr %135, align 4, !tbaa !21
  %indvars.iv.next155.1 = or disjoint i64 %indvars.iv154, 2
  %136 = getelementptr inbounds %struct.edegreedef, ptr %81, i64 %indvars.iv.next155.1
  %137 = load i32, ptr %136, align 4, !tbaa !35
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds i32, ptr %58, i64 %138
  store i32 -1, ptr %139, align 4, !tbaa !21
  %indvars.iv.next155.2 = or disjoint i64 %indvars.iv154, 3
  %140 = getelementptr inbounds %struct.edegreedef, ptr %81, i64 %indvars.iv.next155.2
  %141 = load i32, ptr %140, align 4, !tbaa !35
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds i32, ptr %58, i64 %142
  store i32 -1, ptr %143, align 4, !tbaa !21
  %indvars.iv.next155.3 = add nuw nsw i64 %indvars.iv154, 4
  %niter169.next.3 = add i64 %niter169, 4
  %niter169.ncmp.3 = icmp eq i64 %niter169.next.3, %unroll_iter168
  br i1 %niter169.ncmp.3, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph140, !llvm.loop !39

.loopexit.loopexit.unr-lcssa:                     ; preds = %.lr.ph140, %.lr.ph140.preheader
  %indvars.iv154.unr = phi i64 [ 0, %.lr.ph140.preheader ], [ %indvars.iv.next155.3, %.lr.ph140 ]
  %lcmp.mod167.not = icmp eq i64 %xtraiter166, 0
  br i1 %lcmp.mod167.not, label %.loopexit, label %.lr.ph140.epil

.lr.ph140.epil:                                   ; preds = %.loopexit.loopexit.unr-lcssa, %.lr.ph140.epil
  %indvars.iv154.epil = phi i64 [ %indvars.iv.next155.epil, %.lr.ph140.epil ], [ %indvars.iv154.unr, %.loopexit.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph140.epil ], [ 0, %.loopexit.loopexit.unr-lcssa ]
  %144 = getelementptr inbounds %struct.edegreedef, ptr %81, i64 %indvars.iv154.epil
  %145 = load i32, ptr %144, align 4, !tbaa !35
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds i32, ptr %58, i64 %146
  store i32 -1, ptr %147, align 4, !tbaa !21
  %indvars.iv.next155.epil = add nuw nsw i64 %indvars.iv154.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter166
  br i1 %epil.iter.cmp.not, label %.loopexit, label %.lr.ph140.epil, !llvm.loop !40

.loopexit:                                        ; preds = %.loopexit.loopexit.unr-lcssa, %.lr.ph140.epil, %125, %61, %115
  %.2 = phi i32 [ %.0123141, %115 ], [ %.0123141, %61 ], [ %.1124, %125 ], [ %.1124, %.lr.ph140.epil ], [ %.1124, %.loopexit.loopexit.unr-lcssa ]
  %indvars.iv.next160 = add nuw nsw i64 %indvars.iv159, 1
  %exitcond163.not = icmp eq i64 %indvars.iv.next160, %wide.trip.count162
  br i1 %exitcond163.not, label %._crit_edge146, label %61, !llvm.loop !42

._crit_edge146:                                   ; preds = %.loopexit, %._crit_edge
  %.0123.lcssa = phi i32 [ 0, %._crit_edge ], [ %.2, %.loopexit ]
  %148 = getelementptr inbounds i8, ptr %1, i64 104
  %149 = load ptr, ptr %148, align 8, !tbaa !43
  %150 = getelementptr inbounds i8, ptr %5, i64 104
  %151 = load ptr, ptr %150, align 8, !tbaa !43
  %152 = sext i32 %2 to i64
  %153 = shl nsw i64 %152, 2
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %149, ptr align 1 %151, i64 %153, i1 false)
  %154 = getelementptr inbounds i8, ptr %5, i64 88
  %155 = load i32, ptr %154, align 8, !tbaa !44
  %156 = getelementptr inbounds i8, ptr %1, i64 88
  store i32 %155, ptr %156, align 8, !tbaa !44
  %157 = getelementptr inbounds i8, ptr %1, i64 112
  store i32 %.0123.lcssa, ptr %157, align 8, !tbaa !45
  %158 = load ptr, ptr %4, align 8, !tbaa !5
  tail call void @__FreeGraph(ptr noundef %158) #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 @__AllocateKWayPartitionMemory(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

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

declare ptr @__idxwspacemalloc(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

declare void @__idxwspacefree(ptr noundef, i32 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 152}
!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 = !{!6, !7, i64 128}
!20 = !{!6, !7, i64 120}
!21 = !{!10, !10, i64 0}
!22 = !{!23, !10, i64 4}
!23 = !{!"rinfodef", !10, i64 0, !10, i64 4, !10, i64 8, !7, i64 16}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!27, !10, i64 80}
!27 = !{!"controldef", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !28, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !29, i64 48, !30, i64 104, !30, i64 112, !30, i64 120, !30, i64 128, !30, i64 136, !30, i64 144, !30, i64 152, !30, i64 160, !30, i64 168, !30, i64 176, !30, i64 184, !30, i64 192, !30, i64 200, !30, i64 208, !30, i64 216, !30, i64 224}
!28 = !{!"float", !8, i64 0}
!29 = !{!"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}
!30 = !{!"double", !8, i64 0}
!31 = !{!23, !10, i64 8}
!32 = !{!23, !10, i64 0}
!33 = !{!23, !7, i64 16}
!34 = !{!27, !7, i64 64}
!35 = !{!36, !10, i64 0}
!36 = !{!"edegreedef", !10, i64 0, !10, i64 4}
!37 = !{!36, !10, i64 4}
!38 = distinct !{!38, !25}
!39 = distinct !{!39, !25}
!40 = distinct !{!40, !41}
!41 = !{!"llvm.loop.unroll.disable"}
!42 = distinct !{!42, !25}
!43 = !{!6, !7, i64 104}
!44 = !{!6, !10, i64 88}
!45 = !{!6, !10, i64 112}


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