; LLVM IR from tangjz/acm-icpc :: 51nod (1199)

; 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
@lnk = external dso_local global [50001 x i32], align 16
@w = external dso_local global [50001 x i32], align 16
@seq = external dso_local global [50001 x i32], align 16
@in = external dso_local global [50001 x i32], align 16
@out = external dso_local global [50001 x i32], align 16
@e = external dso_local global [50001 x %struct.Edge], align 16
@bit = external dso_local global [2 x [50001 x i64]], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z3addii(i32 noundef, i32 noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z3sumi(i32 noundef) #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %struct.Edge, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca [2 x i8], align 1
  %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
  store i32 0, ptr %1, align 4
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 1, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  br label %17

17:                                               ; preds = %41, %0
  %18 = load i32, ptr %2, align 4, !tbaa !5
  %19 = load i32, ptr @n, align 4, !tbaa !5
  %20 = icmp slt i32 %18, %19
  br i1 %20, label %22, label %21

21:                                               ; preds = %17
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %44

22:                                               ; preds = %17
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds i32, ptr @w, i64 %24
  %26 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %3, ptr noundef %25)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %27 = getelementptr inbounds %struct.Edge, ptr %4, i32 0, i32 0
  %28 = load i32, ptr %3, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [50001 x i32], ptr @lnk, i64 0, i64 %29
  %31 = load i32, ptr %30, align 4, !tbaa !5
  store i32 %31, ptr %27, align 4, !tbaa !9
  %32 = getelementptr inbounds %struct.Edge, ptr %4, i32 0, i32 1
  %33 = load i32, ptr %2, align 4, !tbaa !5
  store i32 %33, ptr %32, align 4, !tbaa !11
  %34 = load i32, ptr %2, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [50001 x %struct.Edge], ptr @e, i64 0, i64 %35
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %36, ptr align 4 %4, i64 8, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  %37 = load i32, ptr %2, align 4, !tbaa !5
  %38 = load i32, ptr %3, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [50001 x i32], ptr @lnk, i64 0, i64 %39
  store i32 %37, ptr %40, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %22
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %2, align 4, !tbaa !5
  br label %17, !llvm.loop !13

44:                                               ; preds = %21
  call void @_Z3dfsi(i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %113, %44
  %46 = load i32, ptr %5, align 4, !tbaa !5
  %47 = load i32, ptr @n, align 4, !tbaa !5
  %48 = icmp sle i32 %46, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %116

50:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %51 = load i32, ptr %5, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [50001 x i32], ptr @seq, i64 0, i64 %52
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [50001 x i32], ptr @w, i64 0, i64 %55
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = load i32, ptr %5, align 4, !tbaa !5
  %59 = sub nsw i32 %58, 1
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [50001 x i32], ptr @seq, i64 0, i64 %60
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [50001 x i32], ptr @w, i64 0, i64 %63
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = sub nsw i32 %57, %65
  store i32 %66, ptr %6, align 4, !tbaa !5
  %67 = load i32, ptr %6, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = load i32, ptr %5, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [50001 x i64], ptr @bit, i64 0, i64 %70
  %72 = load i64, ptr %71, align 8, !tbaa !15
  %73 = add nsw i64 %72, %68
  store i64 %73, ptr %71, align 8, !tbaa !15
  %74 = load i32, ptr %5, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = load i32, ptr %6, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = mul nsw i64 %75, %77
  %79 = load i32, ptr %5, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [50001 x i64], ptr getelementptr inbounds ([2 x [50001 x i64]], ptr @bit, i64 0, i64 1), i64 0, i64 %80
  %82 = load i64, ptr %81, align 8, !tbaa !15
  %83 = add nsw i64 %82, %78
  store i64 %83, ptr %81, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %84 = load i32, ptr %5, align 4, !tbaa !5
  %85 = load i32, ptr %5, align 4, !tbaa !5
  %86 = load i32, ptr %5, align 4, !tbaa !5
  %87 = sub nsw i32 0, %86
  %88 = and i32 %85, %87
  %89 = add nsw i32 %84, %88
  store i32 %89, ptr %7, align 4, !tbaa !5
  %90 = load i32, ptr %7, align 4, !tbaa !5
  %91 = load i32, ptr @n, align 4, !tbaa !5
  %92 = icmp sle i32 %90, %91
  br i1 %92, label %93, label %112

93:                                               ; preds = %50
  %94 = load i32, ptr %5, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [50001 x i64], ptr @bit, i64 0, i64 %95
  %97 = load i64, ptr %96, align 8, !tbaa !15
  %98 = load i32, ptr %7, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [50001 x i64], ptr @bit, i64 0, i64 %99
  %101 = load i64, ptr %100, align 8, !tbaa !15
  %102 = add nsw i64 %101, %97
  store i64 %102, ptr %100, align 8, !tbaa !15
  %103 = load i32, ptr %5, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [50001 x i64], ptr getelementptr inbounds ([2 x [50001 x i64]], ptr @bit, i64 0, i64 1), i64 0, i64 %104
  %106 = load i64, ptr %105, align 8, !tbaa !15
  %107 = load i32, ptr %7, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [50001 x i64], ptr getelementptr inbounds ([2 x [50001 x i64]], ptr @bit, i64 0, i64 1), i64 0, i64 %108
  %110 = load i64, ptr %109, align 8, !tbaa !15
  %111 = add nsw i64 %110, %106
  store i64 %111, ptr %109, align 8, !tbaa !15
  br label %112

112:                                              ; preds = %93, %50
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %113

113:                                              ; preds = %112
  %114 = load i32, ptr %5, align 4, !tbaa !5
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %5, align 4, !tbaa !5
  br label %45, !llvm.loop !17

116:                                              ; preds = %49
  br label %117

117:                                              ; preds = %200, %116
  %118 = load i32, ptr @m, align 4, !tbaa !5
  %119 = add nsw i32 %118, -1
  store i32 %119, ptr @m, align 4, !tbaa !5
  %120 = icmp ne i32 %118, 0
  br i1 %120, label %121, label %201

121:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 2, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %122 = getelementptr inbounds [2 x i8], ptr %8, i64 0, i64 0
  %123 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %122, ptr noundef %9, ptr noundef %10, ptr noundef %11)
  %124 = getelementptr inbounds [2 x i8], ptr %8, i64 0, i64 0
  %125 = load i8, ptr %124, align 1, !tbaa !18
  %126 = sext i8 %125 to i32
  %127 = icmp eq i32 %126, 83
  br i1 %127, label %128, label %158

128:                                              ; preds = %121
  %129 = load i32, ptr %9, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [50001 x i32], ptr @in, i64 0, i64 %130
  %132 = load i32, ptr %131, align 4, !tbaa !5
  %133 = call noundef i64 @_Z3sumi(i32 noundef %132)
  %134 = load i32, ptr %9, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [50001 x i32], ptr @in, i64 0, i64 %135
  %137 = load i32, ptr %136, align 4, !tbaa !5
  %138 = sub nsw i32 %137, 1
  %139 = call noundef i64 @_Z3sumi(i32 noundef %138)
  %140 = sub nsw i64 %133, %139
  %141 = load i32, ptr %10, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = icmp slt i64 %140, %142
  br i1 %143, label %144, label %157

144:                                              ; preds = %128
  %145 = load i32, ptr %9, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [50001 x i32], ptr @in, i64 0, i64 %146
  %148 = load i32, ptr %147, align 4, !tbaa !5
  %149 = load i32, ptr %11, align 4, !tbaa !5
  call void @_Z3addii(i32 noundef %148, i32 noundef %149)
  %150 = load i32, ptr %9, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [50001 x i32], ptr @in, i64 0, i64 %151
  %153 = load i32, ptr %152, align 4, !tbaa !5
  %154 = add nsw i32 %153, 1
  %155 = load i32, ptr %11, align 4, !tbaa !5
  %156 = sub nsw i32 0, %155
  call void @_Z3addii(i32 noundef %154, i32 noundef %156)
  br label %157

157:                                              ; preds = %144, %128
  br label %200

158:                                              ; preds = %121
  %159 = load i32, ptr %9, align 4, !tbaa !5
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [50001 x i32], ptr @out, i64 0, i64 %160
  %162 = load i32, ptr %161, align 4, !tbaa !5
  %163 = call noundef i64 @_Z3sumi(i32 noundef %162)
  %164 = load i32, ptr %9, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [50001 x i32], ptr @in, i64 0, i64 %165
  %167 = load i32, ptr %166, align 4, !tbaa !5
  %168 = sub nsw i32 %167, 1
  %169 = call noundef i64 @_Z3sumi(i32 noundef %168)
  %170 = sub nsw i64 %163, %169
  %171 = load i32, ptr %10, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = load i32, ptr %9, align 4, !tbaa !5
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [50001 x i32], ptr @out, i64 0, i64 %174
  %176 = load i32, ptr %175, align 4, !tbaa !5
  %177 = load i32, ptr %9, align 4, !tbaa !5
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds [50001 x i32], ptr @in, i64 0, i64 %178
  %180 = load i32, ptr %179, align 4, !tbaa !5
  %181 = sub nsw i32 %176, %180
  %182 = sext i32 %181 to i64
  %183 = add nsw i64 %182, 1
  %184 = mul nsw i64 %172, %183
  %185 = icmp slt i64 %170, %184
  br i1 %185, label %186, label %199

186:                                              ; preds = %158
  %187 = load i32, ptr %9, align 4, !tbaa !5
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [50001 x i32], ptr @in, i64 0, i64 %188
  %190 = load i32, ptr %189, align 4, !tbaa !5
  %191 = load i32, ptr %11, align 4, !tbaa !5
  call void @_Z3addii(i32 noundef %190, i32 noundef %191)
  %192 = load i32, ptr %9, align 4, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [50001 x i32], ptr @out, i64 0, i64 %193
  %195 = load i32, ptr %194, align 4, !tbaa !5
  %196 = add nsw i32 %195, 1
  %197 = load i32, ptr %11, align 4, !tbaa !5
  %198 = sub nsw i32 0, %197
  call void @_Z3addii(i32 noundef %196, i32 noundef %198)
  br label %199

199:                                              ; preds = %186, %158
  br label %200

200:                                              ; preds = %199, %157
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 2, ptr %8) #6
  br label %117, !llvm.loop !19

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

202:                                              ; preds = %236, %201
  %203 = load i32, ptr %12, align 4, !tbaa !5
  %204 = load i32, ptr @n, align 4, !tbaa !5
  %205 = icmp sle i32 %203, %204
  br i1 %205, label %207, label %206

206:                                              ; preds = %202
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %239

207:                                              ; preds = %202
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %208 = load i32, ptr %12, align 4, !tbaa !5
  %209 = load i32, ptr %12, align 4, !tbaa !5
  %210 = load i32, ptr %12, align 4, !tbaa !5
  %211 = sub nsw i32 0, %210
  %212 = and i32 %209, %211
  %213 = sub nsw i32 %208, %212
  store i32 %213, ptr %13, align 4, !tbaa !5
  %214 = load i32, ptr %13, align 4, !tbaa !5
  %215 = icmp sgt i32 %214, 0
  br i1 %215, label %216, label %235

216:                                              ; preds = %207
  %217 = load i32, ptr %13, align 4, !tbaa !5
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds [50001 x i64], ptr @bit, i64 0, i64 %218
  %220 = load i64, ptr %219, align 8, !tbaa !15
  %221 = load i32, ptr %12, align 4, !tbaa !5
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds [50001 x i64], ptr @bit, i64 0, i64 %222
  %224 = load i64, ptr %223, align 8, !tbaa !15
  %225 = add nsw i64 %224, %220
  store i64 %225, ptr %223, align 8, !tbaa !15
  %226 = load i32, ptr %13, align 4, !tbaa !5
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds [50001 x i64], ptr getelementptr inbounds ([2 x [50001 x i64]], ptr @bit, i64 0, i64 1), i64 0, i64 %227
  %229 = load i64, ptr %228, align 8, !tbaa !15
  %230 = load i32, ptr %12, align 4, !tbaa !5
  %231 = sext i32 %230 to i64
  %232 = getelementptr inbounds [50001 x i64], ptr getelementptr inbounds ([2 x [50001 x i64]], ptr @bit, i64 0, i64 1), i64 0, i64 %231
  %233 = load i64, ptr %232, align 8, !tbaa !15
  %234 = add nsw i64 %233, %229
  store i64 %234, ptr %232, align 8, !tbaa !15
  br label %235

235:                                              ; preds = %216, %207
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %236

236:                                              ; preds = %235
  %237 = load i32, ptr %12, align 4, !tbaa !5
  %238 = add nsw i32 %237, 1
  store i32 %238, ptr %12, align 4, !tbaa !5
  br label %202, !llvm.loop !20

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

240:                                              ; preds = %262, %239
  %241 = load i32, ptr %14, align 4, !tbaa !5
  %242 = load i32, ptr @n, align 4, !tbaa !5
  %243 = icmp sle i32 %241, %242
  br i1 %243, label %245, label %244

244:                                              ; preds = %240
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %265

245:                                              ; preds = %240
  %246 = load i32, ptr %14, align 4, !tbaa !5
  %247 = add nsw i32 %246, 1
  %248 = sext i32 %247 to i64
  %249 = load i32, ptr %14, align 4, !tbaa !5
  %250 = sext i32 %249 to i64
  %251 = getelementptr inbounds [50001 x i64], ptr @bit, i64 0, i64 %250
  %252 = load i64, ptr %251, align 8, !tbaa !15
  %253 = mul nsw i64 %248, %252
  %254 = load i32, ptr %14, align 4, !tbaa !5
  %255 = sext i32 %254 to i64
  %256 = getelementptr inbounds [50001 x i64], ptr getelementptr inbounds ([2 x [50001 x i64]], ptr @bit, i64 0, i64 1), i64 0, i64 %255
  %257 = load i64, ptr %256, align 8, !tbaa !15
  %258 = sub nsw i64 %253, %257
  %259 = load i32, ptr %14, align 4, !tbaa !5
  %260 = sext i32 %259 to i64
  %261 = getelementptr inbounds [50001 x i64], ptr @bit, i64 0, i64 %260
  store i64 %258, ptr %261, align 8, !tbaa !15
  br label %262

262:                                              ; preds = %245
  %263 = load i32, ptr %14, align 4, !tbaa !5
  %264 = add nsw i32 %263, 1
  store i32 %264, ptr %14, align 4, !tbaa !5
  br label %240, !llvm.loop !21

265:                                              ; preds = %244
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %266

266:                                              ; preds = %289, %265
  %267 = load i32, ptr %15, align 4, !tbaa !5
  %268 = load i32, ptr @n, align 4, !tbaa !5
  %269 = icmp slt i32 %267, %268
  br i1 %269, label %271, label %270

270:                                              ; preds = %266
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %292

271:                                              ; preds = %266
  %272 = load i32, ptr %15, align 4, !tbaa !5
  %273 = sext i32 %272 to i64
  %274 = getelementptr inbounds [50001 x i32], ptr @in, i64 0, i64 %273
  %275 = load i32, ptr %274, align 4, !tbaa !5
  %276 = sext i32 %275 to i64
  %277 = getelementptr inbounds [50001 x i64], ptr @bit, i64 0, i64 %276
  %278 = load i64, ptr %277, align 8, !tbaa !15
  %279 = load i32, ptr %15, align 4, !tbaa !5
  %280 = sext i32 %279 to i64
  %281 = getelementptr inbounds [50001 x i32], ptr @in, i64 0, i64 %280
  %282 = load i32, ptr %281, align 4, !tbaa !5
  %283 = sub nsw i32 %282, 1
  %284 = sext i32 %283 to i64
  %285 = getelementptr inbounds [50001 x i64], ptr @bit, i64 0, i64 %284
  %286 = load i64, ptr %285, align 8, !tbaa !15
  %287 = sub nsw i64 %278, %286
  %288 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i64 noundef %287)
  br label %289

289:                                              ; preds = %271
  %290 = load i32, ptr %15, align 4, !tbaa !5
  %291 = add nsw i32 %290, 1
  store i32 %291, ptr %15, align 4, !tbaa !5
  br label %266, !llvm.loop !22

292:                                              ; preds = %270
  ret i32 0
}

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

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

declare i32 @printf(ptr noundef, ...) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"long long", !7, i64 0}
!17 = distinct !{!17, !14}
!18 = !{!7, !7, i64 0}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !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
@lnk = external dso_local local_unnamed_addr global [50001 x i32], align 16
@w = external dso_local global [50001 x i32], align 16
@seq = external dso_local local_unnamed_addr global [50001 x i32], align 16
@in = external dso_local local_unnamed_addr global [50001 x i32], align 16
@out = external dso_local local_unnamed_addr global [50001 x i32], align 16
@e = external dso_local local_unnamed_addr global [50001 x %struct.Edge], align 16
@bit = external dso_local local_unnamed_addr global [2 x [50001 x i64]], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z3addii(i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z3sumi(i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %1 = alloca i32, align 4
  %2 = alloca [2 x i8], align 1
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  %7 = load i32, ptr @n, align 4, !tbaa !5
  %8 = icmp sgt i32 %7, 1
  br i1 %8, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  call void @_Z3dfsi(i32 noundef 0)
  %9 = load i32, ptr @n, align 4, !tbaa !5
  %.not59 = icmp slt i32 %9, 1
  br i1 %.not59, label %.preheader57, label %.lr.ph62.preheader

.lr.ph62.preheader:                               ; preds = %._crit_edge
  %10 = add nuw i32 %9, 1
  %wide.trip.count = zext i32 %10 to i64
  %.pre = load i32, ptr @seq, align 16, !tbaa !5
  %.phi.trans.insert = sext i32 %.pre to i64
  %.phi.trans.insert92 = getelementptr inbounds [50001 x i32], ptr @w, i64 0, i64 %.phi.trans.insert
  %.pre93 = load i32, ptr %.phi.trans.insert92, align 4, !tbaa !5
  br label %.lr.ph62

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %11 = getelementptr inbounds i32, ptr @w, i64 %indvars.iv
  %12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %11)
  %13 = load i32, ptr %1, align 4, !tbaa !5
  %14 = sext i32 %13 to i64
  %15 = getelementptr inbounds [50001 x i32], ptr @lnk, i64 0, i64 %14
  %16 = load i32, ptr %15, align 4, !tbaa !5
  %17 = getelementptr inbounds [50001 x %struct.Edge], ptr @e, i64 0, i64 %indvars.iv
  store i32 %16, ptr %17, align 8, !tbaa !5
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %17, i64 4
  %18 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %18, ptr %.sroa.4.0..sroa_idx, align 4, !tbaa !5
  store i32 %18, ptr %15, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %19 = load i32, ptr @n, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = icmp slt i64 %indvars.iv.next, %20
  br i1 %21, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.preheader57:                                     ; preds = %51, %._crit_edge
  %22 = load i32, ptr @m, align 4, !tbaa !5
  %23 = add nsw i32 %22, -1
  store i32 %23, ptr @m, align 4, !tbaa !5
  %.not4963 = icmp eq i32 %22, 0
  br i1 %.not4963, label %.preheader56, label %.lr.ph64

.lr.ph62:                                         ; preds = %.lr.ph62.preheader, %51
  %24 = phi i32 [ %.pre93, %.lr.ph62.preheader ], [ %29, %51 ]
  %indvars.iv75 = phi i64 [ 1, %.lr.ph62.preheader ], [ %indvars.iv.next76, %51 ]
  %indvars77 = trunc i64 %indvars.iv75 to i32
  %25 = getelementptr inbounds [50001 x i32], ptr @seq, i64 0, i64 %indvars.iv75
  %26 = load i32, ptr %25, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [50001 x i32], ptr @w, i64 0, i64 %27
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %30 = sub nsw i32 %29, %24
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [50001 x i64], ptr @bit, i64 0, i64 %indvars.iv75
  %33 = load i64, ptr %32, align 8, !tbaa !11
  %34 = add nsw i64 %33, %31
  store i64 %34, ptr %32, align 8, !tbaa !11
  %35 = mul nsw i64 %indvars.iv75, %31
  %36 = getelementptr inbounds [50001 x i64], ptr getelementptr inbounds (i8, ptr @bit, i64 400008), i64 0, i64 %indvars.iv75
  %37 = load i64, ptr %36, align 8, !tbaa !11
  %38 = add nsw i64 %37, %35
  store i64 %38, ptr %36, align 8, !tbaa !11
  %39 = sub nsw i32 0, %indvars77
  %40 = and i32 %indvars77, %39
  %41 = add nuw nsw i32 %40, %indvars77
  %.not54 = icmp sgt i32 %41, %9
  br i1 %.not54, label %51, label %42

42:                                               ; preds = %.lr.ph62
  %43 = zext nneg i32 %41 to i64
  %44 = getelementptr inbounds [50001 x i64], ptr @bit, i64 0, i64 %43
  %45 = load i64, ptr %44, align 8, !tbaa !11
  %46 = add nsw i64 %45, %34
  store i64 %46, ptr %44, align 8, !tbaa !11
  %47 = load i64, ptr %36, align 8, !tbaa !11
  %48 = getelementptr inbounds [50001 x i64], ptr getelementptr inbounds (i8, ptr @bit, i64 400008), i64 0, i64 %43
  %49 = load i64, ptr %48, align 8, !tbaa !11
  %50 = add nsw i64 %49, %47
  store i64 %50, ptr %48, align 8, !tbaa !11
  br label %51

51:                                               ; preds = %42, %.lr.ph62
  %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next76, %wide.trip.count
  br i1 %exitcond.not, label %.preheader57, label %.lr.ph62, !llvm.loop !13

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

.preheader56:                                     ; preds = %.preheader56.loopexit, %.preheader57
  %52 = phi i32 [ %.pre94, %.preheader56.loopexit ], [ %9, %.preheader57 ]
  %.not5065 = icmp slt i32 %52, 1
  br i1 %.not5065, label %._crit_edge73, label %.lr.ph67.preheader

.lr.ph67.preheader:                               ; preds = %.preheader56
  %53 = add nuw i32 %52, 1
  %wide.trip.count82 = zext i32 %53 to i64
  br label %.lr.ph67

.lr.ph64:                                         ; preds = %.preheader57, %108
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  %54 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %4, ptr noundef nonnull %5)
  %55 = load i8, ptr %2, align 1, !tbaa !14
  %56 = icmp eq i8 %55, 83
  %57 = load i32, ptr %3, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  br i1 %56, label %59, label %79

59:                                               ; preds = %.lr.ph64
  %60 = getelementptr inbounds [50001 x i32], ptr @in, i64 0, i64 %58
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = call noundef i64 @_Z3sumi(i32 noundef %61)
  %63 = load i32, ptr %3, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [50001 x i32], ptr @in, i64 0, i64 %64
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = add nsw i32 %66, -1
  %68 = call noundef i64 @_Z3sumi(i32 noundef %67)
  %69 = sub nsw i64 %62, %68
  %70 = load i32, ptr %4, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = icmp slt i64 %69, %71
  br i1 %72, label %73, label %108

73:                                               ; preds = %59
  %74 = load i32, ptr %3, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [50001 x i32], ptr @in, i64 0, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = load i32, ptr %5, align 4, !tbaa !5
  call void @_Z3addii(i32 noundef %77, i32 noundef %78)
  br label %.sink.split

79:                                               ; preds = %.lr.ph64
  %80 = getelementptr inbounds [50001 x i32], ptr @out, i64 0, i64 %58
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = call noundef i64 @_Z3sumi(i32 noundef %81)
  %83 = load i32, ptr %3, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [50001 x i32], ptr @in, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = add nsw i32 %86, -1
  %88 = call noundef i64 @_Z3sumi(i32 noundef %87)
  %89 = sub nsw i64 %82, %88
  %90 = load i32, ptr %4, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = load i32, ptr %3, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [50001 x i32], ptr @out, i64 0, i64 %93
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = getelementptr inbounds [50001 x i32], ptr @in, i64 0, i64 %93
  %97 = load i32, ptr %96, align 4, !tbaa !5
  %98 = sub nsw i32 %95, %97
  %99 = sext i32 %98 to i64
  %100 = add nsw i64 %99, 1
  %101 = mul nsw i64 %100, %91
  %102 = icmp slt i64 %89, %101
  br i1 %102, label %103, label %108

103:                                              ; preds = %79
  %104 = load i32, ptr %5, align 4, !tbaa !5
  call void @_Z3addii(i32 noundef %97, i32 noundef %104)
  br label %.sink.split

.sink.split:                                      ; preds = %73, %103
  %in.sink = phi ptr [ @in, %73 ], [ @out, %103 ]
  %.sink102 = load i32, ptr %3, align 4, !tbaa !5
  %105 = sext i32 %.sink102 to i64
  %106 = getelementptr inbounds [50001 x i32], ptr %in.sink, i64 0, i64 %105
  %.sink.in = load i32, ptr %106, align 4, !tbaa !5
  %.sink = add nsw i32 %.sink.in, 1
  %.sink96 = load i32, ptr %5, align 4, !tbaa !5
  %107 = sub nsw i32 0, %.sink96
  call void @_Z3addii(i32 noundef %.sink, i32 noundef %107)
  br label %108

108:                                              ; preds = %.sink.split, %79, %59
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %2) #5
  %109 = load i32, ptr @m, align 4, !tbaa !5
  %110 = add nsw i32 %109, -1
  store i32 %110, ptr @m, align 4, !tbaa !5
  %.not49 = icmp eq i32 %109, 0
  br i1 %.not49, label %.preheader56.loopexit, label %.lr.ph64, !llvm.loop !15

.preheader55:                                     ; preds = %137
  br i1 %.not5065, label %._crit_edge73, label %.lr.ph70.preheader

.lr.ph70.preheader:                               ; preds = %.preheader55
  %111 = add nuw i32 %52, 1
  %wide.trip.count87 = zext i32 %111 to i64
  %112 = zext nneg i32 %52 to i64
  %min.iters.check = icmp ult i32 %52, 4
  br i1 %min.iters.check, label %.lr.ph70.preheader103, label %vector.ph

.lr.ph70.preheader103:                            ; preds = %middle.block, %.lr.ph70.preheader
  %indvars.iv84.ph = phi i64 [ 1, %.lr.ph70.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph70

vector.ph:                                        ; preds = %.lr.ph70.preheader
  %n.vec = and i64 %112, 2147483644
  %ind.end = or disjoint i64 %n.vec, 1
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <2 x i64> [ <i64 1, i64 2>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %offset.idx = or disjoint i64 %index, 1
  %113 = add nuw nsw <2 x i64> %vec.ind, <i64 1, i64 1>
  %114 = add <2 x i64> %vec.ind, <i64 3, i64 3>
  %115 = getelementptr inbounds [50001 x i64], ptr @bit, i64 0, i64 %offset.idx
  %116 = getelementptr inbounds i8, ptr %115, i64 16
  %wide.load = load <2 x i64>, ptr %115, align 8, !tbaa !11
  %wide.load98 = load <2 x i64>, ptr %116, align 8, !tbaa !11
  %117 = mul nsw <2 x i64> %wide.load, %113
  %118 = mul nsw <2 x i64> %wide.load98, %114
  %119 = getelementptr inbounds [50001 x i64], ptr getelementptr inbounds (i8, ptr @bit, i64 400008), i64 0, i64 %offset.idx
  %120 = getelementptr inbounds i8, ptr %119, i64 16
  %wide.load99 = load <2 x i64>, ptr %119, align 16, !tbaa !11
  %wide.load100 = load <2 x i64>, ptr %120, align 16, !tbaa !11
  %121 = sub nsw <2 x i64> %117, %wide.load99
  %122 = sub nsw <2 x i64> %118, %wide.load100
  store <2 x i64> %121, ptr %115, align 8, !tbaa !11
  store <2 x i64> %122, ptr %116, align 8, !tbaa !11
  %index.next = add nuw i64 %index, 4
  %vec.ind.next = add <2 x i64> %vec.ind, <i64 4, i64 4>
  %123 = icmp eq i64 %index.next, %n.vec
  br i1 %123, label %middle.block, label %vector.body, !llvm.loop !16

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %112
  br i1 %cmp.n, label %.lr.ph72.preheader, label %.lr.ph70.preheader103

.lr.ph72.preheader:                               ; preds = %.lr.ph70, %middle.block
  br label %.lr.ph72

.lr.ph67:                                         ; preds = %.lr.ph67.preheader, %137
  %indvars.iv78 = phi i64 [ 1, %.lr.ph67.preheader ], [ %indvars.iv.next79, %137 ]
  %indvars81 = trunc i64 %indvars.iv78 to i32
  %.not52 = add nuw i32 %indvars81, 2147483647
  %124 = and i32 %.not52, %indvars81
  %.not53 = icmp eq i32 %124, 0
  br i1 %.not53, label %137, label %125

125:                                              ; preds = %.lr.ph67
  %126 = zext nneg i32 %124 to i64
  %127 = getelementptr inbounds [50001 x i64], ptr @bit, i64 0, i64 %126
  %128 = load i64, ptr %127, align 16, !tbaa !11
  %129 = getelementptr inbounds [50001 x i64], ptr @bit, i64 0, i64 %indvars.iv78
  %130 = load i64, ptr %129, align 8, !tbaa !11
  %131 = add nsw i64 %130, %128
  store i64 %131, ptr %129, align 8, !tbaa !11
  %132 = getelementptr inbounds [50001 x i64], ptr getelementptr inbounds (i8, ptr @bit, i64 400008), i64 0, i64 %126
  %133 = load i64, ptr %132, align 8, !tbaa !11
  %134 = getelementptr inbounds [50001 x i64], ptr getelementptr inbounds (i8, ptr @bit, i64 400008), i64 0, i64 %indvars.iv78
  %135 = load i64, ptr %134, align 8, !tbaa !11
  %136 = add nsw i64 %135, %133
  store i64 %136, ptr %134, align 8, !tbaa !11
  br label %137

137:                                              ; preds = %125, %.lr.ph67
  %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1
  %exitcond83.not = icmp eq i64 %indvars.iv.next79, %wide.trip.count82
  br i1 %exitcond83.not, label %.preheader55, label %.lr.ph67, !llvm.loop !19

.lr.ph70:                                         ; preds = %.lr.ph70.preheader103, %.lr.ph70
  %indvars.iv84 = phi i64 [ %indvars.iv.next85, %.lr.ph70 ], [ %indvars.iv84.ph, %.lr.ph70.preheader103 ]
  %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1
  %138 = getelementptr inbounds [50001 x i64], ptr @bit, i64 0, i64 %indvars.iv84
  %139 = load i64, ptr %138, align 8, !tbaa !11
  %140 = mul nsw i64 %139, %indvars.iv.next85
  %141 = getelementptr inbounds [50001 x i64], ptr getelementptr inbounds (i8, ptr @bit, i64 400008), i64 0, i64 %indvars.iv84
  %142 = load i64, ptr %141, align 8, !tbaa !11
  %143 = sub nsw i64 %140, %142
  store i64 %143, ptr %138, align 8, !tbaa !11
  %exitcond88.not = icmp eq i64 %indvars.iv.next85, %wide.trip.count87
  br i1 %exitcond88.not, label %.lr.ph72.preheader, label %.lr.ph70, !llvm.loop !20

._crit_edge73:                                    ; preds = %.lr.ph72, %.preheader56, %.preheader55
  ret i32 0

.lr.ph72:                                         ; preds = %.lr.ph72.preheader, %.lr.ph72
  %indvars.iv89 = phi i64 [ %indvars.iv.next90, %.lr.ph72 ], [ 0, %.lr.ph72.preheader ]
  %144 = getelementptr inbounds [50001 x i32], ptr @in, i64 0, i64 %indvars.iv89
  %145 = load i32, ptr %144, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [50001 x i64], ptr @bit, i64 0, i64 %146
  %148 = load i64, ptr %147, align 8, !tbaa !11
  %149 = add nsw i32 %145, -1
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [50001 x i64], ptr @bit, i64 0, i64 %150
  %152 = load i64, ptr %151, align 8, !tbaa !11
  %153 = sub nsw i64 %148, %152
  %154 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %153)
  %indvars.iv.next90 = add nuw nsw i64 %indvars.iv89, 1
  %155 = load i32, ptr @n, align 4, !tbaa !5
  %156 = sext i32 %155 to i64
  %157 = icmp slt i64 %indvars.iv.next90, %156
  br i1 %157, label %.lr.ph72, label %._crit_edge73, !llvm.loop !21
}

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #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 = { 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 = !{!"long long", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = !{!7, !7, i64 0}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10, !17, !18}
!17 = !{!"llvm.loop.isvectorized", i32 1}
!18 = !{!"llvm.loop.unroll.runtime.disable"}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10, !18, !17}
!21 = distinct !{!21, !10}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass