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

; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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 [1048586 x i64], align 16
@x = external dso_local global [25 x i32], align 16
@used = external dso_local global [25 x i8], align 16
@field = external dso_local global [25 x i8], align 16
@X = external dso_local global [25 x i32], align 16
@remnum = external dso_local global %"class.std::vector", align 8
@remzahyo = external dso_local global %"class.std::vector", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [33 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [90 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@_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 @_Z7checkeriii(i32 noundef, 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: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

; 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 i8, align 1
  %3 = alloca i8, align 1
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %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 1, ptr %2) #7
  store i8 0, ptr %2, align 1, !tbaa !5
  call void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef @used, ptr noundef getelementptr inbounds (i8, ptr @used, i64 25), ptr noundef nonnull align 1 dereferenceable(1) %2)
  call void @llvm.lifetime.end.p0(i64 1, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #7
  store i8 1, ptr %3, align 1, !tbaa !5
  call void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef @field, ptr noundef getelementptr inbounds (i8, ptr @field, i64 25), ptr noundef nonnull align 1 dereferenceable(1) %3)
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %19

19:                                               ; preds = %70, %0
  %20 = load i32, ptr %4, align 4, !tbaa !9
  %21 = icmp slt i32 %20, 5
  br i1 %21, label %23, label %22

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

23:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %24

24:                                               ; preds = %66, %23
  %25 = load i32, ptr %6, align 4, !tbaa !9
  %26 = icmp slt i32 %25, 5
  br i1 %26, label %28, label %27

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

28:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %29 = load i32, ptr %4, align 4, !tbaa !9
  %30 = mul nsw i32 %29, 5
  %31 = load i32, ptr %6, align 4, !tbaa !9
  %32 = add nsw i32 %30, %31
  store i32 %32, ptr %7, align 4, !tbaa !9
  %33 = load i32, ptr %7, align 4, !tbaa !9
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [25 x i32], ptr @x, i64 0, i64 %34
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %35)
  %37 = load i32, ptr %7, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [25 x i32], ptr @x, i64 0, i64 %38
  %40 = load i32, ptr %39, align 4, !tbaa !9
  %41 = add nsw i32 %40, -1
  store i32 %41, ptr %39, align 4, !tbaa !9
  %42 = load i32, ptr %7, align 4, !tbaa !9
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [25 x i32], ptr @x, i64 0, i64 %43
  %45 = load i32, ptr %44, align 4, !tbaa !9
  %46 = icmp eq i32 %45, -1
  br i1 %46, label %47, label %48

47:                                               ; preds = %28
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @remzahyo, ptr noundef nonnull align 4 dereferenceable(4) %7)
  br label %65

48:                                               ; preds = %28
  %49 = load i32, ptr %7, align 4, !tbaa !9
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [25 x i32], ptr @x, i64 0, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !9
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [25 x i8], ptr @used, i64 0, i64 %53
  store i8 1, ptr %54, align 1, !tbaa !5
  %55 = load i32, ptr %7, align 4, !tbaa !9
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [25 x i8], ptr @field, i64 0, i64 %56
  store i8 0, ptr %57, align 1, !tbaa !5
  %58 = load i32, ptr %7, align 4, !tbaa !9
  %59 = load i32, ptr %7, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [25 x i32], ptr @x, i64 0, i64 %60
  %62 = load i32, ptr %61, align 4, !tbaa !9
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [25 x i32], ptr @X, i64 0, i64 %63
  store i32 %58, ptr %64, align 4, !tbaa !9
  br label %65

65:                                               ; preds = %48, %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %66

66:                                               ; preds = %65
  %67 = load i32, ptr %6, align 4, !tbaa !9
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %6, align 4, !tbaa !9
  br label %24, !llvm.loop !11

69:                                               ; preds = %27
  br label %70

70:                                               ; preds = %69
  %71 = load i32, ptr %4, align 4, !tbaa !9
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %4, align 4, !tbaa !9
  br label %19, !llvm.loop !13

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

74:                                               ; preds = %86, %73
  %75 = load i32, ptr %8, align 4, !tbaa !9
  %76 = icmp slt i32 %75, 25
  br i1 %76, label %78, label %77

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

78:                                               ; preds = %74
  %79 = load i32, ptr %8, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [25 x i8], ptr @used, i64 0, i64 %80
  %82 = load i8, ptr %81, align 1, !tbaa !5, !range !14, !noundef !15
  %83 = trunc i8 %82 to i1
  br i1 %83, label %85, label %84

84:                                               ; preds = %78
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @remnum, ptr noundef nonnull align 4 dereferenceable(4) %8)
  br label %85

85:                                               ; preds = %84, %78
  br label %86

86:                                               ; preds = %85
  %87 = load i32, ptr %8, align 4, !tbaa !9
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %8, align 4, !tbaa !9
  br label %74, !llvm.loop !16

89:                                               ; preds = %77
  %90 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @remnum) #7
  %91 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @remzahyo) #7
  %92 = icmp eq i64 %90, %91
  br i1 %92, label %93, label %94

93:                                               ; preds = %89
  br label %96

94:                                               ; preds = %89
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.3, i32 noundef 98, ptr noundef @__PRETTY_FUNCTION__.main) #8
  unreachable

95:                                               ; No predecessors!
  br label %96

96:                                               ; preds = %95, %93
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %97 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @remnum) #7
  %98 = trunc i64 %97 to i32
  store i32 %98, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !9
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef @DP, ptr noundef getelementptr inbounds (i64, ptr @DP, i64 1048586), ptr noundef nonnull align 4 dereferenceable(4) %10)
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  store i64 1, ptr @DP, align 16, !tbaa !17
  %99 = load i32, ptr @X, align 16, !tbaa !9
  %100 = call noundef zeroext i1 @_Z7checkeriii(i32 noundef 0, i32 noundef %99, i32 noundef 0)
  br i1 %100, label %104, label %101

101:                                              ; preds = %96
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 0)
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %102, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %5, align 4
  br label %196

104:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 1, ptr %11, align 4, !tbaa !9
  br label %105

105:                                              ; preds = %184, %104
  %106 = load i32, ptr %11, align 4, !tbaa !9
  %107 = load i32, ptr %9, align 4, !tbaa !9
  %108 = icmp sle i32 %106, %107
  br i1 %108, label %110, label %109

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

110:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %111 = load i32, ptr %11, align 4, !tbaa !9
  %112 = shl i32 1, %111
  %113 = sub nsw i32 %112, 1
  store i32 %113, ptr %12, align 4, !tbaa !9
  br label %114

114:                                              ; preds = %165, %110
  %115 = load i32, ptr %12, align 4, !tbaa !9
  %116 = load i32, ptr %9, align 4, !tbaa !9
  %117 = shl i32 1, %116
  %118 = icmp slt i32 %115, %117
  br i1 %118, label %119, label %183

119:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %120 = load i32, ptr %11, align 4, !tbaa !9
  %121 = sub nsw i32 %120, 1
  %122 = sext i32 %121 to i64
  %123 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @remnum, i64 noundef %122) #7
  %124 = load i32, ptr %123, align 4, !tbaa !9
  store i32 %124, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %125

125:                                              ; preds = %162, %119
  %126 = load i32, ptr %14, align 4, !tbaa !9
  %127 = load i32, ptr %9, align 4, !tbaa !9
  %128 = icmp slt i32 %126, %127
  br i1 %128, label %130, label %129

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

130:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %131 = load i32, ptr %14, align 4, !tbaa !9
  %132 = sext i32 %131 to i64
  %133 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @remzahyo, i64 noundef %132) #7
  %134 = load i32, ptr %133, align 4, !tbaa !9
  store i32 %134, ptr %15, align 4, !tbaa !9
  %135 = load i32, ptr %12, align 4, !tbaa !9
  %136 = load i32, ptr %14, align 4, !tbaa !9
  %137 = call noundef zeroext i1 @_Z3sftii(i32 noundef %135, i32 noundef %136)
  br i1 %137, label %138, label %161

138:                                              ; preds = %130
  %139 = load i32, ptr %12, align 4, !tbaa !9
  %140 = load i32, ptr %15, align 4, !tbaa !9
  %141 = load i32, ptr %13, align 4, !tbaa !9
  %142 = call noundef zeroext i1 @_Z7checkeriii(i32 noundef %139, i32 noundef %140, i32 noundef %141)
  br i1 %142, label %143, label %161

143:                                              ; preds = %138
  %144 = load i32, ptr %12, align 4, !tbaa !9
  %145 = load i32, ptr %14, align 4, !tbaa !9
  %146 = shl i32 1, %145
  %147 = sub nsw i32 %144, %146
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [1048586 x i64], ptr @DP, i64 0, i64 %148
  %150 = load i64, ptr %149, align 8, !tbaa !17
  %151 = load i32, ptr %12, align 4, !tbaa !9
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [1048586 x i64], ptr @DP, i64 0, i64 %152
  %154 = load i64, ptr %153, align 8, !tbaa !17
  %155 = add nsw i64 %154, %150
  store i64 %155, ptr %153, align 8, !tbaa !17
  %156 = load i32, ptr %12, align 4, !tbaa !9
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [1048586 x i64], ptr @DP, i64 0, i64 %157
  %159 = load i64, ptr %158, align 8, !tbaa !17
  %160 = srem i64 %159, 1000000007
  store i64 %160, ptr %158, align 8, !tbaa !17
  br label %161

161:                                              ; preds = %143, %138, %130
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %162

162:                                              ; preds = %161
  %163 = load i32, ptr %14, align 4, !tbaa !9
  %164 = add nsw i32 %163, 1
  store i32 %164, ptr %14, align 4, !tbaa !9
  br label %125, !llvm.loop !19

165:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %166 = load i32, ptr %12, align 4, !tbaa !9
  %167 = load i32, ptr %12, align 4, !tbaa !9
  %168 = sub nsw i32 0, %167
  %169 = and i32 %166, %168
  store i32 %169, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %170 = load i32, ptr %12, align 4, !tbaa !9
  %171 = load i32, ptr %16, align 4, !tbaa !9
  %172 = add nsw i32 %170, %171
  store i32 %172, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %173 = load i32, ptr %12, align 4, !tbaa !9
  %174 = load i32, ptr %17, align 4, !tbaa !9
  %175 = xor i32 %174, -1
  %176 = and i32 %173, %175
  store i32 %176, ptr %18, align 4, !tbaa !9
  %177 = load i32, ptr %18, align 4, !tbaa !9
  %178 = load i32, ptr %16, align 4, !tbaa !9
  %179 = sdiv i32 %177, %178
  %180 = ashr i32 %179, 1
  %181 = load i32, ptr %17, align 4, !tbaa !9
  %182 = or i32 %180, %181
  store i32 %182, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %114, !llvm.loop !20

183:                                              ; preds = %114
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %184

184:                                              ; preds = %183
  %185 = load i32, ptr %11, align 4, !tbaa !9
  %186 = add nsw i32 %185, 1
  store i32 %186, ptr %11, align 4, !tbaa !9
  br label %105, !llvm.loop !21

187:                                              ; preds = %109
  %188 = load i32, ptr %9, align 4, !tbaa !9
  %189 = shl i32 1, %188
  %190 = sub nsw i32 %189, 1
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds [1048586 x i64], ptr @DP, i64 0, i64 %191
  %193 = load i64, ptr %192, align 8, !tbaa !17
  %194 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %193)
  %195 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %194, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %5, align 4
  br label %196

196:                                              ; preds = %187, %101
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  %197 = load i32, ptr %5, align 4
  switch i32 %197, label %200 [
    i32 0, label %198
    i32 1, label %198
  ]

198:                                              ; preds = %196, %196
  %199 = load i32, ptr %1, align 4
  ret i32 %199

200:                                              ; preds = %196
  unreachable
}

; 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: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #6

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #4

; 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

; 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

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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { noreturn 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 = !{i8 0, i8 2}
!15 = !{}
!16 = distinct !{!16, !12}
!17 = !{!18, !18, i64 0}
!18 = !{!"long long", !7, i64 0}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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 [1048586 x i64], align 16
@x = external dso_local global [25 x i32], align 16
@used = external dso_local global [25 x i8], align 16
@field = external dso_local global [25 x i8], align 16
@X = external dso_local local_unnamed_addr global [25 x i32], align 16
@remnum = external dso_local global %"class.std::vector", align 8
@remzahyo = external dso_local global %"class.std::vector", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [33 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [90 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@_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 @_Z7checkeriii(i32 noundef, 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 nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

; 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 i8, align 1
  %2 = alloca i8, align 1
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %1) #7
  store i8 0, ptr %1, align 1, !tbaa !5
  call void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef nonnull @used, ptr noundef nonnull getelementptr inbounds (i8, ptr @used, i64 25), ptr noundef nonnull align 1 dereferenceable(1) %1)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #7
  store i8 1, ptr %2, align 1, !tbaa !5
  call void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef nonnull @field, ptr noundef nonnull getelementptr inbounds (i8, ptr @field, i64 25), ptr noundef nonnull align 1 dereferenceable(1) %2)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #7
  br label %.preheader45

.preheader45:                                     ; preds = %0, %91
  %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %91 ]
  %6 = mul nuw nsw i64 %indvars.iv, 5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %7 = trunc nuw nsw i64 %6 to i32
  store i32 %7, ptr %3, align 4, !tbaa !9
  %8 = getelementptr inbounds [25 x i32], ptr @x, i64 0, i64 %6
  %9 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %10 = load i32, ptr %3, align 4, !tbaa !9
  %11 = sext i32 %10 to i64
  %12 = getelementptr inbounds [25 x i32], ptr @x, i64 0, i64 %11
  %13 = load i32, ptr %12, align 4, !tbaa !9
  %14 = add nsw i32 %13, -1
  store i32 %14, ptr %12, align 4, !tbaa !9
  %15 = icmp eq i32 %13, 0
  br i1 %15, label %17, label %18

16:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %96

17:                                               ; preds = %.preheader45
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @remzahyo, ptr noundef nonnull align 4 dereferenceable(4) %3)
  br label %23

18:                                               ; preds = %.preheader45
  %19 = sext i32 %14 to i64
  %20 = getelementptr inbounds [25 x i8], ptr @used, i64 0, i64 %19
  store i8 1, ptr %20, align 1, !tbaa !5
  %21 = getelementptr inbounds [25 x i8], ptr @field, i64 0, i64 %11
  store i8 0, ptr %21, align 1, !tbaa !5
  %22 = getelementptr inbounds [25 x i32], ptr @X, i64 0, i64 %19
  store i32 %10, ptr %22, align 4, !tbaa !9
  br label %23

23:                                               ; preds = %18, %17
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %24 = add nuw nsw i64 %6, 1
  %25 = trunc nuw nsw i64 %24 to i32
  store i32 %25, ptr %3, align 4, !tbaa !9
  %26 = getelementptr inbounds [25 x i32], ptr @x, i64 0, i64 %24
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %26)
  %28 = load i32, ptr %3, align 4, !tbaa !9
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [25 x i32], ptr @x, i64 0, i64 %29
  %31 = load i32, ptr %30, align 4, !tbaa !9
  %32 = add nsw i32 %31, -1
  store i32 %32, ptr %30, align 4, !tbaa !9
  %33 = icmp eq i32 %31, 0
  br i1 %33, label %39, label %34

34:                                               ; preds = %23
  %35 = sext i32 %32 to i64
  %36 = getelementptr inbounds [25 x i8], ptr @used, i64 0, i64 %35
  store i8 1, ptr %36, align 1, !tbaa !5
  %37 = getelementptr inbounds [25 x i8], ptr @field, i64 0, i64 %29
  store i8 0, ptr %37, align 1, !tbaa !5
  %38 = getelementptr inbounds [25 x i32], ptr @X, i64 0, i64 %35
  store i32 %28, ptr %38, align 4, !tbaa !9
  br label %40

39:                                               ; preds = %23
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @remzahyo, ptr noundef nonnull align 4 dereferenceable(4) %3)
  br label %40

40:                                               ; preds = %39, %34
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %41 = add nuw nsw i64 %6, 2
  %42 = trunc nuw nsw i64 %41 to i32
  store i32 %42, ptr %3, align 4, !tbaa !9
  %43 = getelementptr inbounds [25 x i32], ptr @x, i64 0, i64 %41
  %44 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %43)
  %45 = load i32, ptr %3, align 4, !tbaa !9
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [25 x i32], ptr @x, 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 = icmp eq i32 %48, 0
  br i1 %50, label %56, label %51

51:                                               ; preds = %40
  %52 = sext i32 %49 to i64
  %53 = getelementptr inbounds [25 x i8], ptr @used, i64 0, i64 %52
  store i8 1, ptr %53, align 1, !tbaa !5
  %54 = getelementptr inbounds [25 x i8], ptr @field, i64 0, i64 %46
  store i8 0, ptr %54, align 1, !tbaa !5
  %55 = getelementptr inbounds [25 x i32], ptr @X, i64 0, i64 %52
  store i32 %45, ptr %55, align 4, !tbaa !9
  br label %57

56:                                               ; preds = %40
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @remzahyo, ptr noundef nonnull align 4 dereferenceable(4) %3)
  br label %57

57:                                               ; preds = %56, %51
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %58 = add nuw nsw i64 %6, 3
  %59 = trunc nuw nsw i64 %58 to i32
  store i32 %59, ptr %3, align 4, !tbaa !9
  %60 = getelementptr inbounds [25 x i32], ptr @x, i64 0, i64 %58
  %61 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %60)
  %62 = load i32, ptr %3, align 4, !tbaa !9
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [25 x i32], ptr @x, i64 0, i64 %63
  %65 = load i32, ptr %64, align 4, !tbaa !9
  %66 = add nsw i32 %65, -1
  store i32 %66, ptr %64, align 4, !tbaa !9
  %67 = icmp eq i32 %65, 0
  br i1 %67, label %73, label %68

68:                                               ; preds = %57
  %69 = sext i32 %66 to i64
  %70 = getelementptr inbounds [25 x i8], ptr @used, i64 0, i64 %69
  store i8 1, ptr %70, align 1, !tbaa !5
  %71 = getelementptr inbounds [25 x i8], ptr @field, i64 0, i64 %63
  store i8 0, ptr %71, align 1, !tbaa !5
  %72 = getelementptr inbounds [25 x i32], ptr @X, i64 0, i64 %69
  store i32 %62, ptr %72, align 4, !tbaa !9
  br label %74

73:                                               ; preds = %57
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @remzahyo, ptr noundef nonnull align 4 dereferenceable(4) %3)
  br label %74

74:                                               ; preds = %73, %68
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %75 = add nuw nsw i64 %6, 4
  %76 = trunc nuw nsw i64 %75 to i32
  store i32 %76, ptr %3, align 4, !tbaa !9
  %77 = getelementptr inbounds [25 x i32], ptr @x, i64 0, i64 %75
  %78 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %77)
  %79 = load i32, ptr %3, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [25 x i32], ptr @x, i64 0, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !9
  %83 = add nsw i32 %82, -1
  store i32 %83, ptr %81, align 4, !tbaa !9
  %84 = icmp eq i32 %82, 0
  br i1 %84, label %90, label %85

85:                                               ; preds = %74
  %86 = sext i32 %83 to i64
  %87 = getelementptr inbounds [25 x i8], ptr @used, i64 0, i64 %86
  store i8 1, ptr %87, align 1, !tbaa !5
  %88 = getelementptr inbounds [25 x i8], ptr @field, i64 0, i64 %80
  store i8 0, ptr %88, align 1, !tbaa !5
  %89 = getelementptr inbounds [25 x i32], ptr @X, i64 0, i64 %86
  store i32 %79, ptr %89, align 4, !tbaa !9
  br label %91

90:                                               ; preds = %74
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @remzahyo, ptr noundef nonnull align 4 dereferenceable(4) %3)
  br label %91

91:                                               ; preds = %90, %85
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  %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 %.preheader45, !llvm.loop !11

92:                                               ; preds = %102
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  %93 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @remnum) #7
  %94 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @remzahyo) #7
  %95 = icmp eq i64 %93, %94
  br i1 %95, label %107, label %106

96:                                               ; preds = %16, %102
  %storemerge48 = phi i32 [ 0, %16 ], [ %104, %102 ]
  %97 = sext i32 %storemerge48 to i64
  %98 = getelementptr inbounds [25 x i8], ptr @used, i64 0, i64 %97
  %99 = load i8, ptr %98, align 1, !tbaa !5, !range !13, !noundef !14
  %100 = trunc nuw i8 %99 to i1
  br i1 %100, label %102, label %101

101:                                              ; preds = %96
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @remnum, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %.pre = load i32, ptr %4, align 4, !tbaa !9
  br label %102

102:                                              ; preds = %96, %101
  %103 = phi i32 [ %storemerge48, %96 ], [ %.pre, %101 ]
  %104 = add nsw i32 %103, 1
  store i32 %104, ptr %4, align 4, !tbaa !9
  %105 = icmp slt i32 %103, 24
  br i1 %105, label %96, label %92, !llvm.loop !15

106:                                              ; preds = %92
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.3, i32 noundef 98, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #8
  unreachable

107:                                              ; preds = %92
  %108 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @remnum) #7
  %109 = trunc i64 %108 to i32
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  store i32 0, ptr %5, align 4, !tbaa !9
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull @DP, ptr noundef nonnull getelementptr inbounds (i8, ptr @DP, i64 8388688), ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  store i64 1, ptr @DP, align 16, !tbaa !16
  %110 = load i32, ptr @X, align 16, !tbaa !9
  %111 = call noundef zeroext i1 @_Z7checkeriii(i32 noundef 0, i32 noundef %110, i32 noundef 0)
  br i1 %111, label %.preheader, label %148

.preheader:                                       ; preds = %107
  %.not54 = icmp slt i32 %109, 1
  br i1 %.not54, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %112 = shl nuw i32 1, %109
  %113 = add nuw nsw i64 %108, 1
  %wide.trip.count65 = and i64 %113, 4294967295
  %wide.trip.count = and i64 %108, 2147483647
  br label %114

114:                                              ; preds = %._crit_edge53.split.us.us, %.lr.ph
  %indvars.iv62 = phi i64 [ %indvars.iv.next63, %._crit_edge53.split.us.us ], [ 1, %.lr.ph ]
  %115 = trunc nuw nsw i64 %indvars.iv62 to i32
  %notmask44.us = shl nsw i32 -1, %115
  %116 = xor i32 %notmask44.us, -1
  %117 = icmp sgt i32 %112, %116
  br i1 %117, label %.lr.ph52.us, label %._crit_edge53.split.us.us

._crit_edge53.split.us.us:                        ; preds = %._crit_edge.us.us, %114
  %indvars.iv.next63 = add nuw nsw i64 %indvars.iv62, 1
  %exitcond66.not = icmp eq i64 %indvars.iv.next63, %wide.trip.count65
  br i1 %exitcond66.not, label %._crit_edge, label %114, !llvm.loop !18

.lr.ph52.us:                                      ; preds = %114
  %118 = add nsw i64 %indvars.iv62, -1
  br label %.lr.ph.us.us

.lr.ph.us.us:                                     ; preds = %._crit_edge.us.us, %.lr.ph52.us
  %.04150.us.us = phi i32 [ %116, %.lr.ph52.us ], [ %146, %._crit_edge.us.us ]
  %119 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @remnum, i64 noundef %118) #7
  %120 = load i32, ptr %119, align 4, !tbaa !9
  %121 = sext i32 %.04150.us.us to i64
  %122 = getelementptr inbounds [1048586 x i64], ptr @DP, i64 0, i64 %121
  br label %123

123:                                              ; preds = %138, %.lr.ph.us.us
  %indvars.iv58 = phi i64 [ %indvars.iv.next59, %138 ], [ 0, %.lr.ph.us.us ]
  %124 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @remzahyo, i64 noundef %indvars.iv58) #7
  %125 = load i32, ptr %124, align 4, !tbaa !9
  %126 = trunc nuw nsw i64 %indvars.iv58 to i32
  %127 = call noundef zeroext i1 @_Z3sftii(i32 noundef %.04150.us.us, i32 noundef %126)
  br i1 %127, label %128, label %138

128:                                              ; preds = %123
  %129 = call noundef zeroext i1 @_Z7checkeriii(i32 noundef %.04150.us.us, i32 noundef %125, i32 noundef %120)
  br i1 %129, label %130, label %138

130:                                              ; preds = %128
  %.neg.us.us = shl nsw i32 -1, %126
  %131 = add i32 %.neg.us.us, %.04150.us.us
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [1048586 x i64], ptr @DP, i64 0, i64 %132
  %134 = load i64, ptr %133, align 8, !tbaa !16
  %135 = load i64, ptr %122, align 8, !tbaa !16
  %136 = add nsw i64 %135, %134
  %137 = srem i64 %136, 1000000007
  store i64 %137, ptr %122, align 8, !tbaa !16
  br label %138

138:                                              ; preds = %130, %128, %123
  %indvars.iv.next59 = add nuw nsw i64 %indvars.iv58, 1
  %exitcond61.not = icmp eq i64 %indvars.iv.next59, %wide.trip.count
  br i1 %exitcond61.not, label %._crit_edge.us.us, label %123, !llvm.loop !19

._crit_edge.us.us:                                ; preds = %138
  %139 = sub nsw i32 0, %.04150.us.us
  %140 = and i32 %.04150.us.us, %139
  %141 = add nsw i32 %140, %.04150.us.us
  %142 = xor i32 %141, -1
  %143 = and i32 %.04150.us.us, %142
  %144 = sdiv i32 %143, %140
  %145 = ashr i32 %144, 1
  %146 = or i32 %145, %141
  %147 = icmp slt i32 %146, %112
  br i1 %147, label %.lr.ph.us.us, label %._crit_edge53.split.us.us, !llvm.loop !20

148:                                              ; preds = %107
  %149 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 0)
  br label %155

._crit_edge:                                      ; preds = %._crit_edge53.split.us.us, %.preheader
  %notmask = shl nsw i32 -1, %109
  %150 = xor i32 %notmask, -1
  %151 = zext nneg i32 %150 to i64
  %152 = getelementptr inbounds [1048586 x i64], ptr @DP, i64 0, i64 %151
  %153 = load i64, ptr %152, align 8, !tbaa !16
  %154 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %153)
  br label %155

155:                                              ; preds = %._crit_edge, %148
  %.sink = phi ptr [ %154, %._crit_edge ], [ %149, %148 ]
  %156 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %.sink, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0
}

; 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: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #6

; 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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #4

; 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

; 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

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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { noreturn 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 = !{i8 0, i8 2}
!14 = !{}
!15 = distinct !{!15, !12}
!16 = !{!17, !17, i64 0}
!17 = !{!"long long", !7, i64 0}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}


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