; LLVM IR from Izaron/ACM-ICPC :: Russian Council of School Olympiads (R.S.O.Sh.)/IOIP/IOIP 2013 (split)

; 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.__gnu_pbds::tree" = type { %"class.__gnu_pbds::basic_branch" }
%"class.__gnu_pbds::basic_branch" = type { %"class.__gnu_pbds::detail::rb_tree_set" }
%"class.__gnu_pbds::detail::rb_tree_set" = type { %"class.__gnu_pbds::detail::bin_search_tree_set" }
%"class.__gnu_pbds::detail::bin_search_tree_set" = type { %"class.__gnu_pbds::tree_order_statistics_node_update", [8 x i8], ptr, i64 }
%"class.__gnu_pbds::tree_order_statistics_node_update" = type { %"struct.__gnu_pbds::detail::branch_policy" }
%"struct.__gnu_pbds::detail::branch_policy" = type { ptr }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::tuple<long long, long long, std::pair<long long, long long>, std::pair<long long, long long>>, std::tuple<long long, long long, std::pair<long long, long long>, std::pair<long long, long long>>, std::_Identity<std::tuple<long long, long long, std::pair<long long, long long>, std::pair<long long, long long>>>, std::less<std::tuple<long long, long long, std::pair<long long, long long>, std::pair<long long, long long>>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::tuple<long long, long long, std::pair<long long, long long>, std::pair<long long, long long>>, std::tuple<long long, long long, std::pair<long long, long long>, std::pair<long long, long long>>, std::_Identity<std::tuple<long long, long long, std::pair<long long, long long>, std::pair<long long, long long>>>, std::less<std::tuple<long long, long long, std::pair<long long, long long>, std::pair<long long, long long>>>>::_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 }
%"struct.std::pair.0" = type { i64, i64 }
%"struct.std::pair.2" = type { i32, i32 }
%"struct.std::pair" = type <{ %"class.__gnu_pbds::detail::bin_search_tree_const_it_", i8, [7 x i8] }>
%"class.__gnu_pbds::detail::bin_search_tree_const_it_" = type { ptr }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.7", %"struct.std::_Head_base.12" }
%"struct.std::_Tuple_impl.7" = type { %"struct.std::_Tuple_impl.8", %"struct.std::_Head_base.11" }
%"struct.std::_Tuple_impl.8" = type { %"struct.std::_Tuple_impl.9", %"struct.std::_Head_base.10" }
%"struct.std::_Tuple_impl.9" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { %"struct.std::pair.0" }
%"struct.std::_Head_base.10" = type { %"struct.std::pair.0" }
%"struct.std::_Head_base.11" = type { i64 }
%"struct.std::_Head_base.12" = type { i64 }
%"class.std::tuple.13" = type { %"struct.std::_Tuple_impl.14" }
%"struct.std::_Tuple_impl.14" = type { %"struct.std::_Tuple_impl.15", %"struct.std::_Head_base.21" }
%"struct.std::_Tuple_impl.15" = type { %"struct.std::_Tuple_impl.16", %"struct.std::_Head_base.20" }
%"struct.std::_Tuple_impl.16" = type { %"struct.std::_Tuple_impl.17", %"struct.std::_Head_base.19" }
%"struct.std::_Tuple_impl.17" = type { %"struct.std::_Head_base.18" }
%"struct.std::_Head_base.18" = type { %"struct.std::pair.2" }
%"struct.std::_Head_base.19" = type { %"struct.std::pair.2" }
%"struct.std::_Head_base.20" = type { i32 }
%"struct.std::_Head_base.21" = type { i32 }
%"struct.std::pair.4" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::tuple.25" = type { %"struct.std::_Tuple_impl.26" }
%"struct.std::_Tuple_impl.26" = type { %"struct.std::_Tuple_impl.base", %"struct.std::_Head_base.21" }
%"struct.std::_Tuple_impl.base" = type <{ %"struct.std::_Tuple_impl.8", %"struct.std::_Head_base.20" }>
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.__gnu_pbds::tree", align 8
  %3 = alloca %"class.std::set", align 8
  %4 = alloca [300005 x i32], align 16
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::pair.0", align 8
  %13 = alloca %"struct.std::pair.2", align 4
  %14 = alloca %"struct.std::pair", align 8
  %15 = alloca %"class.std::tuple", align 8
  %16 = alloca %"class.std::tuple.13", align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %"struct.std::pair.2", align 4
  %20 = alloca i32, align 4
  %21 = alloca %"struct.std::pair.2", align 4
  %22 = alloca %"struct.std::pair.4", align 8
  %23 = alloca %"class.std::vector", align 8
  %24 = alloca %"class.std::vector", align 8
  %25 = alloca %"class.std::tuple", align 8
  %26 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %27 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %28 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %29 = alloca %"struct.std::pair.0", align 8
  %30 = alloca %"struct.std::pair.0", align 8
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca %"struct.std::pair.0", align 8
  %36 = alloca %"class.__gnu_pbds::detail::bin_search_tree_const_it_", align 8
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca %"class.std::tuple", align 8
  %40 = alloca %"class.std::tuple.25", align 8
  %41 = alloca i32, align 4
  %42 = alloca i32, align 4
  %43 = alloca %"struct.std::pair.0", align 8
  %44 = alloca %"class.__gnu_pbds::detail::bin_search_tree_const_it_", align 8
  %45 = alloca i32, align 4
  %46 = alloca i32, align 4
  %47 = alloca %"class.std::tuple", align 8
  %48 = alloca %"class.std::tuple.25", align 8
  %49 = alloca i32, align 4
  %50 = alloca i32, align 4
  %51 = alloca %"struct.std::pair.0", align 8
  %52 = alloca %"class.__gnu_pbds::detail::bin_search_tree_const_it_", align 8
  %53 = alloca %"struct.std::pair.0", align 8
  %54 = alloca %"class.__gnu_pbds::detail::bin_search_tree_const_it_", align 8
  %55 = alloca %"class.std::tuple", align 8
  %56 = alloca i64, align 8
  %57 = alloca i64, align 8
  %58 = alloca %"struct.std::pair.4", align 8
  %59 = alloca ptr, align 8
  %60 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %61 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %62 = alloca i32, align 4
  %63 = alloca ptr, align 8
  %64 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %65 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %66 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 32, ptr %2) #8
  call void @_ZN10__gnu_pbds4treeISt4pairIxxENS_9null_typeESt4lessIS2_ENS_11rb_tree_tagENS_33tree_order_statistics_node_updateESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2)
  call void @llvm.lifetime.start.p0(i64 48, ptr %3) #8
  call void @_ZNSt3setISt5tupleIJxxSt4pairIxxES2_EESt4lessIS3_ESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  call void @llvm.lifetime.start.p0(i64 1200020, ptr %4) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  %67 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %5)
          to label %68 unwind label %75

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

69:                                               ; preds = %86, %68
  %70 = load i32, ptr %8, align 4, !tbaa !5
  %71 = load i32, ptr %5, align 4, !tbaa !5
  %72 = mul nsw i32 2, %71
  %73 = icmp slt i32 %70, %72
  br i1 %73, label %79, label %74

74:                                               ; preds = %69
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %93

75:                                               ; preds = %93, %0
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %6, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %7, align 4
  br label %459

79:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  %80 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %9)
          to label %81 unwind label %89

81:                                               ; preds = %79
  %82 = load i32, ptr %9, align 4, !tbaa !5
  %83 = load i32, ptr %8, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [300005 x i32], ptr %4, i64 0, i64 %84
  store i32 %82, ptr %85, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %86

86:                                               ; preds = %81
  %87 = load i32, ptr %8, align 4, !tbaa !5
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %8, align 4, !tbaa !5
  br label %69, !llvm.loop !9

89:                                               ; preds = %79
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %6, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %459

93:                                               ; preds = %74
  %94 = getelementptr inbounds [300005 x i32], ptr %4, i64 0, i64 0
  %95 = getelementptr inbounds [300005 x i32], ptr %4, i64 0, i64 0
  %96 = load i32, ptr %5, align 4, !tbaa !5
  %97 = mul nsw i32 2, %96
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds i32, ptr %95, i64 %98
  invoke void @_ZSt4sortIPiEvT_S1_(ptr noundef %94, ptr noundef %99)
          to label %100 unwind label %75

100:                                              ; preds = %93
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %101

101:                                              ; preds = %180, %100
  %102 = load i32, ptr %10, align 4, !tbaa !5
  %103 = load i32, ptr %5, align 4, !tbaa !5
  %104 = mul nsw i32 2, %103
  %105 = icmp slt i32 %102, %104
  br i1 %105, label %107, label %106

106:                                              ; preds = %101
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %184

107:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  %108 = load i32, ptr %10, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [300005 x i32], ptr %4, i64 0, i64 %109
  %111 = load i32, ptr %110, align 4, !tbaa !5
  store i32 %111, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %112 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %113 unwind label %166

113:                                              ; preds = %107
  store i64 %112, ptr %13, align 4
  invoke void @_ZNSt4pairIxxEC2IiiTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS3_S4_EEclsr6_PCCFPIS3_S4_EE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS_IS3_S4_E(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 4 dereferenceable(8) %13)
          to label %114 unwind label %166

114:                                              ; preds = %113
  %115 = invoke { ptr, i8 } @_ZN10__gnu_pbds6detail11rb_tree_setISt4pairIxxENS_9null_typeESt4lessIS3_ENS0_11tree_traitsIS3_S4_S6_NS_33tree_order_statistics_node_updateENS_11rb_tree_tagESaIcEEESA_E6insertERKS3_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %116 unwind label %166

116:                                              ; preds = %114
  %117 = getelementptr inbounds { ptr, i8 }, ptr %14, i32 0, i32 0
  %118 = extractvalue { ptr, i8 } %115, 0
  store ptr %118, ptr %117, align 8
  %119 = getelementptr inbounds { ptr, i8 }, ptr %14, i32 0, i32 1
  %120 = extractvalue { ptr, i8 } %115, 1
  store i8 %120, ptr %119, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #8
  %121 = load i32, ptr %10, align 4, !tbaa !5
  %122 = icmp ne i32 %121, 0
  br i1 %122, label %123, label %179

123:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 48, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  %124 = load i32, ptr %10, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [300005 x i32], ptr %4, i64 0, i64 %125
  %127 = load i32, ptr %126, align 4, !tbaa !5
  %128 = load i32, ptr %10, align 4, !tbaa !5
  %129 = sub nsw i32 %128, 1
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [300005 x i32], ptr %4, i64 0, i64 %130
  %132 = load i32, ptr %131, align 4, !tbaa !5
  %133 = sub nsw i32 %127, %132
  store i32 %133, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %134 = load i32, ptr %10, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [300005 x i32], ptr %4, i64 0, i64 %135
  %137 = load i32, ptr %136, align 4, !tbaa !5
  %138 = sub nsw i32 0, %137
  %139 = load i32, ptr %10, align 4, !tbaa !5
  %140 = sub nsw i32 %139, 1
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [300005 x i32], ptr %4, i64 0, i64 %141
  %143 = load i32, ptr %142, align 4, !tbaa !5
  %144 = sub nsw i32 %138, %143
  store i32 %144, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  %145 = load i32, ptr %10, align 4, !tbaa !5
  %146 = sub nsw i32 %145, 1
  store i32 %146, ptr %20, align 4, !tbaa !5
  %147 = load i32, ptr %10, align 4, !tbaa !5
  %148 = sub nsw i32 %147, 1
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [300005 x i32], ptr %4, i64 0, i64 %149
  %151 = invoke i64 @_ZSt9make_pairIiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %20, ptr noundef nonnull align 4 dereferenceable(4) %150)
          to label %152 unwind label %170

152:                                              ; preds = %123
  store i64 %151, ptr %19, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %153 = load i32, ptr %10, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [300005 x i32], ptr %4, i64 0, i64 %154
  %156 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %155)
          to label %157 unwind label %174

157:                                              ; preds = %152
  store i64 %156, ptr %21, align 4
  invoke void @_ZSt10make_tupleIJiiSt4pairIiiES1_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS5_(ptr dead_on_unwind writable sret(%"class.std::tuple.13") align 4 %16, ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(8) %19, ptr noundef nonnull align 4 dereferenceable(8) %21)
          to label %158 unwind label %174

158:                                              ; preds = %157
  invoke void @_ZNSt5tupleIJxxSt4pairIxxES1_EEC2IJiiS0_IiiES4_ELb1ETnNSt9enable_ifIXclsr4_TCCIXT0_EEE29__is_implicitly_constructibleIDpT_EEEbE4typeELb1EEEOS_IJS7_EE(ptr noundef nonnull align 8 dereferenceable(48) %15, ptr noundef nonnull align 4 dereferenceable(24) %16)
          to label %159 unwind label %174

159:                                              ; preds = %158
  %160 = invoke { ptr, i8 } @_ZNSt3setISt5tupleIJxxSt4pairIxxES2_EESt4lessIS3_ESaIS3_EE6insertEOS3_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(48) %15)
          to label %161 unwind label %174

161:                                              ; preds = %159
  %162 = getelementptr inbounds { ptr, i8 }, ptr %22, i32 0, i32 0
  %163 = extractvalue { ptr, i8 } %160, 0
  store ptr %163, ptr %162, align 8
  %164 = getelementptr inbounds { ptr, i8 }, ptr %22, i32 0, i32 1
  %165 = extractvalue { ptr, i8 } %160, 1
  store i8 %165, ptr %164, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %15) #8
  br label %179

166:                                              ; preds = %114, %113, %107
  %167 = landingpad { ptr, i32 }
          cleanup
  %168 = extractvalue { ptr, i32 } %167, 0
  store ptr %168, ptr %6, align 8
  %169 = extractvalue { ptr, i32 } %167, 1
  store i32 %169, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #8
  br label %183

170:                                              ; preds = %123
  %171 = landingpad { ptr, i32 }
          cleanup
  %172 = extractvalue { ptr, i32 } %171, 0
  store ptr %172, ptr %6, align 8
  %173 = extractvalue { ptr, i32 } %171, 1
  store i32 %173, ptr %7, align 4
  br label %178

174:                                              ; preds = %159, %158, %157, %152
  %175 = landingpad { ptr, i32 }
          cleanup
  %176 = extractvalue { ptr, i32 } %175, 0
  store ptr %176, ptr %6, align 8
  %177 = extractvalue { ptr, i32 } %175, 1
  store i32 %177, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  br label %178

178:                                              ; preds = %174, %170
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %15) #8
  br label %183

179:                                              ; preds = %161, %116
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %180

180:                                              ; preds = %179
  %181 = load i32, ptr %10, align 4, !tbaa !5
  %182 = add nsw i32 %181, 1
  store i32 %182, ptr %10, align 4, !tbaa !5
  br label %101, !llvm.loop !11

183:                                              ; preds = %178, %166
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %459

184:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 24, ptr %23) #8
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %24) #8
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #8
  br label %185

185:                                              ; preds = %401, %184
  %186 = call noundef i64 @_ZNKSt3setISt5tupleIJxxSt4pairIxxES2_EESt4lessIS3_ESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  %187 = icmp ugt i64 %186, 0
  br i1 %187, label %188, label %406

188:                                              ; preds = %185
  call void @llvm.lifetime.start.p0(i64 48, ptr %25) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #8
  %189 = call ptr @_ZNKSt3setISt5tupleIJxxSt4pairIxxES2_EESt4lessIS3_ESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  %190 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %26, i32 0, i32 0
  store ptr %189, ptr %190, align 8
  %191 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt23_Rb_tree_const_iteratorISt5tupleIJxxSt4pairIxxES2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %26) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %191, i64 48, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  %192 = call ptr @_ZNKSt3setISt5tupleIJxxSt4pairIxxES2_EESt4lessIS3_ESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  %193 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %27, i32 0, i32 0
  store ptr %192, ptr %193, align 8
  %194 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %27, i32 0, i32 0
  %195 = load ptr, ptr %194, align 8
  %196 = invoke ptr @_ZNSt3setISt5tupleIJxxSt4pairIxxES2_EESt4lessIS3_ESaIS3_EE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIS3_E(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr %195)
          to label %197 unwind label %255

197:                                              ; preds = %188
  %198 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %28, i32 0, i32 0
  store ptr %196, ptr %198, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #8
  %199 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZSt3getILm2EJxxSt4pairIxxES1_EERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS6_(ptr noundef nonnull align 8 dereferenceable(48) %25) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %29, ptr align 8 %199, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %30) #8
  %200 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZSt3getILm3EJxxSt4pairIxxES1_EERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS6_(ptr noundef nonnull align 8 dereferenceable(48) %25) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %30, ptr align 8 %200, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #8
  %201 = getelementptr inbounds %"struct.std::pair.0", ptr %29, i32 0, i32 1
  %202 = load i64, ptr %201, align 8, !tbaa !12
  %203 = trunc i64 %202 to i32
  store i32 %203, ptr %31, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 4 dereferenceable(4) %31)
          to label %204 unwind label %259

204:                                              ; preds = %197
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #8
  %205 = getelementptr inbounds %"struct.std::pair.0", ptr %30, i32 0, i32 1
  %206 = load i64, ptr %205, align 8, !tbaa !12
  %207 = trunc i64 %206 to i32
  store i32 %207, ptr %32, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 4 dereferenceable(4) %32)
          to label %208 unwind label %263

208:                                              ; preds = %204
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #8
  %209 = invoke noundef i64 @_ZNK10__gnu_pbds33tree_order_statistics_node_updateINS_6detail30bin_search_tree_const_node_it_INS1_13rb_tree_node_ISt4pairIxxEmSaIcEEENS1_25bin_search_tree_const_it_IPS7_S5_PS5_PKS5_RS5_RSB_Lb1ES6_EESF_S6_EESG_St4lessIS5_ES6_E12order_of_keyESE_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(16) %29)
          to label %210 unwind label %267

210:                                              ; preds = %208
  %211 = trunc i64 %209 to i32
  store i32 %211, ptr %33, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #8
  %212 = invoke noundef i64 @_ZNK10__gnu_pbds33tree_order_statistics_node_updateINS_6detail30bin_search_tree_const_node_it_INS1_13rb_tree_node_ISt4pairIxxEmSaIcEEENS1_25bin_search_tree_const_it_IPS7_S5_PS5_PKS5_RS5_RSB_Lb1ES6_EESF_S6_EESG_St4lessIS5_ES6_E12order_of_keyESE_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(16) %30)
          to label %213 unwind label %271

213:                                              ; preds = %210
  %214 = trunc i64 %212 to i32
  store i32 %214, ptr %34, align 4, !tbaa !5
  %215 = load i32, ptr %33, align 4, !tbaa !5
  %216 = sub nsw i32 %215, 1
  %217 = icmp sge i32 %216, 0
  br i1 %217, label %218, label %284

218:                                              ; preds = %213
  call void @llvm.lifetime.start.p0(i64 16, ptr %35) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #8
  %219 = load i32, ptr %33, align 4, !tbaa !5
  %220 = sub nsw i32 %219, 1
  %221 = sext i32 %220 to i64
  %222 = invoke ptr @_ZN10__gnu_pbds33tree_order_statistics_node_updateINS_6detail30bin_search_tree_const_node_it_INS1_13rb_tree_node_ISt4pairIxxEmSaIcEEENS1_25bin_search_tree_const_it_IPS7_S5_PS5_PKS5_RS5_RSB_Lb1ES6_EESF_S6_EESG_St4lessIS5_ES6_E13find_by_orderEm(ptr noundef nonnull align 8 dereferenceable(8) %2, i64 noundef %221)
          to label %223 unwind label %275

223:                                              ; preds = %218
  %224 = getelementptr inbounds %"class.__gnu_pbds::detail::bin_search_tree_const_it_", ptr %36, i32 0, i32 0
  store ptr %222, ptr %224, align 8
  %225 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK10__gnu_pbds6detail25bin_search_tree_const_it_IPNS0_13rb_tree_node_ISt4pairIxxEmSaIcEEES4_PS4_PKS4_RS4_RS9_Lb1ES5_EdeEv(ptr noundef nonnull align 8 dereferenceable(8) %36)
          to label %226 unwind label %275

226:                                              ; preds = %223
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %35, ptr align 8 %225, i64 16, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #8
  %227 = getelementptr inbounds %"struct.std::pair.0", ptr %35, i32 0, i32 0
  %228 = load i64, ptr %227, align 8, !tbaa !15
  %229 = trunc i64 %228 to i32
  store i32 %229, ptr %37, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #8
  %230 = getelementptr inbounds %"struct.std::pair.0", ptr %29, i32 0, i32 0
  %231 = load i64, ptr %230, align 8, !tbaa !15
  %232 = trunc i64 %231 to i32
  store i32 %232, ptr %38, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 48, ptr %39) #8
  call void @llvm.lifetime.start.p0(i64 40, ptr %40) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #8
  %233 = load i32, ptr %38, align 4, !tbaa !5
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds [300005 x i32], ptr %4, i64 0, i64 %234
  %236 = load i32, ptr %235, align 4, !tbaa !5
  %237 = load i32, ptr %37, align 4, !tbaa !5
  %238 = sext i32 %237 to i64
  %239 = getelementptr inbounds [300005 x i32], ptr %4, i64 0, i64 %238
  %240 = load i32, ptr %239, align 4, !tbaa !5
  %241 = sub nsw i32 %236, %240
  store i32 %241, ptr %41, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #8
  %242 = load i32, ptr %38, align 4, !tbaa !5
  %243 = sext i32 %242 to i64
  %244 = getelementptr inbounds [300005 x i32], ptr %4, i64 0, i64 %243
  %245 = load i32, ptr %244, align 4, !tbaa !5
  %246 = sub nsw i32 0, %245
  %247 = load i32, ptr %37, align 4, !tbaa !5
  %248 = sext i32 %247 to i64
  %249 = getelementptr inbounds [300005 x i32], ptr %4, i64 0, i64 %248
  %250 = load i32, ptr %249, align 4, !tbaa !5
  %251 = sub nsw i32 %246, %250
  store i32 %251, ptr %42, align 4, !tbaa !5
  invoke void @_ZSt10make_tupleIJiiRSt4pairIxxES2_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS6_(ptr dead_on_unwind writable sret(%"class.std::tuple.25") align 8 %40, ptr noundef nonnull align 4 dereferenceable(4) %41, ptr noundef nonnull align 4 dereferenceable(4) %42, ptr noundef nonnull align 8 dereferenceable(16) %35, ptr noundef nonnull align 8 dereferenceable(16) %29)
          to label %252 unwind label %279

252:                                              ; preds = %226
  call void @_ZNSt5tupleIJxxSt4pairIxxES1_EEC2IJiiS1_S1_ELb1ETnNSt9enable_ifIXclsr4_TCCIXT0_EEE29__is_implicitly_constructibleIDpT_EEEbE4typeELb1EEEOS_IJS6_EE(ptr noundef nonnull align 8 dereferenceable(48) %39, ptr noundef nonnull align 8 dereferenceable(40) %40) #8
  %253 = invoke noundef i64 @_ZNSt3setISt5tupleIJxxSt4pairIxxES2_EESt4lessIS3_ESaIS3_EE5eraseERKS3_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(48) %39)
          to label %254 unwind label %279

254:                                              ; preds = %252
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr %40) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %39) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %35) #8
  br label %284

255:                                              ; preds = %188
  %256 = landingpad { ptr, i32 }
          cleanup
  %257 = extractvalue { ptr, i32 } %256, 0
  store ptr %257, ptr %6, align 8
  %258 = extractvalue { ptr, i32 } %256, 1
  store i32 %258, ptr %7, align 4
  br label %405

259:                                              ; preds = %197
  %260 = landingpad { ptr, i32 }
          cleanup
  %261 = extractvalue { ptr, i32 } %260, 0
  store ptr %261, ptr %6, align 8
  %262 = extractvalue { ptr, i32 } %260, 1
  store i32 %262, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  br label %404

263:                                              ; preds = %204
  %264 = landingpad { ptr, i32 }
          cleanup
  %265 = extractvalue { ptr, i32 } %264, 0
  store ptr %265, ptr %6, align 8
  %266 = extractvalue { ptr, i32 } %264, 1
  store i32 %266, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  br label %404

267:                                              ; preds = %208
  %268 = landingpad { ptr, i32 }
          cleanup
  %269 = extractvalue { ptr, i32 } %268, 0
  store ptr %269, ptr %6, align 8
  %270 = extractvalue { ptr, i32 } %268, 1
  store i32 %270, ptr %7, align 4
  br label %403

271:                                              ; preds = %399, %397, %341, %284, %210
  %272 = landingpad { ptr, i32 }
          cleanup
  %273 = extractvalue { ptr, i32 } %272, 0
  store ptr %273, ptr %6, align 8
  %274 = extractvalue { ptr, i32 } %272, 1
  store i32 %274, ptr %7, align 4
  br label %402

275:                                              ; preds = %223, %218
  %276 = landingpad { ptr, i32 }
          cleanup
  %277 = extractvalue { ptr, i32 } %276, 0
  store ptr %277, ptr %6, align 8
  %278 = extractvalue { ptr, i32 } %276, 1
  store i32 %278, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #8
  br label %283

279:                                              ; preds = %252, %226
  %280 = landingpad { ptr, i32 }
          cleanup
  %281 = extractvalue { ptr, i32 } %280, 0
  store ptr %281, ptr %6, align 8
  %282 = extractvalue { ptr, i32 } %280, 1
  store i32 %282, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr %40) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %39) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #8
  br label %283

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

284:                                              ; preds = %254, %213
  %285 = load i32, ptr %34, align 4, !tbaa !5
  %286 = add nsw i32 %285, 1
  %287 = sext i32 %286 to i64
  %288 = invoke noundef i64 @_ZNK10__gnu_pbds6detail19bin_search_tree_setISt4pairIxxENS_9null_typeESt4lessIS3_ENS0_11tree_traitsIS3_S4_S6_NS_33tree_order_statistics_node_updateENS_11rb_tree_tagESaIcEEESA_E4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %289 unwind label %271

289:                                              ; preds = %284
  %290 = icmp ult i64 %287, %288
  br i1 %290, label %291, label %337

291:                                              ; preds = %289
  call void @llvm.lifetime.start.p0(i64 16, ptr %43) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #8
  %292 = load i32, ptr %34, align 4, !tbaa !5
  %293 = add nsw i32 %292, 1
  %294 = sext i32 %293 to i64
  %295 = invoke ptr @_ZN10__gnu_pbds33tree_order_statistics_node_updateINS_6detail30bin_search_tree_const_node_it_INS1_13rb_tree_node_ISt4pairIxxEmSaIcEEENS1_25bin_search_tree_const_it_IPS7_S5_PS5_PKS5_RS5_RSB_Lb1ES6_EESF_S6_EESG_St4lessIS5_ES6_E13find_by_orderEm(ptr noundef nonnull align 8 dereferenceable(8) %2, i64 noundef %294)
          to label %296 unwind label %328

296:                                              ; preds = %291
  %297 = getelementptr inbounds %"class.__gnu_pbds::detail::bin_search_tree_const_it_", ptr %44, i32 0, i32 0
  store ptr %295, ptr %297, align 8
  %298 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK10__gnu_pbds6detail25bin_search_tree_const_it_IPNS0_13rb_tree_node_ISt4pairIxxEmSaIcEEES4_PS4_PKS4_RS4_RS9_Lb1ES5_EdeEv(ptr noundef nonnull align 8 dereferenceable(8) %44)
          to label %299 unwind label %328

299:                                              ; preds = %296
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %43, ptr align 8 %298, i64 16, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #8
  %300 = getelementptr inbounds %"struct.std::pair.0", ptr %43, i32 0, i32 0
  %301 = load i64, ptr %300, align 8, !tbaa !15
  %302 = trunc i64 %301 to i32
  store i32 %302, ptr %45, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #8
  %303 = getelementptr inbounds %"struct.std::pair.0", ptr %30, i32 0, i32 0
  %304 = load i64, ptr %303, align 8, !tbaa !15
  %305 = trunc i64 %304 to i32
  store i32 %305, ptr %46, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 48, ptr %47) #8
  call void @llvm.lifetime.start.p0(i64 40, ptr %48) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #8
  %306 = load i32, ptr %45, align 4, !tbaa !5
  %307 = sext i32 %306 to i64
  %308 = getelementptr inbounds [300005 x i32], ptr %4, i64 0, i64 %307
  %309 = load i32, ptr %308, align 4, !tbaa !5
  %310 = load i32, ptr %46, align 4, !tbaa !5
  %311 = sext i32 %310 to i64
  %312 = getelementptr inbounds [300005 x i32], ptr %4, i64 0, i64 %311
  %313 = load i32, ptr %312, align 4, !tbaa !5
  %314 = sub nsw i32 %309, %313
  store i32 %314, ptr %49, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #8
  %315 = load i32, ptr %45, align 4, !tbaa !5
  %316 = sext i32 %315 to i64
  %317 = getelementptr inbounds [300005 x i32], ptr %4, i64 0, i64 %316
  %318 = load i32, ptr %317, align 4, !tbaa !5
  %319 = sub nsw i32 0, %318
  %320 = load i32, ptr %46, align 4, !tbaa !5
  %321 = sext i32 %320 to i64
  %322 = getelementptr inbounds [300005 x i32], ptr %4, i64 0, i64 %321
  %323 = load i32, ptr %322, align 4, !tbaa !5
  %324 = sub nsw i32 %319, %323
  store i32 %324, ptr %50, align 4, !tbaa !5
  invoke void @_ZSt10make_tupleIJiiRSt4pairIxxES2_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS6_(ptr dead_on_unwind writable sret(%"class.std::tuple.25") align 8 %48, ptr noundef nonnull align 4 dereferenceable(4) %49, ptr noundef nonnull align 4 dereferenceable(4) %50, ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 8 dereferenceable(16) %43)
          to label %325 unwind label %332

325:                                              ; preds = %299
  call void @_ZNSt5tupleIJxxSt4pairIxxES1_EEC2IJiiS1_S1_ELb1ETnNSt9enable_ifIXclsr4_TCCIXT0_EEE29__is_implicitly_constructibleIDpT_EEEbE4typeELb1EEEOS_IJS6_EE(ptr noundef nonnull align 8 dereferenceable(48) %47, ptr noundef nonnull align 8 dereferenceable(40) %48) #8
  %326 = invoke noundef i64 @_ZNSt3setISt5tupleIJxxSt4pairIxxES2_EESt4lessIS3_ESaIS3_EE5eraseERKS3_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(48) %47)
          to label %327 unwind label %332

327:                                              ; preds = %325
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr %48) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %47) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %43) #8
  br label %337

328:                                              ; preds = %296, %291
  %329 = landingpad { ptr, i32 }
          cleanup
  %330 = extractvalue { ptr, i32 } %329, 0
  store ptr %330, ptr %6, align 8
  %331 = extractvalue { ptr, i32 } %329, 1
  store i32 %331, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #8
  br label %336

332:                                              ; preds = %325, %299
  %333 = landingpad { ptr, i32 }
          cleanup
  %334 = extractvalue { ptr, i32 } %333, 0
  store ptr %334, ptr %6, align 8
  %335 = extractvalue { ptr, i32 } %333, 1
  store i32 %335, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr %48) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %47) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #8
  br label %336

336:                                              ; preds = %332, %328
  call void @llvm.lifetime.end.p0(i64 16, ptr %43) #8
  br label %402

337:                                              ; preds = %327, %289
  %338 = load i32, ptr %33, align 4, !tbaa !5
  %339 = sub nsw i32 %338, 1
  %340 = icmp sge i32 %339, 0
  br i1 %340, label %341, label %397

341:                                              ; preds = %337
  %342 = load i32, ptr %34, align 4, !tbaa !5
  %343 = add nsw i32 %342, 1
  %344 = sext i32 %343 to i64
  %345 = invoke noundef i64 @_ZNK10__gnu_pbds6detail19bin_search_tree_setISt4pairIxxENS_9null_typeESt4lessIS3_ENS0_11tree_traitsIS3_S4_S6_NS_33tree_order_statistics_node_updateENS_11rb_tree_tagESaIcEEESA_E4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %346 unwind label %271

346:                                              ; preds = %341
  %347 = icmp ult i64 %344, %345
  br i1 %347, label %348, label %397

348:                                              ; preds = %346
  call void @llvm.lifetime.start.p0(i64 16, ptr %51) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %52) #8
  %349 = load i32, ptr %34, align 4, !tbaa !5
  %350 = add nsw i32 %349, 1
  %351 = sext i32 %350 to i64
  %352 = invoke ptr @_ZN10__gnu_pbds33tree_order_statistics_node_updateINS_6detail30bin_search_tree_const_node_it_INS1_13rb_tree_node_ISt4pairIxxEmSaIcEEENS1_25bin_search_tree_const_it_IPS7_S5_PS5_PKS5_RS5_RSB_Lb1ES6_EESF_S6_EESG_St4lessIS5_ES6_E13find_by_orderEm(ptr noundef nonnull align 8 dereferenceable(8) %2, i64 noundef %351)
          to label %353 unwind label %383

353:                                              ; preds = %348
  %354 = getelementptr inbounds %"class.__gnu_pbds::detail::bin_search_tree_const_it_", ptr %52, i32 0, i32 0
  store ptr %352, ptr %354, align 8
  %355 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK10__gnu_pbds6detail25bin_search_tree_const_it_IPNS0_13rb_tree_node_ISt4pairIxxEmSaIcEEES4_PS4_PKS4_RS4_RS9_Lb1ES5_EdeEv(ptr noundef nonnull align 8 dereferenceable(8) %52)
          to label %356 unwind label %383

356:                                              ; preds = %353
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %51, ptr align 8 %355, i64 16, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %53) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %54) #8
  %357 = load i32, ptr %33, align 4, !tbaa !5
  %358 = sub nsw i32 %357, 1
  %359 = sext i32 %358 to i64
  %360 = invoke ptr @_ZN10__gnu_pbds33tree_order_statistics_node_updateINS_6detail30bin_search_tree_const_node_it_INS1_13rb_tree_node_ISt4pairIxxEmSaIcEEENS1_25bin_search_tree_const_it_IPS7_S5_PS5_PKS5_RS5_RSB_Lb1ES6_EESF_S6_EESG_St4lessIS5_ES6_E13find_by_orderEm(ptr noundef nonnull align 8 dereferenceable(8) %2, i64 noundef %359)
          to label %361 unwind label %387

361:                                              ; preds = %356
  %362 = getelementptr inbounds %"class.__gnu_pbds::detail::bin_search_tree_const_it_", ptr %54, i32 0, i32 0
  store ptr %360, ptr %362, align 8
  %363 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK10__gnu_pbds6detail25bin_search_tree_const_it_IPNS0_13rb_tree_node_ISt4pairIxxEmSaIcEEES4_PS4_PKS4_RS4_RS9_Lb1ES5_EdeEv(ptr noundef nonnull align 8 dereferenceable(8) %54)
          to label %364 unwind label %387

364:                                              ; preds = %361
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %53, ptr align 8 %363, i64 16, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #8
  call void @llvm.lifetime.start.p0(i64 48, ptr %55) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %56) #8
  %365 = getelementptr inbounds %"struct.std::pair.0", ptr %51, i32 0, i32 1
  %366 = load i64, ptr %365, align 8, !tbaa !12
  %367 = getelementptr inbounds %"struct.std::pair.0", ptr %53, i32 0, i32 1
  %368 = load i64, ptr %367, align 8, !tbaa !12
  %369 = sub nsw i64 %366, %368
  store i64 %369, ptr %56, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %57) #8
  %370 = getelementptr inbounds %"struct.std::pair.0", ptr %51, i32 0, i32 1
  %371 = load i64, ptr %370, align 8, !tbaa !12
  %372 = sub nsw i64 0, %371
  %373 = getelementptr inbounds %"struct.std::pair.0", ptr %53, i32 0, i32 1
  %374 = load i64, ptr %373, align 8, !tbaa !12
  %375 = sub nsw i64 %372, %374
  store i64 %375, ptr %57, align 8, !tbaa !16
  invoke void @_ZSt10make_tupleIJxxRSt4pairIxxES2_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS6_(ptr dead_on_unwind writable sret(%"class.std::tuple") align 8 %55, ptr noundef nonnull align 8 dereferenceable(8) %56, ptr noundef nonnull align 8 dereferenceable(8) %57, ptr noundef nonnull align 8 dereferenceable(16) %53, ptr noundef nonnull align 8 dereferenceable(16) %51)
          to label %376 unwind label %391

376:                                              ; preds = %364
  %377 = invoke { ptr, i8 } @_ZNSt3setISt5tupleIJxxSt4pairIxxES2_EESt4lessIS3_ESaIS3_EE6insertEOS3_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(48) %55)
          to label %378 unwind label %391

378:                                              ; preds = %376
  %379 = getelementptr inbounds { ptr, i8 }, ptr %58, i32 0, i32 0
  %380 = extractvalue { ptr, i8 } %377, 0
  store ptr %380, ptr %379, align 8
  %381 = getelementptr inbounds { ptr, i8 }, ptr %58, i32 0, i32 1
  %382 = extractvalue { ptr, i8 } %377, 1
  store i8 %382, ptr %381, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %55) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %53) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %51) #8
  br label %397

383:                                              ; preds = %353, %348
  %384 = landingpad { ptr, i32 }
          cleanup
  %385 = extractvalue { ptr, i32 } %384, 0
  store ptr %385, ptr %6, align 8
  %386 = extractvalue { ptr, i32 } %384, 1
  store i32 %386, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #8
  br label %396

387:                                              ; preds = %361, %356
  %388 = landingpad { ptr, i32 }
          cleanup
  %389 = extractvalue { ptr, i32 } %388, 0
  store ptr %389, ptr %6, align 8
  %390 = extractvalue { ptr, i32 } %388, 1
  store i32 %390, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #8
  br label %395

391:                                              ; preds = %376, %364
  %392 = landingpad { ptr, i32 }
          cleanup
  %393 = extractvalue { ptr, i32 } %392, 0
  store ptr %393, ptr %6, align 8
  %394 = extractvalue { ptr, i32 } %392, 1
  store i32 %394, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %55) #8
  br label %395

395:                                              ; preds = %391, %387
  call void @llvm.lifetime.end.p0(i64 16, ptr %53) #8
  br label %396

396:                                              ; preds = %395, %383
  call void @llvm.lifetime.end.p0(i64 16, ptr %51) #8
  br label %402

397:                                              ; preds = %378, %346, %337
  %398 = invoke noundef zeroext i1 @_ZN10__gnu_pbds6detail11rb_tree_setISt4pairIxxENS_9null_typeESt4lessIS3_ENS0_11tree_traitsIS3_S4_S6_NS_33tree_order_statistics_node_updateENS_11rb_tree_tagESaIcEEESA_E5eraseERKS3_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(16) %29)
          to label %399 unwind label %271

399:                                              ; preds = %397
  %400 = invoke noundef zeroext i1 @_ZN10__gnu_pbds6detail11rb_tree_setISt4pairIxxENS_9null_typeESt4lessIS3_ENS0_11tree_traitsIS3_S4_S6_NS_33tree_order_statistics_node_updateENS_11rb_tree_tagESaIcEEESA_E5eraseERKS3_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(16) %30)
          to label %401 unwind label %271

401:                                              ; preds = %399
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %25) #8
  br label %185, !llvm.loop !17

402:                                              ; preds = %396, %336, %283, %271
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  br label %403

403:                                              ; preds = %402, %267
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  br label %404

404:                                              ; preds = %403, %263, %259
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #8
  br label %405

405:                                              ; preds = %404, %255
  call void @llvm.lifetime.end.p0(i64 48, ptr %25) #8
  br label %458

406:                                              ; preds = %185
  call void @llvm.lifetime.start.p0(i64 8, ptr %59) #8
  store ptr %24, ptr %59, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %60) #8
  %407 = load ptr, ptr %59, align 8, !tbaa !18
  %408 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %407) #8
  %409 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %60, i32 0, i32 0
  store ptr %408, ptr %409, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %61) #8
  %410 = load ptr, ptr %59, align 8, !tbaa !18
  %411 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %410) #8
  %412 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %61, i32 0, i32 0
  store ptr %411, ptr %412, align 8
  br label %413

413:                                              ; preds = %422, %406
  %414 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %60, ptr noundef nonnull align 8 dereferenceable(8) %61) #8
  br i1 %414, label %416, label %415

415:                                              ; preds = %413
  call void @llvm.lifetime.end.p0(i64 8, ptr %61) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %60) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %59) #8
  br label %428

416:                                              ; preds = %413
  call void @llvm.lifetime.start.p0(i64 4, ptr %62) #8
  %417 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %60) #8
  %418 = load i32, ptr %417, align 4, !tbaa !5
  store i32 %418, ptr %62, align 4, !tbaa !5
  %419 = load i32, ptr %62, align 4, !tbaa !5
  %420 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %419)
          to label %421 unwind label %424

421:                                              ; preds = %416
  call void @llvm.lifetime.end.p0(i64 4, ptr %62) #8
  br label %422

422:                                              ; preds = %421
  %423 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %60) #8
  br label %413

424:                                              ; preds = %416
  %425 = landingpad { ptr, i32 }
          cleanup
  %426 = extractvalue { ptr, i32 } %425, 0
  store ptr %426, ptr %6, align 8
  %427 = extractvalue { ptr, i32 } %425, 1
  store i32 %427, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %62) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %61) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %60) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %59) #8
  br label %458

428:                                              ; preds = %415
  %429 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2)
          to label %430 unwind label %440

430:                                              ; preds = %428
  call void @llvm.lifetime.start.p0(i64 8, ptr %63) #8
  store ptr %23, ptr %63, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %64) #8
  %431 = load ptr, ptr %63, align 8, !tbaa !18
  %432 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %431) #8
  %433 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %64, i32 0, i32 0
  store ptr %432, ptr %433, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %65) #8
  %434 = load ptr, ptr %63, align 8, !tbaa !18
  %435 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %434) #8
  %436 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %65, i32 0, i32 0
  store ptr %435, ptr %436, align 8
  br label %437

437:                                              ; preds = %450, %430
  %438 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %64, ptr noundef nonnull align 8 dereferenceable(8) %65) #8
  br i1 %438, label %444, label %439

439:                                              ; preds = %437
  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 %456

440:                                              ; preds = %428
  %441 = landingpad { ptr, i32 }
          cleanup
  %442 = extractvalue { ptr, i32 } %441, 0
  store ptr %442, ptr %6, align 8
  %443 = extractvalue { ptr, i32 } %441, 1
  store i32 %443, ptr %7, align 4
  br label %458

444:                                              ; preds = %437
  call void @llvm.lifetime.start.p0(i64 4, ptr %66) #8
  %445 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %64) #8
  %446 = load i32, ptr %445, align 4, !tbaa !5
  store i32 %446, ptr %66, align 4, !tbaa !5
  %447 = load i32, ptr %66, align 4, !tbaa !5
  %448 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %447)
          to label %449 unwind label %452

449:                                              ; preds = %444
  call void @llvm.lifetime.end.p0(i64 4, ptr %66) #8
  br label %450

450:                                              ; preds = %449
  %451 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %64) #8
  br label %437

452:                                              ; preds = %444
  %453 = landingpad { ptr, i32 }
          cleanup
  %454 = extractvalue { ptr, i32 } %453, 0
  store ptr %454, ptr %6, align 8
  %455 = extractvalue { ptr, i32 } %453, 1
  store i32 %455, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %66) #8
  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 %458

456:                                              ; preds = %439
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 1200020, ptr %4) #8
  call void @_ZNSt3setISt5tupleIJxxSt4pairIxxES2_EESt4lessIS3_ESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %3) #8
  call void @_ZN10__gnu_pbds6detail19bin_search_tree_setISt4pairIxxENS_9null_typeESt4lessIS3_ENS0_11tree_traitsIS3_S4_S6_NS_33tree_order_statistics_node_updateENS_11rb_tree_tagESaIcEEESA_ED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #8
  %457 = load i32, ptr %1, align 4
  ret i32 %457

458:                                              ; preds = %452, %440, %424, %405
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #8
  br label %459

459:                                              ; preds = %458, %183, %89, %75
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 1200020, ptr %4) #8
  call void @_ZNSt3setISt5tupleIJxxSt4pairIxxES2_EESt4lessIS3_ESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %3) #8
  call void @_ZN10__gnu_pbds6detail19bin_search_tree_setISt4pairIxxENS_9null_typeESt4lessIS3_ENS0_11tree_traitsIS3_S4_S6_NS_33tree_order_statistics_node_updateENS_11rb_tree_tagESaIcEEESA_ED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #8
  br label %460

460:                                              ; preds = %459
  %461 = load ptr, ptr %6, align 8
  %462 = load i32, ptr %7, align 4
  %463 = insertvalue { ptr, i32 } poison, ptr %461, 0
  %464 = insertvalue { ptr, i32 } %463, i32 %462, 1
  resume { ptr, i32 } %464
}

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { ptr, i8 } @_ZN10__gnu_pbds6detail11rb_tree_setISt4pairIxxENS_9null_typeESt4lessIS3_ENS0_11tree_traitsIS3_S4_S6_NS_33tree_order_statistics_node_updateENS_11rb_tree_tagESaIcEEESA_E6insertERKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) #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)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIxxEC2IiiTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS3_S4_EEclsr6_PCCFPIS3_S4_EE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS_IS3_S4_E(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt10make_tupleIJiiSt4pairIiiES1_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS5_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple.13") align 4, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #3

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt23_Rb_tree_const_iteratorISt5tupleIJxxSt4pairIxxES2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #3 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) #6

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZSt3getILm2EJxxSt4pairIxxES1_EERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS6_(ptr noundef nonnull align 8 dereferenceable(48)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZSt3getILm3EJxxSt4pairIxxES1_EERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS6_(ptr noundef nonnull align 8 dereferenceable(48)) #3

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK10__gnu_pbds6detail25bin_search_tree_const_it_IPNS0_13rb_tree_node_ISt4pairIxxEmSaIcEEES4_PS4_PKS4_RS4_RS9_Lb1ES5_EdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #7 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt10make_tupleIJiiRSt4pairIxxES2_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS6_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple.25") align 8, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5tupleIJxxSt4pairIxxES1_EEC2IJiiS1_S1_ELb1ETnNSt9enable_ifIXclsr4_TCCIXT0_EEE29__is_implicitly_constructibleIDpT_EEEbE4typeELb1EEEOS_IJS6_EE(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK10__gnu_pbds6detail19bin_search_tree_setISt4pairIxxENS_9null_typeESt4lessIS3_ENS0_11tree_traitsIS3_S4_S6_NS_33tree_order_statistics_node_updateENS_11rb_tree_tagESaIcEEESA_E4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt10make_tupleIJxxRSt4pairIxxES2_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS6_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN10__gnu_pbds6detail11rb_tree_setISt4pairIxxENS_9null_typeESt4lessIS3_ENS0_11tree_traitsIS3_S4_S6_NS_33tree_order_statistics_node_updateENS_11rb_tree_tagESaIcEEESA_E5eraseERKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) #5 align 2

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

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

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

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

declare i32 @printf(ptr noundef, ...) #4

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

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

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

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

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


; 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.__gnu_pbds::tree" = type { %"class.__gnu_pbds::basic_branch" }
%"class.__gnu_pbds::basic_branch" = type { %"class.__gnu_pbds::detail::rb_tree_set" }
%"class.__gnu_pbds::detail::rb_tree_set" = type { %"class.__gnu_pbds::detail::bin_search_tree_set" }
%"class.__gnu_pbds::detail::bin_search_tree_set" = type { %"class.__gnu_pbds::tree_order_statistics_node_update", [8 x i8], ptr, i64 }
%"class.__gnu_pbds::tree_order_statistics_node_update" = type { %"struct.__gnu_pbds::detail::branch_policy" }
%"struct.__gnu_pbds::detail::branch_policy" = type { ptr }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::tuple<long long, long long, std::pair<long long, long long>, std::pair<long long, long long>>, std::tuple<long long, long long, std::pair<long long, long long>, std::pair<long long, long long>>, std::_Identity<std::tuple<long long, long long, std::pair<long long, long long>, std::pair<long long, long long>>>, std::less<std::tuple<long long, long long, std::pair<long long, long long>, std::pair<long long, long long>>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::tuple<long long, long long, std::pair<long long, long long>, std::pair<long long, long long>>, std::tuple<long long, long long, std::pair<long long, long long>, std::pair<long long, long long>>, std::_Identity<std::tuple<long long, long long, std::pair<long long, long long>, std::pair<long long, long long>>>, std::less<std::tuple<long long, long long, std::pair<long long, long long>, std::pair<long long, long long>>>>::_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 }
%"struct.std::pair.0" = type { i64, i64 }
%"struct.std::pair.2" = type { i32, i32 }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.7", %"struct.std::_Head_base.12" }
%"struct.std::_Tuple_impl.7" = type { %"struct.std::_Tuple_impl.8", %"struct.std::_Head_base.11" }
%"struct.std::_Tuple_impl.8" = type { %"struct.std::_Tuple_impl.9", %"struct.std::_Head_base.10" }
%"struct.std::_Tuple_impl.9" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { %"struct.std::pair.0" }
%"struct.std::_Head_base.10" = type { %"struct.std::pair.0" }
%"struct.std::_Head_base.11" = type { i64 }
%"struct.std::_Head_base.12" = type { i64 }
%"class.std::tuple.13" = type { %"struct.std::_Tuple_impl.14" }
%"struct.std::_Tuple_impl.14" = type { %"struct.std::_Tuple_impl.15", %"struct.std::_Head_base.21" }
%"struct.std::_Tuple_impl.15" = type { %"struct.std::_Tuple_impl.16", %"struct.std::_Head_base.20" }
%"struct.std::_Tuple_impl.16" = type { %"struct.std::_Tuple_impl.17", %"struct.std::_Head_base.19" }
%"struct.std::_Tuple_impl.17" = type { %"struct.std::_Head_base.18" }
%"struct.std::_Head_base.18" = type { %"struct.std::pair.2" }
%"struct.std::_Head_base.19" = type { %"struct.std::pair.2" }
%"struct.std::_Head_base.20" = type { i32 }
%"struct.std::_Head_base.21" = type { i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.__gnu_pbds::detail::bin_search_tree_const_it_" = type { ptr }
%"class.std::tuple.25" = type { %"struct.std::_Tuple_impl.26" }
%"struct.std::_Tuple_impl.26" = type { %"struct.std::_Tuple_impl.base", %"struct.std::_Head_base.21" }
%"struct.std::_Tuple_impl.base" = type <{ %"struct.std::_Tuple_impl.8", %"struct.std::_Head_base.20" }>
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.__gnu_pbds::tree", align 8
  %2 = alloca %"class.std::set", align 8
  %3 = alloca [300005 x i32], align 16
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"struct.std::pair.0", align 8
  %9 = alloca %"struct.std::pair.2", align 8
  %10 = alloca %"class.std::tuple", align 8
  %11 = alloca %"class.std::tuple.13", align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"struct.std::pair.2", align 8
  %15 = alloca i32, align 4
  %16 = alloca %"struct.std::pair.2", align 8
  %17 = alloca %"class.std::vector", align 8
  %18 = alloca %"class.std::vector", align 8
  %19 = alloca %"class.std::tuple", align 8
  %20 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %21 = alloca %"struct.std::pair.0", align 8
  %22 = alloca %"struct.std::pair.0", align 8
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca %"struct.std::pair.0", align 8
  %26 = alloca %"class.__gnu_pbds::detail::bin_search_tree_const_it_", align 8
  %27 = alloca %"class.std::tuple", align 8
  %28 = alloca %"class.std::tuple.25", align 8
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca %"struct.std::pair.0", align 8
  %32 = alloca %"class.__gnu_pbds::detail::bin_search_tree_const_it_", align 8
  %33 = alloca %"class.std::tuple", align 8
  %34 = alloca %"class.std::tuple.25", align 8
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca %"struct.std::pair.0", align 8
  %38 = alloca %"class.__gnu_pbds::detail::bin_search_tree_const_it_", align 8
  %39 = alloca %"struct.std::pair.0", align 8
  %40 = alloca %"class.__gnu_pbds::detail::bin_search_tree_const_it_", align 8
  %41 = alloca %"class.std::tuple", align 8
  %42 = alloca i64, align 8
  %43 = alloca i64, align 8
  %44 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %45 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %46 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %47 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #8
  call void @_ZN10__gnu_pbds4treeISt4pairIxxENS_9null_typeESt4lessIS2_ENS_11rb_tree_tagENS_33tree_order_statistics_node_updateESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1)
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %2) #8
  call void @_ZNSt3setISt5tupleIJxxSt4pairIxxES2_EESt4lessIS3_ESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #8
  call void @llvm.lifetime.start.p0(i64 1200020, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  %48 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %4)
  %49 = load i32, ptr %4, align 4, !tbaa !5
  %50 = icmp sgt i32 %49, 0
  br i1 %50, label %.lr.ph, label %.._crit_edge_crit_edge

.._crit_edge_crit_edge:                           ; preds = %0
  %51 = shl nsw i32 %49, 1
  %.pre87 = sext i32 %51 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre87, %.._crit_edge_crit_edge ], [ %60, %.lr.ph ]
  %52 = getelementptr inbounds i32, ptr %3, i64 %.pre-phi
  invoke void @_ZSt4sortIPiEvT_S1_(ptr noundef nonnull %3, ptr noundef nonnull %52)
          to label %62 unwind label %53

53:                                               ; preds = %._crit_edge
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %246

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  %55 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %5)
  %56 = load i32, ptr %5, align 4, !tbaa !5
  %57 = getelementptr inbounds [300005 x i32], ptr %3, i64 0, i64 %indvars.iv
  store i32 %56, ptr %57, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %58 = load i32, ptr %4, align 4, !tbaa !5
  %59 = shl nsw i32 %58, 1
  %60 = sext i32 %59 to i64
  %61 = icmp slt i64 %indvars.iv.next, %60
  br i1 %61, label %.lr.ph, label %._crit_edge, !llvm.loop !9

62:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #8
  store i32 0, ptr %6, align 4, !tbaa !5
  %63 = load i32, ptr %4, align 4, !tbaa !5
  %64 = icmp sgt i32 %63, 0
  br i1 %64, label %.lr.ph73, label %._crit_edge74

._crit_edge74:                                    ; preds = %106, %62
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %17) #8
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %18) #8
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #8
  %65 = call noundef i64 @_ZNKSt3setISt5tupleIJxxSt4pairIxxES2_EESt4lessIS3_ESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #8
  %.not75 = icmp eq i64 %65, 0
  br i1 %.not75, label %._crit_edge78, label %.lr.ph77

.lr.ph77:                                         ; preds = %._crit_edge74
  %66 = getelementptr inbounds i8, ptr %21, i64 8
  %67 = getelementptr inbounds i8, ptr %22, i64 8
  %68 = getelementptr inbounds i8, ptr %37, i64 8
  %69 = getelementptr inbounds i8, ptr %39, i64 8
  br label %113

.lr.ph73:                                         ; preds = %62, %106
  %storemerge71 = phi i32 [ %108, %106 ], [ 0, %62 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #8
  %70 = sext i32 %storemerge71 to i64
  %71 = getelementptr inbounds [300005 x i32], ptr %3, i64 0, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !5
  store i32 %72, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  %73 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %74 unwind label %99

74:                                               ; preds = %.lr.ph73
  store i64 %73, ptr %9, align 8
  call void @_ZNSt4pairIxxEC2IiiTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS3_S4_EEclsr6_PCCFPIS3_S4_EE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS_IS3_S4_E(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 4 dereferenceable(8) %9)
  %75 = invoke { ptr, i8 } @_ZN10__gnu_pbds6detail11rb_tree_setISt4pairIxxENS_9null_typeESt4lessIS3_ENS0_11tree_traitsIS3_S4_S6_NS_33tree_order_statistics_node_updateENS_11rb_tree_tagESaIcEEESA_E6insertERKS3_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %76 unwind label %99

76:                                               ; preds = %74
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #8
  %77 = load i32, ptr %6, align 4, !tbaa !5
  %.not65 = icmp eq i32 %77, 0
  br i1 %.not65, label %106, label %78

78:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #8
  %79 = sext i32 %77 to i64
  %80 = getelementptr inbounds [300005 x i32], ptr %3, i64 0, i64 %79
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = add nsw i32 %77, -1
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [300005 x i32], ptr %3, i64 0, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = sub nsw i32 %81, %85
  store i32 %86, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #8
  %87 = add i32 %81, %85
  %88 = sub i32 0, %87
  store i32 %88, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #8
  store i32 %82, ptr %15, align 4, !tbaa !5
  %89 = invoke i64 @_ZSt9make_pairIiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %84)
          to label %90 unwind label %101

90:                                               ; preds = %78
  store i64 %89, ptr %14, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #8
  %91 = load i32, ptr %6, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [300005 x i32], ptr %3, i64 0, i64 %92
  %94 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %93)
          to label %95 unwind label %103

95:                                               ; preds = %90
  store i64 %94, ptr %16, align 8
  call void @_ZSt10make_tupleIJiiSt4pairIiiES1_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple.13") align 4 %11, ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 4 dereferenceable(8) %16)
  invoke void @_ZNSt5tupleIJxxSt4pairIxxES1_EEC2IJiiS0_IiiES4_ELb1ETnNSt9enable_ifIXclsr4_TCCIXT0_EEE29__is_implicitly_constructibleIDpT_EEEbE4typeELb1EEEOS_IJS7_EE(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr noundef nonnull align 4 dereferenceable(24) %11)
          to label %96 unwind label %103

96:                                               ; preds = %95
  %97 = invoke { ptr, i8 } @_ZNSt3setISt5tupleIJxxSt4pairIxxES2_EESt4lessIS3_ESaIS3_EE6insertEOS3_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(48) %10)
          to label %98 unwind label %103

98:                                               ; preds = %96
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %10) #8
  %.pre = load i32, ptr %6, align 4, !tbaa !5
  br label %106

99:                                               ; preds = %74, %.lr.ph73
  %100 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #8
  br label %112

101:                                              ; preds = %78
  %102 = landingpad { ptr, i32 }
          cleanup
  br label %105

103:                                              ; preds = %96, %95, %90
  %104 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #8
  br label %105

105:                                              ; preds = %103, %101
  %.pn66 = phi { ptr, i32 } [ %104, %103 ], [ %102, %101 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %10) #8
  br label %112

106:                                              ; preds = %98, %76
  %107 = phi i32 [ %.pre, %98 ], [ 0, %76 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %6, align 4, !tbaa !5
  %109 = load i32, ptr %4, align 4, !tbaa !5
  %110 = shl nsw i32 %109, 1
  %111 = icmp slt i32 %108, %110
  br i1 %111, label %.lr.ph73, label %._crit_edge74, !llvm.loop !11

112:                                              ; preds = %105, %99
  %.pn66.pn = phi { ptr, i32 } [ %.pn66, %105 ], [ %100, %99 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  br label %246

113:                                              ; preds = %.lr.ph77, %225
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %19) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #8
  %114 = call ptr @_ZNKSt3setISt5tupleIJxxSt4pairIxxES2_EESt4lessIS3_ESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #8
  store ptr %114, ptr %20, align 8
  %115 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt23_Rb_tree_const_iteratorISt5tupleIJxxSt4pairIxxES2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %19, ptr noundef nonnull align 8 dereferenceable(48) %115, i64 48, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #8
  %116 = call ptr @_ZNKSt3setISt5tupleIJxxSt4pairIxxES2_EESt4lessIS3_ESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #8
  %117 = invoke ptr @_ZNSt3setISt5tupleIJxxSt4pairIxxES2_EESt4lessIS3_ESaIS3_EE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIS3_E(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr %116)
          to label %118 unwind label %152

118:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %21) #8
  %119 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZSt3getILm2EJxxSt4pairIxxES1_EERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS6_(ptr noundef nonnull align 8 dereferenceable(48) %19) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %119, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %22) #8
  %120 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZSt3getILm3EJxxSt4pairIxxES1_EERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS6_(ptr noundef nonnull align 8 dereferenceable(48) %19) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(16) %120, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %23) #8
  %121 = load i64, ptr %66, align 8, !tbaa !12
  %122 = trunc i64 %121 to i32
  store i32 %122, ptr %23, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 4 dereferenceable(4) %23)
          to label %123 unwind label %154

123:                                              ; preds = %118
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %24) #8
  %124 = load i64, ptr %67, align 8, !tbaa !12
  %125 = trunc i64 %124 to i32
  store i32 %125, ptr %24, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %126 unwind label %156

126:                                              ; preds = %123
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #8
  %127 = invoke noundef i64 @_ZNK10__gnu_pbds33tree_order_statistics_node_updateINS_6detail30bin_search_tree_const_node_it_INS1_13rb_tree_node_ISt4pairIxxEmSaIcEEENS1_25bin_search_tree_const_it_IPS7_S5_PS5_PKS5_RS5_RSB_Lb1ES6_EESF_S6_EESG_St4lessIS5_ES6_E12order_of_keyESE_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(16) %21)
          to label %128 unwind label %158

128:                                              ; preds = %126
  %129 = invoke noundef i64 @_ZNK10__gnu_pbds33tree_order_statistics_node_updateINS_6detail30bin_search_tree_const_node_it_INS1_13rb_tree_node_ISt4pairIxxEmSaIcEEENS1_25bin_search_tree_const_it_IPS7_S5_PS5_PKS5_RS5_RSB_Lb1ES6_EESF_S6_EESG_St4lessIS5_ES6_E12order_of_keyESE_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(16) %22)
          to label %130 unwind label %160

130:                                              ; preds = %128
  %131 = trunc i64 %127 to i32
  %132 = add nsw i32 %131, -1
  %133 = icmp sgt i32 %131, 0
  br i1 %133, label %134, label %167

134:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %25) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %26) #8
  %135 = zext nneg i32 %132 to i64
  %136 = invoke ptr @_ZN10__gnu_pbds33tree_order_statistics_node_updateINS_6detail30bin_search_tree_const_node_it_INS1_13rb_tree_node_ISt4pairIxxEmSaIcEEENS1_25bin_search_tree_const_it_IPS7_S5_PS5_PKS5_RS5_RSB_Lb1ES6_EESF_S6_EESG_St4lessIS5_ES6_E13find_by_orderEm(ptr noundef nonnull align 8 dereferenceable(8) %1, i64 noundef %135)
          to label %137 unwind label %162

137:                                              ; preds = %134
  store ptr %136, ptr %26, align 8
  %138 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK10__gnu_pbds6detail25bin_search_tree_const_it_IPNS0_13rb_tree_node_ISt4pairIxxEmSaIcEEES4_PS4_PKS4_RS4_RS9_Lb1ES5_EdeEv(ptr noundef nonnull align 8 dereferenceable(8) %26)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef nonnull align 8 dereferenceable(16) %138, i64 16, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #8
  %139 = load i64, ptr %25, align 8, !tbaa !15
  %140 = load i64, ptr %21, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %27) #8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %28) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %29) #8
  %sext = shl i64 %140, 32
  %141 = ashr exact i64 %sext, 32
  %142 = getelementptr inbounds [300005 x i32], ptr %3, i64 0, i64 %141
  %143 = load i32, ptr %142, align 4, !tbaa !5
  %sext50 = shl i64 %139, 32
  %144 = ashr exact i64 %sext50, 32
  %145 = getelementptr inbounds [300005 x i32], ptr %3, i64 0, i64 %144
  %146 = load i32, ptr %145, align 4, !tbaa !5
  %147 = sub nsw i32 %143, %146
  store i32 %147, ptr %29, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %30) #8
  %148 = add i32 %143, %146
  %149 = sub i32 0, %148
  store i32 %149, ptr %30, align 4, !tbaa !5
  call void @_ZSt10make_tupleIJiiRSt4pairIxxES2_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS6_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple.25") align 8 %28, ptr noundef nonnull align 4 dereferenceable(4) %29, ptr noundef nonnull align 4 dereferenceable(4) %30, ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef nonnull align 8 dereferenceable(16) %21)
  call void @_ZNSt5tupleIJxxSt4pairIxxES1_EEC2IJiiS1_S1_ELb1ETnNSt9enable_ifIXclsr4_TCCIXT0_EEE29__is_implicitly_constructibleIDpT_EEEbE4typeELb1EEEOS_IJS6_EE(ptr noundef nonnull align 8 dereferenceable(48) %27, ptr noundef nonnull align 8 dereferenceable(40) %28) #8
  %150 = invoke noundef i64 @_ZNSt3setISt5tupleIJxxSt4pairIxxES2_EESt4lessIS3_ESaIS3_EE5eraseERKS3_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(48) %27)
          to label %151 unwind label %164

151:                                              ; preds = %137
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %30) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %29) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %28) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %27) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %25) #8
  br label %167

152:                                              ; preds = %113
  %153 = landingpad { ptr, i32 }
          cleanup
  br label %228

154:                                              ; preds = %118
  %155 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #8
  br label %227

156:                                              ; preds = %123
  %157 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #8
  br label %227

158:                                              ; preds = %126
  %159 = landingpad { ptr, i32 }
          cleanup
  br label %227

160:                                              ; preds = %223, %221, %128
  %161 = landingpad { ptr, i32 }
          cleanup
  br label %227

162:                                              ; preds = %134
  %163 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #8
  br label %166

164:                                              ; preds = %137
  %165 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %30) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %29) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %28) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %27) #8
  br label %166

166:                                              ; preds = %164, %162
  %.pn = phi { ptr, i32 } [ %165, %164 ], [ %163, %162 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %25) #8
  br label %227

167:                                              ; preds = %151, %130
  %168 = shl i64 %129, 32
  %sext52 = add i64 %168, 4294967296
  %169 = ashr exact i64 %sext52, 32
  %170 = call noundef i64 @_ZNK10__gnu_pbds6detail19bin_search_tree_setISt4pairIxxENS_9null_typeESt4lessIS3_ENS0_11tree_traitsIS3_S4_S6_NS_33tree_order_statistics_node_updateENS_11rb_tree_tagESaIcEEESA_E4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %171 = icmp ult i64 %169, %170
  br i1 %171, label %172, label %194

172:                                              ; preds = %167
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %31) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %32) #8
  %173 = invoke ptr @_ZN10__gnu_pbds33tree_order_statistics_node_updateINS_6detail30bin_search_tree_const_node_it_INS1_13rb_tree_node_ISt4pairIxxEmSaIcEEENS1_25bin_search_tree_const_it_IPS7_S5_PS5_PKS5_RS5_RSB_Lb1ES6_EESF_S6_EESG_St4lessIS5_ES6_E13find_by_orderEm(ptr noundef nonnull align 8 dereferenceable(8) %1, i64 noundef %169)
          to label %174 unwind label %189

174:                                              ; preds = %172
  store ptr %173, ptr %32, align 8
  %175 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK10__gnu_pbds6detail25bin_search_tree_const_it_IPNS0_13rb_tree_node_ISt4pairIxxEmSaIcEEES4_PS4_PKS4_RS4_RS9_Lb1ES5_EdeEv(ptr noundef nonnull align 8 dereferenceable(8) %32)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %31, ptr noundef nonnull align 8 dereferenceable(16) %175, i64 16, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %32) #8
  %176 = load i64, ptr %31, align 8, !tbaa !15
  %177 = load i64, ptr %22, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %33) #8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %34) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %35) #8
  %sext53 = shl i64 %176, 32
  %178 = ashr exact i64 %sext53, 32
  %179 = getelementptr inbounds [300005 x i32], ptr %3, i64 0, i64 %178
  %180 = load i32, ptr %179, align 4, !tbaa !5
  %sext54 = shl i64 %177, 32
  %181 = ashr exact i64 %sext54, 32
  %182 = getelementptr inbounds [300005 x i32], ptr %3, i64 0, i64 %181
  %183 = load i32, ptr %182, align 4, !tbaa !5
  %184 = sub nsw i32 %180, %183
  store i32 %184, ptr %35, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %36) #8
  %185 = add i32 %180, %183
  %186 = sub i32 0, %185
  store i32 %186, ptr %36, align 4, !tbaa !5
  call void @_ZSt10make_tupleIJiiRSt4pairIxxES2_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS6_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple.25") align 8 %34, ptr noundef nonnull align 4 dereferenceable(4) %35, ptr noundef nonnull align 4 dereferenceable(4) %36, ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(16) %31)
  call void @_ZNSt5tupleIJxxSt4pairIxxES1_EEC2IJiiS1_S1_ELb1ETnNSt9enable_ifIXclsr4_TCCIXT0_EEE29__is_implicitly_constructibleIDpT_EEEbE4typeELb1EEEOS_IJS6_EE(ptr noundef nonnull align 8 dereferenceable(48) %33, ptr noundef nonnull align 8 dereferenceable(40) %34) #8
  %187 = invoke noundef i64 @_ZNSt3setISt5tupleIJxxSt4pairIxxES2_EESt4lessIS3_ESaIS3_EE5eraseERKS3_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(48) %33)
          to label %188 unwind label %191

188:                                              ; preds = %174
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %36) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %35) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %34) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %33) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %31) #8
  br label %194

189:                                              ; preds = %172
  %190 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %32) #8
  br label %193

191:                                              ; preds = %174
  %192 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %36) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %35) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %34) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %33) #8
  br label %193

193:                                              ; preds = %191, %189
  %.pn55 = phi { ptr, i32 } [ %192, %191 ], [ %190, %189 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %31) #8
  br label %227

194:                                              ; preds = %188, %167
  br i1 %133, label %195, label %221

195:                                              ; preds = %194
  %196 = call noundef i64 @_ZNK10__gnu_pbds6detail19bin_search_tree_setISt4pairIxxENS_9null_typeESt4lessIS3_ENS0_11tree_traitsIS3_S4_S6_NS_33tree_order_statistics_node_updateENS_11rb_tree_tagESaIcEEESA_E4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %197 = icmp ult i64 %169, %196
  br i1 %197, label %198, label %221

198:                                              ; preds = %195
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %37) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %38) #8
  %199 = invoke ptr @_ZN10__gnu_pbds33tree_order_statistics_node_updateINS_6detail30bin_search_tree_const_node_it_INS1_13rb_tree_node_ISt4pairIxxEmSaIcEEENS1_25bin_search_tree_const_it_IPS7_S5_PS5_PKS5_RS5_RSB_Lb1ES6_EESF_S6_EESG_St4lessIS5_ES6_E13find_by_orderEm(ptr noundef nonnull align 8 dereferenceable(8) %1, i64 noundef %169)
          to label %200 unwind label %213

200:                                              ; preds = %198
  store ptr %199, ptr %38, align 8
  %201 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK10__gnu_pbds6detail25bin_search_tree_const_it_IPNS0_13rb_tree_node_ISt4pairIxxEmSaIcEEES4_PS4_PKS4_RS4_RS9_Lb1ES5_EdeEv(ptr noundef nonnull align 8 dereferenceable(8) %38)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %37, ptr noundef nonnull align 8 dereferenceable(16) %201, i64 16, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %38) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %39) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %40) #8
  %202 = zext nneg i32 %132 to i64
  %203 = invoke ptr @_ZN10__gnu_pbds33tree_order_statistics_node_updateINS_6detail30bin_search_tree_const_node_it_INS1_13rb_tree_node_ISt4pairIxxEmSaIcEEENS1_25bin_search_tree_const_it_IPS7_S5_PS5_PKS5_RS5_RSB_Lb1ES6_EESF_S6_EESG_St4lessIS5_ES6_E13find_by_orderEm(ptr noundef nonnull align 8 dereferenceable(8) %1, i64 noundef %202)
          to label %204 unwind label %215

204:                                              ; preds = %200
  store ptr %203, ptr %40, align 8
  %205 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK10__gnu_pbds6detail25bin_search_tree_const_it_IPNS0_13rb_tree_node_ISt4pairIxxEmSaIcEEES4_PS4_PKS4_RS4_RS9_Lb1ES5_EdeEv(ptr noundef nonnull align 8 dereferenceable(8) %40)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %39, ptr noundef nonnull align 8 dereferenceable(16) %205, i64 16, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %40) #8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %41) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %42) #8
  %206 = load i64, ptr %68, align 8, !tbaa !12
  %207 = load i64, ptr %69, align 8, !tbaa !12
  %208 = sub nsw i64 %206, %207
  store i64 %208, ptr %42, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %43) #8
  %209 = add i64 %206, %207
  %210 = sub i64 0, %209
  store i64 %210, ptr %43, align 8, !tbaa !16
  call void @_ZSt10make_tupleIJxxRSt4pairIxxES2_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS6_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 8 %41, ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef nonnull align 8 dereferenceable(16) %39, ptr noundef nonnull align 8 dereferenceable(16) %37)
  %211 = invoke { ptr, i8 } @_ZNSt3setISt5tupleIJxxSt4pairIxxES2_EESt4lessIS3_ESaIS3_EE6insertEOS3_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(48) %41)
          to label %212 unwind label %217

212:                                              ; preds = %204
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %43) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %42) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %41) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %39) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %37) #8
  br label %221

213:                                              ; preds = %198
  %214 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %38) #8
  br label %220

215:                                              ; preds = %200
  %216 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %40) #8
  br label %219

217:                                              ; preds = %204
  %218 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %43) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %42) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %41) #8
  br label %219

219:                                              ; preds = %217, %215
  %.pn57 = phi { ptr, i32 } [ %218, %217 ], [ %216, %215 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %39) #8
  br label %220

220:                                              ; preds = %219, %213
  %.pn57.pn = phi { ptr, i32 } [ %.pn57, %219 ], [ %214, %213 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %37) #8
  br label %227

221:                                              ; preds = %212, %195, %194
  %222 = invoke noundef zeroext i1 @_ZN10__gnu_pbds6detail11rb_tree_setISt4pairIxxENS_9null_typeESt4lessIS3_ENS0_11tree_traitsIS3_S4_S6_NS_33tree_order_statistics_node_updateENS_11rb_tree_tagESaIcEEESA_E5eraseERKS3_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(16) %21)
          to label %223 unwind label %160

223:                                              ; preds = %221
  %224 = invoke noundef zeroext i1 @_ZN10__gnu_pbds6detail11rb_tree_setISt4pairIxxENS_9null_typeESt4lessIS3_ENS0_11tree_traitsIS3_S4_S6_NS_33tree_order_statistics_node_updateENS_11rb_tree_tagESaIcEEESA_E5eraseERKS3_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(16) %22)
          to label %225 unwind label %160

225:                                              ; preds = %223
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %19) #8
  %226 = call noundef i64 @_ZNKSt3setISt5tupleIJxxSt4pairIxxES2_EESt4lessIS3_ESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #8
  %.not = icmp eq i64 %226, 0
  br i1 %.not, label %._crit_edge78, label %113, !llvm.loop !17

227:                                              ; preds = %158, %220, %193, %166, %160, %156, %154
  %.pn60.pn.pn = phi { ptr, i32 } [ %157, %156 ], [ %155, %154 ], [ %159, %158 ], [ %161, %160 ], [ %.pn57.pn, %220 ], [ %.pn55, %193 ], [ %.pn, %166 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) #8
  br label %228

228:                                              ; preds = %227, %152
  %.pn60.pn.pn.pn = phi { ptr, i32 } [ %.pn60.pn.pn, %227 ], [ %153, %152 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %19) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %18) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %17) #8
  br label %246

._crit_edge78:                                    ; preds = %225, %._crit_edge74
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %44) #8
  %229 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #8
  store ptr %229, ptr %44, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %45) #8
  %230 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #8
  store ptr %230, ptr %45, align 8
  %231 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef nonnull align 8 dereferenceable(8) %45) #8
  br i1 %231, label %.lr.ph80, label %._crit_edge81

._crit_edge81:                                    ; preds = %.lr.ph80, %._crit_edge78
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %45) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %44) #8
  %232 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %46) #8
  %233 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #8
  store ptr %233, ptr %46, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %47) #8
  %234 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #8
  store ptr %234, ptr %47, align 8
  %235 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef nonnull align 8 dereferenceable(8) %47) #8
  br i1 %235, label %.lr.ph83, label %._crit_edge84

.lr.ph80:                                         ; preds = %._crit_edge78, %.lr.ph80
  %236 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %44) #8
  %237 = load i32, ptr %236, align 4, !tbaa !5
  %238 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %237)
  %239 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %44) #8
  %240 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef nonnull align 8 dereferenceable(8) %45) #8
  br i1 %240, label %.lr.ph80, label %._crit_edge81

._crit_edge84:                                    ; preds = %.lr.ph83, %._crit_edge81
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %47) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %46) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %18) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 1200020, ptr nonnull %3) #8
  call void @_ZNSt3setISt5tupleIJxxSt4pairIxxES2_EESt4lessIS3_ESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #8
  call void @_ZN10__gnu_pbds6detail19bin_search_tree_setISt4pairIxxENS_9null_typeESt4lessIS3_ENS0_11tree_traitsIS3_S4_S6_NS_33tree_order_statistics_node_updateENS_11rb_tree_tagESaIcEEESA_ED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #8
  ret i32 0

.lr.ph83:                                         ; preds = %._crit_edge81, %.lr.ph83
  %241 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %46) #8
  %242 = load i32, ptr %241, align 4, !tbaa !5
  %243 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %242)
  %244 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %46) #8
  %245 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef nonnull align 8 dereferenceable(8) %47) #8
  br i1 %245, label %.lr.ph83, label %._crit_edge84

246:                                              ; preds = %228, %112, %53
  %.pn66.pn.pn = phi { ptr, i32 } [ %.pn66.pn, %112 ], [ %.pn60.pn.pn.pn, %228 ], [ %54, %53 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 1200020, ptr nonnull %3) #8
  call void @_ZNSt3setISt5tupleIJxxSt4pairIxxES2_EESt4lessIS3_ESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #8
  call void @_ZN10__gnu_pbds6detail19bin_search_tree_setISt4pairIxxENS_9null_typeESt4lessIS3_ENS0_11tree_traitsIS3_S4_S6_NS_33tree_order_statistics_node_updateENS_11rb_tree_tagESaIcEEESA_ED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn66.pn.pn
}

; 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 uwtable
declare dso_local void @_ZN10__gnu_pbds4treeISt4pairIxxENS_9null_typeESt4lessIS2_ENS_11rb_tree_tagENS_33tree_order_statistics_node_updateESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { ptr, i8 } @_ZN10__gnu_pbds6detail11rb_tree_setISt4pairIxxENS_9null_typeESt4lessIS3_ENS0_11tree_traitsIS3_S4_S6_NS_33tree_order_statistics_node_updateENS_11rb_tree_tagESaIcEEESA_E6insertERKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) 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 #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIxxEC2IiiTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS3_S4_EEclsr6_PCCFPIS3_S4_EE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS_IS3_S4_E(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt10make_tupleIJiiSt4pairIiiES1_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS5_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple.13") align 4, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIiRiESt4pairINSt25__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 #2

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

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

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

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

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

; Function Attrs: mustprogress 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) #6

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZSt3getILm2EJxxSt4pairIxxES1_EERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS6_(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZSt3getILm3EJxxSt4pairIxxES1_EERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS6_(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #3

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK10__gnu_pbds6detail25bin_search_tree_const_it_IPNS0_13rb_tree_node_ISt4pairIxxEmSaIcEEES4_PS4_PKS4_RS4_RS9_Lb1ES5_EdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #7 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt10make_tupleIJiiRSt4pairIxxES2_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS6_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple.25") align 8, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5tupleIJxxSt4pairIxxES1_EEC2IJiiS1_S1_ELb1ETnNSt9enable_ifIXclsr4_TCCIXT0_EEE29__is_implicitly_constructibleIDpT_EEEbE4typeELb1EEEOS_IJS6_EE(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK10__gnu_pbds6detail19bin_search_tree_setISt4pairIxxENS_9null_typeESt4lessIS3_ENS0_11tree_traitsIS3_S4_S6_NS_33tree_order_statistics_node_updateENS_11rb_tree_tagESaIcEEESA_E4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt10make_tupleIJxxRSt4pairIxxES2_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS6_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN10__gnu_pbds6detail11rb_tree_setISt4pairIxxENS_9null_typeESt4lessIS3_ENS0_11tree_traitsIS3_S4_S6_NS_33tree_order_statistics_node_updateENS_11rb_tree_tagESaIcEEESA_E5eraseERKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5 align 2

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

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

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

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

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

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

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

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

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

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


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