; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/337 Division 2/Problem D (D)

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

%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree.0" }
%"class.std::_Rb_tree.0" = type { %"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::map.4" = type { %"class.std::_Rb_tree.5" }
%"class.std::_Rb_tree.5" = type { %"struct.std::_Rb_tree<int, std::pair<const int, std::vector<std::pair<int, int>>>, std::_Select1st<std::pair<const int, std::vector<std::pair<int, int>>>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, std::vector<std::pair<int, int>>>, std::_Select1st<std::pair<const int, std::vector<std::pair<int, int>>>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::map.9" = type { %"class.std::_Rb_tree.10" }
%"class.std::_Rb_tree.10" = type { %"struct.std::_Rb_tree<int, std::pair<const int, std::vector<std::pair<int, std::pair<int, int>>>>, std::_Select1st<std::pair<const int, std::vector<std::pair<int, std::pair<int, int>>>>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, std::vector<std::pair<int, std::pair<int, int>>>>, std::_Select1st<std::pair<const int, std::vector<std::pair<int, std::pair<int, int>>>>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"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 }
%"struct.std::pair" = type { i32, i32 }
%"struct.std::pair.17" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::pair.26" = type { i32, %"struct.std::pair" }
%"struct.std::_Rb_tree_iterator.28" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.31" = type { ptr }
%"struct.std::pair.19" = type { i32, %"class.std::vector" }
%"struct.std::pair.29" = type { i32, %"class.std::vector.21" }
%"class.std::vector.21" = type { %"struct.std::_Vector_base.22" }
%"struct.std::_Vector_base.22" = type { %"struct.std::_Vector_base<std::pair<int, std::pair<int, int>>, std::allocator<std::pair<int, std::pair<int, int>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, std::pair<int, int>>, std::allocator<std::pair<int, std::pair<int, int>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, std::pair<int, int>>, std::allocator<std::pair<int, std::pair<int, int>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, std::pair<int, int>>, std::allocator<std::pair<int, std::pair<int, int>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@n = external dso_local global i32, align 4
@compr = external dso_local global %"class.std::set", align 8
@cnt = external dso_local global i32, align 4
@f = external dso_local global %"class.std::map", align 8
@row = external dso_local global %"class.std::map.4", align 8
@col = external dso_local global %"class.std::map.4", align 8
@e = external dso_local global %"class.std::map.9", align 8
@ans = external dso_local global i64, align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z4compRKSt4pairIiiES2_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #0

; 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 i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::pair", align 4
  %8 = alloca %"struct.std::pair", align 4
  %9 = alloca %"struct.std::pair.17", align 8
  %10 = alloca %"struct.std::pair.17", align 8
  %11 = alloca %"struct.std::pair.17", align 8
  %12 = alloca %"struct.std::pair.17", align 8
  %13 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %14 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %15 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %16 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %17 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca %"class.std::vector", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  %25 = alloca %"struct.std::pair", align 4
  %26 = alloca i32, align 4
  %27 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %28 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %29 = alloca %"struct.std::pair.26", align 4
  %30 = alloca i32, align 4
  %31 = alloca %"struct.std::pair", align 4
  %32 = alloca i32, align 4
  %33 = alloca { i64, i32 }, align 8
  %34 = alloca i32, align 4
  %35 = alloca %"struct.std::pair.26", align 4
  %36 = alloca i32, align 4
  %37 = alloca %"struct.std::pair", align 4
  %38 = alloca i32, align 4
  %39 = alloca { i64, i32 }, align 8
  %40 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %41 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %42 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %43 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %44 = alloca ptr, align 8
  %45 = alloca %"class.std::vector", align 8
  %46 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %47 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %48 = alloca %"struct.std::pair", align 4
  %49 = alloca i32, align 4
  %50 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %51 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %52 = alloca %"struct.std::pair.26", align 4
  %53 = alloca i32, align 4
  %54 = alloca %"struct.std::pair", align 4
  %55 = alloca { i64, i32 }, align 8
  %56 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %57 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %58 = alloca %"struct.std::_Rb_tree_iterator.28", align 8
  %59 = alloca %"struct.std::_Rb_tree_iterator.28", align 8
  %60 = alloca ptr, align 8
  %61 = alloca %"class.__gnu_cxx::__normal_iterator.31", align 8
  %62 = alloca %"class.__gnu_cxx::__normal_iterator.31", align 8
  %63 = alloca i64, align 8
  %64 = alloca i64, align 8
  %65 = alloca i64, align 8
  %66 = alloca i32, align 4
  %67 = alloca i32, align 4
  %68 = alloca %"class.__gnu_cxx::__normal_iterator.31", align 8
  %69 = alloca %"struct.std::_Rb_tree_iterator.28", align 8
  store i32 0, ptr %1, align 4
  %70 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %71

71:                                               ; preds = %119, %0
  %72 = load i32, ptr %2, align 4, !tbaa !5
  %73 = load i32, ptr @n, align 4, !tbaa !5
  %74 = icmp slt i32 %72, %73
  br i1 %74, label %76, label %75

75:                                               ; preds = %71
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %122

76:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  %77 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.6, ptr noundef %3, ptr noundef %4)
  %78 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.6, ptr noundef %5, ptr noundef %6)
  %79 = load i32, ptr %3, align 4, !tbaa !5
  %80 = load i32, ptr %5, align 4, !tbaa !5
  %81 = icmp eq i32 %79, %80
  br i1 %81, label %82, label %90

82:                                               ; preds = %76
  %83 = load i32, ptr %4, align 4, !tbaa !5
  %84 = load i32, ptr %6, align 4, !tbaa !5
  %85 = icmp sgt i32 %83, %84
  br i1 %85, label %86, label %87

86:                                               ; preds = %82
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %6) #8
  br label %87

87:                                               ; preds = %86, %82
  %88 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIiSt6vectorISt4pairIiiESaIS2_EESt4lessIiESaIS1_IKiS4_EEEixERS7_(ptr noundef nonnull align 8 dereferenceable(48) @col, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %89 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %6)
  store i64 %89, ptr %7, align 4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %88, ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  br label %98

90:                                               ; preds = %76
  %91 = load i32, ptr %3, align 4, !tbaa !5
  %92 = load i32, ptr %5, align 4, !tbaa !5
  %93 = icmp sgt i32 %91, %92
  br i1 %93, label %94, label %95

94:                                               ; preds = %90
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %5) #8
  br label %95

95:                                               ; preds = %94, %90
  %96 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIiSt6vectorISt4pairIiiESaIS2_EESt4lessIiESaIS1_IKiS4_EEEixERS7_(ptr noundef nonnull align 8 dereferenceable(48) @row, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %97 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i64 %97, ptr %8, align 4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %96, ptr noundef nonnull align 4 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  br label %98

98:                                               ; preds = %95, %87
  %99 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @compr, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %100 = getelementptr inbounds { ptr, i8 }, ptr %9, i32 0, i32 0
  %101 = extractvalue { ptr, i8 } %99, 0
  store ptr %101, ptr %100, align 8
  %102 = getelementptr inbounds { ptr, i8 }, ptr %9, i32 0, i32 1
  %103 = extractvalue { ptr, i8 } %99, 1
  store i8 %103, ptr %102, align 8
  %104 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @compr, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %105 = getelementptr inbounds { ptr, i8 }, ptr %10, i32 0, i32 0
  %106 = extractvalue { ptr, i8 } %104, 0
  store ptr %106, ptr %105, align 8
  %107 = getelementptr inbounds { ptr, i8 }, ptr %10, i32 0, i32 1
  %108 = extractvalue { ptr, i8 } %104, 1
  store i8 %108, ptr %107, align 8
  %109 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @compr, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %110 = getelementptr inbounds { ptr, i8 }, ptr %11, i32 0, i32 0
  %111 = extractvalue { ptr, i8 } %109, 0
  store ptr %111, ptr %110, align 8
  %112 = getelementptr inbounds { ptr, i8 }, ptr %11, i32 0, i32 1
  %113 = extractvalue { ptr, i8 } %109, 1
  store i8 %113, ptr %112, align 8
  %114 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @compr, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %115 = getelementptr inbounds { ptr, i8 }, ptr %12, i32 0, i32 0
  %116 = extractvalue { ptr, i8 } %114, 0
  store ptr %116, ptr %115, align 8
  %117 = getelementptr inbounds { ptr, i8 }, ptr %12, i32 0, i32 1
  %118 = extractvalue { ptr, i8 } %114, 1
  store i8 %118, ptr %117, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  br label %119

119:                                              ; preds = %98
  %120 = load i32, ptr %2, align 4, !tbaa !5
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %2, align 4, !tbaa !5
  br label %71, !llvm.loop !9

122:                                              ; preds = %75
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %123 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @compr) #8
  %124 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %13, i32 0, i32 0
  store ptr %123, ptr %124, align 8
  br label %125

125:                                              ; preds = %135, %122
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %126 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @compr) #8
  %127 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %14, i32 0, i32 0
  store ptr %126, ptr %127, align 8
  %128 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br i1 %128, label %130, label %129

129:                                              ; preds = %125
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  br label %138

130:                                              ; preds = %125
  %131 = load i32, ptr @cnt, align 4, !tbaa !5
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr @cnt, align 4, !tbaa !5
  %133 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #8
  %134 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @f, ptr noundef nonnull align 4 dereferenceable(4) %133)
  store i32 %132, ptr %134, align 4, !tbaa !5
  br label %135

135:                                              ; preds = %130
  %136 = call ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEi(ptr noundef nonnull align 8 dereferenceable(8) %13, i32 noundef 0) #8
  %137 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %15, i32 0, i32 0
  store ptr %136, ptr %137, align 8
  br label %125, !llvm.loop !11

138:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %139 = call ptr @_ZNSt3mapIiSt6vectorISt4pairIiiESaIS2_EESt4lessIiESaIS1_IKiS4_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @row) #8
  %140 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %16, i32 0, i32 0
  store ptr %139, ptr %140, align 8
  br label %141

141:                                              ; preds = %286, %138
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %142 = call ptr @_ZNSt3mapIiSt6vectorISt4pairIiiESaIS2_EESt4lessIiESaIS1_IKiS4_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @row) #8
  %143 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %17, i32 0, i32 0
  store ptr %142, ptr %143, align 8
  %144 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiiESaIS3_EEEES9_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br i1 %144, label %146, label %145

145:                                              ; preds = %141
  store i32 8, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %291

146:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %147 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiiESaIS3_EEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #8
  %148 = getelementptr inbounds %"struct.std::pair.19", ptr %147, i32 0, i32 1
  store ptr %148, ptr %19, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #8
  %149 = load ptr, ptr %19, align 8, !tbaa !12
  %150 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %149) #8
  %151 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  store ptr %150, ptr %151, align 8
  %152 = load ptr, ptr %19, align 8, !tbaa !12
  %153 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %152) #8
  %154 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  store ptr %153, ptr %154, align 8
  %155 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  %156 = load ptr, ptr %155, align 8
  %157 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  %158 = load ptr, ptr %157, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS3_SaIS3_EEEEPFbRKS3_SA_EEvT_SD_T0_(ptr %156, ptr %158, ptr noundef @_Z4compRKSt4pairIiiES2_)
          to label %159 unwind label %169

159:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  %160 = load ptr, ptr %19, align 8, !tbaa !12
  %161 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %160, i64 noundef 0) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %25, ptr align 4 %161, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  store i32 1, ptr %26, align 4, !tbaa !5
  br label %162

162:                                              ; preds = %207, %159
  %163 = load i32, ptr %26, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = load ptr, ptr %19, align 8, !tbaa !12
  %166 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %165) #8
  %167 = icmp ult i64 %164, %166
  br i1 %167, label %173, label %168

168:                                              ; preds = %162
  store i32 11, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  br label %210

169:                                              ; preds = %146
  %170 = landingpad { ptr, i32 }
          cleanup
  %171 = extractvalue { ptr, i32 } %170, 0
  store ptr %171, ptr %23, align 8
  %172 = extractvalue { ptr, i32 } %170, 1
  store i32 %172, ptr %24, align 4
  br label %290

173:                                              ; preds = %162
  %174 = load ptr, ptr %19, align 8, !tbaa !12
  %175 = load i32, ptr %26, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %174, i64 noundef %176) #8
  %178 = getelementptr inbounds %"struct.std::pair", ptr %177, i32 0, i32 0
  %179 = load i32, ptr %178, align 4, !tbaa !14
  %180 = getelementptr inbounds %"struct.std::pair", ptr %25, i32 0, i32 1
  %181 = load i32, ptr %180, align 4, !tbaa !16
  %182 = icmp sgt i32 %179, %181
  br i1 %182, label %183, label %195

183:                                              ; preds = %173
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 4 dereferenceable(8) %25)
          to label %184 unwind label %191

184:                                              ; preds = %183
  %185 = load ptr, ptr %19, align 8, !tbaa !12
  %186 = load i32, ptr %26, align 4, !tbaa !5
  %187 = sext i32 %186 to i64
  %188 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %185, i64 noundef %187) #8
  %189 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %25, ptr noundef nonnull align 4 dereferenceable(8) %188)
          to label %190 unwind label %191

190:                                              ; preds = %184
  br label %206

191:                                              ; preds = %195, %184, %183
  %192 = landingpad { ptr, i32 }
          cleanup
  %193 = extractvalue { ptr, i32 } %192, 0
  store ptr %193, ptr %23, align 8
  %194 = extractvalue { ptr, i32 } %192, 1
  store i32 %194, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  br label %289

195:                                              ; preds = %173
  %196 = getelementptr inbounds %"struct.std::pair", ptr %25, i32 0, i32 1
  %197 = load ptr, ptr %19, align 8, !tbaa !12
  %198 = load i32, ptr %26, align 4, !tbaa !5
  %199 = sext i32 %198 to i64
  %200 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %197, i64 noundef %199) #8
  %201 = getelementptr inbounds %"struct.std::pair", ptr %200, i32 0, i32 1
  %202 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %196, ptr noundef nonnull align 4 dereferenceable(4) %201)
          to label %203 unwind label %191

203:                                              ; preds = %195
  %204 = load i32, ptr %202, align 4, !tbaa !5
  %205 = getelementptr inbounds %"struct.std::pair", ptr %25, i32 0, i32 1
  store i32 %204, ptr %205, align 4, !tbaa !16
  br label %206

206:                                              ; preds = %203, %190
  br label %207

207:                                              ; preds = %206
  %208 = load i32, ptr %26, align 4, !tbaa !5
  %209 = add nsw i32 %208, 1
  store i32 %209, ptr %26, align 4, !tbaa !5
  br label %162, !llvm.loop !17

210:                                              ; preds = %168
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 4 dereferenceable(8) %25)
          to label %211 unwind label %223

211:                                              ; preds = %210
  %212 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiiESaIS3_EEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #8
  %213 = getelementptr inbounds %"struct.std::pair.19", ptr %212, i32 0, i32 1
  %214 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %213, ptr noundef nonnull align 8 dereferenceable(24) %20)
          to label %215 unwind label %223

215:                                              ; preds = %211
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  %216 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #8
  %217 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %27, i32 0, i32 0
  store ptr %216, ptr %217, align 8
  br label %218

218:                                              ; preds = %264, %215
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  %219 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #8
  %220 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %28, i32 0, i32 0
  store ptr %219, ptr %220, align 8
  %221 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  br i1 %221, label %227, label %222

222:                                              ; preds = %218
  store i32 14, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  br label %285

223:                                              ; preds = %211, %210
  %224 = landingpad { ptr, i32 }
          cleanup
  %225 = extractvalue { ptr, i32 } %224, 0
  store ptr %225, ptr %23, align 8
  %226 = extractvalue { ptr, i32 } %224, 1
  store i32 %226, ptr %24, align 4
  br label %289

227:                                              ; preds = %218
  %228 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #8
  %229 = getelementptr inbounds %"struct.std::pair", ptr %228, i32 0, i32 1
  %230 = load i32, ptr %229, align 4, !tbaa !16
  %231 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #8
  %232 = getelementptr inbounds %"struct.std::pair", ptr %231, i32 0, i32 0
  %233 = load i32, ptr %232, align 4, !tbaa !14
  %234 = sub nsw i32 %230, %233
  %235 = add nsw i32 %234, 1
  %236 = sext i32 %235 to i64
  %237 = mul nsw i64 1, %236
  %238 = load i64, ptr @ans, align 8, !tbaa !18
  %239 = add nsw i64 %238, %237
  store i64 %239, ptr @ans, align 8, !tbaa !18
  %240 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #8
  %241 = getelementptr inbounds %"struct.std::pair", ptr %240, i32 0, i32 0
  %242 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIiSt6vectorISt4pairIiS1_IiiEESaIS3_EESt4lessIiESaIS1_IKiS5_EEEixERS8_(ptr noundef nonnull align 8 dereferenceable(48) @e, ptr noundef nonnull align 4 dereferenceable(4) %241)
          to label %243 unwind label %267

243:                                              ; preds = %227
  call void @llvm.lifetime.start.p0(i64 12, ptr %29) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #8
  store i32 1, ptr %30, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #8
  %244 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiiESaIS3_EEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #8
  %245 = getelementptr inbounds %"struct.std::pair.19", ptr %244, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #8
  store i32 -1, ptr %32, align 4, !tbaa !5
  %246 = invoke i64 @_ZSt9make_pairIRKiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4) %245, ptr noundef nonnull align 4 dereferenceable(4) %32)
          to label %247 unwind label %271

247:                                              ; preds = %243
  store i64 %246, ptr %31, align 4
  %248 = invoke { i64, i32 } @_ZSt9make_pairIiSt4pairIiiEES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %30, ptr noundef nonnull align 4 dereferenceable(8) %31)
          to label %249 unwind label %271

249:                                              ; preds = %247
  store { i64, i32 } %248, ptr %33, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %29, ptr align 8 %33, i64 12, i1 false)
  invoke void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %242, ptr noundef nonnull align 4 dereferenceable(12) %29)
          to label %250 unwind label %271

250:                                              ; preds = %249
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %29) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #8
  %251 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #8
  %252 = getelementptr inbounds %"struct.std::pair", ptr %251, i32 0, i32 1
  %253 = load i32, ptr %252, align 4, !tbaa !16
  %254 = add nsw i32 %253, 1
  store i32 %254, ptr %34, align 4, !tbaa !5
  %255 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIiSt6vectorISt4pairIiS1_IiiEESaIS3_EESt4lessIiESaIS1_IKiS5_EEEixEOi(ptr noundef nonnull align 8 dereferenceable(48) @e, ptr noundef nonnull align 4 dereferenceable(4) %34)
          to label %256 unwind label %275

256:                                              ; preds = %250
  call void @llvm.lifetime.start.p0(i64 12, ptr %35) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #8
  store i32 2, ptr %36, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #8
  %257 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiiESaIS3_EEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #8
  %258 = getelementptr inbounds %"struct.std::pair.19", ptr %257, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #8
  store i32 -1, ptr %38, align 4, !tbaa !5
  %259 = invoke i64 @_ZSt9make_pairIRKiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4) %258, ptr noundef nonnull align 4 dereferenceable(4) %38)
          to label %260 unwind label %279

260:                                              ; preds = %256
  store i64 %259, ptr %37, align 4
  %261 = invoke { i64, i32 } @_ZSt9make_pairIiSt4pairIiiEES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %36, ptr noundef nonnull align 4 dereferenceable(8) %37)
          to label %262 unwind label %279

262:                                              ; preds = %260
  store { i64, i32 } %261, ptr %39, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %35, ptr align 8 %39, i64 12, i1 false)
  invoke void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %255, ptr noundef nonnull align 4 dereferenceable(12) %35)
          to label %263 unwind label %279

263:                                              ; preds = %262
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  br label %264

264:                                              ; preds = %263
  %265 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %27, i32 noundef 0) #8
  %266 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %40, i32 0, i32 0
  store ptr %265, ptr %266, align 8
  br label %218, !llvm.loop !20

267:                                              ; preds = %227
  %268 = landingpad { ptr, i32 }
          cleanup
  %269 = extractvalue { ptr, i32 } %268, 0
  store ptr %269, ptr %23, align 8
  %270 = extractvalue { ptr, i32 } %268, 1
  store i32 %270, ptr %24, align 4
  br label %284

271:                                              ; preds = %249, %247, %243
  %272 = landingpad { ptr, i32 }
          cleanup
  %273 = extractvalue { ptr, i32 } %272, 0
  store ptr %273, ptr %23, align 8
  %274 = extractvalue { ptr, i32 } %272, 1
  store i32 %274, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %29) #8
  br label %284

275:                                              ; preds = %250
  %276 = landingpad { ptr, i32 }
          cleanup
  %277 = extractvalue { ptr, i32 } %276, 0
  store ptr %277, ptr %23, align 8
  %278 = extractvalue { ptr, i32 } %276, 1
  store i32 %278, ptr %24, align 4
  br label %283

279:                                              ; preds = %262, %260, %256
  %280 = landingpad { ptr, i32 }
          cleanup
  %281 = extractvalue { ptr, i32 } %280, 0
  store ptr %281, ptr %23, align 8
  %282 = extractvalue { ptr, i32 } %280, 1
  store i32 %282, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %35) #8
  br label %283

283:                                              ; preds = %279, %275
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  br label %284

284:                                              ; preds = %283, %271, %267
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  br label %289

285:                                              ; preds = %222
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  br label %286

286:                                              ; preds = %285
  %287 = call ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiiESaIS3_EEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %16, i32 noundef 0) #8
  %288 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %41, i32 0, i32 0
  store ptr %287, ptr %288, align 8
  br label %141, !llvm.loop !21

289:                                              ; preds = %284, %223, %191
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  br label %290

290:                                              ; preds = %289, %169
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %499

291:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #8
  %292 = call ptr @_ZNSt3mapIiSt6vectorISt4pairIiiESaIS2_EESt4lessIiESaIS1_IKiS4_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @col) #8
  %293 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %42, i32 0, i32 0
  store ptr %292, ptr %293, align 8
  br label %294

294:                                              ; preds = %407, %291
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #8
  %295 = call ptr @_ZNSt3mapIiSt6vectorISt4pairIiiESaIS2_EESt4lessIiESaIS1_IKiS4_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @col) #8
  %296 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %43, i32 0, i32 0
  store ptr %295, ptr %296, align 8
  %297 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiiESaIS3_EEEES9_(ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef nonnull align 8 dereferenceable(8) %43) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #8
  br i1 %297, label %299, label %298

298:                                              ; preds = %294
  store i32 17, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #8
  br label %412

299:                                              ; preds = %294
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #8
  %300 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiiESaIS3_EEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %42) #8
  %301 = getelementptr inbounds %"struct.std::pair.19", ptr %300, i32 0, i32 1
  store ptr %301, ptr %44, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 24, ptr %45) #8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %45) #8
  %302 = load ptr, ptr %44, align 8, !tbaa !12
  %303 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %302) #8
  %304 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %46, i32 0, i32 0
  store ptr %303, ptr %304, align 8
  %305 = load ptr, ptr %44, align 8, !tbaa !12
  %306 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %305) #8
  %307 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %47, i32 0, i32 0
  store ptr %306, ptr %307, align 8
  %308 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %46, i32 0, i32 0
  %309 = load ptr, ptr %308, align 8
  %310 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %47, i32 0, i32 0
  %311 = load ptr, ptr %310, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS3_SaIS3_EEEEPFbRKS3_SA_EEvT_SD_T0_(ptr %309, ptr %311, ptr noundef @_Z4compRKSt4pairIiiES2_)
          to label %312 unwind label %322

312:                                              ; preds = %299
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #8
  %313 = load ptr, ptr %44, align 8, !tbaa !12
  %314 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %313, i64 noundef 0) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %48, ptr align 4 %314, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #8
  store i32 1, ptr %49, align 4, !tbaa !5
  br label %315

315:                                              ; preds = %360, %312
  %316 = load i32, ptr %49, align 4, !tbaa !5
  %317 = sext i32 %316 to i64
  %318 = load ptr, ptr %44, align 8, !tbaa !12
  %319 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %318) #8
  %320 = icmp ult i64 %317, %319
  br i1 %320, label %326, label %321

321:                                              ; preds = %315
  store i32 20, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #8
  br label %363

322:                                              ; preds = %299
  %323 = landingpad { ptr, i32 }
          cleanup
  %324 = extractvalue { ptr, i32 } %323, 0
  store ptr %324, ptr %23, align 8
  %325 = extractvalue { ptr, i32 } %323, 1
  store i32 %325, ptr %24, align 4
  br label %411

326:                                              ; preds = %315
  %327 = load ptr, ptr %44, align 8, !tbaa !12
  %328 = load i32, ptr %49, align 4, !tbaa !5
  %329 = sext i32 %328 to i64
  %330 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %327, i64 noundef %329) #8
  %331 = getelementptr inbounds %"struct.std::pair", ptr %330, i32 0, i32 0
  %332 = load i32, ptr %331, align 4, !tbaa !14
  %333 = getelementptr inbounds %"struct.std::pair", ptr %48, i32 0, i32 1
  %334 = load i32, ptr %333, align 4, !tbaa !16
  %335 = icmp sgt i32 %332, %334
  br i1 %335, label %336, label %348

336:                                              ; preds = %326
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %45, ptr noundef nonnull align 4 dereferenceable(8) %48)
          to label %337 unwind label %344

337:                                              ; preds = %336
  %338 = load ptr, ptr %44, align 8, !tbaa !12
  %339 = load i32, ptr %49, align 4, !tbaa !5
  %340 = sext i32 %339 to i64
  %341 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %338, i64 noundef %340) #8
  %342 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %48, ptr noundef nonnull align 4 dereferenceable(8) %341)
          to label %343 unwind label %344

343:                                              ; preds = %337
  br label %359

344:                                              ; preds = %348, %337, %336
  %345 = landingpad { ptr, i32 }
          cleanup
  %346 = extractvalue { ptr, i32 } %345, 0
  store ptr %346, ptr %23, align 8
  %347 = extractvalue { ptr, i32 } %345, 1
  store i32 %347, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #8
  br label %410

348:                                              ; preds = %326
  %349 = getelementptr inbounds %"struct.std::pair", ptr %48, i32 0, i32 1
  %350 = load ptr, ptr %44, align 8, !tbaa !12
  %351 = load i32, ptr %49, align 4, !tbaa !5
  %352 = sext i32 %351 to i64
  %353 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %350, i64 noundef %352) #8
  %354 = getelementptr inbounds %"struct.std::pair", ptr %353, i32 0, i32 1
  %355 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %349, ptr noundef nonnull align 4 dereferenceable(4) %354)
          to label %356 unwind label %344

356:                                              ; preds = %348
  %357 = load i32, ptr %355, align 4, !tbaa !5
  %358 = getelementptr inbounds %"struct.std::pair", ptr %48, i32 0, i32 1
  store i32 %357, ptr %358, align 4, !tbaa !16
  br label %359

359:                                              ; preds = %356, %343
  br label %360

360:                                              ; preds = %359
  %361 = load i32, ptr %49, align 4, !tbaa !5
  %362 = add nsw i32 %361, 1
  store i32 %362, ptr %49, align 4, !tbaa !5
  br label %315, !llvm.loop !22

363:                                              ; preds = %321
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %45, ptr noundef nonnull align 4 dereferenceable(8) %48)
          to label %364 unwind label %376

364:                                              ; preds = %363
  %365 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiiESaIS3_EEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %42) #8
  %366 = getelementptr inbounds %"struct.std::pair.19", ptr %365, i32 0, i32 1
  %367 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %366, ptr noundef nonnull align 8 dereferenceable(24) %45)
          to label %368 unwind label %376

368:                                              ; preds = %364
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #8
  %369 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %45) #8
  %370 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %50, i32 0, i32 0
  store ptr %369, ptr %370, align 8
  br label %371

371:                                              ; preds = %394, %368
  call void @llvm.lifetime.start.p0(i64 8, ptr %51) #8
  %372 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %45) #8
  %373 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %51, i32 0, i32 0
  store ptr %372, ptr %373, align 8
  %374 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %50, ptr noundef nonnull align 8 dereferenceable(8) %51) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #8
  br i1 %374, label %380, label %375

375:                                              ; preds = %371
  store i32 23, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #8
  br label %406

376:                                              ; preds = %364, %363
  %377 = landingpad { ptr, i32 }
          cleanup
  %378 = extractvalue { ptr, i32 } %377, 0
  store ptr %378, ptr %23, align 8
  %379 = extractvalue { ptr, i32 } %377, 1
  store i32 %379, ptr %24, align 4
  br label %410

380:                                              ; preds = %371
  %381 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiiESaIS3_EEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %42) #8
  %382 = getelementptr inbounds %"struct.std::pair.19", ptr %381, i32 0, i32 0
  %383 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIiSt6vectorISt4pairIiS1_IiiEESaIS3_EESt4lessIiESaIS1_IKiS5_EEEixERS8_(ptr noundef nonnull align 8 dereferenceable(48) @e, ptr noundef nonnull align 4 dereferenceable(4) %382)
          to label %384 unwind label %397

384:                                              ; preds = %380
  call void @llvm.lifetime.start.p0(i64 12, ptr %52) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %53) #8
  store i32 3, ptr %53, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %54) #8
  %385 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %50) #8
  %386 = getelementptr inbounds %"struct.std::pair", ptr %385, i32 0, i32 0
  %387 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %50) #8
  %388 = getelementptr inbounds %"struct.std::pair", ptr %387, i32 0, i32 1
  %389 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %386, ptr noundef nonnull align 4 dereferenceable(4) %388)
          to label %390 unwind label %401

390:                                              ; preds = %384
  store i64 %389, ptr %54, align 4
  %391 = invoke { i64, i32 } @_ZSt9make_pairIiSt4pairIiiEES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %53, ptr noundef nonnull align 4 dereferenceable(8) %54)
          to label %392 unwind label %401

392:                                              ; preds = %390
  store { i64, i32 } %391, ptr %55, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %52, ptr align 8 %55, i64 12, i1 false)
  invoke void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %383, ptr noundef nonnull align 4 dereferenceable(12) %52)
          to label %393 unwind label %401

393:                                              ; preds = %392
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %53) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %52) #8
  br label %394

394:                                              ; preds = %393
  %395 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %50, i32 noundef 0) #8
  %396 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %56, i32 0, i32 0
  store ptr %395, ptr %396, align 8
  br label %371, !llvm.loop !23

397:                                              ; preds = %380
  %398 = landingpad { ptr, i32 }
          cleanup
  %399 = extractvalue { ptr, i32 } %398, 0
  store ptr %399, ptr %23, align 8
  %400 = extractvalue { ptr, i32 } %398, 1
  store i32 %400, ptr %24, align 4
  br label %405

401:                                              ; preds = %392, %390, %384
  %402 = landingpad { ptr, i32 }
          cleanup
  %403 = extractvalue { ptr, i32 } %402, 0
  store ptr %403, ptr %23, align 8
  %404 = extractvalue { ptr, i32 } %402, 1
  store i32 %404, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %53) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %52) #8
  br label %405

405:                                              ; preds = %401, %397
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #8
  br label %410

406:                                              ; preds = %375
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %45) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %45) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #8
  br label %407

407:                                              ; preds = %406
  %408 = call ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiiESaIS3_EEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %42, i32 noundef 0) #8
  %409 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %57, i32 0, i32 0
  store ptr %408, ptr %409, align 8
  br label %294, !llvm.loop !24

410:                                              ; preds = %405, %376, %344
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #8
  br label %411

411:                                              ; preds = %410, %322
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %45) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %45) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #8
  br label %499

412:                                              ; preds = %298
  call void @llvm.lifetime.start.p0(i64 8, ptr %58) #8
  %413 = call ptr @_ZNSt3mapIiSt6vectorISt4pairIiS1_IiiEESaIS3_EESt4lessIiESaIS1_IKiS5_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @e) #8
  %414 = getelementptr inbounds %"struct.std::_Rb_tree_iterator.28", ptr %58, i32 0, i32 0
  store ptr %413, ptr %414, align 8
  br label %415

415:                                              ; preds = %492, %412
  call void @llvm.lifetime.start.p0(i64 8, ptr %59) #8
  %416 = call ptr @_ZNSt3mapIiSt6vectorISt4pairIiS1_IiiEESaIS3_EESt4lessIiESaIS1_IKiS5_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @e) #8
  %417 = getelementptr inbounds %"struct.std::_Rb_tree_iterator.28", ptr %59, i32 0, i32 0
  store ptr %416, ptr %417, align 8
  %418 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiS0_IiiEESaIS4_EEEESA_(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef nonnull align 8 dereferenceable(8) %59) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %59) #8
  br i1 %418, label %420, label %419

419:                                              ; preds = %415
  store i32 26, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #8
  br label %495

420:                                              ; preds = %415
  call void @llvm.lifetime.start.p0(i64 8, ptr %60) #8
  %421 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiS0_IiiEESaIS4_EEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %58) #8
  %422 = getelementptr inbounds %"struct.std::pair.29", ptr %421, i32 0, i32 1
  store ptr %422, ptr %60, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %61) #8
  %423 = load ptr, ptr %60, align 8, !tbaa !12
  %424 = call ptr @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %423) #8
  %425 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.31", ptr %61, i32 0, i32 0
  store ptr %424, ptr %425, align 8
  br label %426

426:                                              ; preds = %488, %420
  call void @llvm.lifetime.start.p0(i64 8, ptr %62) #8
  %427 = load ptr, ptr %60, align 8, !tbaa !12
  %428 = call ptr @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %427) #8
  %429 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.31", ptr %62, i32 0, i32 0
  store ptr %428, ptr %429, align 8
  %430 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiS1_IiiEESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %61, ptr noundef nonnull align 8 dereferenceable(8) %62) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %62) #8
  br i1 %430, label %432, label %431

431:                                              ; preds = %426
  store i32 29, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %61) #8
  br label %491

432:                                              ; preds = %426
  %433 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiS1_IiiEESt6vectorIS3_SaIS3_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %61) #8
  %434 = getelementptr inbounds %"struct.std::pair.26", ptr %433, i32 0, i32 0
  %435 = load i32, ptr %434, align 4, !tbaa !25
  %436 = icmp eq i32 %435, 1
  br i1 %436, label %437, label %443

437:                                              ; preds = %432
  %438 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiS1_IiiEESt6vectorIS3_SaIS3_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %61) #8
  %439 = getelementptr inbounds %"struct.std::pair.26", ptr %438, i32 0, i32 1
  %440 = getelementptr inbounds %"struct.std::pair", ptr %439, i32 0, i32 0
  %441 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @f, ptr noundef nonnull align 4 dereferenceable(4) %440)
  %442 = load i32, ptr %441, align 4, !tbaa !5
  call void @_Z6updateii(i32 noundef %442, i32 noundef 1)
  br label %487

443:                                              ; preds = %432
  %444 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiS1_IiiEESt6vectorIS3_SaIS3_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %61) #8
  %445 = getelementptr inbounds %"struct.std::pair.26", ptr %444, i32 0, i32 0
  %446 = load i32, ptr %445, align 4, !tbaa !25
  %447 = icmp eq i32 %446, 2
  br i1 %447, label %448, label %454

448:                                              ; preds = %443
  %449 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiS1_IiiEESt6vectorIS3_SaIS3_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %61) #8
  %450 = getelementptr inbounds %"struct.std::pair.26", ptr %449, i32 0, i32 1
  %451 = getelementptr inbounds %"struct.std::pair", ptr %450, i32 0, i32 0
  %452 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @f, ptr noundef nonnull align 4 dereferenceable(4) %451)
  %453 = load i32, ptr %452, align 4, !tbaa !5
  call void @_Z6updateii(i32 noundef %453, i32 noundef -1)
  br label %486

454:                                              ; preds = %443
  call void @llvm.lifetime.start.p0(i64 8, ptr %63) #8
  %455 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiS1_IiiEESt6vectorIS3_SaIS3_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %61) #8
  %456 = getelementptr inbounds %"struct.std::pair.26", ptr %455, i32 0, i32 1
  %457 = getelementptr inbounds %"struct.std::pair", ptr %456, i32 0, i32 1
  %458 = load i32, ptr %457, align 4, !tbaa !27
  %459 = sext i32 %458 to i64
  store i64 %459, ptr %63, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %64) #8
  %460 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiS1_IiiEESt6vectorIS3_SaIS3_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %61) #8
  %461 = getelementptr inbounds %"struct.std::pair.26", ptr %460, i32 0, i32 1
  %462 = getelementptr inbounds %"struct.std::pair", ptr %461, i32 0, i32 0
  %463 = load i32, ptr %462, align 4, !tbaa !28
  %464 = sext i32 %463 to i64
  store i64 %464, ptr %64, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %65) #8
  %465 = load i64, ptr %63, align 8, !tbaa !18
  %466 = load i64, ptr %64, align 8, !tbaa !18
  %467 = sub nsw i64 %465, %466
  %468 = add nsw i64 %467, 1
  store i64 %468, ptr %65, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %66) #8
  %469 = load i64, ptr %63, align 8, !tbaa !18
  %470 = trunc i64 %469 to i32
  store i32 %470, ptr %66, align 4, !tbaa !5
  %471 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixEOi(ptr noundef nonnull align 8 dereferenceable(48) @f, ptr noundef nonnull align 4 dereferenceable(4) %66)
  %472 = load i32, ptr %471, align 4, !tbaa !5
  %473 = call noundef i64 @_Z5queryi(i32 noundef %472)
  call void @llvm.lifetime.start.p0(i64 4, ptr %67) #8
  %474 = load i64, ptr %64, align 8, !tbaa !18
  %475 = trunc i64 %474 to i32
  store i32 %475, ptr %67, align 4, !tbaa !5
  %476 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixEOi(ptr noundef nonnull align 8 dereferenceable(48) @f, ptr noundef nonnull align 4 dereferenceable(4) %67)
  %477 = load i32, ptr %476, align 4, !tbaa !5
  %478 = sub nsw i32 %477, 1
  %479 = call noundef i64 @_Z5queryi(i32 noundef %478)
  %480 = sub nsw i64 %473, %479
  %481 = load i64, ptr %65, align 8, !tbaa !18
  %482 = sub nsw i64 %481, %480
  store i64 %482, ptr %65, align 8, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 4, ptr %67) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %66) #8
  %483 = load i64, ptr %65, align 8, !tbaa !18
  %484 = load i64, ptr @ans, align 8, !tbaa !18
  %485 = add nsw i64 %484, %483
  store i64 %485, ptr @ans, align 8, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 8, ptr %65) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %64) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %63) #8
  br label %486

486:                                              ; preds = %454, %448
  br label %487

487:                                              ; preds = %486, %437
  br label %488

488:                                              ; preds = %487
  %489 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiS1_IiiEESt6vectorIS3_SaIS3_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %61, i32 noundef 0) #8
  %490 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.31", ptr %68, i32 0, i32 0
  store ptr %489, ptr %490, align 8
  br label %426, !llvm.loop !29

491:                                              ; preds = %431
  call void @llvm.lifetime.end.p0(i64 8, ptr %60) #8
  br label %492

492:                                              ; preds = %491
  %493 = call ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiS0_IiiEESaIS4_EEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %58, i32 noundef 0) #8
  %494 = getelementptr inbounds %"struct.std::_Rb_tree_iterator.28", ptr %69, i32 0, i32 0
  store ptr %493, ptr %494, align 8
  br label %415, !llvm.loop !30

495:                                              ; preds = %419
  %496 = load i64, ptr @ans, align 8, !tbaa !18
  %497 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %496)
  %498 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %497, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0

499:                                              ; preds = %411, %290
  %500 = load ptr, ptr %23, align 8
  %501 = load i32, ptr %24, align 4
  %502 = insertvalue { ptr, i32 } poison, ptr %500, 0
  %503 = insertvalue { ptr, i32 } %502, i32 %501, 1
  resume { ptr, i32 } %503
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #3

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIiSt6vectorISt4pairIiiESaIS2_EESt4lessIiESaIS1_IKiS4_EEEixERS7_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #5 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #5 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #0

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiiESaIS3_EEEES9_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #0

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS3_SaIS3_EEEEPFbRKS3_SA_EEvT_SD_T0_(ptr, ptr, ptr noundef) #6

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #7

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIiSt6vectorISt4pairIiS1_IiiEESaIS3_EESt4lessIiESaIS1_IKiS5_EEEixERS8_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #5 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIiSt6vectorISt4pairIiS1_IiiEESaIS3_EESt4lessIiESaIS1_IKiS5_EEEixEOi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #5 align 2

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiS0_IiiEESaIS4_EEEESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #0

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

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

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

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

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

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

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

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

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

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

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

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

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


; 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::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree.0" }
%"class.std::_Rb_tree.0" = type { %"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::map.4" = type { %"class.std::_Rb_tree.5" }
%"class.std::_Rb_tree.5" = type { %"struct.std::_Rb_tree<int, std::pair<const int, std::vector<std::pair<int, int>>>, std::_Select1st<std::pair<const int, std::vector<std::pair<int, int>>>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, std::vector<std::pair<int, int>>>, std::_Select1st<std::pair<const int, std::vector<std::pair<int, int>>>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::map.9" = type { %"class.std::_Rb_tree.10" }
%"class.std::_Rb_tree.10" = type { %"struct.std::_Rb_tree<int, std::pair<const int, std::vector<std::pair<int, std::pair<int, int>>>>, std::_Select1st<std::pair<const int, std::vector<std::pair<int, std::pair<int, int>>>>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, std::vector<std::pair<int, std::pair<int, int>>>>, std::_Select1st<std::pair<const int, std::vector<std::pair<int, std::pair<int, int>>>>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"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 }
%"struct.std::pair" = type { i32, i32 }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::pair.26" = type { i32, %"struct.std::pair" }
%"struct.std::_Rb_tree_iterator.28" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.31" = type { ptr }

@n = external dso_local global i32, align 4
@compr = external dso_local global %"class.std::set", align 8
@cnt = external dso_local local_unnamed_addr global i32, align 4
@f = external dso_local global %"class.std::map", align 8
@row = external dso_local global %"class.std::map.4", align 8
@col = external dso_local global %"class.std::map.4", align 8
@e = external dso_local global %"class.std::map.9", align 8
@ans = external dso_local local_unnamed_addr global i64, align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

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

; 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 nounwind uwtable
declare dso_local void @_Z6updateii(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z4compRKSt4pairIiiES2_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #0

; 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 i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"struct.std::pair", align 8
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %8 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %9 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %10 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %11 = alloca %"class.std::vector", align 8
  %12 = alloca %"struct.std::pair", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"struct.std::pair.26", align 8
  %16 = alloca i32, align 4
  %17 = alloca %"struct.std::pair", align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %"struct.std::pair.26", align 8
  %21 = alloca i32, align 4
  %22 = alloca %"struct.std::pair", align 8
  %23 = alloca i32, align 4
  %24 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %25 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %26 = alloca %"class.std::vector", align 8
  %27 = alloca %"struct.std::pair", align 8
  %28 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %29 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %30 = alloca %"struct.std::pair.26", align 8
  %31 = alloca i32, align 4
  %32 = alloca %"struct.std::pair", align 8
  %33 = alloca %"struct.std::_Rb_tree_iterator.28", align 8
  %34 = alloca %"struct.std::_Rb_tree_iterator.28", align 8
  %35 = alloca %"class.__gnu_cxx::__normal_iterator.31", align 8
  %36 = alloca %"class.__gnu_cxx::__normal_iterator.31", align 8
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %40 = load i32, ptr @n, align 4, !tbaa !5
  %41 = icmp sgt i32 %40, 0
  br i1 %41, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %64, %0
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %42 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @compr) #7
  store ptr %42, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %43 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @compr) #7
  store ptr %43, ptr %8, align 8
  %44 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br i1 %44, label %.lr.ph92, label %._crit_edge93

.lr.ph:                                           ; preds = %0, %64
  %.090 = phi i32 [ %69, %64 ], [ 0, %0 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %45 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.6, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %46 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.6, ptr noundef nonnull %3, ptr noundef nonnull %4)
  %47 = load i32, ptr %1, align 4, !tbaa !5
  %48 = load i32, ptr %3, align 4, !tbaa !5
  %49 = icmp eq i32 %47, %48
  br i1 %49, label %50, label %58

50:                                               ; preds = %.lr.ph
  %51 = load i32, ptr %2, align 4, !tbaa !5
  %52 = load i32, ptr %4, align 4, !tbaa !5
  %53 = icmp sgt i32 %51, %52
  br i1 %53, label %54, label %55

54:                                               ; preds = %50
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %4) #7
  br label %55

55:                                               ; preds = %54, %50
  %56 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIiSt6vectorISt4pairIiiESaIS2_EESt4lessIiESaIS1_IKiS4_EEEixERS7_(ptr noundef nonnull align 8 dereferenceable(48) @col, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %57 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %4)
  store i64 %57, ptr %5, align 8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %56, ptr noundef nonnull align 4 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %64

58:                                               ; preds = %.lr.ph
  %59 = icmp sgt i32 %47, %48
  br i1 %59, label %60, label %61

60:                                               ; preds = %58
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %3) #7
  br label %61

61:                                               ; preds = %60, %58
  %62 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIiSt6vectorISt4pairIiiESaIS2_EESt4lessIiESaIS1_IKiS4_EEEixERS7_(ptr noundef nonnull align 8 dereferenceable(48) @row, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %63 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %3)
  store i64 %63, ptr %6, align 8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %62, ptr noundef nonnull align 4 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %64

64:                                               ; preds = %61, %55
  %65 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @compr, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %66 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @compr, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %67 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @compr, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %68 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @compr, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  %69 = add nuw nsw i32 %.090, 1
  %70 = load i32, ptr @n, align 4, !tbaa !5
  %71 = icmp slt i32 %69, %70
  br i1 %71, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge93:                                    ; preds = %.lr.ph92, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %72 = call ptr @_ZNSt3mapIiSt6vectorISt4pairIiiESaIS2_EESt4lessIiESaIS1_IKiS4_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @row) #7
  store ptr %72, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %73 = call ptr @_ZNSt3mapIiSt6vectorISt4pairIiiESaIS2_EESt4lessIiESaIS1_IKiS4_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @row) #7
  store ptr %73, ptr %10, align 8
  %74 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiiESaIS3_EEEES9_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  br i1 %74, label %.lr.ph102, label %._crit_edge103

.lr.ph102:                                        ; preds = %._crit_edge93
  %75 = getelementptr inbounds i8, ptr %12, i64 4
  %.sroa.234.0..sroa_idx = getelementptr inbounds i8, ptr %15, i64 8
  %.sroa.230.0..sroa_idx = getelementptr inbounds i8, ptr %20, i64 8
  br label %87

.lr.ph92:                                         ; preds = %._crit_edge, %.lr.ph92
  %76 = load i32, ptr @cnt, align 4, !tbaa !5
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr @cnt, align 4, !tbaa !5
  %78 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @f, ptr noundef nonnull align 4 dereferenceable(4) %78)
  store i32 %77, ptr %79, align 4, !tbaa !5
  %80 = call ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEi(ptr noundef nonnull align 8 dereferenceable(8) %7, i32 noundef 0) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %81 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @compr) #7
  store ptr %81, ptr %8, align 8
  %82 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br i1 %82, label %.lr.ph92, label %._crit_edge93, !llvm.loop !11

._crit_edge103:                                   ; preds = %._crit_edge100, %._crit_edge93
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %24) #7
  %83 = call ptr @_ZNSt3mapIiSt6vectorISt4pairIiiESaIS2_EESt4lessIiESaIS1_IKiS4_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @col) #7
  store ptr %83, ptr %24, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %25) #7
  %84 = call ptr @_ZNSt3mapIiSt6vectorISt4pairIiiESaIS2_EESt4lessIiESaIS1_IKiS4_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @col) #7
  store ptr %84, ptr %25, align 8
  %85 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiiESaIS3_EEEES9_(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #7
  br i1 %85, label %.lr.ph112, label %._crit_edge113

.lr.ph112:                                        ; preds = %._crit_edge103
  %86 = getelementptr inbounds i8, ptr %27, i64 4
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %30, i64 8
  br label %179

87:                                               ; preds = %.lr.ph102, %._crit_edge100
  %88 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiiESaIS3_EEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %89 = getelementptr inbounds i8, ptr %88, i64 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #7
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  %90 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %89) #7
  %91 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %89) #7
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS3_SaIS3_EEEEPFbRKS3_SA_EEvT_SD_T0_(ptr %90, ptr %91, ptr noundef nonnull @_Z4compRKSt4pairIiiES2_)
          to label %92 unwind label %97

92:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  %93 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %89, i64 noundef 0) #7
  %94 = load i64, ptr %93, align 4
  store i64 %94, ptr %12, align 8
  %95 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %89) #7
  %96 = icmp ugt i64 %95, 1
  br i1 %96, label %.lr.ph96, label %._crit_edge97

._crit_edge97:                                    ; preds = %114, %92
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 4 dereferenceable(8) %12)
          to label %117 unwind label %128

97:                                               ; preds = %87
  %98 = landingpad { ptr, i32 }
          cleanup
  br label %175

.lr.ph96:                                         ; preds = %92, %114
  %indvars.iv = phi i64 [ %indvars.iv.next, %114 ], [ 1, %92 ]
  %99 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %89, i64 noundef %indvars.iv) #7
  %100 = load i32, ptr %99, align 4, !tbaa !12
  %101 = load i32, ptr %75, align 4, !tbaa !14
  %102 = icmp sgt i32 %100, %101
  br i1 %102, label %103, label %109

103:                                              ; preds = %.lr.ph96
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 4 dereferenceable(8) %12)
          to label %104 unwind label %107

104:                                              ; preds = %103
  %105 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %89, i64 noundef %indvars.iv) #7
  %106 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %12, ptr noundef nonnull align 4 dereferenceable(8) %105)
  br label %114

107:                                              ; preds = %103
  %108 = landingpad { ptr, i32 }
          cleanup
  br label %174

109:                                              ; preds = %.lr.ph96
  %110 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %89, i64 noundef %indvars.iv) #7
  %111 = getelementptr inbounds i8, ptr %110, i64 4
  %112 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %75, ptr noundef nonnull align 4 dereferenceable(4) %111)
  %113 = load i32, ptr %112, align 4, !tbaa !5
  store i32 %113, ptr %75, align 4, !tbaa !14
  br label %114

114:                                              ; preds = %104, %109
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %115 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %89) #7
  %116 = icmp ugt i64 %115, %indvars.iv.next
  br i1 %116, label %.lr.ph96, label %._crit_edge97, !llvm.loop !15

117:                                              ; preds = %._crit_edge97
  %118 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiiESaIS3_EEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %119 = getelementptr inbounds i8, ptr %118, i64 8
  %120 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %119, ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %121 unwind label %128

121:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  %122 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  store ptr %122, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  %123 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  store ptr %123, ptr %14, align 8
  %124 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  br i1 %124, label %.lr.ph99, label %._crit_edge100

._crit_edge100:                                   ; preds = %160, %121
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #7
  %125 = call ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiiESaIS3_EEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %9, i32 noundef 0) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %126 = call ptr @_ZNSt3mapIiSt6vectorISt4pairIiiESaIS2_EESt4lessIiESaIS1_IKiS4_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @row) #7
  store ptr %126, ptr %10, align 8
  %127 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiiESaIS3_EEEES9_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  br i1 %127, label %87, label %._crit_edge103, !llvm.loop !16

128:                                              ; preds = %117, %._crit_edge97
  %129 = landingpad { ptr, i32 }
          cleanup
  br label %174

.lr.ph99:                                         ; preds = %121, %160
  %130 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  %131 = getelementptr inbounds i8, ptr %130, i64 4
  %132 = load i32, ptr %131, align 4, !tbaa !14
  %133 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  %134 = load i32, ptr %133, align 4, !tbaa !12
  %135 = add i32 %132, 1
  %136 = sub i32 %135, %134
  %137 = sext i32 %136 to i64
  %138 = load i64, ptr @ans, align 8, !tbaa !17
  %139 = add nsw i64 %138, %137
  store i64 %139, ptr @ans, align 8, !tbaa !17
  %140 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  %141 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIiSt6vectorISt4pairIiS1_IiiEESaIS3_EESt4lessIiESaIS1_IKiS5_EEEixERS8_(ptr noundef nonnull align 8 dereferenceable(48) @e, ptr noundef nonnull align 4 dereferenceable(4) %140)
          to label %142 unwind label %164

142:                                              ; preds = %.lr.ph99
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %15) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #7
  store i32 1, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #7
  %143 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiiESaIS3_EEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #7
  store i32 -1, ptr %18, align 4, !tbaa !5
  %144 = invoke i64 @_ZSt9make_pairIRKiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4) %143, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %145 unwind label %166

145:                                              ; preds = %142
  store i64 %144, ptr %17, align 8
  %146 = invoke { i64, i32 } @_ZSt9make_pairIiSt4pairIiiEES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(8) %17)
          to label %147 unwind label %166

147:                                              ; preds = %145
  %.fca.0.extract31 = extractvalue { i64, i32 } %146, 0
  %.fca.1.extract32 = extractvalue { i64, i32 } %146, 1
  store i64 %.fca.0.extract31, ptr %15, align 8
  store i32 %.fca.1.extract32, ptr %.sroa.234.0..sroa_idx, align 8
  invoke void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %141, ptr noundef nonnull align 4 dereferenceable(12) %15)
          to label %148 unwind label %166

148:                                              ; preds = %147
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %15) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #7
  %149 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  %150 = getelementptr inbounds i8, ptr %149, i64 4
  %151 = load i32, ptr %150, align 4, !tbaa !14
  %152 = add nsw i32 %151, 1
  store i32 %152, ptr %19, align 4, !tbaa !5
  %153 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIiSt6vectorISt4pairIiS1_IiiEESaIS3_EESt4lessIiESaIS1_IKiS5_EEEixEOi(ptr noundef nonnull align 8 dereferenceable(48) @e, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %154 unwind label %168

154:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %20) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %21) #7
  store i32 2, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #7
  %155 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiiESaIS3_EEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %23) #7
  store i32 -1, ptr %23, align 4, !tbaa !5
  %156 = invoke i64 @_ZSt9make_pairIRKiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4) %155, ptr noundef nonnull align 4 dereferenceable(4) %23)
          to label %157 unwind label %170

157:                                              ; preds = %154
  store i64 %156, ptr %22, align 8
  %158 = invoke { i64, i32 } @_ZSt9make_pairIiSt4pairIiiEES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %21, ptr noundef nonnull align 4 dereferenceable(8) %22)
          to label %159 unwind label %170

159:                                              ; preds = %157
  %.fca.0.extract27 = extractvalue { i64, i32 } %158, 0
  %.fca.1.extract28 = extractvalue { i64, i32 } %158, 1
  store i64 %.fca.0.extract27, ptr %20, align 8
  store i32 %.fca.1.extract28, ptr %.sroa.230.0..sroa_idx, align 8
  invoke void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %153, ptr noundef nonnull align 4 dereferenceable(12) %20)
          to label %160 unwind label %170

160:                                              ; preds = %159
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #7
  %161 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %13, i32 noundef 0) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  %162 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  store ptr %162, ptr %14, align 8
  %163 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  br i1 %163, label %.lr.ph99, label %._crit_edge100, !llvm.loop !19

164:                                              ; preds = %.lr.ph99
  %165 = landingpad { ptr, i32 }
          cleanup
  br label %173

166:                                              ; preds = %147, %145, %142
  %167 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %15) #7
  br label %173

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

170:                                              ; preds = %159, %157, %154
  %171 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %20) #7
  br label %172

172:                                              ; preds = %170, %168
  %.pn80 = phi { ptr, i32 } [ %171, %170 ], [ %169, %168 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #7
  br label %173

173:                                              ; preds = %172, %166, %164
  %.pn80.pn = phi { ptr, i32 } [ %.pn80, %172 ], [ %167, %166 ], [ %165, %164 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  br label %174

174:                                              ; preds = %173, %128, %107
  %.pn83 = phi { ptr, i32 } [ %108, %107 ], [ %.pn80.pn, %173 ], [ %129, %128 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  br label %175

175:                                              ; preds = %174, %97
  %.pn83.pn = phi { ptr, i32 } [ %.pn83, %174 ], [ %98, %97 ]
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  br label %294

._crit_edge113:                                   ; preds = %._crit_edge110, %._crit_edge103
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %33) #7
  %176 = call ptr @_ZNSt3mapIiSt6vectorISt4pairIiS1_IiiEESaIS3_EESt4lessIiESaIS1_IKiS5_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @e) #7
  store ptr %176, ptr %33, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %34) #7
  %177 = call ptr @_ZNSt3mapIiSt6vectorISt4pairIiS1_IiiEESaIS3_EESt4lessIiESaIS1_IKiS5_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @e) #7
  store ptr %177, ptr %34, align 8
  %178 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiS0_IiiEESaIS4_EEEESA_(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull align 8 dereferenceable(8) %34) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %34) #7
  br i1 %178, label %.lr.ph118, label %._crit_edge119

179:                                              ; preds = %.lr.ph112, %._crit_edge110
  %180 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiiESaIS3_EEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #7
  %181 = getelementptr inbounds i8, ptr %180, i64 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %26) #7
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #7
  %182 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %181) #7
  %183 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %181) #7
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS3_SaIS3_EEEEPFbRKS3_SA_EEvT_SD_T0_(ptr %182, ptr %183, ptr noundef nonnull @_Z4compRKSt4pairIiiES2_)
          to label %184 unwind label %189

184:                                              ; preds = %179
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %27) #7
  %185 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %181, i64 noundef 0) #7
  %186 = load i64, ptr %185, align 4
  store i64 %186, ptr %27, align 8
  %187 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %181) #7
  %188 = icmp ugt i64 %187, 1
  br i1 %188, label %.lr.ph106, label %._crit_edge107

._crit_edge107:                                   ; preds = %206, %184
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 4 dereferenceable(8) %27)
          to label %209 unwind label %220

189:                                              ; preds = %179
  %190 = landingpad { ptr, i32 }
          cleanup
  br label %242

.lr.ph106:                                        ; preds = %184, %206
  %indvars.iv121 = phi i64 [ %indvars.iv.next122, %206 ], [ 1, %184 ]
  %191 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %181, i64 noundef %indvars.iv121) #7
  %192 = load i32, ptr %191, align 4, !tbaa !12
  %193 = load i32, ptr %86, align 4, !tbaa !14
  %194 = icmp sgt i32 %192, %193
  br i1 %194, label %195, label %201

195:                                              ; preds = %.lr.ph106
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 4 dereferenceable(8) %27)
          to label %196 unwind label %199

196:                                              ; preds = %195
  %197 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %181, i64 noundef %indvars.iv121) #7
  %198 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %27, ptr noundef nonnull align 4 dereferenceable(8) %197)
  br label %206

199:                                              ; preds = %195
  %200 = landingpad { ptr, i32 }
          cleanup
  br label %241

201:                                              ; preds = %.lr.ph106
  %202 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %181, i64 noundef %indvars.iv121) #7
  %203 = getelementptr inbounds i8, ptr %202, i64 4
  %204 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %86, ptr noundef nonnull align 4 dereferenceable(4) %203)
  %205 = load i32, ptr %204, align 4, !tbaa !5
  store i32 %205, ptr %86, align 4, !tbaa !14
  br label %206

206:                                              ; preds = %196, %201
  %indvars.iv.next122 = add nuw nsw i64 %indvars.iv121, 1
  %207 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %181) #7
  %208 = icmp ugt i64 %207, %indvars.iv.next122
  br i1 %208, label %.lr.ph106, label %._crit_edge107, !llvm.loop !20

209:                                              ; preds = %._crit_edge107
  %210 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiiESaIS3_EEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #7
  %211 = getelementptr inbounds i8, ptr %210, i64 8
  %212 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %211, ptr noundef nonnull align 8 dereferenceable(24) %26)
          to label %213 unwind label %220

213:                                              ; preds = %209
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %28) #7
  %214 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #7
  store ptr %214, ptr %28, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %29) #7
  %215 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #7
  store ptr %215, ptr %29, align 8
  %216 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(8) %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %29) #7
  br i1 %216, label %.lr.ph109, label %._crit_edge110

._crit_edge110:                                   ; preds = %232, %213
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #7
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %26) #7
  %217 = call ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiiESaIS3_EEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %24, i32 noundef 0) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %25) #7
  %218 = call ptr @_ZNSt3mapIiSt6vectorISt4pairIiiESaIS2_EESt4lessIiESaIS1_IKiS4_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @col) #7
  store ptr %218, ptr %25, align 8
  %219 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiiESaIS3_EEEES9_(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #7
  br i1 %219, label %179, label %._crit_edge113, !llvm.loop !21

220:                                              ; preds = %209, %._crit_edge107
  %221 = landingpad { ptr, i32 }
          cleanup
  br label %241

.lr.ph109:                                        ; preds = %213, %232
  %222 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiiESaIS3_EEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #7
  %223 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIiSt6vectorISt4pairIiS1_IiiEESaIS3_EESt4lessIiESaIS1_IKiS5_EEEixERS8_(ptr noundef nonnull align 8 dereferenceable(48) @e, ptr noundef nonnull align 4 dereferenceable(4) %222)
          to label %224 unwind label %236

224:                                              ; preds = %.lr.ph109
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %30) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %31) #7
  store i32 3, ptr %31, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %32) #7
  %225 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %28) #7
  %226 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %28) #7
  %227 = getelementptr inbounds i8, ptr %226, i64 4
  %228 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %225, ptr noundef nonnull align 4 dereferenceable(4) %227)
          to label %229 unwind label %238

229:                                              ; preds = %224
  store i64 %228, ptr %32, align 8
  %230 = invoke { i64, i32 } @_ZSt9make_pairIiSt4pairIiiEES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %31, ptr noundef nonnull align 4 dereferenceable(8) %32)
          to label %231 unwind label %238

231:                                              ; preds = %229
  %.fca.0.extract = extractvalue { i64, i32 } %230, 0
  %.fca.1.extract = extractvalue { i64, i32 } %230, 1
  store i64 %.fca.0.extract, ptr %30, align 8
  store i32 %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 8
  invoke void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %223, ptr noundef nonnull align 4 dereferenceable(12) %30)
          to label %232 unwind label %238

232:                                              ; preds = %231
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %32) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %31) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %30) #7
  %233 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %28, i32 noundef 0) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %29) #7
  %234 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #7
  store ptr %234, ptr %29, align 8
  %235 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(8) %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %29) #7
  br i1 %235, label %.lr.ph109, label %._crit_edge110, !llvm.loop !22

236:                                              ; preds = %.lr.ph109
  %237 = landingpad { ptr, i32 }
          cleanup
  br label %240

238:                                              ; preds = %231, %229, %224
  %239 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %32) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %31) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %30) #7
  br label %240

240:                                              ; preds = %238, %236
  %.pn = phi { ptr, i32 } [ %239, %238 ], [ %237, %236 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #7
  br label %241

241:                                              ; preds = %240, %220, %199
  %.pn77 = phi { ptr, i32 } [ %200, %199 ], [ %.pn, %240 ], [ %221, %220 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #7
  br label %242

242:                                              ; preds = %241, %189
  %.pn77.pn = phi { ptr, i32 } [ %.pn77, %241 ], [ %190, %189 ]
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #7
  br label %294

._crit_edge119:                                   ; preds = %._crit_edge116, %._crit_edge113
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %33) #7
  %243 = load i64, ptr @ans, align 8, !tbaa !17
  %244 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %243)
  %245 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %244, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0

.lr.ph118:                                        ; preds = %._crit_edge113, %._crit_edge116
  %246 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiS0_IiiEESaIS4_EEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %33) #7
  %247 = getelementptr inbounds i8, ptr %246, i64 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %35) #7
  %248 = call ptr @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %247) #7
  store ptr %248, ptr %35, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %36) #7
  %249 = call ptr @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %247) #7
  store ptr %249, ptr %36, align 8
  %250 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiS1_IiiEESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull align 8 dereferenceable(8) %36) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %36) #7
  br i1 %250, label %.lr.ph115, label %._crit_edge116

._crit_edge116:                                   ; preds = %290, %.lr.ph118
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %35) #7
  %251 = call ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiS0_IiiEESaIS4_EEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %33, i32 noundef 0) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %34) #7
  %252 = call ptr @_ZNSt3mapIiSt6vectorISt4pairIiS1_IiiEESaIS3_EESt4lessIiESaIS1_IKiS5_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @e) #7
  store ptr %252, ptr %34, align 8
  %253 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiS0_IiiEESaIS4_EEEESA_(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull align 8 dereferenceable(8) %34) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %34) #7
  br i1 %253, label %.lr.ph118, label %._crit_edge119, !llvm.loop !23

.lr.ph115:                                        ; preds = %.lr.ph118, %290
  %254 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiS1_IiiEESt6vectorIS3_SaIS3_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %35) #7
  %255 = load i32, ptr %254, align 4, !tbaa !24
  %256 = icmp eq i32 %255, 1
  %257 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiS1_IiiEESt6vectorIS3_SaIS3_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %35) #7
  br i1 %256, label %258, label %262

258:                                              ; preds = %.lr.ph115
  %259 = getelementptr inbounds i8, ptr %257, i64 4
  %260 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @f, ptr noundef nonnull align 4 dereferenceable(4) %259)
  %261 = load i32, ptr %260, align 4, !tbaa !5
  call void @_Z6updateii(i32 noundef %261, i32 noundef 1)
  br label %290

262:                                              ; preds = %.lr.ph115
  %263 = load i32, ptr %257, align 4, !tbaa !24
  %264 = icmp eq i32 %263, 2
  %265 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiS1_IiiEESt6vectorIS3_SaIS3_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %35) #7
  br i1 %264, label %266, label %270

266:                                              ; preds = %262
  %267 = getelementptr inbounds i8, ptr %265, i64 4
  %268 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @f, ptr noundef nonnull align 4 dereferenceable(4) %267)
  %269 = load i32, ptr %268, align 4, !tbaa !5
  call void @_Z6updateii(i32 noundef %269, i32 noundef -1)
  br label %290

270:                                              ; preds = %262
  %271 = getelementptr inbounds i8, ptr %265, i64 8
  %272 = load i32, ptr %271, align 4, !tbaa !26
  %273 = sext i32 %272 to i64
  %274 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiS1_IiiEESt6vectorIS3_SaIS3_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %35) #7
  %275 = getelementptr inbounds i8, ptr %274, i64 4
  %276 = load i32, ptr %275, align 4, !tbaa !27
  %277 = sext i32 %276 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %37) #7
  store i32 %272, ptr %37, align 4, !tbaa !5
  %278 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixEOi(ptr noundef nonnull align 8 dereferenceable(48) @f, ptr noundef nonnull align 4 dereferenceable(4) %37)
  %279 = load i32, ptr %278, align 4, !tbaa !5
  %280 = call noundef i64 @_Z5queryi(i32 noundef %279)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %38) #7
  store i32 %276, ptr %38, align 4, !tbaa !5
  %281 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixEOi(ptr noundef nonnull align 8 dereferenceable(48) @f, ptr noundef nonnull align 4 dereferenceable(4) %38)
  %282 = load i32, ptr %281, align 4, !tbaa !5
  %283 = add nsw i32 %282, -1
  %284 = call noundef i64 @_Z5queryi(i32 noundef %283)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %38) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %37) #7
  %285 = load i64, ptr @ans, align 8, !tbaa !17
  %.neg = add nsw i64 %273, 1
  %286 = add i64 %280, %277
  %287 = sub i64 %.neg, %286
  %288 = add i64 %287, %284
  %289 = add nsw i64 %288, %285
  store i64 %289, ptr @ans, align 8, !tbaa !17
  br label %290

290:                                              ; preds = %258, %270, %266
  %291 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiS1_IiiEESt6vectorIS3_SaIS3_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %35, i32 noundef 0) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %36) #7
  %292 = call ptr @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %247) #7
  store ptr %292, ptr %36, align 8
  %293 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiS1_IiiEESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull align 8 dereferenceable(8) %36) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %36) #7
  br i1 %293, label %.lr.ph115, label %._crit_edge116, !llvm.loop !28

294:                                              ; preds = %242, %175
  %.pn83.pn.pn = phi { ptr, i32 } [ %.pn83.pn, %175 ], [ %.pn77.pn, %242 ]
  resume { ptr, i32 } %.pn83.pn.pn
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIiSt6vectorISt4pairIiiESaIS2_EESt4lessIiESaIS1_IKiS4_EEEixERS7_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiiESaIS3_EEEES9_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS3_SaIS3_EEEEPFbRKS3_SA_EEvT_SD_T0_(ptr, ptr, ptr noundef) local_unnamed_addr #6

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_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 i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIiSt6vectorISt4pairIiS1_IiiEESaIS3_EESt4lessIiESaIS1_IKiS5_EEEixERS8_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIiSt6vectorISt4pairIiS1_IiiEESaIS3_EESt4lessIiESaIS1_IKiS5_EEEixEOi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5 align 2

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiSt6vectorIS0_IiS0_IiiEESaIS4_EEEESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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