; LLVM IR from kazunetakahashi/atcoder :: 2019/0217_nikkei2019-final (E4)

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

@p = external dso_local global [100010 x i64], align 16
@N = external dso_local global i64, align 8
@K = external dso_local global i64, align 8
@dp = external dso_local global [2 x [5010 x [5010 x i64]]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z5powerx(i64 noundef) #0

; 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 i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  store i64 1, ptr @p, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 1, ptr %2, align 4, !tbaa !9
  br label %11

11:                                               ; preds = %26, %0
  %12 = load i32, ptr %2, align 4, !tbaa !9
  %13 = icmp slt i32 %12, 100010
  br i1 %13, label %15, label %14

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

15:                                               ; preds = %11
  %16 = load i32, ptr %2, align 4, !tbaa !9
  %17 = sub nsw i32 %16, 1
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [100010 x i64], ptr @p, i64 0, i64 %18
  %20 = load i64, ptr %19, align 8, !tbaa !5
  %21 = mul nsw i64 2, %20
  %22 = srem i64 %21, 1000000007
  %23 = load i32, ptr %2, align 4, !tbaa !9
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [100010 x i64], ptr @p, i64 0, i64 %24
  store i64 %22, ptr %25, align 8, !tbaa !5
  br label %26

26:                                               ; preds = %15
  %27 = load i32, ptr %2, align 4, !tbaa !9
  %28 = add nsw i32 %27, 1
  store i32 %28, ptr %2, align 4, !tbaa !9
  br label %11, !llvm.loop !11

29:                                               ; preds = %14
  %30 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 8 dereferenceable(8) @K)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !9
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef @dp, ptr noundef getelementptr inbounds (i64, ptr @dp, i64 50200200), ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  store i64 1, ptr getelementptr inbounds ([5010 x i64], ptr @dp, i64 0, i64 1), align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 1, ptr %4, align 4, !tbaa !9
  br label %32

32:                                               ; preds = %176, %29
  %33 = load i32, ptr %4, align 4, !tbaa !9
  %34 = sext i32 %33 to i64
  %35 = load i64, ptr @N, align 8, !tbaa !5
  %36 = icmp sle i64 %34, %35
  br i1 %36, label %38, label %37

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

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

39:                                               ; preds = %172, %38
  %40 = load i32, ptr %6, align 4, !tbaa !9
  %41 = load i32, ptr %4, align 4, !tbaa !9
  %42 = icmp sle i32 %40, %41
  br i1 %42, label %44, label %43

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

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

45:                                               ; preds = %168, %44
  %46 = load i32, ptr %7, align 4, !tbaa !9
  %47 = icmp slt i32 %46, 2
  br i1 %47, label %49, label %48

48:                                               ; preds = %45
  store i32 11, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %171

49:                                               ; preds = %45
  %50 = load i64, ptr @N, align 8, !tbaa !5
  %51 = icmp slt i64 %50, 100
  br i1 %51, label %52, label %75

52:                                               ; preds = %49
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.2)
  %54 = load i32, ptr %7, align 4, !tbaa !9
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %53, i32 noundef %54)
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef @.str.3)
  %57 = load i32, ptr %6, align 4, !tbaa !9
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %56, i32 noundef %57)
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef @.str.3)
  %60 = load i32, ptr %4, align 4, !tbaa !9
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %59, i32 noundef %60)
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %61, ptr noundef @.str.4)
  %63 = load i32, ptr %7, align 4, !tbaa !9
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [2 x [5010 x [5010 x i64]]], ptr @dp, i64 0, i64 %64
  %66 = load i32, ptr %6, align 4, !tbaa !9
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [5010 x [5010 x i64]], ptr %65, i64 0, i64 %67
  %69 = load i32, ptr %4, align 4, !tbaa !9
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [5010 x i64], ptr %68, i64 0, i64 %70
  %72 = load i64, ptr %71, align 8, !tbaa !5
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %62, i64 noundef %72)
  %74 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %73, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %75

75:                                               ; preds = %52, %49
  %76 = load i32, ptr %7, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [2 x [5010 x [5010 x i64]]], ptr @dp, i64 0, i64 %77
  %79 = load i32, ptr %6, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [5010 x [5010 x i64]], ptr %78, i64 0, i64 %80
  %82 = load i32, ptr %4, align 4, !tbaa !9
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [5010 x i64], ptr %81, i64 0, i64 %83
  %85 = load i64, ptr %84, align 8, !tbaa !5
  %86 = icmp eq i64 %85, 0
  br i1 %86, label %87, label %88

87:                                               ; preds = %75
  br label %168

88:                                               ; preds = %75
  %89 = load i32, ptr %7, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [2 x [5010 x [5010 x i64]]], ptr @dp, i64 0, i64 %90
  %92 = load i32, ptr %6, align 4, !tbaa !9
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [5010 x [5010 x i64]], ptr %91, i64 0, i64 %93
  %95 = load i32, ptr %4, align 4, !tbaa !9
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [5010 x i64], ptr %94, i64 0, i64 %96
  %98 = load i64, ptr %97, align 8, !tbaa !5
  %99 = load i32, ptr %7, align 4, !tbaa !9
  %100 = sub nsw i32 1, %99
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [2 x [5010 x [5010 x i64]]], ptr @dp, i64 0, i64 %101
  %103 = load i32, ptr %4, align 4, !tbaa !9
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [5010 x [5010 x i64]], ptr %102, i64 0, i64 %104
  %106 = load i32, ptr %4, align 4, !tbaa !9
  %107 = add nsw i32 %106, 1
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [5010 x i64], ptr %105, i64 0, i64 %108
  %110 = load i64, ptr %109, align 8, !tbaa !5
  %111 = add nsw i64 %110, %98
  store i64 %111, ptr %109, align 8, !tbaa !5
  %112 = load i32, ptr %7, align 4, !tbaa !9
  %113 = sub nsw i32 1, %112
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [2 x [5010 x [5010 x i64]]], ptr @dp, i64 0, i64 %114
  %116 = load i32, ptr %4, align 4, !tbaa !9
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [5010 x [5010 x i64]], ptr %115, i64 0, i64 %117
  %119 = load i32, ptr %4, align 4, !tbaa !9
  %120 = add nsw i32 %119, 1
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [5010 x i64], ptr %118, i64 0, i64 %121
  %123 = load i64, ptr %122, align 8, !tbaa !5
  %124 = srem i64 %123, 1000000007
  store i64 %124, ptr %122, align 8, !tbaa !5
  %125 = load i32, ptr %4, align 4, !tbaa !9
  %126 = load i32, ptr %6, align 4, !tbaa !9
  %127 = sub nsw i32 %125, %126
  %128 = sext i32 %127 to i64
  %129 = load i64, ptr @K, align 8, !tbaa !5
  %130 = sub nsw i64 %128, %129
  %131 = call noundef i64 @_Z5powerx(i64 noundef %130)
  %132 = load i32, ptr %7, align 4, !tbaa !9
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [2 x [5010 x [5010 x i64]]], ptr @dp, i64 0, i64 %133
  %135 = load i32, ptr %6, align 4, !tbaa !9
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [5010 x [5010 x i64]], ptr %134, i64 0, i64 %136
  %138 = load i32, ptr %4, align 4, !tbaa !9
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [5010 x i64], ptr %137, i64 0, i64 %139
  %141 = load i64, ptr %140, align 8, !tbaa !5
  %142 = mul nsw i64 %131, %141
  %143 = srem i64 %142, 1000000007
  %144 = load i32, ptr %7, align 4, !tbaa !9
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [2 x [5010 x [5010 x i64]]], ptr @dp, i64 0, i64 %145
  %147 = load i32, ptr %6, align 4, !tbaa !9
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [5010 x [5010 x i64]], ptr %146, i64 0, i64 %148
  %150 = load i32, ptr %4, align 4, !tbaa !9
  %151 = add nsw i32 %150, 1
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [5010 x i64], ptr %149, i64 0, i64 %152
  %154 = load i64, ptr %153, align 8, !tbaa !5
  %155 = add nsw i64 %154, %143
  store i64 %155, ptr %153, align 8, !tbaa !5
  %156 = load i32, ptr %7, align 4, !tbaa !9
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [2 x [5010 x [5010 x i64]]], ptr @dp, i64 0, i64 %157
  %159 = load i32, ptr %6, align 4, !tbaa !9
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [5010 x [5010 x i64]], ptr %158, i64 0, i64 %160
  %162 = load i32, ptr %4, align 4, !tbaa !9
  %163 = add nsw i32 %162, 1
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [5010 x i64], ptr %161, i64 0, i64 %164
  %166 = load i64, ptr %165, align 8, !tbaa !5
  %167 = srem i64 %166, 1000000007
  store i64 %167, ptr %165, align 8, !tbaa !5
  br label %168

168:                                              ; preds = %88, %87
  %169 = load i32, ptr %7, align 4, !tbaa !9
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %7, align 4, !tbaa !9
  br label %45, !llvm.loop !13

171:                                              ; preds = %48
  br label %172

172:                                              ; preds = %171
  %173 = load i32, ptr %6, align 4, !tbaa !9
  %174 = add nsw i32 %173, 1
  store i32 %174, ptr %6, align 4, !tbaa !9
  br label %39, !llvm.loop !14

175:                                              ; preds = %43
  br label %176

176:                                              ; preds = %175
  %177 = load i32, ptr %4, align 4, !tbaa !9
  %178 = add nsw i32 %177, 1
  store i32 %178, ptr %4, align 4, !tbaa !9
  br label %32, !llvm.loop !15

179:                                              ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store i64 0, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %180

180:                                              ; preds = %221, %179
  %181 = load i32, ptr %9, align 4, !tbaa !9
  %182 = sext i32 %181 to i64
  %183 = load i64, ptr @N, align 8, !tbaa !5
  %184 = icmp sle i64 %182, %183
  br i1 %184, label %186, label %185

185:                                              ; preds = %180
  store i32 14, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %224

186:                                              ; preds = %180
  %187 = load i64, ptr @N, align 8, !tbaa !5
  %188 = icmp slt i64 %187, 100
  br i1 %188, label %189, label %209

189:                                              ; preds = %186
  %190 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.2)
  %191 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %190, i32 noundef 0)
  %192 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %191, ptr noundef @.str.3)
  %193 = load i32, ptr %9, align 4, !tbaa !9
  %194 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %192, i32 noundef %193)
  %195 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %194, ptr noundef @.str.3)
  %196 = load i64, ptr @N, align 8, !tbaa !5
  %197 = add nsw i64 %196, 1
  %198 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %195, i64 noundef %197)
  %199 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %198, ptr noundef @.str.4)
  %200 = load i32, ptr %9, align 4, !tbaa !9
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [5010 x [5010 x i64]], ptr @dp, i64 0, i64 %201
  %203 = load i64, ptr @N, align 8, !tbaa !5
  %204 = add nsw i64 %203, 1
  %205 = getelementptr inbounds [5010 x i64], ptr %202, i64 0, i64 %204
  %206 = load i64, ptr %205, align 8, !tbaa !5
  %207 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %199, i64 noundef %206)
  %208 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %207, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %209

209:                                              ; preds = %189, %186
  %210 = load i32, ptr %9, align 4, !tbaa !9
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds [5010 x [5010 x i64]], ptr @dp, i64 0, i64 %211
  %213 = load i64, ptr @N, align 8, !tbaa !5
  %214 = add nsw i64 %213, 1
  %215 = getelementptr inbounds [5010 x i64], ptr %212, i64 0, i64 %214
  %216 = load i64, ptr %215, align 8, !tbaa !5
  %217 = load i64, ptr %8, align 8, !tbaa !5
  %218 = add nsw i64 %217, %216
  store i64 %218, ptr %8, align 8, !tbaa !5
  %219 = load i64, ptr %8, align 8, !tbaa !5
  %220 = srem i64 %219, 1000000007
  store i64 %220, ptr %8, align 8, !tbaa !5
  br label %221

221:                                              ; preds = %209
  %222 = load i32, ptr %9, align 4, !tbaa !9
  %223 = add nsw i32 %222, 1
  store i32 %223, ptr %9, align 4, !tbaa !9
  br label %180, !llvm.loop !16

224:                                              ; preds = %185
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %225

225:                                              ; preds = %267, %224
  %226 = load i32, ptr %10, align 4, !tbaa !9
  %227 = sext i32 %226 to i64
  %228 = load i64, ptr @N, align 8, !tbaa !5
  %229 = icmp sle i64 %227, %228
  br i1 %229, label %231, label %230

230:                                              ; preds = %225
  store i32 17, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %270

231:                                              ; preds = %225
  %232 = load i64, ptr @N, align 8, !tbaa !5
  %233 = icmp slt i64 %232, 100
  br i1 %233, label %234, label %254

234:                                              ; preds = %231
  %235 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.2)
  %236 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %235, i32 noundef 1)
  %237 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %236, ptr noundef @.str.3)
  %238 = load i32, ptr %10, align 4, !tbaa !9
  %239 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %237, i32 noundef %238)
  %240 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %239, ptr noundef @.str.3)
  %241 = load i64, ptr @N, align 8, !tbaa !5
  %242 = add nsw i64 %241, 1
  %243 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %240, i64 noundef %242)
  %244 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %243, ptr noundef @.str.4)
  %245 = load i32, ptr %10, align 4, !tbaa !9
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds [5010 x [5010 x i64]], ptr getelementptr inbounds ([2 x [5010 x [5010 x i64]]], ptr @dp, i64 0, i64 1), i64 0, i64 %246
  %248 = load i64, ptr @N, align 8, !tbaa !5
  %249 = add nsw i64 %248, 1
  %250 = getelementptr inbounds [5010 x i64], ptr %247, i64 0, i64 %249
  %251 = load i64, ptr %250, align 8, !tbaa !5
  %252 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %244, i64 noundef %251)
  %253 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %252, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %254

254:                                              ; preds = %234, %231
  %255 = load i32, ptr %10, align 4, !tbaa !9
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds [5010 x [5010 x i64]], ptr getelementptr inbounds ([2 x [5010 x [5010 x i64]]], ptr @dp, i64 0, i64 1), i64 0, i64 %256
  %258 = load i64, ptr @N, align 8, !tbaa !5
  %259 = add nsw i64 %258, 1
  %260 = getelementptr inbounds [5010 x i64], ptr %257, i64 0, i64 %259
  %261 = load i64, ptr %260, align 8, !tbaa !5
  %262 = sub nsw i64 1000000007, %261
  %263 = load i64, ptr %8, align 8, !tbaa !5
  %264 = add nsw i64 %263, %262
  store i64 %264, ptr %8, align 8, !tbaa !5
  %265 = load i64, ptr %8, align 8, !tbaa !5
  %266 = srem i64 %265, 1000000007
  store i64 %266, ptr %8, align 8, !tbaa !5
  br label %267

267:                                              ; preds = %254
  %268 = load i32, ptr %10, align 4, !tbaa !9
  %269 = add nsw i32 %268, 1
  store i32 %269, ptr %10, align 4, !tbaa !9
  br label %225, !llvm.loop !17

270:                                              ; preds = %230
  %271 = load i64, ptr %8, align 8, !tbaa !5
  %272 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %271)
  %273 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %272, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  %274 = load i32, ptr %1, align 4
  ret i32 %274
}

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

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

; Function Attrs: 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)) #3 align 2

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

; 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) #5

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #3 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) #3 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 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 = { 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 #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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !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" }

@p = external dso_local local_unnamed_addr global [100010 x i64], align 16
@N = external dso_local global i64, align 8
@K = external dso_local global i64, align 8
@dp = external dso_local global [2 x [5010 x [5010 x i64]]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = alloca i32, align 4
  store i64 1, ptr @p, align 16, !tbaa !5
  br label %6

2:                                                ; preds = %6
  %3 = 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) @N)
  %4 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(8) @K)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  store i32 0, ptr %1, align 4, !tbaa !9
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull @dp, ptr noundef nonnull getelementptr inbounds (i8, ptr @dp, i64 401601600), ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  store i64 1, ptr getelementptr inbounds (i8, ptr @dp, i64 8), align 8, !tbaa !5
  %5 = load i64, ptr @N, align 8, !tbaa !5
  %.not77 = icmp slt i64 %5, 1
  br i1 %.not77, label %.preheader71, label %.preheader73

6:                                                ; preds = %11, %0
  %7 = phi i64 [ 1, %0 ], [ %13, %11 ]
  %indvars.iv = phi i64 [ 1, %0 ], [ %indvars.iv.next.1, %11 ]
  %8 = shl nsw i64 %7, 1
  %9 = srem i64 %8, 1000000007
  %10 = getelementptr inbounds [100010 x i64], ptr @p, i64 0, i64 %indvars.iv
  store i64 %9, ptr %10, align 8, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 100010
  br i1 %exitcond.not, label %2, label %11, !llvm.loop !11

11:                                               ; preds = %6
  %12 = shl nsw i64 %9, 1
  %13 = srem i64 %12, 1000000007
  %14 = getelementptr inbounds [100010 x i64], ptr @p, i64 0, i64 %indvars.iv.next
  store i64 %13, ptr %14, align 8, !tbaa !5
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  br label %6

.preheader73:                                     ; preds = %2, %22
  %indvars.iv103 = phi i64 [ %indvars.iv.next104, %22 ], [ 1, %2 ]
  %indvars.iv101 = phi i64 [ %indvars.iv.next102, %22 ], [ 2, %2 ]
  %indvars.iv.next104 = add nuw nsw i64 %indvars.iv103, 1
  %15 = trunc nuw nsw i64 %indvars.iv103 to i32
  %16 = getelementptr inbounds [2 x [5010 x [5010 x i64]]], ptr @dp, i64 0, i64 1, i64 %indvars.iv103, i64 %indvars.iv.next104
  %17 = trunc nuw nsw i64 %indvars.iv103 to i32
  %18 = getelementptr inbounds [2 x [5010 x [5010 x i64]]], ptr @dp, i64 0, i64 0, i64 %indvars.iv103, i64 %indvars.iv.next104
  br label %.preheader72

.preheader71:                                     ; preds = %22, %2
  %.lcssa = phi i64 [ %5, %2 ], [ %23, %22 ]
  %.not6879 = icmp slt i64 %.lcssa, 0
  br i1 %.not6879, label %._crit_edge, label %.lr.ph

.preheader72:                                     ; preds = %.preheader73, %89
  %indvars.iv95 = phi i64 [ 0, %.preheader73 ], [ %indvars.iv.next96, %89 ]
  %19 = sub nsw i64 %indvars.iv103, %indvars.iv95
  %20 = load i64, ptr @N, align 8, !tbaa !5
  %21 = icmp slt i64 %20, 100
  br i1 %21, label %24, label %37

22:                                               ; preds = %89
  %23 = load i64, ptr @N, align 8, !tbaa !5
  %.not.not = icmp sgt i64 %23, %indvars.iv103
  %indvars.iv.next102 = add nuw i64 %indvars.iv101, 1
  br i1 %.not.not, label %.preheader73, label %.preheader71, !llvm.loop !13

24:                                               ; preds = %.preheader72
  %25 = 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.2)
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %25, i32 noundef 0)
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull @.str.3)
  %28 = trunc nuw nsw i64 %indvars.iv95 to i32
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %27, i32 noundef %28)
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull @.str.3)
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %30, i32 noundef %15)
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull @.str.4)
  %33 = getelementptr inbounds [2 x [5010 x [5010 x i64]]], ptr @dp, i64 0, i64 0, i64 %indvars.iv95, i64 %indvars.iv103
  %34 = load i64, ptr %33, align 8, !tbaa !5
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %32, i64 noundef %34)
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %37

37:                                               ; preds = %24, %.preheader72
  %38 = getelementptr inbounds [2 x [5010 x [5010 x i64]]], ptr @dp, i64 0, i64 0, i64 %indvars.iv95, i64 %indvars.iv103
  %39 = load i64, ptr %38, align 8, !tbaa !5
  %40 = icmp eq i64 %39, 0
  br i1 %40, label %55, label %41

41:                                               ; preds = %37
  %42 = load i64, ptr %16, align 8, !tbaa !5
  %43 = add nsw i64 %42, %39
  %44 = srem i64 %43, 1000000007
  store i64 %44, ptr %16, align 8, !tbaa !5
  %45 = load i64, ptr @K, align 8, !tbaa !5
  %46 = sub nsw i64 %19, %45
  %47 = call noundef i64 @_Z5powerx(i64 noundef %46)
  %48 = load i64, ptr %38, align 8, !tbaa !5
  %49 = mul nsw i64 %48, %47
  %50 = srem i64 %49, 1000000007
  %51 = getelementptr inbounds [2 x [5010 x [5010 x i64]]], ptr @dp, i64 0, i64 0, i64 %indvars.iv95, i64 %indvars.iv.next104
  %52 = load i64, ptr %51, align 8, !tbaa !5
  %53 = add nsw i64 %50, %52
  %54 = srem i64 %53, 1000000007
  store i64 %54, ptr %51, align 8, !tbaa !5
  br label %55

55:                                               ; preds = %37, %41
  %56 = load i64, ptr @N, align 8, !tbaa !5
  %57 = icmp slt i64 %56, 100
  br i1 %57, label %58, label %71

58:                                               ; preds = %55
  %59 = 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.2)
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %59, i32 noundef 1)
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %60, ptr noundef nonnull @.str.3)
  %62 = trunc nuw nsw i64 %indvars.iv95 to i32
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %61, i32 noundef %62)
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %63, ptr noundef nonnull @.str.3)
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %64, i32 noundef %17)
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %65, ptr noundef nonnull @.str.4)
  %67 = getelementptr inbounds [2 x [5010 x [5010 x i64]]], ptr @dp, i64 0, i64 1, i64 %indvars.iv95, i64 %indvars.iv103
  %68 = load i64, ptr %67, align 8, !tbaa !5
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %66, i64 noundef %68)
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %69, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %71

71:                                               ; preds = %58, %55
  %72 = getelementptr inbounds [2 x [5010 x [5010 x i64]]], ptr @dp, i64 0, i64 1, i64 %indvars.iv95, i64 %indvars.iv103
  %73 = load i64, ptr %72, align 8, !tbaa !5
  %74 = icmp eq i64 %73, 0
  br i1 %74, label %89, label %75

75:                                               ; preds = %71
  %76 = load i64, ptr %18, align 8, !tbaa !5
  %77 = add nsw i64 %76, %73
  %78 = srem i64 %77, 1000000007
  store i64 %78, ptr %18, align 8, !tbaa !5
  %79 = load i64, ptr @K, align 8, !tbaa !5
  %80 = sub nsw i64 %19, %79
  %81 = call noundef i64 @_Z5powerx(i64 noundef %80)
  %82 = load i64, ptr %72, align 8, !tbaa !5
  %83 = mul nsw i64 %82, %81
  %84 = srem i64 %83, 1000000007
  %85 = getelementptr inbounds [2 x [5010 x [5010 x i64]]], ptr @dp, i64 0, i64 1, i64 %indvars.iv95, i64 %indvars.iv.next104
  %86 = load i64, ptr %85, align 8, !tbaa !5
  %87 = add nsw i64 %84, %86
  %88 = srem i64 %87, 1000000007
  store i64 %88, ptr %85, align 8, !tbaa !5
  br label %89

89:                                               ; preds = %75, %71
  %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1
  %exitcond100.not = icmp eq i64 %indvars.iv.next96, %indvars.iv101
  br i1 %exitcond100.not, label %22, label %.preheader72, !llvm.loop !14

.preheader:                                       ; preds = %108
  %.not6983 = icmp slt i64 %109, 0
  br i1 %.not6983, label %._crit_edge, label %.lr.ph86

.lr.ph:                                           ; preds = %.preheader71, %108
  %.pr114 = phi i64 [ %109, %108 ], [ %.lcssa, %.preheader71 ]
  %indvars.iv108 = phi i64 [ %indvars.iv.next109, %108 ], [ 0, %.preheader71 ]
  %.05780 = phi i64 [ %114, %108 ], [ 0, %.preheader71 ]
  %90 = icmp ult i64 %.pr114, 100
  br i1 %90, label %91, label %108

91:                                               ; preds = %.lr.ph
  %92 = 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.2)
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %92, i32 noundef 0)
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %93, ptr noundef nonnull @.str.3)
  %95 = trunc nuw nsw i64 %indvars.iv108 to i32
  %96 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %94, i32 noundef %95)
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %96, ptr noundef nonnull @.str.3)
  %98 = load i64, ptr @N, align 8, !tbaa !5
  %99 = add nsw i64 %98, 1
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %97, i64 noundef %99)
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %100, ptr noundef nonnull @.str.4)
  %102 = load i64, ptr @N, align 8, !tbaa !5
  %103 = add nsw i64 %102, 1
  %104 = getelementptr inbounds [5010 x [5010 x i64]], ptr @dp, i64 0, i64 %indvars.iv108, i64 %103
  %105 = load i64, ptr %104, align 8, !tbaa !5
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %101, i64 noundef %105)
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %106, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %.pre = load i64, ptr @N, align 8, !tbaa !5
  br label %108

108:                                              ; preds = %91, %.lr.ph
  %109 = phi i64 [ %.pre, %91 ], [ %.pr114, %.lr.ph ]
  %110 = add nsw i64 %109, 1
  %111 = getelementptr inbounds [5010 x [5010 x i64]], ptr @dp, i64 0, i64 %indvars.iv108, i64 %110
  %112 = load i64, ptr %111, align 8, !tbaa !5
  %113 = add nsw i64 %112, %.05780
  %114 = srem i64 %113, 1000000007
  %indvars.iv.next109 = add nuw nsw i64 %indvars.iv108, 1
  %.not68.not = icmp sgt i64 %109, %indvars.iv108
  br i1 %.not68.not, label %.lr.ph, label %.preheader, !llvm.loop !15

._crit_edge:                                      ; preds = %136, %.preheader71, %.preheader
  %.1.lcssa = phi i64 [ %114, %.preheader ], [ 0, %.preheader71 ], [ %142, %136 ]
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.1.lcssa)
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %115, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0

.lr.ph86:                                         ; preds = %.preheader, %136
  %117 = phi i64 [ %137, %136 ], [ %109, %.preheader ]
  %indvars.iv111 = phi i64 [ %indvars.iv.next112, %136 ], [ 0, %.preheader ]
  %.184 = phi i64 [ %142, %136 ], [ %114, %.preheader ]
  %118 = icmp ult i64 %117, 100
  br i1 %118, label %119, label %136

119:                                              ; preds = %.lr.ph86
  %120 = 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.2)
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %120, i32 noundef 1)
  %122 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %121, ptr noundef nonnull @.str.3)
  %123 = trunc nuw nsw i64 %indvars.iv111 to i32
  %124 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %122, i32 noundef %123)
  %125 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %124, ptr noundef nonnull @.str.3)
  %126 = load i64, ptr @N, align 8, !tbaa !5
  %127 = add nsw i64 %126, 1
  %128 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %125, i64 noundef %127)
  %129 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %128, ptr noundef nonnull @.str.4)
  %130 = load i64, ptr @N, align 8, !tbaa !5
  %131 = add nsw i64 %130, 1
  %132 = getelementptr inbounds [5010 x [5010 x i64]], ptr getelementptr inbounds (i8, ptr @dp, i64 200800800), i64 0, i64 %indvars.iv111, i64 %131
  %133 = load i64, ptr %132, align 8, !tbaa !5
  %134 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %129, i64 noundef %133)
  %135 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %134, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %.pre116 = load i64, ptr @N, align 8, !tbaa !5
  br label %136

136:                                              ; preds = %119, %.lr.ph86
  %137 = phi i64 [ %.pre116, %119 ], [ %117, %.lr.ph86 ]
  %138 = add nsw i64 %137, 1
  %139 = getelementptr inbounds [5010 x [5010 x i64]], ptr getelementptr inbounds (i8, ptr @dp, i64 200800800), i64 0, i64 %indvars.iv111, i64 %138
  %140 = load i64, ptr %139, align 8, !tbaa !5
  %reass.sub = add nsw i64 %.184, 1000000007
  %141 = sub i64 %reass.sub, %140
  %142 = srem i64 %141, 1000000007
  %indvars.iv.next112 = add nuw nsw i64 %indvars.iv111, 1
  %.not69.not = icmp sgt i64 %137, %indvars.iv111
  br i1 %.not69.not, label %.lr.ph86, label %._crit_edge, !llvm.loop !16
}

; 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: 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 #3 align 2

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

; 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 #4

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

; 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 #3 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 #3 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 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 = { 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 #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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}


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