; LLVM IR from VastoLorde95/Competitive-Programming :: Hackerrank/101 Hacks/101 Hack 2016/101 Hack April/Problem E (E)

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

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

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@n = external dso_local global i64, align 8
@k = external dso_local global i64, align 8
@dp = external dso_local global [100100 x i64], align 16
@len = external dso_local global [100100 x i32], align 16
@cnt = external dso_local global [100100 x i64], align 16
@v = external dso_local global %"class.std::vector", align 8
@tbl = external dso_local global [100100 x %"class.std::vector.0"], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZL3inf = external hidden constant i32, align 4
@__FUNCTION__.main = external hidden unnamed_addr constant [5 x i8], align 1

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

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::vector", align 8
  %10 = alloca %"class.std::allocator", align 1
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca %"struct.std::pair", align 8
  %26 = alloca %"struct.std::pair.5", align 8
  %27 = alloca i32, align 4
  %28 = alloca %"class.std::vector", align 8
  %29 = alloca i32, align 4
  %30 = alloca %"class.__gnu_cxx::__normal_iterator.7", align 8
  %31 = alloca %"class.__gnu_cxx::__normal_iterator.7", align 8
  %32 = alloca i64, align 8
  %33 = alloca i64, align 8
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca %"class.std::vector", align 8
  store i32 0, ptr %1, align 4
  %38 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %39 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %40 = getelementptr i8, ptr %39, i64 -24
  %41 = load i64, ptr %40, align 8
  %42 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %41
  %43 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %42, ptr noundef null)
  %44 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %45 = getelementptr i8, ptr %44, i64 -24
  %46 = load i64, ptr %45, align 8
  %47 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %46
  %48 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %47, ptr noundef null)
  %49 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @n)
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %49, ptr noundef nonnull align 8 dereferenceable(8) @k)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 0, ptr %4, align 4, !tbaa !8
  br label %51

51:                                               ; preds = %61, %0
  %52 = load i32, ptr %4, align 4, !tbaa !8
  %53 = sext i32 %52 to i64
  %54 = load i64, ptr @n, align 8, !tbaa !11
  %55 = icmp slt i64 %53, %54
  br i1 %55, label %57, label %56

56:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %64

57:                                               ; preds = %51
  %58 = 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)
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @v, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %59 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %60 = load i32, ptr %59, align 4, !tbaa !8
  store i32 %60, ptr %3, align 4, !tbaa !8
  br label %61

61:                                               ; preds = %57
  %62 = load i32, ptr %4, align 4, !tbaa !8
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %4, align 4, !tbaa !8
  br label %51, !llvm.loop !13

64:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !8
  br label %65

65:                                               ; preds = %81, %64
  %66 = load i32, ptr %5, align 4, !tbaa !8
  %67 = sext i32 %66 to i64
  %68 = load i64, ptr @n, align 8, !tbaa !11
  %69 = icmp slt i64 %67, %68
  br i1 %69, label %71, label %70

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

71:                                               ; preds = %65
  %72 = load i32, ptr %3, align 4, !tbaa !8
  %73 = load i32, ptr %5, align 4, !tbaa !8
  %74 = sext i32 %73 to i64
  %75 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %74) #7
  %76 = load i32, ptr %75, align 4, !tbaa !8
  %77 = sub nsw i32 %72, %76
  %78 = load i32, ptr %5, align 4, !tbaa !8
  %79 = sext i32 %78 to i64
  %80 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %79) #7
  store i32 %77, ptr %80, align 4, !tbaa !8
  br label %81

81:                                               ; preds = %71
  %82 = load i32, ptr %5, align 4, !tbaa !8
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %5, align 4, !tbaa !8
  br label %65, !llvm.loop !15

84:                                               ; preds = %70
  %85 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @v) #7
  %86 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  store ptr %85, ptr %86, align 8
  %87 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @v) #7
  %88 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %7, i32 0, i32 0
  store ptr %87, ptr %88, align 8
  %89 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  %90 = load ptr, ptr %89, align 8
  %91 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %7, i32 0, i32 0
  %92 = load ptr, ptr %91, align 8
  call void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr %90, ptr %92)
  store i64 1, ptr @dp, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #7
  %93 = load i64, ptr @n, align 8, !tbaa !11
  %94 = add nsw i64 %93, 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #7
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %94, ptr noundef nonnull align 4 dereferenceable(4) @_ZL3inf, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %95 unwind label %102

95:                                               ; preds = %84
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !8
  br label %96

96:                                               ; preds = %183, %95
  %97 = load i32, ptr %13, align 4, !tbaa !8
  %98 = sext i32 %97 to i64
  %99 = load i64, ptr @n, align 8, !tbaa !11
  %100 = icmp slt i64 %98, %99
  br i1 %100, label %106, label %101

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

102:                                              ; preds = %84
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %11, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %12, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #7
  br label %418

106:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %107 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  %108 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  store ptr %107, ptr %108, align 8
  %109 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  %110 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %109, ptr %110, align 8
  %111 = load i32, ptr %13, align 4, !tbaa !8
  %112 = sext i32 %111 to i64
  %113 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %112) #7
  %114 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  %115 = load ptr, ptr %114, align 8
  %116 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  %117 = load ptr, ptr %116, align 8
  %118 = invoke ptr @_ZSt11lower_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_(ptr %115, ptr %117, ptr noundef nonnull align 4 dereferenceable(4) %113)
          to label %119 unwind label %173

119:                                              ; preds = %106
  %120 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %118, ptr %120, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %121 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  %122 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  store ptr %121, ptr %122, align 8
  %123 = call noundef i64 @_ZN9__gnu_cxxmiIPiSt6vectorIiSaIiEEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS8_SB_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %18) #7
  %124 = trunc i64 %123 to i32
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  store i32 %124, ptr %14, align 4, !tbaa !8
  %125 = load i32, ptr %13, align 4, !tbaa !8
  %126 = sext i32 %125 to i64
  %127 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %126) #7
  %128 = load i32, ptr %127, align 4, !tbaa !8
  %129 = load i32, ptr %14, align 4, !tbaa !8
  %130 = sext i32 %129 to i64
  %131 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %130) #7
  store i32 %128, ptr %131, align 4, !tbaa !8
  %132 = load i32, ptr %14, align 4, !tbaa !8
  %133 = add nsw i32 %132, 1
  %134 = load i64, ptr @n, align 8, !tbaa !11
  %135 = load i32, ptr %13, align 4, !tbaa !8
  %136 = sext i32 %135 to i64
  %137 = sub nsw i64 %134, %136
  %138 = sub nsw i64 %137, 1
  %139 = getelementptr inbounds [100100 x i32], ptr @len, i64 0, i64 %138
  store i32 %133, ptr %139, align 4, !tbaa !8
  %140 = load i32, ptr %14, align 4, !tbaa !8
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [100100 x i64], ptr @dp, i64 0, i64 %141
  %143 = load i64, ptr %142, align 8, !tbaa !11
  %144 = load i64, ptr @n, align 8, !tbaa !11
  %145 = load i32, ptr %13, align 4, !tbaa !8
  %146 = sext i32 %145 to i64
  %147 = sub nsw i64 %144, %146
  %148 = sub nsw i64 %147, 1
  %149 = getelementptr inbounds [100100 x i64], ptr @cnt, i64 0, i64 %148
  store i64 %143, ptr %149, align 8, !tbaa !11
  %150 = load i32, ptr %14, align 4, !tbaa !8
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [100100 x i64], ptr @dp, i64 0, i64 %151
  %153 = load i64, ptr %152, align 8, !tbaa !11
  %154 = load i32, ptr %14, align 4, !tbaa !8
  %155 = add nsw i32 %154, 1
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [100100 x i64], ptr @dp, i64 0, i64 %156
  %158 = load i64, ptr %157, align 8, !tbaa !11
  %159 = add nsw i64 %158, %153
  store i64 %159, ptr %157, align 8, !tbaa !11
  %160 = load i32, ptr %14, align 4, !tbaa !8
  %161 = add nsw i32 %160, 1
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [100100 x i64], ptr @dp, i64 0, i64 %162
  %164 = load i64, ptr %163, align 8, !tbaa !11
  %165 = load i64, ptr @k, align 8, !tbaa !11
  %166 = icmp sgt i64 %164, %165
  br i1 %166, label %167, label %177

167:                                              ; preds = %119
  %168 = load i64, ptr @k, align 8, !tbaa !11
  %169 = load i32, ptr %14, align 4, !tbaa !8
  %170 = add nsw i32 %169, 1
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [100100 x i64], ptr @dp, i64 0, i64 %171
  store i64 %168, ptr %172, align 8, !tbaa !11
  br label %177

173:                                              ; preds = %106
  %174 = landingpad { ptr, i32 }
          cleanup
  %175 = extractvalue { ptr, i32 } %174, 0
  store ptr %175, ptr %11, align 8
  %176 = extractvalue { ptr, i32 } %174, 1
  store i32 %176, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %190

177:                                              ; preds = %167, %119
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %178 = load i32, ptr %14, align 4, !tbaa !8
  %179 = add nsw i32 %178, 1
  store i32 %179, ptr %19, align 4, !tbaa !8
  %180 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %181 unwind label %186

181:                                              ; preds = %177
  %182 = load i32, ptr %180, align 4, !tbaa !8
  store i32 %182, ptr %8, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %183

183:                                              ; preds = %181
  %184 = load i32, ptr %13, align 4, !tbaa !8
  %185 = add nsw i32 %184, 1
  store i32 %185, ptr %13, align 4, !tbaa !8
  br label %96, !llvm.loop !16

186:                                              ; preds = %177
  %187 = landingpad { ptr, i32 }
          cleanup
  %188 = extractvalue { ptr, i32 } %187, 0
  store ptr %188, ptr %11, align 8
  %189 = extractvalue { ptr, i32 } %187, 1
  store i32 %189, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %190

190:                                              ; preds = %186, %173
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %417

191:                                              ; preds = %101
  %192 = load i32, ptr %8, align 4, !tbaa !8
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [100100 x i64], ptr @dp, i64 0, i64 %193
  %195 = load i64, ptr %194, align 8, !tbaa !11
  %196 = load i64, ptr @k, align 8, !tbaa !11
  %197 = icmp slt i64 %195, %196
  br i1 %197, label %198, label %207

198:                                              ; preds = %191
  %199 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
          to label %200 unwind label %203

200:                                              ; preds = %198
  %201 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %199, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %202 unwind label %203

202:                                              ; preds = %200
  store i32 0, ptr %1, align 4
  store i32 1, ptr %20, align 4
  br label %415

203:                                              ; preds = %207, %200, %198
  %204 = landingpad { ptr, i32 }
          cleanup
  %205 = extractvalue { ptr, i32 } %204, 0
  store ptr %205, ptr %11, align 8
  %206 = extractvalue { ptr, i32 } %204, 1
  store i32 %206, ptr %12, align 4
  br label %417

207:                                              ; preds = %191
  %208 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @v) #7
  %209 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  store ptr %208, ptr %209, align 8
  %210 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @v) #7
  %211 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  store ptr %210, ptr %211, align 8
  %212 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  %213 = load ptr, ptr %212, align 8
  %214 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  %215 = load ptr, ptr %214, align 8
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr %213, ptr %215)
          to label %216 unwind label %203

216:                                              ; preds = %207
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  store i32 0, ptr %23, align 4, !tbaa !8
  br label %217

217:                                              ; preds = %233, %216
  %218 = load i32, ptr %23, align 4, !tbaa !8
  %219 = sext i32 %218 to i64
  %220 = load i64, ptr @n, align 8, !tbaa !11
  %221 = icmp slt i64 %219, %220
  br i1 %221, label %223, label %222

222:                                              ; preds = %217
  store i32 11, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %236

223:                                              ; preds = %217
  %224 = load i32, ptr %3, align 4, !tbaa !8
  %225 = load i32, ptr %23, align 4, !tbaa !8
  %226 = sext i32 %225 to i64
  %227 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %226) #7
  %228 = load i32, ptr %227, align 4, !tbaa !8
  %229 = sub nsw i32 %224, %228
  %230 = load i32, ptr %23, align 4, !tbaa !8
  %231 = sext i32 %230 to i64
  %232 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %231) #7
  store i32 %229, ptr %232, align 4, !tbaa !8
  br label %233

233:                                              ; preds = %223
  %234 = load i32, ptr %23, align 4, !tbaa !8
  %235 = add nsw i32 %234, 1
  store i32 %235, ptr %23, align 4, !tbaa !8
  br label %217, !llvm.loop !17

236:                                              ; preds = %222
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  store i32 0, ptr %24, align 4, !tbaa !8
  br label %237

237:                                              ; preds = %264, %236
  %238 = load i32, ptr %24, align 4, !tbaa !8
  %239 = sext i32 %238 to i64
  %240 = load i64, ptr @n, align 8, !tbaa !11
  %241 = icmp slt i64 %239, %240
  br i1 %241, label %243, label %242

242:                                              ; preds = %237
  store i32 14, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %271

243:                                              ; preds = %237
  %244 = load i32, ptr %24, align 4, !tbaa !8
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds [100100 x i32], ptr @len, i64 0, i64 %245
  %247 = load i32, ptr %246, align 4, !tbaa !8
  %248 = sext i32 %247 to i64
  %249 = getelementptr inbounds [100100 x %"class.std::vector.0"], ptr @tbl, i64 0, i64 %248
  call void @llvm.lifetime.start.p0(i64 24, ptr %25) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #7
  %250 = load i32, ptr %24, align 4, !tbaa !8
  %251 = sext i32 %250 to i64
  %252 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %251) #7
  %253 = load i32, ptr %24, align 4, !tbaa !8
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds [100100 x i64], ptr @cnt, i64 0, i64 %254
  %256 = invoke { i32, i64 } @_ZSt9make_pairIRiRxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4) %252, ptr noundef nonnull align 8 dereferenceable(8) %255)
          to label %257 unwind label %267

257:                                              ; preds = %243
  %258 = getelementptr inbounds { i32, i64 }, ptr %26, i32 0, i32 0
  %259 = extractvalue { i32, i64 } %256, 0
  store i32 %259, ptr %258, align 8
  %260 = getelementptr inbounds { i32, i64 }, ptr %26, i32 0, i32 1
  %261 = extractvalue { i32, i64 } %256, 1
  store i64 %261, ptr %260, align 8
  invoke void @_ZSt9make_pairISt4pairIixERiES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind writable sret(%"struct.std::pair") align 8 %25, ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %262 unwind label %267

262:                                              ; preds = %257
  invoke void @_ZNSt6vectorISt4pairIS0_IixEiESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %249, ptr noundef nonnull align 8 dereferenceable(20) %25)
          to label %263 unwind label %267

263:                                              ; preds = %262
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #7
  br label %264

264:                                              ; preds = %263
  %265 = load i32, ptr %24, align 4, !tbaa !8
  %266 = add nsw i32 %265, 1
  store i32 %266, ptr %24, align 4, !tbaa !8
  br label %237, !llvm.loop !18

267:                                              ; preds = %262, %257, %243
  %268 = landingpad { ptr, i32 }
          cleanup
  %269 = extractvalue { ptr, i32 } %268, 0
  store ptr %269, ptr %11, align 8
  %270 = extractvalue { ptr, i32 } %268, 1
  store i32 %270, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %417

271:                                              ; preds = %242
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  store i32 0, ptr %27, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 24, ptr %28) #7
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #7
  %272 = load i32, ptr %8, align 4, !tbaa !8
  store i32 %272, ptr %29, align 4, !tbaa !8
  br label %273

273:                                              ; preds = %381, %271
  %274 = load i32, ptr %29, align 4, !tbaa !8
  %275 = icmp sgt i32 %274, 0
  br i1 %275, label %277, label %276

276:                                              ; preds = %273
  store i32 17, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  br label %385

277:                                              ; preds = %273
  %278 = load i32, ptr %29, align 4, !tbaa !8
  %279 = sext i32 %278 to i64
  %280 = getelementptr inbounds [100100 x %"class.std::vector.0"], ptr @tbl, i64 0, i64 %279
  %281 = call ptr @_ZNSt6vectorISt4pairIS0_IixEiESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %280) #7
  %282 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.7", ptr %30, i32 0, i32 0
  store ptr %281, ptr %282, align 8
  %283 = load i32, ptr %29, align 4, !tbaa !8
  %284 = sext i32 %283 to i64
  %285 = getelementptr inbounds [100100 x %"class.std::vector.0"], ptr @tbl, i64 0, i64 %284
  %286 = call ptr @_ZNSt6vectorISt4pairIS0_IixEiESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %285) #7
  %287 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.7", ptr %31, i32 0, i32 0
  store ptr %286, ptr %287, align 8
  %288 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.7", ptr %30, i32 0, i32 0
  %289 = load ptr, ptr %288, align 8
  %290 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.7", ptr %31, i32 0, i32 0
  %291 = load ptr, ptr %290, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIS2_IixEiESt6vectorIS4_SaIS4_EEEEEvT_SA_(ptr %289, ptr %291)
          to label %292 unwind label %302

292:                                              ; preds = %277
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #7
  store i64 0, ptr %32, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #7
  store i32 0, ptr %34, align 4, !tbaa !8
  br label %293

293:                                              ; preds = %376, %292
  %294 = load i32, ptr %34, align 4, !tbaa !8
  %295 = sext i32 %294 to i64
  %296 = load i32, ptr %29, align 4, !tbaa !8
  %297 = sext i32 %296 to i64
  %298 = getelementptr inbounds [100100 x %"class.std::vector.0"], ptr @tbl, i64 0, i64 %297
  %299 = call noundef i64 @_ZNKSt6vectorISt4pairIS0_IixEiESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %298) #7
  %300 = icmp ult i64 %295, %299
  br i1 %300, label %306, label %301

301:                                              ; preds = %293
  store i32 20, ptr %20, align 4
  br label %379

302:                                              ; preds = %277
  %303 = landingpad { ptr, i32 }
          cleanup
  %304 = extractvalue { ptr, i32 } %303, 0
  store ptr %304, ptr %11, align 8
  %305 = extractvalue { ptr, i32 } %303, 1
  store i32 %305, ptr %12, align 4
  br label %384

306:                                              ; preds = %293
  %307 = load i32, ptr %29, align 4, !tbaa !8
  %308 = sext i32 %307 to i64
  %309 = getelementptr inbounds [100100 x %"class.std::vector.0"], ptr @tbl, i64 0, i64 %308
  %310 = load i32, ptr %34, align 4, !tbaa !8
  %311 = sext i32 %310 to i64
  %312 = call noundef nonnull align 8 dereferenceable(20) ptr @_ZNSt6vectorISt4pairIS0_IixEiESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %309, i64 noundef %311) #7
  %313 = getelementptr inbounds %"struct.std::pair", ptr %312, i32 0, i32 1
  %314 = load i32, ptr %313, align 8, !tbaa !19
  %315 = load i32, ptr %27, align 4, !tbaa !8
  %316 = icmp slt i32 %314, %315
  br i1 %316, label %317, label %318

317:                                              ; preds = %306
  br label %376

318:                                              ; preds = %306
  %319 = call noundef zeroext i1 @_ZNKSt6vectorIiSaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %28) #7
  br i1 %319, label %334, label %320

320:                                              ; preds = %318
  %321 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %28) #7
  %322 = load i32, ptr %321, align 4, !tbaa !8
  %323 = load i32, ptr %29, align 4, !tbaa !8
  %324 = sext i32 %323 to i64
  %325 = getelementptr inbounds [100100 x %"class.std::vector.0"], ptr @tbl, i64 0, i64 %324
  %326 = load i32, ptr %34, align 4, !tbaa !8
  %327 = sext i32 %326 to i64
  %328 = call noundef nonnull align 8 dereferenceable(20) ptr @_ZNSt6vectorISt4pairIS0_IixEiESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %325, i64 noundef %327) #7
  %329 = getelementptr inbounds %"struct.std::pair", ptr %328, i32 0, i32 0
  %330 = getelementptr inbounds %"struct.std::pair.5", ptr %329, i32 0, i32 0
  %331 = load i32, ptr %330, align 8, !tbaa !22
  %332 = icmp sge i32 %322, %331
  br i1 %332, label %333, label %334

333:                                              ; preds = %320
  br label %376

334:                                              ; preds = %320, %318
  %335 = load i64, ptr %32, align 8, !tbaa !11
  %336 = load i32, ptr %29, align 4, !tbaa !8
  %337 = sext i32 %336 to i64
  %338 = getelementptr inbounds [100100 x %"class.std::vector.0"], ptr @tbl, i64 0, i64 %337
  %339 = load i32, ptr %34, align 4, !tbaa !8
  %340 = sext i32 %339 to i64
  %341 = call noundef nonnull align 8 dereferenceable(20) ptr @_ZNSt6vectorISt4pairIS0_IixEiESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %338, i64 noundef %340) #7
  %342 = getelementptr inbounds %"struct.std::pair", ptr %341, i32 0, i32 0
  %343 = getelementptr inbounds %"struct.std::pair.5", ptr %342, i32 0, i32 1
  %344 = load i64, ptr %343, align 8, !tbaa !23
  %345 = add nsw i64 %335, %344
  store i64 %345, ptr %33, align 8, !tbaa !11
  %346 = load i64, ptr %33, align 8, !tbaa !11
  %347 = load i64, ptr @k, align 8, !tbaa !11
  %348 = icmp sge i64 %346, %347
  br i1 %348, label %349, label %374

349:                                              ; preds = %334
  %350 = load i32, ptr %29, align 4, !tbaa !8
  %351 = sext i32 %350 to i64
  %352 = getelementptr inbounds [100100 x %"class.std::vector.0"], ptr @tbl, i64 0, i64 %351
  %353 = load i32, ptr %34, align 4, !tbaa !8
  %354 = sext i32 %353 to i64
  %355 = call noundef nonnull align 8 dereferenceable(20) ptr @_ZNSt6vectorISt4pairIS0_IixEiESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %352, i64 noundef %354) #7
  %356 = getelementptr inbounds %"struct.std::pair", ptr %355, i32 0, i32 0
  %357 = getelementptr inbounds %"struct.std::pair.5", ptr %356, i32 0, i32 0
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %28, ptr noundef nonnull align 4 dereferenceable(4) %357)
          to label %358 unwind label %370

358:                                              ; preds = %349
  %359 = load i64, ptr %32, align 8, !tbaa !11
  %360 = load i64, ptr @k, align 8, !tbaa !11
  %361 = sub nsw i64 %360, %359
  store i64 %361, ptr @k, align 8, !tbaa !11
  %362 = load i32, ptr %29, align 4, !tbaa !8
  %363 = sext i32 %362 to i64
  %364 = getelementptr inbounds [100100 x %"class.std::vector.0"], ptr @tbl, i64 0, i64 %363
  %365 = load i32, ptr %34, align 4, !tbaa !8
  %366 = sext i32 %365 to i64
  %367 = call noundef nonnull align 8 dereferenceable(20) ptr @_ZNSt6vectorISt4pairIS0_IixEiESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %364, i64 noundef %366) #7
  %368 = getelementptr inbounds %"struct.std::pair", ptr %367, i32 0, i32 1
  %369 = load i32, ptr %368, align 8, !tbaa !19
  store i32 %369, ptr %27, align 4, !tbaa !8
  store i32 20, ptr %20, align 4
  br label %379

370:                                              ; preds = %349
  %371 = landingpad { ptr, i32 }
          cleanup
  %372 = extractvalue { ptr, i32 } %371, 0
  store ptr %372, ptr %11, align 8
  %373 = extractvalue { ptr, i32 } %371, 1
  store i32 %373, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #7
  br label %384

374:                                              ; preds = %334
  %375 = load i64, ptr %33, align 8, !tbaa !11
  store i64 %375, ptr %32, align 8, !tbaa !11
  br label %376

376:                                              ; preds = %374, %333, %317
  %377 = load i32, ptr %34, align 4, !tbaa !8
  %378 = add nsw i32 %377, 1
  store i32 %378, ptr %34, align 4, !tbaa !8
  br label %293, !llvm.loop !24

379:                                              ; preds = %358, %301
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #7
  br label %380

380:                                              ; preds = %379
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #7
  br label %381

381:                                              ; preds = %380
  %382 = load i32, ptr %29, align 4, !tbaa !8
  %383 = add nsw i32 %382, -1
  store i32 %383, ptr %29, align 4, !tbaa !8
  br label %273, !llvm.loop !25

384:                                              ; preds = %370, %302
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  br label %414

385:                                              ; preds = %276
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #7
  %386 = load i32, ptr %8, align 4, !tbaa !8
  store i32 %386, ptr %35, align 4, !tbaa !8
  br label %387

387:                                              ; preds = %396, %385
  %388 = load i32, ptr %35, align 4, !tbaa !8
  %389 = icmp sgt i32 %388, 0
  br i1 %389, label %391, label %390

390:                                              ; preds = %387
  store i32 23, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #7
  br label %403

391:                                              ; preds = %387
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #7
  store i32 116, ptr %36, align 4, !tbaa !8
  %392 = load i32, ptr %35, align 4, !tbaa !8
  %393 = sext i32 %392 to i64
  %394 = getelementptr inbounds [100100 x %"class.std::vector.0"], ptr @tbl, i64 0, i64 %393
  invoke void @_Z2trIPKcJiiSt6vectorISt4pairIS3_IixEiESaIS5_EEEEvT_DpRKT0_(ptr noundef @__FUNCTION__.main, ptr noundef nonnull align 4 dereferenceable(4) %36, ptr noundef nonnull align 4 dereferenceable(4) %35, ptr noundef nonnull align 8 dereferenceable(24) %394)
          to label %395 unwind label %399

395:                                              ; preds = %391
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #7
  br label %396

396:                                              ; preds = %395
  %397 = load i32, ptr %35, align 4, !tbaa !8
  %398 = add nsw i32 %397, -1
  store i32 %398, ptr %35, align 4, !tbaa !8
  br label %387, !llvm.loop !26

399:                                              ; preds = %391
  %400 = landingpad { ptr, i32 }
          cleanup
  %401 = extractvalue { ptr, i32 } %400, 0
  store ptr %401, ptr %11, align 8
  %402 = extractvalue { ptr, i32 } %400, 1
  store i32 %402, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #7
  br label %414

403:                                              ; preds = %390
  invoke void @_ZNSt6vectorIiSaIiEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %37, ptr noundef nonnull align 8 dereferenceable(24) %28)
          to label %404 unwind label %406

404:                                              ; preds = %403
  invoke void @_Z2trISt6vectorIiSaIiEEJEEvT_DpRKT0_(ptr noundef %37)
          to label %405 unwind label %410

405:                                              ; preds = %404
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %37) #7
  store i32 0, ptr %1, align 4
  store i32 1, ptr %20, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  br label %415

406:                                              ; preds = %403
  %407 = landingpad { ptr, i32 }
          cleanup
  %408 = extractvalue { ptr, i32 } %407, 0
  store ptr %408, ptr %11, align 8
  %409 = extractvalue { ptr, i32 } %407, 1
  store i32 %409, ptr %12, align 4
  br label %414

410:                                              ; preds = %404
  %411 = landingpad { ptr, i32 }
          cleanup
  %412 = extractvalue { ptr, i32 } %411, 0
  store ptr %412, ptr %11, align 8
  %413 = extractvalue { ptr, i32 } %411, 1
  store i32 %413, ptr %12, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %37) #7
  br label %414

414:                                              ; preds = %410, %406, %399, %384
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  br label %417

415:                                              ; preds = %405, %202
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %416 = load i32, ptr %1, align 4
  ret i32 %416

417:                                              ; preds = %414, %267, %203, %190
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  br label %418

418:                                              ; preds = %417, %102
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %419

419:                                              ; preds = %418
  %420 = load ptr, ptr %11, align 8
  %421 = load i32, ptr %12, align 4
  %422 = insertvalue { ptr, i32 } poison, ptr %420, 0
  %423 = insertvalue { ptr, i32 } %422, i32 %421, 1
  resume { ptr, i32 } %423
}

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairISt4pairIixERiES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #0

; Function Attrs: mustprogress uwtable
declare dso_local { i32, i64 } @_ZSt9make_pairIRiRxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) #0

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorIiSaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2trISt6vectorIiSaIiEEJEEvT_DpRKT0_(ptr noundef) #0

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = !{!20, !9, i64 16}
!20 = !{!"_ZTSSt4pairIS_IixEiE", !21, i64 0, !9, i64 16}
!21 = !{!"_ZTSSt4pairIixE", !9, i64 0, !12, i64 8}
!22 = !{!20, !9, i64 0}
!23 = !{!20, !12, i64 8}
!24 = distinct !{!24, !14}
!25 = distinct !{!25, !14}
!26 = distinct !{!26, !14}


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

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

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@n = external dso_local global i64, align 8
@k = external dso_local global i64, align 8
@dp = external dso_local local_unnamed_addr global [100100 x i64], align 16
@len = external dso_local local_unnamed_addr global [100100 x i32], align 16
@cnt = external dso_local global [100100 x i64], align 16
@v = external dso_local global %"class.std::vector", align 8
@tbl = external dso_local global [100100 x %"class.std::vector.0"], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZL3inf = external hidden constant i32, align 4
@__FUNCTION__.main = external hidden unnamed_addr constant [5 x i8], align 1

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

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"struct.std::pair", align 8
  %11 = alloca %"struct.std::pair.5", align 8
  %12 = alloca %"class.std::vector", align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"class.std::vector", align 8
  %16 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %17 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %18 = getelementptr i8, ptr %17, i64 -24
  %19 = load i64, ptr %18, align 8
  %20 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %19
  %21 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %20, ptr noundef null)
  %22 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %23 = getelementptr i8, ptr %22, i64 -24
  %24 = load i64, ptr %23, align 8
  %25 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %24
  %26 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %25, ptr noundef null)
  %27 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @n)
  %28 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 8 dereferenceable(8) @k)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  store i32 0, ptr %2, align 4, !tbaa !8
  %29 = load i64, ptr @n, align 8, !tbaa !11
  %30 = icmp sgt i64 %29, 0
  br i1 %30, label %.lr.ph, label %._crit_edge

.preheader85:                                     ; preds = %.lr.ph
  %31 = icmp sgt i64 %35, 0
  br i1 %31, label %.lr.ph90, label %._crit_edge

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %32 = 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)
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @v, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %34 = load i32, ptr %33, align 4, !tbaa !8
  store i32 %34, ptr %2, align 4, !tbaa !8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %35 = load i64, ptr @n, align 8, !tbaa !11
  %36 = icmp sgt i64 %35, %indvars.iv.next
  br i1 %36, label %.lr.ph, label %.preheader85, !llvm.loop !13

._crit_edge:                                      ; preds = %.lr.ph90, %0, %.preheader85
  %37 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @v) #8
  %38 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @v) #8
  call void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr %37, ptr %38)
  store i64 1, ptr @dp, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  store i32 0, ptr %3, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #8
  %39 = load i64, ptr @n, align 8, !tbaa !11
  %40 = add nsw i64 %39, 1
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #8
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #8
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %40, ptr noundef nonnull align 4 dereferenceable(4) @_ZL3inf, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %48 unwind label %57

.lr.ph90:                                         ; preds = %.preheader85, %.lr.ph90
  %indvars.iv117 = phi i64 [ %indvars.iv.next118, %.lr.ph90 ], [ 0, %.preheader85 ]
  %41 = load i32, ptr %2, align 4, !tbaa !8
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %indvars.iv117) #8
  %43 = load i32, ptr %42, align 4, !tbaa !8
  %44 = sub nsw i32 %41, %43
  %45 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %indvars.iv117) #8
  store i32 %44, ptr %45, align 4, !tbaa !8
  %indvars.iv.next118 = add nuw nsw i64 %indvars.iv117, 1
  %46 = load i64, ptr @n, align 8, !tbaa !11
  %47 = icmp sgt i64 %46, %indvars.iv.next118
  br i1 %47, label %.lr.ph90, label %._crit_edge, !llvm.loop !15

48:                                               ; preds = %._crit_edge
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #8
  %49 = load i64, ptr @n, align 8, !tbaa !11
  %50 = icmp sgt i64 %49, 0
  br i1 %50, label %.lr.ph93, label %.._crit_edge94_crit_edge

.._crit_edge94_crit_edge:                         ; preds = %48
  %.pre = load i32, ptr %3, align 4, !tbaa !8
  br label %._crit_edge94

._crit_edge94:                                    ; preds = %63, %.._crit_edge94_crit_edge
  %51 = phi i32 [ %.pre, %.._crit_edge94_crit_edge ], [ %85, %63 ]
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [100100 x i64], ptr @dp, i64 0, i64 %52
  %54 = load i64, ptr %53, align 8, !tbaa !11
  %55 = load i64, ptr @k, align 8, !tbaa !11
  %56 = icmp slt i64 %54, %55
  br i1 %56, label %90, label %96

57:                                               ; preds = %._crit_edge
  %58 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #8
  br label %191

.lr.ph93:                                         ; preds = %48, %63
  %indvars.iv120 = phi i64 [ %indvars.iv.next121, %63 ], [ 0, %48 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %59 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  %60 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  %61 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %indvars.iv120) #8
  %62 = invoke ptr @_ZSt11lower_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_(ptr %59, ptr %60, ptr noundef nonnull align 4 dereferenceable(4) %61)
          to label %63 unwind label %88

63:                                               ; preds = %.lr.ph93
  store ptr %62, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  %64 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  store ptr %64, ptr %7, align 8
  %65 = call noundef i64 @_ZN9__gnu_cxxmiIPiSt6vectorIiSaIiEEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS8_SB_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  %66 = trunc i64 %65 to i32
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  %67 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %indvars.iv120) #8
  %68 = load i32, ptr %67, align 4, !tbaa !8
  %sext = shl i64 %65, 32
  %69 = ashr exact i64 %sext, 32
  %70 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %69) #8
  store i32 %68, ptr %70, align 4, !tbaa !8
  %71 = add nsw i32 %66, 1
  %72 = load i64, ptr @n, align 8, !tbaa !11
  %73 = xor i64 %indvars.iv120, -1
  %74 = add i64 %72, %73
  %75 = getelementptr inbounds [100100 x i32], ptr @len, i64 0, i64 %74
  store i32 %71, ptr %75, align 4, !tbaa !8
  %76 = getelementptr inbounds [100100 x i64], ptr @dp, i64 0, i64 %69
  %77 = load i64, ptr %76, align 8, !tbaa !11
  %78 = getelementptr inbounds [100100 x i64], ptr @cnt, i64 0, i64 %74
  store i64 %77, ptr %78, align 8, !tbaa !11
  %79 = sext i32 %71 to i64
  %80 = getelementptr inbounds [100100 x i64], ptr @dp, i64 0, i64 %79
  %81 = load i64, ptr %80, align 8, !tbaa !11
  %82 = add nsw i64 %81, %77
  %83 = load i64, ptr @k, align 8, !tbaa !11
  %spec.store.select = call i64 @llvm.smin.i64(i64 %82, i64 %83)
  store i64 %spec.store.select, ptr %80, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #8
  store i32 %71, ptr %8, align 4, !tbaa !8
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %85 = load i32, ptr %84, align 4, !tbaa !8
  store i32 %85, ptr %3, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  %indvars.iv.next121 = add nuw nsw i64 %indvars.iv120, 1
  %86 = load i64, ptr @n, align 8, !tbaa !11
  %87 = icmp sgt i64 %86, %indvars.iv.next121
  br i1 %87, label %.lr.ph93, label %._crit_edge94, !llvm.loop !16

88:                                               ; preds = %.lr.ph93
  %89 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  br label %190

90:                                               ; preds = %._crit_edge94
  %91 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
          to label %92 unwind label %94

92:                                               ; preds = %90
  %93 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %91, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %189 unwind label %94

94:                                               ; preds = %96, %92, %90
  %95 = landingpad { ptr, i32 }
          cleanup
  br label %190

96:                                               ; preds = %._crit_edge94
  %97 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @v) #8
  %98 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @v) #8
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr %97, ptr %98)
          to label %.preheader84 unwind label %94

.preheader84:                                     ; preds = %96
  %99 = load i64, ptr @n, align 8, !tbaa !11
  %100 = icmp sgt i64 %99, 0
  br i1 %100, label %.lr.ph96, label %._crit_edge97.thread

._crit_edge97.thread:                             ; preds = %.preheader84
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #8
  br label %._crit_edge100

._crit_edge97:                                    ; preds = %.lr.ph96
  %101 = icmp sgt i64 %108, 0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #8
  store i32 0, ptr %9, align 4, !tbaa !8
  br i1 %101, label %.lr.ph99, label %._crit_edge100

.lr.ph99:                                         ; preds = %._crit_edge97
  %102 = getelementptr inbounds i8, ptr %11, i64 8
  br label %113

.lr.ph96:                                         ; preds = %.preheader84, %.lr.ph96
  %indvars.iv123 = phi i64 [ %indvars.iv.next124, %.lr.ph96 ], [ 0, %.preheader84 ]
  %103 = load i32, ptr %2, align 4, !tbaa !8
  %104 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %indvars.iv123) #8
  %105 = load i32, ptr %104, align 4, !tbaa !8
  %106 = sub nsw i32 %103, %105
  %107 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %indvars.iv123) #8
  store i32 %106, ptr %107, align 4, !tbaa !8
  %indvars.iv.next124 = add nuw nsw i64 %indvars.iv123, 1
  %108 = load i64, ptr @n, align 8, !tbaa !11
  %109 = icmp sgt i64 %108, %indvars.iv.next124
  br i1 %109, label %.lr.ph96, label %._crit_edge97, !llvm.loop !17

._crit_edge100:                                   ; preds = %128, %._crit_edge97.thread, %._crit_edge97
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #8
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  %110 = load i32, ptr %3, align 4, !tbaa !8
  %111 = icmp sgt i32 %110, 0
  br i1 %111, label %.lr.ph107.preheader, label %._crit_edge108.thread

._crit_edge108.thread:                            ; preds = %._crit_edge100
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #8
  br label %._crit_edge112

.lr.ph107.preheader:                              ; preds = %._crit_edge100
  %112 = zext nneg i32 %110 to i64
  br label %.lr.ph107

113:                                              ; preds = %.lr.ph99, %128
  %114 = phi i64 [ 0, %.lr.ph99 ], [ %131, %128 ]
  %115 = getelementptr inbounds [100100 x i32], ptr @len, i64 0, i64 %114
  %116 = load i32, ptr %115, align 4, !tbaa !8
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [100100 x %"class.std::vector.0"], ptr @tbl, i64 0, i64 %117
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #8
  %119 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %114) #8
  %120 = load i32, ptr %9, align 4, !tbaa !8
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [100100 x i64], ptr @cnt, i64 0, i64 %121
  %123 = invoke { i32, i64 } @_ZSt9make_pairIRiRxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4) %119, ptr noundef nonnull align 8 dereferenceable(8) %122)
          to label %124 unwind label %134

124:                                              ; preds = %113
  %125 = extractvalue { i32, i64 } %123, 0
  store i32 %125, ptr %11, align 8
  %126 = extractvalue { i32, i64 } %123, 1
  store i64 %126, ptr %102, align 8
  invoke void @_ZSt9make_pairISt4pairIixERiES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair") align 8 %10, ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %127 unwind label %134

127:                                              ; preds = %124
  invoke void @_ZNSt6vectorISt4pairIS0_IixEiESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %118, ptr noundef nonnull align 8 dereferenceable(20) %10)
          to label %128 unwind label %134

128:                                              ; preds = %127
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #8
  %129 = load i32, ptr %9, align 4, !tbaa !8
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %9, align 4, !tbaa !8
  %131 = sext i32 %130 to i64
  %132 = load i64, ptr @n, align 8, !tbaa !11
  %133 = icmp sgt i64 %132, %131
  br i1 %133, label %113, label %._crit_edge100, !llvm.loop !18

134:                                              ; preds = %127, %124, %113
  %135 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  br label %190

._crit_edge108:                                   ; preds = %.loopexit
  %.pre132 = load i32, ptr %3, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #8
  store i32 %.pre132, ptr %13, align 4, !tbaa !8
  %136 = icmp sgt i32 %.pre132, 0
  br i1 %136, label %.lr.ph111, label %._crit_edge112

.lr.ph107:                                        ; preds = %.lr.ph107.preheader, %.loopexit
  %indvars.iv129 = phi i64 [ %112, %.lr.ph107.preheader ], [ %indvars.iv.next130, %.loopexit ]
  %.060104 = phi i32 [ 0, %.lr.ph107.preheader ], [ %.161, %.loopexit ]
  %137 = getelementptr inbounds [100100 x %"class.std::vector.0"], ptr @tbl, i64 0, i64 %indvars.iv129
  %138 = call ptr @_ZNSt6vectorISt4pairIS0_IixEiESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %137) #8
  %139 = call ptr @_ZNSt6vectorISt4pairIS0_IixEiESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %137) #8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIS2_IixEiESt6vectorIS4_SaIS4_EEEEEvT_SA_(ptr %138, ptr %139)
          to label %.preheader unwind label %141

.preheader:                                       ; preds = %.lr.ph107
  %140 = call noundef i64 @_ZNKSt6vectorISt4pairIS0_IixEiESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %137) #8
  %.not113 = icmp eq i64 %140, 0
  br i1 %.not113, label %.loopexit, label %.lr.ph103

141:                                              ; preds = %.lr.ph107
  %142 = landingpad { ptr, i32 }
          cleanup
  br label %188

.lr.ph103:                                        ; preds = %.preheader, %170
  %indvars.iv126 = phi i64 [ %indvars.iv.next127, %170 ], [ 0, %.preheader ]
  %.056101 = phi i64 [ %.1, %170 ], [ 0, %.preheader ]
  %143 = call noundef nonnull align 8 dereferenceable(20) ptr @_ZNSt6vectorISt4pairIS0_IixEiESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %137, i64 noundef %indvars.iv126) #8
  %144 = getelementptr inbounds i8, ptr %143, i64 16
  %145 = load i32, ptr %144, align 8, !tbaa !19
  %146 = icmp slt i32 %145, %.060104
  br i1 %146, label %170, label %147

147:                                              ; preds = %.lr.ph103
  %148 = call noundef zeroext i1 @_ZNKSt6vectorIiSaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  br i1 %148, label %154, label %149

149:                                              ; preds = %147
  %150 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  %151 = load i32, ptr %150, align 4, !tbaa !8
  %152 = call noundef nonnull align 8 dereferenceable(20) ptr @_ZNSt6vectorISt4pairIS0_IixEiESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %137, i64 noundef %indvars.iv126) #8
  %153 = load i32, ptr %152, align 8, !tbaa !22
  %.not = icmp slt i32 %151, %153
  br i1 %.not, label %154, label %170

154:                                              ; preds = %149, %147
  %155 = call noundef nonnull align 8 dereferenceable(20) ptr @_ZNSt6vectorISt4pairIS0_IixEiESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %137, i64 noundef %indvars.iv126) #8
  %156 = getelementptr inbounds i8, ptr %155, i64 8
  %157 = load i64, ptr %156, align 8, !tbaa !23
  %158 = add nsw i64 %157, %.056101
  %159 = load i64, ptr @k, align 8, !tbaa !11
  %.not78 = icmp slt i64 %158, %159
  br i1 %.not78, label %170, label %160

160:                                              ; preds = %154
  %161 = call noundef nonnull align 8 dereferenceable(20) ptr @_ZNSt6vectorISt4pairIS0_IixEiESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %137, i64 noundef %indvars.iv126) #8
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 4 dereferenceable(4) %161)
          to label %162 unwind label %168

162:                                              ; preds = %160
  %163 = load i64, ptr @k, align 8, !tbaa !11
  %164 = sub nsw i64 %163, %.056101
  store i64 %164, ptr @k, align 8, !tbaa !11
  %165 = call noundef nonnull align 8 dereferenceable(20) ptr @_ZNSt6vectorISt4pairIS0_IixEiESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %137, i64 noundef %indvars.iv126) #8
  %166 = getelementptr inbounds i8, ptr %165, i64 16
  %167 = load i32, ptr %166, align 8, !tbaa !19
  br label %.loopexit

168:                                              ; preds = %160
  %169 = landingpad { ptr, i32 }
          cleanup
  br label %188

170:                                              ; preds = %154, %149, %.lr.ph103
  %.1 = phi i64 [ %.056101, %.lr.ph103 ], [ %.056101, %149 ], [ %158, %154 ]
  %indvars.iv.next127 = add nuw nsw i64 %indvars.iv126, 1
  %171 = call noundef i64 @_ZNKSt6vectorISt4pairIS0_IixEiESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %137) #8
  %172 = icmp ugt i64 %171, %indvars.iv.next127
  br i1 %172, label %.lr.ph103, label %.loopexit, !llvm.loop !24

.loopexit:                                        ; preds = %170, %.preheader, %162
  %.161 = phi i32 [ %167, %162 ], [ %.060104, %.preheader ], [ %.060104, %170 ]
  %indvars.iv.next130 = add nsw i64 %indvars.iv129, -1
  %173 = icmp sgt i64 %indvars.iv129, 1
  br i1 %173, label %.lr.ph107, label %._crit_edge108, !llvm.loop !25

._crit_edge112:                                   ; preds = %176, %._crit_edge108.thread, %._crit_edge108
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #8
  invoke void @_ZNSt6vectorIiSaIiEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %182 unwind label %184

.lr.ph111:                                        ; preds = %._crit_edge108, %176
  %storemerge77109 = phi i32 [ %178, %176 ], [ %.pre132, %._crit_edge108 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #8
  store i32 116, ptr %14, align 4, !tbaa !8
  %174 = zext nneg i32 %storemerge77109 to i64
  %175 = getelementptr inbounds [100100 x %"class.std::vector.0"], ptr @tbl, i64 0, i64 %174
  invoke void @_Z2trIPKcJiiSt6vectorISt4pairIS3_IixEiESaIS5_EEEEvT_DpRKT0_(ptr noundef nonnull @__FUNCTION__.main, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 8 dereferenceable(24) %175)
          to label %176 unwind label %180

176:                                              ; preds = %.lr.ph111
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #8
  %177 = load i32, ptr %13, align 4, !tbaa !8
  %178 = add nsw i32 %177, -1
  store i32 %178, ptr %13, align 4, !tbaa !8
  %179 = icmp sgt i32 %177, 1
  br i1 %179, label %.lr.ph111, label %._crit_edge112, !llvm.loop !26

180:                                              ; preds = %.lr.ph111
  %181 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #8
  br label %188

182:                                              ; preds = %._crit_edge112
  invoke void @_Z2trISt6vectorIiSaIiEEJEEvT_DpRKT0_(ptr noundef nonnull %15)
          to label %183 unwind label %186

183:                                              ; preds = %182
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #8
  br label %189

184:                                              ; preds = %._crit_edge112
  %185 = landingpad { ptr, i32 }
          cleanup
  br label %188

186:                                              ; preds = %182
  %187 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #8
  br label %188

188:                                              ; preds = %141, %168, %186, %184, %180
  %.pn.pn = phi { ptr, i32 } [ %181, %180 ], [ %187, %186 ], [ %185, %184 ], [ %169, %168 ], [ %142, %141 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #8
  br label %190

189:                                              ; preds = %92, %183
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  ret i32 0

190:                                              ; preds = %188, %134, %94, %88
  %.pn81 = phi { ptr, i32 } [ %89, %88 ], [ %95, %94 ], [ %135, %134 ], [ %.pn.pn, %188 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  br label %191

191:                                              ; preds = %190, %57
  %.pn81.pn = phi { ptr, i32 } [ %.pn81, %190 ], [ %58, %57 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn81.pn
}

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

; 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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairISt4pairIixERiES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local { i32, i64 } @_ZSt9make_pairIRiRxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorIiSaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2trISt6vectorIiSaIiEEJEEvT_DpRKT0_(ptr noundef) local_unnamed_addr #0

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = !{!20, !9, i64 16}
!20 = !{!"_ZTSSt4pairIS_IixEiE", !21, i64 0, !9, i64 16}
!21 = !{!"_ZTSSt4pairIixE", !9, i64 0, !12, i64 8}
!22 = !{!20, !9, i64 0}
!23 = !{!20, !12, i64 8}
!24 = distinct !{!24, !14}
!25 = distinct !{!25, !14}
!26 = distinct !{!26, !14}


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