; LLVM IR from tangjz/acm-icpc :: lydsy (4296)

; 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.Edge = type { i32, i32 }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@d = external dso_local global i32, align 4
@tot = external dso_local global i32, align 4
@pre = external dso_local global [200001 x i32], align 16
@deg = external dso_local global [200001 x i32], align 16
@que = external dso_local global [200001 x i32], align 16
@L = external dso_local global i32, align 4
@R = external dso_local global i32, align 4
@fa = external dso_local global [200001 x i32], align 16
@sz = external dso_local global [200001 x i32], align 16
@e = external dso_local global [400002 x %struct.Edge], align 16
@vis = external dso_local global [200001 x i8], align 16
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z4findi(i32 noundef) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %struct.Edge, align 4
  %5 = alloca %struct.Edge, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %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
  store i32 0, ptr %1, align 4
  %17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m, ptr noundef @d)
  br label %18

18:                                               ; preds = %22, %0
  %19 = load i32, ptr @m, align 4, !tbaa !5
  %20 = add nsw i32 %19, -1
  store i32 %20, ptr @m, align 4, !tbaa !5
  %21 = icmp ne i32 %19, 0
  br i1 %21, label %22, label %64

22:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %2, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %24 = getelementptr inbounds %struct.Edge, ptr %4, i32 0, i32 0
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [200001 x i32], ptr @pre, i64 0, i64 %26
  %28 = load i32, ptr %27, align 4, !tbaa !5
  store i32 %28, ptr %24, align 4, !tbaa !9
  %29 = getelementptr inbounds %struct.Edge, ptr %4, i32 0, i32 1
  %30 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %30, ptr %29, align 4, !tbaa !11
  %31 = load i32, ptr @tot, align 4, !tbaa !5
  %32 = add nsw i32 %31, 1
  store i32 %32, ptr @tot, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [400002 x %struct.Edge], ptr @e, i64 0, i64 %33
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %34, ptr align 4 %4, i64 8, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  %35 = load i32, ptr @tot, align 4, !tbaa !5
  %36 = load i32, ptr %2, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [200001 x i32], ptr @pre, i64 0, i64 %37
  store i32 %35, ptr %38, align 4, !tbaa !5
  %39 = load i32, ptr %2, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [200001 x i32], ptr @deg, i64 0, i64 %40
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %41, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %44 = getelementptr inbounds %struct.Edge, ptr %5, i32 0, i32 0
  %45 = load i32, ptr %3, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [200001 x i32], ptr @pre, i64 0, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !5
  store i32 %48, ptr %44, align 4, !tbaa !9
  %49 = getelementptr inbounds %struct.Edge, ptr %5, i32 0, i32 1
  %50 = load i32, ptr %2, align 4, !tbaa !5
  store i32 %50, ptr %49, align 4, !tbaa !11
  %51 = load i32, ptr @tot, align 4, !tbaa !5
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr @tot, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [400002 x %struct.Edge], ptr @e, i64 0, i64 %53
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %54, ptr align 4 %5, i64 8, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  %55 = load i32, ptr @tot, align 4, !tbaa !5
  %56 = load i32, ptr %3, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [200001 x i32], ptr @pre, i64 0, i64 %57
  store i32 %55, ptr %58, align 4, !tbaa !5
  %59 = load i32, ptr %3, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [200001 x i32], ptr @deg, i64 0, i64 %60
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %61, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %18, !llvm.loop !13

64:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %65

65:                                               ; preds = %87, %64
  %66 = load i32, ptr %6, align 4, !tbaa !5
  %67 = load i32, ptr @n, align 4, !tbaa !5
  %68 = icmp sle i32 %66, %67
  br i1 %68, label %70, label %69

69:                                               ; preds = %65
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %90

70:                                               ; preds = %65
  %71 = load i32, ptr %6, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [200001 x i32], ptr @deg, i64 0, i64 %72
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = load i32, ptr @d, align 4, !tbaa !5
  %76 = icmp slt i32 %74, %75
  br i1 %76, label %77, label %86

77:                                               ; preds = %70
  %78 = load i32, ptr %6, align 4, !tbaa !5
  %79 = load i32, ptr @R, align 4, !tbaa !5
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr @R, align 4, !tbaa !5
  %81 = sext i32 %79 to i64
  %82 = getelementptr inbounds [200001 x i32], ptr @que, i64 0, i64 %81
  store i32 %78, ptr %82, align 4, !tbaa !5
  %83 = load i32, ptr %6, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [200001 x i8], ptr @vis, i64 0, i64 %84
  store i8 1, ptr %85, align 1, !tbaa !15
  br label %86

86:                                               ; preds = %77, %70
  br label %87

87:                                               ; preds = %86
  %88 = load i32, ptr %6, align 4, !tbaa !5
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %6, align 4, !tbaa !5
  br label %65, !llvm.loop !17

90:                                               ; preds = %69
  br label %91

91:                                               ; preds = %151, %90
  %92 = load i32, ptr @L, align 4, !tbaa !5
  %93 = load i32, ptr @R, align 4, !tbaa !5
  %94 = icmp slt i32 %92, %93
  br i1 %94, label %95, label %152

95:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %96 = load i32, ptr @L, align 4, !tbaa !5
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr @L, align 4, !tbaa !5
  %98 = sext i32 %96 to i64
  %99 = getelementptr inbounds [200001 x i32], ptr @que, i64 0, i64 %98
  store ptr %99, ptr %7, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %100 = load ptr, ptr %7, align 8, !tbaa !18
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [200001 x i32], ptr @pre, i64 0, i64 %102
  %104 = load i32, ptr %103, align 4, !tbaa !5
  store i32 %104, ptr %8, align 4, !tbaa !5
  br label %105

105:                                              ; preds = %145, %95
  %106 = load i32, ptr %8, align 4, !tbaa !5
  %107 = icmp ne i32 %106, 0
  br i1 %107, label %109, label %108

108:                                              ; preds = %105
  store i32 9, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %151

109:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %110 = load i32, ptr %8, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [400002 x %struct.Edge], ptr @e, i64 0, i64 %111
  %113 = getelementptr inbounds %struct.Edge, ptr %112, i32 0, i32 1
  store ptr %113, ptr %10, align 8, !tbaa !18
  %114 = load ptr, ptr %10, align 8, !tbaa !18
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [200001 x i8], ptr @vis, i64 0, i64 %116
  %118 = load i8, ptr %117, align 1, !tbaa !15, !range !20, !noundef !21
  %119 = trunc i8 %118 to i1
  br i1 %119, label %120, label %121

120:                                              ; preds = %109
  store i32 11, ptr %9, align 4
  br label %142

121:                                              ; preds = %109
  %122 = load ptr, ptr %10, align 8, !tbaa !18
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [200001 x i32], ptr @deg, i64 0, i64 %124
  %126 = load i32, ptr %125, align 4, !tbaa !5
  %127 = add nsw i32 %126, -1
  store i32 %127, ptr %125, align 4, !tbaa !5
  %128 = load i32, ptr @d, align 4, !tbaa !5
  %129 = icmp slt i32 %127, %128
  br i1 %129, label %130, label %141

130:                                              ; preds = %121
  %131 = load ptr, ptr %10, align 8, !tbaa !18
  %132 = load i32, ptr %131, align 4, !tbaa !5
  %133 = load i32, ptr @R, align 4, !tbaa !5
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr @R, align 4, !tbaa !5
  %135 = sext i32 %133 to i64
  %136 = getelementptr inbounds [200001 x i32], ptr @que, i64 0, i64 %135
  store i32 %132, ptr %136, align 4, !tbaa !5
  %137 = load ptr, ptr %10, align 8, !tbaa !18
  %138 = load i32, ptr %137, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [200001 x i8], ptr @vis, i64 0, i64 %139
  store i8 1, ptr %140, align 1, !tbaa !15
  br label %141

141:                                              ; preds = %130, %121
  store i32 0, ptr %9, align 4
  br label %142

142:                                              ; preds = %141, %120
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  %143 = load i32, ptr %9, align 4
  switch i32 %143, label %329 [
    i32 0, label %144
    i32 11, label %145
  ]

144:                                              ; preds = %142
  br label %145

145:                                              ; preds = %144, %142
  %146 = load i32, ptr %8, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [400002 x %struct.Edge], ptr @e, i64 0, i64 %147
  %149 = getelementptr inbounds %struct.Edge, ptr %148, i32 0, i32 0
  %150 = load i32, ptr %149, align 8, !tbaa !9
  store i32 %150, ptr %8, align 4, !tbaa !5
  br label %105, !llvm.loop !22

151:                                              ; preds = %108
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %91, !llvm.loop !23

152:                                              ; preds = %91
  %153 = load i32, ptr @R, align 4, !tbaa !5
  %154 = load i32, ptr @n, align 4, !tbaa !5
  %155 = icmp eq i32 %153, %154
  br i1 %155, label %156, label %158

156:                                              ; preds = %152
  %157 = call i32 @puts(ptr noundef @.str.2)
  br label %328

158:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %159

159:                                              ; preds = %179, %158
  %160 = load i32, ptr %11, align 4, !tbaa !5
  %161 = load i32, ptr @n, align 4, !tbaa !5
  %162 = icmp sle i32 %160, %161
  br i1 %162, label %164, label %163

163:                                              ; preds = %159
  store i32 12, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %182

164:                                              ; preds = %159
  %165 = load i32, ptr %11, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [200001 x i8], ptr @vis, i64 0, i64 %166
  %168 = load i8, ptr %167, align 1, !tbaa !15, !range !20, !noundef !21
  %169 = trunc i8 %168 to i1
  br i1 %169, label %178, label %170

170:                                              ; preds = %164
  %171 = load i32, ptr %11, align 4, !tbaa !5
  %172 = load i32, ptr %11, align 4, !tbaa !5
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [200001 x i32], ptr @fa, i64 0, i64 %173
  store i32 %171, ptr %174, align 4, !tbaa !5
  %175 = load i32, ptr %11, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [200001 x i32], ptr @sz, i64 0, i64 %176
  store i32 1, ptr %177, align 4, !tbaa !5
  br label %178

178:                                              ; preds = %170, %164
  br label %179

179:                                              ; preds = %178
  %180 = load i32, ptr %11, align 4, !tbaa !5
  %181 = add nsw i32 %180, 1
  store i32 %181, ptr %11, align 4, !tbaa !5
  br label %159, !llvm.loop !24

182:                                              ; preds = %163
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %183

183:                                              ; preds = %258, %182
  %184 = load i32, ptr %12, align 4, !tbaa !5
  %185 = load i32, ptr @n, align 4, !tbaa !5
  %186 = icmp sle i32 %184, %185
  br i1 %186, label %188, label %187

187:                                              ; preds = %183
  store i32 15, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %261

188:                                              ; preds = %183
  %189 = load i32, ptr %12, align 4, !tbaa !5
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [200001 x i8], ptr @vis, i64 0, i64 %190
  %192 = load i8, ptr %191, align 1, !tbaa !15, !range !20, !noundef !21
  %193 = trunc i8 %192 to i1
  br i1 %193, label %257, label %194

194:                                              ; preds = %188
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %195 = load i32, ptr %12, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [200001 x i32], ptr @pre, i64 0, i64 %196
  %198 = load i32, ptr %197, align 4, !tbaa !5
  store i32 %198, ptr %13, align 4, !tbaa !5
  br label %199

199:                                              ; preds = %250, %194
  %200 = load i32, ptr %13, align 4, !tbaa !5
  %201 = icmp ne i32 %200, 0
  br i1 %201, label %203, label %202

202:                                              ; preds = %199
  store i32 18, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %256

203:                                              ; preds = %199
  %204 = load i32, ptr %13, align 4, !tbaa !5
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds [400002 x %struct.Edge], ptr @e, i64 0, i64 %205
  %207 = getelementptr inbounds %struct.Edge, ptr %206, i32 0, i32 1
  %208 = load i32, ptr %207, align 4, !tbaa !11
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds [200001 x i8], ptr @vis, i64 0, i64 %209
  %211 = load i8, ptr %210, align 1, !tbaa !15, !range !20, !noundef !21
  %212 = trunc i8 %211 to i1
  br i1 %212, label %249, label %213

213:                                              ; preds = %203
  %214 = load i32, ptr %12, align 4, !tbaa !5
  %215 = call noundef i32 @_Z4findi(i32 noundef %214)
  %216 = load i32, ptr %13, align 4, !tbaa !5
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds [400002 x %struct.Edge], ptr @e, i64 0, i64 %217
  %219 = getelementptr inbounds %struct.Edge, ptr %218, i32 0, i32 1
  %220 = load i32, ptr %219, align 4, !tbaa !11
  %221 = call noundef i32 @_Z4findi(i32 noundef %220)
  %222 = icmp ne i32 %215, %221
  br i1 %222, label %223, label %249

223:                                              ; preds = %213
  %224 = load i32, ptr %13, align 4, !tbaa !5
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds [400002 x %struct.Edge], ptr @e, i64 0, i64 %225
  %227 = getelementptr inbounds %struct.Edge, ptr %226, i32 0, i32 1
  %228 = load i32, ptr %227, align 4, !tbaa !11
  %229 = call noundef i32 @_Z4findi(i32 noundef %228)
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds [200001 x i32], ptr @sz, i64 0, i64 %230
  %232 = load i32, ptr %231, align 4, !tbaa !5
  %233 = load i32, ptr %12, align 4, !tbaa !5
  %234 = call noundef i32 @_Z4findi(i32 noundef %233)
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds [200001 x i32], ptr @sz, i64 0, i64 %235
  %237 = load i32, ptr %236, align 4, !tbaa !5
  %238 = add nsw i32 %237, %232
  store i32 %238, ptr %236, align 4, !tbaa !5
  %239 = load i32, ptr %12, align 4, !tbaa !5
  %240 = call noundef i32 @_Z4findi(i32 noundef %239)
  %241 = load i32, ptr %13, align 4, !tbaa !5
  %242 = sext i32 %241 to i64
  %243 = getelementptr inbounds [400002 x %struct.Edge], ptr @e, i64 0, i64 %242
  %244 = getelementptr inbounds %struct.Edge, ptr %243, i32 0, i32 1
  %245 = load i32, ptr %244, align 4, !tbaa !11
  %246 = call noundef i32 @_Z4findi(i32 noundef %245)
  %247 = sext i32 %246 to i64
  %248 = getelementptr inbounds [200001 x i32], ptr @fa, i64 0, i64 %247
  store i32 %240, ptr %248, align 4, !tbaa !5
  br label %249

249:                                              ; preds = %223, %213, %203
  br label %250

250:                                              ; preds = %249
  %251 = load i32, ptr %13, align 4, !tbaa !5
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds [400002 x %struct.Edge], ptr @e, i64 0, i64 %252
  %254 = getelementptr inbounds %struct.Edge, ptr %253, i32 0, i32 0
  %255 = load i32, ptr %254, align 8, !tbaa !9
  store i32 %255, ptr %13, align 4, !tbaa !5
  br label %199, !llvm.loop !25

256:                                              ; preds = %202
  br label %257

257:                                              ; preds = %256, %188
  br label %258

258:                                              ; preds = %257
  %259 = load i32, ptr %12, align 4, !tbaa !5
  %260 = add nsw i32 %259, 1
  store i32 %260, ptr %12, align 4, !tbaa !5
  br label %183, !llvm.loop !26

261:                                              ; preds = %187
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 -1, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 1, ptr %15, align 4, !tbaa !5
  br label %262

262:                                              ; preds = %294, %261
  %263 = load i32, ptr %15, align 4, !tbaa !5
  %264 = load i32, ptr @n, align 4, !tbaa !5
  %265 = icmp sle i32 %263, %264
  br i1 %265, label %267, label %266

266:                                              ; preds = %262
  store i32 21, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %297

267:                                              ; preds = %262
  %268 = load i32, ptr %15, align 4, !tbaa !5
  %269 = sext i32 %268 to i64
  %270 = getelementptr inbounds [200001 x i8], ptr @vis, i64 0, i64 %269
  %271 = load i8, ptr %270, align 1, !tbaa !15, !range !20, !noundef !21
  %272 = trunc i8 %271 to i1
  br i1 %272, label %293, label %273

273:                                              ; preds = %267
  %274 = load i32, ptr %15, align 4, !tbaa !5
  %275 = load i32, ptr %15, align 4, !tbaa !5
  %276 = call noundef i32 @_Z4findi(i32 noundef %275)
  %277 = icmp eq i32 %274, %276
  br i1 %277, label %278, label %293

278:                                              ; preds = %273
  %279 = load i32, ptr %14, align 4, !tbaa !5
  %280 = icmp eq i32 %279, -1
  br i1 %280, label %291, label %281

281:                                              ; preds = %278
  %282 = load i32, ptr %14, align 4, !tbaa !5
  %283 = sext i32 %282 to i64
  %284 = getelementptr inbounds [200001 x i32], ptr @sz, i64 0, i64 %283
  %285 = load i32, ptr %284, align 4, !tbaa !5
  %286 = load i32, ptr %15, align 4, !tbaa !5
  %287 = sext i32 %286 to i64
  %288 = getelementptr inbounds [200001 x i32], ptr @sz, i64 0, i64 %287
  %289 = load i32, ptr %288, align 4, !tbaa !5
  %290 = icmp slt i32 %285, %289
  br i1 %290, label %291, label %293

291:                                              ; preds = %281, %278
  %292 = load i32, ptr %15, align 4, !tbaa !5
  store i32 %292, ptr %14, align 4, !tbaa !5
  br label %293

293:                                              ; preds = %291, %281, %273, %267
  br label %294

294:                                              ; preds = %293
  %295 = load i32, ptr %15, align 4, !tbaa !5
  %296 = add nsw i32 %295, 1
  store i32 %296, ptr %15, align 4, !tbaa !5
  br label %262, !llvm.loop !27

297:                                              ; preds = %266
  %298 = load i32, ptr %14, align 4, !tbaa !5
  %299 = sext i32 %298 to i64
  %300 = getelementptr inbounds [200001 x i32], ptr @sz, i64 0, i64 %299
  %301 = load i32, ptr %300, align 4, !tbaa !5
  %302 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %301)
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 1, ptr %16, align 4, !tbaa !5
  br label %303

303:                                              ; preds = %323, %297
  %304 = load i32, ptr %16, align 4, !tbaa !5
  %305 = load i32, ptr @n, align 4, !tbaa !5
  %306 = icmp sle i32 %304, %305
  br i1 %306, label %308, label %307

307:                                              ; preds = %303
  store i32 24, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %326

308:                                              ; preds = %303
  %309 = load i32, ptr %16, align 4, !tbaa !5
  %310 = sext i32 %309 to i64
  %311 = getelementptr inbounds [200001 x i8], ptr @vis, i64 0, i64 %310
  %312 = load i8, ptr %311, align 1, !tbaa !15, !range !20, !noundef !21
  %313 = trunc i8 %312 to i1
  br i1 %313, label %322, label %314

314:                                              ; preds = %308
  %315 = load i32, ptr %16, align 4, !tbaa !5
  %316 = call noundef i32 @_Z4findi(i32 noundef %315)
  %317 = load i32, ptr %14, align 4, !tbaa !5
  %318 = icmp eq i32 %316, %317
  br i1 %318, label %319, label %322

319:                                              ; preds = %314
  %320 = load i32, ptr %16, align 4, !tbaa !5
  %321 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %320)
  br label %322

322:                                              ; preds = %319, %314, %308
  br label %323

323:                                              ; preds = %322
  %324 = load i32, ptr %16, align 4, !tbaa !5
  %325 = add nsw i32 %324, 1
  store i32 %325, ptr %16, align 4, !tbaa !5
  br label %303, !llvm.loop !28

326:                                              ; preds = %307
  %327 = call i32 @putchar(i32 noundef 10)
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %328

328:                                              ; preds = %326, %156
  ret i32 0

329:                                              ; preds = %142
  unreachable
}

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

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

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

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

declare i32 @puts(ptr noundef) #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare i32 @putchar(i32 noundef) #5

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

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

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


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

%struct.Edge = type { i32, i32 }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@d = external dso_local global i32, align 4
@tot = external dso_local local_unnamed_addr global i32, align 4
@pre = external dso_local local_unnamed_addr global [200001 x i32], align 16
@deg = external dso_local local_unnamed_addr global [200001 x i32], align 16
@que = external dso_local local_unnamed_addr global [200001 x i32], align 16
@L = external dso_local local_unnamed_addr global i32, align 4
@R = external dso_local local_unnamed_addr global i32, align 4
@fa = external dso_local local_unnamed_addr global [200001 x i32], align 16
@sz = external dso_local local_unnamed_addr global [200001 x i32], align 16
@e = external dso_local local_unnamed_addr global [400002 x %struct.Edge], align 16
@vis = external dso_local local_unnamed_addr global [200001 x i8], align 16
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z4findi(i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m, ptr noundef nonnull @d)
  %4 = load i32, ptr @m, align 4, !tbaa !5
  %5 = add nsw i32 %4, -1
  store i32 %5, ptr @m, align 4, !tbaa !5
  %.not73 = icmp eq i32 %4, 0
  br i1 %.not73, label %.preheader71, label %.lr.ph

.preheader71:                                     ; preds = %.lr.ph, %0
  %6 = load i32, ptr @n, align 4, !tbaa !5
  %.not5874 = icmp slt i32 %6, 1
  %R.promoted82.pre = load i32, ptr @R, align 4, !tbaa !5
  br i1 %.not5874, label %.preheader70, label %.lr.ph76

.lr.ph76:                                         ; preds = %.preheader71
  %7 = load i32, ptr @d, align 4, !tbaa !5
  %8 = zext nneg i32 %6 to i64
  %xtraiter = and i64 %8, 1
  %9 = icmp eq i32 %6, 1
  br i1 %9, label %.preheader70.loopexit.unr-lcssa, label %.lr.ph76.new

.lr.ph76.new:                                     ; preds = %.lr.ph76
  %unroll_iter = and i64 %8, 2147483646
  br label %46

.lr.ph:                                           ; preds = %0, %.lr.ph
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %11 = load i32, ptr %1, align 4, !tbaa !5
  %12 = sext i32 %11 to i64
  %13 = getelementptr inbounds [200001 x i32], ptr @pre, i64 0, i64 %12
  %14 = load i32, ptr %13, align 4, !tbaa !5
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = load i32, ptr @tot, align 4, !tbaa !5
  %17 = add nsw i32 %16, 1
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [400002 x %struct.Edge], ptr @e, i64 0, i64 %18
  store i32 %14, ptr %19, align 8, !tbaa !5
  %.sroa.448.0..sroa_idx = getelementptr inbounds i8, ptr %19, i64 4
  store i32 %15, ptr %.sroa.448.0..sroa_idx, align 4, !tbaa !5
  store i32 %17, ptr %13, align 4, !tbaa !5
  %20 = getelementptr inbounds [200001 x i32], ptr @deg, i64 0, i64 %12
  %21 = load i32, ptr %20, align 4, !tbaa !5
  %22 = add nsw i32 %21, 1
  store i32 %22, ptr %20, align 4, !tbaa !5
  %23 = sext i32 %15 to i64
  %24 = getelementptr inbounds [200001 x i32], ptr @pre, i64 0, i64 %23
  %25 = load i32, ptr %24, align 4, !tbaa !5
  %26 = add nsw i32 %16, 2
  store i32 %26, ptr @tot, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [400002 x %struct.Edge], ptr @e, i64 0, i64 %27
  store i32 %25, ptr %28, align 8, !tbaa !5
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %28, i64 4
  store i32 %11, ptr %.sroa.4.0..sroa_idx, align 4, !tbaa !5
  store i32 %26, ptr %24, align 4, !tbaa !5
  %29 = getelementptr inbounds [200001 x i32], ptr @deg, i64 0, i64 %23
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %31 = add nsw i32 %30, 1
  store i32 %31, ptr %29, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  %32 = load i32, ptr @m, align 4, !tbaa !5
  %33 = add nsw i32 %32, -1
  store i32 %33, ptr @m, align 4, !tbaa !5
  %.not = icmp eq i32 %32, 0
  br i1 %.not, label %.preheader71, label %.lr.ph, !llvm.loop !9

.preheader70.loopexit.unr-lcssa:                  ; preds = %68, %.lr.ph76
  %.lcssa139.ph = phi i32 [ poison, %.lr.ph76 ], [ %69, %68 ]
  %indvars.iv.unr = phi i64 [ 1, %.lr.ph76 ], [ %indvars.iv.next.1, %68 ]
  %.unr = phi i32 [ %R.promoted82.pre, %.lr.ph76 ], [ %69, %68 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader70, label %.epil.preheader

.epil.preheader:                                  ; preds = %.preheader70.loopexit.unr-lcssa
  %34 = getelementptr inbounds [200001 x i32], ptr @deg, i64 0, i64 %indvars.iv.unr
  %35 = load i32, ptr %34, align 4, !tbaa !5
  %36 = icmp slt i32 %35, %7
  br i1 %36, label %37, label %.preheader70

37:                                               ; preds = %.epil.preheader
  %38 = add nsw i32 %.unr, 1
  store i32 %38, ptr @R, align 4, !tbaa !5
  %39 = sext i32 %.unr to i64
  %40 = getelementptr inbounds [200001 x i32], ptr @que, i64 0, i64 %39
  %41 = trunc nuw nsw i64 %indvars.iv.unr to i32
  store i32 %41, ptr %40, align 4, !tbaa !5
  %42 = getelementptr inbounds [200001 x i8], ptr @vis, i64 0, i64 %indvars.iv.unr
  store i8 1, ptr %42, align 1, !tbaa !11
  br label %.preheader70

.preheader70:                                     ; preds = %.preheader70.loopexit.unr-lcssa, %37, %.epil.preheader, %.preheader71
  %R.promoted82 = phi i32 [ %R.promoted82.pre, %.preheader71 ], [ %.lcssa139.ph, %.preheader70.loopexit.unr-lcssa ], [ %.unr, %.epil.preheader ], [ %38, %37 ]
  %L.promoted = load i32, ptr @L, align 4, !tbaa !5
  %43 = icmp slt i32 %L.promoted, %R.promoted82
  br i1 %43, label %.lr.ph88, label %97

.lr.ph88:                                         ; preds = %.preheader70
  %44 = load i32, ptr @d, align 4
  %45 = sext i32 %L.promoted to i64
  br label %72

46:                                               ; preds = %68, %.lr.ph76.new
  %indvars.iv = phi i64 [ 1, %.lr.ph76.new ], [ %indvars.iv.next.1, %68 ]
  %47 = phi i32 [ %R.promoted82.pre, %.lr.ph76.new ], [ %69, %68 ]
  %niter = phi i64 [ 0, %.lr.ph76.new ], [ %niter.next.1, %68 ]
  %48 = getelementptr inbounds [200001 x i32], ptr @deg, i64 0, i64 %indvars.iv
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = icmp slt i32 %49, %7
  br i1 %50, label %51, label %57

51:                                               ; preds = %46
  %52 = add nsw i32 %47, 1
  store i32 %52, ptr @R, align 4, !tbaa !5
  %53 = sext i32 %47 to i64
  %54 = getelementptr inbounds [200001 x i32], ptr @que, i64 0, i64 %53
  %55 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %55, ptr %54, align 4, !tbaa !5
  %56 = getelementptr inbounds [200001 x i8], ptr @vis, i64 0, i64 %indvars.iv
  store i8 1, ptr %56, align 1, !tbaa !11
  br label %57

57:                                               ; preds = %46, %51
  %58 = phi i32 [ %47, %46 ], [ %52, %51 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %59 = getelementptr inbounds [200001 x i32], ptr @deg, i64 0, i64 %indvars.iv.next
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = icmp slt i32 %60, %7
  br i1 %61, label %62, label %68

62:                                               ; preds = %57
  %63 = add nsw i32 %58, 1
  store i32 %63, ptr @R, align 4, !tbaa !5
  %64 = sext i32 %58 to i64
  %65 = getelementptr inbounds [200001 x i32], ptr @que, i64 0, i64 %64
  %66 = trunc nuw nsw i64 %indvars.iv.next to i32
  store i32 %66, ptr %65, align 4, !tbaa !5
  %67 = getelementptr inbounds [200001 x i8], ptr @vis, i64 0, i64 %indvars.iv.next
  store i8 1, ptr %67, align 1, !tbaa !11
  br label %68

68:                                               ; preds = %62, %57
  %69 = phi i32 [ %58, %57 ], [ %63, %62 ]
  %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 %.preheader70.loopexit.unr-lcssa, label %46, !llvm.loop !13

.loopexit69:                                      ; preds = %94, %72
  %R.promoted7785 = phi i32 [ %R.promoted778687, %72 ], [ %R.promoted7783, %94 ]
  %70 = sext i32 %R.promoted7785 to i64
  %71 = icmp slt i64 %indvars.iv.next116, %70
  br i1 %71, label %72, label %._crit_edge, !llvm.loop !14

72:                                               ; preds = %.lr.ph88, %.loopexit69
  %indvars.iv115 = phi i64 [ %45, %.lr.ph88 ], [ %indvars.iv.next116, %.loopexit69 ]
  %R.promoted778687 = phi i32 [ %R.promoted82, %.lr.ph88 ], [ %R.promoted7785, %.loopexit69 ]
  %indvars.iv.next116 = add nsw i64 %indvars.iv115, 1
  %73 = getelementptr inbounds [200001 x i32], ptr @que, i64 0, i64 %indvars.iv115
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [200001 x i32], ptr @pre, i64 0, i64 %75
  %.05578 = load i32, ptr %76, align 4, !tbaa !5
  %.not6579 = icmp eq i32 %.05578, 0
  br i1 %.not6579, label %.loopexit69, label %.lr.ph81

.lr.ph81:                                         ; preds = %72, %94
  %R.promoted7784 = phi i32 [ %R.promoted7783, %94 ], [ %R.promoted778687, %72 ]
  %.05580 = phi i32 [ %.055, %94 ], [ %.05578, %72 ]
  %77 = phi i32 [ %95, %94 ], [ %R.promoted778687, %72 ]
  %78 = sext i32 %.05580 to i64
  %79 = getelementptr inbounds [400002 x %struct.Edge], ptr @e, i64 0, i64 %78
  %80 = getelementptr inbounds i8, ptr %79, i64 4
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [200001 x i8], ptr @vis, i64 0, i64 %82
  %84 = load i8, ptr %83, align 1, !tbaa !11, !range !15, !noundef !16
  %85 = trunc nuw i8 %84 to i1
  br i1 %85, label %94, label %86

86:                                               ; preds = %.lr.ph81
  %87 = getelementptr inbounds [200001 x i32], ptr @deg, i64 0, i64 %82
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = add nsw i32 %88, -1
  store i32 %89, ptr %87, align 4, !tbaa !5
  %.not66 = icmp sgt i32 %88, %44
  br i1 %.not66, label %94, label %90

90:                                               ; preds = %86
  %91 = add nsw i32 %77, 1
  store i32 %91, ptr @R, align 4, !tbaa !5
  %92 = sext i32 %77 to i64
  %93 = getelementptr inbounds [200001 x i32], ptr @que, i64 0, i64 %92
  store i32 %81, ptr %93, align 4, !tbaa !5
  store i8 1, ptr %83, align 1, !tbaa !11
  br label %94

94:                                               ; preds = %86, %90, %.lr.ph81
  %R.promoted7783 = phi i32 [ %R.promoted7784, %86 ], [ %91, %90 ], [ %R.promoted7784, %.lr.ph81 ]
  %95 = phi i32 [ %77, %86 ], [ %91, %90 ], [ %77, %.lr.ph81 ]
  %.055 = load i32, ptr %79, align 8, !tbaa !5
  %.not65 = icmp eq i32 %.055, 0
  br i1 %.not65, label %.loopexit69, label %.lr.ph81, !llvm.loop !17

._crit_edge:                                      ; preds = %.loopexit69
  %96 = trunc nsw i64 %indvars.iv.next116 to i32
  store i32 %96, ptr @L, align 4, !tbaa !5
  br label %97

97:                                               ; preds = %._crit_edge, %.preheader70
  %.lcssa = phi i32 [ %R.promoted7785, %._crit_edge ], [ %R.promoted82, %.preheader70 ]
  %98 = icmp eq i32 %.lcssa, %6
  br i1 %98, label %101, label %.preheader68

.preheader68:                                     ; preds = %97
  br i1 %.not5874, label %._crit_edge106, label %.lr.ph93.preheader

.lr.ph93.preheader:                               ; preds = %.preheader68
  %99 = zext nneg i32 %6 to i64
  %xtraiter141 = and i64 %99, 1
  %100 = icmp eq i32 %6, 1
  br i1 %100, label %.preheader67.unr-lcssa, label %.lr.ph93.preheader.new

.lr.ph93.preheader.new:                           ; preds = %.lr.ph93.preheader
  %unroll_iter143 = and i64 %99, 2147483646
  br label %.lr.ph93

101:                                              ; preds = %97
  %102 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %203

.preheader67.unr-lcssa:                           ; preds = %124, %.lr.ph93.preheader
  %indvars.iv118.unr = phi i64 [ 1, %.lr.ph93.preheader ], [ %indvars.iv.next119.1, %124 ]
  %lcmp.mod142.not = icmp eq i64 %xtraiter141, 0
  br i1 %lcmp.mod142.not, label %.preheader67, label %.lr.ph93.epil

.lr.ph93.epil:                                    ; preds = %.preheader67.unr-lcssa
  %103 = getelementptr inbounds [200001 x i8], ptr @vis, i64 0, i64 %indvars.iv118.unr
  %104 = load i8, ptr %103, align 1, !tbaa !11, !range !15, !noundef !16
  %105 = trunc nuw i8 %104 to i1
  br i1 %105, label %.preheader67, label %106

106:                                              ; preds = %.lr.ph93.epil
  %107 = getelementptr inbounds [200001 x i32], ptr @fa, i64 0, i64 %indvars.iv118.unr
  %108 = trunc nuw nsw i64 %indvars.iv118.unr to i32
  store i32 %108, ptr %107, align 4, !tbaa !5
  %109 = getelementptr inbounds [200001 x i32], ptr @sz, i64 0, i64 %indvars.iv118.unr
  store i32 1, ptr %109, align 4, !tbaa !5
  br label %.preheader67

.preheader67:                                     ; preds = %.lr.ph93.epil, %106, %.preheader67.unr-lcssa
  br i1 %.not5874, label %._crit_edge106, label %.lr.ph101

.lr.ph93:                                         ; preds = %124, %.lr.ph93.preheader.new
  %indvars.iv118 = phi i64 [ 1, %.lr.ph93.preheader.new ], [ %indvars.iv.next119.1, %124 ]
  %niter144 = phi i64 [ 0, %.lr.ph93.preheader.new ], [ %niter144.next.1, %124 ]
  %110 = getelementptr inbounds [200001 x i8], ptr @vis, i64 0, i64 %indvars.iv118
  %111 = load i8, ptr %110, align 1, !tbaa !11, !range !15, !noundef !16
  %112 = trunc nuw i8 %111 to i1
  br i1 %112, label %.lr.ph93.1, label %113

113:                                              ; preds = %.lr.ph93
  %114 = getelementptr inbounds [200001 x i32], ptr @fa, i64 0, i64 %indvars.iv118
  %115 = trunc nuw nsw i64 %indvars.iv118 to i32
  store i32 %115, ptr %114, align 4, !tbaa !5
  %116 = getelementptr inbounds [200001 x i32], ptr @sz, i64 0, i64 %indvars.iv118
  store i32 1, ptr %116, align 4, !tbaa !5
  br label %.lr.ph93.1

.lr.ph93.1:                                       ; preds = %.lr.ph93, %113
  %indvars.iv.next119 = add nuw nsw i64 %indvars.iv118, 1
  %117 = getelementptr inbounds [200001 x i8], ptr @vis, i64 0, i64 %indvars.iv.next119
  %118 = load i8, ptr %117, align 1, !tbaa !11, !range !15, !noundef !16
  %119 = trunc nuw i8 %118 to i1
  br i1 %119, label %124, label %120

120:                                              ; preds = %.lr.ph93.1
  %121 = getelementptr inbounds [200001 x i32], ptr @fa, i64 0, i64 %indvars.iv.next119
  %122 = trunc nuw nsw i64 %indvars.iv.next119 to i32
  store i32 %122, ptr %121, align 4, !tbaa !5
  %123 = getelementptr inbounds [200001 x i32], ptr @sz, i64 0, i64 %indvars.iv.next119
  store i32 1, ptr %123, align 4, !tbaa !5
  br label %124

124:                                              ; preds = %120, %.lr.ph93.1
  %indvars.iv.next119.1 = add nuw nsw i64 %indvars.iv118, 2
  %niter144.next.1 = add i64 %niter144, 2
  %niter144.ncmp.1 = icmp eq i64 %niter144.next.1, %unroll_iter143
  br i1 %niter144.ncmp.1, label %.preheader67.unr-lcssa, label %.lr.ph93, !llvm.loop !18

.preheader:                                       ; preds = %.loopexit
  %125 = icmp slt i32 %162, 1
  br i1 %125, label %._crit_edge106, label %.lr.ph105

.lr.ph101:                                        ; preds = %.preheader67, %.loopexit
  %126 = phi i32 [ %162, %.loopexit ], [ %6, %.preheader67 ]
  %indvars.iv123 = phi i64 [ %indvars.iv.next124, %.loopexit ], [ 1, %.preheader67 ]
  %127 = getelementptr inbounds [200001 x i8], ptr @vis, i64 0, i64 %indvars.iv123
  %128 = load i8, ptr %127, align 1, !tbaa !11, !range !15, !noundef !16
  %129 = trunc nuw i8 %128 to i1
  br i1 %129, label %.loopexit, label %130

130:                                              ; preds = %.lr.ph101
  %131 = getelementptr inbounds [200001 x i32], ptr @pre, i64 0, i64 %indvars.iv123
  %.05194 = load i32, ptr %131, align 4, !tbaa !5
  %.not6395 = icmp eq i32 %.05194, 0
  br i1 %.not6395, label %.loopexit, label %.lr.ph98.preheader

.lr.ph98.preheader:                               ; preds = %130
  %132 = trunc nuw nsw i64 %indvars.iv123 to i32
  br label %.lr.ph98

.lr.ph98:                                         ; preds = %.lr.ph98.preheader, %161
  %.05196 = phi i32 [ %.051, %161 ], [ %.05194, %.lr.ph98.preheader ]
  %133 = sext i32 %.05196 to i64
  %134 = getelementptr inbounds [400002 x %struct.Edge], ptr @e, i64 0, i64 %133
  %135 = getelementptr inbounds i8, ptr %134, i64 4
  %136 = load i32, ptr %135, align 4, !tbaa !19
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [200001 x i8], ptr @vis, i64 0, i64 %137
  %139 = load i8, ptr %138, align 1, !tbaa !11, !range !15, !noundef !16
  %140 = trunc nuw i8 %139 to i1
  br i1 %140, label %161, label %141

141:                                              ; preds = %.lr.ph98
  %142 = call noundef i32 @_Z4findi(i32 noundef %132)
  %143 = load i32, ptr %135, align 4, !tbaa !19
  %144 = call noundef i32 @_Z4findi(i32 noundef %143)
  %.not64 = icmp eq i32 %142, %144
  br i1 %.not64, label %161, label %145

145:                                              ; preds = %141
  %146 = load i32, ptr %135, align 4, !tbaa !19
  %147 = call noundef i32 @_Z4findi(i32 noundef %146)
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [200001 x i32], ptr @sz, i64 0, i64 %148
  %150 = load i32, ptr %149, align 4, !tbaa !5
  %151 = call noundef i32 @_Z4findi(i32 noundef %132)
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [200001 x i32], ptr @sz, i64 0, i64 %152
  %154 = load i32, ptr %153, align 4, !tbaa !5
  %155 = add nsw i32 %154, %150
  store i32 %155, ptr %153, align 4, !tbaa !5
  %156 = call noundef i32 @_Z4findi(i32 noundef %132)
  %157 = load i32, ptr %135, align 4, !tbaa !19
  %158 = call noundef i32 @_Z4findi(i32 noundef %157)
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [200001 x i32], ptr @fa, i64 0, i64 %159
  store i32 %156, ptr %160, align 4, !tbaa !5
  br label %161

161:                                              ; preds = %.lr.ph98, %141, %145
  %.051 = load i32, ptr %134, align 8, !tbaa !5
  %.not63 = icmp eq i32 %.051, 0
  br i1 %.not63, label %.loopexit.loopexit, label %.lr.ph98, !llvm.loop !21

.loopexit.loopexit:                               ; preds = %161
  %.pre = load i32, ptr @n, align 4, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %130, %.lr.ph101
  %162 = phi i32 [ %.pre, %.loopexit.loopexit ], [ %126, %130 ], [ %126, %.lr.ph101 ]
  %indvars.iv.next124 = add nuw nsw i64 %indvars.iv123, 1
  %163 = sext i32 %162 to i64
  %.not60.not = icmp slt i64 %indvars.iv123, %163
  br i1 %.not60.not, label %.lr.ph101, label %.preheader, !llvm.loop !22

._crit_edge106:                                   ; preds = %187, %.preheader68, %.preheader67, %.preheader
  %.050.lcssa = phi i32 [ -1, %.preheader ], [ -1, %.preheader67 ], [ -1, %.preheader68 ], [ %.1, %187 ]
  %164 = sext i32 %.050.lcssa to i64
  %165 = getelementptr inbounds [200001 x i32], ptr @sz, i64 0, i64 %164
  %166 = load i32, ptr %165, align 4, !tbaa !5
  %167 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %166)
  %168 = load i32, ptr @n, align 4, !tbaa !5
  %.not62108 = icmp slt i32 %168, 1
  br i1 %.not62108, label %._crit_edge112, label %.lr.ph111

.lr.ph105:                                        ; preds = %.preheader, %187
  %indvars.iv126 = phi i64 [ %indvars.iv.next127, %187 ], [ 1, %.preheader ]
  %.050103 = phi i32 [ %.1, %187 ], [ -1, %.preheader ]
  %169 = getelementptr inbounds [200001 x i8], ptr @vis, i64 0, i64 %indvars.iv126
  %170 = load i8, ptr %169, align 1, !tbaa !11, !range !15, !noundef !16
  %171 = trunc nuw i8 %170 to i1
  br i1 %171, label %187, label %172

172:                                              ; preds = %.lr.ph105
  %173 = trunc nuw nsw i64 %indvars.iv126 to i32
  %174 = call noundef i32 @_Z4findi(i32 noundef %173)
  %175 = zext i32 %174 to i64
  %176 = icmp eq i64 %indvars.iv126, %175
  br i1 %176, label %177, label %187

177:                                              ; preds = %172
  %178 = icmp eq i32 %.050103, -1
  br i1 %178, label %186, label %179

179:                                              ; preds = %177
  %180 = sext i32 %.050103 to i64
  %181 = getelementptr inbounds [200001 x i32], ptr @sz, i64 0, i64 %180
  %182 = load i32, ptr %181, align 4, !tbaa !5
  %183 = getelementptr inbounds [200001 x i32], ptr @sz, i64 0, i64 %indvars.iv126
  %184 = load i32, ptr %183, align 4, !tbaa !5
  %185 = icmp slt i32 %182, %184
  br i1 %185, label %186, label %187

186:                                              ; preds = %179, %177
  br label %187

187:                                              ; preds = %.lr.ph105, %172, %179, %186
  %.1 = phi i32 [ %.050103, %.lr.ph105 ], [ %173, %186 ], [ %.050103, %179 ], [ %.050103, %172 ]
  %indvars.iv.next127 = add nuw nsw i64 %indvars.iv126, 1
  %188 = load i32, ptr @n, align 4, !tbaa !5
  %189 = sext i32 %188 to i64
  %.not61.not = icmp slt i64 %indvars.iv126, %189
  br i1 %.not61.not, label %.lr.ph105, label %._crit_edge106, !llvm.loop !23

._crit_edge112:                                   ; preds = %200, %._crit_edge106
  %190 = call i32 @putchar(i32 noundef 10)
  br label %203

.lr.ph111:                                        ; preds = %._crit_edge106, %200
  %indvars.iv129 = phi i64 [ %indvars.iv.next130, %200 ], [ 1, %._crit_edge106 ]
  %191 = getelementptr inbounds [200001 x i8], ptr @vis, i64 0, i64 %indvars.iv129
  %192 = load i8, ptr %191, align 1, !tbaa !11, !range !15, !noundef !16
  %193 = trunc nuw i8 %192 to i1
  br i1 %193, label %200, label %194

194:                                              ; preds = %.lr.ph111
  %195 = trunc nuw nsw i64 %indvars.iv129 to i32
  %196 = call noundef i32 @_Z4findi(i32 noundef %195)
  %197 = icmp eq i32 %196, %.050.lcssa
  br i1 %197, label %198, label %200

198:                                              ; preds = %194
  %199 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %195)
  br label %200

200:                                              ; preds = %.lr.ph111, %194, %198
  %indvars.iv.next130 = add nuw nsw i64 %indvars.iv129, 1
  %201 = load i32, ptr @n, align 4, !tbaa !5
  %202 = sext i32 %201 to i64
  %.not62.not = icmp slt i64 %indvars.iv129, %202
  br i1 %.not62.not, label %.lr.ph111, label %._crit_edge112, !llvm.loop !24

203:                                              ; preds = %._crit_edge112, %101
  ret i32 0
}

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2

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

; Function Attrs: inlinehint mustprogress nofree nounwind uwtable
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4

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

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

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


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