; LLVM IR from VastoLorde95/Competitive-Programming :: CodeChef/SHORT/COOK66/Problem E (E)

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

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@t = external dso_local global i32, align 4
@_Z1aB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_Z1bB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_Z1cB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@p = external dso_local global [1010 x [1010 x i32]], align 16
@q = external dso_local global [1010 x i32], align 16
@z1 = external dso_local global [1010 x [1010 x i32]], align 16
@z2 = external dso_local global [1010 x [1010 x i32]], align 16
@z3 = external dso_local global [1010 x [1010 x i32]], align 16
@bc = external dso_local global [1010 x i32], align 16
@ba = external dso_local global [1010 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 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)) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7build_zRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPi(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #0

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #4 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %22 = alloca i32, align 4
  %23 = alloca %"class.std::__cxx11::basic_string", align 8
  %24 = alloca %"class.std::__cxx11::basic_string", align 8
  %25 = alloca %"class.std::__cxx11::basic_string", align 8
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca %"class.std::__cxx11::basic_string", align 8
  %32 = alloca %"class.std::__cxx11::basic_string", align 8
  %33 = alloca %"class.std::__cxx11::basic_string", align 8
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  %40 = alloca %"class.std::__cxx11::basic_string", align 8
  %41 = alloca %"class.std::__cxx11::basic_string", align 8
  %42 = alloca %"class.std::__cxx11::basic_string", align 8
  %43 = alloca i32, align 4
  %44 = alloca i32, align 4
  %45 = alloca i32, align 4
  %46 = alloca i32, align 4
  %47 = alloca i32, align 4
  %48 = alloca i32, align 4
  %49 = alloca i32, align 4
  %50 = alloca %"class.std::__cxx11::basic_string", align 8
  %51 = alloca %"class.std::__cxx11::basic_string", align 8
  %52 = alloca %"class.std::__cxx11::basic_string", align 8
  %53 = alloca i32, align 4
  %54 = alloca i32, align 4
  %55 = alloca i32, align 4
  %56 = alloca i32, align 4
  %57 = alloca i32, align 4
  %58 = alloca i32, align 4
  %59 = alloca i32, align 4
  %60 = alloca %"class.std::__cxx11::basic_string", align 8
  %61 = alloca %"class.std::__cxx11::basic_string", align 8
  %62 = alloca %"class.std::__cxx11::basic_string", align 8
  %63 = alloca i32, align 4
  %64 = alloca i32, align 4
  %65 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %66 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %67 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %68 = getelementptr i8, ptr %67, i64 -24
  %69 = load i64, ptr %68, align 8
  %70 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %69
  %71 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %70, ptr noundef null)
  %72 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %73 = getelementptr i8, ptr %72, i64 -24
  %74 = load i64, ptr %73, align 8
  %75 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %74
  %76 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %75, ptr noundef null)
  %77 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @t)
  br label %78

78:                                               ; preds = %850, %0
  %79 = load i32, ptr @t, align 4, !tbaa !8
  %80 = add nsw i32 %79, -1
  store i32 %80, ptr @t, align 4, !tbaa !8
  %81 = icmp ne i32 %79, 0
  br i1 %81, label %82, label %856

82:                                               ; preds = %78
  %83 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) @_Z1aB5cxx11)
  %84 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) %83, ptr noundef nonnull align 8 dereferenceable(32) @_Z1bB5cxx11)
  %85 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) %84, ptr noundef nonnull align 8 dereferenceable(32) @_Z1cB5cxx11)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  %86 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1aB5cxx11) #7
  %87 = trunc i64 %86 to i32
  store i32 %87, ptr %2, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  %88 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1bB5cxx11) #7
  %89 = trunc i64 %88 to i32
  store i32 %89, ptr %3, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  %90 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1cB5cxx11) #7
  %91 = trunc i64 %90 to i32
  store i32 %91, ptr %4, align 4, !tbaa !8
  call void @llvm.memset.p0.i64(ptr align 16 @p, i8 0, i64 4080400, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  store i64 0, ptr %5, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  store i64 0, ptr %6, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !8
  br label %92

92:                                               ; preds = %134, %82
  %93 = load i32, ptr %7, align 4, !tbaa !8
  %94 = load i32, ptr %3, align 4, !tbaa !8
  %95 = icmp slt i32 %93, %94
  br i1 %95, label %97, label %96

96:                                               ; preds = %92
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %137

97:                                               ; preds = %92
  %98 = load i32, ptr %7, align 4, !tbaa !8
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [1010 x [1010 x i32]], ptr @p, i64 0, i64 %99
  %101 = load i32, ptr %7, align 4, !tbaa !8
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [1010 x i32], ptr %100, i64 0, i64 %102
  store i32 1, ptr %103, align 4, !tbaa !8
  %104 = load i64, ptr %5, align 8, !tbaa !11
  %105 = add nsw i64 %104, 1
  store i64 %105, ptr %5, align 8, !tbaa !11
  %106 = load i32, ptr %7, align 4, !tbaa !8
  %107 = add nsw i32 %106, 1
  %108 = load i32, ptr %3, align 4, !tbaa !8
  %109 = icmp slt i32 %107, %108
  br i1 %109, label %110, label %133

110:                                              ; preds = %97
  %111 = load i32, ptr %7, align 4, !tbaa !8
  %112 = sext i32 %111 to i64
  %113 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1bB5cxx11, i64 noundef %112)
  %114 = load i8, ptr %113, align 1, !tbaa !13
  %115 = sext i8 %114 to i32
  %116 = load i32, ptr %7, align 4, !tbaa !8
  %117 = add nsw i32 %116, 1
  %118 = sext i32 %117 to i64
  %119 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1bB5cxx11, i64 noundef %118)
  %120 = load i8, ptr %119, align 1, !tbaa !13
  %121 = sext i8 %120 to i32
  %122 = icmp eq i32 %115, %121
  br i1 %122, label %123, label %133

123:                                              ; preds = %110
  %124 = load i32, ptr %7, align 4, !tbaa !8
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [1010 x [1010 x i32]], ptr @p, i64 0, i64 %125
  %127 = load i32, ptr %7, align 4, !tbaa !8
  %128 = add nsw i32 %127, 1
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [1010 x i32], ptr %126, i64 0, i64 %129
  store i32 1, ptr %130, align 4, !tbaa !8
  %131 = load i64, ptr %5, align 8, !tbaa !11
  %132 = add nsw i64 %131, 1
  store i64 %132, ptr %5, align 8, !tbaa !11
  br label %133

133:                                              ; preds = %123, %110, %97
  br label %134

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

137:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 3, ptr %8, align 4, !tbaa !8
  br label %138

138:                                              ; preds = %197, %137
  %139 = load i32, ptr %8, align 4, !tbaa !8
  %140 = load i32, ptr %3, align 4, !tbaa !8
  %141 = icmp sle i32 %139, %140
  br i1 %141, label %143, label %142

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

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

144:                                              ; preds = %193, %143
  %145 = load i32, ptr %10, align 4, !tbaa !8
  %146 = load i32, ptr %8, align 4, !tbaa !8
  %147 = add nsw i32 %145, %146
  %148 = sub nsw i32 %147, 1
  %149 = load i32, ptr %3, align 4, !tbaa !8
  %150 = icmp slt i32 %148, %149
  br i1 %150, label %152, label %151

151:                                              ; preds = %144
  store i32 10, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %196

152:                                              ; preds = %144
  %153 = load i32, ptr %10, align 4, !tbaa !8
  %154 = sext i32 %153 to i64
  %155 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1bB5cxx11, i64 noundef %154)
  %156 = load i8, ptr %155, align 1, !tbaa !13
  %157 = sext i8 %156 to i32
  %158 = load i32, ptr %10, align 4, !tbaa !8
  %159 = load i32, ptr %8, align 4, !tbaa !8
  %160 = add nsw i32 %158, %159
  %161 = sub nsw i32 %160, 1
  %162 = sext i32 %161 to i64
  %163 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1bB5cxx11, i64 noundef %162)
  %164 = load i8, ptr %163, align 1, !tbaa !13
  %165 = sext i8 %164 to i32
  %166 = icmp eq i32 %157, %165
  br i1 %166, label %167, label %192

167:                                              ; preds = %152
  %168 = load i32, ptr %10, align 4, !tbaa !8
  %169 = add nsw i32 %168, 1
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [1010 x [1010 x i32]], ptr @p, i64 0, i64 %170
  %172 = load i32, ptr %10, align 4, !tbaa !8
  %173 = load i32, ptr %8, align 4, !tbaa !8
  %174 = add nsw i32 %172, %173
  %175 = sub nsw i32 %174, 2
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [1010 x i32], ptr %171, i64 0, i64 %176
  %178 = load i32, ptr %177, align 4, !tbaa !8
  %179 = icmp eq i32 %178, 1
  br i1 %179, label %180, label %192

180:                                              ; preds = %167
  %181 = load i32, ptr %10, align 4, !tbaa !8
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [1010 x [1010 x i32]], ptr @p, i64 0, i64 %182
  %184 = load i32, ptr %10, align 4, !tbaa !8
  %185 = load i32, ptr %8, align 4, !tbaa !8
  %186 = add nsw i32 %184, %185
  %187 = sub nsw i32 %186, 1
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [1010 x i32], ptr %183, i64 0, i64 %188
  store i32 1, ptr %189, align 4, !tbaa !8
  %190 = load i64, ptr %5, align 8, !tbaa !11
  %191 = add nsw i64 %190, 1
  store i64 %191, ptr %5, align 8, !tbaa !11
  br label %192

192:                                              ; preds = %180, %167, %152
  br label %193

193:                                              ; preds = %192
  %194 = load i32, ptr %10, align 4, !tbaa !8
  %195 = add nsw i32 %194, 1
  store i32 %195, ptr %10, align 4, !tbaa !8
  br label %144, !llvm.loop !16

196:                                              ; preds = %151
  br label %197

197:                                              ; preds = %196
  %198 = load i32, ptr %8, align 4, !tbaa !8
  %199 = add nsw i32 %198, 1
  store i32 %199, ptr %8, align 4, !tbaa !8
  br label %138, !llvm.loop !17

200:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(32) @_Z1cB5cxx11)
  %201 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  %202 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  store ptr %201, ptr %202, align 8
  %203 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  %204 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %203, ptr %204, align 8
  %205 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  %206 = load ptr, ptr %205, align 8
  %207 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  %208 = load ptr, ptr %207, align 8
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvT_SA_(ptr %206, ptr %208)
          to label %209 unwind label %235

209:                                              ; preds = %200
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(32) @_Z1bB5cxx11)
          to label %210 unwind label %239

210:                                              ; preds = %209
  %211 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %16) #7
  %212 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %211, ptr %212, align 8
  %213 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %16) #7
  %214 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  store ptr %213, ptr %214, align 8
  %215 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  %216 = load ptr, ptr %215, align 8
  %217 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  %218 = load ptr, ptr %217, align 8
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvT_SA_(ptr %216, ptr %218)
          to label %219 unwind label %243

219:                                              ; preds = %210
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(32) @_Z1aB5cxx11)
          to label %220 unwind label %247

220:                                              ; preds = %219
  %221 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  %222 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  store ptr %221, ptr %222, align 8
  %223 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  %224 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  store ptr %223, ptr %224, align 8
  %225 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  %226 = load ptr, ptr %225, align 8
  %227 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  %228 = load ptr, ptr %227, align 8
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvT_SA_(ptr %226, ptr %228)
          to label %229 unwind label %251

229:                                              ; preds = %220
  call void @llvm.memset.p0.i64(ptr align 16 @z1, i8 0, i64 4080400, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 1, ptr %22, align 4, !tbaa !8
  br label %230

230:                                              ; preds = %315, %229
  %231 = load i32, ptr %22, align 4, !tbaa !8
  %232 = load i32, ptr %2, align 4, !tbaa !8
  %233 = icmp sle i32 %231, %232
  br i1 %233, label %255, label %234

234:                                              ; preds = %230
  store i32 13, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %320

235:                                              ; preds = %200
  %236 = landingpad { ptr, i32 }
          cleanup
  %237 = extractvalue { ptr, i32 } %236, 0
  store ptr %237, ptr %14, align 8
  %238 = extractvalue { ptr, i32 } %236, 1
  store i32 %238, ptr %15, align 4
  br label %855

239:                                              ; preds = %209
  %240 = landingpad { ptr, i32 }
          cleanup
  %241 = extractvalue { ptr, i32 } %240, 0
  store ptr %241, ptr %14, align 8
  %242 = extractvalue { ptr, i32 } %240, 1
  store i32 %242, ptr %15, align 4
  br label %854

243:                                              ; preds = %210
  %244 = landingpad { ptr, i32 }
          cleanup
  %245 = extractvalue { ptr, i32 } %244, 0
  store ptr %245, ptr %14, align 8
  %246 = extractvalue { ptr, i32 } %244, 1
  store i32 %246, ptr %15, align 4
  br label %853

247:                                              ; preds = %219
  %248 = landingpad { ptr, i32 }
          cleanup
  %249 = extractvalue { ptr, i32 } %248, 0
  store ptr %249, ptr %14, align 8
  %250 = extractvalue { ptr, i32 } %248, 1
  store i32 %250, ptr %15, align 4
  br label %852

251:                                              ; preds = %848, %845, %566, %320, %220
  %252 = landingpad { ptr, i32 }
          cleanup
  %253 = extractvalue { ptr, i32 } %252, 0
  store ptr %253, ptr %14, align 8
  %254 = extractvalue { ptr, i32 } %252, 1
  store i32 %254, ptr %15, align 4
  br label %851

255:                                              ; preds = %230
  call void @llvm.lifetime.start.p0(i64 32, ptr %23) #7
  %256 = load i32, ptr %2, align 4, !tbaa !8
  %257 = load i32, ptr %22, align 4, !tbaa !8
  %258 = sub nsw i32 %256, %257
  %259 = sext i32 %258 to i64
  %260 = load i32, ptr %22, align 4, !tbaa !8
  %261 = sext i32 %260 to i64
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %23, ptr noundef nonnull align 8 dereferenceable(32) @_Z1aB5cxx11, i64 noundef %259, i64 noundef %261)
          to label %262 unwind label %281

262:                                              ; preds = %255
  call void @llvm.lifetime.start.p0(i64 32, ptr %24) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %25) #7
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %25, ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef @.str)
          to label %263 unwind label %285

263:                                              ; preds = %262
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %24, ptr noundef nonnull align 8 dereferenceable(32) %25, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %264 unwind label %289

264:                                              ; preds = %263
  %265 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef nonnull align 8 dereferenceable(32) %24) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #7
  %266 = load i32, ptr %22, align 4, !tbaa !8
  %267 = sext i32 %266 to i64
  %268 = getelementptr inbounds [1010 x [1010 x i32]], ptr @z1, i64 0, i64 %267
  %269 = getelementptr inbounds [1010 x i32], ptr %268, i64 0, i64 0
  invoke void @_Z7build_zRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPi(ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef %269)
          to label %270 unwind label %294

270:                                              ; preds = %264
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  %271 = load i32, ptr %22, align 4, !tbaa !8
  %272 = add nsw i32 %271, 1
  store i32 %272, ptr %26, align 4, !tbaa !8
  br label %273

273:                                              ; preds = %311, %270
  %274 = load i32, ptr %26, align 4, !tbaa !8
  %275 = load i32, ptr %22, align 4, !tbaa !8
  %276 = load i32, ptr %4, align 4, !tbaa !8
  %277 = add nsw i32 %275, %276
  %278 = add nsw i32 %277, 1
  %279 = icmp slt i32 %274, %278
  br i1 %279, label %298, label %280

280:                                              ; preds = %273
  store i32 16, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  br label %314

281:                                              ; preds = %255
  %282 = landingpad { ptr, i32 }
          cleanup
  %283 = extractvalue { ptr, i32 } %282, 0
  store ptr %283, ptr %14, align 8
  %284 = extractvalue { ptr, i32 } %282, 1
  store i32 %284, ptr %15, align 4
  br label %319

285:                                              ; preds = %262
  %286 = landingpad { ptr, i32 }
          cleanup
  %287 = extractvalue { ptr, i32 } %286, 0
  store ptr %287, ptr %14, align 8
  %288 = extractvalue { ptr, i32 } %286, 1
  store i32 %288, ptr %15, align 4
  br label %293

289:                                              ; preds = %263
  %290 = landingpad { ptr, i32 }
          cleanup
  %291 = extractvalue { ptr, i32 } %290, 0
  store ptr %291, ptr %14, align 8
  %292 = extractvalue { ptr, i32 } %290, 1
  store i32 %292, ptr %15, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #7
  br label %293

293:                                              ; preds = %289, %285
  call void @llvm.lifetime.end.p0(i64 32, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #7
  br label %318

294:                                              ; preds = %264
  %295 = landingpad { ptr, i32 }
          cleanup
  %296 = extractvalue { ptr, i32 } %295, 0
  store ptr %296, ptr %14, align 8
  %297 = extractvalue { ptr, i32 } %295, 1
  store i32 %297, ptr %15, align 4
  br label %318

298:                                              ; preds = %273
  %299 = load i64, ptr %5, align 8, !tbaa !11
  %300 = load i32, ptr %22, align 4, !tbaa !8
  %301 = sext i32 %300 to i64
  %302 = getelementptr inbounds [1010 x [1010 x i32]], ptr @z1, i64 0, i64 %301
  %303 = load i32, ptr %26, align 4, !tbaa !8
  %304 = sext i32 %303 to i64
  %305 = getelementptr inbounds [1010 x i32], ptr %302, i64 0, i64 %304
  %306 = load i32, ptr %305, align 4, !tbaa !8
  %307 = sext i32 %306 to i64
  %308 = mul nsw i64 %299, %307
  %309 = load i64, ptr %6, align 8, !tbaa !11
  %310 = add nsw i64 %309, %308
  store i64 %310, ptr %6, align 8, !tbaa !11
  br label %311

311:                                              ; preds = %298
  %312 = load i32, ptr %26, align 4, !tbaa !8
  %313 = add nsw i32 %312, 1
  store i32 %313, ptr %26, align 4, !tbaa !8
  br label %273, !llvm.loop !18

314:                                              ; preds = %280
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #7
  br label %315

315:                                              ; preds = %314
  %316 = load i32, ptr %22, align 4, !tbaa !8
  %317 = add nsw i32 %316, 1
  store i32 %317, ptr %22, align 4, !tbaa !8
  br label %230, !llvm.loop !19

318:                                              ; preds = %294, %293
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #7
  br label %319

319:                                              ; preds = %318, %281
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %851

320:                                              ; preds = %234
  invoke void @_Z2trIPKcJxEEvT_DpRKT0_(ptr noundef @.str.4, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %321 unwind label %251

321:                                              ; preds = %320
  call void @llvm.memset.p0.i64(ptr align 16 @q, i8 0, i64 4040, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  store i32 0, ptr %27, align 4, !tbaa !8
  br label %322

322:                                              ; preds = %356, %321
  %323 = load i32, ptr %27, align 4, !tbaa !8
  %324 = load i32, ptr %3, align 4, !tbaa !8
  %325 = icmp slt i32 %323, %324
  br i1 %325, label %327, label %326

326:                                              ; preds = %322
  store i32 19, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  br label %359

327:                                              ; preds = %322
  %328 = load i32, ptr %27, align 4, !tbaa !8
  %329 = sext i32 %328 to i64
  %330 = getelementptr inbounds [1010 x i32], ptr @q, i64 0, i64 %329
  store i32 1, ptr %330, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  %331 = load i32, ptr %27, align 4, !tbaa !8
  %332 = add nsw i32 %331, 1
  store i32 %332, ptr %28, align 4, !tbaa !8
  br label %333

333:                                              ; preds = %352, %327
  %334 = load i32, ptr %28, align 4, !tbaa !8
  %335 = load i32, ptr %3, align 4, !tbaa !8
  %336 = icmp slt i32 %334, %335
  br i1 %336, label %338, label %337

337:                                              ; preds = %333
  store i32 22, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  br label %355

338:                                              ; preds = %333
  %339 = load i32, ptr %27, align 4, !tbaa !8
  %340 = add nsw i32 %339, 1
  %341 = sext i32 %340 to i64
  %342 = getelementptr inbounds [1010 x [1010 x i32]], ptr @p, i64 0, i64 %341
  %343 = load i32, ptr %28, align 4, !tbaa !8
  %344 = sext i32 %343 to i64
  %345 = getelementptr inbounds [1010 x i32], ptr %342, i64 0, i64 %344
  %346 = load i32, ptr %345, align 4, !tbaa !8
  %347 = load i32, ptr %27, align 4, !tbaa !8
  %348 = sext i32 %347 to i64
  %349 = getelementptr inbounds [1010 x i32], ptr @q, i64 0, i64 %348
  %350 = load i32, ptr %349, align 4, !tbaa !8
  %351 = add nsw i32 %350, %346
  store i32 %351, ptr %349, align 4, !tbaa !8
  br label %352

352:                                              ; preds = %338
  %353 = load i32, ptr %28, align 4, !tbaa !8
  %354 = add nsw i32 %353, 1
  store i32 %354, ptr %28, align 4, !tbaa !8
  br label %333, !llvm.loop !20

355:                                              ; preds = %337
  br label %356

356:                                              ; preds = %355
  %357 = load i32, ptr %27, align 4, !tbaa !8
  %358 = add nsw i32 %357, 1
  store i32 %358, ptr %27, align 4, !tbaa !8
  br label %322, !llvm.loop !21

359:                                              ; preds = %326
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #7
  %360 = load i32, ptr %3, align 4, !tbaa !8
  %361 = sub nsw i32 %360, 1
  store i32 %361, ptr %29, align 4, !tbaa !8
  br label %362

362:                                              ; preds = %377, %359
  %363 = load i32, ptr %29, align 4, !tbaa !8
  %364 = icmp sge i32 %363, 0
  br i1 %364, label %366, label %365

365:                                              ; preds = %362
  store i32 25, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  br label %380

366:                                              ; preds = %362
  %367 = load i32, ptr %29, align 4, !tbaa !8
  %368 = add nsw i32 %367, 1
  %369 = sext i32 %368 to i64
  %370 = getelementptr inbounds [1010 x i32], ptr @q, i64 0, i64 %369
  %371 = load i32, ptr %370, align 4, !tbaa !8
  %372 = load i32, ptr %29, align 4, !tbaa !8
  %373 = sext i32 %372 to i64
  %374 = getelementptr inbounds [1010 x i32], ptr @q, i64 0, i64 %373
  %375 = load i32, ptr %374, align 4, !tbaa !8
  %376 = add nsw i32 %375, %371
  store i32 %376, ptr %374, align 4, !tbaa !8
  br label %377

377:                                              ; preds = %366
  %378 = load i32, ptr %29, align 4, !tbaa !8
  %379 = add nsw i32 %378, -1
  store i32 %379, ptr %29, align 4, !tbaa !8
  br label %362, !llvm.loop !22

380:                                              ; preds = %365
  call void @llvm.memset.p0.i64(ptr align 16 @z2, i8 0, i64 4080400, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @bc, i8 0, i64 4040, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #7
  store i32 1, ptr %30, align 4, !tbaa !8
  br label %381

381:                                              ; preds = %477, %380
  %382 = load i32, ptr %30, align 4, !tbaa !8
  %383 = load i32, ptr %3, align 4, !tbaa !8
  %384 = icmp sle i32 %382, %383
  br i1 %384, label %386, label %385

385:                                              ; preds = %381
  store i32 28, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  br label %482

386:                                              ; preds = %381
  call void @llvm.lifetime.start.p0(i64 32, ptr %31) #7
  %387 = load i32, ptr %3, align 4, !tbaa !8
  %388 = load i32, ptr %30, align 4, !tbaa !8
  %389 = sub nsw i32 %387, %388
  %390 = sext i32 %389 to i64
  %391 = load i32, ptr %30, align 4, !tbaa !8
  %392 = sext i32 %391 to i64
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %31, ptr noundef nonnull align 8 dereferenceable(32) @_Z1bB5cxx11, i64 noundef %390, i64 noundef %392)
          to label %393 unwind label %412

393:                                              ; preds = %386
  call void @llvm.lifetime.start.p0(i64 32, ptr %32) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %33) #7
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %33, ptr noundef nonnull align 8 dereferenceable(32) %31, ptr noundef @.str)
          to label %394 unwind label %416

394:                                              ; preds = %393
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %32, ptr noundef nonnull align 8 dereferenceable(32) %33, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %395 unwind label %420

395:                                              ; preds = %394
  %396 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %31, ptr noundef nonnull align 8 dereferenceable(32) %32) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %32) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %33) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %32) #7
  %397 = load i32, ptr %30, align 4, !tbaa !8
  %398 = sext i32 %397 to i64
  %399 = getelementptr inbounds [1010 x [1010 x i32]], ptr @z2, i64 0, i64 %398
  %400 = getelementptr inbounds [1010 x i32], ptr %399, i64 0, i64 0
  invoke void @_Z7build_zRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPi(ptr noundef nonnull align 8 dereferenceable(32) %31, ptr noundef %400)
          to label %401 unwind label %425

401:                                              ; preds = %395
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #7
  %402 = load i32, ptr %30, align 4, !tbaa !8
  %403 = add nsw i32 %402, 1
  store i32 %403, ptr %34, align 4, !tbaa !8
  br label %404

404:                                              ; preds = %473, %401
  %405 = load i32, ptr %34, align 4, !tbaa !8
  %406 = load i32, ptr %30, align 4, !tbaa !8
  %407 = load i32, ptr %4, align 4, !tbaa !8
  %408 = add nsw i32 %406, %407
  %409 = add nsw i32 %408, 1
  %410 = icmp slt i32 %405, %409
  br i1 %410, label %429, label %411

411:                                              ; preds = %404
  store i32 31, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #7
  br label %476

412:                                              ; preds = %386
  %413 = landingpad { ptr, i32 }
          cleanup
  %414 = extractvalue { ptr, i32 } %413, 0
  store ptr %414, ptr %14, align 8
  %415 = extractvalue { ptr, i32 } %413, 1
  store i32 %415, ptr %15, align 4
  br label %481

416:                                              ; preds = %393
  %417 = landingpad { ptr, i32 }
          cleanup
  %418 = extractvalue { ptr, i32 } %417, 0
  store ptr %418, ptr %14, align 8
  %419 = extractvalue { ptr, i32 } %417, 1
  store i32 %419, ptr %15, align 4
  br label %424

420:                                              ; preds = %394
  %421 = landingpad { ptr, i32 }
          cleanup
  %422 = extractvalue { ptr, i32 } %421, 0
  store ptr %422, ptr %14, align 8
  %423 = extractvalue { ptr, i32 } %421, 1
  store i32 %423, ptr %15, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %33) #7
  br label %424

424:                                              ; preds = %420, %416
  call void @llvm.lifetime.end.p0(i64 32, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %32) #7
  br label %480

425:                                              ; preds = %395
  %426 = landingpad { ptr, i32 }
          cleanup
  %427 = extractvalue { ptr, i32 } %426, 0
  store ptr %427, ptr %14, align 8
  %428 = extractvalue { ptr, i32 } %426, 1
  store i32 %428, ptr %15, align 4
  br label %480

429:                                              ; preds = %404
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #7
  %430 = load i32, ptr %30, align 4, !tbaa !8
  %431 = sext i32 %430 to i64
  %432 = getelementptr inbounds [1010 x [1010 x i32]], ptr @z2, i64 0, i64 %431
  %433 = load i32, ptr %34, align 4, !tbaa !8
  %434 = sext i32 %433 to i64
  %435 = getelementptr inbounds [1010 x i32], ptr %432, i64 0, i64 %434
  %436 = load i32, ptr %435, align 4, !tbaa !8
  store i32 %436, ptr %35, align 4, !tbaa !8
  %437 = load i32, ptr %35, align 4, !tbaa !8
  %438 = icmp eq i32 %437, 0
  br i1 %438, label %439, label %440

439:                                              ; preds = %429
  store i32 33, ptr %9, align 4
  br label %470

440:                                              ; preds = %429
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #7
  %441 = load i32, ptr %4, align 4, !tbaa !8
  %442 = sub nsw i32 %441, 1
  %443 = load i32, ptr %34, align 4, !tbaa !8
  %444 = load i32, ptr %30, align 4, !tbaa !8
  %445 = sub nsw i32 %443, %444
  %446 = sub nsw i32 %445, 1
  %447 = sub nsw i32 %442, %446
  store i32 %447, ptr %36, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #7
  %448 = load i32, ptr %3, align 4, !tbaa !8
  %449 = load i32, ptr %30, align 4, !tbaa !8
  %450 = sub nsw i32 %448, %449
  %451 = load i32, ptr %35, align 4, !tbaa !8
  %452 = add nsw i32 %450, %451
  store i32 %452, ptr %37, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #7
  %453 = load i32, ptr %3, align 4, !tbaa !8
  %454 = load i32, ptr %30, align 4, !tbaa !8
  %455 = sub nsw i32 %453, %454
  store i32 %455, ptr %38, align 4, !tbaa !8
  %456 = load i32, ptr %38, align 4, !tbaa !8
  %457 = sext i32 %456 to i64
  %458 = getelementptr inbounds [1010 x i32], ptr @q, i64 0, i64 %457
  %459 = load i32, ptr %458, align 4, !tbaa !8
  %460 = load i32, ptr %37, align 4, !tbaa !8
  %461 = sext i32 %460 to i64
  %462 = getelementptr inbounds [1010 x i32], ptr @q, i64 0, i64 %461
  %463 = load i32, ptr %462, align 4, !tbaa !8
  %464 = sub nsw i32 %459, %463
  %465 = load i32, ptr %36, align 4, !tbaa !8
  %466 = sext i32 %465 to i64
  %467 = getelementptr inbounds [1010 x i32], ptr @bc, i64 0, i64 %466
  %468 = load i32, ptr %467, align 4, !tbaa !8
  %469 = add nsw i32 %468, %464
  store i32 %469, ptr %467, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #7
  store i32 0, ptr %9, align 4
  br label %470

470:                                              ; preds = %440, %439
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #7
  %471 = load i32, ptr %9, align 4
  switch i32 %471, label %862 [
    i32 0, label %472
    i32 33, label %473
  ]

472:                                              ; preds = %470
  br label %473

473:                                              ; preds = %472, %470
  %474 = load i32, ptr %34, align 4, !tbaa !8
  %475 = add nsw i32 %474, 1
  store i32 %475, ptr %34, align 4, !tbaa !8
  br label %404, !llvm.loop !23

476:                                              ; preds = %411
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %31) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %31) #7
  br label %477

477:                                              ; preds = %476
  %478 = load i32, ptr %30, align 4, !tbaa !8
  %479 = add nsw i32 %478, 1
  store i32 %479, ptr %30, align 4, !tbaa !8
  br label %381, !llvm.loop !24

480:                                              ; preds = %425, %424
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %31) #7
  br label %481

481:                                              ; preds = %480, %412
  call void @llvm.lifetime.end.p0(i64 32, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  br label %851

482:                                              ; preds = %385
  call void @llvm.memset.p0.i64(ptr align 16 @z3, i8 0, i64 4080400, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #7
  store i32 1, ptr %39, align 4, !tbaa !8
  br label %483

483:                                              ; preds = %561, %482
  %484 = load i32, ptr %39, align 4, !tbaa !8
  %485 = load i32, ptr %4, align 4, !tbaa !8
  %486 = icmp sle i32 %484, %485
  br i1 %486, label %488, label %487

487:                                              ; preds = %483
  store i32 34, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #7
  br label %566

488:                                              ; preds = %483
  call void @llvm.lifetime.start.p0(i64 32, ptr %40) #7
  %489 = load i32, ptr %4, align 4, !tbaa !8
  %490 = load i32, ptr %39, align 4, !tbaa !8
  %491 = sub nsw i32 %489, %490
  %492 = sext i32 %491 to i64
  %493 = load i32, ptr %39, align 4, !tbaa !8
  %494 = sext i32 %493 to i64
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %40, ptr noundef nonnull align 8 dereferenceable(32) @_Z1cB5cxx11, i64 noundef %492, i64 noundef %494)
          to label %495 unwind label %514

495:                                              ; preds = %488
  call void @llvm.lifetime.start.p0(i64 32, ptr %41) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %42) #7
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %42, ptr noundef nonnull align 8 dereferenceable(32) %40, ptr noundef @.str)
          to label %496 unwind label %518

496:                                              ; preds = %495
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %41, ptr noundef nonnull align 8 dereferenceable(32) %42, ptr noundef nonnull align 8 dereferenceable(32) %19)
          to label %497 unwind label %522

497:                                              ; preds = %496
  %498 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %40, ptr noundef nonnull align 8 dereferenceable(32) %41) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %41) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %42) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %42) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %41) #7
  %499 = load i32, ptr %39, align 4, !tbaa !8
  %500 = sext i32 %499 to i64
  %501 = getelementptr inbounds [1010 x [1010 x i32]], ptr @z3, i64 0, i64 %500
  %502 = getelementptr inbounds [1010 x i32], ptr %501, i64 0, i64 0
  invoke void @_Z7build_zRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPi(ptr noundef nonnull align 8 dereferenceable(32) %40, ptr noundef %502)
          to label %503 unwind label %527

503:                                              ; preds = %497
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #7
  %504 = load i32, ptr %39, align 4, !tbaa !8
  %505 = add nsw i32 %504, 1
  store i32 %505, ptr %43, align 4, !tbaa !8
  br label %506

506:                                              ; preds = %557, %503
  %507 = load i32, ptr %43, align 4, !tbaa !8
  %508 = load i32, ptr %39, align 4, !tbaa !8
  %509 = load i32, ptr %2, align 4, !tbaa !8
  %510 = add nsw i32 %508, %509
  %511 = add nsw i32 %510, 1
  %512 = icmp slt i32 %507, %511
  br i1 %512, label %531, label %513

513:                                              ; preds = %506
  store i32 37, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #7
  br label %560

514:                                              ; preds = %488
  %515 = landingpad { ptr, i32 }
          cleanup
  %516 = extractvalue { ptr, i32 } %515, 0
  store ptr %516, ptr %14, align 8
  %517 = extractvalue { ptr, i32 } %515, 1
  store i32 %517, ptr %15, align 4
  br label %565

518:                                              ; preds = %495
  %519 = landingpad { ptr, i32 }
          cleanup
  %520 = extractvalue { ptr, i32 } %519, 0
  store ptr %520, ptr %14, align 8
  %521 = extractvalue { ptr, i32 } %519, 1
  store i32 %521, ptr %15, align 4
  br label %526

522:                                              ; preds = %496
  %523 = landingpad { ptr, i32 }
          cleanup
  %524 = extractvalue { ptr, i32 } %523, 0
  store ptr %524, ptr %14, align 8
  %525 = extractvalue { ptr, i32 } %523, 1
  store i32 %525, ptr %15, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %42) #7
  br label %526

526:                                              ; preds = %522, %518
  call void @llvm.lifetime.end.p0(i64 32, ptr %42) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %41) #7
  br label %564

527:                                              ; preds = %497
  %528 = landingpad { ptr, i32 }
          cleanup
  %529 = extractvalue { ptr, i32 } %528, 0
  store ptr %529, ptr %14, align 8
  %530 = extractvalue { ptr, i32 } %528, 1
  store i32 %530, ptr %15, align 4
  br label %564

531:                                              ; preds = %506
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #7
  %532 = load i32, ptr %39, align 4, !tbaa !8
  %533 = sext i32 %532 to i64
  %534 = getelementptr inbounds [1010 x [1010 x i32]], ptr @z3, i64 0, i64 %533
  %535 = load i32, ptr %43, align 4, !tbaa !8
  %536 = sext i32 %535 to i64
  %537 = getelementptr inbounds [1010 x i32], ptr %534, i64 0, i64 %536
  %538 = load i32, ptr %537, align 4, !tbaa !8
  store i32 %538, ptr %44, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #7
  %539 = load i32, ptr %4, align 4, !tbaa !8
  %540 = load i32, ptr %39, align 4, !tbaa !8
  %541 = sub nsw i32 %539, %540
  store i32 %541, ptr %45, align 4, !tbaa !8
  %542 = load i32, ptr %45, align 4, !tbaa !8
  %543 = icmp sgt i32 %542, 0
  br i1 %543, label %544, label %556

544:                                              ; preds = %531
  %545 = load i32, ptr %45, align 4, !tbaa !8
  %546 = sub nsw i32 %545, 1
  %547 = sext i32 %546 to i64
  %548 = getelementptr inbounds [1010 x i32], ptr @bc, i64 0, i64 %547
  %549 = load i32, ptr %548, align 4, !tbaa !8
  %550 = sext i32 %549 to i64
  %551 = load i32, ptr %44, align 4, !tbaa !8
  %552 = sext i32 %551 to i64
  %553 = mul nsw i64 %550, %552
  %554 = load i64, ptr %6, align 8, !tbaa !11
  %555 = add nsw i64 %554, %553
  store i64 %555, ptr %6, align 8, !tbaa !11
  br label %556

556:                                              ; preds = %544, %531
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #7
  br label %557

557:                                              ; preds = %556
  %558 = load i32, ptr %43, align 4, !tbaa !8
  %559 = add nsw i32 %558, 1
  store i32 %559, ptr %43, align 4, !tbaa !8
  br label %506, !llvm.loop !25

560:                                              ; preds = %513
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %40) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %40) #7
  br label %561

561:                                              ; preds = %560
  %562 = load i32, ptr %39, align 4, !tbaa !8
  %563 = add nsw i32 %562, 1
  store i32 %563, ptr %39, align 4, !tbaa !8
  br label %483, !llvm.loop !26

564:                                              ; preds = %527, %526
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %40) #7
  br label %565

565:                                              ; preds = %564, %514
  call void @llvm.lifetime.end.p0(i64 32, ptr %40) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #7
  br label %851

566:                                              ; preds = %487
  invoke void @_Z2trIPKcJxEEvT_DpRKT0_(ptr noundef @.str.4, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %567 unwind label %251

567:                                              ; preds = %566
  call void @llvm.memset.p0.i64(ptr align 16 @q, i8 0, i64 4040, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #7
  store i32 0, ptr %46, align 4, !tbaa !8
  br label %568

568:                                              ; preds = %600, %567
  %569 = load i32, ptr %46, align 4, !tbaa !8
  %570 = load i32, ptr %3, align 4, !tbaa !8
  %571 = icmp slt i32 %569, %570
  br i1 %571, label %573, label %572

572:                                              ; preds = %568
  store i32 40, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #7
  br label %603

573:                                              ; preds = %568
  %574 = load i32, ptr %46, align 4, !tbaa !8
  %575 = sext i32 %574 to i64
  %576 = getelementptr inbounds [1010 x i32], ptr @q, i64 0, i64 %575
  store i32 1, ptr %576, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #7
  store i32 0, ptr %47, align 4, !tbaa !8
  br label %577

577:                                              ; preds = %596, %573
  %578 = load i32, ptr %47, align 4, !tbaa !8
  %579 = load i32, ptr %46, align 4, !tbaa !8
  %580 = icmp slt i32 %578, %579
  br i1 %580, label %582, label %581

581:                                              ; preds = %577
  store i32 43, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #7
  br label %599

582:                                              ; preds = %577
  %583 = load i32, ptr %47, align 4, !tbaa !8
  %584 = sext i32 %583 to i64
  %585 = getelementptr inbounds [1010 x [1010 x i32]], ptr @p, i64 0, i64 %584
  %586 = load i32, ptr %46, align 4, !tbaa !8
  %587 = sub nsw i32 %586, 1
  %588 = sext i32 %587 to i64
  %589 = getelementptr inbounds [1010 x i32], ptr %585, i64 0, i64 %588
  %590 = load i32, ptr %589, align 4, !tbaa !8
  %591 = load i32, ptr %46, align 4, !tbaa !8
  %592 = sext i32 %591 to i64
  %593 = getelementptr inbounds [1010 x i32], ptr @q, i64 0, i64 %592
  %594 = load i32, ptr %593, align 4, !tbaa !8
  %595 = add nsw i32 %594, %590
  store i32 %595, ptr %593, align 4, !tbaa !8
  br label %596

596:                                              ; preds = %582
  %597 = load i32, ptr %47, align 4, !tbaa !8
  %598 = add nsw i32 %597, 1
  store i32 %598, ptr %47, align 4, !tbaa !8
  br label %577, !llvm.loop !27

599:                                              ; preds = %581
  br label %600

600:                                              ; preds = %599
  %601 = load i32, ptr %46, align 4, !tbaa !8
  %602 = add nsw i32 %601, 1
  store i32 %602, ptr %46, align 4, !tbaa !8
  br label %568, !llvm.loop !28

603:                                              ; preds = %572
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #7
  store i32 1, ptr %48, align 4, !tbaa !8
  br label %604

604:                                              ; preds = %620, %603
  %605 = load i32, ptr %48, align 4, !tbaa !8
  %606 = load i32, ptr %3, align 4, !tbaa !8
  %607 = icmp slt i32 %605, %606
  br i1 %607, label %609, label %608

608:                                              ; preds = %604
  store i32 46, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #7
  br label %623

609:                                              ; preds = %604
  %610 = load i32, ptr %48, align 4, !tbaa !8
  %611 = sub nsw i32 %610, 1
  %612 = sext i32 %611 to i64
  %613 = getelementptr inbounds [1010 x i32], ptr @q, i64 0, i64 %612
  %614 = load i32, ptr %613, align 4, !tbaa !8
  %615 = load i32, ptr %48, align 4, !tbaa !8
  %616 = sext i32 %615 to i64
  %617 = getelementptr inbounds [1010 x i32], ptr @q, i64 0, i64 %616
  %618 = load i32, ptr %617, align 4, !tbaa !8
  %619 = add nsw i32 %618, %614
  store i32 %619, ptr %617, align 4, !tbaa !8
  br label %620

620:                                              ; preds = %609
  %621 = load i32, ptr %48, align 4, !tbaa !8
  %622 = add nsw i32 %621, 1
  store i32 %622, ptr %48, align 4, !tbaa !8
  br label %604, !llvm.loop !29

623:                                              ; preds = %608
  call void @llvm.memset.p0.i64(ptr align 16 @z2, i8 0, i64 4080400, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @ba, i8 0, i64 4040, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #7
  store i32 1, ptr %49, align 4, !tbaa !8
  br label %624

624:                                              ; preds = %731, %623
  %625 = load i32, ptr %49, align 4, !tbaa !8
  %626 = load i32, ptr %2, align 4, !tbaa !8
  %627 = icmp sle i32 %625, %626
  br i1 %627, label %629, label %628

628:                                              ; preds = %624
  store i32 49, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #7
  br label %736

629:                                              ; preds = %624
  call void @llvm.lifetime.start.p0(i64 32, ptr %50) #7
  %630 = load i32, ptr %2, align 4, !tbaa !8
  %631 = load i32, ptr %49, align 4, !tbaa !8
  %632 = sub nsw i32 %630, %631
  %633 = sext i32 %632 to i64
  %634 = load i32, ptr %49, align 4, !tbaa !8
  %635 = sext i32 %634 to i64
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %50, ptr noundef nonnull align 8 dereferenceable(32) @_Z1aB5cxx11, i64 noundef %633, i64 noundef %635)
          to label %636 unwind label %655

636:                                              ; preds = %629
  call void @llvm.lifetime.start.p0(i64 32, ptr %51) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %52) #7
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %52, ptr noundef nonnull align 8 dereferenceable(32) %50, ptr noundef @.str)
          to label %637 unwind label %659

637:                                              ; preds = %636
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %51, ptr noundef nonnull align 8 dereferenceable(32) %52, ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %638 unwind label %663

638:                                              ; preds = %637
  %639 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %50, ptr noundef nonnull align 8 dereferenceable(32) %51) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %51) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %52) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %52) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %51) #7
  %640 = load i32, ptr %49, align 4, !tbaa !8
  %641 = sext i32 %640 to i64
  %642 = getelementptr inbounds [1010 x [1010 x i32]], ptr @z2, i64 0, i64 %641
  %643 = getelementptr inbounds [1010 x i32], ptr %642, i64 0, i64 0
  invoke void @_Z7build_zRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPi(ptr noundef nonnull align 8 dereferenceable(32) %50, ptr noundef %643)
          to label %644 unwind label %668

644:                                              ; preds = %638
  call void @llvm.lifetime.start.p0(i64 4, ptr %53) #7
  %645 = load i32, ptr %49, align 4, !tbaa !8
  %646 = add nsw i32 %645, 1
  store i32 %646, ptr %53, align 4, !tbaa !8
  br label %647

647:                                              ; preds = %727, %644
  %648 = load i32, ptr %53, align 4, !tbaa !8
  %649 = load i32, ptr %49, align 4, !tbaa !8
  %650 = load i32, ptr %3, align 4, !tbaa !8
  %651 = add nsw i32 %649, %650
  %652 = add nsw i32 %651, 1
  %653 = icmp slt i32 %648, %652
  br i1 %653, label %672, label %654

654:                                              ; preds = %647
  store i32 52, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %53) #7
  br label %730

655:                                              ; preds = %629
  %656 = landingpad { ptr, i32 }
          cleanup
  %657 = extractvalue { ptr, i32 } %656, 0
  store ptr %657, ptr %14, align 8
  %658 = extractvalue { ptr, i32 } %656, 1
  store i32 %658, ptr %15, align 4
  br label %735

659:                                              ; preds = %636
  %660 = landingpad { ptr, i32 }
          cleanup
  %661 = extractvalue { ptr, i32 } %660, 0
  store ptr %661, ptr %14, align 8
  %662 = extractvalue { ptr, i32 } %660, 1
  store i32 %662, ptr %15, align 4
  br label %667

663:                                              ; preds = %637
  %664 = landingpad { ptr, i32 }
          cleanup
  %665 = extractvalue { ptr, i32 } %664, 0
  store ptr %665, ptr %14, align 8
  %666 = extractvalue { ptr, i32 } %664, 1
  store i32 %666, ptr %15, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %52) #7
  br label %667

667:                                              ; preds = %663, %659
  call void @llvm.lifetime.end.p0(i64 32, ptr %52) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %51) #7
  br label %734

668:                                              ; preds = %638
  %669 = landingpad { ptr, i32 }
          cleanup
  %670 = extractvalue { ptr, i32 } %669, 0
  store ptr %670, ptr %14, align 8
  %671 = extractvalue { ptr, i32 } %669, 1
  store i32 %671, ptr %15, align 4
  br label %734

672:                                              ; preds = %647
  call void @llvm.lifetime.start.p0(i64 4, ptr %54) #7
  %673 = load i32, ptr %49, align 4, !tbaa !8
  %674 = sext i32 %673 to i64
  %675 = getelementptr inbounds [1010 x [1010 x i32]], ptr @z2, i64 0, i64 %674
  %676 = load i32, ptr %53, align 4, !tbaa !8
  %677 = sext i32 %676 to i64
  %678 = getelementptr inbounds [1010 x i32], ptr %675, i64 0, i64 %677
  %679 = load i32, ptr %678, align 4, !tbaa !8
  store i32 %679, ptr %54, align 4, !tbaa !8
  %680 = load i32, ptr %54, align 4, !tbaa !8
  %681 = icmp eq i32 %680, 0
  br i1 %681, label %682, label %683

682:                                              ; preds = %672
  store i32 54, ptr %9, align 4
  br label %724

683:                                              ; preds = %672
  call void @llvm.lifetime.start.p0(i64 4, ptr %55) #7
  %684 = load i32, ptr %2, align 4, !tbaa !8
  %685 = load i32, ptr %49, align 4, !tbaa !8
  %686 = sub nsw i32 %684, %685
  store i32 %686, ptr %55, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %56) #7
  %687 = load i32, ptr %3, align 4, !tbaa !8
  %688 = sub nsw i32 %687, 1
  %689 = load i32, ptr %53, align 4, !tbaa !8
  %690 = load i32, ptr %49, align 4, !tbaa !8
  %691 = sub nsw i32 %689, %690
  %692 = sub nsw i32 %691, 1
  %693 = sub nsw i32 %688, %692
  store i32 %693, ptr %56, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %57) #7
  %694 = load i32, ptr %56, align 4, !tbaa !8
  %695 = load i32, ptr %54, align 4, !tbaa !8
  %696 = sub nsw i32 %694, %695
  %697 = add nsw i32 %696, 1
  store i32 %697, ptr %57, align 4, !tbaa !8
  %698 = load i32, ptr %57, align 4, !tbaa !8
  %699 = sub nsw i32 %698, 1
  %700 = icmp sge i32 %699, 0
  br i1 %700, label %701, label %712

701:                                              ; preds = %683
  %702 = load i32, ptr %56, align 4, !tbaa !8
  %703 = sext i32 %702 to i64
  %704 = getelementptr inbounds [1010 x i32], ptr @q, i64 0, i64 %703
  %705 = load i32, ptr %704, align 4, !tbaa !8
  %706 = load i32, ptr %57, align 4, !tbaa !8
  %707 = sub nsw i32 %706, 1
  %708 = sext i32 %707 to i64
  %709 = getelementptr inbounds [1010 x i32], ptr @q, i64 0, i64 %708
  %710 = load i32, ptr %709, align 4, !tbaa !8
  %711 = sub nsw i32 %705, %710
  br label %717

712:                                              ; preds = %683
  %713 = load i32, ptr %56, align 4, !tbaa !8
  %714 = sext i32 %713 to i64
  %715 = getelementptr inbounds [1010 x i32], ptr @q, i64 0, i64 %714
  %716 = load i32, ptr %715, align 4, !tbaa !8
  br label %717

717:                                              ; preds = %712, %701
  %718 = phi i32 [ %711, %701 ], [ %716, %712 ]
  %719 = load i32, ptr %55, align 4, !tbaa !8
  %720 = sext i32 %719 to i64
  %721 = getelementptr inbounds [1010 x i32], ptr @ba, i64 0, i64 %720
  %722 = load i32, ptr %721, align 4, !tbaa !8
  %723 = add nsw i32 %722, %718
  store i32 %723, ptr %721, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %57) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %56) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %55) #7
  store i32 0, ptr %9, align 4
  br label %724

724:                                              ; preds = %717, %682
  call void @llvm.lifetime.end.p0(i64 4, ptr %54) #7
  %725 = load i32, ptr %9, align 4
  switch i32 %725, label %862 [
    i32 0, label %726
    i32 54, label %727
  ]

726:                                              ; preds = %724
  br label %727

727:                                              ; preds = %726, %724
  %728 = load i32, ptr %53, align 4, !tbaa !8
  %729 = add nsw i32 %728, 1
  store i32 %729, ptr %53, align 4, !tbaa !8
  br label %647, !llvm.loop !30

730:                                              ; preds = %654
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %50) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %50) #7
  br label %731

731:                                              ; preds = %730
  %732 = load i32, ptr %49, align 4, !tbaa !8
  %733 = add nsw i32 %732, 1
  store i32 %733, ptr %49, align 4, !tbaa !8
  br label %624, !llvm.loop !31

734:                                              ; preds = %668, %667
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %50) #7
  br label %735

735:                                              ; preds = %734, %655
  call void @llvm.lifetime.end.p0(i64 32, ptr %50) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #7
  br label %851

736:                                              ; preds = %628
  call void @llvm.lifetime.start.p0(i64 4, ptr %58) #7
  store i32 0, ptr %58, align 4, !tbaa !8
  br label %737

737:                                              ; preds = %748, %736
  %738 = load i32, ptr %58, align 4, !tbaa !8
  %739 = load i32, ptr %2, align 4, !tbaa !8
  %740 = icmp slt i32 %738, %739
  br i1 %740, label %742, label %741

741:                                              ; preds = %737
  store i32 55, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %58) #7
  br label %755

742:                                              ; preds = %737
  %743 = load i32, ptr %58, align 4, !tbaa !8
  %744 = load i32, ptr %58, align 4, !tbaa !8
  %745 = sext i32 %744 to i64
  %746 = getelementptr inbounds [1010 x i32], ptr @ba, i64 0, i64 %745
  invoke void @_Z2trIiJiEEvT_DpRKT0_(i32 noundef %743, ptr noundef nonnull align 4 dereferenceable(4) %746)
          to label %747 unwind label %751

747:                                              ; preds = %742
  br label %748

748:                                              ; preds = %747
  %749 = load i32, ptr %58, align 4, !tbaa !8
  %750 = add nsw i32 %749, 1
  store i32 %750, ptr %58, align 4, !tbaa !8
  br label %737, !llvm.loop !32

751:                                              ; preds = %742
  %752 = landingpad { ptr, i32 }
          cleanup
  %753 = extractvalue { ptr, i32 } %752, 0
  store ptr %753, ptr %14, align 8
  %754 = extractvalue { ptr, i32 } %752, 1
  store i32 %754, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %58) #7
  br label %851

755:                                              ; preds = %741
  call void @llvm.memset.p0.i64(ptr align 16 @z3, i8 0, i64 4080400, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %59) #7
  store i32 1, ptr %59, align 4, !tbaa !8
  br label %756

756:                                              ; preds = %840, %755
  %757 = load i32, ptr %59, align 4, !tbaa !8
  %758 = load i32, ptr %4, align 4, !tbaa !8
  %759 = icmp sle i32 %757, %758
  br i1 %759, label %761, label %760

760:                                              ; preds = %756
  store i32 58, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %59) #7
  br label %845

761:                                              ; preds = %756
  call void @llvm.lifetime.start.p0(i64 32, ptr %60) #7
  %762 = load i32, ptr %4, align 4, !tbaa !8
  %763 = load i32, ptr %59, align 4, !tbaa !8
  %764 = sub nsw i32 %762, %763
  %765 = sext i32 %764 to i64
  %766 = load i32, ptr %59, align 4, !tbaa !8
  %767 = sext i32 %766 to i64
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %60, ptr noundef nonnull align 8 dereferenceable(32) @_Z1cB5cxx11, i64 noundef %765, i64 noundef %767)
          to label %768 unwind label %787

768:                                              ; preds = %761
  call void @llvm.lifetime.start.p0(i64 32, ptr %61) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %62) #7
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %62, ptr noundef nonnull align 8 dereferenceable(32) %60, ptr noundef @.str)
          to label %769 unwind label %791

769:                                              ; preds = %768
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %61, ptr noundef nonnull align 8 dereferenceable(32) %62, ptr noundef nonnull align 8 dereferenceable(32) %19)
          to label %770 unwind label %795

770:                                              ; preds = %769
  %771 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %60, ptr noundef nonnull align 8 dereferenceable(32) %61) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %61) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %62) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %62) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %61) #7
  %772 = load i32, ptr %59, align 4, !tbaa !8
  %773 = sext i32 %772 to i64
  %774 = getelementptr inbounds [1010 x [1010 x i32]], ptr @z3, i64 0, i64 %773
  %775 = getelementptr inbounds [1010 x i32], ptr %774, i64 0, i64 0
  invoke void @_Z7build_zRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPi(ptr noundef nonnull align 8 dereferenceable(32) %60, ptr noundef %775)
          to label %776 unwind label %800

776:                                              ; preds = %770
  call void @llvm.lifetime.start.p0(i64 4, ptr %63) #7
  %777 = load i32, ptr %59, align 4, !tbaa !8
  %778 = add nsw i32 %777, 1
  store i32 %778, ptr %63, align 4, !tbaa !8
  br label %779

779:                                              ; preds = %836, %776
  %780 = load i32, ptr %63, align 4, !tbaa !8
  %781 = load i32, ptr %59, align 4, !tbaa !8
  %782 = load i32, ptr %2, align 4, !tbaa !8
  %783 = add nsw i32 %781, %782
  %784 = add nsw i32 %783, 1
  %785 = icmp slt i32 %780, %784
  br i1 %785, label %804, label %786

786:                                              ; preds = %779
  store i32 61, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %63) #7
  br label %839

787:                                              ; preds = %761
  %788 = landingpad { ptr, i32 }
          cleanup
  %789 = extractvalue { ptr, i32 } %788, 0
  store ptr %789, ptr %14, align 8
  %790 = extractvalue { ptr, i32 } %788, 1
  store i32 %790, ptr %15, align 4
  br label %844

791:                                              ; preds = %768
  %792 = landingpad { ptr, i32 }
          cleanup
  %793 = extractvalue { ptr, i32 } %792, 0
  store ptr %793, ptr %14, align 8
  %794 = extractvalue { ptr, i32 } %792, 1
  store i32 %794, ptr %15, align 4
  br label %799

795:                                              ; preds = %769
  %796 = landingpad { ptr, i32 }
          cleanup
  %797 = extractvalue { ptr, i32 } %796, 0
  store ptr %797, ptr %14, align 8
  %798 = extractvalue { ptr, i32 } %796, 1
  store i32 %798, ptr %15, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %62) #7
  br label %799

799:                                              ; preds = %795, %791
  call void @llvm.lifetime.end.p0(i64 32, ptr %62) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %61) #7
  br label %843

800:                                              ; preds = %770
  %801 = landingpad { ptr, i32 }
          cleanup
  %802 = extractvalue { ptr, i32 } %801, 0
  store ptr %802, ptr %14, align 8
  %803 = extractvalue { ptr, i32 } %801, 1
  store i32 %803, ptr %15, align 4
  br label %843

804:                                              ; preds = %779
  call void @llvm.lifetime.start.p0(i64 4, ptr %64) #7
  %805 = load i32, ptr %59, align 4, !tbaa !8
  %806 = sext i32 %805 to i64
  %807 = getelementptr inbounds [1010 x [1010 x i32]], ptr @z3, i64 0, i64 %806
  %808 = load i32, ptr %63, align 4, !tbaa !8
  %809 = sext i32 %808 to i64
  %810 = getelementptr inbounds [1010 x i32], ptr %807, i64 0, i64 %809
  %811 = load i32, ptr %810, align 4, !tbaa !8
  store i32 %811, ptr %64, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %65) #7
  %812 = load i32, ptr %2, align 4, !tbaa !8
  %813 = sub nsw i32 %812, 1
  %814 = load i32, ptr %63, align 4, !tbaa !8
  %815 = load i32, ptr %59, align 4, !tbaa !8
  %816 = sub nsw i32 %814, %815
  %817 = sub nsw i32 %816, 1
  %818 = sub nsw i32 %813, %817
  store i32 %818, ptr %65, align 4, !tbaa !8
  %819 = load i32, ptr %65, align 4, !tbaa !8
  %820 = add nsw i32 %819, 1
  %821 = load i32, ptr %2, align 4, !tbaa !8
  %822 = icmp slt i32 %820, %821
  br i1 %822, label %823, label %835

823:                                              ; preds = %804
  %824 = load i32, ptr %65, align 4, !tbaa !8
  %825 = add nsw i32 %824, 1
  %826 = sext i32 %825 to i64
  %827 = getelementptr inbounds [1010 x i32], ptr @ba, i64 0, i64 %826
  %828 = load i32, ptr %827, align 4, !tbaa !8
  %829 = sext i32 %828 to i64
  %830 = load i32, ptr %64, align 4, !tbaa !8
  %831 = sext i32 %830 to i64
  %832 = mul nsw i64 %829, %831
  %833 = load i64, ptr %6, align 8, !tbaa !11
  %834 = add nsw i64 %833, %832
  store i64 %834, ptr %6, align 8, !tbaa !11
  br label %835

835:                                              ; preds = %823, %804
  call void @llvm.lifetime.end.p0(i64 4, ptr %65) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %64) #7
  br label %836

836:                                              ; preds = %835
  %837 = load i32, ptr %63, align 4, !tbaa !8
  %838 = add nsw i32 %837, 1
  store i32 %838, ptr %63, align 4, !tbaa !8
  br label %779, !llvm.loop !33

839:                                              ; preds = %786
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %60) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %60) #7
  br label %840

840:                                              ; preds = %839
  %841 = load i32, ptr %59, align 4, !tbaa !8
  %842 = add nsw i32 %841, 1
  store i32 %842, ptr %59, align 4, !tbaa !8
  br label %756, !llvm.loop !34

843:                                              ; preds = %800, %799
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %60) #7
  br label %844

844:                                              ; preds = %843, %787
  call void @llvm.lifetime.end.p0(i64 32, ptr %60) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %59) #7
  br label %851

845:                                              ; preds = %760
  %846 = load i64, ptr %6, align 8, !tbaa !11
  %847 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %846)
          to label %848 unwind label %251

848:                                              ; preds = %845
  %849 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %847, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %850 unwind label %251

850:                                              ; preds = %848
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %78, !llvm.loop !35

851:                                              ; preds = %844, %751, %735, %565, %481, %319, %251
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  br label %852

852:                                              ; preds = %851, %247
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #7
  br label %853

853:                                              ; preds = %852, %243
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #7
  br label %854

854:                                              ; preds = %853, %239
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #7
  br label %855

855:                                              ; preds = %854, %235
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %857

856:                                              ; preds = %78
  ret i32 0

857:                                              ; preds = %855
  %858 = load ptr, ptr %14, align 8
  %859 = load i32, ptr %15, align 4
  %860 = insertvalue { ptr, i32 } poison, ptr %858, 0
  %861 = insertvalue { ptr, i32 } %860, i32 %859, 1
  resume { ptr, i32 } %861

862:                                              ; preds = %724, %470
  unreachable
}

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

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvT_SA_(ptr, ptr) #1

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), i64 noundef, i64 noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2trIPKcJxEEvT_DpRKT0_(ptr noundef, ptr noundef nonnull align 8 dereferenceable(8)) #0

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

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

attributes #0 = { 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 #1 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !10, i64 0}
!13 = !{!10, !10, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}
!19 = distinct !{!19, !15}
!20 = distinct !{!20, !15}
!21 = distinct !{!21, !15}
!22 = distinct !{!22, !15}
!23 = distinct !{!23, !15}
!24 = distinct !{!24, !15}
!25 = distinct !{!25, !15}
!26 = distinct !{!26, !15}
!27 = distinct !{!27, !15}
!28 = distinct !{!28, !15}
!29 = distinct !{!29, !15}
!30 = distinct !{!30, !15}
!31 = distinct !{!31, !15}
!32 = distinct !{!32, !15}
!33 = distinct !{!33, !15}
!34 = distinct !{!34, !15}
!35 = distinct !{!35, !15}


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

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

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@t = external dso_local global i32, align 4
@_Z1aB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_Z1bB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_Z1cB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@p = external dso_local local_unnamed_addr global [1010 x [1010 x i32]], align 16
@q = external dso_local local_unnamed_addr global [1010 x i32], align 16
@z1 = external dso_local global [1010 x [1010 x i32]], align 16
@z2 = external dso_local global [1010 x [1010 x i32]], align 16
@z3 = external dso_local global [1010 x [1010 x i32]], align 16
@bc = external dso_local local_unnamed_addr global [1010 x i32], align 16
@ba = external dso_local global [1010 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %21 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %22 = getelementptr i8, ptr %21, i64 -24
  %23 = load i64, ptr %22, align 8
  %24 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %23
  %25 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %24, ptr noundef null)
  %26 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %27 = getelementptr i8, ptr %26, i64 -24
  %28 = load i64, ptr %27, align 8
  %29 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %28
  %30 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %29, ptr noundef null)
  %31 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @t)
  %32 = load i32, ptr @t, align 4, !tbaa !8
  %33 = add nsw i32 %32, -1
  store i32 %33, ptr @t, align 4, !tbaa !8
  %.not372 = icmp eq i32 %32, 0
  br i1 %.not372, label %._crit_edge375, label %.lr.ph374

.lr.ph374:                                        ; preds = %0, %443
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) @_Z1aB5cxx11)
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) %34, ptr noundef nonnull align 8 dereferenceable(32) @_Z1bB5cxx11)
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) %35, ptr noundef nonnull align 8 dereferenceable(32) @_Z1cB5cxx11)
  %37 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1aB5cxx11) #8
  %38 = trunc i64 %37 to i32
  %39 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1bB5cxx11) #8
  %40 = trunc i64 %39 to i32
  %41 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1cB5cxx11) #8
  %42 = trunc i64 %41 to i32
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4080400) @p, i8 0, i64 4080400, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #8
  store i64 0, ptr %1, align 8, !tbaa !11
  %43 = icmp sgt i32 %40, 0
  br i1 %43, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %.lr.ph374
  %44 = and i64 %39, 2147483647
  %wide.trip.count = and i64 %39, 2147483647
  br label %.lr.ph

.preheader283:                                    ; preds = %59
  %.not238288 = icmp slt i32 %40, 3
  br i1 %.not238288, label %._crit_edge, label %.preheader.preheader

.preheader.preheader:                             ; preds = %.preheader283
  %45 = and i64 %39, 2147483647
  %46 = add nuw nsw i64 %39, 1
  %wide.trip.count387 = and i64 %46, 4294967295
  br label %.preheader

.lr.ph:                                           ; preds = %.lr.ph.preheader, %59
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %59 ]
  %.0285 = phi i64 [ 0, %.lr.ph.preheader ], [ %.1, %59 ]
  %47 = getelementptr inbounds [1010 x [1010 x i32]], ptr @p, i64 0, i64 %indvars.iv, i64 %indvars.iv
  store i32 1, ptr %47, align 4, !tbaa !8
  %48 = add nsw i64 %.0285, 1
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %49 = icmp ult i64 %indvars.iv.next, %44
  br i1 %49, label %50, label %59

50:                                               ; preds = %.lr.ph
  %51 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1bB5cxx11, i64 noundef %indvars.iv)
  %52 = load i8, ptr %51, align 1, !tbaa !13
  %53 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1bB5cxx11, i64 noundef %indvars.iv.next)
  %54 = load i8, ptr %53, align 1, !tbaa !13
  %55 = icmp eq i8 %52, %54
  br i1 %55, label %56, label %59

56:                                               ; preds = %50
  %57 = getelementptr inbounds [1010 x [1010 x i32]], ptr @p, i64 0, i64 %indvars.iv, i64 %indvars.iv.next
  store i32 1, ptr %57, align 4, !tbaa !8
  %58 = add nsw i64 %.0285, 2
  br label %59

59:                                               ; preds = %.lr.ph, %50, %56
  %.1 = phi i64 [ %58, %56 ], [ %48, %50 ], [ %48, %.lr.ph ]
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader283, label %.lr.ph, !llvm.loop !14

.preheader:                                       ; preds = %.preheader.preheader, %62
  %indvars.iv384 = phi i64 [ 3, %.preheader.preheader ], [ %indvars.iv.next385, %62 ]
  %.2290 = phi i64 [ %.1, %.preheader.preheader ], [ %.4, %62 ]
  %invariant.op = sub nsw i64 %45, %indvars.iv384
  br label %63

._crit_edge:                                      ; preds = %62, %.lr.ph374, %.preheader283
  %.2.lcssa = phi i64 [ %.1, %.preheader283 ], [ 0, %.lr.ph374 ], [ %.4, %62 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(32) @_Z1cB5cxx11)
  %60 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #8
  %61 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #8
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvT_SA_(ptr %60, ptr %61)
          to label %80 unwind label %94

62:                                               ; preds = %._crit_edge476
  %indvars.iv.next385 = add nuw nsw i64 %indvars.iv384, 1
  %exitcond388.not = icmp eq i64 %indvars.iv.next385, %wide.trip.count387
  br i1 %exitcond388.not, label %._crit_edge, label %.preheader, !llvm.loop !16

63:                                               ; preds = %.preheader, %._crit_edge476
  %indvars.iv381 = phi i64 [ 0, %.preheader ], [ %71, %._crit_edge476 ]
  %.3287 = phi i64 [ %.2290, %.preheader ], [ %.4, %._crit_edge476 ]
  %64 = add nuw nsw i64 %indvars.iv381, %indvars.iv384
  %65 = add nsw i64 %64, -1
  %66 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1bB5cxx11, i64 noundef %indvars.iv381)
  %67 = load i8, ptr %66, align 1, !tbaa !13
  %68 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1bB5cxx11, i64 noundef %65)
  %69 = load i8, ptr %68, align 1, !tbaa !13
  %70 = icmp eq i8 %67, %69
  %71 = add nuw nsw i64 %indvars.iv381, 1
  br i1 %70, label %72, label %._crit_edge476

72:                                               ; preds = %63
  %73 = add nsw i64 %64, -2
  %74 = getelementptr inbounds [1010 x [1010 x i32]], ptr @p, i64 0, i64 %71, i64 %73
  %75 = load i32, ptr %74, align 4, !tbaa !8
  %76 = icmp eq i32 %75, 1
  br i1 %76, label %77, label %._crit_edge476

77:                                               ; preds = %72
  %78 = getelementptr inbounds [1010 x [1010 x i32]], ptr @p, i64 0, i64 %indvars.iv381, i64 %65
  store i32 1, ptr %78, align 4, !tbaa !8
  %79 = add nsw i64 %.3287, 1
  br label %._crit_edge476

._crit_edge476:                                   ; preds = %63, %72, %77
  %.4 = phi i64 [ %.3287, %72 ], [ %79, %77 ], [ %.3287, %63 ]
  %.not278.not = icmp slt i64 %indvars.iv381, %invariant.op
  br i1 %.not278.not, label %63, label %62, !llvm.loop !17

80:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(32) @_Z1bB5cxx11)
          to label %81 unwind label %96

81:                                               ; preds = %80
  %82 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  %83 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvT_SA_(ptr %82, ptr %83)
          to label %84 unwind label %98

84:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) @_Z1aB5cxx11)
          to label %85 unwind label %100

85:                                               ; preds = %84
  %86 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  %87 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvT_SA_(ptr %86, ptr %87)
          to label %88 unwind label %102

88:                                               ; preds = %85
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4080400) @z1, i8 0, i64 4080400, i1 false)
  %.not239297 = icmp sgt i32 %38, 0
  br i1 %.not239297, label %.lr.ph300.preheader, label %._crit_edge301

.lr.ph300.preheader:                              ; preds = %88
  %89 = and i64 %37, 2147483647
  %sext = shl i64 %41, 32
  %90 = ashr exact i64 %sext, 32
  %91 = add nuw nsw i64 %37, 1
  %wide.trip.count397 = and i64 %91, 4294967295
  %.not277292 = icmp slt i32 %42, 1
  %92 = add nsw i64 %90, 1
  %93 = add nsw i64 %90, 1
  %broadcast.splatinsert553 = insertelement <2 x i64> poison, i64 %.2.lcssa, i64 0
  %broadcast.splat554 = shufflevector <2 x i64> %broadcast.splatinsert553, <2 x i64> poison, <2 x i32> zeroinitializer
  br label %.lr.ph300

._crit_edge301:                                   ; preds = %136, %88
  invoke void @_Z2trIPKcJxEEvT_DpRKT0_(ptr noundef nonnull @.str.4, ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %155 unwind label %102

94:                                               ; preds = %._crit_edge
  %95 = landingpad { ptr, i32 }
          cleanup
  br label %450

96:                                               ; preds = %80
  %97 = landingpad { ptr, i32 }
          cleanup
  br label %449

98:                                               ; preds = %81
  %99 = landingpad { ptr, i32 }
          cleanup
  br label %448

100:                                              ; preds = %84
  %101 = landingpad { ptr, i32 }
          cleanup
  br label %447

102:                                              ; preds = %441, %._crit_edge371, %._crit_edge336, %._crit_edge301, %85
  %103 = landingpad { ptr, i32 }
          cleanup
  br label %446

.lr.ph300:                                        ; preds = %.lr.ph300.preheader, %136
  %indvar534 = phi i64 [ 0, %.lr.ph300.preheader ], [ %indvar.next535, %136 ]
  %indvars.iv394 = phi i64 [ 1, %.lr.ph300.preheader ], [ %indvars.iv.next395, %136 ]
  %indvars.iv389 = phi i64 [ 2, %.lr.ph300.preheader ], [ %indvars.iv.next390, %136 ]
  %104 = add i64 %93, %indvar534
  %sext559 = shl i64 %indvars.iv389, 32
  %105 = ashr exact i64 %sext559, 32
  %smax537 = call i64 @llvm.smax.i64(i64 %104, i64 %105)
  %106 = add i64 %smax537, 1
  %107 = sub i64 %106, %105
  %108 = add i64 %92, %indvar534
  %109 = trunc i64 %indvars.iv389 to i32
  %sext560 = shl i64 %indvars.iv389, 32
  %110 = ashr exact i64 %sext560, 32
  %smax536 = call i64 @llvm.smax.i64(i64 %108, i64 %110)
  %111 = sub i64 %smax536, %110
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #8
  %112 = sub nsw i64 %89, %indvars.iv394
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5, ptr noundef nonnull align 8 dereferenceable(32) @_Z1aB5cxx11, i64 noundef %112, i64 noundef %indvars.iv394)
          to label %113 unwind label %137

113:                                              ; preds = %.lr.ph300
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #8
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str)
          to label %114 unwind label %139

114:                                              ; preds = %113
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6, ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %115 unwind label %141

115:                                              ; preds = %114
  %116 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %6) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #8
  %117 = getelementptr inbounds [1010 x [1010 x i32]], ptr @z1, i64 0, i64 %indvars.iv394
  invoke void @_Z7build_zRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPi(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull %117)
          to label %118 unwind label %144

118:                                              ; preds = %115
  %indvars.iv.next395 = add nuw nsw i64 %indvars.iv394, 1
  %119 = add nsw i64 %indvars.iv394, %90
  br i1 %.not277292, label %136, label %.lr.ph295.preheader

.lr.ph295.preheader:                              ; preds = %118
  %.promoted = load i64, ptr %1, align 8, !tbaa !11
  %min.iters.check540 = icmp ult i64 %107, 8
  br i1 %min.iters.check540, label %.lr.ph295.preheader566, label %vector.scevcheck533

.lr.ph295.preheader566:                           ; preds = %middle.block538, %vector.scevcheck533, %.lr.ph295.preheader
  %indvars.iv391.ph = phi i64 [ %indvars.iv389, %vector.scevcheck533 ], [ %indvars.iv389, %.lr.ph295.preheader ], [ %ind.end544, %middle.block538 ]
  %.ph567 = phi i64 [ %.promoted, %vector.scevcheck533 ], [ %.promoted, %.lr.ph295.preheader ], [ %135, %middle.block538 ]
  br label %.lr.ph295

vector.scevcheck533:                              ; preds = %.lr.ph295.preheader
  %120 = trunc i64 %111 to i32
  %121 = add i32 %109, %120
  %122 = icmp slt i32 %121, %109
  %123 = icmp ugt i64 %111, 4294967295
  %124 = or i1 %122, %123
  br i1 %124, label %.lr.ph295.preheader566, label %vector.ph541

vector.ph541:                                     ; preds = %vector.scevcheck533
  %n.vec543 = and i64 %107, -4
  %ind.end544 = add i64 %indvars.iv389, %n.vec543
  %125 = insertelement <2 x i64> <i64 poison, i64 0>, i64 %.promoted, i64 0
  br label %vector.body546

vector.body546:                                   ; preds = %vector.body546, %vector.ph541
  %index547 = phi i64 [ 0, %vector.ph541 ], [ %index.next555, %vector.body546 ]
  %vec.phi548 = phi <2 x i64> [ %125, %vector.ph541 ], [ %132, %vector.body546 ]
  %vec.phi549 = phi <2 x i64> [ zeroinitializer, %vector.ph541 ], [ %133, %vector.body546 ]
  %offset.idx550 = add i64 %indvars.iv389, %index547
  %126 = getelementptr inbounds [1010 x [1010 x i32]], ptr @z1, i64 0, i64 %indvars.iv394, i64 %offset.idx550
  %127 = getelementptr inbounds i8, ptr %126, i64 8
  %wide.load551 = load <2 x i32>, ptr %126, align 4, !tbaa !8
  %wide.load552 = load <2 x i32>, ptr %127, align 4, !tbaa !8
  %128 = sext <2 x i32> %wide.load551 to <2 x i64>
  %129 = sext <2 x i32> %wide.load552 to <2 x i64>
  %130 = mul nsw <2 x i64> %broadcast.splat554, %128
  %131 = mul nsw <2 x i64> %broadcast.splat554, %129
  %132 = add <2 x i64> %130, %vec.phi548
  %133 = add <2 x i64> %131, %vec.phi549
  %index.next555 = add nuw i64 %index547, 4
  %134 = icmp eq i64 %index.next555, %n.vec543
  br i1 %134, label %middle.block538, label %vector.body546, !llvm.loop !18

middle.block538:                                  ; preds = %vector.body546
  %bin.rdx556 = add <2 x i64> %133, %132
  %135 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx556)
  %cmp.n557 = icmp eq i64 %107, %n.vec543
  br i1 %cmp.n557, label %._crit_edge296, label %.lr.ph295.preheader566

._crit_edge296:                                   ; preds = %.lr.ph295, %middle.block538
  %.lcssa = phi i64 [ %135, %middle.block538 ], [ %151, %.lr.ph295 ]
  store i64 %.lcssa, ptr %1, align 8, !tbaa !11
  br label %136

136:                                              ; preds = %._crit_edge296, %118
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #8
  %indvars.iv.next390 = add nuw i64 %indvars.iv389, 1
  %exitcond398.not = icmp eq i64 %indvars.iv.next395, %wide.trip.count397
  %indvar.next535 = add i64 %indvar534, 1
  br i1 %exitcond398.not, label %._crit_edge301, label %.lr.ph300, !llvm.loop !21

137:                                              ; preds = %.lr.ph300
  %138 = landingpad { ptr, i32 }
          cleanup
  br label %154

139:                                              ; preds = %113
  %140 = landingpad { ptr, i32 }
          cleanup
  br label %143

141:                                              ; preds = %114
  %142 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #8
  br label %143

143:                                              ; preds = %141, %139
  %.pn267 = phi { ptr, i32 } [ %142, %141 ], [ %140, %139 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #8
  br label %153

144:                                              ; preds = %115
  %145 = landingpad { ptr, i32 }
          cleanup
  br label %153

.lr.ph295:                                        ; preds = %.lr.ph295.preheader566, %.lr.ph295
  %indvars.iv391 = phi i64 [ %indvars.iv.next392, %.lr.ph295 ], [ %indvars.iv391.ph, %.lr.ph295.preheader566 ]
  %146 = phi i64 [ %151, %.lr.ph295 ], [ %.ph567, %.lr.ph295.preheader566 ]
  %147 = getelementptr inbounds [1010 x [1010 x i32]], ptr @z1, i64 0, i64 %indvars.iv394, i64 %indvars.iv391
  %148 = load i32, ptr %147, align 4, !tbaa !8
  %149 = sext i32 %148 to i64
  %150 = mul nsw i64 %.2.lcssa, %149
  %151 = add nsw i64 %150, %146
  %indvars.iv.next392 = add nuw nsw i64 %indvars.iv391, 1
  %sext478 = shl i64 %indvars.iv391, 32
  %152 = ashr exact i64 %sext478, 32
  %.not277.not = icmp slt i64 %152, %119
  br i1 %.not277.not, label %.lr.ph295, label %._crit_edge296, !llvm.loop !22

153:                                              ; preds = %144, %143
  %.pn269 = phi { ptr, i32 } [ %145, %144 ], [ %.pn267, %143 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  br label %154

154:                                              ; preds = %153, %137
  %.pn269.pn = phi { ptr, i32 } [ %.pn269, %153 ], [ %138, %137 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #8
  br label %446

155:                                              ; preds = %._crit_edge301
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4040) @q, i8 0, i64 4040, i1 false)
  br i1 %43, label %.lr.ph309.preheader, label %._crit_edge314.thread

.lr.ph309.preheader:                              ; preds = %155
  %156 = and i64 %39, 2147483647
  %wide.trip.count409 = and i64 %39, 2147483647
  br label %.lr.ph309

..loopexit_crit_edge:                             ; preds = %.lr.ph304, %middle.block514
  %.lcssa493 = phi i32 [ %167, %middle.block514 ], [ %171, %.lr.ph304 ]
  store i32 %.lcssa493, ptr %160, align 4, !tbaa !8
  br label %.loopexit

.loopexit:                                        ; preds = %..loopexit_crit_edge, %.lr.ph309
  %indvars.iv.next400 = add nuw nsw i64 %indvars.iv399, 1
  %exitcond410.not = icmp eq i64 %indvars.iv.next407, %wide.trip.count409
  br i1 %exitcond410.not, label %._crit_edge310, label %.lr.ph309, !llvm.loop !23

._crit_edge310:                                   ; preds = %.loopexit
  br i1 %43, label %.lr.ph313.preheader, label %._crit_edge314.thread

.lr.ph313.preheader:                              ; preds = %._crit_edge310
  %157 = and i64 %39, 2147483647
  %.phi.trans.insert = getelementptr inbounds [1010 x i32], ptr @q, i64 0, i64 %157
  %.pre = load i32, ptr %.phi.trans.insert, align 4, !tbaa !8
  br label %.lr.ph313

.lr.ph309:                                        ; preds = %.lr.ph309.preheader, %.loopexit
  %indvars.iv406 = phi i64 [ 0, %.lr.ph309.preheader ], [ %indvars.iv.next407, %.loopexit ]
  %indvars.iv399 = phi i64 [ 1, %.lr.ph309.preheader ], [ %indvars.iv.next400, %.loopexit ]
  %158 = xor i64 %indvars.iv406, -1
  %159 = add nsw i64 %wide.trip.count409, %158
  %160 = getelementptr inbounds [1010 x i32], ptr @q, i64 0, i64 %indvars.iv406
  store i32 1, ptr %160, align 4, !tbaa !8
  %indvars.iv.next407 = add nuw nsw i64 %indvars.iv406, 1
  %161 = icmp ult i64 %indvars.iv.next407, %156
  br i1 %161, label %.lr.ph304.preheader, label %.loopexit

.lr.ph304.preheader:                              ; preds = %.lr.ph309
  %min.iters.check516 = icmp ult i64 %159, 8
  br i1 %min.iters.check516, label %.lr.ph304.preheader564, label %vector.ph517

vector.ph517:                                     ; preds = %.lr.ph304.preheader
  %n.vec519 = and i64 %159, -8
  %ind.end520 = add i64 %indvars.iv399, %n.vec519
  br label %vector.body522

vector.body522:                                   ; preds = %vector.body522, %vector.ph517
  %index523 = phi i64 [ 0, %vector.ph517 ], [ %index.next529, %vector.body522 ]
  %vec.phi524 = phi <4 x i32> [ <i32 1, i32 0, i32 0, i32 0>, %vector.ph517 ], [ %164, %vector.body522 ]
  %vec.phi525 = phi <4 x i32> [ zeroinitializer, %vector.ph517 ], [ %165, %vector.body522 ]
  %offset.idx526 = add i64 %indvars.iv399, %index523
  %162 = getelementptr inbounds [1010 x [1010 x i32]], ptr @p, i64 0, i64 %indvars.iv.next407, i64 %offset.idx526
  %163 = getelementptr inbounds i8, ptr %162, i64 16
  %wide.load527 = load <4 x i32>, ptr %162, align 4, !tbaa !8
  %wide.load528 = load <4 x i32>, ptr %163, align 4, !tbaa !8
  %164 = add <4 x i32> %vec.phi524, %wide.load527
  %165 = add <4 x i32> %vec.phi525, %wide.load528
  %index.next529 = add nuw i64 %index523, 8
  %166 = icmp eq i64 %index.next529, %n.vec519
  br i1 %166, label %middle.block514, label %vector.body522, !llvm.loop !24

middle.block514:                                  ; preds = %vector.body522
  %bin.rdx530 = add <4 x i32> %165, %164
  %167 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx530)
  %cmp.n531 = icmp eq i64 %159, %n.vec519
  br i1 %cmp.n531, label %..loopexit_crit_edge, label %.lr.ph304.preheader564

.lr.ph304.preheader564:                           ; preds = %middle.block514, %.lr.ph304.preheader
  %indvars.iv401.ph = phi i64 [ %indvars.iv399, %.lr.ph304.preheader ], [ %ind.end520, %middle.block514 ]
  %.ph565 = phi i32 [ 1, %.lr.ph304.preheader ], [ %167, %middle.block514 ]
  br label %.lr.ph304

.lr.ph304:                                        ; preds = %.lr.ph304.preheader564, %.lr.ph304
  %indvars.iv401 = phi i64 [ %indvars.iv.next402, %.lr.ph304 ], [ %indvars.iv401.ph, %.lr.ph304.preheader564 ]
  %168 = phi i32 [ %171, %.lr.ph304 ], [ %.ph565, %.lr.ph304.preheader564 ]
  %169 = getelementptr inbounds [1010 x [1010 x i32]], ptr @p, i64 0, i64 %indvars.iv.next407, i64 %indvars.iv401
  %170 = load i32, ptr %169, align 4, !tbaa !8
  %171 = add nsw i32 %168, %170
  %indvars.iv.next402 = add nuw nsw i64 %indvars.iv401, 1
  %exitcond405.not = icmp eq i64 %indvars.iv.next402, %wide.trip.count409
  br i1 %exitcond405.not, label %..loopexit_crit_edge, label %.lr.ph304, !llvm.loop !25

._crit_edge314.thread:                            ; preds = %._crit_edge310, %155
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4080400) @z2, i8 0, i64 4080400, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4040) @bc, i8 0, i64 4040, i1 false)
  br label %._crit_edge324

._crit_edge314:                                   ; preds = %.lr.ph313
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4080400) @z2, i8 0, i64 4080400, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4040) @bc, i8 0, i64 4040, i1 false)
  %172 = and i64 %39, 2147483647
  %sext479 = shl i64 %41, 32
  %173 = ashr exact i64 %sext479, 32
  %174 = add nuw nsw i64 %39, 1
  %wide.trip.count422 = and i64 %174, 4294967295
  %.not266315 = icmp slt i32 %42, 1
  br label %.lr.ph323

.lr.ph313:                                        ; preds = %.lr.ph313.preheader, %.lr.ph313
  %175 = phi i32 [ %.pre, %.lr.ph313.preheader ], [ %178, %.lr.ph313 ]
  %indvars.iv411 = phi i64 [ %157, %.lr.ph313.preheader ], [ %indvars.iv.next412, %.lr.ph313 ]
  %indvars.iv.next412 = add nsw i64 %indvars.iv411, -1
  %176 = getelementptr inbounds [1010 x i32], ptr @q, i64 0, i64 %indvars.iv.next412
  %177 = load i32, ptr %176, align 4, !tbaa !8
  %178 = add nsw i32 %177, %175
  store i32 %178, ptr %176, align 4, !tbaa !8
  %179 = icmp ugt i64 %indvars.iv411, 1
  br i1 %179, label %.lr.ph313, label %._crit_edge314, !llvm.loop !26

._crit_edge324:                                   ; preds = %._crit_edge319, %._crit_edge314.thread
  %.not240320488 = phi i1 [ true, %._crit_edge314.thread ], [ false, %._crit_edge319 ]
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4080400) @z3, i8 0, i64 4080400, i1 false)
  %.not241332 = icmp slt i32 %42, 1
  br i1 %.not241332, label %._crit_edge336, label %.lr.ph335.preheader

.lr.ph335.preheader:                              ; preds = %._crit_edge324
  %180 = and i64 %41, 2147483647
  %sext481 = shl i64 %37, 32
  %181 = ashr exact i64 %sext481, 32
  %182 = add nuw nsw i64 %41, 1
  %wide.trip.count432 = and i64 %182, 4294967295
  %183 = add nsw i64 %181, 1
  %184 = add nsw i64 %181, 1
  br label %.lr.ph335

.lr.ph323:                                        ; preds = %._crit_edge314, %._crit_edge319
  %indvars.iv419 = phi i64 [ 1, %._crit_edge314 ], [ %indvars.iv.next420, %._crit_edge319 ]
  %indvars.iv414 = phi i32 [ 2, %._crit_edge314 ], [ %indvars.iv.next415, %._crit_edge319 ]
  %185 = sext i32 %indvars.iv414 to i64
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #8
  %186 = sub nsw i64 %172, %indvars.iv419
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull align 8 dereferenceable(32) @_Z1bB5cxx11, i64 noundef %186, i64 noundef %indvars.iv419)
          to label %187 unwind label %196

187:                                              ; preds = %.lr.ph323
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #8
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull @.str)
          to label %188 unwind label %198

188:                                              ; preds = %187
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %9, ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %189 unwind label %200

189:                                              ; preds = %188
  %190 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %9) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #8
  %191 = getelementptr inbounds [1010 x [1010 x i32]], ptr @z2, i64 0, i64 %indvars.iv419
  invoke void @_Z7build_zRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPi(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull %191)
          to label %192 unwind label %203

192:                                              ; preds = %189
  %indvars.iv.next420 = add nuw nsw i64 %indvars.iv419, 1
  %193 = add nsw i64 %indvars.iv419, %173
  br i1 %.not266315, label %._crit_edge319, label %.lr.ph318

.lr.ph318:                                        ; preds = %192
  %194 = add i64 %indvars.iv419, %41
  %195 = getelementptr inbounds [1010 x i32], ptr @q, i64 0, i64 %186
  br label %205

._crit_edge319:                                   ; preds = %221, %192
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #8
  %indvars.iv.next415 = add nuw i32 %indvars.iv414, 1
  %exitcond423.not = icmp eq i64 %indvars.iv.next420, %wide.trip.count422
  br i1 %exitcond423.not, label %._crit_edge324, label %.lr.ph323, !llvm.loop !27

196:                                              ; preds = %.lr.ph323
  %197 = landingpad { ptr, i32 }
          cleanup
  br label %223

198:                                              ; preds = %187
  %199 = landingpad { ptr, i32 }
          cleanup
  br label %202

200:                                              ; preds = %188
  %201 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #8
  br label %202

202:                                              ; preds = %200, %198
  %.pn261 = phi { ptr, i32 } [ %201, %200 ], [ %199, %198 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #8
  br label %222

203:                                              ; preds = %189
  %204 = landingpad { ptr, i32 }
          cleanup
  br label %222

205:                                              ; preds = %.lr.ph318, %221
  %indvars.iv416 = phi i64 [ %185, %.lr.ph318 ], [ %indvars.iv.next417, %221 ]
  %206 = getelementptr inbounds [1010 x [1010 x i32]], ptr @z2, i64 0, i64 %indvars.iv419, i64 %indvars.iv416
  %207 = load i32, ptr %206, align 4, !tbaa !8
  %208 = icmp eq i32 %207, 0
  br i1 %208, label %221, label %209

209:                                              ; preds = %205
  %210 = sub i64 %194, %indvars.iv416
  %211 = sext i32 %207 to i64
  %212 = add nsw i64 %186, %211
  %213 = load i32, ptr %195, align 4, !tbaa !8
  %214 = getelementptr inbounds [1010 x i32], ptr @q, i64 0, i64 %212
  %215 = load i32, ptr %214, align 4, !tbaa !8
  %216 = sub i32 %213, %215
  %sext480 = shl i64 %210, 32
  %217 = ashr exact i64 %sext480, 32
  %218 = getelementptr inbounds [1010 x i32], ptr @bc, i64 0, i64 %217
  %219 = load i32, ptr %218, align 4, !tbaa !8
  %220 = add nsw i32 %216, %219
  store i32 %220, ptr %218, align 4, !tbaa !8
  br label %221

221:                                              ; preds = %205, %209
  %indvars.iv.next417 = add nuw nsw i64 %indvars.iv416, 1
  %.not266.not = icmp slt i64 %indvars.iv416, %193
  br i1 %.not266.not, label %205, label %._crit_edge319, !llvm.loop !28

222:                                              ; preds = %203, %202
  %.pn263 = phi { ptr, i32 } [ %204, %203 ], [ %.pn261, %202 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #8
  br label %223

223:                                              ; preds = %222, %196
  %.pn263.pn = phi { ptr, i32 } [ %.pn263, %222 ], [ %197, %196 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #8
  br label %446

._crit_edge336:                                   ; preds = %._crit_edge330, %._crit_edge324
  invoke void @_Z2trIPKcJxEEvT_DpRKT0_(ptr noundef nonnull @.str.4, ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %279 unwind label %102

.lr.ph335:                                        ; preds = %.lr.ph335.preheader, %._crit_edge330
  %indvar = phi i64 [ 0, %.lr.ph335.preheader ], [ %indvar.next, %._crit_edge330 ]
  %indvars.iv429 = phi i64 [ 1, %.lr.ph335.preheader ], [ %indvars.iv.next430, %._crit_edge330 ]
  %indvars.iv424 = phi i64 [ 2, %.lr.ph335.preheader ], [ %indvars.iv.next425, %._crit_edge330 ]
  %224 = add i64 %184, %indvar
  %sext561 = shl i64 %indvars.iv424, 32
  %225 = ashr exact i64 %sext561, 32
  %smax497 = call i64 @llvm.smax.i64(i64 %224, i64 %225)
  %226 = add i64 %smax497, 1
  %227 = sub i64 %226, %225
  %228 = add i64 %183, %indvar
  %229 = trunc i64 %indvars.iv424 to i32
  %sext562 = shl i64 %indvars.iv424, 32
  %230 = ashr exact i64 %sext562, 32
  %smax = call i64 @llvm.smax.i64(i64 %228, i64 %230)
  %231 = sub i64 %smax, %230
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #8
  %232 = sub nsw i64 %180, %indvars.iv429
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %11, ptr noundef nonnull align 8 dereferenceable(32) @_Z1cB5cxx11, i64 noundef %232, i64 noundef %indvars.iv429)
          to label %233 unwind label %268

233:                                              ; preds = %.lr.ph335
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #8
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %13, ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull @.str)
          to label %234 unwind label %270

234:                                              ; preds = %233
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %12, ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %235 unwind label %272

235:                                              ; preds = %234
  %236 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(32) %12) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #8
  %237 = getelementptr inbounds [1010 x [1010 x i32]], ptr @z3, i64 0, i64 %indvars.iv429
  invoke void @_Z7build_zRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPi(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull %237)
          to label %238 unwind label %275

238:                                              ; preds = %235
  %indvars.iv.next430 = add nuw nsw i64 %indvars.iv429, 1
  %239 = add nsw i64 %indvars.iv429, %181
  %240 = icmp sgt i64 %232, 0
  %or.cond = and i1 %.not239297, %240
  br i1 %or.cond, label %.lr.ph329.split.us, label %._crit_edge330

.lr.ph329.split.us:                               ; preds = %238
  %.promoted325 = load i64, ptr %1, align 8, !tbaa !11
  %241 = add nsw i64 %232, -1
  %242 = getelementptr inbounds [1010 x i32], ptr @bc, i64 0, i64 %241
  %243 = load i32, ptr %242, align 4, !tbaa !8
  %244 = sext i32 %243 to i64
  %min.iters.check500 = icmp ult i64 %227, 8
  br i1 %min.iters.check500, label %scalar.ph499.preheader, label %vector.scevcheck

vector.scevcheck:                                 ; preds = %.lr.ph329.split.us
  %245 = trunc i64 %231 to i32
  %246 = add i32 %229, %245
  %247 = icmp slt i32 %246, %229
  %248 = icmp ugt i64 %231, 4294967295
  %249 = or i1 %247, %248
  br i1 %249, label %scalar.ph499.preheader, label %vector.ph501

vector.ph501:                                     ; preds = %vector.scevcheck
  %n.vec503 = and i64 %227, -4
  %ind.end = add i64 %indvars.iv424, %n.vec503
  %250 = insertelement <2 x i64> <i64 poison, i64 0>, i64 %.promoted325, i64 0
  %broadcast.splatinsert = insertelement <2 x i64> poison, i64 %244, i64 0
  %broadcast.splat = shufflevector <2 x i64> %broadcast.splatinsert, <2 x i64> poison, <2 x i32> zeroinitializer
  br label %vector.body505

vector.body505:                                   ; preds = %vector.body505, %vector.ph501
  %index506 = phi i64 [ 0, %vector.ph501 ], [ %index.next510, %vector.body505 ]
  %vec.phi507 = phi <2 x i64> [ %250, %vector.ph501 ], [ %257, %vector.body505 ]
  %vec.phi508 = phi <2 x i64> [ zeroinitializer, %vector.ph501 ], [ %258, %vector.body505 ]
  %offset.idx = add i64 %indvars.iv424, %index506
  %251 = getelementptr inbounds [1010 x [1010 x i32]], ptr @z3, i64 0, i64 %indvars.iv429, i64 %offset.idx
  %252 = getelementptr inbounds i8, ptr %251, i64 8
  %wide.load = load <2 x i32>, ptr %251, align 4, !tbaa !8
  %wide.load509 = load <2 x i32>, ptr %252, align 4, !tbaa !8
  %253 = sext <2 x i32> %wide.load to <2 x i64>
  %254 = sext <2 x i32> %wide.load509 to <2 x i64>
  %255 = mul nsw <2 x i64> %broadcast.splat, %253
  %256 = mul nsw <2 x i64> %broadcast.splat, %254
  %257 = add <2 x i64> %255, %vec.phi507
  %258 = add <2 x i64> %256, %vec.phi508
  %index.next510 = add nuw i64 %index506, 4
  %259 = icmp eq i64 %index.next510, %n.vec503
  br i1 %259, label %middle.block498, label %vector.body505, !llvm.loop !29

middle.block498:                                  ; preds = %vector.body505
  %bin.rdx511 = add <2 x i64> %258, %257
  %260 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx511)
  %cmp.n512 = icmp eq i64 %227, %n.vec503
  br i1 %cmp.n512, label %._crit_edge330.split.us, label %scalar.ph499.preheader

scalar.ph499.preheader:                           ; preds = %middle.block498, %vector.scevcheck, %.lr.ph329.split.us
  %indvars.iv426.ph = phi i64 [ %indvars.iv424, %vector.scevcheck ], [ %indvars.iv424, %.lr.ph329.split.us ], [ %ind.end, %middle.block498 ]
  %.ph563 = phi i64 [ %.promoted325, %vector.scevcheck ], [ %.promoted325, %.lr.ph329.split.us ], [ %260, %middle.block498 ]
  br label %scalar.ph499

scalar.ph499:                                     ; preds = %scalar.ph499.preheader, %scalar.ph499
  %indvars.iv426 = phi i64 [ %indvars.iv.next427, %scalar.ph499 ], [ %indvars.iv426.ph, %scalar.ph499.preheader ]
  %261 = phi i64 [ %266, %scalar.ph499 ], [ %.ph563, %scalar.ph499.preheader ]
  %262 = getelementptr inbounds [1010 x [1010 x i32]], ptr @z3, i64 0, i64 %indvars.iv429, i64 %indvars.iv426
  %263 = load i32, ptr %262, align 4, !tbaa !8
  %264 = sext i32 %263 to i64
  %265 = mul nsw i64 %244, %264
  %266 = add nsw i64 %265, %261
  %indvars.iv.next427 = add nuw nsw i64 %indvars.iv426, 1
  %sext482 = shl i64 %indvars.iv426, 32
  %267 = ashr exact i64 %sext482, 32
  %.not260.us.not = icmp slt i64 %267, %239
  br i1 %.not260.us.not, label %scalar.ph499, label %._crit_edge330.split.us, !llvm.loop !30

._crit_edge330.split.us:                          ; preds = %scalar.ph499, %middle.block498
  %.lcssa494 = phi i64 [ %260, %middle.block498 ], [ %266, %scalar.ph499 ]
  store i64 %.lcssa494, ptr %1, align 8, !tbaa !11
  br label %._crit_edge330

._crit_edge330:                                   ; preds = %._crit_edge330.split.us, %238
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #8
  %indvars.iv.next425 = add nuw i64 %indvars.iv424, 1
  %exitcond433.not = icmp eq i64 %indvars.iv.next430, %wide.trip.count432
  %indvar.next = add i64 %indvar, 1
  br i1 %exitcond433.not, label %._crit_edge336, label %.lr.ph335, !llvm.loop !31

268:                                              ; preds = %.lr.ph335
  %269 = landingpad { ptr, i32 }
          cleanup
  br label %278

270:                                              ; preds = %233
  %271 = landingpad { ptr, i32 }
          cleanup
  br label %274

272:                                              ; preds = %234
  %273 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #8
  br label %274

274:                                              ; preds = %272, %270
  %.pn255 = phi { ptr, i32 } [ %273, %272 ], [ %271, %270 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #8
  br label %277

275:                                              ; preds = %235
  %276 = landingpad { ptr, i32 }
          cleanup
  br label %277

277:                                              ; preds = %275, %274
  %.pn257 = phi { ptr, i32 } [ %276, %275 ], [ %.pn255, %274 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #8
  br label %278

278:                                              ; preds = %277, %268
  %.pn257.pn = phi { ptr, i32 } [ %.pn257, %277 ], [ %269, %268 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #8
  br label %446

279:                                              ; preds = %._crit_edge336
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4040) @q, i8 0, i64 4040, i1 false)
  br i1 %43, label %.lr.ph345.preheader, label %._crit_edge348

.lr.ph345.preheader:                              ; preds = %279
  %wide.trip.count442 = and i64 %39, 2147483647
  br label %.lr.ph345

.preheader282:                                    ; preds = %320
  %.not492 = icmp eq i32 %40, 1
  br i1 %.not492, label %._crit_edge348, label %.lr.ph347.preheader

.lr.ph347.preheader:                              ; preds = %.preheader282
  %.pre475 = load i32, ptr @q, align 16, !tbaa !8
  %280 = add nsw i64 %wide.trip.count442, -1
  %281 = add nsw i64 %wide.trip.count442, -2
  %xtraiter = and i64 %280, 3
  %282 = icmp ult i64 %281, 3
  br i1 %282, label %._crit_edge348.loopexit.unr-lcssa, label %.lr.ph347.preheader.new

.lr.ph347.preheader.new:                          ; preds = %.lr.ph347.preheader
  %unroll_iter = and i64 %280, -4
  br label %.lr.ph347

.lr.ph345:                                        ; preds = %.lr.ph345.preheader, %320
  %indvars.iv439 = phi i64 [ 0, %.lr.ph345.preheader ], [ %indvars.iv.next440, %320 ]
  %283 = getelementptr inbounds [1010 x i32], ptr @q, i64 0, i64 %indvars.iv439
  store i32 1, ptr %283, align 4, !tbaa !8
  %.not376 = icmp eq i64 %indvars.iv439, 0
  br i1 %.not376, label %320, label %.lr.ph339

.lr.ph339:                                        ; preds = %.lr.ph345
  %284 = add nsw i64 %indvars.iv439, -1
  %min.iters.check = icmp ult i64 %indvars.iv439, 8
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph339
  %indvars.iv434.ph = phi i64 [ 0, %.lr.ph339 ], [ %n.vec, %middle.block ]
  %.ph = phi i32 [ 1, %.lr.ph339 ], [ %319, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph339
  %n.vec = and i64 %indvars.iv439, 9223372036854775800
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ <i32 1, i32 0, i32 0, i32 0>, %vector.ph ], [ %316, %vector.body ]
  %vec.phi496 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %317, %vector.body ]
  %285 = or disjoint i64 %index, 1
  %286 = or disjoint i64 %index, 2
  %287 = or disjoint i64 %index, 3
  %288 = or disjoint i64 %index, 4
  %289 = or disjoint i64 %index, 5
  %290 = or disjoint i64 %index, 6
  %291 = or disjoint i64 %index, 7
  %292 = getelementptr inbounds [1010 x [1010 x i32]], ptr @p, i64 0, i64 %index, i64 %284
  %293 = getelementptr inbounds [1010 x [1010 x i32]], ptr @p, i64 0, i64 %285, i64 %284
  %294 = getelementptr inbounds [1010 x [1010 x i32]], ptr @p, i64 0, i64 %286, i64 %284
  %295 = getelementptr inbounds [1010 x [1010 x i32]], ptr @p, i64 0, i64 %287, i64 %284
  %296 = getelementptr inbounds [1010 x [1010 x i32]], ptr @p, i64 0, i64 %288, i64 %284
  %297 = getelementptr inbounds [1010 x [1010 x i32]], ptr @p, i64 0, i64 %289, i64 %284
  %298 = getelementptr inbounds [1010 x [1010 x i32]], ptr @p, i64 0, i64 %290, i64 %284
  %299 = getelementptr inbounds [1010 x [1010 x i32]], ptr @p, i64 0, i64 %291, i64 %284
  %300 = load i32, ptr %292, align 4, !tbaa !8
  %301 = load i32, ptr %293, align 4, !tbaa !8
  %302 = load i32, ptr %294, align 4, !tbaa !8
  %303 = load i32, ptr %295, align 4, !tbaa !8
  %304 = insertelement <4 x i32> poison, i32 %300, i64 0
  %305 = insertelement <4 x i32> %304, i32 %301, i64 1
  %306 = insertelement <4 x i32> %305, i32 %302, i64 2
  %307 = insertelement <4 x i32> %306, i32 %303, i64 3
  %308 = load i32, ptr %296, align 4, !tbaa !8
  %309 = load i32, ptr %297, align 4, !tbaa !8
  %310 = load i32, ptr %298, align 4, !tbaa !8
  %311 = load i32, ptr %299, align 4, !tbaa !8
  %312 = insertelement <4 x i32> poison, i32 %308, i64 0
  %313 = insertelement <4 x i32> %312, i32 %309, i64 1
  %314 = insertelement <4 x i32> %313, i32 %310, i64 2
  %315 = insertelement <4 x i32> %314, i32 %311, i64 3
  %316 = add <4 x i32> %vec.phi, %307
  %317 = add <4 x i32> %vec.phi496, %315
  %index.next = add nuw i64 %index, 8
  %318 = icmp eq i64 %index.next, %n.vec
  br i1 %318, label %middle.block, label %vector.body, !llvm.loop !32

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %317, %316
  %319 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i64 %indvars.iv439, %n.vec
  br i1 %cmp.n, label %._crit_edge340, label %scalar.ph.preheader

._crit_edge340:                                   ; preds = %scalar.ph, %middle.block
  %.lcssa495 = phi i32 [ %319, %middle.block ], [ %324, %scalar.ph ]
  store i32 %.lcssa495, ptr %283, align 4, !tbaa !8
  br label %320

320:                                              ; preds = %._crit_edge340, %.lr.ph345
  %indvars.iv.next440 = add nuw nsw i64 %indvars.iv439, 1
  %exitcond443.not = icmp eq i64 %indvars.iv.next440, %wide.trip.count442
  br i1 %exitcond443.not, label %.preheader282, label %.lr.ph345, !llvm.loop !33

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv434 = phi i64 [ %indvars.iv.next435, %scalar.ph ], [ %indvars.iv434.ph, %scalar.ph.preheader ]
  %321 = phi i32 [ %324, %scalar.ph ], [ %.ph, %scalar.ph.preheader ]
  %322 = getelementptr inbounds [1010 x [1010 x i32]], ptr @p, i64 0, i64 %indvars.iv434, i64 %284
  %323 = load i32, ptr %322, align 4, !tbaa !8
  %324 = add nsw i32 %321, %323
  %indvars.iv.next435 = add nuw nsw i64 %indvars.iv434, 1
  %exitcond438.not = icmp eq i64 %indvars.iv.next435, %indvars.iv439
  br i1 %exitcond438.not, label %._crit_edge340, label %scalar.ph, !llvm.loop !34

._crit_edge348.loopexit.unr-lcssa:                ; preds = %.lr.ph347, %.lr.ph347.preheader
  %.unr = phi i32 [ %.pre475, %.lr.ph347.preheader ], [ %344, %.lr.ph347 ]
  %indvars.iv444.unr = phi i64 [ 1, %.lr.ph347.preheader ], [ %indvars.iv.next445.3, %.lr.ph347 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge348, label %.lr.ph347.epil

.lr.ph347.epil:                                   ; preds = %._crit_edge348.loopexit.unr-lcssa, %.lr.ph347.epil
  %325 = phi i32 [ %328, %.lr.ph347.epil ], [ %.unr, %._crit_edge348.loopexit.unr-lcssa ]
  %indvars.iv444.epil = phi i64 [ %indvars.iv.next445.epil, %.lr.ph347.epil ], [ %indvars.iv444.unr, %._crit_edge348.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph347.epil ], [ 0, %._crit_edge348.loopexit.unr-lcssa ]
  %326 = getelementptr inbounds [1010 x i32], ptr @q, i64 0, i64 %indvars.iv444.epil
  %327 = load i32, ptr %326, align 4, !tbaa !8
  %328 = add nsw i32 %327, %325
  store i32 %328, ptr %326, align 4, !tbaa !8
  %indvars.iv.next445.epil = add nuw nsw i64 %indvars.iv444.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge348, label %.lr.ph347.epil, !llvm.loop !35

._crit_edge348:                                   ; preds = %._crit_edge348.loopexit.unr-lcssa, %.lr.ph347.epil, %279, %.preheader282
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4080400) @z2, i8 0, i64 4080400, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4040) @ba, i8 0, i64 4040, i1 false)
  br i1 %.not239297, label %.lr.ph357.preheader, label %._crit_edge360

.lr.ph357.preheader:                              ; preds = %._crit_edge348
  %329 = and i64 %37, 2147483647
  %sext483 = shl i64 %39, 32
  %330 = ashr exact i64 %sext483, 32
  %331 = add nuw nsw i64 %37, 1
  %wide.trip.count458 = and i64 %331, 4294967295
  br label %.lr.ph357

.lr.ph347:                                        ; preds = %.lr.ph347, %.lr.ph347.preheader.new
  %332 = phi i32 [ %.pre475, %.lr.ph347.preheader.new ], [ %344, %.lr.ph347 ]
  %indvars.iv444 = phi i64 [ 1, %.lr.ph347.preheader.new ], [ %indvars.iv.next445.3, %.lr.ph347 ]
  %niter = phi i64 [ 0, %.lr.ph347.preheader.new ], [ %niter.next.3, %.lr.ph347 ]
  %333 = getelementptr inbounds [1010 x i32], ptr @q, i64 0, i64 %indvars.iv444
  %334 = load i32, ptr %333, align 4, !tbaa !8
  %335 = add nsw i32 %334, %332
  store i32 %335, ptr %333, align 4, !tbaa !8
  %indvars.iv.next445 = add nuw nsw i64 %indvars.iv444, 1
  %336 = getelementptr inbounds [1010 x i32], ptr @q, i64 0, i64 %indvars.iv.next445
  %337 = load i32, ptr %336, align 4, !tbaa !8
  %338 = add nsw i32 %337, %335
  store i32 %338, ptr %336, align 4, !tbaa !8
  %indvars.iv.next445.1 = add nuw nsw i64 %indvars.iv444, 2
  %339 = getelementptr inbounds [1010 x i32], ptr @q, i64 0, i64 %indvars.iv.next445.1
  %340 = load i32, ptr %339, align 4, !tbaa !8
  %341 = add nsw i32 %340, %338
  store i32 %341, ptr %339, align 4, !tbaa !8
  %indvars.iv.next445.2 = add nuw nsw i64 %indvars.iv444, 3
  %342 = getelementptr inbounds [1010 x i32], ptr @q, i64 0, i64 %indvars.iv.next445.2
  %343 = load i32, ptr %342, align 4, !tbaa !8
  %344 = add nsw i32 %343, %341
  store i32 %344, ptr %342, align 4, !tbaa !8
  %indvars.iv.next445.3 = add nuw nsw i64 %indvars.iv444, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge348.loopexit.unr-lcssa, label %.lr.ph347, !llvm.loop !37

.lr.ph359.preheader:                              ; preds = %._crit_edge353
  %wide.trip.count463 = and i64 %37, 2147483647
  br label %.lr.ph359

.lr.ph357:                                        ; preds = %.lr.ph357.preheader, %._crit_edge353
  %indvars.iv454 = phi i64 [ 1, %.lr.ph357.preheader ], [ %indvars.iv.next455, %._crit_edge353 ]
  %indvars.iv449 = phi i32 [ 2, %.lr.ph357.preheader ], [ %indvars.iv.next450, %._crit_edge353 ]
  %345 = sext i32 %indvars.iv449 to i64
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #8
  %346 = sub nsw i64 %329, %indvars.iv454
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %14, ptr noundef nonnull align 8 dereferenceable(32) @_Z1aB5cxx11, i64 noundef %346, i64 noundef %indvars.iv454)
          to label %347 unwind label %357

347:                                              ; preds = %.lr.ph357
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %16) #8
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %16, ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull @.str)
          to label %348 unwind label %359

348:                                              ; preds = %347
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %15, ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %349 unwind label %361

349:                                              ; preds = %348
  %350 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(32) %15) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #8
  %351 = getelementptr inbounds [1010 x [1010 x i32]], ptr @z2, i64 0, i64 %indvars.iv454
  invoke void @_Z7build_zRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPi(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull %351)
          to label %352 unwind label %364

352:                                              ; preds = %349
  %indvars.iv.next455 = add nuw nsw i64 %indvars.iv454, 1
  %353 = add nsw i64 %indvars.iv454, %330
  br i1 %.not240320488, label %._crit_edge353, label %.lr.ph352

.lr.ph352:                                        ; preds = %352
  %354 = add i64 %indvars.iv454, %39
  %355 = getelementptr inbounds [1010 x i32], ptr @ba, i64 0, i64 %346
  %356 = trunc i64 %354 to i32
  br label %366

._crit_edge353:                                   ; preds = %387, %352
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #8
  %indvars.iv.next450 = add nuw i32 %indvars.iv449, 1
  %exitcond459.not = icmp eq i64 %indvars.iv.next455, %wide.trip.count458
  br i1 %exitcond459.not, label %.lr.ph359.preheader, label %.lr.ph357, !llvm.loop !38

357:                                              ; preds = %.lr.ph357
  %358 = landingpad { ptr, i32 }
          cleanup
  br label %389

359:                                              ; preds = %347
  %360 = landingpad { ptr, i32 }
          cleanup
  br label %363

361:                                              ; preds = %348
  %362 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #8
  br label %363

363:                                              ; preds = %361, %359
  %.pn249 = phi { ptr, i32 } [ %362, %361 ], [ %360, %359 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #8
  br label %388

364:                                              ; preds = %349
  %365 = landingpad { ptr, i32 }
          cleanup
  br label %388

366:                                              ; preds = %.lr.ph352, %387
  %indvars.iv451 = phi i64 [ %345, %.lr.ph352 ], [ %indvars.iv.next452, %387 ]
  %367 = getelementptr inbounds [1010 x [1010 x i32]], ptr @z2, i64 0, i64 %indvars.iv454, i64 %indvars.iv451
  %368 = load i32, ptr %367, align 4, !tbaa !8
  %369 = icmp eq i32 %368, 0
  br i1 %369, label %387, label %370

370:                                              ; preds = %366
  %371 = trunc nsw i64 %indvars.iv451 to i32
  %372 = sub i32 %356, %371
  %373 = sub nsw i32 %372, %368
  %374 = icmp sgt i32 %373, -1
  %375 = sext i32 %372 to i64
  %376 = getelementptr inbounds [1010 x i32], ptr @q, i64 0, i64 %375
  %377 = load i32, ptr %376, align 4, !tbaa !8
  br i1 %374, label %378, label %383

378:                                              ; preds = %370
  %379 = zext nneg i32 %373 to i64
  %380 = getelementptr inbounds [1010 x i32], ptr @q, i64 0, i64 %379
  %381 = load i32, ptr %380, align 4, !tbaa !8
  %382 = sub nsw i32 %377, %381
  br label %383

383:                                              ; preds = %370, %378
  %384 = phi i32 [ %382, %378 ], [ %377, %370 ]
  %385 = load i32, ptr %355, align 4, !tbaa !8
  %386 = add nsw i32 %385, %384
  store i32 %386, ptr %355, align 4, !tbaa !8
  br label %387

387:                                              ; preds = %366, %383
  %indvars.iv.next452 = add nuw nsw i64 %indvars.iv451, 1
  %.not254.not = icmp slt i64 %indvars.iv451, %353
  br i1 %.not254.not, label %366, label %._crit_edge353, !llvm.loop !39

388:                                              ; preds = %364, %363
  %.pn251 = phi { ptr, i32 } [ %365, %364 ], [ %.pn249, %363 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #8
  br label %389

389:                                              ; preds = %388, %357
  %.pn251.pn = phi { ptr, i32 } [ %.pn251, %388 ], [ %358, %357 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #8
  br label %446

._crit_edge360:                                   ; preds = %396, %._crit_edge348
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4080400) @z3, i8 0, i64 4080400, i1 false)
  br i1 %.not241332, label %._crit_edge371, label %.lr.ph370

.lr.ph370:                                        ; preds = %._crit_edge360
  %390 = add i32 %38, 1
  %391 = and i64 %41, 2147483647
  %sext484 = shl i64 %37, 32
  %392 = ashr exact i64 %sext484, 32
  %393 = add nuw nsw i64 %41, 1
  %wide.trip.count473 = and i64 %393, 4294967295
  br label %401

.lr.ph359:                                        ; preds = %.lr.ph359.preheader, %396
  %indvars.iv460 = phi i64 [ 0, %.lr.ph359.preheader ], [ %indvars.iv.next461, %396 ]
  %394 = getelementptr inbounds [1010 x i32], ptr @ba, i64 0, i64 %indvars.iv460
  %395 = trunc nuw nsw i64 %indvars.iv460 to i32
  invoke void @_Z2trIiJiEEvT_DpRKT0_(i32 noundef %395, ptr noundef nonnull align 4 dereferenceable(4) %394)
          to label %396 unwind label %397

396:                                              ; preds = %.lr.ph359
  %indvars.iv.next461 = add nuw nsw i64 %indvars.iv460, 1
  %exitcond464.not = icmp eq i64 %indvars.iv.next461, %wide.trip.count463
  br i1 %exitcond464.not, label %._crit_edge360, label %.lr.ph359, !llvm.loop !40

397:                                              ; preds = %.lr.ph359
  %398 = landingpad { ptr, i32 }
          cleanup
  br label %446

._crit_edge371:                                   ; preds = %._crit_edge366, %._crit_edge360
  %399 = load i64, ptr %1, align 8, !tbaa !11
  %400 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %399)
          to label %441 unwind label %102

401:                                              ; preds = %.lr.ph370, %._crit_edge366
  %indvars.iv470 = phi i64 [ 1, %.lr.ph370 ], [ %indvars.iv.next471, %._crit_edge366 ]
  %indvars.iv465 = phi i32 [ 2, %.lr.ph370 ], [ %indvars.iv.next466, %._crit_edge366 ]
  %402 = sext i32 %indvars.iv465 to i64
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %17) #8
  %403 = sub nsw i64 %391, %indvars.iv470
  invoke void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %17, ptr noundef nonnull align 8 dereferenceable(32) @_Z1cB5cxx11, i64 noundef %403, i64 noundef %indvars.iv470)
          to label %404 unwind label %413

404:                                              ; preds = %401
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %18) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %19) #8
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %19, ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull @.str)
          to label %405 unwind label %415

405:                                              ; preds = %404
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %18, ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %406 unwind label %417

406:                                              ; preds = %405
  %407 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(32) %18) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %18) #8
  %408 = getelementptr inbounds [1010 x [1010 x i32]], ptr @z3, i64 0, i64 %indvars.iv470
  invoke void @_Z7build_zRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPi(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull %408)
          to label %409 unwind label %420

409:                                              ; preds = %406
  %indvars.iv.next471 = add nuw nsw i64 %indvars.iv470, 1
  %410 = add nsw i64 %indvars.iv470, %392
  br i1 %.not239297, label %.lr.ph365, label %._crit_edge366

.lr.ph365:                                        ; preds = %409
  %.promoted361 = load i64, ptr %1, align 8, !tbaa !11
  %411 = trunc nuw nsw i64 %indvars.iv470 to i32
  %412 = add i32 %390, %411
  br label %422

._crit_edge366:                                   ; preds = %437, %409
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %17) #8
  %indvars.iv.next466 = add nuw i32 %indvars.iv465, 1
  %exitcond474.not = icmp eq i64 %indvars.iv.next471, %wide.trip.count473
  br i1 %exitcond474.not, label %._crit_edge371, label %401, !llvm.loop !41

413:                                              ; preds = %401
  %414 = landingpad { ptr, i32 }
          cleanup
  br label %440

415:                                              ; preds = %404
  %416 = landingpad { ptr, i32 }
          cleanup
  br label %419

417:                                              ; preds = %405
  %418 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #8
  br label %419

419:                                              ; preds = %417, %415
  %.pn = phi { ptr, i32 } [ %418, %417 ], [ %416, %415 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %18) #8
  br label %439

420:                                              ; preds = %406
  %421 = landingpad { ptr, i32 }
          cleanup
  br label %439

422:                                              ; preds = %.lr.ph365, %437
  %indvars.iv467 = phi i64 [ %402, %.lr.ph365 ], [ %indvars.iv.next468, %437 ]
  %423 = phi i64 [ %.promoted361, %.lr.ph365 ], [ %438, %437 ]
  %424 = trunc nsw i64 %indvars.iv467 to i32
  %425 = sub i32 %412, %424
  %426 = icmp slt i32 %425, %38
  br i1 %426, label %427, label %437

427:                                              ; preds = %422
  %428 = getelementptr inbounds [1010 x [1010 x i32]], ptr @z3, i64 0, i64 %indvars.iv470, i64 %indvars.iv467
  %429 = load i32, ptr %428, align 4, !tbaa !8
  %430 = sext i32 %425 to i64
  %431 = getelementptr inbounds [1010 x i32], ptr @ba, i64 0, i64 %430
  %432 = load i32, ptr %431, align 4, !tbaa !8
  %433 = sext i32 %432 to i64
  %434 = sext i32 %429 to i64
  %435 = mul nsw i64 %433, %434
  %436 = add nsw i64 %435, %423
  store i64 %436, ptr %1, align 8, !tbaa !11
  br label %437

437:                                              ; preds = %427, %422
  %438 = phi i64 [ %436, %427 ], [ %423, %422 ]
  %indvars.iv.next468 = add nuw nsw i64 %indvars.iv467, 1
  %.not248.not = icmp slt i64 %indvars.iv467, %410
  br i1 %.not248.not, label %422, label %._crit_edge366, !llvm.loop !42

439:                                              ; preds = %420, %419
  %.pn245 = phi { ptr, i32 } [ %421, %420 ], [ %.pn, %419 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #8
  br label %440

440:                                              ; preds = %439, %413
  %.pn245.pn = phi { ptr, i32 } [ %.pn245, %439 ], [ %414, %413 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %17) #8
  br label %446

441:                                              ; preds = %._crit_edge371
  %442 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %400, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %443 unwind label %102

443:                                              ; preds = %441
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #8
  %444 = load i32, ptr @t, align 4, !tbaa !8
  %445 = add nsw i32 %444, -1
  store i32 %445, ptr @t, align 4, !tbaa !8
  %.not = icmp eq i32 %444, 0
  br i1 %.not, label %._crit_edge375, label %.lr.ph374, !llvm.loop !43

446:                                              ; preds = %440, %397, %389, %278, %223, %154, %102
  %.pn269.pn.pn = phi { ptr, i32 } [ %.pn269.pn, %154 ], [ %.pn263.pn, %223 ], [ %.pn257.pn, %278 ], [ %.pn251.pn, %389 ], [ %398, %397 ], [ %.pn245.pn, %440 ], [ %103, %102 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  br label %447

447:                                              ; preds = %446, %100
  %.pn269.pn.pn.pn = phi { ptr, i32 } [ %.pn269.pn.pn, %446 ], [ %101, %100 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #8
  br label %448

448:                                              ; preds = %447, %98
  %.pn269.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn269.pn.pn.pn, %447 ], [ %99, %98 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  br label %449

449:                                              ; preds = %448, %96
  %.pn269.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn269.pn.pn.pn.pn, %448 ], [ %97, %96 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #8
  br label %450

450:                                              ; preds = %449, %94
  %.pn269.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn269.pn.pn.pn.pn.pn, %449 ], [ %95, %94 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn269.pn.pn.pn.pn.pn.pn

._crit_edge375:                                   ; preds = %443, %0
  ret i32 0
}

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

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

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 #5

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 #5

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvT_SA_(ptr, ptr) local_unnamed_addr #1

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare void @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), i64 noundef, i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2trIPKcJxEEvT_DpRKT0_(ptr noundef, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #7

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #7

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>) #7

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !10, i64 0}
!13 = !{!10, !10, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15, !19, !20}
!19 = !{!"llvm.loop.isvectorized", i32 1}
!20 = !{!"llvm.loop.unroll.runtime.disable"}
!21 = distinct !{!21, !15}
!22 = distinct !{!22, !15, !19}
!23 = distinct !{!23, !15}
!24 = distinct !{!24, !15, !19, !20}
!25 = distinct !{!25, !15, !20, !19}
!26 = distinct !{!26, !15}
!27 = distinct !{!27, !15}
!28 = distinct !{!28, !15}
!29 = distinct !{!29, !15, !19, !20}
!30 = distinct !{!30, !15, !19}
!31 = distinct !{!31, !15}
!32 = distinct !{!32, !15, !19, !20}
!33 = distinct !{!33, !15}
!34 = distinct !{!34, !15, !20, !19}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.unroll.disable"}
!37 = distinct !{!37, !15}
!38 = distinct !{!38, !15}
!39 = distinct !{!39, !15}
!40 = distinct !{!40, !15}
!41 = distinct !{!41, !15}
!42 = distinct !{!42, !15}
!43 = distinct !{!43, !15}


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