; LLVM IR from VastoLorde95/Competitive-Programming :: Hackerrank/Codesprints 2016/Codesprint May/Problem G/G.ll (Z5mergeiii)

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

%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::set.0" = type { %"class.std::_Rb_tree.1" }
%"class.std::_Rb_tree.1" = type { %"struct.std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"class.std::vector.9" = type { %"struct.std::_Vector_base.10" }
%"struct.std::_Vector_base.10" = 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.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::pair.18" = type { i32, i32 }
%"struct.std::pair.14" = type <{ %"struct.std::_Rb_tree_const_iterator.16", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator.16" = type { ptr }
%"class.std::vector.20" = type { %"struct.std::_Vector_base.21" }
%"struct.std::_Vector_base.21" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.25" = type { ptr }

@p = external dso_local global [100100 x i32], align 16
@rnk = external dso_local global [100100 x i32], align 16
@s = external dso_local global [100100 x %"class.std::set"], align 16
@passive = external dso_local global [100100 x %"class.std::set"], align 16
@active = external dso_local global [100100 x %"class.std::set.0"], align 16
@mx = external dso_local global [100100 x i32], align 16
@ptr1 = external dso_local global [100100 x i32], align 16
@ptr2 = external dso_local global [100100 x i32], align 16
@ptr3 = external dso_local global [100100 x i32], align 16
@qr = external dso_local global [100100 x i32], align 16
@ans = external dso_local global [100100 x i32], align 16

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5mergeiii(i32 noundef %0, i32 noundef %1, i32 noundef %2) #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %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::_Rb_tree_const_iterator", align 8
  %13 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %14 = alloca %"struct.std::pair", align 8
  %15 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %16 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %17 = alloca %"struct.std::pair", align 8
  %18 = alloca %"class.std::vector.9", align 8
  %19 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %20 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca %"struct.std::pair", align 8
  %24 = alloca i32, align 4
  %25 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %26 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %27 = alloca %"struct.std::pair.18", align 4
  %28 = alloca %"struct.std::pair.14", align 8
  %29 = alloca %"class.std::vector.9", align 8
  %30 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %31 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %32 = alloca %"struct.std::pair", align 8
  %33 = alloca i32, align 4
  %34 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %35 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %36 = alloca %"struct.std::pair.18", align 4
  %37 = alloca %"struct.std::pair.14", align 8
  %38 = alloca %"struct.std::_Rb_tree_const_iterator.16", align 8
  %39 = alloca %"struct.std::_Rb_tree_const_iterator.16", align 8
  %40 = alloca %"struct.std::pair.14", align 8
  %41 = alloca %"struct.std::_Rb_tree_const_iterator.16", align 8
  %42 = alloca %"struct.std::_Rb_tree_const_iterator.16", align 8
  %43 = alloca %"struct.std::pair.14", align 8
  %44 = alloca i32, align 4
  %45 = alloca %"class.std::vector.20", align 8
  %46 = alloca %"struct.std::_Rb_tree_const_iterator.16", align 8
  %47 = alloca %"struct.std::_Rb_tree_const_iterator.16", align 8
  %48 = alloca %"class.__gnu_cxx::__normal_iterator.25", align 8
  %49 = alloca %"class.__gnu_cxx::__normal_iterator.25", align 8
  store i32 %0, ptr %4, align 4, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %50 = load i32, ptr %4, align 4, !tbaa !5
  %51 = call noundef i32 @_Z4findi(i32 noundef %50)
  store i32 %51, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %52 = load i32, ptr %5, align 4, !tbaa !5
  %53 = call noundef i32 @_Z4findi(i32 noundef %52)
  store i32 %53, ptr %8, align 4, !tbaa !5
  %54 = load i32, ptr %7, align 4, !tbaa !5
  %55 = load i32, ptr %8, align 4, !tbaa !5
  %56 = icmp eq i32 %54, %55
  br i1 %56, label %57, label %58

57:                                               ; preds = %3
  store i32 1, ptr %9, align 4
  br label %567

58:                                               ; preds = %3
  %59 = load i32, ptr %8, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [100100 x i32], ptr @rnk, i64 0, i64 %60
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = load i32, ptr %7, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [100100 x i32], ptr @rnk, i64 0, i64 %64
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = icmp sgt i32 %62, %66
  br i1 %67, label %68, label %69

68:                                               ; preds = %58
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8) #4
  br label %69

69:                                               ; preds = %68, %58
  %70 = load i32, ptr %8, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [100100 x i32], ptr @rnk, i64 0, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = load i32, ptr %7, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [100100 x i32], ptr @rnk, i64 0, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = icmp eq i32 %73, %77
  br i1 %78, label %79, label %85

79:                                               ; preds = %69
  %80 = load i32, ptr %7, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [100100 x i32], ptr @rnk, i64 0, i64 %81
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %82, align 4, !tbaa !5
  br label %85

85:                                               ; preds = %79, %69
  %86 = load i32, ptr %7, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [100100 x i32], ptr @mx, i64 0, i64 %87
  %89 = load i32, ptr %8, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [100100 x i32], ptr @mx, i64 0, i64 %90
  %92 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %88, ptr noundef nonnull align 4 dereferenceable(4) %91)
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = load i32, ptr %7, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [100100 x i32], ptr @mx, i64 0, i64 %95
  store i32 %93, ptr %96, align 4, !tbaa !5
  %97 = load i32, ptr %7, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [100100 x i32], ptr @mx, i64 0, i64 %98
  %100 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %99, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = load i32, ptr %7, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [100100 x i32], ptr @mx, i64 0, i64 %103
  store i32 %101, ptr %104, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %105 = load i32, ptr %7, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [100100 x i32], ptr @ptr1, i64 0, i64 %106
  %108 = load i32, ptr %107, align 4, !tbaa !5
  store i32 %108, ptr %10, align 4, !tbaa !5
  %109 = load i32, ptr %8, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [100100 x i32], ptr @ptr1, i64 0, i64 %110
  %112 = load i32, ptr %111, align 4, !tbaa !5
  store i32 %112, ptr %11, align 4, !tbaa !5
  %113 = load i32, ptr %10, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [100100 x %"class.std::set"], ptr @s, i64 0, i64 %114
  %116 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %115) #4
  %117 = load i32, ptr %11, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [100100 x %"class.std::set"], ptr @s, i64 0, i64 %118
  %120 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %119) #4
  %121 = icmp uge i64 %116, %120
  br i1 %121, label %122, label %152

122:                                              ; preds = %85
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %123 = load i32, ptr %11, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [100100 x %"class.std::set"], ptr @s, i64 0, i64 %124
  %126 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %125) #4
  %127 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %12, i32 0, i32 0
  store ptr %126, ptr %127, align 8
  br label %128

128:                                              ; preds = %146, %122
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %129 = load i32, ptr %11, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [100100 x %"class.std::set"], ptr @s, i64 0, i64 %130
  %132 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %131) #4
  %133 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %13, i32 0, i32 0
  store ptr %132, ptr %133, align 8
  %134 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br i1 %134, label %136, label %135

135:                                              ; preds = %128
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %148

136:                                              ; preds = %128
  %137 = load i32, ptr %10, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [100100 x %"class.std::set"], ptr @s, i64 0, i64 %138
  %140 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  %141 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %139, ptr noundef nonnull align 4 dereferenceable(4) %140)
  %142 = getelementptr inbounds { ptr, i8 }, ptr %14, i32 0, i32 0
  %143 = extractvalue { ptr, i8 } %141, 0
  store ptr %143, ptr %142, align 8
  %144 = getelementptr inbounds { ptr, i8 }, ptr %14, i32 0, i32 1
  %145 = extractvalue { ptr, i8 } %141, 1
  store i8 %145, ptr %144, align 8
  br label %146

146:                                              ; preds = %136
  %147 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  br label %128, !llvm.loop !9

148:                                              ; preds = %135
  %149 = load i32, ptr %11, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [100100 x %"class.std::set"], ptr @s, i64 0, i64 %150
  call void @_ZNSt3setIiSt4lessIiESaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) %151) #4
  br label %186

152:                                              ; preds = %85
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %153 = load i32, ptr %10, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [100100 x %"class.std::set"], ptr @s, i64 0, i64 %154
  %156 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %155) #4
  %157 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %15, i32 0, i32 0
  store ptr %156, ptr %157, align 8
  br label %158

158:                                              ; preds = %176, %152
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %159 = load i32, ptr %10, align 4, !tbaa !5
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [100100 x %"class.std::set"], ptr @s, i64 0, i64 %160
  %162 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %161) #4
  %163 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %16, i32 0, i32 0
  store ptr %162, ptr %163, align 8
  %164 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  br i1 %164, label %166, label %165

165:                                              ; preds = %158
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  br label %178

166:                                              ; preds = %158
  %167 = load i32, ptr %11, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [100100 x %"class.std::set"], ptr @s, i64 0, i64 %168
  %170 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #4
  %171 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %169, ptr noundef nonnull align 4 dereferenceable(4) %170)
  %172 = getelementptr inbounds { ptr, i8 }, ptr %17, i32 0, i32 0
  %173 = extractvalue { ptr, i8 } %171, 0
  store ptr %173, ptr %172, align 8
  %174 = getelementptr inbounds { ptr, i8 }, ptr %17, i32 0, i32 1
  %175 = extractvalue { ptr, i8 } %171, 1
  store i8 %175, ptr %174, align 8
  br label %176

176:                                              ; preds = %166
  %177 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #4
  br label %158, !llvm.loop !11

178:                                              ; preds = %165
  %179 = load i32, ptr %11, align 4, !tbaa !5
  %180 = load i32, ptr %7, align 4, !tbaa !5
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [100100 x i32], ptr @ptr1, i64 0, i64 %181
  store i32 %179, ptr %182, align 4, !tbaa !5
  %183 = load i32, ptr %10, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [100100 x %"class.std::set"], ptr @s, i64 0, i64 %184
  call void @_ZNSt3setIiSt4lessIiESaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) %185) #4
  br label %186

186:                                              ; preds = %178, %148
  %187 = load i32, ptr %7, align 4, !tbaa !5
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [100100 x i32], ptr @ptr2, i64 0, i64 %188
  %190 = load i32, ptr %189, align 4, !tbaa !5
  store i32 %190, ptr %10, align 4, !tbaa !5
  %191 = load i32, ptr %8, align 4, !tbaa !5
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [100100 x i32], ptr @ptr2, i64 0, i64 %192
  %194 = load i32, ptr %193, align 4, !tbaa !5
  store i32 %194, ptr %11, align 4, !tbaa !5
  %195 = load i32, ptr %10, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [100100 x %"class.std::set"], ptr @passive, i64 0, i64 %196
  %198 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %197) #4
  %199 = load i32, ptr %11, align 4, !tbaa !5
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [100100 x %"class.std::set"], ptr @passive, i64 0, i64 %200
  %202 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %201) #4
  %203 = icmp uge i64 %198, %202
  br i1 %203, label %204, label %298

204:                                              ; preds = %186
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #4
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %205 = load i32, ptr %11, align 4, !tbaa !5
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [100100 x %"class.std::set"], ptr @passive, i64 0, i64 %206
  %208 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %207) #4
  %209 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %19, i32 0, i32 0
  store ptr %208, ptr %209, align 8
  br label %210

210:                                              ; preds = %245, %204
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  %211 = load i32, ptr %11, align 4, !tbaa !5
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds [100100 x %"class.std::set"], ptr @passive, i64 0, i64 %212
  %214 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %213) #4
  %215 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %20, i32 0, i32 0
  store ptr %214, ptr %215, align 8
  %216 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  br i1 %216, label %218, label %217

217:                                              ; preds = %210
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  br label %247

218:                                              ; preds = %210
  %219 = load i32, ptr %10, align 4, !tbaa !5
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds [100100 x %"class.std::set"], ptr @passive, i64 0, i64 %220
  %222 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #4
  %223 = invoke noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48) %221, ptr noundef nonnull align 4 dereferenceable(4) %222)
          to label %224 unwind label %229

224:                                              ; preds = %218
  %225 = icmp ne i64 %223, 0
  br i1 %225, label %226, label %233

226:                                              ; preds = %224
  %227 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #4
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 4 dereferenceable(4) %227)
          to label %228 unwind label %229

228:                                              ; preds = %226
  br label %244

229:                                              ; preds = %233, %226, %218
  %230 = landingpad { ptr, i32 }
          cleanup
  %231 = extractvalue { ptr, i32 } %230, 0
  store ptr %231, ptr %21, align 8
  %232 = extractvalue { ptr, i32 } %230, 1
  store i32 %232, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  br label %297

233:                                              ; preds = %224
  %234 = load i32, ptr %10, align 4, !tbaa !5
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds [100100 x %"class.std::set"], ptr @passive, i64 0, i64 %235
  %237 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #4
  %238 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %236, ptr noundef nonnull align 4 dereferenceable(4) %237)
          to label %239 unwind label %229

239:                                              ; preds = %233
  %240 = getelementptr inbounds { ptr, i8 }, ptr %23, i32 0, i32 0
  %241 = extractvalue { ptr, i8 } %238, 0
  store ptr %241, ptr %240, align 8
  %242 = getelementptr inbounds { ptr, i8 }, ptr %23, i32 0, i32 1
  %243 = extractvalue { ptr, i8 } %238, 1
  store i8 %243, ptr %242, align 8
  br label %244

244:                                              ; preds = %239, %228
  br label %245

245:                                              ; preds = %244
  %246 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #4
  br label %210, !llvm.loop !12

247:                                              ; preds = %217
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #4
  %248 = load i32, ptr %7, align 4, !tbaa !5
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds [100100 x i32], ptr @ptr3, i64 0, i64 %249
  %251 = load i32, ptr %250, align 4, !tbaa !5
  store i32 %251, ptr %24, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  %252 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #4
  %253 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %25, i32 0, i32 0
  store ptr %252, ptr %253, align 8
  br label %254

254:                                              ; preds = %282, %247
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #4
  %255 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #4
  %256 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %26, i32 0, i32 0
  store ptr %255, ptr %256, align 8
  %257 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  br i1 %257, label %259, label %258

258:                                              ; preds = %254
  store i32 11, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  br label %293

259:                                              ; preds = %254
  %260 = load i32, ptr %10, align 4, !tbaa !5
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds [100100 x %"class.std::set"], ptr @passive, i64 0, i64 %261
  %263 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #4
  %264 = invoke noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) %262, ptr noundef nonnull align 4 dereferenceable(4) %263)
          to label %265 unwind label %284

265:                                              ; preds = %259
  %266 = load i32, ptr %24, align 4, !tbaa !5
  %267 = sext i32 %266 to i64
  %268 = getelementptr inbounds [100100 x %"class.std::set.0"], ptr @active, i64 0, i64 %267
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #4
  %269 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #4
  %270 = load i32, ptr %269, align 4, !tbaa !5
  %271 = sext i32 %270 to i64
  %272 = getelementptr inbounds [100100 x i32], ptr @qr, i64 0, i64 %271
  %273 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #4
  %274 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %272, ptr noundef nonnull align 4 dereferenceable(4) %273)
          to label %275 unwind label %288

275:                                              ; preds = %265
  store i64 %274, ptr %27, align 4
  %276 = invoke { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %268, ptr noundef nonnull align 4 dereferenceable(8) %27)
          to label %277 unwind label %288

277:                                              ; preds = %275
  %278 = getelementptr inbounds { ptr, i8 }, ptr %28, i32 0, i32 0
  %279 = extractvalue { ptr, i8 } %276, 0
  store ptr %279, ptr %278, align 8
  %280 = getelementptr inbounds { ptr, i8 }, ptr %28, i32 0, i32 1
  %281 = extractvalue { ptr, i8 } %276, 1
  store i8 %281, ptr %280, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  br label %282

282:                                              ; preds = %277
  %283 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #4
  br label %254, !llvm.loop !13

284:                                              ; preds = %259
  %285 = landingpad { ptr, i32 }
          cleanup
  %286 = extractvalue { ptr, i32 } %285, 0
  store ptr %286, ptr %21, align 8
  %287 = extractvalue { ptr, i32 } %285, 1
  store i32 %287, ptr %22, align 4
  br label %292

288:                                              ; preds = %275, %265
  %289 = landingpad { ptr, i32 }
          cleanup
  %290 = extractvalue { ptr, i32 } %289, 0
  store ptr %290, ptr %21, align 8
  %291 = extractvalue { ptr, i32 } %289, 1
  store i32 %291, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  br label %292

292:                                              ; preds = %288, %284
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  br label %297

293:                                              ; preds = %258
  %294 = load i32, ptr %11, align 4, !tbaa !5
  %295 = sext i32 %294 to i64
  %296 = getelementptr inbounds [100100 x %"class.std::set"], ptr @passive, i64 0, i64 %295
  call void @_ZNSt3setIiSt4lessIiESaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) %296) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #4
  br label %396

297:                                              ; preds = %292, %229
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #4
  br label %566

298:                                              ; preds = %186
  call void @llvm.lifetime.start.p0(i64 24, ptr %29) #4
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %29) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #4
  %299 = load i32, ptr %10, align 4, !tbaa !5
  %300 = sext i32 %299 to i64
  %301 = getelementptr inbounds [100100 x %"class.std::set"], ptr @passive, i64 0, i64 %300
  %302 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %301) #4
  %303 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %30, i32 0, i32 0
  store ptr %302, ptr %303, align 8
  br label %304

304:                                              ; preds = %339, %298
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #4
  %305 = load i32, ptr %10, align 4, !tbaa !5
  %306 = sext i32 %305 to i64
  %307 = getelementptr inbounds [100100 x %"class.std::set"], ptr @passive, i64 0, i64 %306
  %308 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %307) #4
  %309 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %31, i32 0, i32 0
  store ptr %308, ptr %309, align 8
  %310 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(8) %31) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #4
  br i1 %310, label %312, label %311

311:                                              ; preds = %304
  store i32 14, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #4
  br label %341

312:                                              ; preds = %304
  %313 = load i32, ptr %11, align 4, !tbaa !5
  %314 = sext i32 %313 to i64
  %315 = getelementptr inbounds [100100 x %"class.std::set"], ptr @passive, i64 0, i64 %314
  %316 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #4
  %317 = invoke noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48) %315, ptr noundef nonnull align 4 dereferenceable(4) %316)
          to label %318 unwind label %323

318:                                              ; preds = %312
  %319 = icmp ne i64 %317, 0
  br i1 %319, label %320, label %327

320:                                              ; preds = %318
  %321 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #4
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %29, ptr noundef nonnull align 4 dereferenceable(4) %321)
          to label %322 unwind label %323

322:                                              ; preds = %320
  br label %338

323:                                              ; preds = %327, %320, %312
  %324 = landingpad { ptr, i32 }
          cleanup
  %325 = extractvalue { ptr, i32 } %324, 0
  store ptr %325, ptr %21, align 8
  %326 = extractvalue { ptr, i32 } %324, 1
  store i32 %326, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #4
  br label %395

327:                                              ; preds = %318
  %328 = load i32, ptr %11, align 4, !tbaa !5
  %329 = sext i32 %328 to i64
  %330 = getelementptr inbounds [100100 x %"class.std::set"], ptr @passive, i64 0, i64 %329
  %331 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #4
  %332 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %330, ptr noundef nonnull align 4 dereferenceable(4) %331)
          to label %333 unwind label %323

333:                                              ; preds = %327
  %334 = getelementptr inbounds { ptr, i8 }, ptr %32, i32 0, i32 0
  %335 = extractvalue { ptr, i8 } %332, 0
  store ptr %335, ptr %334, align 8
  %336 = getelementptr inbounds { ptr, i8 }, ptr %32, i32 0, i32 1
  %337 = extractvalue { ptr, i8 } %332, 1
  store i8 %337, ptr %336, align 8
  br label %338

338:                                              ; preds = %333, %322
  br label %339

339:                                              ; preds = %338
  %340 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #4
  br label %304, !llvm.loop !14

341:                                              ; preds = %311
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #4
  %342 = load i32, ptr %7, align 4, !tbaa !5
  %343 = sext i32 %342 to i64
  %344 = getelementptr inbounds [100100 x i32], ptr @ptr3, i64 0, i64 %343
  %345 = load i32, ptr %344, align 4, !tbaa !5
  store i32 %345, ptr %33, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #4
  %346 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %29) #4
  %347 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %34, i32 0, i32 0
  store ptr %346, ptr %347, align 8
  br label %348

348:                                              ; preds = %376, %341
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #4
  %349 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %29) #4
  %350 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %35, i32 0, i32 0
  store ptr %349, ptr %350, align 8
  %351 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull align 8 dereferenceable(8) %35) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #4
  br i1 %351, label %353, label %352

352:                                              ; preds = %348
  store i32 17, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #4
  br label %387

353:                                              ; preds = %348
  %354 = load i32, ptr %11, align 4, !tbaa !5
  %355 = sext i32 %354 to i64
  %356 = getelementptr inbounds [100100 x %"class.std::set"], ptr @passive, i64 0, i64 %355
  %357 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #4
  %358 = invoke noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) %356, ptr noundef nonnull align 4 dereferenceable(4) %357)
          to label %359 unwind label %378

359:                                              ; preds = %353
  %360 = load i32, ptr %33, align 4, !tbaa !5
  %361 = sext i32 %360 to i64
  %362 = getelementptr inbounds [100100 x %"class.std::set.0"], ptr @active, i64 0, i64 %361
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #4
  %363 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #4
  %364 = load i32, ptr %363, align 4, !tbaa !5
  %365 = sext i32 %364 to i64
  %366 = getelementptr inbounds [100100 x i32], ptr @qr, i64 0, i64 %365
  %367 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #4
  %368 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %366, ptr noundef nonnull align 4 dereferenceable(4) %367)
          to label %369 unwind label %382

369:                                              ; preds = %359
  store i64 %368, ptr %36, align 4
  %370 = invoke { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %362, ptr noundef nonnull align 4 dereferenceable(8) %36)
          to label %371 unwind label %382

371:                                              ; preds = %369
  %372 = getelementptr inbounds { ptr, i8 }, ptr %37, i32 0, i32 0
  %373 = extractvalue { ptr, i8 } %370, 0
  store ptr %373, ptr %372, align 8
  %374 = getelementptr inbounds { ptr, i8 }, ptr %37, i32 0, i32 1
  %375 = extractvalue { ptr, i8 } %370, 1
  store i8 %375, ptr %374, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #4
  br label %376

376:                                              ; preds = %371
  %377 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #4
  br label %348, !llvm.loop !15

378:                                              ; preds = %353
  %379 = landingpad { ptr, i32 }
          cleanup
  %380 = extractvalue { ptr, i32 } %379, 0
  store ptr %380, ptr %21, align 8
  %381 = extractvalue { ptr, i32 } %379, 1
  store i32 %381, ptr %22, align 4
  br label %386

382:                                              ; preds = %369, %359
  %383 = landingpad { ptr, i32 }
          cleanup
  %384 = extractvalue { ptr, i32 } %383, 0
  store ptr %384, ptr %21, align 8
  %385 = extractvalue { ptr, i32 } %383, 1
  store i32 %385, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #4
  br label %386

386:                                              ; preds = %382, %378
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #4
  br label %395

387:                                              ; preds = %352
  %388 = load i32, ptr %11, align 4, !tbaa !5
  %389 = load i32, ptr %7, align 4, !tbaa !5
  %390 = sext i32 %389 to i64
  %391 = getelementptr inbounds [100100 x i32], ptr @ptr2, i64 0, i64 %390
  store i32 %388, ptr %391, align 4, !tbaa !5
  %392 = load i32, ptr %10, align 4, !tbaa !5
  %393 = sext i32 %392 to i64
  %394 = getelementptr inbounds [100100 x %"class.std::set"], ptr @passive, i64 0, i64 %393
  call void @_ZNSt3setIiSt4lessIiESaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) %394) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %29) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %29) #4
  br label %396

395:                                              ; preds = %386, %323
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %29) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %29) #4
  br label %566

396:                                              ; preds = %387, %293
  %397 = load i32, ptr %7, align 4, !tbaa !5
  %398 = sext i32 %397 to i64
  %399 = getelementptr inbounds [100100 x i32], ptr @ptr3, i64 0, i64 %398
  %400 = load i32, ptr %399, align 4, !tbaa !5
  store i32 %400, ptr %10, align 4, !tbaa !5
  %401 = load i32, ptr %8, align 4, !tbaa !5
  %402 = sext i32 %401 to i64
  %403 = getelementptr inbounds [100100 x i32], ptr @ptr3, i64 0, i64 %402
  %404 = load i32, ptr %403, align 4, !tbaa !5
  store i32 %404, ptr %11, align 4, !tbaa !5
  %405 = load i32, ptr %10, align 4, !tbaa !5
  %406 = sext i32 %405 to i64
  %407 = getelementptr inbounds [100100 x %"class.std::set.0"], ptr @active, i64 0, i64 %406
  %408 = call noundef i64 @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %407) #4
  %409 = load i32, ptr %11, align 4, !tbaa !5
  %410 = sext i32 %409 to i64
  %411 = getelementptr inbounds [100100 x %"class.std::set.0"], ptr @active, i64 0, i64 %410
  %412 = call noundef i64 @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %411) #4
  %413 = icmp uge i64 %408, %412
  br i1 %413, label %414, label %444

414:                                              ; preds = %396
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #4
  %415 = load i32, ptr %11, align 4, !tbaa !5
  %416 = sext i32 %415 to i64
  %417 = getelementptr inbounds [100100 x %"class.std::set.0"], ptr @active, i64 0, i64 %416
  %418 = call ptr @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %417) #4
  %419 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator.16", ptr %38, i32 0, i32 0
  store ptr %418, ptr %419, align 8
  br label %420

420:                                              ; preds = %438, %414
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #4
  %421 = load i32, ptr %11, align 4, !tbaa !5
  %422 = sext i32 %421 to i64
  %423 = getelementptr inbounds [100100 x %"class.std::set.0"], ptr @active, i64 0, i64 %422
  %424 = call ptr @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %423) #4
  %425 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator.16", ptr %39, i32 0, i32 0
  store ptr %424, ptr %425, align 8
  %426 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIiiEES4_(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef nonnull align 8 dereferenceable(8) %39) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #4
  br i1 %426, label %428, label %427

427:                                              ; preds = %420
  store i32 20, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #4
  br label %440

428:                                              ; preds = %420
  %429 = load i32, ptr %10, align 4, !tbaa !5
  %430 = sext i32 %429 to i64
  %431 = getelementptr inbounds [100100 x %"class.std::set.0"], ptr @active, i64 0, i64 %430
  %432 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIiiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %38) #4
  %433 = call { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %431, ptr noundef nonnull align 4 dereferenceable(8) %432)
  %434 = getelementptr inbounds { ptr, i8 }, ptr %40, i32 0, i32 0
  %435 = extractvalue { ptr, i8 } %433, 0
  store ptr %435, ptr %434, align 8
  %436 = getelementptr inbounds { ptr, i8 }, ptr %40, i32 0, i32 1
  %437 = extractvalue { ptr, i8 } %433, 1
  store i8 %437, ptr %436, align 8
  br label %438

438:                                              ; preds = %428
  %439 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorISt4pairIiiEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %38) #4
  br label %420, !llvm.loop !16

440:                                              ; preds = %427
  %441 = load i32, ptr %11, align 4, !tbaa !5
  %442 = sext i32 %441 to i64
  %443 = getelementptr inbounds [100100 x %"class.std::set.0"], ptr @active, i64 0, i64 %442
  call void @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) %443) #4
  br label %478

444:                                              ; preds = %396
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #4
  %445 = load i32, ptr %10, align 4, !tbaa !5
  %446 = sext i32 %445 to i64
  %447 = getelementptr inbounds [100100 x %"class.std::set.0"], ptr @active, i64 0, i64 %446
  %448 = call ptr @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %447) #4
  %449 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator.16", ptr %41, i32 0, i32 0
  store ptr %448, ptr %449, align 8
  br label %450

450:                                              ; preds = %468, %444
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #4
  %451 = load i32, ptr %10, align 4, !tbaa !5
  %452 = sext i32 %451 to i64
  %453 = getelementptr inbounds [100100 x %"class.std::set.0"], ptr @active, i64 0, i64 %452
  %454 = call ptr @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %453) #4
  %455 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator.16", ptr %42, i32 0, i32 0
  store ptr %454, ptr %455, align 8
  %456 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIiiEES4_(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef nonnull align 8 dereferenceable(8) %42) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #4
  br i1 %456, label %458, label %457

457:                                              ; preds = %450
  store i32 23, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #4
  br label %470

458:                                              ; preds = %450
  %459 = load i32, ptr %11, align 4, !tbaa !5
  %460 = sext i32 %459 to i64
  %461 = getelementptr inbounds [100100 x %"class.std::set.0"], ptr @active, i64 0, i64 %460
  %462 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIiiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %41) #4
  %463 = call { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %461, ptr noundef nonnull align 4 dereferenceable(8) %462)
  %464 = getelementptr inbounds { ptr, i8 }, ptr %43, i32 0, i32 0
  %465 = extractvalue { ptr, i8 } %463, 0
  store ptr %465, ptr %464, align 8
  %466 = getelementptr inbounds { ptr, i8 }, ptr %43, i32 0, i32 1
  %467 = extractvalue { ptr, i8 } %463, 1
  store i8 %467, ptr %466, align 8
  br label %468

468:                                              ; preds = %458
  %469 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorISt4pairIiiEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %41) #4
  br label %450, !llvm.loop !17

470:                                              ; preds = %457
  %471 = load i32, ptr %11, align 4, !tbaa !5
  %472 = load i32, ptr %7, align 4, !tbaa !5
  %473 = sext i32 %472 to i64
  %474 = getelementptr inbounds [100100 x i32], ptr @ptr3, i64 0, i64 %473
  store i32 %471, ptr %474, align 4, !tbaa !5
  %475 = load i32, ptr %10, align 4, !tbaa !5
  %476 = sext i32 %475 to i64
  %477 = getelementptr inbounds [100100 x %"class.std::set.0"], ptr @active, i64 0, i64 %476
  call void @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) %477) #4
  br label %478

478:                                              ; preds = %470, %440
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #4
  %479 = load i32, ptr %7, align 4, !tbaa !5
  %480 = sext i32 %479 to i64
  %481 = getelementptr inbounds [100100 x i32], ptr @ptr1, i64 0, i64 %480
  %482 = load i32, ptr %481, align 4, !tbaa !5
  %483 = sext i32 %482 to i64
  %484 = getelementptr inbounds [100100 x %"class.std::set"], ptr @s, i64 0, i64 %483
  %485 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %484) #4
  %486 = trunc i64 %485 to i32
  store i32 %486, ptr %44, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %45) #4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %45) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #4
  %487 = load i32, ptr %7, align 4, !tbaa !5
  %488 = sext i32 %487 to i64
  %489 = getelementptr inbounds [100100 x i32], ptr @ptr3, i64 0, i64 %488
  %490 = load i32, ptr %489, align 4, !tbaa !5
  %491 = sext i32 %490 to i64
  %492 = getelementptr inbounds [100100 x %"class.std::set.0"], ptr @active, i64 0, i64 %491
  %493 = call ptr @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %492) #4
  %494 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator.16", ptr %46, i32 0, i32 0
  store ptr %493, ptr %494, align 8
  br label %495

495:                                              ; preds = %529, %478
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #4
  %496 = load i32, ptr %7, align 4, !tbaa !5
  %497 = sext i32 %496 to i64
  %498 = getelementptr inbounds [100100 x i32], ptr @ptr3, i64 0, i64 %497
  %499 = load i32, ptr %498, align 4, !tbaa !5
  %500 = sext i32 %499 to i64
  %501 = getelementptr inbounds [100100 x %"class.std::set.0"], ptr @active, i64 0, i64 %500
  %502 = call ptr @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %501) #4
  %503 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator.16", ptr %47, i32 0, i32 0
  store ptr %502, ptr %503, align 8
  %504 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIiiEES4_(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef nonnull align 8 dereferenceable(8) %47) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #4
  br i1 %504, label %506, label %505

505:                                              ; preds = %495
  store i32 26, ptr %9, align 4
  br label %535

506:                                              ; preds = %495
  %507 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIiiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %46) #4
  %508 = getelementptr inbounds %"struct.std::pair.18", ptr %507, i32 0, i32 0
  %509 = load i32, ptr %508, align 4, !tbaa !18
  %510 = load i32, ptr %44, align 4, !tbaa !5
  %511 = icmp sgt i32 %509, %510
  br i1 %511, label %512, label %513

512:                                              ; preds = %506
  store i32 26, ptr %9, align 4
  br label %535

513:                                              ; preds = %506
  %514 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIiiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %46) #4
  %515 = getelementptr inbounds %"struct.std::pair.18", ptr %514, i32 0, i32 1
  %516 = load i32, ptr %515, align 4, !tbaa !20
  %517 = sext i32 %516 to i64
  %518 = getelementptr inbounds [100100 x i32], ptr @ans, i64 0, i64 %517
  %519 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %518, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %520 unwind label %531

520:                                              ; preds = %513
  %521 = load i32, ptr %519, align 4, !tbaa !5
  %522 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIiiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %46) #4
  %523 = getelementptr inbounds %"struct.std::pair.18", ptr %522, i32 0, i32 1
  %524 = load i32, ptr %523, align 4, !tbaa !20
  %525 = sext i32 %524 to i64
  %526 = getelementptr inbounds [100100 x i32], ptr @ans, i64 0, i64 %525
  store i32 %521, ptr %526, align 4, !tbaa !5
  %527 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIiiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %46) #4
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %45, ptr noundef nonnull align 4 dereferenceable(8) %527)
          to label %528 unwind label %531

528:                                              ; preds = %520
  br label %529

529:                                              ; preds = %528
  %530 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorISt4pairIiiEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %46) #4
  br label %495, !llvm.loop !21

531:                                              ; preds = %520, %513
  %532 = landingpad { ptr, i32 }
          cleanup
  %533 = extractvalue { ptr, i32 } %532, 0
  store ptr %533, ptr %21, align 8
  %534 = extractvalue { ptr, i32 } %532, 1
  store i32 %534, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #4
  br label %565

535:                                              ; preds = %512, %505
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #4
  br label %536

536:                                              ; preds = %535
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #4
  %537 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %45) #4
  %538 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.25", ptr %48, i32 0, i32 0
  store ptr %537, ptr %538, align 8
  br label %539

539:                                              ; preds = %554, %536
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #4
  %540 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %45) #4
  %541 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.25", ptr %49, i32 0, i32 0
  store ptr %540, ptr %541, align 8
  %542 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %48, ptr noundef nonnull align 8 dereferenceable(8) %49) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #4
  br i1 %542, label %544, label %543

543:                                              ; preds = %539
  store i32 29, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #4
  br label %560

544:                                              ; preds = %539
  %545 = load i32, ptr %7, align 4, !tbaa !5
  %546 = sext i32 %545 to i64
  %547 = getelementptr inbounds [100100 x i32], ptr @ptr3, i64 0, i64 %546
  %548 = load i32, ptr %547, align 4, !tbaa !5
  %549 = sext i32 %548 to i64
  %550 = getelementptr inbounds [100100 x %"class.std::set.0"], ptr @active, i64 0, i64 %549
  %551 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %48) #4
  %552 = invoke noundef i64 @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE5eraseERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %550, ptr noundef nonnull align 4 dereferenceable(8) %551)
          to label %553 unwind label %556

553:                                              ; preds = %544
  br label %554

554:                                              ; preds = %553
  %555 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %48) #4
  br label %539, !llvm.loop !22

556:                                              ; preds = %544
  %557 = landingpad { ptr, i32 }
          cleanup
  %558 = extractvalue { ptr, i32 } %557, 0
  store ptr %558, ptr %21, align 8
  %559 = extractvalue { ptr, i32 } %557, 1
  store i32 %559, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #4
  br label %565

560:                                              ; preds = %543
  %561 = load i32, ptr %7, align 4, !tbaa !5
  %562 = load i32, ptr %8, align 4, !tbaa !5
  %563 = sext i32 %562 to i64
  %564 = getelementptr inbounds [100100 x i32], ptr @p, i64 0, i64 %563
  store i32 %561, ptr %564, align 4, !tbaa !5
  store i32 1, ptr %9, align 4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %45) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %45) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %567

565:                                              ; preds = %556, %531
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %45) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %45) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #4
  br label %566

566:                                              ; preds = %565, %395, %297
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %568

567:                                              ; preds = %560, %57
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  ret void

568:                                              ; preds = %566
  %569 = load ptr, ptr %21, align 8
  %570 = load i32, ptr %22, align 4
  %571 = insertvalue { ptr, i32 } poison, ptr %569, 0
  %572 = insertvalue { ptr, i32 } %571, i32 %570, 1
  resume { ptr, i32 } %572
}

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setIiSt4lessIiESaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48)) #3 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 uwtable
declare dso_local noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE5beginEv(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)) #2

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

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

; 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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(8)) #0 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)) #0

; 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 noundef i64 @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48)) #3 align 2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::set.0" = type { %"class.std::_Rb_tree.1" }
%"class.std::_Rb_tree.1" = type { %"struct.std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.std::vector.9" = type { %"struct.std::_Vector_base.10" }
%"struct.std::_Vector_base.10" = 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.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::pair.18" = type { i32, i32 }
%"struct.std::_Rb_tree_const_iterator.16" = type { ptr }
%"class.std::vector.20" = type { %"struct.std::_Vector_base.21" }
%"struct.std::_Vector_base.21" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.25" = type { ptr }

@p = external dso_local local_unnamed_addr global [100100 x i32], align 16
@rnk = external dso_local local_unnamed_addr global [100100 x i32], align 16
@s = external dso_local global [100100 x %"class.std::set"], align 16
@passive = external dso_local global [100100 x %"class.std::set"], align 16
@active = external dso_local global [100100 x %"class.std::set.0"], align 16
@mx = external dso_local global [100100 x i32], align 16
@ptr1 = external dso_local local_unnamed_addr global [100100 x i32], align 16
@ptr2 = external dso_local local_unnamed_addr global [100100 x i32], align 16
@ptr3 = external dso_local local_unnamed_addr global [100100 x i32], align 16
@qr = external dso_local global [100100 x i32], align 16
@ans = external dso_local global [100100 x i32], align 16

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5mergeiii(i32 noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %8 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %9 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %10 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %11 = alloca %"class.std::vector.9", align 8
  %12 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %13 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca %"struct.std::pair.18", align 8
  %17 = alloca %"class.std::vector.9", align 8
  %18 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %19 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %22 = alloca %"struct.std::pair.18", align 8
  %23 = alloca %"struct.std::_Rb_tree_const_iterator.16", align 8
  %24 = alloca %"struct.std::_Rb_tree_const_iterator.16", align 8
  %25 = alloca %"struct.std::_Rb_tree_const_iterator.16", align 8
  %26 = alloca %"struct.std::_Rb_tree_const_iterator.16", align 8
  %27 = alloca %"class.std::vector.20", align 8
  %28 = alloca %"struct.std::_Rb_tree_const_iterator.16", align 8
  %29 = alloca %"struct.std::_Rb_tree_const_iterator.16", align 8
  %30 = alloca %"class.__gnu_cxx::__normal_iterator.25", align 8
  %31 = alloca %"class.__gnu_cxx::__normal_iterator.25", align 8
  store i32 %2, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  %32 = tail call noundef i32 @_Z4findi(i32 noundef %0)
  store i32 %32, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  %33 = tail call noundef i32 @_Z4findi(i32 noundef %1)
  store i32 %33, ptr %6, align 4, !tbaa !5
  %34 = icmp eq i32 %32, %33
  br i1 %34, label %323, label %35

35:                                               ; preds = %3
  %36 = sext i32 %33 to i64
  %37 = getelementptr inbounds [100100 x i32], ptr @rnk, i64 0, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = sext i32 %32 to i64
  %40 = getelementptr inbounds [100100 x i32], ptr @rnk, i64 0, i64 %39
  %41 = load i32, ptr %40, align 4, !tbaa !5
  %42 = icmp sgt i32 %38, %41
  br i1 %42, label %43, label %44

43:                                               ; preds = %35
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6) #4
  %.pre = load i32, ptr %6, align 4, !tbaa !5
  %.phi.trans.insert = sext i32 %.pre to i64
  %.phi.trans.insert108 = getelementptr inbounds [100100 x i32], ptr @rnk, i64 0, i64 %.phi.trans.insert
  %.pre109 = load i32, ptr %.phi.trans.insert108, align 4, !tbaa !5
  %.pre110 = load i32, ptr %5, align 4, !tbaa !5
  %.phi.trans.insert111 = sext i32 %.pre110 to i64
  %.phi.trans.insert112 = getelementptr inbounds [100100 x i32], ptr @rnk, i64 0, i64 %.phi.trans.insert111
  %.pre113 = load i32, ptr %.phi.trans.insert112, align 4, !tbaa !5
  br label %44

44:                                               ; preds = %43, %35
  %.pre-phi114 = phi i64 [ %.phi.trans.insert111, %43 ], [ %39, %35 ]
  %.pre-phi = phi i64 [ %.phi.trans.insert, %43 ], [ %36, %35 ]
  %45 = phi i32 [ %.pre113, %43 ], [ %41, %35 ]
  %46 = phi i32 [ %.pre109, %43 ], [ %38, %35 ]
  %47 = icmp eq i32 %46, %45
  br i1 %47, label %48, label %51

48:                                               ; preds = %44
  %49 = getelementptr inbounds [100100 x i32], ptr @rnk, i64 0, i64 %.pre-phi114
  %50 = add nsw i32 %45, 1
  store i32 %50, ptr %49, align 4, !tbaa !5
  br label %51

51:                                               ; preds = %48, %44
  %52 = getelementptr inbounds [100100 x i32], ptr @mx, i64 0, i64 %.pre-phi114
  %53 = getelementptr inbounds [100100 x i32], ptr @mx, i64 0, i64 %.pre-phi
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %52, ptr noundef nonnull align 4 dereferenceable(4) %53)
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = load i32, ptr %5, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [100100 x i32], ptr @mx, i64 0, i64 %57
  store i32 %55, ptr %58, align 4, !tbaa !5
  %59 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %58, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = load i32, ptr %5, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [100100 x i32], ptr @mx, i64 0, i64 %62
  store i32 %60, ptr %63, align 4, !tbaa !5
  %64 = getelementptr inbounds [100100 x i32], ptr @ptr1, i64 0, i64 %62
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = load i32, ptr %6, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [100100 x i32], ptr @ptr1, i64 0, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = sext i32 %65 to i64
  %71 = getelementptr inbounds [100100 x %"class.std::set"], ptr @s, i64 0, i64 %70
  %72 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %71) #4
  %73 = sext i32 %69 to i64
  %74 = getelementptr inbounds [100100 x %"class.std::set"], ptr @s, i64 0, i64 %73
  %75 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %74) #4
  %.not = icmp ult i64 %72, %75
  br i1 %.not, label %85, label %76

76:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %77 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %74) #4
  store ptr %77, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  %78 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %74) #4
  store ptr %78, ptr %8, align 8
  %79 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  br i1 %79, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %76
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  br label %97

.lr.ph:                                           ; preds = %76, %.lr.ph
  %80 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  %81 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %71, ptr noundef nonnull align 4 dereferenceable(4) %80)
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  %83 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %74) #4
  store ptr %83, ptr %8, align 8
  %84 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  br i1 %84, label %.lr.ph, label %._crit_edge, !llvm.loop !9

85:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  %86 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %71) #4
  store ptr %86, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  %87 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %71) #4
  store ptr %87, ptr %10, align 8
  %88 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  br i1 %88, label %.lr.ph81, label %._crit_edge82

._crit_edge82:                                    ; preds = %.lr.ph81, %85
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  %89 = load i32, ptr %5, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [100100 x i32], ptr @ptr1, i64 0, i64 %90
  store i32 %69, ptr %91, align 4, !tbaa !5
  br label %97

.lr.ph81:                                         ; preds = %85, %.lr.ph81
  %92 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  %93 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %74, ptr noundef nonnull align 4 dereferenceable(4) %92)
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  %95 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %71) #4
  store ptr %95, ptr %10, align 8
  %96 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  br i1 %96, label %.lr.ph81, label %._crit_edge82, !llvm.loop !11

97:                                               ; preds = %._crit_edge82, %._crit_edge
  %.sink = phi ptr [ %71, %._crit_edge82 ], [ %74, %._crit_edge ]
  call void @_ZNSt3setIiSt4lessIiESaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) %.sink) #4
  %98 = load i32, ptr %5, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [100100 x i32], ptr @ptr2, i64 0, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = load i32, ptr %6, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [100100 x i32], ptr @ptr2, i64 0, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = sext i32 %101 to i64
  %107 = getelementptr inbounds [100100 x %"class.std::set"], ptr @passive, i64 0, i64 %106
  %108 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %107) #4
  %109 = sext i32 %105 to i64
  %110 = getelementptr inbounds [100100 x %"class.std::set"], ptr @passive, i64 0, i64 %109
  %111 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %110) #4
  %.not66 = icmp ult i64 %108, %111
  br i1 %.not66, label %160, label %112

112:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #4
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  %113 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %110) #4
  store ptr %113, ptr %12, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #4
  %114 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %110) #4
  store ptr %114, ptr %13, align 8
  %115 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #4
  br i1 %115, label %.lr.ph84, label %._crit_edge85

._crit_edge85:                                    ; preds = %134, %112
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  %116 = load i32, ptr %5, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [100100 x i32], ptr @ptr3, i64 0, i64 %117
  %119 = load i32, ptr %118, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #4
  %120 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  store ptr %120, ptr %14, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #4
  %121 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  store ptr %121, ptr %15, align 8
  %122 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #4
  br i1 %122, label %.lr.ph87, label %._crit_edge88

.lr.ph87:                                         ; preds = %._crit_edge85
  %123 = sext i32 %119 to i64
  %124 = getelementptr inbounds [100100 x %"class.std::set.0"], ptr @active, i64 0, i64 %123
  br label %138

.lr.ph84:                                         ; preds = %112, %134
  %125 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  %126 = invoke noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48) %107, ptr noundef nonnull align 4 dereferenceable(4) %125)
          to label %127 unwind label %130

127:                                              ; preds = %.lr.ph84
  %.not76 = icmp eq i64 %126, 0
  %128 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  br i1 %.not76, label %132, label %129

129:                                              ; preds = %127
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 4 dereferenceable(4) %128)
          to label %134 unwind label %130

130:                                              ; preds = %132, %129, %.lr.ph84
  %131 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  br label %159

132:                                              ; preds = %127
  %133 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %107, ptr noundef nonnull align 4 dereferenceable(4) %128)
          to label %134 unwind label %130

134:                                              ; preds = %132, %129
  %135 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #4
  %136 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %110) #4
  store ptr %136, ptr %13, align 8
  %137 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #4
  br i1 %137, label %.lr.ph84, label %._crit_edge85, !llvm.loop !12

._crit_edge88:                                    ; preds = %150, %._crit_edge85
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #4
  call void @_ZNSt3setIiSt4lessIiESaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) %110) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #4
  br label %211

138:                                              ; preds = %.lr.ph87, %150
  %139 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #4
  %140 = invoke noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) %107, ptr noundef nonnull align 4 dereferenceable(4) %139)
          to label %141 unwind label %154

141:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #4
  %142 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #4
  %143 = load i32, ptr %142, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [100100 x i32], ptr @qr, i64 0, i64 %144
  %146 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #4
  %147 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %145, ptr noundef nonnull align 4 dereferenceable(4) %146)
          to label %148 unwind label %156

148:                                              ; preds = %141
  store i64 %147, ptr %16, align 8
  %149 = invoke { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %124, ptr noundef nonnull align 4 dereferenceable(8) %16)
          to label %150 unwind label %156

150:                                              ; preds = %148
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #4
  %151 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #4
  %152 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  store ptr %152, ptr %15, align 8
  %153 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #4
  br i1 %153, label %138, label %._crit_edge88, !llvm.loop !13

154:                                              ; preds = %138
  %155 = landingpad { ptr, i32 }
          cleanup
  br label %158

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

158:                                              ; preds = %156, %154
  %.pn74 = phi { ptr, i32 } [ %157, %156 ], [ %155, %154 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #4
  br label %159

159:                                              ; preds = %158, %130
  %.pn77 = phi { ptr, i32 } [ %131, %130 ], [ %.pn74, %158 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #4
  br label %322

160:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %17) #4
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #4
  %161 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %107) #4
  store ptr %161, ptr %18, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #4
  %162 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %107) #4
  store ptr %162, ptr %19, align 8
  %163 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #4
  br i1 %163, label %.lr.ph90, label %._crit_edge91

._crit_edge91:                                    ; preds = %182, %160
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #4
  %164 = load i32, ptr %5, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [100100 x i32], ptr @ptr3, i64 0, i64 %165
  %167 = load i32, ptr %166, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #4
  %168 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #4
  store ptr %168, ptr %20, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #4
  %169 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #4
  store ptr %169, ptr %21, align 8
  %170 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #4
  br i1 %170, label %.lr.ph93, label %._crit_edge94

.lr.ph93:                                         ; preds = %._crit_edge91
  %171 = sext i32 %167 to i64
  %172 = getelementptr inbounds [100100 x %"class.std::set.0"], ptr @active, i64 0, i64 %171
  br label %189

.lr.ph90:                                         ; preds = %160, %182
  %173 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #4
  %174 = invoke noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48) %110, ptr noundef nonnull align 4 dereferenceable(4) %173)
          to label %175 unwind label %178

175:                                              ; preds = %.lr.ph90
  %.not68 = icmp eq i64 %174, 0
  %176 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #4
  br i1 %.not68, label %180, label %177

177:                                              ; preds = %175
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 4 dereferenceable(4) %176)
          to label %182 unwind label %178

178:                                              ; preds = %180, %177, %.lr.ph90
  %179 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #4
  br label %210

180:                                              ; preds = %175
  %181 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %110, ptr noundef nonnull align 4 dereferenceable(4) %176)
          to label %182 unwind label %178

182:                                              ; preds = %180, %177
  %183 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #4
  %184 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %107) #4
  store ptr %184, ptr %19, align 8
  %185 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #4
  br i1 %185, label %.lr.ph90, label %._crit_edge91, !llvm.loop !14

._crit_edge94:                                    ; preds = %201, %._crit_edge91
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #4
  %186 = load i32, ptr %5, align 4, !tbaa !5
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds [100100 x i32], ptr @ptr2, i64 0, i64 %187
  store i32 %105, ptr %188, align 4, !tbaa !5
  call void @_ZNSt3setIiSt4lessIiESaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) %107) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %17) #4
  br label %211

189:                                              ; preds = %.lr.ph93, %201
  %190 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #4
  %191 = invoke noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) %110, ptr noundef nonnull align 4 dereferenceable(4) %190)
          to label %192 unwind label %205

192:                                              ; preds = %189
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #4
  %193 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #4
  %194 = load i32, ptr %193, align 4, !tbaa !5
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds [100100 x i32], ptr @qr, i64 0, i64 %195
  %197 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #4
  %198 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %196, ptr noundef nonnull align 4 dereferenceable(4) %197)
          to label %199 unwind label %207

199:                                              ; preds = %192
  store i64 %198, ptr %22, align 8
  %200 = invoke { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %172, ptr noundef nonnull align 4 dereferenceable(8) %22)
          to label %201 unwind label %207

201:                                              ; preds = %199
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #4
  %202 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #4
  %203 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #4
  store ptr %203, ptr %21, align 8
  %204 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #4
  br i1 %204, label %189, label %._crit_edge94, !llvm.loop !15

205:                                              ; preds = %189
  %206 = landingpad { ptr, i32 }
          cleanup
  br label %209

207:                                              ; preds = %199, %192
  %208 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #4
  br label %209

209:                                              ; preds = %207, %205
  %.pn = phi { ptr, i32 } [ %208, %207 ], [ %206, %205 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #4
  br label %210

210:                                              ; preds = %209, %178
  %.pn69 = phi { ptr, i32 } [ %179, %178 ], [ %.pn, %209 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %17) #4
  br label %322

211:                                              ; preds = %._crit_edge94, %._crit_edge88
  %212 = load i32, ptr %5, align 4, !tbaa !5
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds [100100 x i32], ptr @ptr3, i64 0, i64 %213
  %215 = load i32, ptr %214, align 4, !tbaa !5
  %216 = load i32, ptr %6, align 4, !tbaa !5
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds [100100 x i32], ptr @ptr3, i64 0, i64 %217
  %219 = load i32, ptr %218, align 4, !tbaa !5
  %220 = sext i32 %215 to i64
  %221 = getelementptr inbounds [100100 x %"class.std::set.0"], ptr @active, i64 0, i64 %220
  %222 = call noundef i64 @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %221) #4
  %223 = sext i32 %219 to i64
  %224 = getelementptr inbounds [100100 x %"class.std::set.0"], ptr @active, i64 0, i64 %223
  %225 = call noundef i64 @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %224) #4
  %.not71 = icmp ult i64 %222, %225
  br i1 %.not71, label %235, label %226

226:                                              ; preds = %211
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #4
  %227 = call ptr @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %224) #4
  store ptr %227, ptr %23, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %24) #4
  %228 = call ptr @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %224) #4
  store ptr %228, ptr %24, align 8
  %229 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIiiEES4_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #4
  br i1 %229, label %.lr.ph96, label %._crit_edge97

._crit_edge97:                                    ; preds = %.lr.ph96, %226
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #4
  br label %247

.lr.ph96:                                         ; preds = %226, %.lr.ph96
  %230 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIiiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #4
  %231 = call { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %221, ptr noundef nonnull align 4 dereferenceable(8) %230)
  %232 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorISt4pairIiiEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %24) #4
  %233 = call ptr @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %224) #4
  store ptr %233, ptr %24, align 8
  %234 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIiiEES4_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #4
  br i1 %234, label %.lr.ph96, label %._crit_edge97, !llvm.loop !16

235:                                              ; preds = %211
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %25) #4
  %236 = call ptr @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %221) #4
  store ptr %236, ptr %25, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %26) #4
  %237 = call ptr @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %221) #4
  store ptr %237, ptr %26, align 8
  %238 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIiiEES4_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #4
  br i1 %238, label %.lr.ph99, label %._crit_edge100

._crit_edge100:                                   ; preds = %.lr.ph99, %235
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #4
  %239 = load i32, ptr %5, align 4, !tbaa !5
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds [100100 x i32], ptr @ptr3, i64 0, i64 %240
  store i32 %219, ptr %241, align 4, !tbaa !5
  br label %247

.lr.ph99:                                         ; preds = %235, %.lr.ph99
  %242 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIiiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #4
  %243 = call { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %224, ptr noundef nonnull align 4 dereferenceable(8) %242)
  %244 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorISt4pairIiiEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %26) #4
  %245 = call ptr @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %221) #4
  store ptr %245, ptr %26, align 8
  %246 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIiiEES4_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #4
  br i1 %246, label %.lr.ph99, label %._crit_edge100, !llvm.loop !17

247:                                              ; preds = %._crit_edge100, %._crit_edge97
  %.sink115 = phi ptr [ %221, %._crit_edge100 ], [ %224, %._crit_edge97 ]
  call void @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) %.sink115) #4
  %248 = load i32, ptr %5, align 4, !tbaa !5
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds [100100 x i32], ptr @ptr1, i64 0, i64 %249
  %251 = load i32, ptr %250, align 4, !tbaa !5
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds [100100 x %"class.std::set"], ptr @s, i64 0, i64 %252
  %254 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %253) #4
  %255 = trunc i64 %254 to i32
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %27) #4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %27) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %28) #4
  %256 = load i32, ptr %5, align 4, !tbaa !5
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds [100100 x i32], ptr @ptr3, i64 0, i64 %257
  %259 = load i32, ptr %258, align 4, !tbaa !5
  %260 = sext i32 %259 to i64
  %261 = getelementptr inbounds [100100 x %"class.std::set.0"], ptr @active, i64 0, i64 %260
  %262 = call ptr @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %261) #4
  store ptr %262, ptr %28, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %29) #4
  %263 = load i32, ptr %5, align 4, !tbaa !5
  %264 = sext i32 %263 to i64
  %265 = getelementptr inbounds [100100 x i32], ptr @ptr3, i64 0, i64 %264
  %266 = load i32, ptr %265, align 4, !tbaa !5
  %267 = sext i32 %266 to i64
  %268 = getelementptr inbounds [100100 x %"class.std::set.0"], ptr @active, i64 0, i64 %267
  %269 = call ptr @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %268) #4
  store ptr %269, ptr %29, align 8
  %270 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIiiEES4_(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(8) %29) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %29) #4
  br i1 %270, label %.lr.ph102, label %._crit_edge103

.lr.ph102:                                        ; preds = %247, %288
  %271 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIiiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %28) #4
  %272 = load i32, ptr %271, align 4, !tbaa !18
  %273 = icmp sgt i32 %272, %255
  br i1 %273, label %._crit_edge103, label %274

274:                                              ; preds = %.lr.ph102
  %275 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIiiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %28) #4
  %276 = getelementptr inbounds i8, ptr %275, i64 4
  %277 = load i32, ptr %276, align 4, !tbaa !20
  %278 = sext i32 %277 to i64
  %279 = getelementptr inbounds [100100 x i32], ptr @ans, i64 0, i64 %278
  %280 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %279, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %281 = load i32, ptr %280, align 4, !tbaa !5
  %282 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIiiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %28) #4
  %283 = getelementptr inbounds i8, ptr %282, i64 4
  %284 = load i32, ptr %283, align 4, !tbaa !20
  %285 = sext i32 %284 to i64
  %286 = getelementptr inbounds [100100 x i32], ptr @ans, i64 0, i64 %285
  store i32 %281, ptr %286, align 4, !tbaa !5
  %287 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIiiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %28) #4
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %27, ptr noundef nonnull align 4 dereferenceable(8) %287)
          to label %288 unwind label %298

288:                                              ; preds = %274
  %289 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorISt4pairIiiEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %28) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %29) #4
  %290 = load i32, ptr %5, align 4, !tbaa !5
  %291 = sext i32 %290 to i64
  %292 = getelementptr inbounds [100100 x i32], ptr @ptr3, i64 0, i64 %291
  %293 = load i32, ptr %292, align 4, !tbaa !5
  %294 = sext i32 %293 to i64
  %295 = getelementptr inbounds [100100 x %"class.std::set.0"], ptr @active, i64 0, i64 %294
  %296 = call ptr @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %295) #4
  store ptr %296, ptr %29, align 8
  %297 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIiiEES4_(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(8) %29) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %29) #4
  br i1 %297, label %.lr.ph102, label %._crit_edge103, !llvm.loop !21

298:                                              ; preds = %274
  %299 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #4
  br label %321

._crit_edge103:                                   ; preds = %288, %.lr.ph102, %247
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %30) #4
  %300 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %27) #4
  store ptr %300, ptr %30, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %31) #4
  %301 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %27) #4
  store ptr %301, ptr %31, align 8
  %302 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(8) %31) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %31) #4
  br i1 %302, label %.lr.ph106, label %._crit_edge107

._crit_edge107:                                   ; preds = %315, %._crit_edge103
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %30) #4
  %303 = load i32, ptr %5, align 4, !tbaa !5
  %304 = load i32, ptr %6, align 4, !tbaa !5
  %305 = sext i32 %304 to i64
  %306 = getelementptr inbounds [100100 x i32], ptr @p, i64 0, i64 %305
  store i32 %303, ptr %306, align 4, !tbaa !5
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %27) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %27) #4
  br label %323

.lr.ph106:                                        ; preds = %._crit_edge103, %315
  %307 = load i32, ptr %5, align 4, !tbaa !5
  %308 = sext i32 %307 to i64
  %309 = getelementptr inbounds [100100 x i32], ptr @ptr3, i64 0, i64 %308
  %310 = load i32, ptr %309, align 4, !tbaa !5
  %311 = sext i32 %310 to i64
  %312 = getelementptr inbounds [100100 x %"class.std::set.0"], ptr @active, i64 0, i64 %311
  %313 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #4
  %314 = invoke noundef i64 @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE5eraseERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %312, ptr noundef nonnull align 4 dereferenceable(8) %313)
          to label %315 unwind label %319

315:                                              ; preds = %.lr.ph106
  %316 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %31) #4
  %317 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %27) #4
  store ptr %317, ptr %31, align 8
  %318 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(8) %31) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %31) #4
  br i1 %318, label %.lr.ph106, label %._crit_edge107, !llvm.loop !22

319:                                              ; preds = %.lr.ph106
  %320 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %30) #4
  br label %321

321:                                              ; preds = %319, %298
  %.pn72 = phi { ptr, i32 } [ %320, %319 ], [ %299, %298 ]
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %27) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %27) #4
  br label %322

322:                                              ; preds = %321, %210, %159
  %.pn77.pn = phi { ptr, i32 } [ %.pn77, %159 ], [ %.pn72, %321 ], [ %.pn69, %210 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  resume { ptr, i32 } %.pn77.pn

323:                                              ; preds = %3, %._crit_edge107
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  ret void
}

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setIiSt4lessIiESaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #3 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 uwtable
declare dso_local noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; 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: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #0 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 #0

; 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 noundef i64 @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #3 align 2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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