; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/308 Division 2/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::__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.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@_Z1sB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@l = external dso_local global i32, align 4
@v1 = external dso_local global [6000 x i64], align 16
@v2 = external dso_local global [6000 x i64], align 16
@p1 = external dso_local global [6000 x i64], align 16
@s1 = external dso_local global [6000 x i64], align 16
@p2 = external dso_local global [6000 x i64], align 16
@s2 = external dso_local global [6000 x i64], align 16
@v = external dso_local global i64, align 8
@p = external dso_local global i64, align 8
@mx = external dso_local global i64, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %13 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %14 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %15 = getelementptr i8, ptr %14, i64 -24
  %16 = load i64, ptr %15, align 8
  %17 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %16
  %18 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %17, ptr noundef null)
  %19 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %20 = getelementptr i8, ptr %19, i64 -24
  %21 = load i64, ptr %20, align 8
  %22 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %21
  %23 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %22, ptr noundef null)
  %24 = 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) @_Z1sB5cxx11)
  %25 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11) #7
  %26 = trunc i64 %25 to i32
  store i32 %26, ptr @l, align 4, !tbaa !8
  %27 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef 0)
  %28 = load i8, ptr %27, align 1, !tbaa !11
  %29 = sext i8 %28 to i32
  %30 = sub nsw i32 %29, 48
  %31 = sext i32 %30 to i64
  store i64 %31, ptr @v1, align 16, !tbaa !12
  %32 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef 0)
  %33 = load i8, ptr %32, align 1, !tbaa !11
  %34 = sext i8 %33 to i32
  %35 = sub nsw i32 %34, 48
  %36 = sext i32 %35 to i64
  store i64 %36, ptr @p1, align 16, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 2, ptr %2, align 4, !tbaa !8
  br label %37

37:                                               ; preds = %107, %0
  %38 = load i32, ptr %2, align 4, !tbaa !8
  %39 = load i32, ptr @l, align 4, !tbaa !8
  %40 = icmp slt i32 %38, %39
  br i1 %40, label %42, label %41

41:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %110

42:                                               ; preds = %37
  %43 = load i32, ptr %2, align 4, !tbaa !8
  %44 = sub nsw i32 %43, 1
  %45 = sext i32 %44 to i64
  %46 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %45)
  %47 = load i8, ptr %46, align 1, !tbaa !11
  %48 = sext i8 %47 to i32
  %49 = icmp eq i32 %48, 43
  br i1 %49, label %50, label %69

50:                                               ; preds = %42
  %51 = load i32, ptr %2, align 4, !tbaa !8
  %52 = sub nsw i32 %51, 2
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [6000 x i64], ptr @v1, i64 0, i64 %53
  %55 = load i64, ptr %54, align 8, !tbaa !12
  %56 = load i32, ptr %2, align 4, !tbaa !8
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [6000 x i64], ptr @s1, i64 0, i64 %57
  store i64 %55, ptr %58, align 8, !tbaa !12
  %59 = load i32, ptr %2, align 4, !tbaa !8
  %60 = sext i32 %59 to i64
  %61 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %60)
  %62 = load i8, ptr %61, align 1, !tbaa !11
  %63 = sext i8 %62 to i32
  %64 = sub nsw i32 %63, 48
  %65 = sext i32 %64 to i64
  %66 = load i32, ptr %2, align 4, !tbaa !8
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [6000 x i64], ptr @p1, i64 0, i64 %67
  store i64 %65, ptr %68, align 8, !tbaa !12
  br label %94

69:                                               ; preds = %42
  %70 = load i32, ptr %2, align 4, !tbaa !8
  %71 = sub nsw i32 %70, 2
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [6000 x i64], ptr @p1, i64 0, i64 %72
  %74 = load i64, ptr %73, align 8, !tbaa !12
  %75 = load i32, ptr %2, align 4, !tbaa !8
  %76 = sext i32 %75 to i64
  %77 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %76)
  %78 = load i8, ptr %77, align 1, !tbaa !11
  %79 = sext i8 %78 to i32
  %80 = sub nsw i32 %79, 48
  %81 = sext i32 %80 to i64
  %82 = mul nsw i64 %74, %81
  %83 = load i32, ptr %2, align 4, !tbaa !8
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [6000 x i64], ptr @p1, i64 0, i64 %84
  store i64 %82, ptr %85, align 8, !tbaa !12
  %86 = load i32, ptr %2, align 4, !tbaa !8
  %87 = sub nsw i32 %86, 2
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [6000 x i64], ptr @s1, i64 0, i64 %88
  %90 = load i64, ptr %89, align 8, !tbaa !12
  %91 = load i32, ptr %2, align 4, !tbaa !8
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [6000 x i64], ptr @s1, i64 0, i64 %92
  store i64 %90, ptr %93, align 8, !tbaa !12
  br label %94

94:                                               ; preds = %69, %50
  %95 = load i32, ptr %2, align 4, !tbaa !8
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [6000 x i64], ptr @p1, i64 0, i64 %96
  %98 = load i64, ptr %97, align 8, !tbaa !12
  %99 = load i32, ptr %2, align 4, !tbaa !8
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [6000 x i64], ptr @s1, i64 0, i64 %100
  %102 = load i64, ptr %101, align 8, !tbaa !12
  %103 = add nsw i64 %98, %102
  %104 = load i32, ptr %2, align 4, !tbaa !8
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [6000 x i64], ptr @v1, i64 0, i64 %105
  store i64 %103, ptr %106, align 8, !tbaa !12
  br label %107

107:                                              ; preds = %94
  %108 = load i32, ptr %2, align 4, !tbaa !8
  %109 = add nsw i32 %108, 2
  store i32 %109, ptr %2, align 4, !tbaa !8
  br label %37, !llvm.loop !14

110:                                              ; preds = %41
  %111 = load i32, ptr @l, align 4, !tbaa !8
  %112 = sub nsw i32 %111, 1
  %113 = sext i32 %112 to i64
  %114 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %113)
  %115 = load i8, ptr %114, align 1, !tbaa !11
  %116 = sext i8 %115 to i32
  %117 = sub nsw i32 %116, 48
  %118 = sext i32 %117 to i64
  %119 = load i32, ptr @l, align 4, !tbaa !8
  %120 = sub nsw i32 %119, 1
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [6000 x i64], ptr @v2, i64 0, i64 %121
  store i64 %118, ptr %122, align 8, !tbaa !12
  %123 = load i32, ptr @l, align 4, !tbaa !8
  %124 = sub nsw i32 %123, 1
  %125 = sext i32 %124 to i64
  %126 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %125)
  %127 = load i8, ptr %126, align 1, !tbaa !11
  %128 = sext i8 %127 to i32
  %129 = sub nsw i32 %128, 48
  %130 = sext i32 %129 to i64
  %131 = load i32, ptr @l, align 4, !tbaa !8
  %132 = sub nsw i32 %131, 1
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [6000 x i64], ptr @p2, i64 0, i64 %133
  store i64 %130, ptr %134, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  %135 = load i32, ptr @l, align 4, !tbaa !8
  %136 = sub nsw i32 %135, 3
  store i32 %136, ptr %3, align 4, !tbaa !8
  br label %137

137:                                              ; preds = %206, %110
  %138 = load i32, ptr %3, align 4, !tbaa !8
  %139 = icmp sge i32 %138, 0
  br i1 %139, label %141, label %140

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

141:                                              ; preds = %137
  %142 = load i32, ptr %3, align 4, !tbaa !8
  %143 = add nsw i32 %142, 1
  %144 = sext i32 %143 to i64
  %145 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %144)
  %146 = load i8, ptr %145, align 1, !tbaa !11
  %147 = sext i8 %146 to i32
  %148 = icmp eq i32 %147, 43
  br i1 %148, label %149, label %168

149:                                              ; preds = %141
  %150 = load i32, ptr %3, align 4, !tbaa !8
  %151 = add nsw i32 %150, 2
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [6000 x i64], ptr @v2, i64 0, i64 %152
  %154 = load i64, ptr %153, align 8, !tbaa !12
  %155 = load i32, ptr %3, align 4, !tbaa !8
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [6000 x i64], ptr @s2, i64 0, i64 %156
  store i64 %154, ptr %157, align 8, !tbaa !12
  %158 = load i32, ptr %3, align 4, !tbaa !8
  %159 = sext i32 %158 to i64
  %160 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %159)
  %161 = load i8, ptr %160, align 1, !tbaa !11
  %162 = sext i8 %161 to i32
  %163 = sub nsw i32 %162, 48
  %164 = sext i32 %163 to i64
  %165 = load i32, ptr %3, align 4, !tbaa !8
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [6000 x i64], ptr @p2, i64 0, i64 %166
  store i64 %164, ptr %167, align 8, !tbaa !12
  br label %193

168:                                              ; preds = %141
  %169 = load i32, ptr %3, align 4, !tbaa !8
  %170 = add nsw i32 %169, 2
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [6000 x i64], ptr @p2, i64 0, i64 %171
  %173 = load i64, ptr %172, align 8, !tbaa !12
  %174 = load i32, ptr %3, align 4, !tbaa !8
  %175 = sext i32 %174 to i64
  %176 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %175)
  %177 = load i8, ptr %176, align 1, !tbaa !11
  %178 = sext i8 %177 to i32
  %179 = sub nsw i32 %178, 48
  %180 = sext i32 %179 to i64
  %181 = mul nsw i64 %173, %180
  %182 = load i32, ptr %3, align 4, !tbaa !8
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [6000 x i64], ptr @p2, i64 0, i64 %183
  store i64 %181, ptr %184, align 8, !tbaa !12
  %185 = load i32, ptr %3, align 4, !tbaa !8
  %186 = add nsw i32 %185, 2
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds [6000 x i64], ptr @s2, i64 0, i64 %187
  %189 = load i64, ptr %188, align 8, !tbaa !12
  %190 = load i32, ptr %3, align 4, !tbaa !8
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds [6000 x i64], ptr @s2, i64 0, i64 %191
  store i64 %189, ptr %192, align 8, !tbaa !12
  br label %193

193:                                              ; preds = %168, %149
  %194 = load i32, ptr %3, align 4, !tbaa !8
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds [6000 x i64], ptr @p2, i64 0, i64 %195
  %197 = load i64, ptr %196, align 8, !tbaa !12
  %198 = load i32, ptr %3, align 4, !tbaa !8
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds [6000 x i64], ptr @s2, i64 0, i64 %199
  %201 = load i64, ptr %200, align 8, !tbaa !12
  %202 = add nsw i64 %197, %201
  %203 = load i32, ptr %3, align 4, !tbaa !8
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds [6000 x i64], ptr @v2, i64 0, i64 %204
  store i64 %202, ptr %205, align 8, !tbaa !12
  br label %206

206:                                              ; preds = %193
  %207 = load i32, ptr %3, align 4, !tbaa !8
  %208 = sub nsw i32 %207, 2
  store i32 %208, ptr %3, align 4, !tbaa !8
  br label %137, !llvm.loop !16

209:                                              ; preds = %140
  %210 = load i32, ptr @l, align 4, !tbaa !8
  %211 = sub nsw i32 %210, 1
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds [6000 x i64], ptr @v1, i64 0, i64 %212
  %214 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %213, ptr noundef nonnull align 8 dereferenceable(8) @v2)
  %215 = load i64, ptr %214, align 8, !tbaa !12
  store i64 %215, ptr @mx, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 0, ptr %4, align 4, !tbaa !8
  br label %216

216:                                              ; preds = %348, %209
  %217 = load i32, ptr %4, align 4, !tbaa !8
  %218 = load i32, ptr @l, align 4, !tbaa !8
  %219 = icmp slt i32 %217, %218
  br i1 %219, label %221, label %220

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

221:                                              ; preds = %216
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  store i64 0, ptr %6, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store i64 0, ptr %7, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  store i64 0, ptr %8, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store i64 0, ptr %9, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store i64 0, ptr %10, align 8, !tbaa !12
  %222 = load i32, ptr %4, align 4, !tbaa !8
  %223 = icmp sgt i32 %222, 0
  br i1 %223, label %224, label %233

224:                                              ; preds = %221
  %225 = load i32, ptr %4, align 4, !tbaa !8
  %226 = sub nsw i32 %225, 1
  %227 = sext i32 %226 to i64
  %228 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %227)
  %229 = load i8, ptr %228, align 1, !tbaa !11
  %230 = sext i8 %229 to i32
  %231 = icmp ne i32 %230, 42
  br i1 %231, label %232, label %233

232:                                              ; preds = %224
  store i32 10, ptr %5, align 4
  br label %345

233:                                              ; preds = %224, %221
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %234 = load i32, ptr %4, align 4, !tbaa !8
  store i32 %234, ptr %11, align 4, !tbaa !8
  br label %235

235:                                              ; preds = %341, %233
  %236 = load i32, ptr %11, align 4, !tbaa !8
  %237 = load i32, ptr @l, align 4, !tbaa !8
  %238 = icmp slt i32 %236, %237
  br i1 %238, label %240, label %239

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

240:                                              ; preds = %235
  %241 = load i32, ptr %11, align 4, !tbaa !8
  %242 = load i32, ptr %4, align 4, !tbaa !8
  %243 = icmp eq i32 %241, %242
  br i1 %243, label %244, label %252

244:                                              ; preds = %240
  %245 = load i32, ptr %11, align 4, !tbaa !8
  %246 = sext i32 %245 to i64
  %247 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %246)
  %248 = load i8, ptr %247, align 1, !tbaa !11
  %249 = sext i8 %248 to i32
  %250 = sub nsw i32 %249, 48
  %251 = sext i32 %250 to i64
  store i64 %251, ptr @p, align 8, !tbaa !12
  store i64 %251, ptr %7, align 8, !tbaa !12
  store i64 0, ptr @v, align 8, !tbaa !12
  br label %280

252:                                              ; preds = %240
  %253 = load i32, ptr %11, align 4, !tbaa !8
  %254 = sub nsw i32 %253, 1
  %255 = sext i32 %254 to i64
  %256 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %255)
  %257 = load i8, ptr %256, align 1, !tbaa !11
  %258 = sext i8 %257 to i32
  %259 = icmp eq i32 %258, 43
  br i1 %259, label %260, label %269

260:                                              ; preds = %252
  %261 = load i64, ptr %7, align 8, !tbaa !12
  store i64 %261, ptr @v, align 8, !tbaa !12
  %262 = load i32, ptr %11, align 4, !tbaa !8
  %263 = sext i32 %262 to i64
  %264 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %263)
  %265 = load i8, ptr %264, align 1, !tbaa !11
  %266 = sext i8 %265 to i32
  %267 = sub nsw i32 %266, 48
  %268 = sext i32 %267 to i64
  store i64 %268, ptr @p, align 8, !tbaa !12
  br label %279

269:                                              ; preds = %252
  %270 = load i64, ptr @p, align 8, !tbaa !12
  %271 = load i32, ptr %11, align 4, !tbaa !8
  %272 = sext i32 %271 to i64
  %273 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %272)
  %274 = load i8, ptr %273, align 1, !tbaa !11
  %275 = sext i8 %274 to i32
  %276 = sub nsw i32 %275, 48
  %277 = sext i32 %276 to i64
  %278 = mul nsw i64 %270, %277
  store i64 %278, ptr @p, align 8, !tbaa !12
  br label %279

279:                                              ; preds = %269, %260
  br label %280

280:                                              ; preds = %279, %244
  %281 = load i64, ptr @v, align 8, !tbaa !12
  %282 = load i64, ptr @p, align 8, !tbaa !12
  %283 = add nsw i64 %281, %282
  store i64 %283, ptr %7, align 8, !tbaa !12
  %284 = load i32, ptr %11, align 4, !tbaa !8
  %285 = add nsw i32 %284, 1
  %286 = load i32, ptr @l, align 4, !tbaa !8
  %287 = icmp slt i32 %285, %286
  br i1 %287, label %288, label %297

288:                                              ; preds = %280
  %289 = load i32, ptr %11, align 4, !tbaa !8
  %290 = add nsw i32 %289, 1
  %291 = sext i32 %290 to i64
  %292 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %291)
  %293 = load i8, ptr %292, align 1, !tbaa !11
  %294 = sext i8 %293 to i32
  %295 = icmp ne i32 %294, 42
  br i1 %295, label %296, label %297

296:                                              ; preds = %288
  br label %341

297:                                              ; preds = %288, %280
  %298 = load i32, ptr %4, align 4, !tbaa !8
  %299 = icmp eq i32 %298, 0
  br i1 %299, label %300, label %301

300:                                              ; preds = %297
  store i64 1, ptr %6, align 8, !tbaa !12
  store i64 0, ptr %9, align 8, !tbaa !12
  br label %312

301:                                              ; preds = %297
  %302 = load i32, ptr %4, align 4, !tbaa !8
  %303 = sub nsw i32 %302, 2
  %304 = sext i32 %303 to i64
  %305 = getelementptr inbounds [6000 x i64], ptr @p1, i64 0, i64 %304
  %306 = load i64, ptr %305, align 8, !tbaa !12
  store i64 %306, ptr %6, align 8, !tbaa !12
  %307 = load i32, ptr %4, align 4, !tbaa !8
  %308 = sub nsw i32 %307, 2
  %309 = sext i32 %308 to i64
  %310 = getelementptr inbounds [6000 x i64], ptr @s1, i64 0, i64 %309
  %311 = load i64, ptr %310, align 8, !tbaa !12
  store i64 %311, ptr %9, align 8, !tbaa !12
  br label %312

312:                                              ; preds = %301, %300
  %313 = load i32, ptr %11, align 4, !tbaa !8
  %314 = add nsw i32 %313, 1
  %315 = load i32, ptr @l, align 4, !tbaa !8
  %316 = icmp eq i32 %314, %315
  br i1 %316, label %317, label %318

317:                                              ; preds = %312
  store i64 1, ptr %8, align 8, !tbaa !12
  store i64 0, ptr %10, align 8, !tbaa !12
  br label %329

318:                                              ; preds = %312
  %319 = load i32, ptr %11, align 4, !tbaa !8
  %320 = add nsw i32 %319, 2
  %321 = sext i32 %320 to i64
  %322 = getelementptr inbounds [6000 x i64], ptr @p2, i64 0, i64 %321
  %323 = load i64, ptr %322, align 8, !tbaa !12
  store i64 %323, ptr %8, align 8, !tbaa !12
  %324 = load i32, ptr %11, align 4, !tbaa !8
  %325 = add nsw i32 %324, 2
  %326 = sext i32 %325 to i64
  %327 = getelementptr inbounds [6000 x i64], ptr @s2, i64 0, i64 %326
  %328 = load i64, ptr %327, align 8, !tbaa !12
  store i64 %328, ptr %10, align 8, !tbaa !12
  br label %329

329:                                              ; preds = %318, %317
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %330 = load i64, ptr %6, align 8, !tbaa !12
  %331 = load i64, ptr %7, align 8, !tbaa !12
  %332 = mul nsw i64 %330, %331
  %333 = load i64, ptr %8, align 8, !tbaa !12
  %334 = mul nsw i64 %332, %333
  %335 = load i64, ptr %9, align 8, !tbaa !12
  %336 = add nsw i64 %334, %335
  %337 = load i64, ptr %10, align 8, !tbaa !12
  %338 = add nsw i64 %336, %337
  store i64 %338, ptr %12, align 8, !tbaa !12
  %339 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) @mx, ptr noundef nonnull align 8 dereferenceable(8) %12)
  %340 = load i64, ptr %339, align 8, !tbaa !12
  store i64 %340, ptr @mx, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %341

341:                                              ; preds = %329, %296
  %342 = load i32, ptr %11, align 4, !tbaa !8
  %343 = add nsw i32 %342, 2
  store i32 %343, ptr %11, align 4, !tbaa !8
  br label %235, !llvm.loop !17

344:                                              ; preds = %239
  store i32 0, ptr %5, align 4
  br label %345

345:                                              ; preds = %344, %232
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  %346 = load i32, ptr %5, align 4
  switch i32 %346, label %355 [
    i32 0, label %347
    i32 10, label %348
  ]

347:                                              ; preds = %345
  br label %348

348:                                              ; preds = %347, %345
  %349 = load i32, ptr %4, align 4, !tbaa !8
  %350 = add nsw i32 %349, 2
  store i32 %350, ptr %4, align 4, !tbaa !8
  br label %216, !llvm.loop !18

351:                                              ; preds = %220
  %352 = load i64, ptr @mx, align 8, !tbaa !12
  %353 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %352)
  %354 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %353, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0

355:                                              ; preds = %345
  unreachable
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 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) #2 align 2

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

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

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

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

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

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #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 = !{!10, !10, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"long long", !10, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !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::__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.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@_Z1sB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@l = external dso_local local_unnamed_addr global i32, align 4
@v1 = external dso_local global [6000 x i64], align 16
@v2 = external dso_local global [6000 x i64], align 16
@p1 = external dso_local local_unnamed_addr global [6000 x i64], align 16
@s1 = external dso_local local_unnamed_addr global [6000 x i64], align 16
@p2 = external dso_local local_unnamed_addr global [6000 x i64], align 16
@s2 = external dso_local local_unnamed_addr global [6000 x i64], align 16
@v = external dso_local local_unnamed_addr global i64, align 8
@p = external dso_local local_unnamed_addr global i64, align 8
@mx = external dso_local global i64, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  %2 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %3 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %4 = getelementptr i8, ptr %3, i64 -24
  %5 = load i64, ptr %4, align 8
  %6 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %5
  %7 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %6, ptr noundef null)
  %8 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %9 = getelementptr i8, ptr %8, i64 -24
  %10 = load i64, ptr %9, align 8
  %11 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %10
  %12 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %11, ptr noundef null)
  %13 = tail 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) @_Z1sB5cxx11)
  %14 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11) #7
  %15 = trunc i64 %14 to i32
  store i32 %15, ptr @l, align 4, !tbaa !8
  %16 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef 0)
  %17 = load i8, ptr %16, align 1, !tbaa !11
  %18 = sext i8 %17 to i64
  %19 = add nsw i64 %18, -48
  store i64 %19, ptr @v1, align 16, !tbaa !12
  %20 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef 0)
  %21 = load i8, ptr %20, align 1, !tbaa !11
  %22 = sext i8 %21 to i64
  %23 = add nsw i64 %22, -48
  store i64 %23, ptr @p1, align 16, !tbaa !12
  %24 = load i32, ptr @l, align 4, !tbaa !8
  %25 = icmp sgt i32 %24, 2
  br i1 %25, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %71, %0
  %.lcssa = phi i32 [ %24, %0 ], [ %76, %71 ]
  %26 = add nsw i32 %.lcssa, -1
  %27 = sext i32 %26 to i64
  %28 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %27)
  %29 = load i8, ptr %28, align 1, !tbaa !11
  %30 = sext i8 %29 to i64
  %31 = add nsw i64 %30, -48
  %32 = load i32, ptr @l, align 4, !tbaa !8
  %33 = add nsw i32 %32, -1
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [6000 x i64], ptr @v2, i64 0, i64 %34
  store i64 %31, ptr %35, align 8, !tbaa !12
  %36 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %34)
  %37 = load i8, ptr %36, align 1, !tbaa !11
  %38 = sext i8 %37 to i64
  %39 = add nsw i64 %38, -48
  %40 = load i32, ptr @l, align 4, !tbaa !8
  %41 = add nsw i32 %40, -1
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [6000 x i64], ptr @p2, i64 0, i64 %42
  store i64 %39, ptr %43, align 8, !tbaa !12
  %44 = icmp sgt i32 %40, 2
  br i1 %44, label %.lr.ph72.preheader, label %._crit_edge73

.lr.ph72.preheader:                               ; preds = %._crit_edge
  %45 = add nsw i32 %40, -3
  %46 = zext nneg i32 %45 to i64
  br label %.lr.ph72

.lr.ph:                                           ; preds = %0, %71
  %indvars.iv = phi i64 [ %indvars.iv.next, %71 ], [ 2, %0 ]
  %47 = add nsw i64 %indvars.iv, -1
  %48 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %47)
  %49 = load i8, ptr %48, align 1, !tbaa !11
  %50 = icmp eq i8 %49, 43
  %51 = add nsw i64 %indvars.iv, -2
  br i1 %50, label %52, label %60

52:                                               ; preds = %.lr.ph
  %53 = getelementptr inbounds [6000 x i64], ptr @v1, i64 0, i64 %51
  %54 = load i64, ptr %53, align 16, !tbaa !12
  %55 = getelementptr inbounds [6000 x i64], ptr @s1, i64 0, i64 %indvars.iv
  store i64 %54, ptr %55, align 16, !tbaa !12
  %56 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %indvars.iv)
  %57 = load i8, ptr %56, align 1, !tbaa !11
  %58 = sext i8 %57 to i64
  %59 = add nsw i64 %58, -48
  %.pre = load i64, ptr %55, align 16, !tbaa !12
  br label %71

60:                                               ; preds = %.lr.ph
  %61 = getelementptr inbounds [6000 x i64], ptr @p1, i64 0, i64 %51
  %62 = load i64, ptr %61, align 16, !tbaa !12
  %63 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %indvars.iv)
  %64 = load i8, ptr %63, align 1, !tbaa !11
  %65 = sext i8 %64 to i64
  %66 = add nsw i64 %65, -48
  %67 = mul nsw i64 %66, %62
  %68 = getelementptr inbounds [6000 x i64], ptr @s1, i64 0, i64 %51
  %69 = load i64, ptr %68, align 16, !tbaa !12
  %70 = getelementptr inbounds [6000 x i64], ptr @s1, i64 0, i64 %indvars.iv
  store i64 %69, ptr %70, align 16, !tbaa !12
  br label %71

71:                                               ; preds = %60, %52
  %72 = phi i64 [ %.pre, %52 ], [ %69, %60 ]
  %.sink = phi i64 [ %59, %52 ], [ %67, %60 ]
  %73 = getelementptr inbounds [6000 x i64], ptr @p1, i64 0, i64 %indvars.iv
  store i64 %.sink, ptr %73, align 16
  %74 = add nsw i64 %72, %.sink
  %75 = getelementptr inbounds [6000 x i64], ptr @v1, i64 0, i64 %indvars.iv
  store i64 %74, ptr %75, align 16, !tbaa !12
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 2
  %76 = load i32, ptr @l, align 4, !tbaa !8
  %77 = sext i32 %76 to i64
  %78 = icmp slt i64 %indvars.iv.next, %77
  br i1 %78, label %.lr.ph, label %._crit_edge, !llvm.loop !14

._crit_edge73.loopexit:                           ; preds = %108
  %.pre99 = load i32, ptr @l, align 4, !tbaa !8
  %.pre103 = add nsw i32 %.pre99, -1
  %.pre104 = sext i32 %.pre103 to i64
  br label %._crit_edge73

._crit_edge73:                                    ; preds = %._crit_edge73.loopexit, %._crit_edge
  %.pre-phi105 = phi i64 [ %.pre104, %._crit_edge73.loopexit ], [ %42, %._crit_edge ]
  %79 = getelementptr inbounds [6000 x i64], ptr @v1, i64 0, i64 %.pre-phi105
  %80 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %79, ptr noundef nonnull align 8 dereferenceable(8) @v2)
  %81 = load i64, ptr %80, align 8, !tbaa !12
  store i64 %81, ptr @mx, align 8, !tbaa !12
  %82 = load i32, ptr @l, align 4, !tbaa !8
  %83 = icmp sgt i32 %82, 0
  br i1 %83, label %.lr.ph81, label %._crit_edge82

.lr.ph72:                                         ; preds = %.lr.ph72.preheader, %108
  %indvars.iv86 = phi i64 [ %46, %.lr.ph72.preheader ], [ %indvars.iv.next87, %108 ]
  %84 = add nuw nsw i64 %indvars.iv86, 1
  %85 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %84)
  %86 = load i8, ptr %85, align 1, !tbaa !11
  %87 = icmp eq i8 %86, 43
  %88 = add nuw nsw i64 %indvars.iv86, 2
  br i1 %87, label %89, label %97

89:                                               ; preds = %.lr.ph72
  %90 = getelementptr inbounds [6000 x i64], ptr @v2, i64 0, i64 %88
  %91 = load i64, ptr %90, align 8, !tbaa !12
  %92 = getelementptr inbounds [6000 x i64], ptr @s2, i64 0, i64 %indvars.iv86
  store i64 %91, ptr %92, align 8, !tbaa !12
  %93 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %indvars.iv86)
  %94 = load i8, ptr %93, align 1, !tbaa !11
  %95 = sext i8 %94 to i64
  %96 = add nsw i64 %95, -48
  %.pre98 = load i64, ptr %92, align 8, !tbaa !12
  br label %108

97:                                               ; preds = %.lr.ph72
  %98 = getelementptr inbounds [6000 x i64], ptr @p2, i64 0, i64 %88
  %99 = load i64, ptr %98, align 8, !tbaa !12
  %100 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %indvars.iv86)
  %101 = load i8, ptr %100, align 1, !tbaa !11
  %102 = sext i8 %101 to i64
  %103 = add nsw i64 %102, -48
  %104 = mul nsw i64 %103, %99
  %105 = getelementptr inbounds [6000 x i64], ptr @s2, i64 0, i64 %88
  %106 = load i64, ptr %105, align 8, !tbaa !12
  %107 = getelementptr inbounds [6000 x i64], ptr @s2, i64 0, i64 %indvars.iv86
  store i64 %106, ptr %107, align 8, !tbaa !12
  br label %108

108:                                              ; preds = %97, %89
  %109 = phi i64 [ %.pre98, %89 ], [ %106, %97 ]
  %.sink96 = phi i64 [ %96, %89 ], [ %104, %97 ]
  %110 = getelementptr inbounds [6000 x i64], ptr @p2, i64 0, i64 %indvars.iv86
  store i64 %.sink96, ptr %110, align 8
  %111 = add nsw i64 %109, %.sink96
  %112 = getelementptr inbounds [6000 x i64], ptr @v2, i64 0, i64 %indvars.iv86
  store i64 %111, ptr %112, align 8, !tbaa !12
  %indvars.iv.next87 = add nsw i64 %indvars.iv86, -2
  %113 = icmp sgt i64 %indvars.iv86, 1
  br i1 %113, label %.lr.ph72, label %._crit_edge73.loopexit, !llvm.loop !16

._crit_edge82.loopexit:                           ; preds = %.loopexit
  %.pre102 = load i64, ptr @mx, align 8, !tbaa !12
  br label %._crit_edge82

._crit_edge82:                                    ; preds = %._crit_edge82.loopexit, %._crit_edge73
  %114 = phi i64 [ %.pre102, %._crit_edge82.loopexit ], [ %81, %._crit_edge73 ]
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %114)
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %115, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0

.lr.ph81:                                         ; preds = %._crit_edge73, %.loopexit
  %117 = phi i32 [ %217, %.loopexit ], [ %82, %._crit_edge73 ]
  %indvars.iv89 = phi i64 [ %indvars.iv.next90, %.loopexit ], [ 0, %._crit_edge73 ]
  %.not = icmp eq i64 %indvars.iv89, 0
  br i1 %.not, label %125, label %118

118:                                              ; preds = %.lr.ph81
  %119 = add nsw i64 %indvars.iv89, -1
  %120 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %119)
  %121 = load i8, ptr %120, align 1, !tbaa !11
  %.not67 = icmp eq i8 %121, 42
  %122 = load i32, ptr @l, align 4
  %123 = sext i32 %122 to i64
  %124 = icmp slt i64 %indvars.iv89, %123
  %or.cond = select i1 %.not67, i1 %124, i1 false
  br i1 %or.cond, label %127, label %.loopexit

125:                                              ; preds = %.lr.ph81
  %126 = sext i32 %117 to i64
  %.old83 = icmp sgt i32 %117, 0
  br i1 %.old83, label %127, label %.loopexit

127:                                              ; preds = %118, %125
  %128 = add nsw i64 %indvars.iv89, -2
  %129 = getelementptr inbounds [6000 x i64], ptr @p1, i64 0, i64 %128
  %130 = getelementptr inbounds [6000 x i64], ptr @s1, i64 0, i64 %128
  %131 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %indvars.iv89)
  %132 = load i8, ptr %131, align 1, !tbaa !11
  %133 = sext i8 %132 to i64
  %134 = add nsw i64 %133, -48
  store i64 %134, ptr @p, align 8, !tbaa !12
  store i64 0, ptr @v, align 8, !tbaa !12
  %.pre101 = load i32, ptr @l, align 4, !tbaa !8
  %135 = or disjoint i64 %indvars.iv89, 1
  %136 = sext i32 %.pre101 to i64
  %137 = icmp slt i64 %135, %136
  br i1 %137, label %138, label %141

138:                                              ; preds = %127
  %139 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %135)
  %140 = load i8, ptr %139, align 1, !tbaa !11
  %.not68.peel = icmp eq i8 %140, 42
  br i1 %.not68.peel, label %141, label %162

141:                                              ; preds = %138, %127
  br i1 %.not, label %145, label %142

142:                                              ; preds = %141
  %143 = load i64, ptr %129, align 16, !tbaa !12
  %144 = load i64, ptr %130, align 16, !tbaa !12
  br label %145

145:                                              ; preds = %142, %141
  %.061.peel = phi i64 [ %143, %142 ], [ 1, %141 ]
  %.058.peel = phi i64 [ %144, %142 ], [ 0, %141 ]
  %146 = load i32, ptr @l, align 4, !tbaa !8
  %147 = zext i32 %146 to i64
  %148 = icmp eq i64 %135, %147
  br i1 %148, label %155, label %149

149:                                              ; preds = %145
  %150 = add nuw nsw i64 %indvars.iv89, 2
  %151 = getelementptr inbounds [6000 x i64], ptr @p2, i64 0, i64 %150
  %152 = load i64, ptr %151, align 16, !tbaa !12
  %153 = getelementptr inbounds [6000 x i64], ptr @s2, i64 0, i64 %150
  %154 = load i64, ptr %153, align 16, !tbaa !12
  br label %155

155:                                              ; preds = %149, %145
  %.059.peel = phi i64 [ %152, %149 ], [ 1, %145 ]
  %.057.peel = phi i64 [ %154, %149 ], [ 0, %145 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  %156 = mul nsw i64 %.061.peel, %134
  %157 = mul nsw i64 %156, %.059.peel
  %158 = add nsw i64 %157, %.058.peel
  %159 = add nsw i64 %158, %.057.peel
  store i64 %159, ptr %1, align 8, !tbaa !12
  %160 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) @mx, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %161 = load i64, ptr %160, align 8, !tbaa !12
  store i64 %161, ptr @mx, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  br label %162

162:                                              ; preds = %155, %138
  %indvars.iv.next92.peel = add nuw nsw i64 %indvars.iv89, 2
  %163 = load i32, ptr @l, align 4, !tbaa !8
  %164 = sext i32 %163 to i64
  %165 = icmp slt i64 %indvars.iv.next92.peel, %164
  br i1 %165, label %.peel.next, label %.loopexit

.peel.next:                                       ; preds = %162, %213
  %indvars.iv91 = phi i64 [ %indvars.iv.next92, %213 ], [ %indvars.iv.next92.peel, %162 ]
  %.06074 = phi i64 [ %184, %213 ], [ %134, %162 ]
  %166 = add nsw i64 %indvars.iv91, -1
  %167 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %166)
  %168 = load i8, ptr %167, align 1, !tbaa !11
  %169 = icmp eq i8 %168, 43
  br i1 %169, label %170, label %175

170:                                              ; preds = %.peel.next
  store i64 %.06074, ptr @v, align 8, !tbaa !12
  %171 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %indvars.iv91)
  %172 = load i8, ptr %171, align 1, !tbaa !11
  %173 = sext i8 %172 to i64
  %174 = add nsw i64 %173, -48
  br label %182

175:                                              ; preds = %.peel.next
  %176 = load i64, ptr @p, align 8, !tbaa !12
  %177 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %indvars.iv91)
  %178 = load i8, ptr %177, align 1, !tbaa !11
  %179 = sext i8 %178 to i64
  %180 = add nsw i64 %179, -48
  %181 = mul nsw i64 %180, %176
  br label %182

182:                                              ; preds = %170, %175
  %storemerge = phi i64 [ %181, %175 ], [ %174, %170 ]
  store i64 %storemerge, ptr @p, align 8, !tbaa !12
  %183 = load i64, ptr @v, align 8, !tbaa !12
  %184 = add nsw i64 %storemerge, %183
  %185 = or disjoint i64 %indvars.iv91, 1
  %186 = load i32, ptr @l, align 4, !tbaa !8
  %187 = sext i32 %186 to i64
  %188 = icmp slt i64 %185, %187
  br i1 %188, label %189, label %192

189:                                              ; preds = %182
  %190 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %185)
  %191 = load i8, ptr %190, align 1, !tbaa !11
  %.not68 = icmp eq i8 %191, 42
  br i1 %.not68, label %192, label %213

192:                                              ; preds = %189, %182
  br i1 %.not, label %196, label %193

193:                                              ; preds = %192
  %194 = load i64, ptr %129, align 16, !tbaa !12
  %195 = load i64, ptr %130, align 16, !tbaa !12
  br label %196

196:                                              ; preds = %192, %193
  %.061 = phi i64 [ %194, %193 ], [ 1, %192 ]
  %.058 = phi i64 [ %195, %193 ], [ 0, %192 ]
  %197 = load i32, ptr @l, align 4, !tbaa !8
  %198 = zext i32 %197 to i64
  %199 = icmp eq i64 %185, %198
  br i1 %199, label %206, label %200

200:                                              ; preds = %196
  %201 = add nuw nsw i64 %indvars.iv91, 2
  %202 = getelementptr inbounds [6000 x i64], ptr @p2, i64 0, i64 %201
  %203 = load i64, ptr %202, align 16, !tbaa !12
  %204 = getelementptr inbounds [6000 x i64], ptr @s2, i64 0, i64 %201
  %205 = load i64, ptr %204, align 16, !tbaa !12
  br label %206

206:                                              ; preds = %196, %200
  %.059 = phi i64 [ %203, %200 ], [ 1, %196 ]
  %.057 = phi i64 [ %205, %200 ], [ 0, %196 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  %207 = mul nsw i64 %.061, %184
  %208 = mul nsw i64 %207, %.059
  %209 = add nsw i64 %208, %.058
  %210 = add nsw i64 %209, %.057
  store i64 %210, ptr %1, align 8, !tbaa !12
  %211 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) @mx, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %212 = load i64, ptr %211, align 8, !tbaa !12
  store i64 %212, ptr @mx, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  br label %213

213:                                              ; preds = %189, %206
  %indvars.iv.next92 = add nuw nsw i64 %indvars.iv91, 2
  %214 = load i32, ptr @l, align 4, !tbaa !8
  %215 = sext i32 %214 to i64
  %216 = icmp slt i64 %indvars.iv.next92, %215
  br i1 %216, label %.peel.next, label %.loopexit, !llvm.loop !17

.loopexit:                                        ; preds = %213, %162, %125, %118
  %.pre-phi107 = phi i64 [ %126, %125 ], [ %123, %118 ], [ %164, %162 ], [ %215, %213 ]
  %217 = phi i32 [ %117, %125 ], [ %122, %118 ], [ %163, %162 ], [ %214, %213 ]
  %indvars.iv.next90 = add nuw nsw i64 %indvars.iv89, 2
  %218 = icmp slt i64 %indvars.iv.next90, %.pre-phi107
  br i1 %218, label %.lr.ph81, label %._crit_edge82.loopexit, !llvm.loop !19
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 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 #2 align 2

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

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

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

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

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

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #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 = !{!10, !10, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"long long", !10, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15, !18}
!18 = !{!"llvm.loop.peeled.count", i32 1}
!19 = distinct !{!19, !15}


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