; LLVM IR from kazunetakahashi/atcoder :: 201411_201509/0627_ABC025 (D2_MLE)

; 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 [33554442 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 nounwind uwtable
declare dso_local noundef zeroext i1 @_Z3sftii(i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z7checkerii(i32 noundef, i32 noundef) #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %1 = alloca i32, align 4
  %2 = alloca [25 x i8], align 16
  %3 = alloca i8, align 1
  %4 = alloca [25 x i8], align 16
  %5 = alloca i8, align 1
  %6 = alloca [25 x i32], align 16
  %7 = alloca [5 x [5 x i32]], align 16
  %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 i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 25, ptr %2) #6
  %19 = getelementptr inbounds [25 x i8], ptr %2, i64 0, i64 0
  %20 = getelementptr inbounds [25 x i8], ptr %2, i64 0, i64 0
  %21 = getelementptr inbounds i8, ptr %20, i64 25
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #6
  store i8 0, ptr %3, align 1, !tbaa !5
  call void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef %19, ptr noundef %21, ptr noundef nonnull align 1 dereferenceable(1) %3)
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 25, ptr %4) #6
  %22 = getelementptr inbounds [25 x i8], ptr %4, i64 0, i64 0
  %23 = getelementptr inbounds [25 x i8], ptr %4, i64 0, i64 0
  %24 = getelementptr inbounds i8, ptr %23, i64 25
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #6
  store i8 1, ptr %5, align 1, !tbaa !5
  call void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef %22, ptr noundef %24, ptr noundef nonnull align 1 dereferenceable(1) %5)
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 100, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 100, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %25

25:                                               ; preds = %93, %0
  %26 = load i32, ptr %8, align 4, !tbaa !9
  %27 = icmp slt i32 %26, 5
  br i1 %27, label %29, label %28

28:                                               ; preds = %25
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %96

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

30:                                               ; preds = %89, %29
  %31 = load i32, ptr %10, align 4, !tbaa !9
  %32 = icmp slt i32 %31, 5
  br i1 %32, label %34, label %33

33:                                               ; preds = %30
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %92

34:                                               ; preds = %30
  %35 = load i32, ptr %8, align 4, !tbaa !9
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [5 x [5 x i32]], ptr %7, i64 0, i64 %36
  %38 = load i32, ptr %10, align 4, !tbaa !9
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [5 x i32], ptr %37, i64 0, i64 %39
  %41 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %40)
  %42 = load i32, ptr %8, align 4, !tbaa !9
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [5 x [5 x i32]], ptr %7, i64 0, i64 %43
  %45 = load i32, ptr %10, align 4, !tbaa !9
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [5 x i32], ptr %44, i64 0, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !9
  %49 = add nsw i32 %48, -1
  store i32 %49, ptr %47, align 4, !tbaa !9
  %50 = load i32, ptr %8, align 4, !tbaa !9
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [5 x [5 x i32]], ptr %7, i64 0, i64 %51
  %53 = load i32, ptr %10, align 4, !tbaa !9
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [5 x i32], ptr %52, i64 0, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !9
  %57 = icmp eq i32 %56, -1
  br i1 %57, label %58, label %59

58:                                               ; preds = %34
  br label %88

59:                                               ; preds = %34
  %60 = load i32, ptr %8, align 4, !tbaa !9
  %61 = mul nsw i32 %60, 5
  %62 = load i32, ptr %10, align 4, !tbaa !9
  %63 = add nsw i32 %61, %62
  %64 = load i32, ptr %8, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [5 x [5 x i32]], ptr %7, i64 0, i64 %65
  %67 = load i32, ptr %10, align 4, !tbaa !9
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [5 x i32], ptr %66, i64 0, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [25 x i32], ptr %6, i64 0, i64 %71
  store i32 %63, ptr %72, align 4, !tbaa !9
  %73 = load i32, ptr %8, align 4, !tbaa !9
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [5 x [5 x i32]], ptr %7, i64 0, i64 %74
  %76 = load i32, ptr %10, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [5 x i32], ptr %75, i64 0, i64 %77
  %79 = load i32, ptr %78, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [25 x i8], ptr %2, i64 0, i64 %80
  store i8 1, ptr %81, align 1, !tbaa !5
  %82 = load i32, ptr %8, align 4, !tbaa !9
  %83 = mul nsw i32 %82, 5
  %84 = load i32, ptr %10, align 4, !tbaa !9
  %85 = add nsw i32 %83, %84
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [25 x i8], ptr %4, i64 0, i64 %86
  store i8 0, ptr %87, align 1, !tbaa !5
  br label %88

88:                                               ; preds = %59, %58
  br label %89

89:                                               ; preds = %88
  %90 = load i32, ptr %10, align 4, !tbaa !9
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr %10, align 4, !tbaa !9
  br label %30, !llvm.loop !11

92:                                               ; preds = %33
  br label %93

93:                                               ; preds = %92
  %94 = load i32, ptr %8, align 4, !tbaa !9
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %8, align 4, !tbaa !9
  br label %25, !llvm.loop !13

96:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !9
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef @DP, ptr noundef getelementptr inbounds (i64, ptr @DP, i64 33554442), ptr noundef nonnull align 4 dereferenceable(4) %11)
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  store i64 1, ptr @DP, align 16, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 1, ptr %12, align 4, !tbaa !9
  br label %97

97:                                               ; preds = %206, %96
  %98 = load i32, ptr %12, align 4, !tbaa !9
  %99 = icmp sle i32 %98, 25
  br i1 %99, label %101, label %100

100:                                              ; preds = %97
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %209

101:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %102 = load i32, ptr %12, align 4, !tbaa !9
  %103 = shl i32 1, %102
  %104 = sub nsw i32 %103, 1
  store i32 %104, ptr %13, align 4, !tbaa !9
  br label %105

105:                                              ; preds = %187, %101
  %106 = load i32, ptr %13, align 4, !tbaa !9
  %107 = icmp slt i32 %106, 33554432
  br i1 %107, label %108, label %205

108:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %109 = load i32, ptr %12, align 4, !tbaa !9
  %110 = sub nsw i32 %109, 1
  store i32 %110, ptr %14, align 4, !tbaa !9
  %111 = load i32, ptr %14, align 4, !tbaa !9
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [25 x i8], ptr %2, i64 0, i64 %112
  %114 = load i8, ptr %113, align 1, !tbaa !5, !range !16, !noundef !17
  %115 = trunc i8 %114 to i1
  br i1 %115, label %116, label %145

116:                                              ; preds = %108
  %117 = load i32, ptr %13, align 4, !tbaa !9
  %118 = load i32, ptr %14, align 4, !tbaa !9
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [25 x i32], ptr %6, i64 0, i64 %119
  %121 = load i32, ptr %120, align 4, !tbaa !9
  %122 = call noundef zeroext i1 @_Z3sftii(i32 noundef %117, i32 noundef %121)
  br i1 %122, label %123, label %144

123:                                              ; preds = %116
  %124 = load i32, ptr %13, align 4, !tbaa !9
  %125 = load i32, ptr %14, align 4, !tbaa !9
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [25 x i32], ptr %6, i64 0, i64 %126
  %128 = load i32, ptr %127, align 4, !tbaa !9
  %129 = call noundef zeroext i1 @_Z7checkerii(i32 noundef %124, i32 noundef %128)
  br i1 %129, label %130, label %144

130:                                              ; preds = %123
  %131 = load i32, ptr %13, align 4, !tbaa !9
  %132 = load i32, ptr %14, align 4, !tbaa !9
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [25 x i32], ptr %6, i64 0, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !9
  %136 = shl i32 1, %135
  %137 = sub nsw i32 %131, %136
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [33554442 x i64], ptr @DP, i64 0, i64 %138
  %140 = load i64, ptr %139, align 8, !tbaa !14
  %141 = load i32, ptr %13, align 4, !tbaa !9
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [33554442 x i64], ptr @DP, i64 0, i64 %142
  store i64 %140, ptr %143, align 8, !tbaa !14
  br label %144

144:                                              ; preds = %130, %123, %116
  br label %187

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

146:                                              ; preds = %183, %145
  %147 = load i32, ptr %15, align 4, !tbaa !9
  %148 = icmp slt i32 %147, 25
  br i1 %148, label %150, label %149

149:                                              ; preds = %146
  store i32 13, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %186

150:                                              ; preds = %146
  %151 = load i32, ptr %15, align 4, !tbaa !9
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [25 x i8], ptr %4, i64 0, i64 %152
  %154 = load i8, ptr %153, align 1, !tbaa !5, !range !16, !noundef !17
  %155 = trunc i8 %154 to i1
  br i1 %155, label %156, label %182

156:                                              ; preds = %150
  %157 = load i32, ptr %13, align 4, !tbaa !9
  %158 = load i32, ptr %15, align 4, !tbaa !9
  %159 = call noundef zeroext i1 @_Z3sftii(i32 noundef %157, i32 noundef %158)
  br i1 %159, label %160, label %182

160:                                              ; preds = %156
  %161 = load i32, ptr %13, align 4, !tbaa !9
  %162 = load i32, ptr %15, align 4, !tbaa !9
  %163 = call noundef zeroext i1 @_Z7checkerii(i32 noundef %161, i32 noundef %162)
  br i1 %163, label %164, label %182

164:                                              ; preds = %160
  %165 = load i32, ptr %13, align 4, !tbaa !9
  %166 = load i32, ptr %15, align 4, !tbaa !9
  %167 = shl i32 1, %166
  %168 = sub nsw i32 %165, %167
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [33554442 x i64], ptr @DP, i64 0, i64 %169
  %171 = load i64, ptr %170, align 8, !tbaa !14
  %172 = load i32, ptr %13, align 4, !tbaa !9
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [33554442 x i64], ptr @DP, i64 0, i64 %173
  %175 = load i64, ptr %174, align 8, !tbaa !14
  %176 = add nsw i64 %175, %171
  store i64 %176, ptr %174, align 8, !tbaa !14
  %177 = load i32, ptr %13, align 4, !tbaa !9
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds [33554442 x i64], ptr @DP, i64 0, i64 %178
  %180 = load i64, ptr %179, align 8, !tbaa !14
  %181 = srem i64 %180, 1000000007
  store i64 %181, ptr %179, align 8, !tbaa !14
  br label %182

182:                                              ; preds = %164, %160, %156, %150
  br label %183

183:                                              ; preds = %182
  %184 = load i32, ptr %15, align 4, !tbaa !9
  %185 = add nsw i32 %184, 1
  store i32 %185, ptr %15, align 4, !tbaa !9
  br label %146, !llvm.loop !18

186:                                              ; preds = %149
  br label %187

187:                                              ; preds = %186, %144
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %188 = load i32, ptr %13, align 4, !tbaa !9
  %189 = load i32, ptr %13, align 4, !tbaa !9
  %190 = sub nsw i32 0, %189
  %191 = and i32 %188, %190
  store i32 %191, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %192 = load i32, ptr %13, align 4, !tbaa !9
  %193 = load i32, ptr %16, align 4, !tbaa !9
  %194 = add nsw i32 %192, %193
  store i32 %194, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %195 = load i32, ptr %13, align 4, !tbaa !9
  %196 = load i32, ptr %17, align 4, !tbaa !9
  %197 = xor i32 %196, -1
  %198 = and i32 %195, %197
  store i32 %198, ptr %18, align 4, !tbaa !9
  %199 = load i32, ptr %18, align 4, !tbaa !9
  %200 = load i32, ptr %16, align 4, !tbaa !9
  %201 = sdiv i32 %199, %200
  %202 = ashr i32 %201, 1
  %203 = load i32, ptr %17, align 4, !tbaa !9
  %204 = or i32 %202, %203
  store i32 %204, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %105, !llvm.loop !19

205:                                              ; preds = %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %206

206:                                              ; preds = %205
  %207 = load i32, ptr %12, align 4, !tbaa !9
  %208 = add nsw i32 %207, 1
  store i32 %208, ptr %12, align 4, !tbaa !9
  br label %97, !llvm.loop !20

209:                                              ; preds = %100
  %210 = load i64, ptr getelementptr inbounds ([33554442 x i64], ptr @DP, i64 0, i64 33554431), align 8, !tbaa !14
  %211 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %210)
  %212 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %211, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 100, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 100, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 25, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 25, ptr %2) #6
  %213 = load i32, ptr %1, align 4
  ret i32 %213
}

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #5 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) #5 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)) #3

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

@DP = external dso_local global [33554442 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 nounwind uwtable
declare dso_local noundef zeroext i1 @_Z3sftii(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z7checkerii(i32 noundef, i32 noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca [25 x i8], align 16
  %2 = alloca i8, align 1
  %3 = alloca [25 x i8], align 16
  %4 = alloca i8, align 1
  %5 = alloca [25 x i32], align 16
  %6 = alloca [5 x [5 x i32]], align 16
  %7 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 25, ptr nonnull %1) #6
  %8 = getelementptr inbounds i8, ptr %1, i64 25
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #6
  store i8 0, ptr %2, align 1, !tbaa !5
  call void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef nonnull %1, ptr noundef nonnull %8, ptr noundef nonnull align 1 dereferenceable(1) %2)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 25, ptr nonnull %3) #6
  %9 = getelementptr inbounds i8, ptr %3, i64 25
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #6
  store i8 1, ptr %4, align 1, !tbaa !5
  call void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef nonnull %3, ptr noundef nonnull %9, ptr noundef nonnull align 1 dereferenceable(1) %4)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %6) #6
  br label %.preheader58

.preheader58:                                     ; preds = %0, %75
  %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %75 ]
  %10 = mul nuw nsw i64 %indvars.iv, 5
  %11 = getelementptr inbounds [5 x [5 x i32]], ptr %6, i64 0, i64 %indvars.iv, i64 0
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %13 = load i32, ptr %11, align 4, !tbaa !9
  %14 = add nsw i32 %13, -1
  store i32 %14, ptr %11, align 4, !tbaa !9
  %15 = icmp eq i32 %13, 0
  br i1 %15, label %23, label %17

16:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull @DP, ptr noundef nonnull getelementptr inbounds (i8, ptr @DP, i64 268435536), ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  store i64 1, ptr @DP, align 16, !tbaa !11
  br label %80

17:                                               ; preds = %.preheader58
  %18 = sext i32 %14 to i64
  %19 = getelementptr inbounds [25 x i32], ptr %5, i64 0, i64 %18
  %20 = trunc nuw nsw i64 %10 to i32
  store i32 %20, ptr %19, align 4, !tbaa !9
  %21 = getelementptr inbounds [25 x i8], ptr %1, i64 0, i64 %18
  store i8 1, ptr %21, align 1, !tbaa !5
  %22 = getelementptr inbounds [25 x i8], ptr %3, i64 0, i64 %10
  store i8 0, ptr %22, align 1, !tbaa !5
  br label %23

23:                                               ; preds = %17, %.preheader58
  %24 = getelementptr inbounds [5 x [5 x i32]], ptr %6, i64 0, i64 %indvars.iv, i64 1
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %24)
  %26 = load i32, ptr %24, align 4, !tbaa !9
  %27 = add nsw i32 %26, -1
  store i32 %27, ptr %24, align 4, !tbaa !9
  %28 = icmp eq i32 %26, 0
  br i1 %28, label %36, label %29

29:                                               ; preds = %23
  %30 = add nuw nsw i64 %10, 1
  %31 = sext i32 %27 to i64
  %32 = getelementptr inbounds [25 x i32], ptr %5, i64 0, i64 %31
  %33 = trunc nuw nsw i64 %30 to i32
  store i32 %33, ptr %32, align 4, !tbaa !9
  %34 = getelementptr inbounds [25 x i8], ptr %1, i64 0, i64 %31
  store i8 1, ptr %34, align 1, !tbaa !5
  %35 = getelementptr inbounds [25 x i8], ptr %3, i64 0, i64 %30
  store i8 0, ptr %35, align 1, !tbaa !5
  br label %36

36:                                               ; preds = %29, %23
  %37 = getelementptr inbounds [5 x [5 x i32]], ptr %6, i64 0, i64 %indvars.iv, i64 2
  %38 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %37)
  %39 = load i32, ptr %37, align 4, !tbaa !9
  %40 = add nsw i32 %39, -1
  store i32 %40, ptr %37, align 4, !tbaa !9
  %41 = icmp eq i32 %39, 0
  br i1 %41, label %49, label %42

42:                                               ; preds = %36
  %43 = add nuw nsw i64 %10, 2
  %44 = sext i32 %40 to i64
  %45 = getelementptr inbounds [25 x i32], ptr %5, i64 0, i64 %44
  %46 = trunc nuw nsw i64 %43 to i32
  store i32 %46, ptr %45, align 4, !tbaa !9
  %47 = getelementptr inbounds [25 x i8], ptr %1, i64 0, i64 %44
  store i8 1, ptr %47, align 1, !tbaa !5
  %48 = getelementptr inbounds [25 x i8], ptr %3, i64 0, i64 %43
  store i8 0, ptr %48, align 1, !tbaa !5
  br label %49

49:                                               ; preds = %42, %36
  %50 = getelementptr inbounds [5 x [5 x i32]], ptr %6, i64 0, i64 %indvars.iv, i64 3
  %51 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %50)
  %52 = load i32, ptr %50, align 4, !tbaa !9
  %53 = add nsw i32 %52, -1
  store i32 %53, ptr %50, align 4, !tbaa !9
  %54 = icmp eq i32 %52, 0
  br i1 %54, label %62, label %55

55:                                               ; preds = %49
  %56 = add nuw nsw i64 %10, 3
  %57 = sext i32 %53 to i64
  %58 = getelementptr inbounds [25 x i32], ptr %5, i64 0, i64 %57
  %59 = trunc nuw nsw i64 %56 to i32
  store i32 %59, ptr %58, align 4, !tbaa !9
  %60 = getelementptr inbounds [25 x i8], ptr %1, i64 0, i64 %57
  store i8 1, ptr %60, align 1, !tbaa !5
  %61 = getelementptr inbounds [25 x i8], ptr %3, i64 0, i64 %56
  store i8 0, ptr %61, align 1, !tbaa !5
  br label %62

62:                                               ; preds = %55, %49
  %63 = getelementptr inbounds [5 x [5 x i32]], ptr %6, i64 0, i64 %indvars.iv, i64 4
  %64 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %63)
  %65 = load i32, ptr %63, align 4, !tbaa !9
  %66 = add nsw i32 %65, -1
  store i32 %66, ptr %63, align 4, !tbaa !9
  %67 = icmp eq i32 %65, 0
  br i1 %67, label %75, label %68

68:                                               ; preds = %62
  %69 = add nuw nsw i64 %10, 4
  %70 = sext i32 %66 to i64
  %71 = getelementptr inbounds [25 x i32], ptr %5, i64 0, i64 %70
  %72 = trunc nuw nsw i64 %69 to i32
  store i32 %72, ptr %71, align 4, !tbaa !9
  %73 = getelementptr inbounds [25 x i8], ptr %1, i64 0, i64 %70
  store i8 1, ptr %73, align 1, !tbaa !5
  %74 = getelementptr inbounds [25 x i8], ptr %3, i64 0, i64 %69
  store i8 0, ptr %74, align 1, !tbaa !5
  br label %75

75:                                               ; preds = %68, %62
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 5
  br i1 %exitcond.not, label %16, label %.preheader58, !llvm.loop !13

76:                                               ; preds = %._crit_edge
  %77 = load i64, ptr getelementptr inbounds (i8, ptr @DP, i64 268435448), align 8, !tbaa !11
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %77)
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %78, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 25, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 25, ptr nonnull %1) #6
  ret i32 0

80:                                               ; preds = %16, %._crit_edge
  %indvars.iv70 = phi i64 [ 1, %16 ], [ %indvars.iv.next71, %._crit_edge ]
  %81 = trunc nuw nsw i64 %indvars.iv70 to i32
  %notmask = shl nsw i32 -1, %81
  %82 = icmp ugt i32 %notmask, -33554433
  br i1 %82, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %80
  %83 = xor i32 %notmask, -1
  %84 = add nsw i64 %indvars.iv70, -1
  %85 = getelementptr inbounds [25 x i8], ptr %1, i64 0, i64 %84
  %86 = getelementptr inbounds [25 x i32], ptr %5, i64 0, i64 %84
  br label %87

87:                                               ; preds = %.lr.ph, %.loopexit
  %.05562 = phi i32 [ %83, %.lr.ph ], [ %129, %.loopexit ]
  %88 = load i8, ptr %85, align 1, !tbaa !5, !range !15, !noundef !16
  %89 = trunc nuw i8 %88 to i1
  br i1 %89, label %92, label %.preheader

.preheader:                                       ; preds = %87
  %90 = sext i32 %.05562 to i64
  %91 = getelementptr inbounds [33554442 x i64], ptr @DP, i64 0, i64 %90
  br label %104

92:                                               ; preds = %87
  %93 = load i32, ptr %86, align 4, !tbaa !9
  %94 = call noundef zeroext i1 @_Z3sftii(i32 noundef %.05562, i32 noundef %93)
  br i1 %94, label %95, label %.loopexit

95:                                               ; preds = %92
  %96 = call noundef zeroext i1 @_Z7checkerii(i32 noundef %.05562, i32 noundef %93)
  br i1 %96, label %97, label %.loopexit

97:                                               ; preds = %95
  %.neg57 = shl nsw i32 -1, %93
  %98 = add i32 %.neg57, %.05562
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [33554442 x i64], ptr @DP, i64 0, i64 %99
  %101 = load i64, ptr %100, align 8, !tbaa !11
  %102 = sext i32 %.05562 to i64
  %103 = getelementptr inbounds [33554442 x i64], ptr @DP, i64 0, i64 %102
  store i64 %101, ptr %103, align 8, !tbaa !11
  br label %.loopexit

104:                                              ; preds = %.preheader, %121
  %indvars.iv66 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next67, %121 ]
  %105 = getelementptr inbounds [25 x i8], ptr %3, i64 0, i64 %indvars.iv66
  %106 = load i8, ptr %105, align 1, !tbaa !5, !range !15, !noundef !16
  %107 = trunc nuw i8 %106 to i1
  br i1 %107, label %108, label %121

108:                                              ; preds = %104
  %109 = trunc nuw nsw i64 %indvars.iv66 to i32
  %110 = call noundef zeroext i1 @_Z3sftii(i32 noundef %.05562, i32 noundef %109)
  br i1 %110, label %111, label %121

111:                                              ; preds = %108
  %112 = call noundef zeroext i1 @_Z7checkerii(i32 noundef %.05562, i32 noundef %109)
  br i1 %112, label %113, label %121

113:                                              ; preds = %111
  %.neg = shl nsw i32 -1, %109
  %114 = add i32 %.neg, %.05562
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [33554442 x i64], ptr @DP, i64 0, i64 %115
  %117 = load i64, ptr %116, align 8, !tbaa !11
  %118 = load i64, ptr %91, align 8, !tbaa !11
  %119 = add nsw i64 %118, %117
  %120 = srem i64 %119, 1000000007
  store i64 %120, ptr %91, align 8, !tbaa !11
  br label %121

121:                                              ; preds = %104, %108, %111, %113
  %indvars.iv.next67 = add nuw nsw i64 %indvars.iv66, 1
  %exitcond69.not = icmp eq i64 %indvars.iv.next67, 25
  br i1 %exitcond69.not, label %.loopexit, label %104, !llvm.loop !17

.loopexit:                                        ; preds = %121, %92, %95, %97
  %122 = sub nsw i32 0, %.05562
  %123 = and i32 %.05562, %122
  %124 = add nsw i32 %123, %.05562
  %125 = xor i32 %124, -1
  %126 = and i32 %.05562, %125
  %127 = sdiv i32 %126, %123
  %128 = ashr i32 %127, 1
  %129 = or i32 %128, %124
  %130 = icmp slt i32 %129, 33554432
  br i1 %130, label %87, label %._crit_edge, !llvm.loop !18

._crit_edge:                                      ; preds = %.loopexit, %80
  %indvars.iv.next71 = add nuw nsw i64 %indvars.iv70, 1
  %exitcond73.not = icmp eq i64 %indvars.iv.next71, 26
  br i1 %exitcond73.not, label %76, label %80, !llvm.loop !19
}

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

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

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

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { "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 = { 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 = { 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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}


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