; LLVM IR from AnneLivia/Competitive-Programming :: Online Judges/UVA/1147 (main)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }

@v = external dso_local global %"class.std::vector", align 8
@hx = external dso_local global i32, align 4
@hy = external dso_local global i32, align 4
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [16 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [15 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z14checkMoveHorsev() #0

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

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i8, align 1
  %5 = alloca %"class.std::vector.0", align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::allocator.2", align 1
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 1, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #6
  br label %11

11:                                               ; preds = %301, %0
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %13 = load ptr, ptr %12, align 8, !tbaa !9
  %14 = getelementptr i8, ptr %13, i64 -24
  %15 = load i64, ptr %14, align 8
  %16 = getelementptr inbounds i8, ptr %12, i64 %15
  %17 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %16)
  br i1 %17, label %18, label %21

18:                                               ; preds = %11
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = icmp ne i32 %19, 0
  br label %21

21:                                               ; preds = %18, %11
  %22 = phi i1 [ false, %11 ], [ %20, %18 ]
  br i1 %22, label %23, label %311

23:                                               ; preds = %21
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %4)
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = sub nsw i32 %25, 1
  store i32 %26, ptr @hx, align 4, !tbaa !5
  %27 = load i8, ptr %4, align 1, !tbaa !11
  %28 = sext i8 %27 to i32
  %29 = sub nsw i32 %28, 97
  store i32 %29, ptr @hy, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef 8, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %30 unwind label %45

30:                                               ; preds = %23
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EE6assignEmRKS1_(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef 8, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %31 unwind label %49

31:                                               ; preds = %30
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #6
  %32 = load i32, ptr %2, align 4, !tbaa !5
  %33 = sub nsw i32 %32, 1
  %34 = sext i32 %33 to i64
  %35 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %34) #6
  %36 = load i8, ptr %4, align 1, !tbaa !11
  %37 = sext i8 %36 to i32
  %38 = sub nsw i32 %37, 97
  %39 = sext i32 %38 to i64
  %40 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %35, i64 noundef %39) #6
  store i32 2, ptr %40, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %66, %31
  %42 = load i32, ptr %10, align 4, !tbaa !5
  %43 = icmp slt i32 %42, 8
  br i1 %43, label %54, label %44

44:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %69

45:                                               ; preds = %23
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %8, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %9, align 4
  br label %53

49:                                               ; preds = %30
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %8, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %9, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  br label %53

53:                                               ; preds = %49, %45
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %312

54:                                               ; preds = %41
  %55 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %56 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) %55, ptr noundef nonnull align 1 dereferenceable(1) %4)
  %57 = load i32, ptr %2, align 4, !tbaa !5
  %58 = sub nsw i32 %57, 1
  %59 = sext i32 %58 to i64
  %60 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %59) #6
  %61 = load i8, ptr %4, align 1, !tbaa !11
  %62 = sext i8 %61 to i32
  %63 = sub nsw i32 %62, 97
  %64 = sext i32 %63 to i64
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %60, i64 noundef %64) #6
  store i32 1, ptr %65, align 4, !tbaa !5
  br label %66

66:                                               ; preds = %54
  %67 = load i32, ptr %10, align 4, !tbaa !5
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %10, align 4, !tbaa !5
  br label %41, !llvm.loop !12

69:                                               ; preds = %44
  %70 = load i32, ptr @hx, align 4, !tbaa !5
  %71 = sub nsw i32 %70, 2
  %72 = icmp sge i32 %71, 0
  br i1 %72, label %73, label %98

73:                                               ; preds = %69
  %74 = load i32, ptr @hy, align 4, !tbaa !5
  %75 = sub nsw i32 %74, 1
  %76 = icmp sge i32 %75, 0
  br i1 %76, label %77, label %98

77:                                               ; preds = %73
  %78 = load i32, ptr @hx, align 4, !tbaa !5
  %79 = sub nsw i32 %78, 2
  %80 = sext i32 %79 to i64
  %81 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %80) #6
  %82 = load i32, ptr @hy, align 4, !tbaa !5
  %83 = sub nsw i32 %82, 1
  %84 = sext i32 %83 to i64
  %85 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef %84) #6
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = icmp eq i32 %86, 1
  %88 = zext i1 %87 to i64
  %89 = select i1 %87, i32 3, i32 2
  %90 = load i32, ptr @hx, align 4, !tbaa !5
  %91 = sub nsw i32 %90, 2
  %92 = sext i32 %91 to i64
  %93 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %92) #6
  %94 = load i32, ptr @hy, align 4, !tbaa !5
  %95 = sub nsw i32 %94, 1
  %96 = sext i32 %95 to i64
  %97 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %93, i64 noundef %96) #6
  store i32 %89, ptr %97, align 4, !tbaa !5
  br label %98

98:                                               ; preds = %77, %73, %69
  %99 = load i32, ptr @hx, align 4, !tbaa !5
  %100 = sub nsw i32 %99, 2
  %101 = icmp sge i32 %100, 0
  br i1 %101, label %102, label %127

102:                                              ; preds = %98
  %103 = load i32, ptr @hy, align 4, !tbaa !5
  %104 = add nsw i32 %103, 1
  %105 = icmp sle i32 %104, 7
  br i1 %105, label %106, label %127

106:                                              ; preds = %102
  %107 = load i32, ptr @hx, align 4, !tbaa !5
  %108 = sub nsw i32 %107, 2
  %109 = sext i32 %108 to i64
  %110 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %109) #6
  %111 = load i32, ptr @hy, align 4, !tbaa !5
  %112 = add nsw i32 %111, 1
  %113 = sext i32 %112 to i64
  %114 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %110, i64 noundef %113) #6
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %116 = icmp eq i32 %115, 1
  %117 = zext i1 %116 to i64
  %118 = select i1 %116, i32 3, i32 2
  %119 = load i32, ptr @hx, align 4, !tbaa !5
  %120 = sub nsw i32 %119, 2
  %121 = sext i32 %120 to i64
  %122 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %121) #6
  %123 = load i32, ptr @hy, align 4, !tbaa !5
  %124 = add nsw i32 %123, 1
  %125 = sext i32 %124 to i64
  %126 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %122, i64 noundef %125) #6
  store i32 %118, ptr %126, align 4, !tbaa !5
  br label %127

127:                                              ; preds = %106, %102, %98
  %128 = load i32, ptr @hx, align 4, !tbaa !5
  %129 = add nsw i32 %128, 2
  %130 = icmp sle i32 %129, 7
  br i1 %130, label %131, label %156

131:                                              ; preds = %127
  %132 = load i32, ptr @hy, align 4, !tbaa !5
  %133 = sub nsw i32 %132, 1
  %134 = icmp sge i32 %133, 0
  br i1 %134, label %135, label %156

135:                                              ; preds = %131
  %136 = load i32, ptr @hx, align 4, !tbaa !5
  %137 = add nsw i32 %136, 2
  %138 = sext i32 %137 to i64
  %139 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %138) #6
  %140 = load i32, ptr @hy, align 4, !tbaa !5
  %141 = sub nsw i32 %140, 1
  %142 = sext i32 %141 to i64
  %143 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %139, i64 noundef %142) #6
  %144 = load i32, ptr %143, align 4, !tbaa !5
  %145 = icmp eq i32 %144, 1
  %146 = zext i1 %145 to i64
  %147 = select i1 %145, i32 3, i32 2
  %148 = load i32, ptr @hx, align 4, !tbaa !5
  %149 = add nsw i32 %148, 2
  %150 = sext i32 %149 to i64
  %151 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %150) #6
  %152 = load i32, ptr @hy, align 4, !tbaa !5
  %153 = sub nsw i32 %152, 1
  %154 = sext i32 %153 to i64
  %155 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %151, i64 noundef %154) #6
  store i32 %147, ptr %155, align 4, !tbaa !5
  br label %156

156:                                              ; preds = %135, %131, %127
  %157 = load i32, ptr @hx, align 4, !tbaa !5
  %158 = add nsw i32 %157, 2
  %159 = icmp sle i32 %158, 7
  br i1 %159, label %160, label %185

160:                                              ; preds = %156
  %161 = load i32, ptr @hy, align 4, !tbaa !5
  %162 = add nsw i32 %161, 1
  %163 = icmp sle i32 %162, 7
  br i1 %163, label %164, label %185

164:                                              ; preds = %160
  %165 = load i32, ptr @hx, align 4, !tbaa !5
  %166 = add nsw i32 %165, 2
  %167 = sext i32 %166 to i64
  %168 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %167) #6
  %169 = load i32, ptr @hy, align 4, !tbaa !5
  %170 = add nsw i32 %169, 1
  %171 = sext i32 %170 to i64
  %172 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %168, i64 noundef %171) #6
  %173 = load i32, ptr %172, align 4, !tbaa !5
  %174 = icmp eq i32 %173, 1
  %175 = zext i1 %174 to i64
  %176 = select i1 %174, i32 3, i32 2
  %177 = load i32, ptr @hx, align 4, !tbaa !5
  %178 = add nsw i32 %177, 2
  %179 = sext i32 %178 to i64
  %180 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %179) #6
  %181 = load i32, ptr @hy, align 4, !tbaa !5
  %182 = add nsw i32 %181, 1
  %183 = sext i32 %182 to i64
  %184 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %180, i64 noundef %183) #6
  store i32 %176, ptr %184, align 4, !tbaa !5
  br label %185

185:                                              ; preds = %164, %160, %156
  %186 = load i32, ptr @hx, align 4, !tbaa !5
  %187 = sub nsw i32 %186, 1
  %188 = icmp sge i32 %187, 0
  br i1 %188, label %189, label %214

189:                                              ; preds = %185
  %190 = load i32, ptr @hy, align 4, !tbaa !5
  %191 = sub nsw i32 %190, 2
  %192 = icmp sge i32 %191, 0
  br i1 %192, label %193, label %214

193:                                              ; preds = %189
  %194 = load i32, ptr @hx, align 4, !tbaa !5
  %195 = sub nsw i32 %194, 1
  %196 = sext i32 %195 to i64
  %197 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %196) #6
  %198 = load i32, ptr @hy, align 4, !tbaa !5
  %199 = sub nsw i32 %198, 2
  %200 = sext i32 %199 to i64
  %201 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %197, i64 noundef %200) #6
  %202 = load i32, ptr %201, align 4, !tbaa !5
  %203 = icmp eq i32 %202, 1
  %204 = zext i1 %203 to i64
  %205 = select i1 %203, i32 3, i32 2
  %206 = load i32, ptr @hx, align 4, !tbaa !5
  %207 = sub nsw i32 %206, 1
  %208 = sext i32 %207 to i64
  %209 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %208) #6
  %210 = load i32, ptr @hy, align 4, !tbaa !5
  %211 = sub nsw i32 %210, 2
  %212 = sext i32 %211 to i64
  %213 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %209, i64 noundef %212) #6
  store i32 %205, ptr %213, align 4, !tbaa !5
  br label %214

214:                                              ; preds = %193, %189, %185
  %215 = load i32, ptr @hx, align 4, !tbaa !5
  %216 = add nsw i32 %215, 1
  %217 = icmp sle i32 %216, 7
  br i1 %217, label %218, label %243

218:                                              ; preds = %214
  %219 = load i32, ptr @hy, align 4, !tbaa !5
  %220 = sub nsw i32 %219, 2
  %221 = icmp sge i32 %220, 0
  br i1 %221, label %222, label %243

222:                                              ; preds = %218
  %223 = load i32, ptr @hx, align 4, !tbaa !5
  %224 = add nsw i32 %223, 1
  %225 = sext i32 %224 to i64
  %226 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %225) #6
  %227 = load i32, ptr @hy, align 4, !tbaa !5
  %228 = sub nsw i32 %227, 2
  %229 = sext i32 %228 to i64
  %230 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %226, i64 noundef %229) #6
  %231 = load i32, ptr %230, align 4, !tbaa !5
  %232 = icmp eq i32 %231, 1
  %233 = zext i1 %232 to i64
  %234 = select i1 %232, i32 3, i32 2
  %235 = load i32, ptr @hx, align 4, !tbaa !5
  %236 = add nsw i32 %235, 1
  %237 = sext i32 %236 to i64
  %238 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %237) #6
  %239 = load i32, ptr @hy, align 4, !tbaa !5
  %240 = sub nsw i32 %239, 2
  %241 = sext i32 %240 to i64
  %242 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %238, i64 noundef %241) #6
  store i32 %234, ptr %242, align 4, !tbaa !5
  br label %243

243:                                              ; preds = %222, %218, %214
  %244 = load i32, ptr @hx, align 4, !tbaa !5
  %245 = sub nsw i32 %244, 1
  %246 = icmp sge i32 %245, 0
  br i1 %246, label %247, label %272

247:                                              ; preds = %243
  %248 = load i32, ptr @hy, align 4, !tbaa !5
  %249 = add nsw i32 %248, 2
  %250 = icmp sle i32 %249, 7
  br i1 %250, label %251, label %272

251:                                              ; preds = %247
  %252 = load i32, ptr @hx, align 4, !tbaa !5
  %253 = sub nsw i32 %252, 1
  %254 = sext i32 %253 to i64
  %255 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %254) #6
  %256 = load i32, ptr @hy, align 4, !tbaa !5
  %257 = add nsw i32 %256, 2
  %258 = sext i32 %257 to i64
  %259 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %255, i64 noundef %258) #6
  %260 = load i32, ptr %259, align 4, !tbaa !5
  %261 = icmp eq i32 %260, 1
  %262 = zext i1 %261 to i64
  %263 = select i1 %261, i32 3, i32 2
  %264 = load i32, ptr @hx, align 4, !tbaa !5
  %265 = sub nsw i32 %264, 1
  %266 = sext i32 %265 to i64
  %267 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %266) #6
  %268 = load i32, ptr @hy, align 4, !tbaa !5
  %269 = add nsw i32 %268, 2
  %270 = sext i32 %269 to i64
  %271 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %267, i64 noundef %270) #6
  store i32 %263, ptr %271, align 4, !tbaa !5
  br label %272

272:                                              ; preds = %251, %247, %243
  %273 = load i32, ptr @hx, align 4, !tbaa !5
  %274 = add nsw i32 %273, 1
  %275 = icmp sle i32 %274, 7
  br i1 %275, label %276, label %301

276:                                              ; preds = %272
  %277 = load i32, ptr @hy, align 4, !tbaa !5
  %278 = add nsw i32 %277, 2
  %279 = icmp sle i32 %278, 7
  br i1 %279, label %280, label %301

280:                                              ; preds = %276
  %281 = load i32, ptr @hx, align 4, !tbaa !5
  %282 = add nsw i32 %281, 1
  %283 = sext i32 %282 to i64
  %284 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %283) #6
  %285 = load i32, ptr @hy, align 4, !tbaa !5
  %286 = add nsw i32 %285, 2
  %287 = sext i32 %286 to i64
  %288 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %284, i64 noundef %287) #6
  %289 = load i32, ptr %288, align 4, !tbaa !5
  %290 = icmp eq i32 %289, 1
  %291 = zext i1 %290 to i64
  %292 = select i1 %290, i32 3, i32 2
  %293 = load i32, ptr @hx, align 4, !tbaa !5
  %294 = add nsw i32 %293, 1
  %295 = sext i32 %294 to i64
  %296 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %295) #6
  %297 = load i32, ptr @hy, align 4, !tbaa !5
  %298 = add nsw i32 %297, 2
  %299 = sext i32 %298 to i64
  %300 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %296, i64 noundef %299) #6
  store i32 %292, ptr %300, align 4, !tbaa !5
  br label %301

301:                                              ; preds = %280, %276, %272
  %302 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %303 = load i32, ptr %3, align 4, !tbaa !5
  %304 = add nsw i32 %303, 1
  store i32 %304, ptr %3, align 4, !tbaa !5
  %305 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %302, i32 noundef %303)
  %306 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %305, ptr noundef @.str.2)
  %307 = call noundef i32 @_Z14checkMoveHorsev()
  %308 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %306, i32 noundef %307)
  %309 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %308, ptr noundef @.str.3)
  %310 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %309, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %11, !llvm.loop !14

311:                                              ; preds = %21
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  ret i32 0

312:                                              ; preds = %53
  %313 = load ptr, ptr %8, align 8
  %314 = load i32, ptr %9, align 4
  %315 = insertvalue { ptr, i32 } poison, ptr %313, 0
  %316 = insertvalue { ptr, i32 } %315, i32 %314, 1
  resume { ptr, i32 } %316
}

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

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264)) #4 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1)) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIS_IiSaIiEESaIS1_EE6assignEmRKS1_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

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

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

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


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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }

@v = external dso_local global %"class.std::vector", align 8
@hx = external dso_local local_unnamed_addr global i32, align 4
@hy = external dso_local local_unnamed_addr global i32, align 4
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [16 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [15 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z14checkMoveHorsev() local_unnamed_addr #0

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

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i8, align 1
  %3 = alloca %"class.std::vector.0", align 8
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::allocator.2", align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #6
  %6 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %7 = load ptr, ptr %6, align 8, !tbaa !5
  %8 = getelementptr i8, ptr %7, i64 -24
  %9 = load i64, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr %6, i64 %9
  %11 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %10)
  %12 = load i32, ptr %1, align 4
  %13 = icmp ne i32 %12, 0
  %14 = select i1 %11, i1 %13, i1 false
  br i1 %14, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %0, %307
  %.0632 = phi i32 [ %309, %307 ], [ 1, %0 ]
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %2)
  %16 = load i32, ptr %1, align 4, !tbaa !8
  %17 = add nsw i32 %16, -1
  store i32 %17, ptr @hx, align 4, !tbaa !8
  %18 = load i8, ptr %2, align 1, !tbaa !11
  %19 = sext i8 %18 to i32
  %20 = add nsw i32 %19, -97
  store i32 %20, ptr @hy, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  store i32 0, ptr %4, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 8, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %21 unwind label %115

21:                                               ; preds = %.lr.ph
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EE6assignEmRKS1_(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef 8, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %22 unwind label %117

22:                                               ; preds = %21
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  %23 = load i32, ptr %1, align 4, !tbaa !8
  %24 = add nsw i32 %23, -1
  %25 = sext i32 %24 to i64
  %26 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %25) #6
  %27 = load i8, ptr %2, align 1, !tbaa !11
  %28 = sext i8 %27 to i64
  %29 = add nsw i64 %28, -97
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %29) #6
  store i32 2, ptr %30, align 4, !tbaa !8
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %32 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) %31, ptr noundef nonnull align 1 dereferenceable(1) %2)
  %33 = load i32, ptr %1, align 4, !tbaa !8
  %34 = add nsw i32 %33, -1
  %35 = sext i32 %34 to i64
  %36 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %35) #6
  %37 = load i8, ptr %2, align 1, !tbaa !11
  %38 = sext i8 %37 to i64
  %39 = add nsw i64 %38, -97
  %40 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %36, i64 noundef %39) #6
  store i32 1, ptr %40, align 4, !tbaa !8
  %41 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %42 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) %41, ptr noundef nonnull align 1 dereferenceable(1) %2)
  %43 = load i32, ptr %1, align 4, !tbaa !8
  %44 = add nsw i32 %43, -1
  %45 = sext i32 %44 to i64
  %46 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %45) #6
  %47 = load i8, ptr %2, align 1, !tbaa !11
  %48 = sext i8 %47 to i64
  %49 = add nsw i64 %48, -97
  %50 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %46, i64 noundef %49) #6
  store i32 1, ptr %50, align 4, !tbaa !8
  %51 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) %51, ptr noundef nonnull align 1 dereferenceable(1) %2)
  %53 = load i32, ptr %1, align 4, !tbaa !8
  %54 = add nsw i32 %53, -1
  %55 = sext i32 %54 to i64
  %56 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %55) #6
  %57 = load i8, ptr %2, align 1, !tbaa !11
  %58 = sext i8 %57 to i64
  %59 = add nsw i64 %58, -97
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %56, i64 noundef %59) #6
  store i32 1, ptr %60, align 4, !tbaa !8
  %61 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %62 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) %61, ptr noundef nonnull align 1 dereferenceable(1) %2)
  %63 = load i32, ptr %1, align 4, !tbaa !8
  %64 = add nsw i32 %63, -1
  %65 = sext i32 %64 to i64
  %66 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %65) #6
  %67 = load i8, ptr %2, align 1, !tbaa !11
  %68 = sext i8 %67 to i64
  %69 = add nsw i64 %68, -97
  %70 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %66, i64 noundef %69) #6
  store i32 1, ptr %70, align 4, !tbaa !8
  %71 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %72 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) %71, ptr noundef nonnull align 1 dereferenceable(1) %2)
  %73 = load i32, ptr %1, align 4, !tbaa !8
  %74 = add nsw i32 %73, -1
  %75 = sext i32 %74 to i64
  %76 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %75) #6
  %77 = load i8, ptr %2, align 1, !tbaa !11
  %78 = sext i8 %77 to i64
  %79 = add nsw i64 %78, -97
  %80 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %76, i64 noundef %79) #6
  store i32 1, ptr %80, align 4, !tbaa !8
  %81 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %82 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) %81, ptr noundef nonnull align 1 dereferenceable(1) %2)
  %83 = load i32, ptr %1, align 4, !tbaa !8
  %84 = add nsw i32 %83, -1
  %85 = sext i32 %84 to i64
  %86 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %85) #6
  %87 = load i8, ptr %2, align 1, !tbaa !11
  %88 = sext i8 %87 to i64
  %89 = add nsw i64 %88, -97
  %90 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %86, i64 noundef %89) #6
  store i32 1, ptr %90, align 4, !tbaa !8
  %91 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %92 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) %91, ptr noundef nonnull align 1 dereferenceable(1) %2)
  %93 = load i32, ptr %1, align 4, !tbaa !8
  %94 = add nsw i32 %93, -1
  %95 = sext i32 %94 to i64
  %96 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %95) #6
  %97 = load i8, ptr %2, align 1, !tbaa !11
  %98 = sext i8 %97 to i64
  %99 = add nsw i64 %98, -97
  %100 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %96, i64 noundef %99) #6
  store i32 1, ptr %100, align 4, !tbaa !8
  %101 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %102 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) %101, ptr noundef nonnull align 1 dereferenceable(1) %2)
  %103 = load i32, ptr %1, align 4, !tbaa !8
  %104 = add nsw i32 %103, -1
  %105 = sext i32 %104 to i64
  %106 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %105) #6
  %107 = load i8, ptr %2, align 1, !tbaa !11
  %108 = sext i8 %107 to i64
  %109 = add nsw i64 %108, -97
  %110 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %106, i64 noundef %109) #6
  store i32 1, ptr %110, align 4, !tbaa !8
  %111 = load i32, ptr @hx, align 4, !tbaa !8
  %112 = icmp sgt i32 %111, 1
  %113 = load i32, ptr @hy, align 4
  %114 = icmp sgt i32 %113, 0
  %or.cond = select i1 %112, i1 %114, i1 false
  br i1 %or.cond, label %120, label %139

115:                                              ; preds = %.lr.ph
  %116 = landingpad { ptr, i32 }
          cleanup
  br label %119

117:                                              ; preds = %21
  %118 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  br label %119

119:                                              ; preds = %117, %115
  %.pn = phi { ptr, i32 } [ %118, %117 ], [ %116, %115 ]
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn

120:                                              ; preds = %22
  %121 = add nsw i32 %111, -2
  %122 = zext nneg i32 %121 to i64
  %123 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %122) #6
  %124 = load i32, ptr @hy, align 4, !tbaa !8
  %125 = add nsw i32 %124, -1
  %126 = sext i32 %125 to i64
  %127 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %123, i64 noundef %126) #6
  %128 = load i32, ptr %127, align 4, !tbaa !8
  %129 = icmp eq i32 %128, 1
  %130 = select i1 %129, i32 3, i32 2
  %131 = load i32, ptr @hx, align 4, !tbaa !8
  %132 = add nsw i32 %131, -2
  %133 = sext i32 %132 to i64
  %134 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %133) #6
  %135 = load i32, ptr @hy, align 4, !tbaa !8
  %136 = add nsw i32 %135, -1
  %137 = sext i32 %136 to i64
  %138 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %134, i64 noundef %137) #6
  store i32 %130, ptr %138, align 4, !tbaa !8
  %.pre = load i32, ptr @hx, align 4, !tbaa !8
  %.pre33 = load i32, ptr @hy, align 4
  br label %139

139:                                              ; preds = %120, %22
  %140 = phi i32 [ %.pre33, %120 ], [ %113, %22 ]
  %141 = phi i32 [ %.pre, %120 ], [ %111, %22 ]
  %142 = icmp sgt i32 %141, 1
  %143 = icmp slt i32 %140, 7
  %or.cond18 = select i1 %142, i1 %143, i1 false
  br i1 %or.cond18, label %144, label %163

144:                                              ; preds = %139
  %145 = add nsw i32 %141, -2
  %146 = zext nneg i32 %145 to i64
  %147 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %146) #6
  %148 = load i32, ptr @hy, align 4, !tbaa !8
  %149 = add nsw i32 %148, 1
  %150 = sext i32 %149 to i64
  %151 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %147, i64 noundef %150) #6
  %152 = load i32, ptr %151, align 4, !tbaa !8
  %153 = icmp eq i32 %152, 1
  %154 = select i1 %153, i32 3, i32 2
  %155 = load i32, ptr @hx, align 4, !tbaa !8
  %156 = add nsw i32 %155, -2
  %157 = sext i32 %156 to i64
  %158 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %157) #6
  %159 = load i32, ptr @hy, align 4, !tbaa !8
  %160 = add nsw i32 %159, 1
  %161 = sext i32 %160 to i64
  %162 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %158, i64 noundef %161) #6
  store i32 %154, ptr %162, align 4, !tbaa !8
  %.pre34 = load i32, ptr @hx, align 4, !tbaa !8
  %.pre35 = load i32, ptr @hy, align 4
  br label %163

163:                                              ; preds = %144, %139
  %164 = phi i32 [ %.pre35, %144 ], [ %140, %139 ]
  %165 = phi i32 [ %.pre34, %144 ], [ %141, %139 ]
  %166 = icmp slt i32 %165, 6
  %167 = icmp sgt i32 %164, 0
  %or.cond20 = select i1 %166, i1 %167, i1 false
  br i1 %or.cond20, label %168, label %187

168:                                              ; preds = %163
  %169 = add nsw i32 %165, 2
  %170 = sext i32 %169 to i64
  %171 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %170) #6
  %172 = load i32, ptr @hy, align 4, !tbaa !8
  %173 = add nsw i32 %172, -1
  %174 = sext i32 %173 to i64
  %175 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %171, i64 noundef %174) #6
  %176 = load i32, ptr %175, align 4, !tbaa !8
  %177 = icmp eq i32 %176, 1
  %178 = select i1 %177, i32 3, i32 2
  %179 = load i32, ptr @hx, align 4, !tbaa !8
  %180 = add nsw i32 %179, 2
  %181 = sext i32 %180 to i64
  %182 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %181) #6
  %183 = load i32, ptr @hy, align 4, !tbaa !8
  %184 = add nsw i32 %183, -1
  %185 = sext i32 %184 to i64
  %186 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %182, i64 noundef %185) #6
  store i32 %178, ptr %186, align 4, !tbaa !8
  %.pre36 = load i32, ptr @hx, align 4, !tbaa !8
  %.pre37 = load i32, ptr @hy, align 4
  br label %187

187:                                              ; preds = %168, %163
  %188 = phi i32 [ %.pre37, %168 ], [ %164, %163 ]
  %189 = phi i32 [ %.pre36, %168 ], [ %165, %163 ]
  %190 = icmp slt i32 %189, 6
  %191 = icmp slt i32 %188, 7
  %or.cond22 = select i1 %190, i1 %191, i1 false
  br i1 %or.cond22, label %192, label %211

192:                                              ; preds = %187
  %193 = add nsw i32 %189, 2
  %194 = sext i32 %193 to i64
  %195 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %194) #6
  %196 = load i32, ptr @hy, align 4, !tbaa !8
  %197 = add nsw i32 %196, 1
  %198 = sext i32 %197 to i64
  %199 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %195, i64 noundef %198) #6
  %200 = load i32, ptr %199, align 4, !tbaa !8
  %201 = icmp eq i32 %200, 1
  %202 = select i1 %201, i32 3, i32 2
  %203 = load i32, ptr @hx, align 4, !tbaa !8
  %204 = add nsw i32 %203, 2
  %205 = sext i32 %204 to i64
  %206 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %205) #6
  %207 = load i32, ptr @hy, align 4, !tbaa !8
  %208 = add nsw i32 %207, 1
  %209 = sext i32 %208 to i64
  %210 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %206, i64 noundef %209) #6
  store i32 %202, ptr %210, align 4, !tbaa !8
  %.pre38 = load i32, ptr @hx, align 4, !tbaa !8
  %.pre39 = load i32, ptr @hy, align 4
  br label %211

211:                                              ; preds = %192, %187
  %212 = phi i32 [ %.pre39, %192 ], [ %188, %187 ]
  %213 = phi i32 [ %.pre38, %192 ], [ %189, %187 ]
  %214 = icmp sgt i32 %213, 0
  %215 = icmp sgt i32 %212, 1
  %or.cond24 = select i1 %214, i1 %215, i1 false
  br i1 %or.cond24, label %216, label %235

216:                                              ; preds = %211
  %217 = add nsw i32 %213, -1
  %218 = zext nneg i32 %217 to i64
  %219 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %218) #6
  %220 = load i32, ptr @hy, align 4, !tbaa !8
  %221 = add nsw i32 %220, -2
  %222 = sext i32 %221 to i64
  %223 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %219, i64 noundef %222) #6
  %224 = load i32, ptr %223, align 4, !tbaa !8
  %225 = icmp eq i32 %224, 1
  %226 = select i1 %225, i32 3, i32 2
  %227 = load i32, ptr @hx, align 4, !tbaa !8
  %228 = add nsw i32 %227, -1
  %229 = sext i32 %228 to i64
  %230 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %229) #6
  %231 = load i32, ptr @hy, align 4, !tbaa !8
  %232 = add nsw i32 %231, -2
  %233 = sext i32 %232 to i64
  %234 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %230, i64 noundef %233) #6
  store i32 %226, ptr %234, align 4, !tbaa !8
  %.pre40 = load i32, ptr @hx, align 4, !tbaa !8
  %.pre41 = load i32, ptr @hy, align 4
  br label %235

235:                                              ; preds = %216, %211
  %236 = phi i32 [ %.pre41, %216 ], [ %212, %211 ]
  %237 = phi i32 [ %.pre40, %216 ], [ %213, %211 ]
  %238 = icmp slt i32 %237, 7
  %239 = icmp sgt i32 %236, 1
  %or.cond26 = select i1 %238, i1 %239, i1 false
  br i1 %or.cond26, label %240, label %259

240:                                              ; preds = %235
  %241 = add nsw i32 %237, 1
  %242 = sext i32 %241 to i64
  %243 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %242) #6
  %244 = load i32, ptr @hy, align 4, !tbaa !8
  %245 = add nsw i32 %244, -2
  %246 = sext i32 %245 to i64
  %247 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %243, i64 noundef %246) #6
  %248 = load i32, ptr %247, align 4, !tbaa !8
  %249 = icmp eq i32 %248, 1
  %250 = select i1 %249, i32 3, i32 2
  %251 = load i32, ptr @hx, align 4, !tbaa !8
  %252 = add nsw i32 %251, 1
  %253 = sext i32 %252 to i64
  %254 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %253) #6
  %255 = load i32, ptr @hy, align 4, !tbaa !8
  %256 = add nsw i32 %255, -2
  %257 = sext i32 %256 to i64
  %258 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %254, i64 noundef %257) #6
  store i32 %250, ptr %258, align 4, !tbaa !8
  %.pre42 = load i32, ptr @hx, align 4, !tbaa !8
  %.pre43 = load i32, ptr @hy, align 4
  br label %259

259:                                              ; preds = %240, %235
  %260 = phi i32 [ %.pre43, %240 ], [ %236, %235 ]
  %261 = phi i32 [ %.pre42, %240 ], [ %237, %235 ]
  %262 = icmp sgt i32 %261, 0
  %263 = icmp slt i32 %260, 6
  %or.cond28 = select i1 %262, i1 %263, i1 false
  br i1 %or.cond28, label %264, label %283

264:                                              ; preds = %259
  %265 = add nsw i32 %261, -1
  %266 = zext nneg i32 %265 to i64
  %267 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %266) #6
  %268 = load i32, ptr @hy, align 4, !tbaa !8
  %269 = add nsw i32 %268, 2
  %270 = sext i32 %269 to i64
  %271 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %267, i64 noundef %270) #6
  %272 = load i32, ptr %271, align 4, !tbaa !8
  %273 = icmp eq i32 %272, 1
  %274 = select i1 %273, i32 3, i32 2
  %275 = load i32, ptr @hx, align 4, !tbaa !8
  %276 = add nsw i32 %275, -1
  %277 = sext i32 %276 to i64
  %278 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %277) #6
  %279 = load i32, ptr @hy, align 4, !tbaa !8
  %280 = add nsw i32 %279, 2
  %281 = sext i32 %280 to i64
  %282 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %278, i64 noundef %281) #6
  store i32 %274, ptr %282, align 4, !tbaa !8
  %.pre44 = load i32, ptr @hx, align 4, !tbaa !8
  %.pre45 = load i32, ptr @hy, align 4
  br label %283

283:                                              ; preds = %264, %259
  %284 = phi i32 [ %.pre45, %264 ], [ %260, %259 ]
  %285 = phi i32 [ %.pre44, %264 ], [ %261, %259 ]
  %286 = icmp slt i32 %285, 7
  %287 = icmp slt i32 %284, 6
  %or.cond30 = select i1 %286, i1 %287, i1 false
  br i1 %or.cond30, label %288, label %307

288:                                              ; preds = %283
  %289 = add nsw i32 %285, 1
  %290 = sext i32 %289 to i64
  %291 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %290) #6
  %292 = load i32, ptr @hy, align 4, !tbaa !8
  %293 = add nsw i32 %292, 2
  %294 = sext i32 %293 to i64
  %295 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %291, i64 noundef %294) #6
  %296 = load i32, ptr %295, align 4, !tbaa !8
  %297 = icmp eq i32 %296, 1
  %298 = select i1 %297, i32 3, i32 2
  %299 = load i32, ptr @hx, align 4, !tbaa !8
  %300 = add nsw i32 %299, 1
  %301 = sext i32 %300 to i64
  %302 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %301) #6
  %303 = load i32, ptr @hy, align 4, !tbaa !8
  %304 = add nsw i32 %303, 2
  %305 = sext i32 %304 to i64
  %306 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %302, i64 noundef %305) #6
  store i32 %298, ptr %306, align 4, !tbaa !8
  br label %307

307:                                              ; preds = %288, %283
  %308 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  %309 = add nuw nsw i32 %.0632, 1
  %310 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %308, i32 noundef %.0632)
  %311 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %310, ptr noundef nonnull @.str.2)
  %312 = call noundef i32 @_Z14checkMoveHorsev()
  %313 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %311, i32 noundef %312)
  %314 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %313, ptr noundef nonnull @.str.3)
  %315 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %314, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %316 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %317 = load ptr, ptr %316, align 8, !tbaa !5
  %318 = getelementptr i8, ptr %317, i64 -24
  %319 = load i64, ptr %318, align 8
  %320 = getelementptr inbounds i8, ptr %316, i64 %319
  %321 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %320)
  %322 = load i32, ptr %1, align 4
  %323 = icmp ne i32 %322, 0
  %324 = select i1 %321, i1 %323, i1 false
  br i1 %324, label %.lr.ph, label %._crit_edge, !llvm.loop !12

._crit_edge:                                      ; preds = %307, %0
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0
}

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

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264)) local_unnamed_addr #4 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIS_IiSaIiEESaIS1_EE6assignEmRKS1_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}


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