; LLVM IR from kazunetakahashi/atcoder :: 2018/1104_ABC113 (D)

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

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

@H = external dso_local global i64, align 8
@W = external dso_local global i64, align 8
@K = external dso_local global i64, align 8
@cnt = external dso_local global [10 x i64], align 16
@S = external dso_local global [10 x i64], align 16
@T = external dso_local global [10 x i64], align 16
@DP = external dso_local global [110 x [10 x i64]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @H)
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(8) @W)
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(8) @K)
  %19 = load i64, ptr @K, align 8, !tbaa !5
  %20 = add nsw i64 %19, -1
  store i64 %20, ptr @K, align 8, !tbaa !5
  store i64 1, ptr @cnt, align 16, !tbaa !5
  store i64 2, ptr getelementptr inbounds ([10 x i64], ptr @cnt, i64 0, i64 1), align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 2, ptr %2, align 4, !tbaa !9
  br label %21

21:                                               ; preds = %40, %0
  %22 = load i32, ptr %2, align 4, !tbaa !9
  %23 = icmp slt i32 %22, 10
  br i1 %23, label %25, label %24

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

25:                                               ; preds = %21
  %26 = load i32, ptr %2, align 4, !tbaa !9
  %27 = sub nsw i32 %26, 1
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [10 x i64], ptr @cnt, i64 0, i64 %28
  %30 = load i64, ptr %29, align 8, !tbaa !5
  %31 = load i32, ptr %2, align 4, !tbaa !9
  %32 = sub nsw i32 %31, 2
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [10 x i64], ptr @cnt, i64 0, i64 %33
  %35 = load i64, ptr %34, align 8, !tbaa !5
  %36 = add nsw i64 %30, %35
  %37 = load i32, ptr %2, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [10 x i64], ptr @cnt, i64 0, i64 %38
  store i64 %36, ptr %39, align 8, !tbaa !5
  br label %40

40:                                               ; preds = %25
  %41 = load i32, ptr %2, align 4, !tbaa !9
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr %2, align 4, !tbaa !9
  br label %21, !llvm.loop !11

43:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  store i64 0, ptr %3, align 8, !tbaa !5
  br label %44

44:                                               ; preds = %83, %43
  %45 = load i64, ptr %3, align 8, !tbaa !5
  %46 = icmp slt i64 %45, 10
  br i1 %46, label %48, label %47

47:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  br label %86

48:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %49 = load i64, ptr %3, align 8, !tbaa !5
  %50 = sub nsw i64 %49, 1
  store i64 %50, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  store i64 0, ptr %5, align 8, !tbaa !5
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %52 = load i64, ptr %51, align 8, !tbaa !5
  %53 = getelementptr inbounds [10 x i64], ptr @cnt, i64 0, i64 %52
  %54 = load i64, ptr %53, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %55 = load i64, ptr @W, align 8, !tbaa !5
  %56 = load i64, ptr %3, align 8, !tbaa !5
  %57 = sub nsw i64 %55, %56
  %58 = sub nsw i64 %57, 3
  store i64 %58, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store i64 0, ptr %7, align 8, !tbaa !5
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %60 = load i64, ptr %59, align 8, !tbaa !5
  %61 = getelementptr inbounds [10 x i64], ptr @cnt, i64 0, i64 %60
  %62 = load i64, ptr %61, align 8, !tbaa !5
  %63 = mul nsw i64 %54, %62
  %64 = load i64, ptr %3, align 8, !tbaa !5
  %65 = getelementptr inbounds [10 x i64], ptr @S, i64 0, i64 %64
  store i64 %63, ptr %65, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %66 = load i64, ptr %3, align 8, !tbaa !5
  %67 = sub nsw i64 %66, 1
  store i64 %67, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store i64 0, ptr %9, align 8, !tbaa !5
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %69 = load i64, ptr %68, align 8, !tbaa !5
  %70 = getelementptr inbounds [10 x i64], ptr @cnt, i64 0, i64 %69
  %71 = load i64, ptr %70, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %72 = load i64, ptr @W, align 8, !tbaa !5
  %73 = load i64, ptr %3, align 8, !tbaa !5
  %74 = sub nsw i64 %72, %73
  %75 = sub nsw i64 %74, 2
  store i64 %75, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store i64 0, ptr %11, align 8, !tbaa !5
  %76 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11)
  %77 = load i64, ptr %76, align 8, !tbaa !5
  %78 = getelementptr inbounds [10 x i64], ptr @cnt, i64 0, i64 %77
  %79 = load i64, ptr %78, align 8, !tbaa !5
  %80 = mul nsw i64 %71, %79
  %81 = load i64, ptr %3, align 8, !tbaa !5
  %82 = getelementptr inbounds [10 x i64], ptr @T, i64 0, i64 %81
  store i64 %80, ptr %82, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %83

83:                                               ; preds = %48
  %84 = load i64, ptr %3, align 8, !tbaa !5
  %85 = add nsw i64 %84, 1
  store i64 %85, ptr %3, align 8, !tbaa !5
  br label %44, !llvm.loop !13

86:                                               ; preds = %47
  store i64 1, ptr @DP, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 1, ptr %12, align 4, !tbaa !9
  br label %87

87:                                               ; preds = %97, %86
  %88 = load i32, ptr %12, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = load i64, ptr @W, align 8, !tbaa !5
  %91 = icmp slt i64 %89, %90
  br i1 %91, label %93, label %92

92:                                               ; preds = %87
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %100

93:                                               ; preds = %87
  %94 = load i32, ptr %12, align 4, !tbaa !9
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [10 x i64], ptr @DP, i64 0, i64 %95
  store i64 0, ptr %96, align 8, !tbaa !5
  br label %97

97:                                               ; preds = %93
  %98 = load i32, ptr %12, align 4, !tbaa !9
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %12, align 4, !tbaa !9
  br label %87, !llvm.loop !14

100:                                              ; preds = %92
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 1, ptr %13, align 4, !tbaa !9
  br label %101

101:                                              ; preds = %219, %100
  %102 = load i32, ptr %13, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = load i64, ptr @H, align 8, !tbaa !5
  %105 = icmp sle i64 %103, %104
  br i1 %105, label %107, label %106

106:                                              ; preds = %101
  store i32 11, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %222

107:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %108

108:                                              ; preds = %215, %107
  %109 = load i32, ptr %15, align 4, !tbaa !9
  %110 = sext i32 %109 to i64
  %111 = load i64, ptr @W, align 8, !tbaa !5
  %112 = icmp slt i64 %110, %111
  br i1 %112, label %114, label %113

113:                                              ; preds = %108
  store i32 14, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %218

114:                                              ; preds = %108
  %115 = load i32, ptr %13, align 4, !tbaa !9
  %116 = sub nsw i32 %115, 1
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [110 x [10 x i64]], ptr @DP, i64 0, i64 %117
  %119 = load i32, ptr %15, align 4, !tbaa !9
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [10 x i64], ptr %118, i64 0, i64 %120
  %122 = load i64, ptr %121, align 8, !tbaa !5
  %123 = load i32, ptr %15, align 4, !tbaa !9
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [10 x i64], ptr @T, i64 0, i64 %124
  %126 = load i64, ptr %125, align 8, !tbaa !5
  %127 = mul nsw i64 %122, %126
  %128 = load i32, ptr %13, align 4, !tbaa !9
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [110 x [10 x i64]], ptr @DP, i64 0, i64 %129
  %131 = load i32, ptr %15, align 4, !tbaa !9
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [10 x i64], ptr %130, i64 0, i64 %132
  store i64 %127, ptr %133, align 8, !tbaa !5
  %134 = load i32, ptr %13, align 4, !tbaa !9
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [110 x [10 x i64]], ptr @DP, i64 0, i64 %135
  %137 = load i32, ptr %15, align 4, !tbaa !9
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [10 x i64], ptr %136, i64 0, i64 %138
  %140 = load i64, ptr %139, align 8, !tbaa !5
  %141 = srem i64 %140, 1000000007
  store i64 %141, ptr %139, align 8, !tbaa !5
  %142 = load i32, ptr %15, align 4, !tbaa !9
  %143 = sub nsw i32 %142, 1
  %144 = icmp sge i32 %143, 0
  br i1 %144, label %145, label %177

145:                                              ; preds = %114
  %146 = load i32, ptr %13, align 4, !tbaa !9
  %147 = sub nsw i32 %146, 1
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [110 x [10 x i64]], ptr @DP, i64 0, i64 %148
  %150 = load i32, ptr %15, align 4, !tbaa !9
  %151 = sub nsw i32 %150, 1
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [10 x i64], ptr %149, i64 0, i64 %152
  %154 = load i64, ptr %153, align 8, !tbaa !5
  %155 = load i32, ptr %15, align 4, !tbaa !9
  %156 = sub nsw i32 %155, 1
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [10 x i64], ptr @S, i64 0, i64 %157
  %159 = load i64, ptr %158, align 8, !tbaa !5
  %160 = mul nsw i64 %154, %159
  %161 = load i32, ptr %13, align 4, !tbaa !9
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [110 x [10 x i64]], ptr @DP, i64 0, i64 %162
  %164 = load i32, ptr %15, align 4, !tbaa !9
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [10 x i64], ptr %163, i64 0, i64 %165
  %167 = load i64, ptr %166, align 8, !tbaa !5
  %168 = add nsw i64 %167, %160
  store i64 %168, ptr %166, align 8, !tbaa !5
  %169 = load i32, ptr %13, align 4, !tbaa !9
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [110 x [10 x i64]], ptr @DP, i64 0, i64 %170
  %172 = load i32, ptr %15, align 4, !tbaa !9
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [10 x i64], ptr %171, i64 0, i64 %173
  %175 = load i64, ptr %174, align 8, !tbaa !5
  %176 = srem i64 %175, 1000000007
  store i64 %176, ptr %174, align 8, !tbaa !5
  br label %177

177:                                              ; preds = %145, %114
  %178 = load i32, ptr %15, align 4, !tbaa !9
  %179 = add nsw i32 %178, 1
  %180 = sext i32 %179 to i64
  %181 = load i64, ptr @W, align 8, !tbaa !5
  %182 = icmp slt i64 %180, %181
  br i1 %182, label %183, label %214

183:                                              ; preds = %177
  %184 = load i32, ptr %13, align 4, !tbaa !9
  %185 = sub nsw i32 %184, 1
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [110 x [10 x i64]], ptr @DP, i64 0, i64 %186
  %188 = load i32, ptr %15, align 4, !tbaa !9
  %189 = add nsw i32 %188, 1
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [10 x i64], ptr %187, i64 0, i64 %190
  %192 = load i64, ptr %191, align 8, !tbaa !5
  %193 = load i32, ptr %15, align 4, !tbaa !9
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds [10 x i64], ptr @S, i64 0, i64 %194
  %196 = load i64, ptr %195, align 8, !tbaa !5
  %197 = mul nsw i64 %192, %196
  %198 = load i32, ptr %13, align 4, !tbaa !9
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds [110 x [10 x i64]], ptr @DP, i64 0, i64 %199
  %201 = load i32, ptr %15, align 4, !tbaa !9
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds [10 x i64], ptr %200, i64 0, i64 %202
  %204 = load i64, ptr %203, align 8, !tbaa !5
  %205 = add nsw i64 %204, %197
  store i64 %205, ptr %203, align 8, !tbaa !5
  %206 = load i32, ptr %13, align 4, !tbaa !9
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [110 x [10 x i64]], ptr @DP, i64 0, i64 %207
  %209 = load i32, ptr %15, align 4, !tbaa !9
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds [10 x i64], ptr %208, i64 0, i64 %210
  %212 = load i64, ptr %211, align 8, !tbaa !5
  %213 = srem i64 %212, 1000000007
  store i64 %213, ptr %211, align 8, !tbaa !5
  br label %214

214:                                              ; preds = %183, %177
  br label %215

215:                                              ; preds = %214
  %216 = load i32, ptr %15, align 4, !tbaa !9
  %217 = add nsw i32 %216, 1
  store i32 %217, ptr %15, align 4, !tbaa !9
  br label %108, !llvm.loop !15

218:                                              ; preds = %113
  br label %219

219:                                              ; preds = %218
  %220 = load i32, ptr %13, align 4, !tbaa !9
  %221 = add nsw i32 %220, 1
  store i32 %221, ptr %13, align 4, !tbaa !9
  br label %101, !llvm.loop !16

222:                                              ; preds = %106
  %223 = load i64, ptr @H, align 8, !tbaa !5
  %224 = getelementptr inbounds [110 x [10 x i64]], ptr @DP, i64 0, i64 %223
  %225 = load i64, ptr @K, align 8, !tbaa !5
  %226 = getelementptr inbounds [10 x i64], ptr %224, i64 0, i64 %225
  %227 = load i64, ptr %226, align 8, !tbaa !5
  %228 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %227)
  %229 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %228, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %230 = load i32, ptr %1, align 4
  ret i32 %230
}

; 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)) #1 align 2

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

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

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

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

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

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

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

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

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


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

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

@H = external dso_local global i64, align 8
@W = external dso_local global i64, align 8
@K = external dso_local global i64, align 8
@cnt = external dso_local local_unnamed_addr global [10 x i64], align 16
@S = external dso_local local_unnamed_addr global [10 x i64], align 16
@T = external dso_local local_unnamed_addr global [10 x i64], align 16
@DP = external dso_local local_unnamed_addr global [110 x [10 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 {
.preheader56.preheader:
  %0 = alloca i64, align 8
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @H)
  %9 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(8) @W)
  %10 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(8) @K)
  %11 = load i64, ptr @K, align 8, !tbaa !5
  %12 = add nsw i64 %11, -1
  store i64 %12, ptr @K, align 8, !tbaa !5
  store i64 1, ptr @cnt, align 16, !tbaa !5
  store i64 2, ptr getelementptr inbounds (i8, ptr @cnt, i64 8), align 8, !tbaa !5
  store i64 3, ptr getelementptr inbounds (i8, ptr @cnt, i64 16), align 16, !tbaa !5
  store i64 5, ptr getelementptr inbounds (i8, ptr @cnt, i64 24), align 8, !tbaa !5
  store i64 8, ptr getelementptr inbounds (i8, ptr @cnt, i64 32), align 16, !tbaa !5
  store i64 13, ptr getelementptr inbounds (i8, ptr @cnt, i64 40), align 8, !tbaa !5
  store i64 21, ptr getelementptr inbounds (i8, ptr @cnt, i64 48), align 16, !tbaa !5
  store i64 34, ptr getelementptr inbounds (i8, ptr @cnt, i64 56), align 8, !tbaa !5
  store i64 55, ptr getelementptr inbounds (i8, ptr @cnt, i64 64), align 16, !tbaa !5
  store i64 89, ptr getelementptr inbounds (i8, ptr @cnt, i64 72), align 8, !tbaa !5
  br label %.preheader56

13:                                               ; preds = %.preheader56
  store i64 1, ptr @DP, align 16, !tbaa !5
  %14 = load i64, ptr @W, align 8, !tbaa !5
  %15 = icmp sgt i64 %14, 1
  br i1 %15, label %.lr.ph.preheader, label %.preheader55

.lr.ph.preheader:                                 ; preds = %13
  %16 = shl i64 %14, 3
  %17 = add i64 %16, -8
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @DP, i64 8), i8 0, i64 %17, i1 false), !tbaa !5
  br label %.preheader55

.preheader56:                                     ; preds = %.preheader56.preheader, %.preheader56
  %.046.neg60 = phi i64 [ %.046.neg, %.preheader56 ], [ 0, %.preheader56.preheader ]
  %.04659 = phi i64 [ %45, %.preheader56 ], [ 0, %.preheader56.preheader ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %0) #6
  %18 = add nsw i64 %.04659, -1
  store i64 %18, ptr %0, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  store i64 0, ptr %1, align 8, !tbaa !5
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %20 = load i64, ptr %19, align 8, !tbaa !5
  %21 = getelementptr inbounds [10 x i64], ptr @cnt, i64 0, i64 %20
  %22 = load i64, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  %23 = load i64, ptr @W, align 8, !tbaa !5
  %24 = add nsw i64 %.046.neg60, -3
  %25 = add i64 %24, %23
  store i64 %25, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  store i64 0, ptr %3, align 8, !tbaa !5
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %27 = load i64, ptr %26, align 8, !tbaa !5
  %28 = getelementptr inbounds [10 x i64], ptr @cnt, i64 0, i64 %27
  %29 = load i64, ptr %28, align 8, !tbaa !5
  %30 = mul nsw i64 %29, %22
  %31 = getelementptr inbounds [10 x i64], ptr @S, i64 0, i64 %.04659
  store i64 %30, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %0) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  store i64 %18, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  store i64 0, ptr %5, align 8, !tbaa !5
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %33 = load i64, ptr %32, align 8, !tbaa !5
  %34 = getelementptr inbounds [10 x i64], ptr @cnt, i64 0, i64 %33
  %35 = load i64, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %36 = load i64, ptr @W, align 8, !tbaa !5
  %37 = add nsw i64 %.046.neg60, -2
  %38 = add i64 %37, %36
  store i64 %38, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  store i64 0, ptr %7, align 8, !tbaa !5
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %40 = load i64, ptr %39, align 8, !tbaa !5
  %41 = getelementptr inbounds [10 x i64], ptr @cnt, i64 0, i64 %40
  %42 = load i64, ptr %41, align 8, !tbaa !5
  %43 = mul nsw i64 %42, %35
  %44 = getelementptr inbounds [10 x i64], ptr @T, i64 0, i64 %.04659
  store i64 %43, ptr %44, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  %45 = add nuw nsw i64 %.04659, 1
  %.046.neg = xor i64 %.04659, -1
  %exitcond.not = icmp eq i64 %45, 10
  br i1 %exitcond.not, label %13, label %.preheader56, !llvm.loop !9

.preheader55:                                     ; preds = %.lr.ph.preheader, %13
  %46 = load i64, ptr @H, align 8, !tbaa !5
  %.not64 = icmp sgt i64 %46, 0
  %47 = icmp sgt i64 %14, 0
  %or.cond = and i1 %.not64, %47
  br i1 %or.cond, label %.preheader.us.preheader, label %._crit_edge66

.preheader.us.preheader:                          ; preds = %.preheader55
  %.pre = load i64, ptr @T, align 16, !tbaa !5
  %.not = icmp eq i64 %14, 1
  %48 = load i64, ptr @S, align 16
  br label %49

49:                                               ; preds = %._crit_edge.us, %.preheader.us.preheader
  %50 = phi i64 [ 1, %.preheader.us.preheader ], [ %86, %._crit_edge.us ]
  %indvars.iv75 = phi i64 [ 1, %.preheader.us.preheader ], [ %indvars.iv.next76, %._crit_edge.us ]
  %51 = add nsw i64 %indvars.iv75, -1
  %52 = mul nsw i64 %.pre, %50
  %53 = getelementptr inbounds [110 x [10 x i64]], ptr @DP, i64 0, i64 %indvars.iv75, i64 0
  %54 = srem i64 %52, 1000000007
  store i64 %54, ptr %53, align 16, !tbaa !5
  br i1 %.not, label %._crit_edge.us, label %.peel.next

.peel.next:                                       ; preds = %49
  %55 = getelementptr inbounds [110 x [10 x i64]], ptr @DP, i64 0, i64 %51, i64 1
  %56 = load i64, ptr %55, align 8, !tbaa !5
  %57 = mul nsw i64 %48, %56
  %58 = add nsw i64 %54, %57
  %59 = srem i64 %58, 1000000007
  store i64 %59, ptr %53, align 16, !tbaa !5
  br label %60

60:                                               ; preds = %.peel.next, %85
  %indvars.iv = phi i64 [ 1, %.peel.next ], [ %indvars.iv.next, %85 ]
  %61 = getelementptr inbounds [110 x [10 x i64]], ptr @DP, i64 0, i64 %51, i64 %indvars.iv
  %62 = load i64, ptr %61, align 8, !tbaa !5
  %63 = getelementptr inbounds [10 x i64], ptr @T, i64 0, i64 %indvars.iv
  %64 = load i64, ptr %63, align 8, !tbaa !5
  %65 = mul nsw i64 %64, %62
  %66 = getelementptr inbounds [110 x [10 x i64]], ptr @DP, i64 0, i64 %indvars.iv75, i64 %indvars.iv
  %67 = srem i64 %65, 1000000007
  %68 = add nsw i64 %indvars.iv, -1
  %69 = getelementptr inbounds [110 x [10 x i64]], ptr @DP, i64 0, i64 %51, i64 %68
  %70 = load i64, ptr %69, align 8, !tbaa !5
  %71 = getelementptr inbounds [10 x i64], ptr @S, i64 0, i64 %68
  %72 = load i64, ptr %71, align 8, !tbaa !5
  %73 = mul nsw i64 %72, %70
  %74 = add nsw i64 %73, %67
  %75 = srem i64 %74, 1000000007
  store i64 %75, ptr %66, align 8, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %76 = icmp ugt i64 %14, %indvars.iv.next
  br i1 %76, label %77, label %85

77:                                               ; preds = %60
  %78 = getelementptr inbounds [110 x [10 x i64]], ptr @DP, i64 0, i64 %51, i64 %indvars.iv.next
  %79 = load i64, ptr %78, align 8, !tbaa !5
  %80 = getelementptr inbounds [10 x i64], ptr @S, i64 0, i64 %indvars.iv
  %81 = load i64, ptr %80, align 8, !tbaa !5
  %82 = mul nsw i64 %81, %79
  %83 = add nsw i64 %75, %82
  %84 = srem i64 %83, 1000000007
  store i64 %84, ptr %66, align 8, !tbaa !5
  br label %85

85:                                               ; preds = %77, %60
  %exitcond73.not = icmp eq i64 %indvars.iv.next, %14
  br i1 %exitcond73.not, label %._crit_edge.us, label %60, !llvm.loop !11

._crit_edge.us:                                   ; preds = %85, %49
  %86 = phi i64 [ %54, %49 ], [ %59, %85 ]
  %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1
  %exitcond78 = icmp eq i64 %indvars.iv75, %46
  br i1 %exitcond78, label %._crit_edge66, label %49, !llvm.loop !13

._crit_edge66:                                    ; preds = %._crit_edge.us, %.preheader55
  %87 = load i64, ptr @K, align 8, !tbaa !5
  %88 = getelementptr inbounds [110 x [10 x i64]], ptr @DP, i64 0, i64 %46, i64 %87
  %89 = load i64, ptr %88, align 8, !tbaa !5
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %89)
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %90, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0
}

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) 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 #1 align 2

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind }

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

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


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