; LLVM IR from tangjz/acm-icpc :: timus (1999)

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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@nxt = external dso_local global [101 x [11 x i32]], align 16
@tot = external dso_local global i32, align 4
@idx = external dso_local global [2 x [101 x [101 x i32]]], align 16
@que = external dso_local global [20001 x [3 x i32]], align 16
@trans = external dso_local global [20001 x [11 x i32]], align 16
@stp = external dso_local global [101 x i8], align 16
@e = external dso_local global [201 x [11 x %"class.std::vector"]], align 16
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z6modifyRSt6vectorIiSaIiEERiS3_S3_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #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 norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %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
  store i32 0, ptr %1, align 4
  %19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.4, ptr noundef @m, ptr noundef @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %20

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

24:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %33

25:                                               ; preds = %20
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds i8, ptr @stp, i64 %27
  %29 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.5, ptr noundef %28)
  br label %30

30:                                               ; preds = %25
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %32 = add nsw i32 %31, 1
  store i32 %32, ptr %2, align 4, !tbaa !5
  br label %20, !llvm.loop !9

33:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %34

34:                                               ; preds = %137, %33
  %35 = load i32, ptr %3, align 4, !tbaa !5
  %36 = load i32, ptr @n, align 4, !tbaa !5
  %37 = icmp slt i32 %35, %36
  br i1 %37, label %39, label %38

38:                                               ; preds = %34
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %140

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

40:                                               ; preds = %133, %39
  %41 = load i32, ptr %5, align 4, !tbaa !5
  %42 = icmp slt i32 %41, 10
  br i1 %42, label %44, label %43

43:                                               ; preds = %40
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %136

44:                                               ; preds = %40
  %45 = load i32, ptr %3, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [101 x [11 x i32]], ptr @nxt, i64 0, i64 %46
  %48 = getelementptr inbounds [11 x i32], ptr %47, i64 0, i64 0
  %49 = load i32, ptr %5, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds i32, ptr %48, i64 %50
  %52 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.5, ptr noundef %51)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %53 = load i32, ptr %3, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [101 x [11 x i32]], ptr @nxt, i64 0, i64 %54
  %56 = load i32, ptr %5, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [11 x i32], ptr %55, i64 0, i64 %57
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = add nsw i32 %59, -1
  store i32 %60, ptr %58, align 4, !tbaa !5
  store i32 %60, ptr %6, align 4, !tbaa !5
  %61 = load i32, ptr %3, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [201 x [11 x %"class.std::vector"]], ptr @e, i64 0, i64 %62
  %64 = load i32, ptr %5, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [11 x %"class.std::vector"], ptr %63, i64 0, i64 %65
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %66, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %67 = load i32, ptr %5, align 4, !tbaa !5
  %68 = add nsw i32 %67, 1
  %69 = icmp slt i32 %68, 10
  br i1 %69, label %70, label %81

70:                                               ; preds = %44
  %71 = load i32, ptr %3, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [201 x [11 x %"class.std::vector"]], ptr @e, i64 0, i64 %72
  %74 = load i32, ptr %5, align 4, !tbaa !5
  %75 = add nsw i32 %74, 1
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [11 x %"class.std::vector"], ptr %73, i64 0, i64 %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %78 = load i32, ptr @n, align 4, !tbaa !5
  %79 = load i32, ptr %6, align 4, !tbaa !5
  %80 = add nsw i32 %78, %79
  store i32 %80, ptr %7, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %77, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %95

81:                                               ; preds = %44
  %82 = load i32, ptr @n, align 4, !tbaa !5
  %83 = load i32, ptr %3, align 4, !tbaa !5
  %84 = add nsw i32 %82, %83
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [201 x [11 x %"class.std::vector"]], ptr @e, i64 0, i64 %85
  %87 = load i32, ptr %5, align 4, !tbaa !5
  %88 = add nsw i32 %87, 1
  %89 = sub nsw i32 %88, 10
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [11 x %"class.std::vector"], ptr %86, i64 0, i64 %90
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %92 = load i32, ptr @n, align 4, !tbaa !5
  %93 = load i32, ptr %6, align 4, !tbaa !5
  %94 = add nsw i32 %92, %93
  store i32 %94, ptr %8, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %91, ptr noundef nonnull align 4 dereferenceable(4) %8)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %95

95:                                               ; preds = %81, %70
  %96 = load i32, ptr %6, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [101 x i8], ptr @stp, i64 0, i64 %97
  %99 = load i8, ptr %98, align 1, !tbaa !11, !range !13, !noundef !14
  %100 = trunc i8 %99 to i1
  br i1 %100, label %101, label %132

101:                                              ; preds = %95
  %102 = load i32, ptr %5, align 4, !tbaa !5
  %103 = load i32, ptr @m, align 4, !tbaa !5
  %104 = add nsw i32 %102, %103
  %105 = icmp slt i32 %104, 10
  br i1 %105, label %106, label %117

106:                                              ; preds = %101
  %107 = load i32, ptr %3, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [201 x [11 x %"class.std::vector"]], ptr @e, i64 0, i64 %108
  %110 = load i32, ptr %5, align 4, !tbaa !5
  %111 = load i32, ptr @m, align 4, !tbaa !5
  %112 = add nsw i32 %110, %111
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [11 x %"class.std::vector"], ptr %109, i64 0, i64 %113
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %115 = load i32, ptr @n, align 4, !tbaa !5
  %116 = shl i32 %115, 1
  store i32 %116, ptr %9, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %114, ptr noundef nonnull align 4 dereferenceable(4) %9)
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %131

117:                                              ; preds = %101
  %118 = load i32, ptr @n, align 4, !tbaa !5
  %119 = load i32, ptr %3, align 4, !tbaa !5
  %120 = add nsw i32 %118, %119
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [201 x [11 x %"class.std::vector"]], ptr @e, i64 0, i64 %121
  %123 = load i32, ptr %5, align 4, !tbaa !5
  %124 = load i32, ptr @m, align 4, !tbaa !5
  %125 = add nsw i32 %123, %124
  %126 = sub nsw i32 %125, 10
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [11 x %"class.std::vector"], ptr %122, i64 0, i64 %127
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %129 = load i32, ptr @n, align 4, !tbaa !5
  %130 = shl i32 %129, 1
  store i32 %130, ptr %10, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %128, ptr noundef nonnull align 4 dereferenceable(4) %10)
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %131

131:                                              ; preds = %117, %106
  br label %132

132:                                              ; preds = %131, %95
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %133

133:                                              ; preds = %132
  %134 = load i32, ptr %5, align 4, !tbaa !5
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %5, align 4, !tbaa !5
  br label %40, !llvm.loop !15

136:                                              ; preds = %43
  br label %137

137:                                              ; preds = %136
  %138 = load i32, ptr %3, align 4, !tbaa !5
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %3, align 4, !tbaa !5
  br label %34, !llvm.loop !16

140:                                              ; preds = %38
  call void @llvm.memset.p0.i64(ptr align 16 @idx, i8 -1, i64 81608, i1 false)
  %141 = load i32, ptr @tot, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [20001 x [3 x i32]], ptr @que, i64 0, i64 %142
  %144 = getelementptr inbounds [3 x i32], ptr %143, i64 0, i64 0
  store i32 0, ptr %144, align 4, !tbaa !5
  %145 = load i32, ptr @n, align 4, !tbaa !5
  %146 = load i32, ptr @tot, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [20001 x [3 x i32]], ptr @que, i64 0, i64 %147
  %149 = getelementptr inbounds [3 x i32], ptr %148, i64 0, i64 1
  store i32 %145, ptr %149, align 4, !tbaa !5
  %150 = load i32, ptr @tot, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [20001 x [3 x i32]], ptr @que, i64 0, i64 %151
  %153 = getelementptr inbounds [3 x i32], ptr %152, i64 0, i64 2
  store i32 1, ptr %153, align 4, !tbaa !5
  %154 = load i32, ptr @tot, align 4, !tbaa !5
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr @tot, align 4, !tbaa !5
  %156 = load i32, ptr @n, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [101 x [101 x i32]], ptr getelementptr inbounds ([2 x [101 x [101 x i32]]], ptr @idx, i64 0, i64 1), i64 0, i64 %157
  %159 = getelementptr inbounds [101 x i32], ptr %158, i64 0, i64 0
  store i32 %154, ptr %159, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %160

160:                                              ; preds = %287, %140
  %161 = load i32, ptr %11, align 4, !tbaa !5
  %162 = load i32, ptr @tot, align 4, !tbaa !5
  %163 = icmp slt i32 %161, %162
  br i1 %163, label %165, label %164

164:                                              ; preds = %160
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %290

165:                                              ; preds = %160
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %166

166:                                              ; preds = %283, %165
  %167 = load i32, ptr %12, align 4, !tbaa !5
  %168 = icmp slt i32 %167, 10
  br i1 %168, label %170, label %169

169:                                              ; preds = %166
  store i32 14, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %286

170:                                              ; preds = %166
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %171 = load i32, ptr @n, align 4, !tbaa !5
  store i32 %171, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %172 = load i32, ptr @n, align 4, !tbaa !5
  store i32 %172, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 1, ptr %15, align 4, !tbaa !5
  %173 = load i32, ptr %11, align 4, !tbaa !5
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [20001 x [3 x i32]], ptr @que, i64 0, i64 %174
  %176 = getelementptr inbounds [3 x i32], ptr %175, i64 0, i64 0
  %177 = load i32, ptr %176, align 4, !tbaa !5
  %178 = load i32, ptr @n, align 4, !tbaa !5
  %179 = icmp slt i32 %177, %178
  br i1 %179, label %180, label %191

180:                                              ; preds = %170
  %181 = load i32, ptr %11, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [20001 x [3 x i32]], ptr @que, i64 0, i64 %182
  %184 = getelementptr inbounds [3 x i32], ptr %183, i64 0, i64 0
  %185 = load i32, ptr %184, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [201 x [11 x %"class.std::vector"]], ptr @e, i64 0, i64 %186
  %188 = load i32, ptr %12, align 4, !tbaa !5
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds [11 x %"class.std::vector"], ptr %187, i64 0, i64 %189
  call void @_Z6modifyRSt6vectorIiSaIiEERiS3_S3_(ptr noundef nonnull align 8 dereferenceable(24) %190, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15)
  br label %191

191:                                              ; preds = %180, %170
  %192 = load i32, ptr %11, align 4, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [20001 x [3 x i32]], ptr @que, i64 0, i64 %193
  %195 = getelementptr inbounds [3 x i32], ptr %194, i64 0, i64 1
  %196 = load i32, ptr %195, align 4, !tbaa !5
  %197 = load i32, ptr @n, align 4, !tbaa !5
  %198 = icmp slt i32 %196, %197
  br i1 %198, label %199, label %212

199:                                              ; preds = %191
  %200 = load i32, ptr @n, align 4, !tbaa !5
  %201 = load i32, ptr %11, align 4, !tbaa !5
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds [20001 x [3 x i32]], ptr @que, i64 0, i64 %202
  %204 = getelementptr inbounds [3 x i32], ptr %203, i64 0, i64 1
  %205 = load i32, ptr %204, align 4, !tbaa !5
  %206 = add nsw i32 %200, %205
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [201 x [11 x %"class.std::vector"]], ptr @e, i64 0, i64 %207
  %209 = load i32, ptr %12, align 4, !tbaa !5
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds [11 x %"class.std::vector"], ptr %208, i64 0, i64 %210
  call void @_Z6modifyRSt6vectorIiSaIiEERiS3_S3_(ptr noundef nonnull align 8 dereferenceable(24) %211, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15)
  br label %212

212:                                              ; preds = %199, %191
  %213 = load i32, ptr %11, align 4, !tbaa !5
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds [20001 x [3 x i32]], ptr @que, i64 0, i64 %214
  %216 = getelementptr inbounds [3 x i32], ptr %215, i64 0, i64 2
  %217 = load i32, ptr %216, align 4, !tbaa !5
  %218 = icmp slt i32 %217, 1
  br i1 %218, label %219, label %227

219:                                              ; preds = %212
  %220 = load i32, ptr @n, align 4, !tbaa !5
  %221 = shl i32 %220, 1
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds [201 x [11 x %"class.std::vector"]], ptr @e, i64 0, i64 %222
  %224 = load i32, ptr %12, align 4, !tbaa !5
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds [11 x %"class.std::vector"], ptr %223, i64 0, i64 %225
  call void @_Z6modifyRSt6vectorIiSaIiEERiS3_S3_(ptr noundef nonnull align 8 dereferenceable(24) %226, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15)
  br label %227

227:                                              ; preds = %219, %212
  %228 = load i32, ptr %15, align 4, !tbaa !5
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds [2 x [101 x [101 x i32]]], ptr @idx, i64 0, i64 %229
  %231 = load i32, ptr %14, align 4, !tbaa !5
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds [101 x [101 x i32]], ptr %230, i64 0, i64 %232
  %234 = load i32, ptr %13, align 4, !tbaa !5
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds [101 x i32], ptr %233, i64 0, i64 %235
  %237 = load i32, ptr %236, align 4, !tbaa !5
  %238 = icmp eq i32 %237, -1
  br i1 %238, label %239, label %266

239:                                              ; preds = %227
  %240 = load i32, ptr %13, align 4, !tbaa !5
  %241 = load i32, ptr @tot, align 4, !tbaa !5
  %242 = sext i32 %241 to i64
  %243 = getelementptr inbounds [20001 x [3 x i32]], ptr @que, i64 0, i64 %242
  %244 = getelementptr inbounds [3 x i32], ptr %243, i64 0, i64 0
  store i32 %240, ptr %244, align 4, !tbaa !5
  %245 = load i32, ptr %14, align 4, !tbaa !5
  %246 = load i32, ptr @tot, align 4, !tbaa !5
  %247 = sext i32 %246 to i64
  %248 = getelementptr inbounds [20001 x [3 x i32]], ptr @que, i64 0, i64 %247
  %249 = getelementptr inbounds [3 x i32], ptr %248, i64 0, i64 1
  store i32 %245, ptr %249, align 4, !tbaa !5
  %250 = load i32, ptr %15, align 4, !tbaa !5
  %251 = load i32, ptr @tot, align 4, !tbaa !5
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds [20001 x [3 x i32]], ptr @que, i64 0, i64 %252
  %254 = getelementptr inbounds [3 x i32], ptr %253, i64 0, i64 2
  store i32 %250, ptr %254, align 4, !tbaa !5
  %255 = load i32, ptr @tot, align 4, !tbaa !5
  %256 = add nsw i32 %255, 1
  store i32 %256, ptr @tot, align 4, !tbaa !5
  %257 = load i32, ptr %15, align 4, !tbaa !5
  %258 = sext i32 %257 to i64
  %259 = getelementptr inbounds [2 x [101 x [101 x i32]]], ptr @idx, i64 0, i64 %258
  %260 = load i32, ptr %14, align 4, !tbaa !5
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds [101 x [101 x i32]], ptr %259, i64 0, i64 %261
  %263 = load i32, ptr %13, align 4, !tbaa !5
  %264 = sext i32 %263 to i64
  %265 = getelementptr inbounds [101 x i32], ptr %262, i64 0, i64 %264
  store i32 %255, ptr %265, align 4, !tbaa !5
  br label %266

266:                                              ; preds = %239, %227
  %267 = load i32, ptr %15, align 4, !tbaa !5
  %268 = sext i32 %267 to i64
  %269 = getelementptr inbounds [2 x [101 x [101 x i32]]], ptr @idx, i64 0, i64 %268
  %270 = load i32, ptr %14, align 4, !tbaa !5
  %271 = sext i32 %270 to i64
  %272 = getelementptr inbounds [101 x [101 x i32]], ptr %269, i64 0, i64 %271
  %273 = load i32, ptr %13, align 4, !tbaa !5
  %274 = sext i32 %273 to i64
  %275 = getelementptr inbounds [101 x i32], ptr %272, i64 0, i64 %274
  %276 = load i32, ptr %275, align 4, !tbaa !5
  %277 = load i32, ptr %11, align 4, !tbaa !5
  %278 = sext i32 %277 to i64
  %279 = getelementptr inbounds [20001 x [11 x i32]], ptr @trans, i64 0, i64 %278
  %280 = load i32, ptr %12, align 4, !tbaa !5
  %281 = sext i32 %280 to i64
  %282 = getelementptr inbounds [11 x i32], ptr %279, i64 0, i64 %281
  store i32 %276, ptr %282, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %283

283:                                              ; preds = %266
  %284 = load i32, ptr %12, align 4, !tbaa !5
  %285 = add nsw i32 %284, 1
  store i32 %285, ptr %12, align 4, !tbaa !5
  br label %166, !llvm.loop !17

286:                                              ; preds = %169
  br label %287

287:                                              ; preds = %286
  %288 = load i32, ptr %11, align 4, !tbaa !5
  %289 = add nsw i32 %288, 1
  store i32 %289, ptr %11, align 4, !tbaa !5
  br label %160, !llvm.loop !18

290:                                              ; preds = %164
  %291 = call i32 @puts(ptr noundef @.str.6)
  %292 = load i32, ptr @tot, align 4, !tbaa !5
  %293 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, i32 noundef %292)
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %294

294:                                              ; preds = %317, %290
  %295 = load i32, ptr %16, align 4, !tbaa !5
  %296 = load i32, ptr @tot, align 4, !tbaa !5
  %297 = icmp slt i32 %295, %296
  br i1 %297, label %299, label %298

298:                                              ; preds = %294
  store i32 17, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %320

299:                                              ; preds = %294
  %300 = load i32, ptr %16, align 4, !tbaa !5
  %301 = sext i32 %300 to i64
  %302 = getelementptr inbounds [20001 x [3 x i32]], ptr @que, i64 0, i64 %301
  %303 = getelementptr inbounds [3 x i32], ptr %302, i64 0, i64 2
  %304 = load i32, ptr %303, align 4, !tbaa !5
  %305 = icmp ne i32 %304, 0
  %306 = xor i1 %305, true
  %307 = zext i1 %306 to i32
  %308 = load i32, ptr %16, align 4, !tbaa !5
  %309 = load i32, ptr @tot, align 4, !tbaa !5
  %310 = sub nsw i32 %309, 1
  %311 = icmp eq i32 %308, %310
  %312 = zext i1 %311 to i64
  %313 = getelementptr inbounds [3 x i8], ptr @.str.9, i64 0, i64 %312
  %314 = load i8, ptr %313, align 1, !tbaa !19
  %315 = sext i8 %314 to i32
  %316 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, i32 noundef %307, i32 noundef %315)
  br label %317

317:                                              ; preds = %299
  %318 = load i32, ptr %16, align 4, !tbaa !5
  %319 = add nsw i32 %318, 1
  store i32 %319, ptr %16, align 4, !tbaa !5
  br label %294, !llvm.loop !20

320:                                              ; preds = %298
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %321

321:                                              ; preds = %351, %320
  %322 = load i32, ptr %17, align 4, !tbaa !5
  %323 = load i32, ptr @tot, align 4, !tbaa !5
  %324 = icmp slt i32 %322, %323
  br i1 %324, label %326, label %325

325:                                              ; preds = %321
  store i32 20, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %354

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

327:                                              ; preds = %347, %326
  %328 = load i32, ptr %18, align 4, !tbaa !5
  %329 = icmp slt i32 %328, 10
  br i1 %329, label %331, label %330

330:                                              ; preds = %327
  store i32 23, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %350

331:                                              ; preds = %327
  %332 = load i32, ptr %17, align 4, !tbaa !5
  %333 = sext i32 %332 to i64
  %334 = getelementptr inbounds [20001 x [11 x i32]], ptr @trans, i64 0, i64 %333
  %335 = load i32, ptr %18, align 4, !tbaa !5
  %336 = sext i32 %335 to i64
  %337 = getelementptr inbounds [11 x i32], ptr %334, i64 0, i64 %336
  %338 = load i32, ptr %337, align 4, !tbaa !5
  %339 = add nsw i32 %338, 1
  %340 = load i32, ptr %18, align 4, !tbaa !5
  %341 = icmp eq i32 %340, 9
  %342 = zext i1 %341 to i64
  %343 = getelementptr inbounds [3 x i8], ptr @.str.9, i64 0, i64 %342
  %344 = load i8, ptr %343, align 1, !tbaa !19
  %345 = sext i8 %344 to i32
  %346 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, i32 noundef %339, i32 noundef %345)
  br label %347

347:                                              ; preds = %331
  %348 = load i32, ptr %18, align 4, !tbaa !5
  %349 = add nsw i32 %348, 1
  store i32 %349, ptr %18, align 4, !tbaa !5
  br label %327, !llvm.loop !21

350:                                              ; preds = %330
  br label %351

351:                                              ; preds = %350
  %352 = load i32, ptr %17, align 4, !tbaa !5
  %353 = add nsw i32 %352, 1
  store i32 %353, ptr %17, align 4, !tbaa !5
  br label %321, !llvm.loop !22

354:                                              ; preds = %325
  ret i32 0
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #4 align 2

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

declare i32 @puts(ptr noundef) #3

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

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 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 #3 = { "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 = { 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = !{!7, !7, i64 0}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !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"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@nxt = external dso_local global [101 x [11 x i32]], align 16
@tot = external dso_local local_unnamed_addr global i32, align 4
@idx = external dso_local local_unnamed_addr global [2 x [101 x [101 x i32]]], align 16
@que = external dso_local local_unnamed_addr global [20001 x [3 x i32]], align 16
@trans = external dso_local local_unnamed_addr global [20001 x [11 x i32]], align 16
@stp = external dso_local global [101 x i8], align 16
@e = external dso_local global [201 x [11 x %"class.std::vector"]], align 16
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z6modifyRSt6vectorIiSaIiEERiS3_S3_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) 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 norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %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 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef nonnull @m, ptr noundef nonnull @n)
  %10 = load i32, ptr @n, align 4, !tbaa !5
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph, label %.preheader66.._crit_edge_crit_edge

.preheader66:                                     ; preds = %.lr.ph
  %12 = icmp sgt i32 %16, 0
  br i1 %12, label %.preheader65, label %.preheader66.._crit_edge_crit_edge

.preheader66.._crit_edge_crit_edge:               ; preds = %0, %.preheader66
  %13 = phi i32 [ %16, %.preheader66 ], [ %10, %0 ]
  %.pre106 = sext i32 %13 to i64
  br label %._crit_edge

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %14 = getelementptr inbounds i8, ptr @stp, i64 %indvars.iv
  %15 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.5, ptr noundef nonnull %14)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %16 = load i32, ptr @n, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = icmp slt i64 %indvars.iv.next, %17
  br i1 %18, label %.lr.ph, label %.preheader66, !llvm.loop !9

.preheader65:                                     ; preds = %.preheader66, %30
  %indvars.iv84 = phi i64 [ %indvars.iv.next85, %30 ], [ 0, %.preheader66 ]
  %19 = getelementptr inbounds [101 x [11 x i32]], ptr @nxt, i64 0, i64 %indvars.iv84
  %20 = trunc nuw nsw i64 %indvars.iv84 to i32
  %21 = trunc nuw nsw i64 %indvars.iv84 to i32
  br label %34

._crit_edge:                                      ; preds = %30, %.preheader66.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre106, %.preheader66.._crit_edge_crit_edge ], [ %32, %30 ]
  %.lcssa = phi i32 [ %13, %.preheader66.._crit_edge_crit_edge ], [ %31, %30 ]
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(81608) @idx, i8 -1, i64 81608, i1 false)
  %22 = load i32, ptr @tot, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [20001 x [3 x i32]], ptr @que, i64 0, i64 %23
  store i32 0, ptr %24, align 4, !tbaa !5
  %25 = getelementptr inbounds [20001 x [3 x i32]], ptr @que, i64 0, i64 %23, i64 1
  store i32 %.lcssa, ptr %25, align 4, !tbaa !5
  %26 = getelementptr inbounds [20001 x [3 x i32]], ptr @que, i64 0, i64 %23, i64 2
  store i32 1, ptr %26, align 4, !tbaa !5
  %27 = add nsw i32 %22, 1
  store i32 %27, ptr @tot, align 4, !tbaa !5
  %28 = getelementptr inbounds [101 x [101 x i32]], ptr getelementptr inbounds (i8, ptr @idx, i64 40804), i64 0, i64 %.pre-phi
  store i32 %22, ptr %28, align 4, !tbaa !5
  %29 = icmp sgt i32 %22, -1
  br i1 %29, label %.preheader64, label %._crit_edge72

30:                                               ; preds = %77
  %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1
  %31 = load i32, ptr @n, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = icmp slt i64 %indvars.iv.next85, %32
  br i1 %33, label %.preheader65, label %._crit_edge, !llvm.loop !11

34:                                               ; preds = %.preheader65, %77
  %indvars.iv81 = phi i64 [ 0, %.preheader65 ], [ %indvars.iv.next82, %77 ]
  %35 = getelementptr inbounds i32, ptr %19, i64 %indvars.iv81
  %36 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.5, ptr noundef nonnull %35)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  %37 = getelementptr inbounds [101 x [11 x i32]], ptr @nxt, i64 0, i64 %indvars.iv84, i64 %indvars.iv81
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = add nsw i32 %38, -1
  store i32 %39, ptr %37, align 4, !tbaa !5
  store i32 %39, ptr %1, align 4, !tbaa !5
  %40 = getelementptr inbounds [201 x [11 x %"class.std::vector"]], ptr @e, i64 0, i64 %indvars.iv84, i64 %indvars.iv81
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %40, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1
  %.not62 = icmp eq i64 %indvars.iv81, 9
  br i1 %.not62, label %46, label %41

41:                                               ; preds = %34
  %42 = getelementptr inbounds [201 x [11 x %"class.std::vector"]], ptr @e, i64 0, i64 %indvars.iv84, i64 %indvars.iv.next82
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %43 = load i32, ptr @n, align 4, !tbaa !5
  %44 = load i32, ptr %1, align 4, !tbaa !5
  %45 = add nsw i32 %44, %43
  store i32 %45, ptr %2, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %42, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  br label %53

46:                                               ; preds = %34
  %47 = load i32, ptr @n, align 4, !tbaa !5
  %48 = add nsw i32 %47, %20
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [201 x [11 x %"class.std::vector"]], ptr @e, i64 0, i64 %49
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %51 = load i32, ptr %1, align 4, !tbaa !5
  %52 = add nsw i32 %51, %47
  store i32 %52, ptr %3, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %50, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  br label %53

53:                                               ; preds = %46, %41
  %54 = load i32, ptr %1, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [101 x i8], ptr @stp, i64 0, i64 %55
  %57 = load i8, ptr %56, align 1, !tbaa !12, !range !14, !noundef !15
  %58 = trunc nuw i8 %57 to i1
  br i1 %58, label %59, label %77

59:                                               ; preds = %53
  %60 = load i32, ptr @m, align 4, !tbaa !5
  %61 = trunc nuw nsw i64 %indvars.iv81 to i32
  %62 = add nsw i32 %60, %61
  %63 = icmp slt i32 %62, 10
  br i1 %63, label %64, label %69

64:                                               ; preds = %59
  %65 = sext i32 %62 to i64
  %66 = getelementptr inbounds [201 x [11 x %"class.std::vector"]], ptr @e, i64 0, i64 %indvars.iv84, i64 %65
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  %67 = load i32, ptr @n, align 4, !tbaa !5
  %68 = shl i32 %67, 1
  store i32 %68, ptr %4, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %66, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  br label %77

69:                                               ; preds = %59
  %70 = load i32, ptr @n, align 4, !tbaa !5
  %71 = add nsw i32 %70, %21
  %72 = sext i32 %71 to i64
  %73 = add nsw i32 %62, -10
  %74 = zext nneg i32 %73 to i64
  %75 = getelementptr inbounds [201 x [11 x %"class.std::vector"]], ptr @e, i64 0, i64 %72, i64 %74
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  %76 = shl i32 %70, 1
  store i32 %76, ptr %5, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %75, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  br label %77

77:                                               ; preds = %64, %69, %53
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  %exitcond.not = icmp eq i64 %indvars.iv.next82, 10
  br i1 %exitcond.not, label %30, label %34, !llvm.loop !16

.preheader64:                                     ; preds = %._crit_edge, %86
  %indvars.iv91 = phi i64 [ %indvars.iv.next92, %86 ], [ 0, %._crit_edge ]
  %78 = getelementptr inbounds [20001 x [3 x i32]], ptr @que, i64 0, i64 %indvars.iv91
  %79 = getelementptr inbounds i8, ptr %78, i64 4
  %80 = getelementptr inbounds i8, ptr %78, i64 8
  br label %90

._crit_edge72:                                    ; preds = %86, %._crit_edge
  %81 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.6)
  %82 = load i32, ptr @tot, align 4, !tbaa !5
  %83 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef %82)
  %84 = load i32, ptr @tot, align 4, !tbaa !5
  %85 = icmp sgt i32 %84, 0
  br i1 %85, label %.lr.ph75, label %._crit_edge78

86:                                               ; preds = %130
  %indvars.iv.next92 = add nuw nsw i64 %indvars.iv91, 1
  %87 = load i32, ptr @tot, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = icmp slt i64 %indvars.iv.next92, %88
  br i1 %89, label %.preheader64, label %._crit_edge72, !llvm.loop !17

90:                                               ; preds = %.preheader64, %130
  %indvars.iv87 = phi i64 [ 0, %.preheader64 ], [ %indvars.iv.next88, %130 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  %91 = load i32, ptr @n, align 4, !tbaa !5
  store i32 %91, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  store i32 %91, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  store i32 1, ptr %8, align 4, !tbaa !5
  %92 = load i32, ptr %78, align 4, !tbaa !5
  %93 = icmp slt i32 %92, %91
  br i1 %93, label %94, label %97

94:                                               ; preds = %90
  %95 = sext i32 %92 to i64
  %96 = getelementptr inbounds [201 x [11 x %"class.std::vector"]], ptr @e, i64 0, i64 %95, i64 %indvars.iv87
  call void @_Z6modifyRSt6vectorIiSaIiEERiS3_S3_(ptr noundef nonnull align 8 dereferenceable(24) %96, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %.pre = load i32, ptr @n, align 4, !tbaa !5
  br label %97

97:                                               ; preds = %94, %90
  %98 = phi i32 [ %.pre, %94 ], [ %91, %90 ]
  %99 = load i32, ptr %79, align 4, !tbaa !5
  %100 = icmp slt i32 %99, %98
  br i1 %100, label %101, label %105

101:                                              ; preds = %97
  %102 = add nsw i32 %98, %99
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [201 x [11 x %"class.std::vector"]], ptr @e, i64 0, i64 %103, i64 %indvars.iv87
  call void @_Z6modifyRSt6vectorIiSaIiEERiS3_S3_(ptr noundef nonnull align 8 dereferenceable(24) %104, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  br label %105

105:                                              ; preds = %101, %97
  %106 = load i32, ptr %80, align 4, !tbaa !5
  %107 = icmp slt i32 %106, 1
  br i1 %107, label %108, label %113

108:                                              ; preds = %105
  %109 = load i32, ptr @n, align 4, !tbaa !5
  %110 = shl i32 %109, 1
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [201 x [11 x %"class.std::vector"]], ptr @e, i64 0, i64 %111, i64 %indvars.iv87
  call void @_Z6modifyRSt6vectorIiSaIiEERiS3_S3_(ptr noundef nonnull align 8 dereferenceable(24) %112, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  br label %113

113:                                              ; preds = %108, %105
  %114 = load i32, ptr %8, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = load i32, ptr %7, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = load i32, ptr %6, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [2 x [101 x [101 x i32]]], ptr @idx, i64 0, i64 %115, i64 %117, i64 %119
  %121 = load i32, ptr %120, align 4, !tbaa !5
  %122 = icmp eq i32 %121, -1
  br i1 %122, label %123, label %130

123:                                              ; preds = %113
  %124 = load i32, ptr @tot, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [20001 x [3 x i32]], ptr @que, i64 0, i64 %125
  store i32 %118, ptr %126, align 4, !tbaa !5
  %127 = getelementptr inbounds [20001 x [3 x i32]], ptr @que, i64 0, i64 %125, i64 1
  store i32 %116, ptr %127, align 4, !tbaa !5
  %128 = getelementptr inbounds [20001 x [3 x i32]], ptr @que, i64 0, i64 %125, i64 2
  store i32 %114, ptr %128, align 4, !tbaa !5
  %129 = add nsw i32 %124, 1
  store i32 %129, ptr @tot, align 4, !tbaa !5
  store i32 %124, ptr %120, align 4, !tbaa !5
  br label %130

130:                                              ; preds = %123, %113
  %131 = phi i32 [ %124, %123 ], [ %121, %113 ]
  %132 = getelementptr inbounds [20001 x [11 x i32]], ptr @trans, i64 0, i64 %indvars.iv91, i64 %indvars.iv87
  store i32 %131, ptr %132, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  %indvars.iv.next88 = add nuw nsw i64 %indvars.iv87, 1
  %exitcond90.not = icmp eq i64 %indvars.iv.next88, 10
  br i1 %exitcond90.not, label %86, label %90, !llvm.loop !18

.preheader63:                                     ; preds = %.lr.ph75
  %133 = icmp sgt i32 %148, 0
  br i1 %133, label %.preheader.preheader, label %._crit_edge78

.preheader.preheader:                             ; preds = %.preheader63
  %.pre104 = load i8, ptr @.str.9, align 1, !tbaa !19
  %.pre105 = load i8, ptr getelementptr inbounds (i8, ptr @.str.9, i64 1), align 1, !tbaa !19
  %134 = sext i8 %.pre104 to i32
  %135 = sext i8 %.pre105 to i32
  br label %.preheader

.lr.ph75:                                         ; preds = %._crit_edge72, %.lr.ph75
  %indvars.iv94 = phi i64 [ %indvars.iv.next95, %.lr.ph75 ], [ 0, %._crit_edge72 ]
  %136 = phi i32 [ %148, %.lr.ph75 ], [ %84, %._crit_edge72 ]
  %137 = getelementptr inbounds [20001 x [3 x i32]], ptr @que, i64 0, i64 %indvars.iv94, i64 2
  %138 = load i32, ptr %137, align 4, !tbaa !5
  %.not = icmp eq i32 %138, 0
  %139 = zext i1 %.not to i32
  %140 = add nsw i32 %136, -1
  %141 = zext i32 %140 to i64
  %142 = icmp eq i64 %indvars.iv94, %141
  %143 = zext i1 %142 to i64
  %144 = getelementptr inbounds [3 x i8], ptr @.str.9, i64 0, i64 %143
  %145 = load i8, ptr %144, align 1, !tbaa !19
  %146 = sext i8 %145 to i32
  %147 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i32 noundef %139, i32 noundef %146)
  %indvars.iv.next95 = add nuw nsw i64 %indvars.iv94, 1
  %148 = load i32, ptr @tot, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = icmp slt i64 %indvars.iv.next95, %149
  br i1 %150, label %.lr.ph75, label %.preheader63, !llvm.loop !20

.preheader:                                       ; preds = %.preheader.preheader, %.preheader
  %indvars.iv101 = phi i64 [ 0, %.preheader.preheader ], [ %indvars.iv.next102, %.preheader ]
  %151 = getelementptr inbounds [20001 x [11 x i32]], ptr @trans, i64 0, i64 %indvars.iv101, i64 0
  %152 = load i32, ptr %151, align 4, !tbaa !5
  %153 = add nsw i32 %152, 1
  %154 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i32 noundef %153, i32 noundef %134)
  %155 = getelementptr inbounds [20001 x [11 x i32]], ptr @trans, i64 0, i64 %indvars.iv101, i64 1
  %156 = load i32, ptr %155, align 4, !tbaa !5
  %157 = add nsw i32 %156, 1
  %158 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i32 noundef %157, i32 noundef %134)
  %159 = getelementptr inbounds [20001 x [11 x i32]], ptr @trans, i64 0, i64 %indvars.iv101, i64 2
  %160 = load i32, ptr %159, align 4, !tbaa !5
  %161 = add nsw i32 %160, 1
  %162 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i32 noundef %161, i32 noundef %134)
  %163 = getelementptr inbounds [20001 x [11 x i32]], ptr @trans, i64 0, i64 %indvars.iv101, i64 3
  %164 = load i32, ptr %163, align 4, !tbaa !5
  %165 = add nsw i32 %164, 1
  %166 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i32 noundef %165, i32 noundef %134)
  %167 = getelementptr inbounds [20001 x [11 x i32]], ptr @trans, i64 0, i64 %indvars.iv101, i64 4
  %168 = load i32, ptr %167, align 4, !tbaa !5
  %169 = add nsw i32 %168, 1
  %170 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i32 noundef %169, i32 noundef %134)
  %171 = getelementptr inbounds [20001 x [11 x i32]], ptr @trans, i64 0, i64 %indvars.iv101, i64 5
  %172 = load i32, ptr %171, align 4, !tbaa !5
  %173 = add nsw i32 %172, 1
  %174 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i32 noundef %173, i32 noundef %134)
  %175 = getelementptr inbounds [20001 x [11 x i32]], ptr @trans, i64 0, i64 %indvars.iv101, i64 6
  %176 = load i32, ptr %175, align 4, !tbaa !5
  %177 = add nsw i32 %176, 1
  %178 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i32 noundef %177, i32 noundef %134)
  %179 = getelementptr inbounds [20001 x [11 x i32]], ptr @trans, i64 0, i64 %indvars.iv101, i64 7
  %180 = load i32, ptr %179, align 4, !tbaa !5
  %181 = add nsw i32 %180, 1
  %182 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i32 noundef %181, i32 noundef %134)
  %183 = getelementptr inbounds [20001 x [11 x i32]], ptr @trans, i64 0, i64 %indvars.iv101, i64 8
  %184 = load i32, ptr %183, align 4, !tbaa !5
  %185 = add nsw i32 %184, 1
  %186 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i32 noundef %185, i32 noundef %134)
  %187 = getelementptr inbounds [20001 x [11 x i32]], ptr @trans, i64 0, i64 %indvars.iv101, i64 9
  %188 = load i32, ptr %187, align 4, !tbaa !5
  %189 = add nsw i32 %188, 1
  %190 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i32 noundef %189, i32 noundef %135)
  %indvars.iv.next102 = add nuw nsw i64 %indvars.iv101, 1
  %191 = load i32, ptr @tot, align 4, !tbaa !5
  %192 = sext i32 %191 to i64
  %193 = icmp slt i64 %indvars.iv.next102, %192
  br i1 %193, label %.preheader, label %._crit_edge78, !llvm.loop !21

._crit_edge78:                                    ; preds = %.preheader, %._crit_edge72, %.preheader63
  ret i32 0
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4 align 2

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

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

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

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 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 #3 = { 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 #4 = { 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 #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !13, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = !{!7, !7, i64 0}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}


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