; LLVM IR from abeaumont/competitive-programming :: atcoder/dp (r)

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

@dp = external dso_local global [60 x [50 x [50 x i64]]], align 16
@ans = external dso_local global [50 x [50 x i64]], align 16
@tmp = external dso_local global [50 x [50 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 i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i64, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %21 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %22 = getelementptr i8, ptr %21, i64 -24
  %23 = load i64, ptr %22, align 8
  %24 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %23
  %25 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %24, ptr noundef null)
  %26 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 0, ptr %4, align 4, !tbaa !8
  br label %29

29:                                               ; preds = %54, %0
  %30 = load i32, ptr %4, align 4, !tbaa !8
  %31 = sext i32 %30 to i64
  %32 = load i64, ptr %2, align 8, !tbaa !11
  %33 = icmp slt i64 %31, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %29
  store i32 2, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %57

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

36:                                               ; preds = %50, %35
  %37 = load i32, ptr %6, align 4, !tbaa !8
  %38 = sext i32 %37 to i64
  %39 = load i64, ptr %2, align 8, !tbaa !11
  %40 = icmp slt i64 %38, %39
  br i1 %40, label %42, label %41

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

42:                                               ; preds = %36
  %43 = load i32, ptr %4, align 4, !tbaa !8
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [50 x [50 x i64]], ptr @dp, i64 0, i64 %44
  %46 = load i32, ptr %6, align 4, !tbaa !8
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [50 x i64], ptr %45, i64 0, i64 %47
  %49 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %48)
  br label %50

50:                                               ; preds = %42
  %51 = load i32, ptr %6, align 4, !tbaa !8
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %6, align 4, !tbaa !8
  br label %36, !llvm.loop !13

53:                                               ; preds = %41
  br label %54

54:                                               ; preds = %53
  %55 = load i32, ptr %4, align 4, !tbaa !8
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %4, align 4, !tbaa !8
  br label %29, !llvm.loop !15

57:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store i64 1, ptr %7, align 8, !tbaa !11
  br label %58

58:                                               ; preds = %130, %57
  %59 = load i64, ptr %7, align 8, !tbaa !11
  %60 = shl i64 1, %59
  %61 = load i64, ptr %3, align 8, !tbaa !11
  %62 = icmp sle i64 %60, %61
  br i1 %62, label %63, label %133

63:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !8
  br label %64

64:                                               ; preds = %126, %63
  %65 = load i32, ptr %8, align 4, !tbaa !8
  %66 = sext i32 %65 to i64
  %67 = load i64, ptr %2, align 8, !tbaa !11
  %68 = icmp slt i64 %66, %67
  br i1 %68, label %70, label %69

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

70:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !8
  br label %71

71:                                               ; preds = %122, %70
  %72 = load i32, ptr %9, align 4, !tbaa !8
  %73 = sext i32 %72 to i64
  %74 = load i64, ptr %2, align 8, !tbaa !11
  %75 = icmp slt i64 %73, %74
  br i1 %75, label %77, label %76

76:                                               ; preds = %71
  store i32 14, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %125

77:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !8
  br label %78

78:                                               ; preds = %118, %77
  %79 = load i32, ptr %10, align 4, !tbaa !8
  %80 = sext i32 %79 to i64
  %81 = load i64, ptr %2, align 8, !tbaa !11
  %82 = icmp slt i64 %80, %81
  br i1 %82, label %84, label %83

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

84:                                               ; preds = %78
  %85 = load i64, ptr %7, align 8, !tbaa !11
  %86 = sub nsw i64 %85, 1
  %87 = getelementptr inbounds [60 x [50 x [50 x i64]]], ptr @dp, i64 0, i64 %86
  %88 = load i32, ptr %8, align 4, !tbaa !8
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [50 x [50 x i64]], ptr %87, i64 0, i64 %89
  %91 = load i32, ptr %9, align 4, !tbaa !8
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [50 x i64], ptr %90, i64 0, i64 %92
  %94 = load i64, ptr %93, align 8, !tbaa !11
  %95 = load i64, ptr %7, align 8, !tbaa !11
  %96 = sub nsw i64 %95, 1
  %97 = getelementptr inbounds [60 x [50 x [50 x i64]]], ptr @dp, i64 0, i64 %96
  %98 = load i32, ptr %9, align 4, !tbaa !8
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [50 x [50 x i64]], ptr %97, i64 0, i64 %99
  %101 = load i32, ptr %10, align 4, !tbaa !8
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [50 x i64], ptr %100, i64 0, i64 %102
  %104 = load i64, ptr %103, align 8, !tbaa !11
  %105 = mul nsw i64 %94, %104
  %106 = load i64, ptr %7, align 8, !tbaa !11
  %107 = getelementptr inbounds [60 x [50 x [50 x i64]]], ptr @dp, i64 0, i64 %106
  %108 = load i32, ptr %8, align 4, !tbaa !8
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [50 x [50 x i64]], ptr %107, i64 0, i64 %109
  %111 = load i32, ptr %10, align 4, !tbaa !8
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [50 x i64], ptr %110, i64 0, i64 %112
  %114 = load i64, ptr %113, align 8, !tbaa !11
  %115 = add nsw i64 %114, %105
  store i64 %115, ptr %113, align 8, !tbaa !11
  %116 = load i64, ptr %113, align 8, !tbaa !11
  %117 = srem i64 %116, 1000000007
  store i64 %117, ptr %113, align 8, !tbaa !11
  br label %118

118:                                              ; preds = %84
  %119 = load i32, ptr %10, align 4, !tbaa !8
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %10, align 4, !tbaa !8
  br label %78, !llvm.loop !16

121:                                              ; preds = %83
  br label %122

122:                                              ; preds = %121
  %123 = load i32, ptr %9, align 4, !tbaa !8
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %9, align 4, !tbaa !8
  br label %71, !llvm.loop !17

125:                                              ; preds = %76
  br label %126

126:                                              ; preds = %125
  %127 = load i32, ptr %8, align 4, !tbaa !8
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %8, align 4, !tbaa !8
  br label %64, !llvm.loop !18

129:                                              ; preds = %69
  br label %130

130:                                              ; preds = %129
  %131 = load i64, ptr %7, align 8, !tbaa !11
  %132 = add nsw i64 %131, 1
  store i64 %132, ptr %7, align 8, !tbaa !11
  br label %58, !llvm.loop !19

133:                                              ; preds = %58
  %134 = load i64, ptr %7, align 8, !tbaa !11
  %135 = add nsw i64 %134, -1
  store i64 %135, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !8
  br label %136

136:                                              ; preds = %169, %133
  %137 = load i32, ptr %11, align 4, !tbaa !8
  %138 = sext i32 %137 to i64
  %139 = load i64, ptr %2, align 8, !tbaa !11
  %140 = icmp slt i64 %138, %139
  br i1 %140, label %142, label %141

141:                                              ; preds = %136
  store i32 20, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %172

142:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !8
  br label %143

143:                                              ; preds = %165, %142
  %144 = load i32, ptr %12, align 4, !tbaa !8
  %145 = sext i32 %144 to i64
  %146 = load i64, ptr %2, align 8, !tbaa !11
  %147 = icmp slt i64 %145, %146
  br i1 %147, label %149, label %148

148:                                              ; preds = %143
  store i32 23, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %168

149:                                              ; preds = %143
  %150 = load i64, ptr %7, align 8, !tbaa !11
  %151 = getelementptr inbounds [60 x [50 x [50 x i64]]], ptr @dp, i64 0, i64 %150
  %152 = load i32, ptr %11, align 4, !tbaa !8
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [50 x [50 x i64]], ptr %151, i64 0, i64 %153
  %155 = load i32, ptr %12, align 4, !tbaa !8
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [50 x i64], ptr %154, i64 0, i64 %156
  %158 = load i64, ptr %157, align 8, !tbaa !11
  %159 = load i32, ptr %11, align 4, !tbaa !8
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [50 x [50 x i64]], ptr @ans, i64 0, i64 %160
  %162 = load i32, ptr %12, align 4, !tbaa !8
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [50 x i64], ptr %161, i64 0, i64 %163
  store i64 %158, ptr %164, align 8, !tbaa !11
  br label %165

165:                                              ; preds = %149
  %166 = load i32, ptr %12, align 4, !tbaa !8
  %167 = add nsw i32 %166, 1
  store i32 %167, ptr %12, align 4, !tbaa !8
  br label %143, !llvm.loop !20

168:                                              ; preds = %148
  br label %169

169:                                              ; preds = %168
  %170 = load i32, ptr %11, align 4, !tbaa !8
  %171 = add nsw i32 %170, 1
  store i32 %171, ptr %11, align 4, !tbaa !8
  br label %136, !llvm.loop !21

172:                                              ; preds = %141
  br label %173

173:                                              ; preds = %264, %172
  %174 = load i64, ptr %7, align 8, !tbaa !11
  %175 = add nsw i64 %174, -1
  store i64 %175, ptr %7, align 8, !tbaa !11
  %176 = icmp sge i64 %175, 0
  br i1 %176, label %177, label %265

177:                                              ; preds = %173
  %178 = load i64, ptr %3, align 8, !tbaa !11
  %179 = load i64, ptr %7, align 8, !tbaa !11
  %180 = shl i64 1, %179
  %181 = and i64 %178, %180
  %182 = icmp ne i64 %181, 0
  br i1 %182, label %183, label %264

183:                                              ; preds = %177
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !8
  br label %184

184:                                              ; preds = %200, %183
  %185 = load i32, ptr %13, align 4, !tbaa !8
  %186 = sext i32 %185 to i64
  %187 = load i64, ptr %2, align 8, !tbaa !11
  %188 = icmp slt i64 %186, %187
  br i1 %188, label %190, label %189

189:                                              ; preds = %184
  store i32 28, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %203

190:                                              ; preds = %184
  %191 = load i32, ptr %13, align 4, !tbaa !8
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [50 x [50 x i64]], ptr @tmp, i64 0, i64 %192
  %194 = getelementptr inbounds [50 x i64], ptr %193, i64 0, i64 0
  %195 = load i32, ptr %13, align 4, !tbaa !8
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [50 x [50 x i64]], ptr @tmp, i64 0, i64 %196
  %198 = load i64, ptr %2, align 8, !tbaa !11
  %199 = getelementptr inbounds [50 x i64], ptr %197, i64 0, i64 %198
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !8
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef %194, ptr noundef %199, ptr noundef nonnull align 4 dereferenceable(4) %14)
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %200

200:                                              ; preds = %190
  %201 = load i32, ptr %13, align 4, !tbaa !8
  %202 = add nsw i32 %201, 1
  store i32 %202, ptr %13, align 4, !tbaa !8
  br label %184, !llvm.loop !22

203:                                              ; preds = %189
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !8
  br label %204

204:                                              ; preds = %260, %203
  %205 = load i32, ptr %15, align 4, !tbaa !8
  %206 = sext i32 %205 to i64
  %207 = load i64, ptr %2, align 8, !tbaa !11
  %208 = icmp slt i64 %206, %207
  br i1 %208, label %210, label %209

209:                                              ; preds = %204
  store i32 31, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %263

210:                                              ; preds = %204
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !8
  br label %211

211:                                              ; preds = %256, %210
  %212 = load i32, ptr %16, align 4, !tbaa !8
  %213 = sext i32 %212 to i64
  %214 = load i64, ptr %2, align 8, !tbaa !11
  %215 = icmp slt i64 %213, %214
  br i1 %215, label %217, label %216

216:                                              ; preds = %211
  store i32 34, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %259

217:                                              ; preds = %211
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !8
  br label %218

218:                                              ; preds = %252, %217
  %219 = load i32, ptr %17, align 4, !tbaa !8
  %220 = sext i32 %219 to i64
  %221 = load i64, ptr %2, align 8, !tbaa !11
  %222 = icmp slt i64 %220, %221
  br i1 %222, label %224, label %223

223:                                              ; preds = %218
  store i32 37, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %255

224:                                              ; preds = %218
  %225 = load i32, ptr %15, align 4, !tbaa !8
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds [50 x [50 x i64]], ptr @ans, i64 0, i64 %226
  %228 = load i32, ptr %16, align 4, !tbaa !8
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds [50 x i64], ptr %227, i64 0, i64 %229
  %231 = load i64, ptr %230, align 8, !tbaa !11
  %232 = load i64, ptr %7, align 8, !tbaa !11
  %233 = getelementptr inbounds [60 x [50 x [50 x i64]]], ptr @dp, i64 0, i64 %232
  %234 = load i32, ptr %16, align 4, !tbaa !8
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds [50 x [50 x i64]], ptr %233, i64 0, i64 %235
  %237 = load i32, ptr %17, align 4, !tbaa !8
  %238 = sext i32 %237 to i64
  %239 = getelementptr inbounds [50 x i64], ptr %236, i64 0, i64 %238
  %240 = load i64, ptr %239, align 8, !tbaa !11
  %241 = mul nsw i64 %231, %240
  %242 = load i32, ptr %15, align 4, !tbaa !8
  %243 = sext i32 %242 to i64
  %244 = getelementptr inbounds [50 x [50 x i64]], ptr @tmp, i64 0, i64 %243
  %245 = load i32, ptr %17, align 4, !tbaa !8
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds [50 x i64], ptr %244, i64 0, i64 %246
  %248 = load i64, ptr %247, align 8, !tbaa !11
  %249 = add nsw i64 %248, %241
  store i64 %249, ptr %247, align 8, !tbaa !11
  %250 = load i64, ptr %247, align 8, !tbaa !11
  %251 = srem i64 %250, 1000000007
  store i64 %251, ptr %247, align 8, !tbaa !11
  br label %252

252:                                              ; preds = %224
  %253 = load i32, ptr %17, align 4, !tbaa !8
  %254 = add nsw i32 %253, 1
  store i32 %254, ptr %17, align 4, !tbaa !8
  br label %218, !llvm.loop !23

255:                                              ; preds = %223
  br label %256

256:                                              ; preds = %255
  %257 = load i32, ptr %16, align 4, !tbaa !8
  %258 = add nsw i32 %257, 1
  store i32 %258, ptr %16, align 4, !tbaa !8
  br label %211, !llvm.loop !24

259:                                              ; preds = %216
  br label %260

260:                                              ; preds = %259
  %261 = load i32, ptr %15, align 4, !tbaa !8
  %262 = add nsw i32 %261, 1
  store i32 %262, ptr %15, align 4, !tbaa !8
  br label %204, !llvm.loop !25

263:                                              ; preds = %209
  call void @_ZSt4swapIA50_xLm50EENSt9enable_ifIXsr14__is_swappableIT_EE5valueEvE4typeERAT0__S2_S6_(ptr noundef nonnull align 8 dereferenceable(20000) @ans, ptr noundef nonnull align 8 dereferenceable(20000) @tmp) #7
  br label %264

264:                                              ; preds = %263, %177
  br label %173, !llvm.loop !26

265:                                              ; preds = %173
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  store i64 0, ptr %18, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 0, ptr %19, align 4, !tbaa !8
  br label %266

266:                                              ; preds = %295, %265
  %267 = load i32, ptr %19, align 4, !tbaa !8
  %268 = sext i32 %267 to i64
  %269 = load i64, ptr %2, align 8, !tbaa !11
  %270 = icmp slt i64 %268, %269
  br i1 %270, label %272, label %271

271:                                              ; preds = %266
  store i32 40, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %298

272:                                              ; preds = %266
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 0, ptr %20, align 4, !tbaa !8
  br label %273

273:                                              ; preds = %291, %272
  %274 = load i32, ptr %20, align 4, !tbaa !8
  %275 = sext i32 %274 to i64
  %276 = load i64, ptr %2, align 8, !tbaa !11
  %277 = icmp slt i64 %275, %276
  br i1 %277, label %279, label %278

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

279:                                              ; preds = %273
  %280 = load i32, ptr %19, align 4, !tbaa !8
  %281 = sext i32 %280 to i64
  %282 = getelementptr inbounds [50 x [50 x i64]], ptr @ans, i64 0, i64 %281
  %283 = load i32, ptr %20, align 4, !tbaa !8
  %284 = sext i32 %283 to i64
  %285 = getelementptr inbounds [50 x i64], ptr %282, i64 0, i64 %284
  %286 = load i64, ptr %285, align 8, !tbaa !11
  %287 = load i64, ptr %18, align 8, !tbaa !11
  %288 = add nsw i64 %287, %286
  store i64 %288, ptr %18, align 8, !tbaa !11
  %289 = load i64, ptr %18, align 8, !tbaa !11
  %290 = srem i64 %289, 1000000007
  store i64 %290, ptr %18, align 8, !tbaa !11
  br label %291

291:                                              ; preds = %279
  %292 = load i32, ptr %20, align 4, !tbaa !8
  %293 = add nsw i32 %292, 1
  store i32 %293, ptr %20, align 4, !tbaa !8
  br label %273, !llvm.loop !27

294:                                              ; preds = %278
  br label %295

295:                                              ; preds = %294
  %296 = load i32, ptr %19, align 4, !tbaa !8
  %297 = add nsw i32 %296, 1
  store i32 %297, ptr %19, align 4, !tbaa !8
  br label %266, !llvm.loop !28

298:                                              ; preds = %271
  %299 = load i64, ptr %18, align 8, !tbaa !11
  %300 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %299)
  %301 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %300, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  %302 = load i32, ptr %1, align 4
  ret i32 %302
}

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #1 align 2

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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)) #4 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIA50_xLm50EENSt9enable_ifIXsr14__is_swappableIT_EE5valueEvE4typeERAT0__S2_S6_(ptr noundef nonnull align 8 dereferenceable(20000), ptr noundef nonnull align 8 dereferenceable(20000)) #6

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #5

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

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

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

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


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

@dp = external dso_local global [60 x [50 x [50 x i64]]], align 16
@ans = external dso_local global [50 x [50 x i64]], align 16
@tmp = external dso_local global [50 x [50 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 i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i32, align 4
  %4 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %5 = getelementptr i8, ptr %4, i64 -24
  %6 = load i64, ptr %5, align 8
  %7 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %6
  %8 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %7, ptr noundef null)
  %9 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %11 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %12 = load i64, ptr %1, align 8, !tbaa !8
  %13 = icmp sgt i64 %12, 0
  br i1 %13, label %.preheader104, label %.preheader103

.preheader104:                                    ; preds = %0, %._crit_edge
  %14 = phi i64 [ %32, %._crit_edge ], [ %12, %0 ]
  %indvars.iv149 = phi i64 [ %indvars.iv.next150, %._crit_edge ], [ 0, %0 ]
  %15 = icmp sgt i64 %14, 0
  br i1 %15, label %.lr.ph, label %._crit_edge

.preheader103:                                    ; preds = %._crit_edge, %0
  %.lcssa105 = phi i64 [ %12, %0 ], [ %32, %._crit_edge ]
  %16 = load i64, ptr %2, align 8, !tbaa !8
  %.not113 = icmp slt i64 %16, 2
  br i1 %.not113, label %._crit_edge115, label %.preheader102.lr.ph

.preheader102.lr.ph:                              ; preds = %.preheader103
  %17 = icmp sgt i64 %.lcssa105, 0
  br i1 %17, label %.preheader102.us, label %.preheader102

.preheader102.us:                                 ; preds = %.preheader102.lr.ph, %._crit_edge112.split.us.us
  %.073114.us = phi i64 [ %30, %._crit_edge112.split.us.us ], [ 1, %.preheader102.lr.ph ]
  %18 = add nsw i64 %.073114.us, -1
  br label %.preheader101.us.us

.preheader101.us.us:                              ; preds = %._crit_edge110.us.us, %.preheader102.us
  %indvars.iv159 = phi i64 [ %indvars.iv.next160, %._crit_edge110.us.us ], [ 0, %.preheader102.us ]
  br label %.preheader100.us.us

19:                                               ; preds = %20
  %indvars.iv.next156 = add nuw nsw i64 %indvars.iv155, 1
  %exitcond158.not = icmp eq i64 %indvars.iv.next156, %.lcssa105
  br i1 %exitcond158.not, label %._crit_edge110.us.us, label %.preheader100.us.us, !llvm.loop !11

20:                                               ; preds = %.preheader100.us.us, %20
  %indvars.iv152 = phi i64 [ 0, %.preheader100.us.us ], [ %indvars.iv.next153, %20 ]
  %21 = load i64, ptr %29, align 8, !tbaa !8
  %22 = getelementptr inbounds [60 x [50 x [50 x i64]]], ptr @dp, i64 0, i64 %18, i64 %indvars.iv155, i64 %indvars.iv152
  %23 = load i64, ptr %22, align 8, !tbaa !8
  %24 = mul nsw i64 %23, %21
  %25 = getelementptr inbounds [60 x [50 x [50 x i64]]], ptr @dp, i64 0, i64 %.073114.us, i64 %indvars.iv159, i64 %indvars.iv152
  %26 = load i64, ptr %25, align 8, !tbaa !8
  %27 = add nsw i64 %26, %24
  %28 = srem i64 %27, 1000000007
  store i64 %28, ptr %25, align 8, !tbaa !8
  %indvars.iv.next153 = add nuw nsw i64 %indvars.iv152, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next153, %.lcssa105
  br i1 %exitcond.not, label %19, label %20, !llvm.loop !13

.preheader100.us.us:                              ; preds = %19, %.preheader101.us.us
  %indvars.iv155 = phi i64 [ %indvars.iv.next156, %19 ], [ 0, %.preheader101.us.us ]
  %29 = getelementptr inbounds [60 x [50 x [50 x i64]]], ptr @dp, i64 0, i64 %18, i64 %indvars.iv159, i64 %indvars.iv155
  br label %20

._crit_edge110.us.us:                             ; preds = %19
  %indvars.iv.next160 = add nuw nsw i64 %indvars.iv159, 1
  %exitcond162.not = icmp eq i64 %indvars.iv.next160, %.lcssa105
  br i1 %exitcond162.not, label %._crit_edge112.split.us.us, label %.preheader101.us.us, !llvm.loop !14

._crit_edge112.split.us.us:                       ; preds = %._crit_edge110.us.us
  %30 = add nuw nsw i64 %.073114.us, 1
  %31 = shl nuw i64 2, %.073114.us
  %.not.us = icmp sgt i64 %31, %16
  br i1 %.not.us, label %._crit_edge115, label %.preheader102.us, !llvm.loop !15

._crit_edge:                                      ; preds = %.lr.ph, %.preheader104
  %32 = phi i64 [ %14, %.preheader104 ], [ %36, %.lr.ph ]
  %indvars.iv.next150 = add nuw nsw i64 %indvars.iv149, 1
  %33 = icmp sgt i64 %32, %indvars.iv.next150
  br i1 %33, label %.preheader104, label %.preheader103, !llvm.loop !16

.lr.ph:                                           ; preds = %.preheader104, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader104 ]
  %34 = getelementptr inbounds [50 x [50 x i64]], ptr @dp, i64 0, i64 %indvars.iv149, i64 %indvars.iv
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %34)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %36 = load i64, ptr %1, align 8, !tbaa !8
  %37 = icmp sgt i64 %36, %indvars.iv.next
  br i1 %37, label %.lr.ph, label %._crit_edge, !llvm.loop !18

.preheader102:                                    ; preds = %.preheader102.lr.ph, %.preheader102
  %.073114 = phi i64 [ %38, %.preheader102 ], [ 1, %.preheader102.lr.ph ]
  %38 = add nuw nsw i64 %.073114, 1
  %39 = shl nuw i64 2, %.073114
  %.not = icmp sgt i64 %39, %16
  br i1 %.not, label %._crit_edge115, label %.preheader102, !llvm.loop !15

._crit_edge115:                                   ; preds = %.preheader102, %._crit_edge112.split.us.us, %.preheader103
  %.073.lcssa = phi i64 [ 0, %.preheader103 ], [ %.073114.us, %._crit_edge112.split.us.us ], [ %.073114, %.preheader102 ]
  %40 = icmp sgt i64 %.lcssa105, 0
  br i1 %40, label %.preheader99.us.preheader, label %.preheader98

.preheader99.us.preheader:                        ; preds = %._crit_edge115
  %41 = mul nuw nsw i64 %.073.lcssa, 20000
  %42 = shl nuw i64 %.lcssa105, 3
  %43 = getelementptr i8, ptr @dp, i64 %41
  %xtraiter = and i64 %.lcssa105, 3
  %44 = icmp ult i64 %.lcssa105, 4
  br i1 %44, label %.preheader98.loopexit.unr-lcssa, label %.preheader99.us.preheader.new

.preheader99.us.preheader.new:                    ; preds = %.preheader99.us.preheader
  %unroll_iter = and i64 %.lcssa105, 9223372036854775804
  br label %.preheader99.us

.preheader99.us:                                  ; preds = %.preheader99.us, %.preheader99.us.preheader.new
  %indvar = phi i64 [ 0, %.preheader99.us.preheader.new ], [ %indvar.next.3, %.preheader99.us ]
  %niter = phi i64 [ 0, %.preheader99.us.preheader.new ], [ %niter.next.3, %.preheader99.us ]
  %45 = mul nuw nsw i64 %indvar, 400
  %scevgep = getelementptr i8, ptr @ans, i64 %45
  %scevgep163 = getelementptr i8, ptr %43, i64 %45
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %scevgep, ptr align 16 %scevgep163, i64 %42, i1 false), !tbaa !8
  %46 = mul nuw i64 %indvar, 400
  %47 = add nuw i64 %46, 400
  %scevgep.1 = getelementptr i8, ptr @ans, i64 %47
  %scevgep163.1 = getelementptr i8, ptr %43, i64 %47
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %scevgep.1, ptr align 16 %scevgep163.1, i64 %42, i1 false), !tbaa !8
  %48 = mul nuw i64 %indvar, 400
  %49 = add nuw i64 %48, 800
  %scevgep.2 = getelementptr i8, ptr @ans, i64 %49
  %scevgep163.2 = getelementptr i8, ptr %43, i64 %49
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %scevgep.2, ptr align 16 %scevgep163.2, i64 %42, i1 false), !tbaa !8
  %50 = mul nuw i64 %indvar, 400
  %51 = add nuw i64 %50, 1200
  %scevgep.3 = getelementptr i8, ptr @ans, i64 %51
  %scevgep163.3 = getelementptr i8, ptr %43, i64 %51
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %scevgep.3, ptr align 16 %scevgep163.3, i64 %42, i1 false), !tbaa !8
  %indvar.next.3 = add nuw nsw i64 %indvar, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader98.loopexit.unr-lcssa, label %.preheader99.us, !llvm.loop !19

.preheader98.loopexit.unr-lcssa:                  ; preds = %.preheader99.us, %.preheader99.us.preheader
  %indvar.unr = phi i64 [ 0, %.preheader99.us.preheader ], [ %indvar.next.3, %.preheader99.us ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader98, label %.preheader99.us.epil

.preheader99.us.epil:                             ; preds = %.preheader98.loopexit.unr-lcssa, %.preheader99.us.epil
  %indvar.epil = phi i64 [ %indvar.next.epil, %.preheader99.us.epil ], [ %indvar.unr, %.preheader98.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.preheader99.us.epil ], [ 0, %.preheader98.loopexit.unr-lcssa ]
  %52 = mul nuw nsw i64 %indvar.epil, 400
  %scevgep.epil = getelementptr i8, ptr @ans, i64 %52
  %scevgep163.epil = getelementptr i8, ptr %43, i64 %52
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %scevgep.epil, ptr align 16 %scevgep163.epil, i64 %42, i1 false), !tbaa !8
  %indvar.next.epil = add nuw nsw i64 %indvar.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader98, label %.preheader99.us.epil, !llvm.loop !20

.preheader98:                                     ; preds = %.preheader98.loopexit.unr-lcssa, %.preheader99.us.epil, %._crit_edge115
  %.not141 = icmp eq i64 %.073.lcssa, 0
  br i1 %.not141, label %.preheader93, label %.lr.ph130

.preheader93.loopexit:                            ; preds = %105
  %.pre = load i64, ptr %1, align 8, !tbaa !8
  br label %.preheader93

.preheader93:                                     ; preds = %.preheader93.loopexit, %.preheader98
  %53 = phi i64 [ %.pre, %.preheader93.loopexit ], [ %.lcssa105, %.preheader98 ]
  %54 = icmp sgt i64 %53, 0
  br i1 %54, label %.preheader.us.preheader, label %._crit_edge138

.preheader.us.preheader:                          ; preds = %.preheader93
  %xtraiter211 = and i64 %53, 1
  %55 = icmp eq i64 %53, 1
  %unroll_iter215 = and i64 %53, 9223372036854775806
  %lcmp.mod213.not = icmp eq i64 %xtraiter211, 0
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge134.us
  %indvars.iv188 = phi i64 [ %indvars.iv.next189, %._crit_edge134.us ], [ 0, %.preheader.us.preheader ]
  %.063136.us = phi i64 [ %.lcssa, %._crit_edge134.us ], [ 0, %.preheader.us.preheader ]
  br i1 %55, label %._crit_edge134.us.unr-lcssa, label %.preheader.us.new

.preheader.us.new:                                ; preds = %.preheader.us, %.preheader.us.new
  %indvars.iv184 = phi i64 [ %indvars.iv.next185.1, %.preheader.us.new ], [ 0, %.preheader.us ]
  %.1131.us = phi i64 [ %63, %.preheader.us.new ], [ %.063136.us, %.preheader.us ]
  %niter216 = phi i64 [ %niter216.next.1, %.preheader.us.new ], [ 0, %.preheader.us ]
  %56 = getelementptr inbounds [50 x [50 x i64]], ptr @ans, i64 0, i64 %indvars.iv188, i64 %indvars.iv184
  %57 = load i64, ptr %56, align 16, !tbaa !8
  %58 = add nsw i64 %57, %.1131.us
  %59 = srem i64 %58, 1000000007
  %indvars.iv.next185 = or disjoint i64 %indvars.iv184, 1
  %60 = getelementptr inbounds [50 x [50 x i64]], ptr @ans, i64 0, i64 %indvars.iv188, i64 %indvars.iv.next185
  %61 = load i64, ptr %60, align 8, !tbaa !8
  %62 = add nsw i64 %61, %59
  %63 = srem i64 %62, 1000000007
  %indvars.iv.next185.1 = add nuw nsw i64 %indvars.iv184, 2
  %niter216.next.1 = add i64 %niter216, 2
  %niter216.ncmp.1 = icmp eq i64 %niter216.next.1, %unroll_iter215
  br i1 %niter216.ncmp.1, label %._crit_edge134.us.unr-lcssa, label %.preheader.us.new, !llvm.loop !22

._crit_edge134.us.unr-lcssa:                      ; preds = %.preheader.us.new, %.preheader.us
  %.lcssa.ph = phi i64 [ poison, %.preheader.us ], [ %63, %.preheader.us.new ]
  %indvars.iv184.unr = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next185.1, %.preheader.us.new ]
  %.1131.us.unr = phi i64 [ %.063136.us, %.preheader.us ], [ %63, %.preheader.us.new ]
  br i1 %lcmp.mod213.not, label %._crit_edge134.us, label %._crit_edge134.us.epilog-lcssa

._crit_edge134.us.epilog-lcssa:                   ; preds = %._crit_edge134.us.unr-lcssa
  %64 = getelementptr inbounds [50 x [50 x i64]], ptr @ans, i64 0, i64 %indvars.iv188, i64 %indvars.iv184.unr
  %65 = load i64, ptr %64, align 8, !tbaa !8
  %66 = add nsw i64 %65, %.1131.us.unr
  %67 = srem i64 %66, 1000000007
  br label %._crit_edge134.us

._crit_edge134.us:                                ; preds = %._crit_edge134.us.unr-lcssa, %._crit_edge134.us.epilog-lcssa
  %.lcssa = phi i64 [ %.lcssa.ph, %._crit_edge134.us.unr-lcssa ], [ %67, %._crit_edge134.us.epilog-lcssa ]
  %indvars.iv.next189 = add nuw nsw i64 %indvars.iv188, 1
  %exitcond191.not = icmp eq i64 %indvars.iv.next189, %53
  br i1 %exitcond191.not, label %._crit_edge138, label %.preheader.us, !llvm.loop !23

.lr.ph130:                                        ; preds = %.preheader98, %105
  %.in = phi i64 [ %68, %105 ], [ %.073.lcssa, %.preheader98 ]
  %68 = add nsw i64 %.in, -1
  %69 = load i64, ptr %2, align 8, !tbaa !8
  %70 = shl nuw i64 1, %68
  %71 = and i64 %69, %70
  %.not92 = icmp eq i64 %71, 0
  br i1 %.not92, label %105, label %.preheader97

.preheader97:                                     ; preds = %.lr.ph130
  %72 = load i64, ptr %1, align 8, !tbaa !8
  %73 = icmp sgt i64 %72, 0
  br i1 %73, label %.lr.ph123, label %._crit_edge129.split.us

.preheader96:                                     ; preds = %.lr.ph123
  %74 = icmp sgt i64 %103, 0
  br i1 %74, label %.preheader95.us.preheader, label %._crit_edge129.split.us

.preheader95.us.preheader:                        ; preds = %.preheader96
  %xtraiter205 = and i64 %103, 1
  %75 = icmp eq i64 %103, 1
  %unroll_iter208 = and i64 %103, 9223372036854775806
  %lcmp.mod207.not = icmp eq i64 %xtraiter205, 0
  br label %.preheader95.us

.preheader95.us:                                  ; preds = %.preheader95.us.preheader, %._crit_edge127.us
  %indvars.iv180 = phi i64 [ %indvars.iv.next181, %._crit_edge127.us ], [ 0, %.preheader95.us.preheader ]
  br label %.preheader94.us

.unr-lcssa:                                       ; preds = %.preheader94.us.new, %.preheader94.us
  %indvars.iv172.unr = phi i64 [ 0, %.preheader94.us ], [ %indvars.iv.next173.1, %.preheader94.us.new ]
  br i1 %lcmp.mod207.not, label %83, label %.epilog-lcssa

.epilog-lcssa:                                    ; preds = %.unr-lcssa
  %76 = getelementptr inbounds [60 x [50 x [50 x i64]]], ptr @dp, i64 0, i64 %68, i64 %indvars.iv176, i64 %indvars.iv172.unr
  %77 = load i64, ptr %76, align 8, !tbaa !8
  %78 = mul nsw i64 %77, %99
  %79 = getelementptr inbounds [50 x [50 x i64]], ptr @tmp, i64 0, i64 %indvars.iv180, i64 %indvars.iv172.unr
  %80 = load i64, ptr %79, align 8, !tbaa !8
  %81 = add nsw i64 %80, %78
  %82 = srem i64 %81, 1000000007
  store i64 %82, ptr %79, align 8, !tbaa !8
  br label %83

83:                                               ; preds = %.unr-lcssa, %.epilog-lcssa
  %indvars.iv.next177 = add nuw nsw i64 %indvars.iv176, 1
  %exitcond179.not = icmp eq i64 %indvars.iv.next177, %103
  br i1 %exitcond179.not, label %._crit_edge127.us, label %.preheader94.us, !llvm.loop !24

.preheader94.us.new:                              ; preds = %.preheader94.us, %.preheader94.us.new
  %indvars.iv172 = phi i64 [ %indvars.iv.next173.1, %.preheader94.us.new ], [ 0, %.preheader94.us ]
  %niter209 = phi i64 [ %niter209.next.1, %.preheader94.us.new ], [ 0, %.preheader94.us ]
  %84 = getelementptr inbounds [60 x [50 x [50 x i64]]], ptr @dp, i64 0, i64 %68, i64 %indvars.iv176, i64 %indvars.iv172
  %85 = load i64, ptr %84, align 16, !tbaa !8
  %86 = mul nsw i64 %85, %99
  %87 = getelementptr inbounds [50 x [50 x i64]], ptr @tmp, i64 0, i64 %indvars.iv180, i64 %indvars.iv172
  %88 = load i64, ptr %87, align 16, !tbaa !8
  %89 = add nsw i64 %88, %86
  %90 = srem i64 %89, 1000000007
  store i64 %90, ptr %87, align 16, !tbaa !8
  %indvars.iv.next173 = or disjoint i64 %indvars.iv172, 1
  %91 = getelementptr inbounds [60 x [50 x [50 x i64]]], ptr @dp, i64 0, i64 %68, i64 %indvars.iv176, i64 %indvars.iv.next173
  %92 = load i64, ptr %91, align 8, !tbaa !8
  %93 = mul nsw i64 %92, %99
  %94 = getelementptr inbounds [50 x [50 x i64]], ptr @tmp, i64 0, i64 %indvars.iv180, i64 %indvars.iv.next173
  %95 = load i64, ptr %94, align 8, !tbaa !8
  %96 = add nsw i64 %95, %93
  %97 = srem i64 %96, 1000000007
  store i64 %97, ptr %94, align 8, !tbaa !8
  %indvars.iv.next173.1 = add nuw nsw i64 %indvars.iv172, 2
  %niter209.next.1 = add i64 %niter209, 2
  %niter209.ncmp.1 = icmp eq i64 %niter209.next.1, %unroll_iter208
  br i1 %niter209.ncmp.1, label %.unr-lcssa, label %.preheader94.us.new, !llvm.loop !25

.preheader94.us:                                  ; preds = %.preheader95.us, %83
  %indvars.iv176 = phi i64 [ 0, %.preheader95.us ], [ %indvars.iv.next177, %83 ]
  %98 = getelementptr inbounds [50 x [50 x i64]], ptr @ans, i64 0, i64 %indvars.iv180, i64 %indvars.iv176
  %99 = load i64, ptr %98, align 8, !tbaa !8
  br i1 %75, label %.unr-lcssa, label %.preheader94.us.new

._crit_edge127.us:                                ; preds = %83
  %indvars.iv.next181 = add nuw nsw i64 %indvars.iv180, 1
  %exitcond183.not = icmp eq i64 %indvars.iv.next181, %103
  br i1 %exitcond183.not, label %._crit_edge129.split.us, label %.preheader95.us, !llvm.loop !26

.lr.ph123:                                        ; preds = %.preheader97, %.lr.ph123
  %indvars.iv169 = phi i64 [ %indvars.iv.next170, %.lr.ph123 ], [ 0, %.preheader97 ]
  %100 = phi i64 [ %103, %.lr.ph123 ], [ %72, %.preheader97 ]
  %101 = getelementptr inbounds [50 x [50 x i64]], ptr @tmp, i64 0, i64 %indvars.iv169
  %102 = getelementptr inbounds [50 x [50 x i64]], ptr @tmp, i64 0, i64 %indvars.iv169, i64 %100
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  store i32 0, ptr %3, align 4, !tbaa !27
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull %101, ptr noundef nonnull %102, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  %indvars.iv.next170 = add nuw nsw i64 %indvars.iv169, 1
  %103 = load i64, ptr %1, align 8, !tbaa !8
  %104 = icmp sgt i64 %103, %indvars.iv.next170
  br i1 %104, label %.lr.ph123, label %.preheader96, !llvm.loop !29

._crit_edge129.split.us:                          ; preds = %._crit_edge127.us, %.preheader97, %.preheader96
  call void @_ZSt4swapIA50_xLm50EENSt9enable_ifIXsr14__is_swappableIT_EE5valueEvE4typeERAT0__S2_S6_(ptr noundef nonnull align 8 dereferenceable(20000) @ans, ptr noundef nonnull align 8 dereferenceable(20000) @tmp) #8
  br label %105

105:                                              ; preds = %._crit_edge129.split.us, %.lr.ph130
  %106 = icmp sgt i64 %.in, 1
  br i1 %106, label %.lr.ph130, label %.preheader93.loopexit, !llvm.loop !30

._crit_edge138:                                   ; preds = %._crit_edge134.us, %.preheader93
  %.063.lcssa = phi i64 [ 0, %.preheader93 ], [ %.lcssa, %._crit_edge134.us ]
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.063.lcssa)
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %107, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #8
  ret i32 0
}

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #1 align 2

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIA50_xLm50EENSt9enable_ifIXsr14__is_swappableIT_EE5valueEvE4typeERAT0__S2_S6_(ptr noundef nonnull align 8 dereferenceable(20000), ptr noundef nonnull align 8 dereferenceable(20000)) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) 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 #4 align 2

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !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}
!17 = !{!"llvm.loop.unswitch.partial.disable"}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.unroll.disable"}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12}
!26 = distinct !{!26, !12}
!27 = !{!28, !28, i64 0}
!28 = !{!"int", !10, i64 0}
!29 = distinct !{!29, !12}
!30 = distinct !{!30, !12}


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