; LLVM IR from kazunetakahashi/atcoder :: 201510_201609/1005_ABC027 (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" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@X = external dso_local global [1010 x [2020 x i32]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZL5infty = external hidden constant i32, align 4
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i8, align 1
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 32, ptr %2) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  %11 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %12 unwind label %16

12:                                               ; preds = %0
  %13 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  %14 = icmp ugt i64 %13, 1000
  br i1 %14, label %15, label %20

15:                                               ; preds = %12
  store i32 0, ptr %1, align 4
  store i32 1, ptr %5, align 4
  br label %231

16:                                               ; preds = %228, %222, %20, %0
  %17 = landingpad { ptr, i32 }
          cleanup
  %18 = extractvalue { ptr, i32 } %17, 0
  store ptr %18, ptr %3, align 8
  %19 = extractvalue { ptr, i32 } %17, 1
  store i32 %19, ptr %4, align 4
  br label %235

20:                                               ; preds = %12
  invoke void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef @X, ptr noundef getelementptr inbounds (i32, ptr @X, i64 2040200), ptr noundef nonnull align 4 dereferenceable(4) @_ZL5infty)
          to label %21 unwind label %16

21:                                               ; preds = %20
  store i32 0, ptr getelementptr inbounds ([2020 x i32], ptr @X, i64 0, i64 1010), align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %218, %21
  %23 = load i32, ptr %6, align 4, !tbaa !5
  %24 = zext i32 %23 to i64
  %25 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  %26 = icmp ult i64 %24, %25
  br i1 %26, label %28, label %27

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

28:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #7
  %29 = load i32, ptr %6, align 4, !tbaa !5
  %30 = zext i32 %29 to i64
  %31 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %30)
          to label %32 unwind label %42

32:                                               ; preds = %28
  %33 = load i8, ptr %31, align 1, !tbaa !9
  store i8 %33, ptr %7, align 1, !tbaa !9
  %34 = load i8, ptr %7, align 1, !tbaa !9
  %35 = sext i8 %34 to i32
  %36 = icmp eq i32 %35, 77
  br i1 %36, label %37, label %138

37:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %134, %37
  %39 = load i32, ptr %8, align 4, !tbaa !5
  %40 = icmp slt i32 %39, 2019
  br i1 %40, label %46, label %41

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

42:                                               ; preds = %28
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %3, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %4, align 4
  br label %221

46:                                               ; preds = %38
  %47 = load i32, ptr %6, align 4, !tbaa !5
  %48 = zext i32 %47 to i64
  %49 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %48
  %50 = load i32, ptr %8, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [2020 x i32], ptr %49, i64 0, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = icmp ne i32 %53, -1073741824
  br i1 %54, label %55, label %133

55:                                               ; preds = %46
  %56 = load i32, ptr %6, align 4, !tbaa !5
  %57 = add i32 %56, 1
  %58 = zext i32 %57 to i64
  %59 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %58
  %60 = load i32, ptr %8, align 4, !tbaa !5
  %61 = add nsw i32 %60, 1
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [2020 x i32], ptr %59, i64 0, i64 %62
  %64 = load i32, ptr %6, align 4, !tbaa !5
  %65 = zext i32 %64 to i64
  %66 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %65
  %67 = load i32, ptr %8, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [2020 x i32], ptr %66, i64 0, i64 %68
  %70 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %63, ptr noundef nonnull align 4 dereferenceable(4) %69)
          to label %71 unwind label %129

71:                                               ; preds = %55
  %72 = load i32, ptr %70, align 4, !tbaa !5
  %73 = load i32, ptr %6, align 4, !tbaa !5
  %74 = add i32 %73, 1
  %75 = zext i32 %74 to i64
  %76 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %75
  %77 = load i32, ptr %8, align 4, !tbaa !5
  %78 = add nsw i32 %77, 1
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [2020 x i32], ptr %76, i64 0, i64 %79
  store i32 %72, ptr %80, align 4, !tbaa !5
  %81 = load i32, ptr %6, align 4, !tbaa !5
  %82 = add i32 %81, 1
  %83 = zext i32 %82 to i64
  %84 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %83
  %85 = load i32, ptr %8, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [2020 x i32], ptr %84, i64 0, i64 %86
  %88 = load i32, ptr %6, align 4, !tbaa !5
  %89 = zext i32 %88 to i64
  %90 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %89
  %91 = load i32, ptr %8, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [2020 x i32], ptr %90, i64 0, i64 %92
  %94 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %87, ptr noundef nonnull align 4 dereferenceable(4) %93)
          to label %95 unwind label %129

95:                                               ; preds = %71
  %96 = load i32, ptr %94, align 4, !tbaa !5
  %97 = load i32, ptr %6, align 4, !tbaa !5
  %98 = add i32 %97, 1
  %99 = zext i32 %98 to i64
  %100 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %99
  %101 = load i32, ptr %8, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [2020 x i32], ptr %100, i64 0, i64 %102
  store i32 %96, ptr %103, align 4, !tbaa !5
  %104 = load i32, ptr %6, align 4, !tbaa !5
  %105 = add i32 %104, 1
  %106 = zext i32 %105 to i64
  %107 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %106
  %108 = load i32, ptr %8, align 4, !tbaa !5
  %109 = sub nsw i32 %108, 1
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [2020 x i32], ptr %107, i64 0, i64 %110
  %112 = load i32, ptr %6, align 4, !tbaa !5
  %113 = zext i32 %112 to i64
  %114 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %113
  %115 = load i32, ptr %8, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [2020 x i32], ptr %114, i64 0, i64 %116
  %118 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %111, ptr noundef nonnull align 4 dereferenceable(4) %117)
          to label %119 unwind label %129

119:                                              ; preds = %95
  %120 = load i32, ptr %118, align 4, !tbaa !5
  %121 = load i32, ptr %6, align 4, !tbaa !5
  %122 = add i32 %121, 1
  %123 = zext i32 %122 to i64
  %124 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %123
  %125 = load i32, ptr %8, align 4, !tbaa !5
  %126 = sub nsw i32 %125, 1
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [2020 x i32], ptr %124, i64 0, i64 %127
  store i32 %120, ptr %128, align 4, !tbaa !5
  br label %133

129:                                              ; preds = %95, %71, %55
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %3, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %221

133:                                              ; preds = %119, %46
  br label %134

134:                                              ; preds = %133
  %135 = load i32, ptr %8, align 4, !tbaa !5
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %8, align 4, !tbaa !5
  br label %38, !llvm.loop !10

137:                                              ; preds = %41
  br label %217

138:                                              ; preds = %32
  %139 = load i8, ptr %7, align 1, !tbaa !9
  %140 = sext i8 %139 to i32
  %141 = icmp eq i32 %140, 43
  br i1 %141, label %142, label %179

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

143:                                              ; preds = %175, %142
  %144 = load i32, ptr %9, align 4, !tbaa !5
  %145 = icmp slt i32 %144, 2020
  br i1 %145, label %147, label %146

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

147:                                              ; preds = %143
  %148 = load i32, ptr %6, align 4, !tbaa !5
  %149 = zext i32 %148 to i64
  %150 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %149
  %151 = load i32, ptr %9, align 4, !tbaa !5
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [2020 x i32], ptr %150, i64 0, i64 %152
  %154 = load i32, ptr %153, align 4, !tbaa !5
  %155 = icmp ne i32 %154, -1073741824
  br i1 %155, label %156, label %174

156:                                              ; preds = %147
  %157 = load i32, ptr %6, align 4, !tbaa !5
  %158 = zext i32 %157 to i64
  %159 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %158
  %160 = load i32, ptr %9, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [2020 x i32], ptr %159, i64 0, i64 %161
  %163 = load i32, ptr %162, align 4, !tbaa !5
  %164 = load i32, ptr %9, align 4, !tbaa !5
  %165 = sub nsw i32 %164, 1010
  %166 = add nsw i32 %163, %165
  %167 = load i32, ptr %6, align 4, !tbaa !5
  %168 = add i32 %167, 1
  %169 = zext i32 %168 to i64
  %170 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %169
  %171 = load i32, ptr %9, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [2020 x i32], ptr %170, i64 0, i64 %172
  store i32 %166, ptr %173, align 4, !tbaa !5
  br label %174

174:                                              ; preds = %156, %147
  br label %175

175:                                              ; preds = %174
  %176 = load i32, ptr %9, align 4, !tbaa !5
  %177 = add nsw i32 %176, 1
  store i32 %177, ptr %9, align 4, !tbaa !5
  br label %143, !llvm.loop !12

178:                                              ; preds = %146
  br label %216

179:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %180

180:                                              ; preds = %212, %179
  %181 = load i32, ptr %10, align 4, !tbaa !5
  %182 = icmp slt i32 %181, 2020
  br i1 %182, label %184, label %183

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

184:                                              ; preds = %180
  %185 = load i32, ptr %6, align 4, !tbaa !5
  %186 = zext i32 %185 to i64
  %187 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %186
  %188 = load i32, ptr %10, align 4, !tbaa !5
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds [2020 x i32], ptr %187, i64 0, i64 %189
  %191 = load i32, ptr %190, align 4, !tbaa !5
  %192 = icmp ne i32 %191, -1073741824
  br i1 %192, label %193, label %211

193:                                              ; preds = %184
  %194 = load i32, ptr %6, align 4, !tbaa !5
  %195 = zext i32 %194 to i64
  %196 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %195
  %197 = load i32, ptr %10, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds [2020 x i32], ptr %196, i64 0, i64 %198
  %200 = load i32, ptr %199, align 4, !tbaa !5
  %201 = load i32, ptr %10, align 4, !tbaa !5
  %202 = sub nsw i32 %201, 1010
  %203 = sub nsw i32 %200, %202
  %204 = load i32, ptr %6, align 4, !tbaa !5
  %205 = add i32 %204, 1
  %206 = zext i32 %205 to i64
  %207 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %206
  %208 = load i32, ptr %10, align 4, !tbaa !5
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds [2020 x i32], ptr %207, i64 0, i64 %209
  store i32 %203, ptr %210, align 4, !tbaa !5
  br label %211

211:                                              ; preds = %193, %184
  br label %212

212:                                              ; preds = %211
  %213 = load i32, ptr %10, align 4, !tbaa !5
  %214 = add nsw i32 %213, 1
  store i32 %214, ptr %10, align 4, !tbaa !5
  br label %180, !llvm.loop !13

215:                                              ; preds = %183
  br label %216

216:                                              ; preds = %215, %178
  br label %217

217:                                              ; preds = %216, %137
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #7
  br label %218

218:                                              ; preds = %217
  %219 = load i32, ptr %6, align 4, !tbaa !5
  %220 = add i32 %219, 1
  store i32 %220, ptr %6, align 4, !tbaa !5
  br label %22, !llvm.loop !14

221:                                              ; preds = %129, %42
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %235

222:                                              ; preds = %27
  %223 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  %224 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %223
  %225 = getelementptr inbounds [2020 x i32], ptr %224, i64 0, i64 1010
  %226 = load i32, ptr %225, align 8, !tbaa !5
  %227 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %226)
          to label %228 unwind label %16

228:                                              ; preds = %222
  %229 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %227, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %230 unwind label %16

230:                                              ; preds = %228
  store i32 0, ptr %5, align 4
  br label %231

231:                                              ; preds = %230, %15
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #7
  %232 = load i32, ptr %5, align 4
  switch i32 %232, label %241 [
    i32 0, label %233
    i32 1, label %233
  ]

233:                                              ; preds = %231, %231
  %234 = load i32, ptr %1, align 4
  ret i32 %234

235:                                              ; preds = %221, %16
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #7
  br label %236

236:                                              ; preds = %235
  %237 = load ptr, ptr %3, align 8
  %238 = load i32, ptr %4, align 4
  %239 = insertvalue { ptr, i32 } poison, ptr %237, 0
  %240 = insertvalue { ptr, i32 } %239, i32 %238, 1
  resume { ptr, i32 } %240

241:                                              ; preds = %231
  unreachable
}

; 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 void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #6 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: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

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

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

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


; 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" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@X = external dso_local global [1010 x [2020 x i32]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZL5infty = external hidden constant i32, align 4
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::__cxx11::basic_string", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  %2 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %3 unwind label %6

3:                                                ; preds = %0
  %4 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  %5 = icmp ugt i64 %4, 1000
  br i1 %5, label %185, label %8

6:                                                ; preds = %183, %._crit_edge, %8, %0
  %7 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #7
  resume { ptr, i32 } %7

8:                                                ; preds = %3
  invoke void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull @X, ptr noundef nonnull getelementptr inbounds (i8, ptr @X, i64 8160800), ptr noundef nonnull align 4 dereferenceable(4) @_ZL5infty)
          to label %9 unwind label %6

9:                                                ; preds = %8
  store i32 0, ptr getelementptr inbounds (i8, ptr @X, i64 4040), align 8, !tbaa !5
  %10 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  %.not65 = icmp eq i64 %10, 0
  br i1 %.not65, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.loopexit, %9
  %11 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  %12 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %11, i64 1010
  %13 = load i32, ptr %12, align 8, !tbaa !5
  %14 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %13)
          to label %183 unwind label %6

.lr.ph:                                           ; preds = %9, %.loopexit
  %15 = phi i64 [ %19, %.loopexit ], [ 0, %9 ]
  %.05064 = phi i32 [ %18, %.loopexit ], [ 0, %9 ]
  %16 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %15)
  %17 = load i8, ptr %16, align 1, !tbaa !9
  %18 = add i32 %.05064, 1
  %19 = zext i32 %18 to i64
  switch i8 %17, label %vector.memcheck [
    i8 77, label %.preheader57
    i8 43, label %vector.memcheck98
  ]

vector.memcheck98:                                ; preds = %.lr.ph
  %.neg = mul nsw i64 %15, -8080
  %20 = add i32 %.05064, 1
  %21 = zext i32 %20 to i64
  %22 = mul nuw nsw i64 %21, 8080
  %23 = add nsw i64 %.neg, %22
  %diff.check99 = icmp ult i64 %23, 32
  br i1 %diff.check99, label %.preheader59.preheader, label %vector.body104

.preheader59.preheader:                           ; preds = %pred.store.continue123, %vector.memcheck98
  %indvars.iv.ph = phi i64 [ 0, %vector.memcheck98 ], [ 2016, %pred.store.continue123 ]
  br label %.preheader59

vector.body104:                                   ; preds = %vector.memcheck98, %pred.store.continue123
  %index105 = phi i64 [ %index.next124, %pred.store.continue123 ], [ 0, %vector.memcheck98 ]
  %24 = or disjoint i64 %index105, 4
  %25 = trunc i64 %index105 to i32
  %26 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %15, i64 %index105
  %27 = getelementptr inbounds i8, ptr %26, i64 16
  %wide.load106 = load <4 x i32>, ptr %26, align 16, !tbaa !5
  %wide.load107 = load <4 x i32>, ptr %27, align 16, !tbaa !5
  %28 = icmp ne <4 x i32> %wide.load106, <i32 -1073741824, i32 -1073741824, i32 -1073741824, i32 -1073741824>
  %29 = icmp ne <4 x i32> %wide.load107, <i32 -1073741824, i32 -1073741824, i32 -1073741824, i32 -1073741824>
  %30 = extractelement <4 x i1> %28, i64 0
  br i1 %30, label %pred.store.if108, label %pred.store.continue109

pred.store.if108:                                 ; preds = %vector.body104
  %31 = add i32 %25, -1010
  %32 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %19, i64 %index105
  %33 = extractelement <4 x i32> %wide.load106, i64 0
  %34 = add nsw i32 %31, %33
  store i32 %34, ptr %32, align 16, !tbaa !5
  br label %pred.store.continue109

pred.store.continue109:                           ; preds = %pred.store.if108, %vector.body104
  %35 = extractelement <4 x i1> %28, i64 1
  br i1 %35, label %pred.store.if110, label %pred.store.continue111

pred.store.if110:                                 ; preds = %pred.store.continue109
  %36 = or disjoint i64 %index105, 1
  %37 = add i32 %25, -1009
  %38 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %19, i64 %36
  %39 = extractelement <4 x i32> %wide.load106, i64 1
  %40 = add nsw i32 %37, %39
  store i32 %40, ptr %38, align 4, !tbaa !5
  br label %pred.store.continue111

pred.store.continue111:                           ; preds = %pred.store.if110, %pred.store.continue109
  %41 = extractelement <4 x i1> %28, i64 2
  br i1 %41, label %pred.store.if112, label %pred.store.continue113

pred.store.if112:                                 ; preds = %pred.store.continue111
  %42 = or disjoint i64 %index105, 2
  %43 = add i32 %25, -1008
  %44 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %19, i64 %42
  %45 = extractelement <4 x i32> %wide.load106, i64 2
  %46 = add nsw i32 %43, %45
  store i32 %46, ptr %44, align 8, !tbaa !5
  br label %pred.store.continue113

pred.store.continue113:                           ; preds = %pred.store.if112, %pred.store.continue111
  %47 = extractelement <4 x i1> %28, i64 3
  br i1 %47, label %pred.store.if114, label %pred.store.continue115

pred.store.if114:                                 ; preds = %pred.store.continue113
  %48 = or disjoint i64 %index105, 3
  %49 = add i32 %25, -1007
  %50 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %19, i64 %48
  %51 = extractelement <4 x i32> %wide.load106, i64 3
  %52 = add nsw i32 %49, %51
  store i32 %52, ptr %50, align 4, !tbaa !5
  br label %pred.store.continue115

pred.store.continue115:                           ; preds = %pred.store.if114, %pred.store.continue113
  %53 = extractelement <4 x i1> %29, i64 0
  br i1 %53, label %pred.store.if116, label %pred.store.continue117

pred.store.if116:                                 ; preds = %pred.store.continue115
  %54 = add i32 %25, -1006
  %55 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %19, i64 %24
  %56 = extractelement <4 x i32> %wide.load107, i64 0
  %57 = add nsw i32 %54, %56
  store i32 %57, ptr %55, align 16, !tbaa !5
  br label %pred.store.continue117

pred.store.continue117:                           ; preds = %pred.store.if116, %pred.store.continue115
  %58 = extractelement <4 x i1> %29, i64 1
  br i1 %58, label %pred.store.if118, label %pred.store.continue119

pred.store.if118:                                 ; preds = %pred.store.continue117
  %59 = or disjoint i64 %index105, 5
  %60 = add i32 %25, -1005
  %61 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %19, i64 %59
  %62 = extractelement <4 x i32> %wide.load107, i64 1
  %63 = add nsw i32 %60, %62
  store i32 %63, ptr %61, align 4, !tbaa !5
  br label %pred.store.continue119

pred.store.continue119:                           ; preds = %pred.store.if118, %pred.store.continue117
  %64 = extractelement <4 x i1> %29, i64 2
  br i1 %64, label %pred.store.if120, label %pred.store.continue121

pred.store.if120:                                 ; preds = %pred.store.continue119
  %65 = or disjoint i64 %index105, 6
  %66 = add i32 %25, -1004
  %67 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %19, i64 %65
  %68 = extractelement <4 x i32> %wide.load107, i64 2
  %69 = add nsw i32 %66, %68
  store i32 %69, ptr %67, align 8, !tbaa !5
  br label %pred.store.continue121

pred.store.continue121:                           ; preds = %pred.store.if120, %pred.store.continue119
  %70 = extractelement <4 x i1> %29, i64 3
  br i1 %70, label %pred.store.if122, label %pred.store.continue123

pred.store.if122:                                 ; preds = %pred.store.continue121
  %71 = or disjoint i64 %index105, 7
  %72 = add i32 %25, -1003
  %73 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %19, i64 %71
  %74 = extractelement <4 x i32> %wide.load107, i64 3
  %75 = add nsw i32 %72, %74
  store i32 %75, ptr %73, align 4, !tbaa !5
  br label %pred.store.continue123

pred.store.continue123:                           ; preds = %pred.store.if122, %pred.store.continue121
  %index.next124 = add nuw i64 %index105, 8
  %76 = icmp eq i64 %index.next124, 2016
  br i1 %76, label %.preheader59.preheader, label %vector.body104, !llvm.loop !10

vector.memcheck:                                  ; preds = %.lr.ph
  %.neg125 = mul nsw i64 %15, -8080
  %77 = add i32 %.05064, 1
  %78 = zext i32 %77 to i64
  %79 = mul nuw nsw i64 %78, 8080
  %80 = add nsw i64 %.neg125, %79
  %diff.check = icmp ult i64 %80, 32
  br i1 %diff.check, label %.preheader.preheader, label %vector.body

.preheader.preheader:                             ; preds = %pred.store.continue97, %vector.memcheck
  %indvars.iv73.ph = phi i64 [ 0, %vector.memcheck ], [ 2016, %pred.store.continue97 ]
  br label %.preheader

vector.body:                                      ; preds = %vector.memcheck, %pred.store.continue97
  %index = phi i64 [ %index.next, %pred.store.continue97 ], [ 0, %vector.memcheck ]
  %81 = or disjoint i64 %index, 4
  %82 = trunc i64 %index to i32
  %83 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %15, i64 %index
  %84 = getelementptr inbounds i8, ptr %83, i64 16
  %wide.load = load <4 x i32>, ptr %83, align 16, !tbaa !5
  %wide.load83 = load <4 x i32>, ptr %84, align 16, !tbaa !5
  %85 = icmp ne <4 x i32> %wide.load, <i32 -1073741824, i32 -1073741824, i32 -1073741824, i32 -1073741824>
  %86 = icmp ne <4 x i32> %wide.load83, <i32 -1073741824, i32 -1073741824, i32 -1073741824, i32 -1073741824>
  %87 = extractelement <4 x i1> %85, i64 0
  br i1 %87, label %pred.store.if, label %pred.store.continue

pred.store.if:                                    ; preds = %vector.body
  %88 = extractelement <4 x i32> %wide.load, i64 0
  %89 = sub i32 %88, %82
  %90 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %19, i64 %index
  %91 = add i32 %89, 1010
  store i32 %91, ptr %90, align 16, !tbaa !5
  br label %pred.store.continue

pred.store.continue:                              ; preds = %pred.store.if, %vector.body
  %92 = extractelement <4 x i1> %85, i64 1
  br i1 %92, label %pred.store.if84, label %pred.store.continue85

pred.store.if84:                                  ; preds = %pred.store.continue
  %93 = or disjoint i64 %index, 1
  %.neg126 = xor i32 %82, -1
  %94 = extractelement <4 x i32> %wide.load, i64 1
  %95 = add i32 %94, %.neg126
  %96 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %19, i64 %93
  %97 = add i32 %95, 1010
  store i32 %97, ptr %96, align 4, !tbaa !5
  br label %pred.store.continue85

pred.store.continue85:                            ; preds = %pred.store.if84, %pred.store.continue
  %98 = extractelement <4 x i1> %85, i64 2
  br i1 %98, label %pred.store.if86, label %pred.store.continue87

pred.store.if86:                                  ; preds = %pred.store.continue85
  %99 = or disjoint i64 %index, 2
  %100 = or disjoint i32 %82, 2
  %101 = extractelement <4 x i32> %wide.load, i64 2
  %102 = sub i32 %101, %100
  %103 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %19, i64 %99
  %104 = add i32 %102, 1010
  store i32 %104, ptr %103, align 8, !tbaa !5
  br label %pred.store.continue87

pred.store.continue87:                            ; preds = %pred.store.if86, %pred.store.continue85
  %105 = extractelement <4 x i1> %85, i64 3
  br i1 %105, label %pred.store.if88, label %pred.store.continue89

pred.store.if88:                                  ; preds = %pred.store.continue87
  %106 = or disjoint i64 %index, 3
  %107 = or disjoint i32 %82, 3
  %108 = extractelement <4 x i32> %wide.load, i64 3
  %109 = sub i32 %108, %107
  %110 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %19, i64 %106
  %111 = add i32 %109, 1010
  store i32 %111, ptr %110, align 4, !tbaa !5
  br label %pred.store.continue89

pred.store.continue89:                            ; preds = %pred.store.if88, %pred.store.continue87
  %112 = extractelement <4 x i1> %86, i64 0
  br i1 %112, label %pred.store.if90, label %pred.store.continue91

pred.store.if90:                                  ; preds = %pred.store.continue89
  %113 = or disjoint i32 %82, 4
  %114 = extractelement <4 x i32> %wide.load83, i64 0
  %115 = sub i32 %114, %113
  %116 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %19, i64 %81
  %117 = add i32 %115, 1010
  store i32 %117, ptr %116, align 16, !tbaa !5
  br label %pred.store.continue91

pred.store.continue91:                            ; preds = %pred.store.if90, %pred.store.continue89
  %118 = extractelement <4 x i1> %86, i64 1
  br i1 %118, label %pred.store.if92, label %pred.store.continue93

pred.store.if92:                                  ; preds = %pred.store.continue91
  %119 = or disjoint i64 %index, 5
  %120 = or disjoint i32 %82, 5
  %121 = extractelement <4 x i32> %wide.load83, i64 1
  %122 = sub i32 %121, %120
  %123 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %19, i64 %119
  %124 = add i32 %122, 1010
  store i32 %124, ptr %123, align 4, !tbaa !5
  br label %pred.store.continue93

pred.store.continue93:                            ; preds = %pred.store.if92, %pred.store.continue91
  %125 = extractelement <4 x i1> %86, i64 2
  br i1 %125, label %pred.store.if94, label %pred.store.continue95

pred.store.if94:                                  ; preds = %pred.store.continue93
  %126 = or disjoint i64 %index, 6
  %127 = or disjoint i32 %82, 6
  %128 = extractelement <4 x i32> %wide.load83, i64 2
  %129 = sub i32 %128, %127
  %130 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %19, i64 %126
  %131 = add i32 %129, 1010
  store i32 %131, ptr %130, align 8, !tbaa !5
  br label %pred.store.continue95

pred.store.continue95:                            ; preds = %pred.store.if94, %pred.store.continue93
  %132 = extractelement <4 x i1> %86, i64 3
  br i1 %132, label %pred.store.if96, label %pred.store.continue97

pred.store.if96:                                  ; preds = %pred.store.continue95
  %133 = or disjoint i64 %index, 7
  %134 = or disjoint i32 %82, 7
  %135 = extractelement <4 x i32> %wide.load83, i64 3
  %136 = sub i32 %135, %134
  %137 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %19, i64 %133
  %138 = add i32 %136, 1010
  store i32 %138, ptr %137, align 4, !tbaa !5
  br label %pred.store.continue97

pred.store.continue97:                            ; preds = %pred.store.if96, %pred.store.continue95
  %index.next = add nuw i64 %index, 8
  %139 = icmp eq i64 %index.next, 2016
  br i1 %139, label %.preheader.preheader, label %vector.body, !llvm.loop !14

.preheader57:                                     ; preds = %.lr.ph, %._crit_edge78
  %indvars.iv69 = phi i64 [ %.pre, %._crit_edge78 ], [ 1, %.lr.ph ]
  %140 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %15, i64 %indvars.iv69
  %141 = load i32, ptr %140, align 4, !tbaa !5
  %.not56 = icmp eq i32 %141, -1073741824
  %.pre = add nuw nsw i64 %indvars.iv69, 1
  br i1 %.not56, label %._crit_edge78, label %142

142:                                              ; preds = %.preheader57
  %143 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %19, i64 %.pre
  %144 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %143, ptr noundef nonnull align 4 dereferenceable(4) %140)
  %145 = load i32, ptr %144, align 4, !tbaa !5
  store i32 %145, ptr %143, align 4, !tbaa !5
  %146 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %19, i64 %indvars.iv69
  %147 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %146, ptr noundef nonnull align 4 dereferenceable(4) %140)
  %148 = load i32, ptr %147, align 4, !tbaa !5
  store i32 %148, ptr %146, align 4, !tbaa !5
  %149 = add nsw i64 %indvars.iv69, -1
  %150 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %19, i64 %149
  %151 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %150, ptr noundef nonnull align 4 dereferenceable(4) %140)
  %152 = load i32, ptr %151, align 4, !tbaa !5
  store i32 %152, ptr %150, align 4, !tbaa !5
  br label %._crit_edge78

._crit_edge78:                                    ; preds = %.preheader57, %142
  %exitcond72.not = icmp eq i64 %.pre, 2019
  br i1 %exitcond72.not, label %.loopexit, label %.preheader57, !llvm.loop !15

.preheader59:                                     ; preds = %167, %.preheader59.preheader
  %indvars.iv = phi i64 [ %indvars.iv.ph, %.preheader59.preheader ], [ %indvars.iv.next.1, %167 ]
  %153 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %15, i64 %indvars.iv
  %154 = load i32, ptr %153, align 8, !tbaa !5
  %.not55 = icmp eq i32 %154, -1073741824
  br i1 %.not55, label %.preheader59.1, label %155

155:                                              ; preds = %.preheader59
  %156 = trunc i64 %indvars.iv to i32
  %157 = add i32 %156, -1010
  %158 = add nsw i32 %157, %154
  %159 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %19, i64 %indvars.iv
  store i32 %158, ptr %159, align 8, !tbaa !5
  br label %.preheader59.1

.preheader59.1:                                   ; preds = %.preheader59, %155
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %160 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %15, i64 %indvars.iv.next
  %161 = load i32, ptr %160, align 4, !tbaa !5
  %.not55.1 = icmp eq i32 %161, -1073741824
  br i1 %.not55.1, label %167, label %162

162:                                              ; preds = %.preheader59.1
  %163 = trunc i64 %indvars.iv.next to i32
  %164 = add i32 %163, -1010
  %165 = add nsw i32 %164, %161
  %166 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %19, i64 %indvars.iv.next
  store i32 %165, ptr %166, align 4, !tbaa !5
  br label %167

167:                                              ; preds = %162, %.preheader59.1
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, 2020
  br i1 %exitcond.not.1, label %.loopexit, label %.preheader59, !llvm.loop !16

.preheader:                                       ; preds = %180, %.preheader.preheader
  %indvars.iv73 = phi i64 [ %indvars.iv73.ph, %.preheader.preheader ], [ %indvars.iv.next74.1, %180 ]
  %168 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %15, i64 %indvars.iv73
  %169 = load i32, ptr %168, align 8, !tbaa !5
  %.not = icmp eq i32 %169, -1073741824
  br i1 %.not, label %.preheader.1, label %170

170:                                              ; preds = %.preheader
  %171 = trunc nuw nsw i64 %indvars.iv73 to i32
  %reass.sub = sub i32 %169, %171
  %172 = add i32 %reass.sub, 1010
  %173 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %19, i64 %indvars.iv73
  store i32 %172, ptr %173, align 8, !tbaa !5
  br label %.preheader.1

.preheader.1:                                     ; preds = %.preheader, %170
  %indvars.iv.next74 = or disjoint i64 %indvars.iv73, 1
  %174 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %15, i64 %indvars.iv.next74
  %175 = load i32, ptr %174, align 4, !tbaa !5
  %.not.1 = icmp eq i32 %175, -1073741824
  br i1 %.not.1, label %180, label %176

176:                                              ; preds = %.preheader.1
  %177 = trunc nuw nsw i64 %indvars.iv.next74 to i32
  %reass.sub.1 = sub i32 %175, %177
  %178 = add i32 %reass.sub.1, 1010
  %179 = getelementptr inbounds [1010 x [2020 x i32]], ptr @X, i64 0, i64 %19, i64 %indvars.iv.next74
  store i32 %178, ptr %179, align 4, !tbaa !5
  br label %180

180:                                              ; preds = %176, %.preheader.1
  %indvars.iv.next74.1 = add nuw nsw i64 %indvars.iv73, 2
  %exitcond76.not.1 = icmp eq i64 %indvars.iv.next74.1, 2020
  br i1 %exitcond76.not.1, label %.loopexit, label %.preheader, !llvm.loop !17

.loopexit:                                        ; preds = %167, %._crit_edge78, %180
  %181 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  %182 = icmp ugt i64 %181, %19
  br i1 %182, label %.lr.ph, label %._crit_edge, !llvm.loop !18

183:                                              ; preds = %._crit_edge
  %184 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %185 unwind label %6

185:                                              ; preds = %183, %3
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #7
  ret i32 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 void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

; 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 #6 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: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

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

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

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


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