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

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

@N = external dso_local global i32, align 4
@M = external dso_local global i32, align 4
@S = external dso_local global i32, align 4
@T = external dso_local global i32, align 4
@lnk = external dso_local global [7203 x i32], align 16
@dis = external dso_local global [7203 x i32], align 16
@sum = external dso_local global i32, align 4
@flow = external dso_local global i32, align 4
@cost = external dso_local global i32, align 4
@vis = external dso_local global [7203 x i8], align 16
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@a = external dso_local global [3601 x i32], align 16
@nxt = external dso_local global [3601 x [5 x i32]], align 16
@ord = external dso_local global [3601 x i32], align 16
@f = external dso_local global [3601 x i32], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z7addEdgeiiii(i32 noundef, i32 noundef, i32 noundef, 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 uwtable
declare dso_local noundef zeroext i1 @_Z3bfsv() #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #5 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %132, %0
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = load i32, ptr @n, align 4, !tbaa !5
  %25 = icmp slt i32 %23, %24
  br i1 %25, label %27, label %26

26:                                               ; preds = %22
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %135

27:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %28

28:                                               ; preds = %126, %27
  %29 = load i32, ptr %5, align 4, !tbaa !5
  %30 = load i32, ptr @m, align 4, !tbaa !5
  %31 = icmp slt i32 %29, %30
  br i1 %31, label %33, label %32

32:                                               ; preds = %28
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  br label %131

33:                                               ; preds = %28
  %34 = load i32, ptr %3, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds i32, ptr @a, i64 %35
  %37 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %36)
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = icmp ne i32 %38, 0
  br i1 %39, label %40, label %80

40:                                               ; preds = %33
  %41 = load i32, ptr %3, align 4, !tbaa !5
  %42 = load i32, ptr @m, align 4, !tbaa !5
  %43 = sub nsw i32 %41, %42
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [3601 x i32], ptr @a, i64 0, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = load i32, ptr %3, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [3601 x i32], ptr @a, i64 0, i64 %48
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = icmp ne i32 %46, %50
  br i1 %51, label %52, label %80

52:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  %53 = load i32, ptr %3, align 4, !tbaa !5
  %54 = load i32, ptr @m, align 4, !tbaa !5
  %55 = sub nsw i32 %53, %54
  store i32 %55, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  %56 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %56, ptr %7, align 4, !tbaa !5
  %57 = load i32, ptr %6, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [3601 x i32], ptr @a, i64 0, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = load i32, ptr %7, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [3601 x i32], ptr @a, i64 0, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = icmp sgt i32 %60, %64
  br i1 %65, label %66, label %67

66:                                               ; preds = %52
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7) #8
  br label %67

67:                                               ; preds = %66, %52
  %68 = load i32, ptr %7, align 4, !tbaa !5
  %69 = load i32, ptr %6, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [3601 x [5 x i32]], ptr @nxt, i64 0, i64 %70
  %72 = load i32, ptr %6, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [3601 x [5 x i32]], ptr @nxt, i64 0, i64 %73
  %75 = getelementptr inbounds [5 x i32], ptr %74, i64 0, i64 0
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %75, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [5 x i32], ptr %71, i64 0, i64 %78
  store i32 %68, ptr %79, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  br label %80

80:                                               ; preds = %67, %40, %33
  %81 = load i32, ptr %5, align 4, !tbaa !5
  %82 = icmp ne i32 %81, 0
  br i1 %82, label %83, label %121

83:                                               ; preds = %80
  %84 = load i32, ptr %3, align 4, !tbaa !5
  %85 = sub nsw i32 %84, 1
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [3601 x i32], ptr @a, i64 0, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = load i32, ptr %3, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [3601 x i32], ptr @a, i64 0, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = icmp ne i32 %88, %92
  br i1 %93, label %94, label %121

94:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  %95 = load i32, ptr %3, align 4, !tbaa !5
  %96 = sub nsw i32 %95, 1
  store i32 %96, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  %97 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %97, ptr %9, align 4, !tbaa !5
  %98 = load i32, ptr %8, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [3601 x i32], ptr @a, i64 0, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = load i32, ptr %9, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [3601 x i32], ptr @a, i64 0, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = icmp sgt i32 %101, %105
  br i1 %106, label %107, label %108

107:                                              ; preds = %94
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9) #8
  br label %108

108:                                              ; preds = %107, %94
  %109 = load i32, ptr %9, align 4, !tbaa !5
  %110 = load i32, ptr %8, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [3601 x [5 x i32]], ptr @nxt, i64 0, i64 %111
  %113 = load i32, ptr %8, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [3601 x [5 x i32]], ptr @nxt, i64 0, i64 %114
  %116 = getelementptr inbounds [5 x i32], ptr %115, i64 0, i64 0
  %117 = load i32, ptr %116, align 4, !tbaa !5
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %116, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [5 x i32], ptr %112, i64 0, i64 %119
  store i32 %109, ptr %120, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %121

121:                                              ; preds = %108, %83, %80
  %122 = load i32, ptr %3, align 4, !tbaa !5
  %123 = load i32, ptr %3, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [3601 x i32], ptr @ord, i64 0, i64 %124
  store i32 %122, ptr %125, align 4, !tbaa !5
  br label %126

126:                                              ; preds = %121
  %127 = load i32, ptr %5, align 4, !tbaa !5
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %5, align 4, !tbaa !5
  %129 = load i32, ptr %3, align 4, !tbaa !5
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %3, align 4, !tbaa !5
  br label %28, !llvm.loop !9

131:                                              ; preds = %32
  br label %132

132:                                              ; preds = %131
  %133 = load i32, ptr %2, align 4, !tbaa !5
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %2, align 4, !tbaa !5
  br label %22, !llvm.loop !11

135:                                              ; preds = %26
  %136 = load i32, ptr @m, align 4, !tbaa !5
  %137 = load i32, ptr @n, align 4, !tbaa !5
  %138 = mul nsw i32 %137, %136
  store i32 %138, ptr @n, align 4, !tbaa !5
  %139 = load i32, ptr @n, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds i32, ptr @ord, i64 %140
  call void @_ZSt4sortIPiPFbRKiS2_EEvT_S5_T0_(ptr noundef @ord, ptr noundef %141, ptr noundef @_Z3cmpRKiS0_)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  %142 = load i32, ptr @n, align 4, !tbaa !5
  %143 = sub nsw i32 %142, 1
  store i32 %143, ptr %10, align 4, !tbaa !5
  br label %144

144:                                              ; preds = %192, %135
  %145 = load i32, ptr %10, align 4, !tbaa !5
  %146 = icmp sge i32 %145, 0
  br i1 %146, label %148, label %147

147:                                              ; preds = %144
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %195

148:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  %149 = load i32, ptr %10, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [3601 x i32], ptr @ord, i64 0, i64 %150
  %152 = load i32, ptr %151, align 4, !tbaa !5
  store i32 %152, ptr %11, align 4, !tbaa !5
  %153 = load i32, ptr %11, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [3601 x i32], ptr @f, i64 0, i64 %154
  store i32 0, ptr %155, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %156

156:                                              ; preds = %183, %148
  %157 = load i32, ptr %12, align 4, !tbaa !5
  %158 = load i32, ptr %11, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [3601 x [5 x i32]], ptr @nxt, i64 0, i64 %159
  %161 = getelementptr inbounds [5 x i32], ptr %160, i64 0, i64 0
  %162 = load i32, ptr %161, align 4, !tbaa !5
  %163 = icmp sle i32 %157, %162
  br i1 %163, label %165, label %164

164:                                              ; preds = %156
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %186

165:                                              ; preds = %156
  %166 = load i32, ptr %11, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [3601 x i32], ptr @f, i64 0, i64 %167
  %169 = load i32, ptr %11, align 4, !tbaa !5
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [3601 x [5 x i32]], ptr @nxt, i64 0, i64 %170
  %172 = load i32, ptr %12, align 4, !tbaa !5
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [5 x i32], ptr %171, i64 0, i64 %173
  %175 = load i32, ptr %174, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [3601 x i32], ptr @f, i64 0, i64 %176
  %178 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %168, ptr noundef nonnull align 4 dereferenceable(4) %177)
  %179 = load i32, ptr %178, align 4, !tbaa !5
  %180 = load i32, ptr %11, align 4, !tbaa !5
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [3601 x i32], ptr @f, i64 0, i64 %181
  store i32 %179, ptr %182, align 4, !tbaa !5
  br label %183

183:                                              ; preds = %165
  %184 = load i32, ptr %12, align 4, !tbaa !5
  %185 = add nsw i32 %184, 1
  store i32 %185, ptr %12, align 4, !tbaa !5
  br label %156, !llvm.loop !12

186:                                              ; preds = %164
  %187 = load i32, ptr %11, align 4, !tbaa !5
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [3601 x i32], ptr @f, i64 0, i64 %188
  %190 = load i32, ptr %189, align 4, !tbaa !5
  %191 = add nsw i32 %190, 1
  store i32 %191, ptr %189, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %192

192:                                              ; preds = %186
  %193 = load i32, ptr %10, align 4, !tbaa !5
  %194 = add nsw i32 %193, -1
  store i32 %194, ptr %10, align 4, !tbaa !5
  br label %144, !llvm.loop !13

195:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 0, ptr %13, align 4, !tbaa !5
  %196 = load i32, ptr @n, align 4, !tbaa !5
  %197 = load i32, ptr @n, align 4, !tbaa !5
  %198 = add nsw i32 %196, %197
  %199 = add nsw i32 %198, 1
  store i32 %199, ptr @N, align 4, !tbaa !5
  %200 = load i32, ptr @N, align 4, !tbaa !5
  %201 = sub nsw i32 %200, 1
  store i32 %201, ptr @T, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %202

202:                                              ; preds = %349, %195
  %203 = load i32, ptr %14, align 4, !tbaa !5
  %204 = load i32, ptr @n, align 4, !tbaa !5
  %205 = icmp slt i32 %203, %204
  br i1 %205, label %207, label %206

206:                                              ; preds = %202
  store i32 14, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %352

207:                                              ; preds = %202
  %208 = load i32, ptr @n, align 4, !tbaa !5
  %209 = load i32, ptr %14, align 4, !tbaa !5
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds [3601 x i32], ptr @ord, i64 0, i64 %210
  %212 = load i32, ptr %211, align 4, !tbaa !5
  %213 = add nsw i32 %208, %212
  store i32 %213, ptr @S, align 4, !tbaa !5
  store i32 0, ptr @cost, align 4, !tbaa !5
  store i32 0, ptr @flow, align 4, !tbaa !5
  store i32 0, ptr @M, align 4, !tbaa !5
  %214 = load i32, ptr @N, align 4, !tbaa !5
  %215 = sext i32 %214 to i64
  %216 = mul i64 %215, 4
  call void @llvm.memset.p0.i64(ptr align 16 @lnk, i8 -1, i64 %216, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  %217 = load i32, ptr %14, align 4, !tbaa !5
  store i32 %217, ptr %15, align 4, !tbaa !5
  br label %218

218:                                              ; preds = %295, %207
  %219 = load i32, ptr %15, align 4, !tbaa !5
  %220 = load i32, ptr @n, align 4, !tbaa !5
  %221 = icmp slt i32 %219, %220
  br i1 %221, label %223, label %222

222:                                              ; preds = %218
  store i32 17, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %298

223:                                              ; preds = %218
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  %224 = load i32, ptr %15, align 4, !tbaa !5
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds [3601 x i32], ptr @ord, i64 0, i64 %225
  %227 = load i32, ptr %226, align 4, !tbaa !5
  store i32 %227, ptr %16, align 4, !tbaa !5
  %228 = load i32, ptr %16, align 4, !tbaa !5
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds [3601 x i32], ptr @f, i64 0, i64 %229
  %231 = load i32, ptr %230, align 4, !tbaa !5
  %232 = sub nsw i32 0, %231
  %233 = load i32, ptr %16, align 4, !tbaa !5
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds [7203 x i32], ptr @dis, i64 0, i64 %234
  store i32 %232, ptr %235, align 4, !tbaa !5
  %236 = load i32, ptr %16, align 4, !tbaa !5
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds [3601 x i32], ptr @f, i64 0, i64 %237
  %239 = load i32, ptr %238, align 4, !tbaa !5
  %240 = sub nsw i32 0, %239
  %241 = add nsw i32 %240, 1
  %242 = load i32, ptr @n, align 4, !tbaa !5
  %243 = load i32, ptr %16, align 4, !tbaa !5
  %244 = add nsw i32 %242, %243
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds [7203 x i32], ptr @dis, i64 0, i64 %245
  store i32 %241, ptr %246, align 4, !tbaa !5
  %247 = load i32, ptr %16, align 4, !tbaa !5
  %248 = load i32, ptr @n, align 4, !tbaa !5
  %249 = load i32, ptr %16, align 4, !tbaa !5
  %250 = add nsw i32 %248, %249
  call void @_Z7addEdgeiiii(i32 noundef %247, i32 noundef %250, i32 noundef 1, i32 noundef 0)
  %251 = load i32, ptr @n, align 4, !tbaa !5
  %252 = load i32, ptr %16, align 4, !tbaa !5
  %253 = add nsw i32 %251, %252
  %254 = load i32, ptr @T, align 4, !tbaa !5
  %255 = load i32, ptr %16, align 4, !tbaa !5
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds [3601 x i32], ptr @f, i64 0, i64 %256
  %258 = load i32, ptr %257, align 4, !tbaa !5
  %259 = sub nsw i32 %258, 1
  call void @_Z7addEdgeiiii(i32 noundef %253, i32 noundef %254, i32 noundef 1, i32 noundef %259)
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  store i32 1, ptr %17, align 4, !tbaa !5
  br label %260

260:                                              ; preds = %291, %223
  %261 = load i32, ptr %17, align 4, !tbaa !5
  %262 = load i32, ptr %16, align 4, !tbaa !5
  %263 = sext i32 %262 to i64
  %264 = getelementptr inbounds [3601 x [5 x i32]], ptr @nxt, i64 0, i64 %263
  %265 = getelementptr inbounds [5 x i32], ptr %264, i64 0, i64 0
  %266 = load i32, ptr %265, align 4, !tbaa !5
  %267 = icmp sle i32 %261, %266
  br i1 %267, label %269, label %268

268:                                              ; preds = %260
  store i32 20, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %294

269:                                              ; preds = %260
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %270 = load i32, ptr %16, align 4, !tbaa !5
  %271 = sext i32 %270 to i64
  %272 = getelementptr inbounds [3601 x [5 x i32]], ptr @nxt, i64 0, i64 %271
  %273 = load i32, ptr %17, align 4, !tbaa !5
  %274 = sext i32 %273 to i64
  %275 = getelementptr inbounds [5 x i32], ptr %272, i64 0, i64 %274
  %276 = load i32, ptr %275, align 4, !tbaa !5
  store i32 %276, ptr %18, align 4, !tbaa !5
  %277 = load i32, ptr @n, align 4, !tbaa !5
  %278 = load i32, ptr %16, align 4, !tbaa !5
  %279 = add nsw i32 %277, %278
  %280 = load i32, ptr %18, align 4, !tbaa !5
  %281 = load i32, ptr %16, align 4, !tbaa !5
  %282 = sext i32 %281 to i64
  %283 = getelementptr inbounds [3601 x i32], ptr @f, i64 0, i64 %282
  %284 = load i32, ptr %283, align 4, !tbaa !5
  %285 = load i32, ptr %18, align 4, !tbaa !5
  %286 = sext i32 %285 to i64
  %287 = getelementptr inbounds [3601 x i32], ptr @f, i64 0, i64 %286
  %288 = load i32, ptr %287, align 4, !tbaa !5
  %289 = sub nsw i32 %284, %288
  %290 = sub nsw i32 %289, 1
  call void @_Z7addEdgeiiii(i32 noundef %279, i32 noundef %280, i32 noundef 1, i32 noundef %290)
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %291

291:                                              ; preds = %269
  %292 = load i32, ptr %17, align 4, !tbaa !5
  %293 = add nsw i32 %292, 1
  store i32 %293, ptr %17, align 4, !tbaa !5
  br label %260, !llvm.loop !14

294:                                              ; preds = %268
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %295

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

298:                                              ; preds = %222
  %299 = load i32, ptr @S, align 4, !tbaa !5
  %300 = sext i32 %299 to i64
  %301 = getelementptr inbounds [7203 x i32], ptr @dis, i64 0, i64 %300
  %302 = load i32, ptr %301, align 4, !tbaa !5
  store i32 %302, ptr @sum, align 4, !tbaa !5
  %303 = load i32, ptr @T, align 4, !tbaa !5
  %304 = sext i32 %303 to i64
  %305 = getelementptr inbounds [7203 x i32], ptr @dis, i64 0, i64 %304
  store i32 0, ptr %305, align 4, !tbaa !5
  %306 = load i32, ptr @N, align 4, !tbaa !5
  %307 = sext i32 %306 to i64
  %308 = mul i64 %307, 1
  call void @llvm.memset.p0.i64(ptr align 16 @vis, i8 0, i64 %308, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  %309 = load i32, ptr @S, align 4, !tbaa !5
  %310 = call noundef i32 @_Z3dfsii(i32 noundef %309, i32 noundef 2)
  store i32 %310, ptr %19, align 4, !tbaa !5
  %311 = load i32, ptr %19, align 4, !tbaa !5
  %312 = icmp ne i32 %311, 0
  br i1 %312, label %313, label %343

313:                                              ; preds = %298
  %314 = load i32, ptr %19, align 4, !tbaa !5
  %315 = load i32, ptr @flow, align 4, !tbaa !5
  %316 = add nsw i32 %315, %314
  store i32 %316, ptr @flow, align 4, !tbaa !5
  %317 = load i32, ptr %19, align 4, !tbaa !5
  %318 = load i32, ptr @sum, align 4, !tbaa !5
  %319 = mul nsw i32 %317, %318
  %320 = load i32, ptr @cost, align 4, !tbaa !5
  %321 = add nsw i32 %320, %319
  store i32 %321, ptr @cost, align 4, !tbaa !5
  %322 = load i32, ptr %19, align 4, !tbaa !5
  %323 = icmp slt i32 %322, 2
  br i1 %323, label %324, label %342

324:                                              ; preds = %313
  %325 = call noundef zeroext i1 @_Z3bfsv()
  br i1 %325, label %326, label %342

326:                                              ; preds = %324
  %327 = load i32, ptr @N, align 4, !tbaa !5
  %328 = sext i32 %327 to i64
  %329 = mul i64 %328, 1
  call void @llvm.memset.p0.i64(ptr align 16 @vis, i8 0, i64 %329, i1 false)
  %330 = load i32, ptr @S, align 4, !tbaa !5
  %331 = load i32, ptr %19, align 4, !tbaa !5
  %332 = sub nsw i32 2, %331
  %333 = call noundef i32 @_Z3dfsii(i32 noundef %330, i32 noundef %332)
  store i32 %333, ptr %19, align 4, !tbaa !5
  %334 = load i32, ptr %19, align 4, !tbaa !5
  %335 = load i32, ptr @flow, align 4, !tbaa !5
  %336 = add nsw i32 %335, %334
  store i32 %336, ptr @flow, align 4, !tbaa !5
  %337 = load i32, ptr %19, align 4, !tbaa !5
  %338 = load i32, ptr @sum, align 4, !tbaa !5
  %339 = mul nsw i32 %337, %338
  %340 = load i32, ptr @cost, align 4, !tbaa !5
  %341 = add nsw i32 %340, %339
  store i32 %341, ptr @cost, align 4, !tbaa !5
  br label %342

342:                                              ; preds = %326, %324, %313
  br label %343

343:                                              ; preds = %342, %298
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  %344 = load i32, ptr @cost, align 4, !tbaa !5
  %345 = sub nsw i32 0, %344
  %346 = add nsw i32 %345, 1
  store i32 %346, ptr %20, align 4, !tbaa !5
  %347 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %20)
  %348 = load i32, ptr %347, align 4, !tbaa !5
  store i32 %348, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %349

349:                                              ; preds = %343
  %350 = load i32, ptr %14, align 4, !tbaa !5
  %351 = add nsw i32 %350, 1
  store i32 %351, ptr %14, align 4, !tbaa !5
  br label %202, !llvm.loop !16

352:                                              ; preds = %206
  %353 = load i32, ptr %13, align 4, !tbaa !5
  %354 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %353)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  %355 = load i32, ptr %1, align 4
  ret i32 %355
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPiPFbRKiS2_EEvT_S5_T0_(ptr noundef, ptr noundef, ptr noundef) #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z3cmpRKiS0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { inlinehint 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 #5 = { 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 #6 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 #8 = { 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 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}


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

@N = external dso_local local_unnamed_addr global i32, align 4
@M = external dso_local local_unnamed_addr global i32, align 4
@S = external dso_local local_unnamed_addr global i32, align 4
@T = external dso_local local_unnamed_addr global i32, align 4
@lnk = external dso_local local_unnamed_addr global [7203 x i32], align 16
@dis = external dso_local local_unnamed_addr global [7203 x i32], align 16
@sum = external dso_local local_unnamed_addr global i32, align 4
@flow = external dso_local local_unnamed_addr global i32, align 4
@cost = external dso_local local_unnamed_addr global i32, align 4
@vis = external dso_local local_unnamed_addr global [7203 x i8], align 16
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@a = external dso_local global [3601 x i32], align 16
@nxt = external dso_local local_unnamed_addr global [3601 x [5 x i32]], align 16
@ord = external dso_local global [3601 x i32], align 16
@f = external dso_local global [3601 x i32], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z7addEdgeiiii(i32 noundef, i32 noundef, i32 noundef, 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 uwtable
declare dso_local noundef zeroext i1 @_Z3bfsv() local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #5 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m)
  %8 = load i32, ptr @n, align 4, !tbaa !5
  %9 = icmp sgt i32 %8, 0
  %.pre144 = load i32, ptr @m, align 4, !tbaa !5
  %10 = icmp sgt i32 %.pre144, 0
  %or.cond = select i1 %9, i1 %10, i1 false
  br i1 %or.cond, label %.preheader, label %._crit_edge82

.preheader:                                       ; preds = %0, %._crit_edge
  %11 = phi i32 [ %79, %._crit_edge ], [ %.pre144, %0 ]
  %.06281 = phi i32 [ %80, %._crit_edge ], [ 0, %0 ]
  %.06680 = phi i32 [ %.1.lcssa, %._crit_edge ], [ 0, %0 ]
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader
  %.not74 = icmp eq i32 %.06281, 0
  %13 = sext i32 %.06680 to i64
  %14 = getelementptr inbounds i32, ptr @a, i64 %13
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %14)
  br i1 %.not74, label %36, label %.lr.ph.split.preheader

.lr.ph.split.preheader:                           ; preds = %.lr.ph
  %16 = load i32, ptr @m, align 4, !tbaa !5
  %17 = sub nsw i32 %.06680, %16
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [3601 x i32], ptr @a, i64 0, i64 %18
  %20 = load i32, ptr %19, align 4, !tbaa !5
  %21 = load i32, ptr %14, align 4, !tbaa !5
  %.not75.peel = icmp eq i32 %20, %21
  br i1 %.not75.peel, label %32, label %22

22:                                               ; preds = %.lr.ph.split.preheader
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  store i32 %17, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  store i32 %.06680, ptr %2, align 4, !tbaa !5
  %23 = icmp sgt i32 %20, %21
  br i1 %23, label %24, label %25

24:                                               ; preds = %22
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2) #8
  %.pre = load i32, ptr %2, align 4, !tbaa !5
  %.pre134 = load i32, ptr %1, align 4, !tbaa !5
  %.pre151 = sext i32 %.pre134 to i64
  br label %25

25:                                               ; preds = %24, %22
  %.pre-phi = phi i64 [ %.pre151, %24 ], [ %18, %22 ]
  %26 = phi i32 [ %.pre, %24 ], [ %.06680, %22 ]
  %27 = getelementptr inbounds [3601 x [5 x i32]], ptr @nxt, i64 0, i64 %.pre-phi
  %28 = load i32, ptr %27, align 4, !tbaa !5
  %29 = add nsw i32 %28, 1
  store i32 %29, ptr %27, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [3601 x [5 x i32]], ptr @nxt, i64 0, i64 %.pre-phi, i64 %30
  store i32 %26, ptr %31, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  br label %32

32:                                               ; preds = %.lr.ph.split.preheader, %25
  %33 = getelementptr inbounds [3601 x i32], ptr @ord, i64 0, i64 %13
  store i32 %.06680, ptr %33, align 4, !tbaa !5
  %indvars.iv.next.peel = add nsw i64 %13, 1
  %34 = load i32, ptr @m, align 4, !tbaa !5
  %35 = icmp sgt i32 %34, 1
  br i1 %35, label %.lr.ph.split, label %._crit_edge.loopexit108

36:                                               ; preds = %.lr.ph
  %37 = getelementptr inbounds [3601 x i32], ptr @ord, i64 0, i64 %13
  store i32 %.06680, ptr %37, align 4, !tbaa !5
  %indvars.iv.next116.peel = add nsw i64 %13, 1
  %38 = load i32, ptr @m, align 4, !tbaa !5
  %39 = icmp sgt i32 %38, 1
  br i1 %39, label %.lr.ph.split.us.peel.next, label %._crit_edge.loopexit

.lr.ph.split.us.peel.next:                        ; preds = %36, %60
  %indvars.iv115 = phi i64 [ %indvars.iv.next116, %60 ], [ %indvars.iv.next116.peel, %36 ]
  %.06878.us = phi i32 [ %63, %60 ], [ 1, %36 ]
  %40 = getelementptr inbounds i32, ptr @a, i64 %indvars.iv115
  %41 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %40)
  %42 = add nsw i64 %indvars.iv115, -1
  %43 = getelementptr inbounds [3601 x i32], ptr @a, i64 0, i64 %42
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = load i32, ptr %40, align 4, !tbaa !5
  %.not77.us = icmp eq i32 %44, %45
  br i1 %.not77.us, label %60, label %46

46:                                               ; preds = %.lr.ph.split.us.peel.next
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  %47 = trunc nsw i64 %42 to i32
  store i32 %47, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  %48 = trunc nsw i64 %indvars.iv115 to i32
  store i32 %48, ptr %4, align 4, !tbaa !5
  %49 = icmp sgt i32 %44, %45
  br i1 %49, label %50, label %51

50:                                               ; preds = %46
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4) #8
  %.pre142 = load i32, ptr %4, align 4, !tbaa !5
  %.pre143 = load i32, ptr %3, align 4, !tbaa !5
  br label %51

51:                                               ; preds = %50, %46
  %52 = phi i32 [ %.pre143, %50 ], [ %47, %46 ]
  %53 = phi i32 [ %.pre142, %50 ], [ %48, %46 ]
  %54 = sext i32 %52 to i64
  %55 = getelementptr inbounds [3601 x [5 x i32]], ptr @nxt, i64 0, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %55, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [3601 x [5 x i32]], ptr @nxt, i64 0, i64 %54, i64 %58
  store i32 %53, ptr %59, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  br label %60

60:                                               ; preds = %51, %.lr.ph.split.us.peel.next
  %61 = getelementptr inbounds [3601 x i32], ptr @ord, i64 0, i64 %indvars.iv115
  %62 = trunc nsw i64 %indvars.iv115 to i32
  store i32 %62, ptr %61, align 4, !tbaa !5
  %63 = add nuw nsw i32 %.06878.us, 1
  %indvars.iv.next116 = add nsw i64 %indvars.iv115, 1
  %64 = load i32, ptr @m, align 4, !tbaa !5
  %65 = icmp slt i32 %63, %64
  br i1 %65, label %.lr.ph.split.us.peel.next, label %._crit_edge.loopexit, !llvm.loop !9

._crit_edge82:                                    ; preds = %._crit_edge, %0
  %66 = phi i32 [ %.pre144, %0 ], [ %79, %._crit_edge ]
  %.lcssa = phi i32 [ %8, %0 ], [ %81, %._crit_edge ]
  %67 = mul nsw i32 %66, %.lcssa
  store i32 %67, ptr @n, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds i32, ptr @ord, i64 %68
  call void @_ZSt4sortIPiPFbRKiS2_EEvT_S5_T0_(ptr noundef nonnull @ord, ptr noundef nonnull %69, ptr noundef nonnull @_Z3cmpRKiS0_)
  %70 = load i32, ptr @n, align 4, !tbaa !5
  %71 = icmp sgt i32 %70, 0
  br i1 %71, label %.lr.ph93.preheader, label %._crit_edge94.thread

._crit_edge94.thread:                             ; preds = %._crit_edge82
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  store i32 0, ptr %5, align 4, !tbaa !5
  %72 = shl nsw i32 %70, 1
  %73 = or disjoint i32 %72, 1
  store i32 %73, ptr @N, align 4, !tbaa !5
  store i32 %72, ptr @T, align 4, !tbaa !5
  br label %._crit_edge107

.lr.ph93.preheader:                               ; preds = %._crit_edge82
  %74 = zext nneg i32 %70 to i64
  br label %.lr.ph93

._crit_edge.loopexit:                             ; preds = %60, %36
  %75 = phi i32 [ %38, %36 ], [ %64, %60 ]
  %.lcssa111.wide = phi i64 [ %indvars.iv.next116.peel, %36 ], [ %indvars.iv.next116, %60 ]
  %76 = trunc nsw i64 %.lcssa111.wide to i32
  br label %._crit_edge

._crit_edge.loopexit108:                          ; preds = %120, %32
  %77 = phi i32 [ %34, %32 ], [ %123, %120 ]
  %.lcssa110.wide = phi i64 [ %indvars.iv.next.peel, %32 ], [ %indvars.iv.next, %120 ]
  %78 = trunc nsw i64 %.lcssa110.wide to i32
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit108, %._crit_edge.loopexit, %.preheader
  %79 = phi i32 [ %11, %.preheader ], [ %75, %._crit_edge.loopexit ], [ %77, %._crit_edge.loopexit108 ]
  %.1.lcssa = phi i32 [ %.06680, %.preheader ], [ %76, %._crit_edge.loopexit ], [ %78, %._crit_edge.loopexit108 ]
  %80 = add nuw nsw i32 %.06281, 1
  %81 = load i32, ptr @n, align 4, !tbaa !5
  %82 = icmp slt i32 %80, %81
  br i1 %82, label %.preheader, label %._crit_edge82, !llvm.loop !12

.lr.ph.split:                                     ; preds = %32, %120
  %indvars.iv = phi i64 [ %indvars.iv.next, %120 ], [ %indvars.iv.next.peel, %32 ]
  %.06878 = phi i32 [ %122, %120 ], [ 1, %32 ]
  %83 = getelementptr inbounds i32, ptr @a, i64 %indvars.iv
  %84 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %83)
  %85 = load i32, ptr @m, align 4, !tbaa !5
  %86 = trunc nsw i64 %indvars.iv to i32
  %87 = sub nsw i32 %86, %85
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [3601 x i32], ptr @a, i64 0, i64 %88
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = load i32, ptr %83, align 4, !tbaa !5
  %.not75 = icmp eq i32 %90, %91
  br i1 %.not75, label %102, label %92

92:                                               ; preds = %.lr.ph.split
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  store i32 %87, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  store i32 %86, ptr %2, align 4, !tbaa !5
  %93 = icmp sgt i32 %90, %91
  br i1 %93, label %94, label %95

94:                                               ; preds = %92
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2) #8
  %.pre136 = load i32, ptr %2, align 4, !tbaa !5
  %.pre137 = load i32, ptr %1, align 4, !tbaa !5
  %.pre152 = sext i32 %.pre137 to i64
  br label %95

95:                                               ; preds = %94, %92
  %.pre-phi153 = phi i64 [ %.pre152, %94 ], [ %88, %92 ]
  %96 = phi i32 [ %.pre136, %94 ], [ %86, %92 ]
  %97 = getelementptr inbounds [3601 x [5 x i32]], ptr @nxt, i64 0, i64 %.pre-phi153
  %98 = load i32, ptr %97, align 4, !tbaa !5
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %97, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [3601 x [5 x i32]], ptr @nxt, i64 0, i64 %.pre-phi153, i64 %100
  store i32 %96, ptr %101, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  br label %102

102:                                              ; preds = %.lr.ph.split, %95
  %103 = add nsw i64 %indvars.iv, -1
  %104 = getelementptr inbounds [3601 x i32], ptr @a, i64 0, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = load i32, ptr %83, align 4, !tbaa !5
  %.not77 = icmp eq i32 %105, %106
  br i1 %.not77, label %120, label %107

107:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  %108 = trunc nsw i64 %103 to i32
  store i32 %108, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  store i32 %86, ptr %4, align 4, !tbaa !5
  %109 = icmp sgt i32 %105, %106
  br i1 %109, label %110, label %111

110:                                              ; preds = %107
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4) #8
  %.pre139 = load i32, ptr %4, align 4, !tbaa !5
  %.pre140 = load i32, ptr %3, align 4, !tbaa !5
  br label %111

111:                                              ; preds = %110, %107
  %112 = phi i32 [ %.pre140, %110 ], [ %108, %107 ]
  %113 = phi i32 [ %.pre139, %110 ], [ %86, %107 ]
  %114 = sext i32 %112 to i64
  %115 = getelementptr inbounds [3601 x [5 x i32]], ptr @nxt, i64 0, i64 %114
  %116 = load i32, ptr %115, align 4, !tbaa !5
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %115, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [3601 x [5 x i32]], ptr @nxt, i64 0, i64 %114, i64 %118
  store i32 %113, ptr %119, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  br label %120

120:                                              ; preds = %111, %102
  %121 = getelementptr inbounds [3601 x i32], ptr @ord, i64 0, i64 %indvars.iv
  store i32 %86, ptr %121, align 4, !tbaa !5
  %122 = add nuw nsw i32 %.06878, 1
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %123 = load i32, ptr @m, align 4, !tbaa !5
  %124 = icmp slt i32 %122, %123
  br i1 %124, label %.lr.ph.split, label %._crit_edge.loopexit108, !llvm.loop !14

._crit_edge94:                                    ; preds = %._crit_edge89
  %.pre145 = load i32, ptr @n, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  store i32 0, ptr %5, align 4, !tbaa !5
  %125 = shl nsw i32 %.pre145, 1
  %126 = or disjoint i32 %125, 1
  store i32 %126, ptr @N, align 4, !tbaa !5
  store i32 %125, ptr @T, align 4, !tbaa !5
  %127 = icmp sgt i32 %.pre145, 0
  br i1 %127, label %.lr.ph106, label %._crit_edge107

.lr.ph93:                                         ; preds = %.lr.ph93.preheader, %._crit_edge89
  %indvars.iv122 = phi i64 [ %74, %.lr.ph93.preheader ], [ %indvars.iv.next123, %._crit_edge89 ]
  %indvars.iv.next123 = add nsw i64 %indvars.iv122, -1
  %128 = getelementptr inbounds [3601 x i32], ptr @ord, i64 0, i64 %indvars.iv.next123
  %129 = load i32, ptr %128, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [3601 x i32], ptr @f, i64 0, i64 %130
  store i32 0, ptr %131, align 4, !tbaa !5
  %132 = getelementptr inbounds [3601 x [5 x i32]], ptr @nxt, i64 0, i64 %130
  %133 = load i32, ptr %132, align 4, !tbaa !5
  %.not7385 = icmp slt i32 %133, 1
  br i1 %.not7385, label %._crit_edge89, label %.lr.ph88

._crit_edge89:                                    ; preds = %.lr.ph88, %.lr.ph93
  %134 = phi i32 [ 0, %.lr.ph93 ], [ %142, %.lr.ph88 ]
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %131, align 4, !tbaa !5
  %136 = icmp sgt i64 %indvars.iv122, 1
  br i1 %136, label %.lr.ph93, label %._crit_edge94, !llvm.loop !15

.lr.ph88:                                         ; preds = %.lr.ph93, %.lr.ph88
  %indvars.iv119 = phi i64 [ %indvars.iv.next120, %.lr.ph88 ], [ 1, %.lr.ph93 ]
  %137 = getelementptr inbounds [3601 x [5 x i32]], ptr @nxt, i64 0, i64 %130, i64 %indvars.iv119
  %138 = load i32, ptr %137, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [3601 x i32], ptr @f, i64 0, i64 %139
  %141 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %131, ptr noundef nonnull align 4 dereferenceable(4) %140)
  %142 = load i32, ptr %141, align 4, !tbaa !5
  store i32 %142, ptr %131, align 4, !tbaa !5
  %indvars.iv.next120 = add nuw nsw i64 %indvars.iv119, 1
  %143 = load i32, ptr %132, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %.not73.not = icmp slt i64 %indvars.iv119, %144
  br i1 %.not73.not, label %.lr.ph88, label %._crit_edge89, !llvm.loop !16

._crit_edge107:                                   ; preds = %219, %._crit_edge94.thread, %._crit_edge94
  %145 = phi i32 [ 0, %._crit_edge94 ], [ 0, %._crit_edge94.thread ], [ %223, %219 ]
  %146 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %145)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  ret i32 0

.lr.ph106:                                        ; preds = %._crit_edge94, %219
  %indvars.iv128 = phi i64 [ %indvars.iv.next129, %219 ], [ 0, %._crit_edge94 ]
  %147 = phi i32 [ %224, %219 ], [ %.pre145, %._crit_edge94 ]
  %148 = getelementptr inbounds [3601 x i32], ptr @ord, i64 0, i64 %indvars.iv128
  %149 = load i32, ptr %148, align 4, !tbaa !5
  %150 = add nsw i32 %149, %147
  store i32 %150, ptr @S, align 4, !tbaa !5
  store i32 0, ptr @cost, align 4, !tbaa !5
  store i32 0, ptr @flow, align 4, !tbaa !5
  store i32 0, ptr @M, align 4, !tbaa !5
  %151 = load i32, ptr @N, align 4, !tbaa !5
  %152 = sext i32 %151 to i64
  %153 = shl nsw i64 %152, 2
  call void @llvm.memset.p0.i64(ptr nonnull align 16 @lnk, i8 -1, i64 %153, i1 false)
  %154 = sext i32 %147 to i64
  %155 = icmp slt i64 %indvars.iv128, %154
  br i1 %155, label %.lr.ph102, label %._crit_edge103

._crit_edge103.loopexit:                          ; preds = %._crit_edge99
  %.pre146 = load i32, ptr @S, align 4, !tbaa !5
  %.pre147 = load i32, ptr @N, align 4, !tbaa !5
  %.pre154 = sext i32 %.pre147 to i64
  br label %._crit_edge103

._crit_edge103:                                   ; preds = %._crit_edge103.loopexit, %.lr.ph106
  %.pre-phi155 = phi i64 [ %.pre154, %._crit_edge103.loopexit ], [ %152, %.lr.ph106 ]
  %156 = phi i32 [ %.pre146, %._crit_edge103.loopexit ], [ %150, %.lr.ph106 ]
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [7203 x i32], ptr @dis, i64 0, i64 %157
  %159 = load i32, ptr %158, align 4, !tbaa !5
  store i32 %159, ptr @sum, align 4, !tbaa !5
  %160 = load i32, ptr @T, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [7203 x i32], ptr @dis, i64 0, i64 %161
  store i32 0, ptr %162, align 4, !tbaa !5
  call void @llvm.memset.p0.i64(ptr nonnull align 16 @vis, i8 0, i64 %.pre-phi155, i1 false)
  %163 = call noundef i32 @_Z3dfsii(i32 noundef %156, i32 noundef 2)
  %.not = icmp eq i32 %163, 0
  %.pre150 = load i32, ptr @cost, align 4, !tbaa !5
  br i1 %.not, label %219, label %198

.lr.ph102:                                        ; preds = %.lr.ph106, %._crit_edge99
  %indvars.iv130 = phi i64 [ %indvars.iv.next131, %._crit_edge99 ], [ %indvars.iv128, %.lr.ph106 ]
  %164 = phi i32 [ %183, %._crit_edge99 ], [ %147, %.lr.ph106 ]
  %165 = getelementptr inbounds [3601 x i32], ptr @ord, i64 0, i64 %indvars.iv130
  %166 = load i32, ptr %165, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [3601 x i32], ptr @f, i64 0, i64 %167
  %169 = load i32, ptr %168, align 4, !tbaa !5
  %170 = sub nsw i32 0, %169
  %171 = getelementptr inbounds [7203 x i32], ptr @dis, i64 0, i64 %167
  store i32 %170, ptr %171, align 4, !tbaa !5
  %172 = sub i32 1, %169
  %173 = add nsw i32 %166, %164
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [7203 x i32], ptr @dis, i64 0, i64 %174
  store i32 %172, ptr %175, align 4, !tbaa !5
  call void @_Z7addEdgeiiii(i32 noundef %166, i32 noundef %173, i32 noundef 1, i32 noundef 0)
  %176 = load i32, ptr @n, align 4, !tbaa !5
  %177 = add nsw i32 %176, %166
  %178 = load i32, ptr @T, align 4, !tbaa !5
  %179 = load i32, ptr %168, align 4, !tbaa !5
  %180 = add nsw i32 %179, -1
  call void @_Z7addEdgeiiii(i32 noundef %177, i32 noundef %178, i32 noundef 1, i32 noundef %180)
  %181 = getelementptr inbounds [3601 x [5 x i32]], ptr @nxt, i64 0, i64 %167
  %182 = load i32, ptr %181, align 4, !tbaa !5
  %.not7295 = icmp slt i32 %182, 1
  br i1 %.not7295, label %._crit_edge99, label %.lr.ph98

._crit_edge99:                                    ; preds = %.lr.ph98, %.lr.ph102
  %indvars.iv.next131 = add nuw nsw i64 %indvars.iv130, 1
  %183 = load i32, ptr @n, align 4, !tbaa !5
  %184 = trunc nuw i64 %indvars.iv.next131 to i32
  %185 = icmp sgt i32 %183, %184
  br i1 %185, label %.lr.ph102, label %._crit_edge103.loopexit, !llvm.loop !17

.lr.ph98:                                         ; preds = %.lr.ph102, %.lr.ph98
  %indvars.iv125 = phi i64 [ %indvars.iv.next126, %.lr.ph98 ], [ 1, %.lr.ph102 ]
  %186 = getelementptr inbounds [3601 x [5 x i32]], ptr @nxt, i64 0, i64 %167, i64 %indvars.iv125
  %187 = load i32, ptr %186, align 4, !tbaa !5
  %188 = load i32, ptr @n, align 4, !tbaa !5
  %189 = add nsw i32 %188, %166
  %190 = load i32, ptr %168, align 4, !tbaa !5
  %191 = sext i32 %187 to i64
  %192 = getelementptr inbounds [3601 x i32], ptr @f, i64 0, i64 %191
  %193 = load i32, ptr %192, align 4, !tbaa !5
  %194 = xor i32 %193, -1
  %195 = add i32 %190, %194
  call void @_Z7addEdgeiiii(i32 noundef %189, i32 noundef %187, i32 noundef 1, i32 noundef %195)
  %indvars.iv.next126 = add nuw nsw i64 %indvars.iv125, 1
  %196 = load i32, ptr %181, align 4, !tbaa !5
  %197 = sext i32 %196 to i64
  %.not72.not = icmp slt i64 %indvars.iv125, %197
  br i1 %.not72.not, label %.lr.ph98, label %._crit_edge99, !llvm.loop !18

198:                                              ; preds = %._crit_edge103
  %199 = load i32, ptr @flow, align 4, !tbaa !5
  %200 = add nsw i32 %199, %163
  store i32 %200, ptr @flow, align 4, !tbaa !5
  %201 = load i32, ptr @sum, align 4, !tbaa !5
  %202 = mul nsw i32 %201, %163
  %203 = add nsw i32 %.pre150, %202
  store i32 %203, ptr @cost, align 4, !tbaa !5
  %204 = icmp slt i32 %163, 2
  br i1 %204, label %205, label %219

205:                                              ; preds = %198
  %206 = call noundef zeroext i1 @_Z3bfsv()
  br i1 %206, label %207, label %._crit_edge148

._crit_edge148:                                   ; preds = %205
  %.pre149 = load i32, ptr @cost, align 4, !tbaa !5
  br label %219

207:                                              ; preds = %205
  %208 = load i32, ptr @N, align 4, !tbaa !5
  %209 = sext i32 %208 to i64
  call void @llvm.memset.p0.i64(ptr nonnull align 16 @vis, i8 0, i64 %209, i1 false)
  %210 = load i32, ptr @S, align 4, !tbaa !5
  %211 = sub nsw i32 2, %163
  %212 = call noundef i32 @_Z3dfsii(i32 noundef %210, i32 noundef %211)
  %213 = load i32, ptr @flow, align 4, !tbaa !5
  %214 = add nsw i32 %213, %212
  store i32 %214, ptr @flow, align 4, !tbaa !5
  %215 = load i32, ptr @sum, align 4, !tbaa !5
  %216 = mul nsw i32 %215, %212
  %217 = load i32, ptr @cost, align 4, !tbaa !5
  %218 = add nsw i32 %217, %216
  store i32 %218, ptr @cost, align 4, !tbaa !5
  br label %219

219:                                              ; preds = %._crit_edge148, %198, %207, %._crit_edge103
  %220 = phi i32 [ %.pre149, %._crit_edge148 ], [ %203, %198 ], [ %218, %207 ], [ %.pre150, %._crit_edge103 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #8
  %221 = sub i32 1, %220
  store i32 %221, ptr %6, align 4, !tbaa !5
  %222 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %223 = load i32, ptr %222, align 4, !tbaa !5
  store i32 %223, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  %indvars.iv.next129 = add nuw nsw i64 %indvars.iv128, 1
  %224 = load i32, ptr @n, align 4, !tbaa !5
  %225 = sext i32 %224 to i64
  %226 = icmp slt i64 %indvars.iv.next129, %225
  br i1 %226, label %.lr.ph106, label %._crit_edge107, !llvm.loop !19
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPiPFbRKiS2_EEvT_S5_T0_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z3cmpRKiS0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { inlinehint 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 #5 = { 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 #6 = { 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 #7 = { 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 #8 = { 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, !11}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.peeled.count", i32 1}
!12 = distinct !{!12, !10, !13}
!13 = !{!"llvm.loop.unswitch.partial.disable"}
!14 = distinct !{!14, !10, !11}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass