; LLVM IR from kazunetakahashi/atcoder :: 2018/0922_code-festival-2018-quala (C)

; 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
@K = external dso_local global i32, align 4
@A = external dso_local global [100 x i64], align 16
@cnt = external dso_local global [100 x i64], align 16
@DP = external dso_local global [60 x [5010 x [2 x i64]]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %14 = 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)
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 4 dereferenceable(4) @K)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %16

16:                                               ; preds = %26, %0
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = load i32, ptr @N, align 4, !tbaa !5
  %19 = icmp sle i32 %17, %18
  br i1 %19, label %21, label %20

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

21:                                               ; preds = %16
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [100 x i64], ptr @A, i64 0, i64 %23
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %24)
  br label %26

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

29:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %30

30:                                               ; preds = %57, %29
  %31 = load i32, ptr %3, align 4, !tbaa !5
  %32 = load i32, ptr @N, align 4, !tbaa !5
  %33 = icmp sle i32 %31, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %60

35:                                               ; preds = %30
  %36 = load i32, ptr %3, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [100 x i64], ptr @cnt, i64 0, i64 %37
  store i64 0, ptr %38, align 8, !tbaa !11
  br label %39

39:                                               ; preds = %45, %35
  %40 = load i32, ptr %3, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [100 x i64], ptr @A, i64 0, i64 %41
  %43 = load i64, ptr %42, align 8, !tbaa !11
  %44 = icmp sgt i64 %43, 0
  br i1 %44, label %45, label %56

45:                                               ; preds = %39
  %46 = load i32, ptr %3, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [100 x i64], ptr @A, i64 0, i64 %47
  %49 = load i64, ptr %48, align 8, !tbaa !11
  %50 = sdiv i64 %49, 2
  store i64 %50, ptr %48, align 8, !tbaa !11
  %51 = load i32, ptr %3, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [100 x i64], ptr @cnt, i64 0, i64 %52
  %54 = load i64, ptr %53, align 8, !tbaa !11
  %55 = add nsw i64 %54, 1
  store i64 %55, ptr %53, align 8, !tbaa !11
  br label %39, !llvm.loop !13

56:                                               ; preds = %39
  br label %57

57:                                               ; preds = %56
  %58 = load i32, ptr %3, align 4, !tbaa !5
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %3, align 4, !tbaa !5
  br label %30, !llvm.loop !14

60:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef @DP, ptr noundef getelementptr inbounds (i64, ptr @DP, i64 601200), ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  store i64 1, ptr @DP, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 5000, ptr %5, align 4, !tbaa !5
  %61 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @K, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %62 = load i32, ptr %61, align 4, !tbaa !5
  store i32 %62, ptr @K, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %63

63:                                               ; preds = %238, %60
  %64 = load i32, ptr %6, align 4, !tbaa !5
  %65 = load i32, ptr @N, align 4, !tbaa !5
  %66 = icmp sle i32 %64, %65
  br i1 %66, label %68, label %67

67:                                               ; preds = %63
  store i32 10, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %241

68:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %69 = load i32, ptr %6, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [100 x i64], ptr @cnt, i64 0, i64 %70
  %72 = load i64, ptr %71, align 8, !tbaa !11
  store i64 %72, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %73

73:                                               ; preds = %234, %68
  %74 = load i32, ptr %9, align 4, !tbaa !5
  %75 = load i32, ptr @K, align 4, !tbaa !5
  %76 = icmp sle i32 %74, %75
  br i1 %76, label %78, label %77

77:                                               ; preds = %73
  store i32 13, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %237

78:                                               ; preds = %73
  %79 = load i32, ptr %6, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [60 x [5010 x [2 x i64]]], ptr @DP, i64 0, i64 %80
  %82 = load i32, ptr %9, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [5010 x [2 x i64]], ptr %81, i64 0, i64 %83
  %85 = getelementptr inbounds [2 x i64], ptr %84, i64 0, i64 0
  store i64 0, ptr %85, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %86

86:                                               ; preds = %135, %78
  %87 = load i32, ptr %10, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = load i64, ptr %8, align 8, !tbaa !11
  %90 = sub nsw i64 %89, 1
  %91 = icmp sle i64 %88, %90
  br i1 %91, label %93, label %92

92:                                               ; preds = %86
  store i32 16, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %138

93:                                               ; preds = %86
  %94 = load i32, ptr %9, align 4, !tbaa !5
  %95 = load i32, ptr %10, align 4, !tbaa !5
  %96 = sub nsw i32 %94, %95
  %97 = icmp sle i32 0, %96
  br i1 %97, label %98, label %134

98:                                               ; preds = %93
  %99 = load i32, ptr %9, align 4, !tbaa !5
  %100 = load i32, ptr %10, align 4, !tbaa !5
  %101 = sub nsw i32 %99, %100
  %102 = load i32, ptr @K, align 4, !tbaa !5
  %103 = icmp sle i32 %101, %102
  br i1 %103, label %104, label %134

104:                                              ; preds = %98
  %105 = load i32, ptr %6, align 4, !tbaa !5
  %106 = sub nsw i32 %105, 1
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [60 x [5010 x [2 x i64]]], ptr @DP, i64 0, i64 %107
  %109 = load i32, ptr %9, align 4, !tbaa !5
  %110 = load i32, ptr %10, align 4, !tbaa !5
  %111 = sub nsw i32 %109, %110
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [5010 x [2 x i64]], ptr %108, i64 0, i64 %112
  %114 = getelementptr inbounds [2 x i64], ptr %113, i64 0, i64 0
  %115 = load i64, ptr %114, align 16, !tbaa !11
  %116 = load i32, ptr %6, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [60 x [5010 x [2 x i64]]], ptr @DP, i64 0, i64 %117
  %119 = load i32, ptr %9, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [5010 x [2 x i64]], ptr %118, i64 0, i64 %120
  %122 = getelementptr inbounds [2 x i64], ptr %121, i64 0, i64 0
  %123 = load i64, ptr %122, align 16, !tbaa !11
  %124 = add nsw i64 %123, %115
  store i64 %124, ptr %122, align 16, !tbaa !11
  %125 = load i32, ptr %6, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [60 x [5010 x [2 x i64]]], ptr @DP, i64 0, i64 %126
  %128 = load i32, ptr %9, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [5010 x [2 x i64]], ptr %127, i64 0, i64 %129
  %131 = getelementptr inbounds [2 x i64], ptr %130, i64 0, i64 0
  %132 = load i64, ptr %131, align 16, !tbaa !11
  %133 = srem i64 %132, 1000000007
  store i64 %133, ptr %131, align 16, !tbaa !11
  br label %134

134:                                              ; preds = %104, %98, %93
  br label %135

135:                                              ; preds = %134
  %136 = load i32, ptr %10, align 4, !tbaa !5
  %137 = add nsw i32 %136, 1
  store i32 %137, ptr %10, align 4, !tbaa !5
  br label %86, !llvm.loop !15

138:                                              ; preds = %92
  %139 = load i32, ptr %6, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [60 x [5010 x [2 x i64]]], ptr @DP, i64 0, i64 %140
  %142 = load i32, ptr %9, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [5010 x [2 x i64]], ptr %141, i64 0, i64 %143
  %145 = getelementptr inbounds [2 x i64], ptr %144, i64 0, i64 1
  store i64 0, ptr %145, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %146

146:                                              ; preds = %194, %138
  %147 = load i32, ptr %11, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = load i64, ptr %8, align 8, !tbaa !11
  %150 = icmp sle i64 %148, %149
  br i1 %150, label %152, label %151

151:                                              ; preds = %146
  store i32 19, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %197

152:                                              ; preds = %146
  %153 = load i32, ptr %9, align 4, !tbaa !5
  %154 = load i32, ptr %11, align 4, !tbaa !5
  %155 = sub nsw i32 %153, %154
  %156 = icmp sle i32 0, %155
  br i1 %156, label %157, label %193

157:                                              ; preds = %152
  %158 = load i32, ptr %9, align 4, !tbaa !5
  %159 = load i32, ptr %11, align 4, !tbaa !5
  %160 = sub nsw i32 %158, %159
  %161 = load i32, ptr @K, align 4, !tbaa !5
  %162 = icmp sle i32 %160, %161
  br i1 %162, label %163, label %193

163:                                              ; preds = %157
  %164 = load i32, ptr %6, align 4, !tbaa !5
  %165 = sub nsw i32 %164, 1
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [60 x [5010 x [2 x i64]]], ptr @DP, i64 0, i64 %166
  %168 = load i32, ptr %9, align 4, !tbaa !5
  %169 = load i32, ptr %11, align 4, !tbaa !5
  %170 = sub nsw i32 %168, %169
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [5010 x [2 x i64]], ptr %167, i64 0, i64 %171
  %173 = getelementptr inbounds [2 x i64], ptr %172, i64 0, i64 1
  %174 = load i64, ptr %173, align 8, !tbaa !11
  %175 = load i32, ptr %6, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [60 x [5010 x [2 x i64]]], ptr @DP, i64 0, i64 %176
  %178 = load i32, ptr %9, align 4, !tbaa !5
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [5010 x [2 x i64]], ptr %177, i64 0, i64 %179
  %181 = getelementptr inbounds [2 x i64], ptr %180, i64 0, i64 1
  %182 = load i64, ptr %181, align 8, !tbaa !11
  %183 = add nsw i64 %182, %174
  store i64 %183, ptr %181, align 8, !tbaa !11
  %184 = load i32, ptr %6, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [60 x [5010 x [2 x i64]]], ptr @DP, i64 0, i64 %185
  %187 = load i32, ptr %9, align 4, !tbaa !5
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [5010 x [2 x i64]], ptr %186, i64 0, i64 %188
  %190 = getelementptr inbounds [2 x i64], ptr %189, i64 0, i64 1
  %191 = load i64, ptr %190, align 8, !tbaa !11
  %192 = srem i64 %191, 1000000007
  store i64 %192, ptr %190, align 8, !tbaa !11
  br label %193

193:                                              ; preds = %163, %157, %152
  br label %194

194:                                              ; preds = %193
  %195 = load i32, ptr %11, align 4, !tbaa !5
  %196 = add nsw i32 %195, 1
  store i32 %196, ptr %11, align 4, !tbaa !5
  br label %146, !llvm.loop !16

197:                                              ; preds = %151
  %198 = load i32, ptr %9, align 4, !tbaa !5
  %199 = sext i32 %198 to i64
  %200 = load i64, ptr %8, align 8, !tbaa !11
  %201 = sub nsw i64 %199, %200
  %202 = icmp sge i64 %201, 0
  br i1 %202, label %203, label %233

203:                                              ; preds = %197
  %204 = load i32, ptr %6, align 4, !tbaa !5
  %205 = sub nsw i32 %204, 1
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [60 x [5010 x [2 x i64]]], ptr @DP, i64 0, i64 %206
  %208 = load i32, ptr %9, align 4, !tbaa !5
  %209 = sext i32 %208 to i64
  %210 = load i64, ptr %8, align 8, !tbaa !11
  %211 = sub nsw i64 %209, %210
  %212 = getelementptr inbounds [5010 x [2 x i64]], ptr %207, i64 0, i64 %211
  %213 = getelementptr inbounds [2 x i64], ptr %212, i64 0, i64 0
  %214 = load i64, ptr %213, align 16, !tbaa !11
  %215 = load i32, ptr %6, align 4, !tbaa !5
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds [60 x [5010 x [2 x i64]]], ptr @DP, i64 0, i64 %216
  %218 = load i32, ptr %9, align 4, !tbaa !5
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds [5010 x [2 x i64]], ptr %217, i64 0, i64 %219
  %221 = getelementptr inbounds [2 x i64], ptr %220, i64 0, i64 1
  %222 = load i64, ptr %221, align 8, !tbaa !11
  %223 = add nsw i64 %222, %214
  store i64 %223, ptr %221, align 8, !tbaa !11
  %224 = load i32, ptr %6, align 4, !tbaa !5
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds [60 x [5010 x [2 x i64]]], ptr @DP, i64 0, i64 %225
  %227 = load i32, ptr %9, align 4, !tbaa !5
  %228 = sext i32 %227 to i64
  %229 = getelementptr inbounds [5010 x [2 x i64]], ptr %226, i64 0, i64 %228
  %230 = getelementptr inbounds [2 x i64], ptr %229, i64 0, i64 1
  %231 = load i64, ptr %230, align 8, !tbaa !11
  %232 = srem i64 %231, 1000000007
  store i64 %232, ptr %230, align 8, !tbaa !11
  br label %233

233:                                              ; preds = %203, %197
  br label %234

234:                                              ; preds = %233
  %235 = load i32, ptr %9, align 4, !tbaa !5
  %236 = add nsw i32 %235, 1
  store i32 %236, ptr %9, align 4, !tbaa !5
  br label %73, !llvm.loop !17

237:                                              ; preds = %77
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %238

238:                                              ; preds = %237
  %239 = load i32, ptr %6, align 4, !tbaa !5
  %240 = add nsw i32 %239, 1
  store i32 %240, ptr %6, align 4, !tbaa !5
  br label %63, !llvm.loop !18

241:                                              ; preds = %67
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %242 = load i32, ptr @N, align 4, !tbaa !5
  %243 = sext i32 %242 to i64
  %244 = getelementptr inbounds [60 x [5010 x [2 x i64]]], ptr @DP, i64 0, i64 %243
  %245 = load i32, ptr @K, align 4, !tbaa !5
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds [5010 x [2 x i64]], ptr %244, i64 0, i64 %246
  %248 = getelementptr inbounds [2 x i64], ptr %247, i64 0, i64 0
  %249 = load i64, ptr %248, align 16, !tbaa !11
  store i64 %249, ptr %12, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %250

250:                                              ; preds = %268, %241
  %251 = load i32, ptr %13, align 4, !tbaa !5
  %252 = load i32, ptr @K, align 4, !tbaa !5
  %253 = icmp sle i32 %251, %252
  br i1 %253, label %255, label %254

254:                                              ; preds = %250
  store i32 22, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %271

255:                                              ; preds = %250
  %256 = load i32, ptr @N, align 4, !tbaa !5
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds [60 x [5010 x [2 x i64]]], ptr @DP, i64 0, i64 %257
  %259 = load i32, ptr %13, align 4, !tbaa !5
  %260 = sext i32 %259 to i64
  %261 = getelementptr inbounds [5010 x [2 x i64]], ptr %258, i64 0, i64 %260
  %262 = getelementptr inbounds [2 x i64], ptr %261, i64 0, i64 1
  %263 = load i64, ptr %262, align 8, !tbaa !11
  %264 = load i64, ptr %12, align 8, !tbaa !11
  %265 = add nsw i64 %264, %263
  store i64 %265, ptr %12, align 8, !tbaa !11
  %266 = load i64, ptr %12, align 8, !tbaa !11
  %267 = srem i64 %266, 1000000007
  store i64 %267, ptr %12, align 8, !tbaa !11
  br label %268

268:                                              ; preds = %255
  %269 = load i32, ptr %13, align 4, !tbaa !5
  %270 = add nsw i32 %269, 1
  store i32 %270, ptr %13, align 4, !tbaa !5
  br label %250, !llvm.loop !19

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #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 norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { 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 #6 = { nounwind }

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

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


; 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
@K = external dso_local global i32, align 4
@A = external dso_local global [100 x i64], align 16
@cnt = external dso_local local_unnamed_addr global [100 x i64], align 16
@DP = external dso_local global [60 x [5010 x [2 x i64]]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = 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)
  %4 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 4 dereferenceable(4) @K)
  %5 = load i32, ptr @N, align 4, !tbaa !5
  %.not85 = icmp slt i32 %5, 1
  br i1 %.not85, label %._crit_edge94, label %.lr.ph

.preheader:                                       ; preds = %.lr.ph
  %.not7591 = icmp slt i32 %9, 1
  br i1 %.not7591, label %._crit_edge94, label %.lr.ph93.preheader

.lr.ph93.preheader:                               ; preds = %.preheader
  %6 = add nuw i32 %9, 1
  %wide.trip.count = zext i32 %6 to i64
  br label %.lr.ph93

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %7 = getelementptr inbounds [100 x i64], ptr @A, i64 0, i64 %indvars.iv
  %8 = 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) %7)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %9 = load i32, ptr @N, align 4, !tbaa !5
  %10 = sext i32 %9 to i64
  %.not.not = icmp slt i64 %indvars.iv, %10
  br i1 %.not.not, label %.lr.ph, label %.preheader, !llvm.loop !9

._crit_edge94:                                    ; preds = %27, %0, %.preheader
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  store i32 0, ptr %1, align 4, !tbaa !5
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull @DP, ptr noundef nonnull getelementptr inbounds (i8, ptr @DP, i64 4809600), ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  store i64 1, ptr @DP, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  store i32 5000, ptr %2, align 4, !tbaa !5
  %11 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @K, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %12 = load i32, ptr %11, align 4, !tbaa !5
  store i32 %12, ptr @K, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  %13 = load i32, ptr @N, align 4, !tbaa !5
  %.not76112 = icmp slt i32 %13, 1
  br i1 %.not76112, label %._crit_edge116, label %.lr.ph115

.lr.ph115:                                        ; preds = %._crit_edge94
  %.not78105 = icmp slt i32 %12, 0
  br i1 %.not78105, label %._crit_edge116.thread, label %.lr.ph108.preheader

._crit_edge116.thread:                            ; preds = %.lr.ph115
  %14 = zext nneg i32 %13 to i64
  %15 = sext i32 %12 to i64
  %16 = getelementptr inbounds [60 x [5010 x [2 x i64]]], ptr @DP, i64 0, i64 %14, i64 %15
  %17 = load i64, ptr %16, align 16, !tbaa !11
  br label %._crit_edge123

.lr.ph108.preheader:                              ; preds = %.lr.ph115
  %18 = zext nneg i32 %12 to i64
  %19 = add nuw i32 %12, 1
  %20 = add nuw i32 %13, 1
  %wide.trip.count165 = zext i32 %20 to i64
  %wide.trip.count142 = zext i32 %19 to i64
  %wide.trip.count147 = zext i32 %19 to i64
  %wide.trip.count160 = zext i32 %19 to i64
  br label %.lr.ph108

.lr.ph93:                                         ; preds = %.lr.ph93.preheader, %27
  %indvars.iv132 = phi i64 [ 1, %.lr.ph93.preheader ], [ %indvars.iv.next133, %27 ]
  %21 = getelementptr inbounds [100 x i64], ptr @cnt, i64 0, i64 %indvars.iv132
  %22 = getelementptr inbounds [100 x i64], ptr @A, i64 0, i64 %indvars.iv132
  %.promoted = load i64, ptr %22, align 8, !tbaa !11
  %23 = icmp sgt i64 %.promoted, 0
  br i1 %23, label %.lr.ph88, label %27

.lr.ph88:                                         ; preds = %.lr.ph93, %.lr.ph88
  %storemerge87 = phi i64 [ %26, %.lr.ph88 ], [ 0, %.lr.ph93 ]
  %24 = phi i64 [ %25, %.lr.ph88 ], [ %.promoted, %.lr.ph93 ]
  %25 = lshr i64 %24, 1
  %26 = add nuw nsw i64 %storemerge87, 1
  %.not = icmp ult i64 %24, 2
  br i1 %.not, label %._crit_edge, label %.lr.ph88, !llvm.loop !13

._crit_edge:                                      ; preds = %.lr.ph88
  store i64 %25, ptr %22, align 8, !tbaa !11
  br label %27

27:                                               ; preds = %._crit_edge, %.lr.ph93
  %storemerge.lcssa = phi i64 [ %26, %._crit_edge ], [ 0, %.lr.ph93 ]
  store i64 %storemerge.lcssa, ptr %21, align 8, !tbaa !11
  %indvars.iv.next133 = add nuw nsw i64 %indvars.iv132, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next133, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge94, label %.lr.ph93, !llvm.loop !14

._crit_edge116:                                   ; preds = %._crit_edge109, %._crit_edge94
  %28 = sext i32 %13 to i64
  %29 = sext i32 %12 to i64
  %30 = getelementptr inbounds [60 x [5010 x [2 x i64]]], ptr @DP, i64 0, i64 %28, i64 %29
  %31 = load i64, ptr %30, align 16, !tbaa !11
  %.not77118 = icmp slt i32 %12, 0
  br i1 %.not77118, label %._crit_edge123, label %.lr.ph122.preheader

.lr.ph122.preheader:                              ; preds = %._crit_edge116
  %32 = add nuw i32 %12, 1
  %wide.trip.count170 = zext i32 %32 to i64
  %xtraiter = and i64 %wide.trip.count170, 1
  %33 = icmp eq i32 %12, 0
  br i1 %33, label %._crit_edge123.loopexit.unr-lcssa, label %.lr.ph122.preheader.new

.lr.ph122.preheader.new:                          ; preds = %.lr.ph122.preheader
  %unroll_iter = and i64 %wide.trip.count170, 4294967294
  br label %.lr.ph122

.lr.ph108:                                        ; preds = %.lr.ph108.preheader, %._crit_edge109
  %indvars.iv162 = phi i64 [ 1, %.lr.ph108.preheader ], [ %indvars.iv.next163, %._crit_edge109 ]
  %34 = getelementptr inbounds [100 x i64], ptr @cnt, i64 0, i64 %indvars.iv162
  %35 = load i64, ptr %34, align 8, !tbaa !11
  %.not79.not95 = icmp sgt i64 %35, 0
  %36 = add nsw i64 %indvars.iv162, -1
  %.not80100 = icmp slt i64 %35, 0
  br i1 %.not79.not95, label %.lr.ph98.us, label %.lr.ph108.split

.lr.ph98.us:                                      ; preds = %.lr.ph108, %56
  %indvars.iv157 = phi i64 [ %indvars.iv.next158, %56 ], [ 0, %.lr.ph108 ]
  %37 = getelementptr inbounds [60 x [5010 x [2 x i64]]], ptr @DP, i64 0, i64 %indvars.iv162, i64 %indvars.iv157
  store i64 0, ptr %37, align 16, !tbaa !11
  br label %57

.lr.ph103.us:                                     ; preds = %._crit_edge99.us, %46
  %38 = phi i64 [ %47, %46 ], [ 0, %._crit_edge99.us ]
  %indvars.iv153 = phi i64 [ %indvars.iv.next154, %46 ], [ 0, %._crit_edge99.us ]
  %39 = sub nsw i64 %indvars.iv157, %indvars.iv153
  %40 = icmp slt i64 %39, 0
  %.not81.us = icmp sgt i64 %39, %18
  %or.cond83.us = select i1 %40, i1 true, i1 %.not81.us
  br i1 %or.cond83.us, label %46, label %41

41:                                               ; preds = %.lr.ph103.us
  %42 = getelementptr inbounds [60 x [5010 x [2 x i64]]], ptr @DP, i64 0, i64 %36, i64 %39, i64 1
  %43 = load i64, ptr %42, align 8, !tbaa !11
  %44 = add nsw i64 %38, %43
  %45 = srem i64 %44, 1000000007
  store i64 %45, ptr %68, align 8, !tbaa !11
  br label %46

46:                                               ; preds = %41, %.lr.ph103.us
  %47 = phi i64 [ %45, %41 ], [ %38, %.lr.ph103.us ]
  %indvars.iv.next154 = add nuw nsw i64 %indvars.iv153, 1
  %exitcond156 = icmp eq i64 %indvars.iv153, %35
  br i1 %exitcond156, label %._crit_edge104.us, label %.lr.ph103.us, !llvm.loop !15

._crit_edge104.us:                                ; preds = %46, %._crit_edge99.us
  %48 = phi i64 [ 0, %._crit_edge99.us ], [ %47, %46 ]
  %49 = sub nsw i64 %indvars.iv157, %35
  %50 = icmp sgt i64 %49, -1
  br i1 %50, label %51, label %56

51:                                               ; preds = %._crit_edge104.us
  %52 = getelementptr inbounds [60 x [5010 x [2 x i64]]], ptr @DP, i64 0, i64 %36, i64 %49
  %53 = load i64, ptr %52, align 16, !tbaa !11
  %54 = add nsw i64 %48, %53
  %55 = srem i64 %54, 1000000007
  store i64 %55, ptr %68, align 8, !tbaa !11
  br label %56

56:                                               ; preds = %51, %._crit_edge104.us
  %indvars.iv.next158 = add nuw nsw i64 %indvars.iv157, 1
  %exitcond161.not = icmp eq i64 %indvars.iv.next158, %wide.trip.count160
  br i1 %exitcond161.not, label %._crit_edge109, label %.lr.ph98.us, !llvm.loop !16

57:                                               ; preds = %.lr.ph98.us, %66
  %58 = phi i64 [ 0, %.lr.ph98.us ], [ %67, %66 ]
  %indvars.iv149 = phi i64 [ 0, %.lr.ph98.us ], [ %indvars.iv.next150, %66 ]
  %59 = sub nsw i64 %indvars.iv157, %indvars.iv149
  %60 = icmp slt i64 %59, 0
  %.not82.us = icmp sgt i64 %59, %18
  %or.cond.us = select i1 %60, i1 true, i1 %.not82.us
  br i1 %or.cond.us, label %66, label %61

61:                                               ; preds = %57
  %62 = getelementptr inbounds [60 x [5010 x [2 x i64]]], ptr @DP, i64 0, i64 %36, i64 %59
  %63 = load i64, ptr %62, align 16, !tbaa !11
  %64 = add nsw i64 %58, %63
  %65 = srem i64 %64, 1000000007
  store i64 %65, ptr %37, align 16, !tbaa !11
  br label %66

66:                                               ; preds = %61, %57
  %67 = phi i64 [ %65, %61 ], [ %58, %57 ]
  %indvars.iv.next150 = add nuw nsw i64 %indvars.iv149, 1
  %exitcond152.not = icmp eq i64 %indvars.iv.next150, %35
  br i1 %exitcond152.not, label %._crit_edge99.us, label %57, !llvm.loop !17

._crit_edge99.us:                                 ; preds = %66
  %68 = getelementptr inbounds i8, ptr %37, i64 8
  store i64 0, ptr %68, align 8, !tbaa !11
  br i1 %.not80100, label %._crit_edge104.us, label %.lr.ph103.us

.lr.ph108.split:                                  ; preds = %.lr.ph108
  br i1 %.not80100, label %.lr.ph108.split.split.us, label %.lr.ph103

.lr.ph108.split.split.us:                         ; preds = %.lr.ph108.split, %77
  %indvars.iv144 = phi i64 [ %indvars.iv.next145, %77 ], [ 0, %.lr.ph108.split ]
  %69 = getelementptr inbounds [60 x [5010 x [2 x i64]]], ptr @DP, i64 0, i64 %indvars.iv162, i64 %indvars.iv144
  %70 = sub nsw i64 %indvars.iv144, %35
  %71 = icmp sgt i64 %70, -1
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %69, i8 0, i64 16, i1 false)
  br i1 %71, label %72, label %77

72:                                               ; preds = %.lr.ph108.split.split.us
  %73 = getelementptr inbounds i8, ptr %69, i64 8
  %74 = getelementptr inbounds [60 x [5010 x [2 x i64]]], ptr @DP, i64 0, i64 %36, i64 %70
  %75 = load i64, ptr %74, align 16, !tbaa !11
  %76 = srem i64 %75, 1000000007
  store i64 %76, ptr %73, align 8, !tbaa !11
  br label %77

77:                                               ; preds = %72, %.lr.ph108.split.split.us
  %indvars.iv.next145 = add nuw nsw i64 %indvars.iv144, 1
  %exitcond148.not = icmp eq i64 %indvars.iv.next145, %wide.trip.count147
  br i1 %exitcond148.not, label %._crit_edge109, label %.lr.ph108.split.split.us, !llvm.loop !16

._crit_edge109:                                   ; preds = %92, %77, %56
  %indvars.iv.next163 = add nuw nsw i64 %indvars.iv162, 1
  %exitcond166.not = icmp eq i64 %indvars.iv.next163, %wide.trip.count165
  br i1 %exitcond166.not, label %._crit_edge116, label %.lr.ph108, !llvm.loop !18

.lr.ph103:                                        ; preds = %.lr.ph108.split, %92
  %indvars.iv139 = phi i64 [ %indvars.iv.next140, %92 ], [ 0, %.lr.ph108.split ]
  %78 = getelementptr inbounds [60 x [5010 x [2 x i64]]], ptr @DP, i64 0, i64 %indvars.iv162, i64 %indvars.iv139
  %79 = getelementptr inbounds i8, ptr %78, i64 8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %78, i8 0, i64 16, i1 false)
  %.not81 = icmp ugt i64 %indvars.iv139, %18
  br i1 %.not81, label %._crit_edge104, label %80

80:                                               ; preds = %.lr.ph103
  %81 = getelementptr inbounds [60 x [5010 x [2 x i64]]], ptr @DP, i64 0, i64 %36, i64 %indvars.iv139, i64 1
  %82 = load i64, ptr %81, align 8, !tbaa !11
  %83 = srem i64 %82, 1000000007
  store i64 %83, ptr %79, align 8, !tbaa !11
  br label %._crit_edge104

._crit_edge104:                                   ; preds = %.lr.ph103, %80
  %84 = phi i64 [ 0, %.lr.ph103 ], [ %83, %80 ]
  %85 = sub nsw i64 %indvars.iv139, %35
  %86 = icmp sgt i64 %85, -1
  br i1 %86, label %87, label %92

87:                                               ; preds = %._crit_edge104
  %88 = getelementptr inbounds [60 x [5010 x [2 x i64]]], ptr @DP, i64 0, i64 %36, i64 %85
  %89 = load i64, ptr %88, align 16, !tbaa !11
  %90 = add nsw i64 %84, %89
  %91 = srem i64 %90, 1000000007
  store i64 %91, ptr %79, align 8, !tbaa !11
  br label %92

92:                                               ; preds = %._crit_edge104, %87
  %indvars.iv.next140 = add nuw nsw i64 %indvars.iv139, 1
  %exitcond143.not = icmp eq i64 %indvars.iv.next140, %wide.trip.count142
  br i1 %exitcond143.not, label %._crit_edge109, label %.lr.ph103, !llvm.loop !16

._crit_edge123.loopexit.unr-lcssa:                ; preds = %.lr.ph122, %.lr.ph122.preheader
  %.lcssa.ph = phi i64 [ poison, %.lr.ph122.preheader ], [ %106, %.lr.ph122 ]
  %indvars.iv167.unr = phi i64 [ 0, %.lr.ph122.preheader ], [ %indvars.iv.next168.1, %.lr.ph122 ]
  %.062119.unr = phi i64 [ %31, %.lr.ph122.preheader ], [ %106, %.lr.ph122 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge123, label %.lr.ph122.epil

.lr.ph122.epil:                                   ; preds = %._crit_edge123.loopexit.unr-lcssa
  %93 = getelementptr inbounds [60 x [5010 x [2 x i64]]], ptr @DP, i64 0, i64 %28, i64 %indvars.iv167.unr, i64 1
  %94 = load i64, ptr %93, align 8, !tbaa !11
  %95 = add nsw i64 %94, %.062119.unr
  %96 = srem i64 %95, 1000000007
  br label %._crit_edge123

._crit_edge123:                                   ; preds = %.lr.ph122.epil, %._crit_edge123.loopexit.unr-lcssa, %._crit_edge116.thread, %._crit_edge116
  %.062.lcssa = phi i64 [ %31, %._crit_edge116 ], [ %17, %._crit_edge116.thread ], [ %.lcssa.ph, %._crit_edge123.loopexit.unr-lcssa ], [ %96, %.lr.ph122.epil ]
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.062.lcssa)
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %97, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0

.lr.ph122:                                        ; preds = %.lr.ph122, %.lr.ph122.preheader.new
  %indvars.iv167 = phi i64 [ 0, %.lr.ph122.preheader.new ], [ %indvars.iv.next168.1, %.lr.ph122 ]
  %.062119 = phi i64 [ %31, %.lr.ph122.preheader.new ], [ %106, %.lr.ph122 ]
  %niter = phi i64 [ 0, %.lr.ph122.preheader.new ], [ %niter.next.1, %.lr.ph122 ]
  %99 = getelementptr inbounds [60 x [5010 x [2 x i64]]], ptr @DP, i64 0, i64 %28, i64 %indvars.iv167, i64 1
  %100 = load i64, ptr %99, align 8, !tbaa !11
  %101 = add nsw i64 %100, %.062119
  %102 = srem i64 %101, 1000000007
  %indvars.iv.next168 = or disjoint i64 %indvars.iv167, 1
  %103 = getelementptr inbounds [60 x [5010 x [2 x i64]]], ptr @DP, i64 0, i64 %28, i64 %indvars.iv.next168, i64 1
  %104 = load i64, ptr %103, align 8, !tbaa !11
  %105 = add nsw i64 %104, %102
  %106 = srem i64 %105, 1000000007
  %indvars.iv.next168.1 = add nuw nsw i64 %indvars.iv167, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge123.loopexit.unr-lcssa, label %.lr.ph122, !llvm.loop !19
}

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 #1

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

; Function Attrs: mustprogress 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #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

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}


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