; LLVM IR from kazunetakahashi/atcoder :: 2018/0714_AGC026 (D)

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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@N = external dso_local global i32, align 4
@h = external dso_local global [1010 x i64], align 16
@DP = external dso_local global [1010 x [2 x i64]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z5powerxx(i64 noundef, i64 noundef) #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @N)
  store i64 0, ptr @h, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 1, ptr %2, align 4, !tbaa !9
  br label %11

11:                                               ; preds = %21, %0
  %12 = load i32, ptr %2, align 4, !tbaa !9
  %13 = load i32, ptr @N, align 4, !tbaa !9
  %14 = icmp sle i32 %12, %13
  br i1 %14, label %16, label %15

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

16:                                               ; preds = %11
  %17 = load i32, ptr %2, align 4, !tbaa !9
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [1010 x i64], ptr @h, i64 0, i64 %18
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %19)
  br label %21

21:                                               ; preds = %16
  %22 = load i32, ptr %2, align 4, !tbaa !9
  %23 = add nsw i32 %22, 1
  store i32 %23, ptr %2, align 4, !tbaa !9
  br label %11, !llvm.loop !11

24:                                               ; preds = %15
  store i64 0, ptr @DP, align 16, !tbaa !5
  store i64 1, ptr getelementptr inbounds ([2 x i64], ptr @DP, i64 0, i64 1), align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %25

25:                                               ; preds = %339, %24
  %26 = load i32, ptr %3, align 4, !tbaa !9
  %27 = load i32, ptr @N, align 4, !tbaa !9
  %28 = icmp slt i32 %26, %27
  br i1 %28, label %30, label %29

29:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %342

30:                                               ; preds = %25
  %31 = load i32, ptr %3, align 4, !tbaa !9
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [1010 x i64], ptr @h, i64 0, i64 %32
  %34 = load i64, ptr %33, align 8, !tbaa !5
  %35 = load i32, ptr %3, align 4, !tbaa !9
  %36 = add nsw i32 %35, 1
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [1010 x i64], ptr @h, i64 0, i64 %37
  %39 = load i64, ptr %38, align 8, !tbaa !5
  %40 = icmp slt i64 %34, %39
  br i1 %40, label %41, label %230

41:                                               ; preds = %30
  %42 = load i32, ptr %3, align 4, !tbaa !9
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [1010 x i64], ptr @h, i64 0, i64 %43
  %45 = load i64, ptr %44, align 8, !tbaa !5
  %46 = icmp sge i64 %45, 2
  br i1 %46, label %47, label %88

47:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %48 = load i32, ptr %3, align 4, !tbaa !9
  %49 = add nsw i32 %48, 1
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [1010 x i64], ptr @h, i64 0, i64 %50
  %52 = load i64, ptr %51, align 8, !tbaa !5
  %53 = load i32, ptr %3, align 4, !tbaa !9
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [1010 x i64], ptr @h, i64 0, i64 %54
  %56 = load i64, ptr %55, align 8, !tbaa !5
  %57 = sub nsw i64 %52, %56
  store i64 %57, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %58 = load i64, ptr %4, align 8, !tbaa !5
  %59 = call noundef i64 @_Z5powerxx(i64 noundef 2, i64 noundef %58)
  store i64 %59, ptr %5, align 8, !tbaa !5
  %60 = load i32, ptr %3, align 4, !tbaa !9
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %61
  %63 = getelementptr inbounds [2 x i64], ptr %62, i64 0, i64 1
  %64 = load i64, ptr %63, align 8, !tbaa !5
  %65 = mul nsw i64 2, %64
  %66 = srem i64 %65, 1000000007
  %67 = load i64, ptr %5, align 8, !tbaa !5
  %68 = mul nsw i64 %66, %67
  %69 = srem i64 %68, 1000000007
  %70 = load i32, ptr %3, align 4, !tbaa !9
  %71 = add nsw i32 %70, 1
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %72
  %74 = getelementptr inbounds [2 x i64], ptr %73, i64 0, i64 1
  store i64 %69, ptr %74, align 8, !tbaa !5
  %75 = load i32, ptr %3, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %76
  %78 = getelementptr inbounds [2 x i64], ptr %77, i64 0, i64 0
  %79 = load i64, ptr %78, align 16, !tbaa !5
  %80 = load i64, ptr %5, align 8, !tbaa !5
  %81 = mul nsw i64 %79, %80
  %82 = srem i64 %81, 1000000007
  %83 = load i32, ptr %3, align 4, !tbaa !9
  %84 = add nsw i32 %83, 1
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %85
  %87 = getelementptr inbounds [2 x i64], ptr %86, i64 0, i64 0
  store i64 %82, ptr %87, align 16, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  br label %229

88:                                               ; preds = %41
  %89 = load i32, ptr %3, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [1010 x i64], ptr @h, i64 0, i64 %90
  %92 = load i64, ptr %91, align 8, !tbaa !5
  %93 = icmp eq i64 %92, 1
  br i1 %93, label %94, label %129

94:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %95 = load i32, ptr %3, align 4, !tbaa !9
  %96 = add nsw i32 %95, 1
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [1010 x i64], ptr @h, i64 0, i64 %97
  %99 = load i64, ptr %98, align 8, !tbaa !5
  %100 = sub nsw i64 %99, 2
  store i64 %100, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %101 = load i64, ptr %6, align 8, !tbaa !5
  %102 = call noundef i64 @_Z5powerxx(i64 noundef 2, i64 noundef %101)
  store i64 %102, ptr %7, align 8, !tbaa !5
  %103 = load i32, ptr %3, align 4, !tbaa !9
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %104
  %106 = getelementptr inbounds [2 x i64], ptr %105, i64 0, i64 1
  %107 = load i64, ptr %106, align 8, !tbaa !5
  %108 = mul nsw i64 2, %107
  %109 = srem i64 %108, 1000000007
  %110 = load i64, ptr %7, align 8, !tbaa !5
  %111 = mul nsw i64 %109, %110
  %112 = srem i64 %111, 1000000007
  %113 = load i32, ptr %3, align 4, !tbaa !9
  %114 = add nsw i32 %113, 1
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %115
  %117 = getelementptr inbounds [2 x i64], ptr %116, i64 0, i64 1
  store i64 %112, ptr %117, align 8, !tbaa !5
  %118 = load i32, ptr %3, align 4, !tbaa !9
  %119 = add nsw i32 %118, 1
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %120
  %122 = getelementptr inbounds [2 x i64], ptr %121, i64 0, i64 1
  %123 = load i64, ptr %122, align 8, !tbaa !5
  %124 = load i32, ptr %3, align 4, !tbaa !9
  %125 = add nsw i32 %124, 1
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %126
  %128 = getelementptr inbounds [2 x i64], ptr %127, i64 0, i64 0
  store i64 %123, ptr %128, align 16, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %228

129:                                              ; preds = %88
  %130 = load i32, ptr %3, align 4, !tbaa !9
  %131 = add nsw i32 %130, 1
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [1010 x i64], ptr @h, i64 0, i64 %132
  %134 = load i64, ptr %133, align 8, !tbaa !5
  %135 = icmp sge i64 %134, 2
  br i1 %135, label %136, label %171

136:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %137 = load i32, ptr %3, align 4, !tbaa !9
  %138 = add nsw i32 %137, 1
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [1010 x i64], ptr @h, i64 0, i64 %139
  %141 = load i64, ptr %140, align 8, !tbaa !5
  %142 = sub nsw i64 %141, 2
  store i64 %142, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %143 = load i64, ptr %8, align 8, !tbaa !5
  %144 = call noundef i64 @_Z5powerxx(i64 noundef 2, i64 noundef %143)
  store i64 %144, ptr %9, align 8, !tbaa !5
  %145 = load i32, ptr %3, align 4, !tbaa !9
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %146
  %148 = getelementptr inbounds [2 x i64], ptr %147, i64 0, i64 1
  %149 = load i64, ptr %148, align 8, !tbaa !5
  %150 = mul nsw i64 2, %149
  %151 = srem i64 %150, 1000000007
  %152 = load i64, ptr %9, align 8, !tbaa !5
  %153 = mul nsw i64 %151, %152
  %154 = srem i64 %153, 1000000007
  %155 = load i32, ptr %3, align 4, !tbaa !9
  %156 = add nsw i32 %155, 1
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %157
  %159 = getelementptr inbounds [2 x i64], ptr %158, i64 0, i64 1
  store i64 %154, ptr %159, align 8, !tbaa !5
  %160 = load i32, ptr %3, align 4, !tbaa !9
  %161 = add nsw i32 %160, 1
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %162
  %164 = getelementptr inbounds [2 x i64], ptr %163, i64 0, i64 1
  %165 = load i64, ptr %164, align 8, !tbaa !5
  %166 = load i32, ptr %3, align 4, !tbaa !9
  %167 = add nsw i32 %166, 1
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %168
  %170 = getelementptr inbounds [2 x i64], ptr %169, i64 0, i64 0
  store i64 %165, ptr %170, align 16, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %227

171:                                              ; preds = %129
  %172 = load i32, ptr %3, align 4, !tbaa !9
  %173 = add nsw i32 %172, 1
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [1010 x i64], ptr @h, i64 0, i64 %174
  %176 = load i64, ptr %175, align 8, !tbaa !5
  %177 = icmp eq i64 %176, 1
  br i1 %177, label %178, label %203

178:                                              ; preds = %171
  %179 = load i32, ptr %3, align 4, !tbaa !9
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %180
  %182 = getelementptr inbounds [2 x i64], ptr %181, i64 0, i64 1
  %183 = load i64, ptr %182, align 8, !tbaa !5
  %184 = load i32, ptr %3, align 4, !tbaa !9
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %185
  %187 = getelementptr inbounds [2 x i64], ptr %186, i64 0, i64 0
  %188 = load i64, ptr %187, align 16, !tbaa !5
  %189 = add nsw i64 %183, %188
  %190 = srem i64 %189, 1000000007
  %191 = mul nsw i64 %190, 2
  %192 = srem i64 %191, 1000000007
  %193 = load i32, ptr %3, align 4, !tbaa !9
  %194 = add nsw i32 %193, 1
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %195
  %197 = getelementptr inbounds [2 x i64], ptr %196, i64 0, i64 1
  store i64 %192, ptr %197, align 8, !tbaa !5
  %198 = load i32, ptr %3, align 4, !tbaa !9
  %199 = add nsw i32 %198, 1
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %200
  %202 = getelementptr inbounds [2 x i64], ptr %201, i64 0, i64 0
  store i64 0, ptr %202, align 16, !tbaa !5
  br label %226

203:                                              ; preds = %171
  %204 = load i32, ptr %3, align 4, !tbaa !9
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %205
  %207 = getelementptr inbounds [2 x i64], ptr %206, i64 0, i64 1
  %208 = load i64, ptr %207, align 8, !tbaa !5
  %209 = load i32, ptr %3, align 4, !tbaa !9
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %210
  %212 = getelementptr inbounds [2 x i64], ptr %211, i64 0, i64 0
  %213 = load i64, ptr %212, align 16, !tbaa !5
  %214 = add nsw i64 %208, %213
  %215 = srem i64 %214, 1000000007
  %216 = load i32, ptr %3, align 4, !tbaa !9
  %217 = add nsw i32 %216, 1
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %218
  %220 = getelementptr inbounds [2 x i64], ptr %219, i64 0, i64 1
  store i64 %215, ptr %220, align 8, !tbaa !5
  %221 = load i32, ptr %3, align 4, !tbaa !9
  %222 = add nsw i32 %221, 1
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %223
  %225 = getelementptr inbounds [2 x i64], ptr %224, i64 0, i64 0
  store i64 0, ptr %225, align 16, !tbaa !5
  br label %226

226:                                              ; preds = %203, %178
  br label %227

227:                                              ; preds = %226, %136
  br label %228

228:                                              ; preds = %227, %94
  br label %229

229:                                              ; preds = %228, %47
  br label %317

230:                                              ; preds = %30
  %231 = load i32, ptr %3, align 4, !tbaa !9
  %232 = add nsw i32 %231, 1
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds [1010 x i64], ptr @h, i64 0, i64 %233
  %235 = load i64, ptr %234, align 8, !tbaa !5
  %236 = icmp sge i64 %235, 2
  br i1 %236, label %237, label %260

237:                                              ; preds = %230
  %238 = load i32, ptr %3, align 4, !tbaa !9
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %239
  %241 = getelementptr inbounds [2 x i64], ptr %240, i64 0, i64 1
  %242 = load i64, ptr %241, align 8, !tbaa !5
  %243 = mul nsw i64 2, %242
  %244 = srem i64 %243, 1000000007
  %245 = load i32, ptr %3, align 4, !tbaa !9
  %246 = add nsw i32 %245, 1
  %247 = sext i32 %246 to i64
  %248 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %247
  %249 = getelementptr inbounds [2 x i64], ptr %248, i64 0, i64 1
  store i64 %244, ptr %249, align 8, !tbaa !5
  %250 = load i32, ptr %3, align 4, !tbaa !9
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %251
  %253 = getelementptr inbounds [2 x i64], ptr %252, i64 0, i64 0
  %254 = load i64, ptr %253, align 16, !tbaa !5
  %255 = load i32, ptr %3, align 4, !tbaa !9
  %256 = add nsw i32 %255, 1
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %257
  %259 = getelementptr inbounds [2 x i64], ptr %258, i64 0, i64 0
  store i64 %254, ptr %259, align 16, !tbaa !5
  br label %316

260:                                              ; preds = %230
  %261 = load i32, ptr %3, align 4, !tbaa !9
  %262 = add nsw i32 %261, 1
  %263 = sext i32 %262 to i64
  %264 = getelementptr inbounds [1010 x i64], ptr @h, i64 0, i64 %263
  %265 = load i64, ptr %264, align 8, !tbaa !5
  %266 = icmp eq i64 %265, 1
  br i1 %266, label %267, label %292

267:                                              ; preds = %260
  %268 = load i32, ptr %3, align 4, !tbaa !9
  %269 = sext i32 %268 to i64
  %270 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %269
  %271 = getelementptr inbounds [2 x i64], ptr %270, i64 0, i64 1
  %272 = load i64, ptr %271, align 8, !tbaa !5
  %273 = load i32, ptr %3, align 4, !tbaa !9
  %274 = sext i32 %273 to i64
  %275 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %274
  %276 = getelementptr inbounds [2 x i64], ptr %275, i64 0, i64 0
  %277 = load i64, ptr %276, align 16, !tbaa !5
  %278 = add nsw i64 %272, %277
  %279 = srem i64 %278, 1000000007
  %280 = mul nsw i64 %279, 2
  %281 = srem i64 %280, 1000000007
  %282 = load i32, ptr %3, align 4, !tbaa !9
  %283 = add nsw i32 %282, 1
  %284 = sext i32 %283 to i64
  %285 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %284
  %286 = getelementptr inbounds [2 x i64], ptr %285, i64 0, i64 1
  store i64 %281, ptr %286, align 8, !tbaa !5
  %287 = load i32, ptr %3, align 4, !tbaa !9
  %288 = add nsw i32 %287, 1
  %289 = sext i32 %288 to i64
  %290 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %289
  %291 = getelementptr inbounds [2 x i64], ptr %290, i64 0, i64 0
  store i64 0, ptr %291, align 16, !tbaa !5
  br label %315

292:                                              ; preds = %260
  %293 = load i32, ptr %3, align 4, !tbaa !9
  %294 = sext i32 %293 to i64
  %295 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %294
  %296 = getelementptr inbounds [2 x i64], ptr %295, i64 0, i64 1
  %297 = load i64, ptr %296, align 8, !tbaa !5
  %298 = load i32, ptr %3, align 4, !tbaa !9
  %299 = sext i32 %298 to i64
  %300 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %299
  %301 = getelementptr inbounds [2 x i64], ptr %300, i64 0, i64 0
  %302 = load i64, ptr %301, align 16, !tbaa !5
  %303 = add nsw i64 %297, %302
  %304 = srem i64 %303, 1000000007
  %305 = load i32, ptr %3, align 4, !tbaa !9
  %306 = add nsw i32 %305, 1
  %307 = sext i32 %306 to i64
  %308 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %307
  %309 = getelementptr inbounds [2 x i64], ptr %308, i64 0, i64 1
  store i64 %304, ptr %309, align 8, !tbaa !5
  %310 = load i32, ptr %3, align 4, !tbaa !9
  %311 = add nsw i32 %310, 1
  %312 = sext i32 %311 to i64
  %313 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %312
  %314 = getelementptr inbounds [2 x i64], ptr %313, i64 0, i64 0
  store i64 0, ptr %314, align 16, !tbaa !5
  br label %315

315:                                              ; preds = %292, %267
  br label %316

316:                                              ; preds = %315, %237
  br label %317

317:                                              ; preds = %316, %229
  %318 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str)
  %319 = load i32, ptr %3, align 4, !tbaa !9
  %320 = add nsw i32 %319, 1
  %321 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %318, i32 noundef %320)
  %322 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %321, ptr noundef @.str.1)
  %323 = load i32, ptr %3, align 4, !tbaa !9
  %324 = add nsw i32 %323, 1
  %325 = sext i32 %324 to i64
  %326 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %325
  %327 = getelementptr inbounds [2 x i64], ptr %326, i64 0, i64 0
  %328 = load i64, ptr %327, align 16, !tbaa !5
  %329 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %322, i64 noundef %328)
  %330 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %329, ptr noundef @.str.2)
  %331 = load i32, ptr %3, align 4, !tbaa !9
  %332 = add nsw i32 %331, 1
  %333 = sext i32 %332 to i64
  %334 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %333
  %335 = getelementptr inbounds [2 x i64], ptr %334, i64 0, i64 1
  %336 = load i64, ptr %335, align 8, !tbaa !5
  %337 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %330, i64 noundef %336)
  %338 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %337, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %339

339:                                              ; preds = %317
  %340 = load i32, ptr %3, align 4, !tbaa !9
  %341 = add nsw i32 %340, 1
  store i32 %341, ptr %3, align 4, !tbaa !9
  br label %25, !llvm.loop !13

342:                                              ; preds = %29
  %343 = load i32, ptr @N, align 4, !tbaa !9
  %344 = sext i32 %343 to i64
  %345 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %344
  %346 = getelementptr inbounds [2 x i64], ptr %345, i64 0, i64 1
  %347 = load i64, ptr %346, align 8, !tbaa !5
  %348 = load i32, ptr @N, align 4, !tbaa !9
  %349 = sext i32 %348 to i64
  %350 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %349
  %351 = getelementptr inbounds [2 x i64], ptr %350, i64 0, i64 0
  %352 = load i64, ptr %351, align 16, !tbaa !5
  %353 = add nsw i64 %347, %352
  %354 = srem i64 %353, 1000000007
  %355 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %354)
  %356 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %355, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %357 = load i32, ptr %1, align 4
  ret i32 %357
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #3

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #4

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@N = external dso_local global i32, align 4
@h = external dso_local global [1010 x i64], align 16
@DP = external dso_local local_unnamed_addr global [1010 x [2 x i64]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z5powerxx(i64 noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @N)
  store i64 0, ptr @h, align 16, !tbaa !5
  %2 = load i32, ptr @N, align 4, !tbaa !9
  %.not64 = icmp slt i32 %2, 1
  br i1 %.not64, label %._crit_edge.thread, label %.lr.ph

._crit_edge.thread:                               ; preds = %0
  store i64 0, ptr @DP, align 16, !tbaa !5
  store i64 1, ptr getelementptr inbounds (i8, ptr @DP, i64 8), align 8, !tbaa !5
  br label %._crit_edge.._crit_edge69_crit_edge

._crit_edge:                                      ; preds = %.lr.ph
  store i64 0, ptr @DP, align 16, !tbaa !5
  store i64 1, ptr getelementptr inbounds (i8, ptr @DP, i64 8), align 8, !tbaa !5
  %3 = icmp sgt i32 %7, 0
  br i1 %3, label %.lr.ph68, label %._crit_edge.._crit_edge69_crit_edge

._crit_edge.._crit_edge69_crit_edge:              ; preds = %._crit_edge.thread, %._crit_edge
  %4 = phi i32 [ %2, %._crit_edge.thread ], [ %7, %._crit_edge ]
  %.pre = sext i32 %4 to i64
  br label %._crit_edge69

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %5 = getelementptr inbounds [1010 x i64], ptr @h, i64 0, i64 %indvars.iv
  %6 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %7 = load i32, ptr @N, align 4, !tbaa !9
  %8 = sext i32 %7 to i64
  %.not.not = icmp slt i64 %indvars.iv, %8
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge69:                                    ; preds = %108, %._crit_edge.._crit_edge69_crit_edge
  %.pre-phi = phi i64 [ %.pre, %._crit_edge.._crit_edge69_crit_edge ], [ %122, %108 ]
  %9 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %.pre-phi
  %10 = getelementptr inbounds i8, ptr %9, i64 8
  %11 = load i64, ptr %10, align 8, !tbaa !5
  %12 = load i64, ptr %9, align 16, !tbaa !5
  %13 = add nsw i64 %12, %11
  %14 = srem i64 %13, 1000000007
  %15 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %14)
  %16 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0

.lr.ph68:                                         ; preds = %._crit_edge, %108
  %indvars.iv72 = phi i64 [ %indvars.iv.next73, %108 ], [ 0, %._crit_edge ]
  %17 = getelementptr inbounds [1010 x i64], ptr @h, i64 0, i64 %indvars.iv72
  %18 = load i64, ptr %17, align 8, !tbaa !5
  %indvars.iv.next73 = add nuw nsw i64 %indvars.iv72, 1
  %19 = getelementptr inbounds [1010 x i64], ptr @h, i64 0, i64 %indvars.iv.next73
  %20 = load i64, ptr %19, align 8, !tbaa !5
  %21 = icmp slt i64 %18, %20
  br i1 %21, label %22, label %81

22:                                               ; preds = %.lr.ph68
  %23 = icmp sgt i64 %18, 1
  br i1 %23, label %24, label %39

24:                                               ; preds = %22
  %25 = sub nsw i64 %20, %18
  %26 = tail call noundef i64 @_Z5powerxx(i64 noundef 2, i64 noundef %25)
  %27 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %indvars.iv72
  %28 = getelementptr inbounds i8, ptr %27, i64 8
  %29 = load i64, ptr %28, align 8, !tbaa !5
  %30 = shl nsw i64 %29, 1
  %31 = srem i64 %30, 1000000007
  %32 = mul nsw i64 %31, %26
  %33 = srem i64 %32, 1000000007
  %34 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %indvars.iv.next73
  %35 = getelementptr inbounds i8, ptr %34, i64 8
  store i64 %33, ptr %35, align 8, !tbaa !5
  %36 = load i64, ptr %27, align 16, !tbaa !5
  %37 = mul nsw i64 %36, %26
  %38 = srem i64 %37, 1000000007
  store i64 %38, ptr %34, align 16, !tbaa !5
  br label %108

39:                                               ; preds = %22
  %40 = icmp eq i64 %18, 1
  br i1 %40, label %41, label %52

41:                                               ; preds = %39
  %42 = add nsw i64 %20, -2
  %43 = tail call noundef i64 @_Z5powerxx(i64 noundef 2, i64 noundef %42)
  %44 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %indvars.iv72, i64 1
  %45 = load i64, ptr %44, align 8, !tbaa !5
  %46 = shl nsw i64 %45, 1
  %47 = srem i64 %46, 1000000007
  %48 = mul nsw i64 %47, %43
  %49 = srem i64 %48, 1000000007
  %50 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %indvars.iv.next73
  %51 = getelementptr inbounds i8, ptr %50, i64 8
  store i64 %49, ptr %51, align 8, !tbaa !5
  store i64 %49, ptr %50, align 16, !tbaa !5
  br label %108

52:                                               ; preds = %39
  %53 = icmp sgt i64 %20, 1
  br i1 %53, label %54, label %65

54:                                               ; preds = %52
  %55 = add nsw i64 %20, -2
  %56 = tail call noundef i64 @_Z5powerxx(i64 noundef 2, i64 noundef %55)
  %57 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %indvars.iv72, i64 1
  %58 = load i64, ptr %57, align 8, !tbaa !5
  %59 = shl nsw i64 %58, 1
  %60 = srem i64 %59, 1000000007
  %61 = mul nsw i64 %60, %56
  %62 = srem i64 %61, 1000000007
  %63 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %indvars.iv.next73
  %64 = getelementptr inbounds i8, ptr %63, i64 8
  store i64 %62, ptr %64, align 8, !tbaa !5
  store i64 %62, ptr %63, align 16, !tbaa !5
  br label %108

65:                                               ; preds = %52
  %66 = icmp eq i64 %20, 1
  %67 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %indvars.iv72
  %68 = getelementptr inbounds i8, ptr %67, i64 8
  %69 = load i64, ptr %68, align 8, !tbaa !5
  %70 = load i64, ptr %67, align 16, !tbaa !5
  %71 = add nsw i64 %70, %69
  %72 = srem i64 %71, 1000000007
  br i1 %66, label %73, label %78

73:                                               ; preds = %65
  %74 = shl nsw i64 %72, 1
  %75 = srem i64 %74, 1000000007
  %76 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %indvars.iv.next73
  %77 = getelementptr inbounds i8, ptr %76, i64 8
  store i64 %75, ptr %77, align 8, !tbaa !5
  store i64 0, ptr %76, align 16, !tbaa !5
  br label %108

78:                                               ; preds = %65
  %79 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %indvars.iv.next73
  %80 = getelementptr inbounds i8, ptr %79, i64 8
  store i64 %72, ptr %80, align 8, !tbaa !5
  store i64 0, ptr %79, align 16, !tbaa !5
  br label %108

81:                                               ; preds = %.lr.ph68
  %82 = icmp sgt i64 %20, 1
  br i1 %82, label %83, label %92

83:                                               ; preds = %81
  %84 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %indvars.iv72
  %85 = getelementptr inbounds i8, ptr %84, i64 8
  %86 = load i64, ptr %85, align 8, !tbaa !5
  %87 = shl nsw i64 %86, 1
  %88 = srem i64 %87, 1000000007
  %89 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %indvars.iv.next73
  %90 = getelementptr inbounds i8, ptr %89, i64 8
  store i64 %88, ptr %90, align 8, !tbaa !5
  %91 = load i64, ptr %84, align 16, !tbaa !5
  store i64 %91, ptr %89, align 16, !tbaa !5
  br label %108

92:                                               ; preds = %81
  %93 = icmp eq i64 %20, 1
  %94 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %indvars.iv72
  %95 = getelementptr inbounds i8, ptr %94, i64 8
  %96 = load i64, ptr %95, align 8, !tbaa !5
  %97 = load i64, ptr %94, align 16, !tbaa !5
  %98 = add nsw i64 %97, %96
  %99 = srem i64 %98, 1000000007
  br i1 %93, label %100, label %105

100:                                              ; preds = %92
  %101 = shl nsw i64 %99, 1
  %102 = srem i64 %101, 1000000007
  %103 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %indvars.iv.next73
  %104 = getelementptr inbounds i8, ptr %103, i64 8
  store i64 %102, ptr %104, align 8, !tbaa !5
  store i64 0, ptr %103, align 16, !tbaa !5
  br label %108

105:                                              ; preds = %92
  %106 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %indvars.iv.next73
  %107 = getelementptr inbounds i8, ptr %106, i64 8
  store i64 %99, ptr %107, align 8, !tbaa !5
  store i64 0, ptr %106, align 16, !tbaa !5
  br label %108

108:                                              ; preds = %83, %105, %100, %24, %54, %78, %73, %41
  %109 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str)
  %110 = trunc nuw nsw i64 %indvars.iv.next73 to i32
  %111 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %109, i32 noundef %110)
  %112 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %111, ptr noundef nonnull @.str.1)
  %113 = getelementptr inbounds [1010 x [2 x i64]], ptr @DP, i64 0, i64 %indvars.iv.next73
  %114 = load i64, ptr %113, align 16, !tbaa !5
  %115 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %112, i64 noundef %114)
  %116 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %115, ptr noundef nonnull @.str.2)
  %117 = getelementptr inbounds i8, ptr %113, i64 8
  %118 = load i64, ptr %117, align 8, !tbaa !5
  %119 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %116, i64 noundef %118)
  %120 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %119, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %121 = load i32, ptr @N, align 4, !tbaa !9
  %122 = sext i32 %121 to i64
  %123 = icmp slt i64 %indvars.iv.next73, %122
  br i1 %123, label %.lr.ph68, label %._crit_edge69, !llvm.loop !13
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #3

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }

!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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


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