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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.BigInt = type { i32, [31 x i64] }
%"struct.std::pair" = type { i32, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair.0" = type <{ i64, i32, [4 x i8] }>
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@tot = external dso_local global i32, align 4
@d = external dso_local global [100005 x i32], align 16
@pr = external dso_local global [9593 x i32], align 16
@mul = external dso_local global [9593 x [5 x i32]], align 16
@a = external dso_local global [153 x %struct.BigInt], align 16
@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@q = external dso_local global i32, align 4
@ord = external dso_local global [153 x i32], align 16
@deg = external dso_local global [1581 x i32], align 16
@e = external dso_local global [1581 x [33 x i32]], align 16
@ctr = external dso_local global [1581 x [1581 x %"struct.std::pair"]], align 16
@f = external dso_local global [153 x %"class.std::vector"], align 16
@lft = external dso_local global %"class.std::vector", align 8
@rht = external dso_local global %"class.std::vector", align 8
@ban = external dso_local global [51 x i8], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZZ4mainE1g = external hidden global [1581 x %"struct.std::pair"], align 16
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca 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 %"class.std::vector", align 8
  %10 = alloca %"class.std::vector", align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::vector", align 8
  %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 ptr, align 8
  %19 = alloca %"struct.std::pair", align 4
  %20 = alloca i32, align 4
  %21 = alloca %"struct.std::pair", align 4
  %22 = alloca %"struct.std::pair.0", align 8
  %23 = alloca i64, align 8
  %24 = alloca i32, align 4
  %25 = alloca { i64, i32 }, align 8
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %33 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %34 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %35 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca ptr, align 8
  %40 = alloca i32, align 4
  %41 = alloca i32, align 4
  %42 = alloca i32, align 4
  %43 = alloca i32, align 4
  %44 = alloca i8, align 1
  %45 = alloca i32, align 4
  %46 = alloca i32, align 4
  %47 = alloca ptr, align 8
  %48 = alloca ptr, align 8
  %49 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %50 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %51 = alloca i32, align 4
  %52 = alloca i32, align 4
  %53 = alloca i32, align 4
  %54 = alloca i32, align 4
  %55 = alloca i32, align 4
  %56 = alloca i32, align 4
  %57 = alloca i32, align 4
  %58 = alloca i32, align 4
  %59 = alloca i32, align 4
  %60 = alloca i32, align 4
  %61 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 2, ptr %2, align 4, !tbaa !5
  br label %62

62:                                               ; preds = %148, %0
  %63 = load i32, ptr %2, align 4, !tbaa !5
  %64 = icmp slt i32 %63, 100005
  br i1 %64, label %66, label %65

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

66:                                               ; preds = %62
  %67 = load i32, ptr %2, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [100005 x i32], ptr @d, i64 0, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = icmp ne i32 %70, 0
  br i1 %71, label %114, label %72

72:                                               ; preds = %66
  %73 = load i32, ptr @tot, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [9593 x [5 x i32]], ptr @mul, i64 0, i64 %74
  %76 = getelementptr inbounds [5 x i32], ptr %75, i64 0, i64 0
  store i32 1, ptr %76, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %77

77:                                               ; preds = %102, %72
  %78 = load i32, ptr %4, align 4, !tbaa !5
  %79 = icmp slt i32 %78, 4
  br i1 %79, label %81, label %80

80:                                               ; preds = %77
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  br label %105

81:                                               ; preds = %77
  %82 = load i32, ptr @tot, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [9593 x [5 x i32]], ptr @mul, i64 0, i64 %83
  %85 = load i32, ptr %4, align 4, !tbaa !5
  %86 = sub nsw i32 %85, 1
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [5 x i32], ptr %84, i64 0, i64 %87
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = mul nsw i64 %90, 10000000000000
  %92 = load i32, ptr %2, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = srem i64 %91, %93
  %95 = trunc i64 %94 to i32
  %96 = load i32, ptr @tot, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [9593 x [5 x i32]], ptr @mul, i64 0, i64 %97
  %99 = load i32, ptr %4, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [5 x i32], ptr %98, i64 0, i64 %100
  store i32 %95, ptr %101, align 4, !tbaa !5
  br label %102

102:                                              ; preds = %81
  %103 = load i32, ptr %4, align 4, !tbaa !5
  %104 = add nsw i32 %103, 1
  store i32 %104, ptr %4, align 4, !tbaa !5
  br label %77, !llvm.loop !9

105:                                              ; preds = %80
  %106 = load i32, ptr %2, align 4, !tbaa !5
  %107 = load i32, ptr %2, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [100005 x i32], ptr @d, i64 0, i64 %108
  store i32 %106, ptr %109, align 4, !tbaa !5
  %110 = load i32, ptr @tot, align 4, !tbaa !5
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr @tot, align 4, !tbaa !5
  %112 = sext i32 %110 to i64
  %113 = getelementptr inbounds [9593 x i32], ptr @pr, i64 0, i64 %112
  store i32 %106, ptr %113, align 4, !tbaa !5
  br label %114

114:                                              ; preds = %105, %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 0, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  br label %115

115:                                              ; preds = %143, %114
  %116 = load i32, ptr %2, align 4, !tbaa !5
  %117 = load i32, ptr %5, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [9593 x i32], ptr @pr, i64 0, i64 %118
  %120 = load i32, ptr %119, align 4, !tbaa !5
  %121 = mul nsw i32 %116, %120
  store i32 %121, ptr %6, align 4, !tbaa !5
  %122 = icmp slt i32 %121, 100005
  br i1 %122, label %124, label %123

123:                                              ; preds = %115
  store i32 8, ptr %3, align 4
  br label %146

124:                                              ; preds = %115
  %125 = load i32, ptr %5, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [9593 x i32], ptr @pr, i64 0, i64 %126
  %128 = load i32, ptr %127, align 4, !tbaa !5
  %129 = load i32, ptr %6, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [100005 x i32], ptr @d, i64 0, i64 %130
  store i32 %128, ptr %131, align 4, !tbaa !5
  %132 = load i32, ptr %2, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [100005 x i32], ptr @d, i64 0, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !5
  %136 = load i32, ptr %5, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [9593 x i32], ptr @pr, i64 0, i64 %137
  %139 = load i32, ptr %138, align 4, !tbaa !5
  %140 = icmp eq i32 %135, %139
  br i1 %140, label %141, label %142

141:                                              ; preds = %124
  store i32 8, ptr %3, align 4
  br label %146

142:                                              ; preds = %124
  br label %143

143:                                              ; preds = %142
  %144 = load i32, ptr %5, align 4, !tbaa !5
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %5, align 4, !tbaa !5
  br label %115, !llvm.loop !11

146:                                              ; preds = %141, %123
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  br label %147

147:                                              ; preds = %146
  br label %148

148:                                              ; preds = %147
  %149 = load i32, ptr %2, align 4, !tbaa !5
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %2, align 4, !tbaa !5
  br label %62, !llvm.loop !12

151:                                              ; preds = %65
  %152 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  br label %153

153:                                              ; preds = %891, %151
  %154 = load i32, ptr @t, align 4, !tbaa !5
  %155 = add nsw i32 %154, -1
  store i32 %155, ptr @t, align 4, !tbaa !5
  %156 = icmp ne i32 %154, 0
  br i1 %156, label %157, label %892

157:                                              ; preds = %153
  %158 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %159

159:                                              ; preds = %170, %157
  %160 = load i32, ptr %7, align 4, !tbaa !5
  %161 = load i32, ptr @n, align 4, !tbaa !5
  %162 = load i32, ptr @n, align 4, !tbaa !5
  %163 = add nsw i32 %161, %162
  %164 = icmp slt i32 %160, %163
  br i1 %164, label %166, label %165

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

166:                                              ; preds = %159
  %167 = load i32, ptr %7, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [153 x %struct.BigInt], ptr @a, i64 0, i64 %168
  call void @_ZN6BigInt4readEv(ptr noundef nonnull align 8 dereferenceable(256) %169)
  br label %170

170:                                              ; preds = %166
  %171 = load i32, ptr %7, align 4, !tbaa !5
  %172 = add nsw i32 %171, 1
  store i32 %172, ptr %7, align 4, !tbaa !5
  br label %159, !llvm.loop !13

173:                                              ; preds = %165
  %174 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @q)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %175

175:                                              ; preds = %188, %173
  %176 = load i32, ptr %8, align 4, !tbaa !5
  %177 = load i32, ptr @q, align 4, !tbaa !5
  %178 = icmp slt i32 %176, %177
  br i1 %178, label %180, label %179

179:                                              ; preds = %175
  store i32 16, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %191

180:                                              ; preds = %175
  %181 = load i32, ptr @n, align 4, !tbaa !5
  %182 = load i32, ptr @n, align 4, !tbaa !5
  %183 = add nsw i32 %181, %182
  %184 = load i32, ptr %8, align 4, !tbaa !5
  %185 = add nsw i32 %183, %184
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [153 x %struct.BigInt], ptr @a, i64 0, i64 %186
  call void @_ZN6BigInt4readEv(ptr noundef nonnull align 8 dereferenceable(256) %187)
  br label %188

188:                                              ; preds = %180
  %189 = load i32, ptr %8, align 4, !tbaa !5
  %190 = add nsw i32 %189, 1
  store i32 %190, ptr %8, align 4, !tbaa !5
  br label %175, !llvm.loop !14

191:                                              ; preds = %179
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #8
  call void @llvm.memset.p0.i64(ptr align 8 %9, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE4swapERS3_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) @lft) #8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #8
  call void @llvm.memset.p0.i64(ptr align 8 %10, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE4swapERS3_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) @rht) #8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %192

192:                                              ; preds = %209, %191
  %193 = load i32, ptr %11, align 4, !tbaa !5
  %194 = load i32, ptr @n, align 4, !tbaa !5
  %195 = load i32, ptr @n, align 4, !tbaa !5
  %196 = add nsw i32 %194, %195
  %197 = load i32, ptr @q, align 4, !tbaa !5
  %198 = add nsw i32 %196, %197
  %199 = icmp slt i32 %193, %198
  br i1 %199, label %201, label %200

200:                                              ; preds = %192
  store i32 19, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %212

201:                                              ; preds = %192
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #8
  call void @llvm.memset.p0.i64(ptr align 8 %12, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  %202 = load i32, ptr %11, align 4, !tbaa !5
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds [153 x %"class.std::vector"], ptr @f, i64 0, i64 %203
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE4swapERS3_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %204) #8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #8
  %205 = load i32, ptr %11, align 4, !tbaa !5
  %206 = load i32, ptr %11, align 4, !tbaa !5
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [153 x i32], ptr @ord, i64 0, i64 %207
  store i32 %205, ptr %208, align 4, !tbaa !5
  br label %209

209:                                              ; preds = %201
  %210 = load i32, ptr %11, align 4, !tbaa !5
  %211 = add nsw i32 %210, 1
  store i32 %211, ptr %11, align 4, !tbaa !5
  br label %192, !llvm.loop !15

212:                                              ; preds = %200
  %213 = load i32, ptr @q, align 4, !tbaa !5
  %214 = sext i32 %213 to i64
  %215 = mul i64 %214, 1
  call void @llvm.memset.p0.i64(ptr align 16 @ban, i8 0, i64 %215, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 0, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  %216 = load i32, ptr @n, align 4, !tbaa !5
  %217 = load i32, ptr @n, align 4, !tbaa !5
  %218 = add nsw i32 %216, %217
  %219 = load i32, ptr @q, align 4, !tbaa !5
  %220 = add nsw i32 %218, %219
  store i32 %220, ptr %14, align 4, !tbaa !5
  br label %221

221:                                              ; preds = %390, %212
  %222 = load i32, ptr %13, align 4, !tbaa !5
  %223 = load i32, ptr @tot, align 4, !tbaa !5
  %224 = icmp slt i32 %222, %223
  br i1 %224, label %225, label %228

225:                                              ; preds = %221
  %226 = load i32, ptr %14, align 4, !tbaa !5
  %227 = icmp sgt i32 %226, 0
  br label %228

228:                                              ; preds = %225, %221
  %229 = phi i1 [ false, %221 ], [ %227, %225 ]
  br i1 %229, label %231, label %230

230:                                              ; preds = %228
  store i32 22, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %393

231:                                              ; preds = %228
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  store i32 0, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %232

232:                                              ; preds = %385, %231
  %233 = load i32, ptr %16, align 4, !tbaa !5
  %234 = load i32, ptr %14, align 4, !tbaa !5
  %235 = icmp slt i32 %233, %234
  br i1 %235, label %237, label %236

236:                                              ; preds = %232
  store i32 25, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %388

237:                                              ; preds = %232
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  %238 = load i32, ptr %16, align 4, !tbaa !5
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds [153 x i32], ptr @ord, i64 0, i64 %239
  %241 = load i32, ptr %240, align 4, !tbaa !5
  store i32 %241, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %242 = load i32, ptr %17, align 4, !tbaa !5
  %243 = load i32, ptr @n, align 4, !tbaa !5
  %244 = load i32, ptr @n, align 4, !tbaa !5
  %245 = add nsw i32 %243, %244
  %246 = icmp slt i32 %242, %245
  br i1 %246, label %247, label %252

247:                                              ; preds = %237
  %248 = load i32, ptr %17, align 4, !tbaa !5
  %249 = and i32 %248, 1
  %250 = icmp ne i32 %249, 0
  br i1 %250, label %251, label %252

251:                                              ; preds = %247
  br label %253

252:                                              ; preds = %247, %237
  br label %253

253:                                              ; preds = %252, %251
  %254 = phi ptr [ @rht, %251 ], [ @lft, %252 ]
  store ptr %254, ptr %18, align 8, !tbaa !16
  %255 = load i32, ptr %17, align 4, !tbaa !5
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds [153 x %struct.BigInt], ptr @a, i64 0, i64 %256
  %258 = load i32, ptr %13, align 4, !tbaa !5
  %259 = sext i32 %258 to i64
  %260 = getelementptr inbounds [9593 x [5 x i32]], ptr @mul, i64 0, i64 %259
  %261 = getelementptr inbounds [5 x i32], ptr %260, i64 0, i64 0
  %262 = call noundef i64 @_ZN6BigInt3dotEPKi(ptr noundef nonnull align 8 dereferenceable(256) %257, ptr noundef %261)
  %263 = load i32, ptr %13, align 4, !tbaa !5
  %264 = sext i32 %263 to i64
  %265 = getelementptr inbounds [9593 x i32], ptr @pr, i64 0, i64 %264
  %266 = load i32, ptr %265, align 4, !tbaa !5
  %267 = sext i32 %266 to i64
  %268 = srem i64 %262, %267
  %269 = icmp sgt i64 %268, 0
  br i1 %269, label %270, label %276

270:                                              ; preds = %253
  %271 = load i32, ptr %17, align 4, !tbaa !5
  %272 = load i32, ptr %15, align 4, !tbaa !5
  %273 = add nsw i32 %272, 1
  store i32 %273, ptr %15, align 4, !tbaa !5
  %274 = sext i32 %272 to i64
  %275 = getelementptr inbounds [153 x i32], ptr @ord, i64 0, i64 %274
  store i32 %271, ptr %275, align 4, !tbaa !5
  store i32 27, ptr %3, align 4
  br label %382

276:                                              ; preds = %253
  %277 = load ptr, ptr %18, align 8, !tbaa !16
  %278 = call noundef zeroext i1 @_ZNKSt6vectorISt4pairIiiESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %277) #8
  br i1 %278, label %289, label %279

279:                                              ; preds = %276
  %280 = load ptr, ptr %18, align 8, !tbaa !16
  %281 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %280) #8
  %282 = getelementptr inbounds %"struct.std::pair", ptr %281, i32 0, i32 0
  %283 = load i32, ptr %282, align 4, !tbaa !18
  %284 = load i32, ptr %13, align 4, !tbaa !5
  %285 = sext i32 %284 to i64
  %286 = getelementptr inbounds [9593 x i32], ptr @pr, i64 0, i64 %285
  %287 = load i32, ptr %286, align 4, !tbaa !5
  %288 = icmp ne i32 %283, %287
  br i1 %288, label %289, label %310

289:                                              ; preds = %279, %276
  %290 = load i32, ptr %17, align 4, !tbaa !5
  %291 = load i32, ptr @n, align 4, !tbaa !5
  %292 = load i32, ptr @n, align 4, !tbaa !5
  %293 = add nsw i32 %291, %292
  %294 = icmp slt i32 %290, %293
  br i1 %294, label %295, label %301

295:                                              ; preds = %289
  %296 = load ptr, ptr %18, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %297 = load i32, ptr %13, align 4, !tbaa !5
  %298 = sext i32 %297 to i64
  %299 = getelementptr inbounds [9593 x i32], ptr @pr, i64 0, i64 %298
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  store i32 0, ptr %20, align 4, !tbaa !5
  %300 = call i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %299, ptr noundef nonnull align 4 dereferenceable(4) %20)
  store i64 %300, ptr %19, align 4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %296, ptr noundef nonnull align 4 dereferenceable(8) %19)
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  br label %309

301:                                              ; preds = %289
  %302 = load i32, ptr %17, align 4, !tbaa !5
  %303 = load i32, ptr @n, align 4, !tbaa !5
  %304 = sub nsw i32 %302, %303
  %305 = load i32, ptr @n, align 4, !tbaa !5
  %306 = sub nsw i32 %304, %305
  %307 = sext i32 %306 to i64
  %308 = getelementptr inbounds [51 x i8], ptr @ban, i64 0, i64 %307
  store i8 1, ptr %308, align 1, !tbaa !20
  store i32 27, ptr %3, align 4
  br label %382

309:                                              ; preds = %295
  br label %310

310:                                              ; preds = %309, %279
  %311 = load i32, ptr %17, align 4, !tbaa !5
  %312 = load i32, ptr @n, align 4, !tbaa !5
  %313 = load i32, ptr @n, align 4, !tbaa !5
  %314 = add nsw i32 %312, %313
  %315 = icmp slt i32 %311, %314
  br i1 %315, label %316, label %322

316:                                              ; preds = %310
  %317 = load ptr, ptr %18, align 8, !tbaa !16
  %318 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %317) #8
  %319 = getelementptr inbounds %"struct.std::pair", ptr %318, i32 0, i32 1
  %320 = load i32, ptr %319, align 4, !tbaa !22
  %321 = add nsw i32 %320, 1
  store i32 %321, ptr %319, align 4, !tbaa !22
  br label %322

322:                                              ; preds = %316, %310
  %323 = load i32, ptr %17, align 4, !tbaa !5
  %324 = sext i32 %323 to i64
  %325 = getelementptr inbounds [153 x %"class.std::vector"], ptr @f, i64 0, i64 %324
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %326 = load ptr, ptr %18, align 8, !tbaa !16
  %327 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %326) #8
  %328 = sub i64 %327, 1
  store i64 %328, ptr %23, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  store i32 0, ptr %24, align 4, !tbaa !5
  %329 = call { i64, i32 } @_ZSt9make_pairImiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 4 dereferenceable(4) %24)
  store { i64, i32 } %329, ptr %25, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %22, ptr align 8 %25, i64 12, i1 false)
  call void @_ZNSt4pairIiiEC2ImiTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS3_S4_EEclsr6_PCCFPIS3_S4_EE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS_IS3_S4_E(ptr noundef nonnull align 4 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(12) %22)
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %325, ptr noundef nonnull align 4 dereferenceable(8) %21)
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  br label %330

330:                                              ; preds = %344, %322
  %331 = load i32, ptr %13, align 4, !tbaa !5
  %332 = sext i32 %331 to i64
  %333 = getelementptr inbounds [9593 x i32], ptr @pr, i64 0, i64 %332
  %334 = load i32, ptr %17, align 4, !tbaa !5
  %335 = sext i32 %334 to i64
  %336 = getelementptr inbounds [153 x %struct.BigInt], ptr @a, i64 0, i64 %335
  call void @_ZN6BigIntdVERKi(ptr noundef nonnull align 8 dereferenceable(256) %336, ptr noundef nonnull align 4 dereferenceable(4) %333)
  %337 = load i32, ptr %17, align 4, !tbaa !5
  %338 = sext i32 %337 to i64
  %339 = getelementptr inbounds [153 x %"class.std::vector"], ptr @f, i64 0, i64 %338
  %340 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %339) #8
  %341 = getelementptr inbounds %"struct.std::pair", ptr %340, i32 0, i32 1
  %342 = load i32, ptr %341, align 4, !tbaa !22
  %343 = add nsw i32 %342, 1
  store i32 %343, ptr %341, align 4, !tbaa !22
  br label %344

344:                                              ; preds = %330
  %345 = load i32, ptr %17, align 4, !tbaa !5
  %346 = sext i32 %345 to i64
  %347 = getelementptr inbounds [153 x %struct.BigInt], ptr @a, i64 0, i64 %346
  %348 = load i32, ptr %13, align 4, !tbaa !5
  %349 = sext i32 %348 to i64
  %350 = getelementptr inbounds [9593 x [5 x i32]], ptr @mul, i64 0, i64 %349
  %351 = getelementptr inbounds [5 x i32], ptr %350, i64 0, i64 0
  %352 = call noundef i64 @_ZN6BigInt3dotEPKi(ptr noundef nonnull align 8 dereferenceable(256) %347, ptr noundef %351)
  %353 = load i32, ptr %13, align 4, !tbaa !5
  %354 = sext i32 %353 to i64
  %355 = getelementptr inbounds [9593 x i32], ptr @pr, i64 0, i64 %354
  %356 = load i32, ptr %355, align 4, !tbaa !5
  %357 = sext i32 %356 to i64
  %358 = srem i64 %352, %357
  %359 = icmp eq i64 %358, 0
  br i1 %359, label %330, label %360, !llvm.loop !25

360:                                              ; preds = %344
  %361 = load i32, ptr %17, align 4, !tbaa !5
  %362 = sext i32 %361 to i64
  %363 = getelementptr inbounds [153 x %struct.BigInt], ptr @a, i64 0, i64 %362
  %364 = getelementptr inbounds %struct.BigInt, ptr %363, i32 0, i32 0
  %365 = load i32, ptr %364, align 16, !tbaa !26
  %366 = icmp sgt i32 %365, 1
  br i1 %366, label %375, label %367

367:                                              ; preds = %360
  %368 = load i32, ptr %17, align 4, !tbaa !5
  %369 = sext i32 %368 to i64
  %370 = getelementptr inbounds [153 x %struct.BigInt], ptr @a, i64 0, i64 %369
  %371 = getelementptr inbounds %struct.BigInt, ptr %370, i32 0, i32 1
  %372 = getelementptr inbounds [31 x i64], ptr %371, i64 0, i64 0
  %373 = load i64, ptr %372, align 8, !tbaa !28
  %374 = icmp sgt i64 %373, 1
  br i1 %374, label %375, label %381

375:                                              ; preds = %367, %360
  %376 = load i32, ptr %17, align 4, !tbaa !5
  %377 = load i32, ptr %15, align 4, !tbaa !5
  %378 = add nsw i32 %377, 1
  store i32 %378, ptr %15, align 4, !tbaa !5
  %379 = sext i32 %377 to i64
  %380 = getelementptr inbounds [153 x i32], ptr @ord, i64 0, i64 %379
  store i32 %376, ptr %380, align 4, !tbaa !5
  br label %381

381:                                              ; preds = %375, %367
  store i32 0, ptr %3, align 4
  br label %382

382:                                              ; preds = %381, %301, %270
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  %383 = load i32, ptr %3, align 4
  switch i32 %383, label %893 [
    i32 0, label %384
    i32 27, label %385
  ]

384:                                              ; preds = %382
  br label %385

385:                                              ; preds = %384, %382
  %386 = load i32, ptr %16, align 4, !tbaa !5
  %387 = add nsw i32 %386, 1
  store i32 %387, ptr %16, align 4, !tbaa !5
  br label %232, !llvm.loop !30

388:                                              ; preds = %236
  %389 = load i32, ptr %15, align 4, !tbaa !5
  store i32 %389, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %390

390:                                              ; preds = %388
  %391 = load i32, ptr %13, align 4, !tbaa !5
  %392 = add nsw i32 %391, 1
  store i32 %392, ptr %13, align 4, !tbaa !5
  br label %221, !llvm.loop !31

393:                                              ; preds = %230
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  %394 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @lft) #8
  %395 = trunc i64 %394 to i32
  store i32 %395, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #8
  %396 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @rht) #8
  %397 = trunc i64 %396 to i32
  store i32 %397, ptr %27, align 4, !tbaa !5
  %398 = load i32, ptr %27, align 4, !tbaa !5
  %399 = sext i32 %398 to i64
  %400 = mul i64 %399, 4
  call void @llvm.memset.p0.i64(ptr align 16 @deg, i8 0, i64 %400, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #8
  store i32 0, ptr %28, align 4, !tbaa !5
  br label %401

401:                                              ; preds = %418, %393
  %402 = load i32, ptr %28, align 4, !tbaa !5
  %403 = load i32, ptr %26, align 4, !tbaa !5
  %404 = icmp slt i32 %402, %403
  br i1 %404, label %406, label %405

405:                                              ; preds = %401
  store i32 30, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  br label %421

406:                                              ; preds = %401
  %407 = load i32, ptr %28, align 4, !tbaa !5
  %408 = sext i32 %407 to i64
  %409 = getelementptr inbounds [1581 x [33 x i32]], ptr @e, i64 0, i64 %408
  %410 = getelementptr inbounds [33 x i32], ptr %409, i64 0, i64 0
  store i32 0, ptr %410, align 4, !tbaa !5
  %411 = load i32, ptr %28, align 4, !tbaa !5
  %412 = sext i32 %411 to i64
  %413 = getelementptr inbounds [1581 x [1581 x %"struct.std::pair"]], ptr @ctr, i64 0, i64 %412
  %414 = getelementptr inbounds [1581 x %"struct.std::pair"], ptr %413, i64 0, i64 0
  %415 = load i32, ptr %27, align 4, !tbaa !5
  %416 = sext i32 %415 to i64
  %417 = mul i64 %416, 8
  call void @llvm.memset.p0.i64(ptr align 8 %414, i8 0, i64 %417, i1 false)
  br label %418

418:                                              ; preds = %406
  %419 = load i32, ptr %28, align 4, !tbaa !5
  %420 = add nsw i32 %419, 1
  store i32 %420, ptr %28, align 4, !tbaa !5
  br label %401, !llvm.loop !32

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

422:                                              ; preds = %529, %421
  %423 = load i32, ptr %29, align 4, !tbaa !5
  %424 = load i32, ptr @n, align 4, !tbaa !5
  %425 = icmp slt i32 %423, %424
  br i1 %425, label %427, label %426

426:                                              ; preds = %422
  store i32 33, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  br label %532

427:                                              ; preds = %422
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  %428 = load i32, ptr %29, align 4, !tbaa !5
  %429 = shl i32 %428, 1
  %430 = sext i32 %429 to i64
  %431 = getelementptr inbounds [153 x %"class.std::vector"], ptr @f, i64 0, i64 %430
  store ptr %431, ptr %30, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #8
  %432 = load i32, ptr %29, align 4, !tbaa !5
  %433 = shl i32 %432, 1
  %434 = or i32 %433, 1
  %435 = sext i32 %434 to i64
  %436 = getelementptr inbounds [153 x %"class.std::vector"], ptr @f, i64 0, i64 %435
  store ptr %436, ptr %31, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #8
  %437 = load ptr, ptr %30, align 8, !tbaa !16
  %438 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %437) #8
  %439 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %32, i32 0, i32 0
  store ptr %438, ptr %439, align 8
  br label %440

440:                                              ; preds = %526, %427
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #8
  %441 = load ptr, ptr %30, align 8, !tbaa !16
  %442 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %441) #8
  %443 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %33, i32 0, i32 0
  store ptr %442, ptr %443, align 8
  %444 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull align 8 dereferenceable(8) %33) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #8
  br i1 %444, label %446, label %445

445:                                              ; preds = %440
  store i32 36, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #8
  br label %528

446:                                              ; preds = %440
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #8
  %447 = load ptr, ptr %31, align 8, !tbaa !16
  %448 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %447) #8
  %449 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %34, i32 0, i32 0
  store ptr %448, ptr %449, align 8
  br label %450

450:                                              ; preds = %523, %446
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #8
  %451 = load ptr, ptr %31, align 8, !tbaa !16
  %452 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %451) #8
  %453 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %35, i32 0, i32 0
  store ptr %452, ptr %453, align 8
  %454 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull align 8 dereferenceable(8) %35) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #8
  br i1 %454, label %456, label %455

455:                                              ; preds = %450
  store i32 39, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  br label %525

456:                                              ; preds = %450
  %457 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #8
  %458 = getelementptr inbounds %"struct.std::pair", ptr %457, i32 0, i32 1
  %459 = load i32, ptr %458, align 4, !tbaa !22
  %460 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %32) #8
  %461 = getelementptr inbounds %"struct.std::pair", ptr %460, i32 0, i32 1
  %462 = load i32, ptr %461, align 4, !tbaa !22
  %463 = srem i32 %459, %462
  %464 = icmp sgt i32 %463, 0
  br i1 %464, label %465, label %466

465:                                              ; preds = %456
  br label %523

466:                                              ; preds = %456
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #8
  %467 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %32) #8
  %468 = getelementptr inbounds %"struct.std::pair", ptr %467, i32 0, i32 0
  %469 = load i32, ptr %468, align 4, !tbaa !18
  store i32 %469, ptr %36, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #8
  %470 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #8
  %471 = getelementptr inbounds %"struct.std::pair", ptr %470, i32 0, i32 0
  %472 = load i32, ptr %471, align 4, !tbaa !18
  store i32 %472, ptr %37, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #8
  %473 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #8
  %474 = getelementptr inbounds %"struct.std::pair", ptr %473, i32 0, i32 1
  %475 = load i32, ptr %474, align 4, !tbaa !22
  %476 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %32) #8
  %477 = getelementptr inbounds %"struct.std::pair", ptr %476, i32 0, i32 1
  %478 = load i32, ptr %477, align 4, !tbaa !22
  %479 = sdiv i32 %475, %478
  store i32 %479, ptr %38, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #8
  %480 = load i32, ptr %36, align 4, !tbaa !5
  %481 = sext i32 %480 to i64
  %482 = getelementptr inbounds [1581 x [1581 x %"struct.std::pair"]], ptr @ctr, i64 0, i64 %481
  %483 = load i32, ptr %37, align 4, !tbaa !5
  %484 = sext i32 %483 to i64
  %485 = getelementptr inbounds [1581 x %"struct.std::pair"], ptr %482, i64 0, i64 %484
  store ptr %485, ptr %39, align 8, !tbaa !16
  %486 = load ptr, ptr %39, align 8, !tbaa !16
  %487 = getelementptr inbounds %"struct.std::pair", ptr %486, i32 0, i32 1
  %488 = load i32, ptr %487, align 4, !tbaa !22
  %489 = icmp ne i32 %488, 0
  br i1 %489, label %511, label %490

490:                                              ; preds = %466
  %491 = load i32, ptr %38, align 4, !tbaa !5
  %492 = load ptr, ptr %39, align 8, !tbaa !16
  %493 = getelementptr inbounds %"struct.std::pair", ptr %492, i32 0, i32 0
  store i32 %491, ptr %493, align 4, !tbaa !18
  %494 = load i32, ptr %37, align 4, !tbaa !5
  %495 = load i32, ptr %36, align 4, !tbaa !5
  %496 = sext i32 %495 to i64
  %497 = getelementptr inbounds [1581 x [33 x i32]], ptr @e, i64 0, i64 %496
  %498 = load i32, ptr %36, align 4, !tbaa !5
  %499 = sext i32 %498 to i64
  %500 = getelementptr inbounds [1581 x [33 x i32]], ptr @e, i64 0, i64 %499
  %501 = getelementptr inbounds [33 x i32], ptr %500, i64 0, i64 0
  %502 = load i32, ptr %501, align 4, !tbaa !5
  %503 = add nsw i32 %502, 1
  store i32 %503, ptr %501, align 4, !tbaa !5
  %504 = sext i32 %503 to i64
  %505 = getelementptr inbounds [33 x i32], ptr %497, i64 0, i64 %504
  store i32 %494, ptr %505, align 4, !tbaa !5
  %506 = load i32, ptr %37, align 4, !tbaa !5
  %507 = sext i32 %506 to i64
  %508 = getelementptr inbounds [1581 x i32], ptr @deg, i64 0, i64 %507
  %509 = load i32, ptr %508, align 4, !tbaa !5
  %510 = add nsw i32 %509, 1
  store i32 %510, ptr %508, align 4, !tbaa !5
  br label %511

511:                                              ; preds = %490, %466
  %512 = load ptr, ptr %39, align 8, !tbaa !16
  %513 = getelementptr inbounds %"struct.std::pair", ptr %512, i32 0, i32 0
  %514 = load i32, ptr %513, align 4, !tbaa !18
  %515 = load i32, ptr %38, align 4, !tbaa !5
  %516 = icmp eq i32 %514, %515
  br i1 %516, label %517, label %522

517:                                              ; preds = %511
  %518 = load ptr, ptr %39, align 8, !tbaa !16
  %519 = getelementptr inbounds %"struct.std::pair", ptr %518, i32 0, i32 1
  %520 = load i32, ptr %519, align 4, !tbaa !22
  %521 = add nsw i32 %520, 1
  store i32 %521, ptr %519, align 4, !tbaa !22
  br label %522

522:                                              ; preds = %517, %511
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #8
  br label %523

523:                                              ; preds = %522, %465
  %524 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #8
  br label %450, !llvm.loop !33

525:                                              ; preds = %455
  br label %526

526:                                              ; preds = %525
  %527 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %32) #8
  br label %440, !llvm.loop !34

528:                                              ; preds = %445
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  br label %529

529:                                              ; preds = %528
  %530 = load i32, ptr %29, align 4, !tbaa !5
  %531 = add nsw i32 %530, 1
  store i32 %531, ptr %29, align 4, !tbaa !5
  br label %422, !llvm.loop !35

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

533:                                              ; preds = %610, %532
  %534 = load i32, ptr %40, align 4, !tbaa !5
  %535 = load i32, ptr %26, align 4, !tbaa !5
  %536 = icmp slt i32 %534, %535
  br i1 %536, label %538, label %537

537:                                              ; preds = %533
  store i32 42, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #8
  br label %613

538:                                              ; preds = %533
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #8
  store i32 0, ptr %41, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #8
  store i32 1, ptr %42, align 4, !tbaa !5
  br label %539

539:                                              ; preds = %601, %538
  %540 = load i32, ptr %42, align 4, !tbaa !5
  %541 = load i32, ptr %40, align 4, !tbaa !5
  %542 = sext i32 %541 to i64
  %543 = getelementptr inbounds [1581 x [33 x i32]], ptr @e, i64 0, i64 %542
  %544 = getelementptr inbounds [33 x i32], ptr %543, i64 0, i64 0
  %545 = load i32, ptr %544, align 4, !tbaa !5
  %546 = icmp sle i32 %540, %545
  br i1 %546, label %548, label %547

547:                                              ; preds = %539
  store i32 45, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #8
  br label %604

548:                                              ; preds = %539
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #8
  %549 = load i32, ptr %40, align 4, !tbaa !5
  %550 = sext i32 %549 to i64
  %551 = getelementptr inbounds [1581 x [33 x i32]], ptr @e, i64 0, i64 %550
  %552 = load i32, ptr %42, align 4, !tbaa !5
  %553 = sext i32 %552 to i64
  %554 = getelementptr inbounds [33 x i32], ptr %551, i64 0, i64 %553
  %555 = load i32, ptr %554, align 4, !tbaa !5
  store i32 %555, ptr %43, align 4, !tbaa !5
  %556 = load i32, ptr %40, align 4, !tbaa !5
  %557 = sext i32 %556 to i64
  %558 = getelementptr inbounds [1581 x [1581 x %"struct.std::pair"]], ptr @ctr, i64 0, i64 %557
  %559 = load i32, ptr %43, align 4, !tbaa !5
  %560 = sext i32 %559 to i64
  %561 = getelementptr inbounds [1581 x %"struct.std::pair"], ptr %558, i64 0, i64 %560
  %562 = getelementptr inbounds %"struct.std::pair", ptr %561, i32 0, i32 1
  %563 = load i32, ptr %562, align 4, !tbaa !22
  %564 = load i32, ptr %40, align 4, !tbaa !5
  %565 = sext i32 %564 to i64
  %566 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @lft, i64 noundef %565) #8
  %567 = getelementptr inbounds %"struct.std::pair", ptr %566, i32 0, i32 1
  %568 = load i32, ptr %567, align 4, !tbaa !22
  %569 = icmp ne i32 %563, %568
  br i1 %569, label %585, label %570

570:                                              ; preds = %548
  %571 = load i32, ptr %40, align 4, !tbaa !5
  %572 = sext i32 %571 to i64
  %573 = getelementptr inbounds [1581 x [1581 x %"struct.std::pair"]], ptr @ctr, i64 0, i64 %572
  %574 = load i32, ptr %43, align 4, !tbaa !5
  %575 = sext i32 %574 to i64
  %576 = getelementptr inbounds [1581 x %"struct.std::pair"], ptr %573, i64 0, i64 %575
  %577 = getelementptr inbounds %"struct.std::pair", ptr %576, i32 0, i32 1
  %578 = load i32, ptr %577, align 4, !tbaa !22
  %579 = load i32, ptr %43, align 4, !tbaa !5
  %580 = sext i32 %579 to i64
  %581 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @rht, i64 noundef %580) #8
  %582 = getelementptr inbounds %"struct.std::pair", ptr %581, i32 0, i32 1
  %583 = load i32, ptr %582, align 4, !tbaa !22
  %584 = icmp ne i32 %578, %583
  br i1 %584, label %585, label %591

585:                                              ; preds = %570, %548
  %586 = load i32, ptr %43, align 4, !tbaa !5
  %587 = sext i32 %586 to i64
  %588 = getelementptr inbounds [1581 x i32], ptr @deg, i64 0, i64 %587
  %589 = load i32, ptr %588, align 4, !tbaa !5
  %590 = add nsw i32 %589, -1
  store i32 %590, ptr %588, align 4, !tbaa !5
  br label %600

591:                                              ; preds = %570
  %592 = load i32, ptr %43, align 4, !tbaa !5
  %593 = load i32, ptr %40, align 4, !tbaa !5
  %594 = sext i32 %593 to i64
  %595 = getelementptr inbounds [1581 x [33 x i32]], ptr @e, i64 0, i64 %594
  %596 = load i32, ptr %41, align 4, !tbaa !5
  %597 = add nsw i32 %596, 1
  store i32 %597, ptr %41, align 4, !tbaa !5
  %598 = sext i32 %597 to i64
  %599 = getelementptr inbounds [33 x i32], ptr %595, i64 0, i64 %598
  store i32 %592, ptr %599, align 4, !tbaa !5
  br label %600

600:                                              ; preds = %591, %585
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #8
  br label %601

601:                                              ; preds = %600
  %602 = load i32, ptr %42, align 4, !tbaa !5
  %603 = add nsw i32 %602, 1
  store i32 %603, ptr %42, align 4, !tbaa !5
  br label %539, !llvm.loop !36

604:                                              ; preds = %547
  %605 = load i32, ptr %41, align 4, !tbaa !5
  %606 = load i32, ptr %40, align 4, !tbaa !5
  %607 = sext i32 %606 to i64
  %608 = getelementptr inbounds [1581 x [33 x i32]], ptr @e, i64 0, i64 %607
  %609 = getelementptr inbounds [33 x i32], ptr %608, i64 0, i64 0
  store i32 %605, ptr %609, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #8
  br label %610

610:                                              ; preds = %604
  %611 = load i32, ptr %40, align 4, !tbaa !5
  %612 = add nsw i32 %611, 1
  store i32 %612, ptr %40, align 4, !tbaa !5
  br label %533, !llvm.loop !37

613:                                              ; preds = %537
  call void @llvm.lifetime.start.p0(i64 1, ptr %44) #8
  store i8 0, ptr %44, align 1, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #8
  store i32 0, ptr %45, align 4, !tbaa !5
  br label %614

614:                                              ; preds = %647, %613
  %615 = load i8, ptr %44, align 1, !tbaa !20, !range !38, !noundef !39
  %616 = trunc i8 %615 to i1
  br i1 %616, label %621, label %617

617:                                              ; preds = %614
  %618 = load i32, ptr %45, align 4, !tbaa !5
  %619 = load i32, ptr %27, align 4, !tbaa !5
  %620 = icmp slt i32 %618, %619
  br label %621

621:                                              ; preds = %617, %614
  %622 = phi i1 [ false, %614 ], [ %620, %617 ]
  br i1 %622, label %624, label %623

623:                                              ; preds = %621
  store i32 48, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #8
  br label %650

624:                                              ; preds = %621
  %625 = load i32, ptr %45, align 4, !tbaa !5
  %626 = sext i32 %625 to i64
  %627 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @rht, i64 noundef %626) #8
  %628 = getelementptr inbounds %"struct.std::pair", ptr %627, i32 0, i32 1
  %629 = load i32, ptr %628, align 4, !tbaa !22
  %630 = icmp sgt i32 %629, 0
  br i1 %630, label %631, label %638

631:                                              ; preds = %624
  %632 = load i32, ptr %45, align 4, !tbaa !5
  %633 = sext i32 %632 to i64
  %634 = getelementptr inbounds [1581 x i32], ptr @deg, i64 0, i64 %633
  %635 = load i32, ptr %634, align 4, !tbaa !5
  %636 = icmp ne i32 %635, 0
  %637 = xor i1 %636, true
  br label %638

638:                                              ; preds = %631, %624
  %639 = phi i1 [ false, %624 ], [ %637, %631 ]
  %640 = zext i1 %639 to i32
  %641 = load i8, ptr %44, align 1, !tbaa !20, !range !38, !noundef !39
  %642 = trunc i8 %641 to i1
  %643 = zext i1 %642 to i32
  %644 = or i32 %643, %640
  %645 = icmp ne i32 %644, 0
  %646 = zext i1 %645 to i8
  store i8 %646, ptr %44, align 1, !tbaa !20
  br label %647

647:                                              ; preds = %638
  %648 = load i32, ptr %45, align 4, !tbaa !5
  %649 = add nsw i32 %648, 1
  store i32 %649, ptr %45, align 4, !tbaa !5
  br label %614, !llvm.loop !40

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

651:                                              ; preds = %888, %650
  %652 = load i32, ptr %46, align 4, !tbaa !5
  %653 = load i32, ptr @q, align 4, !tbaa !5
  %654 = icmp slt i32 %652, %653
  br i1 %654, label %656, label %655

655:                                              ; preds = %651
  store i32 51, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #8
  br label %891

656:                                              ; preds = %651
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #8
  %657 = load i32, ptr @n, align 4, !tbaa !5
  %658 = load i32, ptr @n, align 4, !tbaa !5
  %659 = add nsw i32 %657, %658
  %660 = load i32, ptr %46, align 4, !tbaa !5
  %661 = add nsw i32 %659, %660
  %662 = sext i32 %661 to i64
  %663 = getelementptr inbounds [153 x %struct.BigInt], ptr @a, i64 0, i64 %662
  store ptr %663, ptr %47, align 8, !tbaa !16
  %664 = load i8, ptr %44, align 1, !tbaa !20, !range !38, !noundef !39
  %665 = trunc i8 %664 to i1
  br i1 %665, label %683, label %666

666:                                              ; preds = %656
  %667 = load i32, ptr %46, align 4, !tbaa !5
  %668 = sext i32 %667 to i64
  %669 = getelementptr inbounds [51 x i8], ptr @ban, i64 0, i64 %668
  %670 = load i8, ptr %669, align 1, !tbaa !20, !range !38, !noundef !39
  %671 = trunc i8 %670 to i1
  br i1 %671, label %683, label %672

672:                                              ; preds = %666
  %673 = load ptr, ptr %47, align 8, !tbaa !16
  %674 = getelementptr inbounds %struct.BigInt, ptr %673, i32 0, i32 0
  %675 = load i32, ptr %674, align 8, !tbaa !26
  %676 = icmp sgt i32 %675, 1
  br i1 %676, label %683, label %677

677:                                              ; preds = %672
  %678 = load ptr, ptr %47, align 8, !tbaa !16
  %679 = getelementptr inbounds %struct.BigInt, ptr %678, i32 0, i32 1
  %680 = getelementptr inbounds [31 x i64], ptr %679, i64 0, i64 0
  %681 = load i64, ptr %680, align 8, !tbaa !28
  %682 = icmp sgt i64 %681, 1
  br i1 %682, label %683, label %685

683:                                              ; preds = %677, %672, %666, %656
  %684 = call i32 @puts(ptr noundef @.str.5)
  store i32 53, ptr %3, align 4
  br label %885

685:                                              ; preds = %677
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #8
  %686 = load i32, ptr @n, align 4, !tbaa !5
  %687 = load i32, ptr @n, align 4, !tbaa !5
  %688 = add nsw i32 %686, %687
  %689 = load i32, ptr %46, align 4, !tbaa !5
  %690 = add nsw i32 %688, %689
  %691 = sext i32 %690 to i64
  %692 = getelementptr inbounds [153 x %"class.std::vector"], ptr @f, i64 0, i64 %691
  store ptr %692, ptr %48, align 8, !tbaa !16
  %693 = load i32, ptr %27, align 4, !tbaa !5
  %694 = sext i32 %693 to i64
  %695 = mul i64 %694, 8
  call void @llvm.memset.p0.i64(ptr align 16 @_ZZ4mainE1g, i8 0, i64 %695, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #8
  %696 = load ptr, ptr %48, align 8, !tbaa !16
  %697 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %696) #8
  %698 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %49, i32 0, i32 0
  store ptr %697, ptr %698, align 8
  br label %699

699:                                              ; preds = %771, %685
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #8
  %700 = load ptr, ptr %48, align 8, !tbaa !16
  %701 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %700) #8
  %702 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %50, i32 0, i32 0
  store ptr %701, ptr %702, align 8
  %703 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef nonnull align 8 dereferenceable(8) %50) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #8
  br i1 %703, label %705, label %704

704:                                              ; preds = %699
  store i32 54, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #8
  br label %773

705:                                              ; preds = %699
  call void @llvm.lifetime.start.p0(i64 4, ptr %51) #8
  %706 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %49) #8
  %707 = getelementptr inbounds %"struct.std::pair", ptr %706, i32 0, i32 0
  %708 = load i32, ptr %707, align 4, !tbaa !18
  store i32 %708, ptr %51, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %52) #8
  %709 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %49) #8
  %710 = getelementptr inbounds %"struct.std::pair", ptr %709, i32 0, i32 1
  %711 = load i32, ptr %710, align 4, !tbaa !22
  store i32 %711, ptr %52, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %53) #8
  store i32 1, ptr %53, align 4, !tbaa !5
  br label %712

712:                                              ; preds = %767, %705
  %713 = load i32, ptr %53, align 4, !tbaa !5
  %714 = load i32, ptr %51, align 4, !tbaa !5
  %715 = sext i32 %714 to i64
  %716 = getelementptr inbounds [1581 x [33 x i32]], ptr @e, i64 0, i64 %715
  %717 = getelementptr inbounds [33 x i32], ptr %716, i64 0, i64 0
  %718 = load i32, ptr %717, align 4, !tbaa !5
  %719 = icmp sle i32 %713, %718
  br i1 %719, label %721, label %720

720:                                              ; preds = %712
  store i32 57, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %53) #8
  br label %770

721:                                              ; preds = %712
  call void @llvm.lifetime.start.p0(i64 4, ptr %54) #8
  %722 = load i32, ptr %51, align 4, !tbaa !5
  %723 = sext i32 %722 to i64
  %724 = getelementptr inbounds [1581 x [33 x i32]], ptr @e, i64 0, i64 %723
  %725 = load i32, ptr %53, align 4, !tbaa !5
  %726 = sext i32 %725 to i64
  %727 = getelementptr inbounds [33 x i32], ptr %724, i64 0, i64 %726
  %728 = load i32, ptr %727, align 4, !tbaa !5
  store i32 %728, ptr %54, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %55) #8
  %729 = load i32, ptr %52, align 4, !tbaa !5
  %730 = load i32, ptr %51, align 4, !tbaa !5
  %731 = sext i32 %730 to i64
  %732 = getelementptr inbounds [1581 x [1581 x %"struct.std::pair"]], ptr @ctr, i64 0, i64 %731
  %733 = load i32, ptr %54, align 4, !tbaa !5
  %734 = sext i32 %733 to i64
  %735 = getelementptr inbounds [1581 x %"struct.std::pair"], ptr %732, i64 0, i64 %734
  %736 = getelementptr inbounds %"struct.std::pair", ptr %735, i32 0, i32 0
  %737 = load i32, ptr %736, align 8, !tbaa !18
  %738 = mul nsw i32 %729, %737
  store i32 %738, ptr %55, align 4, !tbaa !5
  %739 = load i32, ptr %54, align 4, !tbaa !5
  %740 = sext i32 %739 to i64
  %741 = getelementptr inbounds [1581 x %"struct.std::pair"], ptr @_ZZ4mainE1g, i64 0, i64 %740
  %742 = getelementptr inbounds %"struct.std::pair", ptr %741, i32 0, i32 1
  %743 = load i32, ptr %742, align 4, !tbaa !22
  %744 = icmp ne i32 %743, 0
  br i1 %744, label %751, label %745

745:                                              ; preds = %721
  %746 = load i32, ptr %55, align 4, !tbaa !5
  %747 = load i32, ptr %54, align 4, !tbaa !5
  %748 = sext i32 %747 to i64
  %749 = getelementptr inbounds [1581 x %"struct.std::pair"], ptr @_ZZ4mainE1g, i64 0, i64 %748
  %750 = getelementptr inbounds %"struct.std::pair", ptr %749, i32 0, i32 0
  store i32 %746, ptr %750, align 8, !tbaa !18
  br label %751

751:                                              ; preds = %745, %721
  %752 = load i32, ptr %54, align 4, !tbaa !5
  %753 = sext i32 %752 to i64
  %754 = getelementptr inbounds [1581 x %"struct.std::pair"], ptr @_ZZ4mainE1g, i64 0, i64 %753
  %755 = getelementptr inbounds %"struct.std::pair", ptr %754, i32 0, i32 0
  %756 = load i32, ptr %755, align 8, !tbaa !18
  %757 = load i32, ptr %55, align 4, !tbaa !5
  %758 = icmp eq i32 %756, %757
  br i1 %758, label %759, label %766

759:                                              ; preds = %751
  %760 = load i32, ptr %54, align 4, !tbaa !5
  %761 = sext i32 %760 to i64
  %762 = getelementptr inbounds [1581 x %"struct.std::pair"], ptr @_ZZ4mainE1g, i64 0, i64 %761
  %763 = getelementptr inbounds %"struct.std::pair", ptr %762, i32 0, i32 1
  %764 = load i32, ptr %763, align 4, !tbaa !22
  %765 = add nsw i32 %764, 1
  store i32 %765, ptr %763, align 4, !tbaa !22
  br label %766

766:                                              ; preds = %759, %751
  call void @llvm.lifetime.end.p0(i64 4, ptr %55) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %54) #8
  br label %767

767:                                              ; preds = %766
  %768 = load i32, ptr %53, align 4, !tbaa !5
  %769 = add nsw i32 %768, 1
  store i32 %769, ptr %53, align 4, !tbaa !5
  br label %712, !llvm.loop !41

770:                                              ; preds = %720
  call void @llvm.lifetime.end.p0(i64 4, ptr %52) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %51) #8
  br label %771

771:                                              ; preds = %770
  %772 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %49) #8
  br label %699, !llvm.loop !42

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

774:                                              ; preds = %817, %773
  %775 = load i32, ptr %46, align 4, !tbaa !5
  %776 = sext i32 %775 to i64
  %777 = getelementptr inbounds [51 x i8], ptr @ban, i64 0, i64 %776
  %778 = load i8, ptr %777, align 1, !tbaa !20, !range !38, !noundef !39
  %779 = trunc i8 %778 to i1
  br i1 %779, label %784, label %780

780:                                              ; preds = %774
  %781 = load i32, ptr %56, align 4, !tbaa !5
  %782 = load i32, ptr %27, align 4, !tbaa !5
  %783 = icmp slt i32 %781, %782
  br label %784

784:                                              ; preds = %780, %774
  %785 = phi i1 [ false, %774 ], [ %783, %780 ]
  br i1 %785, label %787, label %786

786:                                              ; preds = %784
  store i32 60, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %56) #8
  br label %820

787:                                              ; preds = %784
  %788 = load i32, ptr %56, align 4, !tbaa !5
  %789 = sext i32 %788 to i64
  %790 = getelementptr inbounds [1581 x %"struct.std::pair"], ptr @_ZZ4mainE1g, i64 0, i64 %789
  %791 = getelementptr inbounds %"struct.std::pair", ptr %790, i32 0, i32 1
  %792 = load i32, ptr %791, align 4, !tbaa !22
  %793 = icmp sgt i32 %792, 0
  br i1 %793, label %794, label %805

794:                                              ; preds = %787
  %795 = load i32, ptr %56, align 4, !tbaa !5
  %796 = sext i32 %795 to i64
  %797 = getelementptr inbounds [1581 x %"struct.std::pair"], ptr @_ZZ4mainE1g, i64 0, i64 %796
  %798 = getelementptr inbounds %"struct.std::pair", ptr %797, i32 0, i32 1
  %799 = load i32, ptr %798, align 4, !tbaa !22
  %800 = load i32, ptr %56, align 4, !tbaa !5
  %801 = sext i32 %800 to i64
  %802 = getelementptr inbounds [1581 x i32], ptr @deg, i64 0, i64 %801
  %803 = load i32, ptr %802, align 4, !tbaa !5
  %804 = icmp ne i32 %799, %803
  br label %805

805:                                              ; preds = %794, %787
  %806 = phi i1 [ false, %787 ], [ %804, %794 ]
  %807 = zext i1 %806 to i32
  %808 = load i32, ptr %46, align 4, !tbaa !5
  %809 = sext i32 %808 to i64
  %810 = getelementptr inbounds [51 x i8], ptr @ban, i64 0, i64 %809
  %811 = load i8, ptr %810, align 1, !tbaa !20, !range !38, !noundef !39
  %812 = trunc i8 %811 to i1
  %813 = zext i1 %812 to i32
  %814 = or i32 %813, %807
  %815 = icmp ne i32 %814, 0
  %816 = zext i1 %815 to i8
  store i8 %816, ptr %810, align 1, !tbaa !20
  br label %817

817:                                              ; preds = %805
  %818 = load i32, ptr %56, align 4, !tbaa !5
  %819 = add nsw i32 %818, 1
  store i32 %819, ptr %56, align 4, !tbaa !5
  br label %774, !llvm.loop !43

820:                                              ; preds = %786
  %821 = load i32, ptr %46, align 4, !tbaa !5
  %822 = sext i32 %821 to i64
  %823 = getelementptr inbounds [51 x i8], ptr @ban, i64 0, i64 %822
  %824 = load i8, ptr %823, align 1, !tbaa !20, !range !38, !noundef !39
  %825 = trunc i8 %824 to i1
  br i1 %825, label %826, label %828

826:                                              ; preds = %820
  %827 = call i32 @puts(ptr noundef @.str.5)
  br label %884

828:                                              ; preds = %820
  %829 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  call void @llvm.lifetime.start.p0(i64 4, ptr %57) #8
  store i32 1, ptr %57, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %58) #8
  store i32 0, ptr %58, align 4, !tbaa !5
  br label %830

830:                                              ; preds = %874, %828
  %831 = load i32, ptr %58, align 4, !tbaa !5
  %832 = load i32, ptr %27, align 4, !tbaa !5
  %833 = icmp slt i32 %831, %832
  br i1 %833, label %835, label %834

834:                                              ; preds = %830
  store i32 63, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %58) #8
  br label %877

835:                                              ; preds = %830
  %836 = load i32, ptr %58, align 4, !tbaa !5
  %837 = sext i32 %836 to i64
  %838 = getelementptr inbounds [1581 x %"struct.std::pair"], ptr @_ZZ4mainE1g, i64 0, i64 %837
  %839 = getelementptr inbounds %"struct.std::pair", ptr %838, i32 0, i32 0
  %840 = load i32, ptr %839, align 8, !tbaa !18
  %841 = icmp ne i32 %840, 0
  br i1 %841, label %843, label %842

842:                                              ; preds = %835
  br label %874

843:                                              ; preds = %835
  call void @llvm.lifetime.start.p0(i64 4, ptr %59) #8
  %844 = load i32, ptr %58, align 4, !tbaa !5
  %845 = sext i32 %844 to i64
  %846 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @rht, i64 noundef %845) #8
  %847 = getelementptr inbounds %"struct.std::pair", ptr %846, i32 0, i32 0
  %848 = load i32, ptr %847, align 4, !tbaa !18
  store i32 %848, ptr %59, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %60) #8
  %849 = load i32, ptr %59, align 4, !tbaa !5
  %850 = sdiv i32 100004, %849
  store i32 %850, ptr %60, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %61) #8
  store i32 0, ptr %61, align 4, !tbaa !5
  br label %851

851:                                              ; preds = %870, %843
  %852 = load i32, ptr %61, align 4, !tbaa !5
  %853 = load i32, ptr %58, align 4, !tbaa !5
  %854 = sext i32 %853 to i64
  %855 = getelementptr inbounds [1581 x %"struct.std::pair"], ptr @_ZZ4mainE1g, i64 0, i64 %854
  %856 = getelementptr inbounds %"struct.std::pair", ptr %855, i32 0, i32 0
  %857 = load i32, ptr %856, align 8, !tbaa !18
  %858 = icmp slt i32 %852, %857
  br i1 %858, label %860, label %859

859:                                              ; preds = %851
  store i32 66, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %61) #8
  br label %873

860:                                              ; preds = %851
  %861 = load i32, ptr %57, align 4, !tbaa !5
  %862 = load i32, ptr %60, align 4, !tbaa !5
  %863 = icmp sgt i32 %861, %862
  br i1 %863, label %864, label %866

864:                                              ; preds = %860
  %865 = load ptr, ptr %47, align 8, !tbaa !16
  call void @_ZN6BigIntmLERKi(ptr noundef nonnull align 8 dereferenceable(256) %865, ptr noundef nonnull align 4 dereferenceable(4) %57)
  store i32 1, ptr %57, align 4, !tbaa !5
  br label %866

866:                                              ; preds = %864, %860
  %867 = load i32, ptr %59, align 4, !tbaa !5
  %868 = load i32, ptr %57, align 4, !tbaa !5
  %869 = mul nsw i32 %868, %867
  store i32 %869, ptr %57, align 4, !tbaa !5
  br label %870

870:                                              ; preds = %866
  %871 = load i32, ptr %61, align 4, !tbaa !5
  %872 = add nsw i32 %871, 1
  store i32 %872, ptr %61, align 4, !tbaa !5
  br label %851, !llvm.loop !44

873:                                              ; preds = %859
  call void @llvm.lifetime.end.p0(i64 4, ptr %60) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %59) #8
  br label %874

874:                                              ; preds = %873, %842
  %875 = load i32, ptr %58, align 4, !tbaa !5
  %876 = add nsw i32 %875, 1
  store i32 %876, ptr %58, align 4, !tbaa !5
  br label %830, !llvm.loop !45

877:                                              ; preds = %834
  %878 = load i32, ptr %57, align 4, !tbaa !5
  %879 = icmp sgt i32 %878, 1
  br i1 %879, label %880, label %882

880:                                              ; preds = %877
  %881 = load ptr, ptr %47, align 8, !tbaa !16
  call void @_ZN6BigIntmLERKi(ptr noundef nonnull align 8 dereferenceable(256) %881, ptr noundef nonnull align 4 dereferenceable(4) %57)
  br label %882

882:                                              ; preds = %880, %877
  %883 = load ptr, ptr %47, align 8, !tbaa !16
  call void @_ZNK6BigInt5writeEc(ptr noundef nonnull align 8 dereferenceable(256) %883, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 4, ptr %57) #8
  br label %884

884:                                              ; preds = %882, %826
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #8
  store i32 0, ptr %3, align 4
  br label %885

885:                                              ; preds = %884, %683
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #8
  %886 = load i32, ptr %3, align 4
  switch i32 %886, label %893 [
    i32 0, label %887
    i32 53, label %888
  ]

887:                                              ; preds = %885
  br label %888

888:                                              ; preds = %887, %885
  %889 = load i32, ptr %46, align 4, !tbaa !5
  %890 = add nsw i32 %889, 1
  store i32 %890, ptr %46, align 4, !tbaa !5
  br label %651, !llvm.loop !46

891:                                              ; preds = %655
  call void @llvm.lifetime.end.p0(i64 1, ptr %44) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  br label %153, !llvm.loop !47

892:                                              ; preds = %153
  ret i32 0

893:                                              ; preds = %885, %382
  unreachable
}

; 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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6BigInt4readEv(ptr noundef nonnull align 8 dereferenceable(256)) #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 void @_ZNSt6vectorISt4pairIiiESaIS1_EE4swapERS3_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN6BigInt3dotEPKi(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorISt4pairIiiESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i32 } @_ZSt9make_pairImiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #4

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2ImiTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS3_S4_EEclsr6_PCCFPIS3_S4_EE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS_IS3_S4_E(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(12)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6BigIntdVERKi(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

declare i32 @puts(ptr noundef) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6BigIntmLERKi(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK6BigInt5writeEc(ptr noundef nonnull align 8 dereferenceable(256), i8 noundef signext) #4 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = !{!17, !17, i64 0}
!17 = !{!"any pointer", !7, i64 0}
!18 = !{!19, !6, i64 0}
!19 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!20 = !{!21, !21, i64 0}
!21 = !{!"bool", !7, i64 0}
!22 = !{!19, !6, i64 4}
!23 = !{!24, !24, i64 0}
!24 = !{!"long", !7, i64 0}
!25 = distinct !{!25, !10}
!26 = !{!27, !6, i64 0}
!27 = !{!"_ZTS6BigInt", !6, i64 0, !7, i64 8}
!28 = !{!29, !29, i64 0}
!29 = !{!"long long", !7, i64 0}
!30 = distinct !{!30, !10}
!31 = distinct !{!31, !10}
!32 = distinct !{!32, !10}
!33 = distinct !{!33, !10}
!34 = distinct !{!34, !10}
!35 = distinct !{!35, !10}
!36 = distinct !{!36, !10}
!37 = distinct !{!37, !10}
!38 = !{i8 0, i8 2}
!39 = !{}
!40 = distinct !{!40, !10}
!41 = distinct !{!41, !10}
!42 = distinct !{!42, !10}
!43 = distinct !{!43, !10}
!44 = distinct !{!44, !10}
!45 = distinct !{!45, !10}
!46 = distinct !{!46, !10}
!47 = distinct !{!47, !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"

%struct.BigInt = type { i32, [31 x i64] }
%"struct.std::pair" = type { i32, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair.0" = type <{ i64, i32, [4 x i8] }>
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@tot = external dso_local local_unnamed_addr global i32, align 4
@d = external dso_local local_unnamed_addr global [100005 x i32], align 16
@pr = external dso_local global [9593 x i32], align 16
@mul = external dso_local global [9593 x [5 x i32]], align 16
@a = external dso_local global [153 x %struct.BigInt], align 16
@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@q = external dso_local global i32, align 4
@ord = external dso_local local_unnamed_addr global [153 x i32], align 16
@deg = external dso_local local_unnamed_addr global [1581 x i32], align 16
@e = external dso_local local_unnamed_addr global [1581 x [33 x i32]], align 16
@ctr = external dso_local local_unnamed_addr global [1581 x [1581 x %"struct.std::pair"]], align 16
@f = external dso_local global [153 x %"class.std::vector"], align 16
@lft = external dso_local global %"class.std::vector", align 8
@rht = external dso_local global %"class.std::vector", align 8
@ban = external dso_local local_unnamed_addr global [51 x i8], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZZ4mainE1g = external hidden local_unnamed_addr global [1581 x %"struct.std::pair"], align 16
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = alloca %"class.std::vector", align 8
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"struct.std::pair", align 8
  %5 = alloca i32, align 4
  %6 = alloca %"struct.std::pair", align 4
  %7 = alloca %"struct.std::pair.0", align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca i32, align 4
  %tot.promoted = load i32, ptr @tot, align 4, !tbaa !5
  br label %21

17:                                               ; preds = %._crit_edge
  %18 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t)
  %19 = load i32, ptr @t, align 4, !tbaa !5
  %20 = add nsw i32 %19, -1
  store i32 %20, ptr @t, align 4, !tbaa !5
  %.not286 = icmp eq i32 %19, 0
  br i1 %.not286, label %._crit_edge289, label %.lr.ph288

.lr.ph288:                                        ; preds = %17
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 8
  br label %62

21:                                               ; preds = %0, %._crit_edge
  %indvars.iv297 = phi i64 [ 2, %0 ], [ %indvars.iv.next298, %._crit_edge ]
  %22 = phi i32 [ %tot.promoted, %0 ], [ %45, %._crit_edge ]
  %23 = getelementptr inbounds [100005 x i32], ptr @d, i64 0, i64 %indvars.iv297
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %.not206 = icmp eq i32 %24, 0
  br i1 %.not206, label %25, label %._crit_edge351

._crit_edge351:                                   ; preds = %21
  %.pre352 = trunc nuw nsw i64 %indvars.iv297 to i32
  br label %44

25:                                               ; preds = %21
  %26 = sext i32 %22 to i64
  %27 = getelementptr inbounds [9593 x [5 x i32]], ptr @mul, i64 0, i64 %26
  store i32 1, ptr %27, align 4, !tbaa !5
  %28 = urem i64 10000000000000, %indvars.iv297
  %29 = trunc nsw i64 %28 to i32
  %30 = getelementptr inbounds [9593 x [5 x i32]], ptr @mul, i64 0, i64 %26, i64 1
  store i32 %29, ptr %30, align 4, !tbaa !5
  %sext353 = shl i64 %28, 32
  %31 = ashr exact i64 %sext353, 32
  %32 = mul nsw i64 %31, 10000000000000
  %33 = srem i64 %32, %indvars.iv297
  %34 = trunc nsw i64 %33 to i32
  %35 = getelementptr inbounds [9593 x [5 x i32]], ptr @mul, i64 0, i64 %26, i64 2
  store i32 %34, ptr %35, align 4, !tbaa !5
  %sext354 = shl i64 %33, 32
  %36 = ashr exact i64 %sext354, 32
  %37 = mul nsw i64 %36, 10000000000000
  %38 = srem i64 %37, %indvars.iv297
  %39 = trunc nsw i64 %38 to i32
  %40 = getelementptr inbounds [9593 x [5 x i32]], ptr @mul, i64 0, i64 %26, i64 3
  store i32 %39, ptr %40, align 4, !tbaa !5
  %41 = trunc nuw nsw i64 %indvars.iv297 to i32
  store i32 %41, ptr %23, align 4, !tbaa !5
  %42 = add nsw i32 %22, 1
  store i32 %42, ptr @tot, align 4, !tbaa !5
  %43 = getelementptr inbounds [9593 x i32], ptr @pr, i64 0, i64 %26
  store i32 %41, ptr %43, align 4, !tbaa !5
  br label %44

44:                                               ; preds = %._crit_edge351, %25
  %.pre-phi = phi i32 [ %.pre352, %._crit_edge351 ], [ %41, %25 ]
  %45 = phi i32 [ %22, %._crit_edge351 ], [ %42, %25 ]
  %46 = load i32, ptr @pr, align 16, !tbaa !5
  %47 = mul nsw i32 %46, %.pre-phi
  %48 = icmp slt i32 %47, 100005
  br i1 %48, label %.lr.ph, label %._crit_edge

49:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %50 = getelementptr inbounds [9593 x i32], ptr @pr, i64 0, i64 %indvars.iv.next
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %52 = mul nsw i32 %51, %.pre-phi
  %53 = icmp slt i32 %52, 100005
  br i1 %53, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.lr.ph:                                           ; preds = %44, %49
  %indvars.iv = phi i64 [ %indvars.iv.next, %49 ], [ 0, %44 ]
  %54 = phi i32 [ %52, %49 ], [ %47, %44 ]
  %55 = phi i32 [ %51, %49 ], [ %46, %44 ]
  %56 = sext i32 %54 to i64
  %57 = getelementptr inbounds [100005 x i32], ptr @d, i64 0, i64 %56
  store i32 %55, ptr %57, align 4, !tbaa !5
  %58 = load i32, ptr %23, align 4, !tbaa !5
  %59 = icmp eq i32 %58, %55
  br i1 %59, label %._crit_edge, label %49

._crit_edge:                                      ; preds = %49, %.lr.ph, %44
  %indvars.iv.next298 = add nuw nsw i64 %indvars.iv297, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next298, 100005
  br i1 %exitcond.not, label %17, label %21, !llvm.loop !11

.loopexit209:                                     ; preds = %395, %.preheader208
  %60 = load i32, ptr @t, align 4, !tbaa !5
  %61 = add nsw i32 %60, -1
  store i32 %61, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %60, 0
  br i1 %.not, label %._crit_edge289, label %62, !llvm.loop !12

62:                                               ; preds = %.lr.ph288, %.loopexit209
  %63 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %64 = load i32, ptr @n, align 4, !tbaa !5
  %65 = icmp sgt i32 %64, 0
  br i1 %65, label %.lr.ph222, label %._crit_edge223

._crit_edge223:                                   ; preds = %.lr.ph222, %62
  %66 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @q)
  %67 = load i32, ptr @q, align 4, !tbaa !5
  %68 = icmp sgt i32 %67, 0
  br i1 %68, label %.lr.ph226, label %._crit_edge227

.lr.ph222:                                        ; preds = %62, %.lr.ph222
  %indvars.iv300 = phi i64 [ %indvars.iv.next301, %.lr.ph222 ], [ 0, %62 ]
  %69 = getelementptr inbounds [153 x %struct.BigInt], ptr @a, i64 0, i64 %indvars.iv300
  call void @_ZN6BigInt4readEv(ptr noundef nonnull align 8 dereferenceable(256) %69)
  %indvars.iv.next301 = add nuw nsw i64 %indvars.iv300, 1
  %70 = load i32, ptr @n, align 4, !tbaa !5
  %71 = shl nsw i32 %70, 1
  %72 = sext i32 %71 to i64
  %73 = icmp slt i64 %indvars.iv.next301, %72
  br i1 %73, label %.lr.ph222, label %._crit_edge223, !llvm.loop !13

._crit_edge227:                                   ; preds = %.lr.ph226, %._crit_edge223
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %1, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE4swapERS3_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) @lft) #7
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %2, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE4swapERS3_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) @rht) #7
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #7
  %74 = load i32, ptr @n, align 4, !tbaa !5
  %75 = shl nsw i32 %74, 1
  %76 = load i32, ptr @q, align 4, !tbaa !5
  %77 = add nsw i32 %75, %76
  %78 = icmp sgt i32 %77, 0
  br i1 %78, label %.lr.ph230, label %._crit_edge231

.lr.ph226:                                        ; preds = %._crit_edge223, %.lr.ph226
  %.0172224 = phi i32 [ %84, %.lr.ph226 ], [ 0, %._crit_edge223 ]
  %79 = load i32, ptr @n, align 4, !tbaa !5
  %80 = shl nsw i32 %79, 1
  %81 = add nsw i32 %80, %.0172224
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [153 x %struct.BigInt], ptr @a, i64 0, i64 %82
  call void @_ZN6BigInt4readEv(ptr noundef nonnull align 8 dereferenceable(256) %83)
  %84 = add nuw nsw i32 %.0172224, 1
  %85 = load i32, ptr @q, align 4, !tbaa !5
  %86 = icmp slt i32 %84, %85
  br i1 %86, label %.lr.ph226, label %._crit_edge227, !llvm.loop !14

._crit_edge231:                                   ; preds = %.lr.ph230, %._crit_edge227
  %.lcssa213 = phi i32 [ %76, %._crit_edge227 ], [ %97, %.lr.ph230 ]
  %.lcssa = phi i32 [ %77, %._crit_edge227 ], [ %98, %.lr.ph230 ]
  %87 = sext i32 %.lcssa213 to i64
  call void @llvm.memset.p0.i64(ptr nonnull align 16 @ban, i8 0, i64 %87, i1 false)
  %88 = load i32, ptr @tot, align 4, !tbaa !5
  %89 = icmp sgt i32 %88, 0
  %90 = icmp sgt i32 %.lcssa, 0
  %91 = and i1 %89, %90
  br i1 %91, label %.preheader207, label %._crit_edge237

.lr.ph230:                                        ; preds = %._crit_edge227, %.lr.ph230
  %indvars.iv303 = phi i64 [ %indvars.iv.next304, %.lr.ph230 ], [ 0, %._crit_edge227 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %3, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %92 = getelementptr inbounds [153 x %"class.std::vector"], ptr @f, i64 0, i64 %indvars.iv303
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE4swapERS3_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %92) #7
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  %93 = getelementptr inbounds [153 x i32], ptr @ord, i64 0, i64 %indvars.iv303
  %94 = trunc nuw nsw i64 %indvars.iv303 to i32
  store i32 %94, ptr %93, align 4, !tbaa !5
  %indvars.iv.next304 = add nuw nsw i64 %indvars.iv303, 1
  %95 = load i32, ptr @n, align 4, !tbaa !5
  %96 = shl nsw i32 %95, 1
  %97 = load i32, ptr @q, align 4, !tbaa !5
  %98 = add nsw i32 %96, %97
  %99 = sext i32 %98 to i64
  %100 = icmp slt i64 %indvars.iv.next304, %99
  br i1 %100, label %.lr.ph230, label %._crit_edge231, !llvm.loop !15

.preheader207:                                    ; preds = %._crit_edge231, %112
  %indvars.iv310 = phi i64 [ %indvars.iv.next311, %112 ], [ 0, %._crit_edge231 ]
  %.0178235 = phi i32 [ %.2, %112 ], [ %.lcssa, %._crit_edge231 ]
  %101 = getelementptr inbounds [9593 x [5 x i32]], ptr @mul, i64 0, i64 %indvars.iv310
  %102 = getelementptr inbounds [9593 x i32], ptr @pr, i64 0, i64 %indvars.iv310
  %wide.trip.count = zext nneg i32 %.0178235 to i64
  br label %118

._crit_edge237:                                   ; preds = %112, %._crit_edge231
  %103 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @lft) #7
  %104 = trunc i64 %103 to i32
  %105 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @rht) #7
  %106 = trunc i64 %105 to i32
  %sext = shl i64 %105, 32
  %107 = ashr exact i64 %sext, 30
  call void @llvm.memset.p0.i64(ptr nonnull align 16 @deg, i8 0, i64 %107, i1 false)
  %108 = icmp sgt i32 %104, 0
  br i1 %108, label %.lr.ph240, label %.preheader212

.lr.ph240:                                        ; preds = %._crit_edge237
  %109 = ashr exact i64 %sext, 29
  %wide.trip.count316 = and i64 %103, 2147483647
  %110 = add nsw i64 %wide.trip.count316, -1
  %xtraiter = and i64 %103, 3
  %111 = icmp ult i64 %110, 3
  br i1 %111, label %.preheader212.loopexit.unr-lcssa, label %.lr.ph240.new

.lr.ph240.new:                                    ; preds = %.lr.ph240
  %unroll_iter = sub nsw i64 %wide.trip.count316, %xtraiter
  br label %193

112:                                              ; preds = %188
  %indvars.iv.next311 = add nuw nsw i64 %indvars.iv310, 1
  %113 = load i32, ptr @tot, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = icmp slt i64 %indvars.iv.next311, %114
  %116 = icmp sgt i32 %.2, 0
  %117 = select i1 %115, i1 %116, i1 false
  br i1 %117, label %.preheader207, label %._crit_edge237, !llvm.loop !16

118:                                              ; preds = %.preheader207, %188
  %indvars.iv306 = phi i64 [ 0, %.preheader207 ], [ %indvars.iv.next307, %188 ]
  %.0182234 = phi i32 [ 0, %.preheader207 ], [ %.2, %188 ]
  %119 = getelementptr inbounds [153 x i32], ptr @ord, i64 0, i64 %indvars.iv306
  %120 = load i32, ptr %119, align 4, !tbaa !5
  %121 = load i32, ptr @n, align 4, !tbaa !5
  %122 = shl nsw i32 %121, 1
  %123 = icmp sge i32 %120, %122
  %124 = and i32 %120, 1
  %.not204 = icmp eq i32 %124, 0
  %or.cond = or i1 %.not204, %123
  %125 = select i1 %or.cond, ptr @lft, ptr @rht
  %126 = sext i32 %120 to i64
  %127 = getelementptr inbounds [153 x %struct.BigInt], ptr @a, i64 0, i64 %126
  %128 = call noundef i64 @_ZN6BigInt3dotEPKi(ptr noundef nonnull align 8 dereferenceable(256) %127, ptr noundef nonnull %101)
  %129 = load i32, ptr %102, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = srem i64 %128, %130
  %132 = icmp sgt i64 %131, 0
  br i1 %132, label %133, label %137

133:                                              ; preds = %118
  %134 = add nsw i32 %.0182234, 1
  %135 = sext i32 %.0182234 to i64
  %136 = getelementptr inbounds [153 x i32], ptr @ord, i64 0, i64 %135
  store i32 %120, ptr %136, align 4, !tbaa !5
  br label %188

137:                                              ; preds = %118
  %138 = call noundef zeroext i1 @_ZNKSt6vectorISt4pairIiiESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %125) #7
  br i1 %138, label %143, label %139

139:                                              ; preds = %137
  %140 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %125) #7
  %141 = load i32, ptr %140, align 4, !tbaa !17
  %142 = load i32, ptr %102, align 4, !tbaa !5
  %.not205 = icmp eq i32 %141, %142
  br i1 %.not205, label %153, label %143

143:                                              ; preds = %139, %137
  %144 = load i32, ptr @n, align 4, !tbaa !5
  %145 = shl nsw i32 %144, 1
  %146 = icmp slt i32 %120, %145
  br i1 %146, label %147, label %149

147:                                              ; preds = %143
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  store i32 0, ptr %5, align 4, !tbaa !5
  %148 = call i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %102, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i64 %148, ptr %4, align 8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %125, ptr noundef nonnull align 4 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %153

149:                                              ; preds = %143
  %150 = sub i32 %120, %145
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [51 x i8], ptr @ban, i64 0, i64 %151
  store i8 1, ptr %152, align 1, !tbaa !19
  br label %188

153:                                              ; preds = %147, %139
  %154 = load i32, ptr @n, align 4, !tbaa !5
  %155 = shl nsw i32 %154, 1
  %156 = icmp slt i32 %120, %155
  br i1 %156, label %157, label %162

157:                                              ; preds = %153
  %158 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %125) #7
  %159 = getelementptr inbounds i8, ptr %158, i64 4
  %160 = load i32, ptr %159, align 4, !tbaa !21
  %161 = add nsw i32 %160, 1
  store i32 %161, ptr %159, align 4, !tbaa !21
  br label %162

162:                                              ; preds = %157, %153
  %163 = getelementptr inbounds [153 x %"class.std::vector"], ptr @f, i64 0, i64 %126
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %164 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %125) #7
  %165 = add i64 %164, -1
  store i64 %165, ptr %8, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  %166 = call { i64, i32 } @_ZSt9make_pairImiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %.fca.0.extract = extractvalue { i64, i32 } %166, 0
  %.fca.1.extract = extractvalue { i64, i32 } %166, 1
  store i64 %.fca.0.extract, ptr %7, align 8
  store i32 %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 8
  call void @_ZNSt4pairIiiEC2ImiTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS3_S4_EEclsr6_PCCFPIS3_S4_EE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS_IS3_S4_E(ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(12) %7)
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %163, ptr noundef nonnull align 4 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %167

167:                                              ; preds = %167, %162
  call void @_ZN6BigIntdVERKi(ptr noundef nonnull align 8 dereferenceable(256) %127, ptr noundef nonnull align 4 dereferenceable(4) %102)
  %168 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %163) #7
  %169 = getelementptr inbounds i8, ptr %168, i64 4
  %170 = load i32, ptr %169, align 4, !tbaa !21
  %171 = add nsw i32 %170, 1
  store i32 %171, ptr %169, align 4, !tbaa !21
  %172 = call noundef i64 @_ZN6BigInt3dotEPKi(ptr noundef nonnull align 8 dereferenceable(256) %127, ptr noundef nonnull %101)
  %173 = load i32, ptr %102, align 4, !tbaa !5
  %174 = sext i32 %173 to i64
  %175 = srem i64 %172, %174
  %176 = icmp eq i64 %175, 0
  br i1 %176, label %167, label %177, !llvm.loop !24

177:                                              ; preds = %167
  %178 = load i32, ptr %127, align 16, !tbaa !25
  %179 = icmp sgt i32 %178, 1
  br i1 %179, label %184, label %180

180:                                              ; preds = %177
  %181 = getelementptr inbounds i8, ptr %127, i64 8
  %182 = load i64, ptr %181, align 8, !tbaa !27
  %183 = icmp sgt i64 %182, 1
  br i1 %183, label %184, label %188

184:                                              ; preds = %180, %177
  %185 = add nsw i32 %.0182234, 1
  %186 = sext i32 %.0182234 to i64
  %187 = getelementptr inbounds [153 x i32], ptr @ord, i64 0, i64 %186
  store i32 %120, ptr %187, align 4, !tbaa !5
  br label %188

188:                                              ; preds = %180, %184, %149, %133
  %.2 = phi i32 [ %134, %133 ], [ %.0182234, %149 ], [ %185, %184 ], [ %.0182234, %180 ]
  %indvars.iv.next307 = add nuw nsw i64 %indvars.iv306, 1
  %exitcond309.not = icmp eq i64 %indvars.iv.next307, %wide.trip.count
  br i1 %exitcond309.not, label %112, label %118, !llvm.loop !29

.preheader212.loopexit.unr-lcssa:                 ; preds = %193, %.lr.ph240
  %indvars.iv313.unr = phi i64 [ 0, %.lr.ph240 ], [ %indvars.iv.next314.3, %193 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader212, label %.epil.preheader

.epil.preheader:                                  ; preds = %.preheader212.loopexit.unr-lcssa, %.epil.preheader
  %indvars.iv313.epil = phi i64 [ %indvars.iv.next314.epil, %.epil.preheader ], [ %indvars.iv313.unr, %.preheader212.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.preheader212.loopexit.unr-lcssa ]
  %189 = getelementptr inbounds [1581 x [33 x i32]], ptr @e, i64 0, i64 %indvars.iv313.epil
  store i32 0, ptr %189, align 4, !tbaa !5
  %190 = getelementptr inbounds [1581 x [1581 x %"struct.std::pair"]], ptr @ctr, i64 0, i64 %indvars.iv313.epil
  call void @llvm.memset.p0.i64(ptr nonnull align 8 %190, i8 0, i64 %109, i1 false)
  %indvars.iv.next314.epil = add nuw nsw i64 %indvars.iv313.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader212, label %.epil.preheader, !llvm.loop !30

.preheader212:                                    ; preds = %.preheader212.loopexit.unr-lcssa, %.epil.preheader, %._crit_edge237
  %191 = load i32, ptr @n, align 4, !tbaa !5
  %192 = icmp sgt i32 %191, 0
  br i1 %192, label %.lr.ph248, label %.preheader211

193:                                              ; preds = %193, %.lr.ph240.new
  %indvars.iv313 = phi i64 [ 0, %.lr.ph240.new ], [ %indvars.iv.next314.3, %193 ]
  %niter = phi i64 [ 0, %.lr.ph240.new ], [ %niter.next.3, %193 ]
  %194 = getelementptr inbounds [1581 x [33 x i32]], ptr @e, i64 0, i64 %indvars.iv313
  store i32 0, ptr %194, align 16, !tbaa !5
  %195 = getelementptr inbounds [1581 x [1581 x %"struct.std::pair"]], ptr @ctr, i64 0, i64 %indvars.iv313
  call void @llvm.memset.p0.i64(ptr nonnull align 16 %195, i8 0, i64 %109, i1 false)
  %indvars.iv.next314 = or disjoint i64 %indvars.iv313, 1
  %196 = getelementptr inbounds [1581 x [33 x i32]], ptr @e, i64 0, i64 %indvars.iv.next314
  store i32 0, ptr %196, align 4, !tbaa !5
  %197 = getelementptr inbounds [1581 x [1581 x %"struct.std::pair"]], ptr @ctr, i64 0, i64 %indvars.iv.next314
  call void @llvm.memset.p0.i64(ptr nonnull align 8 %197, i8 0, i64 %109, i1 false)
  %indvars.iv.next314.1 = or disjoint i64 %indvars.iv313, 2
  %198 = getelementptr inbounds [1581 x [33 x i32]], ptr @e, i64 0, i64 %indvars.iv.next314.1
  store i32 0, ptr %198, align 8, !tbaa !5
  %199 = getelementptr inbounds [1581 x [1581 x %"struct.std::pair"]], ptr @ctr, i64 0, i64 %indvars.iv.next314.1
  call void @llvm.memset.p0.i64(ptr nonnull align 16 %199, i8 0, i64 %109, i1 false)
  %indvars.iv.next314.2 = or disjoint i64 %indvars.iv313, 3
  %200 = getelementptr inbounds [1581 x [33 x i32]], ptr @e, i64 0, i64 %indvars.iv.next314.2
  store i32 0, ptr %200, align 4, !tbaa !5
  %201 = getelementptr inbounds [1581 x [1581 x %"struct.std::pair"]], ptr @ctr, i64 0, i64 %indvars.iv.next314.2
  call void @llvm.memset.p0.i64(ptr nonnull align 8 %201, i8 0, i64 %109, i1 false)
  %indvars.iv.next314.3 = add nuw nsw i64 %indvars.iv313, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader212.loopexit.unr-lcssa, label %193, !llvm.loop !32

.preheader211:                                    ; preds = %._crit_edge246, %.preheader212
  br i1 %108, label %.preheader.preheader, label %.preheader210

.preheader.preheader:                             ; preds = %.preheader211
  %wide.trip.count327 = and i64 %103, 2147483647
  br label %.preheader

.lr.ph248:                                        ; preds = %.preheader212, %._crit_edge246
  %indvars.iv318 = phi i64 [ %indvars.iv.next319, %._crit_edge246 ], [ 0, %.preheader212 ]
  %sext355 = shl i64 %indvars.iv318, 33
  %202 = ashr exact i64 %sext355, 32
  %203 = getelementptr inbounds [153 x %"class.std::vector"], ptr @f, i64 0, i64 %202
  %indvars.iv318.tr = trunc i64 %indvars.iv318 to i32
  %204 = shl i32 %indvars.iv318.tr, 1
  %205 = or disjoint i32 %204, 1
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [153 x %"class.std::vector"], ptr @f, i64 0, i64 %206
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %208 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %203) #7
  store ptr %208, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  %209 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %203) #7
  store ptr %209, ptr %11, align 8
  %210 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  br i1 %210, label %.lr.ph245, label %._crit_edge246

._crit_edge246:                                   ; preds = %._crit_edge243, %.lr.ph248
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  %indvars.iv.next319 = add nuw nsw i64 %indvars.iv318, 1
  %211 = load i32, ptr @n, align 4, !tbaa !5
  %212 = sext i32 %211 to i64
  %213 = icmp slt i64 %indvars.iv.next319, %212
  br i1 %213, label %.lr.ph248, label %.preheader211, !llvm.loop !33

.lr.ph245:                                        ; preds = %.lr.ph248, %._crit_edge243
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  %214 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %207) #7
  store ptr %214, ptr %12, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  %215 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %207) #7
  store ptr %215, ptr %13, align 8
  %216 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  br i1 %216, label %.lr.ph242, label %._crit_edge243

._crit_edge243:                                   ; preds = %257, %.lr.ph245
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  %217 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  %218 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %203) #7
  store ptr %218, ptr %11, align 8
  %219 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  br i1 %219, label %.lr.ph245, label %._crit_edge246, !llvm.loop !34

.lr.ph242:                                        ; preds = %.lr.ph245, %257
  %220 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  %221 = getelementptr inbounds i8, ptr %220, i64 4
  %222 = load i32, ptr %221, align 4, !tbaa !21
  %223 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  %224 = getelementptr inbounds i8, ptr %223, i64 4
  %225 = load i32, ptr %224, align 4, !tbaa !21
  %226 = srem i32 %222, %225
  %227 = icmp sgt i32 %226, 0
  br i1 %227, label %257, label %228

228:                                              ; preds = %.lr.ph242
  %229 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  %230 = load i32, ptr %229, align 4, !tbaa !17
  %231 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  %232 = load i32, ptr %231, align 4, !tbaa !17
  %233 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  %234 = getelementptr inbounds i8, ptr %233, i64 4
  %235 = load i32, ptr %234, align 4, !tbaa !21
  %236 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  %237 = getelementptr inbounds i8, ptr %236, i64 4
  %238 = load i32, ptr %237, align 4, !tbaa !21
  %239 = sdiv i32 %235, %238
  %240 = sext i32 %230 to i64
  %241 = sext i32 %232 to i64
  %242 = getelementptr inbounds [1581 x [1581 x %"struct.std::pair"]], ptr @ctr, i64 0, i64 %240, i64 %241
  %243 = getelementptr inbounds i8, ptr %242, i64 4
  %244 = load i32, ptr %243, align 4, !tbaa !21
  %.not203 = icmp eq i32 %244, 0
  br i1 %.not203, label %.thread, label %253

.thread:                                          ; preds = %228
  store i32 %239, ptr %242, align 8, !tbaa !17
  %245 = getelementptr inbounds [1581 x [33 x i32]], ptr @e, i64 0, i64 %240
  %246 = load i32, ptr %245, align 4, !tbaa !5
  %247 = add nsw i32 %246, 1
  store i32 %247, ptr %245, align 4, !tbaa !5
  %248 = sext i32 %247 to i64
  %249 = getelementptr inbounds [1581 x [33 x i32]], ptr @e, i64 0, i64 %240, i64 %248
  store i32 %232, ptr %249, align 4, !tbaa !5
  %250 = getelementptr inbounds [1581 x i32], ptr @deg, i64 0, i64 %241
  %251 = load i32, ptr %250, align 4, !tbaa !5
  %252 = add nsw i32 %251, 1
  store i32 %252, ptr %250, align 4, !tbaa !5
  br label %255

253:                                              ; preds = %228
  %.pre = load i32, ptr %242, align 8, !tbaa !17
  %254 = icmp eq i32 %.pre, %239
  br i1 %254, label %255, label %257

255:                                              ; preds = %.thread, %253
  %256 = add nsw i32 %244, 1
  store i32 %256, ptr %243, align 4, !tbaa !21
  br label %257

257:                                              ; preds = %253, %255, %.lr.ph242
  %258 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  %259 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %207) #7
  store ptr %259, ptr %13, align 8
  %260 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  br i1 %260, label %.lr.ph242, label %._crit_edge243, !llvm.loop !35

.preheader210:                                    ; preds = %._crit_edge253, %.preheader211
  %261 = icmp slt i32 %106, 1
  br i1 %261, label %.preheader208, label %.lr.ph259.preheader

.lr.ph259.preheader:                              ; preds = %.preheader210
  %262 = and i64 %105, 2147483647
  br label %.lr.ph259

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge253
  %indvars.iv324 = phi i64 [ 0, %.preheader.preheader ], [ %indvars.iv.next325, %._crit_edge253 ]
  %263 = getelementptr inbounds [1581 x [33 x i32]], ptr @e, i64 0, i64 %indvars.iv324
  %264 = load i32, ptr %263, align 4, !tbaa !5
  %.not200249 = icmp slt i32 %264, 1
  br i1 %.not200249, label %._crit_edge253, label %.lr.ph252

._crit_edge253:                                   ; preds = %286, %.preheader
  %.0180.lcssa = phi i32 [ 0, %.preheader ], [ %.1, %286 ]
  store i32 %.0180.lcssa, ptr %263, align 4, !tbaa !5
  %indvars.iv.next325 = add nuw nsw i64 %indvars.iv324, 1
  %exitcond328.not = icmp eq i64 %indvars.iv.next325, %wide.trip.count327
  br i1 %exitcond328.not, label %.preheader210, label %.preheader, !llvm.loop !36

.lr.ph252:                                        ; preds = %.preheader, %286
  %indvars.iv321 = phi i64 [ %indvars.iv.next322, %286 ], [ 1, %.preheader ]
  %.0180250 = phi i32 [ %.1, %286 ], [ 0, %.preheader ]
  %265 = getelementptr inbounds [1581 x [33 x i32]], ptr @e, i64 0, i64 %indvars.iv324, i64 %indvars.iv321
  %266 = load i32, ptr %265, align 4, !tbaa !5
  %267 = sext i32 %266 to i64
  %268 = getelementptr inbounds [1581 x [1581 x %"struct.std::pair"]], ptr @ctr, i64 0, i64 %indvars.iv324, i64 %267, i32 1
  %269 = load i32, ptr %268, align 4, !tbaa !21
  %270 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @lft, i64 noundef %indvars.iv324) #7
  %271 = getelementptr inbounds i8, ptr %270, i64 4
  %272 = load i32, ptr %271, align 4, !tbaa !21
  %.not201 = icmp eq i32 %269, %272
  br i1 %.not201, label %273, label %278

273:                                              ; preds = %.lr.ph252
  %274 = load i32, ptr %268, align 4, !tbaa !21
  %275 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @rht, i64 noundef %267) #7
  %276 = getelementptr inbounds i8, ptr %275, i64 4
  %277 = load i32, ptr %276, align 4, !tbaa !21
  %.not202 = icmp eq i32 %274, %277
  br i1 %.not202, label %282, label %278

278:                                              ; preds = %273, %.lr.ph252
  %279 = getelementptr inbounds [1581 x i32], ptr @deg, i64 0, i64 %267
  %280 = load i32, ptr %279, align 4, !tbaa !5
  %281 = add nsw i32 %280, -1
  store i32 %281, ptr %279, align 4, !tbaa !5
  br label %286

282:                                              ; preds = %273
  %283 = add nsw i32 %.0180250, 1
  %284 = sext i32 %283 to i64
  %285 = getelementptr inbounds [1581 x [33 x i32]], ptr @e, i64 0, i64 %indvars.iv324, i64 %284
  store i32 %266, ptr %285, align 4, !tbaa !5
  br label %286

286:                                              ; preds = %282, %278
  %.1 = phi i32 [ %.0180250, %278 ], [ %283, %282 ]
  %indvars.iv.next322 = add nuw nsw i64 %indvars.iv321, 1
  %287 = load i32, ptr %263, align 4, !tbaa !5
  %288 = sext i32 %287 to i64
  %.not200.not = icmp slt i64 %indvars.iv321, %288
  br i1 %.not200.not, label %.lr.ph252, label %._crit_edge253, !llvm.loop !37

.preheader208:                                    ; preds = %301, %.preheader210
  %.0177.lcssa = phi i1 [ false, %.preheader210 ], [ %302, %301 ]
  %289 = load i32, ptr @q, align 4, !tbaa !5
  %290 = icmp sgt i32 %289, 0
  br i1 %290, label %.lr.ph285, label %.loopexit209

.lr.ph285:                                        ; preds = %.preheader208
  %291 = ashr exact i64 %sext, 29
  %292 = icmp sgt i32 %106, 0
  %sext356 = shl i64 %105, 32
  %293 = ashr exact i64 %sext356, 32
  %wide.trip.count341 = and i64 %105, 2147483647
  br label %304

.lr.ph259:                                        ; preds = %.lr.ph259.preheader, %301
  %indvars.iv329 = phi i64 [ 0, %.lr.ph259.preheader ], [ %indvars.iv.next330, %301 ]
  %294 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @rht, i64 noundef %indvars.iv329) #7
  %295 = getelementptr inbounds i8, ptr %294, i64 4
  %296 = load i32, ptr %295, align 4, !tbaa !21
  %297 = icmp sgt i32 %296, 0
  br i1 %297, label %298, label %301

298:                                              ; preds = %.lr.ph259
  %299 = getelementptr inbounds [1581 x i32], ptr @deg, i64 0, i64 %indvars.iv329
  %300 = load i32, ptr %299, align 4, !tbaa !5
  %.not199 = icmp eq i32 %300, 0
  br label %301

301:                                              ; preds = %298, %.lr.ph259
  %302 = phi i1 [ false, %.lr.ph259 ], [ %.not199, %298 ]
  %indvars.iv.next330 = add nuw nsw i64 %indvars.iv329, 1
  %303 = icmp uge i64 %indvars.iv.next330, %262
  %.not193 = select i1 %302, i1 true, i1 %303
  br i1 %.not193, label %.preheader208, label %.lr.ph259, !llvm.loop !38

304:                                              ; preds = %.lr.ph285, %395
  %indvars.iv343 = phi i64 [ 0, %.lr.ph285 ], [ %indvars.iv.next344, %395 ]
  %305 = load i32, ptr @n, align 4, !tbaa !5
  %306 = shl nsw i32 %305, 1
  %307 = trunc nuw nsw i64 %indvars.iv343 to i32
  %308 = add nsw i32 %306, %307
  %309 = sext i32 %308 to i64
  %310 = getelementptr inbounds [153 x %struct.BigInt], ptr @a, i64 0, i64 %309
  br i1 %.0177.lcssa, label %322, label %311

311:                                              ; preds = %304
  %312 = getelementptr inbounds [51 x i8], ptr @ban, i64 0, i64 %indvars.iv343
  %313 = load i8, ptr %312, align 1, !tbaa !19, !range !39, !noundef !40
  %314 = trunc nuw i8 %313 to i1
  br i1 %314, label %322, label %315

315:                                              ; preds = %311
  %316 = load i32, ptr %310, align 16, !tbaa !25
  %317 = icmp sgt i32 %316, 1
  br i1 %317, label %322, label %318

318:                                              ; preds = %315
  %319 = getelementptr inbounds i8, ptr %310, i64 8
  %320 = load i64, ptr %319, align 8, !tbaa !27
  %321 = icmp sgt i64 %320, 1
  br i1 %321, label %322, label %324

322:                                              ; preds = %318, %315, %311, %304
  %323 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.5)
  br label %395

324:                                              ; preds = %318
  %325 = getelementptr inbounds [153 x %"class.std::vector"], ptr @f, i64 0, i64 %309
  call void @llvm.memset.p0.i64(ptr nonnull align 16 @_ZZ4mainE1g, i8 0, i64 %291, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  %326 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %325) #7
  store ptr %326, ptr %14, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  %327 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %325) #7
  store ptr %327, ptr %15, align 8
  %328 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  br i1 %328, label %.lr.ph267, label %._crit_edge268

._crit_edge268:                                   ; preds = %._crit_edge265, %324
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  %.promoted = load i8, ptr %312, align 1, !tbaa !19
  %329 = trunc nuw i8 %.promoted to i1
  %.not195269 = or i1 %261, %329
  br i1 %.not195269, label %356, label %.lr.ph272

.lr.ph267:                                        ; preds = %324, %._crit_edge265
  %330 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %331 = load i32, ptr %330, align 4, !tbaa !17
  %332 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %333 = getelementptr inbounds i8, ptr %332, i64 4
  %334 = load i32, ptr %333, align 4, !tbaa !21
  %335 = sext i32 %331 to i64
  %336 = getelementptr inbounds [1581 x [33 x i32]], ptr @e, i64 0, i64 %335
  %337 = load i32, ptr %336, align 4, !tbaa !5
  %.not197261 = icmp slt i32 %337, 1
  br i1 %.not197261, label %._crit_edge265, label %.lr.ph264.preheader

.lr.ph264.preheader:                              ; preds = %.lr.ph267
  %338 = add nuw i32 %337, 1
  %wide.trip.count334 = zext i32 %338 to i64
  br label %.lr.ph264

._crit_edge265:                                   ; preds = %355, %.lr.ph267
  %339 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  %340 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %325) #7
  store ptr %340, ptr %15, align 8
  %341 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  br i1 %341, label %.lr.ph267, label %._crit_edge268, !llvm.loop !41

.lr.ph264:                                        ; preds = %.lr.ph264.preheader, %355
  %indvars.iv331 = phi i64 [ 1, %.lr.ph264.preheader ], [ %indvars.iv.next332, %355 ]
  %342 = getelementptr inbounds [1581 x [33 x i32]], ptr @e, i64 0, i64 %335, i64 %indvars.iv331
  %343 = load i32, ptr %342, align 4, !tbaa !5
  %344 = sext i32 %343 to i64
  %345 = getelementptr inbounds [1581 x [1581 x %"struct.std::pair"]], ptr @ctr, i64 0, i64 %335, i64 %344
  %346 = load i32, ptr %345, align 8, !tbaa !17
  %347 = mul nsw i32 %346, %334
  %348 = getelementptr inbounds [1581 x %"struct.std::pair"], ptr @_ZZ4mainE1g, i64 0, i64 %344
  %349 = getelementptr inbounds i8, ptr %348, i64 4
  %350 = load i32, ptr %349, align 4, !tbaa !21
  %.not198 = icmp eq i32 %350, 0
  br i1 %.not198, label %.thread357, label %351

.thread357:                                       ; preds = %.lr.ph264
  store i32 %347, ptr %348, align 8, !tbaa !17
  br label %353

351:                                              ; preds = %.lr.ph264
  %.pre347 = load i32, ptr %348, align 8, !tbaa !17
  %352 = icmp eq i32 %.pre347, %347
  br i1 %352, label %353, label %355

353:                                              ; preds = %.thread357, %351
  %354 = add nsw i32 %350, 1
  store i32 %354, ptr %349, align 4, !tbaa !21
  br label %355

355:                                              ; preds = %353, %351
  %indvars.iv.next332 = add nuw nsw i64 %indvars.iv331, 1
  %exitcond335.not = icmp eq i64 %indvars.iv.next332, %wide.trip.count334
  br i1 %exitcond335.not, label %._crit_edge265, label %.lr.ph264, !llvm.loop !42

._crit_edge273:                                   ; preds = %365
  store i8 %368, ptr %312, align 1, !tbaa !19
  br i1 %369, label %371, label %373

356:                                              ; preds = %._crit_edge268
  br i1 %329, label %371, label %373

.lr.ph272:                                        ; preds = %._crit_edge268, %365
  %indvars.iv336 = phi i64 [ %indvars.iv.next337, %365 ], [ 0, %._crit_edge268 ]
  %357 = phi i8 [ %368, %365 ], [ %.promoted, %._crit_edge268 ]
  %358 = getelementptr inbounds [1581 x %"struct.std::pair"], ptr @_ZZ4mainE1g, i64 0, i64 %indvars.iv336, i32 1
  %359 = load i32, ptr %358, align 4, !tbaa !21
  %360 = icmp sgt i32 %359, 0
  br i1 %360, label %361, label %365

361:                                              ; preds = %.lr.ph272
  %362 = getelementptr inbounds [1581 x i32], ptr @deg, i64 0, i64 %indvars.iv336
  %363 = load i32, ptr %362, align 4, !tbaa !5
  %364 = icmp ne i32 %359, %363
  br label %365

365:                                              ; preds = %361, %.lr.ph272
  %366 = phi i1 [ false, %.lr.ph272 ], [ %364, %361 ]
  %367 = zext i1 %366 to i8
  %368 = or i8 %357, %367
  %indvars.iv.next337 = add nuw nsw i64 %indvars.iv336, 1
  %369 = trunc nuw i8 %368 to i1
  %370 = icmp sge i64 %indvars.iv.next337, %293
  %.not195 = select i1 %369, i1 true, i1 %370
  br i1 %.not195, label %._crit_edge273, label %.lr.ph272, !llvm.loop !43

371:                                              ; preds = %._crit_edge273, %356
  %372 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.5)
  br label %395

373:                                              ; preds = %._crit_edge273, %356
  %374 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #7
  store i32 1, ptr %16, align 4, !tbaa !5
  br i1 %292, label %.lr.ph281, label %._crit_edge282.thread

._crit_edge282:                                   ; preds = %.loopexit
  %.pre350 = load i32, ptr %16, align 4, !tbaa !5
  %375 = icmp sgt i32 %.pre350, 1
  br i1 %375, label %394, label %._crit_edge282.thread

.lr.ph281:                                        ; preds = %373, %.loopexit
  %indvars.iv338 = phi i64 [ %indvars.iv.next339, %.loopexit ], [ 0, %373 ]
  %376 = getelementptr inbounds [1581 x %"struct.std::pair"], ptr @_ZZ4mainE1g, i64 0, i64 %indvars.iv338
  %377 = load i32, ptr %376, align 8, !tbaa !17
  %.not196 = icmp eq i32 %377, 0
  br i1 %.not196, label %.loopexit, label %378

378:                                              ; preds = %.lr.ph281
  %379 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @rht, i64 noundef %indvars.iv338) #7
  %380 = load i32, ptr %379, align 4, !tbaa !17
  %381 = sdiv i32 100004, %380
  %382 = load i32, ptr %376, align 8, !tbaa !17
  %383 = icmp sgt i32 %382, 0
  br i1 %383, label %.lr.ph278.preheader, label %.loopexit

.lr.ph278.preheader:                              ; preds = %378
  %.pre348 = load i32, ptr %16, align 4, !tbaa !5
  br label %.lr.ph278

.lr.ph278:                                        ; preds = %.lr.ph278.preheader, %388
  %384 = phi i32 [ %389, %388 ], [ %382, %.lr.ph278.preheader ]
  %385 = phi i32 [ %391, %388 ], [ %.pre348, %.lr.ph278.preheader ]
  %.0276 = phi i32 [ %392, %388 ], [ 0, %.lr.ph278.preheader ]
  %386 = icmp sgt i32 %385, %381
  br i1 %386, label %387, label %388

387:                                              ; preds = %.lr.ph278
  call void @_ZN6BigIntmLERKi(ptr noundef nonnull align 8 dereferenceable(256) %310, ptr noundef nonnull align 4 dereferenceable(4) %16)
  %.pre349 = load i32, ptr %376, align 8, !tbaa !17
  br label %388

388:                                              ; preds = %387, %.lr.ph278
  %389 = phi i32 [ %.pre349, %387 ], [ %384, %.lr.ph278 ]
  %390 = phi i32 [ 1, %387 ], [ %385, %.lr.ph278 ]
  %391 = mul nsw i32 %390, %380
  store i32 %391, ptr %16, align 4, !tbaa !5
  %392 = add nuw nsw i32 %.0276, 1
  %393 = icmp slt i32 %392, %389
  br i1 %393, label %.lr.ph278, label %.loopexit, !llvm.loop !44

.loopexit:                                        ; preds = %388, %378, %.lr.ph281
  %indvars.iv.next339 = add nuw nsw i64 %indvars.iv338, 1
  %exitcond342.not = icmp eq i64 %indvars.iv.next339, %wide.trip.count341
  br i1 %exitcond342.not, label %._crit_edge282, label %.lr.ph281, !llvm.loop !45

394:                                              ; preds = %._crit_edge282
  call void @_ZN6BigIntmLERKi(ptr noundef nonnull align 8 dereferenceable(256) %310, ptr noundef nonnull align 4 dereferenceable(4) %16)
  br label %._crit_edge282.thread

._crit_edge282.thread:                            ; preds = %373, %394, %._crit_edge282
  call void @_ZNK6BigInt5writeEc(ptr noundef nonnull align 8 dereferenceable(256) %310, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  br label %395

395:                                              ; preds = %371, %._crit_edge282.thread, %322
  %indvars.iv.next344 = add nuw nsw i64 %indvars.iv343, 1
  %396 = load i32, ptr @q, align 4, !tbaa !5
  %397 = sext i32 %396 to i64
  %398 = icmp slt i64 %indvars.iv.next344, %397
  br i1 %398, label %304, label %.loopexit209, !llvm.loop !46

._crit_edge289:                                   ; preds = %.loopexit209, %17
  ret i32 0
}

; 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: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6BigInt4readEv(ptr noundef nonnull align 8 dereferenceable(256)) 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 void @_ZNSt6vectorISt4pairIiiESaIS1_EE4swapERS3_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN6BigInt3dotEPKi(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorISt4pairIiiESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i32 } @_ZSt9make_pairImiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2ImiTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS3_S4_EEclsr6_PCCFPIS3_S4_EE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS_IS3_S4_E(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(12)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6BigIntdVERKi(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

; 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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6BigIntmLERKi(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK6BigInt5writeEc(ptr noundef nonnull align 8 dereferenceable(256), i8 noundef signext) local_unnamed_addr #4 align 2

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 norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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 = !{!18, !6, i64 0}
!18 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!19 = !{!20, !20, i64 0}
!20 = !{!"bool", !7, i64 0}
!21 = !{!18, !6, i64 4}
!22 = !{!23, !23, i64 0}
!23 = !{!"long", !7, i64 0}
!24 = distinct !{!24, !10}
!25 = !{!26, !6, i64 0}
!26 = !{!"_ZTS6BigInt", !6, i64 0, !7, i64 8}
!27 = !{!28, !28, i64 0}
!28 = !{!"long long", !7, i64 0}
!29 = distinct !{!29, !10}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.unroll.disable"}
!32 = distinct !{!32, !10}
!33 = distinct !{!33, !10}
!34 = distinct !{!34, !10}
!35 = distinct !{!35, !10}
!36 = distinct !{!36, !10}
!37 = distinct !{!37, !10}
!38 = distinct !{!38, !10}
!39 = !{i8 0, i8 2}
!40 = !{}
!41 = distinct !{!41, !10}
!42 = distinct !{!42, !10}
!43 = distinct !{!43, !10}
!44 = distinct !{!44, !10}
!45 = distinct !{!45, !10}
!46 = distinct !{!46, !10}


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