; LLVM IR from palatinuse/database-vertical-partitioning :: lib/metis/Programs (io)

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

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [125 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [75 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @ReadGraph(ptr noundef %0, ptr noundef %1, ptr noundef %2) #0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %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 i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  call void @__InitGraph(ptr noundef %26)
  %27 = call noalias ptr @malloc(i64 noundef 1280001) #8
  store ptr %27, ptr %21, align 8, !tbaa !5
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = call noalias ptr @fopen(ptr noundef %28, ptr noundef @.str)
  store ptr %29, ptr %24, align 8, !tbaa !5
  %30 = icmp eq ptr %29, null
  br i1 %30, label %31, label %34

31:                                               ; preds = %3
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %32)
  call void @exit(i32 noundef 0) #9
  unreachable

34:                                               ; preds = %3
  br label %35

35:                                               ; preds = %48, %34
  %36 = load ptr, ptr %21, align 8, !tbaa !5
  %37 = load ptr, ptr %24, align 8, !tbaa !5
  %38 = call ptr @fgets(ptr noundef %36, i32 noundef 1280000, ptr noundef %37)
  %39 = icmp ne ptr %38, null
  br i1 %39, label %40, label %46

40:                                               ; preds = %35
  %41 = load ptr, ptr %21, align 8, !tbaa !5
  %42 = getelementptr inbounds i8, ptr %41, i64 0
  %43 = load i8, ptr %42, align 1, !tbaa !9
  %44 = sext i8 %43 to i32
  %45 = icmp eq i32 %44, 37
  br label %46

46:                                               ; preds = %40, %35
  %47 = phi i1 [ false, %35 ], [ %45, %40 ]
  br i1 %47, label %48, label %49

48:                                               ; preds = %46
  br label %35, !llvm.loop !10

49:                                               ; preds = %46
  %50 = load ptr, ptr %24, align 8, !tbaa !5
  %51 = call i32 @feof(ptr noundef %50) #7
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %53, label %57

53:                                               ; preds = %49
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.graphdef, ptr %54, i32 0, i32 2
  store i32 0, ptr %55, align 8, !tbaa !12
  %56 = load ptr, ptr %21, align 8, !tbaa !5
  call void @free(ptr noundef %56) #7
  store i32 1, ptr %25, align 4
  br label %312

57:                                               ; preds = %49
  store i32 0, ptr %14, align 4, !tbaa !15
  store i32 0, ptr %11, align 4, !tbaa !15
  %58 = load ptr, ptr %21, align 8, !tbaa !5
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.graphdef, ptr %59, i32 0, i32 2
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.graphdef, ptr %61, i32 0, i32 3
  %63 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %58, ptr noundef @.str.2, ptr noundef %60, ptr noundef %62, ptr noundef %11, ptr noundef %14) #7
  %64 = load i32, ptr %11, align 4, !tbaa !15
  %65 = srem i32 %64, 10
  %66 = icmp sgt i32 %65, 0
  %67 = zext i1 %66 to i32
  store i32 %67, ptr %12, align 4, !tbaa !15
  %68 = load i32, ptr %11, align 4, !tbaa !15
  %69 = sdiv i32 %68, 10
  %70 = srem i32 %69, 10
  %71 = icmp sgt i32 %70, 0
  %72 = zext i1 %71 to i32
  store i32 %72, ptr %13, align 4, !tbaa !15
  %73 = load i32, ptr %11, align 4, !tbaa !15
  %74 = icmp sge i32 %73, 100
  br i1 %74, label %75, label %77

75:                                               ; preds = %57
  %76 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  call void @exit(i32 noundef 0) #9
  unreachable

77:                                               ; preds = %57
  %78 = load ptr, ptr %6, align 8, !tbaa !5
  store i32 0, ptr %78, align 4, !tbaa !15
  %79 = load i32, ptr %12, align 4, !tbaa !15
  %80 = icmp ne i32 %79, 0
  br i1 %80, label %81, label %85

81:                                               ; preds = %77
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = load i32, ptr %82, align 4, !tbaa !15
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %82, align 4, !tbaa !15
  br label %85

85:                                               ; preds = %81, %77
  %86 = load i32, ptr %13, align 4, !tbaa !15
  %87 = icmp ne i32 %86, 0
  br i1 %87, label %88, label %92

88:                                               ; preds = %85
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  %90 = load i32, ptr %89, align 4, !tbaa !15
  %91 = add nsw i32 %90, 2
  store i32 %91, ptr %89, align 4, !tbaa !15
  br label %92

92:                                               ; preds = %88, %85
  %93 = load i32, ptr %14, align 4, !tbaa !15
  %94 = icmp sgt i32 %93, 0
  br i1 %94, label %95, label %105

95:                                               ; preds = %92
  %96 = load i32, ptr %13, align 4, !tbaa !15
  %97 = icmp ne i32 %96, 0
  br i1 %97, label %105, label %98

98:                                               ; preds = %95
  %99 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  %100 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  %101 = load i32, ptr %14, align 4, !tbaa !15
  %102 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, i32 noundef %101)
  %103 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  %104 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  call void @exit(i32 noundef 0) #9
  unreachable

105:                                              ; preds = %95, %92
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.graphdef, ptr %106, i32 0, i32 3
  %108 = load i32, ptr %107, align 4, !tbaa !16
  %109 = mul nsw i32 %108, 2
  store i32 %109, ptr %107, align 4, !tbaa !16
  %110 = load i32, ptr %14, align 4, !tbaa !15
  %111 = icmp eq i32 %110, 0
  br i1 %111, label %112, label %113

112:                                              ; preds = %105
  br label %115

113:                                              ; preds = %105
  %114 = load i32, ptr %14, align 4, !tbaa !15
  br label %115

115:                                              ; preds = %113, %112
  %116 = phi i32 [ 1, %112 ], [ %114, %113 ]
  %117 = load ptr, ptr %4, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.graphdef, ptr %117, i32 0, i32 24
  store i32 %116, ptr %118, align 8, !tbaa !17
  store i32 %116, ptr %14, align 4, !tbaa !15
  %119 = load ptr, ptr %4, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.graphdef, ptr %119, i32 0, i32 2
  %121 = load i32, ptr %120, align 8, !tbaa !12
  %122 = icmp sgt i32 %121, 1073741824
  br i1 %122, label %123, label %127

123:                                              ; preds = %115
  %124 = load ptr, ptr %4, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.graphdef, ptr %124, i32 0, i32 2
  %126 = load i32, ptr %125, align 8, !tbaa !12
  call void (ptr, ...) @__errexit(ptr noundef @.str.8, i32 noundef %126, i32 noundef 1073741824, i64 noundef 4)
  br label %127

127:                                              ; preds = %123, %115
  %128 = load ptr, ptr %4, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.graphdef, ptr %128, i32 0, i32 2
  %130 = load i32, ptr %129, align 8, !tbaa !12
  %131 = add nsw i32 %130, 1
  %132 = call ptr @__idxsmalloc(i32 noundef %131, i32 noundef 0, ptr noundef @.str.9)
  %133 = load ptr, ptr %4, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.graphdef, ptr %133, i32 0, i32 4
  store ptr %132, ptr %134, align 8, !tbaa !18
  store ptr %132, ptr %17, align 8, !tbaa !5
  %135 = load ptr, ptr %4, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.graphdef, ptr %135, i32 0, i32 3
  %137 = load i32, ptr %136, align 4, !tbaa !16
  %138 = call ptr @__idxmalloc(i32 noundef %137, ptr noundef @.str.10)
  %139 = load ptr, ptr %4, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.graphdef, ptr %139, i32 0, i32 7
  store ptr %138, ptr %140, align 8, !tbaa !19
  store ptr %138, ptr %18, align 8, !tbaa !5
  %141 = load i32, ptr %13, align 4, !tbaa !15
  %142 = icmp ne i32 %141, 0
  br i1 %142, label %143, label %150

143:                                              ; preds = %127
  %144 = load i32, ptr %14, align 4, !tbaa !15
  %145 = load ptr, ptr %4, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.graphdef, ptr %145, i32 0, i32 2
  %147 = load i32, ptr %146, align 8, !tbaa !12
  %148 = mul nsw i32 %144, %147
  %149 = call ptr @__idxmalloc(i32 noundef %148, ptr noundef @.str.11)
  br label %151

150:                                              ; preds = %127
  br label %151

151:                                              ; preds = %150, %143
  %152 = phi ptr [ %149, %143 ], [ null, %150 ]
  %153 = load ptr, ptr %4, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.graphdef, ptr %153, i32 0, i32 5
  store ptr %152, ptr %154, align 8, !tbaa !20
  store ptr %152, ptr %19, align 8, !tbaa !5
  %155 = load i32, ptr %12, align 4, !tbaa !15
  %156 = icmp ne i32 %155, 0
  br i1 %156, label %157, label %162

157:                                              ; preds = %151
  %158 = load ptr, ptr %4, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.graphdef, ptr %158, i32 0, i32 3
  %160 = load i32, ptr %159, align 4, !tbaa !16
  %161 = call ptr @__idxmalloc(i32 noundef %160, ptr noundef @.str.12)
  br label %163

162:                                              ; preds = %151
  br label %163

163:                                              ; preds = %162, %157
  %164 = phi ptr [ %161, %157 ], [ null, %162 ]
  %165 = load ptr, ptr %4, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.graphdef, ptr %165, i32 0, i32 8
  store ptr %164, ptr %166, align 8, !tbaa !21
  store ptr %164, ptr %20, align 8, !tbaa !5
  %167 = load ptr, ptr %17, align 8, !tbaa !5
  %168 = getelementptr inbounds i32, ptr %167, i64 0
  store i32 0, ptr %168, align 4, !tbaa !15
  store i32 0, ptr %9, align 4, !tbaa !15
  store i32 0, ptr %7, align 4, !tbaa !15
  br label %169

169:                                              ; preds = %276, %163
  %170 = load i32, ptr %7, align 4, !tbaa !15
  %171 = load ptr, ptr %4, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.graphdef, ptr %171, i32 0, i32 2
  %173 = load i32, ptr %172, align 8, !tbaa !12
  %174 = icmp slt i32 %170, %173
  br i1 %174, label %175, label %279

175:                                              ; preds = %169
  br label %176

176:                                              ; preds = %189, %175
  %177 = load ptr, ptr %21, align 8, !tbaa !5
  %178 = load ptr, ptr %24, align 8, !tbaa !5
  %179 = call ptr @fgets(ptr noundef %177, i32 noundef 1280000, ptr noundef %178)
  store ptr %179, ptr %22, align 8, !tbaa !5
  %180 = icmp ne ptr %179, null
  br i1 %180, label %181, label %187

181:                                              ; preds = %176
  %182 = load ptr, ptr %21, align 8, !tbaa !5
  %183 = getelementptr inbounds i8, ptr %182, i64 0
  %184 = load i8, ptr %183, align 1, !tbaa !9
  %185 = sext i8 %184 to i32
  %186 = icmp eq i32 %185, 37
  br label %187

187:                                              ; preds = %181, %176
  %188 = phi i1 [ false, %176 ], [ %186, %181 ]
  br i1 %188, label %189, label %190

189:                                              ; preds = %187
  br label %176, !llvm.loop !22

190:                                              ; preds = %187
  %191 = load ptr, ptr %22, align 8, !tbaa !5
  %192 = icmp eq ptr %191, null
  br i1 %192, label %193, label %203

193:                                              ; preds = %190
  %194 = load ptr, ptr %24, align 8, !tbaa !5
  %195 = call i32 @feof(ptr noundef %194) #7
  %196 = icmp ne i32 %195, 0
  br i1 %196, label %197, label %203

197:                                              ; preds = %193
  %198 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  %199 = load i32, ptr %7, align 4, !tbaa !15
  %200 = add nsw i32 %199, 1
  %201 = call i32 (ptr, ...) @printf(ptr noundef @.str.13, i32 noundef %200)
  %202 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  call void @exit(i32 noundef 0) #9
  unreachable

203:                                              ; preds = %193, %190
  %204 = load ptr, ptr %21, align 8, !tbaa !5
  store ptr %204, ptr %22, align 8, !tbaa !5
  store ptr null, ptr %23, align 8, !tbaa !5
  %205 = load ptr, ptr %21, align 8, !tbaa !5
  %206 = call i64 @strlen(ptr noundef %205) #10
  %207 = icmp eq i64 %206, 1280000
  br i1 %207, label %208, label %209

208:                                              ; preds = %203
  call void (ptr, ...) @__errexit(ptr noundef @.str.14)
  br label %209

209:                                              ; preds = %208, %203
  %210 = load i32, ptr %13, align 4, !tbaa !15
  %211 = icmp ne i32 %210, 0
  br i1 %211, label %212, label %234

212:                                              ; preds = %209
  store i32 0, ptr %10, align 4, !tbaa !15
  br label %213

213:                                              ; preds = %230, %212
  %214 = load i32, ptr %10, align 4, !tbaa !15
  %215 = load i32, ptr %14, align 4, !tbaa !15
  %216 = icmp slt i32 %214, %215
  br i1 %216, label %217, label %233

217:                                              ; preds = %213
  %218 = load ptr, ptr %22, align 8, !tbaa !5
  %219 = call i64 @strtol(ptr noundef %218, ptr noundef %23, i32 noundef 10) #7
  %220 = trunc i64 %219 to i32
  %221 = load ptr, ptr %19, align 8, !tbaa !5
  %222 = load i32, ptr %7, align 4, !tbaa !15
  %223 = load i32, ptr %14, align 4, !tbaa !15
  %224 = mul nsw i32 %222, %223
  %225 = load i32, ptr %10, align 4, !tbaa !15
  %226 = add nsw i32 %224, %225
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds i32, ptr %221, i64 %227
  store i32 %220, ptr %228, align 4, !tbaa !15
  %229 = load ptr, ptr %23, align 8, !tbaa !5
  store ptr %229, ptr %22, align 8, !tbaa !5
  br label %230

230:                                              ; preds = %217
  %231 = load i32, ptr %10, align 4, !tbaa !15
  %232 = add nsw i32 %231, 1
  store i32 %232, ptr %10, align 4, !tbaa !15
  br label %213, !llvm.loop !23

233:                                              ; preds = %213
  br label %234

234:                                              ; preds = %233, %209
  br label %235

235:                                              ; preds = %266, %234
  %236 = load ptr, ptr %22, align 8, !tbaa !5
  %237 = call i64 @strtol(ptr noundef %236, ptr noundef %23, i32 noundef 10) #7
  %238 = trunc i64 %237 to i32
  %239 = sub nsw i32 %238, 1
  store i32 %239, ptr %15, align 4, !tbaa !15
  %240 = load ptr, ptr %23, align 8, !tbaa !5
  store ptr %240, ptr %22, align 8, !tbaa !5
  %241 = load i32, ptr %12, align 4, !tbaa !15
  %242 = icmp ne i32 %241, 0
  br i1 %242, label %243, label %248

243:                                              ; preds = %235
  %244 = load ptr, ptr %22, align 8, !tbaa !5
  %245 = call i64 @strtol(ptr noundef %244, ptr noundef %23, i32 noundef 10) #7
  %246 = trunc i64 %245 to i32
  store i32 %246, ptr %16, align 4, !tbaa !15
  %247 = load ptr, ptr %23, align 8, !tbaa !5
  store ptr %247, ptr %22, align 8, !tbaa !5
  br label %248

248:                                              ; preds = %243, %235
  %249 = load i32, ptr %15, align 4, !tbaa !15
  %250 = icmp slt i32 %249, 0
  br i1 %250, label %251, label %252

251:                                              ; preds = %248
  br label %269

252:                                              ; preds = %248
  %253 = load i32, ptr %15, align 4, !tbaa !15
  %254 = load ptr, ptr %18, align 8, !tbaa !5
  %255 = load i32, ptr %9, align 4, !tbaa !15
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds i32, ptr %254, i64 %256
  store i32 %253, ptr %257, align 4, !tbaa !15
  %258 = load i32, ptr %12, align 4, !tbaa !15
  %259 = icmp ne i32 %258, 0
  br i1 %259, label %260, label %266

260:                                              ; preds = %252
  %261 = load i32, ptr %16, align 4, !tbaa !15
  %262 = load ptr, ptr %20, align 8, !tbaa !5
  %263 = load i32, ptr %9, align 4, !tbaa !15
  %264 = sext i32 %263 to i64
  %265 = getelementptr inbounds i32, ptr %262, i64 %264
  store i32 %261, ptr %265, align 4, !tbaa !15
  br label %266

266:                                              ; preds = %260, %252
  %267 = load i32, ptr %9, align 4, !tbaa !15
  %268 = add nsw i32 %267, 1
  store i32 %268, ptr %9, align 4, !tbaa !15
  br label %235

269:                                              ; preds = %251
  %270 = load i32, ptr %9, align 4, !tbaa !15
  %271 = load ptr, ptr %17, align 8, !tbaa !5
  %272 = load i32, ptr %7, align 4, !tbaa !15
  %273 = add nsw i32 %272, 1
  %274 = sext i32 %273 to i64
  %275 = getelementptr inbounds i32, ptr %271, i64 %274
  store i32 %270, ptr %275, align 4, !tbaa !15
  br label %276

276:                                              ; preds = %269
  %277 = load i32, ptr %7, align 4, !tbaa !15
  %278 = add nsw i32 %277, 1
  store i32 %278, ptr %7, align 4, !tbaa !15
  br label %169, !llvm.loop !24

279:                                              ; preds = %169
  %280 = load ptr, ptr %24, align 8, !tbaa !5
  %281 = call i32 @fclose(ptr noundef %280)
  %282 = load i32, ptr %9, align 4, !tbaa !15
  %283 = load ptr, ptr %4, align 8, !tbaa !5
  %284 = getelementptr inbounds %struct.graphdef, ptr %283, i32 0, i32 3
  %285 = load i32, ptr %284, align 4, !tbaa !16
  %286 = icmp ne i32 %282, %285
  br i1 %286, label %287, label %310

287:                                              ; preds = %279
  %288 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  %289 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  %290 = load ptr, ptr %4, align 8, !tbaa !5
  %291 = getelementptr inbounds %struct.graphdef, ptr %290, i32 0, i32 3
  %292 = load i32, ptr %291, align 4, !tbaa !16
  %293 = sdiv i32 %292, 2
  %294 = load i32, ptr %9, align 4, !tbaa !15
  %295 = sdiv i32 %294, 2
  %296 = call i32 (ptr, ...) @printf(ptr noundef @.str.15, i32 noundef %293, i32 noundef %295)
  %297 = load i32, ptr %9, align 4, !tbaa !15
  %298 = mul nsw i32 2, %297
  %299 = load ptr, ptr %4, align 8, !tbaa !5
  %300 = getelementptr inbounds %struct.graphdef, ptr %299, i32 0, i32 3
  %301 = load i32, ptr %300, align 4, !tbaa !16
  %302 = icmp eq i32 %298, %301
  br i1 %302, label %303, label %307

303:                                              ; preds = %287
  %304 = call i32 (ptr, ...) @printf(ptr noundef @.str.16)
  %305 = call i32 (ptr, ...) @printf(ptr noundef @.str.17)
  %306 = call i32 (ptr, ...) @printf(ptr noundef @.str.18)
  br label %307

307:                                              ; preds = %303, %287
  %308 = call i32 (ptr, ...) @printf(ptr noundef @.str.19)
  %309 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  call void @exit(i32 noundef 0) #9
  unreachable

310:                                              ; preds = %279
  %311 = load ptr, ptr %21, align 8, !tbaa !5
  call void @free(ptr noundef %311) #7
  store i32 0, ptr %25, align 4
  br label %312

312:                                              ; preds = %310, %53
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  %313 = load i32, ptr %25, align 4
  switch i32 %313, label %315 [
    i32 0, label %314
    i32 1, label %314
  ]

314:                                              ; preds = %312, %312
  ret void

315:                                              ; preds = %312
  unreachable
}

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

declare void @__InitGraph(ptr noundef) #2

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #3

declare noalias ptr @fopen(ptr noundef, ptr noundef) #2

declare i32 @printf(ptr noundef, ...) #2

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #4

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

; Function Attrs: nounwind
declare i32 @feof(ptr noundef) #5

; Function Attrs: nounwind
declare void @free(ptr noundef) #5

; Function Attrs: nounwind
declare i32 @__isoc99_sscanf(ptr noundef, ptr noundef, ...) #5

declare void @__errexit(ptr noundef, ...) #2

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #6

; Function Attrs: nounwind
declare i64 @strtol(ptr noundef, ptr noundef, i32 noundef) #5

declare i32 @fclose(ptr noundef) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nounwind allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { nounwind allocsize(0) }
attributes #9 = { noreturn nounwind }
attributes #10 = { nounwind willreturn memory(read) }

!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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!13, !14, i64 16}
!13 = !{!"graphdef", !6, i64 0, !6, i64 8, !14, i64 16, !14, 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, !14, i64 88, !14, i64 92, !6, i64 96, !6, i64 104, !14, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !14, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208}
!14 = !{!"int", !7, i64 0}
!15 = !{!14, !14, i64 0}
!16 = !{!13, !14, i64 20}
!17 = !{!13, !14, i64 176}
!18 = !{!13, !6, i64 24}
!19 = !{!13, !6, i64 48}
!20 = !{!13, !6, i64 32}
!21 = !{!13, !6, i64 56}
!22 = distinct !{!22, !11}
!23 = distinct !{!23, !11}
!24 = distinct !{!24, !11}


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

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [125 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [75 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @ReadGraph(ptr noundef %0, ptr noundef %1, ptr nocapture noundef writeonly %2) local_unnamed_addr #0 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #10
  tail call void @__InitGraph(ptr noundef %0) #10
  %7 = tail call noalias dereferenceable_or_null(1280001) ptr @malloc(i64 noundef 1280001) #11
  %8 = tail call noalias ptr @fopen(ptr noundef %1, ptr noundef nonnull @.str)
  %9 = icmp eq ptr %8, null
  br i1 %9, label %10, label %.preheader102

10:                                               ; preds = %3
  %11 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef %1)
  tail call void @exit(i32 noundef 0) #12
  unreachable

.preheader102:                                    ; preds = %3, %13
  %12 = tail call ptr @fgets(ptr noundef %7, i32 noundef 1280000, ptr noundef nonnull %8)
  %.not = icmp eq ptr %12, null
  br i1 %.not, label %.critedge, label %13

13:                                               ; preds = %.preheader102
  %14 = load i8, ptr %7, align 1, !tbaa !5
  %15 = icmp eq i8 %14, 37
  br i1 %15, label %.preheader102, label %.critedge, !llvm.loop !8

.critedge:                                        ; preds = %.preheader102, %13
  %16 = tail call i32 @feof(ptr noundef nonnull %8) #10
  %.not85 = icmp eq i32 %16, 0
  br i1 %.not85, label %19, label %17

17:                                               ; preds = %.critedge
  %18 = getelementptr inbounds i8, ptr %0, i64 16
  store i32 0, ptr %18, align 8, !tbaa !10
  tail call void @free(ptr noundef %7) #10
  br label %159

19:                                               ; preds = %.critedge
  store i32 0, ptr %5, align 4, !tbaa !14
  store i32 0, ptr %4, align 4, !tbaa !14
  %20 = getelementptr inbounds i8, ptr %0, i64 16
  %21 = getelementptr inbounds i8, ptr %0, i64 20
  %22 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %7, ptr noundef nonnull @.str.2, ptr noundef nonnull %20, ptr noundef nonnull %21, ptr noundef nonnull %4, ptr noundef nonnull %5) #10
  %23 = load i32, ptr %4, align 4, !tbaa !14
  %24 = srem i32 %23, 10
  %25 = icmp sgt i32 %24, 0
  %26 = sdiv i32 %23, 10
  %27 = srem i32 %26, 10
  %28 = icmp sgt i32 %27, 0
  %29 = icmp sgt i32 %23, 99
  br i1 %29, label %30, label %32

30:                                               ; preds = %19
  %31 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  call void @exit(i32 noundef 0) #12
  unreachable

32:                                               ; preds = %19
  %spec.select = zext i1 %25 to i32
  store i32 %spec.select, ptr %2, align 4, !tbaa !14
  br i1 %28, label %.thread, label %35

.thread:                                          ; preds = %32
  %33 = select i1 %25, i32 3, i32 2
  store i32 %33, ptr %2, align 4, !tbaa !14
  %34 = load i32, ptr %5, align 4
  br label %45

35:                                               ; preds = %32
  %36 = load i32, ptr %5, align 4
  %37 = icmp slt i32 %36, 1
  br i1 %37, label %45, label %38

38:                                               ; preds = %35
  %39 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %40 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  %41 = load i32, ptr %5, align 4, !tbaa !14
  %42 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %41)
  %43 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  %44 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  call void @exit(i32 noundef 0) #12
  unreachable

45:                                               ; preds = %.thread, %35
  %46 = phi i32 [ %34, %.thread ], [ %36, %35 ]
  %47 = load i32, ptr %21, align 4, !tbaa !15
  %48 = shl nsw i32 %47, 1
  store i32 %48, ptr %21, align 4, !tbaa !15
  %49 = call i32 @llvm.umax.i32(i32 %46, i32 1)
  %50 = getelementptr inbounds i8, ptr %0, i64 176
  store i32 %49, ptr %50, align 8, !tbaa !16
  store i32 %49, ptr %5, align 4, !tbaa !14
  %51 = load i32, ptr %20, align 8, !tbaa !10
  %52 = icmp sgt i32 %51, 1073741824
  br i1 %52, label %53, label %54

53:                                               ; preds = %45
  call void (ptr, ...) @__errexit(ptr noundef nonnull @.str.8, i32 noundef %51, i32 noundef 1073741824, i64 noundef 4) #10
  %.pre = load i32, ptr %20, align 8, !tbaa !10
  br label %54

54:                                               ; preds = %53, %45
  %55 = phi i32 [ %.pre, %53 ], [ %51, %45 ]
  %56 = add nsw i32 %55, 1
  %57 = call ptr @__idxsmalloc(i32 noundef %56, i32 noundef 0, ptr noundef nonnull @.str.9) #10
  %58 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %57, ptr %58, align 8, !tbaa !17
  %59 = load i32, ptr %21, align 4, !tbaa !15
  %60 = call ptr @__idxmalloc(i32 noundef %59, ptr noundef nonnull @.str.10) #10
  %61 = getelementptr inbounds i8, ptr %0, i64 48
  store ptr %60, ptr %61, align 8, !tbaa !18
  br i1 %28, label %62, label %67

62:                                               ; preds = %54
  %63 = load i32, ptr %5, align 4, !tbaa !14
  %64 = load i32, ptr %20, align 8, !tbaa !10
  %65 = mul nsw i32 %64, %63
  %66 = call ptr @__idxmalloc(i32 noundef %65, ptr noundef nonnull @.str.11) #10
  br label %67

67:                                               ; preds = %54, %62
  %68 = phi ptr [ %66, %62 ], [ null, %54 ]
  %69 = getelementptr inbounds i8, ptr %0, i64 32
  store ptr %68, ptr %69, align 8, !tbaa !19
  br i1 %25, label %70, label %73

70:                                               ; preds = %67
  %71 = load i32, ptr %21, align 4, !tbaa !15
  %72 = call ptr @__idxmalloc(i32 noundef %71, ptr noundef nonnull @.str.12) #10
  br label %73

73:                                               ; preds = %67, %70
  %74 = phi ptr [ %72, %70 ], [ null, %67 ]
  %75 = getelementptr inbounds i8, ptr %0, i64 56
  store ptr %74, ptr %75, align 8, !tbaa !20
  store i32 0, ptr %57, align 4, !tbaa !14
  %76 = load i32, ptr %20, align 8, !tbaa !10
  %77 = icmp sgt i32 %76, 0
  br i1 %77, label %.preheader101, label %._crit_edge

.preheader101:                                    ; preds = %73, %.split108.us
  %indvars.iv133 = phi i64 [ %indvars.iv.next134, %.split108.us ], [ 0, %73 ]
  %.077118 = phi i32 [ %.us-phi, %.split108.us ], [ 0, %73 ]
  br label %78

78:                                               ; preds = %.preheader101, %80
  %79 = call ptr @fgets(ptr noundef %7, i32 noundef 1280000, ptr noundef nonnull %8)
  %cond = icmp eq ptr %79, null
  br i1 %cond, label %83, label %80

80:                                               ; preds = %78
  %81 = load i8, ptr %7, align 1, !tbaa !5
  %82 = icmp eq i8 %81, 37
  br i1 %82, label %78, label %.critedge3, !llvm.loop !21

83:                                               ; preds = %78
  %84 = call i32 @feof(ptr noundef nonnull %8) #10
  %.not88 = icmp eq i32 %84, 0
  br i1 %.not88, label %.critedge3, label %85

85:                                               ; preds = %83
  %86 = trunc nuw nsw i64 %indvars.iv133 to i32
  %87 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %88 = add nuw nsw i32 %86, 1
  %89 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13, i32 noundef %88)
  %90 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  call void @exit(i32 noundef 0) #12
  unreachable

.critedge3:                                       ; preds = %80, %83
  store ptr null, ptr %6, align 8, !tbaa !22
  %91 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %7) #13
  %92 = icmp eq i64 %91, 1280000
  br i1 %92, label %93, label %94

93:                                               ; preds = %.critedge3
  call void (ptr, ...) @__errexit(ptr noundef nonnull @.str.14) #10
  br label %94

94:                                               ; preds = %93, %.critedge3
  %95 = load i32, ptr %5, align 4
  %96 = icmp sgt i32 %95, 0
  %or.cond122 = select i1 %28, i1 %96, i1 false
  br i1 %or.cond122, label %.lr.ph.preheader, label %.loopexit

.lr.ph.preheader:                                 ; preds = %94
  %97 = trunc nuw nsw i64 %indvars.iv133 to i32
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %.076106 = phi ptr [ %105, %.lr.ph ], [ %7, %.lr.ph.preheader ]
  %.079105 = phi i32 [ %106, %.lr.ph ], [ 0, %.lr.ph.preheader ]
  %98 = call i64 @strtol(ptr noundef %.076106, ptr noundef nonnull %6, i32 noundef 10) #10
  %99 = trunc i64 %98 to i32
  %100 = load i32, ptr %5, align 4, !tbaa !14
  %101 = mul nsw i32 %100, %97
  %102 = add nsw i32 %101, %.079105
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds i32, ptr %68, i64 %103
  store i32 %99, ptr %104, align 4, !tbaa !14
  %105 = load ptr, ptr %6, align 8, !tbaa !22
  %106 = add nuw nsw i32 %.079105, 1
  %107 = load i32, ptr %5, align 4, !tbaa !14
  %108 = icmp slt i32 %106, %107
  br i1 %108, label %.lr.ph, label %.loopexit, !llvm.loop !23

.loopexit:                                        ; preds = %.lr.ph, %94
  %.1 = phi ptr [ %7, %94 ], [ %105, %.lr.ph ]
  %109 = call i64 @strtol(ptr noundef %.1, ptr noundef nonnull %6, i32 noundef 10) #10
  %110 = trunc i64 %109 to i32
  br i1 %25, label %.split.us, label %.split

.split.us:                                        ; preds = %.loopexit
  %111 = load ptr, ptr %6, align 8, !tbaa !22
  %112 = call i64 @strtol(ptr noundef %111, ptr noundef nonnull %6, i32 noundef 10) #10
  %113 = icmp slt i32 %110, 1
  br i1 %113, label %.split108.us, label %.lr.ph114.preheader

.lr.ph114.preheader:                              ; preds = %.split.us
  %114 = sext i32 %.077118 to i64
  br label %.lr.ph114

.lr.ph114:                                        ; preds = %.lr.ph114.preheader, %.lr.ph114
  %indvars.iv130 = phi i64 [ %114, %.lr.ph114.preheader ], [ %indvars.iv.next131, %.lr.ph114 ]
  %.in136 = phi i64 [ %112, %.lr.ph114.preheader ], [ %123, %.lr.ph114 ]
  %.in123 = phi i32 [ %110, %.lr.ph114.preheader ], [ %121, %.lr.ph114 ]
  %115 = trunc i64 %.in136 to i32
  %116 = add nsw i32 %.in123, -1
  %117 = load ptr, ptr %6, align 8, !tbaa !22
  %118 = getelementptr inbounds i32, ptr %60, i64 %indvars.iv130
  store i32 %116, ptr %118, align 4, !tbaa !14
  %119 = getelementptr inbounds i32, ptr %74, i64 %indvars.iv130
  store i32 %115, ptr %119, align 4, !tbaa !14
  %indvars.iv.next131 = add nsw i64 %indvars.iv130, 1
  %120 = call i64 @strtol(ptr noundef %117, ptr noundef nonnull %6, i32 noundef 10) #10
  %121 = trunc i64 %120 to i32
  %122 = load ptr, ptr %6, align 8, !tbaa !22
  %123 = call i64 @strtol(ptr noundef %122, ptr noundef nonnull %6, i32 noundef 10) #10
  %124 = icmp slt i32 %121, 1
  br i1 %124, label %.split108.us.loopexit, label %.lr.ph114

.split:                                           ; preds = %.loopexit
  %125 = icmp slt i32 %110, 1
  br i1 %125, label %.split108.us, label %.thread96.preheader

.thread96.preheader:                              ; preds = %.split
  %126 = sext i32 %.077118 to i64
  br label %.thread96

.thread96:                                        ; preds = %.thread96.preheader, %.thread96
  %indvars.iv = phi i64 [ %126, %.thread96.preheader ], [ %indvars.iv.next, %.thread96 ]
  %.in = phi i32 [ %110, %.thread96.preheader ], [ %131, %.thread96 ]
  %127 = add nsw i32 %.in, -1
  %128 = load ptr, ptr %6, align 8, !tbaa !22
  %129 = getelementptr inbounds i32, ptr %60, i64 %indvars.iv
  store i32 %127, ptr %129, align 4, !tbaa !14
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %130 = call i64 @strtol(ptr noundef %128, ptr noundef nonnull %6, i32 noundef 10) #10
  %131 = trunc i64 %130 to i32
  %132 = icmp slt i32 %131, 1
  br i1 %132, label %.split108.us.loopexit124, label %.thread96

.split108.us.loopexit:                            ; preds = %.lr.ph114
  %133 = trunc nsw i64 %indvars.iv.next131 to i32
  br label %.split108.us

.split108.us.loopexit124:                         ; preds = %.thread96
  %134 = trunc nsw i64 %indvars.iv.next to i32
  br label %.split108.us

.split108.us:                                     ; preds = %.split108.us.loopexit124, %.split108.us.loopexit, %.split, %.split.us
  %.us-phi = phi i32 [ %.077118, %.split.us ], [ %.077118, %.split ], [ %133, %.split108.us.loopexit ], [ %134, %.split108.us.loopexit124 ]
  %indvars.iv.next134 = add nuw nsw i64 %indvars.iv133, 1
  %135 = getelementptr inbounds i32, ptr %57, i64 %indvars.iv.next134
  store i32 %.us-phi, ptr %135, align 4, !tbaa !14
  %136 = load i32, ptr %20, align 8, !tbaa !10
  %137 = sext i32 %136 to i64
  %138 = icmp slt i64 %indvars.iv.next134, %137
  br i1 %138, label %.preheader101, label %._crit_edge, !llvm.loop !24

._crit_edge:                                      ; preds = %.split108.us, %73
  %.077.lcssa = phi i32 [ 0, %73 ], [ %.us-phi, %.split108.us ]
  %139 = call i32 @fclose(ptr noundef nonnull %8)
  %140 = load i32, ptr %21, align 4, !tbaa !15
  %.not86 = icmp eq i32 %.077.lcssa, %140
  br i1 %.not86, label %158, label %141

141:                                              ; preds = %._crit_edge
  %142 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %143 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  %144 = load i32, ptr %21, align 4, !tbaa !15
  %145 = sdiv i32 %144, 2
  %146 = sdiv i32 %.077.lcssa, 2
  %147 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15, i32 noundef %145, i32 noundef %146)
  %148 = shl nsw i32 %.077.lcssa, 1
  %149 = load i32, ptr %21, align 4, !tbaa !15
  %150 = icmp eq i32 %148, %149
  br i1 %150, label %151, label %155

151:                                              ; preds = %141
  %152 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16)
  %153 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17)
  %154 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18)
  br label %155

155:                                              ; preds = %151, %141
  %156 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.19)
  %157 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  call void @exit(i32 noundef 0) #12
  unreachable

158:                                              ; preds = %._crit_edge
  call void @free(ptr noundef %7) #10
  br label %159

159:                                              ; preds = %158, %17
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #10
  ret void
}

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

declare void @__InitGraph(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noundef ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i32 @feof(ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #6

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_sscanf(ptr nocapture noundef readonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #4

declare void @__errexit(ptr noundef, ...) local_unnamed_addr #2

declare ptr @__idxsmalloc(i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

declare ptr @__idxmalloc(i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #7

; Function Attrs: mustprogress nofree nounwind willreturn
declare i64 @strtol(ptr noundef readonly, ptr nocapture noundef, i32 noundef) local_unnamed_addr #8

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #4

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #9

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { mustprogress nofree nounwind willreturn "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 #9 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #10 = { nounwind }
attributes #11 = { nounwind allocsize(0) }
attributes #12 = { noreturn nounwind }
attributes #13 = { nounwind willreturn memory(read) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = !{!11, !13, i64 16}
!11 = !{!"graphdef", !12, i64 0, !12, i64 8, !13, i64 16, !13, i64 20, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !12, i64 80, !13, i64 88, !13, i64 92, !12, i64 96, !12, i64 104, !13, i64 112, !12, i64 120, !12, i64 128, !12, i64 136, !12, i64 144, !12, i64 152, !12, i64 160, !12, i64 168, !13, i64 176, !12, i64 184, !12, i64 192, !12, i64 200, !12, i64 208}
!12 = !{!"any pointer", !6, i64 0}
!13 = !{!"int", !6, i64 0}
!14 = !{!13, !13, i64 0}
!15 = !{!11, !13, i64 20}
!16 = !{!11, !13, i64 176}
!17 = !{!11, !12, i64 24}
!18 = !{!11, !12, i64 48}
!19 = !{!11, !12, i64 32}
!20 = !{!11, !12, i64 56}
!21 = distinct !{!21, !9}
!22 = !{!12, !12, i64 0}
!23 = distinct !{!23, !9}
!24 = distinct !{!24, !9}


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