; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/237 Division 2/Problem D (D)

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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"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 [1048576 x [5 x i64]], align 16
@ans = external dso_local global i64, align 8
@MOD = external dso_local global i64, align 8
@n = external dso_local global i32, align 4
@i = external dso_local global i32, align 4
@_Z1sB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %2 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %3 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %4 = getelementptr i8, ptr %3, i64 -24
  %5 = load i64, ptr %4, align 8
  %6 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %5
  %7 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %6, ptr noundef null)
  %8 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %9 = getelementptr i8, ptr %8, i64 -24
  %10 = load i64, ptr %9, align 8
  %11 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %10
  %12 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %11, ptr noundef null)
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11)
  %14 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11) #5
  %15 = trunc i64 %14 to i32
  store i32 %15, ptr @n, align 4, !tbaa !8
  %16 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef 0)
  %17 = load i8, ptr %16, align 1, !tbaa !11
  %18 = sext i8 %17 to i32
  %19 = icmp eq i32 %18, 63
  br i1 %19, label %20, label %37

20:                                               ; preds = %0
  %21 = load i32, ptr @i, align 4, !tbaa !8
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %22
  %24 = getelementptr inbounds [5 x i64], ptr %23, i64 0, i64 4
  store i64 1, ptr %24, align 8, !tbaa !12
  %25 = load i32, ptr @i, align 4, !tbaa !8
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %26
  %28 = getelementptr inbounds [5 x i64], ptr %27, i64 0, i64 0
  store i64 1, ptr %28, align 8, !tbaa !12
  %29 = load i32, ptr @n, align 4, !tbaa !8
  %30 = icmp sgt i32 %29, 1
  br i1 %30, label %31, label %36

31:                                               ; preds = %20
  %32 = load i32, ptr @i, align 4, !tbaa !8
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %33
  %35 = getelementptr inbounds [5 x i64], ptr %34, i64 0, i64 2
  store i64 1, ptr %35, align 8, !tbaa !12
  br label %36

36:                                               ; preds = %31, %20
  br label %69

37:                                               ; preds = %0
  %38 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef 0)
  %39 = load i8, ptr %38, align 1, !tbaa !11
  %40 = sext i8 %39 to i32
  %41 = icmp eq i32 %40, 48
  br i1 %41, label %42, label %43

42:                                               ; preds = %37
  store i64 1, ptr @dp, align 16, !tbaa !12
  br label %68

43:                                               ; preds = %37
  %44 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef 0)
  %45 = load i8, ptr %44, align 1, !tbaa !11
  %46 = sext i8 %45 to i32
  %47 = icmp eq i32 %46, 49
  br i1 %47, label %48, label %56

48:                                               ; preds = %43
  %49 = load i32, ptr @n, align 4, !tbaa !8
  %50 = icmp sgt i32 %49, 1
  br i1 %50, label %51, label %56

51:                                               ; preds = %48
  %52 = load i32, ptr @i, align 4, !tbaa !8
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %53
  %55 = getelementptr inbounds [5 x i64], ptr %54, i64 0, i64 2
  store i64 1, ptr %55, align 8, !tbaa !12
  br label %67

56:                                               ; preds = %48, %43
  %57 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef 0)
  %58 = load i8, ptr %57, align 1, !tbaa !11
  %59 = sext i8 %58 to i32
  %60 = icmp eq i32 %59, 42
  br i1 %60, label %61, label %66

61:                                               ; preds = %56
  %62 = load i32, ptr @i, align 4, !tbaa !8
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %63
  %65 = getelementptr inbounds [5 x i64], ptr %64, i64 0, i64 4
  store i64 1, ptr %65, align 8, !tbaa !12
  br label %66

66:                                               ; preds = %61, %56
  br label %67

67:                                               ; preds = %66, %51
  br label %68

68:                                               ; preds = %67, %42
  br label %69

69:                                               ; preds = %68, %36
  store i32 1, ptr @i, align 4, !tbaa !8
  br label %70

70:                                               ; preds = %342, %69
  %71 = load i32, ptr @i, align 4, !tbaa !8
  %72 = load i32, ptr @n, align 4, !tbaa !8
  %73 = icmp slt i32 %71, %72
  br i1 %73, label %74, label %345

74:                                               ; preds = %70
  %75 = load i32, ptr @i, align 4, !tbaa !8
  %76 = sext i32 %75 to i64
  %77 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %76)
  %78 = load i8, ptr %77, align 1, !tbaa !11
  %79 = sext i8 %78 to i32
  %80 = icmp ne i32 %79, 63
  br i1 %80, label %81, label %231

81:                                               ; preds = %74
  %82 = load i32, ptr @i, align 4, !tbaa !8
  %83 = sext i32 %82 to i64
  %84 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %83)
  %85 = load i8, ptr %84, align 1, !tbaa !11
  %86 = sext i8 %85 to i32
  %87 = icmp eq i32 %86, 48
  br i1 %87, label %88, label %111

88:                                               ; preds = %81
  %89 = load i64, ptr @MOD, align 8, !tbaa !12
  %90 = load i32, ptr @i, align 4, !tbaa !8
  %91 = sub nsw i32 %90, 1
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %92
  %94 = getelementptr inbounds [5 x i64], ptr %93, i64 0, i64 0
  %95 = load i64, ptr %94, align 8, !tbaa !12
  %96 = load i32, ptr @i, align 4, !tbaa !8
  %97 = sub nsw i32 %96, 1
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %98
  %100 = getelementptr inbounds [5 x i64], ptr %99, i64 0, i64 1
  %101 = load i64, ptr %100, align 8, !tbaa !12
  %102 = add nsw i64 %95, %101
  %103 = load i32, ptr @i, align 4, !tbaa !8
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %104
  %106 = getelementptr inbounds [5 x i64], ptr %105, i64 0, i64 0
  %107 = load i64, ptr %106, align 8, !tbaa !12
  %108 = add nsw i64 %107, %102
  store i64 %108, ptr %106, align 8, !tbaa !12
  %109 = load i64, ptr %106, align 8, !tbaa !12
  %110 = srem i64 %109, %89
  store i64 %110, ptr %106, align 8, !tbaa !12
  br label %230

111:                                              ; preds = %81
  %112 = load i32, ptr @i, align 4, !tbaa !8
  %113 = sext i32 %112 to i64
  %114 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %113)
  %115 = load i8, ptr %114, align 1, !tbaa !11
  %116 = sext i8 %115 to i32
  %117 = icmp eq i32 %116, 49
  br i1 %117, label %118, label %162

118:                                              ; preds = %111
  %119 = load i64, ptr @MOD, align 8, !tbaa !12
  %120 = load i32, ptr @i, align 4, !tbaa !8
  %121 = sub nsw i32 %120, 1
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %122
  %124 = getelementptr inbounds [5 x i64], ptr %123, i64 0, i64 4
  %125 = load i64, ptr %124, align 8, !tbaa !12
  %126 = load i32, ptr @i, align 4, !tbaa !8
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %127
  %129 = getelementptr inbounds [5 x i64], ptr %128, i64 0, i64 1
  %130 = load i64, ptr %129, align 8, !tbaa !12
  %131 = add nsw i64 %130, %125
  store i64 %131, ptr %129, align 8, !tbaa !12
  %132 = load i64, ptr %129, align 8, !tbaa !12
  %133 = srem i64 %132, %119
  store i64 %133, ptr %129, align 8, !tbaa !12
  %134 = load i32, ptr @i, align 4, !tbaa !8
  %135 = load i32, ptr @n, align 4, !tbaa !8
  %136 = sub nsw i32 %135, 1
  %137 = icmp slt i32 %134, %136
  br i1 %137, label %138, label %161

138:                                              ; preds = %118
  %139 = load i64, ptr @MOD, align 8, !tbaa !12
  %140 = load i32, ptr @i, align 4, !tbaa !8
  %141 = sub nsw i32 %140, 1
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %142
  %144 = getelementptr inbounds [5 x i64], ptr %143, i64 0, i64 0
  %145 = load i64, ptr %144, align 8, !tbaa !12
  %146 = load i32, ptr @i, align 4, !tbaa !8
  %147 = sub nsw i32 %146, 1
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %148
  %150 = getelementptr inbounds [5 x i64], ptr %149, i64 0, i64 1
  %151 = load i64, ptr %150, align 8, !tbaa !12
  %152 = add nsw i64 %145, %151
  %153 = load i32, ptr @i, align 4, !tbaa !8
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %154
  %156 = getelementptr inbounds [5 x i64], ptr %155, i64 0, i64 2
  %157 = load i64, ptr %156, align 8, !tbaa !12
  %158 = add nsw i64 %157, %152
  store i64 %158, ptr %156, align 8, !tbaa !12
  %159 = load i64, ptr %156, align 8, !tbaa !12
  %160 = srem i64 %159, %139
  store i64 %160, ptr %156, align 8, !tbaa !12
  br label %161

161:                                              ; preds = %138, %118
  br label %229

162:                                              ; preds = %111
  %163 = load i32, ptr @i, align 4, !tbaa !8
  %164 = sext i32 %163 to i64
  %165 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %164)
  %166 = load i8, ptr %165, align 1, !tbaa !11
  %167 = sext i8 %166 to i32
  %168 = icmp eq i32 %167, 50
  br i1 %168, label %169, label %190

169:                                              ; preds = %162
  %170 = load i32, ptr @i, align 4, !tbaa !8
  %171 = load i32, ptr @n, align 4, !tbaa !8
  %172 = sub nsw i32 %171, 1
  %173 = icmp slt i32 %170, %172
  br i1 %173, label %174, label %190

174:                                              ; preds = %169
  %175 = load i64, ptr @MOD, align 8, !tbaa !12
  %176 = load i32, ptr @i, align 4, !tbaa !8
  %177 = sub nsw i32 %176, 1
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %178
  %180 = getelementptr inbounds [5 x i64], ptr %179, i64 0, i64 4
  %181 = load i64, ptr %180, align 8, !tbaa !12
  %182 = load i32, ptr @i, align 4, !tbaa !8
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %183
  %185 = getelementptr inbounds [5 x i64], ptr %184, i64 0, i64 3
  %186 = load i64, ptr %185, align 8, !tbaa !12
  %187 = add nsw i64 %186, %181
  store i64 %187, ptr %185, align 8, !tbaa !12
  %188 = load i64, ptr %185, align 8, !tbaa !12
  %189 = srem i64 %188, %175
  store i64 %189, ptr %185, align 8, !tbaa !12
  br label %228

190:                                              ; preds = %169, %162
  %191 = load i32, ptr @i, align 4, !tbaa !8
  %192 = sext i32 %191 to i64
  %193 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %192)
  %194 = load i8, ptr %193, align 1, !tbaa !11
  %195 = sext i8 %194 to i32
  %196 = icmp eq i32 %195, 42
  br i1 %196, label %197, label %227

197:                                              ; preds = %190
  %198 = load i64, ptr @MOD, align 8, !tbaa !12
  %199 = load i32, ptr @i, align 4, !tbaa !8
  %200 = sub nsw i32 %199, 1
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %201
  %203 = getelementptr inbounds [5 x i64], ptr %202, i64 0, i64 2
  %204 = load i64, ptr %203, align 8, !tbaa !12
  %205 = load i32, ptr @i, align 4, !tbaa !8
  %206 = sub nsw i32 %205, 1
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %207
  %209 = getelementptr inbounds [5 x i64], ptr %208, i64 0, i64 3
  %210 = load i64, ptr %209, align 8, !tbaa !12
  %211 = add nsw i64 %204, %210
  %212 = load i32, ptr @i, align 4, !tbaa !8
  %213 = sub nsw i32 %212, 1
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %214
  %216 = getelementptr inbounds [5 x i64], ptr %215, i64 0, i64 4
  %217 = load i64, ptr %216, align 8, !tbaa !12
  %218 = add nsw i64 %211, %217
  %219 = load i32, ptr @i, align 4, !tbaa !8
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %220
  %222 = getelementptr inbounds [5 x i64], ptr %221, i64 0, i64 4
  %223 = load i64, ptr %222, align 8, !tbaa !12
  %224 = add nsw i64 %223, %218
  store i64 %224, ptr %222, align 8, !tbaa !12
  %225 = load i64, ptr %222, align 8, !tbaa !12
  %226 = srem i64 %225, %198
  store i64 %226, ptr %222, align 8, !tbaa !12
  br label %227

227:                                              ; preds = %197, %190
  br label %228

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

229:                                              ; preds = %228, %161
  br label %230

230:                                              ; preds = %229, %88
  br label %341

231:                                              ; preds = %74
  %232 = load i64, ptr @MOD, align 8, !tbaa !12
  %233 = load i32, ptr @i, align 4, !tbaa !8
  %234 = sub nsw i32 %233, 1
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %235
  %237 = getelementptr inbounds [5 x i64], ptr %236, i64 0, i64 0
  %238 = load i64, ptr %237, align 8, !tbaa !12
  %239 = load i32, ptr @i, align 4, !tbaa !8
  %240 = sub nsw i32 %239, 1
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %241
  %243 = getelementptr inbounds [5 x i64], ptr %242, i64 0, i64 1
  %244 = load i64, ptr %243, align 8, !tbaa !12
  %245 = add nsw i64 %238, %244
  %246 = load i32, ptr @i, align 4, !tbaa !8
  %247 = sext i32 %246 to i64
  %248 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %247
  %249 = getelementptr inbounds [5 x i64], ptr %248, i64 0, i64 0
  %250 = load i64, ptr %249, align 8, !tbaa !12
  %251 = add nsw i64 %250, %245
  store i64 %251, ptr %249, align 8, !tbaa !12
  %252 = load i64, ptr %249, align 8, !tbaa !12
  %253 = srem i64 %252, %232
  store i64 %253, ptr %249, align 8, !tbaa !12
  %254 = load i64, ptr @MOD, align 8, !tbaa !12
  %255 = load i32, ptr @i, align 4, !tbaa !8
  %256 = sub nsw i32 %255, 1
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %257
  %259 = getelementptr inbounds [5 x i64], ptr %258, i64 0, i64 4
  %260 = load i64, ptr %259, align 8, !tbaa !12
  %261 = load i32, ptr @i, align 4, !tbaa !8
  %262 = sext i32 %261 to i64
  %263 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %262
  %264 = getelementptr inbounds [5 x i64], ptr %263, i64 0, i64 1
  %265 = load i64, ptr %264, align 8, !tbaa !12
  %266 = add nsw i64 %265, %260
  store i64 %266, ptr %264, align 8, !tbaa !12
  %267 = load i64, ptr %264, align 8, !tbaa !12
  %268 = srem i64 %267, %254
  store i64 %268, ptr %264, align 8, !tbaa !12
  %269 = load i32, ptr @i, align 4, !tbaa !8
  %270 = load i32, ptr @n, align 4, !tbaa !8
  %271 = sub nsw i32 %270, 1
  %272 = icmp slt i32 %269, %271
  br i1 %272, label %273, label %311

273:                                              ; preds = %231
  %274 = load i64, ptr @MOD, align 8, !tbaa !12
  %275 = load i32, ptr @i, align 4, !tbaa !8
  %276 = sub nsw i32 %275, 1
  %277 = sext i32 %276 to i64
  %278 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %277
  %279 = getelementptr inbounds [5 x i64], ptr %278, i64 0, i64 0
  %280 = load i64, ptr %279, align 8, !tbaa !12
  %281 = load i32, ptr @i, align 4, !tbaa !8
  %282 = sub nsw i32 %281, 1
  %283 = sext i32 %282 to i64
  %284 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %283
  %285 = getelementptr inbounds [5 x i64], ptr %284, i64 0, i64 1
  %286 = load i64, ptr %285, align 8, !tbaa !12
  %287 = add nsw i64 %280, %286
  %288 = load i32, ptr @i, align 4, !tbaa !8
  %289 = sext i32 %288 to i64
  %290 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %289
  %291 = getelementptr inbounds [5 x i64], ptr %290, i64 0, i64 2
  %292 = load i64, ptr %291, align 8, !tbaa !12
  %293 = add nsw i64 %292, %287
  store i64 %293, ptr %291, align 8, !tbaa !12
  %294 = load i64, ptr %291, align 8, !tbaa !12
  %295 = srem i64 %294, %274
  store i64 %295, ptr %291, align 8, !tbaa !12
  %296 = load i64, ptr @MOD, align 8, !tbaa !12
  %297 = load i32, ptr @i, align 4, !tbaa !8
  %298 = sub nsw i32 %297, 1
  %299 = sext i32 %298 to i64
  %300 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %299
  %301 = getelementptr inbounds [5 x i64], ptr %300, i64 0, i64 4
  %302 = load i64, ptr %301, align 8, !tbaa !12
  %303 = load i32, ptr @i, align 4, !tbaa !8
  %304 = sext i32 %303 to i64
  %305 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %304
  %306 = getelementptr inbounds [5 x i64], ptr %305, i64 0, i64 3
  %307 = load i64, ptr %306, align 8, !tbaa !12
  %308 = add nsw i64 %307, %302
  store i64 %308, ptr %306, align 8, !tbaa !12
  %309 = load i64, ptr %306, align 8, !tbaa !12
  %310 = srem i64 %309, %296
  store i64 %310, ptr %306, align 8, !tbaa !12
  br label %311

311:                                              ; preds = %273, %231
  %312 = load i64, ptr @MOD, align 8, !tbaa !12
  %313 = load i32, ptr @i, align 4, !tbaa !8
  %314 = sub nsw i32 %313, 1
  %315 = sext i32 %314 to i64
  %316 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %315
  %317 = getelementptr inbounds [5 x i64], ptr %316, i64 0, i64 2
  %318 = load i64, ptr %317, align 8, !tbaa !12
  %319 = load i32, ptr @i, align 4, !tbaa !8
  %320 = sub nsw i32 %319, 1
  %321 = sext i32 %320 to i64
  %322 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %321
  %323 = getelementptr inbounds [5 x i64], ptr %322, i64 0, i64 3
  %324 = load i64, ptr %323, align 8, !tbaa !12
  %325 = add nsw i64 %318, %324
  %326 = load i32, ptr @i, align 4, !tbaa !8
  %327 = sub nsw i32 %326, 1
  %328 = sext i32 %327 to i64
  %329 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %328
  %330 = getelementptr inbounds [5 x i64], ptr %329, i64 0, i64 4
  %331 = load i64, ptr %330, align 8, !tbaa !12
  %332 = add nsw i64 %325, %331
  %333 = load i32, ptr @i, align 4, !tbaa !8
  %334 = sext i32 %333 to i64
  %335 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %334
  %336 = getelementptr inbounds [5 x i64], ptr %335, i64 0, i64 4
  %337 = load i64, ptr %336, align 8, !tbaa !12
  %338 = add nsw i64 %337, %332
  store i64 %338, ptr %336, align 8, !tbaa !12
  %339 = load i64, ptr %336, align 8, !tbaa !12
  %340 = srem i64 %339, %312
  store i64 %340, ptr %336, align 8, !tbaa !12
  br label %341

341:                                              ; preds = %311, %230
  br label %342

342:                                              ; preds = %341
  %343 = load i32, ptr @i, align 4, !tbaa !8
  %344 = add nsw i32 %343, 1
  store i32 %344, ptr @i, align 4, !tbaa !8
  br label %70, !llvm.loop !14

345:                                              ; preds = %70
  store i32 0, ptr @i, align 4, !tbaa !8
  br label %346

346:                                              ; preds = %360, %345
  %347 = load i32, ptr @i, align 4, !tbaa !8
  %348 = icmp slt i32 %347, 5
  br i1 %348, label %349, label %363

349:                                              ; preds = %346
  %350 = load i32, ptr @n, align 4, !tbaa !8
  %351 = sub nsw i32 %350, 1
  %352 = sext i32 %351 to i64
  %353 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %352
  %354 = load i32, ptr @i, align 4, !tbaa !8
  %355 = sext i32 %354 to i64
  %356 = getelementptr inbounds [5 x i64], ptr %353, i64 0, i64 %355
  %357 = load i64, ptr %356, align 8, !tbaa !12
  %358 = load i64, ptr @ans, align 8, !tbaa !12
  %359 = add nsw i64 %358, %357
  store i64 %359, ptr @ans, align 8, !tbaa !12
  br label %360

360:                                              ; preds = %349
  %361 = load i32, ptr @i, align 4, !tbaa !8
  %362 = add nsw i32 %361, 1
  store i32 %362, ptr @i, align 4, !tbaa !8
  br label %346, !llvm.loop !16

363:                                              ; preds = %346
  %364 = load i64, ptr @ans, align 8, !tbaa !12
  %365 = load i64, ptr @MOD, align 8, !tbaa !12
  %366 = srem i64 %364, %365
  %367 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %366)
  %368 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %367, ptr noundef @.str)
  ret i32 0
}

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

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

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

; 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 = { "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 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 #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
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 = { 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 = !{!10, !10, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"long long", !10, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}


; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"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 local_unnamed_addr global [1048576 x [5 x i64]], align 16
@ans = external dso_local local_unnamed_addr global i64, align 8
@MOD = external dso_local local_unnamed_addr global i64, align 8
@n = external dso_local local_unnamed_addr global i32, align 4
@i = external dso_local local_unnamed_addr global i32, align 4
@_Z1sB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %2 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %3 = getelementptr i8, ptr %2, i64 -24
  %4 = load i64, ptr %3, align 8
  %5 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %4
  %6 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %5, ptr noundef null)
  %7 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %8 = getelementptr i8, ptr %7, i64 -24
  %9 = load i64, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %9
  %11 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %10, ptr noundef null)
  %12 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11)
  %13 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11) #6
  %14 = trunc i64 %13 to i32
  store i32 %14, ptr @n, align 4, !tbaa !8
  %15 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef 0)
  %16 = load i8, ptr %15, align 1, !tbaa !11
  %17 = icmp eq i8 %16, 63
  br i1 %17, label %18, label %26

18:                                               ; preds = %0
  %19 = load i32, ptr @i, align 4, !tbaa !8
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %20, i64 4
  store i64 1, ptr %21, align 8, !tbaa !12
  %22 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %20
  store i64 1, ptr %22, align 8, !tbaa !12
  %23 = load i32, ptr @n, align 4, !tbaa !8
  %24 = icmp sgt i32 %23, 1
  br i1 %24, label %.thread, label %.preheader

.thread:                                          ; preds = %18
  %25 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %20, i64 2
  store i64 1, ptr %25, align 8, !tbaa !12
  store i32 1, ptr @i, align 4, !tbaa !8
  br label %.lr.ph.preheader

26:                                               ; preds = %0
  %27 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef 0)
  %28 = load i8, ptr %27, align 1, !tbaa !11
  %29 = icmp eq i8 %28, 48
  br i1 %29, label %30, label %31

30:                                               ; preds = %26
  store i64 1, ptr @dp, align 16, !tbaa !12
  br label %49

31:                                               ; preds = %26
  %32 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef 0)
  %33 = load i8, ptr %32, align 1, !tbaa !11
  %34 = icmp eq i8 %33, 49
  %35 = load i32, ptr @n, align 4
  %36 = icmp sgt i32 %35, 1
  %or.cond = select i1 %34, i1 %36, i1 false
  br i1 %or.cond, label %37, label %41

37:                                               ; preds = %31
  %38 = load i32, ptr @i, align 4, !tbaa !8
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %39, i64 2
  store i64 1, ptr %40, align 8, !tbaa !12
  br label %49

41:                                               ; preds = %31
  %42 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef 0)
  %43 = load i8, ptr %42, align 1, !tbaa !11
  %44 = icmp eq i8 %43, 42
  br i1 %44, label %45, label %49

45:                                               ; preds = %41
  %46 = load i32, ptr @i, align 4, !tbaa !8
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %47, i64 4
  store i64 1, ptr %48, align 8, !tbaa !12
  br label %49

49:                                               ; preds = %30, %41, %45, %37
  %.pr = load i32, ptr @n, align 4, !tbaa !8
  store i32 1, ptr @i, align 4, !tbaa !8
  %50 = icmp sgt i32 %.pr, 1
  br i1 %50, label %.lr.ph.preheader, label %.preheader

.lr.ph.preheader:                                 ; preds = %.thread, %49
  br label %.lr.ph

.preheader:                                       ; preds = %205, %18, %49
  %.lcssa = phi i32 [ %.pr, %49 ], [ %23, %18 ], [ %208, %205 ]
  %51 = add nsw i32 %.lcssa, -1
  %52 = sext i32 %51 to i64
  %ans.promoted = load i64, ptr @ans, align 8, !tbaa !12
  %53 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %52, i64 0
  %54 = load <4 x i64>, ptr %53, align 8, !tbaa !12
  %55 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %52, i64 4
  %56 = load i64, ptr %55, align 8, !tbaa !12
  %57 = tail call i64 @llvm.vector.reduce.add.v4i64(<4 x i64> %54)
  %op.rdx = add i64 %57, %56
  %op.rdx18 = add i64 %op.rdx, %ans.promoted
  store i32 5, ptr @i, align 4, !tbaa !8
  store i64 %op.rdx18, ptr @ans, align 8, !tbaa !12
  %58 = load i64, ptr @MOD, align 8, !tbaa !12
  %59 = srem i64 %op.rdx18, %58
  %60 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %59)
  %61 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %60, ptr noundef nonnull @.str)
  ret i32 0

.lr.ph:                                           ; preds = %.lr.ph.preheader, %205
  %storemerge7 = phi i32 [ %207, %205 ], [ 1, %.lr.ph.preheader ]
  %62 = sext i32 %storemerge7 to i64
  %63 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %62)
  %64 = load i8, ptr %63, align 1, !tbaa !11
  %.not = icmp eq i8 %64, 63
  br i1 %.not, label %161, label %65

65:                                               ; preds = %.lr.ph
  %66 = load i32, ptr @i, align 4, !tbaa !8
  %67 = sext i32 %66 to i64
  %68 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %67)
  %69 = load i8, ptr %68, align 1, !tbaa !11
  %70 = icmp eq i8 %69, 48
  br i1 %70, label %71, label %86

71:                                               ; preds = %65
  %72 = load i64, ptr @MOD, align 8, !tbaa !12
  %73 = load i32, ptr @i, align 4, !tbaa !8
  %74 = add nsw i32 %73, -1
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %75
  %77 = load i64, ptr %76, align 8, !tbaa !12
  %78 = getelementptr inbounds i8, ptr %76, i64 8
  %79 = load i64, ptr %78, align 8, !tbaa !12
  %80 = add nsw i64 %79, %77
  %81 = sext i32 %73 to i64
  %82 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %81
  %83 = load i64, ptr %82, align 8, !tbaa !12
  %84 = add nsw i64 %80, %83
  %85 = srem i64 %84, %72
  store i64 %85, ptr %82, align 8, !tbaa !12
  br label %205

86:                                               ; preds = %65
  %87 = load i32, ptr @i, align 4, !tbaa !8
  %88 = sext i32 %87 to i64
  %89 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %88)
  %90 = load i8, ptr %89, align 1, !tbaa !11
  %91 = icmp eq i8 %90, 49
  br i1 %91, label %92, label %117

92:                                               ; preds = %86
  %93 = load i64, ptr @MOD, align 8, !tbaa !12
  %94 = load i32, ptr @i, align 4, !tbaa !8
  %95 = add nsw i32 %94, -1
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %96, i64 4
  %98 = load i64, ptr %97, align 8, !tbaa !12
  %99 = sext i32 %94 to i64
  %100 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %99, i64 1
  %101 = load i64, ptr %100, align 8, !tbaa !12
  %102 = add nsw i64 %101, %98
  %103 = srem i64 %102, %93
  store i64 %103, ptr %100, align 8, !tbaa !12
  %104 = load i32, ptr @n, align 4, !tbaa !8
  %105 = add nsw i32 %104, -1
  %106 = icmp slt i32 %94, %105
  br i1 %106, label %107, label %205

107:                                              ; preds = %92
  %108 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %96
  %109 = load i64, ptr %108, align 8, !tbaa !12
  %110 = getelementptr inbounds i8, ptr %108, i64 8
  %111 = load i64, ptr %110, align 8, !tbaa !12
  %112 = add nsw i64 %111, %109
  %113 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %99, i64 2
  %114 = load i64, ptr %113, align 8, !tbaa !12
  %115 = add nsw i64 %112, %114
  %116 = srem i64 %115, %93
  store i64 %116, ptr %113, align 8, !tbaa !12
  br label %205

117:                                              ; preds = %86
  %118 = load i32, ptr @i, align 4, !tbaa !8
  %119 = sext i32 %118 to i64
  %120 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %119)
  %121 = load i8, ptr %120, align 1, !tbaa !11
  %122 = icmp eq i8 %121, 50
  %.pre = load i32, ptr @i, align 4, !tbaa !8
  br i1 %122, label %123, label %138

123:                                              ; preds = %117
  %124 = load i32, ptr @n, align 4, !tbaa !8
  %125 = add nsw i32 %124, -1
  %126 = icmp slt i32 %.pre, %125
  br i1 %126, label %127, label %138

127:                                              ; preds = %123
  %128 = load i64, ptr @MOD, align 8, !tbaa !12
  %129 = add nsw i32 %.pre, -1
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %130, i64 4
  %132 = load i64, ptr %131, align 8, !tbaa !12
  %133 = sext i32 %.pre to i64
  %134 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %133, i64 3
  %135 = load i64, ptr %134, align 8, !tbaa !12
  %136 = add nsw i64 %135, %132
  %137 = srem i64 %136, %128
  store i64 %137, ptr %134, align 8, !tbaa !12
  br label %205

138:                                              ; preds = %123, %117
  %139 = sext i32 %.pre to i64
  %140 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %139)
  %141 = load i8, ptr %140, align 1, !tbaa !11
  %142 = icmp eq i8 %141, 42
  %.pre14 = load i32, ptr @i, align 4, !tbaa !8
  br i1 %142, label %143, label %205

143:                                              ; preds = %138
  %144 = load i64, ptr @MOD, align 8, !tbaa !12
  %145 = add nsw i32 %.pre14, -1
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %146
  %148 = getelementptr inbounds i8, ptr %147, i64 16
  %149 = load i64, ptr %148, align 8, !tbaa !12
  %150 = getelementptr inbounds i8, ptr %147, i64 24
  %151 = load i64, ptr %150, align 8, !tbaa !12
  %152 = add nsw i64 %151, %149
  %153 = getelementptr inbounds i8, ptr %147, i64 32
  %154 = load i64, ptr %153, align 8, !tbaa !12
  %155 = add nsw i64 %152, %154
  %156 = sext i32 %.pre14 to i64
  %157 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %156, i64 4
  %158 = load i64, ptr %157, align 8, !tbaa !12
  %159 = add nsw i64 %155, %158
  %160 = srem i64 %159, %144
  store i64 %160, ptr %157, align 8, !tbaa !12
  br label %205

161:                                              ; preds = %.lr.ph
  %162 = load i64, ptr @MOD, align 8, !tbaa !12
  %163 = load i32, ptr @i, align 4, !tbaa !8
  %164 = add nsw i32 %163, -1
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %165
  %167 = load i64, ptr %166, align 8, !tbaa !12
  %168 = getelementptr inbounds i8, ptr %166, i64 8
  %169 = load i64, ptr %168, align 8, !tbaa !12
  %170 = add nsw i64 %169, %167
  %171 = sext i32 %163 to i64
  %172 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %171
  %173 = load i64, ptr %172, align 8, !tbaa !12
  %174 = add nsw i64 %173, %170
  %175 = srem i64 %174, %162
  store i64 %175, ptr %172, align 8, !tbaa !12
  %176 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %165, i64 4
  %177 = load i64, ptr %176, align 8, !tbaa !12
  %178 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %171, i64 1
  %179 = load i64, ptr %178, align 8, !tbaa !12
  %180 = add nsw i64 %179, %177
  %181 = srem i64 %180, %162
  store i64 %181, ptr %178, align 8, !tbaa !12
  %182 = load i32, ptr @n, align 4, !tbaa !8
  %183 = add nsw i32 %182, -1
  %184 = icmp slt i32 %163, %183
  br i1 %184, label %185, label %194

185:                                              ; preds = %161
  %186 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %171, i64 2
  %187 = load i64, ptr %186, align 8, !tbaa !12
  %188 = add nsw i64 %187, %170
  %189 = srem i64 %188, %162
  store i64 %189, ptr %186, align 8, !tbaa !12
  %190 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %171, i64 3
  %191 = load i64, ptr %190, align 8, !tbaa !12
  %192 = add nsw i64 %191, %177
  %193 = srem i64 %192, %162
  store i64 %193, ptr %190, align 8, !tbaa !12
  br label %194

194:                                              ; preds = %185, %161
  %195 = getelementptr inbounds i8, ptr %166, i64 16
  %196 = load i64, ptr %195, align 8, !tbaa !12
  %197 = getelementptr inbounds i8, ptr %166, i64 24
  %198 = load i64, ptr %197, align 8, !tbaa !12
  %199 = add nsw i64 %198, %196
  %200 = add nsw i64 %199, %177
  %201 = getelementptr inbounds [1048576 x [5 x i64]], ptr @dp, i64 0, i64 %171, i64 4
  %202 = load i64, ptr %201, align 8, !tbaa !12
  %203 = add nsw i64 %200, %202
  %204 = srem i64 %203, %162
  store i64 %204, ptr %201, align 8, !tbaa !12
  br label %205

205:                                              ; preds = %194, %107, %92, %138, %143, %127, %71
  %206 = phi i32 [ %163, %194 ], [ %94, %107 ], [ %94, %92 ], [ %.pre14, %138 ], [ %.pre14, %143 ], [ %.pre, %127 ], [ %73, %71 ]
  %207 = add nsw i32 %206, 1
  store i32 %207, ptr @i, align 4, !tbaa !8
  %208 = load i32, ptr @n, align 4, !tbaa !8
  %209 = icmp slt i32 %207, %208
  br i1 %209, label %.lr.ph, label %.preheader, !llvm.loop !14
}

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

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

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

; 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 nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.vector.reduce.add.v4i64(<4 x i64>) #5

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 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 #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"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 = !{!10, !10, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"long long", !10, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


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