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

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

%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, int>, std::_Select1st<std::pair<const std::pair<int, int>, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, int>, std::_Select1st<std::pair<const std::pair<int, int>, int>>, std::less<std::pair<int, 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_set" = type { %"class.std::_Hashtable.8" }
%"class.std::_Hashtable.8" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"struct.std::pair" = type { i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::__detail::_Node_iterator.21" = type { %"struct.std::__detail::_Node_iterator_base.22" }
%"struct.std::__detail::_Node_iterator_base.22" = type { ptr }
%"struct.std::pair.23" = type <{ %"struct.std::__detail::_Node_iterator.21", i8, [7 x i8] }>

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@q = external dso_local global i32, align 4
@a = external dso_local global i32, align 4
@b = external dso_local global i32, align 4
@c = external dso_local global i32, align 4
@u = external dso_local global i32, align 4
@v = external dso_local global i32, align 4
@res = external dso_local global i32, align 4
@uf = external dso_local global [100001 x %"class.std::unordered_map"], align 16
@rnk = external dso_local global [100001 x %"class.std::unordered_map"], align 16
@memo = external dso_local global %"class.std::map", align 8
@edges = external dso_local global [100001 x %"class.std::vector"], align 16
@col = external dso_local global %"class.std::unordered_set", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [4 x i8], align 1

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

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %4 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %5 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %6 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %12 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %20 = alloca %"struct.std::pair", align 4
  %21 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %22 = alloca %"struct.std::pair", align 4
  %23 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %25 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %26 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %27 = alloca %"struct.std::__detail::_Node_iterator.21", align 8
  %28 = alloca %"struct.std::__detail::_Node_iterator.21", align 8
  %29 = alloca %"struct.std::pair.23", align 8
  %30 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %31 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %32 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %33 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %34 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %35 = alloca %"struct.std::__detail::_Node_iterator.21", align 8
  %36 = alloca %"struct.std::__detail::_Node_iterator.21", align 8
  %37 = alloca %"struct.std::pair.23", align 8
  %38 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %39 = alloca %"struct.std::pair", align 4
  %40 = alloca %"struct.std::pair", align 4
  store i32 0, ptr %1, align 4
  %41 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %42

42:                                               ; preds = %327, %0
  %43 = load i32, ptr %2, align 4, !tbaa !5
  %44 = load i32, ptr @m, align 4, !tbaa !5
  %45 = icmp slt i32 %43, %44
  br i1 %45, label %47, label %46

46:                                               ; preds = %42
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %330

47:                                               ; preds = %42
  %48 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.8, ptr noundef @a, ptr noundef @b, ptr noundef @c)
  %49 = load i32, ptr @a, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @edges, i64 0, i64 %50
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %51, ptr noundef nonnull align 4 dereferenceable(4) @c)
  %52 = load i32, ptr @b, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @edges, i64 0, i64 %53
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %54, ptr noundef nonnull align 4 dereferenceable(4) @c)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  %55 = load i32, ptr @c, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %56
  %58 = call ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE4findERS5_(ptr noundef nonnull align 8 dereferenceable(56) %57, ptr noundef nonnull align 4 dereferenceable(4) @a)
  %59 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %3, i32 0, i32 0
  %60 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %59, i32 0, i32 0
  store ptr %58, ptr %60, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %61 = load i32, ptr @c, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %62
  %64 = call ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %63) #6
  %65 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %4, i32 0, i32 0
  %66 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %65, i32 0, i32 0
  store ptr %64, ptr %66, align 8
  %67 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKiiELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  br i1 %67, label %68, label %188

68:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %69 = load i32, ptr @c, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %70
  %72 = call ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE4findERS5_(ptr noundef nonnull align 8 dereferenceable(56) %71, ptr noundef nonnull align 4 dereferenceable(4) @b)
  %73 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %5, i32 0, i32 0
  %74 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %73, i32 0, i32 0
  store ptr %72, ptr %74, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %75 = load i32, ptr @c, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %76
  %78 = call ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %77) #6
  %79 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %6, i32 0, i32 0
  %80 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %79, i32 0, i32 0
  store ptr %78, ptr %80, align 8
  %81 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKiiELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br i1 %81, label %82, label %130

82:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %83 = load i32, ptr @a, align 4, !tbaa !5
  %84 = call noundef i32 @_Z3fndi(i32 noundef %83)
  store i32 %84, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %85 = load i32, ptr @b, align 4, !tbaa !5
  %86 = call noundef i32 @_Z3fndi(i32 noundef %85)
  store i32 %86, ptr %8, align 4, !tbaa !5
  %87 = load i32, ptr %7, align 4, !tbaa !5
  %88 = load i32, ptr %8, align 4, !tbaa !5
  %89 = icmp ne i32 %87, %88
  br i1 %89, label %90, label %129

90:                                               ; preds = %82
  %91 = load i32, ptr @c, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %92
  %94 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %93, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = load i32, ptr @c, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %97
  %99 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %98, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %100 = load i32, ptr %99, align 4, !tbaa !5
  %101 = icmp sgt i32 %95, %100
  br i1 %101, label %102, label %103

102:                                              ; preds = %90
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8) #6
  br label %123

103:                                              ; preds = %90
  %104 = load i32, ptr @c, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %105
  %107 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %106, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %108 = load i32, ptr %107, align 4, !tbaa !5
  %109 = load i32, ptr @c, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %110
  %112 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %111, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %114 = icmp eq i32 %108, %113
  br i1 %114, label %115, label %122

115:                                              ; preds = %103
  %116 = load i32, ptr @c, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %117
  %119 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %118, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %120 = load i32, ptr %119, align 4, !tbaa !5
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %119, align 4, !tbaa !5
  br label %122

122:                                              ; preds = %115, %103
  br label %123

123:                                              ; preds = %122, %102
  %124 = load i32, ptr %8, align 4, !tbaa !5
  %125 = load i32, ptr @c, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %126
  %128 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %127, ptr noundef nonnull align 4 dereferenceable(4) %7)
  store i32 %124, ptr %128, align 4, !tbaa !5
  br label %129

129:                                              ; preds = %123, %82
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %187

130:                                              ; preds = %68
  %131 = load i32, ptr @c, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %132
  %134 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %133, ptr noundef nonnull align 4 dereferenceable(4) @b)
  store i32 1, ptr %134, align 4, !tbaa !5
  %135 = load i32, ptr @b, align 4, !tbaa !5
  %136 = load i32, ptr @c, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %137
  %139 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %138, ptr noundef nonnull align 4 dereferenceable(4) @b)
  store i32 %135, ptr %139, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %140 = load i32, ptr @a, align 4, !tbaa !5
  %141 = call noundef i32 @_Z3fndi(i32 noundef %140)
  store i32 %141, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %142 = load i32, ptr @b, align 4, !tbaa !5
  %143 = call noundef i32 @_Z3fndi(i32 noundef %142)
  store i32 %143, ptr %10, align 4, !tbaa !5
  %144 = load i32, ptr %9, align 4, !tbaa !5
  %145 = load i32, ptr %10, align 4, !tbaa !5
  %146 = icmp ne i32 %144, %145
  br i1 %146, label %147, label %186

147:                                              ; preds = %130
  %148 = load i32, ptr @c, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %149
  %151 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %150, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %152 = load i32, ptr %151, align 4, !tbaa !5
  %153 = load i32, ptr @c, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %154
  %156 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %155, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %157 = load i32, ptr %156, align 4, !tbaa !5
  %158 = icmp sgt i32 %152, %157
  br i1 %158, label %159, label %160

159:                                              ; preds = %147
  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) %9, ptr noundef nonnull align 4 dereferenceable(4) %10) #6
  br label %180

160:                                              ; preds = %147
  %161 = load i32, ptr @c, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %162
  %164 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %163, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %165 = load i32, ptr %164, align 4, !tbaa !5
  %166 = load i32, ptr @c, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %167
  %169 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %168, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %170 = load i32, ptr %169, align 4, !tbaa !5
  %171 = icmp eq i32 %165, %170
  br i1 %171, label %172, label %179

172:                                              ; preds = %160
  %173 = load i32, ptr @c, align 4, !tbaa !5
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %174
  %176 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %175, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %177 = load i32, ptr %176, align 4, !tbaa !5
  %178 = add nsw i32 %177, 1
  store i32 %178, ptr %176, align 4, !tbaa !5
  br label %179

179:                                              ; preds = %172, %160
  br label %180

180:                                              ; preds = %179, %159
  %181 = load i32, ptr %10, align 4, !tbaa !5
  %182 = load i32, ptr @c, align 4, !tbaa !5
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %183
  %185 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %184, ptr noundef nonnull align 4 dereferenceable(4) %9)
  store i32 %181, ptr %185, align 4, !tbaa !5
  br label %186

186:                                              ; preds = %180, %130
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %187

187:                                              ; preds = %186, %129
  br label %326

188:                                              ; preds = %47
  %189 = load i32, ptr @c, align 4, !tbaa !5
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %190
  %192 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %191, ptr noundef nonnull align 4 dereferenceable(4) @a)
  store i32 1, ptr %192, align 4, !tbaa !5
  %193 = load i32, ptr @a, align 4, !tbaa !5
  %194 = load i32, ptr @c, align 4, !tbaa !5
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %195
  %197 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %196, ptr noundef nonnull align 4 dereferenceable(4) @a)
  store i32 %193, ptr %197, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %198 = load i32, ptr @c, align 4, !tbaa !5
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %199
  %201 = call ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE4findERS5_(ptr noundef nonnull align 8 dereferenceable(56) %200, ptr noundef nonnull align 4 dereferenceable(4) @b)
  %202 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %11, i32 0, i32 0
  %203 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %202, i32 0, i32 0
  store ptr %201, ptr %203, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %204 = load i32, ptr @c, align 4, !tbaa !5
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %205
  %207 = call ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %206) #6
  %208 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %12, i32 0, i32 0
  %209 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %208, i32 0, i32 0
  store ptr %207, ptr %209, align 8
  %210 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKiiELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br i1 %210, label %211, label %259

211:                                              ; preds = %188
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %212 = load i32, ptr @a, align 4, !tbaa !5
  %213 = call noundef i32 @_Z3fndi(i32 noundef %212)
  store i32 %213, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %214 = load i32, ptr @b, align 4, !tbaa !5
  %215 = call noundef i32 @_Z3fndi(i32 noundef %214)
  store i32 %215, ptr %14, align 4, !tbaa !5
  %216 = load i32, ptr %13, align 4, !tbaa !5
  %217 = load i32, ptr %14, align 4, !tbaa !5
  %218 = icmp ne i32 %216, %217
  br i1 %218, label %219, label %258

219:                                              ; preds = %211
  %220 = load i32, ptr @c, align 4, !tbaa !5
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %221
  %223 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %222, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %224 = load i32, ptr %223, align 4, !tbaa !5
  %225 = load i32, ptr @c, align 4, !tbaa !5
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %226
  %228 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %227, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %229 = load i32, ptr %228, align 4, !tbaa !5
  %230 = icmp sgt i32 %224, %229
  br i1 %230, label %231, label %232

231:                                              ; preds = %219
  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) %13, ptr noundef nonnull align 4 dereferenceable(4) %14) #6
  br label %252

232:                                              ; preds = %219
  %233 = load i32, ptr @c, align 4, !tbaa !5
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %234
  %236 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %235, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %237 = load i32, ptr %236, align 4, !tbaa !5
  %238 = load i32, ptr @c, align 4, !tbaa !5
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %239
  %241 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %240, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %242 = load i32, ptr %241, align 4, !tbaa !5
  %243 = icmp eq i32 %237, %242
  br i1 %243, label %244, label %251

244:                                              ; preds = %232
  %245 = load i32, ptr @c, align 4, !tbaa !5
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %246
  %248 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %247, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %249 = load i32, ptr %248, align 4, !tbaa !5
  %250 = add nsw i32 %249, 1
  store i32 %250, ptr %248, align 4, !tbaa !5
  br label %251

251:                                              ; preds = %244, %232
  br label %252

252:                                              ; preds = %251, %231
  %253 = load i32, ptr %14, align 4, !tbaa !5
  %254 = load i32, ptr @c, align 4, !tbaa !5
  %255 = sext i32 %254 to i64
  %256 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %255
  %257 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %256, ptr noundef nonnull align 4 dereferenceable(4) %13)
  store i32 %253, ptr %257, align 4, !tbaa !5
  br label %258

258:                                              ; preds = %252, %211
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %325

259:                                              ; preds = %188
  %260 = load i32, ptr @c, align 4, !tbaa !5
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %261
  %263 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %262, ptr noundef nonnull align 4 dereferenceable(4) @b)
  store i32 1, ptr %263, align 4, !tbaa !5
  %264 = load i32, ptr @c, align 4, !tbaa !5
  %265 = sext i32 %264 to i64
  %266 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %265
  %267 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %266, ptr noundef nonnull align 4 dereferenceable(4) @a)
  store i32 1, ptr %267, align 4, !tbaa !5
  %268 = load i32, ptr @a, align 4, !tbaa !5
  %269 = load i32, ptr @c, align 4, !tbaa !5
  %270 = sext i32 %269 to i64
  %271 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %270
  %272 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %271, ptr noundef nonnull align 4 dereferenceable(4) @a)
  store i32 %268, ptr %272, align 4, !tbaa !5
  %273 = load i32, ptr @b, align 4, !tbaa !5
  %274 = load i32, ptr @c, align 4, !tbaa !5
  %275 = sext i32 %274 to i64
  %276 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %275
  %277 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %276, ptr noundef nonnull align 4 dereferenceable(4) @b)
  store i32 %273, ptr %277, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %278 = load i32, ptr @a, align 4, !tbaa !5
  %279 = call noundef i32 @_Z3fndi(i32 noundef %278)
  store i32 %279, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %280 = load i32, ptr @b, align 4, !tbaa !5
  %281 = call noundef i32 @_Z3fndi(i32 noundef %280)
  store i32 %281, ptr %16, align 4, !tbaa !5
  %282 = load i32, ptr %15, align 4, !tbaa !5
  %283 = load i32, ptr %16, align 4, !tbaa !5
  %284 = icmp ne i32 %282, %283
  br i1 %284, label %285, label %324

285:                                              ; preds = %259
  %286 = load i32, ptr @c, align 4, !tbaa !5
  %287 = sext i32 %286 to i64
  %288 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %287
  %289 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %288, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %290 = load i32, ptr %289, align 4, !tbaa !5
  %291 = load i32, ptr @c, align 4, !tbaa !5
  %292 = sext i32 %291 to i64
  %293 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %292
  %294 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %293, ptr noundef nonnull align 4 dereferenceable(4) %16)
  %295 = load i32, ptr %294, align 4, !tbaa !5
  %296 = icmp sgt i32 %290, %295
  br i1 %296, label %297, label %298

297:                                              ; preds = %285
  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) %15, ptr noundef nonnull align 4 dereferenceable(4) %16) #6
  br label %318

298:                                              ; preds = %285
  %299 = load i32, ptr @c, align 4, !tbaa !5
  %300 = sext i32 %299 to i64
  %301 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %300
  %302 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %301, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %303 = load i32, ptr %302, align 4, !tbaa !5
  %304 = load i32, ptr @c, align 4, !tbaa !5
  %305 = sext i32 %304 to i64
  %306 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %305
  %307 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %306, ptr noundef nonnull align 4 dereferenceable(4) %16)
  %308 = load i32, ptr %307, align 4, !tbaa !5
  %309 = icmp eq i32 %303, %308
  br i1 %309, label %310, label %317

310:                                              ; preds = %298
  %311 = load i32, ptr @c, align 4, !tbaa !5
  %312 = sext i32 %311 to i64
  %313 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %312
  %314 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %313, ptr noundef nonnull align 4 dereferenceable(4) %16)
  %315 = load i32, ptr %314, align 4, !tbaa !5
  %316 = add nsw i32 %315, 1
  store i32 %316, ptr %314, align 4, !tbaa !5
  br label %317

317:                                              ; preds = %310, %298
  br label %318

318:                                              ; preds = %317, %297
  %319 = load i32, ptr %16, align 4, !tbaa !5
  %320 = load i32, ptr @c, align 4, !tbaa !5
  %321 = sext i32 %320 to i64
  %322 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %321
  %323 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %322, ptr noundef nonnull align 4 dereferenceable(4) %15)
  store i32 %319, ptr %323, align 4, !tbaa !5
  br label %324

324:                                              ; preds = %318, %259
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %325

325:                                              ; preds = %324, %258
  br label %326

326:                                              ; preds = %325, %187
  br label %327

327:                                              ; preds = %326
  %328 = load i32, ptr %2, align 4, !tbaa !5
  %329 = add nsw i32 %328, 1
  store i32 %329, ptr %2, align 4, !tbaa !5
  br label %42, !llvm.loop !9

330:                                              ; preds = %46
  %331 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.9, ptr noundef @q)
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %332

332:                                              ; preds = %488, %330
  %333 = load i32, ptr %17, align 4, !tbaa !5
  %334 = load i32, ptr @q, align 4, !tbaa !5
  %335 = icmp slt i32 %333, %334
  br i1 %335, label %337, label %336

336:                                              ; preds = %332
  store i32 5, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %491

337:                                              ; preds = %332
  %338 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @u, ptr noundef @v)
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %339 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) @u, ptr noundef nonnull align 4 dereferenceable(4) @v)
  store i64 %339, ptr %20, align 4
  %340 = call ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEE4findERS4_(ptr noundef nonnull align 8 dereferenceable(48) @memo, ptr noundef nonnull align 4 dereferenceable(8) %20)
  %341 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %19, i32 0, i32 0
  store ptr %340, ptr %341, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %342 = call ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @memo) #6
  %343 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %21, i32 0, i32 0
  store ptr %342, ptr %343, align 8
  %344 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKS0_IiiEiEES6_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br i1 %344, label %345, label %350

345:                                              ; preds = %337
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %346 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) @u, ptr noundef nonnull align 4 dereferenceable(4) @v)
  store i64 %346, ptr %22, align 4
  %347 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @memo, ptr noundef nonnull align 4 dereferenceable(8) %22)
  %348 = load i32, ptr %347, align 4, !tbaa !5
  %349 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, i32 noundef %348)
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %488

350:                                              ; preds = %337
  store i32 0, ptr @res, align 4, !tbaa !5
  call void @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(56) @col) #6
  %351 = load i32, ptr @u, align 4, !tbaa !5
  %352 = sext i32 %351 to i64
  %353 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @edges, i64 0, i64 %352
  %354 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %353) #6
  %355 = load i32, ptr @v, align 4, !tbaa !5
  %356 = sext i32 %355 to i64
  %357 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @edges, i64 0, i64 %356
  %358 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %357) #6
  %359 = icmp ule i64 %354, %358
  br i1 %359, label %360, label %420

360:                                              ; preds = %350
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %361 = load i32, ptr @u, align 4, !tbaa !5
  %362 = sext i32 %361 to i64
  %363 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @edges, i64 0, i64 %362
  %364 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %363) #6
  %365 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  store ptr %364, ptr %365, align 8
  br label %366

366:                                              ; preds = %416, %360
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %367 = load i32, ptr @u, align 4, !tbaa !5
  %368 = sext i32 %367 to i64
  %369 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @edges, i64 0, i64 %368
  %370 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %369) #6
  %371 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  store ptr %370, ptr %371, align 8
  %372 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br i1 %372, label %374, label %373

373:                                              ; preds = %366
  store i32 8, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  br label %419

374:                                              ; preds = %366
  %375 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #6
  %376 = load i32, ptr %375, align 4, !tbaa !5
  store i32 %376, ptr @c, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  %377 = load i32, ptr @c, align 4, !tbaa !5
  %378 = sext i32 %377 to i64
  %379 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %378
  %380 = call ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE4findERS5_(ptr noundef nonnull align 8 dereferenceable(56) %379, ptr noundef nonnull align 4 dereferenceable(4) @v)
  %381 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %25, i32 0, i32 0
  %382 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %381, i32 0, i32 0
  store ptr %380, ptr %382, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  %383 = load i32, ptr @c, align 4, !tbaa !5
  %384 = sext i32 %383 to i64
  %385 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %384
  %386 = call ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %385) #6
  %387 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %26, i32 0, i32 0
  %388 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %387, i32 0, i32 0
  store ptr %386, ptr %388, align 8
  %389 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKiiELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %26) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  br i1 %389, label %390, label %398

390:                                              ; preds = %374
  %391 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE4findERKi(ptr noundef nonnull align 8 dereferenceable(56) @col, ptr noundef nonnull align 4 dereferenceable(4) @c)
  %392 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.21", ptr %27, i32 0, i32 0
  %393 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.22", ptr %392, i32 0, i32 0
  store ptr %391, ptr %393, align 8
  %394 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) @col) #6
  %395 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.21", ptr %28, i32 0, i32 0
  %396 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.22", ptr %395, i32 0, i32 0
  store ptr %394, ptr %396, align 8
  %397 = call noundef zeroext i1 @_ZNSt8__detaileqERKNS_19_Node_iterator_baseIiLb0EEES3_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28) #6
  br label %398

398:                                              ; preds = %390, %374
  %399 = phi i1 [ false, %374 ], [ %397, %390 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  br i1 %399, label %400, label %415

400:                                              ; preds = %398
  %401 = load i32, ptr @u, align 4, !tbaa !5
  %402 = call noundef i32 @_Z3fndi(i32 noundef %401)
  %403 = load i32, ptr @v, align 4, !tbaa !5
  %404 = call noundef i32 @_Z3fndi(i32 noundef %403)
  %405 = icmp eq i32 %402, %404
  br i1 %405, label %406, label %414

406:                                              ; preds = %400
  %407 = load i32, ptr @res, align 4, !tbaa !5
  %408 = add nsw i32 %407, 1
  store i32 %408, ptr @res, align 4, !tbaa !5
  %409 = call { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56) @col, ptr noundef nonnull align 4 dereferenceable(4) @c)
  %410 = getelementptr inbounds { ptr, i8 }, ptr %29, i32 0, i32 0
  %411 = extractvalue { ptr, i8 } %409, 0
  store ptr %411, ptr %410, align 8
  %412 = getelementptr inbounds { ptr, i8 }, ptr %29, i32 0, i32 1
  %413 = extractvalue { ptr, i8 } %409, 1
  store i8 %413, ptr %412, align 8
  br label %414

414:                                              ; preds = %406, %400
  br label %415

415:                                              ; preds = %414, %398
  br label %416

416:                                              ; preds = %415
  %417 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %23, i32 noundef 0) #6
  %418 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %30, i32 0, i32 0
  store ptr %417, ptr %418, align 8
  br label %366, !llvm.loop !11

419:                                              ; preds = %373
  br label %480

420:                                              ; preds = %350
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  %421 = load i32, ptr @v, align 4, !tbaa !5
  %422 = sext i32 %421 to i64
  %423 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @edges, i64 0, i64 %422
  %424 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %423) #6
  %425 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %31, i32 0, i32 0
  store ptr %424, ptr %425, align 8
  br label %426

426:                                              ; preds = %476, %420
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #6
  %427 = load i32, ptr @v, align 4, !tbaa !5
  %428 = sext i32 %427 to i64
  %429 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @edges, i64 0, i64 %428
  %430 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %429) #6
  %431 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %32, i32 0, i32 0
  store ptr %430, ptr %431, align 8
  %432 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(8) %32) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  br i1 %432, label %434, label %433

433:                                              ; preds = %426
  store i32 11, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  br label %479

434:                                              ; preds = %426
  %435 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %31) #6
  %436 = load i32, ptr %435, align 4, !tbaa !5
  store i32 %436, ptr @c, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #6
  %437 = load i32, ptr @c, align 4, !tbaa !5
  %438 = sext i32 %437 to i64
  %439 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %438
  %440 = call ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE4findERS5_(ptr noundef nonnull align 8 dereferenceable(56) %439, ptr noundef nonnull align 4 dereferenceable(4) @u)
  %441 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %33, i32 0, i32 0
  %442 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %441, i32 0, i32 0
  store ptr %440, ptr %442, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #6
  %443 = load i32, ptr @c, align 4, !tbaa !5
  %444 = sext i32 %443 to i64
  %445 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %444
  %446 = call ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %445) #6
  %447 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %34, i32 0, i32 0
  %448 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %447, i32 0, i32 0
  store ptr %446, ptr %448, align 8
  %449 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKiiELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull align 8 dereferenceable(8) %34) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #6
  br i1 %449, label %450, label %458

450:                                              ; preds = %434
  %451 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE4findERKi(ptr noundef nonnull align 8 dereferenceable(56) @col, ptr noundef nonnull align 4 dereferenceable(4) @c)
  %452 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.21", ptr %35, i32 0, i32 0
  %453 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.22", ptr %452, i32 0, i32 0
  store ptr %451, ptr %453, align 8
  %454 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) @col) #6
  %455 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.21", ptr %36, i32 0, i32 0
  %456 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.22", ptr %455, i32 0, i32 0
  store ptr %454, ptr %456, align 8
  %457 = call noundef zeroext i1 @_ZNSt8__detaileqERKNS_19_Node_iterator_baseIiLb0EEES3_(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull align 8 dereferenceable(8) %36) #6
  br label %458

458:                                              ; preds = %450, %434
  %459 = phi i1 [ false, %434 ], [ %457, %450 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #6
  br i1 %459, label %460, label %475

460:                                              ; preds = %458
  %461 = load i32, ptr @u, align 4, !tbaa !5
  %462 = call noundef i32 @_Z3fndi(i32 noundef %461)
  %463 = load i32, ptr @v, align 4, !tbaa !5
  %464 = call noundef i32 @_Z3fndi(i32 noundef %463)
  %465 = icmp eq i32 %462, %464
  br i1 %465, label %466, label %474

466:                                              ; preds = %460
  %467 = load i32, ptr @res, align 4, !tbaa !5
  %468 = add nsw i32 %467, 1
  store i32 %468, ptr @res, align 4, !tbaa !5
  %469 = call { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56) @col, ptr noundef nonnull align 4 dereferenceable(4) @c)
  %470 = getelementptr inbounds { ptr, i8 }, ptr %37, i32 0, i32 0
  %471 = extractvalue { ptr, i8 } %469, 0
  store ptr %471, ptr %470, align 8
  %472 = getelementptr inbounds { ptr, i8 }, ptr %37, i32 0, i32 1
  %473 = extractvalue { ptr, i8 } %469, 1
  store i8 %473, ptr %472, align 8
  br label %474

474:                                              ; preds = %466, %460
  br label %475

475:                                              ; preds = %474, %458
  br label %476

476:                                              ; preds = %475
  %477 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %31, i32 noundef 0) #6
  %478 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %38, i32 0, i32 0
  store ptr %477, ptr %478, align 8
  br label %426, !llvm.loop !12

479:                                              ; preds = %433
  br label %480

480:                                              ; preds = %479, %419
  %481 = load i32, ptr @res, align 4, !tbaa !5
  %482 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, i32 noundef %481)
  %483 = load i32, ptr @res, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #6
  %484 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) @v, ptr noundef nonnull align 4 dereferenceable(4) @u)
  store i64 %484, ptr %39, align 4
  %485 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @memo, ptr noundef nonnull align 4 dereferenceable(8) %39)
  store i32 %483, ptr %485, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #6
  %486 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) @u, ptr noundef nonnull align 4 dereferenceable(4) @v)
  store i64 %486, ptr %40, align 4
  %487 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @memo, ptr noundef nonnull align 4 dereferenceable(8) %40)
  store i32 %483, ptr %487, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #6
  br label %488

488:                                              ; preds = %480, %345
  %489 = load i32, ptr %17, align 4, !tbaa !5
  %490 = add nsw i32 %489, 1
  store i32 %490, ptr %17, align 4, !tbaa !5
  br label %332, !llvm.loop !13

491:                                              ; preds = %336
  ret i32 0
}

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

; 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 noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKiiELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

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

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

; 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)) #5

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

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEE4findERS4_(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 ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEixEOS1_(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 void @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(56)) #4 align 2

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #4 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 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !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::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, int>, std::_Select1st<std::pair<const std::pair<int, int>, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, int>, std::_Select1st<std::pair<const std::pair<int, int>, int>>, std::less<std::pair<int, 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_set" = type { %"class.std::_Hashtable.8" }
%"class.std::_Hashtable.8" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"struct.std::pair" = type { i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::__detail::_Node_iterator.21" = type { %"struct.std::__detail::_Node_iterator_base.22" }
%"struct.std::__detail::_Node_iterator_base.22" = type { ptr }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@q = external dso_local global i32, align 4
@a = external dso_local global i32, align 4
@b = external dso_local global i32, align 4
@c = external dso_local global i32, align 4
@u = external dso_local global i32, align 4
@v = external dso_local global i32, align 4
@res = external dso_local local_unnamed_addr global i32, align 4
@uf = external dso_local global [100001 x %"class.std::unordered_map"], align 16
@rnk = external dso_local global [100001 x %"class.std::unordered_map"], align 16
@memo = external dso_local global %"class.std::map", align 8
@edges = external dso_local global [100001 x %"class.std::vector"], align 16
@col = external dso_local global %"class.std::unordered_set", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [4 x i8], align 1

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

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %2 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %3 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %4 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %10 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %16 = alloca %"struct.std::pair", align 8
  %17 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %18 = alloca %"struct.std::pair", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %21 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %22 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %23 = alloca %"struct.std::__detail::_Node_iterator.21", align 8
  %24 = alloca %"struct.std::__detail::_Node_iterator.21", align 8
  %25 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %26 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %27 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %28 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %29 = alloca %"struct.std::__detail::_Node_iterator.21", align 8
  %30 = alloca %"struct.std::__detail::_Node_iterator.21", align 8
  %31 = alloca %"struct.std::pair", align 8
  %32 = alloca %"struct.std::pair", align 8
  %33 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m)
  %34 = load i32, ptr @m, align 4, !tbaa !5
  %35 = icmp sgt i32 %34, 0
  br i1 %35, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %291, %0
  %36 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.9, ptr noundef nonnull @q)
  %37 = load i32, ptr @q, align 4, !tbaa !5
  %38 = icmp sgt i32 %37, 0
  br i1 %38, label %.lr.ph24, label %._crit_edge25

.lr.ph:                                           ; preds = %0, %291
  %.015 = phi i32 [ %292, %291 ], [ 0, %0 ]
  %39 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.8, ptr noundef nonnull @a, ptr noundef nonnull @b, ptr noundef nonnull @c)
  %40 = load i32, ptr @a, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @edges, i64 0, i64 %41
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %42, ptr noundef nonnull align 4 dereferenceable(4) @c)
  %43 = load i32, ptr @b, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @edges, i64 0, i64 %44
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %45, ptr noundef nonnull align 4 dereferenceable(4) @c)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  %46 = load i32, ptr @c, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %47
  %49 = call ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE4findERS5_(ptr noundef nonnull align 8 dereferenceable(56) %48, ptr noundef nonnull align 4 dereferenceable(4) @a)
  store ptr %49, ptr %1, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  %50 = load i32, ptr @c, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %51
  %53 = call ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %52) #6
  store ptr %53, ptr %2, align 8
  %54 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKiiELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  br i1 %54, label %55, label %164

55:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %56 = load i32, ptr @c, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %57
  %59 = call ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE4findERS5_(ptr noundef nonnull align 8 dereferenceable(56) %58, ptr noundef nonnull align 4 dereferenceable(4) @b)
  store ptr %59, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %60 = load i32, ptr @c, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %61
  %63 = call ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %62) #6
  store ptr %63, ptr %4, align 8
  %64 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKiiELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  br i1 %64, label %65, label %110

65:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  %66 = load i32, ptr @a, align 4, !tbaa !5
  %67 = call noundef i32 @_Z3fndi(i32 noundef %66)
  store i32 %67, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  %68 = load i32, ptr @b, align 4, !tbaa !5
  %69 = call noundef i32 @_Z3fndi(i32 noundef %68)
  store i32 %69, ptr %6, align 4, !tbaa !5
  %70 = load i32, ptr %5, align 4, !tbaa !5
  %.not14 = icmp eq i32 %70, %69
  br i1 %.not14, label %109, label %71

71:                                               ; preds = %65
  %72 = load i32, ptr @c, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %73
  %75 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %74, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = load i32, ptr @c, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %78
  %80 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %79, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = icmp sgt i32 %76, %81
  br i1 %82, label %83, label %84

83:                                               ; preds = %71
  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) #6
  br label %103

84:                                               ; preds = %71
  %85 = load i32, ptr @c, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %86
  %88 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %87, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = load i32, ptr @c, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %91
  %93 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %92, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = icmp eq i32 %89, %94
  br i1 %95, label %96, label %103

96:                                               ; preds = %84
  %97 = load i32, ptr @c, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %98
  %100 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %99, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %100, align 4, !tbaa !5
  br label %103

103:                                              ; preds = %84, %96, %83
  %104 = load i32, ptr %6, align 4, !tbaa !5
  %105 = load i32, ptr @c, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %106
  %108 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %107, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i32 %104, ptr %108, align 4, !tbaa !5
  br label %109

109:                                              ; preds = %103, %65
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  br label %291

110:                                              ; preds = %55
  %111 = load i32, ptr @c, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %112
  %114 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %113, ptr noundef nonnull align 4 dereferenceable(4) @b)
  store i32 1, ptr %114, align 4, !tbaa !5
  %115 = load i32, ptr @b, align 4, !tbaa !5
  %116 = load i32, ptr @c, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %117
  %119 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %118, ptr noundef nonnull align 4 dereferenceable(4) @b)
  store i32 %115, ptr %119, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  %120 = load i32, ptr @a, align 4, !tbaa !5
  %121 = call noundef i32 @_Z3fndi(i32 noundef %120)
  store i32 %121, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  %122 = load i32, ptr @b, align 4, !tbaa !5
  %123 = call noundef i32 @_Z3fndi(i32 noundef %122)
  store i32 %123, ptr %8, align 4, !tbaa !5
  %124 = load i32, ptr %7, align 4, !tbaa !5
  %.not13 = icmp eq i32 %124, %123
  br i1 %.not13, label %163, label %125

125:                                              ; preds = %110
  %126 = load i32, ptr @c, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %127
  %129 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %128, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %130 = load i32, ptr %129, align 4, !tbaa !5
  %131 = load i32, ptr @c, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %132
  %134 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %133, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %135 = load i32, ptr %134, align 4, !tbaa !5
  %136 = icmp sgt i32 %130, %135
  br i1 %136, label %137, label %138

137:                                              ; preds = %125
  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) #6
  br label %157

138:                                              ; preds = %125
  %139 = load i32, ptr @c, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %140
  %142 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %141, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %143 = load i32, ptr %142, align 4, !tbaa !5
  %144 = load i32, ptr @c, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %145
  %147 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %146, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %148 = load i32, ptr %147, align 4, !tbaa !5
  %149 = icmp eq i32 %143, %148
  br i1 %149, label %150, label %157

150:                                              ; preds = %138
  %151 = load i32, ptr @c, align 4, !tbaa !5
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %152
  %154 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %153, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %155 = load i32, ptr %154, align 4, !tbaa !5
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %154, align 4, !tbaa !5
  br label %157

157:                                              ; preds = %138, %150, %137
  %158 = load i32, ptr %8, align 4, !tbaa !5
  %159 = load i32, ptr @c, align 4, !tbaa !5
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %160
  %162 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %161, ptr noundef nonnull align 4 dereferenceable(4) %7)
  store i32 %158, ptr %162, align 4, !tbaa !5
  br label %163

163:                                              ; preds = %157, %110
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  br label %291

164:                                              ; preds = %.lr.ph
  %165 = load i32, ptr @c, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %166
  %168 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %167, ptr noundef nonnull align 4 dereferenceable(4) @a)
  store i32 1, ptr %168, align 4, !tbaa !5
  %169 = load i32, ptr @a, align 4, !tbaa !5
  %170 = load i32, ptr @c, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %171
  %173 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %172, ptr noundef nonnull align 4 dereferenceable(4) @a)
  store i32 %169, ptr %173, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %174 = load i32, ptr @c, align 4, !tbaa !5
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %175
  %177 = call ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE4findERS5_(ptr noundef nonnull align 8 dereferenceable(56) %176, ptr noundef nonnull align 4 dereferenceable(4) @b)
  store ptr %177, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %178 = load i32, ptr @c, align 4, !tbaa !5
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %179
  %181 = call ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %180) #6
  store ptr %181, ptr %10, align 8
  %182 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKiiELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  br i1 %182, label %183, label %228

183:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #6
  %184 = load i32, ptr @a, align 4, !tbaa !5
  %185 = call noundef i32 @_Z3fndi(i32 noundef %184)
  store i32 %185, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #6
  %186 = load i32, ptr @b, align 4, !tbaa !5
  %187 = call noundef i32 @_Z3fndi(i32 noundef %186)
  store i32 %187, ptr %12, align 4, !tbaa !5
  %188 = load i32, ptr %11, align 4, !tbaa !5
  %.not12 = icmp eq i32 %188, %187
  br i1 %.not12, label %227, label %189

189:                                              ; preds = %183
  %190 = load i32, ptr @c, align 4, !tbaa !5
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %191
  %193 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %192, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %194 = load i32, ptr %193, align 4, !tbaa !5
  %195 = load i32, ptr @c, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %196
  %198 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %197, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %199 = load i32, ptr %198, align 4, !tbaa !5
  %200 = icmp sgt i32 %194, %199
  br i1 %200, label %201, label %202

201:                                              ; preds = %189
  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) %11, ptr noundef nonnull align 4 dereferenceable(4) %12) #6
  br label %221

202:                                              ; preds = %189
  %203 = load i32, ptr @c, align 4, !tbaa !5
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %204
  %206 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %205, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %207 = load i32, ptr %206, align 4, !tbaa !5
  %208 = load i32, ptr @c, align 4, !tbaa !5
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %209
  %211 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %210, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %212 = load i32, ptr %211, align 4, !tbaa !5
  %213 = icmp eq i32 %207, %212
  br i1 %213, label %214, label %221

214:                                              ; preds = %202
  %215 = load i32, ptr @c, align 4, !tbaa !5
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %216
  %218 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %217, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %219 = load i32, ptr %218, align 4, !tbaa !5
  %220 = add nsw i32 %219, 1
  store i32 %220, ptr %218, align 4, !tbaa !5
  br label %221

221:                                              ; preds = %202, %214, %201
  %222 = load i32, ptr %12, align 4, !tbaa !5
  %223 = load i32, ptr @c, align 4, !tbaa !5
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %224
  %226 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %225, ptr noundef nonnull align 4 dereferenceable(4) %11)
  store i32 %222, ptr %226, align 4, !tbaa !5
  br label %227

227:                                              ; preds = %221, %183
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #6
  br label %291

228:                                              ; preds = %164
  %229 = load i32, ptr @c, align 4, !tbaa !5
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %230
  %232 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %231, ptr noundef nonnull align 4 dereferenceable(4) @b)
  store i32 1, ptr %232, align 4, !tbaa !5
  %233 = load i32, ptr @c, align 4, !tbaa !5
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %234
  %236 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %235, ptr noundef nonnull align 4 dereferenceable(4) @a)
  store i32 1, ptr %236, align 4, !tbaa !5
  %237 = load i32, ptr @a, align 4, !tbaa !5
  %238 = load i32, ptr @c, align 4, !tbaa !5
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %239
  %241 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %240, ptr noundef nonnull align 4 dereferenceable(4) @a)
  store i32 %237, ptr %241, align 4, !tbaa !5
  %242 = load i32, ptr @b, align 4, !tbaa !5
  %243 = load i32, ptr @c, align 4, !tbaa !5
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %244
  %246 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %245, ptr noundef nonnull align 4 dereferenceable(4) @b)
  store i32 %242, ptr %246, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #6
  %247 = load i32, ptr @a, align 4, !tbaa !5
  %248 = call noundef i32 @_Z3fndi(i32 noundef %247)
  store i32 %248, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #6
  %249 = load i32, ptr @b, align 4, !tbaa !5
  %250 = call noundef i32 @_Z3fndi(i32 noundef %249)
  store i32 %250, ptr %14, align 4, !tbaa !5
  %251 = load i32, ptr %13, align 4, !tbaa !5
  %.not11 = icmp eq i32 %251, %250
  br i1 %.not11, label %290, label %252

252:                                              ; preds = %228
  %253 = load i32, ptr @c, align 4, !tbaa !5
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %254
  %256 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %255, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %257 = load i32, ptr %256, align 4, !tbaa !5
  %258 = load i32, ptr @c, align 4, !tbaa !5
  %259 = sext i32 %258 to i64
  %260 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %259
  %261 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %260, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %262 = load i32, ptr %261, align 4, !tbaa !5
  %263 = icmp sgt i32 %257, %262
  br i1 %263, label %264, label %265

264:                                              ; preds = %252
  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) %13, ptr noundef nonnull align 4 dereferenceable(4) %14) #6
  br label %284

265:                                              ; preds = %252
  %266 = load i32, ptr @c, align 4, !tbaa !5
  %267 = sext i32 %266 to i64
  %268 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %267
  %269 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %268, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %270 = load i32, ptr %269, align 4, !tbaa !5
  %271 = load i32, ptr @c, align 4, !tbaa !5
  %272 = sext i32 %271 to i64
  %273 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %272
  %274 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %273, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %275 = load i32, ptr %274, align 4, !tbaa !5
  %276 = icmp eq i32 %270, %275
  br i1 %276, label %277, label %284

277:                                              ; preds = %265
  %278 = load i32, ptr @c, align 4, !tbaa !5
  %279 = sext i32 %278 to i64
  %280 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @rnk, i64 0, i64 %279
  %281 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %280, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %282 = load i32, ptr %281, align 4, !tbaa !5
  %283 = add nsw i32 %282, 1
  store i32 %283, ptr %281, align 4, !tbaa !5
  br label %284

284:                                              ; preds = %265, %277, %264
  %285 = load i32, ptr %14, align 4, !tbaa !5
  %286 = load i32, ptr @c, align 4, !tbaa !5
  %287 = sext i32 %286 to i64
  %288 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %287
  %289 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %288, ptr noundef nonnull align 4 dereferenceable(4) %13)
  store i32 %285, ptr %289, align 4, !tbaa !5
  br label %290

290:                                              ; preds = %284, %228
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #6
  br label %291

291:                                              ; preds = %163, %109, %290, %227
  %292 = add nuw nsw i32 %.015, 1
  %293 = load i32, ptr @m, align 4, !tbaa !5
  %294 = icmp slt i32 %292, %293
  br i1 %294, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge25:                                    ; preds = %404, %._crit_edge
  ret i32 0

.lr.ph24:                                         ; preds = %._crit_edge, %404
  %.01022 = phi i32 [ %405, %404 ], [ 0, %._crit_edge ]
  %295 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @u, ptr noundef nonnull @v)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #6
  %296 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) @u, ptr noundef nonnull align 4 dereferenceable(4) @v)
  store i64 %296, ptr %16, align 8
  %297 = call ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEE4findERS4_(ptr noundef nonnull align 8 dereferenceable(48) @memo, ptr noundef nonnull align 4 dereferenceable(8) %16)
  store ptr %297, ptr %15, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #6
  %298 = call ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @memo) #6
  store ptr %298, ptr %17, align 8
  %299 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKS0_IiiEiEES6_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #6
  br i1 %299, label %300, label %305

300:                                              ; preds = %.lr.ph24
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #6
  %301 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) @u, ptr noundef nonnull align 4 dereferenceable(4) @v)
  store i64 %301, ptr %18, align 8
  %302 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @memo, ptr noundef nonnull align 4 dereferenceable(8) %18)
  %303 = load i32, ptr %302, align 4, !tbaa !5
  %304 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, i32 noundef %303)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #6
  br label %404

305:                                              ; preds = %.lr.ph24
  store i32 0, ptr @res, align 4, !tbaa !5
  call void @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(56) @col) #6
  %306 = load i32, ptr @u, align 4, !tbaa !5
  %307 = sext i32 %306 to i64
  %308 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @edges, i64 0, i64 %307
  %309 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %308) #6
  %310 = load i32, ptr @v, align 4, !tbaa !5
  %311 = sext i32 %310 to i64
  %312 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @edges, i64 0, i64 %311
  %313 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %312) #6
  %.not = icmp ugt i64 %309, %313
  br i1 %.not, label %355, label %314

314:                                              ; preds = %305
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #6
  %315 = load i32, ptr @u, align 4, !tbaa !5
  %316 = sext i32 %315 to i64
  %317 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @edges, i64 0, i64 %316
  %318 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %317) #6
  store ptr %318, ptr %19, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #6
  %319 = load i32, ptr @u, align 4, !tbaa !5
  %320 = sext i32 %319 to i64
  %321 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @edges, i64 0, i64 %320
  %322 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %321) #6
  store ptr %322, ptr %20, align 8
  %323 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #6
  br i1 %323, label %.lr.ph17, label %._crit_edge18

._crit_edge18:                                    ; preds = %348, %314
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #6
  br label %396

.lr.ph17:                                         ; preds = %314, %348
  %324 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #6
  %325 = load i32, ptr %324, align 4, !tbaa !5
  store i32 %325, ptr @c, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #6
  %326 = sext i32 %325 to i64
  %327 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %326
  %328 = call ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE4findERS5_(ptr noundef nonnull align 8 dereferenceable(56) %327, ptr noundef nonnull align 4 dereferenceable(4) @v)
  store ptr %328, ptr %21, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #6
  %329 = load i32, ptr @c, align 4, !tbaa !5
  %330 = sext i32 %329 to i64
  %331 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %330
  %332 = call ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %331) #6
  store ptr %332, ptr %22, align 8
  %333 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKiiELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %22) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %24) #6
  br i1 %333, label %334, label %.critedge

334:                                              ; preds = %.lr.ph17
  %335 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE4findERKi(ptr noundef nonnull align 8 dereferenceable(56) @col, ptr noundef nonnull align 4 dereferenceable(4) @c)
  store ptr %335, ptr %23, align 8
  %336 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) @col) #6
  store ptr %336, ptr %24, align 8
  %337 = call noundef zeroext i1 @_ZNSt8__detaileqERKNS_19_Node_iterator_baseIiLb0EEES3_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #6
  br i1 %337, label %338, label %348

338:                                              ; preds = %334
  %339 = load i32, ptr @u, align 4, !tbaa !5
  %340 = call noundef i32 @_Z3fndi(i32 noundef %339)
  %341 = load i32, ptr @v, align 4, !tbaa !5
  %342 = call noundef i32 @_Z3fndi(i32 noundef %341)
  %343 = icmp eq i32 %340, %342
  br i1 %343, label %344, label %348

344:                                              ; preds = %338
  %345 = load i32, ptr @res, align 4, !tbaa !5
  %346 = add nsw i32 %345, 1
  store i32 %346, ptr @res, align 4, !tbaa !5
  %347 = call { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56) @col, ptr noundef nonnull align 4 dereferenceable(4) @c)
  br label %348

.critedge:                                        ; preds = %.lr.ph17
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #6
  br label %348

348:                                              ; preds = %334, %.critedge, %344, %338
  %349 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %19, i32 noundef 0) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #6
  %350 = load i32, ptr @u, align 4, !tbaa !5
  %351 = sext i32 %350 to i64
  %352 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @edges, i64 0, i64 %351
  %353 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %352) #6
  store ptr %353, ptr %20, align 8
  %354 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #6
  br i1 %354, label %.lr.ph17, label %._crit_edge18, !llvm.loop !11

355:                                              ; preds = %305
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %25) #6
  %356 = load i32, ptr @v, align 4, !tbaa !5
  %357 = sext i32 %356 to i64
  %358 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @edges, i64 0, i64 %357
  %359 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %358) #6
  store ptr %359, ptr %25, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %26) #6
  %360 = load i32, ptr @v, align 4, !tbaa !5
  %361 = sext i32 %360 to i64
  %362 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @edges, i64 0, i64 %361
  %363 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %362) #6
  store ptr %363, ptr %26, align 8
  %364 = 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) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #6
  br i1 %364, label %.lr.ph20, label %._crit_edge21

._crit_edge21:                                    ; preds = %389, %355
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #6
  br label %396

.lr.ph20:                                         ; preds = %355, %389
  %365 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #6
  %366 = load i32, ptr %365, align 4, !tbaa !5
  store i32 %366, ptr @c, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %27) #6
  %367 = sext i32 %366 to i64
  %368 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %367
  %369 = call ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE4findERS5_(ptr noundef nonnull align 8 dereferenceable(56) %368, ptr noundef nonnull align 4 dereferenceable(4) @u)
  store ptr %369, ptr %27, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %28) #6
  %370 = load i32, ptr @c, align 4, !tbaa !5
  %371 = sext i32 %370 to i64
  %372 = getelementptr inbounds [100001 x %"class.std::unordered_map"], ptr @uf, i64 0, i64 %371
  %373 = call ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %372) #6
  store ptr %373, ptr %28, align 8
  %374 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKiiELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %29) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %30) #6
  br i1 %374, label %375, label %.critedge2

375:                                              ; preds = %.lr.ph20
  %376 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE4findERKi(ptr noundef nonnull align 8 dereferenceable(56) @col, ptr noundef nonnull align 4 dereferenceable(4) @c)
  store ptr %376, ptr %29, align 8
  %377 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) @col) #6
  store ptr %377, ptr %30, align 8
  %378 = call noundef zeroext i1 @_ZNSt8__detaileqERKNS_19_Node_iterator_baseIiLb0EEES3_(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(8) %30) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %30) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %29) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #6
  br i1 %378, label %379, label %389

379:                                              ; preds = %375
  %380 = load i32, ptr @u, align 4, !tbaa !5
  %381 = call noundef i32 @_Z3fndi(i32 noundef %380)
  %382 = load i32, ptr @v, align 4, !tbaa !5
  %383 = call noundef i32 @_Z3fndi(i32 noundef %382)
  %384 = icmp eq i32 %381, %383
  br i1 %384, label %385, label %389

385:                                              ; preds = %379
  %386 = load i32, ptr @res, align 4, !tbaa !5
  %387 = add nsw i32 %386, 1
  store i32 %387, ptr @res, align 4, !tbaa !5
  %388 = call { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56) @col, ptr noundef nonnull align 4 dereferenceable(4) @c)
  br label %389

.critedge2:                                       ; preds = %.lr.ph20
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %30) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %29) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #6
  br label %389

389:                                              ; preds = %375, %.critedge2, %385, %379
  %390 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %25, i32 noundef 0) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %26) #6
  %391 = load i32, ptr @v, align 4, !tbaa !5
  %392 = sext i32 %391 to i64
  %393 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @edges, i64 0, i64 %392
  %394 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %393) #6
  store ptr %394, ptr %26, align 8
  %395 = 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) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #6
  br i1 %395, label %.lr.ph20, label %._crit_edge21, !llvm.loop !12

396:                                              ; preds = %._crit_edge21, %._crit_edge18
  %397 = load i32, ptr @res, align 4, !tbaa !5
  %398 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, i32 noundef %397)
  %399 = load i32, ptr @res, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %31) #6
  %400 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) @v, ptr noundef nonnull align 4 dereferenceable(4) @u)
  store i64 %400, ptr %31, align 8
  %401 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @memo, ptr noundef nonnull align 4 dereferenceable(8) %31)
  store i32 %399, ptr %401, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %32) #6
  %402 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) @u, ptr noundef nonnull align 4 dereferenceable(4) @v)
  store i64 %402, ptr %32, align 8
  %403 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @memo, ptr noundef nonnull align 4 dereferenceable(8) %32)
  store i32 %399, ptr %403, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %32) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %31) #6
  br label %404

404:                                              ; preds = %396, %300
  %405 = add nuw nsw i32 %.01022, 1
  %406 = load i32, ptr @q, align 4, !tbaa !5
  %407 = icmp slt i32 %405, %406
  br i1 %407, label %.lr.ph24, label %._crit_edge25, !llvm.loop !13
}

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

; 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 noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKiiELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

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

; 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 #5

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

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEE4findERS4_(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 ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEixEOS1_(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 void @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #4 align 2

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #4 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 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { nounwind }

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

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


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