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

; 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 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@p = external dso_local global i32, align 4
@all = external dso_local global i32, align 4
@f = external dso_local global [2 x [101 x [243 x i32]]], align 16
@pre = external dso_local global i32, align 4
@cur = external dso_local global i32, align 4
@seq = external dso_local global [7 x i32], align 16
@dis = external dso_local global [2 x [7 x i32]], align 16
@ans = external dso_local global [107 x i32], align 16
@tr = external dso_local global [243 x [7 x %"class.std::vector"]], align 16
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %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
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca ptr, align 8
  %27 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %28 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %29 = alloca ptr, align 8
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %35 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m, ptr noundef @p)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %36

36:                                               ; preds = %114, %0
  %37 = load i32, ptr %2, align 4, !tbaa !5
  %38 = load i32, ptr @n, align 4, !tbaa !5
  %39 = shl i32 1, %38
  %40 = icmp slt i32 %37, %39
  br i1 %40, label %42, label %41

41:                                               ; preds = %36
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %117

42:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %43

43:                                               ; preds = %75, %42
  %44 = load i32, ptr %4, align 4, !tbaa !5
  %45 = load i32, ptr @n, align 4, !tbaa !5
  %46 = icmp slt i32 %44, %45
  br i1 %46, label %48, label %47

47:                                               ; preds = %43
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %78

48:                                               ; preds = %43
  %49 = load i32, ptr %2, align 4, !tbaa !5
  %50 = load i32, ptr %4, align 4, !tbaa !5
  %51 = ashr i32 %49, %50
  %52 = and i32 %51, 1
  %53 = load i32, ptr %4, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [7 x i32], ptr @seq, i64 0, i64 %54
  store i32 %52, ptr %55, align 4, !tbaa !5
  %56 = load i32, ptr %4, align 4, !tbaa !5
  %57 = icmp ne i32 %56, 0
  br i1 %57, label %58, label %64

58:                                               ; preds = %48
  %59 = load i32, ptr %4, align 4, !tbaa !5
  %60 = sub nsw i32 %59, 1
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [7 x i32], ptr @dis, i64 0, i64 %61
  %63 = load i32, ptr %62, align 4, !tbaa !5
  br label %65

64:                                               ; preds = %48
  br label %65

65:                                               ; preds = %64, %58
  %66 = phi i32 [ %63, %58 ], [ 0, %64 ]
  %67 = load i32, ptr %4, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [7 x i32], ptr @seq, i64 0, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = add nsw i32 %66, %70
  %72 = load i32, ptr %4, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [7 x i32], ptr @dis, i64 0, i64 %73
  store i32 %71, ptr %74, align 4, !tbaa !5
  br label %75

75:                                               ; preds = %65
  %76 = load i32, ptr %4, align 4, !tbaa !5
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %4, align 4, !tbaa !5
  br label %43, !llvm.loop !9

78:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  %79 = load i32, ptr @dis, align 16, !tbaa !5
  store i32 %79, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %80 = load i32, ptr @n, align 4, !tbaa !5
  %81 = sub nsw i32 %80, 1
  store i32 %81, ptr %7, align 4, !tbaa !5
  br label %82

82:                                               ; preds = %101, %78
  %83 = load i32, ptr %7, align 4, !tbaa !5
  %84 = icmp sgt i32 %83, 0
  br i1 %84, label %86, label %85

85:                                               ; preds = %82
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %104

86:                                               ; preds = %82
  %87 = load i32, ptr %6, align 4, !tbaa !5
  %88 = mul nsw i32 %87, 3
  %89 = load i32, ptr %7, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [7 x i32], ptr @dis, i64 0, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = load i32, ptr %7, align 4, !tbaa !5
  %94 = sub nsw i32 %93, 1
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [7 x i32], ptr @dis, i64 0, i64 %95
  %97 = load i32, ptr %96, align 4, !tbaa !5
  %98 = sub nsw i32 %92, %97
  %99 = add nsw i32 %98, 1
  %100 = add nsw i32 %88, %99
  store i32 %100, ptr %6, align 4, !tbaa !5
  br label %101

101:                                              ; preds = %86
  %102 = load i32, ptr %7, align 4, !tbaa !5
  %103 = add nsw i32 %102, -1
  store i32 %103, ptr %7, align 4, !tbaa !5
  br label %82, !llvm.loop !11

104:                                              ; preds = %85
  %105 = load i32, ptr @cur, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [2 x [101 x [243 x i32]]], ptr @f, i64 0, i64 %106
  %108 = load i32, ptr %5, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [101 x [243 x i32]], ptr %107, i64 0, i64 %109
  %111 = load i32, ptr %6, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [243 x i32], ptr %110, i64 0, i64 %112
  call void @_Z7mod_incRii(ptr noundef nonnull align 4 dereferenceable(4) %113, i32 noundef 1)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %114

114:                                              ; preds = %104
  %115 = load i32, ptr %2, align 4, !tbaa !5
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %2, align 4, !tbaa !5
  br label %36, !llvm.loop !12

117:                                              ; preds = %41
  store i32 1, ptr @all, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %118

118:                                              ; preds = %126, %117
  %119 = load i32, ptr %8, align 4, !tbaa !5
  %120 = load i32, ptr @n, align 4, !tbaa !5
  %121 = icmp slt i32 %119, %120
  br i1 %121, label %123, label %122

122:                                              ; preds = %118
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %129

123:                                              ; preds = %118
  %124 = load i32, ptr @all, align 4, !tbaa !5
  %125 = mul nsw i32 %124, 3
  store i32 %125, ptr @all, align 4, !tbaa !5
  br label %126

126:                                              ; preds = %123
  %127 = load i32, ptr %8, align 4, !tbaa !5
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %8, align 4, !tbaa !5
  br label %118, !llvm.loop !13

129:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %130

130:                                              ; preds = %304, %129
  %131 = load i32, ptr %9, align 4, !tbaa !5
  %132 = load i32, ptr @all, align 4, !tbaa !5
  %133 = icmp slt i32 %131, %132
  br i1 %133, label %135, label %134

134:                                              ; preds = %130
  store i32 14, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %307

135:                                              ; preds = %130
  store i32 0, ptr @dis, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 1, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %136 = load i32, ptr %9, align 4, !tbaa !5
  store i32 %136, ptr %11, align 4, !tbaa !5
  br label %137

137:                                              ; preds = %155, %135
  %138 = load i32, ptr %10, align 4, !tbaa !5
  %139 = load i32, ptr @n, align 4, !tbaa !5
  %140 = icmp slt i32 %138, %139
  br i1 %140, label %142, label %141

141:                                              ; preds = %137
  store i32 17, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %160

142:                                              ; preds = %137
  %143 = load i32, ptr %10, align 4, !tbaa !5
  %144 = sub nsw i32 %143, 1
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [7 x i32], ptr @dis, i64 0, i64 %145
  %147 = load i32, ptr %146, align 4, !tbaa !5
  %148 = load i32, ptr %11, align 4, !tbaa !5
  %149 = srem i32 %148, 3
  %150 = sub nsw i32 %149, 1
  %151 = add nsw i32 %147, %150
  %152 = load i32, ptr %10, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [7 x i32], ptr @dis, i64 0, i64 %153
  store i32 %151, ptr %154, align 4, !tbaa !5
  br label %155

155:                                              ; preds = %142
  %156 = load i32, ptr %10, align 4, !tbaa !5
  %157 = add nsw i32 %156, 1
  store i32 %157, ptr %10, align 4, !tbaa !5
  %158 = load i32, ptr %11, align 4, !tbaa !5
  %159 = sdiv i32 %158, 3
  store i32 %159, ptr %11, align 4, !tbaa !5
  br label %137, !llvm.loop !14

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

161:                                              ; preds = %300, %160
  %162 = load i32, ptr %12, align 4, !tbaa !5
  %163 = load i32, ptr @n, align 4, !tbaa !5
  %164 = shl i32 1, %163
  %165 = icmp slt i32 %162, %164
  br i1 %165, label %167, label %166

166:                                              ; preds = %161
  store i32 20, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %303

167:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %168

168:                                              ; preds = %181, %167
  %169 = load i32, ptr %13, align 4, !tbaa !5
  %170 = load i32, ptr @n, align 4, !tbaa !5
  %171 = icmp slt i32 %169, %170
  br i1 %171, label %173, label %172

172:                                              ; preds = %168
  store i32 23, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %184

173:                                              ; preds = %168
  %174 = load i32, ptr %12, align 4, !tbaa !5
  %175 = load i32, ptr %13, align 4, !tbaa !5
  %176 = ashr i32 %174, %175
  %177 = and i32 %176, 1
  %178 = load i32, ptr %13, align 4, !tbaa !5
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [7 x i32], ptr @seq, i64 0, i64 %179
  store i32 %177, ptr %180, align 4, !tbaa !5
  br label %181

181:                                              ; preds = %173
  %182 = load i32, ptr %13, align 4, !tbaa !5
  %183 = add nsw i32 %182, 1
  store i32 %183, ptr %13, align 4, !tbaa !5
  br label %168, !llvm.loop !15

184:                                              ; preds = %172
  %185 = load i32, ptr @dis, align 16, !tbaa !5
  %186 = load i32, ptr @seq, align 16, !tbaa !5
  %187 = add nsw i32 %185, %186
  store i32 %187, ptr getelementptr inbounds ([2 x [7 x i32]], ptr @dis, i64 0, i64 1), align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 1, ptr %14, align 4, !tbaa !5
  br label %188

188:                                              ; preds = %211, %184
  %189 = load i32, ptr %14, align 4, !tbaa !5
  %190 = load i32, ptr @n, align 4, !tbaa !5
  %191 = icmp slt i32 %189, %190
  br i1 %191, label %193, label %192

192:                                              ; preds = %188
  store i32 26, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %214

193:                                              ; preds = %188
  %194 = load i32, ptr %14, align 4, !tbaa !5
  %195 = sub nsw i32 %194, 1
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [7 x i32], ptr getelementptr inbounds ([2 x [7 x i32]], ptr @dis, i64 0, i64 1), i64 0, i64 %196
  %198 = load i32, ptr %14, align 4, !tbaa !5
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds [7 x i32], ptr @dis, i64 0, i64 %199
  %201 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %197, ptr noundef nonnull align 4 dereferenceable(4) %200)
  %202 = load i32, ptr %201, align 4, !tbaa !5
  %203 = load i32, ptr %14, align 4, !tbaa !5
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds [7 x i32], ptr @seq, i64 0, i64 %204
  %206 = load i32, ptr %205, align 4, !tbaa !5
  %207 = add nsw i32 %202, %206
  %208 = load i32, ptr %14, align 4, !tbaa !5
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds [7 x i32], ptr getelementptr inbounds ([2 x [7 x i32]], ptr @dis, i64 0, i64 1), i64 0, i64 %209
  store i32 %207, ptr %210, align 4, !tbaa !5
  br label %211

211:                                              ; preds = %193
  %212 = load i32, ptr %14, align 4, !tbaa !5
  %213 = add nsw i32 %212, 1
  store i32 %213, ptr %14, align 4, !tbaa !5
  br label %188, !llvm.loop !16

214:                                              ; preds = %192
  %215 = load i32, ptr @n, align 4, !tbaa !5
  %216 = sub nsw i32 %215, 1
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds [7 x i32], ptr getelementptr inbounds ([2 x [7 x i32]], ptr @dis, i64 0, i64 1), i64 0, i64 %217
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %219 = load i32, ptr @n, align 4, !tbaa !5
  %220 = sub nsw i32 %219, 1
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds [7 x i32], ptr @dis, i64 0, i64 %221
  %223 = load i32, ptr %222, align 4, !tbaa !5
  %224 = load i32, ptr @n, align 4, !tbaa !5
  %225 = sub nsw i32 %224, 1
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds [7 x i32], ptr @seq, i64 0, i64 %226
  %228 = load i32, ptr %227, align 4, !tbaa !5
  %229 = add nsw i32 %223, %228
  store i32 %229, ptr %15, align 4, !tbaa !5
  %230 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %218, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %231 = load i32, ptr %230, align 4, !tbaa !5
  %232 = load i32, ptr @n, align 4, !tbaa !5
  %233 = sub nsw i32 %232, 1
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds [7 x i32], ptr getelementptr inbounds ([2 x [7 x i32]], ptr @dis, i64 0, i64 1), i64 0, i64 %234
  store i32 %231, ptr %235, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %236 = load i32, ptr @n, align 4, !tbaa !5
  %237 = sub nsw i32 %236, 2
  store i32 %237, ptr %16, align 4, !tbaa !5
  br label %238

238:                                              ; preds = %261, %214
  %239 = load i32, ptr %16, align 4, !tbaa !5
  %240 = icmp sge i32 %239, 0
  br i1 %240, label %242, label %241

241:                                              ; preds = %238
  store i32 29, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %264

242:                                              ; preds = %238
  %243 = load i32, ptr %16, align 4, !tbaa !5
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds [7 x i32], ptr getelementptr inbounds ([2 x [7 x i32]], ptr @dis, i64 0, i64 1), i64 0, i64 %244
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %246 = load i32, ptr %16, align 4, !tbaa !5
  %247 = add nsw i32 %246, 1
  %248 = sext i32 %247 to i64
  %249 = getelementptr inbounds [7 x i32], ptr getelementptr inbounds ([2 x [7 x i32]], ptr @dis, i64 0, i64 1), i64 0, i64 %248
  %250 = load i32, ptr %249, align 4, !tbaa !5
  %251 = load i32, ptr %16, align 4, !tbaa !5
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds [7 x i32], ptr @seq, i64 0, i64 %252
  %254 = load i32, ptr %253, align 4, !tbaa !5
  %255 = add nsw i32 %250, %254
  store i32 %255, ptr %17, align 4, !tbaa !5
  %256 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %245, ptr noundef nonnull align 4 dereferenceable(4) %17)
  %257 = load i32, ptr %256, align 4, !tbaa !5
  %258 = load i32, ptr %16, align 4, !tbaa !5
  %259 = sext i32 %258 to i64
  %260 = getelementptr inbounds [7 x i32], ptr getelementptr inbounds ([2 x [7 x i32]], ptr @dis, i64 0, i64 1), i64 0, i64 %259
  store i32 %257, ptr %260, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %261

261:                                              ; preds = %242
  %262 = load i32, ptr %16, align 4, !tbaa !5
  %263 = add nsw i32 %262, -1
  store i32 %263, ptr %16, align 4, !tbaa !5
  br label %238, !llvm.loop !17

264:                                              ; preds = %241
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %265 = load i32, ptr getelementptr inbounds ([2 x [7 x i32]], ptr @dis, i64 0, i64 1), align 4, !tbaa !5
  store i32 %265, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 0, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %266 = load i32, ptr @n, align 4, !tbaa !5
  %267 = sub nsw i32 %266, 1
  store i32 %267, ptr %20, align 4, !tbaa !5
  br label %268

268:                                              ; preds = %287, %264
  %269 = load i32, ptr %20, align 4, !tbaa !5
  %270 = icmp sgt i32 %269, 0
  br i1 %270, label %272, label %271

271:                                              ; preds = %268
  store i32 32, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %290

272:                                              ; preds = %268
  %273 = load i32, ptr %19, align 4, !tbaa !5
  %274 = mul nsw i32 %273, 3
  %275 = load i32, ptr %20, align 4, !tbaa !5
  %276 = sext i32 %275 to i64
  %277 = getelementptr inbounds [7 x i32], ptr getelementptr inbounds ([2 x [7 x i32]], ptr @dis, i64 0, i64 1), i64 0, i64 %276
  %278 = load i32, ptr %277, align 4, !tbaa !5
  %279 = load i32, ptr %20, align 4, !tbaa !5
  %280 = sub nsw i32 %279, 1
  %281 = sext i32 %280 to i64
  %282 = getelementptr inbounds [7 x i32], ptr getelementptr inbounds ([2 x [7 x i32]], ptr @dis, i64 0, i64 1), i64 0, i64 %281
  %283 = load i32, ptr %282, align 4, !tbaa !5
  %284 = sub nsw i32 %278, %283
  %285 = add nsw i32 %284, 1
  %286 = add nsw i32 %274, %285
  store i32 %286, ptr %19, align 4, !tbaa !5
  br label %287

287:                                              ; preds = %272
  %288 = load i32, ptr %20, align 4, !tbaa !5
  %289 = add nsw i32 %288, -1
  store i32 %289, ptr %20, align 4, !tbaa !5
  br label %268, !llvm.loop !18

290:                                              ; preds = %271
  %291 = load i32, ptr %9, align 4, !tbaa !5
  %292 = sext i32 %291 to i64
  %293 = getelementptr inbounds [243 x [7 x %"class.std::vector"]], ptr @tr, i64 0, i64 %292
  %294 = load i32, ptr %18, align 4, !tbaa !5
  %295 = load i32, ptr @n, align 4, !tbaa !5
  %296 = add nsw i32 %294, %295
  %297 = sub nsw i32 %296, 1
  %298 = sext i32 %297 to i64
  %299 = getelementptr inbounds [7 x %"class.std::vector"], ptr %293, i64 0, i64 %298
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %299, ptr noundef nonnull align 4 dereferenceable(4) %19)
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %300

300:                                              ; preds = %290
  %301 = load i32, ptr %12, align 4, !tbaa !5
  %302 = add nsw i32 %301, 1
  store i32 %302, ptr %12, align 4, !tbaa !5
  br label %161, !llvm.loop !19

303:                                              ; preds = %166
  br label %304

304:                                              ; preds = %303
  %305 = load i32, ptr %9, align 4, !tbaa !5
  %306 = add nsw i32 %305, 1
  store i32 %306, ptr %9, align 4, !tbaa !5
  br label %130, !llvm.loop !20

307:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  store i32 2, ptr %21, align 4, !tbaa !5
  br label %308

308:                                              ; preds = %413, %307
  %309 = load i32, ptr %21, align 4, !tbaa !5
  %310 = load i32, ptr @m, align 4, !tbaa !5
  %311 = icmp sle i32 %309, %310
  br i1 %311, label %313, label %312

312:                                              ; preds = %308
  store i32 35, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %416

313:                                              ; preds = %308
  %314 = load i32, ptr @pre, align 4, !tbaa !5
  %315 = xor i32 %314, 1
  store i32 %315, ptr @pre, align 4, !tbaa !5
  %316 = load i32, ptr @cur, align 4, !tbaa !5
  %317 = xor i32 %316, 1
  store i32 %317, ptr @cur, align 4, !tbaa !5
  %318 = load i32, ptr @cur, align 4, !tbaa !5
  %319 = sext i32 %318 to i64
  %320 = getelementptr inbounds [2 x [101 x [243 x i32]]], ptr @f, i64 0, i64 %319
  %321 = getelementptr inbounds [101 x [243 x i32]], ptr %320, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 4 %321, i8 0, i64 98172, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 0, ptr %22, align 4, !tbaa !5
  br label %322

322:                                              ; preds = %409, %313
  %323 = load i32, ptr %22, align 4, !tbaa !5
  %324 = load i32, ptr %21, align 4, !tbaa !5
  %325 = icmp slt i32 %323, %324
  br i1 %325, label %327, label %326

326:                                              ; preds = %322
  store i32 38, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %412

327:                                              ; preds = %322
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  store i32 0, ptr %23, align 4, !tbaa !5
  br label %328

328:                                              ; preds = %405, %327
  %329 = load i32, ptr %23, align 4, !tbaa !5
  %330 = icmp slt i32 %329, 243
  br i1 %330, label %332, label %331

331:                                              ; preds = %328
  store i32 41, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %408

332:                                              ; preds = %328
  %333 = load i32, ptr @pre, align 4, !tbaa !5
  %334 = sext i32 %333 to i64
  %335 = getelementptr inbounds [2 x [101 x [243 x i32]]], ptr @f, i64 0, i64 %334
  %336 = load i32, ptr %22, align 4, !tbaa !5
  %337 = sext i32 %336 to i64
  %338 = getelementptr inbounds [101 x [243 x i32]], ptr %335, i64 0, i64 %337
  %339 = load i32, ptr %23, align 4, !tbaa !5
  %340 = sext i32 %339 to i64
  %341 = getelementptr inbounds [243 x i32], ptr %338, i64 0, i64 %340
  %342 = load i32, ptr %341, align 4, !tbaa !5
  %343 = icmp ne i32 %342, 0
  br i1 %343, label %345, label %344

344:                                              ; preds = %332
  br label %405

345:                                              ; preds = %332
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  %346 = load i32, ptr @n, align 4, !tbaa !5
  %347 = sub nsw i32 %346, 1
  store i32 %347, ptr %25, align 4, !tbaa !5
  %348 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 4 dereferenceable(4) %25)
  %349 = load i32, ptr %348, align 4, !tbaa !5
  %350 = sub nsw i32 0, %349
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  store i32 %350, ptr %24, align 4, !tbaa !5
  br label %351

351:                                              ; preds = %401, %345
  %352 = load i32, ptr %24, align 4, !tbaa !5
  %353 = icmp sle i32 %352, 1
  br i1 %353, label %355, label %354

354:                                              ; preds = %351
  store i32 44, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %404

355:                                              ; preds = %351
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %356 = load i32, ptr %23, align 4, !tbaa !5
  %357 = sext i32 %356 to i64
  %358 = getelementptr inbounds [243 x [7 x %"class.std::vector"]], ptr @tr, i64 0, i64 %357
  %359 = load i32, ptr %24, align 4, !tbaa !5
  %360 = load i32, ptr @n, align 4, !tbaa !5
  %361 = add nsw i32 %359, %360
  %362 = sub nsw i32 %361, 1
  %363 = sext i32 %362 to i64
  %364 = getelementptr inbounds [7 x %"class.std::vector"], ptr %358, i64 0, i64 %363
  store ptr %364, ptr %26, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %365 = load ptr, ptr %26, align 8, !tbaa !21
  %366 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %365) #7
  %367 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %27, i32 0, i32 0
  store ptr %366, ptr %367, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %368 = load ptr, ptr %26, align 8, !tbaa !21
  %369 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %368) #7
  %370 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %28, i32 0, i32 0
  store ptr %369, ptr %370, align 8
  br label %371

371:                                              ; preds = %398, %355
  %372 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28) #7
  br i1 %372, label %374, label %373

373:                                              ; preds = %371
  store i32 47, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  br label %400

374:                                              ; preds = %371
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  %375 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #7
  store ptr %375, ptr %29, align 8, !tbaa !21
  %376 = load i32, ptr @cur, align 4, !tbaa !5
  %377 = sext i32 %376 to i64
  %378 = getelementptr inbounds [2 x [101 x [243 x i32]]], ptr @f, i64 0, i64 %377
  %379 = load i32, ptr %22, align 4, !tbaa !5
  %380 = load i32, ptr %24, align 4, !tbaa !5
  %381 = add nsw i32 %379, %380
  %382 = sext i32 %381 to i64
  %383 = getelementptr inbounds [101 x [243 x i32]], ptr %378, i64 0, i64 %382
  %384 = load ptr, ptr %29, align 8, !tbaa !21
  %385 = load i32, ptr %384, align 4, !tbaa !5
  %386 = sext i32 %385 to i64
  %387 = getelementptr inbounds [243 x i32], ptr %383, i64 0, i64 %386
  %388 = load i32, ptr @pre, align 4, !tbaa !5
  %389 = sext i32 %388 to i64
  %390 = getelementptr inbounds [2 x [101 x [243 x i32]]], ptr @f, i64 0, i64 %389
  %391 = load i32, ptr %22, align 4, !tbaa !5
  %392 = sext i32 %391 to i64
  %393 = getelementptr inbounds [101 x [243 x i32]], ptr %390, i64 0, i64 %392
  %394 = load i32, ptr %23, align 4, !tbaa !5
  %395 = sext i32 %394 to i64
  %396 = getelementptr inbounds [243 x i32], ptr %393, i64 0, i64 %395
  %397 = load i32, ptr %396, align 4, !tbaa !5
  call void @_Z7mod_incRii(ptr noundef nonnull align 4 dereferenceable(4) %387, i32 noundef %397)
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  br label %398

398:                                              ; preds = %374
  %399 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #7
  br label %371

400:                                              ; preds = %373
  br label %401

401:                                              ; preds = %400
  %402 = load i32, ptr %24, align 4, !tbaa !5
  %403 = add nsw i32 %402, 1
  store i32 %403, ptr %24, align 4, !tbaa !5
  br label %351, !llvm.loop !23

404:                                              ; preds = %354
  br label %405

405:                                              ; preds = %404, %344
  %406 = load i32, ptr %23, align 4, !tbaa !5
  %407 = add nsw i32 %406, 1
  store i32 %407, ptr %23, align 4, !tbaa !5
  br label %328, !llvm.loop !24

408:                                              ; preds = %331
  br label %409

409:                                              ; preds = %408
  %410 = load i32, ptr %22, align 4, !tbaa !5
  %411 = add nsw i32 %410, 1
  store i32 %411, ptr %22, align 4, !tbaa !5
  br label %322, !llvm.loop !25

412:                                              ; preds = %326
  br label %413

413:                                              ; preds = %412
  %414 = load i32, ptr %21, align 4, !tbaa !5
  %415 = add nsw i32 %414, 1
  store i32 %415, ptr %21, align 4, !tbaa !5
  br label %308, !llvm.loop !26

416:                                              ; preds = %312
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #7
  store i32 0, ptr %30, align 4, !tbaa !5
  br label %417

417:                                              ; preds = %488, %416
  %418 = load i32, ptr %30, align 4, !tbaa !5
  %419 = load i32, ptr @m, align 4, !tbaa !5
  %420 = icmp sle i32 %418, %419
  br i1 %420, label %422, label %421

421:                                              ; preds = %417
  store i32 49, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  br label %491

422:                                              ; preds = %417
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #7
  store i32 0, ptr %31, align 4, !tbaa !5
  br label %423

423:                                              ; preds = %484, %422
  %424 = load i32, ptr %31, align 4, !tbaa !5
  %425 = icmp slt i32 %424, 243
  br i1 %425, label %427, label %426

426:                                              ; preds = %423
  store i32 52, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #7
  br label %487

427:                                              ; preds = %423
  %428 = load i32, ptr @cur, align 4, !tbaa !5
  %429 = sext i32 %428 to i64
  %430 = getelementptr inbounds [2 x [101 x [243 x i32]]], ptr @f, i64 0, i64 %429
  %431 = load i32, ptr %30, align 4, !tbaa !5
  %432 = sext i32 %431 to i64
  %433 = getelementptr inbounds [101 x [243 x i32]], ptr %430, i64 0, i64 %432
  %434 = load i32, ptr %31, align 4, !tbaa !5
  %435 = sext i32 %434 to i64
  %436 = getelementptr inbounds [243 x i32], ptr %433, i64 0, i64 %435
  %437 = load i32, ptr %436, align 4, !tbaa !5
  %438 = icmp ne i32 %437, 0
  br i1 %438, label %440, label %439

439:                                              ; preds = %427
  br label %484

440:                                              ; preds = %427
  %441 = load i32, ptr %30, align 4, !tbaa !5
  store i32 %441, ptr @dis, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #7
  store i32 1, ptr %32, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #7
  %442 = load i32, ptr %31, align 4, !tbaa !5
  store i32 %442, ptr %33, align 4, !tbaa !5
  br label %443

443:                                              ; preds = %461, %440
  %444 = load i32, ptr %32, align 4, !tbaa !5
  %445 = load i32, ptr @n, align 4, !tbaa !5
  %446 = icmp slt i32 %444, %445
  br i1 %446, label %448, label %447

447:                                              ; preds = %443
  store i32 55, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  br label %466

448:                                              ; preds = %443
  %449 = load i32, ptr %32, align 4, !tbaa !5
  %450 = sub nsw i32 %449, 1
  %451 = sext i32 %450 to i64
  %452 = getelementptr inbounds [7 x i32], ptr @dis, i64 0, i64 %451
  %453 = load i32, ptr %452, align 4, !tbaa !5
  %454 = load i32, ptr %33, align 4, !tbaa !5
  %455 = srem i32 %454, 3
  %456 = sub nsw i32 %455, 1
  %457 = add nsw i32 %453, %456
  %458 = load i32, ptr %32, align 4, !tbaa !5
  %459 = sext i32 %458 to i64
  %460 = getelementptr inbounds [7 x i32], ptr @dis, i64 0, i64 %459
  store i32 %457, ptr %460, align 4, !tbaa !5
  br label %461

461:                                              ; preds = %448
  %462 = load i32, ptr %32, align 4, !tbaa !5
  %463 = add nsw i32 %462, 1
  store i32 %463, ptr %32, align 4, !tbaa !5
  %464 = load i32, ptr %33, align 4, !tbaa !5
  %465 = sdiv i32 %464, 3
  store i32 %465, ptr %33, align 4, !tbaa !5
  br label %443, !llvm.loop !27

466:                                              ; preds = %447
  %467 = load i32, ptr @n, align 4, !tbaa !5
  %468 = sub nsw i32 %467, 1
  %469 = sext i32 %468 to i64
  %470 = getelementptr inbounds [7 x i32], ptr @dis, i64 0, i64 %469
  %471 = load i32, ptr %470, align 4, !tbaa !5
  %472 = sext i32 %471 to i64
  %473 = getelementptr inbounds [107 x i32], ptr @ans, i64 0, i64 %472
  %474 = load i32, ptr @cur, align 4, !tbaa !5
  %475 = sext i32 %474 to i64
  %476 = getelementptr inbounds [2 x [101 x [243 x i32]]], ptr @f, i64 0, i64 %475
  %477 = load i32, ptr %30, align 4, !tbaa !5
  %478 = sext i32 %477 to i64
  %479 = getelementptr inbounds [101 x [243 x i32]], ptr %476, i64 0, i64 %478
  %480 = load i32, ptr %31, align 4, !tbaa !5
  %481 = sext i32 %480 to i64
  %482 = getelementptr inbounds [243 x i32], ptr %479, i64 0, i64 %481
  %483 = load i32, ptr %482, align 4, !tbaa !5
  call void @_Z7mod_incRii(ptr noundef nonnull align 4 dereferenceable(4) %473, i32 noundef %483)
  br label %484

484:                                              ; preds = %466, %439
  %485 = load i32, ptr %31, align 4, !tbaa !5
  %486 = add nsw i32 %485, 1
  store i32 %486, ptr %31, align 4, !tbaa !5
  br label %423, !llvm.loop !28

487:                                              ; preds = %426
  br label %488

488:                                              ; preds = %487
  %489 = load i32, ptr %30, align 4, !tbaa !5
  %490 = add nsw i32 %489, 1
  store i32 %490, ptr %30, align 4, !tbaa !5
  br label %417, !llvm.loop !29

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

492:                                              ; preds = %505, %491
  %493 = load i32, ptr %34, align 4, !tbaa !5
  %494 = load i32, ptr @n, align 4, !tbaa !5
  %495 = load i32, ptr @m, align 4, !tbaa !5
  %496 = add nsw i32 %494, %495
  %497 = icmp slt i32 %493, %496
  br i1 %497, label %499, label %498

498:                                              ; preds = %492
  store i32 58, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #7
  br label %508

499:                                              ; preds = %492
  %500 = load i32, ptr %34, align 4, !tbaa !5
  %501 = sext i32 %500 to i64
  %502 = getelementptr inbounds [107 x i32], ptr @ans, i64 0, i64 %501
  %503 = load i32, ptr %502, align 4, !tbaa !5
  %504 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %503)
  br label %505

505:                                              ; preds = %499
  %506 = load i32, ptr %34, align 4, !tbaa !5
  %507 = add nsw i32 %506, 1
  store i32 %507, ptr %34, align 4, !tbaa !5
  br label %492, !llvm.loop !30

508:                                              ; preds = %498
  ret i32 0
}

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #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: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #6 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #6 align 2

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

attributes #0 = { 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 #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = { 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 #7 = { 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}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = !{!22, !22, i64 0}
!22 = !{!"any pointer", !7, i64 0}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !10}
!26 = distinct !{!26, !10}
!27 = distinct !{!27, !10}
!28 = distinct !{!28, !10}
!29 = distinct !{!29, !10}
!30 = distinct !{!30, !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 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@p = external dso_local global i32, align 4
@all = external dso_local local_unnamed_addr global i32, align 4
@f = external dso_local global [2 x [101 x [243 x i32]]], align 16
@pre = external dso_local local_unnamed_addr global i32, align 4
@cur = external dso_local local_unnamed_addr global i32, align 4
@seq = external dso_local local_unnamed_addr global [7 x i32], align 16
@dis = external dso_local global [2 x [7 x i32]], align 16
@ans = external dso_local global [107 x i32], align 16
@tr = external dso_local global [243 x [7 x %"class.std::vector"]], align 16
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %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 %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m, ptr noundef nonnull @p)
  %9 = load i32, ptr @n, align 4, !tbaa !5
  %.not186 = icmp eq i32 %9, 31
  br i1 %.not186, label %.lr.ph136.preheader, label %.preheader122

.preheader122:                                    ; preds = %0, %._crit_edge130
  %10 = phi i32 [ %50, %._crit_edge130 ], [ %9, %0 ]
  %.091131 = phi i32 [ %49, %._crit_edge130 ], [ 0, %0 ]
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %12, label %.preheader122.._crit_edge_crit_edge

.preheader122.._crit_edge_crit_edge:              ; preds = %.preheader122
  %.pre = load i32, ptr @dis, align 16, !tbaa !5
  br label %._crit_edge130

12:                                               ; preds = %.preheader122
  %13 = and i32 %.091131, 1
  store i32 %13, ptr @seq, align 16, !tbaa !5
  store i32 %13, ptr @dis, align 16, !tbaa !5
  %exitcond.peel.not = icmp eq i32 %10, 1
  br i1 %exitcond.peel.not, label %._crit_edge130, label %.lr.ph.peel.next.preheader

.lr.ph.peel.next.preheader:                       ; preds = %12
  %wide.trip.count = zext nneg i32 %10 to i64
  %14 = add nsw i64 %wide.trip.count, -1
  %xtraiter = and i64 %14, 1
  %15 = icmp eq i32 %10, 2
  br i1 %15, label %.lr.ph129.preheader.unr-lcssa, label %.lr.ph.peel.next.preheader.new

.lr.ph.peel.next.preheader.new:                   ; preds = %.lr.ph.peel.next.preheader
  %unroll_iter = and i64 %14, -2
  br label %.lr.ph.peel.next

._crit_edge132:                                   ; preds = %._crit_edge130
  store i32 1, ptr @all, align 4, !tbaa !5
  %16 = icmp sgt i32 %50, 1
  br i1 %16, label %.lr.ph136.preheader, label %.lr.ph162.preheader

.lr.ph136.preheader:                              ; preds = %0, %._crit_edge132
  %17 = phi i32 [ %50, %._crit_edge132 ], [ 31, %0 ]
  %18 = add nsw i32 %17, -1
  %min.iters.check = icmp ult i32 %17, 9
  br i1 %min.iters.check, label %.lr.ph136.preheader282, label %vector.ph

.lr.ph136.preheader282:                           ; preds = %middle.block, %.lr.ph136.preheader
  %.0104134.ph = phi i32 [ 1, %.lr.ph136.preheader ], [ %ind.end, %middle.block ]
  %.ph283 = phi i32 [ 1, %.lr.ph136.preheader ], [ %22, %middle.block ]
  br label %.lr.ph136

vector.ph:                                        ; preds = %.lr.ph136.preheader
  %n.vec = and i32 %18, -8
  %ind.end = or disjoint i32 %n.vec, 1
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %19, %vector.body ]
  %vec.phi262 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %20, %vector.body ]
  %19 = mul <4 x i32> %vec.phi, <i32 3, i32 3, i32 3, i32 3>
  %20 = mul <4 x i32> %vec.phi262, <i32 3, i32 3, i32 3, i32 3>
  %index.next = add nuw i32 %index, 8
  %21 = icmp eq i32 %index.next, %n.vec
  br i1 %21, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %bin.rdx = mul <4 x i32> %20, %19
  %22 = tail call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i32 %18, %n.vec
  br i1 %cmp.n, label %..preheader121_crit_edge, label %.lr.ph136.preheader282

.lr.ph129.preheader.unr-lcssa:                    ; preds = %.lr.ph.peel.next, %.lr.ph.peel.next.preheader
  %.unr = phi i32 [ %13, %.lr.ph.peel.next.preheader ], [ %41, %.lr.ph.peel.next ]
  %indvars.iv.unr = phi i64 [ 1, %.lr.ph.peel.next.preheader ], [ %indvars.iv.next.1, %.lr.ph.peel.next ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph129.preheader, label %.lr.ph.peel.next.epil

.lr.ph.peel.next.epil:                            ; preds = %.lr.ph129.preheader.unr-lcssa
  %23 = trunc nuw nsw i64 %indvars.iv.unr to i32
  %24 = lshr i32 %.091131, %23
  %25 = and i32 %24, 1
  %26 = getelementptr inbounds [7 x i32], ptr @seq, i64 0, i64 %indvars.iv.unr
  store i32 %25, ptr %26, align 4, !tbaa !5
  %27 = add nuw nsw i32 %.unr, %25
  %28 = getelementptr inbounds [7 x i32], ptr @dis, i64 0, i64 %indvars.iv.unr
  store i32 %27, ptr %28, align 4, !tbaa !5
  br label %.lr.ph129.preheader

.lr.ph129.preheader:                              ; preds = %.lr.ph129.preheader.unr-lcssa, %.lr.ph.peel.next.epil
  %29 = zext nneg i32 %10 to i64
  br label %.lr.ph129

.lr.ph.peel.next:                                 ; preds = %.lr.ph.peel.next, %.lr.ph.peel.next.preheader.new
  %30 = phi i32 [ %13, %.lr.ph.peel.next.preheader.new ], [ %41, %.lr.ph.peel.next ]
  %indvars.iv = phi i64 [ 1, %.lr.ph.peel.next.preheader.new ], [ %indvars.iv.next.1, %.lr.ph.peel.next ]
  %niter = phi i64 [ 0, %.lr.ph.peel.next.preheader.new ], [ %niter.next.1, %.lr.ph.peel.next ]
  %31 = trunc nuw nsw i64 %indvars.iv to i32
  %32 = lshr i32 %.091131, %31
  %33 = and i32 %32, 1
  %34 = getelementptr inbounds [7 x i32], ptr @seq, i64 0, i64 %indvars.iv
  store i32 %33, ptr %34, align 4, !tbaa !5
  %35 = add nuw nsw i32 %30, %33
  %36 = getelementptr inbounds [7 x i32], ptr @dis, i64 0, i64 %indvars.iv
  store i32 %35, ptr %36, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %37 = trunc nuw nsw i64 %indvars.iv.next to i32
  %38 = lshr i32 %.091131, %37
  %39 = and i32 %38, 1
  %40 = getelementptr inbounds [7 x i32], ptr @seq, i64 0, i64 %indvars.iv.next
  store i32 %39, ptr %40, align 4, !tbaa !5
  %41 = add nuw nsw i32 %35, %39
  %42 = getelementptr inbounds [7 x i32], ptr @dis, i64 0, i64 %indvars.iv.next
  store i32 %41, ptr %42, align 4, !tbaa !5
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.lr.ph129.preheader.unr-lcssa, label %.lr.ph.peel.next, !llvm.loop !13

._crit_edge130:                                   ; preds = %.lr.ph129, %.preheader122.._crit_edge_crit_edge, %12
  %43 = phi i32 [ %13, %12 ], [ %.pre, %.preheader122.._crit_edge_crit_edge ], [ %13, %.lr.ph129 ]
  %.0106.lcssa = phi i32 [ 0, %12 ], [ 0, %.preheader122.._crit_edge_crit_edge ], [ %61, %.lr.ph129 ]
  %44 = load i32, ptr @cur, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = sext i32 %43 to i64
  %47 = sext i32 %.0106.lcssa to i64
  %48 = getelementptr inbounds [2 x [101 x [243 x i32]]], ptr @f, i64 0, i64 %45, i64 %46, i64 %47
  tail call void @_Z7mod_incRii(ptr noundef nonnull align 4 dereferenceable(4) %48, i32 noundef 1)
  %49 = add nuw nsw i32 %.091131, 1
  %50 = load i32, ptr @n, align 4, !tbaa !5
  %51 = shl nuw i32 1, %50
  %52 = icmp slt i32 %49, %51
  br i1 %52, label %.preheader122, label %._crit_edge132, !llvm.loop !15

.lr.ph129:                                        ; preds = %.lr.ph129.preheader, %.lr.ph129
  %indvars.iv194 = phi i64 [ %29, %.lr.ph129.preheader ], [ %indvars.iv.next195, %.lr.ph129 ]
  %.0106126 = phi i32 [ 0, %.lr.ph129.preheader ], [ %61, %.lr.ph129 ]
  %indvars.iv.next195 = add nsw i64 %indvars.iv194, -1
  %53 = mul nsw i32 %.0106126, 3
  %54 = getelementptr inbounds [7 x i32], ptr @dis, i64 0, i64 %indvars.iv.next195
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = add nsw i64 %indvars.iv194, -2
  %57 = getelementptr inbounds [7 x i32], ptr @dis, i64 0, i64 %56
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = add i32 %53, 1
  %60 = add i32 %59, %55
  %61 = sub i32 %60, %58
  %62 = icmp ugt i64 %indvars.iv194, 2
  br i1 %62, label %.lr.ph129, label %._crit_edge130, !llvm.loop !16

..preheader121_crit_edge:                         ; preds = %.lr.ph136, %middle.block
  %.lcssa259 = phi i32 [ %22, %middle.block ], [ %64, %.lr.ph136 ]
  store i32 %.lcssa259, ptr @all, align 4, !tbaa !5
  br label %.lr.ph162.preheader

.lr.ph162.preheader:                              ; preds = %._crit_edge132, %..preheader121_crit_edge
  %.ph = phi i32 [ 1, %._crit_edge132 ], [ %.lcssa259, %..preheader121_crit_edge ]
  %.ph278 = phi i32 [ %50, %._crit_edge132 ], [ %17, %..preheader121_crit_edge ]
  br label %.lr.ph162

.lr.ph136:                                        ; preds = %.lr.ph136.preheader282, %.lr.ph136
  %.0104134 = phi i32 [ %65, %.lr.ph136 ], [ %.0104134.ph, %.lr.ph136.preheader282 ]
  %63 = phi i32 [ %64, %.lr.ph136 ], [ %.ph283, %.lr.ph136.preheader282 ]
  %64 = mul nuw nsw i32 %63, 3
  %65 = add nuw nsw i32 %.0104134, 1
  %exitcond197.not = icmp eq i32 %65, %17
  br i1 %exitcond197.not, label %..preheader121_crit_edge, label %.lr.ph136, !llvm.loop !17

.preheader118:                                    ; preds = %._crit_edge160
  %66 = load i32, ptr @m, align 4, !tbaa !5
  %.not170 = icmp slt i32 %66, 2
  br i1 %.not170, label %.preheader116, label %.lr.ph172

.lr.ph162:                                        ; preds = %.lr.ph162.preheader, %._crit_edge160
  %67 = phi i32 [ %99, %._crit_edge160 ], [ %.ph, %.lr.ph162.preheader ]
  %68 = phi i32 [ %100, %._crit_edge160 ], [ %.ph278, %.lr.ph162.preheader ]
  %69 = phi i32 [ %101, %._crit_edge160 ], [ %.ph278, %.lr.ph162.preheader ]
  %indvars.iv217 = phi i64 [ %indvars.iv.next218, %._crit_edge160 ], [ 0, %.lr.ph162.preheader ]
  store i32 0, ptr @dis, align 16, !tbaa !5
  %70 = icmp sgt i32 %69, 1
  br i1 %70, label %.lr.ph141.preheader, label %.preheader119.preheader

.lr.ph141.preheader:                              ; preds = %.lr.ph162
  %wide.trip.count201 = zext nneg i32 %69 to i64
  %71 = trunc nuw nsw i64 %indvars.iv217 to i32
  %72 = add nsw i64 %wide.trip.count201, -1
  %xtraiter289 = and i64 %72, 1
  %73 = icmp eq i32 %69, 2
  br i1 %73, label %.preheader120.unr-lcssa, label %.lr.ph141.preheader.new

.lr.ph141.preheader.new:                          ; preds = %.lr.ph141.preheader
  %unroll_iter292 = and i64 %72, -2
  br label %.lr.ph141

.preheader120.unr-lcssa:                          ; preds = %.lr.ph141, %.lr.ph141.preheader
  %.unr290 = phi i32 [ 0, %.lr.ph141.preheader ], [ %86, %.lr.ph141 ]
  %indvars.iv198.unr = phi i64 [ 1, %.lr.ph141.preheader ], [ %indvars.iv.next199.1, %.lr.ph141 ]
  %.0101139.unr = phi i32 [ %71, %.lr.ph141.preheader ], [ %88, %.lr.ph141 ]
  %lcmp.mod291.not = icmp eq i64 %xtraiter289, 0
  br i1 %lcmp.mod291.not, label %.preheader120, label %.lr.ph141.epil

.lr.ph141.epil:                                   ; preds = %.preheader120.unr-lcssa
  %74 = srem i32 %.0101139.unr, 3
  %75 = add nsw i32 %74, -1
  %76 = add nsw i32 %75, %.unr290
  %77 = getelementptr inbounds [7 x i32], ptr @dis, i64 0, i64 %indvars.iv198.unr
  store i32 %76, ptr %77, align 4, !tbaa !5
  br label %.preheader120

.preheader120:                                    ; preds = %.preheader120.unr-lcssa, %.lr.ph141.epil
  %.not187 = icmp eq i32 %69, 31
  br i1 %.not187, label %._crit_edge160, label %.preheader119.preheader

.preheader119.preheader:                          ; preds = %.lr.ph162, %.preheader120
  br label %.preheader119

.lr.ph141:                                        ; preds = %.lr.ph141, %.lr.ph141.preheader.new
  %78 = phi i32 [ 0, %.lr.ph141.preheader.new ], [ %86, %.lr.ph141 ]
  %indvars.iv198 = phi i64 [ 1, %.lr.ph141.preheader.new ], [ %indvars.iv.next199.1, %.lr.ph141 ]
  %.0101139 = phi i32 [ %71, %.lr.ph141.preheader.new ], [ %88, %.lr.ph141 ]
  %niter293 = phi i64 [ 0, %.lr.ph141.preheader.new ], [ %niter293.next.1, %.lr.ph141 ]
  %79 = srem i32 %.0101139, 3
  %80 = add nsw i32 %79, -1
  %81 = add nsw i32 %80, %78
  %82 = getelementptr inbounds [7 x i32], ptr @dis, i64 0, i64 %indvars.iv198
  store i32 %81, ptr %82, align 4, !tbaa !5
  %indvars.iv.next199 = add nuw nsw i64 %indvars.iv198, 1
  %83 = sdiv i32 %.0101139, 3
  %84 = srem i32 %83, 3
  %85 = add nsw i32 %84, -1
  %86 = add nsw i32 %85, %81
  %87 = getelementptr inbounds [7 x i32], ptr @dis, i64 0, i64 %indvars.iv.next199
  store i32 %86, ptr %87, align 4, !tbaa !5
  %indvars.iv.next199.1 = add nuw nsw i64 %indvars.iv198, 2
  %88 = sdiv i32 %.0101139, 9
  %niter293.next.1 = add i64 %niter293, 2
  %niter293.ncmp.1 = icmp eq i64 %niter293.next.1, %unroll_iter292
  br i1 %niter293.ncmp.1, label %.preheader120.unr-lcssa, label %.lr.ph141, !llvm.loop !18

.preheader119:                                    ; preds = %.preheader119.preheader, %154
  %89 = phi i32 [ %162, %154 ], [ %68, %.preheader119.preheader ]
  %90 = phi i32 [ %162, %154 ], [ %69, %.preheader119.preheader ]
  %.0100159 = phi i32 [ %161, %154 ], [ 0, %.preheader119.preheader ]
  %91 = icmp sgt i32 %90, 0
  br i1 %91, label %.lr.ph143.preheader, label %._crit_edge144

.lr.ph143.preheader:                              ; preds = %.preheader119
  %wide.trip.count206 = zext nneg i32 %90 to i64
  %min.iters.check265 = icmp ult i32 %90, 8
  br i1 %min.iters.check265, label %.lr.ph143.preheader276, label %vector.ph266

.lr.ph143.preheader276:                           ; preds = %middle.block263, %.lr.ph143.preheader
  %indvars.iv203.ph = phi i64 [ 0, %.lr.ph143.preheader ], [ %n.vec268, %middle.block263 ]
  br label %.lr.ph143

vector.ph266:                                     ; preds = %.lr.ph143.preheader
  %n.vec268 = and i64 %wide.trip.count206, 2147483640
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %.0100159, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body270

vector.body270:                                   ; preds = %vector.body270, %vector.ph266
  %index271 = phi i64 [ 0, %vector.ph266 ], [ %index.next273, %vector.body270 ]
  %vec.ind = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %vector.ph266 ], [ %vec.ind.next, %vector.body270 ]
  %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4>
  %92 = lshr <4 x i32> %broadcast.splat, %vec.ind
  %93 = lshr <4 x i32> %broadcast.splat, %step.add
  %94 = and <4 x i32> %92, <i32 1, i32 1, i32 1, i32 1>
  %95 = and <4 x i32> %93, <i32 1, i32 1, i32 1, i32 1>
  %96 = getelementptr inbounds [7 x i32], ptr @seq, i64 0, i64 %index271
  %97 = getelementptr inbounds i8, ptr %96, i64 16
  store <4 x i32> %94, ptr %96, align 16, !tbaa !5
  store <4 x i32> %95, ptr %97, align 16, !tbaa !5
  %index.next273 = add nuw i64 %index271, 8
  %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
  %98 = icmp eq i64 %index.next273, %n.vec268
  br i1 %98, label %middle.block263, label %vector.body270, !llvm.loop !19

middle.block263:                                  ; preds = %vector.body270
  %cmp.n274 = icmp eq i64 %n.vec268, %wide.trip.count206
  br i1 %cmp.n274, label %._crit_edge144, label %.lr.ph143.preheader276

._crit_edge160.loopexit:                          ; preds = %154
  %.pre241 = load i32, ptr @all, align 4, !tbaa !5
  br label %._crit_edge160

._crit_edge160:                                   ; preds = %._crit_edge160.loopexit, %.preheader120
  %99 = phi i32 [ %.pre241, %._crit_edge160.loopexit ], [ %67, %.preheader120 ]
  %100 = phi i32 [ %162, %._crit_edge160.loopexit ], [ %68, %.preheader120 ]
  %101 = phi i32 [ %162, %._crit_edge160.loopexit ], [ 31, %.preheader120 ]
  %indvars.iv.next218 = add nuw nsw i64 %indvars.iv217, 1
  %102 = sext i32 %99 to i64
  %103 = icmp slt i64 %indvars.iv.next218, %102
  br i1 %103, label %.lr.ph162, label %.preheader118, !llvm.loop !20

._crit_edge144:                                   ; preds = %.lr.ph143, %middle.block263, %.preheader119
  %104 = load i32, ptr @dis, align 16, !tbaa !5
  %105 = load i32, ptr @seq, align 16, !tbaa !5
  %106 = add nsw i32 %105, %104
  store i32 %106, ptr getelementptr inbounds (i8, ptr @dis, i64 28), align 4, !tbaa !5
  %107 = icmp sgt i32 %89, 1
  br i1 %107, label %.lr.ph147, label %._crit_edge148

.lr.ph143:                                        ; preds = %.lr.ph143.preheader276, %.lr.ph143
  %indvars.iv203 = phi i64 [ %indvars.iv.next204, %.lr.ph143 ], [ %indvars.iv203.ph, %.lr.ph143.preheader276 ]
  %108 = trunc nuw nsw i64 %indvars.iv203 to i32
  %109 = lshr i32 %.0100159, %108
  %110 = and i32 %109, 1
  %111 = getelementptr inbounds [7 x i32], ptr @seq, i64 0, i64 %indvars.iv203
  store i32 %110, ptr %111, align 4, !tbaa !5
  %indvars.iv.next204 = add nuw nsw i64 %indvars.iv203, 1
  %exitcond207.not = icmp eq i64 %indvars.iv.next204, %wide.trip.count206
  br i1 %exitcond207.not, label %._crit_edge144, label %.lr.ph143, !llvm.loop !21

._crit_edge148:                                   ; preds = %.lr.ph147, %._crit_edge144
  %.lcssa123 = phi i32 [ %89, %._crit_edge144 ], [ %139, %.lr.ph147 ]
  %112 = add nsw i32 %.lcssa123, -1
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [7 x i32], ptr getelementptr inbounds (i8, ptr @dis, i64 28), i64 0, i64 %113
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  %115 = getelementptr inbounds [7 x i32], ptr @dis, i64 0, i64 %113
  %116 = load i32, ptr %115, align 4, !tbaa !5
  %117 = getelementptr inbounds [7 x i32], ptr @seq, i64 0, i64 %113
  %118 = load i32, ptr %117, align 4, !tbaa !5
  %119 = add nsw i32 %118, %116
  store i32 %119, ptr %1, align 4, !tbaa !5
  %120 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %114, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %121 = load i32, ptr %120, align 4, !tbaa !5
  %122 = load i32, ptr @n, align 4, !tbaa !5
  %123 = add nsw i32 %122, -1
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [7 x i32], ptr getelementptr inbounds (i8, ptr @dis, i64 28), i64 0, i64 %124
  store i32 %121, ptr %125, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  %126 = icmp sgt i32 %122, 1
  br i1 %126, label %.lr.ph152.preheader, label %._crit_edge153.thread

._crit_edge153.thread:                            ; preds = %._crit_edge148
  %127 = load i32, ptr getelementptr inbounds (i8, ptr @dis, i64 28), align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %154

.lr.ph152.preheader:                              ; preds = %._crit_edge148
  %128 = add nsw i32 %122, -2
  %129 = zext nneg i32 %128 to i64
  br label %.lr.ph152

.lr.ph147:                                        ; preds = %._crit_edge144, %.lr.ph147
  %indvars.iv208 = phi i64 [ %indvars.iv.next209, %.lr.ph147 ], [ 1, %._crit_edge144 ]
  %130 = add nsw i64 %indvars.iv208, -1
  %131 = getelementptr inbounds [7 x i32], ptr getelementptr inbounds (i8, ptr @dis, i64 28), i64 0, i64 %130
  %132 = getelementptr inbounds [7 x i32], ptr @dis, i64 0, i64 %indvars.iv208
  %133 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %131, ptr noundef nonnull align 4 dereferenceable(4) %132)
  %134 = load i32, ptr %133, align 4, !tbaa !5
  %135 = getelementptr inbounds [7 x i32], ptr @seq, i64 0, i64 %indvars.iv208
  %136 = load i32, ptr %135, align 4, !tbaa !5
  %137 = add nsw i32 %136, %134
  %138 = getelementptr inbounds [7 x i32], ptr getelementptr inbounds (i8, ptr @dis, i64 28), i64 0, i64 %indvars.iv208
  store i32 %137, ptr %138, align 4, !tbaa !5
  %indvars.iv.next209 = add nuw nsw i64 %indvars.iv208, 1
  %139 = load i32, ptr @n, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = icmp slt i64 %indvars.iv.next209, %140
  br i1 %141, label %.lr.ph147, label %._crit_edge148, !llvm.loop !22

._crit_edge153:                                   ; preds = %.lr.ph152
  %.pre240 = load i32, ptr @n, align 4, !tbaa !5
  %142 = load i32, ptr getelementptr inbounds (i8, ptr @dis, i64 28), align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  store i32 0, ptr %3, align 4, !tbaa !5
  %143 = icmp sgt i32 %.pre240, 1
  br i1 %143, label %.lr.ph156.preheader, label %154

.lr.ph156.preheader:                              ; preds = %._crit_edge153
  %144 = zext nneg i32 %.pre240 to i64
  br label %.lr.ph156

.lr.ph152:                                        ; preds = %.lr.ph152.preheader, %.lr.ph152
  %indvars.iv211 = phi i64 [ %129, %.lr.ph152.preheader ], [ %indvars.iv.next212, %.lr.ph152 ]
  %145 = getelementptr inbounds [7 x i32], ptr getelementptr inbounds (i8, ptr @dis, i64 28), i64 0, i64 %indvars.iv211
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  %146 = add nuw nsw i64 %indvars.iv211, 1
  %147 = getelementptr inbounds [7 x i32], ptr getelementptr inbounds (i8, ptr @dis, i64 28), i64 0, i64 %146
  %148 = load i32, ptr %147, align 4, !tbaa !5
  %149 = getelementptr inbounds [7 x i32], ptr @seq, i64 0, i64 %indvars.iv211
  %150 = load i32, ptr %149, align 4, !tbaa !5
  %151 = add nsw i32 %150, %148
  store i32 %151, ptr %2, align 4, !tbaa !5
  %152 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %145, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %153 = load i32, ptr %152, align 4, !tbaa !5
  store i32 %153, ptr %145, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  %indvars.iv.next212 = add nsw i64 %indvars.iv211, -1
  %.not = icmp eq i64 %indvars.iv211, 0
  br i1 %.not, label %._crit_edge153, label %.lr.ph152, !llvm.loop !23

._crit_edge157:                                   ; preds = %.lr.ph156
  store i32 %174, ptr %3, align 4, !tbaa !5
  br label %154

154:                                              ; preds = %._crit_edge153.thread, %._crit_edge157, %._crit_edge153
  %155 = phi i32 [ %127, %._crit_edge153.thread ], [ %142, %._crit_edge157 ], [ %142, %._crit_edge153 ]
  %156 = phi i32 [ %122, %._crit_edge153.thread ], [ %.pre240, %._crit_edge157 ], [ %.pre240, %._crit_edge153 ]
  %157 = add i32 %155, -1
  %158 = add i32 %157, %156
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [243 x [7 x %"class.std::vector"]], ptr @tr, i64 0, i64 %indvars.iv217, i64 %159
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %160, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  %161 = add nuw nsw i32 %.0100159, 1
  %162 = load i32, ptr @n, align 4, !tbaa !5
  %163 = shl nuw i32 1, %162
  %164 = icmp slt i32 %161, %163
  br i1 %164, label %.preheader119, label %._crit_edge160.loopexit, !llvm.loop !24

.lr.ph156:                                        ; preds = %.lr.ph156.preheader, %.lr.ph156
  %indvars.iv214 = phi i64 [ %144, %.lr.ph156.preheader ], [ %indvars.iv.next215, %.lr.ph156 ]
  %165 = phi i32 [ 0, %.lr.ph156.preheader ], [ %174, %.lr.ph156 ]
  %indvars.iv.next215 = add nsw i64 %indvars.iv214, -1
  %166 = mul nsw i32 %165, 3
  %167 = getelementptr inbounds [7 x i32], ptr getelementptr inbounds (i8, ptr @dis, i64 28), i64 0, i64 %indvars.iv.next215
  %168 = load i32, ptr %167, align 4, !tbaa !5
  %169 = add nsw i64 %indvars.iv214, -2
  %170 = getelementptr inbounds [7 x i32], ptr getelementptr inbounds (i8, ptr @dis, i64 28), i64 0, i64 %169
  %171 = load i32, ptr %170, align 4, !tbaa !5
  %172 = add i32 %168, 1
  %173 = add i32 %172, %166
  %174 = sub i32 %173, %171
  %175 = icmp ugt i64 %indvars.iv214, 2
  br i1 %175, label %.lr.ph156, label %._crit_edge157, !llvm.loop !25

.preheader116:                                    ; preds = %183, %.preheader118
  %176 = phi i32 [ %66, %.preheader118 ], [ %185, %183 ]
  %.not110181 = icmp slt i32 %176, 0
  br i1 %.not110181, label %.preheader, label %.preheader115.preheader

.preheader115.preheader:                          ; preds = %.preheader116
  %.pre243.pre = load i32, ptr @cur, align 4, !tbaa !5
  br label %.preheader115

.lr.ph172:                                        ; preds = %.preheader118, %183
  %.094171 = phi i32 [ %184, %183 ], [ 2, %.preheader118 ]
  %177 = load i32, ptr @pre, align 4, !tbaa !5
  %178 = xor i32 %177, 1
  store i32 %178, ptr @pre, align 4, !tbaa !5
  %179 = load i32, ptr @cur, align 4, !tbaa !5
  %180 = xor i32 %179, 1
  store i32 %180, ptr @cur, align 4, !tbaa !5
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [2 x [101 x [243 x i32]]], ptr @f, i64 0, i64 %181
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(98172) %182, i8 0, i64 98172, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %.preheader117

183:                                              ; preds = %186
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  %184 = add nuw nsw i32 %.094171, 1
  %185 = load i32, ptr @m, align 4, !tbaa !5
  %.not.not = icmp slt i32 %.094171, %185
  br i1 %.not.not, label %.lr.ph172, label %.preheader116, !llvm.loop !26

186:                                              ; preds = %.loopexit
  %187 = load i32, ptr %4, align 4, !tbaa !5
  %188 = add nsw i32 %187, 1
  store i32 %188, ptr %4, align 4, !tbaa !5
  %189 = icmp slt i32 %188, %.094171
  br i1 %189, label %.preheader117.backedge, label %183

.preheader117:                                    ; preds = %.preheader117.backedge, %.lr.ph172
  %indvars.iv221 = phi i64 [ 0, %.lr.ph172 ], [ %indvars.iv221.be, %.preheader117.backedge ]
  %190 = load i32, ptr @pre, align 4, !tbaa !5
  %191 = sext i32 %190 to i64
  %192 = load i32, ptr %4, align 4, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [2 x [101 x [243 x i32]]], ptr @f, i64 0, i64 %191, i64 %193, i64 %indvars.iv221
  %195 = load i32, ptr %194, align 4, !tbaa !5
  %.not112 = icmp eq i32 %195, 0
  br i1 %.not112, label %.loopexit, label %196

196:                                              ; preds = %.preheader117
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  %197 = load i32, ptr @n, align 4, !tbaa !5
  %198 = add nsw i32 %197, -1
  store i32 %198, ptr %5, align 4, !tbaa !5
  %199 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %200 = load i32, ptr %199, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  %201 = icmp sgt i32 %200, -2
  br i1 %201, label %.lr.ph168.preheader, label %.loopexit

.lr.ph168.preheader:                              ; preds = %196
  %202 = sub nsw i32 0, %200
  br label %.lr.ph168

.lr.ph168:                                        ; preds = %.lr.ph168.preheader, %._crit_edge165
  %.092166 = phi i32 [ %211, %._crit_edge165 ], [ %202, %.lr.ph168.preheader ]
  %203 = load i32, ptr @n, align 4, !tbaa !5
  %204 = add i32 %.092166, -1
  %205 = add i32 %204, %203
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [243 x [7 x %"class.std::vector"]], ptr @tr, i64 0, i64 %indvars.iv221, i64 %206
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %208 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %207) #8
  store ptr %208, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  %209 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %207) #8
  store ptr %209, ptr %7, align 8
  %210 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  br i1 %210, label %.lr.ph164, label %._crit_edge165

._crit_edge165:                                   ; preds = %.lr.ph164, %.lr.ph168
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  %211 = add i32 %.092166, 1
  %exitcond220.not = icmp eq i32 %211, 2
  br i1 %exitcond220.not, label %.loopexit, label %.lr.ph168, !llvm.loop !27

.lr.ph164:                                        ; preds = %.lr.ph168, %.lr.ph164
  %212 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  %213 = load i32, ptr @cur, align 4, !tbaa !5
  %214 = sext i32 %213 to i64
  %215 = load i32, ptr %4, align 4, !tbaa !5
  %216 = add nsw i32 %215, %.092166
  %217 = sext i32 %216 to i64
  %218 = load i32, ptr %212, align 4, !tbaa !5
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds [2 x [101 x [243 x i32]]], ptr @f, i64 0, i64 %214, i64 %217, i64 %219
  %221 = load i32, ptr @pre, align 4, !tbaa !5
  %222 = sext i32 %221 to i64
  %223 = sext i32 %215 to i64
  %224 = getelementptr inbounds [2 x [101 x [243 x i32]]], ptr @f, i64 0, i64 %222, i64 %223, i64 %indvars.iv221
  %225 = load i32, ptr %224, align 4, !tbaa !5
  call void @_Z7mod_incRii(ptr noundef nonnull align 4 dereferenceable(4) %220, i32 noundef %225)
  %226 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  %227 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  br i1 %227, label %.lr.ph164, label %._crit_edge165

.loopexit:                                        ; preds = %._crit_edge165, %196, %.preheader117
  %indvars.iv.next222 = add nuw nsw i64 %indvars.iv221, 1
  %exitcond224.not = icmp eq i64 %indvars.iv.next222, 243
  br i1 %exitcond224.not, label %186, label %.preheader117.backedge

.preheader117.backedge:                           ; preds = %.loopexit, %186
  %indvars.iv221.be = phi i64 [ %indvars.iv.next222, %.loopexit ], [ 0, %186 ]
  br label %.preheader117, !llvm.loop !28

.preheader115:                                    ; preds = %.preheader115.preheader, %233
  %.pre243 = phi i32 [ %.pre243.pre, %.preheader115.preheader ], [ %.pre243244, %233 ]
  %indvars.iv234 = phi i64 [ 0, %.preheader115.preheader ], [ %indvars.iv.next235, %233 ]
  %228 = trunc nuw nsw i64 %indvars.iv234 to i32
  br label %236

.preheader:                                       ; preds = %233, %.preheader116
  %229 = phi i32 [ %176, %.preheader116 ], [ %234, %233 ]
  %230 = load i32, ptr @n, align 4, !tbaa !5
  %231 = add nsw i32 %229, %230
  %232 = icmp sgt i32 %231, 0
  br i1 %232, label %.lr.ph184, label %._crit_edge185

233:                                              ; preds = %268
  %indvars.iv.next235 = add nuw nsw i64 %indvars.iv234, 1
  %234 = load i32, ptr @m, align 4, !tbaa !5
  %235 = sext i32 %234 to i64
  %.not110.not = icmp slt i64 %indvars.iv234, %235
  br i1 %.not110.not, label %.preheader115, label %.preheader, !llvm.loop !29

236:                                              ; preds = %.preheader115, %268
  %.pre243245 = phi i32 [ %.pre243, %.preheader115 ], [ %.pre243244, %268 ]
  %237 = phi i32 [ %.pre243, %.preheader115 ], [ %269, %268 ]
  %indvars.iv230 = phi i64 [ 0, %.preheader115 ], [ %indvars.iv.next231, %268 ]
  %238 = sext i32 %237 to i64
  %239 = getelementptr inbounds [2 x [101 x [243 x i32]]], ptr @f, i64 0, i64 %238, i64 %indvars.iv234, i64 %indvars.iv230
  %240 = load i32, ptr %239, align 4, !tbaa !5
  %.not111 = icmp eq i32 %240, 0
  br i1 %.not111, label %268, label %241

241:                                              ; preds = %236
  store i32 %228, ptr @dis, align 16, !tbaa !5
  %242 = load i32, ptr @n, align 4, !tbaa !5
  %243 = icmp sgt i32 %242, 1
  br i1 %243, label %.lr.ph176.preheader, label %._crit_edge177

.lr.ph176.preheader:                              ; preds = %241
  %wide.trip.count228 = zext nneg i32 %242 to i64
  %244 = trunc nuw nsw i64 %indvars.iv230 to i32
  %245 = add nsw i64 %wide.trip.count228, -1
  %xtraiter294 = and i64 %245, 1
  %246 = icmp eq i32 %242, 2
  br i1 %246, label %._crit_edge177.loopexit.unr-lcssa, label %.lr.ph176.preheader.new

.lr.ph176.preheader.new:                          ; preds = %.lr.ph176.preheader
  %unroll_iter297 = and i64 %245, -2
  br label %.lr.ph176

._crit_edge177.loopexit.unr-lcssa:                ; preds = %.lr.ph176, %.lr.ph176.preheader
  %.unr295 = phi i32 [ %228, %.lr.ph176.preheader ], [ %265, %.lr.ph176 ]
  %indvars.iv225.unr = phi i64 [ 1, %.lr.ph176.preheader ], [ %indvars.iv.next226.1, %.lr.ph176 ]
  %.087174.unr = phi i32 [ %244, %.lr.ph176.preheader ], [ %267, %.lr.ph176 ]
  %lcmp.mod296.not = icmp eq i64 %xtraiter294, 0
  br i1 %lcmp.mod296.not, label %._crit_edge177, label %.lr.ph176.epil

.lr.ph176.epil:                                   ; preds = %._crit_edge177.loopexit.unr-lcssa
  %247 = srem i32 %.087174.unr, 3
  %248 = add nsw i32 %247, -1
  %249 = add nsw i32 %248, %.unr295
  %250 = getelementptr inbounds [7 x i32], ptr @dis, i64 0, i64 %indvars.iv225.unr
  store i32 %249, ptr %250, align 4, !tbaa !5
  br label %._crit_edge177

._crit_edge177:                                   ; preds = %.lr.ph176.epil, %._crit_edge177.loopexit.unr-lcssa, %241
  %251 = add nsw i32 %242, -1
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds [7 x i32], ptr @dis, i64 0, i64 %252
  %254 = load i32, ptr %253, align 4, !tbaa !5
  %255 = sext i32 %254 to i64
  %256 = getelementptr inbounds [107 x i32], ptr @ans, i64 0, i64 %255
  call void @_Z7mod_incRii(ptr noundef nonnull align 4 dereferenceable(4) %256, i32 noundef %240)
  %.pre242 = load i32, ptr @cur, align 4, !tbaa !5
  br label %268

.lr.ph176:                                        ; preds = %.lr.ph176, %.lr.ph176.preheader.new
  %257 = phi i32 [ %228, %.lr.ph176.preheader.new ], [ %265, %.lr.ph176 ]
  %indvars.iv225 = phi i64 [ 1, %.lr.ph176.preheader.new ], [ %indvars.iv.next226.1, %.lr.ph176 ]
  %.087174 = phi i32 [ %244, %.lr.ph176.preheader.new ], [ %267, %.lr.ph176 ]
  %niter298 = phi i64 [ 0, %.lr.ph176.preheader.new ], [ %niter298.next.1, %.lr.ph176 ]
  %258 = srem i32 %.087174, 3
  %259 = add nsw i32 %258, -1
  %260 = add nsw i32 %259, %257
  %261 = getelementptr inbounds [7 x i32], ptr @dis, i64 0, i64 %indvars.iv225
  store i32 %260, ptr %261, align 4, !tbaa !5
  %indvars.iv.next226 = add nuw nsw i64 %indvars.iv225, 1
  %262 = sdiv i32 %.087174, 3
  %263 = srem i32 %262, 3
  %264 = add nsw i32 %263, -1
  %265 = add nsw i32 %264, %260
  %266 = getelementptr inbounds [7 x i32], ptr @dis, i64 0, i64 %indvars.iv.next226
  store i32 %265, ptr %266, align 4, !tbaa !5
  %indvars.iv.next226.1 = add nuw nsw i64 %indvars.iv225, 2
  %267 = sdiv i32 %.087174, 9
  %niter298.next.1 = add i64 %niter298, 2
  %niter298.ncmp.1 = icmp eq i64 %niter298.next.1, %unroll_iter297
  br i1 %niter298.ncmp.1, label %._crit_edge177.loopexit.unr-lcssa, label %.lr.ph176, !llvm.loop !30

268:                                              ; preds = %236, %._crit_edge177
  %.pre243244 = phi i32 [ %.pre243245, %236 ], [ %.pre242, %._crit_edge177 ]
  %269 = phi i32 [ %237, %236 ], [ %.pre242, %._crit_edge177 ]
  %indvars.iv.next231 = add nuw nsw i64 %indvars.iv230, 1
  %exitcond233.not = icmp eq i64 %indvars.iv.next231, 243
  br i1 %exitcond233.not, label %233, label %236, !llvm.loop !31

._crit_edge185:                                   ; preds = %.lr.ph184, %.preheader
  ret i32 0

.lr.ph184:                                        ; preds = %.preheader, %.lr.ph184
  %indvars.iv237 = phi i64 [ %indvars.iv.next238, %.lr.ph184 ], [ 0, %.preheader ]
  %270 = getelementptr inbounds [107 x i32], ptr @ans, i64 0, i64 %indvars.iv237
  %271 = load i32, ptr %270, align 4, !tbaa !5
  %272 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %271)
  %indvars.iv.next238 = add nuw nsw i64 %indvars.iv237, 1
  %273 = load i32, ptr @n, align 4, !tbaa !5
  %274 = load i32, ptr @m, align 4, !tbaa !5
  %275 = add nsw i32 %274, %273
  %276 = sext i32 %275 to i64
  %277 = icmp slt i64 %indvars.iv.next238, %276
  br i1 %277, label %.lr.ph184, label %._crit_edge185, !llvm.loop !32
}

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) 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 nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6 align 2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.mul.v4i32(<4 x i32>) #7

attributes #0 = { 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 #1 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = { 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 #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10, !14}
!14 = !{!"llvm.loop.peeled.count", i32 1}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10, !12, !11}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10, !11, !12}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10, !12, !11}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !10}
!26 = distinct !{!26, !10}
!27 = distinct !{!27, !10}
!28 = distinct !{!28, !10}
!29 = distinct !{!29, !10}
!30 = distinct !{!30, !10}
!31 = distinct !{!31, !10}
!32 = distinct !{!32, !10}


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